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,aAAaC,IAAI,YAAa,GAAqB,QAArBJ,EAAGvZ,EAAS4Z,iBAAS,IAAAL,EAAAA,EAAI,KAC/DtW,EAAauW,EAAQpU,KAGzB,MAAO,CACHzI,KAAM,CACF7B,QAAAA,EACAkF,SAAAA,GAEJ+P,WAAW6I,IAAiBlc,EAAMwX,sBAAsBlU,EAASjD,SAAYsb,EAC7ErY,SACItE,EAAAA,cAAC4G,EAAAA,sBAAqB,CAClB3F,KAAM,CACFC,SAAUoD,EACVlF,QAAAA,EACAsa,SAAU1Y,EAAM0Y,UAEpByE,gBAAiB7Z,EAASjD,SAC1Bsb,YAAaA,EACbrR,eAAe4R,IAAiBlc,EAAMwX,sBAAsBgE,GAA4B,EACxFvS,aAAcA,EACd5B,cAAeA,EACf5G,GAAIA,EACJC,SAAUA,EACV6F,WAAYA,EACZ/F,QAASA,EACTiE,UAAWA,EACXxF,IAAK,GAAGiC,KAASqF,IACjBkE,oBAAoB,EACpB3B,gBAAiB1K,EAAQgf,gBACzB5W,YAAY,UACZiB,iBAAkBzH,EAAMyH,iBACxBpE,4BAA6BrD,EAAMqD,4BACnCga,iBAAkB9D,EAAwBjW,EAAUtD,KAG5Dsd,OACIte,EAAAA,cAAC4W,EAAAA,OAAMtM,OAAAC,OAAA,CACHpK,UAAU,6BACVoe,QAASjB,EACTjT,MAAO+O,GACHqE,GAEHrE,GAGToF,cAAepD,EAAqB9W,EAAUtD,KAgGtCqb,CACI/X,EACAlF,EACA4B,EACAkB,EACwB,QADnB2Z,EACLD,SAAwB,IAAAC,OAAA,EAAxBA,EAA0BM,8BAOnCR,IAvCH3a,EAAMQ,QAAQuM,UAAUD,MAAM,kDACvB,OA6CFsK,EAAuBpX,IAChC,MAAM,SAAE4M,EAAQ,UAAEiB,GAAc7N,EAChC,OAAO0a,EAAmB7M,EAAWjB,EAAU5M","sources":["webpack://Msdyn365.Commerce.Online/./src/themes/dlvry-adventureworks/views/components/cartlineitem.component.tsx?1d54","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/utils/get-products-in-mini-cart.ts?3c15","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.tsx?4ae8","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/components/flyout-cart-line-items.tsx?f2c4"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { ICartLinePriceEditorResources } from '@msdyn365-commerce/components';\r\nimport { IComponentProps, IGridSettings, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n DiscountLine,\r\n DiscountLineType,\r\n ProductCatalog,\r\n ProductDimensionType,\r\n SalesLine,\r\n SimpleProduct,\r\n UnitOfMeasureConversion\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ArrayExtensions, StringExtensions, getFallbackImageUrl, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { UnitOfMeasure } from '../../../../components/unit-of-measure';\r\nimport ProductListOrderQuantity from '../../../../components/common/product-list-order-quantity';\r\nimport { ProductError, ProductPriceExt, SimpleProductExt } from '../../../../shared-utils/types';\r\nimport DiscountBadge from '../../../../components/discount-badge/discount-badge';\r\nimport PriceComponent, { getDiscountLines, getDiscountPercentage, getOriginalPrice } from './price.component';\r\n\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs.\r\n */\r\nexport interface ICartlineResourceString {\r\n /**\r\n * Display string for discount label.\r\n */\r\n discountStringText: string;\r\n\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n quantityDisplayString: string;\r\n\r\n /**\r\n * Display string for quantity label.\r\n */\r\n inputQuantityAriaLabel: string;\r\n\r\n /**\r\n * Aria label for the decrement button in quantity component.\r\n */\r\n decrementButtonAriaLabel: string;\r\n\r\n /**\r\n * Aria label for the increment button in quantity component.\r\n */\r\n incrementButtonAriaLabel: string;\r\n\r\n /**\r\n * Original text screenreader.\r\n */\r\n originalPriceText: string;\r\n\r\n /**\r\n * Current text screenreader.\r\n */\r\n currentPriceText: string;\r\n\r\n /**\r\n * Shipping Charges Text.\r\n */\r\n shippingChargesText: string;\r\n\r\n /**\r\n * Price Editor Charges Text.\r\n */\r\n priceEditorResources?: ICartLinePriceEditorResources;\r\n\r\n /**\r\n * Sales agreement price prompt text.\r\n */\r\n salesAgreementPricePrompt?: string;\r\n\r\n /**\r\n * Shipping text.\r\n */\r\n shippingText?: string;\r\n\r\n /**\r\n * Confirmed Ship Date Label.\r\n */\r\n confirmedShipDateLabel?: string;\r\n}\r\n\r\n/**\r\n * Represents cart line data interface.\r\n */\r\ninterface ICartLineData {\r\n cartLine: CartLine | SalesLine;\r\n cartState?: ICartState;\r\n product?: SimpleProduct;\r\n catalogs?: ProductCatalog[];\r\n availability?: IProductInventoryInformation;\r\n unitConversions?: UnitOfMeasureConversion[];\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem.\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /**\r\n * The flag to change the quantity component from interactible to static.\r\n */\r\n disableQuantityInteractivity?: boolean;\r\n\r\n /**\r\n * The primary image url.\r\n */\r\n primaryImageUrl?: string;\r\n\r\n /**\r\n * The product error.\r\n */\r\n productError?: ProductError;\r\n\r\n /**\r\n * The product url.\r\n */\r\n productUrl?: string;\r\n\r\n /**\r\n * GridSettings for the product image in cartLine.\r\n */\r\n gridSettings: IGridSettings;\r\n\r\n /**\r\n * ImageSettings for the product image in cartLine.\r\n */\r\n imageSettings: IImageSettings;\r\n\r\n /**\r\n * Boolean flag to indicate if the item is out of stock.\r\n */\r\n isOutOfStock?: boolean;\r\n\r\n /**\r\n * Flag to make quantity section editable.\r\n */\r\n isQuantityEditable?: boolean;\r\n\r\n /**\r\n * Max quantity for line item.\r\n */\r\n maxQuantity?: number;\r\n\r\n /**\r\n * Current quantity for line item.\r\n */\r\n currentQuantity?: number;\r\n\r\n /**\r\n * Resource string for the component.\r\n */\r\n resources: ICartlineResourceString;\r\n\r\n /**\r\n * SalesLine flag.\r\n */\r\n isSalesLine?: boolean;\r\n\r\n /**\r\n * Error message to show in place of quantity.\r\n */\r\n errorMessage?: string;\r\n\r\n /**\r\n * Display mode to use.\r\n */\r\n displayMode?: CartLineDisplayMode;\r\n\r\n /**\r\n * Inventory information label.\r\n */\r\n inventoryInformationLabel?: string;\r\n\r\n /**\r\n * Inventory information class name.\r\n */\r\n inventoryLabelClassName?: string;\r\n\r\n /**\r\n * Flag to show/hide shipping charges for line items.\r\n */\r\n showShippingChargesForLineItems?: boolean;\r\n\r\n /**\r\n * Boolean flag to indicate if cart state status is ready.\r\n */\r\n isCartStateReady?: boolean;\r\n\r\n /**\r\n * Chanel Delivery Option configuration is from api.\r\n */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n /**\r\n * The telemetry content.\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n\r\n /**\r\n * The cart line index.\r\n */\r\n lineIndex?: number;\r\n\r\n /**\r\n * The cart line delivery location.\r\n */\r\n deliveryLocation?: string;\r\n\r\n /**\r\n * Quantity onChange callback.\r\n */\r\n quantityOnChange?(cartLine: CartLine, newQuantity: number, lineIndex?: number): void;\r\n priceCurrency?: string;\r\n\r\n /**\r\n * Sales line confirmed ship date.\r\n */\r\n confirmedShipDate?: string;\r\n}\r\n\r\n/**\r\n * Represents dimensions strings.\r\n */\r\ninterface IDimensionStrings {\r\n /**\r\n * String for size key.\r\n */\r\n sizeString: string;\r\n\r\n /**\r\n * String for color key.\r\n */\r\n colorString: string;\r\n\r\n /**\r\n * String associated with the configuration product dimension.\r\n */\r\n configString: string;\r\n\r\n /**\r\n * String for style key.\r\n */\r\n styleString: string;\r\n\r\n /**\r\n * String for amount key.\r\n */\r\n amountString?: string;\r\n}\r\n\r\nconst cartLineItemFunctions = {\r\n /**\r\n * Render product dimensions.\r\n * @param product - Product data.\r\n * @param dimensionStrings - Dimension strings interface.\r\n * @returns JSX Element.\r\n */\r\n renderProductDimensions: (product: SimpleProduct, dimensionStrings: IDimensionStrings) => {\r\n if (!product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return product.Dimensions.map(productDimension => {\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Color) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.colorString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Configuration) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.configString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Size) {\r\n return (\r\n
\r\n \r\n {dimensionStrings.sizeString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === ProductDimensionType.Style) {\r\n return (\r\n
\r\n \r\n {product.IsGiftCard ? dimensionStrings.amountString : dimensionStrings.styleString}\r\n {': '}\r\n {productDimension.DimensionValue?.Value}\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n\r\n /**\r\n * Gets the react node for product unit of price display.\r\n * @param props - The cart line props.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n renderProductUnitPrice: (props: ICartLineProps) => {\r\n if (!props.data.cartLine.Price) {\r\n return null;\r\n }\r\n const zeroQuantity: number = 0;\r\n return (\r\n
\r\n \r\n zeroQuantity\r\n ? {\r\n price: {\r\n CustomerContextualPrice: props.data.cartLine.Price\r\n }\r\n }\r\n : {\r\n price: {\r\n CustomerContextualPrice: props.data.cartLine.Price\r\n }\r\n }\r\n }\r\n context={props.context}\r\n id={props.id}\r\n typeName={props.typeName}\r\n currencyCode={props.priceCurrency}\r\n />\r\n \r\n
\r\n );\r\n },\r\n\r\n /**\r\n * Render discount lines.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n if (!props.data.cartLine.DiscountLines || !ArrayExtensions.hasElements(props.data.cartLine.DiscountLines)) {\r\n return null;\r\n }\r\n\r\n /**\r\n * Get the updated discount percentage.\r\n * @param discountLine - The discount line.\r\n * @param cartLine - The cart line.\r\n * @returns The updated discount percentage.\r\n */\r\n const discountPercent = (discountLine: DiscountLine, cartLine: CartLine): number => {\r\n const numberZero = 0;\r\n const decimalPrecision = 2;\r\n const fullPercentage = 100;\r\n let updatedPercent: number = discountLine.Percentage ?? numberZero;\r\n\r\n if (\r\n (discountLine.Percentage === numberZero ||\r\n (discountLine.DiscountLineTypeValue && discountLine.DiscountLineTypeValue === DiscountLineType.TenderTypeDiscount)) &&\r\n cartLine.Price &&\r\n cartLine.Price > numberZero &&\r\n cartLine.Quantity &&\r\n cartLine.Quantity !== numberZero\r\n ) {\r\n const effectiveAmount = discountLine.EffectiveAmount ?? numberZero;\r\n updatedPercent = Number(\r\n ((effectiveAmount / (cartLine.Price * cartLine.Quantity)) * fullPercentage).toFixed(decimalPrecision)\r\n );\r\n }\r\n\r\n return updatedPercent;\r\n };\r\n\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n {discountLine.OfferName ? discountLine.OfferName : ''}\r\n \r\n \r\n \r\n \r\n {` (${discountLine.Percentage !== undefined ? discountPercent(discountLine, props.data.cartLine) : ''}%)`}\r\n \r\n
\r\n );\r\n });\r\n },\r\n\r\n /**\r\n * Render inventory label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n const availabilityClass = props.data.availability\r\n ? (props.data.availability?.IsProductAvailable\r\n ? 'available' : 'not-available')\r\n : '';\r\n const inventoryCssName = props.inventoryLabelClassName\r\n ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName} ${availabilityClass}`\r\n : `msc-cart-line__product-inventory-label ${availabilityClass}`;\r\n\r\n return

{props.inventoryInformationLabel}

;\r\n },\r\n\r\n /**\r\n * Render shipping label.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\r\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\r\n const cartline = props.data.cartLine;\r\n let hasShippingMethod = false;\r\n if (channelDeliveryOptionConfig !== undefined) {\r\n hasShippingMethod = !!(\r\n cartline.DeliveryMode &&\r\n channelDeliveryOptionConfig.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode)\r\n );\r\n } else {\r\n hasShippingMethod = !!(cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode);\r\n }\r\n if (!hasShippingMethod) {\r\n return undefined;\r\n }\r\n\r\n const shippingChargeLines = (cartline.ChargeLines ?? []).filter(chargeLine => chargeLine.IsShipping);\r\n\r\n if (!ArrayExtensions.hasElements(shippingChargeLines)) {\r\n return undefined;\r\n }\r\n\r\n const defaultCharge: number = 0;\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount ?? defaultCharge);\r\n }, defaultCharge);\r\n\r\n const priceComponent = (\r\n \r\n );\r\n return (\r\n <>\r\n \r\n {priceComponent}\r\n \r\n );\r\n },\r\n\r\n /**\r\n * Render other charges.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines?.filter(chargeline => !chargeline.IsShipping);\r\n\r\n return (\r\n otherCharges?.map((otherCharge, index) => {\r\n const itemIndex = index;\r\n return otherCharge.CalculatedAmount ? (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n ) : (\r\n ''\r\n );\r\n }) ?? undefined\r\n );\r\n },\r\n\r\n /**\r\n * Render the sales agreement prompt.\r\n * @param props - The ICartLineProps.\r\n * @returns The JSX.Element.\r\n */\r\n renderSalesAgreementPrompt: (props: ICartLineProps): JSX.Element | null => {\r\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- We use 0 to indicate no sales agreement applied on the cart line.\r\n if (props.data.cartLine.SalesAgreementLineRecordId === 0) {\r\n return null;\r\n }\r\n return
{props.resources.salesAgreementPricePrompt}
;\r\n },\r\n\r\n renderConfirmedShipDate: (props: ICartLineProps) => {\r\n if (!props.isSalesLine || props.confirmedShipDate === undefined || StringExtensions.isNullOrEmpty(props.confirmedShipDate)) {\r\n return null;\r\n }\r\n return (\r\n
\r\n {props.resources.confirmedShipDateLabel}\r\n {props.confirmedShipDate}\r\n
\r\n );\r\n }\r\n};\r\n\r\n/**\r\n * Render cartline component.\r\n * @param props - The cart line props.\r\n * @returns JSX element.\r\n */\r\n// eslint-disable-next-line no-redeclare\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { isSalesLine, productUrl, resources, displayMode } = props;\r\n const { product, cartLine } = props.data;\r\n const quantity = cartLine.Quantity || 1;\r\n const [stateQuantity, setStateQuantity] = React.useState(quantity);\r\n const fallbackImageUrl =\r\n product &&\r\n getFallbackImageUrl(\r\n product.ItemId,\r\n props.context.actionContext.requestContext.apiSettings,\r\n props.context.request.app?.config?.OmniChannelMedia\r\n );\r\n const imageSettings = props.imageSettings;\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n const renderInventoryLabel = cartLineItemFunctions.renderInventoryLabel(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const productAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name ?? cartLine.Description;\r\n const imgeClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-image' : 'msc-cart-line__product-image';\r\n const cartLineContentClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-content' : 'msc-cart-line__content';\r\n\r\n React.useEffect(() => setStateQuantity(quantity), [props.data.cartLine.Quantity]);\r\n\r\n /**\r\n * Render other charges.\r\n * @param newValue - The cart line props.\r\n * @returns Boolean.\r\n */\r\n const onChange = (newValue: number) => {\r\n setStateQuantity(newValue);\r\n\r\n if (props.quantityOnChange) {\r\n props.quantityOnChange(props.data.cartLine, newValue);\r\n }\r\n };\r\n\r\n /**\r\n * Generate error message.\r\n * @returns JSX element.\r\n */\r\n const generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Render Saving component.\r\n * @returns JSX element.\r\n */\r\n // @ts-ignore\r\n const renderSaving = (): JSX.Element | null => {\r\n if (!props.data.cartLine.DiscountAmount) {\r\n return null;\r\n }\r\n const discountAmountZero: number = 0;\r\n\r\n if (props.data.cartLine.DiscountAmount > discountAmountZero) {\r\n return (\r\n <>\r\n {`${props.resources.discountStringText || 'Discount'}`}\r\n \r\n \r\n );\r\n }\r\n return null;\r\n };\r\n\r\n /**\r\n * Gets the react node for product unit of measure display.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\n const renderUnitOfMeasure = (asSpan: boolean = false) => {\r\n if (props.data.cartLine.IsInvoiceLine) {\r\n return null;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\r\n if (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none') {\r\n return undefined;\r\n }\r\n\r\n if (!product || !product.DefaultUnitOfMeasure) {\r\n return undefined;\r\n }\r\n\r\n if (asSpan) {\r\n return (\r\n \r\n \r\n \r\n );\r\n } else {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n };\r\n\r\n /**\r\n * Generate quantity and price component.\r\n * @returns JSX element.\r\n */\r\n const generatePrice = (): JSX.Element | null => {\r\n let price = isSalesLine\r\n ? {\r\n CustomerContextualPrice: (props.data.cartLine as SalesLine).NetAmountWithAllInclusiveTax,\r\n BasePrice: (props.data.cartLine as SalesLine).GrossAmount\r\n } : {\r\n CustomerContextualPrice: (props.data.cartLine.Price || 0) * quantity, // This is shown in mini cart\r\n BasePrice: 0 // props.data.cartLine.NetPrice\r\n } as ProductPriceExt;\r\n const productPrice = (props.data.product as SimpleProductExt | undefined)?.ProductPrice;\r\n\r\n if (productPrice) {\r\n // price.CustomerContextualPrice = (productPrice.CustomerContextualPrice || 0) * quantity;\r\n\r\n // Only set the base price if there is an explicit discount\r\n if (getDiscountLines(productPrice.DiscountLines).length > 0) {\r\n price.BasePrice = getOriginalPrice(productPrice) * quantity;\r\n price.OverrideDiscountPercentage = getDiscountPercentage(price);\r\n }\r\n }\r\n\r\n const priceElement = (\r\n
\r\n \r\n {/* {renderSaving()} */}\r\n {props.isOutOfStock ? renderInventoryLabel : null}\r\n
\r\n );\r\n\r\n return priceElement;\r\n };\r\n\r\n const generateQuantity = (): JSX.Element | null => {\r\n const singleQuantity: number = 1;\r\n\r\n let quantityElement: JSX.Element | null = null;\r\n\r\n // No quantity selector for invoice line\r\n if (!props.data.cartLine.IsInvoiceLine) {\r\n if (props.data.product && props.isQuantityEditable) {\r\n quantityElement = (\r\n
\r\n {/*
{resources.quantityDisplayString}
*/}\r\n\r\n {generateErrorMessage()}\r\n\r\n \r\n\r\n {/* {renderUnitOfMeasure()} */}\r\n
\r\n );\r\n } else {\r\n quantityElement = (\r\n \r\n \r\n\r\n {generateErrorMessage()}\r\n\r\n {props.data.cartLine.Quantity}\r\n {' '}\r\n {renderUnitOfMeasure(true)}\r\n \r\n );\r\n }\r\n }\r\n\r\n return quantityElement;\r\n };\r\n\r\n // @ts-expect-error\r\n const _renderStoreLocation = (): JSX.Element | null => {\r\n if (cartLine && cartLine.FulfillmentStoreId) {\r\n return (\r\n
\r\n {props.deliveryLocation}\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n {props.deliveryLocation}\r\n
\r\n );\r\n }\r\n };\r\n\r\n const badge = (props.data.product as SimpleProductExt | undefined)?.Badge;\r\n\r\n return (\r\n
\r\n {(displayMode === undefined || displayMode === 'DEFAULT') && (\r\n \r\n \r\n )}\r\n
\r\n
\r\n {props.productError?.Error && (\r\n \r\n )}\r\n \r\n {productName}\r\n \r\n {generatePrice()}\r\n
\r\n {renderInventoryLabel}\r\n {generateQuantity()}\r\n
\r\n {(displayMode !== 'COMPACT' && badge) && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride(\r\n 'CartLineItem',\r\n {\r\n component: CartLine,\r\n ...cartLineItemFunctions\r\n }\r\n);\r\n\r\nexport default CartLineItemComponent;\r\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 { ICartState } from '@msdyn365-commerce/global-state';\nimport { ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n ActiveCartProductsInput,\n getActiveCartProductsAction,\n getAvailabilitiesForCartLineItems,\n getDeliveryOptionsForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n ProductDeliveryOptionsForCartLineItems\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * IMiniCartData entity interface.\n */\nexport interface IMiniCartData {\n products?: SimpleProduct[];\n productAvailabilites?: IProductInventoryInformation[];\n deliveryOptions?: ProductDeliveryOptions[];\n}\n\nexport const createInput = () => {\n return new ActiveCartProductsInput();\n};\n\n/**\n * Calls the Retail API and returns a mini cart data.\n * @param ctx\n * @param cartState\n */\nexport async function getMiniCartData(ctx: IActionContext, cartState: ICartState): Promise {\n const miniCartData: IMiniCartData = {};\n\n const cart = cartState.cart;\n\n // If there are cart lines, make call to get products\n // If there are invocie linese, then there is no products, so don't make call to get products\n if (cart && cart.CartLines && cart.CartLines.length > 0 && !cartState.hasInvoiceLine) {\n await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx)\n .then(products => {\n if (products) {\n miniCartData.products = products;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getAvailabilitiesForCartLineItems(new ProductAvailabilitiesForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(availableQuantity => {\n if (availableQuantity) {\n miniCartData.productAvailabilites = availableQuantity;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getDeliveryOptionsForCartLineItems(new ProductDeliveryOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(deliveryOptions => {\n if (deliveryOptions) {\n miniCartData.deliveryOptions = deliveryOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n }\n\n return miniCartData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToCartBehavior, CartIconComponent } from '@msdyn365-commerce/components';\nimport { getUrlSync, IDictionary, IImageSettings, msdyn365Commerce, TelemetryEvent } from '@msdyn365-commerce/core';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n CartLineValidationResultsByLineId,\n OrgUnitLocation\n} from '@msdyn365-commerce/retail-proxy';\nimport { validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\nimport { ArrayExtensions, validateCartLinesInventory } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n UncontrolledTooltip,\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';\n\nimport { ICartIconData } from './cart-icon.data';\nimport { cartLinesSortOrder, ICartIconProps } from './cart-icon.props.autogenerated';\nimport { FlyoutCartLineItems, IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\nimport { getMiniCartData, IMiniCartData } from './utils/get-products-in-mini-cart';\n\nexport interface IMiniCartState {\n miniCartData: IMiniCartData;\n orgUnitLocations?: OrgUnitLocation[];\n isQuantityLimitsFeatureEnabled: boolean;\n isCartValid: boolean;\n}\n\nexport interface ICartIconViewProps extends ICartIconProps {\n className: string;\n cartIcon: React.ReactNode;\n FlyoutContainer?: INodeProps;\n CartlinesWrapper: INodeProps;\n miniCartWrapper: INodeProps;\n miniCartItemWrapper: INodeProps;\n cartlines?: IFlyoutCartLineItemViewProps[];\n flyoutTitle: React.ReactNode;\n totalPrice: React.ReactNode;\n checkoutAsGuestButton?: React.ReactNode;\n checkoutAsSignInUserButton?: React.ReactNode;\n goToCartButton?: React.ReactNode;\n waitingComponent?: React.ReactNode;\n isCartLoading: boolean;\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\n/**\n *\n * Cart component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass CartIcon extends React.Component, IMiniCartState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutBySignInAttributes: IDictionary | undefined;\n\n private readonly checkoutByGuestAttributes: IDictionary | undefined;\n\n private readonly viewShoppingBagAttributes: IDictionary | undefined;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private lastValidatedCartVersion: number | undefined;\n\n constructor(props: ICartIconProps) {\n super(props);\n this.state = {\n miniCartData: {},\n isCartValid: true,\n isQuantityLimitsFeatureEnabled: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payload = getPayloadObject(TelemetryEvent.CheckOut, this.telemetryContent, TelemetryConstant.Checkout);\n this.checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.GuestCheckout;\n this.checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.ViewShoppingBag;\n this.viewShoppingBagAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n }\n\n public async componentDidMount(): Promise {\n const context = this.props.context.actionContext;\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n this.setState({\n miniCartData: await getMiniCartData(context, this.props.data.cart.result!)\n });\n }\n );\n await this._setQuantityLimitsFeatureFlag();\n\n this.setState({\n orgUnitLocations: this.props.data.orgUnitLocations?.result\n });\n\n this._validateCart();\n }\n\n public componentDidUpdate(prevProps: ICartIconProps): void {\n this._validateCart();\n }\n\n public shouldComponentUpdate(nextProps: ICartIconProps, nextState: IMiniCartState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n config: { enableHoverCart, isAnonymousCheckout },\n context: {\n request: {\n user: { isAuthenticated, signInUrl }\n }\n },\n context,\n resources\n } = this.props;\n\n const cart = (this.props.data.cart && this.props.data.cart.result) || undefined;\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const cartUrl = getUrlSync('cart', 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 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- check config.\n const shouldShowMiniCart =\n cart?.isProductAddedToCart && this.props.context.app.config.addToCartBehavior === AddToCartBehavior.showMiniCart;\n const hasInvoiceLine = cart?.hasInvoiceLine;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n const cartLines = this._getCartLines();\n const validInventoryAcrossCartLines = validateCartLinesInventory(\n cart?.cart.CartLines ?? [],\n this.state.miniCartData.productAvailabilites ?? [],\n this.props.context.actionContext,\n this.state.miniCartData.products ?? [],\n emailDeliveryModeCode\n );\n const hasError =\n !validInventoryAcrossCartLines?.isValid ||\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\n const includeFlyout = this.props.data.cart && this.props.data.cart.status === 'SUCCESS' && enableHoverCart;\n const totalItemsInCart = cart?.totalItemsInCart ? cart.totalItemsInCart : 0;\n const goToCartButtonText = resources.goToCartButtonTitle.replace('{count}', totalItemsInCart.toString());\n const flyoutTitle = resources.flyoutTitle;\n const flyoutTooltip = {\n tag: UncontrolledTooltip,\n shouldShowMiniCart,\n placement: 'bottom-end',\n hideArrow: true,\n className: 'ms-cart-icon__flyout-container',\n trigger: 'hover',\n displayMode: 'FLYOUT',\n target: id,\n shouldShowCloseButton: true,\n cartPageUrl: cartUrl,\n hideAriaHidden: true\n };\n\n // If there are invoice lines, don't update mini cart price\n const price = (cart && !cart.hasInvoiceLine && cart.cart.TotalAmount) || undefined;\n const priceString = price\n ? resources.totalPriceFormatString.replace('{price}', context.cultureFormatter.formatCurrency(price))\n : '';\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n const viewProps = {\n ...this.props,\n cartIcon: (\n \n ),\n cartlines: cartLines,\n FlyoutContainer: includeFlyout ? flyoutTooltip : undefined,\n CartlinesWrapper: {\n className: 'ms-cart-icon__cart-lines'\n },\n miniCartWrapper: {\n className: classnames('ms-cart-icon'),\n id: this.props.id\n },\n miniCartItemWrapper: {\n className: classnames('msc-cart-lines-item')\n },\n\n // If there are invoice lines, don't update mini cart checkout button\n // Checkout button will display by default to maintain backward compatibility. When Anonymous user checkout is enabled &&\n // user is authenticated then we will show the checkout button otherwise we will show the guest checkout button.\n checkoutAsSignInUserButton:\n !isCartEmpty && !hasInvoiceLine && (!isAnonymousCheckout || isAuthenticated) ? (\n \n {resources.checkoutButtonTitle}\n \n ) : null,\n checkoutAsGuestButton:\n isAnonymousCheckout && !isCartEmpty && !isAuthenticated ? (\n \n {resources.guestCheckoutButtonTitle}\n \n ) : null,\n goToCartButton: (\n \n {goToCartButtonText}\n \n ),\n checkoutBlockedDueToUnavailableFunds: null,\n flyoutTitle: {flyoutTitle},\n totalPrice:
{priceString}
\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _validateCart(): void {\n const {\n data: { cart }\n } = this.props;\n const cartVersion = cart.result?.cart?.Version ?? undefined;\n if (this.lastValidatedCartVersion === cartVersion) {\n return;\n }\n\n this.lastValidatedCartVersion = cartVersion; // This field is populated to block concurrent requests\n\n if (this.state.isQuantityLimitsFeatureEnabled) {\n validateCartAsync(cart, this.props.telemetry, this.props.context)\n .then((result: CartLineValidationResultsByLineId | undefined) => {\n this.setState({ isCartValid: !ArrayExtensions.hasElements(result?.ValidationResultsPairs) });\n })\n .catch(() => {\n this.setState({ isCartValid: false });\n });\n } else {\n this.setState({ isCartValid: true });\n }\n }\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 (msdyn365Commerce.isBrowser && !isAbsoluteUrl) {\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\n }\n\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\n }\n\n /**\n * Sort cartline items.\n * @param cartlines - Cartlines to be sorted.\n * @param sortOrder - Ascending or descending.\n * @returns - Sorted cartlines.\n */\n private readonly getSortedCartLines = (cartlines: CartLine[], sortOrder?: cartLinesSortOrder): CartLine[] => {\n const lines: CartLine[] = [...cartlines];\n const zero: number = 0;\n\n if (sortOrder === cartLinesSortOrder.descending) {\n return lines.sort((item1, item2) => (item2.LineNumber ?? zero) - (item1.LineNumber ?? zero));\n }\n return lines.sort((item1, item2) => (item1.LineNumber ?? zero) - (item2.LineNumber ?? zero));\n };\n\n private _getCartLines(): IFlyoutCartLineItemViewProps[] | null {\n const {\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n },\n config,\n telemetry,\n resources\n } = this.props;\n\n const imageSettings = this._getImageSettings(config.imageSettings);\n const cart = this.props.data.cart && this.props.data.cart.result;\n\n // Cart-icon could be placed in each page\n // so we check cart content to reduce number of RS calls\n return this.state.miniCartData.products && cart && cart.cart.CartLines && cart.cart.CartLines.length > 0\n ? FlyoutCartLineItems({\n cartlines: this.getSortedCartLines(cart.cart.CartLines, config.cartLinesSortOrder),\n products: this.state.miniCartData.products,\n productAvailabilites: this.state.miniCartData.productAvailabilites,\n productDeliveryOptions: this.state.miniCartData.deliveryOptions,\n imageSettings,\n outOfStockThreshold: this.props.context.app.config.outOfStockThreshold || 0,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\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 quantityDisplayString: resources.quantityDisplayText,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n inputQuantityAriaLabel: '', // Not used\n discountStringText: '', // Not used\n originalPriceText: '',\n currentPriceText: '',\n shippingChargesText: '',\n shippingText: resources.shippingText\n },\n telemetry,\n removeButtonText: resources.removeCartButtonText,\n outOfStockText: '', // Not used\n outOfRangeOneText: '', // Not used\n outOfRangeFormatText: '', // Not used\n cartState: cart,\n orgUnitLocations: this.state.orgUnitLocations,\n removeItemClickHandler: this._removeItemFromCartHandler,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n telemetryContent: this.telemetryContent,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined,\n isQuantityLimitsFeatureEnabled: this.state.isQuantityLimitsFeatureEnabled,\n catalogs: this.props.data.catalogs?.result\n })\n : null;\n }\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 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.removeCartLines(input).catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to Remove Cart Line');\n });\n }\n };\n\n private async _setQuantityLimitsFeatureFlag(): Promise {\n const featureStatuses = await this.props.data.featureState;\n\n const isChannelQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n if (isChannelQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n return;\n }\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (!defaultOrderQuantityLimitsFeatureConfig || defaultOrderQuantityLimitsFeatureConfig === 'none') {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n\n try {\n const featureStatuses = await this.props.data.featureState;\n const isQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n if (!isQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get feature states');\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n } else {\n this.props.data.customerInformation\n .then(customerInfo => {\n const result =\n !!customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n this.setState({ isQuantityLimitsFeatureEnabled: result });\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get customer info');\n });\n }\n }\n}\n\nexport default CartIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent, ICartlineResourceString } from '@msdyn365-commerce/components';\nimport MsDyn365, { ICoreContext, IGridSettings, IImageSettings, ITelemetry, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n OrgUnitLocation,\n ProductAvailableQuantity,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '../../../Common/get-product';\n\nexport interface IFlyoutCartLineItemsProps {\n cartlines: CartLine[];\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\n /**\n * GridSettings for the product image in cartline\n */\n gridSettings: IGridSettings;\n\n /**\n * ImageSettings for the product image in cartline\n */\n imageSettings: IImageSettings;\n id: string;\n typeName: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n removeButtonText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n maxCartlineQuantity: number;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n isQuantityLimitsFeatureEnabled: boolean;\n\n outOfStockThreshold: number;\n isStockCheckEnabled: boolean;\n telemetryContent?: ITelemetryContent;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\nexport interface IFlyoutCartLineItemViewProps {\n cartline: React.ReactNode;\n remove: React.ReactNode;\n storeLocation: React.ReactNode;\n hasError: boolean;\n\n data: {\n product: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getCartItemAvailableQuantity = (\n isStockCheckEnabled: boolean,\n outOfStockThreshold: number,\n productAvailability?: ProductAvailableQuantity\n): number => {\n if (isStockCheckEnabled) {\n if (\n !productAvailability ||\n !productAvailability.AvailableQuantity ||\n productAvailability.AvailableQuantity <= 0 ||\n productAvailability.AvailableQuantity <= outOfStockThreshold\n ) {\n return 0;\n }\n return productAvailability.AvailableQuantity - outOfStockThreshold;\n }\n\n return 0;\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 is 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\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};\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct,\n props: IFlyoutCartLineItemsProps,\n index: number,\n foundProductAvailability?: ProductAvailableQuantity,\n foundProductDeliveryOptions?: ProductDeliveryOptions\n): IFlyoutCartLineItemViewProps => {\n const { imageSettings, gridSettings, id, typeName, context, resources, removeButtonText, removeItemClickHandler } = props;\n\n const availableQuantityInStock = _getCartItemAvailableQuantity(\n props.isStockCheckEnabled,\n props.outOfStockThreshold,\n 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 // Check if the product is service or not by product type\n const isServiceItem = product.ItemTypeValue === ReleasedProductType.Service;\n\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.RemoveCartItem);\n const removeCartItemAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n let productUrl = getProductUrlSync(product, props.context.actionContext, undefined);\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\n return {\n data: {\n product,\n cartline\n },\n hasError: !isServiceItem && props.isStockCheckEnabled ? cartline.Quantity! > maxQuantity : false,\n cartline: (\n \n ),\n remove: (\n \n {removeButtonText}\n \n ),\n storeLocation: _renderStoreLocation(cartline, props)\n };\n};\n\nconst _renderDeliveryLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): string | undefined => {\n let deliverylocation;\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartLine.ProductId;\n });\n }\n const delivery = foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === cartLine.DeliveryMode);\n const location = delivery?.Description;\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n if (location) {\n deliverylocation = `${location}, ${orgUnitName}`;\n } else {\n deliverylocation = `${orgUnitName}`;\n }\n } else {\n deliverylocation = props.resources.shippingText;\n }\n return deliverylocation;\n};\n\nconst _renderStoreLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): JSX.Element | null => {\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n if (orgUnitName) {\n return (\n
\n {orgUnitName}\n
\n );\n }\n }\n\n return null;\n};\n\nconst _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\nconst _assembleCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: IFlyoutCartLineItemsProps\n): IFlyoutCartLineItemViewProps[] | null => {\n const reactNodes: IFlyoutCartLineItemViewProps[] = [];\n\n if (!products || products.length === 0) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\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 if (props.productAvailabilites && props.productAvailabilites.length > 0) {\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\n return productAvailability.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n }\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n if (product) {\n reactNodes.push(\n _assembleNode(\n cartline,\n product,\n props,\n index,\n foundProductAvailability?.ProductAvailableQuantity,\n foundProductDeliveryOption\n )\n );\n }\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component.\n */\n\nexport const FlyoutCartLineItems = (props: IFlyoutCartLineItemsProps) => {\n const { products, cartlines } = props;\n return _assembleCartlines(cartlines, products, props);\n};\n"],"names":["cartLineItemFunctions","renderProductDimensions","product","dimensionStrings","Dimensions","map","productDimension","_productDimension$Dim","_productDimension$Dim2","_productDimension$Dim3","_productDimension$Dim4","DimensionTypeValue","ProductDimensionType","Color","React","key","RecordId","className","colorString","DimensionValue","Value","Configuration","configString","Size","sizeString","Style","IsGiftCard","amountString","styleString","renderProductUnitPrice","props","data","cartLine","Price","PriceComponent","Quantity","price","CustomerContextualPrice","context","id","typeName","currencyCode","priceCurrency","renderDiscountLines","DiscountLines","ArrayExtensions","hasElements","discountLine","index","_discountLine$OfferId","OfferId","OfferName","isSalesLine","PeriodicDiscount","EffectiveAmount","BasePrice","undefined","Percentage","discountPercent","_discountLine$Percent","updatedPercent","DiscountLineTypeValue","DiscountLineType","TenderTypeDiscount","_discountLine$Effecti","effectiveAmount","Number","toFixed","renderInventoryLabel","_props$data$availabil","availabilityClass","availability","IsProductAvailable","inventoryCssName","inventoryLabelClassName","inventoryInformationLabel","renderShippingLabel","_props$context$reques","_cartline$ChargeLines","pickupDeliveryModeCode","request","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","cartline","hasShippingMethod","_channelDeliveryOptio","DeliveryMode","PickupDeliveryModeCodes","some","deliveryMode","shippingChargeLines","ChargeLines","filter","chargeLine","IsShipping","freightFee","reduce","chargeTotal","_chargeLine$Calculate","CalculatedAmount","priceComponent","freePriceText","resources","shippingChargesText","renderOtherCharges","_cartline$ChargeLines2","_otherCharges$map","otherCharges","chargeline","otherCharge","itemIndex","String","Description","renderSalesAgreementPrompt","SalesAgreementLineRecordId","salesAgreementPricePrompt","renderConfirmedShipDate","confirmedShipDate","StringExtensions","isNullOrEmpty","confirmedShipDateLabel","CartLineItemComponent","msdyn365Commerce","createComponentOverride","_objectSpread","component","_props$context$reques2","_product$Name","_props$data$product2","_props$primaryImageUr","_props$productError","_props$productError2","productUrl","displayMode","quantity","stateQuantity","setStateQuantity","fallbackImageUrl","getFallbackImageUrl","ItemId","actionContext","requestContext","apiSettings","app","config","OmniChannelMedia","imageSettings","cropFocalRegion","payLoad","getPayloadObject","telemetryContent","toString","productAttribute","getTelemetryAttributes","productName","Name","imgeClassName","IsInvoiceLine","cartLineContentClassName","onChange","newValue","quantityOnChange","generateErrorMessage","errorMessage","badge","Badge","toLocaleLowerCase","href","role","Image","src","primaryImageUrl","fallBackSrc","altText","gridSettings","loadFailureBehavior","productError","Error","title","Object","assign","generatePrice","_props$data$product","NetAmountWithAllInclusiveTax","GrossAmount","productPrice","ProductPrice","getDiscountLines","length","getOriginalPrice","OverrideDiscountPercentage","getDiscountPercentage","originalPriceText","currentPriceText","discountPercentageSide","isOutOfStock","generateQuantity","quantityElement","isQuantityEditable","ProductListOrderQuantity","LineId","currentCount","unitConversions","allowZero","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","disabled","isCartStateReady","min","classNames","htmlFor","quantityDisplayString","asSpan","arguments","unitOfMeasureDisplayType","DefaultUnitOfMeasure","UnitOfMeasure","simpleProduct","renderUnitOfMeasure","DiscountBadge","size","async","getMiniCartData","ctx","cartState","miniCartData","cart","CartLines","hasInvoiceLine","getActiveCartProductsAction","ActiveCartProductsInput","then","products","catch","error","telemetry","exception","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","availableQuantity","productAvailabilites","getDeliveryOptionsForCartLineItems","ProductDeliveryOptionsForCartLineItems","deliveryOptions","CartIcon","constructor","super","retailMultiplePickUpOptionEnabled","getSortedCartLines","cartlines","sortOrder","lines","sort","item1","item2","_item2$LineNumber","_item1$LineNumber","LineNumber","_item1$LineNumber2","_item2$LineNumber2","_getImageSettings","viewports","xs","q","w","h","sm","lg","lazyload","_removeItemFromCartHandler","cartlineToRemove","this","result","input","cartLineIds","removeCartLines","warning","debug","state","isCartValid","isQuantityLimitsFeatureEnabled","getTelemetryObject","telemetryPageName","friendlyName","payload","TelemetryEvent","CheckOut","TelemetryConstant","Checkout","checkoutBySignInAttributes","contentAction","etext","GuestCheckout","checkoutByGuestAttributes","ViewShoppingBag","viewShoppingBagAttributes","_this$props$data$orgU","reaction","_this$props$data$cart","setState","_setQuantityLimitsFeatureFlag","orgUnitLocations","_validateCart","componentDidUpdate","prevProps","shouldComponentUpdate","nextProps","nextState","render","_this$props$context$r","_cart$cart$CartLines","_this$state$miniCartD","_this$state$miniCartD2","_this$props$data$chan","_this$props$data$feat","enableHoverCart","isAnonymousCheckout","user","isAuthenticated","signInUrl","guestCheckoutUrl","getUrlSync","cartUrl","checkoutURL","_getCheckoutURL","isCartEmpty","shouldShowMiniCart","isProductAddedToCart","addToCartBehavior","AddToCartBehavior","showMiniCart","emailDeliveryModeCode","EmailDeliveryModeCode","cartLines","_getCartLines","validInventoryAcrossCartLines","validateCartLinesInventory","hasError","isValid","includeFlyout","status","totalItemsInCart","goToCartButtonText","goToCartButtonTitle","replace","flyoutTitle","flyoutTooltip","tag","UncontrolledTooltip","placement","hideArrow","trigger","target","shouldShowCloseButton","cartPageUrl","hideAriaHidden","TotalAmount","priceString","totalPriceFormatString","cultureFormatter","formatCurrency","featureState","find","feature","IsEnabled","viewProps","cartIcon","CartIconComponent","cartLabel","cartQtyLabel","FlyoutContainer","CartlinesWrapper","miniCartWrapper","classnames","miniCartItemWrapper","checkoutAsSignInUserButton","Button","checkoutButtonTitle","checkoutAsGuestButton","guestCheckoutButtonTitle","goToCartButton","checkoutBlockedDueToUnavailableFunds","totalPrice","renderView","_cart$result$cart$Ver","_cart$result","cartVersion","Version","lastValidatedCartVersion","validateCartAsync","ValidationResultsPairs","isAbsoluteUrl","urlCheck","returnURL","isBrowser","window","location","origin","includes","_this$props$data$cata","FlyoutCartLineItems","cartLinesSortOrder","productDeliveryOptions","outOfStockThreshold","isStockCheckEnabled","enableStockCheck","maxCartlineQuantity","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","productDimensionTypeSize","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeStyle","quantityDisplayText","discountStringText","shippingText","removeButtonText","removeCartButtonText","outOfStockText","outOfRangeOneText","outOfRangeFormatText","removeItemClickHandler","catalogs","_featureStatuses$find","_this$props$context","featureStatuses","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find2","customerInformation","customerInfo","IsB2b","__decorate","observer","_renderDeliveryLocation","deliverylocation","FulfillmentStoreId","_foundProductDelivery","orgUnitName","_getOrgUnitName","foundProductDeliveryOption","deliveryOption","ProductId","delivery","DeliveryOptions","option","Code","_renderStoreLocation","fulfillmentStoreId","foundLocation","orgUnitLocation","OrgUnitNumber","OrgUnitName","_assembleCartlines","reactNodes","foundProductAvailability","_foundProductAvailabi","getProductByProductIdAndWarehouse","WarehouseId","getProductByProductId","productAvailability","_productAvailability$","ProductAvailableQuantity","push","_assembleNode","foundProductDeliveryOptions","_product$Behavior","availableQuantityInStock","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","Behavior","MaximumQuantity","isServiceItem","ItemTypeValue","ReleasedProductType","Service","onRemoveClickHandler","onRemoveClickFunction","RemoveCartItem","removeCartItemAttribute","getProductUrlSync","MsDyn365","isChannelTypeB2B","_cartline$CatalogId","fullUrl","URL","searchParams","set","CatalogId","currentQuantity","PrimaryImageUrl","deliveryLocation","remove","onClick","storeLocation"],"sourceRoot":""}