0 Shares 82 Views

Hairdressers may be passing on Covid to customers because of 'inadequate' visors, ministers warned

Aug 01, 2020
0 83

.yns-panel{overflow:hidden;font-size:14px}.yns-panel-loading{background:url(https://s.yimg.com/ok/u/assets/img/spinner-24×24-anim.gif) no-repeat center center;opacity:.5;z-index:1;min-height:58px}.yns-panel-padding-btm{padding-bottom:40px}.yns-hide{display:none}.yns-panel-footer-action{background-color:#fff;border-top:solid 1px #f1f1f5;padding:10px 0;text-align:center;position:absolute;left:0;right:0;bottom:0}.yns-navigate-center{color:#000;line-height:20px;text-decoration:none}.yns-navigate-center:focus,.yns-navigate-center:hover{color:#0078ff;line-height:20px;text-decoration:none}.yns-panel-header{padding:10px 0 10px 16px}.yns-panel-header-title{color:#26282a;font-weight:700;line-height:17px}.yns-panel-error{padding:20px 0;text-align:center}.yns-indicator{background-color:#188fff;width:11px;height:11px;border:solid 1.5px #fff;display:inline-block;border-radius:50%}.yns-promo-title{color:#000}.yns-promo{display:none}.display-push-promos .yns-promo{display:block}.yns-promo.yns-container .yns-content{padding-right:115px}.yns-promo.yns-container .yns-promo-ctr{background-color:#0f69ff;border-radius:2px;border:none;color:#fff;cursor:pointer;font-size:13px;height:35px;max-width:111px;min-width:96px}.yns-promo.yns-container .yns-promo-button{position:absolute;top:4px;right:4px}.yns-container.yns-empty{padding:72px 0;position:relative}.display-push-promos .yns-empty{border-top:solid 1px #f1f1f5}.yns-container.yns-empty:hover{background-color:#fff}.yns-empty .yns-content{position:absolute;padding:0;text-align:center;width:100%}

‘ + ‘

‘ + ‘

    ‘ + ‘{promoMarkup}’ + ‘{notifMarkup}’ + ‘

‘ + ‘

‘ + ”; var panelEmptyTemplate = ‘

  • ‘ + ‘

    ‘ + ‘{emptyPanelMsg}’ + ‘

    ‘ + ‘

  • ‘; var panelErrorTemplate = ‘

    ‘ + ‘ {errorMsg} ‘ + ‘

    ‘; var panelParentTemplate = ”; var notifOnboardPromoTemplate = ‘

  • ‘ + ‘

    ‘ + ‘

  • ‘; /* global document, window */ var EXPANDED_PANEL = ‘expanded_panel’;
    var ERROR_PANEL = ‘error_panel’; var NotificationView = function () { function NotificationView(config, store) { classCallCheck(this, NotificationView); var self = this; self._config = config; self._panelNode = null; self._store = store; } /** * _renderPanel * Renders the notification panel * @param {string} template – Notification panel template * @param {object} panelData – Notification panel data * @return {object} notification panel display markup */ createClass(NotificationView, [{ key: ‘_generatePanelMarkup’, value: function _generatePanelMarkup(template, panelData) { var config = this._config; var isNotifPermissionGranted = void 0; var isClientPromoEligible = void 0; if (typeof window !== ‘undefined’) { isNotifPermissionGranted = window.Notification && window.Notification.permission === ‘granted’; isClientPromoEligible = hasClass(document.body, config.promos.eligibleBodyClass); } var shouldShowNotifOnboardPromo = config.promos.enableNotifOnboard && !isNotifPermissionGranted && isClientPromoEligible; var promoMarkup = shouldShowNotifOnboardPromo ? notifOnboardPromoTemplate : ”; if (promoMarkup) { promoMarkup = promoMarkup.replace(‘{notifOnboardBtnLabel}’, config.promos.notifOnboardBtnLabel).replace(‘{notifOnboardMsg}’, config.promos.notifOnboardMsg).replace(‘{subscriptionTopic}’, config.promos.subscriptionTopic); } var hasAdditionalNotifs = panelData.newCount > config.panel.maxCount; var newCount = hasAdditionalNotifs ? panelData.newCount : ”; var notifCenterPath = config.panel.notificationCenterPath; var notifCenterLinkClass = notifCenterPath ? ” : constants.panelHideElement; var panelHeaderDisplayClass = config.panel.headerMsg ? ” : ‘ ‘ + constants.panelHideElement; var paddingClass = notifCenterPath ? constants.panelPaddingBtm : ”; var notifMarkup = void 0; if (panelData.count) { notifMarkup = panelData.markup; } else { var panelEmptyMarkup = panelEmptyTemplate; notifMarkup = panelEmptyMarkup.replace(‘{emptyPanelMsg}’, config.panel.emptyPanelMsg); } template = template.replace(‘{notifMarkup}’, notifMarkup).replace(‘{promoMarkup}’, promoMarkup).replace(‘{hideClass}’, notifCenterLinkClass).replace(‘{notifCenterLink}’, notifCenterPath).replace(‘{paddingClass}’, paddingClass).replace(‘{headerMsg}’, config.panel.headerMsg).replace(‘{hideHeaderClass}’, panelHeaderDisplayClass).replace(/{notificationCenterNavMsg}/g, config.panel.notificationCenterNavMsg).replace(/{newCount}/g, newCount); return template; } /** * render * Renders the panel based on type – collapsed, expanded, toast * @param {string} templateType – template type to be used * @param {Function} callback – The callback function * @return {void} */ }, { key: ‘render’, value: function render(templateType, callback) { var self = this; if (!self._panelNode) { callback && callback(new Error(‘No panel parent’)); return; } var template = void 0; var parent = self._panelNode; var panelMarkup = void 0; var panelData = void 0; switch (templateType) { case EXPANDED_PANEL: template = panelTemplate || ”; panelData = self._store.getNotifications(); panelMarkup = self._generatePanelMarkup(template, panelData); parent.innerHTML = panelMarkup; break; case ERROR_PANEL: template = panelErrorTemplate || ”; panelMarkup = template.replace(‘{errorMsg}’, self._config.panel.errorMsg); parent.innerHTML = panelMarkup; break; default: break; } callback && callback(); } /** * createPanelParentNode * Create the panel DOM structure * @param {object} panelParentNode – Panel’s parent node – from consumer * @return {void} */ }, { key: ‘createPanelParentNode’, value: function createPanelParentNode(panelParentNode) { if (!panelParentNode) { return; } panelParentNode.innerHTML = panelParentTemplate; // Store the panel node this._panelNode = document.getElementById(constants.panelNodeId); } /** * updateBadgeNode * Updates the badge node if needed * @param {object} badgeNode badge HTML node * @return {void} */ }, { key: ‘updateBadgeNode’, value: function updateBadgeNode(badgeNode) { if (badgeNode) { var _store$getNotificatio = this._store.getNotifications(), newCount = _store$getNotificatio.newCount; var maxBadgeCount = this._config.badge.maxCount; if (newCount) { var badgeCount = newCount > maxBadgeCount ? maxBadgeCount + ‘+’ : newCount; badgeNode.innerHTML = badgeCount; } else { badgeNode.innerHTML = ”; } } } /** * addStyles * Add panel css returned by service to page once * @param {object} styles css style blob * @return {void} */ }, { key: ‘addStyles’, value: function addStyles(styles) { if (styles) { if (typeof window !== ‘undefined’) { var styleTag = document.getElementById(this._config.panel.styleTagId); if (!styleTag) { styleTag = document.createElement(‘style’); styleTag.type = ‘text/css’; styleTag.id = this._config.panel.styleTagId; styleTag.innerText = styles; document.head.appendChild(styleTag); } } } } }]); return NotificationView;
    }(); /* global document */
    /* Updates the notification store when needed Controls the notification view */ var EXPANDED_PANEL$1 = ‘expanded_panel’;
    var ERROR_PANEL$1 = ‘error_panel’; var PanelController = function () { function PanelController(config, store, view) { classCallCheck(this, PanelController); var self = this; self._store = store; self._view = view; self._config = config; var panelConfig = self._config.panel; self._panelParentNode = document.querySelector(panelConfig.parentSelector); self._badgeNode = self._config.badge.selector && document.querySelector(self._config.badge.selector); self._indicatorNode = panelConfig.indicatorSelector && document.querySelector(panelConfig.indicatorSelector); } /** * createPanelParentNode * Creates the base node for panel * @return {void} */ createClass(PanelController, [{ key: ‘createPanelParentNode’, value: function createPanelParentNode() { this._view.createPanelParentNode(this._panelParentNode); this._notifPanelNode = document.getElementById(constants.panelNodeId); } /** * refreshPanelNode * Shows the expanded panel – fetches data from store, calls view to render, attached delegates * @param {object} requestOverride – matrix params to over ride the reqeust * @param {Function} callback – The callback function * @return {void} */ }, { key: ‘refreshPanelNode’, value: function refreshPanelNode(requestOverride, callback) { var self = this; addClass(self._notifPanelNode, constants.panelLoading); self._store.fetchNotifications(requestOverride, function handleExpandedFetch(err, response) { if (err) { if (!self._notifPanelNode.innerHTML) { self._view.render(ERROR_PANEL$1); addClass(self._notifPanelNode, constants.panelLoading); } } else { self._view.render(EXPANDED_PANEL$1); self._view.updateBadgeNode(self._badgeNode); self._showBadge(); self._showIndicator(); self._view.addStyles(response.css); } removeClass(self._notifPanelNode, constants.panelLoading); callback && callback(err, response); }); } /** * resetBadge * Reset the badge count * @return {void} */ }, { key: ‘resetBadge’, value: function resetBadge() { var self = this; self._store.resetNewCount(); self._view.updateBadgeNode(self._badgeNode); addClass(self._badgeNode, self._config.badge.hideClass); } /** * _showIndicator * Add class to indicator node * @return {void} */ }, { key: ‘_showIndicator’, value: function _showIndicator() { if (!this._indicatorNode) { return; } var _store$getNotificatio = this._store.getNotifications(), newCount = _store$getNotificatio.newCount; if (newCount) { addClass(this._indicatorNode, this._config.panel.indicatorClass); } else { removeClass(this._indicatorNode, this._config.panel.indicatorClass); } } /** * _showBadge * Show/hide the badge count * @return {void} */ }, { key: ‘_showBadge’, value: function _showBadge() { var self = this; var _self$_store$getNotif = self._store.getNotifications(), newCount = _self$_store$getNotif.newCount; if (newCount) { removeClass(self._badgeNode, self._config.badge.hideClass); } else { addClass(self._badgeNode, self._config.badge.hideClass); } } }]); return PanelController;
    }(); var config = { promos: { eligibleBodyClass: ‘display-push-promos’, enableNotifOnboard: true, notifOnboardBtnLabel: ‘Notify Me’, notifOnboardMsg: ‘Get Notifications for Your Favorite Topics’, subscriptionTopic: ‘gondor_homerun_news’ }, badge: { hideClass: ”, maxCount: 5, selector: ” }, panel: { emptyPanelMsg: ‘You have no new notifications.’, errorMsg: ”, headerMsg: ‘Notifications’, imageTag: ‘img:40×40|2|80’, indicatorClass: ‘yns-indicator’, indicatorSelector: null, maxCount: 6, notificationCenterNavMsg: ‘View all {newCount} notifications’, notificationCenterPath: ”, styleTagId: ‘notificationStyles’, parentSelector: null // required }, service: { attemptCount: 2, attemptDelay: 1, url: null, // required responseType: ‘json’, timeout: 1500 }
    }; var Main = function () { function Main(config$$1) { classCallCheck(this, Main); var self = this; self.config = self._parseConfig(config$$1); var validConfigs = self._validateRequiredConfigs(); // silently return if required configs are missing if (!validConfigs) { return; } self._request = new NotificationRequest(self.config); self._store = new NotificationStore(self.config, self._request); self._view = new NotificationView(self.config, self._store); self._panelController = new PanelController(self.config, self._store, self._view); self._panelController.createPanelParentNode(); // Once all the internal modules are init, create helper method reference. self._assignHelperMethods(); } /** * _parseConfig * Parses the provided config and updates default. The configs are expected to be max one level deep * @param {object} config – The config object * @return {object} request configuration */ createClass(Main, [{ key: ‘_parseConfig’, value: function _parseConfig(config$$1) { var defaultConfig = {}; objectAssign(defaultConfig, config); for (var key in defaultConfig) { if (defaultConfig.hasOwnProperty(key)) { var orig = defaultConfig[key]; var extn = config$$1[key]; if ((typeof orig === ‘undefined’ ? ‘undefined’ : _typeof(orig)) === ‘object’) { objectAssign(orig, extn); } else { defaultConfig[key] = config$$1[key]; } } } return defaultConfig; } /** * _validateRequiredConfigs * Validates if required configs are being passed by consumer * @return {boolean} validity of configs */ }, { key: ‘_validateRequiredConfigs’, value: function _validateRequiredConfigs() { var _config = this.config; return !!(_config.panel.parentSelector && _config.service.url); } /** * _assignHelperMethods * This function creates helper methods that refer to internal functions, binds correct context * @return {void} */ }, { key: ‘_assignHelperMethods’, value: function _assignHelperMethods() { var self = this; self.helpers = { refreshPanelNode: self._panelController.refreshPanelNode.bind(self._panelController), resetBadge: self._panelController.resetBadge.bind(self._panelController), resetIndicator: function resetIndicator() { removeClass(self._panelController._indicatorNode, self.config.panel.indicatorClass); } }; } }]); return Main;
    }(); return Main; }());
    //# sourceMappingURL=notificationClient.min.js.map
    !function(){var a,o,i,n=”lnct”;function t(e,n){var t=this;t.config=e||{},t.accordion=o.querySelector(e.accordionSelector),t.countBadge=o.querySelector(e.countBadgeSelector),t.notificationButton=o.querySelector(e.notificationButtonSelector),t.profileButton=o.querySelector(e.profileButtonSelector),t.notificationClient=n,t.visibilityMetaTag=””,a.wafer&&a.wafer.ready(function(){t.visibilityMetaTag=a.wafer.features.visibilityMeta.hidden||””});function i(e){t.visibilityMetaTag&&o[t.visibilityMetaTag]||t.refreshPanel.call(t,e)}t.attachEventListeners(),i(t.handleBackgroundRefresh),e.pollingInterval&&setInterval(i,1e3*e.pollingInterval,t.handleBackgroundRefresh)}function e(){if(a.NotificationClient){var e=new window.NotificationClient(i);e&&e.helpers&&new t(i.adapter,e)}}function r(e,n,t){a=e,o=n,i=t||{“adapter”:{“accordionSelector”:”#profile-notification-accordion”,”countBadgeSelector”:”#header-notification-badge”,”initializeImmediately”:false,”lang”:”en-US”,”loadInHpViewer”:true,”notificationButtonSelector”:”#header-notification-button”,”pollingInterval”:300,”profileButtonSelector”:”#header-profile-button”,”rapidModuleId”:”applet_p_50000372″,”region”:”US”},”badge”:{“hideClass”:”D(n)”,”selector”:”#header-notification-badge”},”panel”:{“emptyPanelMsg”:”You have no new notifications.”,”errorMsg”:”Please check back later.”,”headerMsg”:”Notifications”,”indicatorSelector”:”#header-notification-indicator”,”maxCount”:6,”notificationCenterNavMsg”:””,”notificationCenterPath”:”/”,”parentSelector”:”#header-notification-panel”},”promos”:{“eligibleBodyClass”:”display-push-promos”,”enableNotifOnboard”:true,”notifOnboardBtnLabel”:”Notify Me”,”notifOnboardMsg”:”Get Notifications for Your Favorite Topics”,”subscriptionTopic”:”gondor_homerun_news”},”service”:{“url”:”/tdv2_fp/api/resource/NotificationHistory.getHistory”}}}t.prototype={attachEventListeners:function(){var e=this;e.profileButton&&e.profileButton.addEventListener(“click”,function(){e.refreshPanel.call(e)}),e.accordion&&e.accordion.addEventListener(“click”,function(){e.handlePanelOpen.call(e)}),e.notificationButton&&(e.notificationButton.addEventListener(“mouseenter”,function(){e.handlePanelOpen.call(e)}),e.notificationButton.addEventListener(“focus”,function(){e.handlePanelOpen.call(e)}))},getConsumptionTime:function(){return a.localStorage&&a.localStorage.getItem(n)},handleBackgroundRefresh:function(e,n){var t=this,i=a.YAHOO&&a.YAHOO.i13n&&a.YAHOO.i13n.rapidInstance||a.rapidInstance;if(i&&t.countBadge&&t.countBadge.className.indexOf(“D(n)”)

    You may be interested

    He was working security at a Key West bar. Police say he’s part of a murder plot
    Entertainment
    15 views
    Entertainment
    15 views

    He was working security at a Key West bar. Police say he’s part of a murder plot

    Webby - August 15, 2020

    Key West police and U.S. Marshals arrested a man working security at a bar in the Southernmost City this week who is a suspect in a stalking…

    U.S. Navy carrier conducted exercises in South China Sea on Aug. 14
    Entertainment
    15 views
    Entertainment
    15 views

    U.S. Navy carrier conducted exercises in South China Sea on Aug. 14

    Webby - August 15, 2020

    U.S. Navy aircraft carrier USS Ronald Reagan is seen during its visit to Hong KongMoreSHANGHAI (Reuters) - A U.S. Navy aircraft carrier conducted exercises in the contested…

    More than 50 Confederate symbols moved, taken down in wake of George Floyd's death, study says
    Entertainment
    15 views
    Entertainment
    15 views

    More than 50 Confederate symbols moved, taken down in wake of George Floyd's death, study says

    Webby - August 14, 2020

    Among some of the more prominent changes sparked by Floyd’s death is the speedy removal and renaming of landmarks and monuments representing the Confederacy. Such symbols have…

    Leave a Comment

    Your email address will not be published.

    Most from this category