{"version":3,"sources":["webpack:///./src/modules/citta-productpdf-specification/citta-productpdf-specification.view.tsx?a789","webpack:///./src/modules/citta-product-attribute-companion-product/citta-product-attribute-companion-product.tsx?2f16","webpack:///./src/modules/citta-product-collection/citta-product-collection.view.tsx?1588","webpack:///src/modules/business-partner-promotion/business-partner-promotion.view.tsx?2b9d","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-productpdf-specification/citta-productpdf-specification.tsx?9a77","webpack:///./src/modules/citta-product-attribute-companion-product/citta-product-attribute-companion-product.view.tsx?7d0f","webpack:///src/modules/business-partner-promotion/components/terms-paragraph.tsx?6a55","webpack:///src/modules/business-partner-promotion/business-partner-promotion.tsx?821e"],"names":["props","PdfSpecificationContainer","PdfSpecificationContentContainer","PdfSpecificationContentShow","PdfSpecificationContent","pdfSpecificationTitle","config","React","Module","Object","assign","Node","CittaProductAttributeCompanionProduct","constructor","_renderLink","linkUrl","attributeName","Button","className","color","onClick","this","_goToLink","MsDyn365","isBrowser","window","baseUrl","location","origin","length","render","attributes","data","result","linkAttribute","find","attribute","Name","TextValue","split","attributeLink","contentBlockviewProps","_objectSpread","linkItem","contentBlockContainer","moduleProps","classnames","renderView","_renderCarousel","carouselContainer","items","PropDetails","isMobile","context","request","device","Type","tag","map","_renderProduct","_renderGrid","gridContainer","product","ProductContainer","productComponent","ProductCollectionView","heading","ProductCollectionContainer","products","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","telemetry","error","businessPartnersView","businessPartnerPromotionProps","notificationMessage","sellerDescriptions","termsOfServiceCheckbox","termsOfServiceModal","submitButton","renderLabel","name","price","rating","ratingAriaLabel","roundedRating","toFixed","format","getRatingAriaLabel","ProductComponent","msdyn365Commerce","createComponent","component","_ref","imageSettings","allowBack","telemetryContent","quickViewButton","productUrl","getProductPageUrlSync","RecordId","actionContext","undefined","srcUrl","URL","apiSettings","search","href","pathname","updateProductUrl","payLoad","getPayloadObject","toString","getTelemetryAttributes","isUnitOfMeasureEnabled","app","unitOfMeasureDisplayType","createElement","Fragment","onTelemetryClick","cultureFormatter","formatCurrency","Price","AverageRating","gridSettings","imageUrl","altText","img","src","imageProps","cropFocalRegion","Image","loadFailureBehavior","requestContext","renderProductPlacementImage","PrimaryImageUrl","unitOfMeasure","DefaultUnitOfMeasure","description","Description","quickview","item","cloneElement","selectedProductId","renderQuickView","layout","HeadingTag","ProductCollection","super","handleHeadingChange","event","text","target","value","_getProduct","index","trace","getTelemetryObject","telemetryPageName","friendlyName","allowBackNavigation","resources","breaCrumbType","breadcrumbType","quickviewSlot","slots","role","key","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","message","exception","debug","Error","componentDidMount","_this$props$context$a","enableAffiliationBasedPricing","user","isAuthenticated","catelogfeed","carousel","headingComponent","Msdyn365","editProps","onEdit","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","CittaProductpdfSpecification","content","pdfSpecificationContent","_getProductSpecificationContent","productSku","ItemId","CittaProductpdfSpecificationViewProps","rel","ProductSku","specificationTitle","productSpec","productSpecificationData","contentText","some","spec","__decorate","observer","ContentBlockView","BusinessPartnerPromotionTermsParagraph","title","titleClassName","moduleClassName","BusinessPartnerPromotion","onCheckBoxChange","termsOfServiceChecked","checked","onToggleTermOfServiceModal","termsOfServiceModalOpened","onSubmit","_data$b2bUserInformat","_data$b2bUserInformat2","errorMessageText","promoteToSellerSubmitSuccessMessage","businessPartnerId","b2bUserInformation","BusinessPartnerId","promoteToSellerAsync","showSubmitButton","showTermsOfService","errorMessage","_unused","termsOfService","authorizationErrorMessage","canSubmit","isAdminUser","status","btnEnabled","viewProps","Text","renderNotificationBar","renderSellerDescriptions","type","termsOfServiceLinkText","onChange","termsOfServiceAgreementText","Modal","isOpen","horizontalPosition","verticalPosition","autoFocus","fade","toggle","ModalHeader","termsOfServiceModalHeading","ModalBody","submitRequestLabel","disabled","notificationBar","Alert","results","idx1","_description$bulletPo","bulletPoints","bulletPoint","idx2","label","ObjectExtensions","isNullOrUndefined","StringExtensions","isNullOrEmpty","IsAdmin"],"mappings":";2IAQgBA,cACZ,MAAM,0BAACC,EAAyB,iCAAEC,EAAgC,4BAAEC,EAA2B,wBAAEC,GAA2BJ,GACtH,sBAACK,GAAyBL,EAAMM,OAEtC,OAAIH,EAEII,gBAACC,SAAMC,OAAAC,OAAA,GAAKT,GACRM,gBAACI,OAAIF,OAAAC,OAAA,GAAKR,GACNK,gBAACI,OAAIF,OAAAC,OAAA,GAAKN,GAA0BC,KAKzC,O,mtBCGf,MAAMO,UAA8CL,gBAApDM,c,oBA8BS,KAAAC,YAAc,CAACC,EAAiBC,IAErCT,gBAACU,SAAM,CACHC,UAAW,8CACXC,MAAM,UACNC,QAASA,IAAMC,KAAKC,UAAUP,IAE/BC,GAKE,KAAAM,UAAaP,IACnB,GAAIQ,IAASC,WAA+B,oBAAXC,OAAwB,CACvD,MAAMC,EAAUD,OAAOE,SAASC,OAC5BF,EAAQG,QACVJ,OAAOE,SAASjB,OAAO,GAAGgB,KAAWX,OA5CnCe,SACL,MAAM,UACLZ,GACEG,KAAKrB,MAAMM,OAITyB,EAFsDV,KAAKrB,MAAMgC,KAE5CD,WAAWE,OAChCC,EAAgBH,aAAU,EAAVA,EAAYI,KAAKC,GAAaA,EAAUC,OAAShB,KAAKrB,MAAMM,OAAOU,eACzF,IAAKkB,IAAkBA,EAAcI,UACnC,OAAO,KAGT,MAAMF,EAAYF,EAAcI,UAAUC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P4N,EAAkBjS,gBAACkS,QAAK,CAACtR,MAAM,WAAWyD,IAEvC4N,EAGHjB,2BACJ,MAAM,OAAEjR,GAAWe,KAAKrB,MAClB0S,EAA6B,GAC7B7N,EAAqBvE,EAAOuE,mBAElC,OAAKA,EAIEA,EAAmBnB,IAAI,CAACiF,EAAagK,KAAQ,IAAAC,EAChD,OACIrS,gBAAA,OAAKiK,IAAKmI,EAAMzR,UAAcwO,EAAH,oBACvBnP,gBAAC8Q,IAAI,CAACnQ,UAAcwO,EAAH,iBAAoClG,KAAMb,EAAYzE,UACvE3D,gBAAA,UAC6B,QAD7BqS,EACKjK,EAAYkK,oBAAY,IAAAD,OAAA,EAAxBA,EAA0BlP,IAAI,CAACoP,EAAaC,IAErCxS,gBAACgP,EAAsC,CACnC/E,IAAKuI,EACL7R,UAAcwO,EAAH,mBACXD,eAAmBC,EAAH,eAChBF,MAAOsD,EAAYE,MACnBrK,YAAamK,EAAYtJ,YAf1CkJ,EAyBPzB,YAAY3D,GAChB,OACK2F,mBAAiBC,kBAAkB5F,KAAU6F,mBAAiBC,cAAc9F,EAAKkD,qBAAuC,IAAjBlD,EAAK+F,SAwC1G1D","file":"static/js/28.ea9bc3c762006d0b7286.chunk.js","sourcesContent":["/*!\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\nimport * as React from 'react';\r\nimport { ICittaProductpdfSpecificationViewProps } from './citta-productpdf-specification';\r\n\r\nexport default (props: ICittaProductpdfSpecificationViewProps) => {\r\n const {PdfSpecificationContainer, PdfSpecificationContentContainer, PdfSpecificationContentShow, PdfSpecificationContent} = props;\r\n const {pdfSpecificationTitle} = props.config;\r\n\r\n if (PdfSpecificationContentShow) {\r\n return (\r\n \r\n \r\n {pdfSpecificationTitle}\r\n \r\n \r\n );\r\n } else {\r\n return null;\r\n }\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\n\r\nimport MsDyn365 from '@msdyn365-commerce/core';\r\nimport { Button, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { ICittaProductAttributeCompanionProductData } from './citta-product-attribute-companion-product.data';\r\nimport { ICittaProductAttributeCompanionProductProps } from './citta-product-attribute-companion-product.props.autogenerated';\r\n\r\nexport interface ICittaProductAttributeCompanionProductViewProps extends ICittaProductAttributeCompanionProductProps {\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 CittaProductAttributeCompanionProduct extends React.PureComponent> {\r\n //const attributeName\r\n public render(): JSX.Element | null {\r\n const {\r\n className\r\n } = this.props.config;\r\n\r\n const content: ICittaProductAttributeCompanionProductData = this.props.data;\r\n\r\n const attributes = content.attributes.result;\r\n const linkAttribute = attributes?.find(attribute => attribute.Name === this.props.config.attributeName);\r\n if (!linkAttribute || !linkAttribute.TextValue) {\r\n return null;\r\n }\r\n\r\n const attribute = linkAttribute.TextValue.split('|');\r\n const attributeName = attribute[0];\r\n const attributeLink = attribute[1];\r\n\r\n const contentBlockviewProps = {\r\n ...this.props,\r\n linkItem: this._renderLink(attributeLink, attributeName),\r\n contentBlockContainer: {\r\n moduleProps: this.props,\r\n className: classnames('product-attribute-companion-product', 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, attributeName: String) => {\r\n return (\r\n this._goToLink(linkUrl)}\r\n >\r\n {attributeName}\r\n \r\n )\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 CittaProductAttributeCompanionProduct;\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\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","/*!\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 { IBusinessPartnerPromotionViewProps } from './business-partner-promotion';\n\n/**\n * View layout of business partner promotion module.\n * @param props - React props of the component.\n * @returns Functional component.\n */\nconst businessPartnersView: React.FC = props => {\n const {\n businessPartnerPromotionProps,\n heading,\n notificationMessage,\n sellerDescriptions,\n termsOfServiceCheckbox,\n termsOfServiceModal,\n submitButton\n } = props;\n return (\n \n {heading}\n {notificationMessage}\n {sellerDescriptions}\n {termsOfServiceCheckbox}\n {termsOfServiceModal}\n {submitButton}\n \n );\n};\n\nexport default businessPartnersView;\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. 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 { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICittaProductpdfSpecificationData } from './citta-productpdf-specification.data';\r\nimport { ICittaProductpdfSpecificationProps } from './citta-productpdf-specification.props.autogenerated';\r\n\r\nexport interface ICittaProductpdfSpecificationViewProps extends ICittaProductpdfSpecificationProps {\r\n PdfSpecificationContainer: IModuleProps;\r\n PdfSpecificationContentContainer: INodeProps;\r\n PdfSpecificationContent: INodeProps;\r\n PdfSpecificationContentShow: boolean;\r\n ProductSku: string | undefined;\r\n}\r\n\r\n/**\r\n *\r\n * CittaProductpdfSpecification component\r\n * @extends {React.Component>}\r\n */\r\n\r\n@observer\r\nclass CittaProductpdfSpecification extends React.Component> {\r\n public render(): JSX.Element | null {\r\n const { config } = this.props;\r\n\r\n const content: ICittaProductpdfSpecificationData = this.props.data;\r\n\r\n const pdfSpecificationContent = this._getProductSpecificationContent(content, config.pdfSpecificationTitle ? config.pdfSpecificationTitle : '');\r\n const productSku = content && content.product && content.product.result && content.product.result.ItemId;\r\n const CittaProductpdfSpecificationViewProps = {\r\n ...this.props,\r\n PdfSpecificationContainer: {\r\n moduleProps: this.props,\r\n className: 'pdf-specification'\r\n },\r\n PdfSpecificationContentContainer: {\r\n className: 'pdf-specification-content',\r\n 'aria-label': config.pdfSpecificationTitle\r\n },\r\n PdfSpecificationContent: {\r\n tag: 'a',\r\n href: pdfSpecificationContent,\r\n 'aria-label': `Click here to read ${config.pdfSpecificationTitle}`,\r\n target: '_blank',\r\n rel: \"noopener\"\r\n },\r\n PdfSpecificationContentShow : pdfSpecificationContent ? true : false,\r\n ProductSku: productSku\r\n };\r\n\r\n return this.props.renderView(CittaProductpdfSpecificationViewProps) as React.ReactElement;\r\n }\r\n\r\n private _getProductSpecificationContent(content: ICittaProductpdfSpecificationData, specificationTitle: string): string {\r\n const productSpec = content.productSpecificationData.result;\r\n let contentText = '';\r\n if (productSpec) {\r\n productSpec.some(spec => {\r\n if (spec.TextValue && spec.Name === specificationTitle) {\r\n contentText = spec.TextValue;\r\n return true;\r\n }\r\n return false;\r\n });\r\n }\r\n return contentText;\r\n }\r\n}\r\n\r\nexport default CittaProductpdfSpecification;\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 { ICittaProductAttributeCompanionProductViewProps } from './citta-product-attribute-companion-product';\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 * as React from 'react';\n\nexport interface IBusinessPartnerPromotionTermsParagraphProp {\n description: string;\n className: string;\n title?: string;\n titleClassName?: string;\n}\n\nexport const BusinessPartnerPromotionTermsParagraph: React.FC = ({\n title,\n description,\n className,\n titleClassName\n}) => {\n return (\n
  • \n {title &&

    {title}

    }\n

    {description}

    \n
  • \n );\n};\n\nexport default BusinessPartnerPromotionTermsParagraph;\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 * as MsDyn365 from '@msdyn365-commerce/core';\nimport { Button, Alert, IModuleProps, Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport { promoteToSellerAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { BusinessPartnerUser } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Text } from '@msdyn365-commerce/core';\nimport { IBusinessPartnerPromotionData } from './business-partner-promotion.data';\nimport { IBusinessPartnerPromotionProps } from './business-partner-promotion.props.autogenerated';\nimport { BusinessPartnerPromotionTermsParagraph } from './components';\n\nexport interface IBusinessPartnerPromotionViewProps extends IBusinessPartnerPromotionProps {\n businessPartnerPromotionProps: IModuleProps;\n heading: React.ReactNode;\n notificationMessage?: React.ReactNode;\n sellerDescriptions: React.ReactNode[];\n termsOfServiceCheckbox: React.ReactNode;\n termsOfServiceModal: React.ReactNode;\n submitButton: React.ReactNode;\n}\n\nexport interface IBusinessPartnerPromotionState {\n showTermsOfService: boolean;\n showSubmitButton: boolean;\n termsOfServiceChecked: boolean;\n termsOfServiceModalOpened: boolean;\n errorMessage?: string;\n notificationMessage?: string;\n}\n\n/**\n * The class name root for the module.\n */\nexport const moduleClassName: string = 'ms-business-partner-promotion';\n\n/**\n *\n * BusinessPartnerPromotion component\n * @extends {React.PureComponent>}\n */\nclass BusinessPartnerPromotion extends React.Component<\n IBusinessPartnerPromotionProps,\n IBusinessPartnerPromotionState\n> {\n constructor(props: IBusinessPartnerPromotionProps) {\n super(props);\n this.state = {\n showTermsOfService: true,\n showSubmitButton: true,\n termsOfServiceChecked: false,\n termsOfServiceModalOpened: false,\n errorMessage: undefined,\n notificationMessage: undefined\n };\n }\n\n public render(): JSX.Element | null {\n const {\n showSubmitButton,\n showTermsOfService,\n termsOfServiceChecked,\n termsOfServiceModalOpened,\n errorMessage,\n notificationMessage\n } = this.state;\n const { resources, data, config } = this.props;\n const { heading, termsOfService } = config;\n const { authorizationErrorMessage } = resources;\n const { b2bUserInformation } = data;\n const canSubmit = this.isAdminUser(b2bUserInformation.result);\n let error: string | undefined = errorMessage;\n\n // do not show error message when the API is still in loading.\n if (!canSubmit && b2bUserInformation.status !== 'LOADING') {\n error = authorizationErrorMessage;\n }\n const btnEnabled = canSubmit && termsOfServiceChecked;\n\n const viewProps: IBusinessPartnerPromotionViewProps = {\n ...this.props,\n businessPartnerPromotionProps: {\n moduleProps: this.props,\n className: classnames(moduleClassName, moduleClassName)\n },\n heading: ,\n notificationMessage: this.renderNotificationBar(error, notificationMessage),\n sellerDescriptions: this.renderSellerDescriptions(),\n termsOfServiceCheckbox: showTermsOfService && (\n
    \n \n {resources.termsOfServiceAgreementText}\n \n {resources.termsOfServiceLinkText}\n \n
    \n ),\n termsOfServiceModal: (\n \n {resources.termsOfServiceModalHeading}\n \n \n \n \n ),\n submitButton: showSubmitButton && (\n
    \n \n {resources.submitRequestLabel}\n \n
    \n )\n };\n\n return this.props.renderView(viewProps);\n }\n\n private renderNotificationBar(errorMessage: string | undefined, notificationMessage: string | undefined): React.ReactNode {\n let notificationBar: React.ReactNode = null;\n if (errorMessage) {\n notificationBar = {errorMessage};\n } else if (notificationMessage) {\n notificationBar = {notificationMessage};\n }\n return notificationBar;\n }\n\n private renderSellerDescriptions(): React.ReactNode[] {\n const { config } = this.props;\n const results: React.ReactNode[] = [];\n const sellerDescriptions = config.sellerDescriptions;\n\n if (!sellerDescriptions) {\n return results;\n }\n\n return sellerDescriptions.map((description, idx1) => {\n return (\n
    \n \n
      \n {description.bulletPoints?.map((bulletPoint, idx2) => {\n return (\n \n );\n })}\n
    \n
    \n );\n });\n }\n\n private isAdminUser(user: BusinessPartnerUser | undefined): boolean {\n return (\n !ObjectExtensions.isNullOrUndefined(user) && !StringExtensions.isNullOrEmpty(user.BusinessPartnerId) && user.IsAdmin === true\n );\n }\n\n private readonly onCheckBoxChange = (event: React.ChangeEvent) => {\n this.setState({\n termsOfServiceChecked: event.target.checked\n });\n };\n\n private readonly onToggleTermOfServiceModal = () => {\n this.setState({\n termsOfServiceModalOpened: !this.state.termsOfServiceModalOpened\n });\n };\n\n private readonly onSubmit = async (event: React.MouseEvent) => {\n const { context, data, resources } = this.props;\n const { errorMessageText, promoteToSellerSubmitSuccessMessage } = resources;\n const businessPartnerId = data.b2bUserInformation.result?.BusinessPartnerId ?? '';\n\n try {\n await promoteToSellerAsync({ callerContext: context.actionContext }, businessPartnerId);\n this.setState({\n showSubmitButton: false,\n showTermsOfService: false,\n errorMessage: undefined,\n notificationMessage: promoteToSellerSubmitSuccessMessage\n });\n } catch {\n this.setState({\n showTermsOfService: true,\n showSubmitButton: true,\n errorMessage: errorMessageText,\n notificationMessage: undefined\n });\n }\n };\n}\n\nexport default BusinessPartnerPromotion;\n"],"sourceRoot":""}