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yG,SACrD5E,KAAK7B,MAAM4G,KACX/E,KAAKgF,oBACLhF,KAAKQ,qBAAqBR,KAAK7B,MAAM8G,QACrCjF,KAAK7B,MAAM+G,eACXlF,KAAK7B,MAAMma,mBACXtY,KAAKX,oBAAoBW,KAAK7B,OAC/B7D,EAAAA,cAACuF,EAAAA,KAAIC,OAAAC,OAAA,GAAKuE,IACTtE,KAAK7B,MAAMiH,SACXpF,KAAKQ,qBAAqBR,KAAK7B,MAAMkH,cAE1C/K,EAAAA,cAACuF,EAAAA,KAAIC,OAAAC,OAAA,GAAKwE,GACNjK,EAAAA,cAACuF,EAAAA,KAAIC,OAAAC,OAAA,GAAKyE,GACLxE,KAAK7B,MAAMmH,iBACXtF,KAAKQ,qBAAqBR,KAAK7B,MAAM2G,SACtCxK,EAAAA,cAACuF,EAAAA,KAAIC,OAAAC,OAAA,GAAK0E,KACLzE,KAAK7B,MAAMiC,cAAeJ,KAAK7B,MAAMiC,aAAaE,KAAIC,GAAQA,IAC9DP,KAAK7B,MAAMkH,YACXrF,KAAK7B,MAAMgH,mBACXnF,KAAK7B,MAAMsB,WACXO,KAAK7B,MAAMkC,iBA6ChC2E,oBAAiB,IAAAO,EACrB,MAAM,OAAEnL,EAAM,QAAE4G,EAAO,SAAEwE,GAAaxF,KAAK7B,MAC3C,OACI7D,EAAAA,cAACmL,EAAAA,KAAI3F,OAAAC,OAAA,GACG,CACAQ,KAAMnG,EAAOsL,SACbC,MAA6B,QAAxBJ,EAAEnL,EAAOwL,uBAAe,IAAAL,EAAAA,EAAI,GACjC3F,UAAW,yBACXiG,aAAc7E,EAAQ3G,QAAQwL,aAC9BC,eAAgB9E,EAAQ3G,QACxBmL,SAAAA,MA8EpB,iBCxNAqW,EAAOC,QAAUxhB,cCAjBuhB,EAAOC,QAAUC","sources":["webpack://bestseller.commerce.online/./src/utils/hooks.ts?e3f1","webpack://bestseller.commerce.online/./src/themes/only/views/components/headerHelper.component.tsx?e0c8","webpack://bestseller.commerce.online/./src/themes/only/views/header.view.tsx?a837","webpack://bestseller.commerce.online/./src/shared/functions/newsletter.ts?5a73","webpack://bestseller.commerce.online/./lib/header/module-registration.js?4d67","webpack://bestseller.commerce.online/./src/store-selector-state-manager/base-store-selector-state-manager.ts?281e","webpack://bestseller.commerce.online/./src/store-selector-state-manager/map-store-selector-state-manager.ts?2ae0","webpack://bestseller.commerce.online/./src/store-selector-state-manager/store-selector-state-manager-data-action.ts?bd3e","webpack://bestseller.commerce.online/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://bestseller.commerce.online/./src/modules/header/utilities/mock-utilities.ts?d017","webpack://bestseller.commerce.online/./src/modules/header/components/header-preferred-store.tsx?ee9c","webpack://bestseller.commerce.online/./src/modules/header/components/logo.tsx?f27e","webpack://bestseller.commerce.online/./src/modules/header/components/nav-icon.tsx?2475","webpack://bestseller.commerce.online/./src/modules/header/header.tsx?e91a","webpack://bestseller.commerce.online/./src/modules/header/header.view.tsx?cf0f","webpack://bestseller.commerce.online/../../src/get-employee.ts?b8bb","webpack://bestseller.commerce.online/./src/modules/adventureworks/views/header.view.tsx?9bd3","webpack://bestseller.commerce.online/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b"],"sourcesContent":["import { useEffect, useState } from 'react';\r\n\r\n/**\r\n * determine wether is client side or not, inside react component\r\n * @returns state managed bool wether its clientside\r\n */\r\nexport const useIsClientSide = () => {\r\n const [isClientSide, setIsClientSide] = useState(false);\r\n useEffect(() => {\r\n setIsClientSide(true);\r\n }, []);\r\n return isClientSide;\r\n};\r\n","import * as React from 'react';\r\nimport { useEffect } from 'react';\r\nimport { useIsClientSide } from '../../../../utils/hooks';\r\n\r\nexport interface HeaderHelperConfiguration {\r\n enableRedirectOnCookie?: Boolean;\r\n pageToRedirectOn?: string;\r\n redirectsOnFrontPage?: redirectObject[];\r\n cookieExpiration?: number;\r\n shouldRedirectToLocale?: Boolean;\r\n shouldLogOutInvalidLocaleUser?: Boolean;\r\n telemetry?: any;\r\n}\r\n\r\ninterface redirectObject {\r\n mappingToUrl: urlObject;\r\n mappedFrom: string[];\r\n}\r\n\r\ninterface urlObject {\r\n destinationUrl: string;\r\n type: string;\r\n}\r\n\r\nexport interface HeaderHelperProps {\r\n config: HeaderHelperConfiguration; \r\n request: any; //is any since not exposed from msdynamics modules\r\n}\r\n\r\nexport const HeaderHelper = ({ config, request }: HeaderHelperProps) => {\r\n return (\r\n <>\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst CookieHandlerHelper = ({ config, request }: HeaderHelperProps) => {\r\n const isClient = useIsClientSide();\r\n const { enableRedirectOnCookie = false, pageToRedirectOn = '', redirectsOnFrontPage = [], cookieExpiration = 0} = config;\r\n useEffect(() => {\r\n //Clause guards\r\n if (!isClient) {\r\n return;\r\n }\r\n\r\n if (!enableRedirectOnCookie) {\r\n return;\r\n }\r\n \r\n const { pathname } = window.location;\r\n const cookieName = 'onlyGenderCategory';\r\n if (pathname === pageToRedirectOn) {\r\n //If cookie exists, redirect to the page\r\n if(getCookie(cookieName) !== ''){\r\n const cookieContent = getCookie(cookieName);\r\n window.location.replace(cookieContent);\r\n }\r\n } else{\r\n //Set cookie\r\n const subPaths = pathname.split('/').filter(path => path != '');\r\n\r\n const mappingTo = redirectsOnFrontPage.find(redirect =>\r\n redirect.mappedFrom.some(fromMapping => subPaths.some(subPath => subPath == fromMapping))\r\n );\r\n if (mappingTo == undefined) {\r\n return;\r\n }\r\n\r\n const currentDate = new Date();\r\n currentDate.setDate(currentDate.getDate() + cookieExpiration);\r\n const expirationDateInUtc = currentDate.toUTCString();\r\n clearCookie(cookieName);\r\n document.cookie = `${cookieName}=${mappingTo.mappingToUrl.destinationUrl}; expires=${expirationDateInUtc};`;\r\n return;\r\n }\r\n }, [isClient]);\r\n return <>;\r\n};\r\n\r\nconst LocaleRedirectHelper = ({ config, request }: HeaderHelperProps) => {\r\n const isClient = useIsClientSide();\r\n const { shouldRedirectToLocale = false, shouldLogOutInvalidLocaleUser = false, cookieExpiration = 0} = config;\r\n useEffect(() => {\r\n //Clause guards\r\n if (!isClient) {\r\n return;\r\n }\r\n const cookieName = '_msdyn365___site_';\r\n\r\n if(shouldRedirectToLocale) {\r\n const cookieContent = getCookie(cookieName);\r\n if(cookieContent !== '' && window.location.pathname === '/') {\r\n window.location.replace(cookieContent);\r\n }\r\n } else {\r\n //If it should not redirect to locale, then we need to save the locale in a cookie\r\n var previousCookie = getCookie(cookieName);\r\n var path = window.location.pathname;\r\n const subPaths = path.split('/').filter(pathname => pathname != '');\r\n if(subPaths.length > 0) {\r\n path = '/' + subPaths[0];\r\n }\r\n\r\n const currentDate = new Date();\r\n currentDate.setDate(currentDate.getDate() + cookieExpiration);\r\n const expirationDateInUtc = currentDate.toUTCString();\r\n clearCookie(cookieName);\r\n document.cookie = `${cookieName}=${path}; expires=${expirationDateInUtc}; path=/;`;\r\n\r\n //If the user is logged in on an invalid locale\r\n if(shouldLogOutInvalidLocaleUser && request.user.isAuthenticated && previousCookie && previousCookie !== path) {\r\n if(config.telemetry) {\r\n //TODO: Should be information telemetry\r\n config.telemetry.warning('User logged in on invalid locale. Logging out user.');\r\n }\r\n window.location.href = request.user.signOutUrl;\r\n }\r\n }\r\n }, [isClient]);\r\n //TODO: Also run on isConsentGiven change?\r\n return <>;\r\n};\r\n\r\nconst getCookie = (cname: string) => {\r\n let name = cname + '=';\r\n let decodedCookie = decodeURIComponent(document.cookie);\r\n let ca = decodedCookie.split(';');\r\n for (let i = 0; i < ca.length; i++) {\r\n let c = ca[i];\r\n while (c.charAt(0) == ' ') {\r\n c = c.substring(1);\r\n }\r\n if (c.indexOf(name) == 0) {\r\n return c.substring(name.length, c.length);\r\n }\r\n }\r\n return '';\r\n};\r\nconst clearCookie = (cookieName: string) => (document.cookie = `${cookieName}=; expires=Thu, 01 Jan 1970 00:00:00 UTC;`);\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\r\nimport { ArrayExtensions, issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\r\nimport { IHeaderData } from './header.data';\r\nimport { CommerceProperty, Customer, CustomersDataActions, StoreOperationsDataActions } from '@msdyn365-commerce/retail-proxy';\r\nimport jwtDecode from 'jwt-decode';\r\nimport { subscribeCustomer } from '../../../shared/functions/newsletter';\r\nimport { HeaderHelper, HeaderHelperConfiguration } from './components/headerHelper.component';\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n *\r\n * HeaderView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class HeaderView extends React.PureComponent> {\r\n private readonly menuNode: React.RefObject;\r\n\r\n public constructor(props: IHeaderViewProps & IHeaderProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.useStickyHeader) {\r\n // Set header update methods to trigger on scroll\r\n if (MsDyn365.isBrowser) {\r\n window.addEventListener('scroll', () => {\r\n this._configureStickyHeader();\r\n });\r\n }\r\n this._configureStickyHeader();\r\n }\r\n\r\n this.subscribeToNewsletter(this.props);\r\n\r\n if (this.props.context.request.user?.isAuthenticated) {\r\n // Added delay to get he updated result.\r\n setTimeout(() => {\r\n this.fetchLoyalty(this.props);\r\n }, 3000);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const {\r\n HeaderTag,\r\n HeaderContainer,\r\n HeaderTopBarContainer,\r\n Divider,\r\n MobileMenuContainer,\r\n MobileMenuBodyContainer,\r\n MobileMenuLinksContainer,\r\n app,\r\n context\r\n } = this.props;\r\n\r\n const { request } = context;\r\n\r\n const config: HeaderHelperConfiguration = {\r\n enableRedirectOnCookie: app.config.enableRedirectOnCookie,\r\n pageToRedirectOn: app.config.pageToRedirectOn,\r\n redirectsOnFrontPage: app.config.redirectsOnFrontPage,\r\n cookieExpiration: app.config.cookieExpiration,\r\n shouldRedirectToLocale: this.props.config.shouldRedirectToLocale,\r\n shouldLogOutInvalidLocaleUser: this.props.config.shouldLogOutInvalidLocaleUser,\r\n telemetry: this.props.telemetry\r\n }\r\n\r\n return (\r\n <>\r\n \r\n \r\n \r\n \r\n
{this.props.navIcon}
\r\n
\r\n {this._renderReactFragment(this.props.menuBar)}\r\n
\r\n {this.props.logo}\r\n {this._renderMobileLogo()}\r\n
\r\n {this._renderReactFragment(this.props.search)}\r\n {this.props.preferredStore}\r\n {this.props.wishListIconMobile}\r\n {this._renderAccountBlock(this.props)}\r\n \r\n {this.props.cartIcon}\r\n {this._renderReactFragment(this.props.siteOptions)}\r\n
\r\n
\r\n \r\n \r\n {this.props.MobileMenuHeader}\r\n {this._renderReactFragment(this.props.menuBar)}\r\n \r\n {this.props.accountLinks ? this.props.accountLinks.map(link => link) : false}\r\n {this.props.siteOptions}\r\n {this.props.wishListIconMobile}\r\n {this.props.signInLink}\r\n {this.props.signOutLink}\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to update header.\r\n */\r\n private readonly _configureStickyHeader = (): void => {\r\n // Get heights of cookie and promotion banners\r\n const defaultValue = 0;\r\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\r\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\r\n\r\n // Triggers opacity change of header\r\n const headerElement = document.querySelector('header .default-container');\r\n if (headerElement) {\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\r\n headerElement.classList.add('lock-opaque');\r\n headerElement.classList.add('fixed');\r\n } else {\r\n headerElement.classList.remove('lock-opaque');\r\n headerElement.classList.remove('fixed');\r\n }\r\n }\r\n\r\n // Update sticky header position and opacity\r\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\r\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\r\n\r\n if (stickyHeader && headerLogo) {\r\n // Fix center sticky header\r\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\r\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\r\n stickyHeader.classList.add('fixed');\r\n } else {\r\n stickyHeader.classList.remove('fixed');\r\n }\r\n }\r\n };\r\n\r\n private _renderMobileLogo(): JSX.Element | null {\r\n const { config, context, typeName } = this.props;\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to render account block.\r\n * @param props - IHeaderViewProps.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\r\n const {\r\n AccountInfoDropdownParentContainer,\r\n AccountInfoDropdownPopoverConentContainer,\r\n accountInfoDropdownButton,\r\n signInLink\r\n } = props;\r\n if (AccountInfoDropdownParentContainer) {\r\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\r\n if (AccountInfoDropdownPopoverConentContainer) {\r\n return (\r\n \r\n {accountInfoDropdownButton}\r\n {this._renderAccountDropdownLinks(props)}\r\n \r\n );\r\n } else if (signInLink) {\r\n return (\r\n \r\n {signInLink}\r\n \r\n );\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\r\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\r\n if (isOBORequest) {\r\n return (\r\n <>\r\n {switchCustomerLink}\r\n {signOutLink}\r\n {accountLinks ? : false}\r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n \r\n );\r\n } else {\r\n return (\r\n <>\r\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\r\n {signOutLink}\r\n \r\n );\r\n }\r\n };\r\n\r\n /**\r\n * Function to render react fragment.\r\n * @param items - React nodes.\r\n * @returns Returns JSX.Element | null.\r\n */\r\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\r\n return (\r\n <>\r\n {ArrayExtensions.hasElements(items)\r\n ? items.map((slot: React.ReactNode) => {\r\n return <>{slot};\r\n })\r\n : null}\r\n \r\n );\r\n };\r\n\r\n private readonly _issueLoyalty = async () => {\r\n if (this.props.context.request.user?.isAuthenticated) {\r\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\r\n\r\n issueLoyalty(input, this.props.context.actionContext)\r\n .then(() => {\r\n //TODO: Should be information telemetry\r\n this.props.context.telemetry.warning('Loyalty Card Issued');\r\n })\r\n .catch((err: Error) => {\r\n this.props.context.telemetry.error(err.message);\r\n this.props.context.telemetry.debug('Unable to issue loyalty card');\r\n });\r\n }\r\n };\r\n\r\n private async fetchLoyalty(props: IHeaderProps) {\r\n const {\r\n data: { loyaltyCard, customerInformation }\r\n } = props;\r\n\r\n const hasLoyaltyAccount = loyaltyCard.result && loyaltyCard.result.CardTenderTypeValue !== undefined;\r\n const customerPrimaryLoyalty = customerInformation.result?.ExtensionProperties?.find(\r\n (item: CommerceProperty) => item.Key === 'BS_PRIMARYLOYALTYCARDID' && !item.Value?.StringValue\r\n );\r\n\r\n if (!hasLoyaltyAccount) {\r\n await this._issueLoyalty();\r\n }\r\n\r\n if (!customerPrimaryLoyalty || customerPrimaryLoyalty?.Value?.StringValue === '') {\r\n const card = await StoreOperationsDataActions.getCustomerLoyaltyCardsAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n null\r\n );\r\n const customer: Customer = { ...customerInformation.result! };\r\n let primaryLoyalty: CommerceProperty[] = [\r\n {\r\n Key: 'BS_PRIMARYLOYALTYCARDID',\r\n Value: { StringValue: card[0].CardNumber || (loyaltyCard && loyaltyCard.result?.CardNumber) }\r\n }\r\n ];\r\n customer.ExtensionProperties = [...customer.ExtensionProperties!, ...primaryLoyalty];\r\n const icontext = { callerContext: this.props.context.actionContext };\r\n await CustomersDataActions.updateAsync(icontext, customer);\r\n }\r\n }\r\n\r\n private readonly subscribeToNewsletter = (props: IHeaderProps) => {\r\n const hadSubscribeCheck = props.context.request.sessionStorage.getDataFromStorage('hadSubscribeCheck') as { yes: boolean };\r\n\r\n if (\r\n !hadSubscribeCheck.yes &&\r\n props.context.request.user.isAuthenticated &&\r\n props.data.customerInformation.result &&\r\n props.data.customerInformation?.result?.ExtensionProperties?.find(item => item.Key === 'BS_ALLOWRECEIVENEWSLETTER')?.Value\r\n ?.IntegerValue === 0\r\n ) {\r\n const token: any = jwtDecode(props.context.request.user.token);\r\n if (\r\n props.config.timeoutForNewsletterCheck &&\r\n props.config.newsletterChoiceTimeClaim &&\r\n token[props.config.newsletterChoiceClaim.name] &&\r\n token[props.config.newsletterChoiceClaim.name] === props.config.newsletterChoiceClaim.yesValue &&\r\n token[props.config.newsletterChoiceTimeClaim]\r\n ) {\r\n // avoid sending requests for old users, since there is presumably a reason they have failed\r\n const timeoutCutoff = new Date(Date.now() - 1000 * props.config.timeoutForNewsletterCheck);\r\n const subscribedTime = new Date(token[props.config.newsletterChoiceTimeClaim] * 1000);\r\n props.context.request.sessionStorage.setDataInStorage('hadSubscribeCheck', { yes: true });\r\n if (subscribedTime >= timeoutCutoff) {\r\n subscribeCustomer(props.data.customerInformation.result, props.config.newsletterAttributeName, props.context).catch(\r\n (error: Error) => {\r\n this.props.telemetry.error('Could not subscribe customer to newsletter - ' + error.message);\r\n this.props.context.request.sessionStorage.setDataInStorage('hadSubscribeCheck', { yes: false });\r\n this.subscribeToNewsletter(this.props);\r\n }\r\n );\r\n }\r\n }\r\n }\r\n };\r\n}\r\n\r\nexport default HeaderView;\r\n","import { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { updateAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CustomersDataActions.g';\r\n\r\nexport const subscribeCustomer = async (customer: Customer, attributeName: string, context: ICoreContext) => {\r\n if (!customer.ExtensionProperties) {\r\n customer.ExtensionProperties = [];\r\n }\r\n let attribute = customer.ExtensionProperties.find(item => item.Key === attributeName);\r\n if (!attribute) {\r\n attribute = {\r\n Key: attributeName,\r\n Value: { IntegerValue: 1 }\r\n };\r\n customer.ExtensionProperties.push(attribute);\r\n } else {\r\n attribute.Value = { IntegerValue: 1 };\r\n }\r\n return updateAsync({ callerContext: context.actionContext }, customer);\r\n};\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header'),\n $type: 'containerModule',\n da: [{name:'accountInformation', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer', runOn: 0},{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action', runOn: 1},{name:'employee', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee', runOn: 0},{name:'storeSelectorStateManager', path:'@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action', runOn: 1},{name:'wishlists', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'header',\n p: 'header',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/header/dist/lib/modules/header'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action';\n let dataAction = require('@msdyn365-commerce-modules/bopis-utilities/dist/lib/store-selector-state-manager/store-selector-state-manager-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-customer');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-employee');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-wishlist-by-customer-id');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/get-cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|themes|only|views|header'] = {\n c: () => require('partner/themes/only/views/header.view.tsx'),\n cn: '__local__-__local__-header'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|header'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/header.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-header'\n };\nviewDictionary['@msdyn365-commerce-modules|header|modules|header|header'] = {\n c: () => require('@msdyn365-commerce-modules/header/dist/lib/modules/header/header.view.js'),\n cn: '@msdyn365-commerce-modules-header-header'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|header'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/header.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-header'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\nimport { action, computed, observable } from 'mobx';\n\nimport {\n IListMapViewState,\n ILoadMapApiInput,\n IStoreInfo,\n IStoreSelectionStateContext,\n IStoreSelectorLocation,\n IStoreSelectorStateManager\n} from './i-store-selection-state-manager';\n\n/**\n * Abstract instance of IStoreSelectorStateManager with base implementation\n * of everything except the geoLocate function.\n */\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\n @computed public get isDialogOpen(): Readonly {\n return this._context !== undefined;\n }\n\n @computed public get context(): Readonly {\n return this._context;\n }\n\n @observable public isMapApiLoaded?: boolean;\n\n @observable public selectedStoreLocationId?: string;\n\n @observable public preferredStore?: IStoreInfo;\n\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\n\n @observable public isMapModuleLoaded?: boolean;\n\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\n\n @observable protected _context?: IStoreSelectionStateContext;\n\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\n\n constructor() {\n this.isMapModuleLoaded = false;\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\n try {\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\n if (storeInfo) {\n this.preferredStore = storeInfo;\n }\n } catch {\n this.preferredStore = undefined;\n }\n }\n\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\n\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\n\n @action\n public async toggleListMapViewState(): Promise {\n this.listMapViewState = {\n displayList: !this.listMapViewState.displayList,\n displayMap: !this.listMapViewState.displayMap\n };\n }\n\n @action\n public async setMapModuleLoaded(input: boolean): Promise {\n this.isMapModuleLoaded = input;\n }\n\n @action\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\n this._context = input;\n }\n\n @action\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\n this.selectedStoreLocationId = storeId;\n }\n\n @action\n public async setPreferredStoreLocation(\n storeId?: string,\n storeName?: string | undefined,\n writeToCookie: boolean = false,\n latitude?: number,\n longitude?: number\n ): Promise {\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\n this.preferredStore = storeInfo;\n if (writeToCookie) {\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\n }\n }\n\n @action\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\n this.lastInlineShownStoreInfo = storeInfo;\n }\n\n @action\n public async clearPreferredStore(writeToCookie: boolean): Promise {\n this.preferredStore = undefined;\n if (writeToCookie) {\n this._removeCookie(this.preferredStoreLocalStorageKey);\n }\n }\n\n @action\n public async openDialog(input: IStoreSelectionStateContext): Promise {\n if (this._context && this._context.id === input.id) {\n throw new Error('Dialog is already opened');\n }\n\n this._context = input;\n }\n\n @action\n public async closeDialog(): Promise {\n this._context = undefined;\n }\n\n private _removeCookie(key: string): void {\n if (!key) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.removeItem(key);\n }\n }\n\n private _writeToCookie(key: string, value: string | undefined): void {\n if (!key || !value) {\n return;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n storage.setItem(key, value);\n }\n }\n\n private _readFromToCookie(key: string): string | undefined {\n if (!key) {\n return undefined;\n }\n if (MsDyn365.isBrowser) {\n const storage = window.localStorage;\n const cookieValue = storage.getItem(key);\n if (cookieValue) {\n return cookieValue;\n }\n }\n\n return undefined;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { action } from 'mobx';\n\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\n\ndeclare const window: IMapWindow;\n\n/**\n * Instance of IStoreSelectorStateManager manager that uses Map service\n * for geo location.\n */\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\n\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\n\n @action\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\n if (\n !searchTerm ||\n !actionContext.requestContext.channel ||\n !actionContext.requestContext.channel.BingMapsApiKey ||\n !actionContext.requestContext.channel.BingMapsEnabled\n ) {\n return undefined;\n }\n\n let searchContent: string = searchTerm;\n\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\n\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\n }\n\n const query = encodeURI(searchContent);\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\n\n const geolocationApiUrl =\n actionContext.requestContext.app &&\n actionContext.requestContext.app.config &&\n actionContext.requestContext.app.config.geolocationApiUrl;\n const requestUrl = `${\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\n\n return new Promise(resolve => {\n const script = document.createElement('script');\n script.setAttribute('type', 'text/javascript');\n script.setAttribute('src', requestUrl);\n\n window[jsonp] = (data: MapLocationsResult) => {\n delete window[jsonp];\n script.remove();\n\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\n resolve({\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\n });\n }\n\n resolve(undefined);\n };\n\n document.body.appendChild(script);\n });\n }\n\n @action\n public async loadMapApi(input: ILoadMapApiInput): Promise {\n if (StringExtensions.isNullOrEmpty(input.key)) {\n return Promise.resolve();\n }\n\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\n\n if (isScriptAlreadyLoaded) {\n if (window) {\n const currentWindowAPI = window.mapAPIReady;\n window.mapAPIReady = () => {\n if (currentWindowAPI) {\n currentWindowAPI();\n }\n this.isMapApiLoaded = true;\n };\n }\n // Prevents from loading multiple script into the body\n return Promise.resolve();\n }\n\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\n input.market ? `&setMkt=${input.market}` : ''\n }`;\n\n return new Promise((resolve, reject) => {\n const script = document?.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n script.id = 'msdyn_map-api-script';\n if (window) {\n window.mapAPIReady = () => {\n this.isMapApiLoaded = true;\n resolve();\n };\n }\n script.addEventListener('error', (error: string | Event) => {\n reject(error);\n });\n document?.body?.appendChild(script);\n });\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { createObservableDataAction, IAction, IActionInput, IAny, ICreateActionContext, IGeneric } from '@msdyn365-commerce/core';\nimport { GenericInput, getGenericAction } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreSelectorStateManager } from './i-store-selection-state-manager';\nimport { MapStoreSelectorStateManager } from './map-store-selector-state-manager';\n\nexport function createStoreSelectorStateInput(result: IStoreSelectorStateManager): GenericInput {\n return new GenericInput('mapSSSM', result, 'IStoreSelectorStateManager');\n}\n\nconst createStoreSelectorStateInputInternal = (inputData: ICreateActionContext>): IActionInput => {\n return createStoreSelectorStateInput(new MapStoreSelectorStateManager());\n};\n\nexport const getGenericActionDataAction = createObservableDataAction({\n action: >getGenericAction,\n input: createStoreSelectorStateInputInternal\n});\n\nexport default getGenericActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { buildHydratedMockActionContext, buildMockRequest, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, Customer, Employee } from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderConfig, IHeaderResources } from '../header.props.autogenerated';\n\nconst mockRequest: IRequestContext = buildMockRequest();\nconst mockRequestURL = {\n requestUrl: new URL('https://wwww.example.com'),\n staticCdnUrl: 'https://wwww.example.com'\n};\nmockRequest.gridSettings = {\n xs: { w: 767, h: 0 },\n sm: { w: 991, h: 0 },\n md: { w: 1199, h: 0 },\n lg: { w: 1599, h: 0 },\n xl: { w: 1600, h: 0 }\n};\nmockRequest.user.isAuthenticated = true;\nmockRequest.user.signInUrl = '/signin';\nmockRequest.user.signOutUrl = '/signout';\nmockRequest.user.signUpUrl = '/signup';\n\nconst mockAnonRequest = buildMockRequest();\nmockAnonRequest.user.isAuthenticated = false;\nmockAnonRequest.user.signInUrl = '/signin';\nmockAnonRequest.user.signOutUrl = '/signout';\nmockAnonRequest.user.signUpUrl = '/signup';\nmockAnonRequest.url = mockRequestURL;\n\nconst mockSigninErrorRequest = buildMockRequest();\nmockSigninErrorRequest.user.isAuthenticated = false;\nmockSigninErrorRequest.user.retailServerErrorCode = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\nmockSigninErrorRequest.user.signInUrl = '/signin';\nmockSigninErrorRequest.user.signOutUrl = '/signout';\nmockSigninErrorRequest.user.signUpUrl = '/signup';\nmockSigninErrorRequest.url = mockRequestURL;\n\nconst mockActionContext = buildHydratedMockActionContext();\nmockActionContext.requestContext.url = mockRequestURL;\n\n/**\n * Method to mock auth context.\n */\n// @ts-expect-error\nexport const mockAuthContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// @ts-expect-error\nexport const mockAnonContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockAnonRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- Due to partial mock.\n// @ts-expect-error\nexport const mockSigninContext: ICoreContext = {\n actionContext: mockActionContext,\n request: mockSigninErrorRequest,\n app: {\n config: {\n disableTooltip: true\n },\n routes: {\n wishlist: '/wishlist'\n }\n }\n};\n\nexport const mockHeaderConfig: IHeaderConfig = {\n logoLink: {\n linkUrl: {\n destinationUrl: 'https://ppe.fabrikam.com/fe'\n },\n ariaLabel: 'fabrikam'\n },\n logoImage: {\n src: 'https://img-prod-cms-mr-microsoft-com.akamaized.net/cms/api/fabrikam/imageFileData/MA1G3L'\n }\n};\n\nexport const mockResources: IHeaderResources = {\n mobileHamburgerAriaLabel: 'Mobile view hamburger aria label',\n wishlistTooltipText: 'My wishlist',\n cartLabel: 'Shopping bag, ({0}) items',\n cartQtyLabel: '({0})',\n signInLinkText: 'Sign In',\n signInLinkAriaText: 'Sign In',\n signOutLinkText: 'Sign Out',\n signOutLinkAriaText: 'Sign Out',\n shoppingAsText: 'Shopping as {0}',\n switchCustomerLinkText: 'Switch customer',\n switchCustomerLinkAriaText: 'Switch customer',\n headerPreferredStoreText: 'Select store',\n headerPreferredStoreAriaLabel: 'select preferred store',\n signInCustomerNotAuthorizedTitle: 'Error message if customer not authorized',\n signUpCustomerNotFoundTitle: 'Error message if cutsomer not found',\n signUpMultipleCustomerFoundTitle: 'Multiple customer found error msg',\n closeNotificationLabel: 'Close',\n wishlistCountLabel: '({0})',\n headerAriaLabel: 'Header'\n};\n\nexport const getMockData = (totalItemsInCart: number = 0, accountNumber: string = '2', firstName: string = ''): IHeaderData => {\n return {\n cart: >{\n status: 'SUCCESS',\n result: {\n totalItemsInCart\n }\n },\n employee: >{\n status: 'SUCCESS',\n result: {\n Name: 'Worker'\n }\n },\n accountInformation: >{\n status: 'SUCCESS',\n result: {\n AccountNumber: accountNumber,\n FirstName: firstName\n }\n },\n storeSelectorStateManager: >{\n status: 'SUCCESS',\n result: {}\n }\n };\n};\n\nexport const getMockErrorData = (): IHeaderData => {\n return {\n cart: >{\n status: 'FAILED',\n result: undefined\n },\n employee: >{\n status: 'FAILED',\n result: undefined\n },\n accountInformation: >{\n status: 'FAILED',\n result: undefined\n },\n storeSelectorStateManager: >{\n status: 'FAILED',\n result: undefined\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderData } from '../header.data';\nimport { IHeaderProps } from '../header.props.autogenerated';\n\n/**\n * The header preferred store component.\n */\n@observer\nexport class HeaderPreferredStore extends React.PureComponent> {\n private readonly modalCloseButtonRef: React.RefObject = React.createRef();\n\n /**\n * Handle click on the store selector.\n * @returns : Promise void.\n */\n public handleClick = () => {\n return this._findPreferredStoreOnClick(this.props);\n };\n\n public render(): JSX.Element | undefined {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n slots,\n resources\n } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- slots can be undefined.\n if (ArrayExtensions.hasElements(slots?.storeSelector)) {\n const storeName =\n storeSelectorStateManager?.preferredStore && storeSelectorStateManager.preferredStore.StoreName\n ? storeSelectorStateManager.preferredStore.StoreName\n : resources.headerPreferredStoreText;\n\n return (\n
\n \n {storeName}\n \n {slots.storeSelector}\n
\n );\n }\n\n return undefined;\n }\n\n private async _findPreferredStoreOnClick(props: IHeaderProps): Promise {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n modules\n } = props;\n if (!storeSelectorStateManager) {\n return;\n }\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && ArrayExtensions.hasElements(modules.storeSelector)) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n await storeSelectorStateManager\n .openDialog({\n id: storeSelectorId,\n showMapViewLink: true,\n parentElementRef: this.modalCloseButtonRef,\n onLocationSelected: orgUnitLocation => {\n return Promise.resolve();\n }\n })\n .catch((error: Error) => {\n if (props.telemetry) {\n props.telemetry.error(error.message);\n props.telemetry.debug('Unable to set preferred store');\n }\n });\n }\n}\n\nexport default HeaderPreferredStore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILogoProps {\n image: Msdyn365.IImageData;\n gridSettings?: Msdyn365.IGridSettings;\n link?: ILinkData;\n className?: string;\n telemetryContent?: ITelemetryContent;\n requestContext: Msdyn365.IRequestContext;\n typeName?: string;\n}\n\nexport interface ILinkData {\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n linkText?: string;\n}\n\n/**\n *\n * Logo component.\n * @extends {React.PureComponent}\n */\nexport class Logo extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: ILogoProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.Logo);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return
{this._renderLogo(this.props)}
;\n }\n\n private _renderLogo(config: ILogoProps): JSX.Element {\n if (config.link && config.link.linkUrl.destinationUrl) {\n return (\n \n {this._renderImage(config)}\n \n );\n }\n return this._renderImage(config);\n }\n\n private _renderImage(config: ILogoProps): JSX.Element {\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=132&h=28&m=6', w: 0, h: 0 },\n lg: { q: 'w=160&h=48&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n}\n\nexport default Logo;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IHeaderResources } from '../header.props.autogenerated';\n\nexport interface INavIconProps {\n resources: IHeaderResources;\n isExpanded: boolean;\n targetId: string;\n telemetryContent?: ITelemetryContent;\n toggleNavBar(): void;\n}\n\n/**\n *\n * NavIcon component.\n * @extends {React.PureComponent}\n */\n\n@observer\nexport class NavIcon extends React.PureComponent {\n private readonly attributes?: Msdyn365.IDictionary;\n\n constructor(props: INavIconProps) {\n super(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.NavIcon);\n this.attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartIconComponent, WishListIconComponent } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ErrorNotification, NotificationsManager } from '@msdyn365-commerce-modules/notifications-core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n KeyCodes,\n Modal,\n ModalBody,\n ModalHeader,\n onTelemetryClick,\n Popover,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { HeaderPreferredStore, Logo, NavIcon } from './components';\nimport { IHeaderData } from './header.data';\nimport { IHeaderProps, IHeaderResources, IMyAccountLinksData } from './header.props.autogenerated';\n\nexport interface IHeaderState {\n mobileMenuCollapsed: boolean;\n signinPopoverOpen: boolean;\n hasSigninerror?: boolean;\n}\n\nexport interface IHeaderViewProps extends IHeaderProps, IHeaderState {\n logo: React.ReactNode;\n wishListIconDesktop: React.ReactNode;\n wishListIconMobile: React.ReactNode;\n cartIcon: React.ReactNode;\n navIcon: React.ReactNode;\n className: string;\n menuBar: React.ReactNode[];\n search: React.ReactNode[];\n siteOptions: React.ReactNode[];\n HeaderTag: IModuleProps;\n HeaderContainer: INodeProps;\n MobileMenuContainer: INodeProps;\n MobileMenuHeader: React.ReactNode;\n MobileMenuBodyContainer: INodeProps;\n MobileMenuLinksContainer: INodeProps;\n HeaderTopBarContainer: INodeProps;\n Divider: INodeProps;\n\n AccountInfoDropdownParentContainer?: INodeProps;\n AccountInfoDropdownPopoverConentContainer?: INodeProps;\n accountInfoDropdownButton?: React.ReactNode;\n\n signOutLink?: React.ReactNode;\n signInLink?: React.ReactNode;\n switchCustomerLink?: React.ReactNode;\n isOBORequest?: boolean;\n accountLinks?: React.ReactNode[];\n preferredStore?: React.ReactNode;\n currentDistributor?: React.ReactNode;\n}\n\n/**\n *\n * Header component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Header extends React.PureComponent, IHeaderState> {\n private readonly popOverRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private cart: ICartState | undefined;\n\n private isB2BSite: boolean = false;\n\n /**\n * The signed-in user name displayed in the header bar\n */\n @computed public get displayName(): Readonly {\n return (\n (MsDyn365.isOboRequest(this.props.context.request) ? this.workerName : this.customerName) ||\n this.props.context.request?.user?.name\n );\n }\n\n /**\n * OBO scenario. The name of worker who shops on behalf of customer.\n */\n @computed public get workerName(): Readonly {\n const worker = this.props.data.employee?.result;\n return worker?.Name;\n }\n\n @computed public get customerName(): Readonly {\n const customer = this.props.data.accountInformation?.result;\n if (MsDyn365.isOboRequest(this.props.context.request)) {\n // For OBO scenario, display full customer name because multiple customers may have the same first name.\n return customer ? customer.Name : undefined;\n } else {\n return customer ? customer.FirstName || customer.Name : undefined;\n }\n }\n\n public constructor(props: IHeaderProps) {\n super(props);\n this.popOverRef = React.createRef();\n this._toggleNavbar = this._toggleNavbar.bind(this);\n this._togglePopover = this._togglePopover.bind(this);\n this._keydown = this._keydown.bind(this);\n this.state = {\n mobileMenuCollapsed: true,\n signinPopoverOpen: false,\n hasSigninerror: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isB2BSite = isChannelTypeB2B(this.props.context.request);\n }\n\n public componentDidMount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.addEventListener('keydown', this._keydown);\n }\n reaction(\n () => {\n this.props.data.cart.result;\n },\n () => {\n this.cart = this.props.data.cart.result;\n }\n );\n\n const {\n context: {\n request: { user }\n },\n resources: {\n signUpCustomerNotFoundTitle,\n signUpMultipleCustomerFoundTitle,\n signInCustomerNotAuthorizedTitle,\n closeNotificationLabel\n }\n } = this.props;\n\n const signinNotificationError = this._getSigninNotification(\n user,\n signUpMultipleCustomerFoundTitle,\n signUpCustomerNotFoundTitle,\n signInCustomerNotAuthorizedTitle\n );\n if (signinNotificationError !== undefined && this.state.hasSigninerror === false) {\n // For signup show simple error notification.\n NotificationsManager.instance().addNotification(new ErrorNotification(signinNotificationError, closeNotificationLabel));\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n window.removeEventListener('keydown', this._keydown, false);\n }\n }\n\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n data: { accountInformation, wishlists },\n context: {\n request: { user }\n },\n context,\n resources: { cartLabel, cartQtyLabel }\n } = this.props;\n const { logoLink, logoImage, shouldShowWishlistCount } = this.props.config;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- app config is generic\n const disableTooltip = this.props.context.app.config.disableTooltip || false;\n const headerToggleClass = this.state.mobileMenuCollapsed ? '' : 'ms-header-open';\n const headerClassName = classnames('ms-header', this.props.config.className, headerToggleClass);\n const navbarKey = 'header-nav-mobile';\n const customer = accountInformation && accountInformation.result;\n const cartIconSlot = this._getSlot('cartIcon');\n const menuBarSlot = this._getSlot('menuBar');\n const searchSlot = this._getSlot('search');\n let wishlistCount = 0;\n const siteOptionsSlot = this._getSlot('siteOptions');\n const preferredStoreSlot = this._getSlot('storeSelector');\n const currentDistributorSlot = this._getSlot('distributorSelector');\n if (wishlists !== undefined) {\n if (\n !wishlists.result ||\n !ArrayExtensions.hasElements(wishlists.result) ||\n !wishlists.result[0].CommerceListLines ||\n !ArrayExtensions.hasElements(wishlists.result[0].CommerceListLines)\n ) {\n wishlistCount = 0;\n } else {\n wishlistCount = wishlists.result[0].CommerceListLines.length;\n }\n }\n const viewProps: IHeaderViewProps = {\n ...(this.props as IHeaderProps),\n ...this.state,\n logo: (\n \n ),\n wishListIconDesktop: (\n \n ),\n wishListIconMobile: (\n \n ),\n cartIcon: ArrayExtensions.hasElements(cartIconSlot) ? (\n cartIconSlot[0]\n ) : (\n \n ),\n navIcon: (\n \n ),\n menuBar: ArrayExtensions.hasElements(menuBarSlot) ? menuBarSlot : [],\n search: ArrayExtensions.hasElements(searchSlot) ? searchSlot : [],\n siteOptions: ArrayExtensions.hasElements(siteOptionsSlot) ? siteOptionsSlot : [],\n className: headerClassName,\n HeaderTag: {\n moduleProps: this.props,\n className: classnames(headerClassName),\n 'aria-label': this.props.resources.headerAriaLabel,\n tag: 'header'\n },\n HeaderContainer: {\n className: classnames('ms-header__container')\n },\n HeaderTopBarContainer: {\n className: classnames('ms-header__topbar')\n },\n Divider: {\n className: classnames('ms-header__divider')\n },\n MobileMenuContainer: {\n tag: Modal,\n id: navbarKey,\n className: 'ms-header__mobile-hamburger',\n isOpen: !this.state.mobileMenuCollapsed,\n wrapClassName: 'ms-header__modal',\n toggle: this._toggleNavbar\n },\n MobileMenuHeader: ,\n MobileMenuBodyContainer: {\n tag: ModalBody,\n className: 'ms-header__mobile-hamburger-menu-body'\n },\n MobileMenuLinksContainer: {\n className: 'ms-header__mobile-hamburger-menu-links'\n },\n AccountInfoDropdownParentContainer: {\n className: 'ms-header__account-info'\n },\n AccountInfoDropdownPopoverConentContainer: this.displayName\n ? {\n tag: Popover,\n id: 'myprofilePopover',\n className: 'ms-header__account-info-content',\n placement: 'bottom',\n isOpen: this.state.signinPopoverOpen,\n target: this.popOverRef,\n toggle: this._togglePopover\n }\n : undefined,\n signInLink: this._getSigninButton(user, this.props.resources),\n signOutLink: this._getSignOutButton(user, this.props.resources),\n isOBORequest: MsDyn365.isOboRequest(this.props.context.request),\n switchCustomerLink: this._getSwitchCustomerButton(user, this.props.resources),\n accountInfoDropdownButton: this._getAccountInfoDropdownButton(user, this.props.resources),\n accountLinks: this._getAccountLinks(customer),\n preferredStore: ArrayExtensions.hasElements(preferredStoreSlot) && ,\n currentDistributor: this.isB2BSite && ArrayExtensions.hasElements(currentDistributorSlot) ? currentDistributorSlot : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - Link Index.\n * @returns : Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.myAccountLinks?.[linkIndex]) {\n this.props.config.myAccountLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Get the slot.\n * @param slotName - Name of the slot.\n * @returns The slot.\n */\n private _getSlot(slotName: string): React.ReactNode[] | null {\n const { slots } = this.props;\n return (slots && slots[slotName] && slots[slotName].length && slots[slotName]) || null;\n }\n\n /**\n * Renders the sign in button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSigninButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n !this.displayName && (\n \n \n {resources.signInLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSignOutButton(user: MsDyn365.IRequestContextUser | undefined, resources: IHeaderResources): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignOut);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n \n {resources.signOutLinkText}\n \n \n )\n );\n }\n\n /**\n * Renders the sign out button.\n * @param user - Request context user.\n * @param resources - Resources.\n * @returns React Node.\n */\n private _getSwitchCustomerButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SwitchCustomer);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const isOBOAccountSelected =\n MsDyn365.isOboRequest(this.props.context.request) && this.props.context.request.cookies.getAccountSelectionCookie();\n return (\n this.displayName &&\n isOBOAccountSelected && (\n this.props.context.request.cookies.removeAccountSelectionCookie()}\n {...attributes}\n >\n
\n
{format(resources.shoppingAsText, this.customerName)}
\n
{resources.switchCustomerLinkText}
\n
\n \n )\n );\n }\n\n private getBusinessPartnerSelectionUrl(): string | undefined {\n const route = MsDyn365.getUrlSync('businessPartnerSelection', this.props.context.actionContext);\n if (!route || !MsDyn365.msdyn365Commerce.isBrowser) {\n return undefined;\n }\n\n // MsDyn365.getUrlSync persists some params in the route and remove other params.\n // Among the persisted params, we need to remove catalogid.\n const persistedParamToRemove = ['catalogid'];\n const url = new URL(route, window.location.href);\n persistedParamToRemove.forEach(param => url.searchParams.delete(param));\n return url.href;\n }\n\n private _getSigninNotification(\n user: MsDyn365.IRequestContextUser | undefined,\n signUpMultipleCustomerFoundTitle: string,\n signUpCustomerNotFoundTitle: string,\n signInCustomerNotAuthorizedTitle: string\n ): string | undefined {\n if (!user?.retailServerErrorCode) {\n return undefined;\n }\n\n const { signUpCustomerNotFound, signUpMultipleCustomerFound, signInCustomerNotAuthorized } = this.props.config;\n const notFoundError = 'Microsoft_Dynamics_Commerce_Runtime_CustomerNotFound_WhenAutoLinking';\n const multipleAccountError = 'Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountsFoundWithSameEmailAddress';\n const accountAuthorizationError = 'Microsoft_Dynamics_Commerce_Runtime_AuthorizationFailed';\n\n if (user?.retailServerErrorCode === notFoundError) {\n return signUpCustomerNotFound !== undefined ? signUpCustomerNotFound : signUpCustomerNotFoundTitle;\n } else if (user?.retailServerErrorCode === multipleAccountError) {\n return signUpMultipleCustomerFound !== undefined ? signUpMultipleCustomerFound : signUpMultipleCustomerFoundTitle;\n } else if (user?.retailServerErrorCode === accountAuthorizationError) {\n return signInCustomerNotAuthorized !== undefined ? signInCustomerNotAuthorized : signInCustomerNotAuthorizedTitle;\n }\n return user?.retailServerErrorMessage;\n }\n\n private _getAccountInfoDropdownButton(\n user: MsDyn365.IRequestContextUser | undefined,\n resources: IHeaderResources\n ): React.ReactNode | undefined {\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.MyProfile);\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n return (\n this.displayName && (\n \n
\n
{this.displayName}
\n {MsDyn365.isOboRequest(this.props.context.request) && this.customerName && (\n
{format(resources.shoppingAsText, this.customerName)}
\n )}\n
\n \n )\n );\n }\n\n private _getAccountLinks(customer: Customer | undefined): React.ReactNode[] | undefined {\n const { myAccountLinks } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n if (!this.displayName || !myAccountLinks || !ArrayExtensions.hasElements(myAccountLinks)) {\n return undefined;\n }\n return myAccountLinks.map((cta: IMyAccountLinksData, index: number) => {\n payLoad.contentAction.etext = cta.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: cta.ariaLabel,\n className: 'ms-signin-info__account-link-button',\n linkText: cta.linkText,\n linkUrl: cta.linkUrl.destinationUrl,\n openInNewTab: cta.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n\n return (\n \n );\n });\n }\n\n private _toggleNavbar(): void {\n this.setState({\n mobileMenuCollapsed: !this.state.mobileMenuCollapsed\n });\n }\n\n private _togglePopover(): void {\n this.setState({\n signinPopoverOpen: !this.state.signinPopoverOpen\n });\n }\n\n private _keydown(event: KeyboardEvent): void {\n if (event.keyCode === KeyCodes.Escape) {\n this.setState({ mobileMenuCollapsed: true });\n }\n }\n}\n\nexport default Header;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeaderViewProps } from './header';\n\nconst headerView: React.FC = props => {\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer,\n Divider\n } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {props.currentDistributor}\n {_renderDesktopAccountBlock(props)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n \n \n {props.MobileMenuHeader}\n {_renderReactFragment(props.menuBar)}\n \n {props.accountLinks ? props.accountLinks.map(link => link) : false}\n {props.siteOptions}\n {props.wishListIconMobile}\n {props.signInLink}\n {props.signOutLink}\n \n \n \n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderDesktopAccountBlock(props: IHeaderViewProps): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map(link => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return {signInLink};\n }\n }\n props.context.telemetry.error('Header content is empty, module wont render.');\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput, isOboRequest } from '@msdyn365-commerce/core';\nimport { Employee } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Input class for the GetEmployeeInput data action.\n */\nexport class GetEmployeeInput implements IActionInput {\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => 'Employee';\n\n /**\n * Get Cache type Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'Employee';\n\n /**\n * Get Cache type.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CreateInput method for the getEmployee.\n * @returns - Input for data action.\n */\nexport const createGetEmployeeInput = (): IActionInput => {\n return new GetEmployeeInput();\n};\n\n/**\n * The action method for the getEmployee data action.\n * @param input -- The action input.\n * @param ctx -- The action context.\n * @returns -- Employee.\n */\nexport async function getEmployeeAction(input: GetEmployeeInput, ctx: IActionContext): Promise {\n // For now, we just need the name information of employee. When we need more information, we will invoke EmployeeDataActions.readAsync retail proxy API.\n if (isOboRequest(ctx.requestContext)) {\n const user = ctx.requestContext.user;\n return {\n StaffId: '',\n Name: user?.firstName || user?.name\n };\n }\n return;\n}\n\n/**\n * The getEmployee data action.\n * Gets the employee.\n * @returns Employee.\n */\nexport const getEmployeeActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-employee',\n action: getEmployeeAction as IAction,\n input: createGetEmployeeInput\n});\n\nexport default getEmployeeActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IHeaderViewProps, Logo } from '@msdyn365-commerce-modules/header';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeaderProps } from '../definition-extensions/header.ext.props.autogenerated';\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n *\n * HeaderView component.\n * @extends {React.PureComponent}\n */\nexport class HeaderView extends React.PureComponent> {\n private readonly menuNode: React.RefObject;\n\n public constructor(props: IHeaderViewProps & IHeaderProps<{}>) {\n super(props);\n this.menuNode = React.createRef();\n }\n\n public componentDidMount(): void {\n if (this.props.config.useStickyHeader) {\n // Set header update methods to trigger on scroll\n if (MsDyn365.isBrowser) {\n window.addEventListener('scroll', () => {\n this._configureStickyHeader();\n });\n }\n this._configureStickyHeader();\n }\n }\n\n public render(): JSX.Element | null {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n HeaderTag,\n HeaderContainer,\n HeaderTopBarContainer,\n Divider,\n MobileMenuContainer,\n MobileMenuBodyContainer,\n MobileMenuLinksContainer\n } = this.props;\n\n return (\n \n \n \n
\n {this._renderReactFragment(this.props.menuBar)}\n
\n
{this.props.navIcon}
\n {this.props.logo}\n {this._renderMobileLogo()}\n {this._renderReactFragment(this.props.search)}\n {this.props.preferredStore}\n {this.props.currentDistributor}\n {this._renderAccountBlock(this.props)}\n \n {this.props.cartIcon}\n {this._renderReactFragment(this.props.siteOptions)}\n \n \n \n {this.props.MobileMenuHeader}\n {this._renderReactFragment(this.props.menuBar)}\n \n {this.props.accountLinks ? this.props.accountLinks.map(link => link) : false}\n {this.props.siteOptions}\n {this.props.wishListIconMobile}\n {this.props.signInLink}\n {this.props.signOutLink}\n \n \n \n
\n
\n );\n }\n\n /**\n * Function to update header.\n */\n private readonly _configureStickyHeader = (): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const headerAlertsContainer: HTMLElement | null = document.querySelector('.ms-promo-banner');\n const bannerHeights = headerAlertsContainer ? headerAlertsContainer.offsetHeight : defaultValue;\n\n // Triggers opacity change of header\n const headerElement = document.querySelector('header .default-container');\n if (headerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > defaultValue) {\n headerElement.classList.add('lock-opaque');\n headerElement.classList.add('fixed');\n } else {\n headerElement.classList.remove('lock-opaque');\n headerElement.classList.remove('fixed');\n }\n }\n\n // Update sticky header position and opacity\n const stickyHeader: HTMLElement | null = document.querySelector('.desktop-navicon-container');\n const headerLogo: HTMLElement | null = document.querySelector('.ms-header__logo');\n\n if (stickyHeader && headerLogo) {\n // Fix center sticky header\n const navStickyPos = headerLogo.offsetHeight + bannerHeights;\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > navStickyPos) {\n stickyHeader.classList.add('fixed');\n } else {\n stickyHeader.classList.remove('fixed');\n }\n }\n };\n\n private _renderMobileLogo(): JSX.Element | null {\n const { config, context, typeName } = this.props;\n return (\n \n );\n }\n\n /**\n * Function to render account block.\n * @param props - IHeaderViewProps.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderAccountBlock = (props: IHeaderViewProps): JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Cannot change the prop names as props are from business logic.\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signInLink\n } = props;\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(AccountInfoDropdownParentContainer.className, 'account-desktop');\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n {this._renderAccountDropdownLinks(props)}\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n };\n\n private readonly _renderAccountDropdownLinks = (props: IHeaderViewProps): JSX.Element | null => {\n const { isOBORequest, switchCustomerLink, accountLinks, signOutLink } = props;\n if (isOBORequest) {\n return (\n <>\n {switchCustomerLink}\n {signOutLink}\n {accountLinks ? : false}\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n \n );\n } else {\n return (\n <>\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n );\n }\n };\n\n /**\n * Function to render react fragment.\n * @param items - React nodes.\n * @returns Returns JSX.Element | null.\n */\n private readonly _renderReactFragment = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {ArrayExtensions.hasElements(items)\n ? items.map((slot: React.ReactNode) => {\n return <>{slot};\n })\n : null}\n \n );\n };\n}\n\nexport default HeaderView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["useIsClientSide","isClientSide","setIsClientSide","useState","useEffect","HeaderHelper","_ref","config","request","React","CookieHandlerHelper","LocaleRedirectHelper","_ref2","isClient","enableRedirectOnCookie","pageToRedirectOn","redirectsOnFrontPage","cookieExpiration","pathname","window","location","cookieName","subPaths","split","filter","path","mappingTo","find","redirect","mappedFrom","some","fromMapping","subPath","undefined","currentDate","Date","setDate","getDate","expirationDateInUtc","toUTCString","clearCookie","document","cookie","mappingToUrl","destinationUrl","getCookie","cookieContent","replace","_ref3","shouldRedirectToLocale","shouldLogOutInvalidLocaleUser","previousCookie","length","user","isAuthenticated","telemetry","warning","href","signOutUrl","cname","name","ca","decodeURIComponent","i","c","charAt","substring","indexOf","HeaderView","constructor","props","super","_configureStickyHeader","headerAlertsContainer","querySelector","bannerHeights","offsetHeight","headerElement","MsDyn365","isBrowser","documentElement","scrollTop","classList","add","remove","stickyHeader","headerLogo","navStickyPos","_renderAccountBlock","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signInLink","accountClassName","classnames","className","Node","Object","assign","this","_renderAccountDropdownLinks","isOBORequest","switchCustomerLink","accountLinks","signOutLink","map","link","_renderReactFragment","items","ArrayExtensions","hasElements","slot","_issueLoyalty","async","_this$props$context$r","context","input","IssueLoyaltyInput","apiSettings","issueLoyalty","actionContext","then","catch","err","error","message","debug","subscribeToNewsletter","_props$data$customerI","sessionStorage","getDataFromStorage","yes","data","customerInformation","result","ExtensionProperties","item","Key","Value","IntegerValue","token","jwtDecode","timeoutForNewsletterCheck","newsletterChoiceTimeClaim","newsletterChoiceClaim","yesValue","timeoutCutoff","now","subscribedTime","setDataInStorage","customer","attributeName","attribute","push","updateAsync","callerContext","subscribeCustomer","newsletterAttributeName","menuNode","componentDidMount","_this$props$context$r2","useStickyHeader","addEventListener","setTimeout","fetchLoyalty","render","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","MobileMenuContainer","MobileMenuBodyContainer","MobileMenuLinksContainer","app","Module","navIcon","ref","menuBar","logo","_renderMobileLogo","search","preferredStore","wishListIconMobile","cartIcon","siteOptions","MobileMenuHeader","_config$mobileLogoIma","typeName","Logo","logoLink","image","mobileLogoImage","gridSettings","requestContext","_customerInformation$","_customerPrimaryLoyal","loyaltyCard","hasLoyaltyAccount","CardTenderTypeValue","customerPrimaryLoyalty","_item$Value","StringValue","_loyaltyCard$result","card","StoreOperationsDataActions","queryResultSettings","_objectSpread","primaryLoyalty","CardNumber","icontext","CustomersDataActions","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","require","$type","da","runOn","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","value","_readFromToCookie","storeInfo","JSON","parse","_unused","_context","storeId","selectedStoreLocationId","storeName","writeToCookie","arguments","StoreId","StoreName","Latitude","Longitude","_writeToCookie","stringify","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","key","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","action","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","channel","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","requestUrl","Promise","resolve","script","createElement","setAttribute","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","currentWindowAPI","mapAPIReady","isMapApiLoaded","url","lang","market","reject","_document2","_document3","type","defer","src","createStoreSelectorStateInput","GenericInput","getGenericActionDataAction","createObservableDataAction","getGenericAction","inputData","renderCustomerName","accountInformation","FirstName","Name","index","renderForMobile","wishListIconDesktop","mobileMenuCollapsed","Collapse","isOpen","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","_renderCollapseMenu","mockRequest","buildMockRequest","mockRequestURL","URL","staticCdnUrl","xs","w","h","sm","lg","xl","signInUrl","signUpUrl","mockAnonRequest","mockSigninErrorRequest","retailServerErrorCode","mockActionContext","buildHydratedMockActionContext","HeaderPreferredStore","modalCloseButtonRef","handleClick","_findPreferredStoreOnClick","storeSelectorStateManager","slots","storeSelector","headerPreferredStoreText","color","headerPreferredStoreAriaLabel","onClick","storeSelectorId","keys","openDialog","showMapViewLink","parentElementRef","onLocationSelected","orgUnitLocation","observer","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","attributes","getTelemetryAttributes","_renderLogo","linkUrl","ariaLabel","target","openInNewTab","rel","_renderImage","Msdyn365","imageSettings","viewports","q","lazyload","loadFailureBehavior","editProps","moduleType","imagePropertyName","shouldSkipToMainImage","NavIcon","Button","toggleNavBar","title","mobileHamburgerAriaLabel","isExpanded","targetId","Header","isB2BSite","handleLinkTextChange","linkIndex","event","_this$props$config$my","myAccountLinks","linkText","popOverRef","_toggleNavbar","bind","_togglePopover","_keydown","state","signinPopoverOpen","hasSigninerror","getTelemetryObject","telemetryPageName","friendlyName","isChannelTypeB2B","workerName","customerName","_this$props$data$empl","worker","employee","_this$props$data$acco","reaction","cart","signUpCustomerNotFoundTitle","signUpMultipleCustomerFoundTitle","signInCustomerNotAuthorizedTitle","closeNotificationLabel","signinNotificationError","_getSigninNotification","NotificationsManager","instance","addNotification","ErrorNotification","componentWillUnmount","removeEventListener","wishlists","cartLabel","cartQtyLabel","logoImage","shouldShowWishlistCount","disableTooltip","headerToggleClass","headerClassName","navbarKey","cartIconSlot","_getSlot","menuBarSlot","searchSlot","wishlistCount","siteOptionsSlot","preferredStoreSlot","currentDistributorSlot","CommerceListLines","viewProps","WishListIconComponent","showButtonTooltip","wishlistTooltipText","wishlistCountLabel","isDispayWishlistCount","CartIconComponent","moduleProps","headerAriaLabel","tag","Modal","wrapClassName","toggle","ModalHeader","ModalBody","displayName","Popover","placement","_getSigninButton","_getSignOutButton","_getSwitchCustomerButton","_getAccountInfoDropdownButton","_getAccountLinks","currentDistributor","renderView","slotName","SignIn","signInLinkText","signInLinkAriaText","onTelemetryClick","_user$signOutUrl","SignOut","signOutLinkText","signOutLinkAriaText","SwitchCustomer","isOBOAccountSelected","cookies","getAccountSelectionCookie","switchCustomerLinkAriaText","switchCustomerLinkText","getBusinessPartnerSelectionUrl","role","removeAccountSelectionCookie","format","shoppingAsText","route","forEach","param","searchParams","delete","signUpCustomerNotFound","signUpMultipleCustomerFound","signInCustomerNotAuthorized","retailServerErrorMessage","MyProfile","innerRef","cta","contentAction","etext","editableLink","additionalProperties","onTextChange","setState","keyCode","KeyCodes","Escape","_renderDesktopAccountBlock","GetEmployeeInput","getCacheKey","getCacheObjectType","dataCacheType","createGetEmployeeInput","getEmployeeAction","ctx","isOboRequest","StaffId","firstName","getEmployeeActionDataAction","module","exports","ReactDOM"],"sourceRoot":""}