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/BA,EAAe,+DAAiE,CACxFX,EAAGA,IAAMC,EAAQ,MACjBW,GAAI,uCAEpB9B,OAAO4B,aAAe5B,OAAO4B,cAAgB,CAAC,EAC9C5B,OAAO4B,aAAaC,eAAcnB,EAAAA,EAAA,GACPV,OAAO4B,aAAaC,gBAAkB,CAAC,GACvCA,UCtC3BE,EAAOC,QAAUzE,cCAjBwE,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-page-navi/components/link.tsx?e108","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-page-navi/ecomm-page-navi.tsx?256a","webpack://Msdyn365.Commerce.Online/./src/modules/ecomm-page-navi/ecomm-page-navi.view.tsx?2418","webpack://Msdyn365.Commerce.Online/./lib/ecomm-page-navi/module-registration.js?8011","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["import * as React from 'react';\r\n\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\n\r\ninterface ILink {\r\n className: string;\r\n text?: string;\r\n context: ICoreContext;\r\n href?: string;\r\n ariaLabel?: string;\r\n index: string;\r\n noclick?: boolean;\r\n telemetryContent: ITelemetryContent;\r\n}\r\n\r\n/**\r\n *\r\n * EcommContentTemplate1View component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class Link extends React.PureComponent {\r\n public render(): JSX.Element | null {\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\r\n const linkText = this.props.text !== undefined ? this.props.text : '';\r\n\r\n payLoad.contentAction.etext = linkText;\r\n\r\n // Construct telemetry attribute to render.\r\n const attribute = getTelemetryAttributes(this.props.telemetryContent, payLoad);\r\n\r\n return (\r\n \r\n {linkText}\r\n \r\n \r\n );\r\n }\r\n}\r\n\r\nexport default Link;","/*---------------------------------------------------------------------------------------------\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\r\nimport * as React from 'react';\r\n\r\nimport { getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { Link } from './components/link';\r\n\r\nimport { IEcommPageNaviData } from './ecomm-page-navi.data';\r\nimport { IEcommPageNaviProps, ILinksData } from './ecomm-page-navi.props.autogenerated';\r\n\r\nexport interface IEcommPageNaviViewProps extends IEcommPageNaviProps {\r\n links?: React.ReactNode[];\r\n PageNaviContainer: any;\r\n}\r\n\r\n/**\r\n *\r\n * EcommPageNavi component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass EcommPageNavi extends React.PureComponent> {\r\n private telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName, this.props.telemetry);\r\n\r\n public render(): JSX.Element | null {\r\n let navi = this._getCustomNaviLinks(0);\r\n\r\n const EcommPageNaviViewProps = {\r\n ...this.props,\r\n links: navi,\r\n PageNaviContainer: {\r\n className: 'ecomm-page-navi'\r\n }\r\n };\r\n\r\n return this.props.renderView(EcommPageNaviViewProps);\r\n }\r\n\r\n private _getCustomNaviLinks = (itemPosition: number): JSX.Element[] | null => {\r\n const { links } = this.props.config;\r\n\r\n if (!links || !(links.length > 0)) {\r\n this.props.context.telemetry.error('Navigation links content is empty, links will not render.');\r\n return null;\r\n }\r\n\r\n return (\r\n links.map((value: ILinksData, index: number) => {\r\n itemPosition++;\r\n\r\n const activeLink = window.location.href.includes(value.linkUrl.destinationUrl);\r\n\r\n let linkStyle = '';\r\n\r\n if (activeLink) {\r\n linkStyle = 'active-link';\r\n }\r\n\r\n return (\r\n \r\n );\r\n })\r\n );\r\n }\r\n}\r\n\r\nexport default EcommPageNavi;","/*!\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 { IEcommPageNaviViewProps } from './ecomm-page-navi';\r\n\r\n/**\r\n *\r\n * EcommPageNaviView component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class EcommPageNaviView extends React.PureComponent {\r\n public render(): JSX.Element | null {\r\n const { links, PageNaviContainer } = this.props;\r\n\r\n if (!links) {\r\n this.props.context.telemetry.error('Navigation content is empty, module will not render.');\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {links && links.map((link, index) =>\r\n
{link}
\r\n )}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default EcommPageNaviView;","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['ecomm-page-navi'] = {\n c: () => require('partner/modules/ecomm-page-navi/ecomm-page-navi.tsx'),\n $type: 'contentModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'ecomm-page-navi',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/ecomm-page-navi'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|ecomm-page-navi|ecomm-page-navi'] = {\n c: () => require('partner/modules/ecomm-page-navi/ecomm-page-navi.view.tsx'),\n cn: '__local__-__local__-ecomm-page-navi'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["Link","React","render","payLoad","getPayloadObject","this","props","telemetryContent","linkText","undefined","text","contentAction","etext","attribute","getTelemetryAttributes","Object","assign","className","href","ariaLabel","onClick","onTelemetryClick","noclick","itemProp","content","index","EcommPageNavi","constructor","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","_getCustomNaviLinks","itemPosition","links","config","length","map","value","linkStyle","window","location","includes","linkUrl","destinationUrl","key","toString","error","navi","EcommPageNaviViewProps","_objectSpread","PageNaviContainer","renderView","EcommPageNaviView","link","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}