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,CACI,MAAMA,EAAa,wCACnBJ,EAAQE,YAAYE,GAAcK,EAAQ,KAC1CN,EAAiBC,GAGrB,CACI,MAAMA,EAAa,6DACnBJ,EAAQE,YAAYE,GAAcK,EAAQ,KAC1CN,EAAiBC,GAGrB,CACI,MAAMA,EAAa,2DACnBJ,EAAQE,YAAYE,GAAcK,EAAQ,KAC1CN,EAAiBC,GAGrB,CACI,MAAMA,EAAa,2DACnBJ,EAAQE,YAAYE,GAAcK,EAAQ,KAC1CN,EAAiBC,GAIzBM,OAAOC,aAAeD,OAAOC,cAAgB,GAC7CD,OAAOC,aAAaV,QAAOlG,EAAAA,EAAA,GACpB2G,OAAOC,aAAaV,SAAW,IAC/BD,EAAQC,SAGXS,OAAOC,aAAaC,mBAAqB,GACzCF,OAAOC,aAAaC,mBAA8B,UAAC7G,EAAA,GAC5CiG,EAAQE,iCC7GvBW,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://henrys-ecommerce/./src/actions/get-all-dimensions-for-product.ts?0098","webpack://henrys-ecommerce/./src/actions/get-applicable-warranties.action.ts?6ef5","webpack://henrys-ecommerce/./src/actions/get-attributes-for-selected-variant.action.ts?8d1d","webpack://henrys-ecommerce/./src/actions/get-availabilities-cartlines.action.ts?de39","webpack://henrys-ecommerce/./src/actions/get-full-available-inventory-nearby.action.ts?562c","webpack://henrys-ecommerce/./src/actions/get-media-locations-by-id.action.ts?bed9","webpack://henrys-ecommerce/./src/actions/get-media-locations-for-selected-variant.action.ts?5dc9","webpack://henrys-ecommerce/./src/actions/get-product-promotions.action.ts?ea24","webpack://henrys-ecommerce/./src/actions/getProductVariantOrMaster.ts?9116","webpack://henrys-ecommerce/./src/common/utilities/createCanonicalUrl.ts?7ccf","webpack://henrys-ecommerce/./src/modules/category-page-summary/category-page-summary.action.ts?ff83","webpack://henrys-ecommerce/./src/modules/default-page-summary/default-page-summary.action.ts?c630","webpack://henrys-ecommerce/./src/modules/product-page-summary/product-page-summary.action.ts?e077","webpack://henrys-ecommerce/./lib/__local__/module-registration.js?8a42","webpack://henrys-ecommerce/external var \"React\"?0d3b","webpack://henrys-ecommerce/external var \"ReactDOM\"?853b"],"sourcesContent":["import { createObservableDataAction, ICreateActionContext, IAction } from '@msdyn365-commerce/core';\r\nimport {\r\n IDimensionForSelectedVariant,\r\n getDimensionsForSelectedVariantAction,\r\n getSelectedProductIdFromActionInput,\r\n GetDimensionsForSelectedVariantInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nexport class GetAllDimensionsForProductInput extends GetDimensionsForSelectedVariantInput {\r\n constructor(productId: number, channelId: number) {\r\n super(productId, channelId, []);\r\n }\r\n\r\n public getCacheObjectType = () => 'HEI-AllDimensionsForProduct';\r\n}\r\n\r\nconst createAllDimensionsForProductInput = (inputData: ICreateActionContext) => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n\r\n // process.env.NODE_ENV === 'development' &&\r\n // console.log('hei-get-all-dimensions-for-product', 'createAllDimensionsForProductInput', productId, inputData);\r\n\r\n if (productId) {\r\n return new GetAllDimensionsForProductInput(+productId, +inputData.requestContext.apiSettings.channelId);\r\n }\r\n\r\n throw new Error('Unable to create AllDimensionsForProductInput, no productId found on module config or query');\r\n};\r\n\r\nexport const getAllDimensionsForProductActionDataAction = createObservableDataAction({\r\n id: 'hei-get-all-dimensions-for-product',\r\n action: >getDimensionsForSelectedVariantAction,\r\n input: createAllDimensionsForProductInput\r\n});\r\n\r\nexport default getAllDimensionsForProductActionDataAction;\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { createObservableDataAction, IAction, IActionContext } from '@msdyn365-commerce/core';\r\nimport { ProductsDataActions, WarrantyGroup, ProductDimension } from '@msdyn365-commerce/retail-proxy';\r\nimport { getSelectedProductIdFromActionInput, getDimensionValuesFromQuery } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getProductVariantOrMaster } from './getProductVariantOrMaster';\r\n\r\nexport class getApplicableWarrantiesInput implements Msdyn365.IActionInput {\r\n public readonly recordId: number;\r\n public readonly dimensionValues: ProductDimension[];\r\n\r\n constructor(recordId: number, dimensionValues: ProductDimension[]) {\r\n this.recordId = recordId;\r\n this.dimensionValues = dimensionValues;\r\n }\r\n\r\n public getCacheKey = () => `${this.recordId}-${this.dimensionValues.map(v => v.DimensionValue?.Value ?? '').join('|')}`;\r\n public getCacheObjectType = () => 'HEI-ApplicableWarranties';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (context: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n const matchingDimensionValues = getDimensionValuesFromQuery(context.requestContext.url.requestUrl);\r\n const productId = getSelectedProductIdFromActionInput(context);\r\n if (productId) {\r\n return new getApplicableWarrantiesInput(+productId, matchingDimensionValues);\r\n } else {\r\n throw new Error('Unable to create GetProductInfoInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\nexport async function getApplicableWarrantiesAction(\r\n input: getApplicableWarrantiesInput,\r\n context: IActionContext\r\n): Promise {\r\n const matchingDimensionValues = input.dimensionValues;\r\n const productVariantOrMaster = await getProductVariantOrMaster(input.recordId, matchingDimensionValues, context);\r\n\r\n const applicableWarranties = await ProductsDataActions.getApplicableWarrantiesAsync(\r\n { callerContext: context },\r\n context.requestContext.apiSettings.catalogId,\r\n [productVariantOrMaster.RecordId]\r\n );\r\n\r\n const warrantyGroup = applicableWarranties.find(aw => aw.WarrantableProductId === productVariantOrMaster.RecordId);\r\n return warrantyGroup?.WarrantyGroups;\r\n}\r\n\r\n/**\r\n * The complete createGetApplicableWarrantiesInput data action.\r\n */\r\nexport const getApplicableWarrantiesActionDataAction = createObservableDataAction({\r\n id: 'hei-get-applicable-warranties',\r\n action: >getApplicableWarrantiesAction,\r\n input: createInput\r\n});\r\n\r\nexport default getApplicableWarrantiesActionDataAction;\r\n","// base on @msdyn365-commerce-modules/retail-actions/get-attributes-for-selected-variant\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n getCatalogId,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { AttributeValue, ProductsDataActions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport {\r\n getSelectedProductIdFromActionInput,\r\n SelectedVariantInput,\r\n getSelectedVariantActionDataAction\r\n // QueryResultSettingsProxy\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Chains getting the SelectedVariant with GetActivePrice.\r\n */\r\nexport class AttributesForSelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public catalogId: number;\r\n\r\n public selectedProduct: SimpleProduct | undefined;\r\n\r\n constructor(productId: number, channelId: number, selectedProduct?: SimpleProduct, catalogId?: number) {\r\n this.productId = productId;\r\n this.channelId = channelId;\r\n this.selectedProduct = selectedProduct;\r\n this.catalogId = catalogId || 0;\r\n }\r\n\r\n public getCacheKey = () => 'AttributesForSelectedVariant';\r\n\r\n public getCacheObjectType = () => 'ProductAttributeValue';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nexport const createAttributesForSelectedVariantInput = (\r\n inputData: ICreateActionContext>\r\n): AttributesForSelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n const catalogId = getCatalogId(inputData.requestContext);\r\n\r\n if (productId) {\r\n return new AttributesForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, undefined, catalogId);\r\n }\r\n throw new Error('Unable to create PriceForSelectedVariantInput, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * Calls the Retail API a get a list of dimension values for a given product.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getAttributesForSelectedVariantAction(\r\n input: AttributesForSelectedVariantInput,\r\n ctx: IActionContext\r\n): Promise {\r\n return Promise.resolve()\r\n .then(() => {\r\n const activeProduct: SimpleProduct | undefined = input.selectedProduct;\r\n\r\n if (!activeProduct) {\r\n const selectedVariantInput = new SelectedVariantInput(\r\n input.productId,\r\n input.channelId,\r\n undefined,\r\n undefined,\r\n ctx.requestContext\r\n );\r\n\r\n return getSelectedVariantActionDataAction(selectedVariantInput, ctx);\r\n }\r\n\r\n return activeProduct;\r\n })\r\n .then((productResult: SimpleProduct | null) => {\r\n const activeProduct: SimpleProduct | undefined = productResult;\r\n\r\n if (activeProduct) {\r\n return ProductsDataActions.getAttributeValuesAsync(\r\n {\r\n callerContext: ctx\r\n // queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx)\r\n },\r\n activeProduct.RecordId,\r\n input.channelId,\r\n input.catalogId\r\n );\r\n }\r\n\r\n return null;\r\n })\r\n .then((attributeValues: AttributeValue[] | null) => {\r\n const resultArray = attributeValues;\r\n if (resultArray) {\r\n return resultArray;\r\n }\r\n\r\n return [];\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace(error.message);\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug('[getPriceForSelectedVariantAction]Error executing action');\r\n throw new Error('[getPriceForSelectedVariantAction]Error executing action');\r\n });\r\n}\r\n\r\nexport const getAttributesForSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-attributes-for-selected-variant',\r\n action: >getAttributesForSelectedVariantAction,\r\n input: createAttributesForSelectedVariantInput\r\n});\r\n\r\nexport default getAttributesForSelectedVariantActionDataAction;\r\n","// base on @msdyn365-commerce-modules/retail-actions/get-availabilities-cartlines\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric\r\n} from '@msdyn365-commerce/core';\r\nimport { getCartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n OrgUnitsDataActions,\r\n ProductsDataActions,\r\n ProductWarehouse,\r\n StoreOperationsDataActions\r\n} from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport {\r\n ActiveCartProductsInput,\r\n ArrayExtensions,\r\n buildCacheKey,\r\n createInventoryAvailabilitySearchCriteria,\r\n getActiveCartProductsAction,\r\n IProductInventoryInformation,\r\n mapAggregatedProductInventoryInformation,\r\n mapProductInventoryInformation,\r\n getFeatureState,\r\n createGetFeatureStateInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Input class for availabilities for items in cart.\r\n */\r\nexport class ProductAvailabilitiesForCartLineItems implements IActionInput {\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(apiSettings: ICommerceApiSettings) {\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () => buildCacheKey('ActiveCartLineItemsAvailability', this.apiSettings);\r\n\r\n public getCacheObjectType = () => 'ActiveCartLineItemsAvailability';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>) => {\r\n return new ProductAvailabilitiesForCartLineItems(inputData.requestContext.apiSettings);\r\n};\r\n\r\n/**\r\n * Calls the Retail Feature State API and returns a list of feature with isEnabled flag.\r\n * @param cartLine\r\n * @param featureSate\r\n * @param channelDeliveryOptionConfig\r\n * @param pickupDeliveryMode\r\n */\r\nconst getDeliveryMode = (\r\n cartLine: CartLine,\r\n featureSate: boolean = false,\r\n channelDeliveryOptionConfig: ChannelDeliveryOptionConfiguration,\r\n pickupDeliveryMode?: string\r\n) => {\r\n if (!featureSate) {\r\n return cartLine.DeliveryMode === pickupDeliveryMode;\r\n }\r\n return (\r\n cartLine.DeliveryMode ===\r\n channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === cartLine.DeliveryMode)\r\n );\r\n};\r\n\r\n/**\r\n * Calls the Retail API to get the product availabilities for items in the cart.\r\n * @param input\r\n * @param ctx\r\n */\r\n// eslint-disable-next-line complexity\r\nexport async function getAvailabilitiesForCartLineItems(\r\n input: ProductAvailabilitiesForCartLineItems,\r\n ctx: IActionContext\r\n): Promise {\r\n // If no input is provided fail out\r\n if (!input) {\r\n throw new Error('[getAvailabilitiesForCartLineItems]No valid Input was provided, failing');\r\n }\r\n\r\n const shippingItems: CartLine[] = [];\r\n const bopisItemsDict: { [key: string]: CartLine } = {};\r\n let productAvailabilities: IProductInventoryInformation[] = [];\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n let channelDeliveryOptionConfig: any;\r\n\r\n const cartState = await getCartState(ctx);\r\n const cart = cartState.cart;\r\n const channelConfiguration = await OrgUnitsDataActions.getOrgUnitConfigurationAsync({ callerContext: ctx });\r\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx);\r\n\r\n const featureState = await getFeatureState(createGetFeatureStateInput({ requestContext: ctx.requestContext }), ctx);\r\n const retailMultiplePickUpOptionEnabled = featureState?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n if (retailMultiplePickUpOptionEnabled) {\r\n channelDeliveryOptionConfig = await StoreOperationsDataActions.getChannelDeliveryOptionConfigurationAsync({ callerContext: ctx });\r\n }\r\n const PickupDeliveryModeCode = channelConfiguration.PickupDeliveryModeCode;\r\n const EmailDeliveryModeCode = channelConfiguration.EmailDeliveryModeCode;\r\n\r\n if (!cart || !channelConfiguration || !products || products.length === 0) {\r\n ctx.trace('[getAvailabilitiesForCartLineItems] Not able to get cart OR channelConfiguration or no products in cart');\r\n return [];\r\n }\r\n\r\n if (cart && cart.Id && cart.CartLines && cart.CartLines.length > 0 && channelConfiguration) {\r\n for (const cartLine of cart.CartLines) {\r\n if (\r\n cartLine.DeliveryMode &&\r\n cartLine.DeliveryMode !== '' &&\r\n getDeliveryMode(cartLine, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, PickupDeliveryModeCode)\r\n ) {\r\n bopisItemsDict[`${cartLine.ProductId}-${cartLine.WarehouseId}`] = cartLine;\r\n } else if (EmailDeliveryModeCode === '' || cartLine.DeliveryMode !== EmailDeliveryModeCode) {\r\n shippingItems.push(cartLine);\r\n }\r\n }\r\n }\r\n\r\n if (shippingItems && shippingItems.length > 0) {\r\n let productIds = shippingItems.map(x => x.ProductId!);\r\n productIds = ArrayExtensions.unique(productIds);\r\n const searchCriteria = createInventoryAvailabilitySearchCriteria(ctx, productIds, true);\r\n const shippingProductAvailabilities = await ProductsDataActions.getEstimatedAvailabilityAsync(\r\n { callerContext: ctx, bypassCache: 'get' },\r\n searchCriteria\r\n );\r\n\r\n if (\r\n shippingProductAvailabilities &&\r\n shippingProductAvailabilities.ProductWarehouseInventoryAvailabilities &&\r\n shippingProductAvailabilities.ProductWarehouseInventoryAvailabilities.length > 0\r\n ) {\r\n productAvailabilities = mapAggregatedProductInventoryInformation(ctx, shippingProductAvailabilities);\r\n }\r\n }\r\n\r\n const bopisItems = Object.keys(bopisItemsDict).map(k => bopisItemsDict[k]);\r\n process.env.NODE_ENV === 'development' && console.log('get-availabilities-cartlines.action', bopisItems);\r\n if (bopisItems && bopisItems.length > 0) {\r\n const productWarehouses: ProductWarehouse[] = [];\r\n\r\n for (const bopisItem of bopisItems) {\r\n const productWarehouse: ProductWarehouse = {\r\n ProductId: bopisItem.ProductId,\r\n InventLocationId: bopisItem.WarehouseId\r\n };\r\n\r\n if (ctx.requestContext.channel && ctx.requestContext.channel.InventLocationDataAreaId) {\r\n productWarehouse.DataAreaId = ctx.requestContext.channel.InventLocationDataAreaId;\r\n }\r\n productWarehouses.push(productWarehouse);\r\n }\r\n\r\n const quantityUnitTypeSales: number = 2;\r\n const getProductWarehouseAvail = await ProductsDataActions.getEstimatedProductWarehouseAvailabilityAsync(\r\n { callerContext: ctx, bypassCache: 'get', queryResultSettings: {} },\r\n productWarehouses,\r\n quantityUnitTypeSales\r\n );\r\n\r\n if (\r\n getProductWarehouseAvail &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities &&\r\n getProductWarehouseAvail.ProductWarehouseInventoryAvailabilities.length > 0\r\n ) {\r\n const productWarehouseMapping = mapProductInventoryInformation(\r\n ctx,\r\n getProductWarehouseAvail?.ProductWarehouseInventoryAvailabilities\r\n );\r\n if (productWarehouseMapping && productWarehouseMapping.length > 0) {\r\n for (const item of productWarehouseMapping) {\r\n productAvailabilities.push(item);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (productAvailabilities && productAvailabilities.length > 0) {\r\n return productAvailabilities;\r\n }\r\n\r\n ctx.trace('[getAvailabilitiesForCartLineItems] unable to get availabilities for product');\r\n return [];\r\n}\r\n\r\nexport const getAvailabilitiesForCartLineItemsDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-availabilities-cartlines',\r\n action: >getAvailabilitiesForCartLineItems,\r\n input: createInput\r\n});\r\n\r\nexport default getAvailabilitiesForCartLineItemsDataAction;\r\n","// base on @msdyn365-commerce-modules/retail-actions/get-full-available-inventory-nearby\r\n\r\nimport { createObservableDataAction, IAction, ICreateActionContext, IGeneric, IAny, IActionContext } from '@msdyn365-commerce/core';\r\nimport {\r\n ChannelDeliveryOption,\r\n DeliveryModeTypeFilter,\r\n ItemAvailability,\r\n OrgUnitAvailability,\r\n OrgUnitLocation,\r\n ProductWarehouseInventoryInformation,\r\n SearchArea,\r\n StoreHours,\r\n ProductsDataActions,\r\n OrgUnitsDataActions\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getDimensionValuesFromQuery,\r\n IFullOrgUnitAvailability,\r\n DeliveryMode,\r\n IProductInventoryInformation,\r\n QueryResultSettingsProxy,\r\n createInventoryAvailabilitySearchCriteria,\r\n mapProductInventoryInformation,\r\n GetFullAvailableInventoryNearbyInput,\r\n getFeatureState,\r\n createGetFeatureStateInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { GetProductPromotionsInput, getProductPromotionsAction } from './get-product-promotions.action';\r\n\r\nexport const mergeBonusProductInventoryInformation = (\r\n productInventoryInformation: IProductInventoryInformation[],\r\n productId: number,\r\n bonusItemIds: number[]\r\n) => {\r\n // Merge availabilities with bonus items\r\n if (bonusItemIds.length > 0) {\r\n const mergedProductInventoryInformation = productInventoryInformation\r\n .filter(p => p.ProductAvailableQuantity.ProductId === productId)\r\n .map(p => {\r\n productInventoryInformation\r\n .filter(\r\n bonusItemInv =>\r\n bonusItemInv.InventLocationId === p.InventLocationId &&\r\n bonusItemInv.ProductAvailableQuantity.ProductId !== productId\r\n )\r\n .forEach(bonusItemInv => {\r\n if (\r\n (bonusItemInv.ProductAvailableQuantity.AvailableQuantity ?? 0) === 0 &&\r\n (p.ProductAvailableQuantity.AvailableQuantity ?? 0) > 0\r\n ) {\r\n process.env.NODE_ENV === 'development' &&\r\n console.log('getFullAvailableInventoryNearbyAction', 'missing bonus item', p, bonusItemInv);\r\n\r\n p.ProductAvailableQuantity.AvailableQuantity = bonusItemInv.ProductAvailableQuantity.AvailableQuantity;\r\n p.IsProductAvailable = false;\r\n p.StockLevelCode = bonusItemInv.StockLevelCode;\r\n p.StockLevelLabel = bonusItemInv.StockLevelLabel;\r\n }\r\n });\r\n return p;\r\n });\r\n\r\n process.env.NODE_ENV === 'development' && console.log('getFullAvailableInventoryNearbyAction', mergedProductInventoryInformation);\r\n return mergedProductInventoryInformation;\r\n }\r\n\r\n return productInventoryInformation;\r\n};\r\n\r\n/**\r\n * CreateInput method for the getSelectedVariant data action.\r\n * @param inputData - The input data passed to the createInput method.\r\n * @returns GetFullAvailableInventoryNearbyInput - The action input.\r\n */\r\nexport const createGetFullAvailableInventoryNearbyInput = (\r\n inputData: ICreateActionContext>\r\n): GetFullAvailableInventoryNearbyInput => {\r\n return new GetFullAvailableInventoryNearbyInput();\r\n};\r\n\r\n/**\r\n * Action method for the getSelectedVariant data aciton.\r\n * @param input - The action input class.\r\n * @param ctx - The action context.\r\n * @returns IFullOrgUnitAvailability - The full org unit availability.\r\n */\r\nexport async function getFullAvailableInventoryNearbyAction(\r\n input: GetFullAvailableInventoryNearbyInput,\r\n ctx: IActionContext\r\n): Promise {\r\n // No valid product we want to return undefined so module knows there are no results yet\r\n if (!input.productId) {\r\n return undefined;\r\n }\r\n\r\n if (((!input.radius && input.radius !== 0) || !input.latitude || !input.longitude) && !input.IgnoreLocation) {\r\n // No valid location we want to return empty array so module can show no locations message\r\n return [];\r\n }\r\n\r\n const searchArea: SearchArea = {\r\n Latitude: input.latitude,\r\n Longitude: input.longitude,\r\n Radius: input.radius,\r\n DistanceUnitValue: input.DistanceUnitValue || 0 // 0 is miles\r\n };\r\n\r\n const featureState = await getFeatureState(createGetFeatureStateInput({ requestContext: ctx.requestContext }), ctx);\r\n const retailMulitplePickupMFeatureState = featureState?.find(\r\n item => item.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\r\n )?.IsEnabled;\r\n\r\n const matchingDimensionValues = getDimensionValuesFromQuery(ctx.requestContext.url.requestUrl);\r\n const getProductPromotionsInput = new GetProductPromotionsInput(input.productId, matchingDimensionValues);\r\n const promotions = await getProductPromotionsAction(getProductPromotionsInput, ctx);\r\n const bonusItemIds = promotions.FreeItemProductIds ?? [];\r\n\r\n process.env.NODE_ENV === 'development' && console.log('getFullAvailableInventoryNearbyAction', bonusItemIds);\r\n\r\n const searchCriteria = createInventoryAvailabilitySearchCriteria(\r\n ctx,\r\n [input.productId, ...bonusItemIds],\r\n false,\r\n true,\r\n searchArea,\r\n DeliveryMode.pickup\r\n );\r\n return ProductsDataActions.getEstimatedAvailabilityAsync({ callerContext: ctx }, searchCriteria)\r\n .then(async (productWarehouseInformation: ProductWarehouseInventoryInformation) => {\r\n // For store selector, inventory should always come from an individual store\r\n let productInventoryInformation = mapProductInventoryInformation(\r\n ctx,\r\n productWarehouseInformation.ProductWarehouseInventoryAvailabilities\r\n );\r\n\r\n process.env.NODE_ENV === 'development' && console.log('getFullAvailableInventoryNearbyAction', productInventoryInformation);\r\n\r\n productInventoryInformation = mergeBonusProductInventoryInformation(\r\n productInventoryInformation,\r\n input.productId!,\r\n bonusItemIds\r\n );\r\n\r\n return OrgUnitsDataActions.getOrgUnitLocationsByAreaAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx)\r\n },\r\n searchArea,\r\n DeliveryModeTypeFilter.Pickup\r\n )\r\n .then(async (stores: OrgUnitLocation[]) => {\r\n // Constructing a store mapping based on the InventoryId.\r\n const storeMap = new Map();\r\n stores.forEach(store => {\r\n if (store.InventoryLocationId) {\r\n storeMap.set(store.InventoryLocationId, store);\r\n }\r\n });\r\n\r\n let locationDeliveryOptions: ChannelDeliveryOption[] | undefined = [];\r\n\r\n // If multiple pickup mode is enable then call getchanneldeliveryoption\r\n if (retailMulitplePickupMFeatureState) {\r\n const orgUnitChannel = stores.map(store => store.ChannelId);\r\n locationDeliveryOptions = await _getLocationPickUpDeliveryModes(orgUnitChannel, ctx);\r\n }\r\n\r\n const availabilityPromiseList = stores.map(store => {\r\n const locationDeliveryOption = locationDeliveryOptions?.find(\r\n _channeldeliveryoption => _channeldeliveryoption.ChannelId === store.ChannelId\r\n );\r\n return _getAvailabilityWithHours(store, productInventoryInformation, storeMap, ctx, locationDeliveryOption);\r\n });\r\n\r\n return Promise.all(availabilityPromiseList);\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace('[GetFullAvailableInventoryNearby] error getting Available Inventory Nearby');\r\n ctx.trace(error.message);\r\n ctx.telemetry.error(error.message);\r\n ctx.telemetry.debug('[GetFullAvailableInventoryNearby] error getting Available Inventory Nearby');\r\n return [];\r\n });\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace(\r\n '[GetFullAvailableInventoryNearby][getEstimatedAvailabilityAsync] error getting availability product warehouse information.'\r\n );\r\n ctx.trace(error.message);\r\n ctx.telemetry.error(error.message);\r\n ctx.telemetry.debug(\r\n '[GetFullAvailableInventoryNearby][getEstimatedAvailabilityAsync] error getting availability product warehouse information.'\r\n );\r\n return [];\r\n });\r\n}\r\n\r\n/**\r\n * Action method that obtains the store information along with store hours and product availability.\r\n * @param orgUnitLocation - The org unit location.\r\n * @param productInventoryInformation - The product inventory information.\r\n * @param storeMap - A map that contains store information group by the inventory location id.\r\n * @param ctx The action context.\r\n * @param channelDeleiveryOptions - The channel delivery options.\r\n * @returns IFullOrgUnitAvailability - The full org unit availability.\r\n */\r\nasync function _getAvailabilityWithHours(\r\n orgUnitLocation: OrgUnitLocation,\r\n productInventoryInformation: IProductInventoryInformation[],\r\n storeMap: Map,\r\n ctx: IActionContext,\r\n channelDeleiveryOptions: ChannelDeliveryOption | undefined\r\n): Promise {\r\n if (!orgUnitLocation || !orgUnitLocation.OrgUnitNumber) {\r\n return { OrgUnitAvailability: undefined };\r\n }\r\n\r\n return OrgUnitsDataActions.getStoreHoursAsync({ callerContext: ctx }, orgUnitLocation.OrgUnitNumber)\r\n .then((hours: StoreHours) => {\r\n const itemAvailabilities: ItemAvailability[] = [];\r\n if (productInventoryInformation && storeMap) {\r\n productInventoryInformation.forEach(element => {\r\n if (\r\n element.InventLocationId &&\r\n storeMap.has(element.InventLocationId) &&\r\n element.InventLocationId === orgUnitLocation.InventoryLocationId\r\n ) {\r\n itemAvailabilities.push({ AvailableQuantity: element.ProductAvailableQuantity?.AvailableQuantity });\r\n }\r\n });\r\n }\r\n\r\n const availability: OrgUnitAvailability = {\r\n OrgUnitLocation: orgUnitLocation,\r\n ItemAvailabilities: itemAvailabilities\r\n };\r\n\r\n if (hours && !(hours instanceof Error)) {\r\n return {\r\n OrgUnitAvailability: availability,\r\n StoreHours: hours,\r\n ProductInventoryInformation: productInventoryInformation,\r\n OrgUnitPickUpDeliveryModes: channelDeleiveryOptions\r\n };\r\n }\r\n\r\n return {\r\n OrgUnitAvailability: availability,\r\n ProductInventoryInformation: productInventoryInformation,\r\n OrgUnitPickUpDeliveryModes: channelDeleiveryOptions\r\n };\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace('[GetFullAvailableInventoryNearby] error getting availability with hours');\r\n ctx.trace(error.message);\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug('[GetFullAvailableInventoryNearby] error getting availability with hours');\r\n return { OrgUnitAvailability: {} };\r\n });\r\n}\r\n\r\n/**\r\n * Action method that obtains the channel delivery option information.\r\n * @param channelCollection - The org unit channel Id list.\r\n * @param ctx - The action context.\r\n * @returns ChannelDeliveryOption - The channel delivery option collection.\r\n */\r\nasync function _getLocationPickUpDeliveryModes(\r\n channelCollection: (number | undefined)[],\r\n ctx: IActionContext\r\n): Promise {\r\n if (channelCollection?.length === 0 || channelCollection === undefined) {\r\n return undefined;\r\n }\r\n\r\n const channelIdList: number[] = [];\r\n channelCollection?.forEach(id => {\r\n if (id !== undefined) {\r\n channelIdList.push(id);\r\n }\r\n });\r\n\r\n // To get all channel pickup delivery mode filterOption should be 4\r\n return OrgUnitsDataActions.getChannelDeliveryOptionsAsync(\r\n {\r\n callerContext: ctx,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx)\r\n },\r\n channelIdList,\r\n 4\r\n )\r\n .then((channelDeliveryOptions: ChannelDeliveryOption[]) => {\r\n if (channelDeliveryOptions && !(channelDeliveryOptions instanceof Error)) {\r\n return channelDeliveryOptions;\r\n }\r\n\r\n return undefined;\r\n })\r\n .catch((error: Error) => {\r\n ctx.trace(\r\n '[GetFullAvailableInventoryNearby][getChannelDeliveryOptionsAsync] error getting availability with channel delivery options'\r\n );\r\n ctx.trace(error.message);\r\n ctx.telemetry.exception(error);\r\n ctx.telemetry.debug(\r\n '[GetFullAvailableInventoryNearby] [getChannelDeliveryOptionsAsync] error getting availability with channel delivery options'\r\n );\r\n return [];\r\n });\r\n}\r\n\r\n/**\r\n * The complete getFullAvailableInventoryNearby data action.\r\n */\r\nexport const getFullAvailableInventoryNearbyActionDataAction = createObservableDataAction({\r\n id: 'hei-get-full-available-inventory-nearby',\r\n action: >getFullAvailableInventoryNearbyAction,\r\n input: createGetFullAvailableInventoryNearbyInput\r\n});\r\n\r\nexport default getFullAvailableInventoryNearbyActionDataAction;\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n getCatalogId,\r\n getMediaLocationsForProductAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IGeneric,\r\n MediaLocationsInput\r\n} from '@msdyn365-commerce/core';\r\nimport { getMediaLocationsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { MediaLocation } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nimport { QueryResultSettingsProxy, generateImageUrl, generateCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * Product Input.\r\n */\r\nexport class MediaLocationsByIdInput implements IActionInput {\r\n public productId?: number;\r\n\r\n public channelId: number;\r\n\r\n public catalogId: number;\r\n\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n constructor(apiSettings: ICommerceApiSettings, productId?: number, catalogId?: number) {\r\n this.productId = productId;\r\n this.channelId = +apiSettings.channelId;\r\n this.catalogId = catalogId || 0;\r\n this.apiSettings = apiSettings;\r\n }\r\n\r\n public getCacheKey = () =>\r\n generateCacheKey(\r\n this.apiSettings,\r\n { key: 'Key', value: 'MediaLocationID' },\r\n { key: 'ProductId', value: this.productId },\r\n { key: 'CatalogId', value: this.catalogId }\r\n );\r\n\r\n public getCacheObjectType = () => 'MediaLocations';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * Creates the input required to make the retail api call.\r\n * @param inputData\r\n */\r\nexport const createMediaLocationsByIdInput = (inputData: ICreateActionContext>): MediaLocationsByIdInput => {\r\n const productId = (inputData.config && +inputData.config.productId) || undefined;\r\n const catalogId = getCatalogId(inputData.requestContext);\r\n return new MediaLocationsByIdInput(inputData.requestContext.apiSettings, productId, catalogId);\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the product based on the passed MediaLocationsByIdInput.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getMediaLocationsByIdAction(input: MediaLocationsByIdInput, ctx: IActionContext): Promise {\r\n if (input.productId) {\r\n const product = await ProductsDataActions.getByIdAsync({ callerContext: ctx }, input.productId, input.channelId);\r\n const newProductRecId = product.ExtensionProperties?.find(ep => ep.Key === 'NewSku')?.Value?.StringValue?.split(':')[0];\r\n\r\n const mediaProductId = newProductRecId && +newProductRecId ? +newProductRecId : input.productId;\r\n\r\n if (ctx.requestContext.app?.config?.OmniChannelMedia) {\r\n const mediaLocationsInput = new MediaLocationsInput(ctx.requestContext, mediaProductId, input.channelId, input.catalogId);\r\n return getMediaLocationsForProductAction(mediaLocationsInput, ctx);\r\n }\r\n return getMediaLocationsAsync(\r\n { callerContext: ctx, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx) },\r\n mediaProductId,\r\n input.channelId,\r\n input.catalogId\r\n ).then(response => {\r\n return response.map(\r\n (mediaLocation: MediaLocation): MediaLocation => {\r\n mediaLocation.Uri = generateImageUrl(mediaLocation.Uri, ctx.requestContext.apiSettings);\r\n mediaLocation.AltText = mediaLocation.AltText ? mediaLocation.AltText : '';\r\n return mediaLocation;\r\n }\r\n );\r\n });\r\n }\r\n return [];\r\n}\r\n\r\nexport const getMediaLocationsByIdActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-media-locations-by-id',\r\n action: >getMediaLocationsByIdAction,\r\n input: createMediaLocationsByIdInput\r\n});\r\n\r\nexport default getMediaLocationsByIdActionDataAction;\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 {\r\n CacheType,\r\n createObservableDataAction,\r\n getCatalogId,\r\n getMediaLocationsForProductAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICreateActionContext,\r\n IGeneric,\r\n MediaLocationsInput\r\n} from '@msdyn365-commerce/core';\r\nimport { AsyncResult, MediaLocation, ProductsDataActions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { getMediaLocationsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport {\r\n QueryResultSettingsProxy,\r\n generateImageUrl,\r\n getSelectedProductIdFromActionInput,\r\n getSelectedVariant,\r\n SelectedVariantInput,\r\n IDimensionForSelectedVariant,\r\n ArrayExtensions\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport getAllDimensionsForProductActionDataAction, { GetAllDimensionsForProductInput } from './get-all-dimensions-for-product';\r\n\r\n/**\r\n * The action input class for the getMediaLocationsForSelectedVariant data action.\r\n */\r\nexport class MediaLocationsForSelectedVariantInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public catalogId: number;\r\n\r\n public selectedProduct: SimpleProduct | undefined;\r\n\r\n constructor(productId: number, channelId: number, selectedProduct?: SimpleProduct, catalogId?: number) {\r\n this.productId = productId;\r\n this.channelId = channelId;\r\n this.catalogId = catalogId || 0;\r\n this.selectedProduct = selectedProduct;\r\n }\r\n\r\n public getCacheKey = () => 'MediaLocationsForSelectedVariant';\r\n\r\n public getCacheObjectType = () => 'MediaLocations';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * The createInput method for the getMediaLocationsForSelectedVariant data action.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createMediaLocationsForSelectedVariantInput = (\r\n inputData: ICreateActionContext>\r\n): MediaLocationsForSelectedVariantInput => {\r\n const productId = getSelectedProductIdFromActionInput(inputData);\r\n const catalogId = getCatalogId(inputData.requestContext);\r\n\r\n if (productId) {\r\n return new MediaLocationsForSelectedVariantInput(+productId, +inputData.requestContext.apiSettings.channelId, undefined, catalogId);\r\n }\r\n throw new Error('Unable to create MediaLocationsForSelectedVariantInput, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * The action method for the getMediaLocationsForSelectedVariant data action.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getMediaLocationsForSelectedVariantAction(\r\n input: MediaLocationsForSelectedVariantInput,\r\n ctx: IActionContext\r\n): Promise {\r\n return AsyncResult.resolve()\r\n .then(() => {\r\n const activeProduct: SimpleProduct | undefined = input.selectedProduct;\r\n\r\n if (!activeProduct) {\r\n const selectedVariantInput = new SelectedVariantInput(\r\n input.productId,\r\n input.channelId,\r\n undefined,\r\n undefined,\r\n ctx.requestContext\r\n );\r\n return getSelectedVariant(selectedVariantInput, ctx);\r\n }\r\n\r\n return activeProduct;\r\n })\r\n .then(productResult => {\r\n const activeProduct = productResult;\r\n\r\n const newProductRecId = activeProduct?.ExtensionProperties?.find(ep => ep.Key === 'NewSku')?.Value?.StringValue?.split(':')[0];\r\n if (activeProduct && newProductRecId && +newProductRecId) {\r\n process.env.NODE_ENV === 'development' && console.log('get-media-locations-for-selected-variant', newProductRecId);\r\n const getAllDimensionsForProductInput = new GetAllDimensionsForProductInput(+newProductRecId, input.channelId);\r\n return getAllDimensionsForProductActionDataAction(getAllDimensionsForProductInput, ctx).then(\r\n (dimensions: IDimensionForSelectedVariant[]) => {\r\n const validProducts: Record> = {};\r\n\r\n dimensions.forEach(d => {\r\n d.dimensionValuesWithInventory?.forEach(inv => {\r\n inv.ProductIds?.forEach(variantId => {\r\n const variantDims = validProducts[variantId] ?? (validProducts[variantId] = {});\r\n variantDims[d.DimensionTypeValue] = inv.DimensionValue?.Value ?? '';\r\n });\r\n });\r\n });\r\n\r\n var variantId = ArrayExtensions.firstOrDefault(\r\n Object.keys(validProducts)\r\n .filter(variantId => Object.keys(validProducts[variantId]).length === dimensions.length)\r\n .filter(variantId => {\r\n const mismatched = activeProduct.Dimensions?.filter(d => d.DimensionTypeValue !== 4).find(\r\n d =>\r\n (d.DimensionValue?.Value?.toLowerCase() ?? '') !==\r\n (validProducts[variantId][d.DimensionTypeValue] ?? '').toLowerCase()\r\n );\r\n\r\n return !mismatched;\r\n })\r\n );\r\n\r\n // process.env.NODE_ENV === 'development' &&\r\n // console.log('get-media-locations-for-selected-variant', variantId, activeProduct.Dimensions, validProducts);\r\n if (variantId && +variantId) {\r\n return ProductsDataActions.getByIdAsync({ callerContext: ctx }, +variantId, input.channelId).then(product => {\r\n // process.env.NODE_ENV === 'development' &&\r\n // console.log('get-media-locations-for-selected-variant', JSON.parse(JSON.stringify(product)));\r\n return product;\r\n });\r\n }\r\n\r\n return activeProduct;\r\n }\r\n );\r\n }\r\n\r\n return activeProduct;\r\n })\r\n .then(productResult => {\r\n const activeProduct = productResult;\r\n\r\n if (activeProduct) {\r\n if (ctx.requestContext.app?.config?.OmniChannelMedia) {\r\n const mediaLocationsInput = new MediaLocationsInput(\r\n ctx.requestContext,\r\n activeProduct.RecordId,\r\n input.channelId,\r\n input.catalogId\r\n );\r\n return getMediaLocationsForProductAction(mediaLocationsInput, ctx);\r\n }\r\n return getMediaLocationsAsync(\r\n { callerContext: ctx, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx) },\r\n activeProduct.RecordId,\r\n input.channelId,\r\n input.catalogId\r\n ).then(response => {\r\n return response.map(\r\n (mediaLocation: MediaLocation): MediaLocation => {\r\n mediaLocation.Uri = generateImageUrl(mediaLocation.Uri, ctx.requestContext.apiSettings);\r\n mediaLocation.AltText = mediaLocation.AltText ? mediaLocation.AltText : activeProduct.Name;\r\n return mediaLocation;\r\n }\r\n );\r\n });\r\n }\r\n\r\n return [];\r\n })\r\n .catch(error => {\r\n ctx.trace(error);\r\n ctx.telemetry.error(error.message);\r\n ctx.telemetry.debug('[getMediaLocationsForSelectedVariantAction]Error executing action');\r\n throw new Error('[getMediaLocationsForSelectedVariantAction]Error executing action');\r\n });\r\n}\r\n\r\n/**\r\n * The getMediaLocationsForSelectedVariant data action\r\n * Gets the currently selected variant for the page via the getSelectedVariant data action,\r\n * and then gets the media location information for the variant via the MediaLocations RetailServer API.\r\n */\r\nexport const getMediaLocationsForSelectedVariantActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-media-locations-for-selected-variant',\r\n action: >getMediaLocationsForSelectedVariantAction,\r\n input: createMediaLocationsForSelectedVariantInput\r\n});\r\n\r\nexport default getMediaLocationsForSelectedVariantActionDataAction;\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getSelectedProductIdFromActionInput, getDimensionValuesFromQuery } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ProductDimension, retailAction } from '@msdyn365-commerce/retail-proxy';\r\nimport { IGetProductPromotionResponse } from './DataServiceEntities.g';\r\nimport { getProductPromotionsV2Input } from './DataActionExtension.g';\r\nimport { getProductVariantOrMaster } from './getProductVariantOrMaster';\r\n\r\n/**\r\n * GetProductPromotions Input Action\r\n */\r\nexport class GetProductPromotionsInput implements Msdyn365.IActionInput {\r\n public readonly recordId: number;\r\n public readonly dimensionValues: ProductDimension[];\r\n\r\n constructor(recordId: number, dimensionValues: ProductDimension[]) {\r\n this.recordId = recordId;\r\n this.dimensionValues = dimensionValues;\r\n }\r\n\r\n public getCacheKey = () => `${this.recordId}-${this.dimensionValues.map(v => v.DimensionValue?.Value ?? '').join('|')}`;\r\n public getCacheObjectType = () => 'HEI-ProductPromotions';\r\n public dataCacheType = (): Msdyn365.CacheType => (process.env.NODE_ENV === 'development' ? 'application' : 'none');\r\n}\r\n\r\nconst createInput = (context: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n const matchingDimensionValues = getDimensionValuesFromQuery(context.requestContext.url.requestUrl);\r\n const productId = getSelectedProductIdFromActionInput(context);\r\n if (productId) {\r\n return new GetProductPromotionsInput(+productId, matchingDimensionValues);\r\n } else {\r\n throw new Error('Unable to create GetProductPromotionsInput, no productId found on module config or query');\r\n }\r\n};\r\n\r\nexport async function getProductPromotionsAction(\r\n input: GetProductPromotionsInput,\r\n context: Msdyn365.IActionContext\r\n): Promise {\r\n const matchingDimensionValues = input.dimensionValues;\r\n process.env.NODE_ENV === 'development' && console.log('get-product-promotions.action', input.recordId, matchingDimensionValues);\r\n const productVariant = await getProductVariantOrMaster(input.recordId, matchingDimensionValues, context);\r\n\r\n const distinctProductVariantId = productVariant.RecordId;\r\n process.env.NODE_ENV === 'development' && console.log('get-product-promotions.action', input.recordId, distinctProductVariantId);\r\n const productPromotionsInput = getProductPromotionsV2Input(input.recordId, distinctProductVariantId);\r\n return retailAction(productPromotionsInput, context);\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >getProductPromotionsAction,\r\n id: 'hei-get-product-promotions',\r\n input: createInput\r\n // isBatched: true\r\n});\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n QueryResultSettingsProxy,\r\n generateProductImageUrl,\r\n createInventoryAvailabilitySearchCriteria,\r\n ArrayExtensions\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n ProductDimension,\r\n ProductDimensionAvailabilitySearchCriteria,\r\n ProductsDataActions,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\r\n\r\n/**\r\n * Retrieves product dimensions with availabilities.\r\n * @param product - Product for which the dimensions need to be retrieved.\r\n * @param matchingDimensionValues - Selected dimensions - filter criteria for the dimensions API.\r\n * @param context - Action context.\r\n * @param catalogId - Catalog id.\r\n * @returns Array of dimensions.\r\n */\r\nconst getFullDimensions = async (\r\n product: SimpleProduct,\r\n matchingDimensionValues: ProductDimension[],\r\n context: Msdyn365.IActionContext,\r\n catalogId?: number\r\n) => {\r\n let fullDimensions: IProductDimensionsWithAvailabilitiesFull[] = [];\r\n const fullDimensionPromises = (product.Dimensions ?? []).map(dimension => {\r\n const shippingInventoryConfiguration = createInventoryAvailabilitySearchCriteria(context, [], true, undefined, undefined);\r\n const searchCriteria: ProductDimensionAvailabilitySearchCriteria = {\r\n RequestedDimensionTypeValue: dimension.DimensionTypeValue,\r\n MatchingDimensionValues: matchingDimensionValues,\r\n DefaultWarehouseOnly: shippingInventoryConfiguration.DefaultWarehouseOnly,\r\n FilterByChannelFulfillmentGroup: shippingInventoryConfiguration.FilterByChannelFulfillmentGroup,\r\n DeliveryModeTypeFilterValue: shippingInventoryConfiguration.DeliveryModeTypeFilterValue,\r\n CatalogId: catalogId\r\n };\r\n const dimensionValuesPromise = ProductsDataActions.getDimensionValuesWithEstimatedAvailabilitiesAsync(\r\n { callerContext: context, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context) },\r\n product.MasterProductId ? product.MasterProductId : product.RecordId,\r\n searchCriteria\r\n );\r\n\r\n return dimensionValuesPromise.then(dimensionValues => {\r\n const fullDimension: IProductDimensionsWithAvailabilitiesFull = {\r\n ...dimension,\r\n dimensionValuesWithInventory: dimensionValues\r\n };\r\n return fullDimension;\r\n });\r\n });\r\n fullDimensions = await Promise.all(fullDimensionPromises);\r\n return fullDimensions;\r\n};\r\n\r\n/**\r\n * Retrieves product variant for the given input or undefined if not found.\r\n * @param input - Action input.\r\n * @param context - Action context.\r\n * @param fullDimensions - Product dimensions with availabilities.\r\n * @returns A product variant that is available or undefined.\r\n */\r\nconst getProductVariant = async (context: Msdyn365.IActionContext, fullDimensions: IProductDimensionsWithAvailabilitiesFull[]) => {\r\n let productVariant: SimpleProduct | undefined;\r\n if (\r\n ArrayExtensions.hasElements(fullDimensions) &&\r\n ArrayExtensions.hasElements(fullDimensions[0].dimensionValuesWithInventory) &&\r\n ArrayExtensions.hasElements(fullDimensions[0].dimensionValuesWithInventory[0].ProductIds)\r\n ) {\r\n const variantProductId = fullDimensions[0].dimensionValuesWithInventory[0].ProductIds[0];\r\n const result = await ProductsDataActions.getByIdsAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\r\n //bypassCache: input.bypassCache\r\n },\r\n context.requestContext.apiSettings.channelId,\r\n [variantProductId],\r\n null,\r\n context.requestContext.apiSettings.catalogId\r\n );\r\n productVariant = result[0];\r\n productVariant = { ...productVariant };\r\n const variantImageUrl = generateProductImageUrl(productVariant, context.requestContext.apiSettings);\r\n\r\n if (variantImageUrl) {\r\n productVariant.PrimaryImageUrl = variantImageUrl;\r\n }\r\n }\r\n\r\n return productVariant;\r\n};\r\n\r\n/**\r\n * Checks if given product has any unmatched dimensions.\r\n * Modifies product entity to use matched dimension values.\r\n * @param product - The product to analyze and modify.\r\n * @param matchingDimensionValues - Matched dimensions.\r\n * @returns True if has any unmatched dimension, false if all dimensions are specified.\r\n */\r\nconst checkIfHasUnmatchedDimensions = (product: SimpleProduct, matchingDimensionValues: ProductDimension[]): boolean => {\r\n let hasUnmatchedDimension: boolean = false;\r\n if (product.Dimensions) {\r\n product.Dimensions = product.Dimensions.map(dimension => {\r\n return { ...dimension };\r\n });\r\n for (const dimension of product.Dimensions) {\r\n const matchedTargetDimension = matchingDimensionValues.find(\r\n targetDimension => targetDimension.DimensionTypeValue === dimension.DimensionTypeValue\r\n );\r\n\r\n if (matchedTargetDimension) {\r\n dimension.DimensionValue = matchedTargetDimension.DimensionValue;\r\n } else {\r\n hasUnmatchedDimension = true;\r\n }\r\n }\r\n }\r\n return hasUnmatchedDimension;\r\n};\r\n\r\nconst getProductVariantOrMaster = async (\r\n productId: number,\r\n matchingDimensionValues: ProductDimension[],\r\n context: Msdyn365.IActionContext\r\n) => {\r\n const result = await ProductsDataActions.getByIdsAsync(\r\n {\r\n callerContext: context,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\r\n // bypassCache: input.bypassCache\r\n },\r\n context.requestContext.apiSettings.channelId,\r\n [productId],\r\n null,\r\n context.requestContext.apiSettings.catalogId\r\n );\r\n\r\n let product = result[0];\r\n\r\n // Need to dereference this before editing it. Otherwise we might not\r\n // properly get the mobx events because if things aren't properly observable\r\n // they won't fire when you set them, and then if you don't deref the value in\r\n // the cache will match the value when you try to save it, so it won't detect any\r\n // changes there either\r\n product = { ...product };\r\n\r\n // Not all dimensions are selected\r\n if (matchingDimensionValues.find(dv => !dv.DimensionValue)) {\r\n return product;\r\n }\r\n\r\n const hasUnmatchedDimension = checkIfHasUnmatchedDimensions(product, matchingDimensionValues);\r\n\r\n if (hasUnmatchedDimension) {\r\n return product;\r\n }\r\n\r\n const fullDimensions: IProductDimensionsWithAvailabilitiesFull[] = await getFullDimensions(\r\n product,\r\n matchingDimensionValues,\r\n context,\r\n context.requestContext.apiSettings.catalogId\r\n );\r\n\r\n // Retrieve product variants only if matching dimensions are provided.\r\n const productVariant: SimpleProduct | undefined = ArrayExtensions.hasElements(matchingDimensionValues)\r\n ? await getProductVariant(context, fullDimensions)\r\n : undefined;\r\n\r\n return productVariant ?? product;\r\n};\r\n\r\nexport { getProductVariantOrMaster };\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\n\r\nexport const createCanonicalUrl = (context: IActionContext, paths: string[], page: string) => {\r\n let canonicalDomainHost = `https://${context.requestContext.canonicalDomain}`;\r\n if (process.env.NODE_ENV === 'development') {\r\n canonicalDomainHost = '';\r\n }\r\n\r\n const sitePath = context.requestContext.sitePath ?? '';\r\n\r\n const url = `${canonicalDomainHost}${sitePath}/${paths\r\n .map(p => toSlug(p))\r\n .filter(s => s.length > 0)\r\n .join('/')}/${page}`;\r\n return url;\r\n};\r\n\r\nconst toSlug = (text: string) => {\r\n const slug = text\r\n .toLowerCase()\r\n .replace(/[^A-Za-z\\u00C0-\\u017F0-9]/g, '-')\r\n .replace(/--+/g, '-')\r\n .replace(/^-/, '')\r\n .replace(/-$/, '');\r\n\r\n return slug;\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n getFriendlyName,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport {\r\n ArrayExtensions,\r\n buildCacheKeyWithUrlTokens,\r\n CategoriesInput,\r\n CurrentCategoryInput,\r\n getCategoriesHierarchy\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { ICategoryPageSummaryConfig } from './category-page-summary.props.autogenerated';\r\nimport { IDefaultPageSummaryConfig } from '@msdyn365-commerce-modules/page-summary';\r\nimport { IPageSummaryData } from '@msdyn365-commerce-modules/page-summary';\r\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\r\nimport { createCanonicalUrl } from '../../common/utilities/createCanonicalUrl';\r\n\r\n/**\r\n * Category Page Summary Input\r\n */\r\nexport class CategoryPageSummaryInput implements IActionInput {\r\n public requestContext: IRequestContext;\r\n\r\n public config: ICategoryPageSummaryConfig | IDefaultPageSummaryConfig;\r\n\r\n constructor(config: ICategoryPageSummaryConfig | IDefaultPageSummaryConfig, requestContext: IRequestContext) {\r\n this.config = config || {};\r\n this.requestContext = requestContext;\r\n }\r\n\r\n public getCacheObjectType = (): string => 'CategoryPageSummary';\r\n\r\n public getCacheKey = (): string =>\r\n `${buildCacheKeyWithUrlTokens(`CategoryPageSummary-${this.requestContext.locale}`, this.requestContext)}-${this.requestContext\r\n .locale ?? ''}`;\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\nconst createGetCurrentCategoryInput = (\r\n inputData: IActionContext,\r\n config?: ICategoryPageSummaryConfig | IDefaultPageSummaryConfig\r\n): CurrentCategoryInput => {\r\n if (inputData && inputData.requestContext) {\r\n let includeRootCategory: boolean | undefined;\r\n if (config) {\r\n includeRootCategory = (config as ICategoryPageSummaryConfig).includeRootCategory;\r\n }\r\n return new CurrentCategoryInput(inputData.requestContext, includeRootCategory);\r\n }\r\n\r\n throw new Error('Please specify categoryId query string in request.');\r\n};\r\n\r\nconst action = async (input: CategoryPageSummaryInput, context: IActionContext): Promise => {\r\n const { config } = input;\r\n let categoryHierarchy: CategoryHierarchy[] | null = null;\r\n try {\r\n const getCurrentCategoryInput = createGetCurrentCategoryInput(context, input.config);\r\n const fullCategoryHierarchy = await getCategoriesHierarchy(new CategoriesInput(context.requestContext, true, 1000), context);\r\n categoryHierarchy = findCategoryHierarchy(fullCategoryHierarchy, getCurrentCategoryInput.categoryId!);\r\n } catch {\r\n // Do nothing, if the action fails fallback to values defined in data\r\n }\r\n if (ArrayExtensions.hasElements(categoryHierarchy)) {\r\n const currentCategory = categoryHierarchy[0];\r\n\r\n const locale = context.requestContext.locale;\r\n let names = categoryHierarchy.map(c => getFriendlyName(locale, c.NameTranslations) ?? '').reverse();\r\n\r\n if (locale === 'fr-CA') {\r\n names = ['catégories', ...names];\r\n } else {\r\n names = ['categories', ...names];\r\n }\r\n\r\n let canonicalUrl = createCanonicalUrl(context, names, `${currentCategory.RecordId}.c`);\r\n\r\n const page = context.requestContext.url.requestUrl.searchParams?.get('page');\r\n if (page) {\r\n canonicalUrl = `${canonicalUrl}?page=${page}`;\r\n }\r\n\r\n const title = currentCategory.ExtensionProperties?.find(ep => ep.Key === 'l10nKeyword')?.Value?.StringValue ?? currentCategory.Name;\r\n\r\n return {\r\n title: `${title} | Henry\\'s`,\r\n description: currentCategory.ExtensionProperties?.find(ep => ep.Key === 'l10nDesc')?.Value?.StringValue,\r\n // keywords: currentCategory.ExtensionProperties?.find(ep => ep.Key === 'l10nKeyword')?.Value?.StringValue,\r\n sharingImageUrl: currentCategory.OfflineImage,\r\n canonicalUrl,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n\r\n // If the action fails fallback to values defined from data\r\n } else if (config) {\r\n return {\r\n title: config.title,\r\n sharingImageUrl: config.sharingImage && config.sharingImage.src,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n }\r\n return {};\r\n};\r\n\r\n/**\r\n * Finds the given category in the list of categories and returns an array with the info on where it's located.\r\n * @param categories - Categories list to search from.\r\n * @param categoryId - The category id to find.\r\n * @returns A list of categories starting from the given category id, ending up the root parent.\r\n */\r\nconst findCategoryHierarchy = (categories: CategoryHierarchy[], categoryId: number): CategoryHierarchy[] | null => {\r\n for (const category of categories) {\r\n if (category.RecordId === categoryId) {\r\n return [category];\r\n }\r\n\r\n if (ArrayExtensions.hasElements(category.Children)) {\r\n const innerCategoryHierarchy = findCategoryHierarchy(category.Children, categoryId);\r\n if (ArrayExtensions.hasElements(innerCategoryHierarchy)) {\r\n innerCategoryHierarchy.push(category);\r\n return innerCategoryHierarchy;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/page-summary/category-page-summary',\r\n action: >action,\r\n input: (args: ICreateActionContext) => {\r\n return new CategoryPageSummaryInput(args.config, args.requestContext);\r\n }\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICreateActionContext,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport { buildCacheKeyWithUrlTokens, removeDomainQspFromUrl } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IDefaultPageSummaryConfig } from './default-page-summary.props.autogenerated';\r\n\r\nexport interface IPageSummaryData {\r\n title?: string;\r\n description?: string;\r\n keywords?: string;\r\n sharingImageUrl?: string;\r\n canonicalUrl?: string;\r\n faviconUrl?: string;\r\n}\r\n\r\n/**\r\n * Page Summary Input\r\n */\r\nexport class PageSummaryInput implements IActionInput {\r\n public requestContext: IRequestContext;\r\n\r\n public config: IDefaultPageSummaryConfig;\r\n\r\n constructor(config: IDefaultPageSummaryConfig, requestContext: IRequestContext) {\r\n this.config = config || {};\r\n this.requestContext = requestContext;\r\n }\r\n\r\n public getCacheObjectType = (): string => 'PageSummary';\r\n\r\n public getCacheKey = (): string => `${buildCacheKeyWithUrlTokens('PageSummary', this.requestContext)}-${this.config.title}`;\r\n\r\n public dataCacheType = (): CacheType => 'request';\r\n}\r\n\r\nconst action = async (input: PageSummaryInput, context: IActionContext): Promise => {\r\n const { config } = input;\r\n return {\r\n title: config && config.title,\r\n description: config && config.description,\r\n keywords: config && config.keywords,\r\n sharingImageUrl: config && config.sharingImage && config.sharingImage.src,\r\n canonicalUrl:\r\n context.requestContext && context.requestContext.canonicalUrl\r\n ? removeDomainQspFromUrl(context.requestContext.canonicalUrl, context.requestContext)\r\n : undefined,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n};\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/page-summary/default-page-summary',\r\n action: >action,\r\n input: (args: ICreateActionContext) => {\r\n return new PageSummaryInput(args.config, args.requestContext);\r\n }\r\n});\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n ICommerceApiSettings,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { getAttributeValuesAsync, getByIdAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport {\r\n buildCacheKey,\r\n generateImageUrl,\r\n getProductUrlSync,\r\n getSelectedProductIdFromActionInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IPageSummaryData } from '@msdyn365-commerce-modules/page-summary';\r\nimport { IProductPageSummaryConfig } from './product-page-summary.props.autogenerated';\r\n\r\n/**\r\n * Product Page Summary Input\r\n */\r\nexport class ProductPageSummaryInput implements IActionInput {\r\n public apiSettings: ICommerceApiSettings;\r\n\r\n public config: IProductPageSummaryConfig;\r\n\r\n public productId: number;\r\n\r\n public locale: string;\r\n\r\n constructor(config: IProductPageSummaryConfig, apiSettings: ICommerceApiSettings, productId: number, locale: string) {\r\n this.config = config || {};\r\n this.apiSettings = apiSettings;\r\n this.productId = productId;\r\n this.locale = locale;\r\n }\r\n\r\n public getCacheObjectType = (): string => 'ProductPageSummary';\r\n\r\n public getCacheKey = (): string =>\r\n `${buildCacheKey('ProductPageSummary', this.apiSettings)}-${this.config.title}-${this.productId}-${this.locale}`;\r\n\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nexport interface IProductPageSummary extends IPageSummaryData {\r\n price?: number;\r\n productId?: number;\r\n productBrand?: string;\r\n}\r\n\r\nconst createInput = (args: ICreateActionContext) => {\r\n const productId = getSelectedProductIdFromActionInput(args);\r\n\r\n if (productId) {\r\n return new ProductPageSummaryInput(\r\n args.config,\r\n args.requestContext.apiSettings,\r\n +productId,\r\n args.requestContext.locale\r\n );\r\n }\r\n throw new Error('Unable to create ProductPageSummaryAction input, no productId found on module config or query');\r\n};\r\n\r\n// Checks product attributes for the presence of brand attribute to extract the brand name for product metadata\r\nconst getProductBrand = async (\r\n context: IActionContext,\r\n recordId: number,\r\n channelId: number,\r\n catalogId: number\r\n): Promise => {\r\n const productAttributes = await getAttributeValuesAsync(\r\n { callerContext: context, queryResultSettings: {} },\r\n recordId,\r\n channelId,\r\n catalogId\r\n );\r\n\r\n for (const productAttribute of productAttributes) {\r\n if (productAttribute.Name === 'Brand') {\r\n return productAttribute.TextValue;\r\n }\r\n }\r\n return;\r\n};\r\n\r\nconst action = async (input: ProductPageSummaryInput, context: IActionContext): Promise => {\r\n const { config, productId, apiSettings } = input;\r\n let simpleProductData;\r\n try {\r\n simpleProductData = await getByIdAsync({ callerContext: context }, productId, apiSettings.channelId);\r\n } catch {\r\n // Do nothing, if there's an error we fall back to values defined from config\r\n }\r\n if (simpleProductData) {\r\n let productUrl: string | undefined;\r\n try {\r\n productUrl = getProductUrlSync(simpleProductData, context);\r\n const canonicalDomain = context.requestContext.canonicalDomain;\r\n if (productUrl && canonicalDomain) {\r\n productUrl = `https://${canonicalDomain}${productUrl}`.toLocaleLowerCase();\r\n } else {\r\n productUrl = undefined;\r\n }\r\n } catch {\r\n productUrl = undefined;\r\n }\r\n\r\n let productBrand = simpleProductData?.ExtensionProperties?.find(ep => ep.Key === 'Brand')?.Value?.StringValue;\r\n if (!productBrand) {\r\n try {\r\n productBrand = await getProductBrand(context, productId, apiSettings.channelId, apiSettings.catalogId);\r\n } catch {\r\n productBrand = undefined;\r\n }\r\n }\r\n\r\n return {\r\n title: simpleProductData.Name,\r\n description: simpleProductData.Description,\r\n sharingImageUrl: generateImageUrl(simpleProductData.PrimaryImageUrl, apiSettings),\r\n canonicalUrl: productUrl,\r\n faviconUrl: config && config.faviconUrl,\r\n productId: simpleProductData.RecordId,\r\n price: simpleProductData.AdjustedPrice,\r\n productBrand\r\n };\r\n\r\n // If the action fails fallback to values defined from config\r\n } else if (config) {\r\n return {\r\n title: config.title,\r\n description: config.description,\r\n sharingImageUrl: config.sharingImage && config.sharingImage.src,\r\n faviconUrl: config && config.faviconUrl\r\n };\r\n }\r\n return {};\r\n};\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/page-summary/product-page-summary',\r\n action: >action,\r\n input: createInput\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 { \n const actionPath = 'actions/get-applicable-warranties.action';\n binding.dataActions[actionPath] = require('partner/actions/get-applicable-warranties.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-attributes-for-selected-variant.action';\n binding.dataActions[actionPath] = require('partner/actions/get-attributes-for-selected-variant.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-availabilities-cartlines.action';\n binding.dataActions[actionPath] = require('partner/actions/get-availabilities-cartlines.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-full-available-inventory-nearby.action';\n binding.dataActions[actionPath] = require('partner/actions/get-full-available-inventory-nearby.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-media-locations-by-id.action';\n binding.dataActions[actionPath] = require('partner/actions/get-media-locations-by-id.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-media-locations-for-selected-variant.action';\n binding.dataActions[actionPath] = require('partner/actions/get-media-locations-for-selected-variant.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-promotions.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-promotions.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/category-page-summary/category-page-summary.action';\n binding.dataActions[actionPath] = require('partner/modules/category-page-summary/category-page-summary.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/default-page-summary/default-page-summary.action';\n binding.dataActions[actionPath] = require('partner/modules/default-page-summary/default-page-summary.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/product-page-summary/product-page-summary.action';\n binding.dataActions[actionPath] = require('partner/modules/product-page-summary/product-page-summary.action');\n registerActionId(actionPath);\n }\n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.packageDataActions = {};\n window.__bindings__.packageDataActions['__local__'] = {\n ...binding.dataActions\n };","module.exports = React;","module.exports = ReactDOM;"],"names":["GetAllDimensionsForProductInput","GetDimensionsForSelectedVariantInput","constructor","productId","channelId","super","getCacheObjectType","getAllDimensionsForProductActionDataAction","createObservableDataAction","id","action","getDimensionsForSelectedVariantAction","input","inputData","getSelectedProductIdFromActionInput","requestContext","apiSettings","Error","getApplicableWarrantiesInput","recordId","dimensionValues","getCacheKey","this","map","v","_v$DimensionValue$Val","_v$DimensionValue","DimensionValue","Value","join","dataCacheType","async","getApplicableWarrantiesAction","context","matchingDimensionValues","productVariantOrMaster","getProductVariantOrMaster","warrantyGroup","ProductsDataActions","callerContext","catalogId","RecordId","find","aw","WarrantableProductId","WarrantyGroups","getApplicableWarrantiesActionDataAction","getDimensionValuesFromQuery","url","requestUrl","AttributesForSelectedVariantInput","selectedProduct","createAttributesForSelectedVariantInput","getCatalogId","undefined","getAttributesForSelectedVariantAction","ctx","Promise","resolve","then","activeProduct","selectedVariantInput","SelectedVariantInput","getSelectedVariantActionDataAction","productResult","attributeValues","catch","error","trace","message","telemetry","exception","debug","getAttributesForSelectedVariantActionDataAction","ProductAvailabilitiesForCartLineItems","buildCacheKey","getDeliveryMode","cartLine","_channelDeliveryOptio","featureSate","arguments","length","channelDeliveryOptionConfig","pickupDeliveryMode","DeliveryMode","PickupDeliveryModeCodes","deliveryMode","getAvailabilitiesForCartLineItems","_featureState$find","shippingItems","bopisItemsDict","productAvailabilities","cart","getCartState","channelConfiguration","OrgUnitsDataActions","products","getActiveCartProductsAction","ActiveCartProductsInput","featureState","getFeatureState","createGetFeatureStateInput","retailMultiplePickUpOptionEnabled","item","Name","IsEnabled","StoreOperationsDataActions","PickupDeliveryModeCode","EmailDeliveryModeCode","Id","CartLines","ProductId","WarehouseId","push","productIds","x","ArrayExtensions","unique","searchCriteria","createInventoryAvailabilitySearchCriteria","shippingProductAvailabilities","bypassCache","ProductWarehouseInventoryAvailabilities","mapAggregatedProductInventoryInformation","bopisItems","Object","keys","k","productWarehouses","bopisItem","productWarehouse","InventLocationId","channel","InventLocationDataAreaId","DataAreaId","quantityUnitTypeSales","getProductWarehouseAvail","queryResultSettings","productWarehouseMapping","mapProductInventoryInformation","getAvailabilitiesForCartLineItemsDataAction","mergeBonusProductInventoryInformation","productInventoryInformation","bonusItemIds","filter","p","ProductAvailableQuantity","bonusItemInv","forEach","_bonusItemInv$Product","_p$ProductAvailableQu","AvailableQuantity","IsProductAvailable","StockLevelCode","StockLevelLabel","createGetFullAvailableInventoryNearbyInput","GetFullAvailableInventoryNearbyInput","getFullAvailableInventoryNearbyAction","_promotions$FreeItemP","radius","latitude","longitude","IgnoreLocation","searchArea","Latitude","Longitude","Radius","DistanceUnitValue","retailMulitplePickupMFeatureState","getProductPromotionsInput","GetProductPromotionsInput","getProductPromotionsAction","FreeItemProductIds","pickup","productWarehouseInformation","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","DeliveryModeTypeFilter","Pickup","storeMap","Map","stores","store","InventoryLocationId","set","locationDeliveryOptions","orgUnitChannel","ChannelId","channelCollection","channelIdList","channelDeliveryOptions","_getLocationPickUpDeliveryModes","availabilityPromiseList","_locationDeliveryOpti","locationDeliveryOption","_channeldeliveryoption","orgUnitLocation","channelDeleiveryOptions","OrgUnitNumber","OrgUnitAvailability","hours","itemAvailabilities","element","_element$ProductAvail","has","availability","OrgUnitLocation","ItemAvailabilities","ProductInventoryInformation","OrgUnitPickUpDeliveryModes","StoreHours","_getAvailabilityWithHours","all","getFullAvailableInventoryNearbyActionDataAction","MediaLocationsByIdInput","generateCacheKey","key","value","createMediaLocationsByIdInput","config","getMediaLocationsByIdAction","_product$ExtensionPro","_ctx$requestContext$a","newProductRecId","ExtensionProperties","ep","Key","StringValue","split","mediaProductId","app","OmniChannelMedia","mediaLocationsInput","MediaLocationsInput","getMediaLocationsForProductAction","getMediaLocationsAsync","response","mediaLocation","Uri","generateImageUrl","AltText","getMediaLocationsByIdActionDataAction","MediaLocationsForSelectedVariantInput","createMediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariantAction","AsyncResult","getSelectedVariant","_activeProduct$Extens","getAllDimensionsForProductInput","dimensions","validProducts","d","_d$dimensionValuesWit","dimensionValuesWithInventory","inv","_inv$ProductIds","ProductIds","variantId","_validProducts$varian","_inv$DimensionValue$V","_inv$DimensionValue","DimensionTypeValue","firstOrDefault","_activeProduct$Dimens","Dimensions","_d$DimensionValue$Val","_d$DimensionValue","_validProducts$varian2","toLowerCase","product","getMediaLocationsForSelectedVariantActionDataAction","distinctProductVariantId","productPromotionsInput","getProductPromotionsV2Input","retailAction","Msdyn365","_objectSpread","dv","checkIfHasUnmatchedDimensions","hasUnmatchedDimension","dimension","matchedTargetDimension","targetDimension","fullDimensions","_product$Dimensions","fullDimensionPromises","shippingInventoryConfiguration","RequestedDimensionTypeValue","MatchingDimensionValues","DefaultWarehouseOnly","FilterByChannelFulfillmentGroup","DeliveryModeTypeFilterValue","CatalogId","MasterProductId","getFullDimensions","productVariant","hasElements","variantProductId","variantImageUrl","generateProductImageUrl","PrimaryImageUrl","getProductVariant","createCanonicalUrl","paths","page","_context$requestConte","canonicalDomain","sitePath","toSlug","s","text","replace","CategoryPageSummaryInput","_this$requestContext$","buildCacheKeyWithUrlTokens","locale","findCategoryHierarchy","categories","categoryId","category","Children","innerCategoryHierarchy","categoryHierarchy","getCurrentCategoryInput","createGetCurrentCategoryInput","includeRootCategory","CurrentCategoryInput","fullCategoryHierarchy","getCategoriesHierarchy","CategoriesInput","_unused","_currentCategory$Exte","_currentCategory$Exte2","_currentCategory$Exte3","currentCategory","names","c","_getFriendlyName","getFriendlyName","NameTranslations","reverse","canonicalUrl","searchParams","get","title","description","sharingImageUrl","OfflineImage","faviconUrl","sharingImage","src","args","PageSummaryInput","keywords","removeDomainQspFromUrl","ProductPageSummaryInput","simpleProductData","getByIdAsync","_simpleProductData","productUrl","getProductUrlSync","toLocaleLowerCase","_unused2","productBrand","productAttributes","getAttributeValuesAsync","productAttribute","TextValue","getProductBrand","_unused3","Description","price","AdjustedPrice","binding","modules","dataActions","registerActionId","actionPath","default","prototype","exportName","Action","require","window","__bindings__","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}