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AC0K,EAAAA,OAAM9I,OAAAC,OAAA,GAAKuE,GACPD,EACAK,EACAD,EAAavF,EAAgBqF,EAAmC9H,GAAY6D,EAAYkE,EAAoB/H,KAIzH0D,EAAMvK,QAAQiT,UAAUxK,MAAM,4DACvB,cC/BX0T,EAAOC,QAAU9T,cCAjB6T,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/actions/get-product-unit-of-measure-options.action.ts?bc1e","webpack://Msdyn365.Commerce.Online/./src/components/common/product-inventory-utils.ts?8daa","webpack://Msdyn365.Commerce.Online/./src/shared-utils/attributes/on-buy-access-validator.ts?4b31","webpack://Msdyn365.Commerce.Online/./src/shared-utils/badge-utils.ts?ae14","webpack://Msdyn365.Commerce.Online/./src/shared-utils/hooks/use-active-prices.ts?6577","webpack://Msdyn365.Commerce.Online/./src/themes/dlvry-adventureworks/views/product-collection.view.tsx?17ff","webpack://Msdyn365.Commerce.Online/./lib/product-collection/module-registration.js?36d3","webpack://Msdyn365.Commerce.Online/./src/modules/product-collection/product-collection.tsx?4008","webpack://Msdyn365.Commerce.Online/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["import { callActionOrExecute, DataServiceQuery, IContext, IDataServiceRequest, IQueryResultSettings } from \"@msdyn365-commerce/retail-proxy\";\r\nimport * as Entities from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceModels.g';\r\nimport * as Types from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nfunction getProductUnitOfMeasureOptionsQuery(): DataServiceQuery {\r\n return new DataServiceQuery();\r\n}\r\n\r\n\r\nexport function getProductUnitOfMeasureOptionsInput(\r\n queryResultSettings: IQueryResultSettings, productIds:\r\n number[]\r\n): IDataServiceRequest {\r\n const query = getProductUnitOfMeasureOptionsQuery().resultSettings(queryResultSettings);\r\n query.top(10000);\r\n return query.createDataServiceRequestForOperation(\r\n 'GetProductUnitOfMeasureOptions',\r\n true, Entities.UnitOfMeasureConversionClass,\r\n 'true',\r\n { bypassCache: 'none', returnEntity: 'Entities.UnitOfMeasureConversion' },\r\n {\r\n productIds: productIds\r\n }\r\n );\r\n}\r\n\r\nexport async function getProductUnitOfMeasureOptionsAsync(context: IContext, productIds: number[]): Promise {\r\n const request = getProductUnitOfMeasureOptionsInput(\r\n context.queryResultSettings || {}, productIds);\r\n const conversions = await callActionOrExecute(request, context.callerContext);\r\n return conversions;\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 { IActionContext } from '@msdyn365-commerce/core';\r\nimport {\r\n InventoryAvailabilitySearchCriteria,\r\n ProductAvailableQuantity,\r\n ProductWarehouseInventoryAvailability,\r\n ProductWarehouseInventoryInformation,\r\n SearchArea\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nexport enum DeliveryMode {\r\n allWareHouses = 0,\r\n shipping = 1,\r\n pickup = 2\r\n}\r\n\r\n/**\r\n * This setting defines the inventory levels supported.\r\n */\r\nexport enum InventoryLevels {\r\n physicalAvailable = 'physicalAvailable',\r\n totalAvailable = 'totalAvailable',\r\n threshold = 'inventoryThreshold'\r\n}\r\n\r\n/**\r\n * Product inventory information class.\r\n */\r\nexport interface IProductInventoryInformation {\r\n ProductAvailableQuantity: ProductAvailableQuantity;\r\n StockLevelCode?: string;\r\n StockLevelLabel?: string;\r\n IsProductAvailable: boolean;\r\n InventLocationId?: string;\r\n deliveryType?: DeliveryMode;\r\n}\r\n\r\n/**\r\n * This setting defines the inventory level values return by the API.\r\n */\r\nexport enum InventoryLevelValues {\r\n outOfStock = 'OOS',\r\n available = 'AVAIL'\r\n}\r\n/**\r\n * The function defines whether the inventory label should be displayed or not.\r\n * @param context - The action context.\r\n * @param inventoryCode - The inventory code.\r\n * @returns Boolean.\r\n */\r\nexport function displayLabelEnabled(context: IActionContext, inventoryCode?: string): boolean {\r\n if (!inventoryCode) {\r\n return false;\r\n }\r\n\r\n // eslint-disable-next-line default-case\r\n switch (context.requestContext.app.config.inventoryRanges) {\r\n case 'lowAndOutofStock':\r\n if (inventoryCode !== InventoryLevelValues.available) {\r\n return true;\r\n }\r\n break;\r\n case 'outOfStock':\r\n if (inventoryCode === InventoryLevelValues.outOfStock) {\r\n return true;\r\n }\r\n break;\r\n case 'all':\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * The function that maps a ProductWareHouse object into a ProductAvailabilityQuantity.\r\n * @param context - The action context.\r\n * @param productsWarehouseInventory - The product warehouse inventory information.\r\n * @returns IProductInventoryInformation[].\r\n */\r\nexport function mapProductInventoryInformation(\r\n context: IActionContext,\r\n productsWarehouseInventory?: ProductWarehouseInventoryAvailability[]\r\n): IProductInventoryInformation[] {\r\n const productInventoryInformation: IProductInventoryInformation[] = [];\r\n\r\n if (context.requestContext.app.config.enableStockCheck === undefined || context.requestContext.app.config.enableStockCheck === false) {\r\n return productInventoryInformation;\r\n }\r\n\r\n if (productsWarehouseInventory && productsWarehouseInventory.length > 0) {\r\n for (const product of productsWarehouseInventory) {\r\n switch (context.requestContext.app.config.inventoryLevel) {\r\n case InventoryLevels.physicalAvailable:\r\n // Inventory level is enabled with Physical inventory\r\n const physicalProductMap = mapInventoryWithPhysicalBufferEnabled(context, product);\r\n if (physicalProductMap) {\r\n productInventoryInformation.push(physicalProductMap);\r\n }\r\n break;\r\n case InventoryLevels.totalAvailable:\r\n // Inventory level is enabled with Total available inventory\r\n const totalAvailableProductMap = mapInventoryWithTotalAvailableBufferEnabled(context, product);\r\n if (totalAvailableProductMap) {\r\n productInventoryInformation.push(totalAvailableProductMap);\r\n }\r\n break;\r\n default:\r\n // When inventory level is inventoryThreshold or not defined\r\n const productMap = mapInventoryWithThresholdEnabled(context, product);\r\n if (productMap) {\r\n productInventoryInformation.push(productMap);\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return productInventoryInformation;\r\n}\r\n\r\n/**\r\n * The function that maps inventory for when threshold is selected.\r\n * @param context - The action context.\r\n * @param productWarehouseInventoryAvailability - The product warehouse inventory information.\r\n * @returns IProductInventoryInformation.\r\n */\r\nexport function mapInventoryWithThresholdEnabled(\r\n context: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n): IProductInventoryInformation | null {\r\n if (productWarehouseInventoryAvailability.ProductId && productWarehouseInventoryAvailability.TotalAvailable !== undefined) {\r\n const productQty = productWarehouseInventoryAvailability.TotalAvailable - context.requestContext.app.config.outOfStockThreshold;\r\n const productAvailableQuantity: ProductAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQty > 0 ? productQty : 0\r\n };\r\n\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n IsProductAvailable: !!(productAvailableQuantity.AvailableQuantity && productAvailableQuantity.AvailableQuantity > 0),\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * The function that maps inventory for when physical available is selected.\r\n * @param context - The action context.\r\n * @param productWarehouseInventoryAvailability - The product warehouse inventory information.\r\n * @returns IProductInventoryInformation.\r\n */\r\nexport function mapInventoryWithPhysicalBufferEnabled(\r\n context: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n): IProductInventoryInformation | null {\r\n const shouldRenderLabel = displayLabelEnabled(context, productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode);\r\n\r\n if (productWarehouseInventoryAvailability.ProductId && productWarehouseInventoryAvailability.TotalAvailable !== undefined) {\r\n // As per the new buffer logic from RS,\r\n // if code is out of stock then we set the available quantity to 0 regardless of the actual value from API\r\n let productQuantity: number | undefined = 0;\r\n if (productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode !== InventoryLevelValues.outOfStock) {\r\n productQuantity =\r\n productWarehouseInventoryAvailability.MaximumPurchasablePhysicalAvailableQuantity ??\r\n productWarehouseInventoryAvailability.PhysicalAvailable;\r\n }\r\n\r\n const productAvailableQuantity: ProductAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQuantity\r\n };\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n StockLevelCode: shouldRenderLabel ? productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelCode : undefined,\r\n StockLevelLabel: shouldRenderLabel ? productWarehouseInventoryAvailability.PhysicalAvailableInventoryLevelLabel : undefined,\r\n IsProductAvailable: productAvailableQuantity.AvailableQuantity !== undefined && productAvailableQuantity.AvailableQuantity > 0,\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * The function that maps inventory for when total available is selected.\r\n * @param context - The action context.\r\n * @param productWarehouseInventoryAvailability - The product warehouse inventory information.\r\n * @returns IProductInventoryInformation.\r\n */\r\nexport function mapInventoryWithTotalAvailableBufferEnabled(\r\n context: IActionContext,\r\n productWarehouseInventoryAvailability: ProductWarehouseInventoryAvailability\r\n): IProductInventoryInformation | null {\r\n const shouldRenderLabel = displayLabelEnabled(context, productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode);\r\n if (productWarehouseInventoryAvailability.ProductId && productWarehouseInventoryAvailability.TotalAvailable !== undefined) {\r\n // As per the new buffer logic from RS,\r\n // if code is out of stock then we set the available quantity to 0 regardless of the actual value from API\r\n let productQuantity: number | undefined = 0;\r\n if (productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode !== InventoryLevelValues.outOfStock) {\r\n productQuantity =\r\n productWarehouseInventoryAvailability.MaximumPurchasableTotalAvailableQuantity ??\r\n productWarehouseInventoryAvailability.TotalAvailable;\r\n }\r\n\r\n const productAvailableQuantity: ProductAvailableQuantity = {\r\n ProductId: productWarehouseInventoryAvailability.ProductId,\r\n AvailableQuantity: productQuantity\r\n };\r\n return {\r\n ProductAvailableQuantity: productAvailableQuantity,\r\n StockLevelCode: shouldRenderLabel ? productWarehouseInventoryAvailability.TotalAvailableInventoryLevelCode : undefined,\r\n StockLevelLabel: shouldRenderLabel ? productWarehouseInventoryAvailability.TotalAvailableInventoryLevelLabel : undefined,\r\n // eslint-disable-next-line eqeqeq\r\n IsProductAvailable: productAvailableQuantity.AvailableQuantity != undefined && productAvailableQuantity.AvailableQuantity > 0,\r\n InventLocationId: productWarehouseInventoryAvailability.InventLocationId\r\n };\r\n }\r\n\r\n return null;\r\n}\r\n\r\n/**\r\n * The function created a InventoryAvailabilitySearchCriteria object for getEstimatedAvailability API.\r\n * @param context - The action context.\r\n * @returns Boolean.\r\n */\r\nexport function isAggregatedInventory(context: IActionContext): boolean {\r\n // If warehouse aggregated is true then query inventory from multiple warehouses\r\n // else query from single warehouse\r\n return (\r\n (context.requestContext.app.config.inventoryLevel === InventoryLevels.totalAvailable ||\r\n context.requestContext.app.config.inventoryLevel === InventoryLevels.physicalAvailable) &&\r\n context.requestContext.app.config.warehouseAggregation === 'multiple'\r\n );\r\n}\r\n\r\n/**\r\n * The function created a InventoryAvailabilitySearchCriteria object for getEstimatedAvailability API.\r\n * @param context - The action context.\r\n * @param productWarehouseInventoryInformation - The product ware house inventory information.\r\n * @returns ProductWarehouseInventoryInformation.\r\n */\r\nexport function mapAggregatedProductInventoryInformation(\r\n context: IActionContext,\r\n productWarehouseInventoryInformation: ProductWarehouseInventoryInformation\r\n): IProductInventoryInformation[] {\r\n if (isAggregatedInventory(context)) {\r\n const productInventoryMapping:\r\n | ProductWarehouseInventoryAvailability[]\r\n | undefined = productWarehouseInventoryInformation.AggregatedProductInventoryAvailabilities?.map(product => {\r\n return {\r\n DataAreaId: product.DataAreaId,\r\n MaximumPurchasablePhysicalAvailableQuantity:\r\n product.MaximumPurchasablePhysicalAvailableQuantity ?? product.PhysicalAvailableQuantity,\r\n MaximumPurchasableTotalAvailableQuantity:\r\n product.MaximumPurchasableTotalAvailableQuantity ?? product.TotalAvailableQuantity,\r\n ProductId: product.ProductId,\r\n PhysicalAvailable: product.PhysicalAvailableQuantity,\r\n PhysicalAvailableInventoryLevelCode: product.PhysicalAvailableInventoryLevelCode,\r\n PhysicalAvailableInventoryLevelLabel: product.PhysicalAvailableInventoryLevelLabel,\r\n TotalAvailable: product.TotalAvailableQuantity,\r\n TotalAvailableInventoryLevelCode: product.TotalAvailableInventoryLevelCode,\r\n TotalAvailableInventoryLevelLabel: product.TotalAvailableInventoryLevelLabel\r\n };\r\n });\r\n return mapProductInventoryInformation(context, productInventoryMapping);\r\n }\r\n\r\n return mapProductInventoryInformation(context, productWarehouseInventoryInformation.ProductWarehouseInventoryAvailabilities);\r\n}\r\n\r\n/**\r\n * The function created a InventoryAvailabilitySearchCriteria object for getEstimatedAvailability API.\r\n * @param context - The action context.\r\n * @param productIds - The product id collection.\r\n * @param isDefaultWareHouse - Flag to define whether inventory is from default warehouse or not.\r\n * @param isFilterByChannelFulfillmentGroup - Filter by fulfillment group.\r\n * @param searchArea - The search area.\r\n * @param defaultDeliveryMode - The delivery mode.\r\n * @returns InventoryAvailabilitySearchCriteria.\r\n */\r\nexport function createInventoryAvailabilitySearchCriteria(\r\n context: IActionContext,\r\n productIds: number[],\r\n isDefaultWareHouse?: boolean,\r\n isFilterByChannelFulfillmentGroup?: boolean,\r\n searchArea?: SearchArea,\r\n defaultDeliveryMode?: DeliveryMode\r\n): InventoryAvailabilitySearchCriteria {\r\n const salesUnitType = 2;\r\n const deliveryMode = defaultDeliveryMode ? defaultDeliveryMode : DeliveryMode.shipping;\r\n\r\n const inventoryAvailabilitySearchCriteria: InventoryAvailabilitySearchCriteria = {\r\n ProductIds: productIds,\r\n QuantityUnitTypeValue: salesUnitType,\r\n SearchArea: searchArea\r\n };\r\n\r\n if (isAggregatedInventory(context)) {\r\n inventoryAvailabilitySearchCriteria.FilterByChannelFulfillmentGroup = true;\r\n inventoryAvailabilitySearchCriteria.DeliveryModeTypeFilterValue = deliveryMode;\r\n } else {\r\n inventoryAvailabilitySearchCriteria.DefaultWarehouseOnly = isDefaultWareHouse;\r\n inventoryAvailabilitySearchCriteria.FilterByChannelFulfillmentGroup = isFilterByChannelFulfillmentGroup;\r\n }\r\n\r\n return inventoryAvailabilitySearchCriteria;\r\n}\r\n","import { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { ProductSearchResultExt } from \"../../modules/dlvry-search-result-container/components\";\r\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\r\nimport { hasAccessToBuy } from '.';\r\n\r\nexport interface OnBuyHasAccessValidatorResult {\r\n isValid: boolean;\r\n message?: string;\r\n}\r\n\r\nexport async function onBuyHasAccessValidator(\r\n context: ICoreContext,\r\n customer: Customer | undefined,\r\n product: ProductSearchResultExt,\r\n validationMessage: string | undefined\r\n): Promise {\r\n if (!product || !product.AttributeValues) {\r\n return { isValid: true };\r\n }\r\n\r\n const hasAccess = hasAccessToBuy(context, customer, product.AttributeValues);\r\n\r\n return {\r\n isValid: hasAccess,\r\n message: hasAccess ? undefined : validationMessage\r\n };\r\n}\r\n","import { ProductPrice } from \"@msdyn365-commerce/retail-proxy\";\r\n\r\nexport function getDiscountBadge(productPrice: ProductPrice | undefined): string | undefined {\r\n if (!productPrice || !productPrice.DiscountLines || productPrice.DiscountLines.length === 0) {\r\n return;\r\n }\r\n\r\n const discountLineWithBadge = productPrice.DiscountLines.find(x => {\r\n const matches = x.OfferName?.toLowerCase().match(/\\{(.*?)\\}/i) || '';\r\n const parts = matches.length > 1 ? matches[1].split(';').map(x => x.trim()) : undefined;\r\n return parts?.find(x => x.startsWith('badge:'));\r\n });\r\n const offerName = discountLineWithBadge?.OfferName;\r\n\r\n if (!offerName) {\r\n return undefined;\r\n }\r\n\r\n const badge = /\\{.*Badge\\s*:\\s*(.*?)[};]/i.exec(offerName);\r\n\r\n if (badge && badge.length > 1) {\r\n return badge[1].trim();\r\n }\r\n\r\n return undefined;\r\n}","import * as React from 'react';\r\nimport { ProductPrice, SimpleProduct, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\nimport { ICoreContext, getCatalogId } from '@msdyn365-commerce/core';\r\nimport { getActivePricesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\n\r\nasync function getPricesAsync(context: ICoreContext, products: number[], batchSize: number = 30): Promise {\r\n const result: ProductPrice[] = [];\r\n const catalogId = context.request.apiSettings.catalogId ?? getCatalogId(context.actionContext.requestContext);\r\n const projectDomain: ProjectionDomain = { ChannelId: +context.request.apiSettings.channelId, CatalogId: catalogId };\r\n\r\n // Work with X products at a time\r\n const batchCount = Math.ceil(products.length / batchSize);\r\n\r\n for (let i = 0; i < batchCount; i++) {\r\n const batch = products.slice(i * batchSize, (i + 1) * batchSize);\r\n const prices = await getActivePricesAsync({ callerContext: context.actionContext }, projectDomain, batch, new Date(), null, undefined, true);\r\n result.push(...prices);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nexport function useActivePrices(context: ICoreContext, products: SimpleProduct[] | number[] | undefined, batchSize: number = 30): [ProductPrice[], boolean, Error | undefined] {\r\n const [activePrices, setActivePrices] = React.useState([]);\r\n const [loading, setLoading] = React.useState(true);\r\n const [error, setError] = React.useState(undefined);\r\n\r\n React.useEffect(() => {\r\n if (!products || products.length < 1 || !context.request.user.isAuthenticated) {\r\n setLoading(false);\r\n return;\r\n }\r\n\r\n let recIds: number[];\r\n\r\n if (typeof products[0] === 'number') {\r\n recIds = products as number[];\r\n } else {\r\n recIds = (products as SimpleProduct[]).map(product => product.RecordId);\r\n }\r\n\r\n getPricesAsync(context, recIds, batchSize)\r\n .then(prices => setActivePrices(prices))\r\n .catch(error => setError(error))\r\n .finally(() => setLoading(false));\r\n }, [products]);\r\n\r\n return [activePrices, loading, error];\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\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport * as React from 'react';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { IProductCollectionViewProps, IProductComponentViewProps } from '@msdyn365-commerce-modules/product-collection/src/modules/product-collection/./product-collection';\r\nimport { IProductCollectionData } from './product-collection.data';\r\nimport { IProductCollectionProps, IProductCollectionResources } from '../definition-extensions/product-collection.ext.props.autogenerated';\r\nimport { Customer, ProductList, ProductsDataActions, SimpleProduct, UnitOfMeasureConversion } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ArrayExtensions,\r\n OrderTemplate,\r\n QueryResultSettingsProxy,\r\n GetOrderTemplatesInput,\r\n getOrderTemplates\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport ProductComponent, { IAddToOrderTemplateResources, IProductComponentProps } from './components/product.component';\r\nimport PQueue from 'p-queue';\r\nimport { getByIdsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getProductUnitOfMeasureOptionsAsync } from '../../../actions/get-product-unit-of-measure-options.action';\r\nimport { DeliveryMode, IProductInventoryInformation, createInventoryAvailabilitySearchCriteria, mapAggregatedProductInventoryInformation } from '../../../components/common/product-inventory-utils';\r\nimport { onBuyHasAccessValidator } from '../../../shared-utils/attributes/on-buy-access-validator';\r\nimport { ProductSearchResultExt } from '../../../modules/dlvry-search-result-container/components';\r\nimport { useActivePrices } from '../../../shared-utils/hooks/use-active-prices';\r\nimport { getDiscountBadge } from '../../../shared-utils/badge-utils';\r\nimport { getAttributeStringOrDefault, getAttributesLocale } from '../../../shared-utils/attributes';\r\n\r\nfunction getInventoryLabel(productRecordId: number, productInventoryStatus: IProductInventoryInformation[] | undefined): string | undefined {\r\n if(productInventoryStatus){\r\n const shippingInventory = productInventoryStatus.find(shipping => shipping.ProductAvailableQuantity.ProductId === productRecordId);\r\n if(shippingInventory && shippingInventory.StockLevelLabel){\r\n return shippingInventory.StockLevelLabel;\r\n }\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\nconst useGetInventoryStatus = (props: IProductCollectionViewProps & IProductCollectionProps) => {\r\n const { config, context } = props;\r\n const [productInventoryStatus, setProductInventoryStatus] = React.useState();\r\n\r\n React.useEffect(() => {\r\n if (!config.productCollection?.products || config.productCollection.products.length === 0) {\r\n return;\r\n }\r\n\r\n const work = async () => {\r\n const shippingSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n context.actionContext,\r\n config.productCollection.products.map(x => x.RecordId),\r\n true,\r\n undefined,\r\n undefined,\r\n DeliveryMode.shipping\r\n );\r\n\r\n const shippingAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: context.actionContext },\r\n shippingSearchCriteria\r\n );\r\n\r\n if (shippingAvailability.ProductWarehouseInventoryAvailabilities) {\r\n const shippingInventory = mapAggregatedProductInventoryInformation(context.actionContext, shippingAvailability);\r\n\r\n if (ArrayExtensions.hasElements(shippingInventory)) {\r\n shippingInventory[0].deliveryType = DeliveryMode.shipping;\r\n setProductInventoryStatus(shippingInventory);\r\n }\r\n }\r\n };\r\n void work();\r\n }, [config.productCollection]);\r\n\r\n return productInventoryStatus;\r\n};\r\n\r\nconst ProductCollectionView: React.FC> = props => {\r\n const {\r\n context,\r\n heading,\r\n ProductCollectionContainer,\r\n products,\r\n SingleSlideCarouselComponentProps,\r\n GridComponentProps,\r\n isCarousel,\r\n seeAllButton,\r\n resources,\r\n data: { cart, customerInformation }\r\n } = props;\r\n const [orderTemplates, setOrderTemplates] = React.useState(undefined);\r\n const cartQueue = React.useMemo(() => new PQueue({ concurrency: 1 }), []);\r\n const [simpleProducts, setSimpleProducts] = React.useState(undefined);\r\n const [unitConversions, setConversions] = React.useState([]);\r\n const productInventoryStatus = useGetInventoryStatus(props);\r\n\r\n React.useEffect(() => {\r\n const { actionContext, request, app } = props.context;\r\n const ids = props.config.productCollection?.products?.map(x => x.RecordId) as number[] | undefined;\r\n\r\n if (!ids || ids.length === 0) {\r\n return;\r\n }\r\n\r\n if (ids?.some(x => !simpleProducts?.find(y => y.RecordId === x))) {\r\n const work = async () => {\r\n const simpleProducts = await getByIdsAsync(\r\n { callerContext: actionContext },\r\n request.apiSettings.channelId,\r\n ids,\r\n null,\r\n request.apiSettings.catalogId);\r\n setSimpleProducts(simpleProducts);\r\n };\r\n void work();\r\n }\r\n\r\n if (request.user.isAuthenticated && app.config.unitOfMeasureConversions) {\r\n const work = async () => {\r\n const conversions = await getProductUnitOfMeasureOptionsAsync({ callerContext: actionContext }, ids);\r\n setConversions(conversions);\r\n };\r\n void work();\r\n }\r\n }, [props.config.productCollection]);\r\n\r\n const [activePrices] = useActivePrices(context, props.config.productCollection.products.map(x => x.RecordId));\r\n\r\n if (Array.isArray(products)) {\r\n products?.forEach((product) => {\r\n const typedProduct = ((product.productComponent as React.ReactElement).props.data.product as ProductSearchResultExt);\r\n const price = activePrices.find(x => x.ProductId === typedProduct.RecordId);\r\n \r\n product.productComponent = React.cloneElement(product.productComponent as React.ReactElement, {\r\n showPrice: !!price\r\n });\r\n \r\n const attributeLocale = getAttributesLocale(context.request.locale);\r\n typedProduct.Brand = getAttributeStringOrDefault(typedProduct.AttributeValues, attributeLocale.brand, undefined);\r\n typedProduct.Manufacturer = getAttributeStringOrDefault(typedProduct.AttributeValues, attributeLocale.manufacturer, undefined);\r\n typedProduct.Transit = getAttributeStringOrDefault(typedProduct.AttributeValues, attributeLocale.transit, undefined) === '1';\r\n\r\n typedProduct.Price = price?.CustomerContextualPrice ?? 0;\r\n typedProduct.BasePrice = price?.BasePrice ?? 0;\r\n typedProduct.MaxVariantPrice = price?.MaxVariantPrice ?? 0;\r\n typedProduct.MinVariantPrice = price?.MinVariantPrice ?? 0;\r\n typedProduct.ProductPrice = price;\r\n typedProduct.Badge = getDiscountBadge(price);\r\n });\r\n }\r\n\r\n const updateOrderTemplatesAsync = async (newOrderTemplate?: ProductList) => {\r\n let newOrderTemplates;\r\n\r\n if (newOrderTemplate) {\r\n newOrderTemplates = [...(orderTemplates ? orderTemplates : [])];\r\n\r\n // Add new order template if it doesn't exist\r\n if (newOrderTemplates.every(x => x.productList.Id !== newOrderTemplate.Id)) {\r\n newOrderTemplates.splice(0, 0, new OrderTemplate(newOrderTemplate, [], 0));\r\n }\r\n } else {\r\n // Refresh order templates incase new order template was created\r\n const queryResultSettings = QueryResultSettingsProxy.fromInputData({\r\n requestContext: props.context.request,\r\n config: props.config\r\n }).QueryResultSettings;\r\n const input = new GetOrderTemplatesInput('', queryResultSettings);\r\n newOrderTemplates = (await getOrderTemplates(input, props.context.actionContext)).map(x => new OrderTemplate(x, [], 0));\r\n }\r\n\r\n setOrderTemplates(newOrderTemplates);\r\n return newOrderTemplates;\r\n };\r\n\r\n const retrieveOrderTemplates = async () => {\r\n return orderTemplates ? orderTemplates : await updateOrderTemplatesAsync();\r\n };\r\n\r\n if (products) {\r\n return (\r\n \r\n {heading}\r\n {seeAllButton}\r\n {isCarousel\r\n ? _renderCarousel(context,\r\n SingleSlideCarouselComponentProps,\r\n products,\r\n cart.result,\r\n customerInformation.result,\r\n unitConversions,\r\n cartQueue,\r\n retrieveOrderTemplates,\r\n updateOrderTemplatesAsync,\r\n resources,\r\n simpleProducts,\r\n productInventoryStatus)\r\n : _renderGrid(context,\r\n GridComponentProps,\r\n products,\r\n cart.result,\r\n customerInformation.result,\r\n unitConversions,\r\n cartQueue,\r\n retrieveOrderTemplates,\r\n updateOrderTemplatesAsync,\r\n resources,\r\n simpleProducts,\r\n productInventoryStatus)}\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 = (\r\n context: ICoreContext,\r\n carouselContainer: INodeProps,\r\n items: IProductComponentViewProps[],\r\n cart: ICartState | undefined,\r\n customerInformation: Customer | undefined,\r\n unitConversions: UnitOfMeasureConversion[],\r\n cartQueue: PQueue,\r\n retrieveOrderTemplates: () => Promise,\r\n onUpdateOrderTemplates: ((orderTemplate?: ProductList | undefined) => Promise) | undefined,\r\n resources: IProductCollectionResources,\r\n simpleProducts: SimpleProduct[] | undefined,\r\n productInventoryStatus: IProductInventoryInformation[] | undefined\r\n): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(x => _renderProduct(\r\n context,\r\n x,\r\n simpleProducts?.find(sp => (x.productComponent as React.ReactElement).props.data.product.RecordId === sp.RecordId),\r\n cart,\r\n customerInformation,\r\n unitConversions,\r\n productInventoryStatus?.find(pi => pi.ProductAvailableQuantity.ProductId === (x.productComponent as React.ReactElement).props.data.product.RecordId),\r\n cartQueue,\r\n retrieveOrderTemplates,\r\n onUpdateOrderTemplates,\r\n resources))}\r\n \r\n );\r\n};\r\n\r\nconst _renderGrid = (\r\n context: ICoreContext,\r\n gridContainer: INodeProps,\r\n items: IProductComponentViewProps[],\r\n cart: ICartState | undefined,\r\n customerInformation: Customer | undefined,\r\n unitConversions: UnitOfMeasureConversion[],\r\n cartQueue: PQueue,\r\n retrieveOrderTemplates: () => Promise,\r\n onUpdateOrderTemplates: ((orderTemplate?: ProductList | undefined) => Promise) | undefined,\r\n resources: IProductCollectionResources,\r\n simpleProducts: SimpleProduct[] | undefined,\r\n productInventoryStatus: IProductInventoryInformation[] | undefined\r\n): JSX.Element => {\r\n return (\r\n \r\n {items && items.map(x => _renderProduct(\r\n context,\r\n x,\r\n simpleProducts?.find(sp => (x.productComponent as React.ReactElement).props.data.product.RecordId === sp.RecordId),\r\n cart,\r\n customerInformation,\r\n unitConversions,\r\n productInventoryStatus?.find(pi => pi.ProductAvailableQuantity.ProductId === (x.productComponent as React.ReactElement).props.data.product.RecordId),\r\n cartQueue,\r\n retrieveOrderTemplates,\r\n onUpdateOrderTemplates,\r\n resources))}\r\n \r\n );\r\n};\r\n\r\nconst _renderProduct = (\r\n context: ICoreContext,\r\n product: IProductComponentViewProps,\r\n simpleProduct: SimpleProduct | undefined,\r\n cart: ICartState | undefined,\r\n customerInformation: Customer | undefined,\r\n unitConversions: UnitOfMeasureConversion[],\r\n productInventoryStatus: IProductInventoryInformation | undefined,\r\n cartQueue: PQueue,\r\n retrieveOrderTemplates: () => Promise,\r\n onUpdateOrderTemplates: ((orderTemplate?: ProductList | undefined) => Promise) | undefined,\r\n resources: IProductCollectionResources\r\n): JSX.Element => {\r\n const { ProductContainer, productComponent } = product;\r\n\r\n const data = {\r\n ...(productComponent as React.ReactElement).props.data,\r\n cart,\r\n customerInformation,\r\n simpleProduct,\r\n unitConversions: unitConversions.filter(x => x.ProductRecordId === (productComponent as React.ReactElement).props.data.product?.RecordId)\r\n };\r\n\r\n const props: Partial = {\r\n data,\r\n cartQueue,\r\n buyAlwaysAdd: true,\r\n inventoryLabel: getInventoryLabel((productComponent as React.ReactElement).props.data.product?.RecordId, productInventoryStatus ? [productInventoryStatus] : undefined),\r\n inventoryStatus: productInventoryStatus,\r\n retrieveOrderTemplates: retrieveOrderTemplates,\r\n onUpdateOrderTemplates: onUpdateOrderTemplates,\r\n addToCartText: resources.addToCartText,\r\n updateCartText: resources.updateCartText,\r\n removeFromCartText: resources.removeFromCartText,\r\n priceErrorText: resources.priceErrorText,\r\n inCartTooltipText: resources.inCartTooltipText,\r\n transitTooltip: resources.transitTooltip,\r\n toastStrings: {\r\n errorHeader: resources.toastErrorHeader,\r\n productsAddedToCart: resources.productsAddedToCart,\r\n productsRemovedFromCart: resources.productsRemovedFromCart,\r\n productsUpdatedInCart: resources.productsUpdatedInCart,\r\n goToCart: resources.toastGoToCart,\r\n noAccessToProduct: resources.toastNoAccessToProduct\r\n },\r\n addToOrderTemplateResources: {\r\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\r\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\r\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\r\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\r\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\r\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\r\n selectTemplatesText: resources.selectTemplatesText,\r\n addToTemplateButtonText: resources.addToTemplateButtonText,\r\n lineItemsText: resources.lineItemsText,\r\n createOrderTemplateHeader: resources.createOrderTemplateHeader,\r\n orderTemplateTitle: resources.orderTemplateTitle,\r\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\r\n createOrderTemplateDescription: resources.createOrderTemplateDescription,\r\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\r\n createOrderTemplateButtonText: resources.createOrderTemplateButtonText,\r\n cancelNewOrderTemplateCreationButtonText: resources.cancelNewOrderTemplateCreationButtonText,\r\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\r\n continueShoppingButtonText: resources.continueShoppingButtonText,\r\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\r\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\r\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\r\n priceFree: resources.priceFree,\r\n originalPriceText: resources.originalPriceText,\r\n currentPriceText: resources.currentPriceText,\r\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\r\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\r\n updateQuantityButtonText: resources.updateQuantityButtonText,\r\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText,\r\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\r\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip\r\n } as IAddToOrderTemplateResources,\r\n onBuyValidate: (product) => onBuyHasAccessValidator(\r\n context,\r\n customerInformation,\r\n product,\r\n resources.toastNoAccessToProduct\r\n )\r\n }\r\n\r\n // TODO: Hopefully go back to this\r\n // const extendedProductComponent = React.cloneElement(productComponent as React.ReactElement, props);\r\n\r\n // Force the component to use our override since overrides are not always working automatically atm.\r\n // Directly references our ProductComponent instead of the one passed in.\r\n const forcedComponentProps = {\r\n ...(productComponent as React.ReactElement).props,\r\n ...props\r\n };\r\n const forcedComponent = ;\r\n\r\n return {forcedComponent};\r\n};\r\n\r\nexport default ProductCollectionView;\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['product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection'),\n $type: 'containerModule',\n da: [{name:'featureState', path:'@msdyn365-commerce-modules/retail-actions/dist/lib/get-feature-state', runOn: 0}],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'product-collection',\n p: 'product-collection',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/product-collection/dist/lib/modules/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__|themes|dlvry-adventureworks|views|product-collection'] = {\n c: () => require('partner/themes/dlvry-adventureworks/views/product-collection.view.tsx'),\n cn: '__local__-__local__-product-collection'\n };\nviewDictionary['@msdyn365-commerce-modules|product-collection|modules|product-collection|product-collection'] = {\n c: () => require('@msdyn365-commerce-modules/product-collection/dist/lib/modules/product-collection/product-collection.view.js'),\n cn: '@msdyn365-commerce-modules-product-collection-product-collection'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getCatalogId, getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n ObjectExtensions,\n PriceForProductSearchResultInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getTelemetryObject,\n IComponentNodeProps,\n IModuleProps,\n INodeProps,\n ISingleSlideCarouselProps,\n ITelemetryContent,\n NodeTag,\n SingleSlideCarousel\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IProductCollectionData } from './product-collection.data';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\n\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n seeAllButton?: React.ReactNode;\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\n/**\n * ProductCollection component.\n */\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n constructor(props: IProductCollectionProps) {\n super(props);\n this.productPrices = [];\n this.state = {\n products: this.props.config.productCollection.products || []\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\n await this._getActivePrice();\n }\n }\n\n public render(): JSX.Element | null {\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\n const { resources } = this.props;\n const recommendation = this.props.config.productCollection.recommendationListId;\n\n // Initialize state in case if the products were not found during initial module render\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\n this.initProductState(this.props.config.productCollection);\n\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingLabel = heading ? heading.text : '';\n const headingComponent = heading && (\n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\n const getProductData = this._getProduct(item, index);\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\n });\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items'\n },\n isCarousel,\n\n products:\n ArrayExtensions.hasElements(updatedProducts) &&\n updatedProducts.filter(item => {\n return item !== undefined;\n }),\n productPrices: this.productPrices,\n seeAllButton:\n recommendation && shouldDisplaySeeAllButton && ArrayExtensions.hasElements(updatedProducts)\n ? this._getSeeAllButton(recommendation, headingLabel)\n : undefined\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * Get products dimension availabilities.\n * @param products - Products.\n * @returns Promise.\n */\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n const validProducts = ArrayExtensions.validValues(products);\n if (\n ArrayExtensions.hasElements(validProducts) &&\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\n ) {\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n validProducts,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n }\n };\n\n /**\n * Helper method to initialize products state.\n * @param productCollection - List of products.\n */\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\n let products = this.state.products;\n const productCollectionProducts = productCollection.products;\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (\n ArrayExtensions.hasElements(products) &&\n ArrayExtensions.hasElements(productCollectionProducts) &&\n !ArrayExtensions.equals(products, productCollectionProducts)\n ) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (productCollectionProducts === undefined && ArrayExtensions.hasElements(this.state.products)) {\n products = [];\n this.setState({ products: products });\n }\n\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n };\n\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if (!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const quickviewSlot =\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\n const productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const reviewCount = 1;\n const reviewTotalRatings = Number(product.TotalRatings);\n const reviewCountAriaLabelValue =\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index\n },\n productComponent: (\n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\n )}\n />\n )\n };\n };\n\n /**\n * Get the active price for products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.state.products;\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n if (Msdyn365.msdyn365Commerce.isBrowser) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n\n this.setState({ products });\n };\n\n /**\n * Get the see all button.\n * @param recommendation - Recommendation.\n * @param headingLabel - Heading label.\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\n */\n private readonly _getSeeAllButton = (recommendation: string, headingLabel: string): React.ReactNode => {\n if (!Msdyn365.msdyn365Commerce.isBrowser) {\n return null;\n }\n\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n const searchPageLink = getUrlSync('search', this.props.context.actionContext);\n if (!searchPageLink) {\n return null;\n }\n\n const url = new URL(searchPageLink, window.location.href);\n url.searchParams.set('recommendation', recommendation);\n url.searchParams.set('title', headingLabel);\n url.searchParams.set('catalogid', `${catalogId}`);\n\n return (\n \n {this.props.resources.seeAllButtonText}\n \n );\n };\n}\n\nexport default ProductCollection;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const {\n heading,\n ProductCollectionContainer,\n products,\n SingleSlideCarouselComponentProps,\n GridComponentProps,\n isCarousel,\n seeAllButton\n } = props;\n\n if (products) {\n return (\n \n {heading}\n {seeAllButton}\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return {productComponent};\n};\n\nexport default ProductCollectionView;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["getProductUnitOfMeasureOptionsInput","queryResultSettings","productIds","query","DataServiceQuery","resultSettings","top","createDataServiceRequestForOperation","Entities","bypassCache","returnEntity","async","getProductUnitOfMeasureOptionsAsync","context","request","callActionOrExecute","callerContext","DeliveryMode","InventoryLevels","InventoryLevelValues","displayLabelEnabled","inventoryCode","requestContext","app","config","inventoryRanges","available","outOfStock","mapProductInventoryInformation","productsWarehouseInventory","productInventoryInformation","undefined","enableStockCheck","length","product","inventoryLevel","physicalAvailable","physicalProductMap","mapInventoryWithPhysicalBufferEnabled","push","totalAvailable","totalAvailableProductMap","mapInventoryWithTotalAvailableBufferEnabled","productMap","mapInventoryWithThresholdEnabled","productWarehouseInventoryAvailability","ProductId","TotalAvailable","productQty","outOfStockThreshold","productAvailableQuantity","AvailableQuantity","ProductAvailableQuantity","IsProductAvailable","InventLocationId","shouldRenderLabel","PhysicalAvailableInventoryLevelCode","productQuantity","_productWarehouseInve","MaximumPurchasablePhysicalAvailableQuantity","PhysicalAvailable","StockLevelCode","StockLevelLabel","PhysicalAvailableInventoryLevelLabel","TotalAvailableInventoryLevelCode","_productWarehouseInve2","MaximumPurchasableTotalAvailableQuantity","TotalAvailableInventoryLevelLabel","isAggregatedInventory","warehouseAggregation","mapAggregatedProductInventoryInformation","productWarehouseInventoryInformation","_productWarehouseInve3","AggregatedProductInventoryAvailabilities","map","_product$MaximumPurch","_product$MaximumPurch2","DataAreaId","PhysicalAvailableQuantity","TotalAvailableQuantity","ProductWarehouseInventoryAvailabilities","createInventoryAvailabilitySearchCriteria","isDefaultWareHouse","isFilterByChannelFulfillmentGroup","searchArea","defaultDeliveryMode","deliveryMode","shipping","inventoryAvailabilitySearchCriteria","ProductIds","QuantityUnitTypeValue","SearchArea","FilterByChannelFulfillmentGroup","DeliveryModeTypeFilterValue","DefaultWarehouseOnly","onBuyHasAccessValidator","customer","validationMessage","AttributeValues","isValid","hasAccess","hasAccessToBuy","message","getDiscountBadge","productPrice","DiscountLines","discountLineWithBadge","find","x","_x$OfferName","matches","OfferName","toLowerCase","match","parts","split","trim","startsWith","offerName","badge","exec","getPricesAsync","products","_context$request$apiS","batchSize","arguments","result","catalogId","apiSettings","getCatalogId","actionContext","projectDomain","ChannelId","channelId","CatalogId","batchCount","Math","ceil","i","batch","slice","prices","getActivePricesAsync","Date","useActivePrices","activePrices","setActivePrices","React","loading","setLoading","error","setError","user","isAuthenticated","recIds","RecordId","then","catch","finally","getInventoryLabel","productRecordId","productInventoryStatus","shippingInventory","_renderCarousel","carouselContainer","items","cart","customerInformation","unitConversions","cartQueue","retrieveOrderTemplates","onUpdateOrderTemplates","resources","simpleProducts","Node","Object","assign","_renderProduct","sp","productComponent","props","data","pi","_renderGrid","gridContainer","simpleProduct","_productComponent$pro2","ProductContainer","_objectSpread","filter","_productComponent$pro","ProductRecordId","buyAlwaysAdd","inventoryLabel","inventoryStatus","addToCartText","updateCartText","removeFromCartText","priceErrorText","inCartTooltipText","transitTooltip","toastStrings","errorHeader","toastErrorHeader","productsAddedToCart","productsRemovedFromCart","productsUpdatedInCart","goToCart","toastGoToCart","noAccessToProduct","toastNoAccessToProduct","addToOrderTemplateResources","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","createOrderTemplateHeader","orderTemplateTitle","orderTemplateNameAriaLabel","createOrderTemplateDescription","defaultOrderTemplateName","createOrderTemplateButtonText","cancelNewOrderTemplateCreationButtonText","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","priceFree","originalPriceText","currentPriceText","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","onBuyValidate","forcedComponentProps","forcedComponent","ProductComponent","heading","ProductCollectionContainer","SingleSlideCarouselComponentProps","GridComponentProps","isCarousel","seeAllButton","orderTemplates","setOrderTemplates","PQueue","concurrency","setSimpleProducts","setConversions","setProductInventoryStatus","_config$productCollec","productCollection","shippingSearchCriteria","shippingAvailability","ProductsDataActions","ArrayExtensions","hasElements","deliveryType","work","useGetInventoryStatus","_props$config$product","ids","some","y","getByIdsAsync","unitOfMeasureConversions","conversions","Array","isArray","forEach","_price$CustomerContex","_price$BasePrice","_price$MaxVariantPric","_price$MinVariantPric","typedProduct","price","showPrice","attributeLocale","getAttributesLocale","locale","Brand","getAttributeStringOrDefault","brand","Manufacturer","manufacturer","Transit","transit","Price","CustomerContextualPrice","BasePrice","MaxVariantPrice","MinVariantPrice","ProductPrice","Badge","updateOrderTemplatesAsync","newOrderTemplates","newOrderTemplate","every","productList","Id","splice","OrderTemplate","QueryResultSettingsProxy","fromInputData","QueryResultSettings","input","GetOrderTemplatesInput","getOrderTemplates","Module","telemetry","binding","modules","dataActions","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","id","window","__bindings__","viewDictionary","cn","ProductCollection","constructor","super","handleHeadingChange","event","this","text","target","value","_getProductsDimensionsAvailabilities","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","validValues","includes","DimensionTypes","none","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","setState","initProductState","state","productCollectionProducts","equals","Msdyn365","isBrowser","_getProduct","index","_this$props$data$feat","_this$state$productsD","Name","trace","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","imageSettings","allowBackNavigation","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","slots","quickview","productComparisonButtonSlot","productComparisonButton","reviewCountAriaLabelValue","Number","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","featureState","priceResources","priceRangeSeparator","tag","className","role","key","freePriceText","ratingAriaLabel","typeName","quickViewButton","IsEnabled","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSeeAllButton","recommendation","headingLabel","validateCatalogId","searchPageLink","getUrlSync","url","URL","location","href","searchParams","set","Button","title","seeAllButtonText","productPrices","enableAffiliationBasedPricing","render","shouldDisplaySeeAllButton","recommendationListId","layout","headingComponent","editProps","onEdit","updatedProducts","item","getProductData","ObjectExtensions","isNullOrUndefined","productCollectionViewProps","SingleSlideCarousel","flipperPrevLabel","flipperPrevious","flipperNextLabel","flipperNext","parentId","moduleProps","classnames","renderView","module","exports","ReactDOM"],"sourceRoot":""}