{"version":3,"sources":["webpack:///./src/modules/citta-product-collection/citta-product-collection.view.tsx?1588","webpack:///./src/themes/citta-international/views/checkout-shipping-address.view.tsx?d59f","webpack:///./src/themes/citta/views/checkout-shipping-address.view.tsx?e050","webpack:///./src/modules/citta-product-collection/components/product-component.tsx?5a7c","webpack:///./src/modules/citta-product-collection/citta-product-collection.props.autogenerated.ts?c824","webpack:///./src/modules/citta-product-collection/citta-product-collection.tsx?51f9","webpack:///./src/modules/citta-product-eoq/citta-product-eoq.view.tsx?95b7","webpack:///src/modules/product-page-summary/product-page-summary.tsx?a2ef","webpack:///./src/modules/citta-product-eoq/citta-product-eoq.tsx?0a4c"],"names":["_renderCarousel","carouselContainer","items","PropDetails","isMobile","context","request","device","Type","React","Node","Object","assign","tag","className","map","_renderProduct","_renderGrid","gridContainer","product","ProductContainer","productComponent","ProductCollectionView","props","heading","ProductCollectionContainer","products","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","Module","telemetry","error","AddressShow","_ref","AddressDetail","item","description","AddressSelect","_ref2","SelectAddress","addButton","isShowSaveButton","saveButton","isShowCancelButton","cancelButton","SelectItem","key","input","showItems","AddressAddUpdate","_ref3","AddressForm","hasError","AddressItem","label","alert","AddressError","title","message","CheckoutShippingAddressView","CheckoutShippingAddress","viewState","showAddress","showAddressSelect","showAddOrUpdateAddress","cartLineImages","isShowAddress","isShowAddresList","isShowAddOrUpdateAddress","countriesList","fieldsToHide","sortArray","arr1","sort","a","b","aKey","bKey","indexOf","country","find","length","displayData","res","filter","countryData","config","renderLabel","name","price","rating","ratingAriaLabel","roundedRating","toFixed","format","getRatingAriaLabel","ProductComponent","msdyn365Commerce","createComponent","_objectSpread","component","data","imageSettings","allowBack","telemetryContent","quickViewButton","productUrl","getProductPageUrlSync","Name","RecordId","actionContext","undefined","srcUrl","URL","apiSettings","baseUrl","search","href","pathname","updateProductUrl","payLoad","getPayloadObject","toString","attribute","getTelemetryAttributes","isUnitOfMeasureEnabled","app","unitOfMeasureDisplayType","createElement","Fragment","onClick","onTelemetryClick","cultureFormatter","formatCurrency","Price","AverageRating","gridSettings","imageUrl","altText","img","src","imageProps","cropFocalRegion","Image","loadFailureBehavior","requestContext","renderProductPlacementImage","PrimaryImageUrl","unitOfMeasure","DefaultUnitOfMeasure","Description","quickview","cloneElement","selectedProductId","renderQuickView","layout","HeadingTag","ProductCollection","constructor","super","handleHeadingChange","event","this","text","target","value","_getProduct","index","trace","getTelemetryObject","telemetryPageName","friendlyName","allowBackNavigation","resources","breaCrumbType","breadcrumbType","quickviewSlot","slots","role","freePriceText","priceFree","originalPriceText","currentPriceText","id","typeName","_getActivePrice","async","state","productRecIds","prod","projectDomain","ChannelId","channelId","CatalogId","catalogId","cart","getCartFromCustomer","affliations","AffiliationLines","getActivePricesAsync","callerContext","queryResultSettings","Date","then","activePricesResponse","productPrices","activePrice","ProductId","_activePrice$Customer","CustomerContextualPrice","BasePrice","Math","max","TradeAgreementPrice","AdjustedPrice","setState","catch","exception","debug","Error","componentDidMount","_this$props$context$a","enableAffiliationBasedPricing","user","isAuthenticated","render","catelogfeed","result","carousel","headingComponent","Msdyn365","editProps","onEdit","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","moduleProps","classnames","renderView","EoqContainer","QuantityTitleTextNode","AvailableTitleTextNode","QuantityNode","AvailableNode","ProductPageSummary","_context$request$chan","productPageSummary","keywords","sharingImageUrl","faviconUrl","canonicalUrl","productId","productBrand","productName","productDescription","productImageUrl","sharingImage","pageTitle","_constructPageTitle","HtmlHeadInclude","content","rel","_renderProductMetadata","channel","Currency","disableOgTags","_renderOgTags","disableTwitterTags","_renderTwitterTags","property","currencyCode","productMetaData","JSON","stringify","image","sku","brand","offers","url","priceCurrency","type","dangerouslySetInnerHTML","__html","moduleConfig","ignoreTitleSuffixPrefix","appConfig","platform","pageTitlePrefix","pageTitleSuffix","CittaProductEoq","e","availableQuantity","productAvailability","ProductAvailableQuantity","AvailableQuantity","productEOQ","attributes","att","quantityTitleText","availableTitleText","productEoqViewProps","classname","children","TextValue","__decorate","observer"],"mappings":";2IAWA,MAgBMA,EAAkBA,CAACC,EAA+BC,EAAoCC,KACxF,MAAMC,EAAWD,EAAYE,SAAWF,EAAYE,QAAQC,SAAuD,WAA5CH,EAAYE,QAAQC,QAAQC,OAAOC,KAK1G,OACIC,gBAACC,OAAIC,OAAAC,OAAA,GAAMR,EALe,CAC1BS,IAAK,KACLC,UAAW,0CAGqCb,GAC3CC,GAASA,EAAMa,IAAIC,KAK1BC,EAAcA,CAACC,EAA2BhB,IAExCO,gBAACC,OAAIC,OAAAC,OAAA,GAAKM,GACLhB,GAASA,EAAMa,IAAIC,IAK1BA,EAAkBG,IACpB,MAAM,iBAAEC,EAAgB,iBAAEC,GAAqBF,EAE/C,OACIV,gBAACC,OAAIC,OAAAC,OAAA,GAAKQ,GACLC,IAKEC,UA/CsDC,IACjE,MAAM,QAAEC,EAAO,2BAAEC,EAA0B,SAAEC,EAAQ,kCAAEC,EAAiC,mBAAEC,EAAkB,WAAEC,GAAeN,EAC7H,OAAIG,EAEIjB,gBAACqB,SAAMnB,OAAAC,OAAA,GAAKa,GACPD,EAEGK,EAAa7B,EAAgB2B,EAAmCD,EAAUH,GAASN,EAAYW,EAAoBF,KAKnIH,EAAMlB,QAAQ0B,UAAUC,MAAM,4DACvB,Q,yFCJX,MAAMC,EAA2CC,IAG5C,IAH6C,cAC9CC,EAAa,MACbjC,GACHgC,EAEG,OACIzB,gBAACC,OAAIC,OAAAC,OAAA,GAAKuB,GACLjC,EAAMa,IAAKqB,GAEJ3B,2BAAA,K,KAEK2B,EAAKC,gBAoBxBC,EAA+CC,IAQhD,IARiD,cAClDC,EAAa,UACbC,EAAS,MACTvC,EAAK,iBACLwC,EAAgB,WAChBC,EAAU,mBACVC,EAAkB,aAClBC,GACHN,EAEG,OACI9B,gBAACC,OAAIC,OAAAC,OAAA,GAAK4B,GACLC,EACAvC,EAAMa,IAAKqB,IACR,MA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AUC,MAAM,6BAA6BuQ,GACjD,KAGX,MAAMC,EAAoB/B,EAAQgC,qBAC3BhC,EAAQgC,oBAAoBrE,QAAUqC,EAAQgC,oBAAoBrE,OAAO,IAE5EqC,EAAQgC,oBAAoBrE,OAAO,GAAGsE,yBAAyBC,kBAE7DC,EAAanC,EAAQoC,WAAWzE,QAAUqC,EAAQoC,WAAWzE,OAAOnJ,KAAK6N,GAAoB,QAAbA,EAAIjM,MACpFkM,EAAoB5I,KAAK5I,MAAMgE,QAAU4E,KAAK5I,MAAMgE,OAAOwN,kBAAoB5I,KAAK5I,MAAMgE,OAAOwN,kBAAoB,kBACrHC,EAAqB7I,KAAK5I,MAAMgE,QAAU4E,KAAK5I,MAAMgE,OAAOyN,mBAAqB7I,KAAK5I,MAAMgE,OAAOyN,mBAAqB,aAExHlS,EAAYqJ,KAAK5I,MAAMgE,QAAU4E,KAAK5I,MAAMgE,OAAOzE,UAAYqJ,KAAK5I,MAAMgE,OAAOzE,UAAY,GACnG,GAAI8R,EAAY,CACZ,MAAMK,EAAmB7M,IAAA,GACjB+D,KAAK5I,OAAqD,IAC9D6N,aAAc,CACVH,YAAa9E,KAAK5I,MAClBT,UAAWoS,IAAU,cAAepS,IAExCuO,sBAAuB,CACnBvO,UAAW,yBACXqS,SAAUJ,GAEdzD,uBAAwB,CACpBxO,UAAW,0BACXqS,SAAUH,GAEdzD,aAAc,CACVzO,UAAW,sBACXqS,SAAUP,EAAWQ,WAEzB5D,cAAe,CACX1O,UAAW,uBACXqS,SAAUX,GAAqB,OAGvC,OAAOrI,KAAK5I,MAAM4N,WAAW8D,GAEjC,OAAO,OAhDTX,EAAee,YAAA,CADnBC,KACIhB,GAoDSA","file":"static/js/24.56c01ecdadee11d79e88.chunk.js","sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { INodeProps, Module, Node, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './citta-product-collection';\r\n\r\nconst ProductCollectionView: React.FC = props => {\r\n const { heading, ProductCollectionContainer, products, SingleSlideCarouselComponentProps, GridComponentProps, isCarousel } = props;\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {\r\n isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products, props) : _renderGrid(GridComponentProps, products)\r\n }\r\n \r\n );\r\n }\r\n props.context.telemetry.error('Product collection content is empty, module wont render.');\r\n return null;\r\n};\r\n\r\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[],PropDetails: React.PropsWithChildren): JSX.Element => {\r\n const isMobile = PropDetails.context && PropDetails.context.request && PropDetails.context.request.device.Type === 'Mobile'\r\n let mobileCarouselContainer = {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-product-collection__custom-carousel'\r\n }\r\n return (\r\n \r\n {items && items.map(_renderProduct)}\r\n \r\n );\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(_renderProduct)}\r\n \r\n );\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return (\r\n \r\n {productComponent}\r\n \r\n );\r\n};\r\n\r\nexport default ProductCollectionView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-add';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-select';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-show';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/./checkout-shipping-address';\r\n\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({\r\n AddressDetail,\r\n items\r\n}) => {\r\n\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return (\r\n <>\r\n hi\r\n {item.description}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n {item.input}\r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {heading}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n {label}\r\n {alert}\r\n {input}\r\n );\r\n })}\r\n {hasError && \r\n {error.title}\r\n {error.message}\r\n }\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC = props => {\r\n const { CheckoutShippingAddress, viewState, showAddress, showAddressSelect, showAddOrUpdateAddress, cartLineImages } = props;\r\n\r\n return (\r\n \r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-add';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-select';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/../../common/components/address-show';\r\nimport { ICheckoutShippingAddressViewProps } from '@msdyn365-commerce-modules/address/src/modules/checkout-shipping-address/./checkout-shipping-address';\r\n\r\nconst AddressShow: React.FC = ({\r\n AddressDetail,\r\n items\r\n}) => {\r\n return (\r\n \r\n {items && items.map((item: IAddressShowItem) => {\r\n return (\r\n <>\r\n {item.description}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n\r\n return (\r\n \r\n {addButton}\r\n {items && items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n {item.input}\r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nconst sortArray = (arr1: any[], arr2: any[]) => {\r\n arr2.sort((a, b) => {\r\n const aKey = a.key;\r\n const bKey = b.key;\r\n return arr1.indexOf(aKey) - arr1.indexOf(bKey);\r\n });\r\n };\r\n\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton,\r\n //@ts-ignore\r\n countriesList,\r\n //@ts-ignore\r\n fieldsToHide\r\n}) => {\r\n // re-order the address...\r\n const order = [\"Name\", \"ThreeLetterISORegionName\", \"StreetNumber\", \"Street\", \"DistrictName\", \"City\", \"State\", \"ZipCode\", \"BuildingCompliment\", \"Phone\"]\r\n sortArray(order, items);\r\n //fieldsToHide\r\n let country: any = items.find(item => item.key === 'ThreeLetterISORegionName');\r\n\r\n if (countriesList && countriesList.length && country && country.input && country.input.props.displayData) {\r\n let res = country.input.props.displayData.filter((countryData: any) => countriesList.indexOf(countryData.key) !== -1)\r\n country.input.props.displayData = res;\r\n }\r\n\r\n return (\r\n \r\n {heading}\r\n {items && items.map((item: IAddressAddItem) => {\r\n if (item.key !== \"StreetNumber\") {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n {label}\r\n {alert}\r\n {input}\r\n );\r\n }\r\n return null;\r\n })}\r\n {hasError && \r\n {error.title}\r\n {error.message}\r\n }\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutShippingAddressView: React.FC = props => {\r\n const { CheckoutShippingAddress, viewState, showAddress, showAddressSelect, showAddOrUpdateAddress, cartLineImages } = props;\r\n /* @ts-ignore */\r\n const { countriesList, fieldsToHide } = props.config;\r\n\r\n return (\r\n \r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {/* @ts-ignore */}\r\n {viewState.isShowAddOrUpdateAddress && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport {\r\n IComponent, IComponentProps, ICoreContext, IGridSettings,\r\n IImageData, IImageSettings, Image, IRequestContext, msdyn365Commerce\r\n} from '@msdyn365-commerce/core';\r\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { format, getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult }> {\r\n className?: string;\r\n imageSettings?: IImageSettings;\r\n savingsText?: string;\r\n freePriceText?: string;\r\n originalPriceText?: string;\r\n currentPriceText?: string;\r\n ratingAriaLabel?: string;\r\n allowBack?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n quickViewButton?: React.ReactNode;\r\n}\r\n\r\nexport interface IProductComponent extends IComponent { }\r\n\r\nconst PriceComponentActions = {};\r\n\r\nconst ProductCard: React.FC = ({\r\n data,\r\n context,\r\n imageSettings,\r\n ratingAriaLabel,\r\n allowBack,\r\n telemetryContent,\r\n quickViewButton\r\n}) => {\r\n const product = data.product;\r\n if (!product) {\r\n return null;\r\n }\r\n\r\n let productUrl = getProductPageUrlSync(product.Name || '', product.RecordId, context && context.actionContext, undefined);\r\n if (allowBack) {\r\n productUrl = updateProductUrl(productUrl, context);\r\n }\r\n\r\n // Construct telemetry attribute to render\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', product.RecordId.toString());\r\n\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- -- Do not need type check for appsettings\r\n const isUnitOfMeasureEnabled = context.app.config && context.app.config.unitOfMeasureDisplayType === 'buyboxAndBrowse';\r\n\r\n /**\r\n * Gets the react node for product unit of measure display.\r\n * @param unitOfMeasure - DefaultUnitOfMeasure property from product.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n function renderProductUnitOfMeasure(unitOfMeasure?: string): JSX.Element | null {\r\n\r\n if (!unitOfMeasure) {\r\n return null;\r\n }\r\n return (\r\n
\r\n \r\n {unitOfMeasure}\r\n \r\n
\r\n );\r\n\r\n }\r\n\r\n return (\r\n <>\r\n \r\n
\r\n {renderProductPlacementImage(\r\n imageSettings, context.request.gridSettings, product.PrimaryImageUrl, product.Name, context.actionContext.requestContext)}\r\n
\r\n
\r\n

\r\n {product.Name}\r\n

\r\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\r\n {renderDescription(product.Description)}\r\n
\r\n \r\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\r\n \r\n );\r\n};\r\n\r\nfunction renderLabel(name?: string, price?: string, rating?: number, ratingAriaLabel?: string): string {\r\n name = name || '';\r\n price = price || '';\r\n return (`${name} ${price} ${getRatingAriaLabel(rating, ratingAriaLabel)}`);\r\n}\r\n\r\nfunction renderDescription(description?: string): JSX.Element | null {\r\n return (

\r\n {description}\r\n

);\r\n}\r\n\r\nfunction renderQuickView(quickview: React.ReactNode, item?: number): JSX.Element | undefined {\r\n if (quickview === null) {\r\n return undefined;\r\n }\r\n return React.cloneElement(quickview as React.ReactElement, { selectedProductId: item });\r\n}\r\n\r\nfunction getRatingAriaLabel(rating?: number, ratingAriaLabel?: string): string {\r\n if (rating && ratingAriaLabel) {\r\n const roundedRating = rating.toFixed(2);\r\n return format(ratingAriaLabel || '', roundedRating, '5');\r\n }\r\n return '';\r\n}\r\n\r\nfunction updateProductUrl(productUrl: string, context: ICoreContext): string {\r\n const srcUrl = new URL(productUrl, context.request.apiSettings.baseUrl);\r\n const queryString = 'back=true';\r\n if (srcUrl.search) {\r\n srcUrl.search += `&${queryString}`;\r\n } else {\r\n srcUrl.search += queryString;\r\n }\r\n\r\n const updatedUrl = new URL(srcUrl.href);\r\n return updatedUrl.pathname + srcUrl.search;\r\n}\r\n\r\nfunction renderProductPlacementImage(\r\n imageSettings?: IImageSettings, gridSettings?: IGridSettings, imageUrl?: string, altText?: string, context?: IRequestContext): JSX.Element | null {\r\n\r\n if (!imageUrl || !gridSettings || !imageSettings) {\r\n return null;\r\n }\r\n const img: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : ''\r\n };\r\n const imageProps = {\r\n gridSettings,\r\n imageSettings\r\n };\r\n imageProps.imageSettings.cropFocalRegion = true;\r\n return (\r\n \r\n );\r\n}\r\n\r\nexport const ProductComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'Product',\r\n { component: ProductCard, ...PriceComponentActions }\r\n);\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ICittaProductCollection containerModule 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\nimport * as React from 'react';\r\n\r\nexport const enum layout {\r\n carousel = 'carousel',\r\n grid = 'grid'\r\n}\r\n\r\nexport interface ICittaProductCollectionConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n layout?: layout;\r\n allowBackNavigation?: boolean;\r\n imageSettings?: Msdyn365.IImageSettings;\r\n clientRender?: boolean;\r\n enableAffiliationBasedPricing?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface ICittaProductCollectionResources {\r\n priceFree: string;\r\n ratingAriaLabel: string;\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface ICittaProductCollectionProps extends Msdyn365.IModule {\r\n resources: ICittaProductCollectionResources;\r\n config: ICittaProductCollectionConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n };\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\n// import { ProductComponent } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCartFromCustomer } from '@msdyn365-commerce/global-state';\r\nimport { ProductPrice, ProductSearchResult, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getActivePricesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getTelemetryObject, IComponentNodeProps, IModuleProps, INodeProps, ISingleSlideCarouselProps, ITelemetryContent, NodeTag, SingleSlideCarousel } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { ICittaProductCollectionData } from './citta-product-collection.data';\r\nimport { ProductComponent } from './components/product-component';\r\n\r\nimport { ICittaProductCollectionProps, layout } from './citta-product-collection.props.autogenerated';\r\n\r\nexport interface IProductCollectionViewProps extends ICittaProductCollectionProps {\r\n heading?: React.ReactNode;\r\n ProductCollectionContainer: IModuleProps;\r\n SingleSlideCarouselComponentProps: INodeProps;\r\n GridComponentProps: INodeProps;\r\n products: IProductComponentViewProps[];\r\n isCarousel: boolean;\r\n productPrices?: ProductPrice[];\r\n}\r\n\r\nexport interface IProductComponentViewProps {\r\n ProductContainer: INodeProps;\r\n productComponent: React.ReactNode;\r\n}\r\nexport interface IProductComponentState {\r\n products: ProductSearchResult[];\r\n}\r\n\r\n/**\r\n * ProductCollection component.\r\n */\r\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private productPrices: ProductPrice[];\r\n\r\n constructor(props: ICittaProductCollectionProps) {\r\n super(props);\r\n this.productPrices = [];\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.enableAffiliationBasedPricing &&\r\n this.props.context.actionContext.requestContext?.user?.isAuthenticated) {\r\n this._getActivePrice();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className } = this.props.config;\r\n const { \r\n resources,\r\n data: {\r\n catelogfeed\r\n }\r\n } = this.props;\r\n const products = catelogfeed && catelogfeed.result;\r\n\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n const productCollectionViewProps = {\r\n ...this.props,\r\n heading: headingComponent,\r\n SingleSlideCarouselComponentProps: {\r\n tag: SingleSlideCarousel,\r\n className: '',\r\n flipperPrevLabel: resources.flipperPrevious,\r\n flipperNextLabel: resources.flipperNext,\r\n parentId: this.props.id,\r\n telemetryContent: this.telemetryContent\r\n } as IComponentNodeProps,\r\n ProductCollectionContainer: {\r\n moduleProps: this.props,\r\n className: classnames('ms-product-collection', className)\r\n },\r\n GridComponentProps: {\r\n tag: 'ul' as NodeTag,\r\n className: 'ms-product-collection__items'\r\n },\r\n isCarousel,\r\n products: products && products.length > 0 && products.map((item: ProductSearchResult, index: number) => this._getProduct(item, index)),\r\n productPrices: this.productPrices\r\n };\r\n return this.props.renderView(productCollectionViewProps) 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 private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\r\n if (!product || !product.Name) {\r\n this.props.telemetry.trace('[product-collection] Product or product name is null');\r\n return null;\r\n }\r\n const telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n const { imageSettings, allowBackNavigation } = this.props.config;\r\n const resources = this.props.resources;\r\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\r\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\r\n const quickviewSlot = this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n return {\r\n ProductContainer: {\r\n tag: 'li' as NodeTag,\r\n className: 'ms-product-collection__item',\r\n role: 'listitem',\r\n key: index\r\n },\r\n productComponent: (\r\n \r\n )\r\n };\r\n };\r\n\r\n private readonly _getActivePrice = async (): Promise => {\r\n let products = (this.state.products) || [];\r\n const productRecIds = (products && products.length > 0) ? products.map(prod => prod.RecordId) : [];\r\n const projectDomain: ProjectionDomain = { ChannelId: this.props.context.request.apiSettings.channelId, CatalogId: this.props.context.request.apiSettings.catalogId };\r\n const cart = await getCartFromCustomer(this.props.context.actionContext);\r\n const affliations = cart?.AffiliationLines;\r\n\r\n await getActivePricesAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n projectDomain,\r\n productRecIds,\r\n new Date(),\r\n null,\r\n affliations,\r\n true\r\n ).then((activePricesResponse: ProductPrice[]) => {\r\n this.productPrices = activePricesResponse;\r\n products = products.map(prod => {\r\n const activePrice = activePricesResponse.find(price => price.ProductId === prod.RecordId);\r\n if (activePrice) {\r\n prod.Price = activePrice.CustomerContextualPrice ?? prod.Price;\r\n prod.BasePrice = Math.max(activePrice.BasePrice || 0, activePrice.TradeAgreementPrice || 0, activePrice.AdjustedPrice || 0);\r\n }\r\n return prod;\r\n });\r\n this.setState({\r\n products\r\n });\r\n })\r\n .catch((error: Error) => {\r\n this.props.context.actionContext.trace(error.message);\r\n this.props.context.actionContext.telemetry.exception(error);\r\n this.props.context.actionContext.telemetry.debug('[get Affiliation based price on Product Collection]Error executing action');\r\n throw new Error('[get Affiliation based price on Product Collection]Error executing action');\r\n });\r\n };\r\n}\r\n\r\nexport default ProductCollection;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport * as React from 'react';\r\nimport { ICittaProductEoqViewProps } from './citta-product-eoq';\r\n\r\nexport default (props: ICittaProductEoqViewProps) => {\r\n const {\r\n EoqContainer,\r\n QuantityTitleTextNode,\r\n AvailableTitleTextNode,\r\n QuantityNode,\r\n AvailableNode\r\n } = props;\r\n return (\r\n \r\n
\r\n \r\n \r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { HtmlHeadInclude, IAny, IGeneric } from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\nimport { IProductPageSummaryData } from './product-page-summary.data';\nimport { IProductPageSummaryProps } from './product-page-summary.props.autogenerated';\n\n/**\n *\n * ProductPageSummary component.\n * @extends {React.PureComponent}\n */\nclass ProductPageSummary extends React.PureComponent> {\n public render(): JSX.Element {\n if (this.props.data.productPageSummary.result === undefined) {\n throw new Error('PageSummaryData input to page-summary is undefined. Unable to generate page-summary');\n }\n let {\n data: {\n productPageSummary: {\n result: { title, description, keywords, sharingImageUrl, faviconUrl }\n }\n }\n } = this.props;\n\n const {\n config,\n context,\n data: {\n productPageSummary: {\n result: { canonicalUrl, productId, productBrand, price }\n }\n }\n } = this.props;\n\n // Product SEO metadata specific information - non-overridable\n const productName = title;\n const productDescription = description;\n const productImageUrl = sharingImageUrl;\n\n // Override values coming from data action if config values are provided\n title = config.title || title;\n description = config.description || description;\n keywords = config.keywords || keywords;\n sharingImageUrl = (config.sharingImage && config.sharingImage.src) || sharingImageUrl;\n faviconUrl = config.faviconUrl || faviconUrl;\n\n // Construct page title with suffix and prefix if provided from app settings\n const pageTitle = this._constructPageTitle(title, context && context.request && context.request.app);\n return (\n <>\n \n {pageTitle && {pageTitle}}\n {description && }\n {keywords && }\n {canonicalUrl && }\n {faviconUrl && }\n \n {this._renderProductMetadata(\n productName,\n productDescription,\n productImageUrl,\n canonicalUrl,\n productId,\n price,\n context.request.channel?.Currency,\n productBrand\n )}\n {!config.disableOgTags && this._renderOgTags(pageTitle, description, sharingImageUrl)}\n {!config.disableTwitterTags && this._renderTwitterTags(pageTitle, description, sharingImageUrl)}\n \n );\n }\n\n /**\n * Renders the facebook and other social media specific metadata tags.\n *\n * @param title Page title.\n * @param description Product description.\n * @param sharingImageUrl Primary product image url.\n */\n private _renderOgTags(title: string | undefined, description: string | undefined, sharingImageUrl: string | undefined): JSX.Element {\n return (\n \n {title && }\n {description && }\n {sharingImageUrl && }\n \n \n );\n }\n\n /**\n * Constructs and renders the JSON-LD tag used to output product specific metadata used by search engine crawlers.\n *\n * @param productName Product name.\n * @param description Product description.\n * @param sharingImageUrl Primary product image url.\n * @param canonicalUrl Product canonical url.\n * @param productId Master product id.\n * @param price Proudct price.\n * @param currencyCode Current channel currency code.\n * @param productBrand Product brand.\n */\n private _renderProductMetadata(\n productName: string | undefined,\n description: string | undefined,\n sharingImageUrl: string | undefined,\n canonicalUrl: string | undefined,\n productId: number | undefined,\n price: number | undefined,\n currencyCode: string | undefined,\n productBrand: string | undefined\n ): JSX.Element {\n // Construct the JSON-LD data that contains the product metadata information used by search enginge crawlers\n const productMetaData = JSON.stringify({\n '@context': 'http://schema.org',\n '@type': 'Product',\n name: productName,\n description,\n image: sharingImageUrl,\n sku: productId,\n brand: {\n '@type': 'Brand',\n name: productBrand\n },\n offers: {\n '@type': 'Offer',\n url: canonicalUrl,\n priceCurrency: currencyCode,\n price\n }\n });\n return (\n \n {/* eslint-disable-next-line react/no-danger -- Implementation is a copy.*/}\n