{"version":3,"sources":["webpack:///src/modules/content-block/components/additional-content.tsx?1a32","webpack:///src/modules/content-block/components/links.tsx?5056","webpack:///src/modules/content-block/content-block.tsx?8675","webpack:///./src/modules/citta-navigation-menu/citta-navigation-menu.view.tsx?ec6a","webpack:///./src/modules/citta-navigation-menu/citta-navigation-menu.props.autogenerated.ts?350a","webpack:///./src/modules/citta-navigation-menu/citta-navigation-menu.tsx?15e5","webpack:///./src/modules/citta-tile-list-item/citta-tile-list-item.view.tsx?4e9f","webpack:///./src/modules/citta-tile-list-item/components/links.tsx?c8ad","webpack:///./src/modules/citta-tile-list-item/citta-tile-list-item.tsx?04a8","webpack:///src/modules/content-block/content-block.view.tsx?a86e"],"names":["assembleNode","item","props","itemIndex","_item$links","heading","renderHeading","additionalContentHeading","requestContext","React","Msdyn365","text","tag","className","editProps","onEdit","event","handleAdditionalTextChange","subtext","renderParagraph","additionalContentParagraphText","links","map","ctaLink","index","renderLinks","linkIndex","editableLink","ariaLabel","linkText","linkUrl","destinationUrl","openInNewTab","role","key","link","onTextChange","handleAdditionalLinkTextChange","additionalContentItemContainer","additionalContentItemLinks","contentBlockAdditionalContent","additionalContent","reactNodes","push","additionalContentNode","additionalContentItems","ContentCardLinks","constructor","_mapEditableLinks","linkdata","length","editableLinks","forEach","payLoad","getPayloadObject","this","telemetryContent","contentAction","etext","attributes","getTelemetryAttributes","btnClass","additionalProperties","onClick","onTelemetryClick","render","ContentBlock","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","handleTextChange","config","target","value","handleParagraphChange","paragraph","handleLinkTextChange","Number","_heading$tag","_this$props$context$r","_this$props$config$im","image","imageAriaLabel","contentBlockTitle","imageProps","gridSettings","imageSettings","contentBlockLinks","ArrayExtensions","hasElements","LinksComponent","Object","assign","msdyn365__moduleLayout","contentBlockText","contentBlockImage","preserveImageSpace","moduleType","typeName","imagePropertyName","moduleId","id","layout","shouldSkipToMainImage","error","contentBlockviewProps","_objectSpread","title","moduleClass","contentBlockContainer","moduleProps","classnames","imageContainer","detailsContainer","contentBlockAnchorTag","imageLink","_getImageLink","handleAdditionalParagraphChange","handleAdditionalText","handleAdditionalParagraph","renderView","additionalContentObject","actionableRegion","NavigationMenuView","super","currentLevel","_updateCategoryImage","categoryImageSrc","setState","categoryImage","categoryImageAltText","_handleDropdownToggle","data","parentId","isMobileView","isBackTrack","activeMenu","mobileViewLabelText","parentMenu","state","undefined","showCategoryImage","imageSource","_resetFocus","_handleGoBack","setTimeout","menuNode","current","focus","_handleClickOutside","contains","_getCategoryImage","alttext","categoryImageUrl","generateImageUrl","actionContext","apiSettings","defaultImageSettings","viewports","xs","q","w","h","sm","md","lg","lazyload","ImageData","src","Image","categoryImageSettings","loadFailureBehavior","altText","_closeSubmenu","bind","componentDidMount","document","body","addEventListener","componentWillUnmount","removeEventListener","MenuList","MobileBackButton","MobileDescriptionContainer","MobileDescriptionLabel","Navigation","Module","Node","ref","tabIndex","_renderDisplay","ListItem","menuItemData","menuItemList","menuItem","i","_getFromSubMenu","_createMenuItemList","subMenus","subMenu","found","_renderSubMenu","_renderButtonMenuItem","linkURL","_renderLinkMenuItem","_renderSpanMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","option","idx","hasOptions","haveSubmenu","Math","round","toString","_renderMenu","Button","onFocus","hoverEffect","arguments","Link","imagesource","onMouseOver","href","Span","level","currentItem","submenu","DivContainer","ImageDivContainer","categoryImageDisplay","DivContainerClass","navigationMenuSource","NavigationMenu","isRetail","isCMS","_setNavigationSource","sourceType","retailServerOnly","cmsOnly","all","_updateViewport","viewport","device","Type","isMobile","locale","nameTranslations","nameTranslation","find","Language","toLowerCase","Text","resizeThrottledEventHandler","window","addThrottledEvent","_mapData","isEmptyOrNullObject","xl","viewProps","resources","menuAriaLabel","displayCategoryImage","ImageContainer","backButtonAriaLabel","mergedData","categories","result","_constructMenuItemData","cmsNavItems","_constructTopMenuItemData","enabletopMenu","mergedRootMenuData","topMenu","rootMenuNavigation","retailItem","cmsItem","addedAllMenu","imageSouce","Images","Uri","RSItemIdInit","getFriendlyName","NameTranslations","Url","_getNestedChildren","CMSItemIdInit","imageDestinationURL","_getCMSNestedChildren","category","imageSourceUrl","nestedChildren","Children","allCategoryMenuText","getCategoryUrl","_getViewport","innerWidth","__decorate","observable","computed","TileListItemViewComponent","tileListItem","backgroundImage","thumbnailImage","tileListContainer","tileListImageContainer","tileListThumbnailImageContainer","tileListHeadingContainer","renderTileListItemContent","TileListLinks","TileListItem","_telemetryContent","handleHeadingChange","_this$props$config$li","redirectionUrl","tileListLinks","tileListLinkContainer","_createHeading","_createParagraph","_renderBackgroundImage","_renderThumbnailImage","StringExtensions","isNullOrWhitespace","isAriaHiddenAttribute","_item$imageSettings","_this$props$config$ba","verifiedImageSettings","itemImageSettings","_this$props$config$th","renderAdditionalContent","_additionalContent$ad","ContentBlockView"],"mappings":";uQAmDA,MA4FMA,EAAeA,CACjBC,EACAC,EACAC,KAC6C,IAAAC,EAO7C,MAAO,CACHC,QAPgBJ,EAAKI,SAjGPC,EAACC,EAAkCL,EAA4CC,KACjG,MAAMK,EAAiBN,EAAMM,eAC7B,OACIC,gBAACC,IAAa,CACVC,KAAMJ,EACNK,IAAI,IACJC,UAAU,sDACVC,UAAW,CAKPC,OAAQC,IACJd,EAAMe,2BAA2Bd,EAAWa,IAEhDR,qBAkFwBF,CAAcL,EAAKI,QAASH,EAAOC,GAQnEQ,KAPkBV,EAAKiB,SAtEPC,EAACC,EAAwClB,EAA4CC,KACzG,MAAMK,EAAiBN,EAAMM,eAC7B,OACIC,gBAACC,IAAa,CACVC,KAAMS,EACNR,IAAI,IACJC,UAAU,2DACVC,UAAW,CAKPC,OAAQC,IACJd,EAAMe,2BAA2Bd,EAAWa,IAEhDR,qBAuD0BW,CAAgBlB,EAAKiB,QAAShB,EAAOC,GAQvEkB,MAPwB,QAAbjB,EAAGH,EAAKoB,aAAK,IAAAjB,OAAA,EAAVA,EAAY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pC,MA2BJ8N,a,iFC3Mf,MAAMmB,EAA2BxS,IAA8D,IAAAyS,EAC3F,OACIzU,gBAACqL,OAAIhG,OAAAC,OAAA,GAAKtD,EAAkBG,uBACiB,QADIsS,EAC5CzS,EAAkBI,8BAAsB,IAAAqS,OAAA,EAAxCA,EAA0C5T,IAAKrB,GAExCQ,2BAAA,KACKR,EAAKI,QACNI,gBAACqL,OAAIhG,OAAAC,OAAA,GAAK9F,EAAKqC,gCACVrC,EAAKU,KACNF,gBAACqL,OAAIhG,OAAAC,OAAA,GAAK9F,EAAKsC,4BAA6BtC,EAAKoB,YAyD9D8T,UAhD4CjV,IACvD,MAAM,sBACF8G,EAAqB,eACrBG,EAAc,iBACdC,EAAgB,MAChBN,EAAK,KACLnG,EAAI,MACJU,EAAK,MACL+D,EAAK,sBACLiC,EAAqB,UACrBC,EAAS,eACTjC,EAAc,kBACd5C,GACAvC,EAEJ,OAAIoH,EAEI7G,gBAACoL,SAAM/F,OAAAC,OAAA,GAAKiB,GACRvG,gBAACqL,OAAIhG,OAAAC,OAAA,GACGsB,EAAqB,CACzBkH,KAAMjH,EACNzG,UAAWwG,EAAwBA,EAAsBxG,UAAY,GAAE,aAC3DwE,IAEZ5E,gBAACqL,OAAIhG,OAAAC,OAAA,GAAKoB,GAAiB/B,IAE/B3E,gBAACqL,OAAIhG,OAAAC,OAAA,GAAKqB,GACLN,EACAnG,EACAU,EACAoB,GAAqBwS,EAAwBxS,KAM1DhC,gBAACoL,SAAM/F,OAAAC,OAAA,GAAKiB,GACRvG,gBAACqL,OAAIhG,OAAAC,OAAA,GAAKoB,GAAiB/B,GAC3B3E,gBAACqL,OAAIhG,OAAAC,OAAA,GAAKqB,GACLN,EACAnG,EACAU,EACAoB,GAAqBwS,EAAwBxS","file":"static/js/34.e5b2d2eedd9fd284a1d2.chunk.js","sourcesContent":["/*!\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 { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAdditionalContentData, ILinksData } from '../content-block.props.autogenerated';\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Component props.\n */\nexport interface IContentBlockAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData[] | undefined;\n handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content view props.\n */\nexport interface IContentBlockAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n additionalContentItems?: IContentBlockAdditionalContentItemViewProps[];\n}\n\n/**\n * IContentBlockAdditionalContentProps: Interface for\n * Content Block Additional Content Item view props.\n */\nexport interface IContentBlockAdditionalContentItemViewProps {\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentItemContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IContentBlockAdditionalContentProps, itemIndex: number) => {\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalTextChange(itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IContentBlockAdditionalContentProps, itemIndex: number, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'ms-content-block__details__additional-content-cta-links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.openInNewTab,\n role: 'link'\n };\n const requestContext = props.requestContext;\n return (\n {\n props.handleAdditionalLinkTextChange(linkIndex, itemIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Content block additonal content item props.\n * @param props - Content Block Additional content component props.\n * @param itemIndex - Item index.\n * @returns IContentBlockAdditionalContentItemViewProps.\n */\nconst assembleNode = (\n item: IAdditionalContentData,\n props: IContentBlockAdditionalContentProps,\n itemIndex: number\n): IContentBlockAdditionalContentItemViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props, itemIndex);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props, itemIndex);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, itemIndex, index);\n });\n\n return {\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentItemContainer: { className: 'ms-content-block__details__additional-content__container' },\n additionalContentItemLinks: { className: 'ms-content-block__details__additional-content-cta' }\n };\n};\n\n/**\n * ContentBlockAdditionalContent component.\n * @param props - Content Block Additional content component props.\n * @returns Content Block Additional content view props.\n */\nexport const contentBlockAdditionalContent = (\n props: IContentBlockAdditionalContentProps\n): IContentBlockAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n const reactNodes: IContentBlockAdditionalContentItemViewProps[] = [];\n additionalContent.map((item, index: number) => {\n return reactNodes.push(assembleNode(item, props, index));\n });\n\n return {\n additionalContentNode: { className: 'ms-content-block__details__additional-content' },\n additionalContentItems: reactNodes\n };\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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../content-block.props.autogenerated';\n\nexport interface IContentCardLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n role?: string;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ContentCardLinks component.\n * @extends {React.PureComponent}\n */\nexport class ContentCardLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n }\n\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\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 btnClass = index === 0 ? 'msc-cta__primary' : 'msc-cta__secondary';\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: btnClass,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: this.props.role,\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 ContentCardLinks;\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 { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { contentBlockAdditionalContent, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport LinksComponent from './components/links';\nimport { actionableRegion as region, IContentBlockConfig, IContentBlockProps } from './content-block.props.autogenerated';\n\nexport interface IContentBlockViewProps extends IContentBlockProps<{}> {\n title?: React.ReactNode;\n text?: React.ReactNode;\n image?: React.ReactNode;\n links?: React.ReactNode;\n className?: string;\n contentBlockContainer: IModuleProps;\n imageContainer: INodeProps;\n detailsContainer: INodeProps;\n contentBlockAnchorTag?: INodeProps;\n imageLink?: string;\n imageAriaLabel?: string;\n additionalContent?: IContentBlockAdditionalContentViewProps;\n handleAdditionalText?(): void;\n handleAdditionalParagraph?(): void;\n handleAdditionalLinkTextChange?(): void;\n}\n\n/**\n * Site-builder configuration for the module.\n */\nexport interface IContentBlockFullConfig extends IContentBlockConfig {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- This field comes from SDK.\n msdyn365__moduleLayout?: string;\n}\n\n/**\n * ContentCard component.\n * @extends {React.PureComponent}\n */\nexport class ContentBlock 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 render(): JSX.Element | null {\n const { heading, paragraph, image, links, className, imageAriaLabel } = this.props.config;\n const contentBlockTitle = heading && (\n \n );\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings ?? {},\n imageSettings: image?.imageSettings\n };\n const contentBlockLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const contentBlockText = paragraph && (\n \n );\n const contentBlockImage = (\n \n );\n\n if (!contentBlockTitle && !contentBlockText && !contentBlockLinks) {\n this.props.context.telemetry.error('Content block content is empty, module wont render.');\n return null;\n }\n const contentBlockviewProps = {\n ...this.props,\n title: contentBlockTitle,\n text: contentBlockText,\n image: contentBlockImage,\n links: contentBlockLinks,\n moduleClass: this.props.config.className,\n contentBlockContainer: {\n moduleProps: this.props,\n className: classnames('ms-content-block', className)\n },\n imageContainer: { className: 'ms-content-block__image' },\n detailsContainer: { className: 'ms-content-block__details' },\n contentBlockAnchorTag: {\n tag: 'a',\n className: 'ms-content-block__link',\n role: 'link'\n },\n imageLink: this._getImageLink(),\n imageAriaLabel,\n additionalContent: contentBlockAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n };\n\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\n }\n\n /**\n * To handle text change.\n * @param event - To handle text change event.\n * @name - HandleTextChange\n * @public\n * @returns - The Text value.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * To handle paragraph change.\n * @param event - To handle text change event.\n * @name - HandleParagraphChange\n * @public\n * @returns - The Paragraph value.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.paragraph = event.target.value);\n\n /**\n * Handle link text change.\n * @param linkIndex - The link index.\n * @returns - Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n public handleAdditionalTextChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].heading = event.target.value;\n }\n }\n\n public handleAdditionalLinkTextChange(linkIndex: number, index: number, event: Msdyn365.ContentEditableEvent): void {\n const additionalContentObject =\n (this.props.config.additionalContent &&\n ArrayExtensions.hasElements(this.props.config.additionalContent) &&\n this.props.config.additionalContent[Number(index)]) ||\n {};\n if (additionalContentObject.links) {\n additionalContentObject.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n public handleAdditionalParagraphChange(index: number, event: Msdyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent[Number(index)].subtext = event.target.value;\n }\n }\n\n private _getImageLink(): string | null {\n const { imageLink, links, actionableRegion } = this.props.config;\n if (actionableRegion === region.imageAndLinks) {\n if (imageLink?.destinationUrl) {\n return imageLink.destinationUrl;\n } else if (links && ArrayExtensions.hasElements(links) && links[0].linkUrl) {\n return links[0].linkUrl.destinationUrl;\n }\n return null;\n }\n return null;\n }\n}\n\nexport default ContentBlock;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable no-duplicate-imports */\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, getTelemetryObject, IPayLoad, ITelemetryContent, Module, Node, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport { IImageData, IImageSettings, Image} from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { INavigationMenuViewProps } from './citta-navigation-menu';\r\nimport { IMenuItemData } from './citta-navigation-menu.data';\r\n\r\ninterface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n categoryImage?:string|null;\r\n mobileViewLabelText?: string;\r\n categoryImageAltText:string;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenuView component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class NavigationMenuView extends React.PureComponent {\r\n private static isBackTrack: boolean = false;\r\n private currentLevel: number = 0;\r\n private menuNode: React.RefObject;\r\n private telemetryContent: ITelemetryContent;\r\n private payLoad: IPayLoad;\r\n constructor(props: INavigationMenuViewProps) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.state = {activeMenu: undefined, mobileViewLabelText: '', parentMenu: undefined,categoryImageAltText:''};\r\n this._closeSubmenu =this._closeSubmenu.bind(this);\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n }\r\n\r\n public componentDidMount(): void {\r\n document.body && document.body.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n document.body && document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation} = this.props;\r\n\r\n this.currentLevel = 1;\r\n return(\r\n \r\n \r\n {isMobileView && this.state.activeMenu !== undefined &&\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n }\r\n {this._renderDisplay()}\r\n \r\n \r\n );\r\n }\r\n\r\n private _renderDisplay(): JSX.Element[] {\r\n const {ListItem, menuItemData, isMobileView} = this.props;\r\n const {activeMenu} = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\r\n let menuItem: IMenuItemData = {};\r\n for(let i = 0; i < menuItemData.length; i++) {\r\n if (menuItemData[i] && menuItemData[i].id === activeMenu) {\r\n menuItem = menuItemData[i];\r\n !NavigationMenuView.isBackTrack ? this.setState({parentMenu: undefined}) : this.setState({parentMenu: undefined, mobileViewLabelText: menuItemData[i].linkText});\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemData[i]) as IMenuItemData;\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n menuItem && menuItemList.push (\r\n {this._createMenuItemList(menuItem)} \r\n );\r\n } else {\r\n menuItemData.forEach((item: IMenuItemData, index: number) => {\r\n menuItemList.push (\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n });\r\n }\r\n\r\n return menuItemList;\r\n }\r\n\r\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\r\n const subMenus = item && item.subMenu;\r\n if (subMenus && subMenus.length > 0) {\r\n for(let i = 0; i <= subMenus.length-1; i++) {\r\n if (subMenus[i].id === this.state.activeMenu) {\r\n !NavigationMenuView.isBackTrack ? this.setState({parentMenu: item && item.id}) : this.setState({parentMenu: item && item.id, mobileViewLabelText: subMenus[i].linkText});\r\n return subMenus[i];\r\n }\r\n const found = this._getFromSubMenu(subMenus[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n this.props.context.telemetry.error('Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\r\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\r\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id,false));\r\n } else {\r\n return (\r\n \r\n {this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id,false)}\r\n \r\n );\r\n }\r\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\r\n return (this._renderLinkMenuItem(menuItemData,menuItemData.id,false));\r\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\r\n return (this._renderSpanMenuItem(menuItemData));\r\n }\r\n this.props.context.telemetry.error('Navigation menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number,IsSubMenu?:boolean): JSX.Element | null {\r\n const {isMobileView, ListItem} = this.props;\r\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\r\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || 3;\r\n // const isParentMenu:boolean= false;\r\n if (activeMenu && this.state.activeMenu !== activeMenu) {\r\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n if (!subMenus || subMenus.length === 0) {\r\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n let levelClassName: string = '';\r\n const menuOptions = subMenus && subMenus.map((option: IMenuItemData, idx: number) => {\r\n const hasOptions = (option.subMenu && option.subMenu.length > 0);\r\n let menuItem: JSX.Element | null;\r\n if (hasOptions && isMobileView) {\r\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\r\n } else {\r\n menuItem = (option.linkURL\r\n ? this._renderLinkMenuItem(option, idx)\r\n : this._renderSpanMenuItem(option)\r\n );\r\n }\r\n\r\n let subMenu;\r\n const haveSubmenu = hasOptions && enableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu)-1);\r\n if (haveSubmenu) {\r\n this.currentLevel++;\r\n levelClassName = enableMultiSupportMenu?`level-${this.currentLevel.toString()}`:'';\r\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined,true);\r\n }\r\n return (\r\n \r\n { menuItem }\r\n { subMenu }\r\n \r\n );\r\n });\r\n return (this._renderMenu(levelClassName, menuOptions, activeMenu,IsSubMenu));\r\n }\r\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\r\n const {Button} = this.props;\r\n return (\r\n \r\n { option.linkText }\r\n \r\n );\r\n }\r\n\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number,hoverEffect:boolean=true): JSX.Element | null {\r\n const {Link} = this.props;\r\n const linkText = option.linkText ? option.linkText : '';\r\n const imagesource= option.imageSource ? option.imageSource :'';\r\n this.payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n return (\r\n \r\n { option.linkText }\r\n \r\n );\r\n }\r\n\r\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\r\n const {Span} = this.props;\r\n return (\r\n { option.linkText }\r\n );\r\n }\r\n\r\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number,submenu?:boolean): JSX.Element | null {\r\n\r\n const {DivContainer, MenuList,ImageDivContainer,showCategoryImage,isMobileView} = this.props;\r\n const categoryImageDisplay = !isMobileView && showCategoryImage && this.state.categoryImage !==null && this.state.categoryImage !==undefined && !submenu;\r\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className:'ms-nav__deafult';\r\n this.currentLevel = 1;\r\n return (\r\n \r\n 2 && 'navmenu-multi-level') }>\r\n { menuOptions }\r\n \r\n {\r\n categoryImageDisplay && this.state.categoryImage && (\r\n \r\n { this.state.categoryImage && this._getCategoryImage(this.state.categoryImage,this.state.categoryImageAltText) }\r\n )\r\n }\r\n \r\n );\r\n }\r\n private _updateCategoryImage=(categoryImageSrc:string,linkText:string) => ()=> {\r\n this.setState({\r\n categoryImage: categoryImageSrc !==''? categoryImageSrc :'empty',\r\n categoryImageAltText:linkText\r\n });\r\n }\r\n private _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.props.isMobileView) {\r\n this.setState({\r\n activeMenu: (this.state.activeMenu && this.state.activeMenu === data.id!) ? undefined : data.id!,\r\n parentMenu: parentId\r\n });\r\n if(this.props.showCategoryImage) {\r\n this._updateCategoryImage(data.imageSource!,data.linkText!)();\r\n }\r\n } else {\r\n NavigationMenuView.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 this._resetFocus();\r\n };\r\n\r\n private _handleGoBack = () => () => {\r\n NavigationMenuView.isBackTrack = true;\r\n this.setState({ activeMenu: this.state.parentMenu});\r\n\r\n this._resetFocus();\r\n };\r\n\r\n private _resetFocus = () => {\r\n if (this.props.isMobileView) {\r\n setTimeout(() => {\r\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\r\n }, 0);\r\n }\r\n }\r\n\r\n // tslint:disable-next-line:no-any\r\n private _handleClickOutside = (event: any) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target)) {\r\n this.setState(\r\n {\r\n activeMenu:undefined,\r\n mobileViewLabelText: '',\r\n categoryImage:null\r\n }\r\n );\r\n }\r\n };\r\n\r\n private _closeSubmenu():void {\r\n if (!this.props.isMobileView) {\r\n this.setState({activeMenu:undefined,categoryImage:null,mobileViewLabelText: ''});\r\n }\r\n }\r\n private _getCategoryImage=(categoryImage:string,alttext:string):React.ReactNode|null => {\r\n\r\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, this.props.context.actionContext.requestContext.apiSettings);\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\r\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n if(categoryImageUrl !== undefined) {\r\n const ImageData:IImageData = {src:categoryImageUrl};\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n}\r\n\r\nexport default NavigationMenuView;","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ICittaNavigationMenu contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum navigationMenuSource {\r\n retailServerOnly = 'retailServerOnly',\r\n cmsOnly = 'cmsOnly',\r\n all = 'all'\r\n}\r\n\r\nexport interface ICittaNavigationMenuConfig extends Msdyn365.IModuleConfig {\r\n categoryImageSettings?: Msdyn365.IImageSettings;\r\n displayCategoryImage?: boolean;\r\n navigationMenuSource?: navigationMenuSource;\r\n enableMultilevelMenu?: boolean;\r\n menuLevelSupport?: number;\r\n enabletopMenu?: boolean;\r\n rootMenuNavigation?: string;\r\n cmsNavItems?: ICmsNavItemsData[];\r\n className?: string;\r\n}\r\n\r\nexport interface ICittaNavigationMenuResources {\r\n menuAriaLabel: string;\r\n backButtonAriaLabel: string;\r\n allCategoryMenuText: string;\r\n}\r\n\r\nexport interface ICmsNavItemsData {\r\n linkText?: string;\r\n linkUrl?: Msdyn365.ILinkData;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n subMenus?: ISubMenusData[];\r\n}\r\n\r\nexport interface ISubMenusData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n subMenus?: ISubMenusData[];\r\n}\r\n\r\nexport interface ISubMenusData {\r\n linkText?: string;\r\n linkUrl: Msdyn365.ILinkData;\r\n ariaLabel?: string;\r\n image?: Msdyn365.IImageData;\r\n imageLink?: Msdyn365.ILinkData;\r\n}\r\n\r\nexport interface ICittaNavigationMenuProps extends Msdyn365.IModule {\r\n resources: ICittaNavigationMenuResources;\r\n config: ICittaNavigationMenuConfig;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject} from '@msdyn365-commerce/core';\r\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\r\nimport classnames from 'classnames';\r\nimport { computed, observable } from 'mobx';\r\nimport * as React from 'react';\r\nimport { IMenuItemData, ICittaNavigationMenuData } from './citta-navigation-menu.data';\r\nimport { ICmsNavItemsData, ICittaNavigationMenuProps, ISubMenusData, navigationMenuSource } from './citta-navigation-menu.props.autogenerated';\r\n\r\nexport interface INavigationMenuViewProps extends ICittaNavigationMenuProps {\r\n className: string;\r\n menuItemData: IMenuItemData[];\r\n Navigation: IModuleProps;\r\n MenuList: INodeProps;\r\n ListItem: INodeProps;\r\n Link: INodeProps;\r\n Button: INodeProps;\r\n Span: INodeProps;\r\n ImageContainer:INodeProps;\r\n MobileDescriptionContainer:INodeProps;\r\n MobileBackButton:INodeProps;\r\n MobileDescriptionLabel:INodeProps;\r\n imageSettings: IImageSettings;\r\n gridSettings: IGridSettings;\r\n isMobileView: boolean;\r\n DivContainer?:INodeProps;\r\n ImageDivContainer?:INodeProps;\r\n showCategoryImage?:boolean;\r\n}\r\n\r\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\r\n\r\nexport interface INavigationMenuState {\r\n isMobile: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenu component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass NavigationMenu extends React.PureComponent, INavigationMenuState> {\r\n private static CMSItemIdInit: number = 1000;\r\n private static RSItemIdInit: number = 5000;\r\n private resizeThrottledEventHandler?: (event: Event) => void;\r\n private menuItemList: IMenuItemData[];\r\n private isRetail: boolean = true;\r\n private isCMS: boolean = true;\r\n @observable\r\n private viewport: GridSize;\r\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\r\n let nameTranslation: TextValueTranslation | undefined;\r\n if (locale && nameTranslations && nameTranslations.length > 0) {\r\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\r\n }\r\n\r\n return nameTranslation && nameTranslation.Text;\r\n }\r\n\r\n constructor(props: ICittaNavigationMenuProps) {\r\n super(props);\r\n this._updateViewport = this._updateViewport.bind(this);\r\n this.viewport = props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\r\n this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\r\n this.state = {isMobile: this.isMobile};\r\n this.menuItemList = [];\r\n }\r\n\r\n @computed get isMobile(): boolean {\r\n return (this.viewport === 'xs' || this.viewport === 'sm');\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.resizeThrottledEventHandler =\r\n window && addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\r\n this._updateViewport();\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n window && window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n this.menuItemList = this._mapData();\r\n if (isEmptyOrNullObject(this.props.data)) {\r\n this.props.telemetry.error('Navigatiomenu returned null');\r\n return null;\r\n }\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=224&h=300&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=224&h=300&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n const viewProps = {\r\n ...this.props,\r\n ...this.state,\r\n imageSettings: defaultImageSettings,\r\n gridSettings: this.props.context.request.gridSettings,\r\n Navigation: {\r\n moduleProps: this.props,\r\n className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\r\n tag:'nav',\r\n role:'navigation',\r\n 'aria-label': this.props.resources.menuAriaLabel\r\n },\r\n MenuList: {\r\n className: 'ms-nav__list',\r\n tag:'ul',\r\n role: 'menu'\r\n },\r\n ListItem: {\r\n className: 'ms-nav__list__item',\r\n role: 'presentation',\r\n tag:'li'\r\n },\r\n showCategoryImage:this.props.config.displayCategoryImage||false,\r\n Link: {\r\n tag: 'a',\r\n className: 'ms-nav__list__item__link',\r\n role: 'menuitem'\r\n },\r\n DivContainer:\r\n {\r\n tag: 'div',\r\n className:'ms-nav__feature',\r\n role:'menuitem'\r\n },\r\n ImageDivContainer:\r\n {\r\n tag:'div',\r\n className:'category-image',\r\n role:'tabpanel'\r\n },\r\n Button: {\r\n className: 'ms-nav__list__item__button',\r\n tag:'button',\r\n role:'menuitem',\r\n onClick:this.props\r\n },\r\n ImageContainer: {\r\n className: 'ms-nav__list__item__image'\r\n },\r\n Span: {\r\n className: 'ms-nav__list__item__span',\r\n tag:'span'\r\n },\r\n MobileDescriptionContainer: {\r\n className: 'ms-nav__list__mobile__container'\r\n },\r\n MobileBackButton: {\r\n className: 'ms-nav__list__mobile__container__button',\r\n tag:'button',\r\n 'aria-label': this.props.resources.backButtonAriaLabel,\r\n onClick:this.props\r\n },\r\n MobileDescriptionLabel: {\r\n className: 'ms-nav__list__mobile__container__span',\r\n tag:'span'\r\n },\r\n isMobileView: this.state.isMobile,\r\n menuItemData: this.menuItemList,\r\n className: classnames('ms-nav', this.props.config.className)\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _mapData(): IMenuItemData[] {\r\n const { data, config } = this.props;\r\n const mergedData: IMenuItemData[] = [];\r\n if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\r\n data.categories.result.map((item: CategoryHierarchy,index) => (\r\n mergedData.push(this._constructMenuItemData(item, undefined, true,index,true))\r\n ));\r\n }\r\n\r\n if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\r\n config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) => (\r\n mergedData.push(this._constructMenuItemData(undefined, item, false, idx+1))\r\n ));\r\n }\r\n return this._constructTopMenuItemData(mergedData);\r\n }\r\n private _constructTopMenuItemData(mergedData:IMenuItemData[]):IMenuItemData[] {\r\n const enableTopLevelMenu = this.props.config.enabletopMenu||false;\r\n if(!enableTopLevelMenu) {\r\n return mergedData;\r\n }\r\n const mergedRootMenuData: IMenuItemData[] = [];\r\n const topMenu = {\r\n id:1,\r\n linkText:this.props.config.rootMenuNavigation||'...',\r\n linkURL:'#',\r\n imageSource:undefined,\r\n subMenu: mergedData\r\n } as IMenuItemData;\r\n mergedRootMenuData.push(topMenu);\r\n\r\n return mergedRootMenuData;\r\n }\r\n // tslint:disable-next-line: cyclomatic-complexity\r\n private _constructMenuItemData(retailItem?: CategoryHierarchy, cmsItem?: ICmsNavItemsData, isRetail?: boolean, idx?: number,addedAllMenu?:boolean): IMenuItemData {\r\n const locale = this.props.context && this.props.context.request && this.props.context.request.locale ? this.props.context.request.locale : 'en-us';\r\n const imageSouce = retailItem && retailItem.Images && retailItem.Images[0].Uri ? retailItem.Images[0].Uri: 'empty';\r\n if (isRetail) {\r\n return {\r\n id: NavigationMenu.RSItemIdInit++,\r\n linkText: NavigationMenu.getFriendlyName(locale, retailItem && retailItem.NameTranslations) || '',\r\n linkURL: retailItem && retailItem.Url,\r\n imageSource: imageSouce,\r\n subMenu: this._getNestedChildren(retailItem,imageSouce,addedAllMenu)\r\n } as IMenuItemData;\r\n } else {\r\n return {\r\n id: NavigationMenu.CMSItemIdInit++,\r\n linkText: cmsItem && cmsItem.linkText || '',\r\n linkURL: cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl || '',\r\n imageDestinationURL: cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl || '',\r\n imageSource: cmsItem && cmsItem.image && cmsItem.image.src || '',\r\n subMenu: this._getCMSNestedChildren(cmsItem)\r\n } as IMenuItemData;\r\n }\r\n }\r\n private _getNestedChildren(category?: CategoryHierarchy,imageSourceUrl?:string,addedAllMenu:boolean=false): IMenuItemData[] {\r\n const nestedChildren: IMenuItemData[] = [];\r\n if (!category || !category.Children || !category.Children.length) {\r\n return [];\r\n }\r\n if(!this.props.config.enabletopMenu && addedAllMenu) {\r\n nestedChildren.push({linkText: this.props.resources.allCategoryMenuText,imageSource:imageSourceUrl,linkURL: getCategoryUrl(category, this.props.context as unknown as IActionContext, {}) });\r\n }\r\n category.Children.map((item: CategoryHierarchy,index) => {\r\n nestedChildren.push(this._constructMenuItemData(item, undefined, true,index,false));\r\n });\r\n return nestedChildren;\r\n }\r\n\r\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\r\n const nestedChildren: IMenuItemData[] = [];\r\n\r\n if (!category || !category.subMenus || !category.subMenus.length) {\r\n return [];\r\n }\r\n\r\n category.subMenus.map((item: ISubMenusData, idx: number) => {\r\n nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\r\n });\r\n return nestedChildren;\r\n }\r\n\r\n private _setNavigationSource = (sourceType?: navigationMenuSource): void => {\r\n switch(sourceType) {\r\n case navigationMenuSource.retailServerOnly:\r\n this.isRetail = true;\r\n this.isCMS = false;\r\n break;\r\n case navigationMenuSource.cmsOnly:\r\n this.isRetail = false;\r\n this.isCMS = true;\r\n break;\r\n case navigationMenuSource.all:\r\n this.isRetail = true;\r\n this.isCMS = true;\r\n break;\r\n default:\r\n }\r\n }\r\n\r\n private _updateViewport(): void {\r\n this.viewport = this._getViewport();\r\n this.setState({ isMobile: this.isMobile });\r\n }\r\n\r\n private _getViewport(): GridSize {\r\n const { context } = this.props;\r\n\r\n // always render in mobile viewport on a mobile device\r\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\r\n return 'xs';\r\n }\r\n\r\n if (typeof window !== undefined && window.innerWidth) {\r\n const gridSettings = context.request.gridSettings;\r\n if (gridSettings) {\r\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\r\n return 'xs';\r\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\r\n return 'sm';\r\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\r\n return 'md';\r\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\r\n return 'lg';\r\n } else {\r\n return 'xl';\r\n }\r\n }\r\n }\r\n\r\n return 'xs';\r\n }\r\n}\r\n\r\nexport default NavigationMenu;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ITileListItemViewProps } from './citta-tile-list-item';\r\n\r\n/**\r\n *\r\n * ITileListItemViewProps component.\r\n * @param props - Component props.\r\n * @returns TileListView.\r\n */\r\nconst renderTileListItemContent = (props: ITileListItemViewProps): JSX.Element => {\r\n const {\r\n heading,\r\n paragraph,\r\n backgroundImage,\r\n links,\r\n thumbnailImage,\r\n tileListContainer,\r\n tileListImageContainer,\r\n tileListThumbnailImageContainer,\r\n tileListHeadingContainer\r\n } = props;\r\n\r\n return (\r\n \r\n {backgroundImage}\r\n \r\n {heading}\r\n {paragraph}\r\n {links}\r\n \r\n {thumbnailImage}\r\n \r\n );\r\n};\r\n\r\n/**\r\n *\r\n * TileListItemViewProps component.\r\n * @param props - Component props.\r\n * @returns TileListView.\r\n */\r\nexport const TileListItemViewComponent: React.FC = props => {\r\n const { tileListItem } = props;\r\n return {renderTileListItemContent(props)};\r\n};\r\n\r\nexport default TileListItemViewComponent;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ILinksData } from '../citta-tile-list-item.props.autogenerated';\r\n\r\n/**\r\n * Tile List links.\r\n */\r\nexport interface ITileListLinks {\r\n links: ILinksData[];\r\n requestContext: Msdyn365.IRequestContext;\r\n telemetryContent: ITelemetryContent;\r\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\r\n}\r\n\r\n/**\r\n *\r\n * ITileListLinks component.\r\n * @extends {React.PureComponent}\r\n */\r\nexport class TileListLinks extends React.PureComponent {\r\n public render(): JSX.Element {\r\n const editableLinks = this._mapEditableLinks(this.props.links);\r\n return (\r\n
\r\n {editableLinks && ArrayExtensions.hasElements(editableLinks) ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * ITileListLinks component.\r\n * @param linkdata - Link data.\r\n * @returns Editable links.\r\n */\r\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\r\n if (!ArrayExtensions.hasElements(linkdata)) {\r\n return null;\r\n }\r\n const editableLinks: Msdyn365.ILinksData[] = [];\r\n for (const link of linkdata) {\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\r\n const linkText = link.linkText ? link.linkText : '';\r\n payLoad.contentAction.etext = linkText;\r\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: 'ms-tile-list__link',\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'button',\r\n additionalProperties: attributes,\r\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\r\n };\r\n editableLinks.push(editableLink);\r\n }\r\n\r\n return editableLinks;\r\n };\r\n}\r\nexport default TileListLinks;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { TileListLinks } from './components';\r\nimport { IHeadingData, ICittaTileListItemProps } from './citta-tile-list-item.props.autogenerated';\r\n\r\n/**\r\n * Tile-list-item view props.\r\n */\r\nexport interface ITileListItemViewProps extends ICittaTileListItemProps<{}> {\r\n heading?: React.ReactNode;\r\n paragraph?: React.ReactNode;\r\n links?: React.ReactNode;\r\n backgroundImage?: React.ReactNode;\r\n thumbnailImage?: React.ReactNode;\r\n tileListItem: IModuleProps;\r\n tileListContainer: INodeProps;\r\n tileListImageContainer: INodeProps;\r\n tileListThumbnailImageContainer: INodeProps;\r\n tileListHeadingContainer: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * TileListItem component.\r\n * @extends {React.PureComponent>}\r\n */\r\nexport class TileListItem extends React.PureComponent> {\r\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n public constructor(props: ICittaTileListItemProps<{}>) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { heading, paragraph, backgroundImage, thumbnailImage, redirectionUrl, links } = this.props.config;\r\n const tileListLinks = links && ArrayExtensions.hasElements(links) && (\r\n \r\n );\r\n const tileListLinkContainer = {\r\n tag: 'a' as NodeTag,\r\n className: 'ms-tile-list-container',\r\n role: 'link',\r\n href: redirectionUrl?.linkUrl.destinationUrl,\r\n 'aria-label': redirectionUrl?.ariaLabel\r\n };\r\n\r\n const tileListButtonContainer = {\r\n tag: 'button' as NodeTag,\r\n className: 'ms-tile-list-container'\r\n };\r\n const viewProps: ITileListItemViewProps = {\r\n ...this.props,\r\n heading: this._createHeading(heading),\r\n paragraph: this._createParagraph(paragraph),\r\n backgroundImage: this._renderBackgroundImage(backgroundImage),\r\n thumbnailImage: this._renderThumbnailImage(thumbnailImage),\r\n links: tileListLinks,\r\n tileListItem: {\r\n moduleProps: this.props,\r\n className: ''\r\n },\r\n tileListContainer: redirectionUrl ? tileListLinkContainer : tileListButtonContainer,\r\n tileListImageContainer: {\r\n className: 'ms-tile-list__image'\r\n },\r\n tileListThumbnailImageContainer: {\r\n className: 'ms-tile-list__thumbnail_image',\r\n 'aria-hidden': 'true'\r\n },\r\n tileListHeadingContainer: {\r\n className: 'ms-tile-list__heading'\r\n }\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Handles heading content change event.\r\n * @param event - Content editable event.\r\n */\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.heading!.text = event.target.value;\r\n };\r\n\r\n /**\r\n * Handles paragraph content change event.\r\n * @param event - Content editable event.\r\n */\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\r\n this.props.config.paragraph = event.target.value;\r\n };\r\n\r\n /**\r\n * Handles paragraph content change event.\r\n * @param linkIndex - Index of link in linkarray.\r\n * @returns Void.\r\n */\r\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent): void => {\r\n if (this.props.config.links?.[Number(linkIndex)]) {\r\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\r\n }\r\n };\r\n\r\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\r\n if (!text) {\r\n return null;\r\n }\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _createHeading(heading?: IHeadingData): React.ReactNode | null {\r\n if (!heading) {\r\n return null;\r\n }\r\n if (StringExtensions.isNullOrWhitespace(heading.text)) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderBackgroundImage(item?: Msdyn365.IImageData, isAriaHiddenAttribute?: boolean): React.ReactNode | null {\r\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\r\n\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=500&h=500&m=6', w: 500, h: 500 },\r\n sm: { q: 'w=600&h=600&m=6', w: 600, h: 600 },\r\n md: { q: 'w=700&h=700&m=6', w: 700, h: 700 },\r\n lg: { q: 'w=800&h=800&m=6', w: 800, h: 800 },\r\n xl: { q: 'w=900&h=900&m=6', w: 900, h: 900 }\r\n },\r\n lazyload: true\r\n };\r\n const verifiedImageSettings = item?.imageSettings?.viewports ? item.imageSettings : defaultImageSettings;\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderThumbnailImage(\r\n item?: Msdyn365.IImageData,\r\n itemImageSettings?: Msdyn365.IImageSettings,\r\n isAriaHiddenAttribute?: boolean\r\n ): React.ReactNode | null {\r\n if (!item) {\r\n return null;\r\n }\r\n if (StringExtensions.isNullOrWhitespace(item.src)) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default TileListItem;\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 { IContentBlockAdditionalContentItemViewProps, IContentBlockAdditionalContentViewProps } from './components/additional-content';\nimport { IContentBlockViewProps } from './content-block';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IContentBlockAdditionalContentViewProps) => {\n return (\n \n {additionalContent.additionalContentItems?.map((item: IContentBlockAdditionalContentItemViewProps) => {\n return (\n <>\n {item.heading}\n \n {item.text}\n {item.links}\n \n \n );\n })}\n \n );\n};\n\nconst ContentBlockView: React.FC = props => {\n const {\n contentBlockContainer,\n imageContainer,\n detailsContainer,\n title,\n text,\n links,\n image,\n contentBlockAnchorTag,\n imageLink,\n imageAriaLabel,\n additionalContent\n } = props;\n\n if (imageLink) {\n return (\n \n \n {image}\n \n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n }\n return (\n \n {image}\n \n {title}\n {text}\n {links}\n {additionalContent && renderAdditionalContent(additionalContent)}\n \n \n );\n};\n\nexport default ContentBlockView;\n"],"sourceRoot":""}