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A,OACnBlR,EAAAA,cAACmO,EAAAA,KAAIlB,OAAAC,OAAA,GAAKpI,EAAiB,CAAEZ,UAAWY,EAAmBZ,UAAWwK,IAAKzM,EAAKkH,MAC3E0J,EAAiB9R,KAAKN,MAAe,QAAV4Y,EAAEpX,EAAKkH,WAAG,IAAAkQ,EAAAA,EAAI,GAAIpX,EAAK+I,QAAS8E,YAC3DiJ,GACGhY,KAAK4P,uBAAuB1O,EAAK+I,QAAkC,QAA3BkG,EAAEjP,EAAKmJ,4BAAoB,IAAA8F,OAAA,EAAzBA,EAA2BpI,gBA5iBtFyR,EAAA9O,aAAuB,GAkE5BlB,EAAAA,EAAAA,IAAA,CAATE,EAAAA,IAAQ,iCA+nBb,UC7sBA,EAR4BhK,GACpBA,EAAMc,OAAOgF,cACNvG,EAAAA,cAACua,EAAyB,CAACvH,SAAUvS,IAGzCT,EAAAA,cAACwT,EAA0B,CAACR,SAAUvS","sources":["webpack://bestseller.commerce.online/external var \"React\"?0d3b","webpack://bestseller.commerce.online/external var \"ReactDOM\"?853b","webpack://bestseller.commerce.online/./src/components/common/Show/show.tsx?db40","webpack://bestseller.commerce.online/./src/modules/navigation-menu/navigation-menu.tsx?2bef","webpack://bestseller.commerce.online/./src/modules/navigation-menu/navigation-menu.data.ts?9815","webpack://bestseller.commerce.online/./src/modules/navigation-menu/navigation-menu.view.tsx?c594","webpack://bestseller.commerce.online/./lib/navigation-menu/module-registration.js?7039","webpack://bestseller.commerce.online/./src/themes/only/views/components/navigation-menu-utilities.tsx?9b19","webpack://bestseller.commerce.online/./src/components/common/Each/each.tsx?652f","webpack://bestseller.commerce.online/./src/themes/only/views/components/navigation-menu-root-disabled.tsx?b4c6","webpack://bestseller.commerce.online/./src/themes/only/views/components/navigation-menu-root-enabled.tsx?1340","webpack://bestseller.commerce.online/./src/themes/only/views/navigation-menu.view.tsx?506b","webpack://bestseller.commerce.online/./src/modules/adventureworks/views/components/navigation-menu-utilities.tsx?d092","webpack://bestseller.commerce.online/./src/modules/adventureworks/views/components/navigation-menu-root-disabled.tsx?1d68","webpack://bestseller.commerce.online/./src/modules/adventureworks/views/components/navigation-menu-root-enabled.tsx?d5b3","webpack://bestseller.commerce.online/./src/modules/adventureworks/views/navigation-menu.view.tsx?5304"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","import React, { FC, PropsWithChildren } from 'react';\r\n\r\ntype ShowProps = {\r\n condition: boolean;\r\n Otherwise?: FC | JSX.Element;\r\n};\r\nexport const Show = ({ children, condition, Otherwise }: PropsWithChildren): JSX.Element => (\r\n <>{condition ? children : Otherwise !== undefined ? Otherwise : <>}\r\n);\r\n\r\nexport default Show;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject } from '@msdyn365-commerce/core';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, observable } from 'mobx';\nimport * as React from 'react';\n\nimport { IMenuItemData, INavigationMenuData, MenuSource, MenuTypeIndexId } from './navigation-menu.data';\nimport { ICmsNavItemsData, INavigationMenuProps, ISubMenusData, navigationMenuSource } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuViewProps extends INavigationMenuProps {\n className: string;\n menuItemData: IMenuItemData[];\n Navigation: IModuleProps;\n MenuList: INodeProps;\n ListItem: INodeProps;\n Link: INodeProps;\n Button: INodeProps;\n Span: INodeProps;\n ImageContainer: INodeProps;\n MobileDescriptionContainer: INodeProps;\n MobileBackButton: INodeProps;\n MobileDescriptionLabel: INodeProps;\n imageSettings: IImageSettings;\n gridSettings: IGridSettings;\n isMobileView: boolean;\n DivContainer?: INodeProps;\n ImageDivContainer?: INodeProps;\n showCategoryImage?: boolean;\n showPromotionalContent?: boolean;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface INavigationMenuState {\n isMobile: boolean;\n}\n\n/**\n *\n * NavigationMenu component.\n * @extends {React.PureComponent>}\n */\nclass NavigationMenu extends React.PureComponent, INavigationMenuState> {\n private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\n\n private static RSItemIdInit: number = MenuTypeIndexId.Retail;\n\n private resizeThrottledEventHandler?: (event: Event) => void;\n\n private menuItemList: IMenuItemData[];\n\n private isRetail: boolean = true;\n\n private isCMS: boolean = true;\n\n @observable\n private viewport: GridSize;\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && nameTranslations.length > 0) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation && nameTranslation.Text;\n }\n\n constructor(props: INavigationMenuProps) {\n super(props);\n this._updateViewport = this._updateViewport.bind(this);\n this.viewport =\n props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\n this.state = { isMobile: this.isMobile };\n this.menuItemList = [];\n }\n\n @computed get isMobile(): boolean {\n return this.viewport === 'xs' || this.viewport === 'sm';\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\n }\n this._updateViewport();\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\n }\n }\n\n public render(): JSX.Element | null {\n this.menuItemList = this._mapData();\n if (isEmptyOrNullObject(this.props.data)) {\n this.props.telemetry.error('Navigatiomenu returned null');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=224&h=300&m=6', w: 0, h: 0 },\n xl: { q: 'w=224&h=300&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const viewProps = {\n ...this.props,\n ...this.state,\n imageSettings: defaultImageSettings,\n gridSettings: this.props.context.request.gridSettings,\n Navigation: {\n moduleProps: this.props,\n className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\n tag: 'nav',\n role: this.isMobile ? 'listbox' : 'navigation'\n },\n MenuList: {\n className: 'ms-nav__list',\n tag: 'ul',\n role: this.isMobile ? 'listbox' : 'menu'\n },\n ListItem: {\n className: 'ms-nav__list__item',\n role: 'presentation',\n tag: 'li'\n },\n showCategoryImage: this.props.config.displayCategoryImage ?? false,\n showPromotionalContent: this.props.config.displayPromotionalImage ?? false,\n Link: {\n tag: 'a',\n className: 'ms-nav__list__item__link',\n role: this.isMobile ? 'option' : 'menuitem'\n },\n DivContainer: {\n tag: 'div',\n className: 'ms-nav__feature'\n },\n ImageDivContainer: {\n tag: 'div',\n className: 'category-image',\n role: 'tabpanel'\n },\n Button: {\n className: 'ms-nav__list__item__button',\n tag: 'button',\n role: this.isMobile ? 'option' : 'menuitem',\n onClick: this.props\n },\n ImageContainer: {\n className: 'ms-nav__list__item__image'\n },\n Span: {\n className: 'ms-nav__list__item__span',\n tag: 'span'\n },\n MobileDescriptionContainer: {\n className: 'ms-nav__list__mobile__container'\n },\n MobileBackButton: {\n className: 'ms-nav__list__mobile__container__button',\n tag: 'button',\n 'aria-label': this.props.resources.backButtonAriaLabel,\n onClick: this.props\n },\n MobileDescriptionLabel: {\n className: 'ms-nav__list__mobile__container__span',\n tag: 'span'\n },\n isMobileView: this.state.isMobile,\n menuItemData: this.menuItemList,\n className: classnames('ms-nav', this.props.config.className)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _mapData(): IMenuItemData[] {\n const { data, config } = this.props;\n const mergedData: IMenuItemData[] = [];\n if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\n data.categories.result.map((item: CategoryHierarchy, index) =>\n mergedData.push(this._constructMenuItemData(item, undefined, true, index, true))\n );\n }\n\n if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\n config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) =>\n mergedData.push(this._constructMenuItemData(undefined, item, false, idx + 1))\n );\n }\n return this._constructTopMenuItemData(mergedData);\n }\n\n private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\n const enableTopLevelMenu = this.props.config.enabletopMenu ?? false;\n if (!enableTopLevelMenu) {\n return mergedData;\n }\n const mergedRootMenuData: IMenuItemData[] = [];\n const topMenu = {\n id: 1,\n linkText: this.props.config.rootMenuNavigation ?? '...',\n linkURL: '#',\n imageSource: undefined,\n subMenu: mergedData\n } as IMenuItemData;\n mergedRootMenuData.push(topMenu);\n\n return mergedRootMenuData;\n }\n\n private _constructMenuItemData(\n retailItem?: CategoryHierarchy,\n cmsItem?: ICmsNavItemsData,\n isRetail?: boolean,\n idx?: number,\n addedAllMenu?: boolean\n ): IMenuItemData {\n const locale =\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : 'en-us';\n const { categoryPromotionalContent } = this.props.config;\n const cmsItemText = (cmsItem && cmsItem.linkText) || '';\n const { menuAriaLabel } = this.props.resources;\n\n // Filter category promotional data based on category name\n const promotionalData =\n retailItem &&\n categoryPromotionalContent?.filter(promoItem => promoItem.categoryName?.toLowerCase() === retailItem?.Name?.toLowerCase());\n\n // First check if image is available from promotional data else read from retail server\n let imageSource: string = 'empty';\n if (ArrayExtensions.hasElements(retailItem?.Images) && retailItem!.Images[0].Uri) {\n imageSource = retailItem!.Images[0].Uri;\n }\n if (isRetail) {\n return {\n id: NavigationMenu.RSItemIdInit++,\n linkText: NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? '',\n linkURL: retailItem?.Url,\n imageSource,\n subMenu: this._getNestedChildren(retailItem, imageSource, addedAllMenu),\n promotionalContent: this.props.config.displayPromotionalImage && promotionalData,\n menuSource: MenuSource.Retail,\n ariaLabel: `${NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? ''} ${menuAriaLabel}`\n } as IMenuItemData;\n }\n return {\n id: NavigationMenu.CMSItemIdInit++,\n linkText: cmsItemText,\n linkURL: (cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl) || '',\n imageDestinationURL: (cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl) || '',\n imageSource: (cmsItem && cmsItem.image && cmsItem.image.src) || '',\n subMenu: this._getCMSNestedChildren(cmsItem),\n menuSource: MenuSource.Cms,\n shouldOpenNewTab: cmsItem?.openInNewTab,\n ariaLabel: `${cmsItemText} ${menuAriaLabel}`\n } as IMenuItemData;\n }\n\n private _getNestedChildren(category?: CategoryHierarchy, imageSourceUrl?: string, addedAllMenu: boolean = false): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n if (!category || !category.Children || category.Children.length === 0) {\n return [];\n }\n if (!this.props.config.enabletopMenu && addedAllMenu) {\n nestedChildren.push({\n linkText: this.props.resources.allCategoryMenuText,\n imageSource: imageSourceUrl,\n linkURL: getCategoryUrl(category, (this.props.context as unknown) as IActionContext, {})\n });\n }\n category.Children.map((item: CategoryHierarchy, index) => {\n nestedChildren.push(this._constructMenuItemData(item, undefined, true, index, false));\n });\n return nestedChildren;\n }\n\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n\n if (!category || !category.subMenus || category.subMenus.length === 0) {\n return [];\n }\n\n category.subMenus.map((item: ISubMenusData, idx: number) => {\n nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\n });\n return nestedChildren;\n }\n\n private readonly _setNavigationSource = (sourceType?: navigationMenuSource): void => {\n switch (sourceType) {\n case navigationMenuSource.retailServerOnly:\n this.isRetail = true;\n this.isCMS = false;\n break;\n case navigationMenuSource.cmsOnly:\n this.isRetail = false;\n this.isCMS = true;\n break;\n case navigationMenuSource.all:\n this.isRetail = true;\n this.isCMS = true;\n break;\n default:\n }\n };\n\n private _updateViewport(): void {\n this.viewport = this._getViewport();\n this.setState({ isMobile: this.isMobile });\n }\n\n private _getViewport(): GridSize {\n const { context } = this.props;\n\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n }\n}\n\nexport default NavigationMenu;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\n\nimport { ICategoryPromotionalContentData } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuData {\n categories: AsyncResult;\n}\n\nexport interface IMenuItemData {\n id?: number;\n linkText?: string;\n linkURL?: string;\n imageSource?: string;\n imageDestinationURL?: string;\n subMenu?: IMenuItemData[];\n promotionalContent?: ICategoryPromotionalContentData[];\n menuSource?: string;\n shouldOpenNewTab?: boolean;\n ariaLabel?: string;\n}\n\n/**\n *\n * Menu type index id.\n */\nexport enum MenuTypeIndexId {\n Cms = 1000,\n Retail = 5000\n}\n\n/**\n *\n * Menu type source.\n */\nexport enum MenuSource {\n Cms = 'Cms',\n Retail = 'Retail'\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IPayLoad,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { INavigationMenuViewProps } from './navigation-menu';\nimport { IMenuItemData } from './navigation-menu.data';\n\ninterface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: IImageData[] | null;\n mobileViewLabelText?: string;\n categoryImageAltText: string;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuView extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private currentLevel: number = 0;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: INavigationMenuViewProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n this.state = { activeMenu: undefined, mobileViewLabelText: '', parentMenu: undefined, categoryImageAltText: '' };\n this._closeSubmenu = this._closeSubmenu.bind(this);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n document.body.addEventListener('mousedown', this._handleClickOutside);\n document.body.addEventListener('focusout', this._handleFocusOutside);\n }\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\n }\n }\n\n public render(): JSX.Element | null {\n const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props;\n\n this.currentLevel = 1;\n return (\n \n \n {isMobileView && this.state.activeMenu !== undefined && (\n \n \n {this.state.mobileViewLabelText}\n \n )}\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem, menuItemData, isMobileView } = this.props;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\n let menuItem: IMenuItemData = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n !NavigationMenuView.isBackTrack\n ? this.setState({ parentMenu: undefined })\n : this.setState({ parentMenu: undefined, mobileViewLabelText: menuItemDatum.linkText });\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n menuItem &&\n menuItemList.push(\n \n {' '}\n {this._createMenuItemList(menuItem)}{' '}\n \n );\n } else {\n menuItemData.forEach((item: IMenuItemData, index: number) => {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n });\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item && item.subMenu;\n if (subMenus && subMenus.length > 0) {\n for (let i = 0; i <= subMenus.length - 1; i++) {\n if (subMenus[i].id === this.state.activeMenu) {\n !NavigationMenuView.isBackTrack\n ? this.setState({ parentMenu: item?.id })\n : this.setState({ parentMenu: item && item.id, mobileViewLabelText: subMenus[i].linkText });\n return subMenus[i];\n }\n const found = this._getFromSubMenu(subMenus[i]);\n if (found) {\n return found;\n }\n }\n }\n this.props.context.telemetry.error('Submenu content is empty, module wont render.');\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false)}\n \n );\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\n return this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true);\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\n return this._renderSpanMenuItem(menuItemData, menuItemData.id, true);\n }\n this.props.context.telemetry.error('Navigation menu content is empty, module wont render.');\n return null;\n }\n\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\n const { isMobileView, ListItem } = this.props;\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || 3;\n\n // Const isParentMenu:boolean= false;\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || subMenus.length === 0) {\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions =\n subMenus &&\n subMenus.map((option: IMenuItemData, idx: number) => {\n const hasOptions = option.subMenu && option.subMenu.length > 0;\n let menuItem: JSX.Element | null;\n if (hasOptions && isMobileView) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\n } else {\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\n }\n\n let subMenu;\n const haveSubmenu = hasOptions && enableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1;\n if (haveSubmenu) {\n this.currentLevel++;\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\n }\n return (\n \n {menuItem}\n {subMenu}\n \n );\n });\n return this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu);\n }\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n const { Button } = this.props;\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderLinkMenuItem(\n option: IMenuItemData,\n index?: number,\n hoverEffect: boolean = true,\n isParent: boolean = false\n ): JSX.Element | null {\n const { Link } = this.props;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n {linkText}\n \n );\n }\n return null;\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\n const { Span } = this.props;\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent, isMobileView } = this.props;\n const categoryImageDisplay =\n !isMobileView &&\n (showCategoryImage || showPromotionalContent) &&\n !ArrayExtensions.hasElements(this.state.categoryImage) &&\n !submenu;\n const promotionalContentDisplay =\n !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = 1;\n return (\n \n 2 &&\n 'navmenu-multi-level'\n )}\n >\n {menuOptions}\n \n {categoryImageDisplay &&\n this.state.categoryImage &&\n this.state.categoryImage.map(item => (\n \n {this.state.categoryImage && this._getCategoryImage(item)}\n {promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n \n ))}\n \n );\n }\n\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\n const linkText = option && option.linkText ? option.linkText : '';\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n option.promotionalContent.map(item => {\n if (item && item.image) {\n const imageSrc = item.image.src;\n const promotionalItemImageSettings = item.image.imageSettings;\n promotionalImage.push({\n src: imageSrc,\n altText: item.text,\n imageSettings: promotionalItemImageSettings,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n }\n });\n }\n this.setState({\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\n categoryImageAltText: linkText\n });\n };\n\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.props.isMobileView) {\n this.setState({\n activeMenu: this.state.activeMenu && this.state.activeMenu === data.id! ? undefined : data.id!,\n parentMenu: parentId\n });\n if (this.props.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuView.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n };\n\n private readonly _handleGoBack = () => () => {\n NavigationMenuView.isBackTrack = true;\n this.setState({ activeMenu: this.state.parentMenu });\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n this.setState({\n activeMenu: undefined,\n mobileViewLabelText: '',\n categoryImage: null\n });\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleFocusOutside = (event: FocusEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\n this._closeSubmenu();\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Parent user clicked Sub menu list.\n * @param optionLinkText -Sub menu list.\n * @returns Ref.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n if (!NavigationMenuView.isBackTrack && index === 0) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n private _closeSubmenu(): void {\n if (!this.props.isMobileView) {\n this.setState({ activeMenu: undefined, categoryImage: null, mobileViewLabelText: '' });\n }\n }\n\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\n if (!categoryImage || !categoryImage.src) {\n return null;\n }\n\n const categoryImageUrl = generateImageUrl(`${categoryImage.src}`, this.props.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n return (\n \n );\n }\n return null;\n };\n}\n\nexport default NavigationMenuView;\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['navigation-menu'] = {\n c: () => require('@msdyn365-commerce-modules/navigation-menu/dist/lib/modules/navigation-menu/navigation-menu'),\n $type: 'contentModule',\n da: [{name:'categories', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-categories-hierarchy', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'navigation-menu',\n p: 'navigation-menu',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/navigation-menu/dist/lib/modules/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__|themes|only|views|navigation-menu'] = {\n c: () => require('partner/themes/only/views/navigation-menu.view.tsx'),\n cn: '__local__-__local__-navigation-menu'\n };\nviewDictionary['@msdyn365-commerce-modules|navigation-menu|modules|navigation-menu|navigation-menu'] = {\n c: () => require('@msdyn365-commerce-modules/navigation-menu/dist/lib/modules/navigation-menu/navigation-menu.view.js'),\n cn: '@msdyn365-commerce-modules-navigation-menu-navigation-menu'\n };\nviewDictionary['@msdyn365-commerce-theme|adventureworks-theme-kit|modules|adventureworks|views|navigation-menu'] = {\n c: () => require('@msdyn365-commerce-theme/adventureworks-theme-kit/dist/lib/modules/adventureworks/views/navigation-menu.view.js'),\n cn: '@msdyn365-commerce-theme-adventureworks-theme-kit-navigation-menu'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n * INavigationMenuViewRootProps.\r\n */\r\nexport interface INavigationMenuViewRootProps {\r\n navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n}\r\n\r\n/**\r\n * Represent navigation menu state interface.\r\n */\r\nexport interface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: Msdyn365.IImageData[] | null;\r\n mobileViewLabelText?: string;\r\n drawerKeyValue: Msdyn365.IDictionary;\r\n isOnlyMobile: boolean;\r\n isNavOpen: boolean;\r\n}\r\n\r\n/**\r\n * NavMenuConstants enum.\r\n */\r\nexport enum NavMenuConstants {\r\n zero = 0,\r\n one = 1,\r\n two = 2,\r\n three = 3,\r\n four = 4,\r\n escapeKey = 27,\r\n rootMenu = 1\r\n}\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Get category image.\r\n * @param props - Navigation menu props.\r\n * @param categoryImage - Category Image.\r\n * @param alttext - AltText String.\r\n * @returns Returns Node.\r\n */\r\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\r\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if (categoryImageUrl !== undefined) {\r\n const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n};\r\n","import React, { Children, ReactNode } from 'react';\r\n\r\ntype EachProps = {\r\n items: T[];\r\n Render: (item: T, index: number) => ReactNode;\r\n};\r\n\r\nexport const Each = ({ Render, items }: EachProps): JSX.Element => (\r\n <>{Children.toArray(items.map((item, index) => Render(item, index)))}\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse,\r\n Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n ICollapseProps,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\nimport Show from '../../../../components/common/Show/show';\r\nimport { Each } from '../../../../components/common/Each/each';\r\nimport {\r\n IGendersSpecificNavigationData,\r\n ISubMenuPromotialMenuItemsData\r\n} from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport { NonEmptyArray } from '@msdyn365-commerce-modules/retail-actions/dist/types/utilities/extensions/array-extensions';\r\nimport { IDictionary } from '@msdyn365-commerce/retail-proxy';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootDisabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootDisabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n return null;\r\n });\r\n }\r\n }\r\n\r\n this.state = {\r\n activeMenu: 1,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n drawerKeyValue: {},\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = 1;\r\n const navbarKey = 'header-nav-mobile';\r\n\r\n const { navProps } = this.props;\r\n const { config, MenuList } = navProps;\r\n const { enableGenderNav = false, gendersSpecificNavigation = [] } = config;\r\n\r\n return (\r\n \r\n {this.state.isOnlyMobile ? (\r\n this._renderMobileMenu()\r\n ) : (\r\n <>\r\n \r\n \r\n \r\n \r\n items={gendersSpecificNavigation}\r\n Render={item => {\r\n const { linkText = '' } = item;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n {\r\n onTelemetryClick(this.telemetryContent, this.payLoad, linkText);\r\n }}\r\n />\r\n );\r\n }}\r\n />\r\n \r\n \r\n {this._renderCollapseMenu()}\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: 1,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = 1;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n )}\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { MenuList, Navigation } = this.props.navProps;\r\n\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return this._renderLinkMenuItem(item);\r\n } else if (!item.linkURL) {\r\n return this._renderSpanMenuItem(item);\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (ArrayExtensions.hasElements(menuItemData)) {\r\n menuItemData[0].id = 1;\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n const menuItem = this._getFromSubMenu(undefined, menuItemData);\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(menuItem)}\r\n \r\n );\r\n }\r\n } else {\r\n for (const [index, item] of menuItemData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
\r\n );\r\n }\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\r\n if (!menu) {\r\n return null;\r\n }\r\n\r\n for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\r\n const item: IMenuItemData = menu[Number(index)];\r\n\r\n if (item.id === this.state.activeMenu) {\r\n if (!NavigationMenuRootDisabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\r\n }\r\n return item;\r\n }\r\n const found = this._getFromSubMenu(item.id, item.subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData, shouldRenderSubMenu: boolean | undefined = true): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu) && shouldRenderSubMenu) {\r\n const { config } = this.props.navProps;\r\n const { enablePromotionalItems = false, subMenuPromotialMenuItems = [] } = config;\r\n\r\n const subMenuData = enablePromotionalItems\r\n ? SortMenuItems(subMenuPromotialMenuItems, menuItemData.subMenu)\r\n : menuItemData.subMenu;\r\n\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return this._renderSubMenu(subMenuData, menuItemData.id, false);\r\n }\r\n\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(subMenuData, menuItemData.id)}\r\n \r\n );\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return this._renderLinkMenuItem(menuItemData, menuItemData.id);\r\n } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\r\n return this._renderSpanMenuItem(menuItemData);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n const { navProps } = this.props;\r\n const { config } = navProps;\r\n const { menuLevelSupport = 1, enablePromotionalItems = false, subMenuPromotialMenuItems = [] } = config;\r\n\r\n const shouldRenderSubMenus: boolean = this.currentLevel + 1 < menuLevelSupport;\r\n\r\n if (this.currentLevel > menuLevelSupport) return <>;\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n //this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n //this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const menuPromotionOptions = GetPromotionalItems(subMenus, subMenuPromotialMenuItems, enablePromotionalItems).map(\r\n (option: IMenuItemData, index: number) => {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n return (\r\n \r\n {menuItem}\r\n \r\n );\r\n }\r\n );\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = GetNonPromotionalItems(subMenus, subMenuPromotialMenuItems, enablePromotionalItems).map(\r\n (option: IMenuItemData, index: number) => {\r\n const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\r\n\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile && this.currentLevel < Math.round(multiLevelSupportedMenu)) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else {\r\n menuItem = this.getMenuItem(option, index);\r\n }\r\n\r\n let subMenu;\r\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n subMenu = this._renderSubMenuDrawer(option);\r\n } else if (this.currentLevel <= this.supportedLevel) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n {menuItem}\r\n {subMenu}\r\n \r\n );\r\n }\r\n );\r\n return this._renderMenu(levelClassName, menuPromotionOptions, menuOptions, isSubMenu);\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\r\n } else {\r\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\r\n const levelClassName = `level-${this.currentLevel.toString()}`;\r\n const toggleButtonText = menuItem.linkText;\r\n const keyValue = this.state.drawerKeyValue;\r\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\r\n const keys = keyValue;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n let isDrawerOpen = false;\r\n if (keys[menuItem.id!]) {\r\n isDrawerOpen = true;\r\n }\r\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\r\n\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\r\n this.currentLevel++;\r\n if (this.currentLevel < multiLevelSupportedMenu) {\r\n return this._renderSubMenuDrawer(menuSubItem);\r\n }\r\n }\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param menuId -Number.\r\n * @param isDrawerOpen -Boolean.\r\n * @returns Void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\r\n const { drawerKeyValue } = this.state;\r\n const newPair = { [menuId!]: !isDrawerOpen };\r\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number, customClasses?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n {linkText}\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(\r\n level: string,\r\n menuPromotionOptions: JSX.Element[],\r\n menuOptions: JSX.Element[],\r\n isSubmenu?: boolean\r\n ): JSX.Element | null {\r\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile &&\r\n showCategoryImage &&\r\n this.state.categoryImage !== null &&\r\n this.state.categoryImage !== undefined &&\r\n !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass =\r\n this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName =\r\n isCategoryImageDisplay &&\r\n this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\r\n 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n {menuPromotionOptions.length > 0 && (\r\n \r\n {menuPromotionOptions}\r\n \r\n )}\r\n \r\n {menuOptions}\r\n \r\n
\r\n {isCategoryImageDisplay &&\r\n ArrayExtensions.hasElements(categoryImages) &&\r\n categoryImages.map(item => (\r\n \r\n {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n {isPromotionalContentDisplay &&\r\n this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n \r\n ))}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootDisabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootDisabled.isBackTrack = true;\r\n this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\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 if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n (this.menuNode.current?.children[0] as HTMLElement).focus();\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n (this.menuNode.current?.children[0] as HTMLElement).focus();\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n}\r\n\r\nexport default NavigationMenuRootDisabled;\r\n/**\r\n * Method to sort sub menu in navigation\r\n * @param customSortedArray The sort order of certain items in the navigation menu, items in this array, will be sorted first\r\n * @param unsortedArray Array of unsorted menu items that need sorting\r\n * @returns sorted Array of menuitems in sort order defined in CMS\r\n */\r\nconst SortMenuItems = (\r\n customSortedArray: ISubMenuPromotialMenuItemsData[],\r\n unsortedArray: NonEmptyArray\r\n): NonEmptyArray => {\r\n const sortedArray = unsortedArray.sort((first, second) => {\r\n const indexOfFirstItem: number = customSortedArray.findIndex(\r\n customSortItem => customSortItem.linkUrl.destinationUrl == first.linkURL\r\n );\r\n const indexOfSecondItem: number = customSortedArray.findIndex(\r\n customSortItem => customSortItem.linkUrl.destinationUrl == second.linkURL\r\n );\r\n\r\n const firstElementIsSpecialSorted: boolean = indexOfFirstItem >= 0;\r\n const secondElementIsSepcialSorted: boolean = indexOfSecondItem >= 0;\r\n\r\n if (firstElementIsSpecialSorted && !secondElementIsSepcialSorted) return -1;\r\n if (!firstElementIsSpecialSorted && secondElementIsSepcialSorted) return 1;\r\n if (!firstElementIsSpecialSorted && !secondElementIsSepcialSorted) return 0;\r\n\r\n return indexOfFirstItem - indexOfSecondItem;\r\n });\r\n const hasValues = ArrayExtensions.hasElements(sortedArray);\r\n if (hasValues) {\r\n return sortedArray;\r\n } else {\r\n return unsortedArray;\r\n }\r\n};\r\n\r\nconst IsPromotionalItem = (promotionalItems: ISubMenuPromotialMenuItemsData[], menuItem: IMenuItemData): boolean =>\r\n promotionalItems.some(promotionalItem => promotionalItem.linkUrl.destinationUrl == menuItem.linkURL);\r\n\r\nconst GetPromotionalItems = (subMenus: IMenuItemData[], subMenuPromotialMenuItems: any[], enablePromotionalItems: boolean = true) => {\r\n return enablePromotionalItems ? subMenus.filter(option => IsPromotionalItem(subMenuPromotialMenuItems, option)) : [];\r\n};\r\n\r\nconst GetNonPromotionalItems = (subMenus: IMenuItemData[], subMenuPromotialMenuItems: any[], enablePromotionalItems: boolean = true) => {\r\n return enablePromotionalItems ? subMenus.filter(option => !IsPromotionalItem(subMenuPromotialMenuItems, option)) : subMenus;\r\n};\r\n\r\ninterface GenderSpecificNavigationRenderProps {\r\n item: IGendersSpecificNavigationData;\r\n properties: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n telementryAttributes: IDictionary | undefined;\r\n telementryClick: () => void;\r\n}\r\n\r\nconst GenderSpecificNavigationRender = ({\r\n item,\r\n properties,\r\n telementryAttributes,\r\n telementryClick\r\n}: GenderSpecificNavigationRenderProps): JSX.Element => {\r\n const { Link } = properties;\r\n const { linkText = '', linkURL: MSLinkObj = { destinationUrl: '' } } = item;\r\n const { destinationUrl } = MSLinkObj;\r\n return (\r\n \r\n {linkText}\r\n \r\n );\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\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse,\r\n Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n ICollapseProps,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootEnabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootEnabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private menuItemData: IMenuItemData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n return null;\r\n });\r\n }\r\n }\r\n this.state = {\r\n activeMenu: NavMenuConstants.rootMenu,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n drawerKeyValue: {},\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n this._addShopAllLink();\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = NavMenuConstants.one;\r\n const navbarKey = 'header-nav-mobile';\r\n return (\r\n \r\n {this.state.isOnlyMobile ? (\r\n this._renderMobileMenu()\r\n ) : (\r\n <>\r\n \r\n {this._renderCollapseMenu()}\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: NavMenuConstants.rootMenu,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = NavMenuConstants.one;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n )}\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { Navigation } = this.props.navProps;\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return this._renderLinkMenuItem(item);\r\n } else if (!item.linkURL) {\r\n return this._renderSpanMenuItem(item);\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n let menuItemData: IMenuItemData[] = [];\r\n if (this.state.isOnlyMobile) {\r\n menuItemData = this.menuItemData;\r\n } else {\r\n menuItemData = this.props.navProps.menuItemData;\r\n }\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n let cmsMenuData: IMenuItemData[] | undefined = [];\r\n let retailMenuItemData: IMenuItemData[] | undefined = [];\r\n const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\r\n\r\n for (const item of retailMenuData) {\r\n retailMenuItemData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n item.subMenu = retailMenuItemData;\r\n }\r\n\r\n for (const item of menuItemData) {\r\n cmsMenuData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail);\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n let menuItem: IMenuItemData | null = {};\r\n for (const menuItemDatum of menuItemData) {\r\n if (menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({\r\n parentMenu: undefined\r\n });\r\n } else {\r\n this.setState({\r\n parentMenu: undefined,\r\n mobileViewLabelText: menuItemDatum.linkText\r\n });\r\n }\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum);\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {` `}\r\n {this._createMenuItemList(menuItem)} {` `}\r\n \r\n );\r\n }\r\n } else {\r\n for (const [index, item] of retailMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
\r\n );\r\n }\r\n\r\n for (const [index, item] of cmsMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n }\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item?.subMenu;\r\n if (subMenus && ArrayExtensions.hasElements(subMenus)) {\r\n for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\r\n const subMenu: IMenuItemData = subMenus[Number(index)];\r\n let parentMenuId = item?.id;\r\n\r\n if (subMenu.id === this.state.activeMenu) {\r\n if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\r\n parentMenuId = undefined;\r\n }\r\n\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\r\n }\r\n return subMenu;\r\n }\r\n const found = this._getFromSubMenu(subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\r\n }\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return this._renderLinkMenuItem(menuItemData, menuItemData.id);\r\n } else if (!menuItemData.linkURL) {\r\n return this._renderSpanMenuItem(menuItemData);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n //this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n //this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n let subMenu;\r\n const isHavingSubmenu =\r\n hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n subMenu = this._renderSubMenuDrawer(option);\r\n } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n {menuItem}\r\n {subMenu}\r\n \r\n );\r\n });\r\n return this._renderMenu(levelClassName, menuOptions, isSubMenu);\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\r\n } else {\r\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\r\n const levelClassName = `level-${this.currentLevel.toString()}`;\r\n const toggleButtonText = menuItem.linkText;\r\n const keyValue = this.state.drawerKeyValue;\r\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\r\n const keys = keyValue;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n let isDrawerOpen = false;\r\n if (keys[menuItem.id!]) {\r\n isDrawerOpen = true;\r\n }\r\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\r\n this.currentLevel++;\r\n if (this.currentLevel < multiLevelSupportedMenu) {\r\n return this._renderSubMenuDrawer(menuSubItem);\r\n }\r\n }\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param menuId -Number.\r\n * @param isDrawerOpen -Boolean.\r\n * @returns Void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\r\n const { drawerKeyValue } = this.state;\r\n const newPair = { [menuId!]: !isDrawerOpen };\r\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n {linkText}\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile &&\r\n showCategoryImage &&\r\n this.state.categoryImage !== null &&\r\n this.state.categoryImage !== undefined &&\r\n !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass =\r\n this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName =\r\n isCategoryImageDisplay &&\r\n this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\r\n 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n \r\n {menuOptions}\r\n \r\n
\r\n {isCategoryImageDisplay &&\r\n ArrayExtensions.hasElements(categoryImages) &&\r\n categoryImages.map(item => (\r\n \r\n {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n {isPromotionalContentDisplay &&\r\n this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n \r\n ))}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootEnabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootEnabled.isBackTrack = true;\r\n this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\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 if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Add shop all link for Mobile submenu.\r\n */\r\n private readonly _addShopAllLink = (): void => {\r\n const { menuItemData } = this.props.navProps;\r\n this.menuItemData = menuItemData;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n this.menuItemData[0].subMenu?.map(item => {\r\n const shopAllObject = {};\r\n Object.assign(shopAllObject, { imageSource: item.imageSource });\r\n Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\r\n Object.assign(shopAllObject, { linkURL: item.linkURL });\r\n if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\r\n item.subMenu.unshift(shopAllObject);\r\n }\r\n return item;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n}\r\n\r\nexport default NavigationMenuRootEnabled;\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 { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\r\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\r\n\r\n/**\r\n * Render the Navigation menu.\r\n * @param props - The navigation menu view props.\r\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\r\n */\r\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\r\n if (props.config.enabletopMenu) {\r\n return ;\r\n }\r\n\r\n return ;\r\n};\r\n\r\nexport default navigationMenuView;\r\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 { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\n\n/**\n * INavigationMenuViewRootProps.\n */\nexport interface INavigationMenuViewRootProps {\n navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\n}\n\n/**\n * Represent navigation menu state interface.\n */\nexport interface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: Msdyn365.IImageData[] | null;\n mobileViewLabelText?: string;\n drawerKeyValue: Msdyn365.IDictionary;\n isOnlyMobile: boolean;\n isNavOpen: boolean;\n}\n\n/**\n * NavMenuConstants enum.\n */\nexport enum NavMenuConstants {\n zero = 0,\n one = 1,\n two = 2,\n three = 3,\n four = 4,\n escapeKey = 27,\n rootMenu = 1\n}\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Get category image.\n * @param props - Navigation menu props.\n * @param categoryImage - Category Image.\n * @param alttext - AltText String.\n * @returns Returns Node.\n */\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\n lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\n return (\n \n );\n }\n return null;\n};\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 { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n addThrottledEvent,\n Button,\n Collapse,\n Drawer,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IPayLoad,\n isMobile,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootDisabled component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuRootDisabled extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private readonly supportedLevel: number = NavMenuConstants.four;\n\n private currentLevel: number = NavMenuConstants.zero;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n private readonly payLoad: IPayLoad;\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n private customResizeThrottledEventHandler?: (event: Event) => void;\n\n public constructor(props: INavigationMenuViewRootProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n const { menuItemData } = this.props.navProps;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\n const imageSource = item.image.src;\n this.promotionalImage.push({\n src: imageSource,\n altText: item.text,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n return null;\n });\n }\n }\n\n this.state = {\n activeMenu: 1,\n mobileViewLabelText: '',\n parentMenu: undefined,\n drawerKeyValue: {},\n isOnlyMobile: this.isOnlyMobile,\n categoryImage: this.promotionalImage,\n isNavOpen: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.navProps.context.request.telemetryPageName!,\n this.props.navProps.friendlyName,\n this.props.navProps.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n }\n\n @computed public get isOnlyMobile(): boolean {\n return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\n }\n\n public componentDidMount(): void {\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n this._customUpdateViewport();\n document.body.addEventListener('mousedown', this._handleClickOutside);\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n }\n\n public render(): JSX.Element | null {\n this.currentLevel = 1;\n const navbarKey = 'header-nav-mobile';\n return (\n \n {this.state.isOnlyMobile ? (\n this._renderMobileMenu()\n ) : (\n <>\n \n {this._renderCollapseMenu()}\n \n )}\n \n );\n }\n\n /**\n * Function to handle nav bar toggle.\n */\n private readonly _toggleNavBar = (): void => {\n this.setState(previousState => ({\n activeMenu: 1,\n isNavOpen: !previousState.isNavOpen\n }));\n };\n\n private _renderCollapseMenu(): JSX.Element | null {\n return (\n \n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n \n );\n }\n\n private _renderMobileMenu(): JSX.Element {\n const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n this.currentLevel = 1;\n return (\n \n \n {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\n \n \n {this.state.mobileViewLabelText}\n \n )}\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDesktopMenu(): JSX.Element {\n const { MenuList, Navigation } = this.props.navProps;\n\n return (\n \n \n {this._renderDisplay()}\n
\n
\n
\n
\n );\n }\n\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n return this._renderLinkMenuItem(item);\n } else if (!item.linkURL) {\n return this._renderSpanMenuItem(item);\n }\n return null;\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem } = this.props.navProps;\n const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (ArrayExtensions.hasElements(menuItemData)) {\n menuItemData[0].id = 1;\n }\n\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n const menuItem = this._getFromSubMenu(undefined, menuItemData);\n\n if (menuItem) {\n menuItemList.push(\n \n {` `}\n {this._createMenuItemList(menuItem)} {` `}\n \n );\n }\n } else {\n for (const [index, item] of menuItemData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n
\n );\n }\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\n if (!menu) {\n return null;\n }\n\n for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\n const item: IMenuItemData = menu[Number(index)];\n\n if (item.id === this.state.activeMenu) {\n if (!NavigationMenuRootDisabled.isBackTrack) {\n this.setState({ parentMenu: parentMenuId });\n } else {\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\n }\n return item;\n }\n const found = this._getFromSubMenu(item.id, item.subMenu);\n if (found) {\n return found;\n }\n }\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n }\n\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n return this._renderLinkMenuItem(menuItemData, menuItemData.id);\n } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\n return this._renderSpanMenuItem(menuItemData);\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\n if (activeMenu === NavMenuConstants.rootMenu) {\n subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n }\n\n const { ListItem } = this.props.navProps;\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\n let menuItem: JSX.Element | null;\n if (hasOptions && this.state.isOnlyMobile) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n menuItem = this.getMenuItem(option, index);\n } else {\n menuItem = null;\n }\n let subMenu;\n const isHavingSubmenu =\n hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\n\n if (hasOptions && !this.state.isOnlyMobile) {\n if (this.currentLevel >= NavMenuConstants.two) {\n subMenu = this._renderSubMenuDrawer(option);\n } else if (this.currentLevel <= this.supportedLevel) {\n this.currentLevel++;\n levelClassName = `level-${this.currentLevel.toString()}`;\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n }\n }\n\n if (isHavingSubmenu && this.state.isOnlyMobile) {\n this.currentLevel++;\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n }\n const imagesource = option.imageSource ? option.imageSource : '';\n return (\n \n {menuItem}\n {subMenu}\n \n );\n });\n return this._renderMenu(levelClassName, menuOptions, isSubMenu);\n }\n\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n let menuItem: JSX.Element | null;\n if (this.currentLevel === NavMenuConstants.one) {\n menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\n } else {\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\n }\n return menuItem;\n }\n\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n const levelClassName = `level-${this.currentLevel.toString()}`;\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n let isDrawerOpen = false;\n if (keys[menuItem.id!]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n this.currentLevel++;\n if (this.currentLevel < multiLevelSupportedMenu) {\n return this._renderSubMenuDrawer(menuSubItem);\n }\n }\n return this._renderDrawerLink(menuSubItem);\n })}\n
\n \n );\n }\n\n /**\n * Method to handle escape key event.\n * @param menuId -Number.\n * @param isDrawerOpen -Boolean.\n * @returns Void.\n */\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n const { drawerKeyValue } = this.state;\n const newPair = { [menuId!]: !isDrawerOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props.navProps;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n {linkText}\n \n );\n }\n return null;\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Span } = this.props.navProps;\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n const isCategoryImageDisplay =\n !this.state.isOnlyMobile &&\n showCategoryImage &&\n this.state.categoryImage !== null &&\n this.state.categoryImage !== undefined &&\n !isSubmenu;\n const isPromotionalContentDisplay =\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n const divContainerClass =\n this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = NavMenuConstants.one;\n const menuLevelSupportClassName =\n isCategoryImageDisplay &&\n this.props.navProps.config.menuLevelSupport &&\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\n 'navmenu-multi-level';\n\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n return (\n \n \n {menuOptions}\n \n
\n {isCategoryImageDisplay &&\n ArrayExtensions.hasElements(categoryImages) &&\n categoryImages.map(item => (\n \n {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n {isPromotionalContentDisplay &&\n this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n \n ))}\n
\n \n );\n }\n\n /**\n * Handle Category image update.\n * @param categoryImageSource - Image source.\n * @param option - Menu Item data.\n * @returns Returns empty.\n */\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n const linkText = option.linkText ? option.linkText : '';\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n for (const item of option.promotionalContent) {\n const imageSource = item.image.src;\n promotionalImage.push({\n src: imageSource,\n altText: item.text,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n }\n }\n this.setState({\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n });\n };\n\n /**\n * Handle dropdown toggle.\n * @param data - Menu Item data.\n * @param parentId - Number.\n * @returns Returns empty.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.state.isOnlyMobile) {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n if (this.props.navProps.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuRootDisabled.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n };\n\n /**\n * Handle back navigation for menu items for mobile view.\n * @returns Returns empty.\n */\n private readonly _handleGoBack = () => () => {\n NavigationMenuRootDisabled.isBackTrack = true;\n this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\n };\n\n /**\n * Function to close the nav menu on click on body.\n * @param event - MouseEvent.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Mobile view label text.\n * @param optionLinkText -Sub menu item link text.\n * @returns Boolean.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n const firstIndex: number = 0;\n if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n /**\n * Function to handle nav menu close.\n */\n private readonly _closeNavMenu = (): void => {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n (this.menuNode.current?.children[0] as HTMLElement).focus();\n };\n\n /**\n * Function to close the nav menu on esc key.\n * @param event - Event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n (this.menuNode.current?.children[0] as HTMLElement).focus();\n }\n };\n\n /**\n * Custom update viewport.\n */\n private readonly _customUpdateViewport = (): void => {\n this.setState({ isOnlyMobile: this.isOnlyMobile });\n };\n}\n\nexport default NavigationMenuRootDisabled;\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 { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n addThrottledEvent,\n Button,\n Collapse,\n Drawer,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IPayLoad,\n isMobile,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootEnabled component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuRootEnabled extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private readonly supportedLevel: number = NavMenuConstants.four;\n\n private currentLevel: number = NavMenuConstants.zero;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n private menuItemData: IMenuItemData[] = [];\n\n private readonly payLoad: IPayLoad;\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n private customResizeThrottledEventHandler?: (event: Event) => void;\n\n public constructor(props: INavigationMenuViewRootProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n const { menuItemData } = this.props.navProps;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\n const imageSource = item.image.src;\n this.promotionalImage.push({\n src: imageSource,\n altText: item.text,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n return null;\n });\n }\n }\n this.state = {\n activeMenu: NavMenuConstants.rootMenu,\n mobileViewLabelText: '',\n parentMenu: undefined,\n drawerKeyValue: {},\n isOnlyMobile: this.isOnlyMobile,\n categoryImage: this.promotionalImage,\n isNavOpen: false\n };\n\n this.telemetryContent = getTelemetryObject(\n this.props.navProps.context.request.telemetryPageName!,\n this.props.navProps.friendlyName,\n this.props.navProps.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n }\n\n @computed public get isOnlyMobile(): boolean {\n return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\n }\n\n public componentDidMount(): void {\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n this._customUpdateViewport();\n document.body.addEventListener('mousedown', this._handleClickOutside);\n this._addShopAllLink();\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n }\n\n public render(): JSX.Element | null {\n this.currentLevel = NavMenuConstants.one;\n const navbarKey = 'header-nav-mobile';\n return (\n \n {this.state.isOnlyMobile ? (\n this._renderMobileMenu()\n ) : (\n <>\n \n {this._renderCollapseMenu()}\n \n )}\n \n );\n }\n\n /**\n * Function to handle nav bar toggle.\n */\n private readonly _toggleNavBar = (): void => {\n this.setState(previousState => ({\n activeMenu: NavMenuConstants.rootMenu,\n isNavOpen: !previousState.isNavOpen\n }));\n };\n\n private _renderCollapseMenu(): JSX.Element | null {\n return (\n \n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n \n );\n }\n\n private _renderMobileMenu(): JSX.Element {\n const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n this.currentLevel = NavMenuConstants.one;\n return (\n \n \n {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\n \n \n {this.state.mobileViewLabelText}\n \n )}\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDesktopMenu(): JSX.Element {\n const { Navigation } = this.props.navProps;\n return (\n \n \n {this._renderDisplay()}\n
\n
\n
\n
\n );\n }\n\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n return this._renderLinkMenuItem(item);\n } else if (!item.linkURL) {\n return this._renderSpanMenuItem(item);\n }\n return null;\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem } = this.props.navProps;\n let menuItemData: IMenuItemData[] = [];\n if (this.state.isOnlyMobile) {\n menuItemData = this.menuItemData;\n } else {\n menuItemData = this.props.navProps.menuItemData;\n }\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n let cmsMenuData: IMenuItemData[] | undefined = [];\n let retailMenuItemData: IMenuItemData[] | undefined = [];\n const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\n\n for (const item of retailMenuData) {\n retailMenuItemData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n item.subMenu = retailMenuItemData;\n }\n\n for (const item of menuItemData) {\n cmsMenuData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail);\n }\n\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n let menuItem: IMenuItemData | null = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n if (!NavigationMenuRootEnabled.isBackTrack) {\n this.setState({\n parentMenu: undefined\n });\n } else {\n this.setState({\n parentMenu: undefined,\n mobileViewLabelText: menuItemDatum.linkText\n });\n }\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum);\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n if (menuItem) {\n menuItemList.push(\n \n {` `}\n {this._createMenuItemList(menuItem)} {` `}\n \n );\n }\n } else {\n for (const [index, item] of retailMenuData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n
\n );\n }\n\n for (const [index, item] of cmsMenuData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n }\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item?.subMenu;\n if (subMenus && ArrayExtensions.hasElements(subMenus)) {\n for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\n const subMenu: IMenuItemData = subMenus[Number(index)];\n let parentMenuId = item?.id;\n\n if (subMenu.id === this.state.activeMenu) {\n if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\n parentMenuId = undefined;\n }\n\n if (!NavigationMenuRootEnabled.isBackTrack) {\n this.setState({ parentMenu: parentMenuId });\n } else {\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\n }\n return subMenu;\n }\n const found = this._getFromSubMenu(subMenu);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n return this._renderLinkMenuItem(menuItemData, menuItemData.id);\n } else if (!menuItemData.linkURL) {\n return this._renderSpanMenuItem(menuItemData);\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\n if (activeMenu === NavMenuConstants.rootMenu) {\n subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\n }\n\n const { ListItem } = this.props.navProps;\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\n let menuItem: JSX.Element | null;\n if (hasOptions && this.state.isOnlyMobile) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n menuItem = this.getMenuItem(option, index);\n } else {\n menuItem = null;\n }\n let subMenu;\n const isHavingSubmenu =\n hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\n\n if (hasOptions && !this.state.isOnlyMobile) {\n if (this.currentLevel >= NavMenuConstants.two) {\n subMenu = this._renderSubMenuDrawer(option);\n } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\n this.currentLevel++;\n levelClassName = `level-${this.currentLevel.toString()}`;\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n }\n }\n if (isHavingSubmenu && this.state.isOnlyMobile) {\n this.currentLevel++;\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n }\n const imagesource = option.imageSource ? option.imageSource : '';\n return (\n \n {menuItem}\n {subMenu}\n \n );\n });\n return this._renderMenu(levelClassName, menuOptions, isSubMenu);\n }\n\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n let menuItem: JSX.Element | null;\n if (this.currentLevel === NavMenuConstants.one) {\n menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\n } else {\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\n }\n return menuItem;\n }\n\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n const levelClassName = `level-${this.currentLevel.toString()}`;\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n let isDrawerOpen = false;\n if (keys[menuItem.id!]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n this.currentLevel++;\n if (this.currentLevel < multiLevelSupportedMenu) {\n return this._renderSubMenuDrawer(menuSubItem);\n }\n }\n return this._renderDrawerLink(menuSubItem);\n })}\n
\n \n );\n }\n\n /**\n * Method to handle escape key event.\n * @param menuId -Number.\n * @param isDrawerOpen -Boolean.\n * @returns Void.\n */\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n const { drawerKeyValue } = this.state;\n const newPair = { [menuId!]: !isDrawerOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props.navProps;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n {linkText}\n \n );\n }\n return null;\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Span } = this.props.navProps;\n return (\n \n {option.linkText}\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n const isCategoryImageDisplay =\n !this.state.isOnlyMobile &&\n showCategoryImage &&\n this.state.categoryImage !== null &&\n this.state.categoryImage !== undefined &&\n !isSubmenu;\n const isPromotionalContentDisplay =\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n const divContainerClass =\n this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = NavMenuConstants.one;\n const menuLevelSupportClassName =\n isCategoryImageDisplay &&\n this.props.navProps.config.menuLevelSupport &&\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\n 'navmenu-multi-level';\n\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n return (\n \n \n {menuOptions}\n \n
\n {isCategoryImageDisplay &&\n ArrayExtensions.hasElements(categoryImages) &&\n categoryImages.map(item => (\n \n {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n {isPromotionalContentDisplay &&\n this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n \n ))}\n
\n \n );\n }\n\n /**\n * Handle Category image update.\n * @param categoryImageSource - Image source.\n * @param option - Menu Item data.\n * @returns Returns empty.\n */\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n const linkText = option.linkText ? option.linkText : '';\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n for (const item of option.promotionalContent) {\n const imageSource = item.image.src;\n promotionalImage.push({\n src: imageSource,\n altText: item.text,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n }\n }\n this.setState({\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n });\n };\n\n /**\n * Handle dropdown toggle.\n * @param data - Menu Item data.\n * @param parentId - Number.\n * @returns Returns empty.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.state.isOnlyMobile) {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n if (this.props.navProps.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuRootEnabled.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n };\n\n /**\n * Handle back navigation for menu items for mobile view.\n * @returns Returns empty.\n */\n private readonly _handleGoBack = () => () => {\n NavigationMenuRootEnabled.isBackTrack = true;\n this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\n };\n\n /**\n * Function to close the nav menu on click on body.\n * @param event - MouseEvent.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n }\n };\n\n /**\n * Add shop all link for Mobile submenu.\n */\n private readonly _addShopAllLink = (): void => {\n const { menuItemData } = this.props.navProps;\n this.menuItemData = menuItemData;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n this.menuItemData[0].subMenu?.map(item => {\n const shopAllObject = {};\n Object.assign(shopAllObject, { imageSource: item.imageSource });\n Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\n Object.assign(shopAllObject, { linkURL: item.linkURL });\n if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\n item.subMenu.unshift(shopAllObject);\n }\n return item;\n });\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Mobile view label text.\n * @param optionLinkText -Sub menu item link text.\n * @returns Boolean.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n const firstIndex: number = 0;\n if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n /**\n * Function to handle nav menu close.\n */\n private readonly _closeNavMenu = (): void => {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Function to close the nav menu on esc key.\n * @param event - Event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Custom update viewport.\n */\n private readonly _customUpdateViewport = (): void => {\n this.setState({ isOnlyMobile: this.isOnlyMobile });\n };\n}\n\nexport default NavigationMenuRootEnabled;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\n\n/**\n * Render the Navigation menu.\n * @param props - The navigation menu view props.\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\n */\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\n if (props.config.enabletopMenu) {\n return ;\n }\n\n return ;\n};\n\nexport default navigationMenuView;\n"],"names":["module","exports","React","ReactDOM","_ref","children","condition","Otherwise","undefined","NavigationMenu","constructor","props","super","isRetail","isCMS","_setNavigationSource","sourceType","this","_updateViewport","bind","viewport","context","request","device","Type","config","navigationMenuSource","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","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","_NavigationMenu$getFr","_NavigationMenu$getFr2","ArrayExtensions","hasElements","Images","Uri","RSItemIdInit","getFriendlyName","NameTranslations","Url","_getNestedChildren","promotionalContent","menuSource","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","MenuTypeIndexId","__decorate","observable","computed","NavigationMenuView","currentLevel","_updateCategoryImage","categoryImageSrc","option","promotionalImage","altText","imageSrc","promotionalItemImageSettings","text","additionalProperties","categoryImage","categoryImageAltText","_handleDropdownToggle","parentId","isBackTrack","activeMenu","mobileViewLabelText","parentMenu","_handleGoBack","_handleClickOutside","event","menuNode","current","contains","target","_handleFocusOutside","relatedTarget","_closeSubmenu","_shouldAddFocusMenuRef","optionLinkText","_getCategoryImage","defaultImageSettings","_categoryImage$imageS","generateImageUrl","actionContext","requestContext","apiSettings","Image","Object","assign","categoryImageSettings","loadFailureBehavior","menuItemRef","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","payLoad","getPayloadObject","document","body","addEventListener","componentDidUpdate","_this$menuItemRef$cur","focus","Module","Node","ref","tabIndex","_renderDisplay","menuItem","menuItemDatum","_getFromSubMenu","key","_createMenuItemList","forEach","i","found","_renderSubMenu","_renderButtonMenuItem","_renderLinkMenuItem","_renderSpanMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","hasOptions","haveSubmenu","Math","round","toString","_renderMenu","onFocus","hoverEffect","isParent","imagesource","contentAction","etext","attributes","getTelemetryAttributes","onMouseOver","href","onTelemetryClick","_renderPromotionalLink","level","currentItem","submenu","categoryImageDisplay","promotionalContentDisplay","DivContainerClass","_item$additionalPrope","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","__bindings__","viewDictionary","cn","NavMenuConstants","getCategoryImage","alttext","categoryImageUrl","navProps","_props$navProps$confi","imageData","Msdyn365","Each","Render","items","toArray","NavigationMenuRootDisabled","supportedLevel","four","zero","escapeKey","_toggleNavBar","previousState","isNavOpen","_bindDesktopCategoryClick","menuId","isDrawerOpen","drawerKeyValue","newPair","categoryImageSource","isOnlyMobile","_closeNavMenu","_this$menuNode$curren","_escFunction","_this$menuNode$curren2","keyCode","_customUpdateViewport","variant","VariantType","Browser","customResizeThrottledEventHandler","enableGenderNav","gendersSpecificNavigation","_renderMobileMenu","title","hamburgerAriaLabel","Show","GenderSpecificNavigationRender","properties","telementryAttributes","telementryClick","_renderCollapseMenu","Collapse","isOpen","_renderDesktopMenu","_renderDrawerLink","StringExtensions","isNullOrWhitespace","entries","parentMenuId","menu","one","Number","shouldRenderSubMenu","enablePromotionalItems","subMenuPromotialMenuItems","subMenuData","SortMenuItems","subMenuArray","isSubMenu","_this$props$navProps$","_this$props$navProps$2","shouldRenderSubMenus","rootMenu","subMenuItem","isEnableMultiSupportMenu","three","menuPromotionOptions","GetPromotionalItems","getMenuItem","GetNonPromotionalItems","isHavingSubmenu","two","_renderSubMenuDrawer","_renderLinkMenuItemLevelOne","_this$props$navProps$3","toggleButtonText","buttonText","keys","colProps","timeout","Drawer","collapseProps","openGlyph","closeGlyph","glyphPlacement","onToggle","menuSubItem","customClasses","isHoverEffect","isSubmenu","_this$state$categoryI","isCategoryImageDisplay","isPromotionalContentDisplay","divContainerClass","menuLevelSupportClassName","categoryImages","imagesContainerKey","join","_item$src","customSortedArray","unsortedArray","sortedArray","sort","first","second","indexOfFirstItem","findIndex","customSortItem","indexOfSecondItem","firstElementIsSpecialSorted","secondElementIsSepcialSorted","IsPromotionalItem","promotionalItems","some","promotionalItem","MSLinkObj","NavigationMenuRootEnabled","_addShopAllLink","_this$menuItemData$0$","shopAllObject","unshift","cmsMenuData","retailMenuItemData","retailMenuData","JSON","parse","stringify"],"sourceRoot":""}