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BAAsBoI,EAAsB,mCAEhEJ,EAAQE,YAAYE,GAAqBE,QAAQC,UAAUC,eAAiBJ,EACxEJ,EAAQE,YAAYE,GAAqBE,QAAQC,UAAU5E,KAC3DqE,EAAQE,YAAYF,EAAQE,YAAYE,GAAqBE,QAAQC,UAAU5E,IAAMyE,IAMhGJ,EAAQC,QAAQ,qBAAuB,CACpCQ,EAAGA,IAAMC,EAAQ,MACjBC,MAAO,gBACPC,GAAI,CAAC,CAACC,KAAK,OAASC,KAAK,+EAAgFC,MAAO,GAAG,CAACF,KAAK,mBAAqBC,KAAK,oEAAqEC,MAAO,IAE/NC,KAAK,EACLC,GAAI,YACJC,EAAG,oBACHC,EAAG,YAEHC,IAAK,GAGLC,GAAI,iCAOAlB,EAF4B,+EACXO,EAAQ,KAQzBP,EAF4B,oEACXO,EAAQ,OAMjCY,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAatB,QAAO7D,EAAAA,EAAA,GACpBkF,OAAOC,aAAatB,SAAW,IAC/BD,EAAQC,SAGXqB,OAAOC,aAAarB,YAAW9D,EAAAA,EAAA,GAC5BkF,OAAOC,aAAarB,aAAe,IACnCF,EAAQE,aAEY,MAAMsB,EAAiB,GAC9BA,EAAe,mEAAqE,CAC5Ff,EAAGA,IAAMC,EAAQ,MACjBe,GAAI,yCAEpBH,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaC,eAAcpF,EAAAA,EAAA,GACPkF,OAAOC,aAAaC,gBAAkB,IACtCA,UC1F3BE,EAAOC,QAAUrK,cCAjBoK,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./src/components/common/product-inventory-utils.ts?8daa","webpack://Msdyn365.Commerce.Online/./src/components/unit-of-measure/utils/humanize-unit-of-measure.ts?110c","webpack://Msdyn365.Commerce.Online/./src/components/unit-of-measure/unit-of-measure.tsx?45a5","webpack://Msdyn365.Commerce.Online/./src/modules/dlvry-export-cart/actions/get-cart-with-extended-products.ts?d855","webpack://Msdyn365.Commerce.Online/./src/modules/dlvry-export-cart/dlvry-export-cart.tsx?7c9f","webpack://Msdyn365.Commerce.Online/./src/modules/dlvry-export-cart/dlvry-export-cart.view.tsx?0747","webpack://Msdyn365.Commerce.Online/./src/shared-utils/attributes/get-temperature-zone.ts?a94a","webpack://Msdyn365.Commerce.Online/./src/shared-utils/attributes/locale/locale.ts?bf3e","webpack://Msdyn365.Commerce.Online/./lib/dlvry-export-cart/module-registration.js?d4cb","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/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 { 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\n\r\nconst translations = {\r\n 'nb-NO': {\r\n 'Flaske-BS': 'Stk',\r\n 'Stk-BS': 'Stk',\r\n 'Stk-M1': 'Krt',\r\n 'Boks-BS': 'Stk',\r\n 'Krt-BS': 'Stk',\r\n 'Krt-M1': 'Krt',\r\n 'Krt-M2': 'Krt',\r\n 'Pose-BS': 'Stk',\r\n 'Kanne-BS': 'Stk',\r\n 'Fat-BS': 'Stk',\r\n 'Glass-BS': 'Stk',\r\n 'Rull-BS': 'Stk',\r\n 'Brett-BS': 'Stk',\r\n 'Brett-M1': 'Brt',\r\n 'Brett-M2': 'Brt',\r\n 'Tube-BS': 'Stk',\r\n 'Sekk-BS': 'Stk',\r\n 'Bunt-BS': 'Stk'\r\n },\r\n 'en-US': {\r\n 'Flaske-BS': 'Pcs',\r\n 'Stk-BS': 'Pcs',\r\n 'Stk-M1': 'Box',\r\n 'Boks-BS': 'Pcs',\r\n 'Krt-BS': 'Pcs',\r\n 'Krt-M1': 'Box',\r\n 'Krt-M2': 'Box',\r\n 'Pose-BS': 'Pcs',\r\n 'Kanne-BS': 'Pcs',\r\n 'Fat-BS': 'Pcs',\r\n 'Glass-BS': 'Pcs',\r\n 'Rull-BS': 'Pcs',\r\n 'Brett-BS': 'Pcs',\r\n 'Brett-M1': 'Try',\r\n 'Brett-M2': 'Try',\r\n 'Tube-BS': 'Pcs',\r\n 'Sekk-BS': 'Pcs',\r\n 'Bunt-BS': 'Pcs'\r\n }\r\n};\r\n\r\nexport function humanizeUnitOfMeasure(locale: ICoreContext | string, unitOfMeasure: string | undefined): string {\r\n if (!unitOfMeasure) {\r\n return '';\r\n }\r\n\r\n // Check if locale is a string or an ICoreContext object\r\n if (typeof locale === 'object') {\r\n locale = locale.request.locale;\r\n }\r\n return translations[locale]?.[unitOfMeasure] || unitOfMeasure;\r\n}\r\n","import * as React from 'react';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport classnames from 'classnames';\r\nimport { humanizeUnitOfMeasure } from './utils';\r\n\r\ninterface IUnitOfMeasureProps {\r\n context: ICoreContext;\r\n className?: string;\r\n simpleProduct?: SimpleProduct;\r\n unitOfMeasure?: string;\r\n disableTranslate?: boolean;\r\n}\r\n\r\nconst UnitOfMeasure = (props: IUnitOfMeasureProps) => {\r\n const { context } = props;\r\n let { disableTranslate } = props;\r\n\r\n const className = classnames('dlvry-unit-of-measure', props.className);\r\n\r\n // Check if already disabled\r\n if (!disableTranslate) {\r\n // @ts-expect-error\r\n if (context.app.config.humanizeUnitOfMeasure !== true) {\r\n disableTranslate = true;\r\n } else {\r\n // Disable if disableUnitReplace is present and not 1 or 'true'\r\n const disableUnitReplace = context.request.url.requestUrl.searchParams.get('disableUnitReplace');\r\n disableTranslate = disableUnitReplace === '' || disableUnitReplace === '1' || disableUnitReplace?.toLowerCase() === 'true';\r\n }\r\n }\r\n\r\n let unitOfMeasure = props.unitOfMeasure || props.simpleProduct?.DefaultUnitOfMeasure || '';\r\n unitOfMeasure = disableTranslate\r\n ? unitOfMeasure\r\n : humanizeUnitOfMeasure(context, unitOfMeasure);\r\n\r\n return (\r\n \r\n {unitOfMeasure}\r\n \r\n );\r\n};\r\n\r\n\r\nexport default UnitOfMeasure;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ProductsDataActions, ProductSearchCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getLocale } from '../../../shared-utils/attributes/locale';\r\nimport { getTemperatureZone } from '../../../shared-utils/attributes/get-temperature-zone';\r\nimport { getAttributeStringOrDefault } from '../../../shared-utils/attributes';\r\nimport { createInventoryAvailabilitySearchCriteria, DeliveryMode, IProductInventoryInformation, mapAggregatedProductInventoryInformation } from '../../../components/common/product-inventory-utils';\r\nimport { SimpleProductExt } from '../../../shared-utils/types';\r\n\r\nexport class GetCartWithExtendedProductsInput implements IActionInput {\r\n public getCacheKey = () => 'GetCartWithExtendedProducts';\r\n public getCacheObjectType = () => 'GetCartWithExtendedProducts';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the GetCartWithExtendedProducts method.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createGetCartWithExtendedProductsInput = (inputData: ICreateActionContext): GetCartWithExtendedProductsInput => {\r\n const { requestContext } = inputData;\r\n if (!requestContext.user.isAuthenticated) {\r\n throw new Error('Unable to get cart with extended products. User is not authenticated.');\r\n }\r\n\r\n return new GetCartWithExtendedProductsInput();\r\n};\r\n\r\n/**\r\n * The action method for the GetCartWithExtendedProducts data action.\r\n * @param input The action input.\r\n * @param ctx The action context.\r\n */\r\nexport async function getCartWithExtendedProductsAction(input: GetCartWithExtendedProductsInput, ctx: IActionContext): Promise {\r\n if (!ctx.requestContext.user.isAuthenticated) {\r\n throw new Error('Unable to get cart with extended products. User is not authenticated.');\r\n }\r\n\r\n const cart = await getCartState(ctx);\r\n\r\n if (!cart) {\r\n throw new Error('Unable to get cart with extended products. Cart is not available.');\r\n }\r\n\r\n const searchCriteriaInput: ProductSearchCriteria = {};\r\n searchCriteriaInput.Context = { ChannelId: ctx.requestContext.apiSettings.channelId, CatalogId: ctx.requestContext.apiSettings.catalogId };\r\n searchCriteriaInput.IncludeAttributes = true;\r\n searchCriteriaInput.SkipVariantExpansion = true;\r\n searchCriteriaInput.Ids = cart.cart.CartLines?.map(x => x.ProductId).filter(Boolean) as number[];\r\n\r\n const results = await searchByCriteriaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: {\r\n Paging: {\r\n Skip: 0,\r\n Top: 1000\r\n }\r\n }\r\n },\r\n searchCriteriaInput\r\n );\r\n\r\n if (!results) {\r\n return [];\r\n }\r\n\r\n const shippingSearchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n results.map(x => x.RecordId),\r\n true,\r\n undefined,\r\n undefined,\r\n DeliveryMode.shipping\r\n );\r\n const shippingAvailability = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx },\r\n shippingSearchCriteria\r\n );\r\n let shippingInventory: IProductInventoryInformation[] | undefined;\r\n\r\n if (shippingAvailability.ProductWarehouseInventoryAvailabilities) {\r\n shippingInventory = mapAggregatedProductInventoryInformation(ctx, shippingAvailability);\r\n if (ArrayExtensions.hasElements(shippingInventory)) {\r\n shippingInventory[0].deliveryType = DeliveryMode.shipping;\r\n }\r\n }\r\n\r\n const attributeLocale = getLocale(ctx.requestContext.locale);\r\n const simpleProducts: SimpleProductExt[] = results?.map(x => (\r\n {\r\n AdjustedPrice: x.Price,\r\n AvailabilityLabel: shippingInventory?.find(y => y.ProductAvailableQuantity.ProductId === x.RecordId)?.StockLevelLabel,\r\n BasePrice: x.BasePrice || x.Price,\r\n Brand: getAttributeStringOrDefault(x.AttributeValues, attributeLocale.brand, ''),\r\n Description: x.Description,\r\n Price: x.Price,\r\n ProductTypeValue: x.RecordId,\r\n RecordId: x.RecordId,\r\n DefaultUnitOfMeasure: x.DefaultUnitOfMeasure,\r\n ItemId: x.ItemId,\r\n Name: x.Name,\r\n ProductNumber: x.ProductNumber,\r\n Storage: getTemperatureZone(ctx.requestContext.locale, x.AttributeValues)\r\n }\r\n ));\r\n\r\n return simpleProducts;\r\n}\r\n\r\n/**\r\n * The GetCartWithExtendedProducts Data Action\r\n * Returns order templates.\r\n */\r\nexport const getCartWithExtendedProductsActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/get-cart-with-extended-products',\r\n action: >getCartWithExtendedProductsAction,\r\n input: createGetCartWithExtendedProductsInput\r\n});\r\n\r\nexport default getCartWithExtendedProductsActionDataAction;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\n\nimport { IDlvryExportCartData } from './dlvry-export-cart.data';\nimport { IDlvryExportCartProps } from './dlvry-export-cart.props.autogenerated';\nimport { UnitOfMeasure } from '../../components/unit-of-measure';\n\nexport interface IDlvryExportCartViewProps extends IDlvryExportCartProps {\n heading: JSX.Element;\n table: JSX.Element;\n}\n\nexport interface IDlvryExportCartState {\n}\n\n/**\n *\n * DlvryExportCart component\n * @extends {React.PureComponent>}\n */\nclass DlvryExportCart extends React.PureComponent, IDlvryExportCartState> {\n\n constructor(props: IDlvryExportCartProps) {\n super(props);\n\n this.state = {};\n }\n\n public render(): JSX.Element | null {\n const viewProps: IDlvryExportCartViewProps = {\n ...this.props,\n heading: ,\n table: this._renderTable()\n };\n\n return this.props.renderView(viewProps);\n }\n\n private _formatNumber(value: number): string {\n return this.props.context.cultureFormatter.formatNumber(value, { minimumFractionDigits: 2 });\n }\n\n private _renderTable(): JSX.Element {\n const {\n data: {\n cart\n },\n resources\n } = this.props;\n\n const sharedStyles: React.CSSProperties = {\n whiteSpace: 'nowrap'\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {this.props.data.productsExtended.result?.map((product) => {\n const cartLine = cart.result?.cart.CartLines?.find(x => x.ProductId === product.RecordId);\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n })}\n \n
\n # {/* Used to ignore line during import */}\n {resources.itemNumberHeader}\n {resources.quantityHeader}{resources.anbrekkHeader}{resources.totalQuantityHeader}{resources.itemNameHeader}{resources.brandHeader}{resources.stockStatusHeader}{resources.storageHeader}{resources.unitPriceHeader}{resources.totalPriceHeader}{resources.unitHeader}
{product.ItemId}{this._formatNumber(cartLine?.Quantity ?? 0)}{this.props.resources.no}{this._formatNumber(cartLine?.Quantity ?? 0)}{product.Name}{product.Brand}{product.AvailabilityLabel}{product.Storage}{this._formatNumber(cartLine?.Price ?? 0)}{this._formatNumber((cartLine?.Price ?? 0) * (cartLine?.Quantity ?? 0))}\n \n
\n );\n }\n}\n\nexport default DlvryExportCart;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { IDlvryExportCartViewProps } from './dlvry-export-cart';\n\nexport default (props: IDlvryExportCartViewProps) => {\n const { heading, table } = props;\n\n return (\n
\n {heading}\n {table}\n
\n );\n};\n","import { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\r\nimport { getAttributesLocale, getAttributeNumberOrDefault } from '../../shared-utils/attributes';\r\n\r\nexport function getTemperatureZone(lang: string, productSpecificationData: AttributeValue[] | undefined): string | undefined {\r\n if (!productSpecificationData) {\r\n return undefined;\r\n }\r\n\r\n const locale = getAttributesLocale(lang);\r\n // Use 10 as default value if no temperature is set\r\n const maxTemp = getAttributeNumberOrDefault(productSpecificationData, locale.temperatureMax, 10);\r\n\r\n if (maxTemp < 0) {\r\n return locale.frozen;\r\n } else if (maxTemp <= 4) {\r\n return locale.cool;\r\n } else {\r\n return locale.dry;\r\n }\r\n}\r\n\r\nexport function getTemperatureZoneIcon(context: ICoreContext, temperatureZone: string): string | undefined {\r\n const locale = getAttributesLocale(context.request.locale);\r\n\r\n switch (temperatureZone) {\r\n case locale.frozen:\r\n return 'frozen';\r\n case locale.cool:\r\n return 'cool';\r\n default:\r\n return undefined;\r\n }\r\n}\r\n","import { ICoreContext } from '@msdyn365-commerce/core';\r\nimport nbNO from './nb-NO.json';\r\nimport enUS from './en-US.json';\r\n\r\nexport function getLocale(langOrContext: string | ICoreContext): typeof nbNO {\r\n const lang = typeof langOrContext === 'string' ? langOrContext : langOrContext.request.locale;\r\n\r\n switch (lang) {\r\n case 'nb-NO':\r\n return nbNO;\r\n case 'en-US':\r\n return {...nbNO, ...enUS};\r\n default:\r\n return nbNO;\r\n }\r\n}\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['dlvry-export-cart'] = {\n c: () => require('partner/modules/dlvry-export-cart/dlvry-export-cart.tsx'),\n $type: 'contentModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 0},{name:'productsExtended', path:'modules/dlvry-export-cart/actions/get-cart-with-extended-products', runOn: 0}],\n \n iNM: false,\n ns: '__local__',\n n: 'dlvry-export-cart',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/dlvry-export-cart'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = 'modules/dlvry-export-cart/actions/get-cart-with-extended-products';\n let dataAction = require('partner/modules/dlvry-export-cart/actions/get-cart-with-extended-products');\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|dlvry-export-cart|dlvry-export-cart'] = {\n c: () => require('partner/modules/dlvry-export-cart/dlvry-export-cart.view.tsx'),\n cn: '__local__-__local__-dlvry-export-cart'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["DeliveryMode","InventoryLevels","InventoryLevelValues","displayLabelEnabled","context","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","productIds","isDefaultWareHouse","isFilterByChannelFulfillmentGroup","searchArea","defaultDeliveryMode","deliveryMode","shipping","inventoryAvailabilitySearchCriteria","ProductIds","QuantityUnitTypeValue","SearchArea","FilterByChannelFulfillmentGroup","DeliveryModeTypeFilterValue","DefaultWarehouseOnly","translations","humanizeUnitOfMeasure","locale","unitOfMeasure","_translations$locale","request","props","_props$simpleProduct","disableTranslate","className","classnames","disableUnitReplace","url","requestUrl","searchParams","get","toLowerCase","simpleProduct","DefaultUnitOfMeasure","React","GetCartWithExtendedProductsInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","createGetCartWithExtendedProductsInput","inputData","user","isAuthenticated","Error","async","getCartWithExtendedProductsAction","input","ctx","_cart$cart$CartLines","cart","getCartState","searchCriteriaInput","Context","ChannelId","apiSettings","channelId","CatalogId","catalogId","IncludeAttributes","SkipVariantExpansion","Ids","CartLines","x","filter","Boolean","results","searchByCriteriaAsync","callerContext","queryResultSettings","Paging","Skip","Top","shippingSearchCriteria","RecordId","shippingAvailability","ProductsDataActions","shippingInventory","ArrayExtensions","hasElements","deliveryType","attributeLocale","getLocale","_shippingInventory","AdjustedPrice","Price","AvailabilityLabel","find","y","BasePrice","Brand","getAttributeStringOrDefault","AttributeValues","brand","Description","ProductTypeValue","ItemId","Name","ProductNumber","Storage","getTemperatureZone","getCartWithExtendedProductsActionDataAction","createObservableDataAction","id","action","DlvryExportCart","super","this","state","render","_this$props$config$he","viewProps","_objectSpread","heading","Msdyn365","tag","text","table","_renderTable","renderView","_formatNumber","value","cultureFormatter","formatNumber","minimumFractionDigits","_this$props$data$prod","data","resources","sharedStyles","whiteSpace","align","style","fontSize","lineHeight","itemNumberHeader","quantityHeader","anbrekkHeader","totalQuantityHeader","itemNameHeader","brandHeader","stockStatusHeader","storageHeader","unitPriceHeader","totalPriceHeader","unitHeader","productsExtended","result","_cart$result","_cartLine$Quantity","_cartLine$Quantity2","_cartLine$Price","_cartLine$Price2","_cartLine$Quantity3","cartLine","key","Quantity","no","UnitOfMeasure","lang","productSpecificationData","getAttributesLocale","maxTemp","getAttributeNumberOrDefault","temperatureMax","frozen","cool","dry","getTemperatureZoneIcon","temperatureZone","langOrContext","nbNO","enUS","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM"],"sourceRoot":""}