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AAyB,CACtCrD,EAAGA,IAAMuD,EAAQ,MACjBC,MAAO,gBACPC,GAAI,CAAC,CAACC,KAAK,aAAeC,KAAK,8EAA+EC,MAAO,IAErHC,KAAK,EACLC,GAAI,YACJC,EAAG,sBACHC,EAAG,YAEHC,IAAK,GAGL3G,GAAI,mCAlC4B4G,EAACC,EAAqBC,KAUlD,GADAhB,EAAQE,YAAYa,GAAuBC,GACtChB,EAAQE,YAAYa,GAAqBE,QAC1C,MAAM,IAAIC,MAAM,oBAAsBH,EAAsB,mCAEhEf,EAAQE,YAAYa,GAAqBE,QAAQE,UAAUC,eAAiBL,EACxEf,EAAQE,YAAYa,GAAqBE,QAAQE,UAAU1K,KAC3DuJ,EAAQE,YAAYF,EAAQE,YAAYa,GAAqBE,QAAQE,UAAU1K,IAAMsK,IA0BzFD,CAF4B,8EACXX,EAAQ,MAMjC3N,OAAO6O,aAAe7O,OAAO6O,cAAgB,GAC7C7O,OAAO6O,aAAapB,QAAO7M,EAAAA,EAAA,GACpBZ,OAAO6O,aAAapB,SAAW,IAC/BD,EAAQC,SAGXzN,OAAO6O,aAAanB,YAAW9M,EAAAA,EAAA,GAC5BZ,OAAO6O,aAAanB,aAAe,IACnCF,EAAQE,aAEY,MAAMoB,EAAiB,GAC9BA,EAAe,uEAAyE,CAChG1E,EAAGA,IAAMuD,EAAQ,MACjBoB,GAAI,2CAEpB/O,OAAO6O,aAAe7O,OAAO6O,cAAgB,GAC7C7O,OAAO6O,aAAaC,eAAclO,EAAAA,EAAA,GACPZ,OAAO6O,aAAaC,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAUtR,cCAjBqR,EAAOC,QAAUC","sources":["webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/hei-navigation-menu.data.ts?b9b9","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/hei-navigation-menu.props.autogenerated.ts?c1f6","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/hei-navigation-menu.tsx?a012","webpack://henrys-ecommerce/./src/common/utilities/makeAbsUrl.ts?817a","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/components/MobileMenu.tsx?14ad","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/components/DesktopMenu.tsx?a5c3","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/components/StaticMenu.tsx?6579","webpack://henrys-ecommerce/./src/modules/hei-navigation-menu/hei-navigation-menu.view.tsx?f5c9","webpack://henrys-ecommerce/./lib/hei-navigation-menu/module-registration.js?10bf","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ICategoryPromotionalContentData } from './hei-navigation-menu.props.autogenerated';\r\n\r\nexport interface IHeiNavigationMenuData {\r\n categories: AsyncResult;\r\n}\r\n\r\nexport interface IMenuItemData {\r\n id?: number;\r\n linkText?: string;\r\n linkURL?: string;\r\n imageSource?: string;\r\n imageDestinationURL?: string;\r\n subMenu?: IMenuItemData[];\r\n promotionalContent?: ICategoryPromotionalContentData[];\r\n menuSource?: string;\r\n shouldOpenNewTab?: boolean;\r\n ariaLabel?: string;\r\n}\r\n\r\n/**\r\n *\r\n * Menu type index id.\r\n */\r\nexport enum MenuTypeIndexId {\r\n Cms = 1000,\r\n Retail = 5000\r\n}\r\n\r\n/**\r\n *\r\n * Menu type source.\r\n */\r\nexport enum MenuSource {\r\n Cms = 'Cms',\r\n Retail = 'Retail'\r\n}\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IHeiNavigationMenu contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum navigationMenuSource {\r\n all = 'all',\r\n retailServerOnly = 'retailServerOnly',\r\n cmsOnly = 'cmsOnly'\r\n}\r\n\r\nexport interface IHeiNavigationMenuConfig extends Msdyn365.IModuleConfig {\r\n htmlMenu?: string;\r\n jsonMenu?: string;\r\n navigationMenuSource?: navigationMenuSource;\r\n cmsNavItems?: ICmsNavItemsData[];\r\n enableMultilevelMenu?: boolean;\r\n enabletopMenu?: boolean;\r\n menuLevelSupport?: number;\r\n rootMenuNavigation?: string;\r\n displayCategoryImage?: boolean;\r\n displayPromotionalImage?: boolean;\r\n categoryPromotionalContent?: ICategoryPromotionalContentData[];\r\n categoryImageSettings?: Msdyn365.IImageSettings;\r\n className?: string;\r\n clientRender?: boolean;\r\n}\r\n\r\nexport interface IHeiNavigationMenuResources {\r\n menuAriaLabel: string;\r\n backButtonAriaLabel: string;\r\n allCategoryMenuText: string;\r\n}\r\n\r\nexport interface ICmsNavItemsData {\r\n linkText?: string;\r\n linkUrl?: Msdyn365.ILinkData;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n subMenus?: ISubMenusData[];\r\n}\r\n\r\nexport interface ICategoryPromotionalContentData {\r\n categoryName?: string;\r\n image: Msdyn365.IImageData;\r\n text?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n}\r\n\r\nexport interface ISubMenusData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n subMenus?: ISubMenusData[];\r\n}\r\n\r\nexport interface ISubMenusData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n}\r\n\r\nexport interface IHeiNavigationMenuProps extends Msdyn365.IModule {\r\n resources: IHeiNavigationMenuResources;\r\n config: IHeiNavigationMenuConfig;\r\n}\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\n/* eslint-disable no-duplicate-imports */\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport MsDyn365, { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject } from '@msdyn365-commerce/core';\r\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, observable } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { IMenuItemData, IHeiNavigationMenuData, MenuSource, MenuTypeIndexId } from './hei-navigation-menu.data';\r\nimport { ICmsNavItemsData, IHeiNavigationMenuProps, ISubMenusData, navigationMenuSource } from './hei-navigation-menu.props.autogenerated';\r\n\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nexport interface IHeiNavigationMenuViewProps extends IHeiNavigationMenuProps {\r\n className: string;\r\n menuItemData: IMenuItemData[];\r\n Navigation: IModuleProps;\r\n MenuList: INodeProps;\r\n ListItem: INodeProps;\r\n Link: INodeProps;\r\n Button: INodeProps;\r\n Span: INodeProps;\r\n ImageContainer: INodeProps;\r\n MobileDescriptionContainer: INodeProps;\r\n MobileBackButton: INodeProps;\r\n MobileDescriptionLabel: INodeProps;\r\n imageSettings: IImageSettings;\r\n gridSettings: IGridSettings;\r\n isMobileView: boolean;\r\n DivContainer?: INodeProps;\r\n ImageDivContainer?: INodeProps;\r\n showCategoryImage?: boolean;\r\n showPromotionalContent?: boolean;\r\n actionBtn?: React.ReactNode;\r\n viewport: GridSize;\r\n}\r\n\r\nexport interface INavigationMenuState {\r\n isMobile: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenu component.\r\n * @extends {React.PureComponent>}\r\n */\r\nclass HeiNavigationMenu extends React.PureComponent<\r\n IHeiNavigationMenuProps & { actionBtn?: React.ReactNode },\r\n INavigationMenuState\r\n> {\r\n private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\r\n\r\n private static RSItemIdInit: number = MenuTypeIndexId.Retail;\r\n\r\n private resizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n private menuItemList: IMenuItemData[];\r\n\r\n private isRetail: boolean = true;\r\n\r\n private isCMS: boolean = true;\r\n\r\n @observable\r\n private viewport: GridSize;\r\n\r\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\r\n let nameTranslation: TextValueTranslation | undefined;\r\n if (locale && nameTranslations && nameTranslations.length > 0) {\r\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\r\n }\r\n\r\n return nameTranslation && nameTranslation.Text;\r\n }\r\n\r\n constructor(props: IHeiNavigationMenuProps) {\r\n super(props);\r\n this._updateViewport = this._updateViewport.bind(this);\r\n this.viewport =\r\n props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\r\n this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\r\n this.state = { isMobile: this.isMobile };\r\n this.menuItemList = [];\r\n }\r\n\r\n @computed get isMobile(): boolean {\r\n return this.viewport === 'xs' || this.viewport === 'sm';\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.isBrowser) {\r\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\r\n }\r\n this._updateViewport();\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.menuItemList = this._mapData();\r\n if (isEmptyOrNullObject(this.props.data)) {\r\n this.props.telemetry.error('Navigatiomenu returned null');\r\n return null;\r\n }\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=224&h=300&m=6', w: 0, h: 0 },\r\n xl: { q: 'w=224&h=300&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const viewProps = {\r\n ...this.props,\r\n ...this.state,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: this.props.context.request.gridSettings,\r\n Navigation: {\r\n moduleProps: this.props,\r\n className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\r\n tag: 'nav',\r\n role: this.isMobile ? 'listbox' : 'navigation'\r\n },\r\n MenuList: {\r\n className: 'ms-nav__list',\r\n tag: 'ul',\r\n role: this.isMobile ? 'listbox' : 'menu'\r\n },\r\n ListItem: {\r\n className: 'ms-nav__list__item',\r\n role: 'presentation',\r\n tag: 'li'\r\n },\r\n showCategoryImage: this.props.config.displayCategoryImage ?? false,\r\n showPromotionalContent: this.props.config.displayPromotionalImage ?? false,\r\n Link: {\r\n tag: 'a',\r\n className: 'ms-nav__list__item__link',\r\n role: this.isMobile ? 'option' : 'menuitem'\r\n },\r\n DivContainer: {\r\n tag: 'div',\r\n className: 'ms-nav__feature'\r\n },\r\n ImageDivContainer: {\r\n tag: 'div',\r\n className: 'category-image',\r\n role: 'tabpanel'\r\n },\r\n Button: {\r\n className: 'ms-nav__list__item__button',\r\n tag: 'button',\r\n role: this.isMobile ? 'option' : 'menuitem',\r\n onClick: this.props\r\n },\r\n ImageContainer: {\r\n className: 'ms-nav__list__item__image'\r\n },\r\n Span: {\r\n className: 'ms-nav__list__item__span',\r\n tag: 'span'\r\n },\r\n MobileDescriptionContainer: {\r\n className: 'ms-nav__list__mobile__container'\r\n },\r\n MobileBackButton: {\r\n className: 'ms-nav__list__mobile__container__button',\r\n tag: 'button',\r\n 'aria-label': this.props.resources.backButtonAriaLabel,\r\n onClick: this.props\r\n },\r\n MobileDescriptionLabel: {\r\n className: 'ms-nav__list__mobile__container__span',\r\n tag: 'span'\r\n },\r\n isMobileView: this.state.isMobile,\r\n menuItemData: this.menuItemList,\r\n viewport: this.viewport,\r\n className: classnames('ms-nav', this.props.config.className)\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _mapData(): IMenuItemData[] {\r\n const { data, config } = this.props;\r\n const mergedData: IMenuItemData[] = [];\r\n if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\r\n data.categories.result.map((item: CategoryHierarchy, index) =>\r\n mergedData.push(this._constructMenuItemData(item, undefined, true, index, true))\r\n );\r\n }\r\n\r\n if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\r\n config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) =>\r\n mergedData.push(this._constructMenuItemData(undefined, item, false, idx + 1))\r\n );\r\n }\r\n return this._constructTopMenuItemData(mergedData);\r\n }\r\n\r\n private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\r\n const enableTopLevelMenu = this.props.config.enabletopMenu ?? false;\r\n if (!enableTopLevelMenu) {\r\n return mergedData;\r\n }\r\n const mergedRootMenuData: IMenuItemData[] = [];\r\n const topMenu = {\r\n id: 1,\r\n linkText: this.props.config.rootMenuNavigation ?? '...',\r\n linkURL: '#',\r\n imageSource: undefined,\r\n subMenu: mergedData\r\n } as IMenuItemData;\r\n mergedRootMenuData.push(topMenu);\r\n\r\n return mergedRootMenuData;\r\n }\r\n\r\n private _constructMenuItemData(\r\n retailItem?: CategoryHierarchy,\r\n cmsItem?: ICmsNavItemsData,\r\n isRetail?: boolean,\r\n idx?: number,\r\n addedAllMenu?: boolean\r\n ): IMenuItemData {\r\n const locale =\r\n this.props.context && this.props.context.request && this.props.context.request.locale\r\n ? this.props.context.request.locale\r\n : 'en-us';\r\n const { categoryPromotionalContent } = this.props.config;\r\n const cmsItemText = (cmsItem && cmsItem.linkText) || '';\r\n const { menuAriaLabel } = this.props.resources;\r\n\r\n // Filter category promotional data based on category name\r\n const promotionalData =\r\n retailItem &&\r\n categoryPromotionalContent?.filter(promoItem => promoItem.categoryName?.toLowerCase() === retailItem?.Name?.toLowerCase());\r\n\r\n // First check if image is available from promotional data else read from retail server\r\n let imageSource: string = 'empty';\r\n if (ArrayExtensions.hasElements(retailItem?.Images) && retailItem!.Images[0].Uri) {\r\n imageSource = retailItem!.Images[0].Uri;\r\n }\r\n if (isRetail) {\r\n return {\r\n id: HeiNavigationMenu.RSItemIdInit++,\r\n linkText: HeiNavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? '',\r\n linkURL: retailItem?.Url,\r\n imageSource,\r\n subMenu: this._getNestedChildren(retailItem, imageSource, addedAllMenu),\r\n promotionalContent: this.props.config.displayPromotionalImage && promotionalData,\r\n menuSource: MenuSource.Retail,\r\n ariaLabel: `${HeiNavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? ''} ${menuAriaLabel}`\r\n } as IMenuItemData;\r\n }\r\n return {\r\n id: HeiNavigationMenu.CMSItemIdInit++,\r\n linkText: cmsItemText,\r\n linkURL: (cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl) || '',\r\n imageDestinationURL: (cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl) || '',\r\n imageSource: (cmsItem && cmsItem.image && cmsItem.image.src) || '',\r\n subMenu: this._getCMSNestedChildren(cmsItem),\r\n menuSource: MenuSource.Cms,\r\n shouldOpenNewTab: cmsItem?.openInNewTab,\r\n ariaLabel: `${cmsItemText} ${menuAriaLabel}`\r\n } as IMenuItemData;\r\n }\r\n\r\n private _getNestedChildren(category?: CategoryHierarchy, imageSourceUrl?: string, addedAllMenu: boolean = false): IMenuItemData[] {\r\n const nestedChildren: IMenuItemData[] = [];\r\n if (!category || !category.Children || category.Children.length === 0) {\r\n return [];\r\n }\r\n if (!this.props.config.enabletopMenu && addedAllMenu) {\r\n nestedChildren.push({\r\n linkText: this.props.resources.allCategoryMenuText,\r\n imageSource: imageSourceUrl,\r\n linkURL: getCategoryUrl(category, (this.props.context as unknown) as IActionContext, {})\r\n });\r\n }\r\n category.Children.map((item: CategoryHierarchy, index) => {\r\n nestedChildren.push(this._constructMenuItemData(item, undefined, true, index, false));\r\n });\r\n return nestedChildren;\r\n }\r\n\r\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\r\n const nestedChildren: IMenuItemData[] = [];\r\n\r\n if (!category || !category.subMenus || category.subMenus.length === 0) {\r\n return [];\r\n }\r\n\r\n category.subMenus.map((item: ISubMenusData, idx: number) => {\r\n nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\r\n });\r\n return nestedChildren;\r\n }\r\n\r\n private readonly _setNavigationSource = (sourceType?: navigationMenuSource): void => {\r\n switch (sourceType) {\r\n case navigationMenuSource.retailServerOnly:\r\n this.isRetail = true;\r\n this.isCMS = false;\r\n break;\r\n case navigationMenuSource.cmsOnly:\r\n this.isRetail = false;\r\n this.isCMS = true;\r\n break;\r\n case navigationMenuSource.all:\r\n this.isRetail = true;\r\n this.isCMS = true;\r\n break;\r\n default:\r\n }\r\n };\r\n\r\n private _updateViewport(): void {\r\n this.viewport = this._getViewport();\r\n this.setState({ isMobile: this.isMobile });\r\n }\r\n\r\n private _getViewport(): GridSize {\r\n const { context } = this.props;\r\n\r\n // Always render in mobile viewport on a mobile device\r\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\r\n return 'xs';\r\n }\r\n\r\n if (MsDyn365.isBrowser && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n }\r\n return 'xl';\r\n }\r\n }\r\n\r\n return 'xs';\r\n }\r\n}\r\n\r\nexport default HeiNavigationMenu;\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\n\r\nexport const makeAbsUrl = (context: IActionContext, url: string) => {\r\n if (url[0] === '/') {\r\n return `https://${window.location.host}${url}`;\r\n }\r\n\r\n return url;\r\n};\r\n","// eslint-disable @typescript-eslint/no-unused-vars\r\n// @ts-ignore\r\n\r\nimport * as React from 'react';\r\nimport classnames from 'classnames';\r\nimport { MenuConfigItem, MenuProps } from './models';\r\nimport { makeAbsUrl } from '../../../common/utilities/makeAbsUrl';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\n\r\nconst mergeMenuItems = (items: MenuConfigItem[]) => {\r\n const mergedItems: MenuConfigItem[] = [];\r\n for (const m of items) {\r\n if (m.label) {\r\n mergedItems.push({\r\n ...m\r\n });\r\n } else {\r\n const lastItem = mergedItems[mergedItems.length - 1];\r\n if (lastItem) {\r\n mergedItems[mergedItems.length - 1] = {\r\n ...lastItem,\r\n children: [...(lastItem.children ?? []), ...(m.children ?? [])]\r\n };\r\n } else {\r\n console?.warn('invalid menu config', items);\r\n }\r\n }\r\n }\r\n\r\n for (const m of mergedItems) {\r\n m.children = mergeMenuItems(m.children ?? []);\r\n }\r\n\r\n return mergedItems;\r\n};\r\n\r\nconst MenuList = ({ menus, level, context }: { menus: MenuConfigItem[]; level: number; context: IActionContext }) => {\r\n const [activeMenu, setActiveMenu] = React.useState(null);\r\n return (\r\n
    \r\n {menus.map((menuItem, idx) => {\r\n const hasChild = Boolean(menuItem.children && menuItem.children.length > 0);\r\n const expanded = hasChild && activeMenu === menuItem;\r\n return (\r\n \r\n {hasChild ? (\r\n setActiveMenu(expanded ? null : menuItem)}>{menuItem.label}\r\n ) : menuItem.url ? (\r\n \r\n {menuItem.label}\r\n \r\n ) : (\r\n <>{menuItem.label}\r\n )}\r\n {hasChild && (\r\n \r\n )}\r\n {expanded && }\r\n \r\n );\r\n })}\r\n
