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3B,MAAM,GACF7E,EAAE,mBACFkZ,EAAkB,WAClBG,EACAzG,WAAW,kBAAE2G,EAAiB,sBAAEC,GAAuB,mBACvDJ,EAAkB,cAClBD,GACAtU,EAEJ,IAAKvE,EAAAA,gBAAgBC,YAAY8Y,GAC7B,OAGJ,MAAM2W,EAAU,GAAGhwB,UACbuE,EAAY,sBAClB,MAAO,CACHgjB,wBAAyB,CACrBhjB,UAAW,uBAEfijB,iBACIljB,IAAAA,cAAAA,IAAAA,SAAA,KACIA,IAAAA,cAAA,QAAMC,UAAU,uBAChBD,IAAAA,cAAA,gBAAQO,EAAM+N,UAAU0G,yBAGhCmO,oBACInjB,IAAAA,cAAA,KAAGC,UAAU,2BAA2B0rB,SAAU,EAAGC,KAAK,OAAO1D,QAASrT,GACrE,IACAI,EAAiB,IAAG,KAG7BmO,gBACIpjB,IAAAA,cAAC6rB,EAAAA,MAAK,CAACxV,OAAQzB,EAAoB3U,UAAW,GAAGA,IAAa6rB,OAAQhX,GAClE9U,IAAAA,cAAC+rB,EAAAA,YAAW,CAAC9rB,UAAW,GAAGA,oBAA6B6rB,OAAQhX,GAC5D9U,IAAAA,cAAA,MAAItE,GAAIgwB,EAASzrB,UAAU,mCACtBiV,IAGTlV,IAAAA,cAACgsB,EAAAA,UAAS,CAAC/rB,UAAW,GAAGA,mBACrBD,IAAAA,cAAA,UACK+U,EAAW3T,KAAI6qB,IAAa,IAAAC,EACzB,OACIlsB,IAAAA,cAAA,MAAIC,UAAU,iCAAiC6I,IAAKmjB,EAAWhtB,QACtC,QAD4CitB,EAChED,EAAWE,iBAAS,IAAAD,OAAA,EAApBA,EAAsBE,UAAS,IAAG,UAMvDpsB,IAAAA,cAACqsB,EAAAA,YAAW,CAACpsB,UAAW,GAAGA","sources":["webpack://Msdyn365.Commerce.Online/../../src/search-org-unit-locations.ts?d18d","webpack://Msdyn365.Commerce.Online/./src/Common/get-product.ts?0a21","webpack://Msdyn365.Commerce.Online/./src/validate-cart.ts?cd50","webpack://Msdyn365.Commerce.Online/./src/invoice-summary-lineitem.tsx?5f61","webpack://Msdyn365.Commerce.Online/./src/order-summary-lineitem.tsx?8a98","webpack://Msdyn365.Commerce.Online/./src/modules/cart/actions/get-pickup-options-for-cartlines.ts?acad","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-groups.tsx?f076","webpack://Msdyn365.Commerce.Online/./src/modules/cart/utils/get-promotion-in-cart.ts?4195","webpack://Msdyn365.Commerce.Online/./src/modules/cart/cart.tsx?d4e4","webpack://Msdyn365.Commerce.Online/./src/modules/cart/cart.view.tsx?d8c2","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-items.tsx?f6b2","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-pick-up-in-store.tsx?dca8","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-items-promotion.tsx?80d9"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IAny,\n IActionContext,\n IActionInput,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { searchOrgUnitLocationsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/OrgUnitsDataActions.g';\n\n/**\n * Input for search-org-unit-locations data action.\n */\nexport class SearchOrgUnitLocationsInput implements IActionInput {\n public getCacheKey = () => 'SearchOrgUnitLocations';\n\n public getCacheObjectType = () => 'SearchOrgUnitLocations';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * Creates the input required to make the retail api call.\n * @param inputData -- Input data.\n * @returns -- IActionInput.\n */\nexport const createSearchOrgUnitLocationsInputFunc = (inputData: ICreateActionContext>): IActionInput => {\n return new SearchOrgUnitLocationsInput();\n};\n\n/**\n * Calls the Retail API and returns all the orgUnitLocations as array.\n * @param input - Input.\n * @param ctx - Context.\n * @returns - orgUnitLocations.\n */\nexport async function getSearchOrgUnitLocationsAction(\n input: SearchOrgUnitLocationsInput,\n context: IActionContext\n): Promise {\n const OrgUnitLocations = await searchOrgUnitLocationsAsync(\n {\n callerContext: context\n },\n {}\n );\n\n return OrgUnitLocations;\n}\n\nexport const retailActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/search-org-unit-locations',\n action: >getSearchOrgUnitLocationsAction,\n input: createSearchOrgUnitLocationsInputFunc\n});\n\nexport default retailActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Find the product in array of products considering product id.\n * @param productId - The searched product id.\n * @param products - The array of products in which search is executed.\n * @returns - The found product.\n */\nexport function getProductByProductId(productId: number | undefined, products?: SimpleProduct[]): SimpleProduct | undefined {\n if (productId !== undefined && ArrayExtensions.hasElements(products)) {\n return products.find(product => {\n return productId === product.RecordId;\n });\n }\n\n return undefined;\n}\n\n/**\n * Find the product in array of products considering product id and product behavior's warehouse.\n * @param productId - The searched product id.\n * @param products - The array of products in which search is executed.\n * @param warehouseId - Warehouse id of cartLine.\n * @param cartState - The cart start in case cart line has no warehouse.\n * @returns - The found product.\n */\nexport function getProductByProductIdAndWarehouse(\n productId: number | undefined,\n products?: SimpleProduct[],\n warehouseId?: string,\n cartState?: ICartState\n): SimpleProduct | undefined {\n const targetWarehouseValue = warehouseId ?? cartState?.cart.WarehouseId;\n\n if (productId !== undefined && ArrayExtensions.hasElements(products)) {\n return products.find(product => {\n return productId === product.RecordId && product.Behavior?.InventoryLocationId === targetWarehouseValue;\n });\n }\n\n return undefined;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport {\n AsyncResult,\n CartLine,\n CartLineValidationResults,\n CartLineValidationResultsByLineId,\n CartsDataActions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\n\nimport { ITelemetry } from '@msdyn365-commerce/telemetry-internal';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Validate the cart.\n * @param isQuantityLimitsFeatureEnabled -- Is the quantity limits feature enabled.\n * @param cart -- The cart state to validate.\n * @param telemetry -- The telemetry.\n * @param propsContext -- The props context.\n * @param shouldRetry -- Should retry.\n * @returns A list of line data validation failures.\n */\nexport async function validateCartAsync(\n cart: AsyncResult,\n telemetry: ITelemetry,\n propsContext: ICoreContext,\n shouldRetry: boolean = true\n): Promise {\n let cartResult: ICartState;\n let cartVersion: number | undefined;\n try {\n cartResult = await cart;\n cartVersion = cartResult.cart.Version;\n } catch (error) {\n telemetry.warning(error);\n telemetry.debug('Unable to get cart or cart version.');\n return AsyncResult.resolve();\n }\n\n if (cartVersion) {\n try {\n const validationResult: CartLineValidationResults = await CartsDataActions.validateForCheckoutAsync(\n { callerContext: propsContext.actionContext, bypassCache: 'none' },\n cartResult.cart.Id,\n cartVersion\n );\n\n return await AsyncResult.resolve(validationResult.ValidationResultsByLineId ?? undefined);\n } catch (error) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- error type is not defined.\n if (shouldRetry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n try {\n await cartResult.refreshCart({});\n } catch (refreshError) {\n telemetry.warning(refreshError);\n telemetry.debug('Unable to refresh Cart');\n return AsyncResult.resolve();\n }\n try {\n await validateCartAsync(cart, telemetry, propsContext, false);\n return AsyncResult.resolve();\n } catch (validateError) {\n telemetry.warning(validateError);\n telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n }\n\n telemetry.warning(error);\n telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n } else {\n telemetry.warning('Cart version not found for Cart validation request.');\n return AsyncResult.resolve();\n }\n}\n\n/**\n * Check if cart line quantity update is success.\n * @param isQuantityLimitsFeatureEnabled -- Is quantity limits feature enabled.\n * @param cartResult -- The cart result.\n * @param telemetry -- The telemetry.\n * @param products -- The products.\n * @param cartLineToUpdate -- The cart line to update.\n * @param quantity -- The quantity.\n * @returns Boolean to indicate if the cart line quantity is updated.\n */\nexport async function isCartLineQuantityUpdatedAsync(\n isQuantityLimitsFeatureEnabled: boolean | undefined,\n cartResult: ICartState | undefined,\n telemetry: ITelemetry,\n products: SimpleProduct[] | undefined,\n cartLineToUpdate: CartLine,\n quantity: number\n): Promise {\n if (cartResult) {\n let isUsingDefaultOrderSettingsMax: boolean = false;\n if (ArrayExtensions.hasElements(products) && isQuantityLimitsFeatureEnabled) {\n const modifiedProduct: SimpleProduct | undefined = products.find(\n (product: SimpleProduct) => product.RecordId === cartLineToUpdate.ProductId\n );\n isUsingDefaultOrderSettingsMax = !!modifiedProduct && !!modifiedProduct.Behavior?.MaximumQuantity;\n } else {\n isUsingDefaultOrderSettingsMax = false;\n }\n\n const input = {\n cartLineId: cartLineToUpdate.LineId!.toString(),\n newQuantity: quantity,\n additionalProperties: { isUsingDefaultOrderSettingsMax }\n };\n\n try {\n const updateLineResult: ICartActionResult = await cartResult.updateCartLineQuantity(input);\n return await AsyncResult.resolve(updateLineResult.status === 'SUCCESS');\n } catch (error) {\n telemetry.warning((error as Error).message);\n telemetry.debug('Unable to update Cart Line quantity');\n }\n }\n\n return AsyncResult.resolve(false);\n}\n\n/**\n * Update cart line with cart action result.\n * @param isQuantityLimitsFeatureEnabled -- Is quantity limits feature enabled.\n * @param cartResult -- The cart result.\n * @param telemetry -- The telemetry.\n * @param products -- The products.\n * @param cartLineToUpdate -- The cart line to update.\n * @param quantity -- The quantity.\n * @returns Boolean to indicate if the cart line quantity is updated.\n */\nexport async function cartLineQuantityUpdatedAsync(\n isQuantityLimitsFeatureEnabled: boolean | undefined,\n cartResult: ICartState | undefined,\n telemetry: ITelemetry,\n products: SimpleProduct[] | undefined,\n cartLineToUpdate: CartLine,\n quantity: number\n): Promise {\n if (cartResult) {\n let isUsingDefaultOrderSettingsMax: boolean = false;\n if (ArrayExtensions.hasElements(products) && isQuantityLimitsFeatureEnabled) {\n const modifiedProduct: SimpleProduct | undefined = products.find(\n (product: SimpleProduct) => product.RecordId === cartLineToUpdate.ProductId\n );\n isUsingDefaultOrderSettingsMax = !!modifiedProduct && !!modifiedProduct.Behavior?.MaximumQuantity;\n } else {\n isUsingDefaultOrderSettingsMax = false;\n }\n\n const input = {\n cartLineId: cartLineToUpdate.LineId!.toString(),\n newQuantity: quantity,\n additionalProperties: { isUsingDefaultOrderSettingsMax }\n };\n\n try {\n const updateLineResult: ICartActionResult = await cartResult.updateCartLineQuantity(input);\n return await AsyncResult.resolve(updateLineResult);\n } catch (error) {\n telemetry.warning((error as Error).message);\n telemetry.debug('Unable to update Cart Line quantity');\n }\n }\n\n return AsyncResult.resolve();\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, CartLine } from '@msdyn365-commerce/retail-proxy';\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IInvoiceSummaryProps {\n orderTotalLabel: string;\n invoiceLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n id: string;\n typeName: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n}\n\nexport interface IInvoiceSummaryLines {\n orderTotal: React.ReactNode;\n invoices: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n}\n\ninterface IInvoiceSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n}\n\nconst InvoiceSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel\n}) => {\n return (\n

\n {label}\n {price || price === 0 ? (\n \n ) : (\n {toBeCalculatedText}\n )}\n

