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2BIC,CAAkBhrB,IARvBF,EAAAA,cAAAA,EAAAA,SAAA,KACK8pB,EACAC,GASJ,oHCjGV,IAAKve,EASA5B,2BATZ,SAAY4B,GACRA,EAAAA,EAAA,eACAA,EAAAA,EAAA,oBACH,CAHD,CAAYA,IAAAA,EAAe,KAS3B,SAAY5B,GACRA,EAAA,UACAA,EAAA,eACH,CAHD,CAAYA,IAAAA,EAAU,iDCrCR,SAAUsb,EAA0BiG,EAAiBC,EAAmBrd,GAIlF,IAAIiI,GAAMqV,EAAAA,EAAAA,IADe,QACctd,GAOvC,OANIiI,IACAA,GAAO,GACHA,EAAIxB,QAAQ,MAAQ,EAAI,IAAM,cACK2W,eAAiDC,KAGrFpV,GAAO,EAClB","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/tab-item/tab-item.tsx?b1b8","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.tsx?2bef","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.view.tsx?c594","webpack://Msdyn365.Commerce.Online/./src/modules/tab/tab.view.tsx?a99d","webpack://Msdyn365.Commerce.Online/./src/modules/tab/tab.tsx?9ac6","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/components/links.tsx?c969","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/tile-list-item.tsx?114a","webpack://Msdyn365.Commerce.Online/./src/modules/cart-line-comment/cart-line-comment.tsx?05fd","webpack://Msdyn365.Commerce.Online/./src/modules/cart-line-comment/cart-line-comment.view.tsx?d930","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-utilities.tsx?091e","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-root-disabled.tsx?1d9a","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/navigation-menu-root-enabled.tsx?c6ea","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/navigation-menu.view.tsx?fbed","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.categorysuggest.tsx?1d05","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.mobile.empty.tsx?3ee2","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.form.tsx?31cb","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.keywordsuggest.tsx?3ae1","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.productsuggest.tsx?f921","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/components/search.arisuggest.tsx?64e5","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/search.view.tsx?175e","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-utilities.tsx?fc24","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-root-disabled.tsx?6af5","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/navigation-menu-root-enabled.tsx?2139","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/navigation-menu.view.tsx?15d9","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/search.mobile.empty.tsx?f1ef","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/search.form.tsx?77b5","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/search.view.tsx?9ead","webpack://Msdyn365.Commerce.Online/./src/modules/tab-item/tab-item.view.tsx?ee3b","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/tile-list-item.view.tsx?19a8","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","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/write-review.view.tsx?c67c","webpack://Msdyn365.Commerce.Online/./src/modules/navigation-menu/navigation-menu.data.ts?9815","webpack://Msdyn365.Commerce.Online/./src/utils/getAriModelDetailUrl.ts?5e00"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ITabItemData } from './tab-item.data';\nimport { ITabItemProps } from './tab-item.props.autogenerated';\n\nexport interface ITabItemViewProps {\n TabContentContainer: IModuleProps;\n TabHeaderContainer: IModuleProps;\n tabSlots: INodeProps;\n TabItemContent: INodeProps;\n tabItemType?: TabItemType;\n tabHeader: React.ReactNode;\n}\n\nexport interface ITabItemExtentedProps extends ITabItemProps {\n tabItemType?: TabItemType;\n isSelected?: boolean;\n itemIndex?: number;\n tabId?: string;\n}\n\nexport enum TabItemType {\n TabHeader,\n TabContent\n}\n\n/**\n *\n * TabItem component.\n * @extends {React.Component}\n */\n@observer\nclass TabItem extends React.PureComponent {\n private readonly moduleContentClassName: string = 'ms-tab-item-content';\n\n private readonly moduleHeaderClassName: string = 'ms-tab-item-header';\n\n constructor(props: ITabItemProps) {\n super(props);\n this._renderTabHeader = this._renderTabHeader.bind(this);\n }\n\n public render(): JSX.Element {\n const { slots, renderView, config, data, isSelected, itemIndex } = this.props;\n const index = itemIndex || 0;\n const contentID = getContentID(index, this.props.tabId || '');\n const activeContentIDResult = data && data.activeTabState && data.activeTabState.result;\n const shown =\n activeContentIDResult &&\n activeContentIDResult.tabId === this.props.tabId &&\n activeContentIDResult.activeContentIndex !== undefined\n ? activeContentIDResult.activeContentIndex === index\n : isSelected || false;\n const viewProps = {\n ...this.props,\n TabContentContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleContentClassName, config.className)\n },\n TabHeaderContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleHeaderClassName, config.className)\n },\n TabItemContent: {\n className: 'ms-tab-item-content__content',\n tag: 'section' as NodeTag,\n 'aria-hidden': !shown,\n role: 'tabpanel',\n tabIndex: shown ? 0 : -1,\n id: contentID\n },\n tabHeader: this._renderTabHeader(),\n tabSlots: slots\n };\n return renderView(viewProps) as React.ReactElement;\n }\n\n private _renderTabHeader(): React.ReactNode {\n return <>{this.props.config.tabItemTitle};\n }\n}\n\nexport const getContentID = (index: number, id: string) => {\n return `tab-item-content-${id}-${index}`;\n};\n\nexport default TabItem;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject } from '@msdyn365-commerce/core';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, observable } from 'mobx';\nimport * as React from 'react';\n\nimport { IMenuItemData, INavigationMenuData, MenuSource, MenuTypeIndexId } from './navigation-menu.data';\nimport { ICmsNavItemsData, INavigationMenuProps, ISubMenusData, navigationMenuSource } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuViewProps extends INavigationMenuProps {\n className: string;\n menuItemData: IMenuItemData[];\n Navigation: IModuleProps;\n MenuList: INodeProps;\n ListItem: INodeProps;\n Link: INodeProps;\n Button: INodeProps;\n Span: INodeProps;\n ImageContainer: INodeProps;\n MobileDescriptionContainer: INodeProps;\n MobileBackButton: INodeProps;\n MobileDescriptionLabel: INodeProps;\n imageSettings: IImageSettings;\n gridSettings: IGridSettings;\n isMobileView: boolean;\n DivContainer?: INodeProps;\n ImageDivContainer?: INodeProps;\n showCategoryImage?: boolean;\n showPromotionalContent?: boolean;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface INavigationMenuState {\n isMobile: boolean;\n}\n\n/**\n *\n * NavigationMenu component.\n * @extends {React.PureComponent>}\n */\nclass NavigationMenu extends React.PureComponent, INavigationMenuState> {\n private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\n\n private static RSItemIdInit: number = MenuTypeIndexId.Retail;\n\n private resizeThrottledEventHandler?: (event: Event) => void;\n\n private menuItemList: IMenuItemData[];\n\n private isRetail: boolean = true;\n\n private isCMS: boolean = true;\n\n @observable\n private viewport: GridSize;\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && nameTranslations.length > 0) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation && nameTranslation.Text;\n }\n\n constructor(props: INavigationMenuProps) {\n super(props);\n this._updateViewport = this._updateViewport.bind(this);\n this.viewport =\n props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\n this.state = { isMobile: this.isMobile };\n this.menuItemList = [];\n }\n\n @computed get isMobile(): boolean {\n return this.viewport === 'xs' || this.viewport === 'sm';\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\n }\n this._updateViewport();\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\n }\n }\n\n public render(): JSX.Element | null {\n this.menuItemList = this._mapData();\n if (isEmptyOrNullObject(this.props.data)) {\n this.props.telemetry.error('Navigatiomenu returned null');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=224&h=300&m=6', w: 0, h: 0 },\n xl: { q: 'w=224&h=300&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const viewProps = {\n ...this.props,\n ...this.state,\n imageSettings: defaultImageSettings,\n gridSettings: this.props.context.request.gridSettings,\n Navigation: {\n moduleProps: this.props,\n className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\n tag: 'nav',\n role: this.isMobile ? 'listbox' : 'navigation'\n },\n MenuList: {\n className: 'ms-nav__list',\n tag: 'ul',\n role: this.isMobile ? 'listbox' : 'menu'\n },\n ListItem: {\n className: 'ms-nav__list__item',\n role: 'presentation',\n tag: 'li'\n },\n showCategoryImage: this.props.config.displayCategoryImage ?? false,\n showPromotionalContent: this.props.config.displayPromotionalImage ?? false,\n Link: {\n tag: 'a',\n className: 'ms-nav__list__item__link',\n role: this.isMobile ? 'option' : 'menuitem'\n },\n DivContainer: {\n tag: 'div',\n className: 'ms-nav__feature'\n },\n ImageDivContainer: {\n tag: 'div',\n className: 'category-image',\n role: 'tabpanel'\n },\n Button: {\n className: 'ms-nav__list__item__button',\n tag: 'button',\n role: this.isMobile ? 'option' : 'menuitem',\n onClick: this.props\n },\n ImageContainer: {\n className: 'ms-nav__list__item__image'\n },\n Span: {\n className: 'ms-nav__list__item__span',\n tag: 'span'\n },\n MobileDescriptionContainer: {\n className: 'ms-nav__list__mobile__container'\n },\n MobileBackButton: {\n className: 'ms-nav__list__mobile__container__button',\n tag: 'button',\n 'aria-label': this.props.resources.backButtonAriaLabel,\n onClick: this.props\n },\n MobileDescriptionLabel: {\n className: 'ms-nav__list__mobile__container__span',\n tag: 'span'\n },\n isMobileView: this.state.isMobile,\n menuItemData: this.menuItemList,\n className: classnames('ms-nav', this.props.config.className)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _mapData(): IMenuItemData[] {\n const { data, config } = this.props;\n const mergedData: IMenuItemData[] = [];\n if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\n data.categories.result.map((item: CategoryHierarchy, index) =>\n mergedData.push(this._constructMenuItemData(item, undefined, true, index, true))\n );\n }\n\n if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\n config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) =>\n mergedData.push(this._constructMenuItemData(undefined, item, false, idx + 1))\n );\n }\n return this._constructTopMenuItemData(mergedData);\n }\n\n private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\n const enableTopLevelMenu = this.props.config.enabletopMenu ?? false;\n if (!enableTopLevelMenu) {\n return mergedData;\n }\n const mergedRootMenuData: IMenuItemData[] = [];\n const topMenu = {\n id: 1,\n linkText: this.props.config.rootMenuNavigation ?? '...',\n linkURL: '#',\n imageSource: undefined,\n subMenu: mergedData\n } as IMenuItemData;\n mergedRootMenuData.push(topMenu);\n\n return mergedRootMenuData;\n }\n\n private _constructMenuItemData(\n retailItem?: CategoryHierarchy,\n cmsItem?: ICmsNavItemsData,\n isRetail?: boolean,\n idx?: number,\n addedAllMenu?: boolean\n ): IMenuItemData {\n const locale =\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : 'en-us';\n const { categoryPromotionalContent } = this.props.config;\n const cmsItemText = (cmsItem && cmsItem.linkText) || '';\n const { menuAriaLabel } = this.props.resources;\n\n // Filter category promotional data based on category name\n const promotionalData =\n retailItem &&\n categoryPromotionalContent?.filter(promoItem => promoItem.categoryName?.toLowerCase() === retailItem?.Name?.toLowerCase());\n\n // First check if image is available from promotional data else read from retail server\n let imageSource: string = 'empty';\n if (ArrayExtensions.hasElements(retailItem?.Images) && retailItem!.Images[0].Uri) {\n imageSource = retailItem!.Images[0].Uri;\n }\n if (isRetail) {\n return {\n id: NavigationMenu.RSItemIdInit++,\n linkText: NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? '',\n linkURL: retailItem?.Url,\n imageSource,\n subMenu: this._getNestedChildren(retailItem, imageSource, addedAllMenu),\n promotionalContent: this.props.config.displayPromotionalImage && promotionalData,\n menuSource: MenuSource.Retail,\n ariaLabel: `${NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? ''} ${menuAriaLabel}`\n } as IMenuItemData;\n }\n return {\n id: NavigationMenu.CMSItemIdInit++,\n linkText: cmsItemText,\n linkURL: (cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl) || '',\n imageDestinationURL: (cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl) || '',\n imageSource: (cmsItem && cmsItem.image && cmsItem.image.src) || '',\n subMenu: this._getCMSNestedChildren(cmsItem),\n menuSource: MenuSource.Cms,\n shouldOpenNewTab: cmsItem?.openInNewTab,\n ariaLabel: `${cmsItemText} ${menuAriaLabel}`\n } as IMenuItemData;\n }\n\n private _getNestedChildren(category?: CategoryHierarchy, imageSourceUrl?: string, addedAllMenu: boolean = false): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n if (!category || !category.Children || category.Children.length === 0) {\n return [];\n }\n if (!this.props.config.enabletopMenu && addedAllMenu) {\n nestedChildren.push({\n linkText: this.props.resources.allCategoryMenuText,\n imageSource: imageSourceUrl,\n linkURL: getCategoryUrl(category, (this.props.context as unknown) as IActionContext, {})\n });\n }\n category.Children.map((item: CategoryHierarchy, index) => {\n nestedChildren.push(this._constructMenuItemData(item, undefined, true, index, false));\n });\n return nestedChildren;\n }\n\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n\n if (!category || !category.subMenus || category.subMenus.length === 0) {\n return [];\n }\n\n category.subMenus.map((item: ISubMenusData, idx: number) => {\n nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\n });\n return nestedChildren;\n }\n\n private readonly _setNavigationSource = (sourceType?: navigationMenuSource): void => {\n switch (sourceType) {\n case navigationMenuSource.retailServerOnly:\n this.isRetail = true;\n this.isCMS = false;\n break;\n case navigationMenuSource.cmsOnly:\n this.isRetail = false;\n this.isCMS = true;\n break;\n case navigationMenuSource.all:\n this.isRetail = true;\n this.isCMS = true;\n break;\n default:\n }\n };\n\n private _updateViewport(): void {\n this.viewport = this._getViewport();\n this.setState({ isMobile: this.isMobile });\n }\n\n private _getViewport(): GridSize {\n const { context } = this.props;\n\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n }\n}\n\nexport default NavigationMenu;\n","/*!\n * Copyright (c) Microsoft Corporation.\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITabViewProps } from './tab';\n\nconst tabView: React.FC = props => {\n const { heading, TabContainer, tabHeaders, tabContents } = props;\n if (!props.heading && !props.tabHeaders && !props.tabContents) {\n props.context.telemetry.error('Tab content is empty, module wont render');\n return null;\n }\n return (\n \n {heading}\n {tabHeaders}\n {tabContents}\n \n );\n};\n\nexport default tabView;\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 { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createTabStateInput, getContentID, TabItemType } from '../..';\nimport { ITabData } from './tab.data';\nimport { ITabProps } from './tab.props.autogenerated';\n\n/**\n *\n * Tab component.\n * @extends {React.PureComponent>}\n */\n\nexport interface ICallToActionProps {\n link: INodeProps[];\n}\n\nexport interface ITabViewProps extends ITabProps<{}> {\n heading?: React.ReactNode;\n TabContainer: IModuleProps;\n headerSection: INodeProps;\n tabHeaderSection: INodeProps;\n tabsSection: INodeProps;\n tabItemContainer: INodeProps;\n tabHeaders: React.ReactNode;\n tabContents: React.ReactNode;\n}\n\nexport interface ITabViewStates {\n currentTabIndex: number;\n}\n\n/**\n *\n * Tab component.\n * @extends {React.Component>}\n */\n@observer\nclass Tab extends React.Component, ITabViewStates> {\n public readonly tabIndexQuery: string = 'activeTab';\n\n private activeLink: HTMLLIElement | null;\n\n constructor(props: ITabProps) {\n super(props);\n const { defaultTabIndex } = this.props.config;\n const { slots } = this.props;\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n let initialIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n const queryString: string =\n (this.props.context &&\n this.props.context.request &&\n this.props.context.request.query &&\n this.props.context.request.query.activeTab) ||\n '';\n let queryTabIndex: number = 0;\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n queryTabIndex = Number.parseInt(arr[1], 10);\n }\n }\n initialIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : initialIndex;\n this.state = { currentTabIndex: initialIndex };\n\n this._getTabHeader = this._getTabHeader.bind(this);\n this._getTabContent = this._getTabContent.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._setGetParameter = this._setGetParameter.bind(this);\n this.activeLink = null;\n }\n\n public shouldComponentUpdate(nextProps: ITabProps, nextState: ITabViewStates): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { slots } = this.props;\n const { heading, className } = this.props.config;\n\n const headingComponent = heading && (\n \n );\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n\n // Const queryTabIndex = this.props.context && this.props.context.request && this.props.context.request.query && +this.props.context.request.query.activeTabIndex || 0;\n // let activeIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n // activeIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : activeIndex;\n\n const tabViewProps = {\n ...this.props,\n TabContainer: {\n moduleProps: this.props,\n className: classnames('ms-tab', className)\n },\n headerSection: { className: 'ms-tab-header-section' },\n tabsSection: { className: 'ms-tab-tabs-section', tag: 'ul' as NodeTag, role: 'tablist' },\n heading: headingComponent,\n config: this.props && this.props.config,\n tabItemContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-tab-content-section'\n },\n tabContents: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabContent(item, index)),\n tabHeaders: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabHeader(item, index))\n };\n return this.props.renderView(tabViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public componentDidUpdate(): void {\n const { data } = this.props;\n if (!this.props.context.request.params.isEditor) {\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n if (dataActionTabId) {\n if (this.props.id === dataActionTabId) {\n this.activeLink && this.activeLink.focus();\n }\n } else {\n const queryString: string =\n (this.props.context &&\n this.props.context.request &&\n this.props.context.request.query &&\n this.props.context.request.query.activeTab) ||\n '';\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n this.activeLink && this.activeLink.focus();\n }\n }\n }\n }\n }\n\n /**\n *Set the activate link value on tab click.\n * @param link -Ref link value.\n */\n private readonly _refHandler = (link: HTMLLIElement | null) => {\n this.activeLink = link;\n };\n\n private _getTabHeader(item: React.ReactNode, index: number): React.ReactNode {\n const { data } = this.props;\n const activeContentIndex =\n data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.activeContentIndex;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n const selected =\n activeContentIndex !== undefined && dataActionTabId === this.props.id\n ? activeContentIndex === index\n : this.state.currentTabIndex === index;\n const contentID = getContentID(index, this.props.id);\n\n return (\n \n \n {React.cloneElement(item as React.ReactElement, {\n tabItemType: TabItemType.TabHeader,\n isSelected: index === this.state.currentTabIndex,\n itemIndex: index,\n tabId: this.props.id\n })}\n \n \n );\n }\n\n private readonly _onClick = (index: number, id: string) => (e: React.MouseEvent) => {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n };\n\n private readonly _onKeyDown = (index: number, id: string) => (e: React.KeyboardEvent) => {\n if (e.keyCode === 13) {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n\n if (e.keyCode === 39 || e.keyCode === 37) {\n const { slots } = this.props;\n const slotLength = (slots && slots.tabItems && slots.tabItems.length) || 0;\n\n if (e.keyCode === 39) {\n // If we're at the end, go to the start\n if (index + 1 === slotLength) {\n index = -1;\n }\n const activeTabState = { activeContentIndex: index + 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index + 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 2)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n\n // Move left\n } else if (e.keyCode === 37) {\n // If we're at the start, move to the end\n if (index === 0) {\n index = slotLength;\n }\n const activeTabState = { activeContentIndex: index - 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index - 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n }\n };\n\n private _getTabContent(item: React.ReactNode, index: number): React.ReactNode {\n return (\n \n {React.cloneElement(item as React.ReactElement, {\n tabItemType: TabItemType.TabContent,\n isSelected: index === this.state.currentTabIndex,\n itemIndex: index,\n tabId: this.props.id\n })}\n \n );\n }\n\n private _setGetParameter(requestContext: MsDyn365.IRequestContext, paramName: string, paramValue: string): string {\n let url;\n\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n url = new URL(window.location.href);\n } else {\n url = new URL(requestContext.url.requestUrl.href);\n }\n\n const params = new window.URLSearchParams(url.search);\n params.set(paramName, paramValue);\n url.search = decodeURIComponent(params.toString());\n return url.toString();\n }\n}\n\nexport default Tab;\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 { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../tile-list-item.props.autogenerated';\n\n/**\n * Tile List links.\n */\nexport interface ITileListLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ITileListLinks component.\n * @extends {React.PureComponent}\n */\nexport class TileListLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n }\n\n /**\n * ITileListLinks component.\n * @param linkdata - Link data.\n * @returns Editable links.\n */\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n for (const link of linkdata) {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-tile-list__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'button',\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n }\n\n return editableLinks;\n };\n}\nexport default TileListLinks;\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 { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { TileListLinks } from './components';\nimport { IHeadingData, ITileListItemProps } from './tile-list-item.props.autogenerated';\n\n/**\n * Tile-list-item view props.\n */\nexport interface ITileListItemViewProps extends ITileListItemProps<{}> {\n heading?: React.ReactNode;\n paragraph?: React.ReactNode;\n links?: React.ReactNode;\n backgroundImage?: React.ReactNode;\n thumbnailImage?: React.ReactNode;\n tileListItem: IModuleProps;\n tileListContainer: INodeProps;\n tileListImageContainer: INodeProps;\n tileListThumbnailImageContainer: INodeProps;\n tileListHeadingContainer: INodeProps;\n}\n\n/**\n *\n * TileListItem component.\n * @extends {React.PureComponent>}\n */\nexport class TileListItem extends React.PureComponent> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public constructor(props: ITileListItemProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element {\n const { heading, paragraph, backgroundImage, thumbnailImage, redirectionUrl, links } = this.props.config;\n const tileListLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const tileListLinkContainer = {\n tag: 'a' as NodeTag,\n className: 'ms-tile-list-container',\n role: 'link',\n href: redirectionUrl?.linkUrl.destinationUrl,\n 'aria-label': redirectionUrl?.ariaLabel,\n target: redirectionUrl?.openInNewTab ? '_blank' : undefined\n };\n\n const tileListButtonContainer = {\n tag: 'button' as NodeTag,\n className: 'ms-tile-list-container'\n };\n const viewProps: ITileListItemViewProps = {\n ...this.props,\n heading: this._createHeading(heading),\n paragraph: this._createParagraph(paragraph),\n backgroundImage: this._renderBackgroundImage(backgroundImage),\n thumbnailImage: this._renderThumbnailImage(thumbnailImage),\n links: tileListLinks,\n tileListItem: {\n moduleProps: this.props,\n className: ''\n },\n tileListContainer: redirectionUrl ? tileListLinkContainer : tileListButtonContainer,\n tileListImageContainer: {\n className: 'ms-tile-list__image'\n },\n tileListThumbnailImageContainer: {\n className: 'ms-tile-list__thumbnail_image',\n 'aria-hidden': 'true'\n },\n tileListHeadingContainer: {\n className: 'ms-tile-list__heading'\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles heading content change event.\n * @param event - Content editable event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param event - Content editable event.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param linkIndex - Index of link in linkarray.\n * @returns Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.links?.[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n private _createHeading(heading?: IHeadingData): React.ReactNode | null {\n if (!heading) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(heading.text)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _renderBackgroundImage(item?: Msdyn365.IImageData, isAriaHiddenAttribute?: boolean): React.ReactNode | null {\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n sm: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n md: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n lg: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n xl: { q: 'w=315&h=412&m=6', w: 315, h: 412 }\n },\n lazyload: true\n };\n const verifiedImageSettings = item?.imageSettings?.viewports ? item.imageSettings : defaultImageSettings;\n\n return (\n \n );\n }\n\n private _renderThumbnailImage(\n item?: Msdyn365.IImageData,\n itemImageSettings?: Msdyn365.IImageSettings,\n isAriaHiddenAttribute?: boolean\n ): React.ReactNode | null {\n if (!item) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(item.src)) {\n return null;\n }\n\n return (\n \n );\n }\n}\n\nexport default TileListItem;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nimport { ICartLineCommentData } from './cart-line-comment.data';\r\nimport { ICartLineCommentProps } from './cart-line-comment.props.autogenerated';\r\nimport { Button, IModuleProps, INodeProps, Modal, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\n\r\nexport interface ICartLineCommentViewProps extends ICartLineCommentProps {\r\n staticDisplay: INodeProps;\r\n cartLineCommentModuleProps: IModuleProps;\r\n modal: React.ReactNode;\r\n}\r\n\r\ninterface ICartLineCommentExtendedProps extends ICartLineCommentProps {\r\n comment: string;\r\n cartLineId: string;\r\n cartProductTitle: string;\r\n}\r\n\r\ninterface ICartLineCommentState {\r\n comment: string;\r\n isCommentAreaActive: boolean;\r\n}\r\n/**\r\n *\r\n * CartLineComment component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CartLineComment extends React.PureComponent {\r\n private _className = 'gar-cart-comment';\r\n constructor(props: ICartLineCommentExtendedProps) {\r\n super(props);\r\n this.state = {\r\n comment: props.comment,\r\n isCommentAreaActive: false\r\n };\r\n }\r\n\r\n /**\r\n * Saves cart comment\r\n * Method must call updateCartLineQuantity on the cart state because\r\n * updateCart does not update the cart line comment. Calling the other method with an additional\r\n * parameter for the comment successfully updates the comment\r\n */\r\n private _updateCartLineComment = async (): Promise => {\r\n const cartState = this.props.data.cart.result;\r\n if (!cartState) {\r\n return;\r\n }\r\n const dummyCart = { ...cartState.cart };\r\n const cartLineToUpdate = dummyCart.CartLines?.find(cl => cl.LineId === this.props.cartLineId);\r\n if (cartLineToUpdate) {\r\n cartLineToUpdate.Comment = this.state.comment;\r\n }\r\n await cartState.updateCartLineQuantity({\r\n cartLineId: this.props.cartLineId,\r\n newQuantity: cartLineToUpdate?.Quantity!,\r\n additionalProperties: { Comment: this.state.comment }\r\n });\r\n\r\n this.setState({ isCommentAreaActive: false });\r\n };\r\n\r\n /**\r\n * Updates the comment in state\r\n * @param event new comment from event\r\n */\r\n private _updateCommentState = (event: React.ChangeEvent): void => {\r\n this.setState({ comment: event.target.value });\r\n };\r\n /**\r\n * Resets Cart Comment\r\n */\r\n private _resetCommentToProps = (): void => {\r\n this.setState({ comment: this.props.comment, isCommentAreaActive: false });\r\n };\r\n\r\n /**\r\n * Toggles the isCommentAreaActive state property\r\n */\r\n private _toggleCommentAreaActive = () =>\r\n this.setState(prevState => {\r\n return {\r\n isCommentAreaActive: !prevState.isCommentAreaActive\r\n };\r\n });\r\n\r\n /**\r\n * Renders the static comment display for when the isCommentAreaActive state param is false\r\n * @return React.ReactNode\r\n */\r\n private _renderStaticCommentDisplay = (): React.ReactNode => {\r\n const {\r\n resources: { commentLinkText, editLinkText }\r\n } = this.props;\r\n if (!this.props.comment) {\r\n return this._renderCommentLink(commentLinkText);\r\n } else {\r\n return (\r\n \r\n