\r\n );\r\n};\r\n\r\nconst MobileMenu = ({ menuConfig, className, context }: MenuProps) => {\r\n const rootItems = React.useMemo(() => mergeMenuItems(menuConfig), []);\r\n // const [activeMenu, setActiveMenu] = React.useState(null);\r\n // const menuItems = activeMenu ? activeMenu.children ?? [] : rootItems;\r\n\r\n return (\r\n
\r\n \r\n {/* {menuItems.map((menuItem, idx) => {\r\n const hasChild = Boolean(menuItem.children && menuItem.children.length > 0);\r\n return (\r\n
  • \r\n {menuItem.url ? {menuItem.label} : <>{menuItem.label}}\r\n {hasChild && (\r\n \r\n )}\r\n
  • \r\n );\r\n })} */}\r\n
    \r\n );\r\n};\r\n\r\nexport default MobileMenu;\r\n","// eslint-disable @typescript-eslint/no-unused-vars\r\n// @ts-ignore\r\n\r\nimport * as React from 'react';\r\nimport classnames from 'classnames';\r\nimport { makeAbsUrl } from '../../../common/utilities/makeAbsUrl';\r\nimport { MenuProps } from './models';\r\n\r\nconst DesktopMenu = ({ menuConfig, className, context, viewport }: MenuProps) => {\r\n const [openMenuIndex, setOpenMenuIndex] = React.useState(null);\r\n const activeMenu = React.useMemo(() => {\r\n const activeMenu = (openMenuIndex !== null && menuConfig[openMenuIndex]) || null;\r\n process.env.NODE_ENV === 'development' && console.log('hei-navigation-menu', 'activeMenu', activeMenu);\r\n return activeMenu;\r\n }, [openMenuIndex, menuConfig]);\r\n\r\n const isXl = viewport === 'xl';\r\n\r\n return (\r\n
    \r\n
      \r\n {menuConfig.map((c, idx) => (\r\n setOpenMenuIndex(currentIndex => (currentIndex === idx ? null : idx))}\r\n >\r\n {c.label}\r\n \r\n ))}\r\n
    \r\n\r\n {/* Selected/opened menu */}\r\n {activeMenu && (\r\n
    \r\n
    \r\n

    \r\n {activeMenu.url ? (\r\n \r\n {activeMenu.label}\r\n \r\n ) : (\r\n <>{activeMenu.label}\r\n )}\r\n

    \r\n
    \r\n {Array(isXl ? 6 : 4)\r\n .fill(0)\r\n .map((_, i) => {\r\n const col = i + 1;\r\n return (\r\n // Menu column\r\n
    \r\n {activeMenu.children &&\r\n activeMenu.children\r\n .filter(c => (isXl ? (c.columnXL || 1) === col : (c.column || 1) === col))\r\n .map((section, sectionIdx) => {\r\n const children = section.children;\r\n return (\r\n
    \r\n

    \r\n {section.url ? (\r\n \r\n {section.label}\r\n \r\n ) : (\r\n <>{section.label}\r\n )}\r\n

    \r\n {children && (\r\n
      \r\n {children.map((menuItem, menuItemIdx) => (\r\n \r\n {menuItem.url ? (\r\n \r\n {menuItem.label}\r\n \r\n ) : (\r\n <>{menuItem.label}\r\n )}\r\n \r\n ))}\r\n
    \r\n )}\r\n {section.promo && (\r\n
    \r\n \r\n \r\n \r\n
    \r\n )}\r\n
    \r\n );\r\n })}\r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n
    \r\n )}\r\n
    \r\n );\r\n};\r\n\r\nexport default DesktopMenu;\r\n","// eslint-disable @typescript-eslint/no-unused-vars\r\n// @ts-ignore\r\n\r\nimport * as React from 'react';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport MenuConfig from '../../../common/menu-config.json';\r\nimport { GridSize, MenuConfigItem } from './models';\r\nimport MobileMenu from './MobileMenu';\r\nimport DesktopMenu from './DesktopMenu';\r\n\r\nconst UseConfigFromSiteBuilder = false;\r\n\r\nexport type StaticMenuProps = {\r\n isMobileView: boolean;\r\n jsonMenu?: string;\r\n className?: string;\r\n actionBtn?: React.ReactNode;\r\n context: IActionContext;\r\n viewport: GridSize;\r\n};\r\n\r\nconst StaticMenu = ({ isMobileView, jsonMenu, ...rest }: StaticMenuProps) => {\r\n const menuConfig = React.useMemo(() => {\r\n const menuConfig: MenuConfigItem[] = UseConfigFromSiteBuilder && jsonMenu ? JSON.parse(jsonMenu) : MenuConfig;\r\n return menuConfig;\r\n }, [jsonMenu, MenuConfig]);\r\n\r\n return isMobileView ? : ;\r\n};\r\n\r\nexport default StaticMenu;\r\n","// eslint-disable @typescript-eslint/no-unused-vars\r\n// eslint-disable @typescript-eslint/no-unused-imports\r\n// @ts-ignore\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport MsDyn365, { IImageData } from '@msdyn365-commerce/core';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IHeiNavigationMenuViewProps } from './hei-navigation-menu';\r\nimport StaticMenu from './components/StaticMenu';\r\n\r\ninterface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: IImageData[] | null;\r\n mobileViewLabelText?: string;\r\n categoryImageAltText: string;\r\n updateCounter: number;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenuView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class HeiNavigationMenuView extends React.PureComponent {\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n constructor(props: IHeiNavigationMenuViewProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n this.state = { activeMenu: undefined, mobileViewLabelText: '', parentMenu: undefined, categoryImageAltText: '', updateCounter: 0 };\r\n this._closeSubmenu = this._closeSubmenu.bind(this);\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n document.body.addEventListener('focusout', this._handleFocusOutside);\r\n }\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props;\r\n\r\n return (\r\n \r\n \r\n {isMobileView && this.state.activeMenu !== undefined && (\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n )}\r\n \r\n \r\n \r\n );\r\n }\r\n\r\n private readonly _handleGoBack = () => () => {\r\n this.setState({ activeMenu: this.state.parentMenu });\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\r\n this.setState({\r\n updateCounter: this.state.updateCounter + 1,\r\n activeMenu: undefined,\r\n mobileViewLabelText: '',\r\n categoryImage: null\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleFocusOutside = (event: FocusEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\r\n this._closeSubmenu();\r\n }\r\n };\r\n\r\n private _closeSubmenu(): void {\r\n if (!this.props.isMobileView) {\r\n this.setState({\r\n updateCounter: this.state.updateCounter + 1,\r\n activeMenu: undefined,\r\n categoryImage: null,\r\n mobileViewLabelText: ''\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport default HeiNavigationMenuView;\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['hei-navigation-menu'] = {\n c: () => require('partner/modules/hei-navigation-menu/hei-navigation-menu.tsx'),\n $type: 'contentModule',\n da: [{name:'categories', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-categories-hierarchy', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'hei-navigation-menu',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/hei-navigation-menu'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-categories-hierarchy';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-categories-hierarchy');\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__|modules|hei-navigation-menu|hei-navigation-menu'] = {\n c: () => require('partner/modules/hei-navigation-menu/hei-navigation-menu.view.tsx'),\n cn: '__local__-__local__-hei-navigation-menu'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["MenuTypeIndexId","MenuSource","navigationMenuSource","HeiNavigationMenu","React","constructor","props","super","isRetail","isCMS","_setNavigationSource","sourceType","retailServerOnly","this","cmsOnly","all","_updateViewport","bind","viewport","context","request","device","Type","config","state","isMobile","menuItemList","locale","nameTranslations","nameTranslation","length","find","item","Language","toLowerCase","Text","componentDidMount","MsDyn365","isBrowser","resizeThrottledEventHandler","addThrottledEvent","window","componentWillUnmount","removeEventListener","render","_this$props$config$di","_this$props$config$di2","_mapData","isEmptyOrNullObject","data","telemetry","error","viewProps","_objectSpread","imageSettings","viewports","xs","q","w","h","xl","lazyload","gridSettings","Navigation","moduleProps","className","classnames","tag","role","MenuList","ListItem","showCategoryImage","displayCategoryImage","showPromotionalContent","displayPromotionalImage","Link","DivContainer","ImageDivContainer","Button","onClick","ImageContainer","Span","MobileDescriptionContainer","MobileBackButton","resources","backButtonAriaLabel","MobileDescriptionLabel","isMobileView","menuItemData","renderView","mergedData","categories","result","map","index","push","_constructMenuItemData","undefined","cmsNavItems","idx","_constructTopMenuItemData","_this$props$config$en","_this$props$config$ro","enabletopMenu","mergedRootMenuData","topMenu","id","linkText","rootMenuNavigation","linkURL","imageSource","subMenu","retailItem","cmsItem","addedAllMenu","categoryPromotionalContent","cmsItemText","menuAriaLabel","promotionalData","filter","promoItem","_promoItem$categoryNa","_retailItem$Name","categoryName","Name","_HeiNavigationMenu$ge","_HeiNavigationMenu$ge2","ArrayExtensions","hasElements","Images","Uri","RSItemIdInit","getFriendlyName","NameTranslations","Url","_getNestedChildren","promotionalContent","menuSource","Retail","ariaLabel","CMSItemIdInit","linkUrl","destinationUrl","imageDestinationURL","imageLink","image","src","_getCMSNestedChildren","Cms","shouldOpenNewTab","openInNewTab","category","imageSourceUrl","arguments","nestedChildren","Children","allCategoryMenuText","getCategoryUrl","subMenus","_getViewport","setState","innerWidth","sm","md","lg","__decorate","observable","computed","makeAbsUrl","url","location","host","mergeMenuItems","items","mergedItems","m","label","lastItem","_lastItem$children","_m$children","_console","children","console","warn","_m$children2","_ref","menus","level","activeMenu","setActiveMenu","menuItem","hasChild","Boolean","expanded","key","active","href","target","type","_ref2","menuConfig","rootItems","openMenuIndex","setOpenMenuIndex","isXl","c","currentIndex","Array","fill","_","i","col","columnXL","column","section","sectionIdx","menuItemIdx","promo","title","jsonMenu","rest","_objectWithoutProperties","_excluded","MenuConfig","MobileMenu","Object","assign","DesktopMenu","HeiNavigationMenuView","_handleGoBack","parentMenu","_handleClickOutside","event","menuNode","current","contains","updateCounter","mobileViewLabelText","categoryImage","_handleFocusOutside","relatedTarget","_closeSubmenu","menuItemRef","categoryImageAltText","document","body","addEventListener","componentDidUpdate","_this$menuItemRef$cur","focus","Module","Node","ref","tabIndex","StaticMenu","actionBtn","actionContext","binding","modules","dataActions","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}