\n );\n};\n\nconst _buildPaymentSummarySection = (\n props: IInvoiceSummaryProps,\n price: number | undefined,\n label: string,\n cssLabel: string\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nexport const InvoiceSummary = (props: IInvoiceSummaryProps) => {\n const { TotalAmount, CartLines } = props.cart;\n const invoiceLines = CartLines?.filter(cartLine => cartLine.IsInvoiceLine);\n const reactNodes: IInvoiceSummaryLines = {\n invoices: invoiceLines?.map((invoiceLine: CartLine) => {\n return _buildPaymentSummarySection(\n props,\n invoiceLine.InvoiceAmount,\n format(props.invoiceLabel, invoiceLine.InvoiceId),\n 'invoice'\n );\n }),\n orderTotal: _buildPaymentSummarySection(props, TotalAmount, props.orderTotalLabel, 'total')\n };\n\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildPaymentSummarySection(props, -loyaltyAmount, props.loyaltyLabel || 'Loyalty amount', 'loyalty');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildPaymentSummarySection(\n props,\n -giftCardAmount,\n props.giftcardLabel || 'Gift card amount',\n 'gift-card'\n );\n }\n\n reactNodes.orderTotal = _buildPaymentSummarySection(\n { ...props, freeText: undefined },\n totalAmountAfterGiftCard,\n props.orderTotalLabel,\n 'total'\n );\n }\n\n return reactNodes;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, ChannelConfiguration, ChannelDeliveryOptionConfiguration } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport interface IOrderSummaryProps {\n subTotalLabel: string;\n shippingLabel: string;\n taxLabel: string;\n orderTotalLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n totalDiscountsLabel: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n channelConfiguration: ChannelConfiguration;\n id: string;\n typeName: string;\n otherChargeLabel?: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n retailMultiplePickUpOptionEnabled?: boolean;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n isTaxIncludedInPrice?: boolean;\n isShowTaxBreakup?: boolean;\n customerAccountLabel?: string;\n}\n\nexport interface IOrderSummaryLines {\n subtotal: React.ReactNode;\n shipping?: React.ReactNode;\n otherCharge?: React.ReactNode;\n tax: React.ReactNode;\n orderTotal: React.ReactNode;\n totalDiscounts?: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n customerAccount?: React.ReactNode;\n}\n\ninterface IOrderSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n priceCurrency?: string;\n}\n\ninterface IShippingOrderLine {\n cart: Cart;\n channelConfiguration: ChannelConfiguration;\n canShip?: boolean;\n hasDeliveryMethod?: boolean;\n hasShippingMethod?: boolean;\n freightFee?: number;\n}\n\nconst OrderSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel,\n priceCurrency\n}) => {\n return (\n

\n {label}\n {price || price === 0 ? (\n \n ) : (\n {toBeCalculatedText}\n )}\n

\n );\n};\n\nconst _buildOrderSummarySection = (\n props: IOrderSummaryProps,\n price: number | undefined,\n cssLabel: string,\n label: string = ''\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computedCustomerAccountAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.customerAccountAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nconst getDeliveryConfiguration = (\n cart: Cart,\n channelConfiguration: ChannelConfiguration,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n retailMultiplePickUpOptionEnabled?: boolean,\n isTaxIncludedInPrice?: boolean,\n isShowTaxBreakup?: boolean\n): IShippingOrderLine => {\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\n const cartLines = cart.CartLines || [];\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\n const taxOnShippingCharge = cart.TaxOnShippingCharge !== undefined ? cart.TaxOnShippingCharge : 0;\n const shippingChargeAmount = cart.ShippingChargeAmount !== undefined ? cart.ShippingChargeAmount : 0;\n\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True shippingChargeAmount\n // True True shippingChargeAmount\n // True false shippingChargeAmount + taxOnShippingCharge\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n let freightFee: number | undefined = 0;\n if (isTaxIncludedInPrice === undefined || isShowTaxBreakup === undefined) {\n freightFee = cart.ShippingChargeAmount;\n } else {\n freightFee = isTaxIncludedInPrice && !isShowTaxBreakup ? shippingChargeAmount + taxOnShippingCharge : cart.ShippingChargeAmount;\n }\n const canShip = deliveryModes.some(\n deliveryMode =>\n !(\n deliveryMode !== '' &&\n (deliveryMode ===\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) ||\n deliveryMode === emailDeliveryModeCode)\n )\n );\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\n const hasShippingMethod = deliveryModes.some(\n deliveryMode =>\n !!deliveryMode &&\n deliveryMode !==\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) &&\n deliveryMode !== emailDeliveryModeCode\n );\n return {\n canShip,\n hasDeliveryMethod,\n hasShippingMethod,\n freightFee\n } as IShippingOrderLine;\n};\n\nconst getDeliveryMode = (\n deliveryMode?: string,\n featureSate: boolean = false,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n pickupDeliveryMode?: string\n) => {\n if (!featureSate) {\n return pickupDeliveryMode;\n }\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\n};\n\n// eslint-disable-next-line complexity\nexport const OrderSummary = (props: IOrderSummaryProps) => {\n const {\n SubtotalAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n SubtotalAmountWithoutTax,\n TaxAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n TaxOnNonShippingCharges,\n DiscountAmount = 0,\n TotalAmount,\n OtherChargeAmount\n } = props.cart;\n\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(\n props.cart,\n props.channelConfiguration,\n props.channelDeliveryOptionConfig,\n props.retailMultiplePickUpOptionEnabled,\n props.isTaxIncludedInPrice,\n props.isShowTaxBreakup\n );\n\n let reactNodes: IOrderSummaryLines;\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n if (props.isTaxIncludedInPrice === undefined || props.isShowTaxBreakup === undefined) {\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, SubtotalAmount, 'sub-total', props.subTotalLabel),\n tax: _buildOrderSummarySection(props, hasDeliveryMethod ? TaxAmount : undefined, 'tax-amount', props.taxLabel),\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, OtherChargeAmount, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n } else {\n const otherChargeAmount = OtherChargeAmount !== undefined ? OtherChargeAmount : 0;\n const taxOnNonShippingCharges = TaxOnNonShippingCharges !== undefined ? TaxOnNonShippingCharges : 0;\n const isTaxGreaterThanZero = TaxAmount !== undefined && TaxAmount > 0;\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True otherChargeAmount\n // True True otherChargeAmount\n // True false otherChargeAmount+TaxOnNonShippingCharges\n\n const otherChargeAmountTotal =\n props.isTaxIncludedInPrice && !props.isShowTaxBreakup ? otherChargeAmount + taxOnNonShippingCharges : otherChargeAmount;\n\n const subtotalAmountActual = props.isTaxIncludedInPrice && props.isShowTaxBreakup ? SubtotalAmountWithoutTax : SubtotalAmount;\n\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, subtotalAmountActual, 'sub-total', props.subTotalLabel),\n tax: props.isShowTaxBreakup\n ? _buildOrderSummarySection(\n props,\n hasDeliveryMethod || isTaxGreaterThanZero ? TaxAmount : undefined,\n 'tax-amount',\n props.taxLabel\n )\n : '',\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, otherChargeAmountTotal, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n }\n if (canShip) {\n reactNodes.shipping = _buildOrderSummarySection(props, hasShippingMethod ? freightFee : undefined, 'shipping', props.shippingLabel);\n }\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const customerAccountAmount = _computedCustomerAccountAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount - customerAccountAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\n }\n\n if (customerAccountAmount > 0) {\n reactNodes.customerAccount = _buildOrderSummarySection(\n props,\n -customerAccountAmount,\n 'customer-credit-amount',\n props.customerAccountLabel || 'Customer Credit amount'\n );\n }\n\n reactNodes.orderTotal = _buildOrderSummarySection(\n { ...props, freeText: undefined },\n totalAmountAfterGiftCard,\n 'total',\n props.orderTotalLabel\n );\n }\n\n if (DiscountAmount > 0) {\n reactNodes.totalDiscounts = _buildOrderSummarySection(props, -DiscountAmount, 'total-discounts', props.totalDiscountsLabel);\n }\n\n return reactNodes;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { ProductDeliveryOptions, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n ActiveCartProductsInput,\n QueryResultSettingsProxy,\n buildCacheKey,\n getActiveCartProductsAction\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for pickup delivery options for items in cart.\n */\nexport class ProductPickUpOptionsForCartLineItems implements IActionInput {\n public readonly apiSettings: ICommerceApiSettings;\n\n public constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => buildCacheKey('ActiveCartLineItemsPickUpOptions', this.apiSettings);\n\n /**\n * Get Cachetype Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'ActiveCartLineItemsPickUpOptions';\n\n /**\n * Get Cachetype.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'none';\n}\n\n/**\n * CreateInput method for the GetPickUpOptionCartLineItems method.\n * @param inputData - The input data passed to the createInput method.\n * @returns - Input for data action.\n */\nconst createInput = (inputData: ICreateActionContext>) => {\n return new ProductPickUpOptionsForCartLineItems(inputData.requestContext.apiSettings);\n};\n\n/**\n * The action method for the GetPickUpOptionCartLineItems data action.\n * @param input - The action input.\n * @param context - The action context.\n * @returns - Order Template object.\n */\nexport async function getPickUpOptionsForCartLineItems(\n input: ProductPickUpOptionsForCartLineItems,\n context: IActionContext\n): Promise {\n // If no input is provided fail out\n if (!input.apiSettings.channelId) {\n throw new Error('[getPickUpOptionsForCartLineItems]No valid Input was provided, failing');\n }\n const cartState = await getCartState(context);\n const cart = cartState.cart;\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), context);\n const filterOption = 4;\n const response: ProductDeliveryOptions[] = [];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- existing code.\n if (cart === undefined || !ArrayExtensions.hasElements(products)) {\n return Promise.resolve(response);\n }\n\n const pickupoptions = await ProductsDataActions.getDeliveryOptionsAsync(\n {\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n },\n products.map(product => product.RecordId),\n {},\n filterOption\n );\n\n return pickupoptions;\n}\n\n/**\n * The GetPickupOptionCartLineItems Data Action\n * Returns pickup options.\n */\nexport const getPickUpOptionsForCartLineItemsDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-pickup-options-for-cartlines',\n action: getPickUpOptionsForCartLineItems as IAction,\n input: createInput\n});\n\nexport default getPickUpOptionsForCartLineItemsDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport groupBy from 'lodash/groupBy';\n\nimport { assembleCartlines, ICartLineItemsProps, ICartlinesViewProps } from './cart-line-items';\n\nconst _assembleGroupCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[][] | null => {\n const reactNodes: ICartlinesViewProps[][] = [];\n if (!products || products.length === 0) {\n props.context.telemetry.error('Products content is empty, module wont render');\n return null;\n }\n\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\n const groupDelivery = getGroupByDelivery(cartlines);\n const cartLinesGroup: CartLine[] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryType, groupByDeliveryType]) => {\n // @ts-expect-error\n groupDelivery[deliveryType] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n // 2) Create cartlines group\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n const carLineViewProps = assembleCartlines(cartLine, products, props);\n if (carLineViewProps !== null) {\n reactNodes.push(carLineViewProps);\n }\n });\n });\n\n return reactNodes;\n};\n\nconst _assembleGroupInvoiceCartlines = (\n cartLines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[][] | null => {\n const reactNodes: ICartlinesViewProps[][] = [];\n if (cartLines && cartLines.length > 0) {\n // Create invoice cartLines group\n const carLineViewProps = assembleCartlines(cartLines, products, props);\n if (carLineViewProps !== null) {\n reactNodes.push(carLineViewProps);\n }\n }\n return reactNodes;\n};\n\n/**\n * CartLine Group component.\n * @param props\n */\nexport const CartLineGroupItems = (props: ICartLineItemsProps) => {\n const { products, cartlines, hasInvoiceLine } = props;\n return hasInvoiceLine\n ? _assembleGroupInvoiceCartlines(cartlines, products, props)\n : _assembleGroupCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\nimport { getPromotionOptionsForCartLineItems, PromotionOptionsForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * IPromotionData entity interface.\n */\nexport interface IPromotionData {\n promotionOptions?: CartPromotionLine[];\n}\n\n/**\n * Calls the Retail API and returns a promotion data.\n * @param ctx\n */\nexport async function getPromotionData(ctx: IActionContext): Promise {\n const promotionData: IPromotionData = {};\n\n await getPromotionOptionsForCartLineItems(new PromotionOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(promotionOptions => {\n if (promotionOptions) {\n promotionData.promotionOptions = promotionOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n return {};\n });\n\n return promotionData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n ILinesAddedToOrderTemplateDialogResources,\n IOrderTemplateNameDialogResources,\n IWishlistActionSuccessResult,\n PromoCodeComponent,\n SaveCartToOrderTemplateComponent\n} from '@msdyn365-commerce/components';\nimport MsDyn365, { getCatalogId, getUrlSync, IImageSettings, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, CartLine, CartLineValidationResultsByLineId, LineValidationResult } from '@msdyn365-commerce/retail-proxy';\nimport { FeatureState, ProductDeliveryOptions, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { cartLineQuantityUpdatedAsync, validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport {\n ActiveCartProductsInput,\n ArrayExtensions,\n getActiveCartProductsAction,\n ICartLineInventoryValidationResult,\n ObjectExtensions,\n validateCartLinesInventory,\n ProductPickUpOptionsForCartLineItems,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant,\n Waiting,\n updateMaxQuantityForCartLineItem,\n urlCheck\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport React from 'react';\nimport { getPickUpOptionsForCartLineItems } from './actions/get-pickup-options-for-cartlines';\n\nimport { ICartData } from './cart.data';\nimport { ICartProps, ICartResources } from './cart.props.autogenerated';\nimport { CartLineGroupItems } from './components/cart-line-groups';\nimport { CartLineItems, ICartlinesViewProps } from './components/cart-line-items';\nimport { cartPromotions, ICartLineItemViewProps } from './components/cart-line-items-promotion';\nimport { getPromotionData, IPromotionData } from './utils/get-promotion-in-cart';\n\n/**\n * Cart view props interface.\n */\nexport interface ICartViewProps extends ICartProps {\n className: string;\n title?: React.ReactNode;\n CartlinesWrapper: INodeProps;\n cartlines?: ICartlinesViewProps[];\n cartLinesGroup?: ICartlinesViewProps[][];\n cart: ICartState | undefined;\n orderSummaryHeading: React.ReactNode;\n orderSummaryLineitems?: IOrderSummaryLines;\n invoiceSummaryLineitems?: IInvoiceSummaryLines;\n OrderSummaryWrapper: INodeProps;\n OrderSummaryItems: INodeProps;\n OrderSummaryErrors?: IOrderSummaryErrors;\n checkoutAsGuestButton: React.ReactNode;\n checkoutAsSignInUserButton: React.ReactNode;\n storeSelector?: React.ReactNode;\n expressCheckoutButton?: React.ReactNode[];\n ExpressCheckoutSectionWrapper: INodeProps;\n backToShoppingButton: React.ReactNode;\n waitingComponent: React.ReactNode;\n promotionOptions?: ICartLineItemViewProps;\n promoCode: React.ReactNode;\n cartLoadingStatus: string;\n cartDataResult: boolean;\n multiplePickUpEnabled?: boolean;\n createTemplateFromCartButton: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n}\n\n/**\n * Order summary errors interface.\n */\nexport interface IOrderSummaryErrors {\n Wrapper: INodeProps;\n header: React.ReactNode;\n errors: React.ReactNode[];\n}\n\n/**\n * Cart component state interface.\n */\ninterface ICartComponentState {\n showPromotionDialog: boolean;\n cartlinesErrors: CartLineValidationResultsByLineId;\n promotionData: IPromotionData;\n isCartValid: boolean;\n productPickUpOptions?: ProductDeliveryOptions[];\n}\n\n/**\n * Cart component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Cart extends React.Component> {\n public state: ICartComponentState;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n private isQuantityLimitsFeatureEnabled: boolean = false;\n\n private _isMounted: boolean = false;\n\n private readonly promotionPopupId: string = 'cart-promotion-popup';\n\n public constructor(props: ICartProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this.promotionLinkClick = this.promotionLinkClick.bind(this);\n this.promotionCloseButtonclick = this.promotionCloseButtonclick.bind(this);\n\n this.state = {\n showPromotionDialog: false,\n promotionData: {},\n isCartValid: true,\n productPickUpOptions: undefined,\n cartlinesErrors: {}\n };\n }\n\n /**\n * Component did mount function.\n */\n public async componentDidMount(): Promise {\n this._isMounted = true;\n const {\n config,\n context: { actionContext }\n } = this.props;\n\n this.isQuantityLimitsFeatureEnabled =\n (await this.getOrderQuantityLimitsFeatureFlag()) || (await this._isChannelLimitsFeatureEnabled());\n if (this.isQuantityLimitsFeatureEnabled) {\n await this.validateCart();\n }\n\n if (config.showAvailablePromotions) {\n if (this._isMounted && this.props.data.cart.result?.cart.CartLines) {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n if (this._isMounted) {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n }\n );\n }\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n if (this._isMounted) {\n const input = new ProductPickUpOptionsForCartLineItems(actionContext.requestContext.apiSettings);\n this.setState({ productPickUpOptions: await getPickUpOptionsForCartLineItems(input, actionContext) });\n }\n }\n );\n }\n\n /**\n * Component will unmount function.\n */\n public componentWillUnmount(): void {\n this._isMounted = false;\n }\n\n /**\n * Should component update function.\n * @param nextProps - Next props.\n * @param nextState - Next state.\n * @returns True if component should update, false otherwise.\n */\n public shouldComponentUpdate(nextProps: ICartProps, nextState: ICartComponentState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n /* eslint-disable complexity -- Disabling complexity for render method */\n public render(): JSX.Element | null {\n const {\n data: {\n cart: { result: cart },\n products: { result: products }\n },\n context: {\n request: {\n user: { isAuthenticated, signInUrl }\n }\n },\n resources\n } = this.props;\n\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\n const checkoutURL = this.getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\n const cartLines = this._getCartLines();\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n const validInventoryAcrossCartLines = validateCartLinesInventory(\n cart?.cart.CartLines ?? [],\n this.props.data.productAvailabilites.result ?? [],\n this.props.context.actionContext,\n products ?? [],\n emailDeliveryModeCode\n );\n\n const hasError =\n !validInventoryAcrossCartLines?.isValid ||\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\n const { featureState } = this.props.data;\n const isMultipleCatalogsFeatureEnabled =\n featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\n const currentCatalogId = getCatalogId(this.props.context.request);\n validateCatalogId(currentCatalogId);\n const cartLinesGroup = cart?.hasInvoiceLine || multiplePickUpEnabled ? this.getCartLinesGroup() : null;\n this.payLoad.contentAction.etext = TelemetryConstant.Checkout;\n const checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.GuestCheckout;\n const checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.BackToShopping;\n const backtoShoppingAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n\n // If there's inventory issues across multiple cart lines then update the error and display as part of the order summary\n if (validInventoryAcrossCartLines && !validInventoryAcrossCartLines.isValid) {\n if (multiplePickUpEnabled && cartLinesGroup !== null) {\n for (const cartLineGroup of cartLinesGroup) {\n this._updateCartLineErrorForInvalidInventory(cartLineGroup, validInventoryAcrossCartLines);\n }\n }\n\n this._updateCartLineErrorForInvalidInventory(cartLines, validInventoryAcrossCartLines);\n }\n\n const viewProps = {\n ...this.props,\n className: classnames('ms-cart'),\n title:

{resources.cartTitle}

,\n cart: this.props.data.cart.result,\n CartlinesWrapper: { className: 'msc-cartline-wraper' },\n OrderSummaryWrapper: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary-wrapper' : 'msc-order-summary-wrapper' },\n OrderSummaryItems: { className: cart?.hasInvoiceLine ? 'msc-invoice-summary__items' : 'msc-order-summary__items' },\n cartlines: cartLines,\n cartLinesGroup,\n promoCode: this._getPromoCode(),\n promotionOptions: this._getPromotions(),\n context: this.props.context,\n typeName: this.props.typeName,\n telemetry: this.props.telemetry,\n id: this.props.id,\n multiplePickUpEnabled,\n removePromoAriaLabelFormat: resources.removePromoAriaLabelFormat,\n orderSummaryHeading: ArrayExtensions.hasElements(cart?.cart.CartLines) ? (\n cart?.hasInvoiceLine ? (\n

{resources.invoiceSummaryTitle}

\n ) : (\n

{resources.orderSummaryTitle}

\n )\n ) : null,\n orderSummaryLineitems: this._getOrderSummaryLineItems(),\n invoiceSummaryLineitems: this._getInvoiceSummaryLineItems(),\n checkoutAsSignInUserButton: !isCartEmpty ? (\n \n {resources.checkoutButtonTitle}\n \n ) : null,\n checkoutAsGuestButton:\n !isCartEmpty && !isAuthenticated && this.props.config.showGuestCheckoutButton ? (\n \n {resources.guestCheckoutButtonTitle}\n \n ) : null,\n expressCheckoutButton: !isCartEmpty ? this.props.slots.paymentExpress : null,\n ExpressCheckoutSectionWrapper: { className: 'msc-express-payment-container-in-cart-page' },\n backToShoppingButton: (\n \n {resources.backToShoppingButtonTitle}\n \n ),\n createTemplateFromCartButton:\n this._displayAddCartToTemplate() && products ? (\n \n ) : null,\n checkoutBlockedDueToUnavailableFunds: null,\n storeSelector:\n this.props.slots.storeSelector && this.props.slots.storeSelector.length > 0 ? this.props.slots.storeSelector[0] : null,\n removeItemClickHandler: this.removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\n waitingComponent: ,\n cartLoadingStatus: this.props.data.cart.status === 'FAILED' ? this.props.resources.cartLoadingErrorMessage : null,\n cartDataResult: this.props.data.cart.result && this.props.data.cart.result.isEmpty,\n OrderSummaryErrors: this._getOrderSummaryErrors(cartLines),\n telemetryContent: this.telemetryContent\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n /* eslint-enable complexity -- Disabling complexity for render method */\n\n /**\n * Promotion click event handler.\n * @param event - The mouse event.\n */\n private readonly promotionLinkClick = (event: React.MouseEvent) => {\n this.setState({\n showPromotionDialog: !this.state.showPromotionDialog\n });\n };\n\n /**\n * Promotion close button click.\n */\n private readonly promotionCloseButtonclick = () => {\n this._hidePromotionDialog();\n };\n\n /**\n * Hide promotion dialog.\n */\n private _hidePromotionDialog(): void {\n this.setState({\n showPromotionDialog: false\n });\n }\n\n /**\n * Display add to cart template.\n * @returns True if should display, false otherwise.\n */\n private _displayAddCartToTemplate(): boolean {\n const cart = this.props.data.cart?.result;\n if (ObjectExtensions.isNullOrUndefined(cart) || cart.hasInvoiceLine) {\n return false;\n }\n\n if (\n isChannelTypeB2B(this.props.context.actionContext.requestContext) &&\n this.props.data.orderTemplates.result &&\n ArrayExtensions.hasElements(cart.cart?.CartLines) &&\n this.props.data.customerInformation.result\n ) {\n return true;\n }\n\n return false;\n }\n\n /**\n * Get promotions.\n * @returns React node with the promotions.\n */\n private _getPromotions(): React.ReactNode {\n return (\n this.props.config.showAvailablePromotions &&\n cartPromotions({\n id: this.promotionPopupId,\n showPromotionPopup: this.state.showPromotionDialog,\n onSeeAllClick: this.promotionLinkClick,\n onCloseButtonClick: this.promotionCloseButtonclick,\n promotions: this.state.promotionData.promotionOptions,\n resources: {\n promotionStringHeading: this.props.resources.promotionStringHeading,\n promotionLinkText: this.props.resources.promotionLinkText,\n promotionPopupHeading: this.props.resources.promotionPopupHeading,\n promotionCloseButtonAriaLabel: this.props.resources.promotionCloseButtonAriaLabel\n }\n })\n );\n }\n\n /**\n * Add error message in cart line in case the quantity exceeds the current inventory.\n * @param cartLines - The cart lines.\n * @param cartLineInventoryValidationResult - The cart line inventory result.\n */\n private _updateCartLineErrorForInvalidInventory(\n cartLines: ICartlinesViewProps[] | null,\n cartLineInventoryValidationResult: ICartLineInventoryValidationResult\n ) {\n const { resources } = this.props;\n\n if (\n ArrayExtensions.hasElements(cartLines) &&\n !cartLineInventoryValidationResult.isValid &&\n ArrayExtensions.hasElements(cartLineInventoryValidationResult.productIdWithErrors)\n ) {\n for (const productIdWithError of cartLineInventoryValidationResult.productIdWithErrors) {\n const cartLine = cartLines?.find(element => element.data?.cartline.ProductId === productIdWithError);\n if (cartLine) {\n cartLine.error = resources.outOfStockErrorMessage;\n cartLine.hasError = true;\n }\n }\n }\n }\n\n /**\n * Get order summary errors.\n * @param cartLines - The cart lines.\n * @returns Order summary errors.\n */\n private _getOrderSummaryErrors(cartLines: ICartlinesViewProps[] | null): IOrderSummaryErrors | undefined {\n const allErrors =\n (cartLines &&\n cartLines\n .map(cartline => {\n // Check if the product is service or not by product type\n const isServiceItem = cartline.data?.product?.ItemTypeValue === ReleasedProductType.Service;\n\n if (!isServiceItem && cartline.error) {\n const fullError =\n cartline.data && cartline.data.product?.Name\n ? `${cartline.data.product.Name}: ${cartline.error}`\n : cartline.error;\n\n return (\n
\n {fullError}\n
\n );\n }\n\n return null;\n })\n .filter((line): line is JSX.Element => !!line)) ||\n [];\n\n return {\n Wrapper: {\n tag: Alert,\n className: 'msc-alert',\n isOpen: allErrors.length > 0,\n color: 'danger',\n assertive: true,\n 'aria-label': this.props.resources.outOfStockErrorMessageHeader\n },\n header: (\n \n ),\n errors: allErrors\n };\n }\n\n /**\n * Gets invoice summary line items.\n * @returns Invoice summary lines.\n */\n private _getInvoiceSummaryLineItems(): IInvoiceSummaryLines | undefined {\n const {\n data: {\n cart: { result: cart }\n },\n telemetry,\n resources\n } = this.props;\n\n return cart?.hasInvoiceLine\n ? InvoiceSummary({\n orderTotalLabel: resources.totalAmountLabel,\n invoiceLabel: resources.invoiceLabel,\n cart: cart.cart,\n context: this.props.context,\n typeName: this.props.typeName,\n telemetry,\n id: this.props.id\n })\n : undefined;\n }\n\n /**\n * Gets order summary line items.\n * @returns Order summary lines.\n */\n private _getOrderSummaryLineItems(): IOrderSummaryLines | undefined {\n const {\n data: {\n cart: { result: cart },\n channelDeliveryOptionConfig\n },\n telemetry,\n resources\n } = this.props;\n\n const channelConfiguration = this.props.context && this.props.context.request && this.props.context.request.channel;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const featureState = this.props?.data?.featureState;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(item => item.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const isShowOrHideTaxEnabled = this.props.context.request.app.config?.isEnableShowOrHideSalesTaxECommerceEnabled === true;\n\n return channelConfiguration && ArrayExtensions.hasElements(cart?.cart.CartLines) && !cart?.hasInvoiceLine\n ? OrderSummary({\n cart: cart!.cart,\n subTotalLabel: resources.itemsWithCountLabel,\n shippingLabel: resources.estimatedShippingLabel,\n otherChargeLabel: resources.otherCharges,\n taxLabel: resources.estimatedTaxLabel,\n orderTotalLabel: resources.orderTotal,\n totalDiscountsLabel: resources.totalDiscountsLabel,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n toBeCalculatedText: resources.yetToBeCalculatedText,\n freeText: resources.priceFree,\n channelConfiguration,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\n telemetry,\n isTaxIncludedInPrice: cart!.cart.IsTaxIncludedInPrice,\n isShowTaxBreakup: isShowOrHideTaxEnabled\n })\n : undefined;\n }\n\n /**\n * Gets promo code.\n * @returns React node with the promo code.\n */\n private _getPromoCode(): React.ReactNode {\n const {\n data: {\n cart: { result: cart }\n },\n resources\n } = this.props;\n\n return (\n cart && (\n \n )\n );\n }\n\n /**\n * Generate add to order template dialog resources.\n * @param resources - The resources.\n * @returns IAddToOrderTemplateDialogResources.\n */\n private _generateAddToOrderTemplateDialogResources(resources: ICartResources): IAddToOrderTemplateDialogResources {\n return {\n addToOrderTemplateHeader: resources.addToOrderTemplateHeader,\n\n noOrderTemplatesMessage: resources.noOrderTemplatesMessage,\n noOrderTemplatesDescription: resources.noOrderTemplatesDescription,\n\n createAnOrderTemplateButtonText: resources.createAnOrderTemplateButtonText,\n createNewOrderTemplateButtonText: resources.createNewOrderTemplateButtonText,\n cancelOrderTemplateCreationButtonText: resources.cancelOrderTemplateCreationButtonText,\n\n selectTemplatesText: resources.selectTemplatesText,\n addToTemplateButtonText: resources.addToTemplateButtonText,\n lineItemsText: resources.lineItemsText\n };\n }\n\n /**\n * Generate item added to order template dialog resources.\n * @param resources - The resources.\n * @returns IItemAddedToOrderTemplateDialogResources.\n */\n private _generateItemAddedToOrderTemplateDialogResources(resources: ICartResources): IItemAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n itemAddedToOrderTemplateHeaderItemOneText: resources.itemAddedToOrderTemplateHeaderItemOneText,\n itemAddedToOrderTemplateHeaderItemFormatText: resources.itemAddedToOrderTemplateHeaderItemFormatText,\n itemAddedToOrderTemplateHeaderMessageText: resources.itemAddedToOrderTemplateHeaderMessageText,\n freePriceText: resources.freePriceText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText\n };\n }\n\n /**\n * Generate lines added to order template dialog resources.\n * @param resources - The resources.\n * @returns ILinesAddedToOrderTemplateDialogResources.\n */\n private _generateLinesAddedToOrderTemplateDialogResources(resources: ICartResources): ILinesAddedToOrderTemplateDialogResources {\n return {\n viewOrderTemplateButtonText: resources.viewOrderTemplateButtonText,\n continueShoppingButtonText: resources.continueShoppingButtonText,\n linesAddedToOrderTemplateHeaderItemsOneText: resources.linesAddedToOrderTemplateHeaderItemsOneText,\n linesAddedToOrderTemplateHeaderItemsFormatText: resources.linesAddedToOrderTemplateHeaderItemsFormatText,\n linesAddedToOrderTemplateHeaderLinesOneText: resources.linesAddedToOrderTemplateHeaderLinesOneText,\n linesAddedToOrderTemplateHeaderLinesFormatText: resources.linesAddedToOrderTemplateHeaderLinesFormatText,\n linesAddedToOrderTemplateHeaderMessageText: resources.linesAddedToOrderTemplateHeaderMessageText,\n linesAddedToOrderTemplateCustomPriceAlertMessageText: resources.linesAddedToOrderTemplateCustomPriceAlertMessageText\n };\n }\n\n /**\n * Generate duplicate items when adding to order template dialog resources.\n * @param resources - The resources.\n * @returns IDuplicateItemsWhenAddingToOrderTemplateDialogResources.\n */\n private _generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n resources: ICartResources\n ): IDuplicateItemsWhenAddingToOrderTemplateDialogResources {\n return {\n duplicatedProductsHeader: resources.duplicatedProductsHeader,\n duplicatedProductsDescription: resources.duplicatedProductsDescription,\n updateQuantityButtonText: resources.updateQuantityButtonText,\n cancelDuplicateItemsButtonText: resources.cancelDuplicateItemsButtonText\n };\n }\n\n /**\n * Generate order template name dialog resources.\n * @param resources - The resources.\n * @returns IOrderTemplateNameDialogResources.\n */\n private _generateOrderTemplateNameDialogResources(resources: ICartResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n }\n\n /**\n * Gets the cart lines view props.\n * @returns ICartlinesViewProps [].\n */\n private _getCartLines(): ICartlinesViewProps[] | null {\n const {\n data: {\n cart: { result: cart },\n wishlists: { result: wishlists },\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n },\n config,\n telemetry,\n resources,\n modules\n } = this.props;\n\n const imageSettings = this.getImageSettings(config.imageSettings);\n\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\n\n const cartlinesErrors: CartLineValidationResultsByLineId = this.state.cartlinesErrors;\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\n const isMultipleCatalogsFeatureEnabled =\n this.props.data.featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled ||\n false;\n return ArrayExtensions.hasElements(cart?.cart.CartLines)\n ? CartLineItems({\n cartlines: cart!.cart.CartLines,\n storeSelectorModuleId: storeSelectorId,\n cartlinesErrors,\n products: this.props.data.products.result,\n productAvailabilites: this.props.data.productAvailabilites.result,\n productDeliveryOptions: this.props.data.deliveryOptions.result,\n catalogs: this.props.data.catalogs?.result,\n imageSettings,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n retailMulitplePickupFeatureState: multiplePickUpEnabled,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n amountString: resources.productDimensionTypeAmount,\n quantityDisplayString: resources.quantityDisplayText,\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\n discountStringText: resources.discountStringText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n shippingChargesText: resources.shippingCharges,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n priceEditorResources: {\n ...resources\n }\n },\n telemetry,\n addToWishlistButtonText: resources.addToWishlistButtonText,\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\n removeButtonText: resources.removeCartButtonText,\n shipItText: resources.shipInsteadDisplayText,\n pickitUpText: resources.pickItUpDisplayText,\n changeStoreText: resources.changeStoreDisplayText,\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\n outOfStockText: resources.outOfStockErrorMessage,\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\n cartState: this.props.data.cart.result,\n orgUnitLocations: this.props.data.orgUnitLocations.result,\n removeItemClickHandler: this.removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\n updateCartLinesQuantitySuccessHandler: this.updateCartlineQuantity,\n locationChangedHandler: this.fulfillmentStoreIdUpdated,\n wishlists,\n defaultWishlistName: resources.defaultWishlistName,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n includeErrors: config.showOutOfStockErrors,\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\n telemetryContent: this.telemetryContent,\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\n\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n resources\n ),\n\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\n orderTemplates,\n customerInformation,\n productAvailability: this.props.data.productAvailabilites,\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogsFeatureEnabled || false\n })\n : null;\n }\n\n /**\n * Gets the checkout URL.\n * @param isAuthenticated - Is authenticated flag.\n * @param guestCheckoutUrl - Guest checkout URL.\n * @param signInUrl -The sign in URL.\n * @returns The checkout URL.\n */\n private getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\n if (isAuthenticated) {\n return guestCheckoutUrl;\n }\n\n const isAbsoluteUrl = urlCheck(guestCheckoutUrl);\n let returnURL = guestCheckoutUrl;\n if (MsDyn365.isBrowser && !isAbsoluteUrl) {\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\n }\n\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\n }\n\n /**\n * Gets the image settings.\n * @param imageSettings - Image settings.\n * @returns IImageSettings.\n */\n private readonly getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return (\n imageSettings || {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true\n }\n );\n };\n\n /**\n * Remove item from cart handler.\n * @param cartlineToRemove - The cart line to remove.\n */\n private readonly removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\n if (this.props.data.cart.result) {\n const input = {\n cartLineIds: [cartlineToRemove.LineId!.toString()]\n };\n this.props.data.cart.result\n .removeCartLines(input)\n .then(() => {\n this.validateCart().catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to Remove Cart Line');\n });\n }\n };\n\n /**\n * Move to wish list handler.\n * @param result - The wish list action success result.\n * @param cartline - The cart line.\n */\n private readonly moveToWishlistSuccessHandler = (result: IWishlistActionSuccessResult, cartline?: CartLine) => {\n if (result.status === 'ADDED' && cartline) {\n this.removeItemFromCartHandler(cartline);\n }\n };\n\n /**\n * Updates the cart line quantity.\n * @param cartlineToUpdate - The cart line.\n * @param quantity - The quantity.\n * @param lineIndex - The line index.\n * @returns True if the cart line was updated, false otherwise.\n */\n private readonly updateCartlineQuantity = (cartlineToUpdate: CartLine, quantity: number, lineIndex?: number): boolean => {\n cartLineQuantityUpdatedAsync(\n this.isQuantityLimitsFeatureEnabled,\n this.props.data.cart.result,\n this.props.telemetry,\n this.props.data.products.result,\n cartlineToUpdate,\n quantity\n )\n .then((cartActionResult: ICartActionResult | undefined): boolean => {\n if (cartActionResult?.status === 'SUCCESS') {\n this.validateCart().catch(error => {\n this.props.telemetry.warning((error as Error).message);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n this.setState({\n cartlinesErrors: {}\n });\n return true;\n }\n\n if (!ObjectExtensions.isNullOrUndefined(cartActionResult)) {\n // Show update line error message.\n const lineUpdateFailure: LineValidationResult = {\n LineId: ObjectExtensions.isNullOrUndefined(cartlineToUpdate.LineId) ? '0' : cartlineToUpdate.LineId,\n ValidationFailures: [\n {\n ErrorContext: ArrayExtensions.hasElements(cartActionResult.validationResults)\n ? cartActionResult.validationResults[0].ErrorContext\n : '',\n LocalizedMessage: cartActionResult.errorDetails?.LocalizedMessage\n }\n ]\n };\n\n this.setState({\n cartlinesErrors: { ValidationResultsPairs: [lineUpdateFailure] }\n });\n }\n\n return false;\n })\n .catch(() => {\n return false;\n });\n\n return false;\n };\n\n /**\n * Fulfillment store id is updated.\n */\n private readonly fulfillmentStoreIdUpdated = () => {\n if (this.isQuantityLimitsFeatureEnabled) {\n // Refresh products (in props.data) based on latest cart.\n getActiveCartProductsAction(new ActiveCartProductsInput(), this.props.context.actionContext)\n .then(async () => this.validateCart())\n .catch((error: Error) => {\n this.props.telemetry.warning(error.message);\n this.props.telemetry.debug('Unable to validate Cart');\n });\n }\n };\n\n /**\n * Validates cart.\n * @returns Void promise.\n */\n private async validateCart(): Promise {\n if (!this.isQuantityLimitsFeatureEnabled) {\n this.setState({ cartlinesErrors: {}, isCartValid: true });\n return AsyncResult.resolve();\n }\n\n const {\n data: { cart },\n telemetry,\n context\n } = this.props;\n\n const validationResults: CartLineValidationResultsByLineId | undefined = await validateCartAsync(cart, telemetry, context, true);\n\n if (validationResults) {\n const isValid = !ArrayExtensions.hasElements(validationResults.ValidationResultsPairs);\n this.setState({\n cartlinesErrors: validationResults,\n isCartValid: isValid\n });\n } else {\n this.setState({ cartlinesErrors: {}, isCartValid: true });\n }\n\n return AsyncResult.resolve();\n }\n\n /**\n * Get order quantity limit feature flag.\n * @returns True if flag is enabled, false otherwise.\n */\n private async getOrderQuantityLimitsFeatureFlag(): Promise {\n const featureStatuses = await this.props.data.featureState;\n\n try {\n const isQuantityLimitsFeatureEnabledInHq =\n featureStatuses.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n if (!isQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get feature states');\n return false;\n }\n\n const useSiteBuilderSettings = featureStatuses?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (defaultOrderQuantityLimitsFeatureConfig === 'none') {\n return false;\n }\n\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n return true;\n }\n\n try {\n const customerInfo = await this.props.data.customerInformation;\n return (\n !!customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b))\n );\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get customer info');\n return false;\n }\n } else {\n const cartConfiguration = await this.props.data.cartConfiguration;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n }\n }\n\n private async _isChannelLimitsFeatureEnabled(): Promise {\n const featureStatuses = await this.props.data.featureState;\n\n const isChannelLimitsFeatureEnabledInHq = featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled;\n\n return isChannelLimitsFeatureEnabledInHq ?? false;\n }\n\n /**\n * Gets the cart lines group.\n * @returns ICartlinesViewProps [][].\n */\n private getCartLinesGroup(): ICartlinesViewProps[][] | null {\n const {\n data: {\n cart: { result: cart },\n wishlists: { result: wishlists },\n orderTemplates: { result: orderTemplates },\n customerInformation: { result: customerInformation }\n },\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n },\n config,\n telemetry,\n resources,\n modules\n } = this.props;\n\n const imageSettings = this.getImageSettings(config.imageSettings);\n const cartlinesErrors: CartLineValidationResultsByLineId = this.state.cartlinesErrors;\n let storeSelectorId: string = '';\n if (modules && Object.keys(modules).length > 0 && modules.storeSelector && modules.storeSelector.length > 0) {\n storeSelectorId = modules.storeSelector[0].id;\n }\n\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\n const { featureState } = this.props.data;\n const channelMultipleCatalogsFeature = 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature';\n const isMultipleCatalogsFeatureEnabled =\n featureState.result?.find((item: FeatureState) => item.Name === channelMultipleCatalogsFeature)?.IsEnabled || false;\n return this.props.data.products &&\n (cart?.hasInvoiceLine || this.props.data.products.result) &&\n cart &&\n cart.cart.CartLines &&\n cart.cart.CartLines.length > 0 &&\n this.props.data.channelDeliveryOptionConfig?.result\n ? CartLineGroupItems({\n cartlines: cart.cart.CartLines,\n storeSelectorModuleId: storeSelectorId,\n cartlinesErrors,\n products: this.props.data.products.result,\n productAvailabilites: this.props.data.productAvailabilites.result,\n productDeliveryOptions: this.props.data.deliveryOptions.result,\n catalogs: this.props.data.catalogs?.result,\n imageSettings,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n hasInvoiceLine: cart?.hasInvoiceLine || false,\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n retailMulitplePickupFeatureState: multiplePickUpEnabled,\n typeName: this.props.typeName,\n id: this.props.id,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n amountString: resources.productDimensionTypeAmount,\n quantityDisplayString: resources.quantityDisplayText,\n inputQuantityAriaLabel: resources.inputQuantityAriaLabel,\n decrementButtonAriaLabel: resources.decrementButtonAriaLabel,\n incrementButtonAriaLabel: resources.incrementButtonAriaLabel,\n discountStringText: resources.discountStringText,\n originalPriceText: resources.originalPriceText,\n currentPriceText: resources.currentPriceText,\n shippingChargesText: resources.shippingCharges,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n priceEditorResources: {\n ...resources\n }\n },\n telemetry,\n addToWishlistButtonText: resources.addToWishlistButtonText,\n removeFromWishlistButtonText: resources.removeFromWishlistButtonText,\n removeButtonText: resources.removeCartButtonText,\n shipItText: resources.shipInsteadDisplayText,\n pickitUpText: resources.pickItUpDisplayText,\n changeStoreText: resources.changeStoreDisplayText,\n storeSelectorStateManager: this.props.data.storeSelectorStateManager.result,\n outOfStockText: resources.outOfStockErrorMessage,\n outOfRangeOneText: resources.errorMessageOutOfRangeOneLeft,\n outOfRangeFormatText: resources.errorMessageOutOfRangeFormat,\n cartState: this.props.data.cart.result,\n orgUnitLocations: this.props.data.orgUnitLocations.result,\n removeItemClickHandler: this.removeItemFromCartHandler,\n moveToWishlistSuccessHandler: this.moveToWishlistSuccessHandler,\n updateCartLinesQuantitySuccessHandler: this.updateCartlineQuantity,\n locationChangedHandler: this.fulfillmentStoreIdUpdated,\n wishlists,\n defaultWishlistName: resources.defaultWishlistName,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n includeErrors: config.showOutOfStockErrors,\n showShippingChargesForLineItems: config.showShippingChargesForLineItems,\n telemetryContent: this.telemetryContent,\n isQuantityLimitsFeatureEnabled: this.isQuantityLimitsFeatureEnabled,\n\n addToOrderTemplateDialogResources: this._generateAddToOrderTemplateDialogResources(resources),\n createOrderTemplateDialogResources: this._generateOrderTemplateNameDialogResources(resources),\n itemAddedToOrderTemplateDialogResources: this._generateItemAddedToOrderTemplateDialogResources(resources),\n duplicateItemsWhenAddingToOrderTemplateDialogResources: this._generateDuplicateItemsWhenAddingToOrderTemplateDialogResources(\n resources\n ),\n\n addToOrderTemplateButtonText: resources.addToOrderTemplateButtonText,\n addToOrderTemplateButtonTooltip: resources.addToOrderTemplateButtonTooltip,\n addToOrderTemplateMessage: resources.addToOrderTemplateMessage,\n addItemToOrderTemplateError: resources.addItemToOrderTemplateError,\n orderTemplates,\n customerInformation,\n channelDeliveryOptionConfig: this.props.data.channelDeliveryOptionConfig?.result,\n shouldIgnoreWarehouse: this.props.context.app.config.warehouseAggregation === 'multiple',\n productAvailability: this.props.data.productAvailabilites,\n productPickUpOptions: this.state.productPickUpOptions || this.props.data.cartLinesPickUpOptions?.result,\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogsFeatureEnabled || false\n })\n : null;\n }\n}\n\nexport default Cart;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IInvoiceSummaryLines } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICartViewProps, IOrderSummaryErrors } from './cart';\nimport { ICartlinesViewProps } from './components/cart-line-items';\nimport { ICartLineItemViewProps } from './components/cart-line-items-promotion';\n\nconst _renderCartlines = (\n cartLines: ICartlinesViewProps[] | undefined,\n cartEmptyText: string,\n CartlinesWrapper: INodeProps,\n storeSelector: React.ReactNode | undefined,\n backToShoppingButton: React.ReactNode,\n waitingComponent: React.ReactNode,\n cartLoadingStatus: string,\n cartDataResult: boolean\n): JSX.Element[] | JSX.Element => {\n if (cartLoadingStatus) {\n return <>{cartLoadingStatus};\n }\n if (cartLines) {\n return cartLines.map(cartLine => {\n return (\n
\n {cartLine.cartline}\n {storeSelector && cartLine.pickUpInStore ? (\n {cartLine.pickUpInStore.defaultComponent}\n ) : null}\n {cartLine.addToOrderTemplate ? (\n \n {cartLine.remove}\n {cartLine.addToWishlist}\n {cartLine.addToOrderTemplate}\n \n ) : (\n <>\n {cartLine.remove}\n {cartLine.addToWishlist}\n \n )}\n
\n );\n });\n }\n return cartDataResult ? (\n
\n

{cartEmptyText}

\n {backToShoppingButton}\n
\n ) : (\n <>{waitingComponent}\n );\n};\n\n/**\n * Method will render error block.\n * @param errorData -The order summary errors interface.\n * @returns Jsx element.\n */\nconst _renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\n if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\n return null;\n }\n return (\n \n {errorData.header}\n {errorData.errors}\n \n );\n};\n\n/**\n * Method will render invoice summary lines.\n * @param invoiceSummaryLines -The invoicesummary lines interface.\n * @param OrderSummaryItems -The order summary items props.\n * @param props -The cartview props.\n * @returns Jsx element.\n */\nconst _renderInvoiceSummarylines = (\n invoiceSummaryLines: IInvoiceSummaryLines | undefined,\n OrderSummaryItems: INodeProps,\n props: ICartViewProps\n): JSX.Element | null => {\n if (!invoiceSummaryLines) {\n props.context.telemetry.error('InvoiceSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {invoiceSummaryLines.invoices}\n {invoiceSummaryLines.giftCard}\n {invoiceSummaryLines.loyalty}\n {invoiceSummaryLines.orderTotal}\n \n );\n};\n\n/**\n * Method will render order summary lines.\n * @param orderSummaryLines -The ordersummary lines interface.\n * @param OrderSummaryItems -The order summary items props.\n * @param props -The cartview props.\n * @returns Jsx element.\n */\nconst _renderOrderSummarylines = (\n orderSummaryLines: IOrderSummaryLines | undefined,\n OrderSummaryItems: INodeProps,\n props: ICartViewProps\n): JSX.Element | null => {\n if (!orderSummaryLines) {\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {props.promoCode}\n {orderSummaryLines.subtotal}\n {orderSummaryLines.shipping}\n {orderSummaryLines.otherCharge}\n {orderSummaryLines.tax}\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\n {orderSummaryLines.orderTotal}\n \n );\n};\n\n/**\n * Method will render cart promotions.\n * @param promotions -The cartline item view props.\n * @returns Jsx element.\n */\nconst _renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\n return (\n <>\n \n {promotions.promotionMessage}\n {promotions.promotionSeeAllLink}\n {promotions.promotionDialog}\n \n \n );\n};\n\n/**\n * Method will render cartlines group title.\n * @param cartLine -The cartline view props.\n * @param titleSeparate -The title separate.\n * @returns Jsx element.\n */\nconst renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, titleSeparate: string) => {\n const isBopisSelected: boolean | undefined = cartLine.pickUpInStore?.isBopisSelected;\n return (\n <>\n \n {isBopisSelected ? (\n

\n {cartLine.pickUpInStore?.deliveryOption}\n {titleSeparate}\n {cartLine.pickUpInStore?.orgUnitName}\n

\n ) : null}\n
\n \n );\n};\n\n/**\n * Method will render cartlines groups header title.\n * @param pickUpText -The pickup text for group.\n * @param shippingText -The shipping text for group.\n * @param emailShippingText -The email shipping text for group.\n * @param titleSeparate -The title separator.\n * @param cartLine -The cartline view props.\n * @param emailDeliveryModeCode -The email delivery code from channel.\n * @returns Jsx element.\n */\nconst renderCartLinesGroupHeader = (\n pickUpText: string,\n shippingText: string,\n emailShippingText: string,\n titleSeparate: string,\n cartLine: ICartlinesViewProps,\n emailDeliveryModeCode?: string\n) => {\n const isBopisSelected: boolean | undefined = cartLine.pickUpInStore?.isBopisSelected;\n let groupTitle: string;\n\n groupTitle = isBopisSelected ? pickUpText : shippingText;\n if (!StringExtensions.isNullOrEmpty(emailDeliveryModeCode)) {\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailShippingText : groupTitle;\n }\n\n return (\n <>\n
\n

\n

{groupTitle}

\n {renderCartLinesGroupTitle(cartLine, titleSeparate)}\n
\n \n );\n};\n\n/**\n * Method will render cartlines in groups.\n * @param props -The cartline.\n * @returns Jsx element.\n */\nconst renderCartLinesGroup = (props: ICartViewProps): JSX.Element | undefined => {\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\n return (\n
\n {props.cartLinesGroup.map(cartlines => {\n return (\n
\n {renderCartLinesGroupHeader(\n props.resources.pickUpText,\n props.resources.shippingText,\n props.resources.emailshippingText,\n props.resources.titleSeparate,\n cartlines[0],\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\n )}\n {_renderCartlines(\n cartlines,\n props.resources.emptyCartText,\n props.CartlinesWrapper,\n props.storeSelector,\n props.backToShoppingButton,\n props.waitingComponent,\n props.cartLoadingStatus,\n props.cartDataResult\n )}\n
\n );\n })}\n
\n );\n }\n return props.cartDataResult ? (\n
\n
\n

{props.resources.emptyCartText}

\n {props.backToShoppingButton}\n
\n
\n ) : (\n <>{props.waitingComponent}\n );\n};\n\nconst CartView: React.FC = (props: ICartViewProps) => (\n
\n {props.title}\n {!props.cart?.hasInvoiceLine && props.promotionOptions && _renderPromotions(props.promotionOptions)}\n {props.multiplePickUpEnabled ? (\n renderCartLinesGroup(props)\n ) : (\n \n {_renderCartlines(\n props.cartlines,\n props.resources.emptyCartText,\n props.CartlinesWrapper,\n props.storeSelector,\n props.backToShoppingButton,\n props.waitingComponent,\n props.cartLoadingStatus,\n props.cartDataResult\n )}\n \n )}\n {props.orderSummaryHeading && (\n \n {props.orderSummaryHeading}\n {props.cart?.hasInvoiceLine\n ? _renderInvoiceSummarylines(props.invoiceSummaryLineitems, props.OrderSummaryItems, props)\n : _renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\n {_renderErrorBlock(props.OrderSummaryErrors)}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.expressCheckoutButton && ArrayExtensions.hasElements(props.expressCheckoutButton) ? (\n {props.expressCheckoutButton}\n ) : null}\n {props.backToShoppingButton}\n {props.createTemplateFromCartButton}\n \n )}\n {props.storeSelector}\n
\n);\n\nexport default CartView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToOrderTemplateComponent,\n AddToWishlistComponent,\n CartLineItemComponent,\n IAddToOrderTemplateDialogResources,\n ICartlineResourceString,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateNameDialogResources,\n IWishlistActionSuccessResult\n} from '@msdyn365-commerce/components';\nimport MsDyn365, {\n IAny,\n ICoreContext,\n IGeneric,\n IGridSettings,\n IImageSettings,\n ITelemetry,\n TelemetryEvent,\n isChannelTypeB2B\n} from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n AsyncResult,\n CartLine,\n CartLineValidationResultsByLineId,\n ChannelDeliveryOptionConfiguration,\n CommerceList,\n Customer,\n OrgUnitLocation,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ProductDimensionType, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getInvoiceDetailsPageUrlSync,\n getProductUrlSync,\n IProductInventoryInformation,\n isCartLineItemPickUpType,\n ObjectExtensions,\n OrderTemplate,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '../../../Common/get-product';\nimport { IPickUpInStoreViewProps, PickUpInStore } from './cart-pick-up-in-store';\n\nexport interface ICartLineItemsProps {\n cartlines: CartLine[];\n cartlinesErrors: CartLineValidationResultsByLineId;\n cartState: ICartState | undefined;\n orgUnitLocations: OrgUnitLocation[] | undefined;\n resources: ICartlineResourceString;\n productAvailabilites: IProductInventoryInformation[] | undefined;\n products: SimpleProduct[] | undefined;\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\n pickupDeliveryModeCode?: string;\n catalogs?: ProductCatalog[];\n retailMulitplePickupFeatureState?: boolean;\n\n /* GridSettings for the product image in cartline */\n gridSettings: IGridSettings;\n\n /* ImageSettings for the product image in cartline */\n imageSettings: IImageSettings;\n id: string;\n typeName: string;\n context: ICoreContext>;\n telemetry: ITelemetry;\n removeButtonText: string;\n addToWishlistButtonText: string;\n removeFromWishlistButtonText: string;\n shipItText: string;\n pickitUpText: string;\n changeStoreText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n isStockCheckEnabled: boolean;\n wishlists: CommerceList[] | undefined;\n defaultWishlistName: string;\n maxCartlineQuantity: number;\n includeErrors?: boolean;\n showShippingChargesForLineItems?: boolean;\n telemetryContent?: ITelemetryContent;\n isQuantityLimitsFeatureEnabled: boolean;\n hasInvoiceLine?: boolean;\n storeSelectorModuleId?: string;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n\n addToOrderTemplateButtonText: string;\n addToOrderTemplateButtonTooltip: string;\n addToOrderTemplateMessage: string;\n addItemToOrderTemplateError: string;\n orderTemplates: OrderTemplate[] | undefined;\n customerInformation: Customer | undefined;\n shouldIgnoreWarehouse: boolean | undefined;\n productAvailability?: AsyncResult;\n productPickUpOptions?: ProductDeliveryOptions[] | undefined;\n isMultipleCatalogFeatureEnabledInHq: boolean;\n catalogId?: number;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n updateCartLinesQuantitySuccessHandler(cartline: CartLine, quantity: number, lineIndex?: number): boolean;\n locationChangedHandler(): void;\n}\n\nexport interface ICartlinesViewProps {\n cartline: React.ReactNode;\n pickUpInStore?: IPickUpInStoreViewProps;\n remove: React.ReactNode;\n addToWishlist: React.ReactNode | undefined;\n addToOrderTemplate: React.ReactNode | undefined;\n\n error?: string;\n cartlineId?: string;\n hasError?: boolean;\n data?: {\n product?: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getCartItemAvailableQuantity = (\n isStockCheckEnabled: boolean,\n productAvailability: IProductInventoryInformation | undefined\n): number => {\n if (\n !isStockCheckEnabled ||\n !productAvailability ||\n !productAvailability.ProductAvailableQuantity ||\n !productAvailability.IsProductAvailable ||\n !productAvailability.ProductAvailableQuantity.AvailableQuantity\n ) {\n return 0;\n }\n\n return productAvailability.ProductAvailableQuantity.AvailableQuantity;\n};\n\nconst _getCartItemMaxQuantity = (\n maxQuantityByConfig: number,\n isStockCheckEnabled: boolean,\n availableQuantityInStock: number,\n isQuantityLimitsFeatureEnabled: boolean,\n maxByQuantityLimitsFeature: number\n) => {\n if (isQuantityLimitsFeatureEnabled) {\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\n\n // If max by feature in not defined when feature is on then we suggest that there no max by feature\n // and consider available qty if stock check enabled and max from config in site settings.\n if (!maxByQuantityLimitsFeature) {\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\n }\n\n return isStockCheckEnabled\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\n ? maxByQuantityLimitsFeatureResult\n : availableQuantityInStock\n : maxByQuantityLimitsFeatureResult;\n }\n if (isStockCheckEnabled) {\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\n }\n return maxQuantityByConfig;\n};\n\nconst _getErrorMessage = (\n availableQuantityInStock: number,\n currentQuantity: number,\n props: ICartLineItemsProps,\n shouldSkipStockCheck: boolean,\n cartLine: CartLine,\n lineId: string | undefined,\n foundProductAvailability?: IProductInventoryInformation\n): string | undefined => {\n const finalErrorMessages: string[] = [];\n\n const isLoadingDeliveryOptions = props.productAvailability?.status === 'LOADING';\n if (isLoadingDeliveryOptions) {\n return undefined;\n }\n // check availability passed as prop for each cartline\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\n if (foundProductAvailability === undefined) {\n finalErrorMessages.push(props.outOfStockText);\n return finalErrorMessages.toString();\n }\n }\n if (props.includeErrors && props.isStockCheckEnabled && !shouldSkipStockCheck) {\n if (availableQuantityInStock <= 0) {\n finalErrorMessages.push(props.outOfStockText);\n } else if (availableQuantityInStock < currentQuantity) {\n if (availableQuantityInStock === 1) {\n finalErrorMessages.push(props.outOfRangeOneText);\n } else {\n finalErrorMessages.push(props.outOfRangeFormatText.replace('{numLeft}', availableQuantityInStock.toString()));\n }\n }\n }\n\n // Server-side validation\n const checkForErrors = props.cartlinesErrors.ValidationResultsPairs;\n const errorsFoundByLineId = checkForErrors?.filter(index => index.LineId === lineId);\n if (errorsFoundByLineId !== undefined) {\n for (const i of errorsFoundByLineId) {\n if (ArrayExtensions.hasElements(i.ValidationFailures)) {\n i.ValidationFailures.forEach(validation => {\n if (validation.ErrorContext !== undefined) {\n finalErrorMessages.push(validation.ErrorContext);\n }\n });\n }\n }\n }\n\n if (ArrayExtensions.hasElements(finalErrorMessages)) {\n return finalErrorMessages.join(' ');\n }\n\n return undefined;\n};\n\n/**\n * On Remove Click functionality.\n * @param removeItemClickHandler -Remove item click function.\n * @param cartline -CartLine.\n * @returns Remove change value.\n */\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\n removeItemClickHandler(cartline);\n};\n\n// eslint-disable-next-line complexity -- Auto-suppressed.\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct | undefined,\n props: ICartLineItemsProps,\n index: number,\n foundProductAvailability?: IProductInventoryInformation,\n productPickUpOptions?: ProductDeliveryOptions\n): ICartlinesViewProps => {\n const {\n imageSettings,\n gridSettings,\n id,\n typeName,\n context,\n resources,\n removeButtonText,\n removeItemClickHandler,\n moveToWishlistSuccessHandler,\n addToOrderTemplateButtonText,\n addToOrderTemplateButtonTooltip,\n addToOrderTemplateDialogResources,\n createOrderTemplateDialogResources,\n itemAddedToOrderTemplateDialogResources,\n duplicateItemsWhenAddingToOrderTemplateDialogResources,\n addToWishlistButtonText,\n removeFromWishlistButtonText,\n orderTemplates,\n customerInformation,\n wishlists,\n defaultWishlistName,\n storeSelectorModuleId,\n isMultipleCatalogFeatureEnabledInHq\n } = props;\n\n const isAuthenticated = context.request.user.isAuthenticated;\n const nameOfWishlist = wishlists && wishlists.length > 0 && wishlists[0].Name ? wishlists[0].Name : defaultWishlistName;\n const availableQuantityInStock = _getCartItemAvailableQuantity(props.isStockCheckEnabled, foundProductAvailability);\n\n const maxQuantity =\n product &&\n _getCartItemMaxQuantity(\n props.maxCartlineQuantity,\n props.isStockCheckEnabled,\n availableQuantityInStock,\n props.isQuantityLimitsFeatureEnabled,\n product?.Behavior?.MaximumQuantity || 0\n );\n\n // Skip stock check if the cart line is a service item or an invoice line\n const shouldSkipStockCheck = product?.ItemTypeValue === ReleasedProductType.Service || !!cartline.IsInvoiceLine;\n\n const errorMessage = ObjectExtensions.isNullOrUndefined(maxQuantity)\n ? undefined\n : _getErrorMessage(\n availableQuantityInStock,\n cartline.Quantity!,\n props,\n shouldSkipStockCheck,\n cartline,\n cartline.LineId,\n foundProductAvailability\n );\n\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\n\n const payload = getPayloadObject(TelemetryEvent.RemoveFromCart, props.telemetryContent!, removeButtonText, '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n\n const inventoryLbl = foundProductAvailability?.StockLevelLabel;\n const inventoryCode = foundProductAvailability\n ? `ms-cart-line__inventory-code-${foundProductAvailability.StockLevelCode?.toLowerCase()}`\n : undefined;\n const productDimension = 4;\n const customPriceDimensionType = productDimension as ProductDimensionType.Style;\n const isCustomPriceSelected =\n product?.Dimensions?.find(dimension => dimension.DimensionTypeValue === customPriceDimensionType)?.DimensionValue?.Value ===\n 'Custom';\n\n let productUrl: string | undefined;\n if (product) {\n productUrl = getProductUrlSync(product, props.context.actionContext, undefined);\n\n if (MsDyn365.isBrowser && isChannelTypeB2B(props.context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartline.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n } else {\n productUrl = getInvoiceDetailsPageUrlSync(cartline.Description || '', props.context.actionContext);\n }\n\n return {\n data: {\n product,\n cartline\n },\n cartlineId: cartline.LineId,\n error: errorMessage,\n hasError:\n (!shouldSkipStockCheck && props.isStockCheckEnabled ? cartline.Quantity! > (maxQuantity ?? 0) : false) ||\n (!ObjectExtensions.isNullOrUndefined(errorMessage) && !StringExtensions.isNullOrEmpty(errorMessage)),\n cartline: (\n \n ),\n pickUpInStore: product\n ? PickUpInStore({\n storeSelectorModuleId,\n cartState: props.cartState,\n cartline,\n product,\n shipitText: props.shipItText,\n pickUpInStoreText: props.pickitUpText,\n changeStoreText: props.changeStoreText,\n storeSelectorStateManager: props.storeSelectorStateManager,\n orgUnitLocations: props.orgUnitLocations,\n deliveryOptions: productPickUpOptions,\n pickupDeliveryModeCode:\n cartline.DeliveryMode !== (undefined || '') ? cartline.DeliveryMode : props.pickupDeliveryModeCode,\n retailMulitplePickupFeatureState: props.retailMulitplePickupFeatureState,\n channelDeliveryOptionConfig: props.channelDeliveryOptionConfig,\n locationChangedHandler: props.locationChangedHandler\n })\n : undefined,\n remove: (\n \n ),\n addToWishlist:\n isAuthenticated && product && !isCustomPriceSelected ? (\n \n ) : (\n undefined\n ),\n addToOrderTemplate:\n isAuthenticated && orderTemplates && product ? (\n \n ) : (\n undefined\n )\n };\n};\n\nexport const assembleCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[] | null => {\n const reactNodes: ICartlinesViewProps[] = [];\n\n cartlines.map((cartline, index) => {\n let product;\n if (props.isQuantityLimitsFeatureEnabled) {\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\n // to check productId and WarehouseId for identification.\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\n } else {\n product = getProductByProductId(cartline.ProductId, products);\n }\n let foundProductAvailability;\n\n // check if cartlineitem is pickup item\n const isPickUpItem = isCartLineItemPickUpType(\n cartline,\n props.retailMulitplePickupFeatureState,\n props.channelDeliveryOptionConfig,\n props.pickupDeliveryModeCode\n );\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\n if (!props.shouldIgnoreWarehouse && isPickUpItem) {\n // check warehouse only if siteBuilder setting is not \"Based on aggregate for shipping and pickup warehouses\" and cartlineitem is pickupitem\n return (\n productAvailability.ProductAvailableQuantity?.ProductId === cartline.ProductId &&\n productAvailability.InventLocationId?.toUpperCase() === cartline.WarehouseId?.toUpperCase()\n );\n }\n return productAvailability.ProductAvailableQuantity.ProductId === cartline.ProductId;\n });\n }\n\n let productPickUpOptions;\n if (props.productPickUpOptions !== undefined && ArrayExtensions.hasElements(props.productPickUpOptions)) {\n productPickUpOptions = props.productPickUpOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n reactNodes.push(_assembleNode(cartline, product, props, index, foundProductAvailability, productPickUpOptions));\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component.\n * @param props\n */\nexport const CartLineItems = (props: ICartLineItemsProps) => {\n const { products, cartlines } = props;\n return assembleCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n DeliveryOption,\n OrgUnitLocation,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPickUpInStoreViewProps {\n callbacks: {\n toggleBopis(isBopisSelected: boolean): void;\n };\n defaultComponent?: React.ReactNode;\n orgUnitName?: string;\n isBopisSelected: boolean;\n ContainerProps: INodeProps;\n deliveryOption?: string;\n}\n\nexport interface IPickUpInStoreProps {\n cartline: CartLine;\n product: SimpleProduct;\n shipitText: string;\n pickUpInStoreText: string;\n changeStoreText: string;\n cartState: ICartState | undefined;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n orgUnitLocations?: OrgUnitLocation[] | undefined;\n deliveryOptions?: ProductDeliveryOptions;\n pickupDeliveryModeCode?: string;\n storeSelectorModuleId?: string;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n retailMulitplePickupFeatureState?: boolean;\n locationChangedHandler(): void;\n}\n\nexport const PickUpInStore = (props: IPickUpInStoreProps): IPickUpInStoreViewProps | undefined => {\n const _onLocationChangedCallback = async (\n orgUnitLocation: OrgUnitLocation,\n cartState: ICartState | undefined,\n cartline: CartLine,\n deliveryMode?: string\n ) => {\n if (!cartState) {\n return Promise.resolve();\n }\n return cartState\n .updateCartLinePickupLocation({ cartLineId: cartline.LineId!, location: orgUnitLocation, deliveryMode })\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {});\n };\n\n const _toggleBOPIS = (isBopisSelected: boolean) => {\n const { storeSelectorStateManager, product, cartline, cartState, storeSelectorModuleId } = props;\n\n if (isBopisSelected) {\n if (!storeSelectorStateManager) {\n return;\n }\n storeSelectorStateManager\n .openDialog({\n id: storeSelectorModuleId,\n product,\n alreadySelectedLocation: {\n OrgUnitNumber: cartline.FulfillmentStoreId\n },\n deliveryOptions: props.deliveryOptions,\n onLocationSelected: async (orgUnitLocation, deliveryMode: string | undefined) => {\n return _onLocationChangedCallback(orgUnitLocation, cartState, cartline, deliveryMode);\n }\n })\n .catch(error => {});\n } else {\n if (!cartState) {\n return;\n }\n cartline.DeliveryMode = '';\n cartline.FulfillmentStoreId = '';\n cartline.ShippingAddress = {};\n cartState\n .clearCartLinePickupLocation({ cartLineId: cartline.LineId! })\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {});\n }\n };\n\n const _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\n return '';\n }\n\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\n });\n\n if (foundLocation) {\n return foundLocation.OrgUnitName;\n }\n return fulfillmentStoreId;\n };\n\n const _renderShippingMethod = (\n cartLine: CartLine,\n shipItText: string,\n pickupInStoretext: string,\n changeStoreText: string,\n orgUnitLocations: OrgUnitLocation[] | undefined\n ): JSX.Element => {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, orgUnitLocations);\n const bopisSelected = !!cartLine.FulfillmentStoreId;\n\n const toggleBOPIS = (isBopisSelected: boolean) => {\n return () => {\n _toggleBOPIS(isBopisSelected);\n };\n };\n\n return (\n <>\n \n \n {cartLine.FulfillmentStoreId ? (\n
\n {orgUnitName}\n \n
\n ) : null}\n \n );\n };\n\n const _getDeliveryOption = (pickupStore: IPickUpInStoreProps, deliveryOptions: ProductDeliveryOptions) => {\n const delivery = deliveryOptions?.DeliveryOptions?.find(option => option.Code === pickupStore.pickupDeliveryModeCode);\n return delivery?.Description;\n };\n\n /**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns Boolean flag.\n */\n const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: string[] | undefined\n ): boolean => {\n const deliveryOption: string[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n return deliveryOption;\n });\n\n return ArrayExtensions.hasElements(deliveryOption);\n };\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (!props.deliveryOptions || !props.deliveryOptions.DeliveryOptions) {\n return undefined;\n }\n\n if (props.retailMulitplePickupFeatureState && props.channelDeliveryOptionConfig) {\n if (!matchDeliveryOptions(props.deliveryOptions.DeliveryOptions, props.channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\n return undefined;\n }\n } else if (\n !props.pickupDeliveryModeCode ||\n !props.deliveryOptions.DeliveryOptions.find(option => option.Code === props.pickupDeliveryModeCode)\n ) {\n return undefined;\n }\n\n return {\n callbacks: {\n toggleBopis: _toggleBOPIS\n },\n defaultComponent: _renderShippingMethod(\n props.cartline,\n props.shipitText,\n props.pickUpInStoreText,\n props.changeStoreText,\n props.orgUnitLocations\n ),\n orgUnitName: _getOrgUnitName(props.cartline.FulfillmentStoreId, props.orgUnitLocations),\n isBopisSelected: !!props.cartline.FulfillmentStoreId,\n deliveryOption: _getDeliveryOption(props, props.deliveryOptions),\n ContainerProps: {\n className: 'msc-cart-line__bopis-container'\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ICartLineItemPromotion {\n id: string;\n showPromotionPopup: boolean;\n promotions: CartPromotionLine[] | undefined;\n resources: ICartLineItemPromotionResourceString;\n onSeeAllClick(event: React.MouseEvent): void;\n onCloseButtonClick(): void;\n}\n\nexport interface ICartLineItemViewProps {\n promotionMessageWrapper: INodeProps;\n promotionMessage: React.ReactNode;\n promotionSeeAllLink: React.ReactElement;\n promotionDialog: React.ReactNode;\n}\n\nexport interface ICartLineItemPromotionResourceString {\n promotionLinkText: string;\n promotionStringHeading: string;\n promotionPopupHeading: string;\n promotionCloseButtonAriaLabel: string;\n}\n\nexport const cartPromotions = (props: ICartLineItemPromotion): ICartLineItemViewProps | undefined => {\n const {\n id,\n showPromotionPopup,\n promotions,\n resources: { promotionLinkText, promotionPopupHeading },\n onCloseButtonClick,\n onSeeAllClick\n } = props;\n\n if (!ArrayExtensions.hasElements(promotions)) {\n return;\n }\n\n const titleId = `${id}_title`;\n const className = 'msc-cart__promotion';\n return {\n promotionMessageWrapper: {\n className: 'msc-cart__promotion'\n },\n promotionMessage: (\n <>\n \n {props.resources.promotionStringHeading}\n \n ),\n promotionSeeAllLink: (\n \n {` `}\n {promotionLinkText} {` `}\n \n ),\n promotionDialog: (\n \n \n
\n {promotionPopupHeading}\n
\n
\n \n
    \n {promotions.map(_promotion => {\n return (\n
  • \n {_promotion.Promotion?.OfferName} {` `}\n
  • \n );\n })}\n
\n
\n \n
\n )\n };\n};\n"],"names":["SearchOrgUnitLocationsInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","createSearchOrgUnitLocationsInputFunc","inputData","async","getSearchOrgUnitLocationsAction","input","context","searchOrgUnitLocationsAsync","callerContext","retailActionDataAction","createObservableDataAction","id","action","getProductByProductId","productId","products","undefined","ArrayExtensions","hasElements","find","product","RecordId","getProductByProductIdAndWarehouse","warehouseId","cartState","targetWarehouseValue","cart","WarehouseId","_product$Behavior","Behavior","InventoryLocationId","validateCartAsync","telemetry","propsContext","cartResult","cartVersion","shouldRetry","arguments","length","Version","error","warning","debug","AsyncResult","resolve","_validationResult$Val","validationResult","CartsDataActions","actionContext","bypassCache","Id","ValidationResultsByLineId","name","refreshCart","refreshError","validateError","cartLineQuantityUpdatedAsync","isQuantityLimitsFeatureEnabled","cartLineToUpdate","quantity","isUsingDefaultOrderSettingsMax","_modifiedProduct$Beha2","modifiedProduct","ProductId","MaximumQuantity","cartLineId","LineId","toString","newQuantity","additionalProperties","updateLineResult","updateCartLineQuantity","message","InvoiceSummaryLine","_ref","price","label","typeName","toBeCalculatedText","freeText","cssLabel","React","className","PriceComponent","data","CustomerContextualPrice","freePriceText","_buildPaymentSummarySection","props","_computedLoyaltyAmount","checkoutState","loyaltyAmount","InvoiceSummary","TotalAmount","CartLines","invoiceLines","filter","cartLine","IsInvoiceLine","reactNodes","invoices","map","invoiceLine","InvoiceAmount","format","invoiceLabel","InvoiceId","orderTotal","orderTotalLabel","giftCardAmount","_computeGiftCardAmount","giftCardTotalValue","giftCardExtends","reduce","giftCardCounter","count","giftCard","Balance","amount","Math","min","totalAmountAfterGiftCard","loyalty","loyaltyLabel","giftcardLabel","_objectSpread","OrderSummaryLine","priceCurrency","currencyCode","_buildOrderSummarySection","channelConfiguration","Currency","getDeliveryMode","deliveryMode","_channelDeliveryOptio","featureSate","channelDeliveryOptionConfig","pickupDeliveryMode","PickupDeliveryModeCodes","dM","OrderSummary","SubtotalAmount","SubtotalAmountWithoutTax","TaxAmount","TaxOnNonShippingCharges","DiscountAmount","OtherChargeAmount","canShip","hasDeliveryMethod","hasShippingMethod","freightFee","getDeliveryConfiguration","retailMultiplePickUpOptionEnabled","isTaxIncludedInPrice","isShowTaxBreakup","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","deliveryModes","DeliveryMode","taxOnShippingCharge","TaxOnShippingCharge","shippingChargeAmount","ShippingChargeAmount","some","subtotal","subTotalLabel","tax","taxLabel","otherCharge","otherChargeLabel","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual","shipping","shippingLabel","customerAccountAmount","customerAccount","customerAccountLabel","totalDiscounts","totalDiscountsLabel","ProductPickUpOptionsForCartLineItems","apiSettings","buildCacheKey","this","getPickUpOptionsForCartLineItems","channelId","Error","getCartState","getActiveCartProductsAction","ActiveCartProductsInput","response","Promise","ProductsDataActions","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","requestContext","CartLineGroupItems","cartlines","hasInvoiceLine","_assembleGroupInvoiceCartlines","cartLines","carLineViewProps","assembleCartlines","push","_assembleGroupCartlines","getGroupByStorePickup","items","groupBy","item","FulfillmentStoreId","groupDelivery","cartLinesGroup","Object","entries","forEach","deliveryType","groupByDeliveryType","keys","key","index","getPromotionData","ctx","promotionData","getPromotionOptionsForCartLineItems","PromotionOptionsForCartLineItems","then","promotionOptions","catch","exception","Cart","super","_isMounted","promotionPopupId","promotionLinkClick","event","setState","showPromotionDialog","state","promotionCloseButtonclick","_hidePromotionDialog","getImageSettings","imageSettings","viewports","xs","q","w","h","sm","lg","lazyload","removeItemFromCartHandler","cartlineToRemove","result","cartLineIds","removeCartLines","validateCart","moveToWishlistSuccessHandler","cartline","status","updateCartlineQuantity","cartlineToUpdate","lineIndex","cartActionResult","cartlinesErrors","ObjectExtensions","isNullOrUndefined","_cartActionResult$err","lineUpdateFailure","ValidationFailures","ErrorContext","validationResults","LocalizedMessage","errorDetails","ValidationResultsPairs","fulfillmentStoreIdUpdated","telemetryContent","getTelemetryObject","request","telemetryPageName","friendlyName","payLoad","getPayloadObject","bind","isCartValid","productPickUpOptions","config","_this$props$data$cart","getOrderQuantityLimitsFeatureFlag","_isChannelLimitsFeatureEnabled","showAvailablePromotions","reaction","_this$props$data$cart2","_this$props$data$cart3","componentWillUnmount","shouldComponentUpdate","nextProps","nextState","render","_this$props$context$r","_cart$cart$CartLines","_this$props$data$prod","_this$props$data$feat","_featureState$result","user","isAuthenticated","signInUrl","resources","guestCheckoutUrl","getUrlSync","backToShoppingUrl","checkoutURL","getCheckoutURL","isCartEmpty","_getCartLines","channel","validInventoryAcrossCartLines","validateCartLinesInventory","productAvailabilites","hasError","isValid","RetailMultiplePickupFeatureState","featureState","Name","multiplePickUpEnabled","IsEnabled","isMultipleCatalogsFeatureEnabled","currentCatalogId","getCatalogId","validateCatalogId","getCartLinesGroup","contentAction","etext","TelemetryConstant","Checkout","checkoutBySignInAttributes","getTelemetryAttributes","GuestCheckout","checkoutByGuestAttributes","BackToShopping","backtoShoppingAttributes","cartLineGroup","_updateCartLineErrorForInvalidInventory","viewProps","classnames","title","cartTitle","CartlinesWrapper","OrderSummaryWrapper","OrderSummaryItems","promoCode","_getPromoCode","_getPromotions","removePromoAriaLabelFormat","orderSummaryHeading","invoiceSummaryTitle","orderSummaryTitle","orderSummaryLineitems","_getOrderSummaryLineItems","invoiceSummaryLineitems","_getInvoiceSummaryLineItems","checkoutAsSignInUserButton","Button","assign","disabled","href","checkoutButtonTitle","checkoutAsGuestButton","showGuestCheckoutButton","guestCheckoutButtonTitle","expressCheckoutButton","slots","paymentExpress","ExpressCheckoutSectionWrapper","backToShoppingButton","backToShoppingButtonTitle","createTemplateFromCartButton","_displayAddCartToTemplate","SaveCartToOrderTemplateComponent","addToOrderTemplateDialogResources","_generateAddToOrderTemplateDialogResources","createOrderTemplateDialogResources","_generateOrderTemplateNameDialogResources","linesAddedToOrderTemplateDialogResources","_generateLinesAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","_generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","createOrderTemplateFromCartButton","createOrderTemplateFromCartButtonTooltip","isMultipleCatalogFeatureEnabledInHq","catalogId","orderTemplates","customerInformation","checkoutBlockedDueToUnavailableFunds","storeSelector","removeItemClickHandler","waitingComponent","Waiting","cartLoadingStatus","cartLoadingErrorMessage","cartDataResult","isEmpty","OrderSummaryErrors","_getOrderSummaryErrors","renderView","_this$props$data$cart4","_cart$cart","isChannelTypeB2B","cartPromotions","showPromotionPopup","onSeeAllClick","onCloseButtonClick","promotions","promotionStringHeading","promotionLinkText","promotionPopupHeading","promotionCloseButtonAriaLabel","cartLineInventoryValidationResult","productIdWithErrors","productIdWithError","element","_element$data","outOfStockErrorMessage","allErrors","_cartline$data","ItemTypeValue","ReleasedProductType","Service","_cartline$data$produc","fullError","line","Wrapper","tag","Alert","isOpen","color","assertive","outOfStockErrorMessageHeader","header","errors","totalAmountLabel","_this$props","_featureState$result2","_this$props$context$r2","isShowOrHideTaxEnabled","app","isEnableShowOrHideSalesTaxECommerceEnabled","itemsWithCountLabel","estimatedShippingLabel","otherCharges","estimatedTaxLabel","yetToBeCalculatedText","priceFree","IsTaxIncludedInPrice","PromoCodeComponent","promoCodeHeadingText","promoPlaceholderText","promoCodeApplyButtonText","appliedPromoCodeHeadingText","collapseTimeOut","removePromoText","invalidPromoCodeErrorText","failedToAddPromoCodeErrorText","failedToRemovePromoCodeErrorText","duplicatePromoCodeErrorText","duplicatePromotionErrorText","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","_generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","originalPriceText","currentPriceText","linesAddedToOrderTemplateHeaderItemsOneText","linesAddedToOrderTemplateHeaderItemsFormatText","linesAddedToOrderTemplateHeaderLinesOneText","linesAddedToOrderTemplateHeaderLinesFormatText","linesAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateCustomPriceAlertMessageText","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","_this$props$data$feat2","_this$props$data$feat3","_this$props$data$cata","wishlists","modules","storeSelectorId","CartLineItems","storeSelectorModuleId","productDeliveryOptions","deliveryOptions","catalogs","isStockCheckEnabled","enableStockCheck","maxCartlineQuantity","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","shouldIgnoreWarehouse","warehouseAggregation","gridSettings","retailMulitplePickupFeatureState","sizeString","productDimensionTypeSize","colorString","productDimensionTypeColor","configString","productDimensionTypeConfiguration","styleString","productDimensionTypeStyle","amountString","productDimensionTypeAmount","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","discountStringText","shippingChargesText","shippingCharges","salesAgreementPricePrompt","priceEditorResources","addToWishlistButtonText","removeFromWishlistButtonText","removeButtonText","removeCartButtonText","shipItText","shipInsteadDisplayText","pickitUpText","pickItUpDisplayText","changeStoreText","changeStoreDisplayText","storeSelectorStateManager","outOfStockText","outOfRangeOneText","errorMessageOutOfRangeOneLeft","outOfRangeFormatText","errorMessageOutOfRangeFormat","orgUnitLocations","updateCartLinesQuantitySuccessHandler","locationChangedHandler","defaultWishlistName","includeErrors","showOutOfStockErrors","showShippingChargesForLineItems","itemAddedToOrderTemplateDialogResources","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateMessage","addItemToOrderTemplateError","productAvailability","isAbsoluteUrl","urlCheck","returnURL","MsDyn365","isBrowser","window","location","origin","includes","_featureStatuses$find2","featureStatuses","_featureStatuses$find","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","IsB2b","_featureStatuses$find3","isChannelLimitsFeatureEnabledInHq","_this$props$data$feat4","_featureState$result3","_this$props$data$chan","_this$props$data$cata2","_this$props$data$chan2","_this$props$data$cart5","cartLinesPickUpOptions","__decorate","observer","_renderCartlines","cartEmptyText","_cartLine$cartlineId","cartlineId","pickUpInStore","Node","ContainerProps","defaultComponent","addToOrderTemplate","remove","addToWishlist","renderCartLinesGroupHeader","pickUpText","shippingText","emailShippingText","titleSeparate","_cartLine$pickUpInSto4","groupTitle","isBopisSelected","StringExtensions","isNullOrEmpty","toLowerCase","renderCartLinesGroupTitle","_cartLine$pickUpInSto","_cartLine$pickUpInSto2","_cartLine$pickUpInSto3","deliveryOption","orgUnitName","_props$cart","_props$cart2","errorData","renderModuleAttributes","promotionMessageWrapper","promotionMessage","promotionSeeAllLink","promotionDialog","_props$context$action","emailshippingText","emptyCartText","renderCartLinesGroup","_renderInvoiceSummarylines","invoiceSummaryLines","_renderOrderSummarylines","orderSummaryLines","_assembleNode","foundProductAvailability","_foundProductAvailabi","_product$Dimensions","_props$cartState","_context$request$chan","nameOfWishlist","availableQuantityInStock","ProductAvailableQuantity","IsProductAvailable","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","shouldSkipStockCheck","errorMessage","_getErrorMessage","currentQuantity","lineId","_props$productAvailab","finalErrorMessages","replace","checkForErrors","errorsFoundByLineId","i","validation","join","Quantity","onRemoveClickHandler","onRemoveClickFunction","payload","TelemetryEvent","RemoveFromCart","attributes","inventoryLbl","StockLevelLabel","inventoryCode","StockLevelCode","isCustomPriceSelected","Dimensions","dimension","DimensionTypeValue","DimensionValue","Value","productUrl","getProductUrlSync","_cartline$CatalogId","fullUrl","URL","searchParams","set","CatalogId","getInvoiceDetailsPageUrlSync","Description","CartLineItemComponent","isOutOfStock","isQuantityEditable","quantityOnChange","primaryImageUrl","PrimaryImageUrl","inventoryInformationLabel","inventoryLabelClassName","isCartStateReady","PickUpInStore","shipitText","pickUpInStoreText","onClick","AddToWishlistComponent","showButtonText","showStatusMessage","showRemoveButton","showButtonTooltip","ariaRole","onSuccess","AddToOrderTemplateComponent","shouldShowButtonFailedTooltip","disableButton","disableTooltip","isPickUpItem","isCartLineItemPickUpType","_productAvailability$","_productAvailability$2","_cartline$WarehouseId","InventLocationId","toUpperCase","_toggleBOPIS","openDialog","alreadySelectedLocation","OrgUnitNumber","onLocationSelected","orgUnitLocation","updateCartLinePickupLocation","_onLocationChangedCallback","ShippingAddress","clearCartLinePickupLocation","_getOrgUnitName","fulfillmentStoreId","foundLocation","OrgUnitName","DeliveryOptions","_props$channelDeliver","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","delivery","pickup","deliveryCode","Code","option","callbacks","toggleBopis","_renderShippingMethod","pickupInStoretext","bopisSelected","toggleBOPIS","type","onChange","value","checked","_getDeliveryOption","pickupStore","_deliveryOptions$Deli","titleId","tabIndex","role","Modal","toggle","ModalHeader","ModalBody","_promotion","_promotion$Promotion","Promotion","OfferName","ModalFooter"],"sourceRoot":""}