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UC,eAAiBJ,EACxEf,EAAQE,YAAYa,GAAqBE,QAAQC,UAAUjX,KAC3D+V,EAAQE,YAAYF,EAAQE,YAAYa,GAAqBE,QAAQC,UAAUjX,IAAM8W,IA0BzFD,CAF4B,uEACXV,EAAQ,KAMjChP,OAAOgQ,aAAehQ,OAAOgQ,cAAgB,GAC7ChQ,OAAOgQ,aAAanB,QAAOrN,EAAAA,EAAA,GACpBxB,OAAOgQ,aAAanB,SAAW,IAC/BD,EAAQC,SAGX7O,OAAOgQ,aAAalB,YAAWtN,EAAAA,EAAA,GAC5BxB,OAAOgQ,aAAalB,aAAe,IACnCF,EAAQE,aAEY,MAAMmB,EAAiB,GAC9BA,EAAe,6EAA+E,CACtGlB,EAAGA,IAAMC,EAAQ,MACjBkB,GAAI,8CAEpBlQ,OAAOgQ,aAAehQ,OAAOgQ,cAAgB,GAC7ChQ,OAAOgQ,aAAaC,eAAczO,EAAAA,EAAA,GACPxB,OAAOgQ,aAAaC,gBAAkB,IACtCA,UCnF3BE,EAAOC,QAAUlX,cCAjBiX,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-price-for-product-search-result.action.ts?edb0","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-product-collection/mmx-product-collection.props.autogenerated.ts?75eb","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-product-collection/mmx-product-collection.tsx?c37d","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-product-collection/mmx-product-collection.view.tsx?8557","webpack://Msdyn365.Commerce.Online.Memx/./src/themes/memoryexpress/views/components/product.component.tsx?cd1d","webpack://Msdyn365.Commerce.Online.Memx/./lib/mmx-product-collection/module-registration.js?4000","webpack://Msdyn365.Commerce.Online.Memx/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online.Memx/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\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 { CacheType, createObservableDataAction, getCatalogId, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductsDataActions, ProductSearchResult, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ArrayExtensions, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Input class for the GetPriceForProductSearchResult Data Action.\r\n */\r\nexport class PriceForProductSearchResultInput implements IActionInput {\r\n public products: ProductSearchResult[];\r\n public customerId?: string;\r\n\r\n public constructor(products: ProductSearchResult[], customerId?: string) {\r\n this.products = products;\r\n this.customerId = customerId;\r\n }\r\n\r\n /**\r\n * Get the cache key.\r\n * @returns The cache key.\r\n */\r\n public getCacheKey = (): string => `PriceForProductSearchResult-${JSON.stringify(this.products)}`;\r\n\r\n /**\r\n * Get the cache object type.\r\n * @returns The cache object type.\r\n */\r\n public getCacheObjectType = (): string => 'ProductSearchResult';\r\n\r\n /**\r\n * Define the data cache type.\r\n * @returns The cache type.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * The createInput method for the GetPriceForProductSearchResultDataAction.\r\n * @param products -- The product search result.\r\n * @returns The input.\r\n */\r\nexport const createActivePriceForProductSearchResultInput = (products: ProductSearchResult[]): PriceForProductSearchResultInput => {\r\n return new PriceForProductSearchResultInput(products);\r\n};\r\n\r\n/**\r\n * The Action Method for the GetPriceForProductSearchResult Data Action\r\n * Gets the active price for product search result via the getActivePrice RetailServer API.\r\n * @param input -- The data input.\r\n * @param context -- The action context.\r\n * @returns The product search result updated with price.\r\n */\r\nexport async function getPriceForProductSearchResultAction(\r\n input: PriceForProductSearchResultInput,\r\n context: IActionContext\r\n): Promise {\r\n let productRecIds: number[];\r\n if (ArrayExtensions.hasElements(input.products)) {\r\n productRecIds = input.products.map(product => product.RecordId);\r\n } else {\r\n return Promise.resolve([]);\r\n }\r\n\r\n const catalogId = getCatalogId(context.requestContext);\r\n\r\n const projectDomain: ProjectionDomain = { ChannelId: +context.requestContext.apiSettings.channelId, CatalogId: catalogId };\r\n const priceZero = 0;\r\n\r\n try {\r\n const productPrices: ProductPrice[] = await ProductsDataActions.getActivePricesAsync(\r\n { callerContext: context, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context) },\r\n projectDomain,\r\n productRecIds,\r\n new Date(),\r\n input.customerId ?? null,\r\n undefined,\r\n true\r\n );\r\n\r\n const productResults: ProductSearchResult[] = input.products.map(product => {\r\n const activePrice = productPrices.find(price => price.ProductId === product.RecordId);\r\n //mmx-feature: discount fix --start\r\n product.ExtensionProperties?.push({ Key: 'BasePrice', Value: { IntegerValue: activePrice?.BasePrice } });\r\n product.ExtensionProperties?.push({ Key: 'AdjustedPrice', Value: { IntegerValue: activePrice?.AdjustedPrice } });\r\n product.ExtensionProperties?.push({\r\n Key: 'CustomerContextualPrice',\r\n Value: { IntegerValue: activePrice?.CustomerContextualPrice }\r\n });\r\n //mmx-feature: discount fix --end\r\n if (activePrice) {\r\n product.Price = activePrice.CustomerContextualPrice ?? product.Price;\r\n product.BasePrice = Math.max(\r\n activePrice.BasePrice ?? priceZero,\r\n activePrice.TradeAgreementPrice ?? priceZero,\r\n activePrice.AdjustedPrice ?? priceZero\r\n );\r\n }\r\n return product;\r\n });\r\n\r\n return Promise.resolve(productResults);\r\n } catch (error) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- existing error type.\r\n //@ts-ignore\r\n context.telemetry.exception(error);\r\n context.telemetry.debug('[getPriceForProductSearchResultAction]Error executing action');\r\n throw new Error('[getPriceForProductSearchResultAction]Error executing action');\r\n }\r\n}\r\n\r\n/**\r\n * The getPriceForProductSearchResult data action.\r\n */\r\nexport const getPriceForProductSearchResultDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-price-for-product-search-result',\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- existing pattern.\r\n action: >getPriceForProductSearchResultAction,\r\n input: createActivePriceForProductSearchResultInput\r\n});\r\n\r\nexport default getPriceForProductSearchResultDataAction;\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 * IMmxProductCollection 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 IMmxProductCollectionConfig extends Msdyn365.IModuleConfig {\r\n productCollection: Msdyn365.IProductList;\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 shouldDisplaySeeAllButton?: boolean;\r\n className?: string;\r\n}\r\n\r\nexport interface IMmxProductCollectionResources {\r\n priceFree: string;\r\n priceRangeSeparator: string;\r\n ratingAriaLabel: string;\r\n flipperNext: string;\r\n flipperPrevious: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n ratingCountAriaLabel: string;\r\n ratingCountAriaLabelSingleUser: string;\r\n seeAllButtonText: 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 IMmxProductCollectionProps extends Msdyn365.IModule {\r\n resources: IMmxProductCollectionResources;\r\n config: IMmxProductCollectionConfig;\r\n slots: {\r\n quickview: React.ReactNode[];\r\n productComparisonButton: React.ReactNode[];\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 { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\n//mmx-feature: --start\r\n/*\r\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\r\n*/\r\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\r\n//mmx-feature: --end\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getCatalogId, getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n DimensionAvailabilitiesForProductSearchResultInput,\r\n DimensionTypes,\r\n DimensionSwatchDisplayTypes,\r\n getDimensionAvailabilitiesForProductSearchResultAction,\r\n getPriceForProductSearchResult,\r\n IDimensionsApp,\r\n ObjectExtensions,\r\n //mmx-feature: discount fix --start\r\n /*\r\n PriceForProductSearchResultInput,\r\n */\r\n //mmx-feature: discount fix -start\r\n ProductPriceForSelectedProductsInput,\r\n validateCatalogId,\r\n getProductPriceForSelectedProducts\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getTelemetryObject,\r\n IComponentNodeProps,\r\n IModuleProps,\r\n INodeProps,\r\n ISingleSlideCarouselProps,\r\n ITelemetryContent,\r\n NodeTag,\r\n SingleSlideCarousel\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IMmxProductCollectionData } from './mmx-product-collection.data';\r\nimport { IMmxProductCollectionProps, layout } from './mmx-product-collection.props.autogenerated';\r\n//mmx-feature: discount error fix --start\r\nimport { ProductComponent } from '../../themes/memoryexpress/views/components/product.component';\r\nimport { PriceForProductSearchResultInput } from '../../actions/get-price-for-product-search-result.action';\r\n//mmx-feature: discount error fix --end\r\n\r\nexport interface IProductCollectionViewProps extends IMmxProductCollectionProps {\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 seeAllButton?: React.ReactNode;\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 productPrices: ProductPrice[];\r\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\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 readonly productPrices: ProductPrice[];\r\n\r\n constructor(props: IMmxProductCollectionProps) {\r\n super(props);\r\n this.productPrices = [];\r\n this.state = {\r\n products: this.props.config.productCollection.products || [],\r\n productPrices: this.productPrices || []\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n //mmx-feature: discount error fix --start\r\n /*\r\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\r\n */\r\n await this._getActivePrice();\r\n /*\r\n }\r\n */\r\n //mmx-feature: discount error fix --end\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\r\n const { resources } = this.props;\r\n const recommendation = this.props.config.productCollection.recommendationListId;\r\n const discountIds = this.props.config.productCollection.discountIds;\r\n\r\n // Initialize state in case if the products were not found during initial module render\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\r\n this.initProductState(this.props.config.productCollection);\r\n\r\n const products = this.state.products;\r\n const productPrices = this.state.productPrices;\r\n\r\n const isCarousel = this.props.config.layout === layout.carousel;\r\n const headingLabel = heading ? heading.text : '';\r\n const headingComponent = heading && (\r\n \r\n );\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\r\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\r\n const getProductData = this._getProduct(item, index, productPrices ? productPrices.at(index) : undefined);\r\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\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: `${headingLabel} ${resources.flipperPrevious}`,\r\n flipperNextLabel: `${headingLabel} ${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\r\n products:\r\n ArrayExtensions.hasElements(updatedProducts) &&\r\n updatedProducts.filter(item => {\r\n return item !== undefined;\r\n }),\r\n productPrices: this.productPrices,\r\n seeAllButton:\r\n (recommendation || discountIds) && shouldDisplaySeeAllButton && ArrayExtensions.hasElements(updatedProducts)\r\n ? this._getSeeAllButton(headingLabel, recommendation, discountIds)\r\n : undefined\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 /**\r\n * Get products dimension availabilities.\r\n * @param products - Products.\r\n * @returns Promise.\r\n */\r\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\r\n const context = this.props.context as ICoreContext;\r\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\r\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\r\n const validProducts = ArrayExtensions.validValues(products);\r\n if (\r\n ArrayExtensions.hasElements(validProducts) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\r\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\r\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\r\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\r\n ) {\r\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\r\n new DimensionAvailabilitiesForProductSearchResultInput(\r\n validProducts,\r\n this.props.context as ICoreContext,\r\n DimensionSwatchDisplayTypes.productCard\r\n ),\r\n this.props.context.actionContext\r\n );\r\n\r\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\r\n this.setState({ productsDimensionAvailabilities });\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Helper method to initialize products state.\r\n * @param productCollection - List of products.\r\n */\r\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\r\n let products = this.state.products;\r\n let productPrices = this.state.productPrices;\r\n const productCollectionProducts = productCollection.products;\r\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\r\n products = productCollectionProducts;\r\n this.setState({ products });\r\n } else if (\r\n ArrayExtensions.hasElements(products) &&\r\n ArrayExtensions.hasElements(productCollectionProducts) &&\r\n !ArrayExtensions.equals(products, productCollectionProducts)\r\n ) {\r\n products = productCollectionProducts;\r\n this.setState({ products });\r\n } else if (productCollectionProducts === undefined && ArrayExtensions.hasElements(this.state.products)) {\r\n products = [];\r\n this.setState({ products: products });\r\n }\r\n\r\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\r\n await this._getProductsDimensionsAvailabilities(products);\r\n }\r\n\r\n if (this.props.config.productCollection.listType === 'promotional') {\r\n productPrices = await getProductPriceForSelectedProducts(\r\n new ProductPriceForSelectedProductsInput(products.map(p => p.RecordId)),\r\n this.props.context.actionContext\r\n );\r\n this.setState({ productPrices: productPrices });\r\n }\r\n };\r\n\r\n private readonly _getProduct = (\r\n product: ProductSearchResult,\r\n index: number,\r\n productPrice?: ProductPrice\r\n ): 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(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\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 =\r\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\r\n const productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\r\n ? this.props.slots.productComparisonButton[0]\r\n : null;\r\n\r\n const reviewCount = 1;\r\n const reviewTotalRatings = Number(product.TotalRatings);\r\n const reviewCountAriaLabelValue =\r\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\r\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\r\n );\r\n const priceResources: IPriceComponentResources = {\r\n priceRangeSeparator: resources.priceRangeSeparator\r\n };\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 ArrayExtensions.hasElements(dimensionAvailability) &&\r\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\r\n )}\r\n />\r\n )\r\n };\r\n };\r\n\r\n /**\r\n * Get the active price for products.\r\n */\r\n private readonly _getActivePrice = async (): Promise => {\r\n const productsList = this.state.products;\r\n //mmx-feature: discount error fix --start\r\n let customerId : string | undefined;\r\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\r\n customerId = this.props.context.request.user.customerAccountNumber;\r\n }\r\n //mmx-feature: discount error fix --end\r\n const products = await getPriceForProductSearchResult(\r\n //mmx-feature: discount error fix --start\r\n /*\r\n new PriceForProductSearchResultInput(productsList),\r\n */\r\n new PriceForProductSearchResultInput(productsList, customerId),\r\n //mmx-feature: discount error fix --end\r\n this.props.context.actionContext\r\n );\r\n if (Msdyn365.msdyn365Commerce.isBrowser) {\r\n await this._getProductsDimensionsAvailabilities(products);\r\n }\r\n\r\n this.setState({ products });\r\n };\r\n\r\n /**\r\n * Get the see all button.\r\n * @param headingLabel - Heading label.\r\n * @param recommendation - Recommendation.\r\n * @param discountIds - Discount Ids.\r\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\r\n */\r\n private readonly _getSeeAllButton = (headingLabel: string, recommendation?: string, discountIds?: string[]): React.ReactNode => {\r\n if (!Msdyn365.msdyn365Commerce.isBrowser) {\r\n return null;\r\n }\r\n\r\n if (!recommendation && !discountIds) {\r\n return null;\r\n }\r\n\r\n const catalogId = getCatalogId(this.props.context.request);\r\n validateCatalogId(catalogId);\r\n const searchPageLink = getUrlSync('search', this.props.context.actionContext);\r\n if (!searchPageLink) {\r\n return null;\r\n }\r\n\r\n const url = new URL(searchPageLink, window.location.href);\r\n\r\n if (discountIds) {\r\n // see all button for promotion page\r\n url.searchParams.set('discountIds', discountIds.toString());\r\n url.searchParams.set('title', headingLabel);\r\n url.searchParams.set('catalogid', `${catalogId}`);\r\n } else if (recommendation) {\r\n // See all button for recommendation\r\n url.searchParams.set('recommendation', recommendation);\r\n url.searchParams.set('title', headingLabel);\r\n url.searchParams.set('catalogid', `${catalogId}`);\r\n }\r\n\r\n return (\r\n \r\n {this.props.resources.seeAllButtonText}\r\n \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\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './mmx-product-collection';\r\n\r\nconst ProductCollectionView: React.FC = props => {\r\n const {\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n seeAllButton\r\n } = props;\r\n\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {seeAllButton}\r\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\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[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\r\n return {items && items.map(_renderProduct)};\r\n};\r\n\r\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n return {productComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\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 { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n IPriceComponentResources,\r\n ISwatchItem,\r\n PriceComponent,\r\n ProductComponentSwatchComponent,\r\n RatingComponent\r\n} from '@msdyn365-commerce/components';\r\nimport {\r\n getCatalogId,\r\n IAny,\r\n IComponent,\r\n IComponentProps,\r\n ICoreContext,\r\n IGeneric,\r\n IGridSettings,\r\n IImageData,\r\n IImageSettings,\r\n Image,\r\n msdyn365Commerce\r\n} from '@msdyn365-commerce/core';\r\nimport { AttributeSwatch, AttributeValue, ProductDimension, ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n convertDimensionTypeToProductDimensionType,\r\n Dictionary,\r\n DimensionTypes,\r\n generateImageUrl,\r\n getProductPageUrlSync,\r\n IDimensionsApp,\r\n StringExtensions,\r\n validateCatalogId\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n format,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n onTelemetryClick\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport React, { useState } from 'react';\r\n\r\nexport interface IProductComponentProps extends IComponentProps<{ product?: ProductSearchResult, productPrice?: ProductPrice }> {\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 ratingCountAriaLabel?: string;\r\n allowBack?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n quickViewButton?: React.ReactNode;\r\n productComparisonButton?: React.ReactNode;\r\n isEnabledProductDescription?: boolean;\r\n isPriceMinMaxEnabled?: boolean;\r\n priceResources?: IPriceComponentResources;\r\n inventoryLabel?: string;\r\n dimensionAvailabilities?: IProductsDimensionsAvailabilities[];\r\n swatchItemAriaLabel?: string;\r\n}\r\n\r\nexport interface IProductComponent extends IComponent {}\r\n\r\nconst PriceComponentActions = {};\r\n\r\n/**\r\n * Gets the product page url from the default swatch selected.\r\n * @param productData - Product card to be rendered.\r\n * @returns The default color swatch selected if any.\r\n */\r\nfunction getDefaultSwatchSelected(coreContext: ICoreContext, productData?: ProductSearchResult): AttributeSwatch | null {\r\n if (!productData || !productData.AttributeValues) {\r\n return null;\r\n }\r\n\r\n const siteContext = coreContext as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n\r\n const attributeSwatches = productData.AttributeValues.find(\r\n attributeValue => attributeValue.KeyName?.toLocaleLowerCase() === dimensionToPreSelectInProductCard\r\n )?.Swatches;\r\n\r\n if (!ArrayExtensions.hasElements(attributeSwatches)) {\r\n return null;\r\n }\r\n\r\n const defaultSwatch = attributeSwatches.find(item => item.IsDefault === true) ?? attributeSwatches[0];\r\n return defaultSwatch;\r\n}\r\n\r\n/**\r\n * Gets the product image from the default swatch selected.\r\n * @param coreContext - Context of the module using the component.\r\n * @param productData - Product card to be rendered.\r\n * @returns The product card image url.\r\n */\r\nfunction getProductImageUrlFromDefaultSwatch(coreContext: ICoreContext, productData?: ProductSearchResult): string | undefined {\r\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\r\n const swatchProductImageUrls = defaultSwatch?.ProductImageUrls;\r\n if (!ArrayExtensions.hasElements(swatchProductImageUrls)) {\r\n return productData?.PrimaryImageUrl;\r\n }\r\n\r\n return generateImageUrl(swatchProductImageUrls[0], coreContext.request.apiSettings);\r\n}\r\n\r\n/**\r\n * Updates the product url link to product details page.\r\n * @param productDetailsPageUrl - Product page url.\r\n * @param coreContext - Context of the module using the component.\r\n * @param queryString - Querystring to be added to the URL.\r\n * @returns The update product page url.\r\n */\r\nfunction updateProductUrl(productDetailsPageUrl: string, coreContext: ICoreContext, queryString: string): string {\r\n const sourceUrl = new URL(productDetailsPageUrl, coreContext.request.apiSettings.baseUrl);\r\n if (sourceUrl.search) {\r\n sourceUrl.search += `&${queryString}`;\r\n } else {\r\n sourceUrl.search += queryString;\r\n }\r\n\r\n const updatedUrl = new URL(sourceUrl.href);\r\n return updatedUrl.pathname + sourceUrl.search;\r\n}\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\nfunction renderProductUnitOfMeasure(unitOfMeasure?: string): JSX.Element | null {\r\n if (!unitOfMeasure) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {unitOfMeasure}\r\n
\r\n );\r\n}\r\n\r\n/**\r\n * Gets the react node for product availability.\r\n * @param inventoryAvailabilityLabel - The product information.\r\n * @returns The node representing markup for product availability.\r\n */\r\nfunction renderProductAvailability(inventoryAvailabilityLabel: string | undefined): JSX.Element | null {\r\n if (!inventoryAvailabilityLabel || inventoryAvailabilityLabel === '') {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {inventoryAvailabilityLabel}\r\n
\r\n );\r\n}\r\n\r\n/**\r\n * Renders product comparison button similar to the quick view button.\r\n * @param productComparisonButton - React element of the button.\r\n * @param product - Current product info.\r\n * @param catalogId - Current catalog.\r\n * @returns React element for the specific product.\r\n */\r\nfunction renderProductComparisonButton(\r\n productComparisonButton: React.ReactNode,\r\n product: ProductSearchResult,\r\n catalogId: number\r\n): JSX.Element | undefined {\r\n validateCatalogId(catalogId);\r\n return React.cloneElement(productComparisonButton as React.ReactElement, { product, catalogId });\r\n}\r\n\r\n/**\r\n * Gets the product page url from the default swatch selected.\r\n * @param coreContext - Context of the module using the component.\r\n * @param productUrl - Product page url for the product card.\r\n * @param productData - Product card to be rendered.\r\n * @returns The product card image url.\r\n */\r\nfunction getProductPageUrlFromDefaultSwatch(\r\n coreContext: ICoreContext,\r\n productUrl: string,\r\n productData?: ProductSearchResult\r\n): string | undefined {\r\n const defaultSwatch = getDefaultSwatchSelected(coreContext, productData);\r\n if (!defaultSwatch?.SwatchValue) {\r\n return productUrl;\r\n }\r\n\r\n const siteContext = coreContext as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n\r\n const queryStringEncoded = encodeURIComponent(defaultSwatch.SwatchValue);\r\n const queryString = `${dimensionToPreSelectInProductCard}=${queryStringEncoded}`;\r\n return updateProductUrl(productUrl, coreContext, queryString);\r\n}\r\n\r\nconst ProductCard: React.FC = ({\r\n data,\r\n context,\r\n imageSettings,\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText,\r\n ratingAriaLabel,\r\n ratingCountAriaLabel,\r\n allowBack,\r\n typeName,\r\n id,\r\n telemetryContent,\r\n quickViewButton,\r\n productComparisonButton,\r\n isEnabledProductDescription,\r\n isPriceMinMaxEnabled,\r\n priceResources,\r\n inventoryLabel,\r\n dimensionAvailabilities,\r\n swatchItemAriaLabel\r\n}) => {\r\n const product = data.product;\r\n\r\n let productUrl = getProductPageUrlSync(product?.Name ?? '', product?.RecordId ?? Number.MIN_VALUE, context.actionContext, undefined);\r\n if (allowBack) {\r\n productUrl = updateProductUrl(productUrl, context, 'back=true');\r\n }\r\n const productImageUrlFromSwatch = getProductImageUrlFromDefaultSwatch(context, product) ?? product?.PrimaryImageUrl;\r\n const productPageUrlFromSwatch = getProductPageUrlFromDefaultSwatch(context, productUrl, product) ?? productUrl;\r\n const [productPageUrl, setProductPageUrl] = useState(productPageUrlFromSwatch);\r\n const [productImageUrl, setProductImageUrl] = useState(productImageUrlFromSwatch);\r\n React.useEffect(() => {\r\n setProductPageUrl(productPageUrlFromSwatch);\r\n setProductImageUrl(productImageUrlFromSwatch);\r\n }, [productUrl, productPageUrlFromSwatch, productImageUrlFromSwatch]);\r\n const [selectedSwatchItems] = useState(new Dictionary());\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access -- app context is generic\r\n const enableStockCheck = context.app.config.enableStockCheck;\r\n\r\n const siteContext = context as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n\r\n /**\r\n * Updates the product page and Image url based on swatch selected.\r\n * @param coreContext - Context of the caller.\r\n * @param swatchItem - Dimension swatch selected.\r\n */\r\n const updatePageAndImageUrl = React.useCallback(\r\n (coreContext: ICoreContext, swatchItem: ISwatchItem) => {\r\n const dimensionType = swatchItem.dimensionType;\r\n selectedSwatchItems.setValue(dimensionType, swatchItem);\r\n if (StringExtensions.isNullOrWhitespace(swatchItem.value)) {\r\n return;\r\n }\r\n const queryString = `${dimensionType}=${swatchItem.value}`;\r\n let productPageUrlWithSwatch = '';\r\n if (productPageUrl.includes(dimensionType)) {\r\n const newUrl = new URL(productPageUrl, coreContext.request.apiSettings.baseUrl);\r\n newUrl.searchParams.delete(dimensionType);\r\n productPageUrlWithSwatch = updateProductUrl(newUrl.toString(), context, queryString);\r\n } else {\r\n productPageUrlWithSwatch = updateProductUrl(productPageUrl, context, queryString);\r\n }\r\n setProductPageUrl(productPageUrlWithSwatch);\r\n if (dimensionType === dimensionToPreSelectInProductCard) {\r\n const swatchProductImageUrl = ArrayExtensions.hasElements(swatchItem.productImageUrls)\r\n ? swatchItem.productImageUrls[0]\r\n : undefined;\r\n const newImageUrl = generateImageUrl(swatchProductImageUrl, coreContext.request.apiSettings);\r\n setProductImageUrl(newImageUrl);\r\n }\r\n },\r\n [selectedSwatchItems, context, productPageUrl]\r\n );\r\n\r\n if (!product) {\r\n return null;\r\n }\r\n\r\n /**\r\n * Checks if rendering the particular dimensions is allowed for product card.\r\n * @param dimensionType - Dimension to be displayed.\r\n * @returns Updates the state with new product page url.\r\n */\r\n function shouldDisplayDimension(dimensionType: string): boolean {\r\n const dimensionsContext = context as ICoreContext;\r\n const dimensionsToDisplayOnProductCard = dimensionsContext.app.config.dimensionsInProductCard;\r\n return (\r\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\r\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\r\n dimensionsToDisplayOnProductCard.includes(dimensionType.toLocaleLowerCase() as DimensionTypes)\r\n );\r\n }\r\n\r\n /**\r\n * Gets the react node for product dimension as swatch.\r\n * @param attributeValues - Attribute value property from product.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n function renderProductDimensions(attributeValues?: AttributeValue[]): JSX.Element | null {\r\n if (!attributeValues) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {attributeValues.map((item: AttributeValue) => {\r\n const dimensionTypeValue = item.KeyName?.toLocaleLowerCase() ?? '';\r\n if (!shouldDisplayDimension(dimensionTypeValue)) {\r\n return null;\r\n }\r\n\r\n const siteContext = context as ICoreContext;\r\n const dimensionToPreSelectInProductCard = siteContext.app.config.dimensionToPreSelectInProductCard;\r\n const dimensionType = dimensionTypeValue as DimensionTypes;\r\n const swatches =\r\n item.Swatches?.map(swatchItem => {\r\n return {\r\n itemId: `${item.RecordId ?? ''}-${dimensionTypeValue}-${swatchItem.SwatchValue ?? ''}`,\r\n value: swatchItem.SwatchValue ?? '',\r\n dimensionType,\r\n colorHexCode: swatchItem.SwatchColorHexCode,\r\n imageUrl: swatchItem.SwatchImageUrl,\r\n productImageUrls: swatchItem.ProductImageUrls,\r\n isDefault: swatchItem.IsDefault,\r\n swatchItemAriaLabel: swatchItemAriaLabel ? format(swatchItemAriaLabel, dimensionType) : '',\r\n isDisabled:\r\n enableStockCheck &&\r\n dimensionAvailabilities?.find(\r\n dimensionAvailability => dimensionAvailability.value === (swatchItem.SwatchValue ?? '')\r\n )?.isDisabled\r\n };\r\n }) ?? [];\r\n if (\r\n dimensionType === dimensionToPreSelectInProductCard &&\r\n ArrayExtensions.hasElements(swatches) &&\r\n !swatches.some(swatch => swatch.isDefault)\r\n ) {\r\n swatches[0].isDefault = true;\r\n }\r\n return (\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n function renderQuickView(quickview: React.ReactNode, item?: number): JSX.Element | undefined {\r\n if (quickview === null) {\r\n return undefined;\r\n }\r\n const selectedDimensions: ProductDimension[] = selectedSwatchItems.getValues().map(swatches => {\r\n return {\r\n DimensionTypeValue: convertDimensionTypeToProductDimensionType(swatches.dimensionType),\r\n DimensionValue: {\r\n RecordId: 0,\r\n Value: swatches.value\r\n }\r\n };\r\n });\r\n return React.cloneElement(quickview as React.ReactElement, { selectedProductId: item, selectedDimensions });\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 //mmx-feature: discount-fix --start\r\n let productPrice = {\r\n BasePrice: product.ExtensionProperties?.find(property => property.Key?.toUpperCase() === 'BASEPRICE')?.Value\r\n ?.IntegerValue\r\n ?? product.BasePrice,\r\n AdjustedPrice: product.ExtensionProperties?.find(property => property.Key?.toUpperCase() === 'ADJUSTEDPRICE')?.Value\r\n ?.IntegerValue\r\n ?? product.Price,\r\n CustomerContextualPrice: product.ExtensionProperties?.find(property => property.Key?.toUpperCase() === 'CUSTOMERCONTEXTUALPRICE')?.Value\r\n ?.IntegerValue\r\n ?? undefined,\r\n MaxVariantPrice: product.MaxVariantPrice,\r\n MinVariantPrice: product.MinVariantPrice,\r\n };\r\n //mmx-feature: discount-fix --end\r\n\r\n //mmx-feature: clearance --start\r\n const isClearance = product.ExtensionProperties?.find(property => property.Key === 'IsClearanceLine')?.Value?.BooleanValue;\r\n const clearanceComment = isClearance\r\n ? product.ExtensionProperties?.find(property => property.Key === 'COMMENT')?.Value?.StringValue\r\n : undefined;\r\n const clearanceWarranty = isClearance\r\n ? product.ExtensionProperties?.find(property => property.Key === 'Warranty')?.Value?.StringValue\r\n : undefined;\r\n if (isClearance && productPrice.BasePrice) {\r\n //TODO: hack to allow discount strikethrough to appear. Fix when possible\r\n productPrice.CustomerContextualPrice = productPrice.AdjustedPrice;\r\n productPrice.AdjustedPrice = productPrice.BasePrice;\r\n }\r\n const productComponentContent = isEnabledProductDescription ? (<>\r\n {/*\r\n return (\r\n <>\r\n {isEnabledProductDescription ? (\r\n \r\n */} \r\n {/* clearance diff --start */}\r\n {!!isClearance &&

SKU: {product.ProductNumber?.split(' :')[0]}

}\r\n {!!clearanceWarranty &&

{clearanceWarranty}

}\r\n {!!clearanceComment &&

{clearanceComment}

}\r\n {/* clearance diff --end */}\r\n
\r\n
\r\n {renderProductPlacementImage(\r\n imageSettings,\r\n context.request.gridSettings,\r\n productImageUrl,\r\n product.PrimaryImageUrl,\r\n product.Name,\r\n context\r\n )}\r\n
\r\n
\r\n
{product.Name}
\r\n {renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n //mmx-feature: discount-fix --start\r\n /*\r\n product.BasePrice,\r\n product.Price,\r\n */\r\n productPrice.BasePrice,\r\n productPrice.AdjustedPrice,\r\n //mmx-feature: discount-fix --end\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText,\r\n isPriceMinMaxEnabled,\r\n priceResources\r\n //mmx-feature: discount-fix --start\r\n , productPrice.CustomerContextualPrice\r\n , productPrice.MaxVariantPrice\r\n , productPrice.MinVariantPrice\r\n //mmx-feature: discount-fix --end\r\n )}\r\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\r\n {renderDescription(product.Description)}\r\n
\r\n
\r\n {/*\r\n \r\n */}\r\n ) : (<>\r\n {/*\r\n \r\n */}\r\n
\r\n {renderProductPlacementImage(\r\n imageSettings,\r\n context.request.gridSettings,\r\n productImageUrl,\r\n product.PrimaryImageUrl,\r\n product.Name,\r\n context\r\n )}\r\n
\r\n {/* clearance diff --start */}\r\n {!!isClearance &&

SKU: {product.ProductNumber?.split(' :')[0]}

}\r\n {!!clearanceWarranty &&

{clearanceWarranty}

}\r\n {!!clearanceComment &&

{clearanceComment}

}\r\n {/* clearance diff --end */}\r\n
\r\n
{product.Name}
\r\n {renderPrice(\r\n context,\r\n typeName,\r\n id,\r\n //mmx-feature: discount-fix --start\r\n /*\r\n product.BasePrice,\r\n product.Price,\r\n */\r\n productPrice.BasePrice,\r\n productPrice.AdjustedPrice,\r\n //mmx-feature: discount-fix --end\r\n savingsText,\r\n freePriceText,\r\n originalPriceText,\r\n currentPriceText\r\n //mmx-feature: discount-fix --start\r\n , undefined\r\n , undefined\r\n , productPrice.CustomerContextualPrice\r\n , productPrice.MaxVariantPrice\r\n , productPrice.MinVariantPrice\r\n //mmx-feature: discount-fix --end\r\n )}\r\n {isUnitOfMeasureEnabled && renderProductUnitOfMeasure(product.DefaultUnitOfMeasure)}\r\n
\r\n {/*\r\n \r\n )}\r\n {renderProductDimensions(product.AttributeValues)}\r\n {!context.app.config.hideRating &&\r\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel, ratingCountAriaLabel)}\r\n {renderProductAvailability(inventoryLabel)}\r\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\r\n {productComparisonButton && renderProductComparisonButton(productComparisonButton, product, getCatalogId(context.request))}\r\n \r\n );\r\n */}\r\n );\r\n\r\n return isClearance ? (\r\n <>\r\n \r\n {productComponentContent}\r\n \r\n {!isEnabledProductDescription && <>\r\n {renderProductDimensions(product.AttributeValues)}\r\n {!context.app.config.hideRating &&\r\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel, ratingCountAriaLabel)}\r\n {renderProductAvailability(inventoryLabel)}\r\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\r\n {productComparisonButton && renderProductComparisonButton(productComparisonButton, product, getCatalogId(context.request))}\r\n }\r\n \r\n ) : (\r\n <>\r\n \r\n {productComponentContent}\r\n \r\n {!isEnabledProductDescription && <>\r\n {renderProductDimensions(product.AttributeValues)}\r\n {!context.app.config.hideRating &&\r\n renderRating(context, typeName, id, product.AverageRating, product.TotalRatings, ratingAriaLabel, ratingCountAriaLabel)}\r\n {renderProductAvailability(inventoryLabel)}\r\n {quickViewButton && renderQuickView(quickViewButton, product.RecordId)}\r\n {productComparisonButton && renderProductComparisonButton(productComparisonButton, product, getCatalogId(context.request))}\r\n }\r\n \r\n );\r\n //mmx-feature: clearance --end\r\n};\r\n\r\nfunction renderLabel(\r\n name?: string,\r\n price?: string,\r\n rating?: number,\r\n ratingAriaLabelText?: string,\r\n reviewCount?: number,\r\n ratingCountAriaLabelText?: string\r\n): string {\r\n const reviewCountArialableText = getReviewAriaLabel(reviewCount, ratingCountAriaLabelText ?? '');\r\n return `${name ?? ''} ${price ?? ''} ${getRatingAriaLabel(rating, ratingAriaLabelText)}${\r\n reviewCountArialableText ? ` ${reviewCountArialableText}` : ''\r\n }`;\r\n}\r\n\r\nfunction renderDescription(description?: string): JSX.Element | null {\r\n return

{description}

;\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 getReviewAriaLabel(reviewCount?: number, ratingCountAriaLabelText?: string): string {\r\n if (reviewCount && ratingCountAriaLabelText) {\r\n return format(ratingCountAriaLabelText || '', reviewCount);\r\n }\r\n return '';\r\n}\r\n\r\nfunction renderRating(\r\n coreContext: ICoreContext,\r\n moduleTypeName: string,\r\n moduleId: string,\r\n avgRating?: number,\r\n totalRatings?: number,\r\n ariaLabel?: string,\r\n ratingCountAriaLabel?: string\r\n): JSX.Element | null {\r\n if (!avgRating) {\r\n return null;\r\n }\r\n\r\n const numberRatings = totalRatings?.toString() || undefined;\r\n const ratingAriaLabelText = getRatingAriaLabel(avgRating, ariaLabel);\r\n const ratingCountAriaLabelText = getReviewAriaLabel(Number(numberRatings), ratingCountAriaLabel);\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction renderPrice(\r\n context: ICoreContext,\r\n typeName: string,\r\n id: string,\r\n basePrice?: number,\r\n adjustedPrice?: number,\r\n savingsText?: string,\r\n freePriceText?: string,\r\n originalPriceText?: string,\r\n currentPriceText?: string,\r\n isPriceMinMaxEnabled?: boolean,\r\n priceResources?: IPriceComponentResources\r\n //mmx-feature: discount fix --start\r\n , customerContextualPrice?: number\r\n , maxVariantPrice?: number\r\n , minVariantPrice?: number\r\n //mmx-feature: discount fix --end\r\n): JSX.Element | null {\r\n const price: ProductPrice = {\r\n BasePrice: basePrice,\r\n AdjustedPrice: adjustedPrice,\r\n //mmx-feature: discount fix --start\r\n /*\r\n CustomerContextualPrice: adjustedPrice\r\n */\r\n CustomerContextualPrice: customerContextualPrice ?? adjustedPrice,\r\n MaxVariantPrice: maxVariantPrice ? maxVariantPrice : adjustedPrice,\r\n MinVariantPrice: minVariantPrice ? minVariantPrice : adjustedPrice\r\n //mmx-feature: discount fix --end\r\n };\r\n\r\n return (\r\n \r\n );\r\n}\r\n\r\nfunction renderProductPlacementImage(\r\n imageSettings?: IImageSettings,\r\n gridSettings?: IGridSettings,\r\n imageUrl?: string,\r\n fallbackImageUrl?: string,\r\n altText?: string,\r\n context?: ICoreContext>\r\n): JSX.Element | null {\r\n if (!imageUrl || !gridSettings || !imageSettings) {\r\n return null;\r\n }\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment -- Site level config can be of any type.\r\n const contextConfig = context?.app.config?.placeholderImageName;\r\n const emptyPlaceHolderImage = contextConfig as string;\r\n let fallbackImageSource = fallbackImageUrl;\r\n if (emptyPlaceHolderImage && fallbackImageUrl) {\r\n fallbackImageSource = `${fallbackImageUrl},${emptyPlaceHolderImage}`;\r\n }\r\n const img: IImageData = {\r\n src: imageUrl,\r\n altText: altText ? altText : '',\r\n fallBackSrc: fallbackImageSource\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.createComponentOverride<\r\n IProductComponent\r\n>('Product', { component: ProductCard, ...PriceComponentActions });\r\n\r\nexport default ProductComponent;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['mmx-product-collection'] = {\n c: () => require('partner/modules/mmx-product-collection/mmx-product-collection.tsx'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'mmx-product-collection',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/mmx-product-collection'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state';\n let dataAction = require('@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|mmx-product-collection|mmx-product-collection'] = {\n c: () => require('partner/modules/mmx-product-collection/mmx-product-collection.view.tsx'),\n cn: '__local__-__local__-mmx-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["PriceForProductSearchResultInput","constructor","products","customerId","getCacheKey","JSON","stringify","this","getCacheObjectType","dataCacheType","createActivePriceForProductSearchResultInput","async","getPriceForProductSearchResultAction","input","context","productRecIds","ArrayExtensions","hasElements","Promise","resolve","map","product","RecordId","catalogId","getCatalogId","requestContext","projectDomain","ChannelId","apiSettings","channelId","CatalogId","_input$customerId","productPrices","ProductsDataActions","callerContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","Date","undefined","productResults","_product$ExtensionPro","_product$ExtensionPro2","_product$ExtensionPro3","activePrice","find","price","ProductId","_activePrice$Customer","_activePrice$BasePric","_activePrice$TradeAgr","_activePrice$Adjusted","ExtensionProperties","push","Key","Value","IntegerValue","BasePrice","AdjustedPrice","CustomerContextualPrice","Price","Math","max","TradeAgreementPrice","error","telemetry","exception","debug","Error","getPriceForProductSearchResultDataAction","createObservableDataAction","id","action","layout","HeadingTag","ProductCollection","React","props","super","handleHeadingChange","event","config","heading","text","target","value","_getProductsDimensionsAvailabilities","dimensionsToDisplayOnProductCard","app","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","validValues","includes","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","actionContext","setState","initProductState","state","productCollectionProducts","productCollection","equals","Msdyn365","isBrowser","listType","getProductPriceForSelectedProducts","ProductPriceForSelectedProductsInput","p","_getProduct","index","productPrice","_this$props$data$feat","_this$state$productsD","Name","trace","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","imageSettings","allowBackNavigation","resources","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","slots","quickview","length","productComparisonButtonSlot","productComparisonButton","reviewCountAriaLabelValue","Number","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","data","featureState","result","priceResources","priceRangeSeparator","ProductContainer","tag","className","role","key","productComponent","ProductComponent","freePriceText","priceFree","originalPriceText","currentPriceText","ratingAriaLabel","typeName","quickViewButton","IsEnabled","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","_getActivePrice","productsList","enableAffiliationBasedPricing","user","isAuthenticated","customerAccountNumber","getPriceForProductSearchResult","_getSeeAllButton","headingLabel","recommendation","discountIds","validateCatalogId","searchPageLink","getUrlSync","url","URL","window","location","href","searchParams","set","toString","Button","title","seeAllButtonText","render","shouldDisplaySeeAllButton","recommendationListId","isCarousel","carousel","headingComponent","editProps","onEdit","updatedProducts","item","getProductData","at","ObjectExtensions","isNullOrUndefined","productCollectionViewProps","_objectSpread","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","ProductCollectionContainer","moduleProps","classnames","GridComponentProps","filter","seeAllButton","renderView","_renderCarousel","carouselContainer","items","Node","Object","assign","_renderProduct","_renderGrid","gridContainer","Module","getDefaultSwatchSelected","coreContext","productData","_productData$Attribut","_attributeSwatches$fi","AttributeValues","dimensionToPreSelectInProductCard","attributeSwatches","attributeValue","_attributeValue$KeyNa","KeyName","toLocaleLowerCase","Swatches","IsDefault","updateProductUrl","productDetailsPageUrl","queryString","sourceUrl","baseUrl","search","pathname","renderProductUnitOfMeasure","unitOfMeasure","renderProductAvailability","inventoryAvailabilityLabel","renderProductComparisonButton","renderLabel","name","rating","ratingAriaLabelText","reviewCount","ratingCountAriaLabelText","reviewCountArialableText","getReviewAriaLabel","getRatingAriaLabel","roundedRating","toFixed","format","renderRating","moduleTypeName","moduleId","avgRating","totalRatings","ariaLabel","numberRatings","RatingComponent","ratingCount","readOnly","renderPrice","basePrice","adjustedPrice","savingsText","customerContextualPrice","maxVariantPrice","minVariantPrice","MaxVariantPrice","MinVariantPrice","PriceComponent","renderProductPlacementImage","gridSettings","imageUrl","fallbackImageUrl","altText","_context$app$config","contextConfig","placeholderImageName","fallbackImageSource","img","src","fallBackSrc","imageProps","cropFocalRegion","Image","loadFailureBehavior","bypassHideOnFailure","msdyn365Commerce","createComponentOverride","component","_ref","_product$Name","_product$RecordId","_getProductImageUrlFr","_getProductPageUrlFro","_product$ExtensionPro4","_product$ExtensionPro5","_product$ExtensionPro6","_product$ExtensionPro7","_product$ExtensionPro8","_product$ExtensionPro9","_product$ProductNumbe","_product$ProductNumbe2","isEnabledProductDescription","inventoryLabel","swatchItemAriaLabel","productUrl","getProductPageUrlSync","MIN_VALUE","productImageUrlFromSwatch","defaultSwatch","swatchProductImageUrls","ProductImageUrls","generateImageUrl","PrimaryImageUrl","getProductImageUrlFromDefaultSwatch","productPageUrlFromSwatch","SwatchValue","encodeURIComponent","getProductPageUrlFromDefaultSwatch","productPageUrl","setProductPageUrl","useState","productImageUrl","setProductImageUrl","selectedSwatchItems","Dictionary","enableStockCheck","updatePageAndImageUrl","swatchItem","dimensionType","setValue","StringExtensions","isNullOrWhitespace","productPageUrlWithSwatch","newUrl","delete","swatchProductImageUrl","productImageUrls","newImageUrl","renderProductDimensions","attributeValues","_item$KeyName$toLocal","_item$KeyName","_item$Swatches$map","_item$Swatches","dimensionTypeValue","shouldDisplayDimension","swatches","_item$RecordId","_swatchItem$SwatchVal","_swatchItem$SwatchVal2","_dimensionAvailabilit","itemId","colorHexCode","SwatchColorHexCode","SwatchImageUrl","isDefault","isDisabled","_swatchItem$SwatchVal3","some","swatch","ProductComponentSwatchComponent","onSelectDimension","renderQuickView","selectedDimensions","getValues","DimensionTypeValue","convertDimensionTypeToProductDimensionType","DimensionValue","selectedProductId","payLoad","getPayloadObject","attribute","getTelemetryAttributes","isUnitOfMeasureEnabled","unitOfMeasureDisplayType","property","_property$Key","toUpperCase","_property$Key2","_property$Key3","isClearance","BooleanValue","clearanceComment","StringValue","clearanceWarranty","productComponentContent","ProductNumber","split","DefaultUnitOfMeasure","description","Description","cultureFormatter","formatCurrency","AverageRating","hideRating","onClick","onTelemetryClick","binding","modules","dataActions","c","require","$type","da","path","runOn","iNM","ns","n","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}