{this._getCommentPreview()}

\r\n {this._renderCommentLink(editLinkText)}\r\n
\r\n );\r\n }\r\n };\r\n\r\n private _getCommentPreview = (): string => {\r\n const { comment } = this.props;\r\n if (comment.length > 50) {\r\n return `${comment.substring(0, 50)}...`;\r\n } else {\r\n return comment;\r\n }\r\n };\r\n\r\n /**\r\n * Renders a comment link which toggles the active area state\r\n * @param linkText text for the link\r\n */\r\n private _renderCommentLink = (linkText: string): React.ReactNode => (\r\n \r\n {linkText}\r\n \r\n );\r\n\r\n /**\r\n * Renders a button to save comments to the cartlines\r\n * @return React.ReactNode\r\n */\r\n private _renderSaveButton = (): React.ReactNode => {\r\n const {\r\n resources: { saveButtonText }\r\n } = this.props;\r\n return (\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Renders a button to cancel the comment entry and set the state to default\r\n * @return React.ReactNode\r\n */\r\n private _renderCancelButton = (): React.ReactNode => {\r\n const {\r\n resources: { cancelButtonText }\r\n } = this.props;\r\n return (\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Renders the text area for inputting comments\r\n */\r\n private _renderTextArea = (): React.ReactNode => {\r\n const {\r\n resources: { textAreaLabel }\r\n } = this.props;\r\n const { comment } = this.state;\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n };\r\n /**\r\n * Renders the button area\r\n */\r\n private _renderButtonArea = (): React.ReactNode => (\r\n
\r\n {this._renderSaveButton()}\r\n {this._renderCancelButton()}\r\n
\r\n );\r\n\r\n private _renderModal = () => {\r\n return (\r\n \r\n {this._getModalTitle()}\r\n {this._renderTextArea()}\r\n {this._renderButtonArea()}\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Gets ID for the text field\r\n */\r\n private _getFieldId = (): string => `${this.props.cartLineId}__commentInput`;\r\n\r\n /**\r\n * Gets the title for the comment modal\r\n */\r\n private _getModalTitle = (): string => {\r\n const {\r\n resources: { commentModalTitle }\r\n } = this.props;\r\n\r\n return commentModalTitle.replace('{0}', this.props.cartProductTitle);\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n config: { className }\r\n } = this.props;\r\n const viewProps: ICartLineCommentViewProps = {\r\n ...this.props,\r\n staticDisplay: {\r\n tag: 'div',\r\n className: `${this._className}__static-display`,\r\n children: this._renderStaticCommentDisplay()\r\n },\r\n cartLineCommentModuleProps: {\r\n className: classnames(className, this._className),\r\n tag: 'div',\r\n moduleProps: { ...this.props }\r\n },\r\n modal: this._renderModal()\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default CartLineComment;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { ICartLineCommentViewProps } from './cart-line-comment';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport default (props: ICartLineCommentViewProps) => {\r\n const { staticDisplay, cartLineCommentModuleProps, modal } = props;\r\n return (\r\n \r\n {modal}\r\n \r\n \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n * INavigationMenuViewRootProps.\r\n */\r\nexport interface INavigationMenuViewRootProps {\r\n navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n}\r\n\r\n/**\r\n * Represent navigation menu state interface.\r\n */\r\nexport interface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: Msdyn365.IImageData[] | null;\r\n mobileViewLabelText?: string;\r\n isDrawerOpen: boolean;\r\n desktopCategoryId: number;\r\n isOnlyMobile: boolean;\r\n isNavOpen: boolean;\r\n}\r\n\r\n/**\r\n * NavMenuConstants enum.\r\n */\r\nexport enum NavMenuConstants {\r\n zero = 0,\r\n one = 1,\r\n two = 2,\r\n three = 3,\r\n four = 4,\r\n escapeKey = 27,\r\n rootMenu = 1\r\n}\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Get category image.\r\n * @param props - Navigation menu props.\r\n * @param categoryImage - Category Image.\r\n * @param alttext - AltText String.\r\n * @returns Returns Node.\r\n */\r\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\r\n\r\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if (categoryImageUrl !== undefined) {\r\n const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse, Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootDisabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootDisabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n return null;\r\n });\r\n }\r\n }\r\n this.state = {\r\n activeMenu: 1,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n isDrawerOpen: false,\r\n desktopCategoryId: -1,\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry);\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = 1;\r\n const navbarKey = 'header-nav-mobile';\r\n return (\r\n \r\n {\r\n this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n \r\n {this._renderCollapseMenu()}\r\n )\r\n }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: 1,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = 1;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n \r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n }\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { MenuList, Navigation } = this.props.navProps;\r\n\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return (\r\n this._renderLinkMenuItem(item)\r\n );\r\n } else if (!item.linkURL) {\r\n return (\r\n this._renderSpanMenuItem(item)\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (ArrayExtensions.hasElements(menuItemData)) {\r\n menuItemData[0].id = 1;\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n const menuItem = this._getFromSubMenu(undefined, menuItemData);\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}\r\n {' '}\r\n \r\n );\r\n }\r\n } else {\r\n\r\n for (const [index, item] of menuItemData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
\r\n );\r\n }\r\n\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\r\n if (!menu) {\r\n return null;\r\n }\r\n\r\n for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\r\n const item: IMenuItemData = menu[Number(index)];\r\n\r\n if (item.id === this.state.activeMenu) {\r\n if (!NavigationMenuRootDisabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\r\n }\r\n return item;\r\n }\r\n const found = this._getFromSubMenu(item.id, item.subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n }\r\n\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\r\n return (this._renderSpanMenuItem(menuItemData));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n let subMenu;\r\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n levelClassName = 'level-3';\r\n subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n } else if (this.currentLevel <= this.supportedLevel) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n { menuItem}\r\n { subMenu}\r\n \r\n );\r\n });\r\n return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n } else {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle desktop category click.\r\n * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n * @returns Returns void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n { linkText}\r\n \r\n );\r\n }\r\n return null;\r\n\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName = isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n \r\n {menuOptions}\r\n \r\n
\r\n {\r\n isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n \r\n { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n ))\r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootDisabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootDisabled.isBackTrack = true;\r\n this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current &&\r\n !this.menuNode.current.contains(event.target as Node)) {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n}\r\n\r\nexport default NavigationMenuRootDisabled;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse, Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootEnabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootEnabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private menuItemData: IMenuItemData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n return null;\r\n });\r\n }\r\n }\r\n this.state = {\r\n activeMenu: NavMenuConstants.rootMenu,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n isDrawerOpen: false,\r\n desktopCategoryId: -1,\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n\r\n this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry);\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n this._addShopAllLink();\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = NavMenuConstants.one;\r\n const navbarKey = 'header-nav-mobile';\r\n return (\r\n \r\n {\r\n this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n {this.props.navProps.config.rootMenuNavigation}\r\n {this._renderCollapseMenu()}\r\n )\r\n }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: NavMenuConstants.rootMenu,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = NavMenuConstants.one;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n \r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n }\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { Navigation } = this.props.navProps;\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return (\r\n this._renderLinkMenuItem(item)\r\n );\r\n } else if (!item.linkURL) {\r\n return (\r\n this._renderSpanMenuItem(item)\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n let menuItemData: IMenuItemData[] = [];\r\n if (this.state.isOnlyMobile) {\r\n menuItemData = this.menuItemData;\r\n } else {\r\n menuItemData = this.props.navProps.menuItemData;\r\n }\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n let cmsMenuData: IMenuItemData[] | undefined = [];\r\n let retailMenuItemData: IMenuItemData[] | undefined = [];\r\n const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\r\n\r\n for (const item of retailMenuData) {\r\n retailMenuItemData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n item.subMenu = retailMenuItemData;\r\n }\r\n\r\n for (const item of menuItemData) {\r\n cmsMenuData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail));\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n let menuItem: IMenuItemData | null = {};\r\n for (const menuItemDatum of menuItemData) {\r\n if (menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({\r\n parentMenu: undefined\r\n });\r\n } else {\r\n this.setState({\r\n parentMenu: undefined,\r\n mobileViewLabelText: menuItemDatum.linkText\r\n });\r\n }\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum);\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}\r\n {' '}\r\n \r\n );\r\n }\r\n\r\n } else {\r\n for (const [index, item] of retailMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
\r\n );\r\n }\r\n\r\n for (const [index, item] of cmsMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n }\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item?.subMenu;\r\n if (subMenus && ArrayExtensions.hasElements(subMenus)) {\r\n for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\r\n const subMenu: IMenuItemData = subMenus[Number(index)];\r\n let parentMenuId = item?.id;\r\n\r\n if (subMenu.id === this.state.activeMenu) {\r\n if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\r\n parentMenuId = undefined;\r\n }\r\n\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\r\n }\r\n return subMenu;\r\n }\r\n const found = this._getFromSubMenu(subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n }\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n } else if (!menuItemData.linkURL) {\r\n return (this._renderSpanMenuItem(menuItemData));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n let subMenu;\r\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n levelClassName = 'level-3';\r\n subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n { menuItem}\r\n { subMenu}\r\n \r\n );\r\n });\r\n return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n } else {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n return (\r\n \r\n
\r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle desktop category click.\r\n * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n * @returns Returns void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n { linkText}\r\n \r\n );\r\n }\r\n return null;\r\n\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName =\r\n isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n \r\n {menuOptions}\r\n \r\n
\r\n {\r\n isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n \r\n { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n ))\r\n }\r\n
\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootEnabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootEnabled.isBackTrack = true;\r\n this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current &&\r\n !this.menuNode.current.contains(event.target as Node)) {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Add shop all link for Mobile submenu.\r\n */\r\n private readonly _addShopAllLink = (): void => {\r\n const { menuItemData } = this.props.navProps;\r\n this.menuItemData = menuItemData;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n this.menuItemData[0].subMenu?.map(item => {\r\n const shopAllObject = {};\r\n Object.assign(shopAllObject, { imageSource: item.imageSource });\r\n Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\r\n Object.assign(shopAllObject, { linkURL: item.linkURL });\r\n if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\r\n item.subMenu.unshift(shopAllObject);\r\n }\r\n return item;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n\r\n}\r\n\r\nexport default NavigationMenuRootEnabled;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\r\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\r\n\r\n/**\r\n * Render the Navigation menu.\r\n * @param props - The navigation menu view props.\r\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\r\n */\r\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\r\n\r\n if (props.config.enabletopMenu) {\r\n return ;\r\n }\r\n\r\n return ;\r\n\r\n};\r\n\r\nexport default navigationMenuView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Categories heading.\r\n * @param inCategoriesHeading - The Keywords result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderCategorySuggestionsTitle = (inCategoriesHeading: string): JSX.Element => {\r\n const categoryAutoSuggestionHeading = inCategoriesHeading ? inCategoriesHeading : 'In categories';\r\n\r\n return (\r\n
\r\n {categoryAutoSuggestionHeading}\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Render Categories suggestion result.\r\n * @param searchText search text\r\n * @param inCategoriesHeading - The Categories result heading.\r\n * @param noResultText - The \"No Result\" text.\r\n * @param props - The Categories suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns The JSX Element.\r\n */\r\nexport const CategorySuggestionsComponent = (\r\n searchText: string | undefined,\r\n inCategoriesHeading: string,\r\n noResultText: string,\r\n props: ISearchViewProps & ISearchProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n return props.autosuggestCategory ? (\r\n \r\n {renderCategorySuggestionsTitle(inCategoriesHeading.replace('{0}', searchText || ''))}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && props.autosuggestCategory.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderCategorySuggestionsTitle(inCategoriesHeading.replace('{0}', searchText || ''))}\r\n \r\n
  • \r\n {noResultText}\r\n
  • \r\n
    \r\n
    \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n const imageSettings = {\r\n lazyload: true,\r\n viewports: {\r\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\r\n }\r\n };\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nexport const MobileAutoSuggestEmptyComponent = (\r\n props: ISearchProps\r\n): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchTextHeading}\r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchText}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { ISearchData, ISearchFormViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\r\n return (\r\n \r\n {clearSearchButtonText || 'Clear'}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Search form.\r\n * @param form -Form view props.\r\n * @param searchForm -Search Form props.\r\n * @param formWrapper -Form Wrapper props.\r\n * @param isMobile -Is mobile viewport flag.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param props -The props for resource.\r\n * @param isSearchText -Is SearchText flag for input text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nexport const FormComponent = (\r\n form: ISearchFormViewProps,\r\n searchForm: INodeProps,\r\n formWrapper: INodeProps,\r\n isMobile: boolean,\r\n clearSearchButtonText: string,\r\n props: ISearchProps,\r\n isSearchText: boolean,\r\n clearSearch: () => void): JSX.Element => {\r\n\r\n // const cancelButtonNode = (\r\n // \r\n // );\r\n\r\n return (\r\n isMobile ? (\r\n \r\n {form.cancelBtn}\r\n \r\n {form.input}\r\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\r\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\r\n \r\n \r\n ) : (\r\n \r\n \r\n {form.input}\r\n {form.submitBtn}\r\n {/*{isSearchText && cancelButtonNode}*/}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { ISearchKeywordViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\n/**\r\n * Render keywords heading.\r\n * @param keywordsHeading -The Keywords result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderKeywordSuggestionsTitle = (keywordsHeading: string): JSX.Element => {\r\n const categoryAutoSuggestionHeading = keywordsHeading ? keywordsHeading : 'Keywords';\r\n\r\n return (\r\n
    \r\n {categoryAutoSuggestionHeading}\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render keywords reults.\r\n * @param keywordSuggest -The Keywords suggest Node props.\r\n * @param ulKeyword -The List Node props.\r\n * @param keywordsHeading -The Keywords result heading.\r\n * @param noResultText -The \"No Result\" text.\r\n * @param keywordSuggestions -The Keywords suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns -The JSX Element.\r\n */\r\nexport const KeywordSuggestionsComponent = (\r\n keywordSuggest: INodeProps,\r\n ulKeyword: INodeProps,\r\n keywordsHeading: string,\r\n noResultText: string,\r\n keywordSuggestions?: ISearchKeywordViewProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n return (\r\n keywordSuggestions ? (\r\n \r\n {renderKeywordSuggestionsTitle(keywordsHeading)}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderKeywordSuggestionsTitle(keywordsHeading)}\r\n \r\n
  • \r\n {noResultText}\r\n
  • \r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData, ISearchProductViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param productSuggestionsHeading -The products suggestion result heading.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductSuggestionsTitle = (productSuggestionsHeading: string): JSX.Element => {\r\n const productAutoSuggestionHeading = productSuggestionsHeading ? productSuggestionsHeading : 'Products';\r\n\r\n return (\r\n
    \r\n {productAutoSuggestionHeading}\r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Products No result section.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResults = (props: ISearchProps): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n {props.resources.noResultContentHeadingText}\r\n
    \r\n
    \r\n {props.resources.noResultContentParagraphText}\r\n
    \r\n
    \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param productSuggest -The product suggest Node props.\r\n * @param ulProduct -The List Node props.\r\n * @param props -The props.\r\n * @param productSuggestions -The Product suggestion result.\r\n * @param isLoadingAutoSuggest - The autosuggestion loading flag.\r\n * @param isLoadingNode - The autosuggestion loading node.\r\n * @returns The JSX Element.\r\n */\r\nexport const ProductSuggestionsComponent = (\r\n productSuggest: INodeProps,\r\n ulProduct: INodeProps,\r\n props: ISearchProps,\r\n productSuggestions?: ISearchProductViewProps,\r\n isLoadingAutoSuggest?: boolean,\r\n isLoadingNode?: React.ReactNode\r\n): JSX.Element => {\r\n const liProduct: INodeProps = {\r\n tag: 'li',\r\n className: 'msc-no-result-content'\r\n };\r\n return productSuggestions ? (\r\n \r\n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\r\n \r\n {isLoadingAutoSuggest && isLoadingNode}\r\n {!isLoadingAutoSuggest && productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n ) : (\r\n \r\n {renderProductSuggestionsTitle(props.resources.productSuggestionHeading)}\r\n \r\n \r\n {renderProductNotFoundResults(props)}\r\n \r\n \r\n \r\n );\r\n};\r\n","import { ISearchData, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\nimport { IAriServiceModelExtension } from \"../../../../actions/DataServiceEntities.g\";\r\nimport generateAriModelDetailUrl from \"../../../../utils/getAriModelDetailUrl\";\r\n\r\nconst renderAriSuggestionsTitle = (heading: string): JSX.Element =>\r\n (\r\n
    \r\n {heading}\r\n
    \r\n )\r\n\r\n\r\nexport const AriSuggestionsComponent = (\r\n noResultsText: string,\r\n props: ISearchViewProps & ISearchProps,\r\n isLoading: boolean,\r\n searchResults: IAriServiceModelExtension[],\r\n loadingNode: React.ReactNode\r\n): JSX.Element => {\r\n const { resources: { ariModelResultsHeading }, UlCategory } = props;\r\n return (\r\n
    \r\n {renderAriSuggestionsTitle(ariModelResultsHeading)}\r\n \r\n {isLoading? (\r\n loadingNode\r\n ) : (\r\n searchResults?.length ? (\r\n <>\r\n {searchResults.map(r => (
  • \r\n \r\n {r.Name}\r\n \r\n
  • ))}\r\n \r\n\r\n ) : (
  • \r\n {noResultsText}\r\n
  • )\r\n )}\r\n\r\n
    \r\n
    \r\n )\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ISearchData, ISearchFormViewProps, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Button, format, isMobile, Module, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\n\r\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\r\nimport { CategorySuggestionsComponent } from './components/search.categorysuggest';\r\nimport { FormComponent } from './components/search.form';\r\nimport { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\r\nimport { ProductSuggestionsComponent } from './components/search.productsuggest';\r\nimport SearchModelsAction, { SearchModelsInput } from '../../../actions/search-models.action';\r\nimport { QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\nimport { IAriServiceModelExtension } from '../../../actions/DataServiceEntities.g';\r\nimport * as _ from 'lodash';\r\nimport { AriSuggestionsComponent } from './components/search.arisuggest';\r\n// import MsDyn365, { getUrlSync } from \"@msdyn365-commerce/core\";\r\n/**\r\n * Render Title for AutoSuggest.\r\n * @param searchSuggestionHeading -The heading resource string.\r\n * @param searchText -The search string.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\r\n const searchTextString = '\"'.concat(searchText.concat('\"'));\r\n const searchAutoSuggestionHeading = searchSuggestionHeading\r\n ? format(searchSuggestionHeading, searchTextString)\r\n : `Search for ${searchTextString}`;\r\n\r\n return {searchAutoSuggestionHeading};\r\n};\r\n\r\n/**\r\n * Search View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst SearchView: React.FC> = (\r\n props: ISearchViewProps & ISearchProps\r\n): JSX.Element => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n UlKeyword,\r\n UlProduct,\r\n form,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label,\r\n context,\r\n isLoadingAutoSuggest,\r\n isLoadingNode,\r\n context: {\r\n request: { apiSettings },\r\n actionContext\r\n },\r\n config: { topResultsCount }\r\n } = props;\r\n\r\n const { searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText, clearSearchButtonText } = props.resources;\r\n\r\n const [searchTextString, setSearchTextString] = useState();\r\n const [isMobilePort, setIsMobile] = useState(false);\r\n const [ariSearchResults, setAriSearchResults] = useState([]);\r\n const [ariSearchLoading, setAriSearchLoading] = useState(false);\r\n\r\n const debouncedSearchHandler = useMemo(() => _.debounce((search: string) => getAriSearchResults(search), 500), []);\r\n\r\n useEffect(() => {\r\n setSearchTextString(searchText);\r\n if (searchText.length > 0) debouncedSearchHandler(searchText);\r\n }, [searchText]);\r\n\r\n useEffect(() => {\r\n return () => {\r\n debouncedSearchHandler.cancel();\r\n };\r\n }, [debouncedSearchHandler]);\r\n\r\n /**\r\n * ClearSearch callback method to clear search string.\r\n */\r\n const clearSearch = (): void => {\r\n setSearchTextString('');\r\n\r\n const propsForm = props.form as ISearchFormViewProps;\r\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\r\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\r\n\r\n if (propsFormInputCurrent) {\r\n propsFormInputCurrent.value = '';\r\n }\r\n\r\n propsFormInput.value = '';\r\n props.searchText = '';\r\n props.FormWrapper.action = '';\r\n };\r\n\r\n const isMobileViewport = useCallback(() => {\r\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\r\n setIsMobile(isMobileView);\r\n }, [context]);\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', isMobileViewport);\r\n isMobileViewport();\r\n }, [isMobileViewport]);\r\n\r\n const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\r\n\r\n const isMobileView = viewport === 'xs';\r\n\r\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString)\r\n ? `${AutoSuggest.className} show`\r\n : `${AutoSuggest.className} hide`;\r\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\r\n\r\n const getAriSearchResults = async (search: string) => {\r\n setAriSearchLoading(true);\r\n const queryResultSettings: QueryResultSettings = {\r\n Paging: {\r\n Top: topResultsCount || 5\r\n }\r\n };\r\n const input = new SearchModelsInput(search, queryResultSettings, 'Search', apiSettings, false);\r\n\r\n const data = await SearchModelsAction(input, actionContext);\r\n setAriSearchResults(data.ariSearchResults.Models || []);\r\n setAriSearchLoading(false);\r\n };\r\n\r\n // const _generateSeeMoreUrl = (): string => {\r\n // const {\r\n // context: {\r\n // actionContext,\r\n // app: {\r\n // config: { searchQueryStringParameter }\r\n // }\r\n // }\r\n // } = props;\r\n\r\n // const query = props.searchText;\r\n // const searchQsp = searchQueryStringParameter || 'q';\r\n // const searchURL = _appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\r\n // return searchURL;\r\n // };\r\n\r\n // const _appendQueryParams = (route: string, query: string, qsp: string): string => {\r\n // if (!MsDyn365.isBrowser) {\r\n // return '';\r\n // }\r\n // const queryUrl = new URL(route, window.location.href);\r\n // if (qsp && query) {\r\n // queryUrl.searchParams.set(qsp, query);\r\n // }\r\n\r\n // return queryUrl.href;\r\n // };\r\n\r\n return (\r\n \r\n {label}\r\n {FormComponent(\r\n form as ISearchFormViewProps,\r\n SearchForm,\r\n FormWrapper,\r\n isMobilePort,\r\n clearSearchButtonText,\r\n props,\r\n isSearchText,\r\n clearSearch\r\n )}\r\n {!isMobileView && (\r\n \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n {AutoSuggestAriaLabelText}\r\n ) : (\r\n ''\r\n )}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n \r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {ProductSuggestionsComponent(\r\n ProductSuggest,\r\n UlProduct,\r\n props,\r\n autosuggestProduct,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n\r\n {CategorySuggestionsComponent(\r\n searchTextString,\r\n categorySuggestionHeading,\r\n noResultText,\r\n props,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n {AriSuggestionsComponent(noResultText, props, ariSearchLoading, ariSearchResults, isLoadingNode)}\r\n {KeywordSuggestionsComponent(\r\n KeywordSuggest,\r\n UlKeyword,\r\n keywordsHeading,\r\n noResultText,\r\n autosuggestKeyword,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n \r\n {/* See More */}\r\n \r\n ) : null}\r\n \r\n )}\r\n {isMobileView && props.isSearchFormExpanded && (\r\n \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n {AutoSuggestAriaLabelText}\r\n ) : (\r\n ''\r\n )}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n {(form as ISearchFormViewProps).cancelBtn}\r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(\r\n searchTextString,\r\n categorySuggestionHeading,\r\n noResultText,\r\n props,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n {AriSuggestionsComponent(noResultText, props, ariSearchLoading, ariSearchResults, isLoadingNode)}\r\n {KeywordSuggestionsComponent(\r\n KeywordSuggest,\r\n UlKeyword,\r\n keywordsHeading,\r\n noResultText,\r\n autosuggestKeyword,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n {ProductSuggestionsComponent(\r\n ProductSuggest,\r\n UlProduct,\r\n props,\r\n autosuggestProduct,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n \r\n ) : null}\r\n \r\n )}\r\n \r\n );\r\n};\r\nexport default SearchView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\r\n\r\n/**\r\n * INavigationMenuViewRootProps.\r\n */\r\nexport interface INavigationMenuViewRootProps {\r\n navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\r\n}\r\n\r\n/**\r\n * Represent navigation menu state interface.\r\n */\r\nexport interface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?: Msdyn365.IImageData[] | null;\r\n mobileViewLabelText?: string;\r\n isDrawerOpen: boolean;\r\n desktopCategoryId: number;\r\n isOnlyMobile: boolean;\r\n isNavOpen: boolean;\r\n}\r\n\r\n/**\r\n * NavMenuConstants enum.\r\n */\r\nexport enum NavMenuConstants {\r\n zero = 0,\r\n one = 1,\r\n two = 2,\r\n three = 3,\r\n four = 4,\r\n escapeKey = 27,\r\n rootMenu = 1\r\n}\r\n\r\n/**\r\n * GridSizes.\r\n */\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\n/**\r\n * Get category image.\r\n * @param props - Navigation menu props.\r\n * @param categoryImage - Category Image.\r\n * @param alttext - AltText String.\r\n * @returns Returns Node.\r\n */\r\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\r\n\r\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\r\n md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if (categoryImageUrl !== undefined) {\r\n const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse, Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootDisabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootDisabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n return null;\r\n });\r\n }\r\n }\r\n this.state = {\r\n activeMenu: 1,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n isDrawerOpen: false,\r\n desktopCategoryId: -1,\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry);\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = 1;\r\n const navbarKey = 'header-nav-mobile';\r\n return (\r\n \r\n {\r\n this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\r\n \r\n {this._renderCollapseMenu()}\r\n )\r\n }\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: 1,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = 1;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\r\n \r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n }\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { MenuList, Navigation } = this.props.navProps;\r\n\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return (\r\n this._renderLinkMenuItem(item)\r\n );\r\n } else if (!item.linkURL) {\r\n return (\r\n this._renderSpanMenuItem(item)\r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (ArrayExtensions.hasElements(menuItemData)) {\r\n menuItemData[0].id = 1;\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n const menuItem = this._getFromSubMenu(undefined, menuItemData);\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}\r\n {' '}\r\n \r\n );\r\n }\r\n } else {\r\n\r\n for (const [index, item] of menuItemData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
    \r\n );\r\n }\r\n\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\r\n if (!menu) {\r\n return null;\r\n }\r\n\r\n for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\r\n const item: IMenuItemData = menu[Number(index)];\r\n\r\n if (item.id === this.state.activeMenu) {\r\n if (!NavigationMenuRootDisabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\r\n }\r\n return item;\r\n }\r\n const found = this._getFromSubMenu(item.id, item.subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\r\n }\r\n\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\r\n } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\r\n return (this._renderSpanMenuItem(menuItemData));\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n let subMenu;\r\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n levelClassName = 'level-3';\r\n subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n } else if (this.currentLevel <= this.supportedLevel) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n { menuItem}\r\n { subMenu}\r\n \r\n );\r\n });\r\n return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\r\n } else {\r\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n return (\r\n \r\n
    \r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
    \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle desktop category click.\r\n * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n * @returns Returns void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n { linkText}\r\n \r\n );\r\n }\r\n return null;\r\n\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n { option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName = isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n \r\n {menuOptions}\r\n \r\n
    \r\n {\r\n isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\r\n \r\n { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n ))\r\n }\r\n
    \r\n
    \r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootDisabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootDisabled.isBackTrack = true;\r\n this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current &&\r\n !this.menuNode.current.contains(event.target as Node)) {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n}\r\n\r\nexport default NavigationMenuRootDisabled;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n addThrottledEvent,\r\n Button,\r\n Collapse,\r\n Drawer,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IPayLoad,\r\n isMobile,\r\n ITelemetryContent,\r\n Module,\r\n Node,\r\n onTelemetryClick,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\r\n\r\n/**\r\n *\r\n * NavigationMenuRootEnabled component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuRootEnabled extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n\r\n private readonly supportedLevel: number = NavMenuConstants.four;\r\n\r\n private currentLevel: number = NavMenuConstants.zero;\r\n\r\n private readonly menuNode: React.RefObject;\r\n\r\n private readonly menuItemRef: React.RefObject;\r\n\r\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\r\n\r\n private menuItemData: IMenuItemData[] = [];\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n private readonly attributes?: Msdyn365.IDictionary;\r\n\r\n private customResizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n public constructor(props: INavigationMenuViewRootProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.menuItemRef = React.createRef();\r\n const { menuItemData } = this.props.navProps;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\r\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\r\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\r\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\r\n const imageSource = item.image.src;\r\n this.promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n return null;\r\n });\r\n }\r\n }\r\n this.state = {\r\n activeMenu: NavMenuConstants.rootMenu,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined,\r\n isDrawerOpen: false,\r\n desktopCategoryId: -1,\r\n isOnlyMobile: this.isOnlyMobile,\r\n categoryImage: this.promotionalImage,\r\n isNavOpen: false\r\n };\r\n\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.navProps.context.request.telemetryPageName!,\r\n this.props.navProps.friendlyName,\r\n this.props.navProps.telemetry\r\n );\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n }\r\n\r\n @computed public get isOnlyMobile(): boolean {\r\n return isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs';\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\r\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\r\n this._customUpdateViewport();\r\n document.body.addEventListener('mousedown', this._handleClickOutside);\r\n this._addShopAllLink();\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\r\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\r\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.currentLevel = NavMenuConstants.one;\r\n const navbarKey = 'header-nav-mobile';\r\n return (\r\n \r\n {this.state.isOnlyMobile ? (\r\n this._renderMobileMenu()\r\n ) : (\r\n <>\r\n \r\n {this.props.navProps.config.rootMenuNavigation}\r\n \r\n {this._renderCollapseMenu()}\r\n \r\n )}\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Function to handle nav bar toggle.\r\n */\r\n private readonly _toggleNavBar = (): void => {\r\n this.setState(previousState => ({\r\n activeMenu: NavMenuConstants.rootMenu,\r\n isNavOpen: !previousState.isNavOpen\r\n }));\r\n };\r\n\r\n private _renderCollapseMenu(): JSX.Element | null {\r\n return (\r\n \r\n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\r\n \r\n );\r\n }\r\n\r\n private _renderMobileMenu(): JSX.Element {\r\n const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\r\n\r\n this.currentLevel = NavMenuConstants.one;\r\n return (\r\n \r\n \r\n {this.state.isOnlyMobile && this.state.activeMenu !== undefined && (\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n )}\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDesktopMenu(): JSX.Element {\r\n const { Navigation } = this.props.navProps;\r\n return (\r\n \r\n \r\n {this._renderDisplay()}\r\n
    \r\n
    \r\n
    \r\n
    \r\n );\r\n }\r\n\r\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\r\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\r\n return this._renderLinkMenuItem(item);\r\n } else if (!item.linkURL) {\r\n return this._renderSpanMenuItem(item);\r\n }\r\n return null;\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const { ListItem } = this.props.navProps;\r\n let menuItemData: IMenuItemData[] = [];\r\n if (this.state.isOnlyMobile) {\r\n menuItemData = this.menuItemData;\r\n } else {\r\n menuItemData = this.props.navProps.menuItemData;\r\n }\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n let cmsMenuData: IMenuItemData[] | undefined = [];\r\n let retailMenuItemData: IMenuItemData[] | undefined = [];\r\n const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\r\n\r\n for (const item of retailMenuData) {\r\n retailMenuItemData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n item.subMenu = retailMenuItemData;\r\n }\r\n\r\n for (const item of menuItemData) {\r\n cmsMenuData = item.subMenu!.filter(subMenuItem => subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail);\r\n }\r\n\r\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\r\n let menuItem: IMenuItemData | null = {};\r\n for (const menuItemDatum of menuItemData) {\r\n if (menuItemDatum.id === activeMenu) {\r\n menuItem = menuItemDatum;\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({\r\n parentMenu: undefined\r\n });\r\n } else {\r\n this.setState({\r\n parentMenu: undefined,\r\n mobileViewLabelText: menuItemDatum.linkText\r\n });\r\n }\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemDatum);\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n if (menuItem) {\r\n menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}{' '}\r\n \r\n );\r\n }\r\n } else {\r\n for (const [index, item] of retailMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n
    \r\n );\r\n }\r\n\r\n for (const [index, item] of cmsMenuData.entries()) {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n }\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item?.subMenu;\r\n if (subMenus && ArrayExtensions.hasElements(subMenus)) {\r\n for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\r\n const subMenu: IMenuItemData = subMenus[Number(index)];\r\n let parentMenuId = item?.id;\r\n\r\n if (subMenu.id === this.state.activeMenu) {\r\n if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\r\n parentMenuId = undefined;\r\n }\r\n\r\n if (!NavigationMenuRootEnabled.isBackTrack) {\r\n this.setState({ parentMenu: parentMenuId });\r\n } else {\r\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\r\n }\r\n return subMenu;\r\n }\r\n const found = this._getFromSubMenu(subMenu);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\r\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\r\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false);\r\n }\r\n return (\r\n <>\r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n );\r\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\r\n return this._renderLinkMenuItem(menuItemData, menuItemData.id);\r\n } else if (!menuItemData.linkURL) {\r\n return this._renderSpanMenuItem(menuItemData);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\r\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\r\n if (activeMenu === NavMenuConstants.rootMenu) {\r\n subMenus = subMenuArray!.filter(subMenuItem => subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail);\r\n }\r\n\r\n const { ListItem } = this.props.navProps;\r\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\r\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\r\n\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\r\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\r\n const hasOptions = option.subMenu && ArrayExtensions.hasElements(option.subMenu);\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && this.state.isOnlyMobile) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\r\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\r\n menuItem = this.getMenuItem(option, index);\r\n } else {\r\n menuItem = null;\r\n }\r\n let subMenu;\r\n const isHavingSubmenu =\r\n hasOptions && isEnableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one;\r\n\r\n if (hasOptions && !this.state.isOnlyMobile) {\r\n if (this.currentLevel >= NavMenuConstants.two) {\r\n levelClassName = 'level-3';\r\n subMenu = this._renderSubMenuDrawer(levelClassName, option);\r\n } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\r\n this.currentLevel++;\r\n levelClassName = `level-${this.currentLevel.toString()}`;\r\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\r\n }\r\n }\r\n if (isHavingSubmenu && this.state.isOnlyMobile) {\r\n this.currentLevel++;\r\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\r\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\r\n }\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n return (\r\n \r\n {menuItem}\r\n {subMenu}\r\n \r\n );\r\n });\r\n return this._renderMenu(levelClassName, menuOptions, isSubMenu);\r\n }\r\n\r\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\r\n let menuItem: JSX.Element | null;\r\n if (this.currentLevel === NavMenuConstants.one) {\r\n menuItem = option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option);\r\n } else {\r\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option);\r\n }\r\n return menuItem;\r\n }\r\n\r\n private _renderSubMenuDrawer(levelClassName: string, menuItem: IMenuItemData): JSX.Element | null {\r\n return (\r\n \r\n
    \r\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\r\n return this._renderDrawerLink(menuSubItem);\r\n })}\r\n
    \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle desktop category click.\r\n * @param desktopCategoryId - Desktop category id used to identify the index of the category.\r\n * @returns Returns void.\r\n */\r\n private readonly _bindDesktopCategoryClick = (desktopCategoryId: number) => (): void => {\r\n if (this.state.desktopCategoryId !== desktopCategoryId) {\r\n this.setState({ desktopCategoryId, isDrawerOpen: true });\r\n } else {\r\n this.setState({ desktopCategoryId: -1, isDrawerOpen: false });\r\n }\r\n };\r\n\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n return this.state.isOnlyMobile ? (\r\n \r\n {option.linkText}\r\n \r\n ) : (\r\n <>\r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource = option.imageSource ? option.imageSource : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\r\n const { Link } = this.props.navProps;\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n if (linkText && linkUrl) {\r\n return (\r\n \r\n {linkText}\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const { Span } = this.props.navProps;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\r\n const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\r\n const isCategoryImageDisplay =\r\n !this.state.isOnlyMobile &&\r\n showCategoryImage &&\r\n this.state.categoryImage !== null &&\r\n this.state.categoryImage !== undefined &&\r\n !isSubmenu;\r\n const isPromotionalContentDisplay =\r\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\r\n const divContainerClass =\r\n this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\r\n this.currentLevel = NavMenuConstants.one;\r\n const menuLevelSupportClassName =\r\n isCategoryImageDisplay &&\r\n this.props.navProps.config.menuLevelSupport &&\r\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two &&\r\n 'navmenu-multi-level';\r\n\r\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\r\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\r\n return (\r\n \r\n \r\n {menuOptions}\r\n \r\n
    \r\n {isCategoryImageDisplay &&\r\n ArrayExtensions.hasElements(categoryImages) &&\r\n categoryImages.map(item => (\r\n \r\n {getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\r\n {isPromotionalContentDisplay &&\r\n this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\r\n \r\n ))}\r\n
    \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Handle Category image update.\r\n * @param categoryImageSource - Image source.\r\n * @param option - Menu Item data.\r\n * @returns Returns empty.\r\n */\r\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\r\n const linkText = option.linkText ? option.linkText : '';\r\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\r\n\r\n // Read category and promotional image in one array\r\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\r\n for (const item of option.promotionalContent) {\r\n const imageSource = item.image.src;\r\n promotionalImage.push({\r\n src: imageSource,\r\n altText: item.text,\r\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\r\n });\r\n }\r\n }\r\n this.setState({\r\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\r\n });\r\n };\r\n\r\n /**\r\n * Handle dropdown toggle.\r\n * @param data - Menu Item data.\r\n * @param parentId - Number.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({\r\n activeMenu: data.id,\r\n parentMenu: parentId\r\n });\r\n if (this.props.navProps.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!, data)();\r\n }\r\n } else {\r\n NavigationMenuRootEnabled.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Handle back navigation for menu items for mobile view.\r\n * @returns Returns empty.\r\n */\r\n private readonly _handleGoBack = () => () => {\r\n NavigationMenuRootEnabled.isBackTrack = true;\r\n this.setState(previousState => ({ activeMenu: previousState.parentMenu }));\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on click on body.\r\n * @param event - MouseEvent.\r\n */\r\n private readonly _handleClickOutside = (event: MouseEvent) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Add shop all link for Mobile submenu.\r\n */\r\n private readonly _addShopAllLink = (): void => {\r\n const { menuItemData } = this.props.navProps;\r\n this.menuItemData = menuItemData;\r\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\r\n this.menuItemData[0].subMenu?.map(item => {\r\n const shopAllObject = {};\r\n Object.assign(shopAllObject, { imageSource: item.imageSource });\r\n Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\r\n Object.assign(shopAllObject, { linkURL: item.linkURL });\r\n if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\r\n item.subMenu.unshift(shopAllObject);\r\n }\r\n return item;\r\n });\r\n }\r\n };\r\n\r\n /**\r\n * Checks to assign a ref for focus.\r\n * @param index -Sub menu list index.\r\n * @param mobileViewLabelText -Mobile view label text.\r\n * @param optionLinkText -Sub menu item link text.\r\n * @returns Boolean.\r\n */\r\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\r\n const firstIndex: number = 0;\r\n if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\r\n return true;\r\n }\r\n if (!optionLinkText || !mobileViewLabelText) {\r\n return false;\r\n }\r\n return mobileViewLabelText === optionLinkText;\r\n };\r\n\r\n /**\r\n * Function to handle nav menu close.\r\n */\r\n private readonly _closeNavMenu = (): void => {\r\n if (!this.state.isOnlyMobile) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n } else {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Function to close the nav menu on esc key.\r\n * @param event - Event.\r\n */\r\n private readonly _escFunction = (event: React.KeyboardEvent) => {\r\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\r\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\r\n }\r\n };\r\n\r\n /**\r\n * Custom update viewport.\r\n */\r\n private readonly _customUpdateViewport = (): void => {\r\n this.setState({ isOnlyMobile: this.isOnlyMobile });\r\n };\r\n}\r\n\r\nexport default NavigationMenuRootEnabled;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\r\nimport * as React from 'react';\r\n\r\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\r\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\r\n\r\n/**\r\n * Render the Navigation menu.\r\n * @param props - The navigation menu view props.\r\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\r\n */\r\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\r\n\r\n if (props.config.enabletopMenu) {\r\n return ;\r\n }\r\n\r\n return ;\r\n\r\n};\r\n\r\nexport default navigationMenuView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IImageData, Image } from '@msdyn365-commerce/core';\r\nimport { ISearchData } from '@msdyn365-commerce-modules/search';\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\n\r\n/**\r\n * Render Products Suggestion result heading.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nconst renderProductNotFoundResultsImage = (props: ISearchProps): JSX.Element | null => {\r\n const noSearchResultImage: IImageData | undefined = props.config.noSearchResultImage;\r\n if (!noSearchResultImage || !noSearchResultImage.src) {\r\n return null;\r\n }\r\n const imageSettings = {\r\n lazyload: true,\r\n viewports: {\r\n xs: { w: 100, h: 100, q: 'w=100&h=100&q=60&m=6' }\r\n }\r\n };\r\n return (\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Product suggestion result.\r\n * @param props -The props.\r\n * @returns The JSX Element.\r\n */\r\nexport const MobileAutoSuggestEmptyComponent = (\r\n props: ISearchProps\r\n): JSX.Element => {\r\n return (\r\n \r\n
    \r\n {renderProductNotFoundResultsImage(props)}\r\n
    \r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchTextHeading}\r\n
    \r\n
    \r\n {props.resources.emptyMobileSearchText}\r\n
    \r\n
    \r\n
    \r\n );\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { ISearchData, ISearchFormViewProps } from '@msdyn365-commerce-modules/search';\r\nimport { Button, INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nimport { ISearchProps } from '../../definition-extensions/search.ext.props.autogenerated';\r\nimport { MobileAutoSuggestEmptyComponent } from './search.mobile.empty';\r\n\r\n/**\r\n * Render Clear button for mobile viewport.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nconst renderClearButton = (clearSearchButtonText: string, clearSearch: () => void): JSX.Element => {\r\n return (\r\n \r\n {clearSearchButtonText || 'Clear'}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Render Search form.\r\n * @param form -Form view props.\r\n * @param searchForm -Search Form props.\r\n * @param formWrapper -Form Wrapper props.\r\n * @param isMobile -Is mobile viewport flag.\r\n * @param clearSearchButtonText -The Clear button text.\r\n * @param props -The props for resource.\r\n * @param isSearchText -Is SearchText flag for input text.\r\n * @param clearSearch -Clear Search callback.\r\n * @returns -The JSX Element.\r\n */\r\nexport const FormComponent = (\r\n form: ISearchFormViewProps,\r\n searchForm: INodeProps,\r\n formWrapper: INodeProps,\r\n isMobile: boolean,\r\n clearSearchButtonText: string,\r\n props: ISearchProps,\r\n isSearchText: boolean,\r\n clearSearch: () => void): JSX.Element => {\r\n\r\n // const cancelButtonNode = (\r\n // \r\n // );\r\n\r\n return (\r\n isMobile ? (\r\n \r\n {form.cancelBtn}\r\n \r\n {form.input}\r\n {isSearchText && renderClearButton(clearSearchButtonText, clearSearch)}\r\n {!isSearchText ? MobileAutoSuggestEmptyComponent(props) : null}\r\n \r\n \r\n ) : (\r\n \r\n \r\n {form.input}\r\n {form.submitBtn}\r\n {/*{isSearchText && cancelButtonNode}*/}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ISearchData, ISearchFormViewProps, ISearchViewProps } from '@msdyn365-commerce-modules/search';\r\nimport {\r\n // Button,\r\n // format,\r\n isMobile,\r\n Module,\r\n // Node,\r\n VariantType\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useCallback, useEffect, useMemo, useState } from 'react';\r\n\r\nimport { ISearchProps } from '../definition-extensions/search.ext.props.autogenerated';\r\n// import { CategorySuggestionsComponent } from './components/search.categorysuggest';\r\nimport { FormComponent } from './components/search.form';\r\n// import { KeywordSuggestionsComponent } from './components/search.keywordsuggest';\r\n// import { ProductSuggestionsComponent } from './components/search.productsuggest';\r\n// import SearchModelsAction, { SearchModelsInput } from '../../../actions/search-models.action';\r\n// import { QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\n// import { IAriServiceModelExtension } from '../../../actions/DataServiceEntities.g';\r\nimport * as _ from 'lodash';\r\n// import { AriSuggestionsComponent } from './components/search.arisuggest';\r\n// import MsDyn365, { getUrlSync } from \"@msdyn365-commerce/core\";\r\n/**\r\n * Render Title for AutoSuggest.\r\n * @param searchSuggestionHeading -The heading resource string.\r\n * @param searchText -The search string.\r\n * @returns -The JSX Element.\r\n */\r\n// const renderTitle = (searchSuggestionHeading: string, searchText: string): JSX.Element => {\r\n// const searchTextString = '\"'.concat(searchText.concat('\"'));\r\n// const searchAutoSuggestionHeading = searchSuggestionHeading\r\n// ? format(searchSuggestionHeading, searchTextString)\r\n// : `Search for ${searchTextString}`;\r\n\r\n// return {searchAutoSuggestionHeading};\r\n// };\r\n\r\n/**\r\n * Search View.\r\n * @param props - The view props.\r\n * @returns The JSX Element.\r\n */\r\nconst SearchView: React.FC> = (\r\n props: ISearchViewProps & ISearchProps\r\n): JSX.Element => {\r\n const {\r\n Search,\r\n // AutoSuggestAriaLabel,\r\n // AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n // KeywordSuggest,\r\n // ProductSuggest,\r\n // UlKeyword,\r\n // UlProduct,\r\n form,\r\n // autosuggestKeyword,\r\n // autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label,\r\n context\r\n // isLoadingAutoSuggest,\r\n // isLoadingNode,\r\n // context: {\r\n // request: { apiSettings },\r\n // actionContext\r\n // },\r\n // config: { topResultsCount }\r\n } = props;\r\n\r\n const {\r\n // searchSuggestionHeading, categorySuggestionHeading, keywordsHeading, noResultText,\r\n clearSearchButtonText\r\n } = props.resources;\r\n\r\n const [searchTextString, setSearchTextString] = useState();\r\n const [isMobilePort, setIsMobile] = useState(false);\r\n // const [ariSearchResults, setAriSearchResults] = useState([]);\r\n // const [ariSearchLoading, setAriSearchLoading] = useState(false);\r\n\r\n const debouncedSearchHandler = useMemo(() => _.debounce((search: string) => getAriSearchResults(search), 500), []);\r\n\r\n useEffect(() => {\r\n setSearchTextString(searchText);\r\n if (searchText.length > 0) debouncedSearchHandler(searchText);\r\n }, [searchText]);\r\n\r\n useEffect(() => {\r\n return () => {\r\n debouncedSearchHandler.cancel();\r\n };\r\n }, [debouncedSearchHandler]);\r\n\r\n /**\r\n * ClearSearch callback method to clear search string.\r\n */\r\n const clearSearch = (): void => {\r\n setSearchTextString('');\r\n\r\n const propsForm = props.form as ISearchFormViewProps;\r\n const propsFormInput = propsForm.input as React.DetailedHTMLProps, HTMLInputElement>;\r\n const propsFormInputCurrent = (propsFormInput.ref as React.RefObject).current;\r\n\r\n if (propsFormInputCurrent) {\r\n propsFormInputCurrent.value = '';\r\n }\r\n\r\n propsFormInput.value = '';\r\n props.searchText = '';\r\n props.FormWrapper.action = '';\r\n };\r\n\r\n const isMobileViewport = useCallback(() => {\r\n const isMobileView = isMobile({ variant: VariantType.Browser, context: context.request }) === 'xs';\r\n setIsMobile(isMobileView);\r\n }, [context]);\r\n\r\n useEffect(() => {\r\n window.addEventListener('resize', isMobileViewport);\r\n isMobileViewport();\r\n }, [isMobileViewport]);\r\n\r\n // const viewport = isMobile({ variant: VariantType.Browser, context: context.request });\r\n\r\n // const isMobileView = viewport === 'xs';\r\n\r\n AutoSuggest.className = !StringExtensions.isNullOrEmpty(searchTextString)\r\n ? `${AutoSuggest.className} show`\r\n : `${AutoSuggest.className} hide`;\r\n const isSearchText: boolean = !StringExtensions.isNullOrEmpty(searchTextString);\r\n\r\n const getAriSearchResults = async (search: string) => {\r\n // setAriSearchLoading(true);\r\n // const queryResultSettings: QueryResultSettings = {\r\n // Paging: {\r\n // Top: topResultsCount || 5\r\n // }\r\n // };\r\n // const input = new SearchModelsInput(search, queryResultSettings, 'Search', apiSettings, false);\r\n // const data = await SearchModelsAction(input, actionContext);\r\n // setAriSearchResults(data.ariSearchResults.Models || []);\r\n // setAriSearchLoading(false);\r\n };\r\n\r\n // const _generateSeeMoreUrl = (): string => {\r\n // const {\r\n // context: {\r\n // actionContext,\r\n // app: {\r\n // config: { searchQueryStringParameter }\r\n // }\r\n // }\r\n // } = props;\r\n\r\n // const query = props.searchText;\r\n // const searchQsp = searchQueryStringParameter || 'q';\r\n // const searchURL = _appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\r\n // return searchURL;\r\n // };\r\n\r\n // const _appendQueryParams = (route: string, query: string, qsp: string): string => {\r\n // if (!MsDyn365.isBrowser) {\r\n // return '';\r\n // }\r\n // const queryUrl = new URL(route, window.location.href);\r\n // if (qsp && query) {\r\n // queryUrl.searchParams.set(qsp, query);\r\n // }\r\n\r\n // return queryUrl.href;\r\n // };\r\n\r\n return (\r\n \r\n {label}\r\n {FormComponent(\r\n form as ISearchFormViewProps,\r\n SearchForm,\r\n FormWrapper,\r\n isMobilePort,\r\n clearSearchButtonText,\r\n props,\r\n isSearchText,\r\n clearSearch\r\n )}\r\n {/* {!isMobileView && (\r\n \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n {AutoSuggestAriaLabelText}\r\n ) : (\r\n ''\r\n )} */}\r\n {/* {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n \r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {ProductSuggestionsComponent(ProductSuggest, UlProduct, props, autosuggestProduct,\r\n isLoadingAutoSuggest, isLoadingNode)}\r\n\r\n {CategorySuggestionsComponent(\r\n searchTextString,\r\n categorySuggestionHeading,\r\n noResultText,\r\n props,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n {AriSuggestionsComponent(noResultText, props, ariSearchLoading, ariSearchResults, isLoadingNode)}\r\n {KeywordSuggestionsComponent(\r\n KeywordSuggest,\r\n UlKeyword,\r\n keywordsHeading,\r\n noResultText,\r\n autosuggestKeyword,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n \r\n \r\n See More\r\n \r\n ) : null} */}\r\n {/* \r\n )} */}\r\n {/* {isMobileView && props.isSearchFormExpanded && (\r\n \r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n {AutoSuggestAriaLabelText}\r\n ) : (\r\n ''\r\n )}\r\n {!StringExtensions.isNullOrEmpty(searchTextString) ? (\r\n <>\r\n \r\n {(form as ISearchFormViewProps).cancelBtn}\r\n {renderTitle(searchSuggestionHeading, searchText)}\r\n \r\n \r\n \r\n {CategorySuggestionsComponent(\r\n searchTextString,\r\n categorySuggestionHeading,\r\n noResultText,\r\n props,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n {AriSuggestionsComponent(noResultText, props, ariSearchLoading, ariSearchResults, isLoadingNode)}\r\n {KeywordSuggestionsComponent(\r\n KeywordSuggest,\r\n UlKeyword,\r\n keywordsHeading,\r\n noResultText,\r\n autosuggestKeyword,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n {ProductSuggestionsComponent(\r\n ProductSuggest,\r\n UlProduct,\r\n props,\r\n autosuggestProduct,\r\n isLoadingAutoSuggest,\r\n isLoadingNode\r\n )}\r\n \r\n \r\n ) : null}\r\n \r\n )} */}\r\n \r\n );\r\n};\r\nexport default SearchView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITabItemViewProps, TabItemType } from './tab-item';\n\nconst TabItemView: React.FC = props => {\n const { tabItemType, tabSlots, TabContentContainer, TabHeaderContainer, TabItemContent, tabHeader } = props;\n\n switch (tabItemType) {\n case TabItemType.TabContent:\n return (\n \n \n {tabSlots &&\n tabSlots.tabItemContent &&\n tabSlots.tabItemContent.length &&\n _renderTabItemContent(tabSlots.tabItemContent)}\n \n \n );\n case TabItemType.TabHeader:\n return {tabHeader};\n default:\n return null;\n }\n};\n\nconst _renderTabItemContent = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {items && items.length > 0\n ? items.map((item: React.ReactNode, index: number) => {\n return {item};\n })\n : null}\n \n );\n};\nexport default TabItemView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITileListItemViewProps } from './tile-list-item';\n\n/**\n *\n * ITileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nconst renderTileListItemContent = (props: ITileListItemViewProps): JSX.Element => {\n const {\n heading,\n paragraph,\n backgroundImage,\n links,\n thumbnailImage,\n tileListContainer,\n tileListImageContainer,\n tileListThumbnailImageContainer,\n tileListHeadingContainer\n } = props;\n\n return (\n \n {backgroundImage}\n \n {heading}\n {paragraph}\n {links}\n \n {thumbnailImage}\n \n );\n};\n\n/**\n *\n * TileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nexport const TileListItemViewComponent: React.FC = props => {\n const { tileListItem } = props;\n return {renderTileListItemContent(props)};\n};\n\nexport default TileListItemViewComponent;\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageSettings, Image, RichTextComponent } from '@msdyn365-commerce/core';\nimport { IWriteReviewData, IWriteReviewViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IWriteReviewProps } from '../definition-extensions/write-review.ext.props.autogenerated';\n\n/**\n * Render Product Image.\n * @param props - WriteReview ViewProps.\n * @returns JSX Element.\n */\nconst renderProductImage = (props: IWriteReviewViewProps & IWriteReviewProps): JSX.Element => {\n const primaryImageSource = props.data.product.result?.PrimaryImageUrl;\n const imageUrl = generateImageUrl(primaryImageSource, props.context.request.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=111&h=111&m=6', w: 111, h: 111 },\n sm: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n md: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n lg: { q: 'w=130&h=130&m=6', w: 130, h: 130 },\n xl: { q: 'w=130&h=130&m=6', w: 130, h: 130 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n return (\n \n );\n};\n\n/**\n * Render Product Description.\n * @param props - WriteReview ViewProps.\n * @returns JSX Element.\n */\nconst renderProductDescription = (props: IWriteReviewViewProps & IWriteReviewProps): JSX.Element => {\n const product = props.data.product.result;\n return (\n \n
    {renderProductImage(props)}
    \n
    \n
    {product?.Name}
    \n
    {product?.ItemId}
    \n
    \n
    \n );\n};\n\n/**\n * Create Write Review Modal.\n * @param props - WriteReview ViewProps.\n * @returns JSX Element.\n */\nconst createReviewModal = (props: IWriteReviewViewProps & IWriteReviewProps): JSX.Element => {\n const { resources, moduleProps, reviewModal } = props;\n\n return (\n \n {reviewModal.modalHeader}\n \n \n \n {renderProductDescription(props)}\n \n
    {resources.selectRatingLabel}
    \n {reviewModal.rating}\n
    \n
    \n \n {resources.reviewTitleLabel}\n {reviewModal.titleInput}\n \n \n {resources.reviewTextLabel}\n {reviewModal.textInput}\n \n {reviewModal.privacyPolicyUrl}\n {reviewModal.error}\n
    \n
    \n \n {reviewModal.submitButton}\n {reviewModal.cancelButton}\n \n
    \n );\n};\n\n/**\n * WriteReview view.\n * @param props - WriteReview ViewProps.\n * @returns WriteReview view module.\n */\nconst WriteReviewView: React.FC> = props => {\n const { config, heading, signInMessage, signInButton, modalToggle, moduleProps } = props;\n const { paragraph } = config;\n const isAuthenticated = props.context.request.user.isAuthenticated;\n const text = paragraph && ;\n\n return (\n \n {heading}\n {!isAuthenticated ? (\n <>\n {signInMessage}\n {signInButton}\n \n ) : (\n <>\n {text}\n {modalToggle}\n {createReviewModal(props)}\n \n )}\n \n );\n};\n\nexport default WriteReviewView;\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","import { IActionContext } from '@msdyn365-commerce/core-internal';\r\nimport { getUrlSync } from '@msdyn365-commerce/core';\r\n\r\nexport default function generateAriModelDetailUrl(modelId: string, brandCode: string, actionContext: IActionContext): string {\r\n const _modelDetailModelIdQueryParamKey = 'modelId';\r\n const _modelDetailBrandCodeQueryParamKey = 'brandCode';\r\n const _modelDetailSlug = 'model';\r\n let url = getUrlSync(_modelDetailSlug, actionContext);\r\n if (url) {\r\n url += `${\r\n url.indexOf('?') > -1 ? '&' : '?'\r\n }${_modelDetailModelIdQueryParamKey}=${modelId}&${_modelDetailBrandCodeQueryParamKey}=${brandCode}`;\r\n }\r\n\r\n return url || '';\r\n}\r\n"],"names":["TabItemType","TabItem","React","constructor","props","super","moduleContentClassName","moduleHeaderClassName","this","_renderTabHeader","bind","render","slots","renderView","config","data","isSelected","itemIndex","index","contentID","getContentID","tabId","activeContentIDResult","activeTabState","result","shown","undefined","activeContentIndex","_objectSpread","TabContentContainer","moduleProps","className","classnames","TabHeaderContainer","TabItemContent","tag","role","tabIndex","id","tabHeader","tabSlots","tabItemTitle","__decorate","observer","NavigationMenu","isRetail","isCMS","_setNavigationSource","sourceType","_updateViewport","viewport","context","request","device","Type","navigationMenuSource","state","isMobile","menuItemList","static","locale","nameTranslations","nameTranslation","length","find","item","Language","toLowerCase","Text","componentDidMount","MsDyn365","isBrowser","resizeThrottledEventHandler","addThrottledEvent","window","componentWillUnmount","removeEventListener","_this$props$config$di","_this$props$config$di2","_mapData","isEmptyOrNullObject","telemetry","error","viewProps","imageSettings","viewports","xs","q","w","h","xl","lazyload","gridSettings","Navigation","MenuList","ListItem","showCategoryImage","displayCategoryImage","showPromotionalContent","displayPromotionalImage","Link","DivContainer","ImageDivContainer","Button","onClick","ImageContainer","Span","MobileDescriptionContainer","MobileBackButton","resources","backButtonAriaLabel","MobileDescriptionLabel","isMobileView","menuItemData","mergedData","categories","map","push","_constructMenuItemData","cmsNavItems","idx","_constructTopMenuItemData","_this$props$config$en","_this$props$config$ro","enabletopMenu","mergedRootMenuData","topMenu","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","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","_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","heading","TabContainer","tabHeaders","tabContents","headerSection","tabsSection","tabItemContainer","Tab","tabIndexQuery","handleHeadingChange","value","_refHandler","link","activeLink","_onClick","e","update","createTabStateInput","currentTabIndex","newUrl","_setGetParameter","String","history","pushState","path","_onKeyDown","keyCode","slotLength","tabItems","defaultTabIndex","initialIndex","queryString","query","activeTab","queryTabIndex","indexOf","arr","split","Number","parseInt","_getTabHeader","_getTabContent","shouldComponentUpdate","nextProps","nextState","headingComponent","editProps","onEdit","tabViewProps","params","isEditor","dataActionTabId","selected","onKeyDown","tabItemType","TabHeader","TabContent","paramName","paramValue","url","URL","location","requestUrl","URLSearchParams","search","set","decodeURIComponent","TileListLinks","_mapEditableLinks","linkdata","editableLinks","editableLink","links","Msdyn365","onTextChange","TileListItem","_telemetryContent","handleParagraphChange","paragraph","handleLinkTextChange","linkIndex","_this$props$config$li","backgroundImage","thumbnailImage","redirectionUrl","tileListLinks","tileListLinkContainer","_createHeading","_createParagraph","_renderBackgroundImage","_renderThumbnailImage","tileListItem","tileListContainer","tileListImageContainer","tileListThumbnailImageContainer","tileListHeadingContainer","_heading$tag","StringExtensions","isNullOrWhitespace","isAriaHiddenAttribute","_item$imageSettings","_this$props$config$ba","verifiedImageSettings","moduleType","typeName","imagePropertyName","itemImageSettings","_this$props$config$th","layout","msdyn365__moduleLayout","CartLineComment","_className","_updateCartLineComment","async","_dummyCart$CartLines","cartState","cart","cartLineToUpdate","CartLines","cl","LineId","cartLineId","Comment","comment","updateCartLineQuantity","newQuantity","Quantity","isCommentAreaActive","_updateCommentState","_resetCommentToProps","_toggleCommentAreaActive","prevState","_renderStaticCommentDisplay","commentLinkText","editLinkText","_getCommentPreview","_renderCommentLink","substring","_renderSaveButton","saveButtonText","_renderCancelButton","cancelButtonText","_renderTextArea","textAreaLabel","htmlFor","_getFieldId","onChange","_renderButtonArea","_renderModal","Modal","isOpen","toggle","ModalHeader","_getModalTitle","ModalFooter","commentModalTitle","replace","cartProductTitle","staticDisplay","cartLineCommentModuleProps","modal","NavMenuConstants","getCategoryImage","alttext","categoryImageUrl","navProps","_props$navProps$confi","imageData","NavigationMenuRootDisabled","supportedLevel","four","zero","escapeKey","_toggleNavBar","previousState","isNavOpen","_bindDesktopCategoryClick","desktopCategoryId","isDrawerOpen","categoryImageSource","isOnlyMobile","_closeNavMenu","_escFunction","_customUpdateViewport","variant","VariantType","Browser","customResizeThrottledEventHandler","_renderMobileMenu","title","hamburgerAriaLabel","_renderCollapseMenu","Collapse","_renderDesktopMenu","_renderDrawerLink","entries","parentMenuId","menu","one","subMenuArray","isSubMenu","_this$props$navProps$","_this$props$navProps$2","rootMenu","subMenuItem","isEnableMultiSupportMenu","three","getMenuItem","isHavingSubmenu","two","_renderSubMenuDrawer","_renderLinkMenuItemLevelOne","_menuItem$linkText","Drawer","collapseProps","timeout","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","onToggle","menuSubItem","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","renderCategorySuggestionsTitle","inCategoriesHeading","categoryAutoSuggestionHeading","CategorySuggestionsComponent","searchText","noResultText","isLoadingAutoSuggest","isLoadingNode","autosuggestCategory","CategorySuggest","UlCategory","MobileAutoSuggestEmptyComponent","noSearchResultImage","renderProductNotFoundResultsImage","emptyMobileSearchTextHeading","emptyMobileSearchText","FormComponent","form","searchForm","formWrapper","clearSearchButtonText","isSearchText","clearSearch","cancelBtn","input","renderClearButton","submitBtn","renderKeywordSuggestionsTitle","keywordsHeading","KeywordSuggestionsComponent","keywordSuggest","ulKeyword","keywordSuggestions","renderProductSuggestionsTitle","productSuggestionsHeading","productAutoSuggestionHeading","renderProductNotFoundResults","noResultContentHeadingText","noResultContentParagraphText","ProductSuggestionsComponent","productSuggest","ulProduct","productSuggestions","productSuggestionHeading","items","_item$id","LiProduct","AProduct","thumbnail","price","AriSuggestionsComponent","noResultsText","isLoading","searchResults","loadingNode","ariModelResultsHeading","r","generateAriModelDetailUrl","Id","BrandCode","renderTitle","searchSuggestionHeading","searchTextString","concat","searchAutoSuggestionHeading","format","Search","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","UlKeyword","UlProduct","autosuggestKeyword","autosuggestProduct","SearchForm","FormWrapper","label","topResultsCount","categorySuggestionHeading","setSearchTextString","useState","isMobilePort","setIsMobile","ariSearchResults","setAriSearchResults","ariSearchLoading","setAriSearchLoading","debouncedSearchHandler","useMemo","_debounce","getAriSearchResults","useEffect","cancel","propsFormInput","propsFormInputCurrent","action","isMobileViewport","useCallback","isNullOrEmpty","queryResultSettings","Paging","Top","SearchModelsInput","SearchModelsAction","Models","cancelBtnAriaLabel","type","isSearchFormExpanded","_renderTabItemContent","tabItemContent","TileListItemViewComponent","renderTileListItemContent","menuId","drawerKeyValue","newPair","_this$menuNode$curren","_this$menuNode$curren2","_this$props$navProps$3","buttonText","keys","colProps","renderProductDescription","product","_props$data$product$r","primaryImageSource","PrimaryImageUrl","imageUrl","fallBackSrc","cropFocalRegion","renderProductImage","ItemId","signInMessage","signInButton","modalToggle","isAuthenticated","user","RichTextComponent","reviewModal","modalHeader","modalBody","inputRow","selectRatingLabel","rating","reviewTitleLabel","titleInput","reviewTextLabel","textInput","privacyPolicyUrl","modalFooter","submitButton","cancelButton","createReviewModal","modelId","brandCode","getUrlSync"],"sourceRoot":""}