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cjQ,KAAKC,MAAMF,OAAOmQ,aAAe,MAAMlQ,KAAKC,MAAMF,OAAOmQ,eAAiB,YACxF7P,EAASC,EAAAA,EAAA,GAGRN,KAAKC,OAAK,IACbQ,UAAYA,GAAa0E,IAAW8K,EAAaxP,IAAewP,IAGpE,OAAOjQ,KAAKC,MAAMS,WAAWL,EACjC,EAGJ,yECzBA,MAUA,EAV+CJ,IAC3C,MAAMkQ,EAAQlQ,EAAMF,OAAOqQ,SAAWvQ,EAAAA,cAAA,MAAIY,UAAW,uBAErD,OACIZ,EAAAA,cAAA,MAAAe,OAAAC,OAAA,CAAKJ,UAAWR,EAAMQ,UAAWD,GAAIP,EAAMO,IAAQP,EAAMoQ,uBAAuBpQ,IAC3EkQ,EACC","sources":["webpack://Citta2.0/./src/modules/citta-anchor/citta-anchor.tsx?89f0","webpack://Citta2.0/./src/modules/citta-anchor/citta-anchor.view.tsx?b8ff","webpack://Citta2.0/./src/modules/citta-custom-navigation-menu/components/link.tsx?05ad","webpack://Citta2.0/./src/modules/citta-custom-navigation-menu/citta-custom-navigation-menu.tsx?4aa4","webpack://Citta2.0/./src/modules/citta-custom-navigation-menu/citta-custom-navigation-menu.view.tsx?2694","webpack://Citta2.0/./src/modules/citta-footer-item/citta-footer-item.tsx?6211","webpack://Citta2.0/./src/modules/citta-footer-item/citta-footer-item.view.tsx?d119","webpack://Citta2.0/./src/modules/citta-product-attribute-link/citta-product-attribute-link.tsx?6154","webpack://Citta2.0/./src/modules/citta-product-attribute-link/citta-product-attribute-link.view.tsx?ca50","webpack://Citta2.0/./src/modules/product-comparison-button/product-comparison-button.tsx?9384","webpack://Citta2.0/./src/modules/product-comparison-button/product-comparison-button.view.tsx?94a7","webpack://Citta2.0/./src/modules/spacer/spacer.tsx?7565","webpack://Citta2.0/./src/modules/spacer/spacer.view.tsx?1f15"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\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\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICittaAnchorConfig, ICittaAnchorProps } from './citta-anchor.props.autogenerated';\r\n\r\nexport interface ICittaAnchorViewProps extends ICittaAnchorProps {\r\n Anchor: INodeProps;\r\n}\r\n\r\n/**\r\n *\r\n * CittaAnchor component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass CittaAnchor extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n const { config } = this.props;\r\n\r\n const anchorId = config && config.anchorName && config.anchorName.replace(/\\s/g, '');\r\n\r\n const viewProps: ICittaAnchorViewProps = {\r\n ...(this.props as ICittaAnchorProps),\r\n\r\n Anchor: {\r\n id: anchorId,\r\n className: ''\r\n }\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default CittaAnchor;\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\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICittaAnchorViewProps } from './citta-anchor';\r\n\r\nexport default (props: ICittaAnchorViewProps) => {\r\n const { Anchor } = props;\r\n return (\r\n \r\n );\r\n};\r\n","import { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n// import { SubLink } from './subLink'\r\n\r\ninterface ILink {\r\n className?: string;\r\n text?: string;\r\n href?: string;\r\n ariaLabel?: string;\r\n index: string;\r\n noclick?: boolean;\r\n isActive: boolean;\r\n telemetryContent: ITelemetryContent;\r\n subLinks?: any;\r\n}\r\n\r\nexport const Link: React.FC = ({ text, className, href, ariaLabel, index, noclick, telemetryContent, isActive, subLinks }) => {\r\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\r\n const linkText = text !== undefined ? text : '';\r\n payLoad.contentAction.etext = linkText;\r\n // Construct telemetry attribute to render\r\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\r\n return (\r\n \r\n );\r\n};","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport MsDyn365, { IGridSettings, IImageSettings } from '@msdyn365-commerce/core';\r\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\r\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, observable } from 'mobx';\r\nimport * as React from 'react';\r\n\r\nimport { IMenuItemData, ICittaCustomNavigationMenuData } from './citta-custom-navigation-menu.data';\r\nimport { ICittaCustomNavigationMenuProps } from './citta-custom-navigation-menu.props.autogenerated';\r\nimport { ICmsNavItemsData } from './citta-custom-navigation-menu.props.autogenerated';\r\nimport { Link } from './components/link';\r\n\r\n\r\nexport interface INavigationMenuViewProps extends ICittaCustomNavigationMenuProps {\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 showPromotionalContent?: boolean;\r\n links?: React.ReactNode;\r\n\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\r\n private resizeThrottledEventHandler?: (event: Event) => void;\r\n\r\n @observable\r\n private viewport: GridSize;\r\n\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: ICittaCustomNavigationMenuProps) {\r\n super(props);\r\n this.viewport = props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\r\n this.state = { \r\n isMobile: this.isMobile \r\n };\r\n this._updateViewport = this._updateViewport.bind(this);\r\n this._getViewport = this._getViewport.bind(this);\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 if (MsDyn365.isBrowser) {\r\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\r\n }\r\n this._updateViewport();\r\n\r\n let container = document.querySelector(\".ms-nav-custom\");\r\n if (container) {\r\n const middle = container.querySelector(\"a.active\") || container.children[Math.floor((container.children.length - 1) / 2)];\r\n \r\n container.scrollTo({\r\n top: 0,\r\n // @ts-ignore\r\n left: middle.offsetLeft + middle.offsetWidth / 2 - container.offsetWidth / 2,\r\n behavior: 'smooth'\r\n })\r\n }\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n if (MsDyn365.isBrowser) {\r\n window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { cmsNavItems } = this.props.config;\r\n\r\n if (!cmsNavItems || !cmsNavItems.length) {\r\n return null;\r\n }\r\n const viewProps = {\r\n ...this.props,\r\n ...this.state,\r\n Navigation: {\r\n moduleProps: this.props,\r\n className: classnames('ms-nav-custom', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\r\n tag: 'nav'\r\n },\r\n isMobileView: this.state.isMobile,\r\n className: classnames('ms-nav', this.props.config.className),\r\n links: this._renderLinks()\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _renderLinks(): React.ReactNode | null {\r\n const url = this.props.context.request.canonicalUrl!;\r\n const { cmsNavItems } = this.props.config;\r\n let currentNavItems;\r\n\r\n if (url) {\r\n const lastPartOfURL = url && url.substring(url.lastIndexOf('/') + 1)\r\n cmsNavItems!.forEach(navMenu => {\r\n let urls = navMenu.linkText!.split('|');\r\n if (urls.find(u => u === lastPartOfURL)) {\r\n currentNavItems = this._createLinks(navMenu, lastPartOfURL);\r\n }\r\n });\r\n }\r\n\r\n return currentNavItems;\r\n }\r\n\r\n private _createLinks(navMenu: ICmsNavItemsData, lastPartOfURL: string): React.ReactNode {\r\n let links = navMenu.subMenus?.map(menuItem => {\r\n return \r\n })\r\n\r\n return links;\r\n }\r\n\r\n public _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 (MsDyn365.isBrowser && 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 }\r\n return 'xl';\r\n }\r\n }\r\n\r\n return 'xs';\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}\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\nimport {\r\n Module\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { INavigationMenuViewProps } from './citta-custom-navigation-menu';\r\n\r\nconst NavigationMenuView: React.FC = props => {\r\n const { Navigation, links } = props;\r\n if (!links) {\r\n return null;\r\n }\r\n return (\r\n \r\n {links}\r\n \r\n );\r\n };\r\n \r\n export default NavigationMenuView;\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\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, IPayLoad, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { ICittaFooterItemConfig, ICittaFooterItemProps, IHeadingData, ILinkData } from './citta-footer-item.props.autogenerated';\r\n\r\nexport interface IFooterViewProps extends ICittaFooterItemProps {\r\n heading: React.ReactNode;\r\n image: React.ReactNode;\r\n text: React.ReactNode;\r\n linkText: React.ReactNode;\r\n className?:string;\r\n FooterItem: IModuleProps;\r\n HeadingContainer: INodeProps;\r\n ItemContainer: INodeProps;\r\n Link: INodeProps;\r\n EditableLink: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * FooterItem component\r\n * @extends {React.PureComponent>}\r\n */\r\nexport class FooterItem extends React.PureComponent> {\r\n private telemetryContent: ITelemetryContent;\r\n private payLoad: IPayLoad;\r\n private attributes: Msdyn365.IDictionary | undefined;\r\n constructor(props: ICittaFooterItemProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n // Construct telemetry attribute to render\r\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {heading, image, link, text} = this.props.config;\r\n const footerItemClassName = classnames('ms-footer__item', this.props.config.className);\r\n const linkText = link && link.linkText ? link.linkText : '';\r\n this.payLoad.contentAction.etext = linkText;\r\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\r\n const viewProps: IFooterViewProps = {\r\n ... this.props,\r\n heading: this._createHeading(heading!),\r\n image: this._createImageMarkup(image!),\r\n text:this._createText(text!),\r\n linkText: this._createLinkText(link!),\r\n EditableLink: this._createLink(link!),\r\n // @ts-ignore\r\n FooterItem: {\r\n moduleProps: this.props,\r\n className: footerItemClassName\r\n },\r\n // @ts-ignore\r\n HeadingContainer: {\r\n className: 'ms-footer__heading'\r\n },\r\n // @ts-ignore\r\n ItemContainer: {\r\n className: 'ms-footer__link__container'\r\n },\r\n // @ts-ignore\r\n Link: link && link.linkUrl && link.linkUrl.destinationUrl && {\r\n tag: 'a',\r\n className: 'ms-footer__link',\r\n href: link.linkUrl.destinationUrl,\r\n title:linkText,\r\n target: link.openInNewTab ? '_blank' : undefined,\r\n onClick: onTelemetryClick(this.telemetryContent, this.payLoad, linkText),\r\n ...this.attributes,\r\n rel: \"noopener\"\r\n },\r\n className:footerItemClassName\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\r\n\r\n public handleTextChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.text = event.target.value;\r\n\r\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.link!.linkText = event.target.value;\r\n\r\n private _createLink(link: ILinkData): React.ReactNode | null {\r\n if(link) {\r\n const linkText = link.linkText ? link.linkText : '';\r\n // TODO: Update the inner tag in the anchor link to span\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: 'ms-footer__link',\r\n linkText: linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'button',\r\n additionalProperties: this.attributes!,\r\n onClick: onTelemetryClick(this.telemetryContent, this.payLoad, linkText)\r\n };\r\n return(\r\n \r\n );\r\n\r\n }\r\n return null;\r\n }\r\n\r\n private _createLinkText(link: ILinkData): React.ReactNode | null {\r\n if(!link || !link.linkText) {\r\n return null;\r\n }\r\n\r\n return ({link.linkText});\r\n }\r\n\r\n private _createHeading(heading: IHeadingData): React.ReactNode | null {\r\n if(!heading || !heading.text || !heading.text.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _createText(text: string): 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 _createImageMarkup(item: Msdyn365.IImageData, ariaHiddenAttr?: boolean): React.ReactNode | null {\r\n if(!item || !item.src || !item.src.length) {\r\n return null;\r\n }\r\n\r\n const defaultImageSettings: Msdyn365.IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=24&h=24&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=24&h=24&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default FooterItem;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IFooterViewProps } from './citta-footer-item';\r\n\r\n/**\r\n *\r\n * FooterItemView component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class FooterItemView extends React.PureComponent {\r\n public render(): JSX.Element | null {\r\n const { FooterItem } = this.props;\r\n return(\r\n \r\n {this._renderElement(this.props)}\r\n \r\n );\r\n }\r\n\r\n private _renderElement(props: IFooterViewProps): React.ReactNode | null {\r\n const {heading, HeadingContainer,Link, linkText, image, text, EditableLink} = props;\r\n if(heading) {\r\n return ( {heading} );\r\n } else if(Link && image) {\r\n return (\r\n \r\n {linkText}\r\n {image}\r\n );\r\n } else if(Link) {\r\n return (EditableLink);\r\n }\r\n return(\r\n <>\r\n {text}\r\n {image}\r\n \r\n );\r\n }\r\n}\r\n\r\nexport default FooterItemView;","/*---------------------------------------------------------------------------------------------\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 MsDyn365 from '@msdyn365-commerce/core';\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { ICittaProductAttributeLinkData } from './citta-product-attribute-link.data';\r\nimport { ICittaProductAttributeLinkProps } from './citta-product-attribute-link.props.autogenerated';\r\n\r\nexport interface ICitttaProductAttributeLinkViewProps extends ICittaProductAttributeLinkProps {\r\n linkItem?: INodeProps;\r\n className?: string;\r\n contentBlockContainer: IModuleProps;\r\n}\r\n/**\r\n *\r\n * ContentCard component\r\n * @extends {React.PureComponent>}\r\n */\r\n\r\nclass CittaProductAttributeLink extends React.PureComponent> {\r\n \r\n public render(): JSX.Element | null {\r\n const {\r\n className\r\n } = this.props.config;\r\n\r\n const content: ICittaProductAttributeLinkData = this.props.data;\r\n\r\n const attributes = content.attributes.result;\r\n const linkAttribute = attributes?.find(attribute => attribute.Name === this.props.resources.attributeName);\r\n\r\n if (!linkAttribute || !linkAttribute.TextValue) {\r\n return null;\r\n }\r\n \r\n const contentBlockviewProps = {\r\n ...this.props,\r\n linkItem: this._renderLink(linkAttribute.TextValue),\r\n contentBlockContainer: {\r\n moduleProps: this.props,\r\n className: classnames('product-attribute-link', className),\r\n }\r\n };\r\n return this.props.renderView(contentBlockviewProps) as React.ReactElement;\r\n }\r\n\r\n private _renderLink = (linkUrl: String) => {\r\n const {\r\n linkText\r\n } = this.props.config;\r\n return this._goToLink(linkUrl)}>{linkText || 'Discover more'}\r\n };\r\n\r\n private _goToLink = (linkUrl: String) => {\r\n if (MsDyn365.isBrowser && typeof window !== 'undefined') {\r\n const baseUrl = window.location.origin;\r\n if (baseUrl.length) {\r\n window.location.assign(`${baseUrl}${linkUrl}`);\r\n }\r\n }\r\n }\r\n}\r\n\r\nexport default CittaProductAttributeLink;\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 { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ICitttaProductAttributeLinkViewProps } from './citta-product-attribute-link';\r\n\r\nconst ContentBlockView: React.FC = (props) => {\r\n const {\r\n contentBlockContainer,\r\n linkItem\r\n } = props;\r\n\r\n if (linkItem) {\r\n return (\r\n \r\n { /* @ts-ignore */ }\r\n {linkItem}\r\n \r\n );\r\n } else {\r\n return (null);\r\n }\r\n};\r\n\r\nexport default ContentBlockView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, Customer, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCatalogId } from '@msdyn365-commerce/core';\nimport { ProductComparisonItem, ProductComparisonState } from '../product-comparison-state';\nimport { IProductComparisonButtonProps } from './product-comparison-button.props.autogenerated';\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonButtonViewProps extends IProductComparisonButtonProps<{}> {\n moduleProps: IModuleProps;\n productComparisonButton?: React.ReactNode;\n productComparisonPreview?: React.ReactNode;\n}\n\n/**\n * Represents the data which is required for the product comparison button to be rendered.\n */\nexport interface IProductComparisonButtonData {\n accountInformation?: AsyncResult;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonFullProps extends IProductComparisonButtonProps {\n product: ProductSearchResult | SimpleProduct;\n catalogId: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonState {\n canProductBeAddedToProductComparison: boolean;\n currentProductsCount: number;\n comparisonItemId: string;\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonButton extends React.PureComponent {\n private static _productComparisonPreview?: React.ReactNode;\n\n private readonly _className: string;\n\n private readonly _instanceId: string;\n\n private readonly _shouldUsePreview: boolean;\n\n private static _renderProductComparisonPreview(props: IProductComparisonButtonFullProps): React.ReactNode {\n if (!ProductComparisonButton._productComparisonPreview && ArrayExtensions.hasElements(props.slots.productComparisonPreview)) {\n ProductComparisonButton._productComparisonPreview = props.slots.productComparisonPreview[0];\n }\n\n return ProductComparisonButton._productComparisonPreview;\n }\n\n private static _renderProductComparisonButton(\n className: string,\n buttonText: string | undefined,\n title: string,\n onClickHandler?: () => void\n ): React.ReactNode {\n const isDisabled = ObjectExtensions.isNullOrUndefined(onClickHandler);\n let content: React.ReactNode;\n if (buttonText) {\n content = (\n <>\n
\n
{buttonText}
\n \n );\n }\n return (\n \n );\n }\n\n public constructor(props: IProductComparisonButtonFullProps) {\n super(props);\n\n this._className = 'ms-product-comparison-button';\n this._instanceId = `${this._className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n\n this.state = this._getNewState();\n\n this._shouldUsePreview = !ProductComparisonButton._productComparisonPreview;\n ProductComparisonButton._renderProductComparisonPreview(this.props);\n }\n\n public componentDidMount(): void {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).listModifiedEvent.subscribe(\n {\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this.setState(this._getNewState());\n }\n }\n );\n }\n\n public getSnapshotBeforeUpdate(previousProps: Readonly): void {\n if (previousProps.product.RecordId !== this.props.product.RecordId || previousProps.catalogId !== this.props.catalogId) {\n this.setState(this._getNewState());\n }\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode | null {\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n if (!isConsentGiven) {\n return null;\n }\n\n const viewProps: IProductComparisonButtonViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: this._className\n }\n };\n\n if (this._shouldUsePreview) {\n viewProps.productComparisonPreview = ProductComparisonButton._productComparisonPreview;\n }\n\n const buttonClassName = this.props.config.shouldDisplayText ? `${this._className}__button` : `${this._className}__icon`;\n\n if (!this.state.canProductBeAddedToProductComparison) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.removeFromComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n classnames(`${buttonClassName}__removing`, buttonClassName),\n buttonText,\n this.props.resources.removeFromComparisonButtonText,\n this._removeFromProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit) && productsLimit <= this.state.currentProductsCount) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonLimitReachedButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonLimitReachedButtonText\n );\n return this.props.renderView(viewProps);\n }\n\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonButtonText,\n this._addToProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n private _getProductsLimit(): number | undefined | null {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Adds current product to a product comparison list.\n */\n private readonly _addToProductComparison: () => void = () => {\n const item = new ProductComparisonItem(this.props.product.RecordId, this.props.catalogId);\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).addItem(item);\n };\n\n /**\n * Removes current product from the product comparison list where it was added earlier.\n */\n private readonly _removeFromProductComparison: () => void = () => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).removeItemById(\n this.state.comparisonItemId\n );\n };\n\n private _getProdutComparisonDataByCatalogId(): ProductComparisonItem[] {\n const items = ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).items;\n const catalogId = getCatalogId(this.props.context.request);\n const productByCatalogId = items?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n\n /**\n * Retrieves the state of the component based on the comparison data.\n * @returns State object for the component.\n */\n private readonly _getNewState: () => IProductComparisonButtonState = () => {\n const comparisonItemId = ProductComparisonItem.getItemId(this.props.product.RecordId, this.props.catalogId);\n const products = this._getProdutComparisonDataByCatalogId();\n return {\n comparisonItemId,\n canProductBeAddedToProductComparison: !ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).hasItemById(comparisonItemId),\n currentProductsCount: products.length\n };\n };\n}\n\nexport default ProductComparisonButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductComparisonButtonViewProps } from './product-comparison-button';\n\n/**\n * Represents product comparison button view.\n * @param props - View props for product comparison button.\n * @returns Functional component of product comparison button.\n */\nexport const ProductComparisonButtonViewFunctionalComponent: React.FC = props => {\n const { productComparisonButton, productComparisonPreview } = props;\n\n return (\n \n {productComparisonButton}\n {productComparisonPreview}\n \n );\n};\n\nexport default ProductComparisonButtonViewFunctionalComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ISpacerProps } from './spacer.props.autogenerated';\n\nexport interface ISpacerViewProps extends ISpacerProps<{}> {\n className?: string;\n}\n\n/**\n *\n * SpacerModule component.\n * @extends {React.PureComponent}\n */\nclass Spacer extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { className } = this.props.config;\n const spacerClass = this.props.config.spacerHeight ? `ms-${this.props.config.spacerHeight}` : 'ms-spacer';\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n className: (className && classnames(spacerClass, className)) || spacerClass\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n}\n\nexport default Spacer;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nimport { ISpacerViewProps } from './spacer';\n\nconst SpacerView: React.FC = props => {\n const child = props.config.divider &&
;\n\n return (\n
\n {child}\n
\n );\n};\n\nexport default SpacerView;\n"],"names":["CittaAnchor","React","render","config","this","props","anchorId","anchorName","replace","viewProps","_objectSpread","Anchor","id","className","renderView","Node","Object","assign","Link","_ref","text","href","ariaLabel","index","noclick","telemetryContent","isActive","subLinks","payLoad","getPayloadObject","linkText","undefined","contentAction","etext","attribute","getTelemetryAttributes","onClick","onTelemetryClick","itemProp","content","NavigationMenu","constructor","super","viewport","context","request","device","Type","state","isMobile","_updateViewport","bind","_getViewport","static","locale","nameTranslations","nameTranslation","length","find","item","Language","toLowerCase","Text","componentDidMount","MsDyn365","isBrowser","resizeThrottledEventHandler","addThrottledEvent","window","container","document","querySelector","middle","children","Math","floor","scrollTo","top","left","offsetLeft","offsetWidth","behavior","componentWillUnmount","removeEventListener","cmsNavItems","Navigation","moduleProps","classnames","tag","isMobileView","links","_renderLinks","url","canonicalUrl","currentNavItems","lastPartOfURL","substring","lastIndexOf","forEach","navMenu","split","u","_createLinks","_navMenu$subMenus","subMenus","map","menuItem","linkUrl","destinationUrl","pageName","moduleName","innerWidth","gridSettings","xs","w","sm","md","lg","setState","__decorate","observable","computed","Module","FooterItem","handleHeadingChange","event","heading","target","value","handleTextChange","handleLinkTextChange","link","getTelemetryObject","telemetryPageName","friendlyName","telemetry","image","footerItemClassName","attributes","_createHeading","_createImageMarkup","_createText","_createLinkText","EditableLink","_createLink","HeadingContainer","ItemContainer","title","openInNewTab","rel","editableLink","role","additionalProperties","Msdyn365","editProps","onTextChange","requestContext","onEdit","ariaHiddenAttr","src","defaultImageSettings","viewports","q","h","lazyload","imageSettings","loadFailureBehavior","key","FooterItemView","_renderElement","CittaProductAttributeLink","_renderLink","_goToLink","baseUrl","location","origin","data","result","linkAttribute","Name","resources","attributeName","TextValue","contentBlockviewProps","linkItem","contentBlockContainer","ProductComparisonButton","_addToProductComparison","_this$props$data$acco","ProductComparisonItem","product","RecordId","catalogId","ProductComparisonState","instance","accountInformation","addItem","_removeFromProductComparison","_this$props$data$acco2","removeItemById","comparisonItemId","_getNewState","_this$props$data$acco3","getItemId","products","_getProdutComparisonDataByCatalogId","canProductBeAddedToProductComparison","hasItemById","currentProductsCount","_className","_instanceId","Random","Guid","generateGuid","_shouldUsePreview","_productComparisonPreview","_renderProductComparisonPreview","ArrayExtensions","hasElements","slots","productComparisonPreview","buttonText","onClickHandler","isDisabled","ObjectExtensions","isNullOrUndefined","Button","disabled","_this$props$data$acco4","listModifiedEvent","subscribe","instanceId","handler","getSnapshotBeforeUpdate","previousProps","_this$props$data$acco5","unsubscribe","cookies","isConsentGiven","buttonClassName","shouldDisplayText","removeFromComparisonButtonText","productComparisonButton","_renderProductComparisonButton","productsLimit","_getProductsLimit","addToComparisonLimitReachedButtonText","addToComparisonButtonText","variant","VariantType","Browser","app","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","_this$props$data$acco6","_items$filter","items","getCatalogId","filter","ProductComparisonButtonViewFunctionalComponent","Spacer","spacerClass","spacerHeight","child","divider","renderModuleAttributes"],"sourceRoot":""}