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6CACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,qDACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,6CACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,IAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,uDACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,wCACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,2CACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,qCACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,MAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,2DACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,2DACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,IAC1CT,EAAiBC,GAGrB,CACI,MAAMA,EAAa,8DACnBJ,EAAQE,YAAYE,GAAcQ,EAAQ,KAC1CT,EAAiBC,GAIzBhG,OAAOyG,aAAezG,OAAOyG,cAAgB,GAC7CzG,OAAOyG,aAAaZ,QAAOa,EAAAA,EAAA,GACpB1G,OAAOyG,aAAaZ,SAAW,IAC/BD,EAAQC,SAGX7F,OAAOyG,aAAaE,mBAAqB,GACzC3G,OAAOyG,aAAaE,mBAA8B,UAACD,EAAA,GAC5Cd,EAAQE,iCCzHvBc,EAAOC,QAAUC,2BCAjBF,EAAOC,QAAUE","sources":["webpack://Msdyn365.Commerce.Online.Memx/./src/actions/add-pickup-order-template-to-cart.action.ts?8ae6","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-availabilities-cartlines.action.ts?de39","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-delivery-option-context.action.ts?e45e","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-price-for-product-search-result.action.ts?edb0","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-product-default-variant.action.ts?4082","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-product-warranties-in-active-cart.action.ts?0f58","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-product-warranties.action.ts?94d8","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-product-warranty-icon.action.ts?d623","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/get-simple-products.action.ts?9a70","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/state-data-actions/product-quantity-state.action.ts?f54a","webpack://Msdyn365.Commerce.Online.Memx/./src/actions/state-data-actions/product-warranty-state.action.ts?49ae","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-clearance/actions/search-clearance-lines.action.ts?6785","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-store-selector/state-manager/base-store-selector-state-manager.ts?fa5d","webpack://Msdyn365.Commerce.Online.Memx/./src/modules/mmx-store-selector/state-manager/map-store-selector-state-manager.ts?a944","webpack://Msdyn365.Commerce.Online.Memx/./src/utilities/utils.ts?6402","webpack://Msdyn365.Commerce.Online.Memx/./lib/__local__/module-registration.js?8a42","webpack://Msdyn365.Commerce.Online.Memx/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online.Memx/external var \"ReactDOM\"?853b"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\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 { getCartState } from '@msdyn365-commerce/global-state';\r\n//mmx-feature: imports --start\r\n/*\r\nimport { CartLine, QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\n*/\r\nimport { Address, CartLine, OrgUnitLocation, QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\n//mmx-feature: imports --end\r\nimport { addCartLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\n\r\n//mmx-feature: imports --start\r\n/*\r\nimport { getPaginatedOrderTemplateLinesAction, GetPaginatedOrderTemplateLinesInput } from './get-paginated-order-template-lines';\r\n*/\r\nimport { getPaginatedOrderTemplateLinesAction, GetPaginatedOrderTemplateLinesInput } from '@msdyn365-commerce-modules/retail-actions';\r\n//mmx-feature: imports --end\r\n\r\n/**\r\n * Input class for the AddOrderTemplateToCart data action.\r\n */\r\n//mmx-feature: name change --start\r\n/*\r\nexport class AddOrderTemplateToCartInput implements IActionInput {\r\n*/\r\nexport class AddPickupOrderTemplateToCartInput implements IActionInput {\r\n //mmx-feature: name change --end\r\n //mmx-feature: order template pick up --start\r\n /*\r\n public readonly orderTemplateId: string;\r\n\r\n constructor(orderTemplateId: string) {\r\n this.orderTemplateId = orderTemplateId;\r\n }\r\n */\r\n public readonly orderTemplateId: string;\r\n public readonly locationData?: { orgUnitLocation: OrgUnitLocation; deliveryMode: string };\r\n\r\n constructor(orderTemplateId: string, locationData?: { orgUnitLocation: OrgUnitLocation; deliveryMode: string }) {\r\n this.orderTemplateId = orderTemplateId;\r\n this.locationData = locationData;\r\n }\r\n //mmx-feature: order template pick up --end\r\n\r\n public getCacheKey = () => 'AddOrderTemplateToCartInput';\r\n\r\n public getCacheObjectType = () => 'AddOrderTemplateToCartInput';\r\n\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * CreateInput method for the AddOrderTemplateToCart method.\r\n * @param {ICreateActionContext} inputData The input data passed to the createInput method.\r\n * @param {string} orderTemplateId The id of template.\r\n */\r\n//mmx-feature: name change --start\r\n/*\r\nexport const addOrderTemplateToCartInput = (inputData: ICreateActionContext, orderTemplateId: string): AddOrderTemplateToCartInput => {\r\n*/\r\nexport const addPickupOrderTemplateToCartInput = (inputData: ICreateActionContext, orderTemplateId: string): AddPickupOrderTemplateToCartInput => {\r\n //mmx-feature: name change --end\r\n const { requestContext } = inputData;\r\n if (!requestContext.user.isAuthenticated) {\r\n throw new Error('Unable to create order template. User is not authenticated.');\r\n }\r\n //mmx-feature: name change --start\r\n /*\r\n return new AddOrderTemplateToCartInput(orderTemplateId);\r\n */\r\n return new AddPickupOrderTemplateToCartInput(orderTemplateId);\r\n //mmx-feature: name change --end\r\n};\r\n\r\n/**\r\n * The action method for the AddOrderTemplateToCart data action.\r\n * @param {AddOrderTemplateToCartInput} input The action input.\r\n * @param {IActionContext} ctx The action context.\r\n * @param context\r\n */\r\n//mmx-feature: name change --start\r\n/*\r\nexport async function addOrderTemplateToCartAction(input: AddOrderTemplateToCartInput, context: IActionContext): Promise {\r\n*/\r\nexport async function addPickupOrderTemplateToCartAction(input: AddPickupOrderTemplateToCartInput, context: IActionContext): Promise {\r\n //mmx-feature: name change --end\r\n const cartState = await getCartState(context);\r\n const chunkCount = 1000;\r\n const queryResultSettings: QueryResultSettings = {\r\n Paging: {\r\n Top: chunkCount,\r\n Skip: 0\r\n }\r\n };\r\n const getPaginatedOrderTemplateLinesInput = new GetPaginatedOrderTemplateLinesInput(input.orderTemplateId, queryResultSettings);\r\n let orderTemplateLines = await getPaginatedOrderTemplateLinesAction(getPaginatedOrderTemplateLinesInput, context);\r\n let addedCartLines: CartLine[] = [];\r\n for (let skip = chunkCount; orderTemplateLines.lines.length > 0; skip += chunkCount) {\r\n const cartLines: CartLine[] = orderTemplateLines.lines.map(productLine => {\r\n const cartLine: CartLine = {\r\n ItemId: productLine.fullProduct?.ProductDetails.ItemId,\r\n ProductId: productLine.productListLine.ProductId,\r\n Quantity: productLine.productListLine.Quantity,\r\n TrackingId: '',\r\n UnitOfMeasureSymbol: productLine.productListLine.UnitOfMeasure\r\n };\r\n //mmx-feature: order template pick up --start\r\n if (input.locationData) {\r\n cartLine.DeliveryMode = input.locationData.deliveryMode ?? context.requestContext.channel?.PickupDeliveryModeCode ?? 'PICK';\r\n cartLine.FulfillmentStoreId = input.locationData.orgUnitLocation.OrgUnitNumber;\r\n cartLine.WarehouseId = input.locationData.orgUnitLocation.InventoryLocationId;\r\n cartLine.ShippingAddress = buildAddressFromOrgUnitLocation(input.locationData.orgUnitLocation);\r\n }\r\n //mmx-feature order template pick up --end\r\n return cartLine;\r\n });\r\n await addCartLinesAsync({ callerContext: context }, cartState.cart.Id, cartLines, cartState.cart.Version).catch(error => {\r\n context.telemetry.trace(error.data?.ValidationResults);\r\n context.telemetry.trace('Unable to add order template to cart.');\r\n throw error.data?.ValidationResults;\r\n });\r\n addedCartLines = addedCartLines.concat(cartLines);\r\n getPaginatedOrderTemplateLinesInput.queryResultSettings.Paging!.Skip = skip;\r\n orderTemplateLines = await getPaginatedOrderTemplateLinesAction(getPaginatedOrderTemplateLinesInput, context);\r\n }\r\n await cartState.refreshCart({});\r\n return addedCartLines;\r\n}\r\n\r\n//mmx-feature: order template pick up --start\r\nconst buildAddressFromOrgUnitLocation = (location: OrgUnitLocation): Address => {\r\n return {\r\n RecordId: location.PostalAddressId,\r\n Name: location.OrgUnitName,\r\n FullAddress: location.Address,\r\n Street: location.Street,\r\n StreetNumber: location.StreetNumber,\r\n City: location.City,\r\n DistrictName: location.DistrictName,\r\n BuildingCompliment: location.BuildingCompliment,\r\n Postbox: location.Postbox,\r\n ThreeLetterISORegionName: location.Country,\r\n ZipCode: location.Zip,\r\n County: location.County,\r\n CountyName: location.CountyName,\r\n State: location.State,\r\n StateName: location.StateName\r\n };\r\n};\r\n//mmx-feature order template pick up --end\r\n\r\n/**\r\n * The AddOrderTemplateToCart Data Action.\r\n * Returns created order template.\r\n */\r\n//mmx-feature: name change --start\r\n/*\r\nexport const addOrderTemplateToCartActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/add-order-template-to-cart',\r\n action: >addOrderTemplateToCartAction,\r\n input: addOrderTemplateToCartInput\r\n});\r\nexport default addOrderTemplateToCartActionDataAction;\r\n*/\r\n//mmx-feature: name change --end\r\nexport const addPickupOrderTemplateToCartActionDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/order-templates/add-order-template-to-cart',\r\n action: >addPickupOrderTemplateToCartAction,\r\n input: addPickupOrderTemplateToCartInput\r\n});\r\nexport default addPickupOrderTemplateToCartActionDataAction;","/*!\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 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\n// mmx-feature: non-stocked products --begin\r\n/*\r\nimport { CartLine, ChannelDeliveryOptionConfiguration, FeatureState, ProductWarehouse } from '@msdyn365-commerce/retail-proxy';\r\n*/\r\nimport { CartLine, ChannelDeliveryOptionConfiguration, ProductWarehouse } from '@msdyn365-commerce/retail-proxy';\r\n// mmx-feature: non-stocked products --end\r\nimport { getOrgUnitConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\r\nimport {\r\n getEstimatedAvailabilityAsync,\r\n getEstimatedProductWarehouseAvailabilityAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { getChannelDeliveryOptionConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\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 // mmx-feature: non-stocked products --begin\r\n /*\r\n mapProductInventoryInformation\r\n} from '.';\r\nimport { FeatureStateInput, getFeatureStateActionDataAction } from './get-feature-state';\r\n */\r\n mapProductInventoryInformation,\r\n getFeatureState,\r\n createGetFeatureStateInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n// mmx-feature: non-stocked products --end\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 bopisItems = [];\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 getOrgUnitConfigurationAsync({ callerContext: ctx });\r\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx);\r\n\r\n /**\r\n * Calls the Retail Feature State API and returns a list of feature with isEnabled flag.\r\n * @param context\r\n */\r\n // mmx-feature: non-stocked products --begin\r\n /*\r\n async function getFeatureState(context: IActionContext): Promise {\r\n return getFeatureStateActionDataAction(new FeatureStateInput(), context);\r\n }\r\n const featureState = await getFeatureState(ctx);\r\n */\r\n const featureState = await getFeatureState(createGetFeatureStateInput(ctx), ctx);\r\n // mmx-feature: non-stocked products --end\r\n const retailMultiplePickUpOptionEnabled = featureState?.find(item => item.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n if (retailMultiplePickUpOptionEnabled) {\r\n channelDeliveryOptionConfig = await 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 bopisItems.push(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 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 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 const quantityUnitTypeSales: number = 2;\r\n const getProductWarehouseAvail = await 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","/*!\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 ICreateActionContext,\r\n IActionContext,\r\n IActionInput\r\n} from '@msdyn365-commerce/core';\r\nimport { getChannelDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\r\nimport { getChannelDeliveryOptionConfigurationAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\nexport interface DeliveryOptionContext {\r\n isShippingEnabled: boolean;\r\n isPickupEnabled: boolean;\r\n}\r\n\r\n/**\r\n * GetDeliveryOptionContext Input Action\r\n */\r\nexport class GetDeliveryOptionContextInput implements IActionInput {\r\n private channelId: number;\r\n\r\n constructor(channelId: number) {\r\n this.channelId = channelId;\r\n }\r\n\r\n public getCacheKey = () => `DeliveryOptionContext-${this.channelId}`;\r\n public getCacheObjectType = () => 'DeliveryOptionContext';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: ICreateActionContext): IActionInput => {\r\n return new GetDeliveryOptionContextInput(args.requestContext.apiSettings.channelId);\r\n};\r\n\r\nasync function getDeliveryOptionContextAction(input: IActionInput, ctx: IActionContext): Promise {\r\n let [channelDeliveryOptions, channelDeliveryOptionConfig] = await Promise.all([\r\n getChannelDeliveryOptionsAsync({ callerContext: ctx }, [ctx.requestContext.apiSettings.channelId]),\r\n getChannelDeliveryOptionConfigurationAsync({ callerContext: ctx })\r\n ]);\r\n const deliveryOptions =\r\n channelDeliveryOptions.find(group => group.ChannelId === ctx.requestContext.apiSettings.channelId)?.DeliveryOptions ?? [];\r\n const pickupDeliveryOptions = channelDeliveryOptionConfig.PickupDeliveryModeCodes ?? [];\r\n\r\n let [isShippingEnabled, isPickupEnabled] = [false, false];\r\n\r\n for (var deliveryOption of deliveryOptions) {\r\n if (deliveryOption.Code && pickupDeliveryOptions.indexOf(deliveryOption.Code) > -1) {\r\n isPickupEnabled = true;\r\n } else {\r\n isShippingEnabled = true;\r\n }\r\n if (isShippingEnabled && isPickupEnabled) {\r\n break;\r\n }\r\n }\r\n\r\n return {\r\n isShippingEnabled: isShippingEnabled,\r\n isPickupEnabled: isPickupEnabled\r\n };\r\n}\r\n\r\nexport default createObservableDataAction({\r\n action: >getDeliveryOptionContextAction,\r\n id: 'DeliveryOptionContext',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { CacheType, createObservableDataAction, getCatalogId, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\r\nimport { ProductPrice, ProductsDataActions, ProductSearchResult, ProjectionDomain } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ArrayExtensions, QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * Input class for the GetPriceForProductSearchResult Data Action.\r\n */\r\nexport class PriceForProductSearchResultInput implements IActionInput {\r\n public products: ProductSearchResult[];\r\n public customerId?: string;\r\n\r\n public constructor(products: ProductSearchResult[], customerId?: string) {\r\n this.products = products;\r\n this.customerId = customerId;\r\n }\r\n\r\n /**\r\n * Get the cache key.\r\n * @returns The cache key.\r\n */\r\n public getCacheKey = (): string => `PriceForProductSearchResult-${JSON.stringify(this.products)}`;\r\n\r\n /**\r\n * Get the cache object type.\r\n * @returns The cache object type.\r\n */\r\n public getCacheObjectType = (): string => 'ProductSearchResult';\r\n\r\n /**\r\n * Define the data cache type.\r\n * @returns The cache type.\r\n */\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * The createInput method for the GetPriceForProductSearchResultDataAction.\r\n * @param products -- The product search result.\r\n * @returns The input.\r\n */\r\nexport const createActivePriceForProductSearchResultInput = (products: ProductSearchResult[]): PriceForProductSearchResultInput => {\r\n return new PriceForProductSearchResultInput(products);\r\n};\r\n\r\n/**\r\n * The Action Method for the GetPriceForProductSearchResult Data Action\r\n * Gets the active price for product search result via the getActivePrice RetailServer API.\r\n * @param input -- The data input.\r\n * @param context -- The action context.\r\n * @returns The product search result updated with price.\r\n */\r\nexport async function getPriceForProductSearchResultAction(\r\n input: PriceForProductSearchResultInput,\r\n context: IActionContext\r\n): Promise {\r\n let productRecIds: number[];\r\n if (ArrayExtensions.hasElements(input.products)) {\r\n productRecIds = input.products.map(product => product.RecordId);\r\n } else {\r\n return Promise.resolve([]);\r\n }\r\n\r\n const catalogId = getCatalogId(context.requestContext);\r\n\r\n const projectDomain: ProjectionDomain = { ChannelId: +context.requestContext.apiSettings.channelId, CatalogId: catalogId };\r\n const priceZero = 0;\r\n\r\n try {\r\n const productPrices: ProductPrice[] = await ProductsDataActions.getActivePricesAsync(\r\n { callerContext: context, queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context) },\r\n projectDomain,\r\n productRecIds,\r\n new Date(),\r\n input.customerId ?? null,\r\n undefined,\r\n true\r\n );\r\n\r\n const productResults: ProductSearchResult[] = input.products.map(product => {\r\n const activePrice = productPrices.find(price => price.ProductId === product.RecordId);\r\n //mmx-feature: discount fix --start\r\n product.ExtensionProperties?.push({ Key: 'BasePrice', Value: { IntegerValue: activePrice?.BasePrice } });\r\n product.ExtensionProperties?.push({ Key: 'AdjustedPrice', Value: { IntegerValue: activePrice?.AdjustedPrice } });\r\n product.ExtensionProperties?.push({\r\n Key: 'CustomerContextualPrice',\r\n Value: { IntegerValue: activePrice?.CustomerContextualPrice }\r\n });\r\n //mmx-feature: discount fix --end\r\n if (activePrice) {\r\n product.Price = activePrice.CustomerContextualPrice ?? product.Price;\r\n product.BasePrice = Math.max(\r\n activePrice.BasePrice ?? priceZero,\r\n activePrice.TradeAgreementPrice ?? priceZero,\r\n activePrice.AdjustedPrice ?? priceZero\r\n );\r\n }\r\n return product;\r\n });\r\n\r\n return Promise.resolve(productResults);\r\n } catch (error) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- existing error type.\r\n //@ts-ignore\r\n context.telemetry.exception(error);\r\n context.telemetry.debug('[getPriceForProductSearchResultAction]Error executing action');\r\n throw new Error('[getPriceForProductSearchResultAction]Error executing action');\r\n }\r\n}\r\n\r\n/**\r\n * The getPriceForProductSearchResult data action.\r\n */\r\nexport const getPriceForProductSearchResultDataAction = createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-price-for-product-search-result',\r\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions -- existing pattern.\r\n action: >getPriceForProductSearchResultAction,\r\n input: createActivePriceForProductSearchResultInput\r\n});\r\n\r\nexport default getPriceForProductSearchResultDataAction;\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n ICreateActionContext,\r\n IActionContext,\r\n IActionInput,\r\n IGeneric,\r\n IAny\r\n} from '@msdyn365-commerce/core';\r\nimport { getProductDefaultVariantsAsync } from './DataActionExtension.g';\r\nimport { IProductDefaultVariant } from './DataServiceEntities.g';\r\nimport { getSelectedProductIdFromActionInput } from '../utilities/utils';\r\n\r\n/*\r\n * Input class for the getProductDefaultVariant data action\r\n */\r\nexport class ProductDefaultVariantInput implements IActionInput {\r\n public productId: number;\r\n constructor(productId: number) {\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `mmx-productdefaultvariant-${this.productId.toString()}`;\r\n public getCacheObjectType = () => 'IProductDefaultVariant';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Create input method for the getProductDefaultVariant data action.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createProductDefaultVariantInput = (inputData: ICreateActionContext>): ProductDefaultVariantInput[] => {\r\n const productIds: string[] = [];\r\n const selectedId = getSelectedProductIdFromActionInput(inputData);\r\n if (selectedId) {\r\n productIds.push(selectedId);\r\n if (Array.isArray(productIds) && productIds.length > 0) {\r\n return productIds.map((productId: string) => {\r\n return new ProductDefaultVariantInput(+productId);\r\n });\r\n }\r\n }\r\n throw new Error('Unable to find product variant, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * Action method for the getProductDefaultVariant data action.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getProductDefaultVariantAction(\r\n input: ProductDefaultVariantInput[],\r\n ctx: IActionContext\r\n): Promise {\r\n const productIds = input.map((input: ProductDefaultVariantInput): number => {\r\n return input.productId;\r\n });\r\n return getProductDefaultVariantsAsync({ callerContext: ctx }, productIds).then((response: IProductDefaultVariant[]) => {\r\n return response;\r\n });\r\n}\r\n\r\n/**\r\n * The GetProductDefaultVariant data action\r\n * Finds product the default variants for given product masters via the RetailServer API.\r\n */\r\nexport default createObservableDataAction({\r\n id: 'get-product-default-variant',\r\n action: >getProductDefaultVariantAction,\r\n input: createProductDefaultVariantInput,\r\n isBatched: true\r\n});\r\n","import {\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 { IProductWarranties } from './DataServiceEntities.g';\r\nimport { getProductWarrantiesAction, ProductWarrantiesInput } from './get-product-warranties.action';\r\nimport { getActiveCartProductsAction, ActiveCartProductsInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n/*\r\n * Input class for the getProductWarrantiesByCartInput data action\r\n */\r\nexport class GetProductWarrantiesByCartInput implements IActionInput {\r\n public getCacheKey = () => `mmx-productwarrantiesinactivecart`;\r\n public getCacheObjectType = () => 'IProductWarranties';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\n/**\r\n * Create input method for the getProductWarrantiesByCart data action.\r\n */\r\nexport const createProductWarrantiesByCartInput = (args: ICreateActionContext): IActionInput => {\r\n return new GetProductWarrantiesByCartInput();\r\n};\r\n\r\n/**\r\n * Action method for the getProductWarrntiesByCart data action.\r\n * @param input\r\n * @param ctx\r\n */\r\nexport async function getProductWarrntiesByCartAction(\r\n input: GetProductWarrantiesByCartInput,\r\n ctx: IActionContext\r\n): Promise {\r\n var productWarrantiesInput: ProductWarrantiesInput[] = [];\r\n\r\n return getActiveCartProductsAction(new ActiveCartProductsInput(), ctx).then((response: SimpleProduct[]) => {\r\n response.map(cartProduct => {\r\n productWarrantiesInput.push(new ProductWarrantiesInput(cartProduct.RecordId));\r\n });\r\n\r\n return getProductWarrantiesAction(productWarrantiesInput, ctx).then((response: IProductWarranties[]) => {\r\n return response;\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * The GetProductWarrantiesByCart data action\r\n * Gets all products in the active cart and finds the applicable\r\n * warranty for each product via the getProductWarranties RetailServer API\r\n */\r\nexport default createObservableDataAction({\r\n id: 'get-product-warranties-by-cart',\r\n action: >getProductWarrntiesByCartAction,\r\n input: createProductWarrantiesByCartInput,\r\n isBatched: false\r\n});\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\r\n IAction,\r\n ICreateActionContext,\r\n IActionContext,\r\n IActionInput,\r\n IGeneric,\r\n IAny\r\n} from '@msdyn365-commerce/core';\r\nimport { getProductWarrantiesAsync } from './DataActionExtension.g';\r\nimport { IProductWarranties, IProductDefaultVariant } from './DataServiceEntities.g';\r\nimport { getProductDefaultVariantAction, ProductDefaultVariantInput } from './get-product-default-variant.action';\r\nimport { getSelectedProductIdFromActionInput } from '../utilities/utils';\r\n\r\n/*\r\n * Input class for the getProductWarranties data action\r\n */\r\nexport class ProductWarrantiesInput implements IActionInput {\r\n public productId: number;\r\n constructor(productId: number) {\r\n this.productId = productId;\r\n }\r\n public getCacheKey = () => `mmx-productwarranties-${this.productId}`;\r\n public getCacheObjectType = () => 'IProductWarranties';\r\n public dataCacheType = (): CacheType => 'application';\r\n}\r\n\r\n/**\r\n * Create input method for the getProductWarranties data action.\r\n * @param inputData The input data passed to the createInput method.\r\n */\r\nexport const createProductWarrantiesInput = (inputData: ICreateActionContext>): ProductWarrantiesInput[] => {\r\n const productIds: string[] = [];\r\n const selectedId = getSelectedProductIdFromActionInput(inputData);\r\n if (selectedId) {\r\n productIds.push(selectedId);\r\n if (Array.isArray(productIds) && productIds.length > 0) {\r\n return productIds.map((productId: string) => {\r\n return new ProductWarrantiesInput(+productId);\r\n });\r\n }\r\n }\r\n throw new Error('Unable to find product warranties, no productId found on module config or query');\r\n};\r\n\r\n/**\r\n * Action method for the getProductWarranties data action.\r\n * @param inputs\r\n * @param ctx\r\n */\r\nexport async function getProductWarrantiesAction(input: ProductWarrantiesInput[], ctx: IActionContext): Promise {\r\n if (!Array.isArray(input) || input.length === 0) {\r\n ctx.telemetry.trace('[getProductWarranties] Invalid or empty input.');\r\n return {};\r\n }\r\n\r\n const productDefaultVariantInputs: ProductDefaultVariantInput[] = input.map(\r\n (input: ProductWarrantiesInput): ProductDefaultVariantInput => {\r\n return new ProductDefaultVariantInput(input.productId);\r\n }\r\n );\r\n\r\n return getProductDefaultVariantAction(productDefaultVariantInputs, ctx).then((response: IProductDefaultVariant[]) => {\r\n const defaultProductMasterIds: number[] = [];\r\n const defaultVariantIds: number[] = [];\r\n\r\n response.map(response => {\r\n defaultProductMasterIds.push(response.MasterId);\r\n defaultVariantIds.push(response.DefaultProductId);\r\n });\r\n\r\n // Product Ids not accounted for by the getProductDefaultVariantAction response\r\n const missingInputIds = input\r\n .filter(input => !defaultProductMasterIds.includes(input.productId))\r\n .map(input => {\r\n return input.productId;\r\n });\r\n\r\n const allProductIds = [...new Set([...defaultVariantIds, ...missingInputIds])];\r\n\r\n return getProductWarrantiesAsync({ callerContext: ctx }, allProductIds).then((response: IProductWarranties[]) => {\r\n return response;\r\n });\r\n });\r\n}\r\n\r\n/**\r\n * The GetProductWarranties data action\r\n * Finds variants from product masters or uses\r\n * Then finds the applicable warranties via the getProductWarranties RetailServer API.\r\n */\r\nexport default createObservableDataAction({\r\n id: 'get-product-warranties',\r\n action: >getProductWarrantiesAction,\r\n input: createProductWarrantiesInput,\r\n isBatched: true\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { getWarrantyIconsAsync } from './DataActionExtension.g';\r\nimport { IWarrantyIcon } from './DataServiceEntities.g';\r\n\r\n/**\r\n * GetWarrantyIcon Input Action\r\n */\r\nexport class GetProductWarrantyIconInput implements Msdyn365.IActionInput {\r\n constructor() {}\r\n\r\n public getCacheKey = () => `mmx-productwarranty-icons`;\r\n public getCacheObjectType = () => 'IWarrantyIcon';\r\n public dataCacheType = (): Msdyn365.CacheType => 'application';\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetProductWarrantyIconInput();\r\n};\r\n\r\nasync function action(input: GetProductWarrantyIconInput, ctx: Msdyn365.IActionContext): Promise {\r\n return getWarrantyIconsAsync({ callerContext: ctx });\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >action,\r\n id: 'GetWarrantyIcon',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport {\r\n CacheType,\r\n createObservableDataAction,\r\n getCatalogId,\r\n IAction,\r\n IActionContext,\r\n IActionInput,\r\n IAny,\r\n ICommerceApiSettings,\r\n ICreateActionContext,\r\n IDictionary,\r\n IGeneric,\r\n IRequestContext\r\n} from '@msdyn365-commerce/core';\r\nimport { getByIdsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\n//mmx-feature: import changes --start\r\n/*\r\nimport { ArrayExtensions, generateCacheKey } from './utilities';\r\nimport { QueryResultSettingsProxy } from './utilities/QueryResultSettingsProxy';\r\nimport { generateProductImageUrl } from './utilities/utils';\r\n*/\r\n\r\nimport { ArrayExtensions, generateCacheKey } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { QueryResultSettingsProxy } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { generateProductImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { generateProductImageUrl as generateMmxProductImageUrl } from '../utilities/utils';\r\n//mmx-feature: import changes --end\r\n\r\n/**\r\n * Product Input.\r\n */\r\nexport class ProductInput implements IActionInput {\r\n public productId: number;\r\n\r\n public channelId: number;\r\n\r\n public warehouseId?: string;\r\n\r\n public catalogId?: number;\r\n\r\n private readonly apiSettings: ICommerceApiSettings;\r\n\r\n public constructor(\r\n productId: number | string,\r\n apiSettings: ICommerceApiSettings,\r\n channelId?: number,\r\n warehouseId?: string,\r\n requestContext?: IRequestContext,\r\n catalogId?: number\r\n ) {\r\n this.apiSettings = apiSettings;\r\n this.productId = +productId;\r\n this.channelId = channelId || apiSettings.channelId;\r\n this.warehouseId = warehouseId;\r\n this.catalogId = catalogId;\r\n\r\n if (requestContext && catalogId === undefined) {\r\n this.catalogId = getCatalogId(requestContext);\r\n }\r\n }\r\n\r\n public getCacheKey = () =>\r\n generateCacheKey(\r\n this.apiSettings,\r\n { key: 'ProductRecordId', value: this.productId },\r\n { key: 'ChannelId', value: this.channelId },\r\n { key: 'WarehouseId', value: this.warehouseId },\r\n { key: 'CatalogId', value: this.catalogId }\r\n );\r\n\r\n public getCacheObjectType = () => 'SimpleProduct';\r\n\r\n public dataCacheType = (): CacheType => 'application';\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 createSimpleProductsInput = (inputData: ICreateActionContext>): IActionInput[] => {\r\n let productIds = inputData.config && inputData.config.productIds;\r\n if (!productIds) {\r\n return [];\r\n }\r\n\r\n productIds = typeof productIds === 'string' ? productIds.split(',') : productIds;\r\n return !Array.isArray(productIds)\r\n ? []\r\n : productIds.map((productId: string) => {\r\n return new ProductInput(productId, inputData.requestContext.apiSettings, undefined, undefined, inputData.requestContext);\r\n });\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns the product based on the passed ProductInput.\r\n * @param inputs\r\n * @param ctx\r\n */\r\nexport async function getSimpleProductsAction(inputs: ProductInput[], ctx: IActionContext): Promise {\r\n if (!ArrayExtensions.hasElements(inputs)) {\r\n ctx.trace('[getSimpleProductsAction] Invalid or empty inputs passed.');\r\n return [];\r\n }\r\n\r\n const productIdMapping: IDictionary = {};\r\n\r\n for (let index = 0; index < inputs.length; ++index) {\r\n productIdMapping[inputs[index].productId] = index;\r\n }\r\n\r\n const getProductPromises: Promise[] = [];\r\n const catalogIds = ArrayExtensions.unique(inputs.map(input => input.catalogId));\r\n for (const catalogId of catalogIds) {\r\n const productInputs = inputs.filter(input => input.catalogId === catalogId);\r\n let queryResult = QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(ctx);\r\n if (ArrayExtensions.hasElements(productInputs) && productInputs.length > ctx.requestContext?.app?.platform?.defaultPageSizeForAPI) {\r\n queryResult = {\r\n Paging: {\r\n Top: productInputs.length\r\n }\r\n };\r\n }\r\n getProductPromises.push(\r\n getByIdsAsync(\r\n { callerContext: ctx, queryResultSettings: queryResult },\r\n inputs[0].channelId,\r\n productInputs.map(input => input.productId),\r\n inputs[0].warehouseId ?? null,\r\n catalogId ?? 0\r\n )\r\n .then(response => {\r\n return response;\r\n })\r\n .catch(error => {\r\n ctx.telemetry.debug(`[getSimpleProductsAction] Error in getting response from server. ${error}`);\r\n return {};\r\n })\r\n );\r\n }\r\n\r\n const products = ArrayExtensions.flatten(await Promise.all(getProductPromises));\r\n const mappedProducts = products\r\n .map(product => {\r\n try {\r\n //mmx-feature: image url --start\r\n /*\r\n const newImageUrl = generateProductImageUrl(product, ctx.requestContext.apiSettings);\r\n */\r\n let newImageUrl: string | undefined;\r\n if (ctx.requestContext.app.config.trimDimensionsFromProductImageUrl === true) {\r\n newImageUrl = generateMmxProductImageUrl(product, ctx.requestContext.apiSettings);\r\n } else {\r\n newImageUrl = generateProductImageUrl(product, ctx.requestContext.apiSettings);\r\n }\r\n //mmx-feature: image url --end\r\n\r\n if (newImageUrl) {\r\n product.PrimaryImageUrl = newImageUrl;\r\n }\r\n\r\n return product;\r\n } catch {\r\n ctx.trace('[getSimpleProductsAction] Unable to update ImageURL for Product');\r\n return undefined;\r\n }\r\n })\r\n .reduce((memo: SimpleProduct[], product: SimpleProduct | undefined) => {\r\n if (!product) {\r\n return memo;\r\n }\r\n const index = productIdMapping[product.RecordId];\r\n memo[index] = product;\r\n return memo;\r\n }, []);\r\n\r\n // NOTE: This is not an ideal fix, but will resolve all current issues\r\n return inputs.map(input => {\r\n const foundProduct = mappedProducts.find(product => product && product.RecordId === input.productId);\r\n return foundProduct || {};\r\n });\r\n}\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/retail-actions/get-simple-products',\r\n action: >getSimpleProductsAction,\r\n input: createSimpleProductsInput,\r\n isBatched: true\r\n});\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\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 { getSelectedProductIdFromActionInput } from '../../utilities/utils';\r\n\r\nexport class ProductQuantityStateInput implements IActionInput {\r\n public productId: number;\r\n\r\n constructor(productId: number) {\r\n this.productId = productId;\r\n }\r\n\r\n public getCacheKey = () => `ProductQuantityState-${this.productId}`;\r\n public getCacheObjectType = () => 'number';\r\n public dataCacheType = (): CacheType => 'instance';\r\n}\r\n\r\nexport async function ProductQuantityStateAction(input: ProductQuantityStateInput, ctx: IActionContext): Promise {\r\n return {};\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n const selectedId = getSelectedProductIdFromActionInput(inputData);\r\n if (selectedId) {\r\n return new ProductQuantityStateInput(+selectedId);\r\n }\r\n throw new Error('Unable to find warranty disabled state, no productId found on module config or query');\r\n};\r\n\r\nexport default createObservableDataAction({\r\n action: >ProductQuantityStateAction,\r\n input: createInput\r\n});\r\n","import {\r\n CacheType,\r\n createObservableDataAction,\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 { getSelectedProductIdFromActionInput } from '../../utilities/utils';\r\nimport { IWarrantyOption } from '../DataServiceEntities.g';\r\n\r\nexport class ProductWarrantyStateInput implements IActionInput {\r\n public productId: number;\r\n\r\n constructor(productId: number) {\r\n this.productId = productId;\r\n }\r\n\r\n public getCacheKey = () => `ProductWarrantyState-${this.productId}`;\r\n public getCacheObjectType = () => 'IWarrantyOption';\r\n public dataCacheType = (): CacheType => 'instance';\r\n}\r\n\r\nexport async function productWarrantyStateAction(input: ProductWarrantyStateInput, ctx: IActionContext): Promise {\r\n return {};\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\r\n const selectedId = getSelectedProductIdFromActionInput(inputData);\r\n if (selectedId) {\r\n return new ProductWarrantyStateInput(+selectedId);\r\n }\r\n throw new Error('Unable to find product warranty state, no productId found on module config or query');\r\n};\r\n\r\nexport default createObservableDataAction({\r\n action: >productWarrantyStateAction,\r\n input: createInput\r\n});\r\n","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n generateCacheKey\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IClearanceProductSearchResult, IClearanceSearchCriteria } from '../../../actions/DataServiceEntities.g';\r\nimport { searchAvailableClearanceLinesAsync } from '../../../actions/DataActionExtension.g';\r\nimport { QueryResultSettings } from '@msdyn365-commerce/retail-proxy';\r\n\r\n/**\r\n * GetClearanceLines Input Action\r\n */\r\nexport class SearchClearanceLinesInput implements Msdyn365.IActionInput {\r\n public searchCriteria: IClearanceSearchCriteria;\r\n public apiSettings: Msdyn365.ICommerceApiSettings;\r\n public queryResultSettings?: QueryResultSettings;\r\n\r\n constructor(\r\n searchCriteria: IClearanceSearchCriteria,\r\n apiSettings: Msdyn365.ICommerceApiSettings,\r\n queryResultSettings: QueryResultSettings\r\n ) {\r\n this.searchCriteria = searchCriteria;\r\n this.apiSettings = apiSettings;\r\n this.queryResultSettings = queryResultSettings;\r\n }\r\n\r\n public getCacheKey = (): string =>\r\n generateCacheKey(\r\n this.apiSettings,\r\n { key: 'ProductIds', value: this.searchCriteria.ProductIds?.sort((id1, id2) => (id1 > id2 ? -1 : 1)).join(',') },\r\n { key: 'ItemIds', value: this.searchCriteria.ItemIds?.sort((id1, id2) => (id1 > id2 ? -1 : 1)).join(',') },\r\n { key: 'LocationIds', value: this.searchCriteria.LocationIds?.sort((id1, id2) => (id1 > id2 ? -1 : 1)).join(',') },\r\n { key: 'Skip', value: this.queryResultSettings?.Paging?.Skip },\r\n { key: 'Top', value: this.queryResultSettings?.Paging?.Top }\r\n );\r\n public getCacheObjectType = () => 'ProductSearchResult';\r\n public dataCacheType = (): Msdyn365.CacheType => 'request';\r\n}\r\n\r\nexport const createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new SearchClearanceLinesInput({}, args.requestContext.apiSettings, {});\r\n};\r\n\r\nexport async function searchAvailableClearanceLines(input: SearchClearanceLinesInput, ctx: Msdyn365.IActionContext): Promise {\r\n let paging = input.queryResultSettings?.Paging;\r\n return searchAvailableClearanceLinesAsync({ callerContext: ctx }, input.searchCriteria, paging?.Skip ?? 0, paging?.Top ?? 10);\r\n}\r\n\r\nexport default Msdyn365.createObservableDataAction({\r\n action: >searchAvailableClearanceLines,\r\n id: 'GetClearanceLines',\r\n input: createInput\r\n});\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport MsDyn365, { IActionContext } from '@msdyn365-commerce/core';\r\nimport { action, computed, observable } from 'mobx';\r\n\r\nimport {\r\n IListMapViewState,\r\n ILoadMapApiInput,\r\n IStoreInfo,\r\n IStoreSelectionStateContext,\r\n IStoreSelectorLocation,\r\n IStoreSelectorStateManager\r\n} from './i-store-selection-state-manager';\r\n\r\n/**\r\n * Abstract instance of IStoreSelectorStateManager with base implementation\r\n * of everything except the geoLocate function.\r\n */\r\nexport abstract class BaseStoreSelectorStateManager implements IStoreSelectorStateManager {\r\n @computed public get isDialogOpen(): Readonly {\r\n return this._context !== undefined;\r\n }\r\n\r\n @computed public get context(): Readonly {\r\n return this._context;\r\n }\r\n\r\n @observable public isMapApiLoaded?: boolean;\r\n\r\n @observable public selectedStoreLocationId?: string;\r\n\r\n @observable public preferredStore?: IStoreInfo;\r\n\r\n @observable public listMapViewState: IListMapViewState = { displayList: true, displayMap: false };\r\n\r\n @observable public isMapModuleLoaded?: boolean;\r\n\r\n @observable public lastInlineShownStoreInfo?: IStoreInfo;\r\n\r\n @observable protected _context?: IStoreSelectionStateContext;\r\n\r\n private readonly preferredStoreLocalStorageKey: string = '_msdyn365__preferredStore_';\r\n\r\n constructor() {\r\n this.isMapModuleLoaded = false;\r\n const value = this._readFromToCookie(this.preferredStoreLocalStorageKey);\r\n try {\r\n const storeInfo: IStoreInfo | undefined = value ? JSON.parse(value) : undefined;\r\n if (storeInfo) {\r\n this.preferredStore = storeInfo;\r\n }\r\n } catch {\r\n this.preferredStore = undefined;\r\n }\r\n }\r\n\r\n public abstract geoLocate(searchTerm: string, actionContext: IActionContext): Promise;\r\n\r\n public abstract loadMapApi(input: ILoadMapApiInput): Promise;\r\n\r\n @action\r\n public async toggleListMapViewState(): Promise {\r\n this.listMapViewState = {\r\n displayList: !this.listMapViewState.displayList,\r\n displayMap: !this.listMapViewState.displayMap\r\n };\r\n }\r\n\r\n @action\r\n public async setMapModuleLoaded(input: boolean): Promise {\r\n this.isMapModuleLoaded = input;\r\n }\r\n\r\n @action\r\n public async setOrgUnitStoreInformation(input: IStoreSelectionStateContext): Promise {\r\n this._context = input;\r\n }\r\n\r\n @action\r\n public async setSelectedStoreLocationId(storeId: string | undefined): Promise {\r\n this.selectedStoreLocationId = storeId;\r\n }\r\n\r\n @action\r\n public async setPreferredStoreLocation(\r\n storeId?: string,\r\n storeName?: string | undefined,\r\n writeToCookie: boolean = false,\r\n latitude?: number,\r\n longitude?: number\r\n ): Promise {\r\n const storeInfo: IStoreInfo = { StoreId: storeId, StoreName: storeName, Latitude: latitude, Longitude: longitude };\r\n this.preferredStore = storeInfo;\r\n if (writeToCookie) {\r\n this._writeToCookie(this.preferredStoreLocalStorageKey, JSON.stringify(storeInfo));\r\n }\r\n }\r\n\r\n @action\r\n public async setLastInlineStoreInfo(latitude?: number, longitude?: number): Promise {\r\n const storeInfo: IStoreInfo = { StoreId: '', StoreName: '', Latitude: latitude, Longitude: longitude };\r\n this.lastInlineShownStoreInfo = storeInfo;\r\n }\r\n\r\n @action\r\n public async clearPreferredStore(writeToCookie: boolean): Promise {\r\n this.preferredStore = undefined;\r\n if (writeToCookie) {\r\n this._removeCookie(this.preferredStoreLocalStorageKey);\r\n }\r\n }\r\n\r\n @action\r\n public async openDialog(input: IStoreSelectionStateContext): Promise {\r\n if (this._context && this._context.id === input.id) {\r\n throw new Error('Dialog is already opened');\r\n }\r\n\r\n this._context = input;\r\n }\r\n\r\n @action\r\n public async closeDialog(): Promise {\r\n this._context = undefined;\r\n }\r\n\r\n private _removeCookie(key: string): void {\r\n if (!key) {\r\n return;\r\n }\r\n if (MsDyn365.isBrowser) {\r\n const storage = window.localStorage;\r\n storage.removeItem(key);\r\n }\r\n }\r\n\r\n private _writeToCookie(key: string, value: string | undefined): void {\r\n if (!key || !value) {\r\n return;\r\n }\r\n if (MsDyn365.isBrowser) {\r\n const storage = window.localStorage;\r\n storage.setItem(key, value);\r\n }\r\n }\r\n\r\n private _readFromToCookie(key: string): string | undefined {\r\n if (!key) {\r\n return undefined;\r\n }\r\n if (MsDyn365.isBrowser) {\r\n const storage = window.localStorage;\r\n const cookieValue = storage.getItem(key);\r\n if (cookieValue) {\r\n return cookieValue;\r\n }\r\n }\r\n\r\n return undefined;\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\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { action } from 'mobx';\r\n\r\nimport { BaseStoreSelectorStateManager } from './base-store-selector-state-manager';\r\nimport { ILoadMapApiInput, IStoreSelectorLocation } from './i-store-selection-state-manager';\r\nimport { IMapWindow, MapLocationsResult } from './models/map-data';\r\n\r\ndeclare const window: IMapWindow;\r\n\r\n/**\r\n * Instance of IStoreSelectorStateManager manager that uses Map service\r\n * for geo location.\r\n */\r\nexport class MapStoreSelectorStateManager extends BaseStoreSelectorStateManager {\r\n private readonly SERVICE_ENDPOINT: string = 'https://dev.virtualearth.net/REST/v1/';\r\n\r\n private readonly MAP_API_ENDPOINT: string = 'https://www.bing.com/api/maps/mapcontrol?callback=mapAPIReady';\r\n\r\n @action\r\n public async geoLocate(searchTerm: string, actionContext: IActionContext): Promise {\r\n if (\r\n !searchTerm ||\r\n !actionContext.requestContext.channel ||\r\n !actionContext.requestContext.channel.BingMapsApiKey ||\r\n !actionContext.requestContext.channel.BingMapsEnabled\r\n ) {\r\n return undefined;\r\n }\r\n\r\n let searchContent: string = searchTerm;\r\n\r\n const jsonp = `mapSearchCallback_${crypto.getRandomValues(new Uint32Array(1))[0]}`;\r\n\r\n if (actionContext.requestContext.channel.ChannelCountryRegionISOCode) {\r\n searchContent = `${searchTerm.trim()} ${actionContext.requestContext.channel.ChannelCountryRegionISOCode}`;\r\n }\r\n\r\n const query = encodeURI(searchContent);\r\n const key = encodeURI(actionContext.requestContext.channel.BingMapsApiKey);\r\n\r\n const geolocationApiUrl =\r\n actionContext.requestContext.app &&\r\n actionContext.requestContext.app.config &&\r\n actionContext.requestContext.app.config.geolocationApiUrl;\r\n const requestUrl = `${\r\n geolocationApiUrl ? geolocationApiUrl : this.SERVICE_ENDPOINT\r\n }/Locations?query=${query}&key=${key}&jsonp=${jsonp}`;\r\n\r\n return new Promise(resolve => {\r\n const script = document.createElement('script');\r\n script.setAttribute('type', 'text/javascript');\r\n script.setAttribute('src', requestUrl);\r\n\r\n window[jsonp] = (data: MapLocationsResult) => {\r\n delete window[jsonp];\r\n script.remove();\r\n\r\n if (data && data.resourceSets && data.resourceSets.length > 0 && data.resourceSets[0].resources.length > 0) {\r\n resolve({\r\n latitude: data.resourceSets[0].resources[0].point.coordinates[0],\r\n longitude: data.resourceSets[0].resources[0].point.coordinates[1]\r\n });\r\n }\r\n\r\n resolve(undefined);\r\n };\r\n\r\n document.body.appendChild(script);\r\n });\r\n }\r\n\r\n @action\r\n public async loadMapApi(input: ILoadMapApiInput): Promise {\r\n if (StringExtensions.isNullOrEmpty(input.key)) {\r\n return Promise.resolve();\r\n }\r\n\r\n const isScriptAlreadyLoaded = !!document?.getElementById('msdyn_map-api-script');\r\n\r\n if (isScriptAlreadyLoaded) {\r\n // Prevents from loading multiple script into the body\r\n return Promise.resolve();\r\n }\r\n\r\n const url = `${this.MAP_API_ENDPOINT}${input.key ? `&key=${input.key}` : ''}${input.lang ? `&setLang=${input.lang}` : ''}${\r\n input.market ? `&setMkt=${input.market}` : ''\r\n }`;\r\n\r\n return new Promise((resolve, reject) => {\r\n const script = document?.createElement('script');\r\n script.type = 'text/javascript';\r\n script.async = true;\r\n script.defer = true;\r\n script.src = url;\r\n script.id = 'msdyn_map-api-script';\r\n if (window) {\r\n window.mapAPIReady = () => {\r\n this.isMapApiLoaded = true;\r\n resolve();\r\n };\r\n }\r\n script.addEventListener('error', (error: string | Event) => {\r\n reject(error);\r\n });\r\n document?.body?.appendChild(script);\r\n });\r\n }\r\n}\r\n","import { IActionContext, ITelemetry, ICreateActionContext, IGeneric, IAny } from '@msdyn365-commerce/core';\r\nimport { OrgUnitLocation, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { ICommerceApiSettings } from '@msdyn365-commerce/core-internal';\r\nimport { storeSelectorStateDataAction, IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\r\n// @ts-ignore\r\nimport { MapStoreSelectorStateManager } from '../modules/mmx-store-selector/state-manager/map-store-selector-state-manager';\r\nimport {\r\n GenericInput,\r\n getDeliveryOptionsForSelectedVariant,\r\n GetDeliveryOptionsForSelectedVariantInput,\r\n getOrgUnitLocationsByArea,\r\n GetOrgUnitLocationsByAreaInput\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport React from 'react';\r\n\r\n/**\r\n * Assigns given pickup location to given product.\r\n */\r\nexport const setPickupLocationForProduct = async (\r\n product: SimpleProduct,\r\n quantity: number,\r\n onLocationSelected: (orgUnitLocation: OrgUnitLocation, deliveryMode: string) => Promise,\r\n storeSelectorId: string,\r\n modalCloseButtonReference: React.RefObject,\r\n channelId: number,\r\n actionContext: IActionContext,\r\n telemetry?: ITelemetry\r\n): Promise => {\r\n let storeSelectorStateManager = await storeSelectorStateDataAction(\r\n new GenericInput('mapSSSM', new MapStoreSelectorStateManager(), 'IStoreSelectorStateManager'),\r\n actionContext\r\n ).catch((error: Error) => {\r\n if (telemetry) {\r\n telemetry.error(error.message);\r\n telemetry.debug('Error finding store selector state manager');\r\n }\r\n });\r\n\r\n if (storeSelectorStateManager) {\r\n const deliveryOptions = await getDeliveryOptionsForSelectedVariant(\r\n new GetDeliveryOptionsForSelectedVariantInput(product.RecordId, channelId, undefined, undefined, true),\r\n actionContext\r\n );\r\n\r\n let locations = await getOrgUnitLocationsByArea(\r\n new GetOrgUnitLocationsByAreaInput(undefined, undefined, 0, 0, true),\r\n actionContext\r\n );\r\n\r\n if (locations && locations.length) {\r\n if (locations.length > 1) {\r\n await storeSelectorStateManager\r\n .openDialog({\r\n product: product,\r\n id: storeSelectorId ?? 'mmx-store-selector',\r\n parentElementRef: modalCloseButtonReference,\r\n deliveryOptions: deliveryOptions,\r\n additionalProperties: {\r\n amountSelected: quantity,\r\n isStockedProuct: product.Behavior?.IsStockedProduct\r\n },\r\n onLocationSelected: onLocationSelected\r\n })\r\n .catch((error: any) => {\r\n if (telemetry) {\r\n telemetry.warning(error);\r\n telemetry.debug('[order-template-lines] Error trying to Update Cart Line from the order template lines');\r\n }\r\n });\r\n return Promise.resolve(undefined);\r\n } else {\r\n if (locations[0].OrgUnitAvailability && locations[0].OrgUnitAvailability?.OrgUnitLocation) {\r\n const defaultDeliveryOption = deliveryOptions?.DeliveryOptions ? deliveryOptions.DeliveryOptions[0].Code : undefined;\r\n if (defaultDeliveryOption) {\r\n onLocationSelected(locations[0].OrgUnitAvailability.OrgUnitLocation, defaultDeliveryOption);\r\n return Promise.resolve(undefined);\r\n } else {\r\n return Promise.reject('Could not find value delivery options');\r\n }\r\n } else {\r\n return Promise.reject('No valid org unit availability object');\r\n }\r\n }\r\n } else {\r\n return Promise.reject('No location found');\r\n }\r\n }\r\n return Promise.reject('Could not set pickup location');\r\n};\r\n/**\r\n * Utility function to extract the active productId in the following priority:\r\n * First query param (productId), then UrlToken (itemId), then module config.\r\n * Shamelessly stolen from msdyn commerce modules.\r\n * @param inputData The Action Input data.\r\n */\r\nexport const getSelectedProductIdFromActionInput = (inputData: ICreateActionContext>): string | undefined => {\r\n if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query['product-id']) {\r\n return inputData.requestContext.query['product-id'];\r\n } else if (inputData && inputData.requestContext && inputData.requestContext.query && inputData.requestContext.query.productId) {\r\n return inputData.requestContext.query.productId;\r\n } else if (\r\n inputData &&\r\n inputData.requestContext &&\r\n inputData.requestContext.urlTokens &&\r\n inputData.requestContext.urlTokens.pageType &&\r\n inputData.requestContext.urlTokens.pageType !== 'Category' &&\r\n inputData.requestContext.urlTokens.itemId\r\n ) {\r\n return inputData.requestContext.urlTokens.itemId;\r\n } else if (inputData && inputData.config && inputData.config.productId) {\r\n return inputData.config.productId;\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Generates a Image URL for a product based on data return from retail server.\r\n * @param product The Product returned by Retail Server.\r\n * @param apiSettings\r\n */\r\nexport const generateProductImageUrl = (\r\n product: SimpleProduct | ProductSearchResult,\r\n apiSettings: ICommerceApiSettings\r\n): string | undefined => {\r\n const fullImagePath = /^(\\/\\/|^)http/;\r\n const PRODUCT_DELINEATOR_INDEX = 0;\r\n const PRODUCT_SEQ_INDEX = 4;\r\n\r\n let imageUrl = product.PrimaryImageUrl;\r\n if (imageUrl) {\r\n if (fullImagePath.test(imageUrl)) {\r\n return imageUrl;\r\n }\r\n let imageUrlDecoded = decodeURIComponent(imageUrl);\r\n let imageComponents = imageUrlDecoded.split(' ^');\r\n let imageUrlRebuilt = imageComponents[PRODUCT_DELINEATOR_INDEX];\r\n if (imageComponents.length > 1) {\r\n imageUrlRebuilt += imageComponents[PRODUCT_SEQ_INDEX];\r\n }\r\n // Images hosted in Retail Server must be encoded and joined with the base image url\r\n return apiSettings.baseImageUrl + encodeURIComponent(imageUrlRebuilt);\r\n }\r\n return undefined;\r\n};\r\n\r\n/**\r\n * Gets item at provided cache key from the cache of a state data action. If multiple results are found, return only the first one.\r\n * @param context The request context\r\n * @param cacheObjectType The object type returned by the state data action\r\n * @param cacheKey The name of the state data action\r\n */\r\nexport function getSingleItemFromStateAction(context: IActionContext, cacheObjectType: string, cacheKey: string): T | undefined {\r\n const result = context.get(cacheObjectType, cacheKey);\r\n if (!result) {\r\n return undefined;\r\n } else if (Object.prototype.toString.call(result) !== '[object Array]') {\r\n //@ts-ignore\r\n return result;\r\n }\r\n return result[0];\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/add-pickup-order-template-to-cart.action';\n binding.dataActions[actionPath] = require('partner/actions/add-pickup-order-template-to-cart.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-delivery-option-context.action';\n binding.dataActions[actionPath] = require('partner/actions/get-delivery-option-context.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-price-for-product-search-result.action';\n binding.dataActions[actionPath] = require('partner/actions/get-price-for-product-search-result.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-default-variant.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-default-variant.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-warranties-in-active-cart.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-warranties-in-active-cart.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-warranties.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-warranties.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-product-warranty-icon.action';\n binding.dataActions[actionPath] = require('partner/actions/get-product-warranty-icon.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/get-simple-products.action';\n binding.dataActions[actionPath] = require('partner/actions/get-simple-products.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/state-data-actions/product-quantity-state.action';\n binding.dataActions[actionPath] = require('partner/actions/state-data-actions/product-quantity-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'actions/state-data-actions/product-warranty-state.action';\n binding.dataActions[actionPath] = require('partner/actions/state-data-actions/product-warranty-state.action');\n registerActionId(actionPath);\n }\n\n { \n const actionPath = 'modules/mmx-clearance/actions/search-clearance-lines.action';\n binding.dataActions[actionPath] = require('partner/modules/mmx-clearance/actions/search-clearance-lines.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":["AddPickupOrderTemplateToCartInput","constructor","orderTemplateId","locationData","getCacheKey","getCacheObjectType","dataCacheType","this","addPickupOrderTemplateToCartInput","inputData","requestContext","user","isAuthenticated","Error","async","addPickupOrderTemplateToCartAction","input","context","cartState","getCartState","chunkCount","queryResultSettings","Paging","Top","Skip","getPaginatedOrderTemplateLinesInput","GetPaginatedOrderTemplateLinesInput","orderTemplateLines","getPaginatedOrderTemplateLinesAction","addedCartLines","skip","lines","length","cartLines","map","productLine","_productLine$fullProd","cartLine","ItemId","fullProduct","ProductDetails","ProductId","productListLine","Quantity","TrackingId","UnitOfMeasureSymbol","UnitOfMeasure","_ref","_input$locationData$d","_context$requestConte","DeliveryMode","deliveryMode","channel","PickupDeliveryModeCode","FulfillmentStoreId","orgUnitLocation","OrgUnitNumber","WarehouseId","InventoryLocationId","ShippingAddress","buildAddressFromOrgUnitLocation","addCartLinesAsync","callerContext","cart","Id","Version","catch","error","_error$data","_error$data2","telemetry","trace","data","ValidationResults","concat","refreshCart","location","RecordId","PostalAddressId","Name","OrgUnitName","FullAddress","Address","Street","StreetNumber","City","DistrictName","BuildingCompliment","Postbox","ThreeLetterISORegionName","Country","ZipCode","Zip","County","CountyName","State","StateName","addPickupOrderTemplateToCartActionDataAction","createObservableDataAction","id","action","ProductAvailabilitiesForCartLineItems","apiSettings","buildCacheKey","getDeliveryMode","_channelDeliveryOptio","featureSate","arguments","undefined","channelDeliveryOptionConfig","pickupDeliveryMode","PickupDeliveryModeCodes","find","getAvailabilitiesForCartLineItems","ctx","_featureState$find","shippingItems","bopisItems","productAvailabilities","channelConfiguration","getOrgUnitConfigurationAsync","products","getActiveCartProductsAction","ActiveCartProductsInput","featureState","getFeatureState","createGetFeatureStateInput","retailMultiplePickUpOptionEnabled","item","IsEnabled","getChannelDeliveryOptionConfigurationAsync","EmailDeliveryModeCode","CartLines","push","productIds","x","ArrayExtensions","unique","searchCriteria","createInventoryAvailabilitySearchCriteria","shippingProductAvailabilities","getEstimatedAvailabilityAsync","bypassCache","ProductWarehouseInventoryAvailabilities","mapAggregatedProductInventoryInformation","productWarehouses","bopisItem","productWarehouse","InventLocationId","InventLocationDataAreaId","DataAreaId","quantityUnitTypeSales","getProductWarehouseAvail","getEstimatedProductWarehouseAvailabilityAsync","productWarehouseMapping","mapProductInventoryInformation","getAvailabilitiesForCartLineItemsDataAction","GetDeliveryOptionContextInput","channelId","_channelDeliveryOptio2","_channelDeliveryOptio3","channelDeliveryOptions","Promise","all","getChannelDeliveryOptionsAsync","deliveryOptions","group","ChannelId","DeliveryOptions","pickupDeliveryOptions","isShippingEnabled","isPickupEnabled","deliveryOption","Code","indexOf","args","PriceForProductSearchResultInput","customerId","JSON","stringify","createActivePriceForProductSearchResultInput","getPriceForProductSearchResultAction","productRecIds","hasElements","resolve","product","catalogId","getCatalogId","projectDomain","CatalogId","_input$customerId","productPrices","ProductsDataActions","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","Date","productResults","_product$ExtensionPro","_product$ExtensionPro2","_product$ExtensionPro3","activePrice","price","_activePrice$Customer","_activePrice$BasePric","_activePrice$TradeAgr","_activePrice$Adjusted","ExtensionProperties","Key","Value","IntegerValue","BasePrice","AdjustedPrice","CustomerContextualPrice","Price","Math","max","TradeAgreementPrice","exception","debug","getPriceForProductSearchResultDataAction","ProductDefaultVariantInput","productId","toString","createProductDefaultVariantInput","selectedId","getSelectedProductIdFromActionInput","Array","isArray","getProductDefaultVariantAction","getProductDefaultVariantsAsync","then","response","isBatched","GetProductWarrantiesByCartInput","createProductWarrantiesByCartInput","getProductWarrntiesByCartAction","productWarrantiesInput","cartProduct","ProductWarrantiesInput","getProductWarrantiesAction","createProductWarrantiesInput","productDefaultVariantInputs","defaultProductMasterIds","defaultVariantIds","MasterId","DefaultProductId","missingInputIds","filter","includes","allProductIds","Set","getProductWarrantiesAsync","GetProductWarrantyIconInput","Msdyn365","getWarrantyIconsAsync","ProductInput","warehouseId","generateCacheKey","key","value","createSimpleProductsInput","config","split","getSimpleProductsAction","inputs","productIdMapping","index","getProductPromises","catalogIds","_ctx$requestContext","_inputs$0$warehouseId","productInputs","queryResult","app","platform","defaultPageSizeForAPI","getByIdsAsync","mappedProducts","flatten","newImageUrl","trimDimensionsFromProductImageUrl","generateMmxProductImageUrl","generateProductImageUrl","PrimaryImageUrl","_unused","reduce","memo","ProductQuantityStateInput","ProductQuantityStateAction","ProductWarrantyStateInput","productWarrantyStateAction","SearchClearanceLinesInput","_this$searchCriteria$","_this$searchCriteria$2","_this$searchCriteria$3","_this$queryResultSett","_this$queryResultSett2","ProductIds","sort","id1","id2","join","ItemIds","LocationIds","createInput","searchAvailableClearanceLines","_input$queryResultSet","_paging$Skip","_paging$Top","paging","searchAvailableClearanceLinesAsync","BaseStoreSelectorStateManager","listMapViewState","displayList","displayMap","preferredStoreLocalStorageKey","isMapModuleLoaded","_readFromToCookie","storeInfo","parse","preferredStore","_context","storeId","selectedStoreLocationId","storeName","writeToCookie","StoreId","StoreName","Latitude","Longitude","_writeToCookie","latitude","longitude","lastInlineShownStoreInfo","_removeCookie","MsDyn365","isBrowser","window","localStorage","removeItem","setItem","cookieValue","getItem","__decorate","computed","observable","MapStoreSelectorStateManager","SERVICE_ENDPOINT","MAP_API_ENDPOINT","searchTerm","actionContext","BingMapsApiKey","BingMapsEnabled","searchContent","jsonp","crypto","getRandomValues","Uint32Array","ChannelCountryRegionISOCode","trim","query","encodeURI","geolocationApiUrl","requestUrl","script","document","createElement","setAttribute","remove","resourceSets","resources","point","coordinates","body","appendChild","_document","StringExtensions","isNullOrEmpty","getElementById","url","lang","market","reject","_document2","_document3","type","defer","src","mapAPIReady","isMapApiLoaded","addEventListener","setPickupLocationForProduct","quantity","onLocationSelected","storeSelectorId","modalCloseButtonReference","storeSelectorStateManager","storeSelectorStateDataAction","GenericInput","message","getDeliveryOptionsForSelectedVariant","GetDeliveryOptionsForSelectedVariantInput","locations","getOrgUnitLocationsByArea","GetOrgUnitLocationsByAreaInput","_product$Behavior","_locations$0$OrgUnitA","openDialog","parentElementRef","additionalProperties","amountSelected","isStockedProuct","Behavior","IsStockedProduct","warning","OrgUnitAvailability","OrgUnitLocation","defaultDeliveryOption","urlTokens","pageType","itemId","fullImagePath","imageUrl","test","imageComponents","decodeURIComponent","imageUrlRebuilt","baseImageUrl","encodeURIComponent","binding","modules","dataActions","registerActionId","actionPath","default","prototype","Object","keys","forEach","exportName","Action","require","__bindings__","_objectSpread","packageDataActions","module","exports","React","ReactDOM"],"sourceRoot":""}