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Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.tsx?2bef","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.data.ts?9815","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.view.tsx?c594","webpack://Msdyn365.Commerce.Online/./lib/navigation-menu/module-registration.js?7039","webpack://Msdyn365.Commerce.Online/./src/themes/bremworth-fabrikam/views/navigation-menu.view.tsx?3c5e","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/navigation-menu.view.tsx?bc23","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-utilities.tsx?d092","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-root-disabled.tsx?1d68","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/navigation-menu-root-enabled.tsx?d5b3","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/navigation-menu.view.tsx?5304"],"sourcesContent":["module.exports = React;","module.exports = ReactDOM;","/*!\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|bremworth-fabrikam|views|navigation-menu'] = {\n c: () => require('partner/themes/bremworth-fabrikam/views/navigation-menu.view.tsx'),\n cn: '__local__-__local__-navigation-menu'\n };\nviewDictionary['@msdyn365-commerce-modules|fabrikam-design-kit|modules|fabrikam|views|navigation-menu'] = {\n c: () => require('@msdyn365-commerce-modules/fabrikam-design-kit/dist/lib/modules/fabrikam/views/navigation-menu.view.js'),\n cn: '@msdyn365-commerce-modules-fabrikam-design-kit-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\n/* eslint-disable no-duplicate-imports */\r\nimport MsDyn365, { IDictionary, IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n ICollapseProps,\r\n IDrawerState,\r\n IPayLoad,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\ninterface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: IImageData[] | null;\r\n categoryImageAltText: string;\r\n drawerKeyValue: IDictionary;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenuView component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuView extends React.PureComponent {\r\n private currentLevel: number = 0;\r\n\r\n private readonly _positionInSetOffset: number = 1;\r\n\r\n private readonly escapeKey: number = 27;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: INavigationMenuViewProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.state = { activeMenu: undefined, parentMenu: undefined, categoryImageAltText: '', drawerKeyValue: {} };\r\n this._closeSubmenu = this._closeSubmenu.bind(this);\r\n this._escFunction = this._escFunction.bind(this);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.body.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n document.body.addEventListener('focusout', this._handleFocusOutside);\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n document.removeEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { isMobileView } = this.props;\r\n\r\n this.currentLevel = 1;\r\n return <>{isMobileView ? this._renderMobileMenu() : this._renderDesktopMenu()};\r\n }\r\n\r\n /**\r\n * Method to render mobile menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderMobileMenu(): JSX.Element {\r\n const { isMobileView, menuItemData, Navigation } = this.props;\r\n return (\r\n \r\n {menuItemData.map((menuItem: IMenuItemData, posinset: number) => {\r\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\r\n })}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render desktop menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { MenuList, Navigation } = this.props;\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 * Method to render drawer menu.\r\n * @param menuItem -Menuitem data.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawerMenu(menuItem: IMenuItemData, setSize: number, posinset: number): JSX.Element | null {\r\n if (menuItem && menuItem.subMenu && ArrayExtensions.hasElements(menuItem.subMenu)) {\r\n return this._renderDrawer(menuItem, setSize, posinset);\r\n }\r\n return this._renderLinkMenuItem(menuItem, undefined, true, false, setSize, posinset);\r\n }\r\n\r\n /**\r\n * Method to render drawer component.\r\n * @param menuItem -Menuitem data.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawer(menuItem: IMenuItemData, setSize?: number, posinset?: number): JSX.Element | null {\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 !== undefined ? keyValue : {};\r\n const { isMobileView } = this.props;\r\n\r\n let isDrawerOpen = false;\r\n if (keys[buttonText]) {\r\n isDrawerOpen = true;\r\n }\r\n const colProps: ICollapseProps = { isOpen: isDrawerOpen };\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData, currentPos: number) => {\r\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\r\n return this._renderDrawer(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\r\n }\r\n return this._renderDrawerLink(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render link.\r\n * @param linkText -Text on Menu link.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderLinkText(linkText: string | undefined, setSize: number | undefined, posinset: number | undefined): JSX.Element {\r\n return (\r\n \r\n {linkText}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render drawer link.\r\n * @param item -Single Menuitem.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderDrawerLink(item: IMenuItemData, setSize: number | undefined, posinset: number): JSX.Element | null {\r\n if (item && item.linkText && item.linkURL && item.linkURL.length > 0) {\r\n return this._renderLinkMenuItem(item, undefined, true, false, setSize, posinset);\r\n } else if (item && item.linkText && !item.linkURL) {\r\n return this._renderSpanMenuItem(item);\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Method to generate menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem, menuItemData, isMobileView } = this.props;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\r\n let menuItem: IMenuItemData = {};\r\n for (const menuItemDatum of menuItemData) {\r\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n this.setState({ parentMenu: undefined });\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n 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 menuItemData.forEach((item: IMenuItemData, index: number) => {\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 /**\r\n * Method to get data for submenu.\r\n * @param item -Single Menuitem.\r\n * @returns IMenuItemData.\r\n */\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item && item.subMenu;\r\n if (subMenus && subMenus.length > 0) {\r\n for (let i = 0; i <= subMenus.length - 1; i++) {\r\n if (subMenus[i].id === this.state.activeMenu) {\r\n this.setState({ parentMenu: item?.id });\r\n return subMenus[i];\r\n }\r\n const found = this._getFromSubMenu(subMenus[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n /**\r\n * Method to create item list.\r\n * @param menuItemData -Single Menuitem.\r\n * @returns Jsx element.\r\n */\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\r\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\r\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id);\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 && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\r\n return this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true);\r\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\r\n return this._renderSpanMenuItem(menuItemData, menuItemData.id, true);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\r\n const { isMobileView, ListItem } = this.props;\r\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\r\n const subMenuLevel = 3;\r\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || subMenuLevel;\r\n\r\n // Const isParentMenu:boolean= false;\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || subMenus.length === 0) {\r\n this.props.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 =\r\n subMenus &&\r\n subMenus.map((option: IMenuItemData, idx: number) => {\r\n const hasOptions = option.subMenu && option.subMenu.length > 0;\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && isMobileView) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\r\n } else {\r\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\r\n }\r\n let subMenu;\r\n const haveSubmenu = hasOptions && enableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1;\r\n if (haveSubmenu) {\r\n this.currentLevel++;\r\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\r\n }\r\n return (\r\n \r\n {menuItem}\r\n {subMenu}\r\n \r\n );\r\n });\r\n return this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu);\r\n }\r\n\r\n /**\r\n * Method to render button menu item.\r\n * @param option -Single Menuitem.\r\n * @param activeMenu -Active menu number.\r\n * @param index -Active menu index.\r\n * @returns Jsx element.\r\n */\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n const { Button } = this.props;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render link menu item.\r\n * @param option -Single Menuitem.\r\n * @param index -Active menu index.\r\n * @param hoverEffect -Active menu effect.\r\n * @param isParent -Is parent menu.\r\n * @param setSize -Setsize data.\r\n * @param posinset -Current position.\r\n * @returns Jsx element.\r\n */\r\n private _renderLinkMenuItem(\r\n option: IMenuItemData,\r\n index?: number,\r\n hoverEffect: boolean = true,\r\n isParent: boolean = false,\r\n setSize?: number,\r\n posinset?: number\r\n ): JSX.Element | null {\r\n const { Link, isMobileView } = this.props;\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\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render promotional link.\r\n * @param linkText -Link text.\r\n * @param linkUrl -Link url.\r\n * @returns Jsx element.\r\n */\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props;\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 /**\r\n * Method to render span menu item.\r\n * @param option -Single Menu Item.\r\n * @param index -Index.\r\n * @param isParent -Is parent menu.\r\n * @returns Jsx element.\r\n */\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\r\n const { Span } = this.props;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Method to render menu.\r\n * @param level -Menu level.\r\n * @param menuOptions -Menu lists.\r\n * @param currentItem -Menu current.\r\n * @param submenu -Mneu has submenu or not.\r\n * @returns Jsx element.\r\n */\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\r\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, isMobileView, showPromotionalContent } = this.props;\r\n const categoryImageDisplay =\r\n !isMobileView && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !submenu;\r\n const promotionalContentDisplay =\r\n !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\r\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = 1;\r\n return (\r\n \r\n 2 &&\r\n 'navmenu-multi-level'\r\n )}\r\n >\r\n {menuOptions}\r\n \r\n
\r\n {categoryImageDisplay &&\r\n this.state.categoryImage &&\r\n this.state.categoryImage.map(item => (\r\n \r\n {this.state.categoryImage && this._getCategoryImage(item)}\r\n {promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n \r\n ))}\r\n
\r\n \r\n );\r\n }\r\n\r\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\r\n const linkText = option && option.linkText ? option.linkText : '';\r\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n option.promotionalContent.map(item => {\r\n if (item && item.image) {\r\n const imageSrc = item.image.src;\r\n const promotionalItemImageSettings = item.image.imageSettings;\r\n promotionalImage.push({\r\n src: imageSrc,\r\n altText: item.text,\r\n imageSettings: promotionalItemImageSettings,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n }\r\n });\r\n }\r\n this.setState({\r\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\r\n categoryImageAltText: linkText\r\n });\r\n };\r\n\r\n /**\r\n * Method to handle dropdwon change.\r\n * @param data -Menuitem data.\r\n * @param parentId -Menu parent.\r\n * @returns Jsx element.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.props.isMobileView) {\r\n this.setState({\r\n activeMenu: this.state.activeMenu && this.state.activeMenu === data.id! ? undefined : data.id!,\r\n parentMenu: parentId\r\n });\r\n if (this.props.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n }\r\n\r\n this._resetFocus();\r\n };\r\n\r\n /**\r\n * Method to call when focus lost from menu.\r\n */\r\n private readonly _resetFocus = () => {\r\n if (this.props.isMobileView) {\r\n setTimeout(() => {\r\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\r\n }, 0);\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\r\n this.setState({\r\n activeMenu: undefined,\r\n categoryImage: null\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle click outside of menu.\r\n * @param event -HTML event.\r\n */\r\n private readonly _handleFocusOutside = (event: FocusEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\r\n this._closeSubmenu();\r\n }\r\n };\r\n\r\n /**\r\n * Method to handle close submenu event.\r\n */\r\n private _closeSubmenu(): void {\r\n if (!this.props.isMobileView) {\r\n this.setState({ activeMenu: undefined });\r\n }\r\n }\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param event -HTML event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey) {\r\n if (!this.props.isMobileView) {\r\n const navDrawerList = Array.from(this.menuNode.current!.childNodes);\r\n for (const item of navDrawerList) {\r\n const navDrawerButton = item.firstChild as HTMLButtonElement;\r\n if (navDrawerButton.getAttribute('aria-expanded') === 'true') {\r\n navDrawerButton.focus();\r\n }\r\n }\r\n }\r\n this._closeSubmenu();\r\n }\r\n };\r\n\r\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\r\n if (!categoryImage || !categoryImage.src) {\r\n return null;\r\n }\r\n\r\n const categoryImageUrl = generateImageUrl(categoryImage.src, this.props.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if (categoryImageUrl !== undefined) {\r\n const ImageData: IImageData = { src: categoryImageUrl };\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Method to handle escape key event.\r\n * @param drawerState -HTML event.\r\n */\r\n private readonly _onDrawerChange = (drawerState: IDrawerState) => {\r\n const { drawerKeyValue } = this.state;\r\n const drawerText: string = drawerState.buttonText !== undefined ? drawerState.buttonText : '';\r\n const newPair = { [drawerText]: drawerState.isOpen };\r\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\r\n };\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 MsDyn365, { IDictionary, IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { IMenuItemData, INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Drawer,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IDrawerState,\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\ninterface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: IImageData[] | null;\n categoryImageAltText: string;\n drawerKeyValue: IDictionary;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuView extends React.PureComponent {\n private currentLevel: number = 0;\n\n private readonly _positionInSetOffset: number = 1;\n\n private readonly escapeKey: number = 27;\n\n private readonly menuNode: 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.state = { activeMenu: undefined, parentMenu: undefined, categoryImageAltText: '', drawerKeyValue: {} };\n this._closeSubmenu = this._closeSubmenu.bind(this);\n this._escFunction = this._escFunction.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('keydown', (this._escFunction as unknown) as EventListener, false);\n document.body.addEventListener('mousedown', this._handleClickOutside);\n document.body.addEventListener('focusout', this._handleFocusOutside);\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\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 } = this.props;\n\n this.currentLevel = 1;\n return <>{isMobileView ? this._renderMobileMenu() : this._renderDesktopMenu()};\n }\n\n /**\n * Method to render mobile menu.\n * @returns Jsx element.\n */\n private _renderMobileMenu(): JSX.Element {\n const { isMobileView, menuItemData, Navigation } = this.props;\n return (\n \n {menuItemData.map((menuItem: IMenuItemData, posinset: number) => {\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\n })}\n \n );\n }\n\n /**\n * Method to render desktop menu.\n * @returns Jsx element.\n */\n private _renderDesktopMenu(): JSX.Element {\n const { MenuList, Navigation } = this.props;\n return (\n \n \n {this._renderDisplay()}\n \n \n );\n }\n\n /**\n * Method to render drawer menu.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerMenu(menuItem: IMenuItemData, setSize: number, posinset: number): JSX.Element | null {\n if (menuItem && menuItem.subMenu && ArrayExtensions.hasElements(menuItem.subMenu)) {\n return this._renderDrawer(menuItem, setSize, posinset);\n }\n return this._renderLinkMenuItem(menuItem, undefined, true, false, setSize, posinset);\n }\n\n /**\n * Method to render drawer component.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawer(menuItem: IMenuItemData, setSize?: number, posinset?: number): JSX.Element | null {\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue !== undefined ? keyValue : {};\n const { isMobileView } = this.props;\n\n let isDrawerOpen = false;\n if (keys[buttonText]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { isOpen: isDrawerOpen };\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData, currentPos: number) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n return this._renderDrawer(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\n }\n return this._renderDrawerLink(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\n })}\n
\n \n );\n }\n\n /**\n * Method to render link.\n * @param linkText -Text on Menu link.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkText(linkText: string | undefined, setSize: number | undefined, posinset: number | undefined): JSX.Element {\n return (\n \n {linkText}\n \n );\n }\n\n /**\n * Method to render drawer link.\n * @param item -Single Menuitem.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerLink(item: IMenuItemData, setSize: number | undefined, posinset: number): JSX.Element | null {\n if (item && item.linkText && item.linkURL && item.linkURL.length > 0) {\n return this._renderLinkMenuItem(item, undefined, true, false, setSize, posinset);\n } else if (item && item.linkText && !item.linkURL) {\n return this._renderSpanMenuItem(item);\n }\n return null;\n }\n\n /**\n * Method to generate menu.\n * @returns Jsx element.\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 this.setState({ parentMenu: undefined });\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 );\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 /**\n * Method to get data for submenu.\n * @param item -Single Menuitem.\n * @returns IMenuItemData.\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 this.setState({ parentMenu: item?.id });\n return subMenus[i];\n }\n const found = this._getFromSubMenu(subMenus[i]);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n /**\n * Method to create item list.\n * @param menuItemData -Single Menuitem.\n * @returns Jsx element.\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);\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\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\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 subMenuLevel = 3;\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || subMenuLevel;\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 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 /**\n * Method to render button menu item.\n * @param option -Single Menuitem.\n * @param activeMenu -Active menu number.\n * @param index -Active menu index.\n * @returns Jsx element.\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 /**\n * Method to render link menu item.\n * @param option -Single Menuitem.\n * @param index -Active menu index.\n * @param hoverEffect -Active menu effect.\n * @param isParent -Is parent menu.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkMenuItem(\n option: IMenuItemData,\n index?: number,\n hoverEffect: boolean = true,\n isParent: boolean = false,\n setSize?: number,\n posinset?: number\n ): JSX.Element | null {\n const { Link, isMobileView } = 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 /**\n * Method to render promotional link.\n * @param linkText -Link text.\n * @param linkUrl -Link url.\n * @returns Jsx element.\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 /**\n * Method to render span menu item.\n * @param option -Single Menu Item.\n * @param index -Index.\n * @param isParent -Is parent menu.\n * @returns Jsx element.\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 /**\n * Method to render menu.\n * @param level -Menu level.\n * @param menuOptions -Menu lists.\n * @param currentItem -Menu current.\n * @param submenu -Mneu has submenu or not.\n * @returns Jsx element.\n */\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, isMobileView, showPromotionalContent } = this.props;\n const categoryImageDisplay =\n !isMobileView && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !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
\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\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 /**\n * Method to handle dropdwon change.\n * @param data -Menuitem data.\n * @param parentId -Menu parent.\n * @returns Jsx element.\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 this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n }\n\n this._resetFocus();\n };\n\n /**\n * Method to call when focus lost from menu.\n */\n private readonly _resetFocus = () => {\n if (this.props.isMobileView) {\n setTimeout(() => {\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\n }, 0);\n }\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 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 * Method to handle close submenu event.\n */\n private _closeSubmenu(): void {\n if (!this.props.isMobileView) {\n this.setState({ activeMenu: undefined });\n }\n }\n\n /**\n * Method to handle escape key event.\n * @param event -HTML event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey) {\n if (!this.props.isMobileView) {\n const navDrawerList = Array.from(this.menuNode.current!.childNodes);\n for (const item of navDrawerList) {\n const navDrawerButton = item.firstChild as HTMLButtonElement;\n if (navDrawerButton.getAttribute('aria-expanded') === 'true') {\n navDrawerButton.focus();\n }\n }\n }\n this._closeSubmenu();\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 const ImageData: IImageData = { src: categoryImageUrl };\n return (\n \n );\n }\n return null;\n };\n\n /**\n * Method to handle escape key event.\n * @param drawerState -HTML event.\n */\n private readonly _onDrawerChange = (drawerState: IDrawerState) => {\n const { drawerKeyValue } = this.state;\n const drawerText: string = drawerState.buttonText !== undefined ? drawerState.buttonText : '';\n const newPair = { [drawerText]: drawerState.isOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n}\n\nexport default NavigationMenuView;\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","NavigationMenu","constructor","props","super","isRetail","isCMS","_setNavigationSource","sourceType","this","_updateViewport","bind","viewport","context","request","device","Type","config","navigationMenuSource","state","isMobile","menuItemList","static","locale","nameTranslations","nameTranslation","length","find","item","Language","toLowerCase","Text","componentDidMount","MsDyn365","isBrowser","resizeThrottledEventHandler","addThrottledEvent","window","componentWillUnmount","removeEventListener","render","_this$props$config$di","_this$props$config$di2","_mapData","isEmptyOrNullObject","data","telemetry","error","viewProps","_objectSpread","imageSettings","viewports","xs","q","w","h","xl","lazyload","gridSettings","Navigation","moduleProps","className","classnames","tag","role","MenuList","ListItem","showCategoryImage","displayCategoryImage","showPromotionalContent","displayPromotionalImage","Link","DivContainer","ImageDivContainer","Button","onClick","ImageContainer","Span","MobileDescriptionContainer","MobileBackButton","resources","backButtonAriaLabel","MobileDescriptionLabel","isMobileView","menuItemData","renderView","mergedData","categories","result","map","index","push","_constructMenuItemData","undefined","cmsNavItems","idx","_constructTopMenuItemData","_this$props$config$en","_this$props$config$ro","enabletopMenu","mergedRootMenuData","topMenu","id","linkText","rootMenuNavigation","linkURL","imageSource","subMenu","retailItem","cmsItem","addedAllMenu","categoryPromotionalContent","cmsItemText","menuAriaLabel","promotionalData","filter","promoItem","_promoItem$categoryNa","_retailItem$Name","categoryName","Name","_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","_ref","_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","children","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","_positionInSetOffset","escapeKey","_resetFocus","setTimeout","_escFunction","keyCode","navDrawerList","Array","from","childNodes","navDrawerButton","firstChild","getAttribute","categoryImageUrl","ImageData","_onDrawerChange","drawerState","drawerKeyValue","newPair","buttonText","isOpen","_renderMobileMenu","_renderDesktopMenu","posinset","_renderDrawerMenu","setSize","_renderDrawer","toggleButtonText","keyValue","keys","isDrawerOpen","colProps","Drawer","toggleButtonProps","openGlyph","onToggle","collapseProps","closeGlyph","glyphPlacement","_renderLinkText","menuSubItem","currentPos","_menuItem$subMenu2","_menuItem$subMenu","_renderDrawerLink","NavMenuConstants","getCategoryImage","alttext","navProps","_props$navProps$confi","imageData","Msdyn365","NavigationMenuRootDisabled","supportedLevel","four","zero","_toggleNavBar","previousState","isNavOpen","_bindDesktopCategoryClick","menuId","categoryImageSource","isOnlyMobile","_closeNavMenu","_this$menuNode$curren","_this$menuNode$curren2","_customUpdateViewport","variant","VariantType","Browser","customResizeThrottledEventHandler","title","hamburgerAriaLabel","_renderCollapseMenu","Collapse","StringExtensions","isNullOrWhitespace","entries","parentMenuId","menu","one","Number","subMenuArray","isSubMenu","_this$props$navProps$","_this$props$navProps$2","rootMenu","subMenuItem","isEnableMultiSupportMenu","three","getMenuItem","isHavingSubmenu","two","_renderSubMenuDrawer","_renderLinkMenuItemLevelOne","_this$props$navProps$3","timeout","isHoverEffect","isSubmenu","_this$state$categoryI","isCategoryImageDisplay","isPromotionalContentDisplay","divContainerClass","menuLevelSupportClassName","categoryImages","imagesContainerKey","join","_item$src","NavigationMenuRootEnabled","_addShopAllLink","_this$menuItemData$0$","shopAllObject","unshift","cmsMenuData","retailMenuItemData","retailMenuData","JSON","parse","stringify"],"sourceRoot":""}