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u9D,EAAgBt+E,UAAU,sBACjCD,IAAAA,cAACwU,EAAAA,KAAI,CAACvU,UAAU,4BACZD,IAAAA,cAAC+F,EAAAA,OAAM,CACH9F,UAAW6f,EAAa,oCAAsC,qCAAoC,aACvF,SACX5Z,QAAS85B,EAAM,gBACAlgB,EACfiiB,SAAU,GAET/+B,EAAU87E,YAEf9+E,IAAAA,cAAA,OAAKC,UAAU,iDAAiDy9E,GAChE19E,IAAAA,cAAA,OAAKC,UAAU,6CACV69E,IAAkB7B,GAAoBM,EAAWuB,KAGzD/B,GAAcj8D,GAAc+8D,EAAcd,GAC3C/7E,IAAAA,cAACwU,EAAAA,KAAI,CAACvU,UAAU,qBACX87E,GAAcj8D,GAAcg9D,EAAoBf,EAAY/7C,EAAQh9B,KAI7EhD,IAAAA,cAACwU,EAAAA,KAAIxO,OAAAC,OAAA,GAAK25E,GACLt8D,EACA3jB,EAAMuK,OAAO20E,wBAA0BvE,EAAe36E,GAASw5E,EAAmBx5E,GAClF69E","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart-icon/aaa_cart-icon.props.autogenerated.ts?ddbf","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart-icon/components/flyout-cart-line-items.tsx?7a9e","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart-icon/utils/get-products-in-mini-cart.ts?38e3","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart-icon/aaa_cart-icon.tsx?9931","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_cart-icon/aaa_cart-icon.view.tsx?f9a9","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/get-invoice-payment-summary.tsx?c632","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/get-line-items.tsx?7fe5","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/get-order-summary.tsx?0fd7","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/guided-card.tsx?2d40","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/guided-form.tsx?5d7f","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/components/place-order-button.tsx?8a97","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/aaa_checkout.tsx?604f","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_checkout/aaa_checkout.view.tsx?435f","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_order_confirmation/components/aaa_order_confirmation-dimensions.tsx?ab89","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_order_confirmation/components/requestOrderLine-item.tsx?60bd","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_order_confirmation/aaa_order_confirmation.tsx?81b5","webpack://Msdyn365.Commerce.Online/./src/modules/aaa_order_confirmation/aaa_order_confirmation.view.tsx?98f7","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/bma-image.tsx?577a","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/bma-price.tsx?8068","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/bma-productAlloy-specification.tsx?4c02","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/order-request-list-dimensions.tsx?8802","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/wishlist-item.tsx?0905","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/components/order-request-list-status-message.tsx?4bfb","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/order-request-list.tsx?ca13","webpack://Msdyn365.Commerce.Online/./src/modules/order-request-list/order-request-list.view.tsx?88a6","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/components/bma-image.tsx?fe33","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/components/saved-design-list-dimensions.tsx?7e7b","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/components/wishlist-item.tsx?8b9b","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/components/saved-design-list-status-message.tsx?ccf4","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/saved-design-list.tsx?2e84","webpack://Msdyn365.Commerce.Online/./src/modules/saved-design-list/saved-design-list.view.tsx?f099","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/aaa_cart-icon.view.tsx?f9bf","webpack://Msdyn365.Commerce.Online/./src/themes/pallionlivadi/views/ratings-histogram.view.tsx?ab53","webpack://Msdyn365.Commerce.Online/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://Msdyn365.Commerce.Online/./src/modules/bulk-purchase/bulk-purchase.view.tsx?feac","webpack://Msdyn365.Commerce.Online/./src/modules/cart-icon/cart-icon.view.tsx?f9dd","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.description.tsx?840c","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-message.tsx?8ca3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-title.tsx?f7e7","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.radio-button.tsx?9df9","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/checkout-delivery-options.tsx?6764","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/checkout-delivery-options.view.tsx?1e75","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-form.tsx?4540","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-item.tsx?d186","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-list.tsx?a3f3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/title.tsx?3b2f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/checkout-gift-card.tsx?8fc3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/checkout-gift-card.view.tsx?d99f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-input.tsx?cadb","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-label.tsx?e02b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-text.tsx?895a","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/checkout-loyalty.tsx?8b4b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/checkout-loyalty.view.tsx?b79f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-invoice-payment-summary.tsx?9549","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.tsx?6737","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.view.tsx?e4cc","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/alert.tsx?cb1e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-line-items.tsx?92f8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-order-summary.tsx?4a81","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-card.tsx?58e0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-form.tsx?f018","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/place-order-button.tsx?9b41","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/checkout.ts?7b6b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/place-order.ts?5aa0","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-form.tsx?e249","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-item.tsx?4862","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.tsx?d1f8","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.view.tsx?a0c9","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/components/cartlineitem.component.tsx?eb8c","webpack://Msdyn365.Commerce.Online/./src/modules/media-gallery/utils/get-valid-product-images.ts?a364","webpack://Msdyn365.Commerce.Online/./src/modules/media-gallery/media-gallery.tsx?24d7","webpack://Msdyn365.Commerce.Online/./src/modules/media-gallery/media-gallery.view.tsx?5061","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/add-to-list/add-to-cart-selected-items.tsx?de21","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-actions.tsx?ca97","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-drawer.tsx?8701","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-form.tsx?5cbb","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-product.ts?187e","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-table/components/quick-order-grid-table-header-component.tsx?69b3","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-table/components/quick-order-grid-table-row-component.tsx?cd92","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/components/quick-order-grid-table/quick-order-grid-table-component.tsx?7cbc","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/quick-order-grid.tsx?fddf","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order-grid/quick-order-grid.view.tsx?f941","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/component/components.tsx?f324","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/ratings-histogram.tsx?f6bc","webpack://Msdyn365.Commerce.Online/./src/modules/ratings-histogram/ratings-histogram.view.tsx?5bff","webpack://Msdyn365.Commerce.Online/./src/modules/wishlist-items/components/wishlist-items-dimensions.tsx?15c5","webpack://Msdyn365.Commerce.Online/./src/modules/wishlist-items/components/wishlist-item.tsx?d2da","webpack://Msdyn365.Commerce.Online/./src/modules/wishlist-items/components/wishlist-items-status-message.tsx?cdb3","webpack://Msdyn365.Commerce.Online/./src/modules/wishlist-items/wishlist-items.tsx?df8b","webpack://Msdyn365.Commerce.Online/./src/modules/wishlist-items/wishlist-items.view.tsx?4d80","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/product-v2.component.tsx?d155","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/product.component.tsx?fd23","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/search-result-container-v2.view.tsx?6eaa","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/search-result-container.view.tsx?6e86"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IAaa_cartIcon containerModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum cartLinesSortOrder {\r\n ascending = 'ascending',\r\n descending = 'descending'\r\n}\r\n\r\nexport interface IAaa_cartIconConfig extends Msdyn365.IModuleConfig {\r\n imageSettings?: Msdyn365.IImageSettings;\r\n enableHoverCart?: boolean;\r\n cartLinesSortOrder?: cartLinesSortOrder;\r\n isAnonymousCheckout?: boolean;\r\n}\r\n\r\nexport interface IAaa_cartIconResources {\r\n goToCartButtonTitle: string;\r\n totalPriceFormatString: string;\r\n guestCheckoutButtonTitle: string;\r\n checkoutButtonTitle: string;\r\n productDimensionTypeColor: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n productDimensionTypeConfiguration: string;\r\n quantityDisplayText: string;\r\n removeCartButtonText: string;\r\n cartLabel: string;\r\n cartQtyLabel: string;\r\n flyoutTitle: string;\r\n}\r\n\r\nexport interface IAaa_cartIconProps extends Msdyn365.IModule {\r\n resources: IAaa_cartIconResources;\r\n config: IAaa_cartIconConfig;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent, ICartlineResourceString } from '@msdyn365-commerce/components';\r\nimport { ICoreContext, IGridSettings, IImageSettings, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport {\r\n CartLine,\r\n ChannelDeliveryOptionConfiguration,\r\n OrgUnitLocation,\r\n ProductAvailableQuantity,\r\n ProductDeliveryOptions,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy';\r\nimport { ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '@msdyn365-commerce-modules/cart';\r\n\r\nexport interface IFlyoutCartLineItemsProps {\r\n cartlines: any;\r\n cartState: ICartState | undefined;\r\n orgUnitLocations: OrgUnitLocation[] | undefined;\r\n resources: ICartlineResourceString;\r\n productAvailabilites: IProductInventoryInformation[] | undefined;\r\n products: SimpleProduct[] | undefined;\r\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\r\n pickupDeliveryModeCode?: 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 id: string;\r\n typeName: string;\r\n context: ICoreContext;\r\n telemetry: ITelemetry;\r\n removeButtonText: string;\r\n outOfStockText: string;\r\n outOfRangeOneText: string;\r\n outOfRangeFormatText: string;\r\n maxCartlineQuantity: number;\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n isQuantityLimitsFeatureEnabled: boolean;\r\n\r\n outOfStockThreshold: number;\r\n isStockCheckEnabled: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n cartLinesImages: any;\r\n}\r\n\r\nexport interface IFlyoutCartLineItemViewProps {\r\n cartline: React.ReactNode;\r\n remove: React.ReactNode;\r\n storeLocation: React.ReactNode;\r\n hasError: boolean;\r\n\r\n data: {\r\n product: SimpleProduct;\r\n cartline: CartLine;\r\n };\r\n}\r\n\r\nconst _getCartItemAvailableQuantity = (\r\n isStockCheckEnabled: boolean,\r\n outOfStockThreshold: number,\r\n productAvailability?: ProductAvailableQuantity\r\n): number => {\r\n if (isStockCheckEnabled) {\r\n if (\r\n !productAvailability ||\r\n !productAvailability.AvailableQuantity ||\r\n productAvailability.AvailableQuantity <= 0 ||\r\n productAvailability.AvailableQuantity <= outOfStockThreshold\r\n ) {\r\n return 0;\r\n }\r\n return productAvailability.AvailableQuantity - outOfStockThreshold;\r\n }\r\n\r\n return 0;\r\n};\r\n\r\nconst _getCartItemMaxQuantity = (\r\n maxQuantityByConfig: number,\r\n isStockCheckEnabled: boolean,\r\n availableQuantityInStock: number,\r\n isQuantityLimitsFeatureEnabled: boolean,\r\n maxByQuantityLimitsFeature: number\r\n) => {\r\n if (isQuantityLimitsFeatureEnabled) {\r\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\r\n\r\n // If max by feature in not defined when feature is on then we suggest that there is no max by feature\r\n // and consider available qty if stock check enabled and max from config in site settings.\r\n if (!maxByQuantityLimitsFeature) {\r\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\r\n }\r\n\r\n return isStockCheckEnabled\r\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\r\n ? maxByQuantityLimitsFeatureResult\r\n : availableQuantityInStock\r\n : maxByQuantityLimitsFeatureResult;\r\n }\r\n if (isStockCheckEnabled) {\r\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\r\n }\r\n return maxQuantityByConfig;\r\n};\r\n\r\n/**\r\n * On Remove Click functionality.\r\n * @param removeItemClickHandler -Remove item click function.\r\n * @param cartline -CartLine.\r\n * @returns Remove change value.\r\n */\r\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\r\n removeItemClickHandler(cartline);\r\n};\r\nconst _assembleNode = (\r\n cartline: CartLine,\r\n product: SimpleProduct,\r\n props: IFlyoutCartLineItemsProps,\r\n index: number,\r\n foundProductAvailability?: ProductAvailableQuantity,\r\n foundProductDeliveryOptions?: ProductDeliveryOptions,\r\n cartLineImage?: string\r\n): IFlyoutCartLineItemViewProps => {\r\n const { imageSettings, gridSettings, id, typeName, context, resources, removeButtonText, removeItemClickHandler } = props;\r\n\r\n const availableQuantityInStock = _getCartItemAvailableQuantity(\r\n props.isStockCheckEnabled,\r\n props.outOfStockThreshold,\r\n foundProductAvailability\r\n );\r\n const maxQuantity =\r\n product &&\r\n _getCartItemMaxQuantity(\r\n props.maxCartlineQuantity,\r\n props.isStockCheckEnabled,\r\n availableQuantityInStock,\r\n props.isQuantityLimitsFeatureEnabled,\r\n product?.Behavior?.MaximumQuantity || 0\r\n );\r\n\r\n // Check if the product is service or not by product type\r\n const isServiceItem = product.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.RemoveCartItem);\r\n const removeCartItemAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productImageUrl = cartLineImage ? cartLineImage : product ? product.PrimaryImageUrl : '';\r\n return {\r\n data: {\r\n product,\r\n cartline\r\n },\r\n hasError: !isServiceItem && props.isStockCheckEnabled ? cartline.Quantity! > maxQuantity : false,\r\n cartline: (\r\n \r\n ),\r\n remove: (\r\n \r\n {removeButtonText}\r\n \r\n ),\r\n storeLocation: _renderStoreLocation(cartline, props)\r\n };\r\n};\r\n\r\nconst _renderStoreLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): JSX.Element | null => {\r\n if (cartLine && cartLine.FulfillmentStoreId) {\r\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\r\n\r\n if (orgUnitName) {\r\n return (\r\n
\r\n {orgUnitName}\r\n
\r\n );\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nconst _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\r\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\r\n return '';\r\n }\r\n\r\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\r\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\r\n });\r\n\r\n if (foundLocation) {\r\n return foundLocation.OrgUnitName;\r\n }\r\n return fulfillmentStoreId;\r\n};\r\n\r\nconst _assembleCartlines = (\r\n cartlines: CartLine[],\r\n products: SimpleProduct[] | undefined,\r\n props: IFlyoutCartLineItemsProps\r\n): IFlyoutCartLineItemViewProps[] | null => {\r\n const reactNodes: IFlyoutCartLineItemViewProps[] = [];\r\n\r\n if (!products || products.length === 0) {\r\n props.context.telemetry.error('Cartlines content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n cartlines.map((cartline, index) => {\r\n let product;\r\n if (props.isQuantityLimitsFeatureEnabled) {\r\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\r\n // to check productId and WarehouseId for identification.\r\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\r\n } else {\r\n product = getProductByProductId(cartline.ProductId, products);\r\n }\r\n let foundProductAvailability;\r\n if (props.productAvailabilites && props.productAvailabilites.length > 0) {\r\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\r\n return productAvailability.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n }\r\n let foundProductDeliveryOption;\r\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\r\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\r\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\r\n });\r\n }\r\n const cartLineImage = props.cartLinesImages.find((item: any) => {\r\n return item.lineId === cartline.LineId;\r\n });\r\n const cartLineImageUrl = cartLineImage && cartLineImage.ImageUrl ? cartLineImage.ImageUrl : '';\r\n if (product) {\r\n reactNodes.push(\r\n _assembleNode(\r\n cartline,\r\n product,\r\n props,\r\n index,\r\n foundProductAvailability?.ProductAvailableQuantity,\r\n foundProductDeliveryOption,\r\n cartLineImageUrl\r\n )\r\n );\r\n }\r\n });\r\n\r\n return reactNodes;\r\n};\r\n\r\n/**\r\n * CartLineItems component.\r\n */\r\n\r\nexport const FlyoutCartLineItems = (props: IFlyoutCartLineItemsProps) => {\r\n const { products, cartlines } = props;\r\n return _assembleCartlines(cartlines, products, props);\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n ActiveCartProductsInput,\r\n getActiveCartProductsAction,\r\n getAvailabilitiesForCartLineItems,\r\n getDeliveryOptionsForCartLineItems,\r\n IProductInventoryInformation,\r\n ProductAvailabilitiesForCartLineItems,\r\n ProductDeliveryOptionsForCartLineItems\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\n\r\n/**\r\n * IMiniCartData entity interface.\r\n */\r\nexport interface IMiniCartData {\r\n products?: SimpleProduct[];\r\n productAvailabilites?: IProductInventoryInformation[];\r\n deliveryOptions?: ProductDeliveryOptions[];\r\n}\r\n\r\nexport const createInput = () => {\r\n return new ActiveCartProductsInput();\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns a mini cart data.\r\n * @param ctx\r\n * @param cartState\r\n */\r\nexport async function getMiniCartData(ctx: IActionContext, cartState: ICartState): Promise {\r\n const miniCartData: IMiniCartData = {};\r\n\r\n const cart = cartState.cart;\r\n\r\n // If there are cart lines, make call to get products\r\n // If there are invocie linese, then there is no products, so don't make call to get products\r\n if (cart && cart.CartLines && cart.CartLines.length > 0 && !cartState.hasInvoiceLine) {\r\n await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx)\r\n .then(products => {\r\n if (products) {\r\n miniCartData.products = products;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\r\n });\r\n\r\n await getAvailabilitiesForCartLineItems(new ProductAvailabilitiesForCartLineItems(ctx.requestContext.apiSettings), ctx)\r\n .then(availableQuantity => {\r\n if (availableQuantity) {\r\n miniCartData.productAvailabilites = availableQuantity;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\r\n });\r\n\r\n await getDeliveryOptionsForCartLineItems(new ProductDeliveryOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\r\n .then(deliveryOptions => {\r\n if (deliveryOptions) {\r\n miniCartData.deliveryOptions = deliveryOptions;\r\n }\r\n })\r\n .catch(error => {\r\n ctx.telemetry.exception(error);\r\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\r\n });\r\n }\r\n\r\n return miniCartData;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { AddToCartBehavior, CartIconComponent } from '@msdyn365-commerce/components';\r\nimport { getUrlSync, IDictionary, IImageSettings, msdyn365Commerce, TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { CartLine, ChannelDeliveryOptionConfiguration, LineDataValidationFailure, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\r\nimport { validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n UncontrolledTooltip\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport React from 'react';\r\n\r\nimport { IAaaCartIconData } from './aaa_cart-icon.data';\r\nimport { cartLinesSortOrder, IAaa_cartIconProps } from './aaa_cart-icon.props.autogenerated';\r\nimport { FlyoutCartLineItems, IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\r\nimport { getMiniCartData, IMiniCartData } from './utils/get-products-in-mini-cart';\r\n\r\nexport interface IMiniCartState {\r\n miniCartData: IMiniCartData;\r\n orgUnitLocations?: OrgUnitLocation[];\r\n isQuantityLimitsFeatureEnabled: boolean;\r\n isCartValid: boolean;\r\n cartLinesImages: any;\r\n}\r\n\r\nexport interface ICartIconViewProps extends IAaa_cartIconProps {\r\n className: string;\r\n cartIcon: React.ReactNode;\r\n FlyoutContainer?: INodeProps;\r\n CartlinesWrapper: INodeProps;\r\n miniCartWrapper: INodeProps;\r\n miniCartItemWrapper: INodeProps;\r\n cartlines?: IFlyoutCartLineItemViewProps[];\r\n flyoutTitle: React.ReactNode;\r\n totalPrice: React.ReactNode;\r\n checkoutAsGuestButton?: React.ReactNode;\r\n checkoutAsSignInUserButton?: React.ReactNode;\r\n goToCartButton?: React.ReactNode;\r\n waitingComponent?: React.ReactNode;\r\n isCartLoading: boolean;\r\n\r\n removeItemClickHandler(cartlineToRemove: CartLine): void;\r\n}\r\n\r\n/**\r\n *\r\n * Cart component.\r\n * @extends {React.PureComponent>}\r\n */\r\n@observer\r\nclass CartIcon extends React.Component, IMiniCartState> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private readonly checkoutBySignInAttributes: IDictionary | undefined;\r\n\r\n private readonly checkoutByGuestAttributes: IDictionary | undefined;\r\n\r\n private readonly viewShoppingBagAttributes: IDictionary | undefined;\r\n\r\n private retailMultiplePickUpOptionEnabled?: boolean = false;\r\n\r\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n private lastValidatedCartVersion: number | undefined;\r\n\r\n constructor(props: IAaa_cartIconProps) {\r\n super(props);\r\n this.state = {\r\n miniCartData: {},\r\n isCartValid: true,\r\n isQuantityLimitsFeatureEnabled: false,\r\n cartLinesImages: []\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n const payload = getPayloadObject(TelemetryEvent.CheckOut, this.telemetryContent, TelemetryConstant.Checkout);\r\n this.checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, payload);\r\n\r\n payload.contentAction.etext = TelemetryConstant.GuestCheckout;\r\n this.checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, payload);\r\n\r\n payload.contentAction.etext = TelemetryConstant.ViewShoppingBag;\r\n this.viewShoppingBagAttributes = getTelemetryAttributes(this.telemetryContent, payload);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n const context = this.props.context.actionContext;\r\n\r\n reaction(\r\n () => this.props.data.cart.result?.cart.CartLines,\r\n async () => {\r\n if (this.props.data.cart.result?.cart.CartLines) {\r\n const cartLines: any = this.props.data.cart.result?.cart.CartLines;\r\n const updatedCartLines: any = [];\r\n for (const cartLine of cartLines) {\r\n const updateCartItem: any = { lineId: cartLine.LineId, ImageUrl: '' };\r\n if (cartLine.ExtensionProperties && cartLine.ExtensionProperties.length > 0) {\r\n const snapShotProperty = cartLine.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_SNAPSHOTID' && e.Value && e.Value.StringValue;\r\n });\r\n if (snapShotProperty && snapShotProperty.Value && snapShotProperty.Value.StringValue) {\r\n updateCartItem.ImageUrl = await this.loadBmaImages(snapShotProperty.Value.StringValue);\r\n updatedCartLines.push(updateCartItem);\r\n }\r\n }\r\n }\r\n this.setState({ cartLinesImages: updatedCartLines });\r\n }\r\n this.setState({\r\n miniCartData: await getMiniCartData(context, this.props.data.cart.result!)\r\n });\r\n }\r\n );\r\n\r\n this.setState({\r\n orgUnitLocations: this.props.data.orgUnitLocations?.result\r\n });\r\n await this._setOrderQuantityLimitsFeatureFlag();\r\n this._validateCart();\r\n }\r\n\r\n public componentDidUpdate(prevProps: IAaa_cartIconProps): void {\r\n this._validateCart();\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IAaa_cartIconProps, nextState: IMiniCartState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\r\n public render(): JSX.Element | null {\r\n const {\r\n id,\r\n typeName,\r\n config: { enableHoverCart, isAnonymousCheckout },\r\n context: {\r\n request: {\r\n user: { isAuthenticated, signInUrl }\r\n }\r\n },\r\n context,\r\n resources\r\n } = this.props;\r\n\r\n const cart = (this.props.data.cart && this.props.data.cart.result) || undefined;\r\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\r\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\r\n const checkoutURL = this._getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\r\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- check config.\r\n const shouldShowMiniCart =\r\n cart?.isProductAddedToCart && this.props.context.app.config.addToCartBehavior === AddToCartBehavior.showMiniCart;\r\n const hasInvoiceLine = cart?.hasInvoiceLine;\r\n const cartLines = this._getCartLines();\r\n const hasError = !this.state.isCartValid || (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\r\n const includeFlyout = this.props.data.cart && this.props.data.cart.status === 'SUCCESS' && enableHoverCart;\r\n const totalItemsInCart = cart?.totalItemsInCart ? cart.totalItemsInCart : 0;\r\n const goToCartButtonText = resources.goToCartButtonTitle.replace('{count}', totalItemsInCart.toString());\r\n const flyoutTitle = resources.flyoutTitle;\r\n const flyoutTooltip = {\r\n tag: UncontrolledTooltip,\r\n shouldShowMiniCart,\r\n placement: 'bottom-end',\r\n hideArrow: true,\r\n className: 'ms-cart-icon__flyout-container',\r\n trigger: 'hover',\r\n displayMode: 'FLYOUT',\r\n target: id,\r\n shouldShowCloseButton: true,\r\n cartPageUrl: cartUrl\r\n };\r\n\r\n // If there are invoice lines, don't update mini cart price\r\n const price = (cart && !cart.hasInvoiceLine && cart.cart.TotalAmount) || undefined;\r\n const priceString = price\r\n ? resources.totalPriceFormatString.replace('{price}', context.cultureFormatter.formatCurrency(price))\r\n : '';\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\r\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\r\n feature => feature.Name === multiplePickupStoreSwitchName\r\n )?.IsEnabled;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n cartIcon: (\r\n \r\n ),\r\n cartlines: cartLines,\r\n FlyoutContainer: includeFlyout ? flyoutTooltip : undefined,\r\n CartlinesWrapper: {\r\n className: 'ms-cart-icon__cart-lines'\r\n },\r\n miniCartWrapper: {\r\n className: classnames('ms-cart-icon'),\r\n id: this.props.id\r\n },\r\n miniCartItemWrapper: {\r\n className: classnames('msc-cart-lines-item')\r\n },\r\n\r\n // If there are invoice lines, don't update mini cart checkout button\r\n // Checkout button will display by default to maintain backward compatibility. When Anonymous user checkout is enabled &&\r\n // user is authenticated then we will show the checkout button otherwise we will show the guest checkout button.\r\n checkoutAsSignInUserButton:\r\n !isCartEmpty && !hasInvoiceLine && (!isAnonymousCheckout || isAuthenticated) ? (\r\n \r\n {resources.checkoutButtonTitle}\r\n \r\n ) : null,\r\n checkoutAsGuestButton:\r\n isAnonymousCheckout && !isCartEmpty && !isAuthenticated ? (\r\n \r\n {resources.guestCheckoutButtonTitle}\r\n \r\n ) : null,\r\n goToCartButton: (\r\n \r\n {goToCartButtonText}\r\n \r\n ),\r\n flyoutTitle: {flyoutTitle},\r\n totalPrice:
{priceString}
\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _validateCart(): void {\r\n const {\r\n data: { cart }\r\n } = this.props;\r\n const cartVersion = cart.result?.cart?.Version ?? undefined;\r\n if (this.lastValidatedCartVersion === cartVersion) {\r\n return;\r\n }\r\n\r\n this.lastValidatedCartVersion = cartVersion; // This field is populated to block concurrent requests\r\n validateCartAsync(this.state.isQuantityLimitsFeatureEnabled, cart, this.props.telemetry, this.props.context)\r\n .then((result: LineDataValidationFailure[] | undefined) => {\r\n this.setState({ isCartValid: !ArrayExtensions.hasElements(result) });\r\n })\r\n .catch(() => {\r\n this.setState({ isCartValid: false });\r\n });\r\n }\r\n\r\n private _getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\r\n if (isAuthenticated) {\r\n return guestCheckoutUrl;\r\n }\r\n\r\n const absoluteUrlRegExp = new RegExp('^(?:[a-z]+:)?//', 'i');\r\n const isAbsoluteUrl = absoluteUrlRegExp.test(guestCheckoutUrl);\r\n let returnURL = guestCheckoutUrl;\r\n if (msdyn365Commerce.isBrowser && !isAbsoluteUrl) {\r\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\r\n }\r\n\r\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\r\n }\r\n\r\n /**\r\n * Sort cartline items.\r\n * @param cartlines - Cartlines to be sorted.\r\n * @param sortOrder - Ascending or descending.\r\n * @returns - Sorted cartlines.\r\n */\r\n private readonly getSortedCartLines = (cartlines: CartLine[], sortOrder?: cartLinesSortOrder): CartLine[] => {\r\n const lines: CartLine[] = [...cartlines];\r\n const zero: number = 0;\r\n\r\n if (sortOrder === cartLinesSortOrder.descending) {\r\n return lines.sort((item1, item2) => (item2.LineNumber ?? zero) - (item1.LineNumber ?? zero));\r\n }\r\n return lines.sort((item1, item2) => (item1.LineNumber ?? zero) - (item2.LineNumber ?? zero));\r\n };\r\n\r\n private _getCartLines(): IFlyoutCartLineItemViewProps[] | null {\r\n const {\r\n context: {\r\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\r\n },\r\n config,\r\n telemetry,\r\n resources\r\n } = this.props;\r\n\r\n const imageSettings = this._getImageSettings(config.imageSettings);\r\n const cart = this.props.data.cart && this.props.data.cart.result;\r\n\r\n // Cart-icon could be placed in each page\r\n // so we check cart content to reduce number of RS calls\r\n return this.state.miniCartData.products && cart && cart.cart.CartLines && cart.cart.CartLines.length > 0\r\n ? FlyoutCartLineItems({\r\n cartLinesImages: this.state.cartLinesImages,\r\n cartlines: this.getSortedCartLines(cart.cart.CartLines, config.cartLinesSortOrder),\r\n products: this.state.miniCartData.products,\r\n productAvailabilites: this.state.miniCartData.productAvailabilites,\r\n productDeliveryOptions: this.state.miniCartData.deliveryOptions,\r\n imageSettings,\r\n outOfStockThreshold: this.props.context.app.config.outOfStockThreshold || 0,\r\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\r\n maxCartlineQuantity: this.props.context.app.config.maxQuantityForCartLineItem,\r\n gridSettings: this.props.context.request.gridSettings!,\r\n context: this.props.context,\r\n typeName: this.props.typeName,\r\n id: this.props.id,\r\n resources: {\r\n sizeString: resources.productDimensionTypeSize,\r\n colorString: resources.productDimensionTypeColor,\r\n configString: resources.productDimensionTypeConfiguration,\r\n styleString: resources.productDimensionTypeStyle,\r\n quantityDisplayString: resources.quantityDisplayText,\r\n inputQuantityAriaLabel: '', // Not used\r\n discountStringText: '', // Not used\r\n originalPriceText: '',\r\n currentPriceText: '',\r\n shippingChargesText: ''\r\n },\r\n telemetry,\r\n removeButtonText: resources.removeCartButtonText,\r\n outOfStockText: '', // Not used\r\n outOfRangeOneText: '', // Not used\r\n outOfRangeFormatText: '', // Not used\r\n cartState: cart,\r\n orgUnitLocations: this.state.orgUnitLocations,\r\n removeItemClickHandler: this._removeItemFromCartHandler,\r\n pickupDeliveryModeCode: PickupDeliveryModeCode,\r\n telemetryContent: this.telemetryContent,\r\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined,\r\n isQuantityLimitsFeatureEnabled: this.state.isQuantityLimitsFeatureEnabled\r\n })\r\n : null;\r\n }\r\n\r\n private readonly _getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\r\n return (\r\n imageSettings || {\r\n viewports: {\r\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\r\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n }\r\n );\r\n };\r\n\r\n private readonly _removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\r\n if (this.props.data.cart.result) {\r\n const input = {\r\n cartLineIds: [cartlineToRemove.LineId!.toString()]\r\n };\r\n this.props.data.cart.result.removeCartLines(input).catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to Remove Cart Line');\r\n });\r\n }\r\n };\r\n\r\n private async _setOrderQuantityLimitsFeatureFlag(): Promise {\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n if (!defaultOrderQuantityLimitsFeatureConfig || defaultOrderQuantityLimitsFeatureConfig === 'none') {\r\n this.setState({ isQuantityLimitsFeatureEnabled: false });\r\n return;\r\n }\r\n try {\r\n const featureStatuses = await this.props.data.featureState;\r\n const isQuantityLimitsFeatureEnabledInHq =\r\n featureStatuses.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n if (!isQuantityLimitsFeatureEnabledInHq) {\r\n this.setState({ isQuantityLimitsFeatureEnabled: false });\r\n return;\r\n }\r\n } catch (error) {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to get feature states');\r\n this.setState({ isQuantityLimitsFeatureEnabled: false });\r\n return;\r\n }\r\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\r\n this.setState({ isQuantityLimitsFeatureEnabled: true });\r\n } else {\r\n this.props.data.customerInformation\r\n .then(customerInfo => {\r\n const result =\r\n !!customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\r\n this.setState({ isQuantityLimitsFeatureEnabled: result });\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to get customer info');\r\n });\r\n }\r\n }\r\n private loadBmaImages = async (snapShotId: any) => {\r\n const bmaImageEndPoint = this.props.app.config.bmaImageEndPoint.replace('#snapshotId', snapShotId);\r\n const response = await fetch(`${this.props.app.config.bmaBaseUrl}${bmaImageEndPoint}`);\r\n const images = await response.json();\r\n return images[0];\r\n };\r\n}\r\n\r\nexport default CartIcon;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICartIconViewProps } from './aaa_cart-icon';\r\nimport { IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\r\n\r\nconst _renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): JSX.Element[] | null => {\r\n if (!cartLines) {\r\n props.context.telemetry.error('Cartlines content is empty, module wont render');\r\n return null;\r\n }\r\n return cartLines.map((cartLine, index) => {\r\n return (\r\n \r\n {cartLine.cartline}\r\n {cartLine.storeLocation}\r\n {cartLine.remove}\r\n \r\n );\r\n });\r\n};\r\n\r\nconst CartIconView: React.FC = (props: ICartIconViewProps) => (\r\n \r\n {props.cartIcon}\r\n {props.FlyoutContainer ? (\r\n \r\n {props.flyoutTitle}\r\n {_renderCartlines(props.cartlines, props)}\r\n {props.totalPrice}\r\n {props.checkoutAsSignInUserButton}\r\n {props.checkoutAsGuestButton}\r\n {props.goToCartButton}\r\n \r\n ) : (\r\n false\r\n )}\r\n \r\n);\r\n\r\nexport default CartIconView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IAaaCheckoutData } from '../aaa_checkout.data';\r\nimport { IAaa_checkoutProps } from '../aaa_checkout.props.autogenerated';\r\n\r\nexport interface IInvoicePaymentSummary {\r\n heading?: React.ReactNode;\r\n lines?: IInvoiceSummaryLines;\r\n}\r\nexport const getInvoicePaymentSummary = (input: IAaa_checkoutProps): IInvoicePaymentSummary => {\r\n const {\r\n data: { checkout },\r\n resources: { totalAmountLabel, invoiceLabel, invoiceSummaryTitle },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutCart = get(checkout, 'result.checkoutCart');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n\r\n return {\r\n heading:

{invoiceSummaryTitle}

,\r\n lines: checkoutCart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: totalAmountLabel,\r\n invoiceLabel,\r\n cart,\r\n context,\r\n typeName,\r\n telemetry,\r\n id,\r\n checkoutState: checkout.result\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\nimport * as React from 'react';\r\n\r\nimport { IAaaCheckoutData } from '../aaa_checkout.data';\r\nimport { IAaa_checkoutProps } from '../aaa_checkout.props.autogenerated';\r\n\r\ntype deliveryType = 'pickup' | 'ship' | 'email';\r\n\r\nexport interface IPickUpAtStore {\r\n PickUpAtStore: INodeProps;\r\n label: React.ReactNode;\r\n location: React.ReactNode;\r\n}\r\n\r\nexport interface IEmailDelivery {\r\n EmailDelivery: INodeProps;\r\n label: React.ReactNode;\r\n}\r\n\r\nexport interface ILineItem {\r\n LineId: string;\r\n LineItem: INodeProps;\r\n item?: React.ReactNode;\r\n pickUpAtStore?: IPickUpAtStore;\r\n emailDelivery?: IEmailDelivery;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroup {\r\n LineItemDeliveryGroup: INodeProps;\r\n LineItemList: INodeProps;\r\n heading: React.ReactNode;\r\n lineItemWraper?: React.ReactNode;\r\n lineItemWraperIcon?: React.ReactNode;\r\n lineItems: ILineItem[];\r\n}\r\n\r\nexport interface ILineItems {\r\n LineItems: INodeProps;\r\n Header: INodeProps;\r\n heading: React.ReactNode;\r\n editLink: React.ReactNode;\r\n itemsForPickup?: ILineItemDeliveryGroup;\r\n itemsForShip?: ILineItemDeliveryGroup;\r\n itemsForEmail?: ILineItemDeliveryGroup;\r\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\r\n}\r\n\r\nexport const getLineItems = (\r\n input: IAaa_checkoutProps,\r\n telemetryContent?: ITelemetryContent,\r\n cartLinesImages?: any\r\n): ILineItems | undefined => {\r\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n const _getDeliveryLocation = (cartLine: CartLine): string => {\r\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\r\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\r\n return '';\r\n }\r\n\r\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\r\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\r\n });\r\n\r\n return locationMatch && locationMatch.OrgUnitName;\r\n };\r\n\r\n const _getProduct = (productId: number): SimpleProduct | undefined => {\r\n const products = get(input, 'data.products.result') || [];\r\n return products.find((_product: SimpleProduct) => {\r\n return productId === _product.RecordId;\r\n });\r\n };\r\n\r\n const _getLineItemComponent = (cartLine: CartLine, cartLineImage: string): JSX.Element | undefined => {\r\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n config: { imageSettings, showShippingChargesForLineItems },\r\n resources: {\r\n quantityDisplayString,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount,\r\n configString,\r\n inputQuantityAriaLabel,\r\n discountStringText,\r\n shippingCharges\r\n },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = input;\r\n\r\n if (!product) {\r\n return;\r\n }\r\n const productImageUrl = cartLineImage ? cartLineImage : product ? product.PrimaryImageUrl : '';\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\r\n const {\r\n resources: { pickUpAtStoreWithLocationText }\r\n } = input;\r\n\r\n return {\r\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\r\n label: {pickUpAtStoreWithLocationText},\r\n location:
{pickupDeliveryLocation}
\r\n };\r\n };\r\n\r\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\r\n const {\r\n resources: { emailDeliveryText }\r\n } = input;\r\n\r\n return {\r\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\r\n label: {emailDeliveryText}\r\n };\r\n };\r\n\r\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\r\n return items.map(cartLine => {\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const isPickUp = _getCartPickDeliveryMode(cartLine);\r\n const isEmailDelivery =\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\r\n const cartLineImage = cartLinesImages.find((item: any) => {\r\n return item.lineId === cartLine.LineId;\r\n });\r\n const cartLineImageUrl = cartLineImage && cartLineImage.ImageUrl ? cartLineImage.ImageUrl : '';\r\n return {\r\n LineId: cartLine.LineId || '',\r\n LineItem: { className: 'ms-checkout__line-item' },\r\n item: _getLineItemComponent(cartLine, cartLineImageUrl),\r\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\r\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\r\n };\r\n });\r\n };\r\n\r\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode ===\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode !==\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? shippingCountCheckoutLineItem\r\n : type === 'pickup'\r\n ? inStorePickUpLabel\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _countItems = (items: CartLine[]): number => {\r\n return items.reduce((count, item) => {\r\n return count + (item.Quantity || 0);\r\n }, 0);\r\n };\r\n\r\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n if (type === 'ship') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n } else if (type === 'pickup') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\r\n );\r\n }\r\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\r\n };\r\n\r\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\r\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\r\n return;\r\n }\r\n\r\n const items = _filterItemsByDiliveryType(type);\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const count = _countItems(items);\r\n const title = _getGroupTitleComponent(count, type);\r\n\r\n return {\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(items)\r\n };\r\n };\r\n\r\n const _getLineItems = (): ILineItems | undefined => {\r\n const {\r\n context,\r\n config: { lineItemsHeading },\r\n data: { products },\r\n resources: { editCartText }\r\n } = input;\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\r\n Header: { className: 'ms-checkout__line-items-header' },\r\n heading: lineItemsHeading && lineItemsHeading.text && (\r\n \r\n ),\r\n editLink: (\r\n \r\n {editCartText}\r\n \r\n ),\r\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\r\n itemsForShip: _getLineItemsByDeliveryType('ship'),\r\n itemsForEmail: _getLineItemsByDeliveryType('email'),\r\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\r\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\r\n : undefined\r\n };\r\n };\r\n\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { lineItemsHeading }\r\n } = input;\r\n lineItemsHeading!.text = event.target.value;\r\n };\r\n\r\n const _getGroupTitleComponentWithMultiplePickUp = (\r\n count: number,\r\n type: deliveryType,\r\n deliveryMode?: string,\r\n fulFillmentStoreId?: string\r\n ): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n let pickupDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\r\n ? pickupDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\r\n });\r\n\r\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? `(${count} ${suffix})`\r\n : type === 'pickup'\r\n ? `${pickupTitle} (${count} ${suffix})`\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cart.CartLines);\r\n const cartLinesGroup: CartLine[] = [];\r\n const cartLinesGrp: CartLine[][] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\r\n // @ts-ignore\r\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n Object.keys(cartLinesGroup).forEach(key => {\r\n const cartLines = cartLinesGroup[key];\r\n Object.keys(cartLines).forEach(index => {\r\n const cartLine = cartLines[index];\r\n cartLinesGrp.push(cartLine);\r\n });\r\n });\r\n\r\n return cartLinesGrp;\r\n };\r\n\r\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\r\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: { multiplePickUpLabel, shippingLable }\r\n } = input;\r\n\r\n const items = _filterItemsByMultiplePickupMode();\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\r\n items.map(item => {\r\n const count = _countItems(item);\r\n const cartLine = item[0];\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const type: deliveryType =\r\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\r\n ? 'pickup'\r\n : cartLine.FulfillmentStoreId === '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n ? 'email'\r\n : 'ship';\r\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\r\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\r\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\r\n lineItemDeliveryGroup.push({\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n lineItemWraperIcon:
,\r\n lineItemWraper:
{groupTitle}
,\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(item)\r\n });\r\n });\r\n\r\n return lineItemDeliveryGroup;\r\n };\r\n\r\n return _getLineItems();\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IAaaCheckoutData } from '../aaa_checkout.data';\r\nimport { IAaa_checkoutProps } from '../aaa_checkout.props.autogenerated';\r\n\r\nexport interface IOrderSummary {\r\n orderSummaryProps: INodeProps;\r\n heading?: React.ReactNode;\r\n lines?: IOrderSummaryLines;\r\n}\r\nexport const getOrderSummary = (input: IAaa_checkoutProps): IOrderSummary => {\r\n const {\r\n config: { orderSummaryHeading },\r\n data: { checkout },\r\n resources: {\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n otherCharges\r\n },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutState = get(checkout, 'result');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\r\n const channelConfiguration = context.request.channel!;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n const isShowOrHideTaxEnabled = context.request.app.config?.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n\r\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { orderSummaryHeading }\r\n } = input;\r\n orderSummaryHeading!.text = event.target.value;\r\n };\r\n\r\n return {\r\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n heading: orderSummaryHeading && orderSummaryHeading.text && (\r\n \r\n ),\r\n lines: showLineItems\r\n ? OrderSummary({\r\n checkoutState,\r\n cart,\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n context,\r\n typeName,\r\n id,\r\n channelConfiguration,\r\n telemetry,\r\n otherChargeLabel: otherCharges,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport * as React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nexport interface ICheckoutGuidedCardProps {\r\n step: number;\r\n title?: HeadingType;\r\n disabled?: boolean; // Module is not available\r\n isActive?: boolean; // Step === currentStep\r\n isVisted?: boolean; // Step < currentStep\r\n isExpanded?: boolean;\r\n isReady?: boolean;\r\n isPending?: boolean;\r\n isUpdating?: boolean;\r\n isSubmitting?: boolean;\r\n isCancelAllowed?: boolean;\r\n isMobile?: boolean;\r\n hasInitialized?: boolean;\r\n hasControlGroup?: boolean;\r\n children: React.ReactNode;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n onNext(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedCard component.\r\n * @extends {React.Component}\r\n */\r\nclass CheckoutGuidedCard extends React.PureComponent {\r\n private readonly editButtonRef: React.RefObject = React.createRef();\r\n\r\n private readonly formCardRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: ICheckoutGuidedCardProps) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\r\n /**\r\n * Move to next step when current step is ready.\r\n */\r\n const { isActive, isReady, onNext, isVisted, onEdit } = this.props;\r\n\r\n // Move to next step after completing the current step\r\n if (isActive && isReady) {\r\n onNext();\r\n }\r\n\r\n // Set the focus to Edit button once edit button appear\r\n // (It happens when current step switch to isReady status)\r\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\r\n const canEdit = isReady && isVisted && !!onEdit;\r\n if (!prevCanEdit && canEdit) {\r\n this.focusOnEditButton();\r\n this.scrollToTitle();\r\n }\r\n\r\n // Set the focus to the first focusable element\r\n // (It happens when current step switch to isUpdating status)\r\n if (prevProps.isReady && !isReady) {\r\n this.focusOnFirstFocusableElement();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n title,\r\n disabled,\r\n isExpanded,\r\n isActive,\r\n isVisted,\r\n children,\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n hasInitialized,\r\n hasControlGroup,\r\n onEdit,\r\n resource\r\n } = this.props;\r\n const { changeBtnLabel } = resource;\r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\r\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\r\n\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
{children}
\r\n\r\n {this.renderFooder()}\r\n
\r\n \r\n );\r\n }\r\n\r\n private readonly renderFooder = (): JSX.Element | null => {\r\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\r\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\r\n\r\n const canSubmit = !isReady && onSubmit;\r\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\r\n\r\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\r\n return null;\r\n }\r\n\r\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\r\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
\r\n {canSubmit && (\r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n private readonly focusOnFirstFocusableElement = (): void => {\r\n // eslint-disable-next-line react/no-find-dom-node\r\n const node = ReactDOM.findDOMNode(this) as HTMLElement;\r\n const focussableElements = `\r\n a:not([disabled]),\r\n button:not([disabled]),\r\n input[type=submit]:not([disabled]),\r\n input[type=checkbox]:not([disabled]),\r\n input[type=text]:not([disabled]),\r\n input[type=radio]:not([disabled]),\r\n input[type=password]:not([disabled]),\r\n select:not([disabled]),\r\n textarea:not([disabled]),\r\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\r\n `;\r\n\r\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\r\n child && child.focus && child.focus();\r\n };\r\n\r\n private readonly focusOnEditButton = (): void => {\r\n // Focus on edit button\r\n const editButton =\r\n this.editButtonRef &&\r\n this.editButtonRef.current &&\r\n this.editButtonRef.current.focus &&\r\n (this.editButtonRef.current as HTMLElement);\r\n editButton && editButton.focus();\r\n };\r\n\r\n private readonly scrollToTitle = (): void => {\r\n // Scroll window to the title of the step that was just completed only in mobile viewport\r\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\r\n formCard && formCard.scrollIntoView();\r\n };\r\n\r\n private readonly getTitle = (): JSX.Element => {\r\n const { step, title } = this.props;\r\n const { headingTag: Tag = 'h2', text = '' } = title || {};\r\n return (\r\n \r\n {step + 1}. \r\n {text && {text}}\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedCard;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport GuidedCard from './guided-card';\r\n\r\nexport interface ICheckoutGuidedFormProps {\r\n items: React.ReactNode[];\r\n moduleState: IModuleStateManager;\r\n disableGuidedCheckoutFlow?: boolean;\r\n isMobile?: boolean;\r\n isEditor?: boolean;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n hasError?: boolean;\r\n}\r\n\r\ninterface ICheckoutGuidedFormState {\r\n currentStep: number;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedForm component.\r\n * @extends {React.Component}\r\n */\r\n@observer\r\nclass CheckoutGuidedForm extends React.PureComponent {\r\n public state: ICheckoutGuidedFormState = {\r\n currentStep: 0\r\n };\r\n\r\n public componentDidMount(): void {\r\n /**\r\n * Append child modules.\r\n */\r\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n this.props.moduleState.init({ childIds });\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { moduleState, items, resource } = this.props;\r\n if (!items || !moduleState) {\r\n return null;\r\n }\r\n\r\n const shouldCollapseAfterRedirect =\r\n this.props.isPaymentVerificationRedirection &&\r\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n !this.props.hasError;\r\n\r\n return (\r\n
\r\n {items.map((item: React.ReactNode) => {\r\n const childId = this.getId(item);\r\n const step = this.getStep(childId);\r\n const title = this.getHeading(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n const {\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n isDisabled,\r\n isCancelAllowed,\r\n onEdit,\r\n onCancel,\r\n onSubmit,\r\n hasModuleState,\r\n hasInitialized\r\n } = state || ({} as IModuleStateManager);\r\n return (\r\n \r\n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n private readonly getEnabledModules = (): string[] => {\r\n const {\r\n moduleState: { childIds, getModule }\r\n } = this.props;\r\n return childIds.filter((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && !state.isDisabled;\r\n });\r\n };\r\n\r\n private readonly getStep = (id: string): number => {\r\n return this.getEnabledModules().indexOf(id);\r\n };\r\n\r\n private readonly getId = (item: React.ReactNode): string => {\r\n return get(item, 'props.id') || '';\r\n };\r\n\r\n private readonly getHeading = (item: React.ReactNode): Heading => {\r\n return get(item, 'props.config.heading') || '';\r\n };\r\n\r\n private readonly isExpanded = (step: number): boolean => {\r\n if (this.props.isEditor) {\r\n // Editorial mode: Expand all the drawers\r\n return true;\r\n }\r\n return step > -1 && step <= this.state.currentStep;\r\n };\r\n\r\n private readonly isActive = (step: number): boolean => {\r\n return step === this.state.currentStep;\r\n };\r\n\r\n private readonly isVisted = (step: number): boolean => {\r\n return step > -1 && step < this.state.currentStep;\r\n };\r\n\r\n private readonly onNext = (): void => {\r\n this.setState({\r\n currentStep: this.state.currentStep + 1\r\n });\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedForm;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICheckoutPlaceOrderButtonProps {\r\n canPlaceOrder: boolean;\r\n checkoutBtnText: string;\r\n telemetryContent?: ITelemetryContent;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n placeOrder(): Promise;\r\n}\r\n\r\nconst buttonsStates: React.Dispatch>[] = [];\r\n\r\n/**\r\n * On place order function.\r\n * @param isBusy -Check is busy.\r\n * @param canPlaceOrder -Check can place order.\r\n * @param placeOrder -Place order function.\r\n * @returns Set state of button.\r\n */\r\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\r\n if (isBusy || !canPlaceOrder) {\r\n return;\r\n }\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(true);\r\n return true;\r\n });\r\n await placeOrder();\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(false);\r\n return true;\r\n });\r\n};\r\n\r\nconst CheckoutPlaceOrderButton: React.FC = ({\r\n checkoutBtnText,\r\n canPlaceOrder,\r\n placeOrder,\r\n telemetryContent,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n isPlaceOrderLoading\r\n}) => {\r\n const [isBusy, setIsBusy] = useState(false);\r\n buttonsStates.push(setIsBusy);\r\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout) {\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutPlaceOrderButton;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n updateLineDeliverySpecificationsAsync,\r\n validateForCheckoutAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n DeliveryPreferenceType,\r\n LineDeliverySpecification,\r\n ReleasedProductType,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getAvailabilitiesForCartLineItems,\r\n ProductAvailabilitiesForCartLineItems\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport { computed, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IAaaCheckoutData } from './aaa_checkout.data';\r\nimport { ICheckoutHeadingData, IAaa_checkoutProps } from './aaa_checkout.props.autogenerated';\r\nimport AlertComponent from './components/alert';\r\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { getLineItems, ILineItems } from './components/get-line-items';\r\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\r\nimport GuidedFormComponent from './components/guided-form';\r\nimport PlaceOrderButtonComponent from './components/place-order-button';\r\nimport placeOrder from './methods/place-order';\r\n\r\nexport * from './components/get-line-items';\r\nexport * from './components/get-order-summary';\r\n\r\ntype DeviceType = 'Mobile';\r\n\r\ninterface ICheckoutState {\r\n errorMessage: string;\r\n isValidationPassed: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n cartLinesImages: any;\r\n}\r\n\r\nexport interface ICheckoutViewProps extends IAaa_checkoutProps {\r\n className: string;\r\n canShow?: boolean;\r\n isEmptyCart?: boolean;\r\n isConsentGiven?: boolean;\r\n hasError?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n cartStatus?: string;\r\n isMobile?: boolean;\r\n isEditorialMode?: boolean;\r\n backToShoppingUrl?: string;\r\n editCartLink?: string;\r\n hasSalesOrder: boolean;\r\n hasInvoiceLine?: boolean;\r\n\r\n checkoutProps: IModuleProps;\r\n headerProps: INodeProps;\r\n bodyProps: INodeProps;\r\n mainProps: INodeProps;\r\n mainControlProps: INodeProps;\r\n sideProps: INodeProps;\r\n sideControlFirstProps: INodeProps;\r\n sideControlSecondProps: INodeProps;\r\n termsAndConditionsProps: INodeProps;\r\n\r\n guidedForm?: React.ReactNode;\r\n title?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n orderSummary?: IOrderSummary;\r\n invoicePaymentSummary?: IInvoicePaymentSummary;\r\n lineItems?: ILineItems;\r\n placeOrderButton?: React.ReactNode;\r\n termsAndConditions?: React.ReactNode;\r\n keepShoppingButton?: React.ReactNode;\r\n orderConfirmation?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutModuleProps extends IAaa_checkoutProps, IModuleStateProps {}\r\n\r\n/**\r\n *\r\n * CheckoutContainer component.\r\n * @extends {React.Component}\r\n */\r\n// @ts-ignore\r\n@withModuleState\r\n@observer\r\nclass Checkout extends React.PureComponent {\r\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\r\n return this.props.data.checkout?.status;\r\n }\r\n\r\n @computed get isEmptyCart(): boolean {\r\n if (this.isEditorialMode) {\r\n // Editorial mode: Ignore empty cart\r\n return false;\r\n }\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\r\n }\r\n\r\n @computed get isEditorialMode(): boolean {\r\n return this.props.context.request.params.isEditor;\r\n }\r\n\r\n @computed public get isPaymentVerificationRedirection(): boolean {\r\n const { requestFormData, query } = this.props.context.request;\r\n return !!(requestFormData || (query && query.pv === '1'));\r\n }\r\n\r\n @computed get canPlaceOrder(): boolean {\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\r\n return (\r\n this.props.moduleState.isReady &&\r\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\r\n (this.state.errorMessage === '' || shouldEnableSinglePaymentAuthorizationCheckout || this.isPaymentVerificationRedirection)\r\n );\r\n }\r\n\r\n @computed get isCartReady(): boolean {\r\n return (\r\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\r\n this.props.data.customerInformation.status !== 'LOADING' &&\r\n this.props.data.featureState.status !== 'LOADING'\r\n );\r\n }\r\n\r\n public state: ICheckoutState = {\r\n errorMessage: '',\r\n isValidationPassed: false,\r\n isPlaceOrderLoading: false,\r\n cartLinesImages: []\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n public componentDidMount(): void {\r\n const {\r\n resources: { genericErrorMessage }\r\n } = this.props;\r\n\r\n when(\r\n () => this.hasError,\r\n () => {\r\n this.setState({\r\n errorMessage: genericErrorMessage\r\n });\r\n this.props.context.telemetry.error('Failed to get cart');\r\n }\r\n );\r\n\r\n when(\r\n () => {\r\n return this.isEmptyCart;\r\n },\r\n () => {\r\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isCartReady,\r\n async () => {\r\n this.validateForCheckout();\r\n if (this.props.data.checkout.result?.checkoutCart.cart.CartLines) {\r\n const cartLines: any = this.props.data.checkout.result?.checkoutCart.cart.CartLines;\r\n const updatedCartLines: any = [];\r\n for (const cartLine of cartLines) {\r\n const updateCartItem: any = { lineId: cartLine.LineId, ImageUrl: '' };\r\n if (cartLine.ExtensionProperties && cartLine.ExtensionProperties.length > 0) {\r\n const snapShotProperty = cartLine.ExtensionProperties.find((e: any) => {\r\n return e.Key === 'AAA_SNAPSHOTID' && e.Value && e.Value.StringValue;\r\n });\r\n if (snapShotProperty && snapShotProperty.Value && snapShotProperty.Value.StringValue) {\r\n updateCartItem.ImageUrl = await this.loadBmaImages(snapShotProperty.Value.StringValue);\r\n updatedCartLines.push(updateCartItem);\r\n }\r\n }\r\n }\r\n this.setState({ cartLinesImages: updatedCartLines });\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\r\n async isReady => {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n isReady &&\r\n !this.props.data.checkout.result.redirectAdditionalContext\r\n ) {\r\n if (!this.state.isPlaceOrderLoading) {\r\n this.setState({ isPlaceOrderLoading: true });\r\n }\r\n\r\n await this.onPlaceOrder();\r\n\r\n // If 3D authentication redirection, don't update isPlaceOrderLoading\r\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when redirection is true for new checkout flow.\r\n reaction(\r\n () => this.canPlaceOrder,\r\n async () => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\r\n const { requestFormData, query } = this.props.context.request;\r\n const isRedirection = !!(requestFormData && query && query.pv === '1');\r\n if (isRedirection) {\r\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\r\n newIsPlaceOrderEnabledInRedirection: true\r\n });\r\n }\r\n }\r\n }\r\n );\r\n }\r\n\r\n // eslint-disable-next-line complexity -- ignore the complexity.\r\n public render(): JSX.Element {\r\n const {\r\n moduleState,\r\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\r\n resources\r\n } = this.props;\r\n const { errorMessage } = this.state;\r\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\r\n const checkoutClass = classnames('ms-checkout', className);\r\n const checkoutInformation = this.getSlotItems('checkoutInformation');\r\n\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n const isMobile =\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\r\n\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const termsAndConditions =\r\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\r\n\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\r\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n let viewProps: ICheckoutViewProps = {\r\n ...this.props,\r\n className: checkoutClass,\r\n isEmptyCart: this.isEmptyCart,\r\n isConsentGiven,\r\n hasError: this.hasError,\r\n isPaymentVerificationRedirection: this.isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n hasSalesOrder:\r\n this.props.data.checkout &&\r\n this.props.data.checkout.result !== undefined &&\r\n this.props.data.checkout.result.salesOrder !== undefined,\r\n hasInvoiceLine,\r\n cartStatus: this.cartStatus,\r\n isMobile,\r\n backToShoppingUrl,\r\n editCartLink,\r\n isEditorialMode: this.isEditorialMode,\r\n orderConfirmation:\r\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\r\n ? this.props.slots.orderConfirmation[0]\r\n : undefined,\r\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\r\n headerProps: { className: 'ms-checkout__head' },\r\n bodyProps: { className: 'ms-checkout__body' },\r\n mainProps: { className: 'ms-checkout__main' },\r\n mainControlProps: { className: 'ms-checkout__main-control' },\r\n sideProps: { className: 'ms-checkout__side' },\r\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\r\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\r\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\r\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading)\r\n };\r\n\r\n if (!isConsentGiven) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else if (this.isLoading()) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: \r\n };\r\n } else if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else {\r\n viewProps = {\r\n ...viewProps,\r\n alert: errorMessage && ,\r\n canShow: true,\r\n guidedForm: checkoutInformation ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n orderSummary: getOrderSummary(this.props),\r\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\r\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent, this.state.cartLinesImages),\r\n placeOrderButton: (\r\n \r\n ),\r\n termsAndConditions,\r\n keepShoppingButton: backToShoppingUrl && (\r\n \r\n {backToShopping}\r\n \r\n )\r\n };\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\r\n return (\r\n \r\n );\r\n }\r\n\r\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\r\n (this.props.config.checkoutHeading!.text = event.target.value);\r\n\r\n private readonly isLoading = (): boolean => {\r\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\r\n };\r\n\r\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\r\n const { slots } = this.props;\r\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\r\n };\r\n\r\n /**\r\n * Trigger the payment section container submit when placing order.\r\n */\r\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\r\n this.setState({ isPlaceOrderLoading: true });\r\n\r\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\r\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\r\n });\r\n };\r\n\r\n private readonly onPlaceOrder = async (): Promise => {\r\n const {\r\n resources: { checkoutOutOfStockErrorMessage, genericErrorMessage, invalidCartVersionErrorMessage },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { enableStockCheck = false }\r\n }\r\n },\r\n slots: { orderConfirmation },\r\n data: { checkout, products }\r\n } = this.props;\r\n\r\n // If hasInvoiceLine is true, no inventory check\r\n if (\r\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\r\n enableStockCheck &&\r\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\r\n ) {\r\n this.setState({\r\n errorMessage: checkoutOutOfStockErrorMessage\r\n });\r\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\r\n } else {\r\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\r\n\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n\r\n await placeOrder(\r\n actionContext,\r\n this.props.data.checkout.result,\r\n this.props.data.products.result,\r\n !hasOrderConfirmation,\r\n updatedCartVersion,\r\n this.isPaymentVerificationRedirection\r\n ).catch(error => {\r\n let errorMessage = genericErrorMessage;\r\n\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n error.data?.AdditionalContext &&\r\n !this.isPaymentVerificationRedirection\r\n ) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n });\r\n\r\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\r\n }\r\n };\r\n\r\n // Update receipt email address for electronic cart line\r\n // return the updated cart version\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return {\r\n LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n )\r\n .then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n\r\n /**\r\n * Return true if any product in the cart is over its max quantity.\r\n * @param cart -- The checkout cart.\r\n * @param products -- The checkout products.\r\n * @returns -- Is any product in the cart is over max quantity.\r\n */\r\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\r\n let isOverMaxQuantity = false;\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n await getAvailabilitiesForCartLineItems(\r\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\r\n this.props.context.actionContext\r\n )\r\n .then(productInventoryInformation => {\r\n cart.CartLines?.map(cartline => {\r\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\r\n const isServiceItem = cartlineProduct?.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n // If product is service item or cartline is electronic delivery, then no inventory check\r\n if (\r\n !isServiceItem &&\r\n cartline.DeliveryMode !== emailDeliveryModeCode &&\r\n ArrayExtensions.hasElements(productInventoryInformation)\r\n ) {\r\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\r\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n\r\n if (\r\n !(\r\n foundProductAvailability?.IsProductAvailable &&\r\n foundProductAvailability.ProductAvailableQuantity.AvailableQuantity !== undefined &&\r\n cartline.Quantity &&\r\n cartline.Quantity <= foundProductAvailability.ProductAvailableQuantity.AvailableQuantity\r\n )\r\n ) {\r\n isOverMaxQuantity = true;\r\n }\r\n }\r\n });\r\n\r\n return isOverMaxQuantity;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\r\n });\r\n\r\n return isOverMaxQuantity;\r\n };\r\n\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n private readonly onContainerReady = (): void => {\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n\r\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n if (window && editCartLink) {\r\n window.location.assign(editCartLink);\r\n } else {\r\n this.setState({\r\n errorMessage: this.props.resources.genericErrorMessage\r\n });\r\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\r\n }\r\n };\r\n\r\n private readonly validateForCheckout = (retry: boolean = true): void => {\r\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\r\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\r\n const { Id, Version } = cart;\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\r\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\r\n if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\r\n if (Version && Id) {\r\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\r\n .then((result: CartLineValidationResults) => {\r\n if (result.ValidationFailuresByCartLines?.length !== 0) {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n cartState\r\n ?.refreshCart({})\r\n .then(() => {\r\n this.validateForCheckout(false);\r\n })\r\n .catch((refreshError: Error) => {\r\n this.props.telemetry.warning(refreshError.message);\r\n this.props.telemetry.debug('Unable to refresh Cart');\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n };\r\n private loadBmaImages = async (snapShotId: any) => {\r\n const bmaImageEndPoint = this.props.app.config.bmaImageEndPoint.replace('#snapshotId', snapShotId);\r\n const response = await fetch(`${this.props.app.config.bmaBaseUrl}${bmaImageEndPoint}`);\r\n const images = await response.json();\r\n return images[0];\r\n };\r\n}\r\n\r\nexport default Checkout;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './aaa_checkout';\r\nimport { IEmailDelivery } from './components';\r\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n}) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode\r\n}) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {/*{lines.shipping}*/}\r\n {lines.otherCharge}\r\n {lines.tax}\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton\r\n } = props;\r\n\r\n return (\r\n \r\n {!hasSalesOrder && {title}}\r\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\r\n \r\n )}\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {guidedForm}\r\n {termsAndConditions}\r\n \r\n {/* {keepShoppingButton} */}\r\n {keepShoppingButton}\r\n {placeOrderButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && \r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {/* {placeOrderButton}\r\n {keepShoppingButton} */}\r\n \r\n {lineItems && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface IWishlistItemDimension {\r\n key: string;\r\n className?: string;\r\n dimensionType: string;\r\n dimensionValue: string;\r\n}\r\n\r\nexport const WishlistItemDimension: React.FC = ({ key, className, dimensionType, dimensionValue }) => (\r\n
\r\n {dimensionType}:\r\n {dimensionValue}\r\n
\r\n);\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { CommerceListLine, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getFallbackImageUrl, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { WishlistItemDimension } from './aaa_order_confirmation-dimensions';\r\nimport BmaImage from '../../order-request-list/components/bma-image';\r\n\r\nexport interface IAAARequestOrderItemProps extends CommerceListLine {\r\n product: SimpleProduct;\r\n price?: ProductPrice;\r\n context: ICoreContext>;\r\n productUrl: string;\r\n imageSettings?: IImageSettings;\r\n outOfStockText: string;\r\n index: number;\r\n itemKey: string;\r\n telemetry: ITelemetry;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n enableImageProductLink?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n snapshotId: string;\r\n productsCount: number;\r\n resources: {\r\n productDimensionTypeColor: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n freePriceText: string;\r\n };\r\n}\r\n\r\nexport interface IAAAOrderConfirmationItemViewProps {\r\n key: string;\r\n productImage: React.ReactNode;\r\n productLink: React.ReactNode;\r\n productDimensions?: React.ReactNode[];\r\n productPrice?: React.ReactNode;\r\n productStatusMessage?: React.ReactNode;\r\n productName?: React.ReactNode;\r\n productAriaLabel?: string;\r\n entireProductLink?: string;\r\n inventoryInformation?: React.ReactNode;\r\n productUnitOfMeasure?: React.ReactNode;\r\n}\r\n\r\nconst _renderAriaLabel = (props: IAAARequestOrderItemProps): string => {\r\n const { product, price, context, resources } = props;\r\n\r\n const { Name, Dimensions } = product;\r\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\r\n\r\n let formattedPrice = 'Free';\r\n let dimensions = null;\r\n\r\n if (price) {\r\n formattedPrice =\r\n price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\r\n }\r\n\r\n if (Dimensions) {\r\n dimensions = Dimensions.map(productDimension => {\r\n switch (productDimension.DimensionTypeValue) {\r\n case 1:\r\n return `${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 3:\r\n return `${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 4:\r\n return `${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n default:\r\n return '';\r\n }\r\n });\r\n }\r\n\r\n return `${Name} ${formattedPrice} ${(dimensions && dimensions.join('')) || ''}`;\r\n};\r\n\r\n/**\r\n * Renders a link to a product based on the given props.\r\n * @param input - Wishlist item props with the info about the product.\r\n * @returns React component with a link to a product.\r\n */\r\nconst renderProductLink = (input: IAAARequestOrderItemProps) => {\r\n const { productUrl, telemetryContent } = input;\r\n const { RecordId: recordId, Name: productName } = input.product;\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', recordId.toString());\r\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n return (\r\n !StringExtensions.isNullOrWhitespace(productUrl) && (\r\n \r\n {productName}\r\n \r\n )\r\n );\r\n};\r\n\r\n/**\r\n * Renders a product name box.\r\n * @param productName - The text to display.\r\n * @returns React component with a name of a product.\r\n */\r\nconst renderProductName = (productName: string) => {\r\n return
{productName}
;\r\n};\r\n\r\n/**\r\n * Gets the react node for product unit of measure display.\r\n * @param context - Module context.\r\n * @param unitOfMeasure - Product unit of measure.\r\n * @returns The node representing markup for unit of measure component.\r\n */\r\nconst renderUnitOfMeasure = (context: ICoreContext>, unitOfMeasure?: string) => {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\r\n if (context.app.config && (!context.app.config.unitOfMeasureDisplayType || context.app.config.unitOfMeasureDisplayType === 'none')) {\r\n return undefined;\r\n }\r\n\r\n if (!unitOfMeasure) {\r\n return undefined;\r\n }\r\n\r\n return (\r\n
\r\n {unitOfMeasure}\r\n
\r\n );\r\n};\r\n\r\nexport const RequestOrderLine = (input: IAAARequestOrderItemProps): IAAAOrderConfirmationItemViewProps | null => {\r\n const { product, productUrl, price, context, imageSettings, enableImageProductLink, snapshotId, productsCount } = input;\r\n\r\n if (!product) {\r\n return null;\r\n }\r\n\r\n const { RecordId, Name, PrimaryImageUrl, Dimensions } = product;\r\n\r\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\r\n\r\n return {\r\n key: `${RecordId}-item`,\r\n productImage:\r\n PrimaryImageUrl &&\r\n Name &&\r\n _renderProductImage(context, product.Name!, PrimaryImageUrl, fallbackImage, imageSettings, snapshotId, productsCount),\r\n productLink: renderProductLink(input),\r\n productDimensions: Dimensions && _renderProductDimensions(input),\r\n productPrice: price && _renderPrice(input),\r\n productUnitOfMeasure: product.DefaultUnitOfMeasure && renderUnitOfMeasure(context, product.DefaultUnitOfMeasure),\r\n entireProductLink: enableImageProductLink ? productUrl : undefined,\r\n productAriaLabel: enableImageProductLink ? _renderAriaLabel(input) : undefined,\r\n productName: enableImageProductLink && Name && renderProductName(Name)\r\n };\r\n};\r\n\r\nconst _renderProductImage = (\r\n context: ICoreContext,\r\n heading: string,\r\n image?: string,\r\n fallbackImage?: string,\r\n imageSettings?: IImageSettings,\r\n snapshotId?: string,\r\n productsCount?: number\r\n): JSX.Element | null => {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\r\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n if (snapshotId) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n } else if (image && !snapshotId) {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n }\r\n return null;\r\n};\r\n\r\nconst _renderPrice = (props: IAAARequestOrderItemProps): JSX.Element | null => {\r\n const { price, context, moduleId, moduleTypeName, resources } = props;\r\n\r\n if (price) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n};\r\n\r\nconst _renderProductDimensions = (props: IAAARequestOrderItemProps): (React.ReactNode | undefined)[] => {\r\n const { product, resources } = props;\r\n\r\n if (!product || !product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return product.Dimensions.map((dimension, index) => {\r\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\r\n return undefined;\r\n }\r\n\r\n let type = '';\r\n\r\n switch (dimension.DimensionTypeValue) {\r\n case 1: {\r\n type = resources.productDimensionTypeColor;\r\n break;\r\n }\r\n case 3: {\r\n type = resources.productDimensionTypeSize;\r\n break;\r\n }\r\n case 4: {\r\n type = resources.productDimensionTypeStyle;\r\n break;\r\n }\r\n default:\r\n return undefined;\r\n }\r\n\r\n return (\r\n \r\n );\r\n });\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\nimport {\r\n FullProductInput,\r\n getFullProducts,\r\n getProductDetailsCriteriaFromActionInput,\r\n getProductUrlSync\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { readAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CustomersDataActions.g';\r\nimport { IAAAOrderConfirmationItemViewProps, RequestOrderLine } from './components';\r\nimport { IAaaOrderConfirmationData } from './aaa_order_confirmation.data';\r\nimport { IHeadingData, IAaa_order_confirmationProps } from './aaa_order_confirmation.props.autogenerated';\r\nimport { getRequestOrderB2CAsync } from '../../dataActions/DataActionExtension.g';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\n\r\nexport interface IAAAOrderConfirmationViewProps extends IAaa_order_confirmationProps {\r\n RequestOrderLines: IModuleProps;\r\n heading?: React.ReactNode;\r\n Products?: INodeProps;\r\n Product?: INodeProps;\r\n ProductDetails?: INodeProps;\r\n ProductDimensions?: INodeProps;\r\n products?: IAAAOrderConfirmationItemViewProps[];\r\n telemetryContent?: ITelemetryContent;\r\n orderConfirmationHeading?: string;\r\n orderConfirmationContent?: string;\r\n requestOrderId?: string;\r\n}\r\n\r\n/**\r\n *\r\n * WishlistItems component.\r\n * @extends {React.PureComponent, IWishlistItemActionMessageState>}\r\n */\r\n@observer\r\nclass RequestOrderLines extends React.Component, any> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: IAaa_order_confirmationProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.state = {\r\n requestOrderLines: [],\r\n jewelerName: '',\r\n requestOrderId: ''\r\n };\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n let jewelerName;\r\n let requestOrderId: any = '';\r\n const params = new URLSearchParams(this.props.context.request.url.requestUrl.search);\r\n if (params.has('requestOrderId')) {\r\n // check url has recordId...\r\n requestOrderId = params.get('requestOrderId');\r\n }\r\n const customerInfo = this.props.data.customerInformation.result;\r\n if (customerInfo) {\r\n jewelerName = await this.getStockistCustomers(customerInfo.AccountNumber);\r\n }\r\n\r\n const requestOrderLines = await this.getRequestOrderLines(requestOrderId, this.props.context.actionContext);\r\n this.setState({ requestOrderLines: requestOrderLines, jewelerName, requestOrderId });\r\n }\r\n private readonly getStockistCustomers = async (customerAccountNumber: any) => {\r\n if (customerAccountNumber) {\r\n const jewelerInfo: any = await readAsync({ callerContext: this.props.context.actionContext }, customerAccountNumber);\r\n if (!(jewelerInfo.Attributes.length > 0)) {\r\n if (this.props.context.actionContext.requestContext.user.signInUrl) {\r\n window.location.href = this.props.context.actionContext.requestContext.user.signInUrl;\r\n }\r\n }\r\n const stockist = jewelerInfo.Attributes.find((attr: any) => {\r\n return attr.Name === this.props.config.stockistAttributeName;\r\n });\r\n if (stockist) {\r\n return stockist.AttributeValue.StringValue;\r\n }\r\n }\r\n return '#jwelerName';\r\n };\r\n public render(): JSX.Element | null {\r\n const { heading, className, orderConfirmationHeadingText, orderConfirmationContentText } = this.props.config;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n let orderConfirmationHeading, orderConfirmationContent;\r\n if (customerInfo && customerInfo.Name) {\r\n orderConfirmationHeading = orderConfirmationHeadingText ? orderConfirmationHeadingText : '';\r\n orderConfirmationContent = orderConfirmationContentText ? orderConfirmationContentText : '';\r\n orderConfirmationHeading = orderConfirmationHeading.replace('#customerName', customerInfo.Name);\r\n orderConfirmationContent = orderConfirmationContent.replace('#jewelerName', this.state.jewelerName);\r\n }\r\n const viewProps: IAAAOrderConfirmationViewProps = {\r\n ...(this.props as IAaa_order_confirmationProps),\r\n RequestOrderLines: {\r\n moduleProps: this.props,\r\n className: classnames('ms-wishlist-items', className)\r\n },\r\n heading: this._renderHeading(heading),\r\n Products: {\r\n className: 'ms-wishlist-items__products',\r\n tag: 'ul'\r\n },\r\n Product: {\r\n className: 'ms-wishlist-items__product',\r\n tag: 'li'\r\n },\r\n ProductDetails: {\r\n className: 'ms-wishlist-items__product-link',\r\n tag: 'a'\r\n },\r\n telemetryContent: this.telemetryContent,\r\n ProductDimensions: {\r\n className: 'ms-wishlist-items__product-dimensions'\r\n },\r\n products: this._renderProductList(),\r\n orderConfirmationHeading: orderConfirmationHeading,\r\n orderConfirmationContent: orderConfirmationContent,\r\n requestOrderId: this.state.requestOrderId\r\n };\r\n return this.state.requestOrderLines.length > 0 ? (this.props.renderView(viewProps) as React.ReactElement) : null;\r\n }\r\n\r\n private getRequestOrderLines = async (requestOrderId: string, ctx: IActionContext): Promise<[]> => {\r\n if (!requestOrderId) {\r\n throw new Error('[getActiveWishlistItems]No valid Input was provided, failing');\r\n }\r\n\r\n if (ctx.requestContext.user.isAuthenticated) {\r\n //\r\n let requestOrderLines: any = await getRequestOrderB2CAsync({ callerContext: ctx, queryResultSettings: {} }, requestOrderId);\r\n requestOrderLines = requestOrderLines ? requestOrderLines.RequestOrder : [];\r\n if (requestOrderLines && requestOrderLines.length > 0) {\r\n const productInputs: FullProductInput[] = [];\r\n requestOrderLines.forEach((requestOrderLine: any) => {\r\n if (requestOrderLine.ProductId) {\r\n productInputs.push(\r\n new FullProductInput(\r\n requestOrderLine.ProductId,\r\n ctx.requestContext.apiSettings,\r\n getProductDetailsCriteriaFromActionInput(ctx)\r\n )\r\n );\r\n }\r\n });\r\n\r\n if (productInputs.length > 0) {\r\n return getFullProducts(productInputs, ctx)\r\n .then(products => {\r\n if (products) {\r\n const mappedProducts: any = [];\r\n requestOrderLines.forEach((requestOrderLine: any) => {\r\n if (requestOrderLine.ProductId) {\r\n const product: any = products.find((p: any) => {\r\n return requestOrderLine.ProductId === p.ProductDetails.RecordId;\r\n });\r\n if (product) {\r\n const productInfo: any = { ...product };\r\n // find snapshotid...\r\n if (requestOrderLine.Snapshotid) {\r\n // init into product..\r\n productInfo.snapShotId = requestOrderLine.Snapshotid;\r\n }\r\n // init into product..\r\n productInfo.b2cPrice = requestOrderLine.B2CPrice ? requestOrderLine.B2CPrice : 0;\r\n productInfo.b2bPrice = requestOrderLine.B2BPrice ? requestOrderLine.B2BPrice : 0;\r\n mappedProducts.push(productInfo);\r\n }\r\n }\r\n });\r\n return mappedProducts;\r\n }\r\n return [];\r\n })\r\n .catch(error => {\r\n ctx.trace(error);\r\n ctx.telemetry.error(error.message);\r\n ctx.telemetry.debug('[getActiveWishlistItems]Unable to hydrate cart with product information');\r\n throw new Error('[getActiveWishlistItems]Unable to hydrate cart with product information');\r\n });\r\n }\r\n ctx.trace('No productIds found for wishlist');\r\n } else {\r\n ctx.trace('[getActiveWishlistItems]Not able to get wishlists for the customer');\r\n return [];\r\n }\r\n }\r\n ctx.trace('[getActiveWishlistItems]User token not found for wishlists');\r\n return [];\r\n };\r\n\r\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\r\n\r\n private _renderProductList(): IAAAOrderConfirmationItemViewProps[] {\r\n const {\r\n priceFree,\r\n originalPriceText,\r\n currentPriceText,\r\n outOfStockText,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount\r\n } = this.props.resources;\r\n const { context, telemetry, data } = this.props;\r\n const { imageSettings, enableImageProductLink } = this.props.config;\r\n const customerInformationData: any = data.customerInformation && data.customerInformation.result;\r\n return this.state.requestOrderLines.map((product: any, index: any) => {\r\n const productPrice = { ...product.ProductPrice };\r\n if (product.snapShotId) {\r\n if (customerInformationData.IsB2b) {\r\n productPrice.AdjustedPrice = product.b2bPrice;\r\n productPrice.BasePrice = product.b2bPrice;\r\n productPrice.CustomerContextualPrice = product.b2bPrice;\r\n productPrice.TradeAgreementPrice = product.b2bPrice;\r\n } else {\r\n productPrice.AdjustedPrice = product.b2cPrice;\r\n productPrice.BasePrice = product.b2cPrice;\r\n productPrice.CustomerContextualPrice = product.b2cPrice;\r\n productPrice.TradeAgreementPrice = product.b2cPrice;\r\n }\r\n }\r\n const currentProductProps = {\r\n product: product.ProductDetails,\r\n price: productPrice,\r\n context,\r\n productUrl: getProductUrlSync(product.ProductDetails, context.actionContext, undefined),\r\n imageSettings,\r\n outOfStockText,\r\n index,\r\n itemKey: `${product.ProductDetails.RecordId}-${product.ProductDetails.ItemId}-${index}`,\r\n telemetry,\r\n moduleId: this.props.id,\r\n moduleTypeName: this.props.typeName,\r\n enableImageProductLink,\r\n telemetryContent: this.telemetryContent,\r\n resources: {\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle: product.ProductDetails.IsGiftCard ? productDimensionTypeAmount : productDimensionTypeStyle,\r\n freePriceText: priceFree,\r\n originalPriceText,\r\n currentPriceText\r\n },\r\n snapshotId: product.snapShotId,\r\n productsCount: this.state.requestOrderLines.length\r\n };\r\n\r\n return RequestOrderLine(currentProductProps)!;\r\n });\r\n }\r\n\r\n private readonly _renderHeading = (heading?: IHeadingData): JSX.Element | undefined => {\r\n if (!heading) {\r\n return undefined;\r\n }\r\n return (\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default RequestOrderLines;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Module,\r\n Node\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IAAAOrderConfirmationViewProps } from './aaa_order_confirmation';\r\nimport { IAAAOrderConfirmationItemViewProps } from './components';\r\n\r\nconst WishlistItemsView: React.FC = props => {\r\n const {\r\n RequestOrderLines,\r\n orderConfirmationHeading,\r\n orderConfirmationContent,\r\n Products,\r\n products,\r\n Product,\r\n ProductDetails,\r\n ProductDimensions,\r\n telemetryContent,\r\n requestOrderId\r\n } = props;\r\n\r\n return (\r\n \r\n
{orderConfirmationHeading}
\r\n
\r\n {orderConfirmationContent}\r\n Order Request No. {requestOrderId}\r\n
\r\n {Products && products && products.length > 0 && (\r\n \r\n {products &&\r\n products.map(product => {\r\n return _renderItem(product, Product, ProductDimensions, ProductDetails, telemetryContent, requestOrderId);\r\n })}\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst _renderItem = (\r\n product: IAAAOrderConfirmationItemViewProps,\r\n Product?: INodeProps,\r\n ProductDimensions?: INodeProps,\r\n ProductDetails?: INodeProps,\r\n telemetryContent?: ITelemetryContent,\r\n requestOrderId?: string\r\n): JSX.Element | null => {\r\n const {\r\n key,\r\n productImage,\r\n productLink,\r\n productPrice,\r\n productDimensions,\r\n entireProductLink,\r\n productName,\r\n productAriaLabel,\r\n productUnitOfMeasure\r\n } = product;\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', key);\r\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n if (entireProductLink) {\r\n return (\r\n \r\n \r\n {productImage}\r\n {productName}\r\n {productDimensions && ProductDimensions && (\r\n \r\n {productDimensions.map(dimension => {\r\n return dimension;\r\n })}\r\n \r\n )}\r\n {productPrice}\r\n {productUnitOfMeasure}\r\n \r\n \r\n );\r\n }\r\n return (\r\n \r\n {productImage}\r\n {productLink}\r\n {productDimensions && ProductDimensions && (\r\n \r\n {productDimensions.map(dimension => {\r\n return dimension;\r\n })}\r\n \r\n )}\r\n {productPrice}\r\n \r\n );\r\n};\r\n\r\nexport default WishlistItemsView;\r\n","import * as React from 'react';\r\nimport { Image } from '@msdyn365-commerce/core';\r\nimport { IImageProps } from '@msdyn365-commerce/core-internal/dist/types/components/image/image';\r\n\r\nexport default class BmaImage extends React.Component {\r\n constructor(props: IImageProps) {\r\n super(props);\r\n this.state = { imageSrc: '' };\r\n }\r\n public async componentDidMount() {\r\n console.log('BmaImage component did mount');\r\n if (this.props.snapShotId) {\r\n await this.loadBmaImages();\r\n }\r\n }\r\n public async componentDidUpdate(previewProps: any) {\r\n console.log('BmaImage component did update');\r\n if (previewProps.productsCount !== this.props.productsCount && this.props.snapShotId) {\r\n await this.loadBmaImages();\r\n }\r\n }\r\n\r\n private loadBmaImages = async () => {\r\n if (this.props.requestContext) {\r\n const bmaImageEndPoint = this.props.requestContext.app.config.bmaImageEndPoint.replace('#snapshotId', this.props.snapShotId);\r\n\r\n const response = await fetch(`${this.props.requestContext.app.config.bmaBaseUrl}${bmaImageEndPoint}`);\r\n const images = await response.json();\r\n this.setState({ imageSrc: images[0] });\r\n }\r\n };\r\n public render(): JSX.Element | null {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IPriceComponentProps } from '@msdyn365-commerce/components/src/price/price.components';\r\nimport { getB2BCustomerIdAsync } from '../../../dataActions/DataActionExtension.g';\r\nexport default class BmaPrice extends React.Component {\r\n constructor(props: IPriceComponentProps) {\r\n super(props);\r\n this.state = { price: { sum: { vk: 0 } } };\r\n }\r\n public async componentDidMount() {\r\n console.log('BmaPrice component did mount');\r\n if (this.props.snapShotId) {\r\n await this.loadBmaPrice();\r\n }\r\n }\r\n public async componentDidUpdate(previewProps: any) {\r\n console.log('BmaPrice component did update');\r\n if (previewProps.productsCount !== this.props.productsCount && this.props.snapShotId) {\r\n await this.loadBmaPrice();\r\n }\r\n }\r\n\r\n private loadBmaPrice = async () => {\r\n const b2bCustomer: any = await getB2BCustomerIdAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n this.props.customerInfo.result ? this.props.customerInfo.result.AccountNumber : ''\r\n );\r\n if (this.props.context) {\r\n let bmaPriceEndPoint = this.props.context.app.config.bmaPriceEndPoint.replace('#snapshotId', this.props.snapShotId);\r\n bmaPriceEndPoint = bmaPriceEndPoint.replace('#jewellerId', b2bCustomer.BMARetailStockist);\r\n const response = await fetch(`${this.props.context.app.config.bmaBaseUrl}${bmaPriceEndPoint}`);\r\n const price = await response.json();\r\n this.setState({ price: price });\r\n }\r\n };\r\n public render(): JSX.Element | null {\r\n const priceInfo = { ...this.props.data };\r\n priceInfo.price.AdjustedPrice = this.state.price.sum.vk;\r\n priceInfo.price.BasePrice = this.state.price.sum.vk;\r\n priceInfo.price.CustomerContextualPrice = this.state.price.sum.vk;\r\n priceInfo.price.TradeAgreementPrice = this.state.price.sum.vk;\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","import * as React from 'react';\r\nexport default class BmaProductAlloySpecification extends React.Component {\r\n constructor(props: any) {\r\n super(props);\r\n this.state = { review: {}, alloy: '' };\r\n }\r\n public async componentDidMount() {\r\n if (this.props.snapShotId) {\r\n await this.loadBmaProductSpecification();\r\n }\r\n }\r\n public async componentDidUpdate(previewProps: any) {\r\n if (previewProps.productsCount !== this.props.productsCount && this.props.snapShotId) {\r\n await this.loadBmaProductSpecification();\r\n }\r\n }\r\n\r\n private loadBmaProductSpecification = async () => {\r\n const bmaReviewEndPoint = this.props.context.app.config.bmaReviewEndPoint.replace('#snapshotId', this.props.snapShotId);\r\n const response = await fetch(`${this.props.context.app.config.bmaBaseUrl}${bmaReviewEndPoint}`);\r\n const review = await response.json();\r\n const alloy = `${this.props.translationInfo[review[0].properties.disc.fineness[0].label]}\r\n ${''}${this.props.translationInfo[review[0].properties.disc.color[0].label]}`;\r\n this.setState({ review: review, alloy: alloy });\r\n };\r\n public render(): JSX.Element | null {\r\n return {this.state.alloy};\r\n }\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface IWishlistItemDimension {\r\n key: string;\r\n className?: string;\r\n dimensionType: string;\r\n dimensionValue: string;\r\n}\r\n\r\nexport const WishlistItemDimension: React.FC = ({ key, className, dimensionType, dimensionValue }) => (\r\n
\r\n {dimensionType}:\r\n {dimensionValue}\r\n
\r\n);\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\r\nimport {\r\n CommerceListLine,\r\n ProductPrice,\r\n ReleasedProductType,\r\n SimpleProduct\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getFallbackImageUrl, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport BmaImage from './bma-image';\r\nimport BmaPrice from './bma-price';\r\nimport BmaProductAlloySpecification from './bma-productAlloy-specification';\r\nimport { IWishlistItemActionMessageState } from '../order-request-list';\r\nimport { WishlistItemDimension } from './order-request-list-dimensions';\r\n\r\nexport interface IWishlistItemProps extends CommerceListLine {\r\n product: SimpleProduct;\r\n wishlistState: IWishlistItemActionMessageState;\r\n price?: ProductPrice;\r\n context: ICoreContext>;\r\n productUrl: string;\r\n imageSettings?: IImageSettings;\r\n removeFromWishlistText: string;\r\n isInStock: boolean;\r\n addToCartText: string;\r\n addToOrderButtonText: string;\r\n addedButtonText: string;\r\n addToBMAText: string;\r\n addToOrderRequestText: string;\r\n outOfStockText: string;\r\n index: number;\r\n itemKey: string;\r\n telemetry: ITelemetry;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n enableImageProductLink?: boolean;\r\n inventoryInformationLabel?: string;\r\n inventoryLabelClassName?: string;\r\n telemetryContent?: ITelemetryContent;\r\n handlers: {\r\n onAddToCart(product: SimpleProduct, itemKey: string): void;\r\n onAddToOrderRequest(\r\n product: SimpleProduct,\r\n price: ProductPrice | undefined,\r\n snapshotId: string,\r\n mode: string | undefined,\r\n event: any,\r\n itemAlreadyAdded: boolean | undefined\r\n ): void;\r\n onRemoveItem(productId: number, snapshotId: string): void | undefined;\r\n onDismiss(): void;\r\n };\r\n resources: {\r\n productDimensionTypeColor: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n freePriceText: string;\r\n };\r\n snapshotId: string;\r\n lineId: string;\r\n addProductLink: any;\r\n productsCount: number;\r\n customerInfo: any;\r\n translationInfo: any;\r\n addProductsOrderRequest: any;\r\n customiseButtonText: string;\r\n}\r\n\r\nexport interface IWishlistItemViewProps {\r\n key: string;\r\n productImage: React.ReactNode;\r\n productLink: React.ReactNode;\r\n productDimensions?: React.ReactNode[];\r\n productPrice?: React.ReactNode;\r\n addToCartButton?: React.ReactNode;\r\n customiseButton?: React.ReactNode;\r\n addToOrderRequestButton?: React.ReactNode;\r\n addToBMAButton?: React.ReactNode;\r\n addToCartCheckbox?: React.ReactNode;\r\n addedToOrderButtonComponent?: React.ReactNode;\r\n removeButton?: React.ReactNode;\r\n productStatusMessage?: React.ReactNode;\r\n productName?: React.ReactNode;\r\n productAriaLabel?: string;\r\n entireProductLink?: string;\r\n inventoryInformation?: React.ReactNode;\r\n productUnitOfMeasure?: React.ReactNode;\r\n productAlloySpecification: React.ReactNode;\r\n}\r\n\r\nconst _addItemToCart = (props: IWishlistItemProps): void => {\r\n const { product, itemKey, handlers } = props;\r\n const { onAddToCart } = handlers;\r\n\r\n onAddToCart && product && itemKey && onAddToCart(product, itemKey);\r\n};\r\nconst _addItemToOrderRequest = (props: IWishlistItemProps, mode?: string, e?: any, itemAlreadyAdded?: boolean): void => {\r\n const { product, itemKey, handlers, snapshotId, price } = props;\r\n const { onAddToOrderRequest } = handlers;\r\n\r\n onAddToOrderRequest && product && itemKey && onAddToOrderRequest(product, price, snapshotId, mode, e, itemAlreadyAdded);\r\n};\r\n\r\nconst _removeItemFromWishlist = (props: IWishlistItemProps): void => {\r\n const { onRemoveItem } = props.handlers;\r\n const { RecordId } = props.product;\r\n const { snapshotId } = props;\r\n\r\n onRemoveItem && RecordId && onRemoveItem(RecordId, snapshotId);\r\n};\r\n\r\nconst WishListItemActions = {\r\n addToCart: _addItemToCart,\r\n addItemToOrderRequest: _addItemToOrderRequest,\r\n removeItem: _removeItemFromWishlist\r\n};\r\n\r\nconst _renderAriaLabel = (props: IWishlistItemProps): string => {\r\n const { product, price, context, resources } = props;\r\n\r\n const { Name, Dimensions } = product;\r\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\r\n\r\n let formattedPrice = 'Free';\r\n let dimensions = null;\r\n\r\n if (price) {\r\n formattedPrice =\r\n price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\r\n }\r\n\r\n if (Dimensions) {\r\n dimensions = Dimensions.map(productDimension => {\r\n switch (productDimension.DimensionTypeValue) {\r\n case 1:\r\n return `${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 3:\r\n return `${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 4:\r\n return `${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n default:\r\n return '';\r\n }\r\n });\r\n }\r\n\r\n return `${Name} ${formattedPrice} ${(dimensions && dimensions.join('')) || ''}`;\r\n};\r\n\r\n/**\r\n * Renders a link to a product based on the given props.\r\n * @param input - Wishlist item props with the info about the product.\r\n * @returns React component with a link to a product.\r\n */\r\nconst renderProductLink = (input: IWishlistItemProps) => {\r\n const { productUrl, telemetryContent } = input;\r\n const { RecordId: recordId, Name: productName } = input.product;\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', recordId.toString());\r\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n return (\r\n !StringExtensions.isNullOrWhitespace(productUrl) && (\r\n \r\n {productName}\r\n \r\n )\r\n );\r\n};\r\n\r\n/**\r\n * Renders a product name box.\r\n * @param productName - The text to display.\r\n * @returns React component with a name of a product.\r\n */\r\nconst renderProductName = (productName: string) => {\r\n return
{productName}
;\r\n};\r\n\r\n/**\r\n * Renders inventory information.\r\n * @param inventoryInformationLabel - The text to display.\r\n * @param inventoryLabelClassName - The component class name.\r\n * @returns React component.\r\n */\r\nconst renderInventoryInformationLabel = (inventoryInformationLabel: string | undefined, inventoryLabelClassName: string | undefined) => {\r\n const inventoryCssName = inventoryLabelClassName\r\n ? `ms-wishlist-items__inventory-label ${inventoryLabelClassName}`\r\n : 'ms-wishlist-items__inventory-label';\r\n return (\r\n !StringExtensions.isNullOrWhitespace(inventoryInformationLabel) && (\r\n {inventoryInformationLabel}\r\n )\r\n );\r\n};\r\n\r\n/**\r\n * Renders add to cart button.\r\n * @param input - Wishlist item props with the configuration.\r\n * @returns React component.\r\n */\r\nconst WishlistItemAddToCartButtonComponent = (input: IWishlistItemProps) => {\r\n const { isInStock, addToCartText, outOfStockText } = input;\r\n\r\n // Check if the product is service or not by product type.\r\n const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n const addItemAction = React.useCallback(() => {\r\n WishListItemActions.addToCart(input);\r\n }, [input]);\r\n\r\n return (\r\n \r\n {((isServiceItem || isInStock) && addToCartText) || outOfStockText}\r\n \r\n );\r\n};\r\n\r\nconst WishlistItemCustomiseButtonComponent = (input: IWishlistItemProps) => {\r\n const { product, snapshotId, addProductLink, customiseButtonText, lineId } = input;\r\n return (\r\n \r\n );\r\n};\r\nconst WishlistItemAddToOrderRequestButtonComponent = (input: IWishlistItemProps) => {\r\n const { isInStock, addToOrderRequestText, outOfStockText } = input;\r\n\r\n // Check if the product is service or not by product type.\r\n const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n const addItemAction = React.useCallback(() => {\r\n WishListItemActions.addItemToOrderRequest(input);\r\n }, [input]);\r\n\r\n return (\r\n \r\n {((isServiceItem || isInStock) && addToOrderRequestText) || outOfStockText}\r\n \r\n );\r\n};\r\n\r\nconst AddedToOrderButtonComponent = (input: IWishlistItemProps) => {\r\n // const { isInStock, addToOrderRequestText, outOfStockText } = input;\r\n //\r\n // // Check if the product is service or not by product type.\r\n // const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\r\n // remove product form list...\r\n let existsProductIndex: number = -1;\r\n if (input.snapshotId) {\r\n // bma products..\r\n existsProductIndex = input.addProductsOrderRequest.findIndex((p: any) => {\r\n return p.ProductId === input.product.RecordId && input.snapshotId === p.Snapshotid;\r\n });\r\n } else {\r\n // non - bma products..\r\n existsProductIndex = input.addProductsOrderRequest.findIndex((p: any) => {\r\n return p.ProductId === input.product.RecordId;\r\n });\r\n }\r\n const addToOrderRequestButtonText = existsProductIndex > -1 ? input.addedButtonText : input.addToOrderButtonText;\r\n\r\n const addItemAction = React.useCallback(\r\n (e: any, itemAlreadyAdded: boolean) => {\r\n WishListItemActions.addItemToOrderRequest(input, 'multiple', e, itemAlreadyAdded);\r\n },\r\n [input]\r\n );\r\n return (\r\n addItemAction(e, existsProductIndex > -1)}\r\n >\r\n {addToOrderRequestButtonText}\r\n \r\n );\r\n};\r\n\r\n// const WishlistItemAddToCartCheckboxComponent = (input: IWishlistItemProps) => {\r\n// const { isInStock } = input;\r\n//\r\n// // Check if the product is service or not by product type.\r\n// const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\r\n// const addItemAction = React.useCallback(\r\n// (e: any) => {\r\n// WishListItemActions.addItemToOrderRequest(input, 'multiple', e);\r\n// },\r\n// [input]\r\n// );\r\n//\r\n// return (\r\n// addItemAction(e)}\r\n// disabled={!(isServiceItem || isInStock)}\r\n// />\r\n// );\r\n// };\r\n\r\n/**\r\n * Renders remove from wishlist button.\r\n * @param input - Wishlist item props with the configuration.\r\n * @returns React component.\r\n */\r\nconst WishlistItemRemoveFromWishlistButtonComponent = (input: IWishlistItemProps) => {\r\n const { removeFromWishlistText } = input;\r\n\r\n const removeItemAction = React.useCallback(() => {\r\n WishListItemActions.removeItem(input);\r\n }, [input]);\r\n\r\n return \r\n );\r\n };\r\n // multi function...\r\n public _createOrderRequest = async (mode?: string, request?: any): Promise => {\r\n const { context } = this.props;\r\n const payload = mode ? [request] : this.addProductsOrderRequest;\r\n if (context) {\r\n const requestOrderResponse = await createRequestOrderAsync({ callerContext: this.props.context.actionContext }, payload);\r\n this.addProductsOrderRequest = [];\r\n payload.forEach((p: any) => {\r\n const checkbox: any = p.Snapshotid ? document.getElementById(p.Snapshotid) : document.getElementById(p.ProductId);\r\n if (checkbox && checkbox.checked) {\r\n checkbox.checked = false;\r\n }\r\n });\r\n\r\n if (requestOrderResponse) {\r\n const request = this.props.context.request;\r\n let orderConfirmUrl = request.url.requestUrl.origin;\r\n if (request.sitePath) {\r\n orderConfirmUrl = orderConfirmUrl + request.sitePath;\r\n }\r\n window.location.href = `${orderConfirmUrl}${this.props.config.redirectToOrderConfirmUrl}?requestOrderId=${requestOrderResponse.RequestOrderId}`;\r\n }\r\n }\r\n };\r\n\r\n // Dismiss alert when addingToCart/removeItem\r\n private readonly _onDismiss = () => {\r\n this.setState({\r\n isOpen: false\r\n });\r\n };\r\n\r\n private readonly _renderHeading = (heading?: IHeadingData): JSX.Element | undefined => {\r\n if (!heading) {\r\n return undefined;\r\n }\r\n return (\r\n \r\n );\r\n };\r\n\r\n private readonly _addItemToCart = async (product: SimpleProduct, itemKey: string): Promise => {\r\n const { context, data, resources, telemetry } = this.props;\r\n const { cart, productAvailability } = data;\r\n const { addedToCartSuccessMessage, addedToCartFailureMessage, invoiceInCartErrorMessage } = resources;\r\n\r\n const productInventoryInformation = this._getProductInventory({ ProductDetails: product }, productAvailability.result);\r\n\r\n if (context) {\r\n if (cart.result) {\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform\r\n ?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\r\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\r\n\r\n // Check if the product delivery mode is electronic\r\n const emailDeliveryModeCode = this.props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\r\n\r\n const deliveryOptions = await getDeliveryOptionsAsync(\r\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\r\n [product.RecordId]\r\n );\r\n\r\n const isOrderQuantityLimitsFeatureEnabled =\r\n isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings;\r\n const addProductToCartInput = {\r\n product,\r\n quantity: 1,\r\n enableStockCheck: context.app.config.enableStockCheck,\r\n availableQuantity: productInventoryInformation\r\n ? productInventoryInformation.ProductAvailableQuantity.AvailableQuantity\r\n : 0,\r\n additionalProperties: { orderQuantityLimitsFeatureIsEnabled: isOrderQuantityLimitsFeatureEnabled },\r\n isAddEmailDeliveryItemToCart:\r\n ArrayExtensions.hasElements(deliveryOptions) &&\r\n ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) &&\r\n deliveryOptions[0].DeliveryOptions[0].Code === emailDeliveryModeCode\r\n };\r\n\r\n cart.result\r\n .addProductToCart(addProductToCartInput)\r\n .then(async result => {\r\n if (result.status === 'SUCCESS') {\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: addedToCartSuccessMessage,\r\n statusCssString: 'success',\r\n messageGlyph: 'fas fa-check',\r\n isOpen: true\r\n });\r\n } else if (result.substatus === 'MAXQUANTITY') {\r\n const curQuantity =\r\n (await cart).cart?.CartLines?.find(item => item.ProductId === product.RecordId)?.Quantity || 0;\r\n const maxQtyLimitReachedMessage = this._getInventoryValueMessage(productInventoryInformation, curQuantity);\r\n\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: maxQtyLimitReachedMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n } else if (result.substatus === 'QUANTITYLIMITS' && isOrderQuantityLimitsFeatureEnabled) {\r\n const maxQtyLimitReachedMessage = result.errorDetails?.LocalizedMessage!;\r\n\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: maxQtyLimitReachedMessage || addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n } else if (result.substatus === 'INVOICEINCART') {\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: result.errorDetails?.LocalizedMessage || invoiceInCartErrorMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n } else {\r\n this.props.telemetry.debug('[wishlist-items] Unable to Update Cart Line from the wishlist');\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n telemetry.warning(error);\r\n telemetry.debug('[wishlist-items] Error trying to Update Cart Line from the wishlist');\r\n this.setState({\r\n productId: product.RecordId,\r\n itemKey,\r\n userMessage: addedToCartFailureMessage,\r\n statusCssString: 'danger',\r\n messageGlyph: 'fas fa-exclamation-triangle',\r\n isOpen: true\r\n });\r\n });\r\n }\r\n }\r\n };\r\n\r\n private readonly _removeItemFromWishlist = (productId: number, snapShotId?: string): void => {\r\n const { context, data, telemetry } = this.props;\r\n const { wishlists } = data;\r\n\r\n if (context && context.actionContext) {\r\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\r\n const wishlistLineId = this._getWishlistLineIdFromProductId(productId, snapShotId);\r\n if (userToken && wishlists.result && wishlists.result[0] && wishlistLineId) {\r\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, [{ LineId: wishlistLineId }])\r\n .then(commerceList => {\r\n const castCommerceList: CommerceList | null = commerceList as CommerceList | null;\r\n\r\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\r\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\r\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\r\n .then(products => {\r\n const castSimpleProducts: FullProduct[] | null = products as FullProduct[] | null;\r\n if (castSimpleProducts && castSimpleProducts[0]) {\r\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\r\n } else {\r\n location.reload();\r\n }\r\n })\r\n .catch(error => {\r\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\r\n telemetry.error(error);\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\r\n telemetry.error(error);\r\n });\r\n } else {\r\n telemetry.warning(\"[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn't found\");\r\n }\r\n }\r\n };\r\n\r\n private _getInventoryValueMessage(product: IProductInventoryInformation | undefined, curQuantity: number): string {\r\n const { context, resources } = this.props;\r\n const { maxQuantityLimitText } = resources;\r\n\r\n const maxQuantityForLineItem = context.app.config.maxQuantityForCartLineItem || 10;\r\n\r\n if (!product || !product.ProductAvailableQuantity.AvailableQuantity || !context.app.config.enableStockCheck) {\r\n return maxQuantityLimitText\r\n .replace('{maxQuantity}', maxQuantityForLineItem.toString())\r\n .replace('{curQuantity}', curQuantity.toString());\r\n }\r\n\r\n const minInventory = Math.min(maxQuantityForLineItem, product.ProductAvailableQuantity.AvailableQuantity);\r\n\r\n return maxQuantityLimitText.replace('{maxQuantity}', minInventory.toString()).replace('{curQuantity}', curQuantity.toString());\r\n }\r\n\r\n private _getProductInventory(\r\n product: FullProduct,\r\n productInventoryCollection: IProductInventoryInformation[] | undefined\r\n ): IProductInventoryInformation | undefined {\r\n if (productInventoryCollection && productInventoryCollection.length > 0) {\r\n for (const productResult of productInventoryCollection) {\r\n if (product.ProductDetails.RecordId === productResult.ProductAvailableQuantity.ProductId) {\r\n return productResult;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n\r\n private readonly _inventoryLabel = (product: FullProduct): string | undefined => {\r\n const { productAvailability } = this.props.data;\r\n if (productAvailability && productAvailability.result) {\r\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\r\n if (productInventoryInformation) {\r\n return productInventoryInformation.StockLevelLabel;\r\n }\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private readonly _inventoryClassName = (product: FullProduct): string | undefined => {\r\n const { productAvailability } = this.props.data;\r\n if (productAvailability && productAvailability.result) {\r\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\r\n if (productInventoryInformation && productInventoryInformation.StockLevelCode) {\r\n return `ms-wishlist-items__${productInventoryInformation.StockLevelCode.toLowerCase()}`;\r\n }\r\n }\r\n\r\n return undefined;\r\n };\r\n\r\n private readonly _isProductInStock = (product: FullProduct): boolean => {\r\n const { data, context } = this.props;\r\n const { productAvailability } = data;\r\n\r\n if (!context.app.config.enableStockCheck) {\r\n return true;\r\n }\r\n\r\n if (!productAvailability.result || !product.ProductDetails) {\r\n return false;\r\n }\r\n\r\n for (const productResult of productAvailability.result) {\r\n if (\r\n productResult.ProductAvailableQuantity &&\r\n productResult.ProductAvailableQuantity.ProductId &&\r\n productResult.ProductAvailableQuantity.ProductId === product.ProductDetails.RecordId\r\n ) {\r\n return productResult.IsProductAvailable;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n private readonly loadTranslationInfo = async () => {\r\n const translationInfo = await axios.get(\r\n `${this.props.app.config.bmaBaseUrl}${this.props.app.config.bmaTranslationMessageEndPoint}`\r\n );\r\n this.translationInfo = translationInfo.data;\r\n this.setState({});\r\n };\r\n\r\n private readonly _getWishlistLineIdFromProductId = (productId: number, snapShotId?: string | undefined): number | null => {\r\n const { wishlists } = this.props.data;\r\n\r\n if (\r\n !wishlists.result ||\r\n wishlists.result.length === 0 ||\r\n !wishlists.result[0].CommerceListLines ||\r\n wishlists.result[0].CommerceListLines.length === 0\r\n ) {\r\n this.props.telemetry.error('Wishlist content is empty, module wont render.');\r\n return null;\r\n }\r\n let foundWishlistItem = wishlists.result[0].CommerceListLines.filter(commerceListLine => {\r\n return commerceListLine.ProductId === productId;\r\n });\r\n if (snapShotId) {\r\n foundWishlistItem = wishlists.result[0].CommerceListLines.filter((commerceListLine: CommerceListLine) => {\r\n let matchedSnapShotId = '';\r\n if (commerceListLine.ExtensionProperties && commerceListLine.ExtensionProperties.length > 0) {\r\n const pSnapShotId = commerceListLine.ExtensionProperties.find(e => {\r\n return e.Key === 'AAA_SNAPSHOTID';\r\n });\r\n if (pSnapShotId && pSnapShotId.Value && pSnapShotId.Value.StringValue) {\r\n matchedSnapShotId = pSnapShotId.Value.StringValue;\r\n }\r\n }\r\n return commerceListLine.ProductId === productId && snapShotId === matchedSnapShotId;\r\n });\r\n }\r\n\r\n if (foundWishlistItem && foundWishlistItem[0].LineId) {\r\n return foundWishlistItem[0].LineId;\r\n }\r\n return null;\r\n };\r\n}\r\n\r\nexport default WishlistItems;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport {\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n Module,\r\n Node\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IWishlistItemViewProps } from './components';\r\nimport { IWishlistItemsViewProps } from './order-request-list';\r\n\r\nconst WishlistItemsView: React.FC = props => {\r\n const {\r\n WishlistItems,\r\n status,\r\n statusMessage,\r\n // heading,\r\n Products,\r\n products,\r\n Product,\r\n ProductDetails,\r\n ProductDimensions,\r\n telemetryContent\r\n // renderAddToMultipleItemsToCart\r\n } = props;\r\n\r\n return (\r\n <>\r\n {/*{renderAddToMultipleItemsToCart}*/}\r\n \r\n {/*{heading}*/}\r\n {status !== 'SUCCESS' && statusMessage}\r\n {Products && products && products.length > 0 && (\r\n \r\n {products &&\r\n products.map(product => {\r\n return _renderItem(product, Product, ProductDimensions, ProductDetails, telemetryContent);\r\n })}\r\n \r\n )}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderItem = (\r\n product: IWishlistItemViewProps,\r\n Product?: INodeProps,\r\n ProductDimensions?: INodeProps,\r\n ProductDetails?: INodeProps,\r\n telemetryContent?: ITelemetryContent\r\n): JSX.Element | null => {\r\n const {\r\n key,\r\n productImage,\r\n productLink,\r\n productPrice,\r\n productDimensions,\r\n addToCartButton,\r\n removeButton,\r\n productStatusMessage,\r\n entireProductLink,\r\n productName,\r\n productAriaLabel,\r\n inventoryInformation,\r\n productUnitOfMeasure,\r\n addedToOrderButtonComponent,\r\n customiseButton,\r\n productAlloySpecification\r\n } = product;\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', key);\r\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n if (entireProductLink) {\r\n return (\r\n \r\n \r\n {productImage}\r\n {productName}\r\n {productDimensions && ProductDimensions && (\r\n \r\n {productDimensions.map(dimension => {\r\n return dimension;\r\n })}\r\n \r\n )}\r\n {productPrice}\r\n {productUnitOfMeasure}\r\n \r\n {inventoryInformation}\r\n {addToCartButton}\r\n {removeButton}\r\n {productStatusMessage}\r\n \r\n );\r\n }\r\n return (\r\n \r\n {/*{addToCartCheckbox}*/}\r\n {productImage}\r\n {productLink}\r\n {productDimensions && ProductDimensions && (\r\n \r\n {productDimensions.map(dimension => {\r\n return dimension;\r\n })}\r\n \r\n )}\r\n {productAlloySpecification}\r\n {productPrice}\r\n {/*{addToCartButton}*/}\r\n {/*{addToOrderRequestButton}*/}\r\n {addedToOrderButtonComponent}\r\n {customiseButton}\r\n {removeButton}\r\n {productStatusMessage}\r\n \r\n );\r\n};\r\n\r\nexport default WishlistItemsView;\r\n","import * as React from 'react';\r\nimport { Image } from '@msdyn365-commerce/core';\r\nimport { IImageProps } from '@msdyn365-commerce/core-internal/dist/types/components/image/image';\r\n\r\nexport default class BmaImage extends React.Component {\r\n constructor(props: IImageProps) {\r\n super(props);\r\n this.state = { imageSrc: '' };\r\n }\r\n public async componentDidMount() {\r\n console.log('BmaImage component did mount');\r\n if (this.props.snapShotId) {\r\n await this.loadBmaImages();\r\n }\r\n }\r\n\r\n private loadBmaImages = async () => {\r\n if (this.props.requestContext) {\r\n const bmaImageEndPoint = this.props.requestContext.app.config.bmaImageEndPoint.replace('#snapshotId', this.props.snapShotId);\r\n\r\n const response = await fetch(`${this.props.requestContext.app.config.bmaBaseUrl}${bmaImageEndPoint}`);\r\n const images = await response.json();\r\n this.setState({ imageSrc: images[0] });\r\n }\r\n };\r\n public render(): JSX.Element | null {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface IWishlistItemDimension {\r\n key: string;\r\n className?: string;\r\n dimensionType: string;\r\n dimensionValue: string;\r\n}\r\n\r\nexport const WishlistItemDimension: React.FC = ({ key, className, dimensionType, dimensionValue }) => (\r\n
\r\n {dimensionType}:\r\n {dimensionValue}\r\n
\r\n);\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IAny, ICoreContext, IGeneric, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { CommerceListLine, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getFallbackImageUrl, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport BmaImage from './bma-image';\r\nimport { IWishlistItemActionMessageState } from '../saved-design-list';\r\nimport { WishlistItemDimension } from './saved-design-list-dimensions';\r\n\r\nexport interface IWishlistItemProps extends CommerceListLine {\r\n product: SimpleProduct;\r\n wishlistState: IWishlistItemActionMessageState;\r\n price?: ProductPrice;\r\n context: ICoreContext>;\r\n productUrl: string;\r\n imageSettings?: IImageSettings;\r\n removeFromWishlistText: string;\r\n isInStock: boolean;\r\n moveToCustomizeText: string;\r\n outOfStockText: string;\r\n index: number;\r\n itemKey: string;\r\n telemetry: ITelemetry;\r\n moduleId: string;\r\n moduleTypeName: string;\r\n enableImageProductLink?: boolean;\r\n inventoryInformationLabel?: string;\r\n inventoryLabelClassName?: string;\r\n telemetryContent?: ITelemetryContent;\r\n handlers: {\r\n onRemoveItem(product: number): void | undefined;\r\n };\r\n resources: {\r\n productDimensionTypeColor: string;\r\n productDimensionTypeSize: string;\r\n productDimensionTypeStyle: string;\r\n originalPriceText: string;\r\n currentPriceText: string;\r\n freePriceText: string;\r\n };\r\n snapshotId: string;\r\n savedDesignRecordId: number;\r\n}\r\n\r\nexport interface IWishlistItemViewProps {\r\n key: string;\r\n productImage: React.ReactNode;\r\n productLink: React.ReactNode;\r\n productDimensions?: React.ReactNode[];\r\n productPrice?: React.ReactNode;\r\n moveToCustomizeButton?: React.ReactNode;\r\n removeButton?: React.ReactNode;\r\n productStatusMessage?: React.ReactNode;\r\n productName?: React.ReactNode;\r\n productAriaLabel?: string;\r\n entireProductLink?: string;\r\n inventoryInformation?: React.ReactNode;\r\n productUnitOfMeasure?: React.ReactNode;\r\n}\r\n\r\nconst _removeItemFromSavedDesign = (props: IWishlistItemProps): void => {\r\n const { onRemoveItem } = props.handlers;\r\n const savedDesignRecordId = props.savedDesignRecordId;\r\n\r\n onRemoveItem && props.product && onRemoveItem(savedDesignRecordId);\r\n};\r\n\r\nconst WishListItemActions = {\r\n removeItem: _removeItemFromSavedDesign\r\n};\r\n\r\nconst _renderAriaLabel = (props: IWishlistItemProps): string => {\r\n const { product, price, context, resources } = props;\r\n\r\n const { Name, Dimensions } = product;\r\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\r\n\r\n let formattedPrice = 'Free';\r\n let dimensions = null;\r\n\r\n if (price) {\r\n formattedPrice =\r\n price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\r\n }\r\n\r\n if (Dimensions) {\r\n dimensions = Dimensions.map(productDimension => {\r\n switch (productDimension.DimensionTypeValue) {\r\n case 1:\r\n return `${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 3:\r\n return `${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n case 4:\r\n return `${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\r\n default:\r\n return '';\r\n }\r\n });\r\n }\r\n\r\n return `${Name} ${formattedPrice} ${(dimensions && dimensions.join('')) || ''}`;\r\n};\r\n\r\n/**\r\n * Renders a link to a product based on the given props.\r\n * @param input - Wishlist item props with the info about the product.\r\n * @returns React component with a link to a product.\r\n */\r\nconst renderProductLink = (input: IWishlistItemProps) => {\r\n const { productUrl, telemetryContent } = input;\r\n const { RecordId: recordId, Name: productName } = input.product;\r\n const payLoad = getPayloadObject('click', telemetryContent!, '', recordId.toString());\r\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n return (\r\n !StringExtensions.isNullOrWhitespace(productUrl) && (\r\n \r\n {productName}\r\n \r\n )\r\n );\r\n};\r\n\r\n/**\r\n * Renders a product name box.\r\n * @param productName - The text to display.\r\n * @returns React component with a name of a product.\r\n */\r\nconst renderProductName = (productName: string) => {\r\n return
{productName}
;\r\n};\r\n\r\n/**\r\n * Renders inventory information.\r\n * @param inventoryInformationLabel - The text to display.\r\n * @param inventoryLabelClassName - The component class name.\r\n * @returns React component.\r\n */\r\nconst renderInventoryInformationLabel = (inventoryInformationLabel: string | undefined, inventoryLabelClassName: string | undefined) => {\r\n const inventoryCssName = inventoryLabelClassName\r\n ? `ms-wishlist-items__inventory-label ${inventoryLabelClassName}`\r\n : 'ms-wishlist-items__inventory-label';\r\n return (\r\n !StringExtensions.isNullOrWhitespace(inventoryInformationLabel) && (\r\n {inventoryInformationLabel}\r\n )\r\n );\r\n};\r\n\r\n/**\r\n * Renders add to cart button.\r\n * @param input - Wishlist item props with the configuration.\r\n * @returns React component.\r\n */\r\nconst SavedDesignMoveToCustomizeButtonComponent = (input: IWishlistItemProps) => {\r\n const { moveToCustomizeText } = input;\r\n const { productUrl, savedDesignRecordId } = input;\r\n const resultUrl =\r\n productUrl + (productUrl.indexOf('?') === -1 ? `?recordId=${savedDesignRecordId}` : `&recordId=${savedDesignRecordId}`);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n/**\r\n * Renders remove from wishlist button.\r\n * @param input - Wishlist item props with the configuration.\r\n * @returns React component.\r\n */\r\nconst WishlistItemRemoveFromWishlistButtonComponent = (input: IWishlistItemProps) => {\r\n const { removeFromWishlistText } = input;\r\n\r\n const removeItemAction = React.useCallback(() => {\r\n WishListItemActions.removeItem(input);\r\n }, [input]);\r\n\r\n return \r\n \r\n \r\n {this.props.flyoutTitle}\r\n {this._renderCartItemCount(this.props)}\r\n {this._renderCartCloseIcon()}\r\n \r\n \r\n {this.props.data.cart.result?.isEmpty ? this.props.slots.emptyCart : null}\r\n \r\n {renderCartlines(this.props.cartlines, this.props)}\r\n \r\n \r\n \r\n {this.props.slots.promoContentItem}\r\n {renderTotalPrice(this.props)}\r\n

\r\n {this.props.resources.subTotalMessage}\r\n

\r\n {this.props.checkoutAsSignInUserButton}\r\n {this.props.checkoutAsGuestButton}\r\n {this.props.data.cart.result?.isEmpty ? null : this.props.goToCartButton}\r\n \r\n {\r\n this.props.data.cart.result?.isEmpty ? \r\n {this.props.resources.continueShoppingButtonTitle}\r\n : null\r\n }\r\n \r\n
\r\n \r\n \r\n );\r\n }\r\n\r\n /**\r\n * Initiate modal container.\r\n * @returns Inode props.\r\n */\r\n private readonly _modalContainer = (): INodeProps => {\r\n return {\r\n tag: Modal,\r\n placement: 'bottom-end',\r\n hideArrow: true,\r\n className: 'ms-cart-icon__minicartmodal-container',\r\n wrapClassName: 'ms-cart-icon__minicartmodal',\r\n isOpen: this.state.isModalOpen,\r\n toggle: this.closeModal\r\n };\r\n };\r\n\r\n /**\r\n * Initiate open modal.\r\n */\r\n private readonly _openModal = (): void => {\r\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'cart-icon', '');\r\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'cart-icon');\r\n this.setState({\r\n isModalOpen: true\r\n });\r\n };\r\n\r\n /**\r\n * Initiate close modal.\r\n */\r\n private readonly closeModal = (): void => {\r\n this.setState({\r\n isModalOpen: false\r\n });\r\n\r\n };\r\n\r\n /**\r\n * Initiate cart close Icon.\r\n * @returns JSX Element.\r\n */\r\n private readonly _renderCartCloseIcon = (): JSX.Element | null => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Render Cart Item count.\r\n * @param props - Cart icon view props.\r\n * @returns JSX Element.\r\n */\r\n private readonly _renderCartItemCount = (props: ICartIconViewProps & ICartIconExtensionProps<{}>): JSX.Element | null => {\r\n let cartItemCount;\r\n const defaultCartItemCount: number = 0;\r\n const defaultCartItemCountOne: number = 1;\r\n\r\n if (ArrayExtensions.hasElements(props.cartlines)) {\r\n if (props.cartlines.length === defaultCartItemCountOne) {\r\n cartItemCount = `${defaultCartItemCountOne} ${props.resources.item}`;\r\n } else {\r\n cartItemCount = `${props.cartlines.length} ${props.resources.items}`;\r\n }\r\n } else {\r\n cartItemCount = `${defaultCartItemCount} ${props.resources.items}`;\r\n }\r\n return (\r\n \r\n {cartItemCount}\r\n \r\n );\r\n };\r\n\r\n /**\r\n * Handle escape click to close modal.\r\n * @param event - On press of any key.\r\n */\r\n private readonly _escFunction = (event: KeyboardEvent) => {\r\n if (event.keyCode === KeyCodes.Escape && this.state.isModalOpen) {\r\n this.closeModal();\r\n }\r\n };\r\n\r\n}\r\n\r\nexport default CartIconView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { RatingComponent } from '@msdyn365-commerce/components';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport { IHistogramItemViewProps,\r\n IRatingsHistogramData,\r\n IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { format, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IRatingsHistogramProps, IRatingsHistogramResources } from '../definition-extensions/ratings-histogram.ext.props.autogenerated';\r\n\r\n/**\r\n * Histogram item.\r\n * @param props - Histogram Item ViewProps.\r\n * @returns Histogram Item node.\r\n */\r\nconst histogramItem = (props: IHistogramItemViewProps) => {\r\n return (\r\n \r\n {props.starLabel}\r\n {props.bar}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Average ratings.\r\n * @param data - Props data.\r\n * @param context - Histogram Item ViewProps.\r\n * @param typeName - Histogram Item ViewProps.\r\n * @param componentId - Histogram Item ViewProps.\r\n * @param resources - Module resource strings.\r\n * @returns Average ratings.\r\n */\r\nconst averageRating = (data: IRatingsHistogramData, context: ICoreContext, typeName: string, componentId: string, resources: IRatingsHistogramResources) => {\r\n const defaultAverageRating: number = 0;\r\n const reviewsCount = data.ratingsSummary.result?.reviewsCount ?? defaultAverageRating;\r\n const reviewsCountString = resources.numberOfReviewsString ? format(resources.numberOfReviewsString, reviewsCount) : `${reviewsCount} reviews`;\r\n\r\n return (\r\n
\r\n
\r\n {data.ratingsSummary.result?.averageRating}\r\n
\r\n
\r\n \r\n
\r\n
\r\n {reviewsCountString}\r\n
\r\n
\r\n );\r\n};\r\n\r\n/**\r\n * Histogram view.\r\n * @param props - Ratings HistogramV iewProps.\r\n * @returns Histogram view module.\r\n */\r\nconst RatingsHistogramView: React.FC> = props => {\r\n const { heading, histogramItems, histogramProps, moduleProps, data, resources } = props;\r\n const context = props.context;\r\n const typeName = props.typeName;\r\n const moduleId = props.id;\r\n\r\n return (\r\n \r\n {heading}\r\n
\r\n {averageRating(data, context, typeName, moduleId, resources)}\r\n \r\n {histogramItems.map(item => {\r\n return histogramItem(item);\r\n })}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default RatingsHistogramView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {!isMobileDevice && (\n
\n \n
\n )}\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBulkPurchaseViewProps } from './bulk-purchase';\n\n/**\n * Bulk purchase view.\n * @param props - Bulk purchase view props.\n * @returns React node with a module.\n */\nexport const BulkPurchaseViewComponent: React.FC = props => {\n return {props.content};\n};\n\nexport default BulkPurchaseViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICartIconViewProps } from './cart-icon';\nimport { IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\n\nconst _renderCartlines = (cartLines: IFlyoutCartLineItemViewProps[] | undefined, props: ICartIconViewProps): JSX.Element[] | null => {\n if (!cartLines) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n return cartLines.map((cartLine, index) => {\n return (\n \n {cartLine.cartline}\n {cartLine.storeLocation}\n {cartLine.remove}\n \n );\n });\n};\n\nconst CartIconView: React.FC = (props: ICartIconViewProps) => (\n \n {props.cartIcon}\n {props.FlyoutContainer ? (\n \n {props.flyoutTitle}\n {_renderCartlines(props.cartlines, props)}\n {props.totalPrice}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.goToCartButton}\n \n ) : (\n false\n )}\n \n);\n\nexport default CartIconView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\n description?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.description\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description }) => {\n if (!description) {\n return null;\n }\n\n return {description};\n};\n\nexport default CheckoutDeliveryOptionsDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

;\n};\n\nexport default CheckoutDeliveryOptionsErrorMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsErrorTitleProps {\n title?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.title\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsErrorTitle: React.FC = ({ title }) => {\n if (!title) {\n return null;\n }\n\n return

{title}

;\n};\n\nexport default CheckoutDeliveryOptionsErrorTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaSetSize\n * @param root0.ariaPosInSet\n * @param root0.ariaLabel\n * @param root0.telemetryContent\n * @param root0.onChange\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n onChange\n}) => {\n if (!value) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsRadioButton;\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 { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { Cart, ChannelDeliveryOptionConfiguration, FilterDeliveryModeOption } from '@msdyn365-commerce/retail-proxy';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { Address, CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ErrorComponent } from '../../common/error';\nimport { ICheckoutDeliveryOptionsData } from './checkout-delivery-options.data';\nimport {\n filterDeliveryModeOption,\n ICheckoutDeliveryOptionsProps,\n useDefaultDeliveryOption\n} from './checkout-delivery-options.props.autogenerated';\nimport DescriptionComponent from './components/checkout-delivery-options.description';\nimport ErrorMessageComponent from './components/checkout-delivery-options.error-message';\nimport ErrorTitleComponent from './components/checkout-delivery-options.error-title';\nimport RadioButtonComponent from './components/checkout-delivery-options.radio-button';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutDeliveryOptionsModuleProps\n extends ICheckoutDeliveryOptionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutDeliveryOption {\n DeliveryOption: INodeProps;\n description?: React.ReactNode;\n price?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\n code: string;\n radioButton?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsList {\n DeliveryOptionsList: INodeProps;\n list: ICheckoutDeliveryOptionEdit[];\n}\n\nexport interface ICheckoutDeliveryOptionsError {\n Error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsViewState {\n isLoading: boolean;\n isError: boolean;\n isShowList: boolean;\n isShowSelected: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutDeliveryOptionsViewProps extends ICheckoutDeliveryOptionsProps<{}> {\n CheckoutDeliveryOptions: IModuleProps;\n selectedItemId: string;\n deliveryOptionsData: DeliveryOption[];\n isLoading: boolean;\n errorMessageData: string;\n viewState: ICheckoutDeliveryOptionsViewState;\n deliveryOptions?: ICheckoutDeliveryOptionsList;\n deliveryOptionSelected?: ICheckoutDeliveryOption;\n errorMessage?: ICheckoutDeliveryOptionsError;\n waiting?: React.ReactNode;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onDeliveryOptionChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutDeliveryOptions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutDeliveryOptions extends React.Component {\n @observable private selectedItemId: string = '';\n\n @observable private deliveryOptions: DeliveryOption[] = [];\n\n @observable private isLoading: boolean = false;\n\n @observable private errorMessage?: string;\n\n @computed private get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n public get expressPaymentDetailsFromCartPage() {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? JSON.parse(properties) : null;\n }\n\n public get isExpressPaymentAppliedInCartPage(): boolean {\n return this.expressPaymentDetailsFromCartPage?.isExpressCheckoutAppliedInCartPage ?? false;\n }\n\n private cartDeliveryMode?: string;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly isSelectDefaultOptionEnabled?: boolean;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutDeliveryOptionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isSelectDefaultOptionEnabled =\n this.props.config.useDefaultDeliveryOption && this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddress,\n async () => {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n async isExpressCheckoutApplied => {\n if (isExpressCheckoutApplied && this.canShip() && !this.isExpressPaymentAppliedInCartPage) {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutDeliveryOptions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutDeliveryOptions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps, nextState: ICheckoutDeliveryOptionsViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\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 if (!this.canShip()) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const {\n moduleState: { isReady, isUpdating, hasError }\n } = this.props;\n const isError = !this.isLoading && hasError;\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n const { errorMessageTitle, deliveryOptionAriaLabel } = this.props.resources;\n\n const viewProps = {\n ...this.props,\n onDeliveryOptionChange: this.onDeliveryOptionChange,\n selectedItemId: this.selectedItemId,\n deliveryOptionsData: this.deliveryOptions,\n isLoading: this.isLoading,\n alert: this.errorMessage && ,\n errorMessageData: this.errorMessage,\n viewState: {\n isLoading: this.isLoading,\n isError,\n isShowList,\n isShowSelected,\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\n },\n CheckoutDeliveryOptions: {\n moduleProps: this.props,\n className: classname('ms-checkout-delivery-options', this.props.config.className)\n },\n deliveryOptions: {\n DeliveryOptionsList: {\n className: 'ms-checkout-delivery-options__list',\n role: 'list',\n 'aria-label': deliveryOptionAriaLabel\n },\n list: this.getDeliveryOptionList()\n },\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\n errorMessage: this.getErrorMessage(),\n waiting: ,\n checkoutErrorRef: this.checkoutErrorRef,\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSave,\n onEdit: this.onEdit,\n onCancel: this.onCancel\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\n status:\n !(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\n this.canShip()\n ? 'updating'\n : 'disabled'\n });\n\n this.cartDeliveryMode = this.getSavedDeliveryOption();\n await this.loadDeliveryOptions();\n };\n\n private readonly canShip = (): boolean => {\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\n };\n\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\n if (deliveryMode) {\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\n return true;\n }\n }\n return false;\n };\n\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\n if (!selectedItem) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const { id, typeName, context } = this.props;\n const { priceFree } = this.props.resources;\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\n\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option-selected' },\n description: ,\n price: (\n \n )\n };\n };\n\n private readonly getErrorMessage = (): ICheckoutDeliveryOptionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n // @ts-expect-error\n CheckoutDeliveryOptionsError: { tag: 'span', className: 'ms-address-form__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getDeliveryOptionList = (): ICheckoutDeliveryOptionEdit[] => {\n const count = this.deliveryOptions.length;\n const { priceFree } = this.props.resources;\n const { id, typeName, context } = this.props;\n\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'listitem' },\n code: deliveryOption.Code || '',\n radioButton: (\n \n ),\n description: (\n \n ),\n price: (\n \n )\n };\n });\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save' } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onSave = async (): Promise => {\n await this.onSubmit();\n };\n\n private readonly onEdit = async (): Promise => {\n this.props.telemetry.information('Delivery options onEdit is called.');\n\n this.clearError();\n this.onUpdating();\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Delivery options onSubmit is called.');\n\n await this.updateCartDeliverySpecification(this.selectedItemId);\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n };\n\n private readonly onCancel = async (): Promise => {\n this.props.telemetry.information('Delivery options onCancel is called.');\n\n // Reset to the saved value\n const savedDeliveryOption = this.getSavedDeliveryOption();\n if (savedDeliveryOption) {\n this.selectedItemId = savedDeliveryOption;\n this.onReady();\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n } else {\n this.onUpdating();\n }\n };\n\n private readonly getSavedDeliveryOption = (): string | undefined => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\n };\n\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\n if (deliveryModeId.trim() === '') {\n return;\n }\n\n const { resources } = this.props;\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const updateCartDeliverySpecificationInput = {\n deliveryModeId,\n shippingAddress: checkoutState.shippingAddress,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\n };\n\n this.clearError();\n this.onPending();\n\n await checkoutState.checkoutCart\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\n .then(response => {\n if (response.status === 'FAILED') {\n const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\n this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\n }\n\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n })\n .catch(() => {\n this.setError(resources.genericErrorMessage);\n });\n };\n\n private readonly getCartLinesForShipping = (): CartLine[] => {\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n\n return this.retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context, resources, config } = this.props;\n const cartState = this.props.data.checkout.result?.checkoutCart;\n const cartId = (cartState.cart as Cart).Id;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n try {\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n }\n\n // TODO: Check if we can move this getDeliveryOptions to checkout state\n let deliveryOptionFilter: FilterDeliveryModeOption;\n switch (config.filterDeliveryModeOption) {\n case filterDeliveryModeOption.none:\n deliveryOptionFilter = FilterDeliveryModeOption.None;\n break;\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n break;\n default:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n }\n const response = await getDeliveryOptionsAsync(\n {\n callerContext: context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\n },\n cartId,\n shippingAddress,\n [],\n deliveryOptionFilter,\n true\n );\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n\n if (response && response.length > 0) {\n this.deliveryOptions = response;\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n\n if (this.deliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n } else {\n this.onUpdating();\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: !!this.isSelectDefaultOptionEnabled });\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly getStoredDeliveryOptions = async (): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context } = this.props;\n const cartState = this.props.data.checkout.result.checkoutCart;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n }\n\n if (this.cartDeliveryMode) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly loadDeliveryOptions = async (): Promise => {\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\n\n if (this.canShip() && shippingAddress) {\n if (\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied\n ) {\n await this.getDeliveryOptions(shippingAddress);\n }\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.getStoredDeliveryOptions();\n }\n\n if (\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.isExpressPaymentAppliedInCartPage\n ) {\n this.onSubmit();\n }\n }\n };\n\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\n const deliveryModeId = event.currentTarget.value;\n this.selectedItemId = deliveryModeId;\n };\n\n private readonly onReady = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onUpdating();\n }\n };\n\n private readonly onPending = () => {\n if (!this.isSelectDefaultOptionEnabled) {\n this.props.moduleState.onPending();\n }\n };\n}\n\nexport default CheckoutDeliveryOptions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutDeliveryOption,\n ICheckoutDeliveryOptionEdit,\n ICheckoutDeliveryOptionsList,\n ICheckoutDeliveryOptionsViewProps\n} from './checkout-delivery-options';\n\nconst DeliveryOptionList: React.FC = ({ DeliveryOptionsList, list }) => {\n if (!list || list.length === 0) {\n return null;\n }\n\n return (\n \n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\n return (\n \n {deliveryOption.radioButton}\n {deliveryOption.description}\n {deliveryOption.price}\n \n );\n })}\n \n );\n};\n\nconst DeliveryOptionSelected: React.FC = ({ DeliveryOption, description, price }) => {\n return (\n \n {description}\n {price}\n \n );\n};\n\nconst CheckoutDeliveryOptionsView: React.FC = props => {\n const {\n CheckoutDeliveryOptions,\n checkoutErrorRef,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n alert,\n waiting,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isLoading && waiting}\n {viewState.isError && alert}\n {viewState.isShowList && deliveryOptions && }\n {viewState.isShowSelected && deliveryOptionSelected && }\n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutDeliveryOptionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { showAdditionalFields } from '../checkout-gift-card.props.autogenerated';\n\nexport interface IGetFormInput {\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n inputRef?: React.RefObject;\n inputPinRef?: React.RefObject;\n inputExpRef?: React.RefObject;\n supportExternalGiftCard?: boolean;\n additionalFields?: showAdditionalFields;\n disableAddGiftCard?: boolean;\n resources: {\n applyGiftCardButton: string;\n giftCardFormLabel: string;\n giftCardNumberLabel: string;\n giftCardPinLabel: string;\n giftCardExpLabel: string;\n giftCardAlertLabel: string;\n giftCardPinPlaceholderText: string;\n giftCardExpPlaceholderText: string;\n };\n onEnterGiftCardNumber(giftCardNumber: string): void;\n onEnterGiftCardPin(giftCardPin: string): void;\n onEnterGiftCardExp(giftCardExp: string): void;\n onApplyGiftCard(): Promise;\n}\n\nexport interface IForm {\n formProps: INodeProps;\n label: React.ReactNode;\n inputPinLabel: React.ReactNode;\n inputExpLabel: React.ReactNode;\n alert: React.ReactNode;\n inputProps: INodeProps;\n inputNumProps: INodeProps;\n inputPinProps: INodeProps;\n inputExpProps: INodeProps;\n inputNumber: React.ReactNode;\n inputPin: React.ReactNode;\n inputExp: React.ReactNode;\n applyButton: React.ReactNode;\n supportExternalGiftCard: boolean | undefined;\n showGiftCardPinInput: boolean | undefined;\n showGiftCardExpInput: boolean | undefined;\n alertFieldLabel: React.ReactNode;\n}\n\n/**\n * On Apply Function.\n * @param onApplyGiftCard -On Apply Gift Card Function.\n * @returns Call of Apply Gift Card Function.\n */\nconst onApplyHandler = (onApplyGiftCard: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onApplyGiftCard();\n};\n\n/**\n * On change number Function.\n * @param onEnterGiftCardNumber -On enter gift card number Function.\n * @returns Call of on enter gift card number Function.\n */\nconst onChangeNumberHandler = (onEnterGiftCardNumber: (giftCardNumber: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardNumber(value);\n};\n\n/**\n * On Change pin event.\n * @param onEnterGiftCardPin -On enter gift card pin Function.\n * @returns Call of on enter gift card pin Function.\n */\nconst onChangePinHandler = (onEnterGiftCardPin: (giftCardPin: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardPin(value);\n};\n\n/**\n * On Change Event.\n * @param onEnterGiftCardExp -On enter gift card function.\n * @returns Call of On enter gift card function.\n */\n// Need to filter out the month and year\nconst onChangeExpHandler = (onEnterGiftCardExp: (giftCardExp: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardExp(value);\n};\n\nexport const getForm = (options: IGetFormInput): IForm => {\n const {\n errorMessage,\n inputRef,\n inputPinRef,\n inputExpRef,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n onEnterGiftCardNumber,\n onEnterGiftCardPin,\n onEnterGiftCardExp,\n onApplyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n disableAddGiftCard,\n resources: {\n applyGiftCardButton,\n giftCardFormLabel,\n giftCardNumberLabel,\n giftCardPinLabel,\n giftCardExpLabel,\n giftCardAlertLabel,\n giftCardPinPlaceholderText,\n giftCardExpPlaceholderText\n }\n } = options;\n\n const formProps = {\n className: classnames('ms-checkout-gift-card__form', { 'is-invalid': !!errorMessage }),\n onSubmit: onApplyHandler(onApplyGiftCard),\n tag: 'form' as NodeTag\n };\n\n const label = (\n \n );\n\n const inputPinLabel = (\n \n );\n\n const inputExpLabel = (\n \n );\n\n const alertFieldLabel = (\n \n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const inputProps = {\n className: 'ms-checkout-gift-card__input-fields'\n };\n\n const inputNumProps = {\n className: 'ms-checkout-gift-card__input-num-fields'\n };\n\n const inputPinProps = {\n className: 'ms-checkout-gift-card__input-pin-fields'\n };\n\n const inputExpProps = {\n className: 'ms-checkout-gift-card__input-exp-fields'\n };\n\n const inputNumber = (\n \n );\n\n const inputPin = (\n \n );\n\n const inputExp = (\n \n );\n\n const applyButton = (\n \n {applyGiftCardButton}\n \n );\n\n let showGiftCardPinInput = false;\n let showGiftCardExpInput = false;\n\n switch (additionalFields) {\n case showAdditionalFields.pin:\n showGiftCardPinInput = true;\n break;\n case showAdditionalFields.expirationDate:\n showGiftCardExpInput = true;\n break;\n case showAdditionalFields.pinAndExpirationDate:\n showGiftCardPinInput = true;\n showGiftCardExpInput = true;\n break;\n default:\n }\n\n return {\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IGetItemInput {\n giftCard: IGiftCardExtend;\n canRemove: boolean;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n removeGiftCardButton: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n onRemoveGiftCard(giftCardNumber: string): void;\n}\n\nexport interface IItem {\n itemProps: INodeProps;\n id?: string;\n selectedGiftCard: React.ReactNode;\n removeButton?: React.ReactNode;\n}\n\n/**\n * On remove function.\n * @param onRemoveGiftCard -Gift card number function.\n * @param giftCard -Gift card values.\n * @returns Call of onRemoveGiftCard function.\n */\nconst onRemoveHandler = (onRemoveGiftCard: (giftCardNumber: string) => void, giftCard: IGiftCardExtend) => (): void => {\n onRemoveGiftCard(giftCard.Id ?? '');\n};\n\n/**\n * GiftCardItem component.\n * @param root0\n * @param root0.giftCard\n * @param root0.getFormattedPrice\n * @param root0.canRemove\n * @param root0.onRemoveGiftCard\n * @param root0.resources\n * @param root0.resources.enteredGiftCardLabel\n * @param root0.resources.giftCardAvailableBalanceLabel\n * @param root0.resources.removeGiftCardButton\n * @extends {React.PureComponent}\n */\nexport const getItem = ({\n giftCard,\n getFormattedPrice,\n canRemove,\n onRemoveGiftCard,\n resources: { enteredGiftCardLabel, giftCardAvailableBalanceLabel, removeGiftCardButton }\n}: IGetItemInput): IItem => {\n const balance = getFormattedPrice(giftCard.Balance, giftCard.CardCurrencyCode);\n const giftCardLast4Digit = (giftCard.Id || '').substr(-4);\n\n const itemProps = {\n className: 'ms-checkout-gift-card__item'\n };\n\n const selectedGiftCard = (\n \n {enteredGiftCardLabel}\n {` `}\n {giftCardLast4Digit}\n {' ('}\n {giftCardAvailableBalanceLabel}\n {` `}\n {balance}\n {')'}\n \n );\n\n const removeButton = canRemove && (\n \n );\n\n return {\n itemProps,\n id: giftCard.Id,\n selectedGiftCard,\n removeButton\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\n\nimport { getItem, IItem } from './get-item';\n\ninterface IGetListInput {\n giftCards?: IGiftCardExtend[];\n canRemove: boolean;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n removeGiftCardButton: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n onRemoveGiftCard(giftCardNumber: string): void;\n}\n\nexport interface IList {\n listProps: INodeProps;\n list: IItem[];\n}\n\nexport const getList = ({ giftCards, canRemove, resources, getFormattedPrice, onRemoveGiftCard }: IGetListInput): IList | undefined => {\n if (!giftCards || giftCards.length === 0) {\n return undefined;\n }\n\n const listProps = {\n className: 'ms-checkout-gift-card__list'\n };\n\n const list = giftCards.map(giftCard =>\n getItem({\n canRemove,\n getFormattedPrice,\n giftCard,\n onRemoveGiftCard,\n resources\n })\n );\n\n return {\n listProps,\n list\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IGiftCardTitleProps {\n title: string;\n}\n\nconst GiftCardTitle: React.FC = ({ title }) => ;\n\nexport default GiftCardTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CheckoutModule, ErrorLocation, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport {\n getGiftCardAsync,\n getTenderTypesAsync,\n resolveCardTypesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CardType,\n CardTypeInfo,\n GiftCard,\n RetailOperation,\n TenderType\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { OPERATIONS } from '../checkout';\nimport { ICheckoutGiftCardData } from './checkout-gift-card.data';\nimport { ICheckoutGiftCardProps } from './checkout-gift-card.props.autogenerated';\nimport { getForm, IForm } from './components/get-form';\nimport { getList, IList } from './components/get-list';\nimport TitleCompoent from './components/title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport * from './components/get-form';\nexport * from './components/get-item';\nexport * from './components/get-list';\n\ninterface ICheckoutGiftCardState {\n isFetchingGiftCard: boolean;\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n}\n\nenum SupportedGiftCardType {\n Internal = 'internal',\n External = 'external',\n Both = 'both'\n}\n\nexport interface ICheckoutGiftCardModuleProps extends ICheckoutGiftCardProps, IModuleStateProps {}\n\nexport interface IShowResource {\n title: React.ReactNode;\n list?: IList;\n}\n\nexport interface IAddResource {\n form: IForm;\n list?: IList;\n}\n\nexport interface ICheckoutGiftCardViewProps extends ICheckoutGiftCardProps<{}>, ICheckoutGiftCardState {\n className?: string;\n\n showGiftCard?: IShowResource;\n addGiftCard?: IAddResource;\n\n checkoutGiftCardProps: IModuleProps;\n couldPaidByGiftCard?: boolean;\n isEnabled?: boolean;\n checkoutErrorRef?: React.RefObject;\n onEdit?(): void;\n onCancel?(): void;\n onSubmit?(): void;\n enterGiftCardNumber?(giftCardNumber: string): void;\n enterGiftCardPin?(giftCardNumber: string): void;\n enterGiftCardExp?(giftCardNumber: string): void;\n removeGiftCard?(giftCardNumber: string): void;\n applyGiftCard?(): void;\n}\n\n/**\n *\n * CheckoutGiftCard component.\n * @extends {React.Component, ICheckoutGiftCardState>}\n */\n@observer\nexport class CheckoutGiftCard extends React.Component {\n public state: ICheckoutGiftCardState = {\n isFetchingGiftCard: false,\n errorMessage: '',\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: ''\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n private readonly inputPinRef: React.RefObject = React.createRef();\n\n private readonly inputExpRef: React.RefObject = React.createRef();\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get getCustomerAccountAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n return checkoutState && checkoutState.customerAccountAmount ? checkoutState.customerAccountAmount : 0;\n }\n\n @computed get getGiftCardTotalAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.giftCardExtends) {\n return 0;\n }\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\n const balance: number = giftCard.Balance || 0;\n return count + balance;\n }, 0);\n }\n\n @computed get disableAddGiftCard(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return true;\n }\n return (cart.TotalAmount || 0) - this.getLoyaltyAmount - this.getGiftCardTotalAmount <= 0;\n }\n\n @computed get shouldPayGiftCard(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use gift card card when loyalty points do not cover the total amount\n const amountDue = (cart.TotalAmount || 0) - this.getLoyaltyAmount - this.getCustomerAccountAmount;\n return amountDue > 0;\n }\n\n @computed get hasSelectedItem(): boolean {\n const {\n data: { checkout }\n } = this.props;\n const giftCards = checkout.result && checkout.result.giftCardExtends;\n return !!giftCards && giftCards.length > 0;\n }\n\n public componentDidMount(): void {\n when(\n () => this.isDataReady,\n () => {\n this.init();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutGiftCard && checkoutError.errorMessage) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutGiftCard) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutGiftCardModuleProps, nextState: ICheckoutGiftCardState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n moduleState: { isReady },\n data: { checkout },\n config: { className, showAdditionalFields },\n resources\n } = this.props;\n const { errorMessage, giftCardNumber, giftCardPin, giftCardExp } = this.state;\n const giftCards = checkout.result && checkout.result.giftCardExtends;\n const additionalFields = showAdditionalFields;\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!this.isEnabled() || (!this.shouldPayGiftCard && !isReady)) {\n this.props.context.telemetry.error('Checkout giftcard content is empty, module wont render');\n return null;\n }\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.GiftCard === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout gift card module wont render');\n return null;\n }\n\n const supportExternalGiftCard = supportedGiftCardType !== SupportedGiftCardType.Internal;\n\n const moduleClassName = classname('ms-checkout-gift-card', className, isReady ? 'show' : 'add');\n\n const viewProps: ICheckoutGiftCardViewProps = {\n ...this.props,\n ...this.state,\n className: moduleClassName,\n checkoutErrorRef: this.checkoutErrorRef,\n\n checkoutGiftCardProps: { moduleProps: this.props, className: moduleClassName },\n couldPaidByGiftCard: this.couldPaidByGiftCard(),\n isEnabled: this.isEnabled(),\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n enterGiftCardNumber: this.enterGiftCardNumber,\n enterGiftCardPin: this.enterGiftCardPin,\n enterGiftCardExp: this.enterGiftCardExp,\n removeGiftCard: this.removeGiftCard,\n applyGiftCard: this.applyGiftCard,\n showGiftCard: isReady\n ? {\n title: ,\n list: getList({\n canRemove: false,\n getFormattedPrice: this.getFormattedPrice,\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\n onRemoveGiftCard: this.removeGiftCard,\n resources\n })\n }\n : undefined,\n addGiftCard: !isReady\n ? {\n form: getForm({\n errorMessage,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n inputRef: this.inputRef,\n inputPinRef: this.inputPinRef,\n inputExpRef: this.inputExpRef,\n resources,\n onEnterGiftCardNumber: this.enterGiftCardNumber,\n onEnterGiftCardPin: this.enterGiftCardPin,\n onEnterGiftCardExp: this.enterGiftCardExp,\n onApplyGiftCard: this.applyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n disableAddGiftCard: this.disableAddGiftCard\n }),\n list: getList({\n canRemove: true,\n getFormattedPrice: this.getFormattedPrice,\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\n onRemoveGiftCard: this.removeGiftCard,\n resources\n })\n }\n : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly init = (): void => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n isRequired: false,\n ...(!this.isEnabled() && { status: 'disabled' })\n });\n\n const giftCards = this.props.data.checkout.result?.giftCardExtends;\n if (giftCards && giftCards.length > 0) {\n this.props.moduleState.onReady();\n } else if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly couldPaidByGiftCard = (): boolean => {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart?.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use gift card when it is not free\n return (cart.TotalAmount || 0) > 0;\n };\n\n private readonly isEnabled = (): boolean => {\n if (\n !this.props.context.request.user.isAuthenticated &&\n this.props.context.app.config.giftCardSupported !== SupportedGiftCardType.External &&\n !this.props.config.shouldBeEnabledForGuest\n ) {\n return false;\n }\n return this.couldPaidByGiftCard();\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section gift card onEdit is called.');\n\n // Show add gift card form\n this.props.moduleState.onUpdating();\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Payment section gift card onCancel is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly onSubmit = (): void => {\n this.props.telemetry.information('Payment section gift card onSubmit is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly handleCancelOrSubmit = () => {\n if (this.hasSelectedItem) {\n // Show summary screen\n this.props.moduleState.onReady();\n } else {\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly getFormattedPrice = (price: number = 0, currencyCode: string = 'USD'): string => {\n return this.props.context.cultureFormatter.formatCurrency(price, currencyCode);\n };\n\n private readonly enterGiftCardNumber = (giftCardNumber: string): void => {\n this.setState({\n giftCardNumber\n });\n this.clearError();\n };\n\n private readonly enterGiftCardPin = (giftCardPin: string): void => {\n this.setState({\n giftCardPin\n });\n this.clearError();\n };\n\n private readonly enterGiftCardExp = (giftCardExp: string): void => {\n this.setState({\n giftCardExp\n });\n this.clearError();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error('Error', errorMessage);\n this.props.telemetry.debug('Error', errorMessage);\n this.props.moduleState.setHasError(true);\n this.setState({\n errorMessage\n });\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n\n private readonly removeGiftCard = async (giftCardNumber: string): Promise => {\n this.props.telemetry.information('Payment section gift card remove is called.');\n\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState) {\n return;\n }\n\n await checkoutState.removeGiftCard({ giftCardNumber });\n };\n\n private readonly applyGiftCard = async (): Promise => {\n this.props.telemetry.information('Payment section gift card apply is called.');\n\n if (this.state.isFetchingGiftCard) {\n return;\n }\n this.setState({\n isFetchingGiftCard: true\n });\n\n const checkoutState = this.props.data.checkout.result;\n const giftCardNumber = this.state.giftCardNumber.trim();\n const giftCardPin = this.state.giftCardPin.trim();\n const giftCardExp = this.state.giftCardExp.trim();\n\n const giftCardTypes = await this.getGiftCardTypes(giftCardNumber);\n const giftCardType = giftCardTypes && giftCardTypes[0];\n const isPinRequired = giftCardType && giftCardType.IsPinRequired;\n const isExpRequired = giftCardType && giftCardType.IsExpirationDateRequired;\n const tenderTypeId = giftCardType && giftCardType.PaymentMethodId;\n const giftCard = await this.getGiftCard(giftCardNumber, giftCardPin, giftCardExp, isPinRequired, isExpRequired, tenderTypeId);\n\n if (checkoutState && giftCard) {\n await checkoutState.addGiftCard({\n giftCard,\n additionalProperties: { Pin: giftCardPin, ExpirationDate: giftCardExp, TenderTypeId: tenderTypeId }\n });\n this.clearError();\n this.setState({\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: '',\n isFetchingGiftCard: false\n });\n return Promise.resolve();\n }\n const input = this.inputRef && this.inputRef.current && this.inputRef.current.focus && (this.inputRef.current as HTMLElement);\n input && input.focus();\n this.setState({\n isFetchingGiftCard: false\n });\n this.props.telemetry.information('Payment section fetching gift card is failed.');\n };\n\n private readonly findGiftcardTenderTypes = (\n tenderTypes: TenderType[],\n operationId: RetailOperation,\n giftcardType: string\n ): string[] | undefined => {\n let matchedTenderTypes: TenderType[] | undefined;\n\n switch (giftcardType) {\n case SupportedGiftCardType.Internal:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId === ''\n );\n break;\n case SupportedGiftCardType.External:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId !== ''\n );\n break;\n default:\n throw new Error('Invalid gift card type');\n }\n\n if (matchedTenderTypes) {\n return matchedTenderTypes.map(tenderType => tenderType.TenderTypeId || '');\n }\n return;\n };\n\n private readonly getGiftCard = async (\n giftCardNumber: string,\n giftCardPin: string,\n giftCardExp: string,\n isPinRequired: boolean | undefined,\n isExpRequired: boolean | undefined,\n tenderTypeId: string | undefined\n ): Promise => {\n const {\n resources: { noBalanceError, invalidCardInfoError, invalidCardTypeError, noCardPinError, noCardExpError }\n } = this.props;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!tenderTypeId) {\n return undefined;\n }\n\n const tenderTypes = await getTenderTypesAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} }).catch(\n error => {\n throw error;\n }\n );\n\n if (!tenderTypes) {\n throw new Error('Fail to get gift card tender line');\n }\n const internalGiftcardTenderTypes = this.findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.Internal\n );\n const externalGiftcardTenderTypes = this.findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.External\n );\n\n switch (supportedGiftCardType) {\n case undefined:\n case SupportedGiftCardType.Internal:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.External:\n if (!externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.Both:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId) && !externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n default:\n throw new Error('Unsupported gift card type');\n }\n\n if (isPinRequired && giftCardPin === '') {\n this.setError(noCardPinError);\n return undefined;\n }\n\n if (isExpRequired && giftCardExp === '') {\n this.setError(noCardExpError);\n return undefined;\n }\n\n const month = Number.parseInt(giftCardExp.split('/')[0], 10);\n const year = Number.parseInt(giftCardExp.split('/')[1], 10);\n\n return getGiftCardAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, tenderTypeId, giftCardPin, month, year)\n .then(activeGiftCard => {\n if (!activeGiftCard.Balance || activeGiftCard.Balance === 0) {\n this.setError(noBalanceError);\n return;\n }\n return activeGiftCard;\n })\n .catch(error => {\n this.setError(invalidCardInfoError);\n return undefined;\n });\n };\n\n private readonly getGiftCardTypes = async (giftCardNumber: string): Promise => {\n const {\n resources: { emptyInputError, duplicatedCodeError, invalidCodeError },\n data: { checkout }\n } = this.props;\n\n if (!giftCardNumber) {\n this.setError(emptyInputError);\n return undefined;\n }\n\n const isDuplicated = checkout.result && checkout.result.giftCardExtends.some((card: GiftCard) => card.Id === giftCardNumber);\n if (isDuplicated) {\n this.setError(duplicatedCodeError);\n return undefined;\n }\n\n return resolveCardTypesAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, CardType.GiftCard)\n .then(giftCardTypes => {\n if (!giftCardTypes || giftCardTypes.length === 0 || giftCardTypes[0] === undefined) {\n this.setError(invalidCodeError);\n return;\n }\n return giftCardTypes;\n })\n .catch(error => {\n this.setError(invalidCodeError);\n return undefined;\n });\n };\n}\n\nexport default withModuleState(CheckoutGiftCard);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddResource, ICheckoutGiftCardViewProps, IForm, IItem, IList, IShowResource } from './checkout-gift-card';\n\nexport const From: React.FC = ({\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n}) => (\n \n {alert}\n {supportExternalGiftCard ? (\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput && (\n \n {inputPinLabel}\n {inputPin}\n \n )}\n {showGiftCardExpInput && (\n \n {inputExpLabel}\n {inputExp}\n \n )}\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n ) : (\n <>\n {label}\n {inputNumber}\n \n )}\n {applyButton}\n \n);\n\nexport const SelectedGiftCard: React.FC = ({ itemProps, selectedGiftCard, removeButton }) => (\n \n {selectedGiftCard}\n {removeButton}\n \n);\n\nexport const GiftCardList: React.FC = ({ listProps, list }) => (\n \n {list.map(({ id, ...item }) => (\n \n ))}\n \n);\n\nexport const AddResource: React.FC = ({ form, list }) => (\n <>\n {form && }\n {list && }\n \n);\n\nexport const ShowResource: React.FC = ({ title, list }) => (\n <>\n {title}\n {list && }\n \n);\n\nconst CheckoutGiftCardView: React.FC = props => {\n const { checkoutGiftCardProps, checkoutErrorRef, showGiftCard, addGiftCard } = props;\n return (\n \n {showGiftCard && }\n {addGiftCard && }\n \n );\n};\n\nexport default CheckoutGiftCardView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutLoyaltyInput {\n className: string;\n type: string;\n value: string | number;\n min: number;\n max: number;\n ariaValueMax: number;\n ariaValueMin: number;\n ariaValueNow: number;\n id: string;\n step: string;\n onChange(event: React.ChangeEvent): void;\n onBlur(event: React.FocusEvent): void;\n}\n\nconst AdressInput: React.FC = ({\n className,\n type,\n value,\n min,\n max,\n step,\n ariaValueMax,\n ariaValueMin,\n ariaValueNow,\n onChange,\n onBlur,\n id\n}) => (\n \n);\n\nexport default AdressInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutLoyaltyLabelProps {\n className: string;\n text: string;\n htmlFor: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.className\n * @param root0.text\n * @param root0.htmlFor\n * @extends {React.FC}\n */\nconst CheckoutLoyaltyLabel: React.FC = ({ className, text, htmlFor }) => {\n return (\n \n );\n};\n\nexport default CheckoutLoyaltyLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutLoyaltyTextProps {\n className: string;\n text?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.className\n * @param root0.text\n * @extends {React.FC}\n */\nconst CheckoutLoyaltyText: React.FC = ({ className, text }) => {\n if (!text) {\n return null;\n }\n\n return {text};\n};\n\nexport default CheckoutLoyaltyText;\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 { callActionOrExecute } from '@msdyn365-commerce/retail-proxy';\nimport { createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { LoyaltyPointRedemptionEstimate, LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { GetLoyaltyTransactionEstimationInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Drawer, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyData } from './checkout-loyalty.data';\nimport { ICheckoutLoyaltyProps } from './checkout-loyalty.props.autogenerated';\nimport InputComponent from './components/checkout-loyalty-input';\nimport LabelComponent from './components/checkout-loyalty-label';\nimport TextComponent from './components/checkout-loyalty-text';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutLoyaltyState {\n dollarsApplied: number;\n isFetchingLoyaltyCard: boolean;\n errorMessage?: string;\n}\n\nexport interface ICheckoutLoyaltyModuleProps extends ICheckoutLoyaltyProps, IModuleStateProps {}\n\nexport interface ICheckoutLoyaltyViewState {\n isShowLoyalty: boolean;\n isShowAddLoyalty: boolean;\n}\n\nexport interface ICheckoutLoyaltyShow {\n heading: React.ReactNode;\n coveredAmountText: React.ReactNode;\n amount: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyRewardPoint {\n checkoutLoyaltyRewardPoint: INodeProps;\n key: string;\n title: React.ReactNode;\n availablePointsText: React.ReactNode;\n activePoints: React.ReactNode;\n expiringPointsText: React.ReactNode;\n expiringPoints: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyAdd {\n heading: React.ReactNode;\n cardNumber: React.ReactNode;\n drawer: INodeProps;\n rewardPoints: ICheckoutLoyaltyRewardPoint[];\n loyaltyAmountContainer: INodeProps;\n appliedLoyaltyAmountContainer: INodeProps;\n loyaltyAmountLabel: React.ReactNode;\n loyaltyAmountInput: React.ReactNode;\n loyaltyAmountApplyButton: React.ReactNode;\n showAppliedAmount: boolean;\n loyaltyAmountAppliedText: React.ReactNode;\n loyaltyAmountAppliedPrice: React.ReactNode;\n loyaltyAmountRemoveButton: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyViewProps extends ICheckoutLoyaltyModuleProps {\n checkoutLoyalty: IModuleProps;\n viewState: ICheckoutLoyaltyViewState;\n showLoyalty: ICheckoutLoyaltyShow;\n addLoyalty: ICheckoutLoyaltyAdd;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutLoyalty component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n\n@withModuleState\n@observer\nclass CheckoutLoyalty extends React.Component {\n private readonly _dialogToggleRef: React.RefObject | undefined;\n\n private readonly moduleClassName: string = 'ms-checkout-loyalty';\n\n private readonly _defaultLoyaltyPoints: number = 0;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n constructor(props: ICheckoutLoyaltyModuleProps) {\n super(props);\n this._dialogToggleRef = React.createRef();\n this._applyLoyaltyPoints = this._applyLoyaltyPoints.bind(this);\n this._removeLoyaltyPoints = this._removeLoyaltyPoints.bind(this);\n this._onInputChange = this._onInputChange.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this.state = { dollarsApplied: this.maxDollars, isFetchingLoyaltyCard: false };\n }\n\n @computed get shouldPayLoyalty(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use loyalty when cart is not full of free items\n const amountDue = cart.TotalAmount || 0;\n return amountDue > 0;\n }\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.loyaltyCard && this.props.data.loyaltyCard.status) !== 'LOADING' &&\n (this.props.data.loyaltyTransactionEstimation && this.props.data.loyaltyTransactionEstimation.status) !== 'LOADING'\n );\n }\n\n @computed get maxDollars(): number {\n return this.props.data.loyaltyTransactionEstimation.result &&\n this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n ? this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n : 0;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart,\n async () => {\n this._updateEstimate();\n }\n );\n\n reaction(\n () => this.props.data.loyaltyCard.result,\n async () => {\n this._updateLoyalty();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutLoyalty && checkoutError.errorMessage) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutLoyalty) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutLoyaltyModuleProps, nextState: ICheckoutLoyaltyState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n resources,\n renderView,\n moduleState: { hasError, isReady }\n } = this.props;\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.Loyalty === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout loyalty module wont render');\n return null;\n }\n\n if (\n this.props.data.loyaltyCard &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n ) {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n const checkoutState = this.props.data.checkout.result;\n let isShowLoyalty = false;\n const errorMessage = this.state.errorMessage;\n\n if (isReady) {\n if (!checkoutState || checkoutState.loyaltyAmount === 0) {\n return null;\n }\n isShowLoyalty = true;\n }\n\n const viewProps = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isShowLoyalty,\n isShowAddLoyalty: !isReady\n },\n alert: hasError && errorMessage && ,\n checkoutLoyalty: {\n moduleProps: this.props,\n className: classnames(\n this.moduleClassName,\n { [`${this.moduleClassName}__applied`]: isShowLoyalty },\n this.props.config.className\n )\n },\n showLoyalty: {\n heading: ,\n coveredAmountText: (\n \n ),\n amount: (\n \n )\n },\n addLoyalty: {\n heading: ,\n drawer: {\n tag: Drawer,\n className: `${this.moduleClassName}__drawer`,\n toggleButtonText: this._drawerHeader(),\n openGlyph: `${this.moduleClassName}__drawer-open`,\n closeGlyph: `${this.moduleClassName}__drawer-close`,\n glyphPlacement: 'end'\n },\n cardNumber: ,\n rewardPoints:\n loyaltyCard.RewardPoints &&\n loyaltyCard.RewardPoints.map((points, index) => {\n return this._renderPointSection(points, resources.availablePointsLabel, resources.expiringLoyaltyPointsLabel);\n }),\n loyaltyAmountContainer: {\n className: `${this.moduleClassName}__amount`\n },\n appliedLoyaltyAmountContainer: {\n className: `${this.moduleClassName}__applied-amount`\n },\n loyaltyAmountLabel: (\n \n ),\n loyaltyAmountInput: (\n \n ),\n loyaltyAmountApplyButton: (\n this.maxDollars ||\n this.state.dollarsApplied <= 0 ||\n isNaN(this.state.dollarsApplied) ||\n this.state.isFetchingLoyaltyCard\n }\n >\n {this.props.resources.applyCheckoutLoyaltyPaymentText}\n \n ),\n showAppliedAmount: checkoutState && checkoutState.loyaltyAmount > 0,\n loyaltyAmountAppliedText: (\n \n ),\n loyaltyAmountAppliedPrice: (\n \n ),\n loyaltyAmountRemoveButton: (\n \n {this.props.resources.removeCheckoutLoyaltyPaymentText}\n \n )\n }\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n this.props.context.telemetry.error('Checkout loyalty content is empty, module wont render');\n return null;\n }\n\n private _drawerHeader(): JSX.Element {\n return (\n <>\n

{this.props.resources.loyaltyCoveredAmountText}

\n \n \n );\n }\n\n private _renderPointSection(\n point: LoyaltyRewardPoint,\n loyaltyCoveredAmountText: string,\n expiringLoyaltyPointsLabel: string\n ): ICheckoutLoyaltyRewardPoint {\n return {\n key: point.RewardPointId || '',\n checkoutLoyaltyRewardPoint: {\n className: `${this.moduleClassName}__program`\n },\n title: ,\n availablePointsText: ,\n activePoints: (\n \n ),\n expiringPointsText: ,\n expiringPoints: (\n \n )\n };\n }\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n isRequired: false,\n ...(!this.isEnabled() && { status: 'disabled' })\n });\n\n const savedLoyaltyAmount = this.props.data.checkout.result?.loyaltyAmount;\n if (savedLoyaltyAmount) {\n this.props.moduleState.onReady();\n } else if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.props.moduleState.onSkip();\n } else if (\n this.props.data.loyaltyCard.result &&\n this.props.data.checkout.result &&\n this.props.data.loyaltyCard.result.CardNumber !== this.props.data.checkout.result.checkoutCart.cart.LoyaltyCardId\n ) {\n this.props.data.checkout.result.checkoutCart\n .updateLoyaltyCardId({ loyaltyCardNumber: this.props.data.loyaltyCard.result.CardNumber })\n .catch(error => {\n if (this.context.telemetry) {\n this.context.telemetry.warning(error);\n this.context.telemetry.debug('Unable to update the loyalty card');\n }\n });\n }\n };\n\n private readonly onEdit = () => {\n this.props.telemetry.information('Payment section loyalty onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly onCancel = () => {\n this.props.telemetry.information('Payment section loyalty onCancel is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly onSubmit = () => {\n this.props.telemetry.information('Payment section loyalty onSubmit is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.loyaltyAmount > 0) {\n // Show summary screen\n this.props.moduleState.onReady();\n } else {\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly isEnabled = () => {\n return (\n this.props.context.request.user.isAuthenticated &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n );\n };\n\n private async _applyLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty apply button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: Number.parseFloat(this.state.dollarsApplied.toString()) });\n this.setState({\n isFetchingLoyaltyCard: true\n });\n }\n\n private async _removeLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty remove button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: 0 });\n this.setState({\n dollarsApplied: 0\n });\n }\n\n private _onInputChange(event: React.ChangeEvent): void {\n const value = event.currentTarget.value;\n this.setState({ dollarsApplied: value.length > 0 ? Number(value) : Number.parseFloat(value), isFetchingLoyaltyCard: false });\n }\n\n private _onBlur(event: React.FocusEvent): void {\n const num = Number.parseFloat(event.currentTarget.value).toFixed(2);\n const element = document.getElementById(`${this.props.id}-label`) as HTMLInputElement;\n if (element && num) {\n element.value = num;\n this.setState({ dollarsApplied: Number.parseFloat(num) });\n }\n }\n\n private _updateLoyalty(): void {\n if (this.props.moduleState.isDisabled && this.isEnabled()) {\n this._updateEstimate();\n this.props.moduleState.onUpdating();\n }\n }\n\n private _updateEstimate(): void {\n const card = this.props.data.loyaltyCard.result;\n const checkout = this.props.data.checkout.result;\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n const channelConfig = this.props.context.request.channel;\n if (card && card.CardNumber && cart && channelConfig) {\n const currencyCode = channelConfig.Currency || '';\n const loyalPointsRequest = createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput(cart.Id, card.CardNumber, currencyCode);\n\n // @ts-expect-error\n // Due to bug 23214358, this is getting improperly cached. Need to turn on cache bypass for now to work around issue\n loyalPointsRequest._query.options.bypassCache = 'get';\n\n callActionOrExecute(loyalPointsRequest, this.props.context.actionContext)\n .then(async points => {\n this.props.context.actionContext.update(\n new GetLoyaltyTransactionEstimationInput(this.props.context.request.apiSettings),\n points\n );\n const newMaxPoints = points.MaxCurrencyValueOfLoyaltyPoints ?? this._defaultLoyaltyPoints;\n\n // If points are already applied, ensure you don't apply more points than max\n if (checkout && checkout.loyaltyAmount > newMaxPoints) {\n await checkout.updateLoyaltyAmount({ newAmount: newMaxPoints });\n }\n\n this.setState({ dollarsApplied: newMaxPoints, isFetchingLoyaltyCard: false });\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n this.props.context.actionContext.telemetry.debug('Error getting Loyalty Point Redemption Estimate');\n });\n }\n }\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutLoyalty;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyAdd, ICheckoutLoyaltyRewardPoint, ICheckoutLoyaltyShow, ICheckoutLoyaltyViewProps } from './checkout-loyalty';\n\nconst AddCheckoutLoyalty: React.FC = ({\n heading,\n cardNumber,\n drawer,\n rewardPoints,\n loyaltyAmountContainer,\n appliedLoyaltyAmountContainer,\n loyaltyAmountLabel,\n loyaltyAmountInput,\n loyaltyAmountApplyButton,\n showAppliedAmount,\n loyaltyAmountAppliedText,\n loyaltyAmountAppliedPrice,\n loyaltyAmountRemoveButton\n}) => {\n return (\n <>\n {heading}\n {cardNumber}\n \n {rewardPoints.map((rewardPoint: ICheckoutLoyaltyRewardPoint) => {\n return (\n \n {rewardPoint.title}\n {rewardPoint.availablePointsText}\n {rewardPoint.activePoints}\n {rewardPoint.expiringPointsText}\n {rewardPoint.expiringPoints}\n \n );\n })}\n \n \n {loyaltyAmountLabel}\n {loyaltyAmountInput}\n {loyaltyAmountApplyButton}\n {showAppliedAmount && (\n \n {loyaltyAmountAppliedText}\n {loyaltyAmountAppliedPrice}\n {loyaltyAmountRemoveButton}\n \n )}\n \n \n );\n};\n\nconst ShowCheckoutLoyalty: React.FC = ({ heading, coveredAmountText, amount }) => {\n return (\n <>\n {heading}\n {coveredAmountText}\n {amount}\n \n );\n};\n\nconst CheckoutLoyaltyView: React.FC = props => {\n const { checkoutLoyalty, checkoutErrorRef, alert, viewState, showLoyalty, addLoyalty } = props;\n\n return (\n \n {alert}\n {viewState.isShowLoyalty && }\n {viewState.isShowAddLoyalty && }\n \n );\n};\n\nexport default CheckoutLoyaltyView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IInvoicePaymentSummary {\n heading?: React.ReactNode;\n lines?: IInvoiceSummaryLines;\n}\nexport const getInvoicePaymentSummary = (input: ICheckoutProps): IInvoicePaymentSummary => {\n const {\n data: { checkout },\n resources: { totalAmountLabel, invoiceLabel, invoiceSummaryTitle },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutCart = get(checkout, 'result.checkoutCart');\n const cart = get(checkout, 'result.checkoutCart.cart');\n\n return {\n heading:

{invoiceSummaryTitle}

,\n lines: checkoutCart?.hasInvoiceLine\n ? InvoiceSummary({\n orderTotalLabel: totalAmountLabel,\n invoiceLabel,\n cart,\n context,\n typeName,\n telemetry,\n id,\n checkoutState: checkout.result\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\nimport {\n updateLineDeliverySpecificationsAsync,\n validateForCheckoutAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport {\n Address,\n DeliveryPreferenceType,\n LineDeliverySpecification,\n SimpleProduct,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getAvailabilitiesForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n validateCartLinesInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n Waiting\n} from '@msdyn365-commerce-modules/utilities';\nimport { ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/isEmpty';\nimport { action, computed, get, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutData } from './checkout.data';\nimport { ICheckoutHeadingData, ICheckoutProps } from './checkout.props.autogenerated';\nimport AlertComponent from './components/alert';\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\nimport { getLineItems, ILineItems } from './components/get-line-items';\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\nimport GuidedFormComponent from './components/guided-form';\nimport PlaceOrderButtonComponent from './components/place-order-button';\nimport placeOrder from './methods/place-order';\nimport { focusOnCheckoutError, setCheckoutErrors } from '../../checkout-errors';\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '../../common';\n\nexport * from './components/get-line-items';\nexport * from './components/get-order-summary';\n\n/**\n * Device type.\n */\ntype DeviceType = 'Mobile';\n\n/**\n * The Checkout state.\n */\ninterface ICheckoutState {\n errorMessage: string;\n isValidationPassed: boolean;\n isPlaceOrderLoading?: boolean;\n isPlaceOrderClicked?: boolean;\n}\n\n/**\n * The Checkout view props.\n * @extends ICheckoutProps\n */\nexport interface ICheckoutViewProps extends ICheckoutProps {\n className: string;\n canShow?: boolean;\n isEmptyCart?: boolean;\n isConsentGiven?: boolean;\n hasError?: boolean;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n cartStatus?: string;\n isMobile?: boolean;\n isEditorialMode?: boolean;\n backToShoppingUrl?: string;\n editCartLink?: string;\n hasSalesOrder: boolean;\n hasInvoiceLine?: boolean;\n\n checkoutProps: IModuleProps;\n headerProps: INodeProps;\n bodyProps: INodeProps;\n mainProps: INodeProps;\n mainControlProps: INodeProps;\n sideProps: INodeProps;\n sideControlFirstProps: INodeProps;\n sideControlSecondProps: INodeProps;\n termsAndConditionsProps: INodeProps;\n\n guidedForm?: React.ReactNode;\n title?: React.ReactNode;\n loading?: React.ReactNode;\n alert?: React.ReactNode;\n orderSummary?: IOrderSummary;\n invoicePaymentSummary?: IInvoicePaymentSummary;\n lineItems?: ILineItems;\n placeOrderButton?: React.ReactNode;\n termsAndConditions?: React.ReactNode;\n keepShoppingButton?: React.ReactNode;\n orderConfirmation?: React.ReactNode;\n\n checkoutExpressPaymentContainer?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n * The checkout module props interface.\n */\nexport interface ICheckoutModuleProps extends ICheckoutProps, IModuleStateProps {}\n\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\n\n/**\n *\n * CheckoutContainer component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass Checkout extends React.PureComponent {\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\n return this.props.data.checkout?.status;\n }\n\n @computed get isEmptyCart(): boolean {\n if (this.isEditorialMode) {\n // Editorial mode: Ignore empty cart\n return false;\n }\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\n }\n\n @computed get hasError(): boolean {\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\n }\n\n @computed get isEditorialMode(): boolean {\n return this.props.context.request.params.isEditor;\n }\n\n @computed get canPlaceOrder(): boolean {\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\n\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\n\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\n return (\n this.props.moduleState.isReady &&\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\n (this.state.errorMessage === '' ||\n shouldEnableSinglePaymentAuthorizationCheckout ||\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\n );\n }\n\n @computed get isPaidOffByCustomerAccount(): boolean {\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\n\n return customerAccountAmount === amountDue;\n }\n\n @computed get isCartReady(): boolean {\n return (\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\n this.props.data.customerInformation.status !== 'LOADING' &&\n this.props.data.featureState.status !== 'LOADING'\n );\n }\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n const properties =\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\n property => property.Key === 'expressPaymentDetails'\n )?.Value?.StringValue ?? '';\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n public state: ICheckoutState = {\n errorMessage: '',\n isValidationPassed: false,\n isPlaceOrderLoading: false,\n isPlaceOrderClicked: false\n };\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public componentDidMount(): void {\n const {\n resources: { genericErrorMessage }\n } = this.props;\n\n when(\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\n async () => {\n if (this.expressPaymentDetailsFromCartPage) {\n const {\n email,\n tenderLine,\n tokenizedPaymentCard,\n paymentTenderType: paymentTenderTypeFromCartPage,\n isExpressCheckoutAppliedInCartPage,\n isExpressAddressAppliedInCartPage,\n cardPaymentAcceptResult,\n address\n } = this.expressPaymentDetailsFromCartPage;\n\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\n newEmailAddressFromExpressCheckout: email ?? '',\n newTenderLine: tenderLine,\n newTokenizedPaymentCard: tokenizedPaymentCard,\n newPaymentTenderType: paymentTenderTypeFromCartPage,\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\n newCardPaymentAcceptResult: cardPaymentAcceptResult\n });\n\n if (isExpressAddressAppliedInCartPage && address) {\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\n newBillingAddressFromExpressCheckout: address\n });\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\n newShippingAddressFromExpressCheckout: address\n });\n } else {\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\n }\n\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\n newExtensionProperties: [\n {\n Key: 'expressPaymentDetails',\n Value: { StringValue: '' }\n }\n ]\n });\n }\n }\n );\n\n when(\n () => this.hasError,\n () => {\n this.setState({\n errorMessage: genericErrorMessage\n });\n this.props.context.telemetry.error('Failed to get cart');\n }\n );\n\n when(\n () => {\n return this.isEmptyCart;\n },\n () => {\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\n }\n );\n\n when(\n () => this.isCartReady,\n () => {\n this.validateForCheckout();\n }\n );\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\n async isReady => {\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isReady &&\n !this.props.data.checkout.result?.redirectAdditionalContext &&\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\n ) {\n if (!this.state.isPlaceOrderLoading) {\n this.setState({ isPlaceOrderLoading: true });\n }\n\n this.props.telemetry.information(\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\n );\n\n await this.onPlaceOrder();\n\n // If 3D authentication redirection, don't update isPlaceOrderLoading\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\n this.setState({ isPlaceOrderLoading: false });\n }\n }\n }\n );\n\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isBillingAddressHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n // Reaction to enable place order button when redirection is true for new checkout flow.\n reaction(\n () => this.canPlaceOrder,\n async () => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\n newIsPlaceOrderEnabledInRedirection: true\n });\n\n this.props.telemetry.information(\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\n );\n this.props.telemetry.information(\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\n this.canPlaceOrder\n }.`\n );\n }\n } else {\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\n }\n }\n );\n\n // Reaction to update the error message when there is a checkout error.\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.Checkout &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n this.props.data.checkout.result?.shouldFocusOnCheckoutError &&\n this.state.errorMessage\n ) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n\n // eslint-disable-next-line complexity -- ignore the complexity.\n public render(): JSX.Element {\n const {\n moduleState,\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\n resources,\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const { errorMessage } = this.state;\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\n const checkoutClass = classnames('ms-checkout', className);\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\n\n // @ts-expect-error - check the key of slot\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\n\n // @ts-expect-error - check the key of slot\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\n\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n const isMobile =\n this.props.context.request &&\n this.props.context.request.device &&\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\n\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n\n const termsAndConditions =\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\n\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldEnableCheckoutErrorDisplayMessaging =\n this.props.data.checkout?.result?.shouldEnableCheckoutErrorDisplayMessaging ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldFocusOnCheckoutError = this.props.data.checkout?.result?.shouldFocusOnCheckoutError;\n\n let hasExpressPaymentContainer = false;\n\n if (\n typeof window !== 'undefined' &&\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\n ) {\n hasExpressPaymentContainer = true;\n }\n\n let viewProps: ICheckoutViewProps = {\n ...this.props,\n className: checkoutClass,\n checkoutErrorRef: this.checkoutErrorRef,\n isEmptyCart: this.isEmptyCart,\n isConsentGiven,\n hasError: this.hasError,\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n hasSalesOrder:\n this.props.data.checkout &&\n this.props.data.checkout.result !== undefined &&\n this.props.data.checkout.result.salesOrder !== undefined,\n hasInvoiceLine,\n cartStatus: this.cartStatus,\n isMobile,\n backToShoppingUrl,\n editCartLink,\n isEditorialMode: this.isEditorialMode,\n orderConfirmation:\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\n ? this.props.slots.orderConfirmation[0]\n : undefined,\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\n headerProps: { className: 'ms-checkout__head' },\n bodyProps: { className: 'ms-checkout__body' },\n mainProps: { className: 'ms-checkout__main' },\n mainControlProps: { className: 'ms-checkout__main-control' },\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\n checkoutExpressPaymentContainer\n };\n\n if (!isConsentGiven && isAuthenticated) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else if (this.isLoading()) {\n viewProps = {\n ...viewProps,\n loading: \n };\n } else if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else {\n viewProps = {\n ...viewProps,\n alert: errorMessage && ,\n canShow: true,\n guidedForm: checkoutInformation ? (\n \n ) : (\n undefined\n ),\n orderSummary: getOrderSummary(this.props),\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\n placeOrderButton: (\n \n ),\n termsAndConditions,\n keepShoppingButton: backToShoppingUrl && (\n \n {backToShopping}\n \n )\n };\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\n if (isLoading) {\n return AsyncResultStatusCode.LOADING;\n }\n\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\n if (isSuccess) {\n return AsyncResultStatusCode.SUCCESS;\n }\n\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\n if (isFailed) {\n return AsyncResultStatusCode.FAILED;\n }\n\n return undefined;\n }\n\n /**\n * Renders heading.\n * @param checkoutHeading - The checkout heading.\n * @returns React node.\n */\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutHeading!.text = event.target.value);\n\n /**\n * Checks if cart is loading.\n * @returns True if is loading, false otherwise.\n */\n private readonly isLoading = (): boolean => {\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\n };\n\n /**\n * Get slot items.\n * @param key - The slot key.\n * @returns React node or undefined.\n */\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\n const { slots } = this.props;\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\n };\n\n /**\n * Trigger the payment section container submit when placing order.\n */\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\n this.setState({ isPlaceOrderLoading: true });\n\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\n });\n };\n\n /**\n * On place order.\n * @returns Void promise.\n */\n private readonly onPlaceOrder = async (): Promise => {\n const {\n resources: {\n checkoutOutOfStockErrorMessage,\n genericErrorMessage,\n customerCreditLimitExceededErrorMessage,\n invalidCartVersionErrorMessage,\n missingRequiredCartTenderLinesErrorMessage\n },\n context: {\n actionContext,\n app: {\n config: { enableStockCheck = false }\n }\n },\n slots: { orderConfirmation },\n data: { checkout, products }\n } = this.props;\n\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\n this.setState({ isPlaceOrderClicked: true });\n\n // If hasInvoiceLine is true, no inventory check\n if (\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\n enableStockCheck &&\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\n ) {\n this.setState({\n errorMessage: checkoutOutOfStockErrorMessage\n });\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\n } else {\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\n\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\n\n await placeOrder(\n actionContext,\n this.props.data.checkout.result,\n this.props.data.products.result,\n !hasOrderConfirmation,\n updatedCartVersion,\n this.props.data.checkout.result?.isPaymentVerificationRedirection\n ).catch(error => {\n const checkoutResult = this.props.data.checkout.result;\n\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\n const errorCode = error && error.name ? error.name : '';\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext);\n } else {\n let errorMessage = genericErrorMessage;\n this.setState({ isPlaceOrderClicked: false });\n\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n errorMessage = invalidCartVersionErrorMessage;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\n } else if (\n error &&\n error.name === 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit'\n ) {\n errorMessage = customerCreditLimitExceededErrorMessage;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n error.data?.AdditionalContext &&\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\n ) {\n return;\n }\n\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n }\n });\n\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\n }\n };\n\n /**\n * Update receipt email address for electronic cart line.\n * @param newGuestCheckoutEmail - The guest checkout email.\n * @returns The updated cart version.\n */\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\n );\n\n let updatedCartVersion: number | undefined;\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\n return {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: emailDeliveryModeCode,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\n }\n };\n });\n\n await updateLineDeliverySpecificationsAsync(\n { callerContext: this.props.context.actionContext },\n (await this.props.data.checkout).checkoutCart.cart.Id,\n lineDeliverySpecifications\n )\n .then(updatedCart => {\n updatedCartVersion = updatedCart.Version;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\n });\n }\n\n return updatedCartVersion;\n };\n\n /**\n * Return true if any product in the cart is over its max quantity.\n * @param cart -- The checkout cart.\n * @param products -- The checkout products.\n * @returns - Is any product in the cart is over max quantity.\n */\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\n let isOverMaxQuantity = false;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n await getAvailabilitiesForCartLineItems(\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\n this.props.context.actionContext\n )\n .then(productInventoryInformation => {\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\n\n cart.CartLines?.map(cartline => {\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\n\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\n const isEmailDelivery =\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n if (foundProductAvailability) {\n productsThatShouldValidateInventory.push(foundProductAvailability);\n }\n }\n });\n\n const cartLinesInventoryValidation = validateCartLinesInventory(\n cart.CartLines ?? [],\n productsThatShouldValidateInventory,\n this.props.context.actionContext,\n products,\n emailDeliveryModeCode\n );\n\n // If is invalid then exceeds the available quantity\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\n return isOverMaxQuantity;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\n });\n\n return isOverMaxQuantity;\n };\n\n /**\n * Gets active child in module state.\n * @returns - The module state manager collection.\n */\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n /**\n * On container ready.\n */\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Checkout onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n\n /**\n * Redirects to cart page.\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\n */\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n if (window && editCartLink) {\n window.location.assign(editCartLink);\n } else {\n this.setState({\n errorMessage: this.props.resources.genericErrorMessage\n });\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\n }\n };\n\n /**\n * Validates for checkout.\n * @param retry - Retry flag.\n */\n private readonly validateForCheckout = (retry: boolean = true): void => {\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\n const { Id, Version } = cart;\n const isOrderQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\n if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\n if (Version && Id) {\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\n .then((result: CartLineValidationResults) => {\n if (result.ValidationFailuresByCartLines?.length !== 0) {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n } else {\n this.setState({ isValidationPassed: true });\n }\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n const cartState = this.props.data.checkout.result?.checkoutCart;\n cartState\n ?.refreshCart({})\n .then(() => {\n this.validateForCheckout(false);\n })\n .catch((refreshError: Error) => {\n this.props.telemetry.warning(refreshError.message);\n this.props.telemetry.debug('Unable to refresh Cart');\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n } else {\n this.setState({ isValidationPassed: true });\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n /**\n * Save the address as Shipping and Billing address.\n * @param tokenizedPaymentCard - Tokenized payment card.\n */\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\n\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\n }\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const address: Address = {\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone\n };\n\n return address;\n };\n}\n\nexport default Checkout;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './checkout';\nimport { IEmailDelivery } from './components';\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\n\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\n\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {pickUpAtStore && }\n {emailDelivery && }\n \n);\n\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\n \n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\n LineItemDeliveryGroup,\n LineItemList,\n heading,\n lineItems,\n lineItemWraper,\n lineItemWraperIcon\n}) => (\n \n {lineItemWraperIcon}\n {lineItemWraper}\n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {emailDelivery && }\n \n);\n\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const LineItemsComponent: React.FC = ({\n LineItems,\n Header,\n heading,\n editLink,\n itemsForPickup,\n itemsForShip,\n itemsForEmail,\n itemsGroupWithMulitplePickupMode\n}) => (\n \n \n {heading}\n {editLink}\n \n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\n {itemsGroupWithMulitplePickupMode !== undefined\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\n return ;\n })\n : null}\n \n);\n\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.subtotal}\n {lines.shipping}\n {lines.otherCharge}\n {lines.tax}\n {lines.totalDiscounts}\n {lines.loyalty}\n {lines.giftCard}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.invoices}\n {lines.giftCard}\n {lines.loyalty}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst CheckoutView: React.FC = props => {\n const {\n isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n canShow,\n checkoutProps,\n headerProps,\n hasSalesOrder,\n hasInvoiceLine,\n bodyProps,\n mainProps,\n mainControlProps,\n sideProps,\n sideControlFirstProps,\n sideControlSecondProps,\n termsAndConditionsProps,\n orderConfirmation,\n loading,\n alert,\n title,\n guidedForm,\n orderSummary,\n invoicePaymentSummary,\n lineItems,\n placeOrderButton,\n termsAndConditions,\n keepShoppingButton,\n checkoutExpressPaymentContainer,\n checkoutErrorRef\n } = props;\n\n return (\n \n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\n \n )}\n {!hasSalesOrder && (\n \n {loading}\n {alert}\n {canShow && (\n <>\n \n {checkoutExpressPaymentContainer}\n {checkoutExpressPaymentContainer && {title}}\n {guidedForm}\n {termsAndConditions}\n \n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n {!hasInvoiceLine\n ? orderSummary && \n : invoicePaymentSummary && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n {lineItems && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n )}\n \n )}\n {hasSalesOrder && orderConfirmation}\n \n );\n};\n\nexport default CheckoutView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAlertProps {\n message: string;\n}\n\nconst CheckoutAlert: React.FC = ({ message }) => (\n

\n {message}\n

\n);\n\nexport default CheckoutAlert;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport groupBy from 'lodash/groupBy';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\ntype deliveryType = 'pickup' | 'ship' | 'email';\n\nexport interface IPickUpAtStore {\n PickUpAtStore: INodeProps;\n label: React.ReactNode;\n location: React.ReactNode;\n}\n\nexport interface IEmailDelivery {\n EmailDelivery: INodeProps;\n label: React.ReactNode;\n}\n\nexport interface ILineItem {\n LineId: string;\n LineItem: INodeProps;\n item?: React.ReactNode;\n pickUpAtStore?: IPickUpAtStore;\n emailDelivery?: IEmailDelivery;\n}\n\nexport interface ILineItemDeliveryGroup {\n LineItemDeliveryGroup: INodeProps;\n LineItemList: INodeProps;\n heading: React.ReactNode;\n lineItemWraper?: React.ReactNode;\n lineItemWraperIcon?: React.ReactNode;\n lineItems: ILineItem[];\n}\n\nexport interface ILineItems {\n LineItems: INodeProps;\n Header: INodeProps;\n heading: React.ReactNode;\n editLink: React.ReactNode;\n itemsForPickup?: ILineItemDeliveryGroup;\n itemsForShip?: ILineItemDeliveryGroup;\n itemsForEmail?: ILineItemDeliveryGroup;\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\n}\n\nexport const getLineItems = (input: ICheckoutProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const _getDeliveryLocation = (cartLine: CartLine): string => {\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\n return '';\n }\n\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\n });\n\n return locationMatch && locationMatch.OrgUnitName;\n };\n\n const _getProduct = (productId: number): SimpleProduct | undefined => {\n const products = get(input, 'data.products.result') || [];\n return products.find((_product: SimpleProduct) => {\n return productId === _product.RecordId;\n });\n };\n\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\n const {\n id,\n typeName,\n context,\n config: { imageSettings, showShippingChargesForLineItems },\n resources: {\n quantityDisplayString,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n productDimensionTypeAmount,\n configString,\n inputQuantityAriaLabel,\n discountStringText,\n shippingCharges\n },\n context: {\n request: { gridSettings }\n }\n } = input;\n const catalogs = input.data.catalogs?.result;\n if (!product) {\n return;\n }\n\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\n if (MsDyn365.isBrowser && context.request.user.isB2b) {\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 \n );\n };\n\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\n const {\n resources: { pickUpAtStoreWithLocationText }\n } = input;\n\n return {\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\n label: {pickUpAtStoreWithLocationText},\n location:
{pickupDeliveryLocation}
\n };\n };\n\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\n const {\n resources: { emailDeliveryText }\n } = input;\n\n return {\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\n label: {emailDeliveryText}\n };\n };\n\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\n return items.map(cartLine => {\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const isPickUp = _getCartPickDeliveryMode(cartLine);\n const isEmailDelivery =\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\n return {\n LineId: cartLine.LineId || '',\n LineItem: { className: 'ms-checkout__line-item' },\n item: _getLineItemComponent(cartLine),\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\n };\n });\n };\n\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode ===\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\n : false;\n };\n\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode !==\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\n : false;\n };\n\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\n const {\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? shippingCountCheckoutLineItem\n : type === 'pickup'\n ? inStorePickUpLabel\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _countItems = (items: CartLine[]): number => {\n return items.reduce((count, item) => {\n return count + (item.Quantity || 0);\n }, 0);\n };\n\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n if (type === 'ship') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n } else if (type === 'pickup') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\n );\n }\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\n };\n\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\n return;\n }\n\n const items = _filterItemsByDiliveryType(type);\n\n if (items.length === 0) {\n return undefined;\n }\n\n const count = _countItems(items);\n const title = _getGroupTitleComponent(count, type);\n\n return {\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n heading:
{title}
,\n lineItems: _getLineItemsComponents(items)\n };\n };\n\n const _getLineItems = (): ILineItems | undefined => {\n const {\n context,\n config: { lineItemsHeading },\n data: { products },\n resources: { editCartText }\n } = input;\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\n return undefined;\n }\n\n return {\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\n Header: { className: 'ms-checkout__line-items-header' },\n heading: lineItemsHeading && lineItemsHeading.text && (\n \n ),\n editLink: (\n \n {editCartText}\n \n ),\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\n itemsForShip: _getLineItemsByDeliveryType('ship'),\n itemsForEmail: _getLineItemsByDeliveryType('email'),\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\n : undefined\n };\n };\n\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { lineItemsHeading }\n } = input;\n if (lineItemsHeading) {\n lineItemsHeading.text = event.target.value;\n }\n };\n\n const _getGroupTitleComponentWithMultiplePickUp = (\n count: number,\n type: deliveryType,\n deliveryMode?: string,\n fulFillmentStoreId?: string\n ): string => {\n const {\n resources: { itemLabel, itemsLabel }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n let pickupDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\n ? pickupDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\n });\n\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? `(${count} ${suffix})`\n : type === 'pickup'\n ? `${pickupTitle} (${count} ${suffix})`\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\n const groupDelivery = getGroupByDelivery(cart.CartLines);\n const cartLinesGroup: CartLine[] = [];\n const cartLinesGrp: CartLine[][] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\n // @ts-expect-error\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n cartLinesGrp.push(cartLine);\n });\n });\n\n return cartLinesGrp;\n };\n\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\n return;\n }\n\n const {\n resources: { multiplePickUpLabel, shippingLable }\n } = input;\n\n const items = _filterItemsByMultiplePickupMode();\n\n if (items.length === 0) {\n return undefined;\n }\n\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\n items.map(item => {\n const count = _countItems(item);\n const cartLine = item[0];\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const type: deliveryType =\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\n ? 'pickup'\n : cartLine.FulfillmentStoreId === '' && cartLine.DeliveryMode === emailDeliveryModeCode\n ? 'email'\n : 'ship';\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\n lineItemDeliveryGroup.push({\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n lineItemWraperIcon:
,\n lineItemWraper:
{groupTitle}
,\n heading:
{title}
,\n lineItems: _getLineItemsComponents(item)\n });\n });\n\n return lineItemDeliveryGroup;\n };\n\n return _getLineItems();\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IOrderSummary {\n orderSummaryProps: INodeProps;\n heading?: React.ReactNode;\n lines?: IOrderSummaryLines;\n}\nexport const getOrderSummary = (input: ICheckoutProps): IOrderSummary => {\n const {\n config: { orderSummaryHeading },\n data: { checkout },\n resources: {\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n otherCharges\n },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutState = get(checkout, 'result');\n const cart = get(checkout, 'result.checkoutCart.cart');\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\n const channelConfiguration = context.request.channel!;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\n\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { orderSummaryHeading }\n } = input;\n if (orderSummaryHeading) {\n orderSummaryHeading.text = event.target.value;\n }\n };\n\n return {\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\n heading: orderSummaryHeading && orderSummaryHeading.text && (\n \n ),\n lines: showLineItems\n ? OrderSummary({\n checkoutState,\n cart,\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n context,\n typeName,\n id,\n channelConfiguration,\n telemetry,\n otherChargeLabel: otherCharges,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\n isShowTaxBreakup: isShowOrHideTaxEnabled\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport * as React from 'react';\nimport { focusOnCheckoutError, setCheckoutErrorFocus } from '../../../checkout-errors';\n\nexport interface ICheckoutGuidedCardProps {\n id?: string;\n step: number;\n title?: HeadingType;\n disabled?: boolean; // Module is not available\n isActive?: boolean; // Step === currentStep\n isVisted?: boolean; // Step < currentStep\n isExpanded?: boolean;\n isReady?: boolean;\n isPending?: boolean;\n isUpdating?: boolean;\n isSubmitting?: boolean;\n isCancelAllowed?: boolean;\n isMobile?: boolean;\n hasInitialized?: boolean;\n hasControlGroup?: boolean;\n shouldFocus?: boolean;\n children: React.ReactNode;\n moduleState?: IModuleStateManager;\n actionContext?: IActionContext;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n telemetryContent?: ITelemetryContent;\n onEdit?(): void;\n onCancel?(): void;\n onSubmit?(): void;\n onNext(): void;\n}\n\n/**\n *\n * CheckoutGuidedCard component.\n * @extends {React.Component}\n */\nclass CheckoutGuidedCard extends React.PureComponent {\n private readonly editButtonRef: React.RefObject = React.createRef();\n\n private readonly formCardRef: React.RefObject = React.createRef();\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: ICheckoutGuidedCardProps) {\n super(props);\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\n }\n\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\n /**\n * Move to next step when current step is ready.\n */\n const { isActive, isReady, onNext, isVisted, onEdit, shouldFocus, children, moduleState, actionContext } = this.props;\n\n // Move to next step after completing the current step\n if (isActive && isReady) {\n onNext();\n }\n\n // Set the focus to Edit button once edit button appear\n // (It happens when current step switch to isReady status)\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\n const canEdit = isReady && isVisted && !!onEdit;\n if (!prevCanEdit && canEdit) {\n this.focusOnEditButton();\n this.scrollToTitle();\n }\n\n // Set the focus to the first focusable element\n // (It happens when current step switch to isUpdating status)\n if (prevProps.isReady && !isReady) {\n this.focusOnFirstFocusableElement();\n }\n\n // Set the focus for the checkout error\n if (shouldFocus && actionContext) {\n const childrenModules = this._getModules(children);\n\n // Set the focus for the module within the checkout section container\n if (childrenModules.length > 0) {\n for (const childModule of childrenModules) {\n const childId = this._getId(childModule);\n const childState = moduleState?.getModule(childId);\n\n if (childState?.hasError) {\n setCheckoutErrorFocus(childId, actionContext);\n return;\n }\n }\n } else {\n focusOnCheckoutError(this.formCardRef, actionContext);\n }\n }\n }\n\n public render(): JSX.Element | null {\n const {\n title,\n disabled,\n isExpanded,\n isActive,\n isVisted,\n children,\n isReady,\n isPending,\n isUpdating,\n hasInitialized,\n hasControlGroup,\n onEdit,\n resource\n } = this.props;\n const { changeBtnLabel } = resource;\n\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\n\n return (\n \n
\n {this.getTitle()}\n\n {canEdit && (\n \n {changeBtnLabel}\n \n )}\n
\n\n \n
{children}
\n\n {this.renderFooder()}\n
\n \n );\n }\n\n private readonly renderFooder = (): JSX.Element | null => {\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\n\n const canSubmit = !isReady && onSubmit;\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\n\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\n return null;\n }\n\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n {canSubmit && (\n \n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\n \n )}\n {canCancel && (\n \n {cancelBtnLabel}\n \n )}\n
\n );\n };\n\n private readonly focusOnFirstFocusableElement = (): void => {\n const node = this.formCardRef.current as HTMLElement;\n const focussableElements = `\n a:not([disabled]),\n button:not([disabled]),\n input[type=submit]:not([disabled]),\n input[type=checkbox]:not([disabled]),\n input[type=text]:not([disabled]),\n input[type=radio]:not([disabled]),\n input[type=password]:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\n `;\n\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\n child && child.focus && child.focus();\n };\n\n private readonly focusOnEditButton = (): void => {\n // Focus on edit button\n const editButton =\n this.editButtonRef &&\n this.editButtonRef.current &&\n this.editButtonRef.current.focus &&\n (this.editButtonRef.current as HTMLElement);\n editButton && editButton.focus();\n };\n\n private readonly scrollToTitle = (): void => {\n // Scroll window to the title of the step that was just completed only in mobile viewport\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\n formCard && formCard.scrollIntoView();\n };\n\n private readonly getTitle = (): JSX.Element => {\n const { step, title } = this.props;\n const { headingTag: Tag = 'h2', text = '' } = title || {};\n return (\n \n \n {step + 1}. {` `}\n \n {text && {text}}\n \n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _getModules = (item: React.ReactNode): any[] => {\n return get(item, 'props.modules.primary') || [];\n };\n\n private readonly _getId = (item: React.ReactNode): string => {\n return get(item, 'id') || '';\n };\n}\n\nexport default CheckoutGuidedCard;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport GuidedCard from './guided-card';\n\nexport interface ICheckoutGuidedFormProps {\n items: React.ReactNode[];\n moduleState: IModuleStateManager;\n disableGuidedCheckoutFlow?: boolean;\n isMobile?: boolean;\n isEditor?: boolean;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n requestContext?: ICoreContext;\n telemetryContent?: ITelemetryContent;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n hasError?: boolean;\n hasShippingAddress?: boolean | undefined;\n hasCartDeliveryMode?: boolean | undefined;\n hasGuestCheckoutEmail?: boolean | undefined;\n isTermsAndConditionAccepted?: boolean | undefined;\n shouldEnableCheckoutErrorDisplayMessaging?: boolean;\n shouldFocusOnCheckoutError?: boolean | undefined;\n}\n\ninterface ICheckoutGuidedFormState {\n currentStep: number;\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\n/**\n *\n * CheckoutGuidedForm component.\n * @extends {React.Component}\n */\n@observer\nclass CheckoutGuidedForm extends React.PureComponent {\n @computed public get hasMissingInfo(): boolean {\n if (\n this.props.hasShippingAddress === false ||\n this.props.hasCartDeliveryMode === false ||\n this.props.hasGuestCheckoutEmail === false ||\n this.props.isTermsAndConditionAccepted === false\n ) {\n return true;\n }\n\n return false;\n }\n\n @computed public get hasOrderError(): boolean {\n for (const item of this.props.items) {\n const childId = this.getId(item);\n const state = this.props.moduleState.getModule(childId);\n\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\n return true;\n }\n }\n\n return false;\n }\n\n public state: ICheckoutGuidedFormState = {\n currentStep: 0\n };\n\n public componentDidMount(): void {\n /**\n * Append child modules.\n */\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\n this.props.moduleState.init({ childIds });\n }\n\n public render(): JSX.Element | null {\n const { moduleState, items, resource } = this.props;\n if (!items || !moduleState) {\n return null;\n }\n\n const shouldCollapseAfterRedirect =\n this.props.isPaymentVerificationRedirection &&\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\n !this.props.hasError &&\n !this.hasMissingInfo &&\n !this.hasOrderError;\n\n let previousModuleHasError = false;\n\n return (\n
\n {items.map((item: React.ReactNode) => {\n const childId = this.getId(item);\n const step = this.getStep(childId);\n const title = this.getHeading(item);\n const state = this.props.moduleState.getModule(childId);\n const {\n isReady,\n isPending,\n isUpdating,\n isDisabled,\n isCancelAllowed,\n onEdit,\n onCancel,\n onSubmit,\n hasModuleState,\n hasInitialized,\n hasError\n } = state || ({} as IModuleStateManager);\n\n let shouldFocus =\n !!this.props.shouldEnableCheckoutErrorDisplayMessaging &&\n !!this.props.shouldFocusOnCheckoutError &&\n !previousModuleHasError &&\n hasError;\n previousModuleHasError = previousModuleHasError || shouldFocus;\n\n return (\n \n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\n \n );\n })}\n
\n );\n }\n\n private readonly getEnabledModules = (): string[] => {\n const {\n moduleState: { childIds, getModule }\n } = this.props;\n return childIds.filter((childId: string) => {\n const state = getModule(childId);\n return !!state && !state.isDisabled;\n });\n };\n\n private readonly getStep = (id: string): number => {\n return this.getEnabledModules().indexOf(id);\n };\n\n private readonly getId = (item: React.ReactNode): string => {\n return get(item, 'props.id') || '';\n };\n\n private readonly getHeading = (item: React.ReactNode): Heading => {\n return get(item, 'props.config.heading') || '';\n };\n\n private readonly isExpanded = (step: number): boolean => {\n if (this.props.isEditor) {\n // Editorial mode: Expand all the drawers\n return true;\n }\n return step > -1 && step <= this.state.currentStep;\n };\n\n private readonly isActive = (step: number): boolean => {\n return step === this.state.currentStep;\n };\n\n private readonly isVisted = (step: number): boolean => {\n return step > -1 && step < this.state.currentStep;\n };\n\n private readonly onNext = (): void => {\n this.setState({\n currentStep: this.state.currentStep + 1\n });\n };\n}\n\nexport default CheckoutGuidedForm;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\ninterface ICheckoutPlaceOrderButtonProps {\n canPlaceOrder: boolean;\n checkoutBtnText: string;\n telemetryContent?: ITelemetryContent;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n isPlaceOrderLoading?: boolean;\n isExpressCheckoutApplied?: boolean;\n isPaymentVerificationRedirection?: boolean;\n placeOrder(): Promise;\n}\n\nconst buttonsStates: React.Dispatch>[] = [];\n\n/**\n * On place order function.\n * @param isBusy -Check is busy.\n * @param canPlaceOrder -Check can place order.\n * @param placeOrder -Place order function.\n * @returns Set state of button.\n */\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\n if (isBusy || !canPlaceOrder) {\n return;\n }\n buttonsStates.map(buttonSetState => {\n buttonSetState(true);\n return true;\n });\n await placeOrder();\n};\n\nconst CheckoutPlaceOrderButton: React.FC = ({\n checkoutBtnText,\n canPlaceOrder,\n placeOrder,\n telemetryContent,\n shouldEnableSinglePaymentAuthorizationCheckout,\n isPlaceOrderLoading,\n isExpressCheckoutApplied,\n isPaymentVerificationRedirection\n}) => {\n const [isBusy, setIsBusy] = useState(false);\n buttonsStates.push(setIsBusy);\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\n return (\n \n {checkoutBtnText}\n \n );\n }\n\n return (\n \n {checkoutBtnText}\n \n );\n};\n\nexport default CheckoutPlaceOrderButton;\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 { SalesOrder } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { CartCheckout } from '../../../common/checkout';\n\nexport const OPERATIONS = {\n PayCard: 201,\n PayGiftCertificate: 214,\n PayLoyalty: 207,\n PayCustomerAccount: 202\n};\n\nexport default async (\n ctx: IActionContext,\n updatedCartVersion?: number,\n isPaymentVerificationRedirection?: boolean\n): Promise => {\n return CartCheckout(ctx, updatedCartVersion, isPaymentVerificationRedirection);\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 { ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { PlaceOrder } from '../../../common/place-order';\n\nexport default async (\n ctx: IActionContext,\n checkoutState: ICheckoutState | undefined,\n orderedProducts: SimpleProduct[] | undefined,\n redirect: boolean,\n updatedCartVersion?: number,\n isPaymentVerificationRedirection?: boolean\n) => {\n return PlaceOrder(ctx, checkoutState, orderedProducts, redirect, updatedCartVersion, isPaymentVerificationRedirection);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { showAdditionalFields } from '../gift-card-balance-check.props.autogenerated';\n\nexport interface IGetFormInput {\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n inputRef?: React.RefObject;\n inputPinRef?: React.RefObject;\n inputExpRef?: React.RefObject;\n supportExternalGiftCard?: boolean;\n additionalFields?: showAdditionalFields;\n resources: {\n balanceCheckButton: string;\n giftCardFormLabel: string;\n giftCardNumberLabel: string;\n giftCardPinLabel: string;\n giftCardExpLabel: string;\n giftCardAlertLabel: string;\n giftCardPinPlaceholderText: string;\n giftCardExpPlaceholderText: string;\n };\n onEnterGiftCardNumber(giftCardNumber: string): void;\n onEnterGiftCardPin(giftCardPin: string): void;\n onEnterGiftCardExp(giftCardExp: string): void;\n onApplyGiftCard(): Promise;\n}\n\nexport interface IForm {\n formProps: INodeProps;\n label: React.ReactNode;\n inputPinLabel: React.ReactNode;\n inputExpLabel: React.ReactNode;\n alert: React.ReactNode;\n inputProps: INodeProps;\n inputNumProps: INodeProps;\n inputPinProps: INodeProps;\n inputExpProps: INodeProps;\n inputNumber: React.ReactNode;\n inputPin: React.ReactNode;\n inputExp: React.ReactNode;\n applyButton: React.ReactNode;\n supportExternalGiftCard: boolean | undefined;\n showGiftCardPinInput: boolean | undefined;\n showGiftCardExpInput: boolean | undefined;\n alertFieldLabel: React.ReactNode;\n}\n\n/**\n * On apply function.\n * @param onApplyGiftCard -On apply gift card.\n * @returns Apply gift card.\n */\nconst onApplyHandler = (onApplyGiftCard: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onApplyGiftCard();\n};\n\n/**\n * On change number function.\n * @param onEnterGiftCardNumber -On enter gift card number.\n * @returns On gift card enter pin function result.\n */\nconst onChangeNumberHandler = (onEnterGiftCardNumber: (giftCardNumber: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardNumber(value);\n};\n\n/**\n * On change pin function.\n * @param onEnterGiftCardPin -On enter gift card pin.\n * @returns On enter gift card pin function result.\n */\nconst onChangePinHandler = (onEnterGiftCardPin: (giftCardPin: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardPin(value);\n};\n\n/**\n * On change exp function.\n * @param onEnterGiftCardExp -On enter gift card.\n * @returns On enter gift card function result.\n */\nconst onChangeExpHandler = (onEnterGiftCardExp: (giftCardExp: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardExp(value);\n};\n\nexport const getForm = (options: IGetFormInput): IForm => {\n const {\n errorMessage,\n inputRef,\n inputPinRef,\n inputExpRef,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n onEnterGiftCardNumber,\n onEnterGiftCardPin,\n onEnterGiftCardExp,\n onApplyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n resources: {\n balanceCheckButton,\n giftCardFormLabel,\n giftCardNumberLabel,\n giftCardPinLabel,\n giftCardExpLabel,\n giftCardAlertLabel,\n giftCardPinPlaceholderText,\n giftCardExpPlaceholderText\n }\n } = options;\n\n const formProps = {\n className: classnames('ms-gift-card-balance-check__form', { 'is-invalid': !!errorMessage }),\n onSubmit: onApplyHandler(onApplyGiftCard),\n tag: 'form' as NodeTag\n };\n\n const label = (\n \n );\n\n const inputPinLabel = (\n \n );\n\n const inputExpLabel = (\n \n );\n\n const alertFieldLabel = (\n \n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const inputProps = {\n className: 'ms-gift-card-balance-check__input-fields'\n };\n\n const inputNumProps = {\n className: 'ms-gift-card-balance-check__input-num-fields'\n };\n\n const inputPinProps = {\n className: 'ms-gift-card-balance-check__input-pin-fields'\n };\n\n const inputExpProps = {\n className: 'ms-gift-card-balance-check__input-exp-fields'\n };\n\n const inputNumber = (\n \n );\n\n const inputPin = (\n \n );\n\n const inputExp = (\n \n );\n\n const applyButton = (\n \n {balanceCheckButton}\n \n );\n\n let showGiftCardPinInput = false;\n let showGiftCardExpInput = false;\n\n switch (additionalFields) {\n case showAdditionalFields.pin:\n showGiftCardPinInput = true;\n break;\n case showAdditionalFields.expirationDate:\n showGiftCardExpInput = true;\n break;\n case showAdditionalFields.pinAndExpirationDate:\n showGiftCardPinInput = true;\n showGiftCardExpInput = true;\n break;\n default:\n }\n\n return {\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { GiftCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IGetItemInput {\n giftCard: GiftCard;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n}\n\nexport interface IItem {\n itemProps: INodeProps;\n id?: string;\n selectedGiftCard: React.ReactNode;\n removeButton?: React.ReactNode;\n}\n\n/**\n * GiftCardItem component.\n * @param root0\n * @param root0.giftCard\n * @param root0.getFormattedPrice\n * @param root0.resources\n * @param root0.resources.enteredGiftCardLabel\n * @param root0.resources.giftCardAvailableBalanceLabel\n * @extends {React.PureComponent}\n */\nexport const getItem = ({\n giftCard,\n getFormattedPrice,\n resources: { enteredGiftCardLabel, giftCardAvailableBalanceLabel }\n}: IGetItemInput): IItem => {\n const balance = getFormattedPrice(giftCard.Balance, giftCard.CardCurrencyCode);\n const giftCardLast4Digit = (giftCard.Id || '').substr(-4);\n\n const itemProps = {\n className: 'ms-gift-card-balance-check__item'\n };\n\n const selectedGiftCard = (\n \n {enteredGiftCardLabel}\n {` `}\n {giftCardLast4Digit}\n {` `}({giftCardAvailableBalanceLabel}\n {` `}\n {balance})\n \n );\n\n return {\n itemProps,\n id: giftCard && giftCard.Id,\n selectedGiftCard\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n getGiftCardAsync,\n getTenderTypesAsync,\n resolveCardTypesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CardType,\n CardTypeInfo,\n GiftCard,\n RetailOperation,\n TenderType\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport * as React from 'react';\n\nimport { OPERATIONS } from '../checkout';\nimport { getForm, IForm } from './components/get-form';\nimport { getItem, IItem } from './components/get-item';\nimport { IGiftCardBalanceCheckProps } from './gift-card-balance-check.props.autogenerated';\n\ninterface IGiftCardBalanceCheckState {\n isFetchingGiftCard: boolean;\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n giftCard?: GiftCard;\n}\n\nenum SupportedGiftCardType {\n Internal = 'internal',\n External = 'external',\n Both = 'both'\n}\n\nexport interface IGiftCardBalanceCheckModuleProps extends IGiftCardBalanceCheckProps<{}> {}\n\nexport interface IGiftCardBalanceCheckViewProps extends IGiftCardBalanceCheckProps<{}>, IGiftCardBalanceCheckState {\n className?: string;\n\n form: IForm;\n item?: IItem;\n\n giftCardBalanceCheckProps: IModuleProps;\n\n enterGiftCardNumber?(giftCardNumber: string): void;\n enterGiftCardPin?(giftCardPin: string): void;\n enterGiftCardExp?(giftCardExp: string): void;\n applyGiftCard?(): void;\n}\n\n/**\n *\n * GiftCardBalanceCheck component.\n * @extends {React.Component}\n */\nexport class GiftCardBalanceCheck extends React.Component {\n public state: IGiftCardBalanceCheckState = {\n isFetchingGiftCard: false,\n errorMessage: '',\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: ''\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n private readonly inputPinRef: React.RefObject = React.createRef();\n\n private readonly inputExpRef: React.RefObject = React.createRef();\n\n public shouldComponentUpdate(nextProps: IGiftCardBalanceCheckModuleProps, nextState: IGiftCardBalanceCheckState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, showAdditionalFields },\n resources\n } = this.props;\n const { errorMessage, giftCardNumber, giftCardPin, giftCardExp } = this.state;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!this._isEnabled()) {\n this.props.context.telemetry.error('Gift card balance check is not supported, module wont render');\n return null;\n }\n\n const supportExternalGiftCard = supportedGiftCardType !== SupportedGiftCardType.Internal;\n\n const moduleClassName = classname('ms-gift-card-balance-check', className);\n\n const viewProps: IGiftCardBalanceCheckViewProps = {\n ...this.props,\n ...this.state,\n className: moduleClassName,\n giftCardBalanceCheckProps: { moduleProps: this.props, className: moduleClassName },\n\n enterGiftCardNumber: this._enterGiftCardNumber,\n enterGiftCardPin: this._enterGiftCardPin,\n enterGiftCardExp: this._enterGiftCardExp,\n applyGiftCard: this._applyGiftCard,\n\n form: getForm({\n errorMessage,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n inputRef: this.inputRef,\n inputPinRef: this.inputPinRef,\n inputExpRef: this.inputExpRef,\n resources,\n supportExternalGiftCard,\n additionalFields: showAdditionalFields,\n onEnterGiftCardNumber: this._enterGiftCardNumber,\n onEnterGiftCardPin: this._enterGiftCardPin,\n onEnterGiftCardExp: this._enterGiftCardExp,\n onApplyGiftCard: this._applyGiftCard\n }),\n item:\n this.state.giftCard &&\n getItem({\n giftCard: this.state.giftCard,\n getFormattedPrice: this._getFormattedPrice,\n resources\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _isEnabled = (): boolean => {\n if (\n !this.props.context.request.user.isAuthenticated &&\n this.props.context.app.config.giftCardSupported !== SupportedGiftCardType.External &&\n !this.props.config.shouldBeEnabledForGuest\n ) {\n return false;\n }\n return true;\n };\n\n private readonly _getFormattedPrice = (price: number = 0, currencyCode: string = 'USD'): string => {\n return this.props.context.cultureFormatter.formatCurrency(price, currencyCode);\n };\n\n private readonly _enterGiftCardNumber = (giftCardNumber: string): void => {\n this.setState({\n giftCardNumber\n });\n this._clearError();\n };\n\n private readonly _enterGiftCardPin = (giftCardPin: string): void => {\n this.setState({\n giftCardPin\n });\n this._clearError();\n };\n\n private readonly _enterGiftCardExp = (giftCardExp: string): void => {\n this.setState({\n giftCardExp\n });\n this._clearError();\n };\n\n private readonly _clearError = (): void => {\n this.setState({\n errorMessage: ''\n });\n };\n\n private readonly _setError = (errorMessage: string): void => {\n this.props.telemetry.error('Error', errorMessage);\n this.props.telemetry.debug('Error', errorMessage);\n this.setState({\n errorMessage\n });\n };\n\n private readonly _applyGiftCard = async (): Promise => {\n if (this.state.isFetchingGiftCard) {\n return;\n }\n this.setState({\n isFetchingGiftCard: true\n });\n\n const giftCardNumber = this.state.giftCardNumber.trim();\n const giftCardPin = this.state.giftCardPin.trim();\n const giftCardExp = this.state.giftCardExp.trim();\n\n const giftCardTypes = await this._getGiftCardTypes(giftCardNumber);\n const giftCardType = giftCardTypes && giftCardTypes[0];\n const isPinRequired = giftCardType && giftCardType.IsPinRequired;\n const isExpRequired = giftCardType && giftCardType.IsExpirationDateRequired;\n const tenderTypeId = giftCardType && giftCardType.PaymentMethodId;\n const giftCard = await this._getGiftCard(giftCardNumber, giftCardPin, giftCardExp, isPinRequired, isExpRequired, tenderTypeId);\n\n if (giftCard) {\n this._clearError();\n this.setState({\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: '',\n isFetchingGiftCard: false,\n giftCard\n });\n return Promise.resolve();\n }\n const input = this.inputRef && this.inputRef.current && this.inputRef.current.focus && (this.inputRef.current as HTMLElement);\n input && input.focus();\n this.setState({\n isFetchingGiftCard: false,\n giftCard: undefined\n });\n };\n\n private readonly _findGiftcardTenderTypes = (\n tenderTypes: TenderType[],\n operationId: RetailOperation,\n giftcardType: string\n ): string[] | undefined => {\n let matchedTenderTypes: TenderType[] | undefined;\n\n switch (giftcardType) {\n case SupportedGiftCardType.Internal:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId === ''\n );\n break;\n case SupportedGiftCardType.External:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId !== ''\n );\n break;\n default:\n throw new Error('Invalid gift card type');\n }\n\n if (matchedTenderTypes) {\n return matchedTenderTypes.map(tenderType => tenderType.TenderTypeId || '');\n }\n return;\n };\n\n private readonly _getGiftCard = async (\n giftCardNumber: string,\n giftCardPin: string,\n giftCardExp: string,\n isPinRequired: boolean | undefined,\n isExpRequired: boolean | undefined,\n tenderTypeId: string | undefined\n ): Promise => {\n const {\n resources: { invalidCardTypeError, noBalanceError, invalidCardInfoError, noCardPinError, noCardExpError }\n } = this.props;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!tenderTypeId) {\n return undefined;\n }\n\n const tenderTypes = await getTenderTypesAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} }).catch(\n error => {\n throw error;\n }\n );\n\n if (!tenderTypes) {\n throw new Error('Fail to get gift card tender line');\n }\n\n const internalGiftcardTenderTypes = this._findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.Internal\n );\n const externalGiftcardTenderTypes = this._findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.External\n );\n\n switch (supportedGiftCardType) {\n case undefined:\n case SupportedGiftCardType.Internal:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.External:\n if (!externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.Both:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId) && !externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n break;\n default:\n throw new Error('Unsupported gift card type');\n }\n\n if (!this.props.context.request.user.isAuthenticated && internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this._setError(invalidCardTypeError);\n return undefined;\n }\n\n if (isPinRequired && giftCardPin === '') {\n this._setError(noCardPinError);\n return undefined;\n }\n\n if (isExpRequired && giftCardExp === '') {\n this._setError(noCardExpError);\n return undefined;\n }\n\n const month = Number.parseInt(giftCardExp.split('/')[0], 10);\n const year = Number.parseInt(giftCardExp.split('/')[1], 10);\n\n return getGiftCardAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, tenderTypeId, giftCardPin, month, year)\n .then(activeGiftCard => {\n if (!activeGiftCard.Balance || activeGiftCard.Balance === 0) {\n this._setError(noBalanceError);\n return;\n }\n return activeGiftCard;\n })\n .catch(error => {\n this._setError(invalidCardInfoError);\n return undefined;\n });\n };\n\n private readonly _getGiftCardTypes = async (giftCardNumber: string): Promise => {\n const {\n resources: { emptyInputError, invalidCodeError }\n } = this.props;\n\n if (!giftCardNumber) {\n this._setError(emptyInputError);\n return undefined;\n }\n\n return resolveCardTypesAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, CardType.GiftCard)\n .then(giftCardTypes => {\n if (!giftCardTypes || giftCardTypes.length === 0 || giftCardTypes[0] === undefined) {\n this._setError(invalidCodeError);\n return;\n }\n return giftCardTypes;\n })\n .catch(error => {\n this._setError(invalidCodeError);\n return undefined;\n });\n };\n}\n\nexport default GiftCardBalanceCheck;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IForm, IItem } from './components';\nimport { IGiftCardBalanceCheckViewProps } from './gift-card-balance-check';\n\nexport const Form: React.FC = ({\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n}) => (\n \n {alert}\n {supportExternalGiftCard ? (\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput && (\n \n {inputPinLabel}\n {inputPin}\n \n )}\n {showGiftCardExpInput && (\n \n {inputExpLabel}\n {inputExp}\n \n )}\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n ) : (\n <>\n {label}\n {inputNumber}\n \n )}\n {applyButton}\n \n);\n\nexport const Item: React.FC = ({ itemProps, selectedGiftCard }) => {selectedGiftCard};\n\nconst GiftCardBalanceCheckView: React.FC = props => {\n const { giftCardBalanceCheckProps, form, item } = props;\n return (\n \n {form &&
}\n {item && }\n \n );\n};\n\nexport default GiftCardBalanceCheckView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLinePriceEditor, ICartLinePriceEditorResources, PriceComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, { IComponentProps, IGridSettings, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ChannelDeliveryOptionConfiguration, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { CartLine, ProductCatalog, SalesLine } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions, getFallbackImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, IncrementalQuantity, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classNames from 'classnames';\nimport * as React from 'react';\n\n/**\n * ICartlineResourceString: Interface for specifying the\n * resource strings that the component needs.\n */\nexport interface ICartlineResourceString {\n /**\n * Display string for discount label\n */\n discountStringText: string;\n\n /**\n * String for size key\n */\n sizeString: string;\n\n /**\n * String for color key\n */\n colorString: string;\n\n /**\n * String associated with the configuration product dimension\n */\n configString: string;\n\n /**\n * String for style key\n */\n styleString: string;\n\n /**\n * String for amount key\n */\n amountString?: string;\n\n /**\n * Display string for quantity label\n */\n quantityDisplayString: string;\n\n /**\n * Display string for quantity label\n */\n inputQuantityAriaLabel: string;\n\n /**\n * Aria label for the decrement button in quantity component\n */\n decrementButtonAriaLabel: string;\n\n /**\n * Aria label for the increment button in quantity component\n */\n incrementButtonAriaLabel: string;\n\n /**\n * Original text screenreader\n */\n originalPriceText: string;\n\n /**\n * Current text screenreader\n */\n currentPriceText: string;\n\n /**\n * Shipping Charges Text\n */\n shippingChargesText: string;\n\n priceEditorResources?: ICartLinePriceEditorResources;\n salesAgreementPricePrompt?: string;\n}\n\ninterface ICartLineData {\n cartLine: CartLine | SalesLine;\n cartState?: ICartState;\n product?: SimpleProduct;\n catalogs?: ProductCatalog[];\n}\n\n/**\n * ICartLineProps: The props required to render cartLineitem.\n */\nexport interface ICartLineProps extends IComponentProps {\n /**\n * The flag to change the quantity component from intractable to static.\n */\n disableQuantityInteractivity?: boolean;\n\n /**\n * The primary image url.\n */\n primaryImageUrl?: string;\n\n /**\n * The product url.\n */\n productUrl?: string;\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\n /**\n * Boolean flag to indicate if the item is out of stock.\n */\n isOutOfStock?: boolean;\n\n /**\n * Flag to make quantity section editable.\n */\n isQuantityEditable?: boolean;\n\n /**\n * Max quantity for line item.\n */\n maxQuantity?: number;\n\n /**\n * Current quantity for line item.\n */\n currentQuantity?: number;\n\n /**\n * Resource string for the component.\n */\n resources: ICartlineResourceString;\n\n /**\n * SalesLine flag.\n */\n isSalesLine?: boolean;\n\n /**\n * Error message to show in place of quantity.\n */\n errorMessage?: string;\n\n /**\n * Inventory information label.\n */\n inventoryInformationLabel?: string;\n\n /**\n * Inventory information class name.\n */\n inventoryLabelClassName?: string;\n\n /**\n * Flag to show/hide shipping charges for line items.\n */\n showShippingChargesForLineItems?: boolean;\n\n /**\n * Boolean flag to indicate if cart state status is ready.\n */\n isCartStateReady?: boolean;\n\n /**\n * Chanel Delivery Option configuration is from api.\n */\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n /**\n * The telemetry content.\n */\n telemetryContent?: ITelemetryContent;\n\n /**\n * The cart line index.\n */\n lineIndex?: number;\n\n /**\n * Quantity onChange callback.\n */\n quantityOnChange?(cartLine: CartLine, newQuantity: number, lineIndex?: number): boolean;\n}\n\ninterface IDimensionStrings {\n /**\n * String for size key.\n */\n sizeString: string;\n\n /**\n * String for color key.\n */\n colorString: string;\n\n /**\n * String associated with the configuration product dimension.\n */\n configString: string;\n\n /**\n * String for style key.\n */\n styleString: string;\n\n /**\n * String for amount key.\n */\n amountString?: string;\n}\n\n/**\n * Renders catalog label for the cart line.\n * @param props - Cart line props.\n * @returns Catalog label.\n */\nconst CatalogLabelComponent: React.FC = (props: ICartLineProps) => {\n const catalogId = props.data.cartLine.CatalogId;\n\n if (!props.context.request.user.isB2b || !catalogId || !ArrayExtensions.hasElements(props.data.catalogs)) {\n return null;\n }\n\n const catalog = props.data.catalogs.find(item => item.RecordId === catalogId);\n\n if (!catalog || !catalog.Name) {\n return null;\n }\n\n return
{catalog.Name}
;\n};\n\nconst CartLineItemFunctions = {\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\n if (!Product || !Product.Dimensions) {\n return [];\n }\n\n return Product.Dimensions.map(productDimension => {\n if (productDimension.DimensionTypeValue === 1) {\n return (\n
\n \n {DimensionStrings.colorString}:\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 2) {\n return (\n
\n \n {DimensionStrings.configString}:\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 3) {\n return (\n
\n \n {DimensionStrings.sizeString}:\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n
\n );\n }\n\n if (productDimension.DimensionTypeValue === 4) {\n return (\n
\n \n {Product.IsGiftCard ? DimensionStrings.amountString : DimensionStrings.styleString}:\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\n \n
\n );\n }\n return null;\n });\n },\n\n renderDiscountLines: (props: ICartLineProps) => {\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\n return null;\n }\n\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\n return (\n
\n \n {discountLine.OfferName ? discountLine.OfferName : ''}:{` ${props.resources.discountStringText || 'Discount'} `}\n \n \n \n \n {` (${discountLine.EffectivePercentage !== undefined ? discountLine.EffectivePercentage : ''}%)`}\n
\n );\n });\n },\n renderInventoryLabel: (props: ICartLineProps) => {\n if (!props.inventoryInformationLabel) {\n return null;\n }\n const inventoryCssName = props.inventoryLabelClassName\n ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}`\n : 'msc-cart-line__product-inventory-label';\n return {props.inventoryInformationLabel};\n },\n\n /**\n * Gets the react node for product unit of measure display.\n * @param props - Icartline props.\n * @returns The node representing markup for unit of measure component.\n */\n renderUnitOfMeasure: (props: ICartLineProps) => {\n if (props.data.cartLine.IsInvoiceLine) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n if (!props.context.app.config.unitOfMeasureDisplayType || props.context.app.config.unitOfMeasureDisplayType === 'none') {\n return undefined;\n }\n\n const product = props.data.product;\n if (!product || !product.DefaultUnitOfMeasure) {\n return undefined;\n }\n\n return (\n
\n {product.DefaultUnitOfMeasure}\n
\n );\n },\n renderShippingLabel: (props: ICartLineProps) => {\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\n const cartline = props.data.cartLine;\n let hasShippingMethod = false;\n if (channelDeliveryOptionConfig !== undefined) {\n hasShippingMethod = !!(\n cartline.DeliveryMode &&\n channelDeliveryOptionConfig.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode)\n );\n } else {\n hasShippingMethod = !!(cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode);\n }\n if (!hasShippingMethod) {\n return undefined;\n }\n\n const shippingChargeLines = (cartline.ChargeLines || []).filter(chargeLine => chargeLine.IsShipping);\n\n if (shippingChargeLines.length === 0) {\n return undefined;\n }\n\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\n }, 0);\n\n const priceComponent = (\n \n );\n return (\n <>\n \n {priceComponent}\n \n );\n },\n renderOtherCharges: (props: ICartLineProps) => {\n const cartline = props.data.cartLine;\n const otherCharges = cartline.ChargeLines?.filter(chargeline => !chargeline.IsShipping);\n\n return (\n (otherCharges &&\n otherCharges.map((otherCharge, key) => {\n return otherCharge && otherCharge.CalculatedAmount ? (\n
\n \n \n \n \n
\n ) : (\n ''\n );\n })) ||\n undefined\n );\n },\n\n /**\n * Render the sales agreement prompt.\n * @param props - The ICartLineProps.\n * @returns The JSX.Element.\n */\n renderSalesAgreementPrompt: (props: ICartLineProps): JSX.Element | null => {\n if (props.data.cartLine.SalesAgreementLineRecordId === 0) {\n return null;\n }\n return
{props.resources.salesAgreementPricePrompt}
;\n }\n};\n\n// eslint-disable-next-line no-redeclare\nconst CartLine: React.FC = (props: ICartLineProps) => {\n const { isSalesLine, productUrl, resources } = props;\n const { product, cartLine } = props.data;\n\n const destructDimensionStrings = {\n sizeString: resources.sizeString,\n colorString: resources.colorString,\n styleString: resources.styleString,\n configString: resources.configString,\n amountString: resources.amountString\n };\n\n const fallbackImageUrl = product && getFallbackImageUrl(product.ItemId, props.context.actionContext.requestContext.apiSettings);\n const productDimensions = product && CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\n const imageSettings = props.imageSettings;\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\n const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\n const renderUnitOfMeasure = CartLineItemFunctions.renderUnitOfMeasure(props);\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\n const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\n const renderSalesAgreementPrompt = CartLineItemFunctions.renderSalesAgreementPrompt(props);\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\n const productAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n const productName = product?.Name || cartLine.Description;\n const imgeClassName = props.data.cartLine.IsInvoiceLine ? 'msc-cart-line__invoice-image' : 'msc-cart-line__product-image';\n\n const onChange = (newValue: number): boolean => {\n if (props.quantityOnChange) {\n return props.quantityOnChange(props.data.cartLine, newValue, props.lineIndex);\n }\n return true;\n };\n\n const _generateErrorMessage = (): JSX.Element | null => {\n if (props.errorMessage) {\n return (\n
\n \n {props.errorMessage}\n
\n );\n }\n\n return null;\n };\n\n const _generateQuantityandPrice = (): JSX.Element[] | null => {\n const nodes = [];\n if (props.isOutOfStock) {\n return null;\n }\n\n // No quantity selector for invoice line\n if (!props.data.cartLine.IsInvoiceLine) {\n if (props.data.product && props.isQuantityEditable) {\n nodes.push(\n
\n
{resources.quantityDisplayString}
\n \n
\n );\n } else {\n nodes.push(\n
\n \n {props.data.cartLine.Quantity}\n
\n );\n }\n }\n\n nodes.push(\n
\n \n {(props.data.cartLine.DiscountAmount && props.data.cartLine.DiscountAmount > 0 && (\n <>\n \n {` ${props.resources.discountStringText || 'Discount'} `}\n \n \n \n )) ||\n null}\n
\n );\n\n return nodes;\n };\n\n return (\n <>\n
\n
\n \n
\n
\n
\n \n {MsDyn365.isBrowser ? (\n \n {productName}\n \n ) : null}\n {ArrayExtensions.hasElements(productDimensions) ? (\n
{productDimensions}
\n ) : (\n ''\n )}\n {renderUnitOfMeasure}\n
\n \n
\n {renderDisountLines}\n {renderInventoryLabel}\n {props.showShippingChargesForLineItems &&
{renderShippingLabel}
}\n {renderOtherCharges}\n {renderSalesAgreementPrompt}\n
\n {_generateQuantityandPrice()}\n {props.data.cartLine.IsInvoiceLine && props.data.cartState && props.resources.priceEditorResources && (\n \n )}\n
\n
\n {_generateErrorMessage()}\n \n );\n};\n\nexport default CartLine;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getCatalogId, IActionContext, IImageData, IImageSettings } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getMediaLocationsForSelectedVariant, MediaLocationsForSelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\n\nasync function validateMediaLocationAsync(mediaLocation: MediaLocation): Promise<[IImageData, boolean]> {\n const imageData: IImageData = {\n src: mediaLocation.Uri || '',\n altText: mediaLocation.AltText || ''\n };\n if (mediaLocation.IsApplicableForChildEntities) {\n imageData.additionalProperties = { isApplicableForChildEntities: 'true' };\n }\n\n if (imageData.src === '') {\n return [imageData, false];\n }\n\n return new Promise<[IImageData, boolean]>(resolve => {\n try {\n const http = new XMLHttpRequest();\n http.open('HEAD', imageData.src!, true);\n\n http.addEventListener('load', () => {\n resolve([imageData, http.status === 200 || http.status === 201]);\n });\n\n http.addEventListener('error', () => {\n resolve([imageData, false]);\n });\n\n http.send();\n } catch {\n resolve([imageData, false]);\n }\n });\n}\n\nexport async function getValidProductImages(\n productId: number,\n channelId: number,\n actionContext: IActionContext,\n imageSettings: IImageSettings,\n selectedProduct?: SimpleProduct\n): Promise {\n const catalogId = getCatalogId(actionContext.requestContext);\n const actionInput = new MediaLocationsForSelectedVariantInput(productId, channelId, selectedProduct, catalogId);\n\n return getMediaLocationsForSelectedVariant(actionInput, actionContext)\n .then(mediaLocations => {\n if (mediaLocations) {\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation))).then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n });\n }\n\n return [];\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to get Media Locations for Selected Variant');\n return [];\n });\n}\n\nexport async function validateProductImages(\n mediaLocations: MediaLocation[],\n actionContext: IActionContext,\n imageSettings: IImageSettings\n): Promise {\n return Promise.all(mediaLocations.map(mediaLocation => validateMediaLocationAsync(mediaLocation)))\n .then(pairs => {\n return pairs.filter(pair => pair[1]).map(pair => pair[0]);\n })\n .catch(error => {\n actionContext.telemetry.exception(error);\n actionContext.telemetry.debug('Unable to validate product images');\n return [];\n });\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Carousel, ICarouselProps } from '@msdyn365-commerce/components';\nimport { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { MediaLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getFallbackImageUrl, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n defaultDataScale,\n IComponentNodeProps,\n ImagefullView,\n IModalViewProps,\n IModuleProps,\n inlineZoomImageOnHover,\n inlineZoomImageOnMouseMove,\n inlineZoomImageOnMouseOut,\n inlineZoomInitClick,\n INodeProps,\n ISingleSlideCarouselProps,\n isMobile,\n KeyCodes,\n NodeTag,\n onContainerZoomInit,\n onMouseMoveLensContainer,\n onMouseOutLensContainer,\n onMouseOverImageContainer,\n removeContainerZoomStyle,\n removeInlineZoomStyle,\n SingleSlideCarousel,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IMediaGalleryData } from './media-gallery.data';\nimport { imageSource, imageZoom, IMediaGalleryProps, thumbnailsOrientation } from './media-gallery.props.autogenerated';\nimport { getValidProductImages, validateProductImages } from './utils';\n\n/**\n * IMediaGalleryState Interface.\n */\nexport interface IMediaGalleryState {\n animating: boolean;\n activeIndex: number;\n isImageZoomed: boolean;\n modalIsOpen: boolean;\n lastUpdate?: number;\n isMobileImageZoomed?: boolean;\n mediaGalleryItems?: IImageData[];\n isInitialLoad?: boolean;\n shouldUseOptimizedImage?: boolean;\n}\n\n/**\n * IMediaGalleryThumbnailsViewProps Interface.\n */\nexport interface IMediaGalleryThumbnailsViewProps {\n ThumbnailsContainerProps: INodeProps;\n SingleSlideCarouselComponentProps: INodeProps;\n items?: IMediaGalleryThumbnailItemViewProps[];\n}\n\n/**\n * IMediaGalleryThumbnailItemViewProps Interface.\n */\nexport interface IMediaGalleryThumbnailItemViewProps {\n ThumbnailItemContainerProps: INodeProps;\n Picture: React.ReactElement;\n}\n\n/**\n * IMediaGalleryViewProps Interface.\n */\nexport interface IMediaGalleryViewProps extends IMediaGalleryProps {\n state: IMediaGalleryState;\n MediaGallery: IModuleProps;\n CarouselProps: INodeProps;\n Thumbnails: IMediaGalleryThumbnailsViewProps;\n Modal?: React.ReactElement | null;\n callbackToggle?(): void;\n callbackThumbnailClick?(index: number): void;\n callbackThumbnailKeyDown?(index: number): void;\n}\n\n/**\n * Props for carousel.\n */\ninterface IMediaGalleryCarouselItems {\n items: ItemType[];\n keys: (string | undefined)[];\n}\n\n/**\n * Media gallery component.\n */\nclass MediaGallery extends React.Component, IMediaGalleryState> {\n private readonly _inlineZoomDivRef: Map = new Map();\n\n private readonly fullScreenOverlayButtonRef: React.RefObject = React.createRef();\n\n private mediaGalleryImages: IImageData[] = [];\n\n private fallbackImage?: string;\n\n private readonly defaultGalleryImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=767&h=767&m=8', w: 0, h: 0 },\n sm: { q: 'w=600&h=600&m=8', w: 0, h: 0 },\n md: { q: 'w=600&h=772&m=8', w: 0, h: 0 },\n lg: { q: 'h=772&m=8', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly defaultThumbnailImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=100&m=8', w: 100, h: 0 },\n lg: { q: 'w=100&m=8', w: 100, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n private readonly _zoomedImageSettings: IImageSettings;\n\n public constructor(props: IMediaGalleryProps) {\n super(props);\n this._toggleModal = this._toggleModal.bind(this);\n this.state = {\n activeIndex: 0,\n animating: false,\n isImageZoomed: false,\n modalIsOpen: false,\n isInitialLoad: true,\n shouldUseOptimizedImage: !!this.props.config.skipImageValidation\n };\n\n this._zoomedImageSettings =\n props.config.zoomedImageSettings ?? props.config.galleryImageSettings ?? this.defaultGalleryImageSettings;\n\n this._onImageMouseOut = this._onImageMouseOut.bind(this);\n this._inlineZoomImageOnHover = this._inlineZoomImageOnHover.bind(this);\n this._onInlineImageClick = this._onInlineImageClick.bind(this);\n this._onContainerZoomImageClick = this._onContainerZoomImageClick.bind(this);\n this._onMouseOutLensContainer = this._onMouseOutLensContainer.bind(this);\n }\n\n public isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public async componentDidMount(): Promise {\n const source = this.props.config.imageSource ?? imageSource.pageContext;\n const shouldUpdateOnPartialDimensionSelection = this.props.config.shouldUpdateOnPartialDimensionSelection;\n this._setRenderType();\n if (source === imageSource.pageContext) {\n if (this.state.mediaGalleryItems === undefined && this.props.data.mediaLocationsForSelectedVariant.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocationsForSelectedVariant.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings\n );\n this._setImages(images);\n } else if (this.state.mediaGalleryItems === undefined && this.props.data.product.result) {\n const product = this.props.data.product.result;\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n product.productVariant\n );\n\n this._setImages(images);\n } else {\n this._setImages([]);\n }\n\n reaction(\n () => {\n const product = this.props.data.product.result;\n if (!product) {\n return null;\n }\n\n if (!shouldUpdateOnPartialDimensionSelection || ObjectExtensions.isNullOrUndefined(product.productVariant?.RecordId)) {\n return `${product.RecordId}`;\n }\n\n return `${product.RecordId}-${product.productVariant!.RecordId}`;\n },\n async () => {\n const product = this.props.data.product.result;\n if (product) {\n const images = await getValidProductImages(\n product.RecordId,\n +this.props.context.request.apiSettings.channelId,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n shouldUpdateOnPartialDimensionSelection ? product.productVariant : undefined\n );\n this._setImages(images);\n } else {\n this._setImages([]);\n }\n }\n );\n }\n\n if (source === imageSource.productId && this.props.data.mediaLocations.result) {\n const images = await validateProductImages(\n this.props.data.mediaLocations.result,\n this.props.context.actionContext,\n this.props.config.thumbnailImageSettings ?? this.defaultThumbnailImageSettings\n );\n this._setImages(images);\n }\n }\n\n public shouldComponentUpdate(nextProps: IMediaGalleryProps, nextState: IMediaGalleryState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { id, config, resources } = this.props;\n\n const { className, showPaginationTooltip } = config;\n\n const isVertical: boolean = config.thumbnailsOrientation === thumbnailsOrientation.vertical;\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- || is required.\n const isFullscreenAllowed: boolean = this.isMobile() || config.allowFullScreen || false;\n const zoomViewMode: string =\n config.imageZoom === imageZoom.inline ? imageZoom.inline : config.imageZoom === imageZoom.container ? imageZoom.container : '';\n const source = this.props.config.imageSource ?? imageSource.pageContext;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Site level config can be of any type.\n const emptyPlaceHolderImage = this.props.context.app.config?.placeholderImageName as string;\n if (this.props.data.product.result) {\n this.fallbackImage = getFallbackImageUrl(this.props.data.product.result.ItemId, this.props.context.request.apiSettings);\n }\n if (emptyPlaceHolderImage && this.fallbackImage) {\n this.fallbackImage = `${this.fallbackImage},${emptyPlaceHolderImage}`;\n }\n if (this.props.config.skipImageValidation && !this.state.mediaGalleryItems && this.state.isInitialLoad) {\n let images: IImageData[] = [];\n let mediaLocations: MediaLocation[] = [];\n if (source === imageSource.pageContext && this.props.data.mediaLocationsForSelectedVariant.result) {\n mediaLocations = this.props.data.mediaLocationsForSelectedVariant.result;\n } else if (source === imageSource.productId && this.props.data.mediaLocations.result) {\n mediaLocations = this.props.data.mediaLocations.result;\n }\n images = mediaLocations.map(mediaLocation => {\n return {\n src: mediaLocation.Uri ?? '',\n altText: mediaLocation.AltText ?? ''\n };\n });\n const curatedImages = this.props.config.images ?? [];\n this.mediaGalleryImages = [...this._filterMasterImageFromVariant(images), ...curatedImages];\n }\n const mediaGalleryCarouselItems = this._getMediaGalleryItems(isFullscreenAllowed, zoomViewMode);\n const mediaGalleryThumbnailCarouselItems = this._getMediaGalleryThumbnailItems();\n const viewProps: IMediaGalleryViewProps = {\n ...(this.props as IMediaGalleryProps),\n state: this.state,\n MediaGallery: {\n moduleProps: this.props,\n className: classnames(`ms-media-gallery ${isVertical ? 'vertical' : ''}`, className)\n },\n Modal: isFullscreenAllowed ? this.imageModalSlider(zoomViewMode) : null,\n callbackToggle: this.openModalDialog,\n callbackThumbnailClick: this._generateOnThumbnailClick,\n callbackThumbnailKeyDown: this._generateOnThumbnailKeyDown,\n CarouselProps: {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items: mediaGalleryCarouselItems.items,\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: showPaginationTooltip === true,\n indicatorAriaText: resources.ariaLabelForSlide,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n key: mediaGalleryCarouselItems.keys\n } as IComponentNodeProps,\n Thumbnails: {\n ThumbnailsContainerProps: { className: 'ms-media-gallery__thumbnails-container' },\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: 'ms-media-gallery__thumbnails',\n vertical: isVertical,\n flipperPrevLabel: resources.previousScreenshotFlipperText,\n flipperNextLabel: resources.nextScreenshotFlipperText,\n parentId: id,\n useTabList: true,\n key: JSON.stringify(mediaGalleryThumbnailCarouselItems.keys)\n } as IComponentNodeProps,\n items: mediaGalleryThumbnailCarouselItems.items\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Zoomed out image on previous/next click.\n */\n public updateZoomedInImage(): void {\n this.setState({ isImageZoomed: false });\n }\n\n private readonly onExiting = () => {\n this.setState({ animating: true });\n };\n\n private readonly onExited = () => {\n this.setState({ animating: false });\n };\n\n /**\n * On click next in carousel.\n */\n private readonly next = (): void => {\n removeInlineZoomStyle();\n if (this.isLastItem() === undefined) {\n return;\n }\n\n const nextIndex = this.isLastItem() ? 0 : this.state.activeIndex + 1;\n this.goToIndex(nextIndex);\n\n this.updateZoomedInImage();\n };\n\n /**\n * On click previous in carousel.\n */\n private readonly previous = (): void => {\n removeInlineZoomStyle();\n const images = this.state.mediaGalleryItems;\n const nextIndex = this.isFirstItem() ? (images ? images.length - 1 : 0) : this.state.activeIndex - 1;\n this.goToIndex(nextIndex);\n this.updateZoomedInImage();\n };\n\n private readonly goToIndex = (index: number): void => {\n this.setState({ activeIndex: index });\n };\n\n private _getMediaGalleryThumbnailItems(): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems ?? this.mediaGalleryImages;\n const thumbnailImageSettings = this.props.config.thumbnailImageSettings;\n if (thumbnailImageSettings) {\n thumbnailImageSettings.cropFocalRegion = true;\n }\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n const defaultKey = 0;\n return {\n items: [this._getEmptyThumbnailItem(thumbnailImageSettings, defaultKey, this.state.activeIndex)],\n keys: ['empty']\n };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n ...mediaGalleryItems!.map((item: IImageData, index: number) =>\n this._getThumbnailItem(\n item,\n thumbnailImageSettings ?? this.defaultThumbnailImageSettings,\n index,\n this.state.activeIndex\n )\n )\n ],\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private _getMediaGalleryItems(isFullscreenAllowed: boolean, zoomViewMode: string): IMediaGalleryCarouselItems {\n const mediaGalleryItems = this.state.mediaGalleryItems ?? this.mediaGalleryImages;\n const galleryImageSettings = this.props.config.galleryImageSettings;\n if (galleryImageSettings) {\n galleryImageSettings.cropFocalRegion = true;\n }\n\n const zoomView = isFullscreenAllowed ? 'fullscreen' : zoomViewMode;\n\n const hasMediaGalleryItems = ArrayExtensions.hasElements(mediaGalleryItems);\n\n if (!hasMediaGalleryItems) {\n if (this.state.lastUpdate) {\n return { items: [this._renderEmptyImage(galleryImageSettings)], keys: ['empty'] };\n }\n return { items: [], keys: [] };\n }\n\n return {\n items: [\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n ...mediaGalleryItems!.map((item: IImageData, index: number) =>\n this._renderCarouselItemImageView(zoomView, item, galleryImageSettings ?? this.defaultGalleryImageSettings, index)\n )\n ],\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n keys: [...mediaGalleryItems!.map(item => item.src)]\n };\n }\n\n private _setImages(images?: IImageData[]): void {\n const curatedImage = this.props.config.images || [];\n const imagesToSet = this._filterMasterImageFromVariant(images);\n\n this.setState({\n mediaGalleryItems: [...imagesToSet, ...curatedImage],\n activeIndex: 0,\n lastUpdate: Date.now(),\n shouldUseOptimizedImage: false\n });\n }\n\n private _setRenderType(): void {\n this.setState({\n isInitialLoad: false\n });\n }\n\n private _renderCarouselItemImageView(\n zoomView: string,\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n isInPopup: boolean = false\n ): React.ReactNode {\n if (this.isMobile()) {\n if (isInPopup) {\n return this._renderImageInContainerOnZoom(image, this._zoomedImageSettings, index);\n }\n return this._renderImageFullScreenOnZoom(image, imageSettings, index);\n }\n\n switch (zoomView) {\n case 'container': {\n return this._renderImageInContainerOnZoom(image, this._zoomedImageSettings, index);\n }\n case 'inline': {\n return this._renderImageInlineOnZoom(image, this._zoomedImageSettings, index);\n }\n case 'fullscreen': {\n return this._renderImageFullScreenOnZoom(image, imageSettings, index);\n }\n\n // No default\n }\n return <>{this._getCarouselItem(image, imageSettings, index, isInPopup)};\n }\n\n private _filterMasterImageFromVariant(images?: IImageData[]): IImageData[] {\n const shouldHidePrimaryImages = this.props.config.shouldHideMasterProductImagesForVariant ?? true;\n let variantImages = images ?? [];\n const isVariantProduct =\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.MasterProductId) ||\n !ObjectExtensions.isNullOrUndefined(this.props.data.product.result?.productVariant);\n const itemId = this.props.data.product.result?.ItemId;\n if (shouldHidePrimaryImages && isVariantProduct && itemId) {\n variantImages = variantImages.filter(item => {\n const isApplicableForChildEntities = item.additionalProperties?.isApplicableForChildEntities;\n return !isApplicableForChildEntities;\n });\n if (!ArrayExtensions.hasElements(variantImages)) {\n variantImages = images ?? [];\n }\n }\n return variantImages;\n }\n\n private readonly _getCarouselItem = (\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n isInPopup: boolean = false\n ): React.ReactNode => (\n \n );\n\n private readonly _getThumbnailItem = (\n image: IImageData,\n imageSettings: IImageSettings,\n index: number,\n modifiedActiveIndex: number\n ): IMediaGalleryThumbnailItemViewProps => {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: index,\n 'aria-label': image.altText,\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n };\n\n /**\n * Ref Handler.\n * @param index -Remove item click function.\n * @returns Set inline zoom.\n */\n private readonly _refHandler = (index: number) => (divRef: HTMLDivElement) => {\n this._inlineZoomDivRef.set(index, divRef);\n };\n\n private readonly _generateOnThumbnailKeyDown = (index: number) => {\n return (event: React.KeyboardEvent) => {\n if (event.which === KeyCodes.Enter || event.which === KeyCodes.Space) {\n event.preventDefault();\n\n this.goToIndex(index);\n }\n };\n };\n\n private readonly _generateOnThumbnailClick = (index: number) => {\n return (event: React.MouseEvent) => {\n event.preventDefault();\n\n this.goToIndex(index);\n };\n };\n\n private _renderImageInlineOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n \n \n \n \n );\n }\n\n private _inlineZoomImageOnHover(event: React.MouseEvent): void {\n inlineZoomImageOnHover(event, this.props.config.dataScale ?? String(defaultDataScale));\n }\n\n private _handleMobileViewZoomedImageClick(event: React.MouseEvent) {\n const target = this.state.shouldUseOptimizedImage ? (event.target as HTMLImageElement) : event.currentTarget;\n const mobileZoomedInImageClassName = 'msc-mobile-zoomed-in';\n if (!this.state.isMobileImageZoomed) {\n const bounds = target.getBoundingClientRect();\n const dataScale = Number(this.props.config.dataScale ?? defaultDataScale);\n\n const positionX = event.clientX - bounds.left;\n const positionY = event.clientY - bounds.top;\n const scaledPositionX = positionX * dataScale;\n const scaledPositionY = positionY * dataScale;\n\n target.style.transform = `scale(${dataScale})`;\n target.classList.add(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = 'auto';\n target.parentElement!.scrollTo(scaledPositionX - positionX, scaledPositionY - positionY);\n this.setState({\n isMobileImageZoomed: true\n });\n } else {\n target.style.transform = '';\n target.classList.remove(mobileZoomedInImageClassName);\n target.parentElement!.style.overflow = '';\n this.setState({\n isMobileImageZoomed: false\n });\n }\n }\n\n private _onInlineImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) {\n // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n inlineZoomInitClick(event, this.props.config.dataScale ?? String(defaultDataScale));\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onImageMouseOut(event: React.MouseEvent): void {\n inlineZoomImageOnMouseOut(event);\n this.setState({\n isImageZoomed: false\n });\n }\n\n private _onContainerZoomImageClick(event: React.MouseEvent): void {\n if (window.innerWidth <= 768) {\n // $msv-breakpoint-m\n this._handleMobileViewZoomedImageClick(event);\n return;\n }\n\n onContainerZoomInit(event);\n\n this.setState({\n isImageZoomed: true\n });\n }\n\n private _onMouseOutLensContainer(event: React.MouseEvent): void {\n onMouseOutLensContainer(event);\n\n this.setState({\n isImageZoomed: false\n });\n }\n\n private _renderImageInContainerOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n \n
\n );\n }\n\n private _renderImageFullScreenOnZoom(image: IImageData, imageSettings: IImageSettings, index: number): React.ReactNode {\n return (\n
\n \n
\n {}\n \n
\n
\n );\n }\n\n private _mapProductToImageData(product: SimpleProduct): IImageData {\n return {\n src: product.PrimaryImageUrl ?? ''\n };\n }\n\n private _renderEmptyImage(imageSettings: IImageSettings | undefined): React.ReactNode {\n return (\n
\n \n
\n );\n }\n\n private _getEmptyThumbnailItem(\n imageSettings: IImageSettings | undefined,\n index: number,\n modifiedActiveIndex: number\n ): IMediaGalleryThumbnailItemViewProps {\n const classes = classnames(\n 'ms-media-gallery__thumbnail-item',\n modifiedActiveIndex === index ? 'ms-media-gallery__thumbnail-item-active' : ''\n );\n return {\n ThumbnailItemContainerProps: {\n tag: 'li' as NodeTag,\n className: classes,\n role: 'tab',\n tabIndex: 0,\n key: 'empty',\n 'aria-label': '',\n 'aria-selected': modifiedActiveIndex === index,\n onClick: this._generateOnThumbnailClick(index),\n onKeyDown: this._generateOnThumbnailKeyDown(index)\n },\n Picture: (\n \n )\n };\n }\n\n private readonly isFirstItem = () => this.state.activeIndex === 0;\n\n private readonly isLastItem = () => {\n const images = this.state.mediaGalleryItems;\n return images && this.state.activeIndex === images.length - 1;\n };\n\n private readonly openModalDialog = (): void => {\n this._toggleModal();\n };\n\n private _toggleModal(): void {\n if (this.state.modalIsOpen) {\n this.fullScreenOverlayButtonRef.current?.focus();\n const parentDiv = this._inlineZoomDivRef.get(this.state.activeIndex);\n if (parentDiv && parentDiv.children && parentDiv.children.length >= 2) {\n const image = parentDiv.children[1].querySelector('img');\n if (image) {\n image.removeAttribute('style');\n }\n }\n this.setState({\n isImageZoomed: false\n });\n }\n this.setState({\n isImageZoomed: false,\n modalIsOpen: !this.state.modalIsOpen\n });\n removeInlineZoomStyle();\n removeContainerZoomStyle();\n }\n\n private readonly imageModalSlider = (ZoomView: string): React.ReactElement => {\n const {\n data: {\n product: { result: product }\n },\n resources\n } = this.props;\n let mediaGalleryItems = this.state.mediaGalleryItems;\n\n if (!mediaGalleryItems && product) {\n mediaGalleryItems = [this._mapProductToImageData(product)];\n }\n const carouselprops = {\n tag: Carousel,\n className: 'ms-media-gallery__carousel',\n items:\n mediaGalleryItems &&\n mediaGalleryItems.map((item: IImageData, index: number) =>\n this._renderCarouselItemImageView(ZoomView, item, this._zoomedImageSettings, index, true)\n ),\n activeIndex: this.state.activeIndex,\n next: this.next,\n previous: this.previous,\n interval: false,\n directionTextPrev: resources.previousScreenshotFlipperText,\n directionTextNext: resources.nextScreenshotFlipperText,\n onIndicatorsClickHandler: this.goToIndex,\n showPaginationTooltip: true,\n hideIndicator: false,\n keyboard: false,\n handleOnExited: this.onExited,\n handleOnExiting: this.onExiting,\n isDisabledFunctionality: this.state.isMobileImageZoomed\n } as IComponentNodeProps;\n const carousel = ;\n\n const imageModalSliderProps: IModalViewProps = {\n modalIsOpen: this.state.modalIsOpen,\n ontoggle: this._toggleModal,\n galleryCarousel: carousel,\n classNames: classnames('ms-media-gallery__modal', 'msc-modal-input-required')\n };\n return ImagefullView(imageModalSliderProps) as React.ReactElement;\n };\n}\n\nexport default MediaGallery;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IMediaGalleryThumbnailItemViewProps, IMediaGalleryThumbnailsViewProps, IMediaGalleryViewProps } from '../..';\n\nconst MediaGalleryView: React.FC = props => {\n const { CarouselProps, Thumbnails, MediaGallery, Modal } = props;\n\n return (\n \n \n {Modal}\n {_renderThumbnails(Thumbnails)}\n \n );\n};\n\nconst _renderThumbnails = (thumbnails: IMediaGalleryThumbnailsViewProps): JSX.Element => {\n const { ThumbnailsContainerProps, SingleSlideCarouselComponentProps, items } = thumbnails;\n\n return (\n \n {items && items.map(_renderThumbnailItem)}\n \n );\n};\n\nconst _renderThumbnailItem = (thumbnail: IMediaGalleryThumbnailItemViewProps): JSX.Element => {\n const { ThumbnailItemContainerProps, Picture } = thumbnail;\n\n return {Picture};\n};\n\nexport default MediaGalleryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToCartComponent, IAddToCartResources, OrderDetailsProduct } from '@msdyn365-commerce/components';\nimport { getUrlSync, IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport { SalesLine } from '@msdyn365-commerce/retail-proxy';\nimport { QuickOrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\n/**\n * The data on which the component should operate.\n */\nexport interface IAddToCartSelectedData {\n quickOrderTemplate: QuickOrderTemplate | undefined;\n}\n\n/**\n * The resources needed to render a buy selected component.\n */\nexport interface IAddToCartSelectedResources {\n quickOrderGridBuySelectedButtonText?: string;\n quickOrderGridBuySelectedButtonAriaLabel?: string;\n quickOrderGridBuySelectedAddingToCartErrorNotificationTitle?: string;\n quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel?: string;\n quickOrderGridGoToCartText?: string;\n quickOrderGridDialogCloseText?: string;\n quickOrderGridSingleItemText?: string;\n quickOrderGridMultiLineItemFormatText?: string;\n quickOrderGridMultiLinesFormatText?: string;\n quickOrderGridHeaderMessageText?: string;\n addedQuantityText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n freePriceText?: string;\n}\n\n/**\n * Configuration of a buy selected component.\n */\nexport interface IAddToCartSelectedProps extends IComponentProps {\n className: string;\n context: ICoreContext;\n\n resources: IAddToCartSelectedResources;\n\n isIcon?: boolean;\n}\n\n/**\n * Get the dialog strings.\n * @param props - The buy selected props.\n * @returns The add to cart resources.\n */\nexport const getDialogStrings = (props: IAddToCartSelectedProps): IAddToCartResources => {\n return {\n goToCartText: props.resources.quickOrderGridGoToCartText ?? '',\n continueShoppingText: props.resources.quickOrderGridDialogCloseText ?? '',\n closeNotificationLabel: props.resources.quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel ?? '',\n headerItemOneText: props.resources.quickOrderGridSingleItemText ?? '',\n headerItemFormatText: props.resources.quickOrderGridMultiLineItemFormatText ?? '',\n headerLinesFormatText: props.resources.quickOrderGridMultiLinesFormatText ?? '',\n headerMessageText: props.resources.quickOrderGridHeaderMessageText ?? '',\n freePriceText: props.resources.freePriceText ?? '',\n originalPriceText: props.resources.originalPriceText ?? '',\n currentPriceText: props.resources.currentPriceText ?? '',\n addedQuantityText: props.resources.addedQuantityText ?? '',\n buyAgainNotificationTitle: props.resources.quickOrderGridBuySelectedAddingToCartErrorNotificationTitle ?? '',\n buyAgainNotificationCloseAriaLabel: props.resources.quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel ?? ''\n };\n};\n\n/**\n * Get the dialog strings.\n * @param quickOrder - The buy selected props.\n * @returns The add to cart resources.\n */\nexport const getOrderDetails = (quickOrder: QuickOrderTemplate): OrderDetailsProduct[] => {\n const orderDetails: OrderDetailsProduct[] = [];\n for (const quickLine of quickOrder.quickOrderTemplateLines) {\n const quantity = quickLine.productListLine.Quantity;\n const salesLine: SalesLine = {\n Quantity: quantity\n };\n const products = new OrderDetailsProduct(salesLine, quickLine.fullProduct?.ProductDetails);\n orderDetails.push(products);\n }\n return orderDetails;\n};\n\n/**\n * Renders a button which adds given products to the cart.\n * @param props - Configuration of the component.\n * @returns A react element or null if no products were given.\n */\nexport const AddToCartProductListComponent: React.FC = (props: IAddToCartSelectedProps): JSX.Element | null => {\n const {\n data: { quickOrderTemplate }\n } = props;\n\n if (quickOrderTemplate?.quickOrderTemplateLines[0].fullProduct?.ProductDetails === undefined) {\n return null;\n }\n const quantity = quickOrderTemplate.quickOrderTemplateLines[0].productListLine.Quantity;\n const buttonLabel = props.resources.quickOrderGridBuySelectedButtonText;\n const buttonAriaLabel = props.resources.quickOrderGridBuySelectedButtonAriaLabel;\n const dialogStrings: IAddToCartResources = getDialogStrings(props);\n const shouldSkipSiteSettings: boolean = true;\n const orderDetailProducts = getOrderDetails(quickOrderTemplate);\n return (\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 { IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport { QuickOrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddToCartProductListComponent } from './add-to-list';\nimport { IQuickOrderGridActionsViewProps } from './utilities';\n\n/**\n * Interface for quick order grid action data.\n */\nexport interface IQuickOrderGridActionsData {\n quickOrderTemplate: QuickOrderTemplate | undefined;\n}\n\n/**\n * Interface for quick order grid action props.\n */\nexport interface IQuickOrderGridActionsProps extends IComponentProps {\n context: ICoreContext;\n telemetryContent?: ITelemetryContent;\n moduleClassName: string;\n typeName: string;\n handlers: {\n removeProductList(productListId: string): void;\n };\n resources: {\n quickOrderGridDeleteButtonText: string;\n quickOrderGridBuySelectedButtonText?: string;\n quickOrderGridBuySelectedButtonAriaLabel?: string;\n quickOrderGridBuySelectedAddingToCartErrorNotificationTitle?: string;\n quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel?: string;\n quickOrderGridGoToCartText?: string;\n quickOrderGridDialogCloseText?: string;\n quickOrderGridSingleItemText?: string;\n quickOrderGridMultiLineItemFormatText?: string;\n quickOrderGridMultiLinesFormatText?: string;\n quickOrderGridHeaderMessageText?: string;\n addedQuantityText?: string;\n originalPriceText?: string;\n currentPriceText?: string;\n freePriceText?: string;\n };\n}\n\n/**\n * Remove ProductList Action.\n * @param props -Quick order grid action props.\n */\nconst removeQuickOrderList = (props: IQuickOrderGridActionsProps): void => {\n const {\n data: { quickOrderTemplate },\n handlers\n } = props;\n const { removeProductList } = handlers;\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- Need to check data.\n if (quickOrderTemplate && quickOrderTemplate.productList.Id) {\n removeProductList(quickOrderTemplate.productList.Id);\n }\n};\n\n/**\n * Get Addtobag Button.\n * @param props -Order template action props.\n * @returns QuickOrderGrid actions view props.\n */\nconst getQuickOrderGridAddToCartDialog = (props: IQuickOrderGridActionsProps): React.ReactNode => {\n const {\n data: { quickOrderTemplate },\n context,\n moduleClassName,\n resources,\n typeName\n } = props;\n const buttonId = 'quick-order-grid';\n return (\n \n );\n};\n\n/**\n * Remove Quick order grid action.\n * @param props -Quick order grid action props.\n * @returns Remove order template.\n */\nconst removeActionHandler = (props: IQuickOrderGridActionsProps) => () => {\n removeQuickOrderList(props);\n};\n\n/**\n * Quick order grid action view.\n * @param props -Quick Order Grid template action props.\n * @returns QuickOrderGrid actions view props.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Name needs to be this.\nexport const QuickOrderGridActionsView = (props: IQuickOrderGridActionsProps): IQuickOrderGridActionsViewProps => {\n const { moduleClassName, resources } = props;\n const { quickOrderGridDeleteButtonText } = resources;\n\n return {\n addProductListToBag: getQuickOrderGridAddToCartDialog(props),\n removeProductList: (\n \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 { Button, Collapse, ICollapseProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IQuickOrderGridDrawerProps } from './quick-order-grid-drawer-props';\n\n/**\n * Interface for drawer state.\n */\nexport interface IQuickOrderGridDrawerState {\n isOpen: boolean;\n}\n\n/**\n * Placement of glyph.\n */\nexport type GlyphPlacement = 'start' | 'end';\n\n/**\n * Quick Order Grid Drawer - This is a full width uncontrolled collapse where the button glyph changes\n * when the drawer is open and closed.\n */\nexport class QuickOrderGridDrawer extends React.Component {\n private readonly _drawerOpenGlyph: string;\n\n private readonly _drawerCloseGlyph: string;\n\n private readonly _drawerGlyphClass: string;\n\n private _isManuallyToggled: boolean;\n\n public constructor(props: IQuickOrderGridDrawerProps) {\n super(props);\n this._isManuallyToggled = false;\n this.state = { isOpen: props.collapseProps?.isOpen ?? false };\n this._drawerGlyphClass = classnames('drawer__glyph', this.props.toggleGlyphClassName ? this.props.toggleGlyphClassName : '');\n const closeGlyph = this.props.closeGlyph ? this.props.closeGlyph : '';\n if (this.props.isAnimateGlyph) {\n this._drawerOpenGlyph = classnames(this._drawerGlyphClass, this.props.openGlyph ? this.props.openGlyph : closeGlyph);\n this._drawerCloseGlyph = this._drawerOpenGlyph;\n } else {\n this._drawerOpenGlyph = classnames(this._drawerGlyphClass, this.props.openGlyph ? this.props.openGlyph : '');\n this._drawerCloseGlyph = classnames(this._drawerGlyphClass, closeGlyph);\n }\n }\n\n /**\n * Method to call on click of drawer button.\n * @param event - Product DeliveryOption List.\n */\n public toggle = (event: React.MouseEvent | React.KeyboardEvent): void => {\n event.preventDefault();\n this._isManuallyToggled = true;\n if (this.props.onToggle) {\n this.setState(previousState => ({ isOpen: !previousState.isOpen }));\n this.props.onToggle(this.state);\n } else {\n this.setState(previousState => ({ isOpen: !previousState.isOpen }));\n }\n };\n\n public shouldComponentUpdate(nextProps: IQuickOrderGridDrawerProps, nextState: IQuickOrderGridDrawerState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const collapseProps: ICollapseProps = { ...this.props.collapseProps };\n\n // If the drawer is manually toggled by pressing the button, then we use the internal state\n if (collapseProps.isOpen === undefined || this._isManuallyToggled) {\n collapseProps.isOpen = this.state.isOpen;\n }\n collapseProps.children = this.props.children;\n const drawerClass = classnames('drawer', this.props.className);\n const drawerButtonClassName = `${this.props.className ? this.props.className : ''}__button`;\n this._isManuallyToggled = false;\n return (\n
\n \n {this._generateDrawerButtonInnerMarkup(collapseProps.isOpen, drawerClass)}\n \n \n
\n );\n }\n\n private _generateDrawerButtonInnerMarkup(isCollapseState: boolean, drawerClass: string): JSX.Element {\n const drawerButtonTextClass = classnames(\n 'drawer__buttontext',\n this.props.toggleButtonClassName ? this.props.toggleButtonClassName : ''\n );\n const headingDrawerClass = `${drawerClass}-heading`;\n const descriptionDrawerClass = `${drawerClass}-description`;\n return (\n <>\n

{this.props.moduleHeadingText}

\n {this.props.moduleDescriptionText}\n {this._generateGlyphMarkup('drawer__glyph__end', isCollapseState)}\n \n );\n }\n\n private _generateGlyphMarkup(location: string, isCollapseState: boolean): JSX.Element {\n let glyphClass = isCollapseState ? this._drawerOpenGlyph : this._drawerCloseGlyph;\n glyphClass = `${glyphClass} ${location}`;\n return ;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IQuickOrderGridState } from './utilities';\n\n/**\n * Interface quick order grid form props.\n */\nexport interface IQuickOrderGridFormProps {\n isAddtoListDisabled: boolean | undefined;\n productTextInput: React.RefObject;\n quantityTextInput: React.RefObject;\n maxChars: number;\n maxQuantity?: number;\n moduleClassName: string;\n ariaLabelQuantity: string;\n ariaLabelProduct: string;\n ariaLabelAddtoCart: string;\n quickOrderGridState: IQuickOrderGridState;\n handleInputChange(query: string): void;\n handleQuantityChange(query: string): void;\n handleAddProductListClick(): Promise;\n}\n\n/**\n * Interface quick order grid form view props.\n */\nexport interface IQuickOrderGridFormViewProps {\n product: React.ReactNode;\n quantity: React.ReactNode;\n addToListBtn: React.ReactNode;\n userMessage?: React.ReactNode;\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Input change value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleInputChange(event.target.value || '');\n};\n\n/**\n * On Quantity Change functionality.\n * @param handleQuantityChange -Quantity change function.\n * @returns Quantity change value.\n */\nconst onQuantityChangeFunction = (handleQuantityChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleQuantityChange(event.target.value || '');\n};\n\n/**\n * Quick order grid form component.\n * @param props -Component form props.\n * @returns Quick order gridp view props..\n */\nexport const QuickOrderGridFormComponent = (props: IQuickOrderGridFormProps): IQuickOrderGridFormViewProps => {\n const {\n moduleClassName,\n productTextInput,\n quantityTextInput,\n quickOrderGridState,\n maxChars,\n maxQuantity,\n isAddtoListDisabled,\n ariaLabelQuantity,\n ariaLabelProduct,\n ariaLabelAddtoCart,\n handleQuantityChange,\n handleInputChange,\n handleAddProductListClick\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const onQuantityInputChange = onQuantityChangeFunction(handleQuantityChange);\n\n const productNode = (\n
\n

\n {ariaLabelProduct}\n

\n \n
\n );\n\n const quantityNode = (\n
\n

\n {ariaLabelQuantity}\n

\n \n
\n );\n\n const addToListNode = (\n
\n \n {ariaLabelAddtoCart}\n \n
\n );\n\n const userMessageNode = quickOrderGridState.stateMessage ? (\n \n \n {quickOrderGridState.stateMessage.messageText}\n \n ) : (\n undefined\n );\n\n return {\n product: productNode,\n addToListBtn: addToListNode,\n quantity: quantityNode,\n userMessage: userMessageNode\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { QuickOrderTemplateLine } from '@msdyn365-commerce-modules/retail-actions';\nimport { observable } from 'mobx';\n\n/**\n * Represents a product for quick order grid.\n */\nexport class QuickOrderGridProduct {\n @observable\n public isSelected: boolean;\n\n public readonly productLine: QuickOrderTemplateLine;\n\n public constructor(productLine: QuickOrderTemplateLine) {\n this.productLine = productLine;\n this.isSelected = false;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\n/**\n * Interface for quick order grid table header resources.\n */\nexport interface IQuickOrderGridTableHeaderResources {\n quickOrderGridProductNumberText: string;\n quickOrderGridProductText: string;\n quickOrderGridUnitPriceText: string;\n quickOrderGridUnitOfMeasureText: string;\n quickOrderGridQuantityText: string;\n quickOrderGridActionsText: string;\n}\n\n/**\n * Interface for quick order grid table props.\n */\nexport interface IQuickOrderGridTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isMobile: boolean;\n resources: IQuickOrderGridTableHeaderResources;\n}\n\n/**\n * Interface for quick order grid table header component.\n */\nexport interface IQuickOrderGridTableHeaderComponent extends IComponent {}\n\n/**\n * Get the quick order grid header cells for desktop.\n * @param props -- The quick order grid table header props.\n * @returns The list of cells for quick order grid header component in desktop version.\n */\nconst QuickOrderGridDesktopHeaderCellsComponent: React.FC = (props: IQuickOrderGridTableHeaderProps) => {\n const { resources } = props;\n const columnWithNumberClassName = `${props.className}__row__column-with-number`;\n return (\n <>\n \n \n \n {resources.quickOrderGridProductNumberText}\n {resources.quickOrderGridProductText}\n {resources.quickOrderGridUnitPriceText}\n {resources.quickOrderGridUnitOfMeasureText}\n {resources.quickOrderGridQuantityText}\n {resources.quickOrderGridActionsText}\n \n );\n};\n\n/**\n * Get the quick order grid header cells for mobile.\n * @param props -- The quick order grid table header props.\n * @returns The quick order grid header component in desktop version.\n */\nconst QuickOrderGridMobileHeaderCellsComponent: React.FC = (props: IQuickOrderGridTableHeaderProps) => {\n const { resources } = props;\n return (\n <>\n \n {resources.quickOrderGridProductNumberText}\n \n \n );\n};\n\n/**\n * Quick order table header component.\n * @param props - Configuration of the component.\n * @returns React node with the header.\n */\nexport const QuickOrderGridTableHeaderComponent: React.FC = (props: IQuickOrderGridTableHeaderProps) => {\n const rowClassName = `${props.className}__row`;\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = ;\n } else {\n headerCells = ;\n }\n\n return (\n \n {headerCells}\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 { PriceComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, { IComponentProps, ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductListLine, ProductPrice } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IncrementalQuantity, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { QuickOrderGridProduct } from '../../quick-order-grid-product';\nimport { IQuickOrderGridRowCallbacks } from '../../utilities';\n\n/**\n * Data required to render each quick order grid row.\n */\nexport interface IQuickOrderGridTableRowData {\n product: QuickOrderGridProduct;\n}\n\n/**\n * Resources for quick order grid table rows.\n */\nexport interface IQuickOrderGridTableRowResources {\n quickOrderGridQuantityMobileText: string;\n quickOrderGridProductDimensionsSeparator: string;\n quickOrderGridViewDetailsButtonText: string;\n quickOrderGridViewDetailsButtonAriaLabel: string;\n quickOrderGridRemoveItemButtonAriaLabel: string;\n quickOrderGridInputQuantityAriaLabel: string;\n quickOrderGridDecrementButtonAriaLabel: string;\n quickOrderGridIncrementButtonAriaLabel: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n}\n\n/**\n * Interface for quick order grid table props.\n */\nexport interface IQuickOrderGridTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n productListLine: ProductListLine;\n price?: ProductPrice;\n moduleId: string;\n moduleTypeName: string;\n quantity: number;\n imageSettings?: IImageSettings;\n isMobile: boolean;\n resources: IQuickOrderGridTableRowResources;\n index: number;\n callbacks: IQuickOrderGridRowCallbacks;\n}\n\n/**\n * The default image settings for quick order grid table row.\n */\nconst defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=80&h=80&m=6', w: 0, h: 0 },\n lg: { q: 'w=147&h=147&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n};\n\n/**\n * Renders product image for quick order grid row.\n * @param props - Quick order table row props.\n * @returns React element.\n */\nconst QuickOrderGridTableRowProductImageComponent: React.FC = (props: IQuickOrderGridTableRowProps) => {\n const product = props.data.product.productLine.fullProduct?.ProductDetails;\n const fallbackImageUrl = getFallbackImageUrl(product?.ItemId, props.context.actionContext.requestContext.apiSettings);\n\n const containerClassName = `${props.className}__product-image-container`;\n\n return (\n
\n \n
\n );\n};\n\nlet setShowPreviousActions: React.Dispatch> | undefined;\n\n/**\n * Renders product price.\n * @param props - Props for price component.\n * @returns React element.\n */\nconst renderProductPrice = (props: IQuickOrderGridTableRowProps): JSX.Element | null => {\n const { context, moduleId, moduleTypeName, resources } = props;\n const price = props.price;\n\n if (price) {\n return (\n \n );\n }\n return null;\n};\n\n/**\n * Renders product price.\n * @param props - Props for price component.\n * @returns React element.\n */\nconst renderUnitOfMeasure = (props: IQuickOrderGridTableRowProps): JSX.Element | null => {\n const price = props.price;\n\n if (price) {\n return (\n
\n {StringExtensions.isNullOrEmpty(props.productListLine.UnitOfMeasure) || price.UnitOfMeasure}\n
\n );\n }\n return null;\n};\n\n/**\n * On Change function.\n * @param onChangeQuantity -On change quantity function.\n * @param itemKey -String.\n * @param props -Order template line props.\n * @returns Set change quantity.\n */\nconst onChangeHandler = (\n onChangeQuantity: (\n orderTemplateLineId: string | undefined,\n quantity: number,\n props?: IQuickOrderGridTableRowProps | undefined\n ) => boolean,\n itemKey: string | undefined,\n props: IQuickOrderGridTableRowProps\n) => (newValue: number) => {\n onChangeQuantity(itemKey, newValue, props);\n return true;\n};\n\n/**\n * On Change function.\n * @param onRemoveItem -On change quantity function.\n * @param quickOrderGridProductKey -QuickOrderGridp Product.\n * @param props -Order template line props.\n * @returns Set change quantity.\n */\nconst onRemoveHandler = (\n onRemoveItem: (quickOrderGridProduct: QuickOrderGridProduct, props?: IQuickOrderGridTableRowProps | undefined) => void,\n quickOrderGridProductKey: QuickOrderGridProduct,\n props: IQuickOrderGridTableRowProps\n) => () => {\n onRemoveItem(quickOrderGridProductKey, props);\n};\n\n/**\n * Renders actions popup for the mobile view.\n * @param props - Configuration for popup.\n * @returns A react node with actions..\n */\nconst QuickOrderGridExtraActionsPopupComponent: React.FC = (\n props: IQuickOrderGridTableRowProps\n): JSX.Element | null => {\n const {\n resources: { quickOrderGridViewDetailsButtonAriaLabel, quickOrderGridViewDetailsButtonText }\n } = props;\n const product = props.data.product.productLine.fullProduct?.ProductDetails;\n const [shouldShowActions, setShowActions] = useState(false);\n let productUrl = '';\n if (product === undefined) {\n return null;\n }\n if (!StringExtensions.isNullOrWhitespace(product.Name) && !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\n productUrl = getProductPageUrlSync(product.Name!, product.RecordId, props.context.actionContext);\n }\n\n const onClickViewDetails = React.useCallback(() => {\n if (MsDyn365.isBrowser) {\n window.location.href = productUrl;\n }\n }, [productUrl]);\n\n const toggle = React.useCallback(() => {\n const shouldShowActionsNewValue = !shouldShowActions;\n if (shouldShowActionsNewValue) {\n if (setShowPreviousActions) {\n setShowPreviousActions(false);\n }\n setShowActions(shouldShowActionsNewValue);\n setShowPreviousActions = setShowActions;\n } else {\n setShowPreviousActions = undefined;\n setShowActions(shouldShowActionsNewValue);\n }\n }, [shouldShowActions, setShowActions]);\n\n if (StringExtensions.isNullOrWhitespace(productUrl)) {\n return null;\n }\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n\n return (\n
\n \n \n {props.resources.quickOrderGridRemoveItemButtonAriaLabel}\n \n
\n )}\n \n );\n};\n\n/**\n * Renders quick order grid table rows for desktop view.\n * @param props - Configuration for the rows.\n * @returns A react node with a list of quick order grid rows for desktop view.\n */\nexport const QuickOrderGridDesktopTableRowCellComponent: React.FC = (props: IQuickOrderGridTableRowProps) => {\n const product = props.data.product.productLine.fullProduct?.ProductDetails;\n const productListLine = props.data.product.productLine.productListLine;\n const { quantity } = props;\n const columnWithNumberClassName = `${props.className}__column-with-number`;\n if (product !== undefined) {\n let productUrl = '';\n if (!StringExtensions.isNullOrWhitespace(product.Name) && !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\n productUrl = getProductPageUrlSync(product.Name!, product.RecordId, props.context.actionContext);\n }\n\n return (\n <>\n \n \n \n {product.ItemId}\n \n
\n \n {product.Name}\n \n \n {product.Dimensions?.map(dimension => dimension.DimensionValue?.Value)\n .filter(dimensionValue => !StringExtensions.isNullOrWhitespace(dimensionValue))\n .join(props.resources.quickOrderGridProductDimensionsSeparator)}\n \n
\n \n {renderProductPrice(props)}\n {renderUnitOfMeasure(props)}\n \n \n \n \n \n \n \n );\n }\n\n return null;\n};\n\n/**\n * Renders rows for mobile view.\n * @param props - Configuration for the rows.\n * @returns A react node with a list of quick order grid rows for mobile view.\n */\nexport const QuickOrderGridMobileTableRowCellComponent: React.FC = (props: IQuickOrderGridTableRowProps) => {\n const product = props.data.product.productLine.fullProduct?.ProductDetails;\n const productListLine = props.data.product.productLine.productListLine;\n const { quantity } = props;\n if (product !== undefined) {\n return (\n <>\n \n \n \n \n
\n {product.RecordId}\n \n \n \n
\n \n \n \n \n \n );\n }\n return null;\n};\n\n/**\n * Quick order table row component.\n * @param props - Configuration of the component.\n * @returns React node for the row.\n */\nexport const QuickOrderGridTableRowComponent: React.FC = (props: IQuickOrderGridTableRowProps) => {\n const rowClassName = `${props.className}__row`;\n const isMobileView = isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\n let headerCells: JSX.Element;\n if (isMobileView) {\n headerCells = ;\n } else {\n headerCells = ;\n }\n\n return (\n \n {headerCells}\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 MsDyn365, { IComponent, IComponentProps, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport React from 'react';\n\nimport { QuickOrderGridProduct } from '../quick-order-grid-product';\nimport { IQuickOrderGridRowCallbacks } from '../utilities';\nimport {\n IQuickOrderGridTableHeaderResources,\n IQuickOrderGridTableRowResources,\n QuickOrderGridTableHeaderComponent,\n QuickOrderGridTableRowComponent\n} from './components';\n\n/**\n * Quick order table data interface.\n */\ninterface IQuickOrderGridTableData {\n quickOrderGridProducts: QuickOrderGridProduct[];\n}\n\n/**\n * Quick order table resources.\n */\nexport interface IQuickOrderGridTableResources extends IQuickOrderGridTableHeaderResources, IQuickOrderGridTableRowResources {}\n\n/**\n * Quick order table props.\n */\nexport interface IQuickOrderGridTableProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n moduleId: string;\n moduleTypeName: string;\n\n resources: IQuickOrderGridTableResources;\n isMobileView: boolean;\n imageSettings?: IImageSettings;\n callBacks: IQuickOrderGridRowCallbacks;\n}\n\n/**\n * Quick order table component.\n */\nexport interface IQuickOrderGridTableComponent extends IComponent {}\n\n/**\n * The quick order table.\n * @param props -- The quick order table props.\n * @returns The quick order table element.\n */\nexport const QuickOrderGridTableComponent: React.FC = (props: IQuickOrderGridTableProps) => {\n const [isMobile, setIsMobile] = React.useState(props.isMobileView);\n const quickOrderGridProducts = props.data.quickOrderGridProducts;\n\n /**\n * Update the view port.\n */\n const updateViewport = () => {\n setIsMobile(props.isMobileView);\n };\n\n if (MsDyn365.isBrowser) {\n window.addEventListener('resize', updateViewport);\n }\n\n const headerClassName = `${props.className}__header`;\n const rowClassName = `${props.className}__row`;\n\n return (\n \n \n {quickOrderGridProducts.map((quickOrderProduct, index) => {\n const price = quickOrderProduct.productLine.fullProduct?.ProductPrice;\n const quantity = quickOrderProduct.productLine.productListLine.Quantity!;\n return (\n \n );\n })}\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 {\n getProductConfigure,\n IProductDimensionCallbacks,\n IProductDimensionConfigureResources,\n IProductDimensionConfigureViewProps\n} from '@msdyn365-commerce/components';\nimport {\n ProductDimension,\n ProductDimensionType,\n ProductDimensionValue,\n ProductListsDataActions,\n ProductListType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n addItemToProductListAction,\n AddItemToProductListInput,\n ArrayExtensions,\n createProductList,\n CreateProductListInput,\n FinitePromiseQueue,\n FinitePromiseQueueError,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getScanResult,\n GetScanResultInput,\n getSelectedVariant,\n IDimensionForSelectedVariant,\n IPromiseQueue,\n QuickOrderTemplate,\n QuickOrderTemplateLine,\n SelectedVariantInput,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n Heading,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { debounce } from 'lodash';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { ActiveProductListInput } from './actions';\nimport {\n IQuickOrderGridActionsProps,\n IQuickOrderGridActionsViewProps,\n IQuickOrderGridRowCallbacks,\n IQuickOrderGridState,\n QuickOrderGridActionsView,\n QuickOrderGridDrawer,\n QuickOrderGridFormComponent,\n QuickOrderGridProduct,\n QuickOrderGridTableComponent\n} from './components';\nimport { IQuickOrderGridData } from './quick-order-grid.data';\nimport { IQuickOrderGridProps, IQuickOrderGridResources } from './quick-order-grid.props.autogenerated';\n\n/**\n * QuickOrder Grid View props.\n */\nexport interface IQuickOrderGridViewProps extends IQuickOrderGridProps {\n header: JSX.Element;\n actions?: INodeProps;\n isB2bCustomer?: boolean;\n isQuickOrderGridFormExpanded: boolean;\n contentProps: INodeProps;\n drawer: INodeProps;\n loading?: React.ReactNode;\n quickOrderGridForm: INodeProps;\n quickOrderGridFormProductContent: INodeProps;\n quickOrderGridFormMsgContent: INodeProps;\n quickOrderGridProps: IModuleProps;\n form: React.ReactNode;\n configure?: IProductDimensionConfigureViewProps;\n isMobileView: boolean;\n container?: JSX.Element;\n orderActions?: IQuickOrderGridActionsViewProps | null;\n bulkPurchase?: React.ReactNode;\n}\n\n/**\n * QuickOrder Grid View port.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * QuickOrderGrid component.\n * @extends {React.PureComponent>}\n */\nclass QuickOrderGrid extends React.PureComponent, IQuickOrderGridState> {\n private readonly _productTextInput: React.RefObject;\n\n private readonly _quantityInput: React.RefObject;\n\n private readonly _waitTime: number = 500;\n\n private readonly _dimensionUpdateQueueMaxLength: number = 2;\n\n private readonly _errorCssClass: string = 'danger';\n\n private readonly _errorCssGlyphClass: string = 'fas fa-exclamation-triangle';\n\n private readonly _quickOrderGridFormClass: string;\n\n private readonly _quickOrderGridFormProductContent: string;\n\n private readonly _quickOrderGridFormMsgContent: string;\n\n private readonly _telemetryContent: ITelemetryContent;\n\n private readonly _dimensionUpdateQueue: IPromiseQueue = new FinitePromiseQueue(this._dimensionUpdateQueueMaxLength);\n\n private _dimensions: { [id: number]: string } = {};\n\n private readonly _cssClassNameConfigure: string = 'ms-quick-order_grid__content-form-main';\n\n private readonly _className: string = 'ms-quick-order-grid';\n\n // @ts-expect-error: Debouce needs to be used as type.\n private _cancellabelDebounce: debounce;\n\n private readonly _quickOrderGridCallbacks: IProductDimensionCallbacks = {\n /**\n * Get Dropdown name.\n * @param selectedDimensionId - Dimension type.\n * @param selectedDimensionValueId - Resources.\n * @returns Dropdown name.\n */\n dimensionSelectedAsync: async (selectedDimensionId: number, selectedDimensionValueId: string): Promise => {\n this._dimensions[selectedDimensionId] = selectedDimensionValueId;\n return this._dimensionUpdateQueue\n .enqueue(async () => {\n return this._updateDimensions();\n })\n .catch((error: string) => {\n // Ignore discarded processes.\n if (error !== FinitePromiseQueueError.ProcessWasDiscardedFromTheQueue) {\n throw new Error(error);\n }\n });\n },\n\n /**\n * Get Dropdown name.\n * @param dimensionType - Dimension type.\n * @param resources - Resources.\n * @returns Dropdown name.\n */\n getDropdownName: (dimensionType: number, resources: IProductDimensionConfigureResources): string => {\n return this._getDropdownName(dimensionType, resources);\n },\n\n /**\n * Method to call on dimension change.\n * @param isUpdatingDimension - Flag to update dimension.\n */\n changeUpdatingDimension: (isUpdatingDimension: boolean): void => {\n this.setState({ isUpdatingDimension });\n }\n };\n\n private readonly _quickOrderGridRowCallbacks: IQuickOrderGridRowCallbacks = {\n /**\n * Method to call remove button.\n * @param line - Grid row product.\n */\n onRemoveItem: (line: QuickOrderGridProduct): void => {\n this._removeItemRowFromTable(line.productLine);\n },\n\n /**\n * Method to call on change quantity button.\n * @param productListLineId - Grid row product list line id.\n * @param quantity - Product quantity.\n * @returns - Falg to get confirmation for action.\n */\n onChangeQuantity: (productListLineId: string | undefined, quantity: number): boolean => {\n return this._changeRowQuantity(productListLineId, quantity);\n }\n };\n\n public constructor(props: IQuickOrderGridProps) {\n super(props);\n this._productTextInput = React.createRef();\n this._quantityInput = React.createRef();\n\n this._telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.state = {\n isQuickOrderGridFormExpanded: false,\n quantity: 1,\n productResponse: undefined,\n productDimensions: undefined,\n productDimensionErrorState: {\n configureErrors: {}\n },\n isMobile: this.isMobile,\n products: [],\n isUpdatingDimension: false,\n productListId: ''\n };\n\n this._quickOrderGridFormClass = 'ms-quick-order-grid__content-form';\n this._quickOrderGridFormProductContent = 'ms-quick-order-grid__content-form-main';\n this._quickOrderGridFormMsgContent = 'ms-quick-order-grid__content-form-msg';\n }\n\n @computed public get isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public render(): JSX.Element | null {\n const { data } = this.props;\n if (!data.customerInformation.result) {\n return null;\n }\n const quickOrderTemplate = data.quickOrderTemplate;\n\n if (quickOrderTemplate?.result !== undefined) {\n this.setState({\n products: quickOrderTemplate.result.quickOrderTemplateLines,\n productListId: quickOrderTemplate.result.productList.Id\n });\n }\n const { className = '', maxQuantity } = this.props.config;\n const customerInfo = this.props.data.customerInformation.result;\n const {\n quickOrderGridModuleHeading,\n quickOrderGridModuleDescription,\n quickOrderGridAddtogrid,\n quickOrderGridProductQuantityInputLabel,\n quickOrderGridProductInputLabel,\n quickOrderGridProductDimensionTypeColor,\n quickOrderGridProductDimensionTypeConfiguration,\n quickOrderGridSelectDimensionFormatString,\n quickOrderGridProductDimensionTypeSize,\n quickOrderGridProductDimensionTypeStyle,\n quickOrderGridProductDimensionTypeAmount,\n quickOrderGridModulePageHeading\n } = this.props.resources;\n\n const productConfigureResources: IProductDimensionConfigureResources = {\n selectDimensionFormatString: quickOrderGridSelectDimensionFormatString,\n productDimensionTypeColor: quickOrderGridProductDimensionTypeColor,\n productDimensionTypeConfiguration: quickOrderGridProductDimensionTypeConfiguration,\n productDimensionTypeSize: quickOrderGridProductDimensionTypeSize,\n productDimensionTypeStyle: quickOrderGridProductDimensionTypeStyle,\n productDimensionTypeAmount: quickOrderGridProductDimensionTypeAmount\n };\n\n const { isQuickOrderGridFormExpanded, productDimensionErrorState, productResponse, productDimensions } = this.state;\n\n const headerClassName = `${this._className}__header`;\n\n const header = (\n
\n \n
\n );\n\n const viewProps: IQuickOrderGridViewProps = {\n ...(this.props as IQuickOrderGridProps),\n\n quickOrderGridProps: { className: classnames('ms-quick-order-grid', className), moduleProps: this.props },\n contentProps: { className: 'ms-quick-order-grid__content' },\n isB2bCustomer: customerInfo?.IsB2b,\n header,\n actions: {\n className: `${this._className}-action-bar`,\n tag: 'div'\n },\n drawer: {\n tag: QuickOrderGridDrawer,\n className: `${this._className}__drawer`,\n collapseProps: { isOpen: this.state.isQuickOrderGridFormExpanded },\n moduleHeadingText: quickOrderGridModuleHeading,\n moduleDescriptionText: quickOrderGridModuleDescription,\n requestContext: this.props.context.request,\n telemetryContent: this._telemetryContent\n },\n bulkPurchase: this._renderBulkPurchase(),\n quickOrderGridForm: {\n className: `${this._quickOrderGridFormClass} ${isQuickOrderGridFormExpanded ? 'qo-show' : 'qo-hide'}`\n },\n quickOrderGridFormProductContent: {\n className: this._quickOrderGridFormProductContent\n },\n quickOrderGridFormMsgContent: {\n className: this._quickOrderGridFormMsgContent\n },\n form: QuickOrderGridFormComponent({\n productTextInput: this._productTextInput,\n quantityTextInput: this._quantityInput,\n isAddtoListDisabled: !productResponse,\n ariaLabelAddtoCart: quickOrderGridAddtogrid,\n ariaLabelProduct: quickOrderGridProductInputLabel,\n ariaLabelQuantity: quickOrderGridProductQuantityInputLabel,\n maxChars: 50,\n maxQuantity,\n moduleClassName: this._className,\n quickOrderGridState: this.state,\n handleInputChange: this._handleInputChange,\n handleQuantityChange: this._handleQuantityChange,\n handleAddProductListClick: this._addItemToProductListLine\n }),\n configure:\n productResponse && productDimensions\n ? getProductConfigure(\n this._cssClassNameConfigure,\n this.props.context,\n this.props.friendlyName,\n this.props.telemetry,\n quickOrderGridSelectDimensionFormatString,\n productConfigureResources,\n this._quickOrderGridCallbacks,\n productResponse,\n productDimensions,\n productDimensionErrorState\n )\n : undefined,\n isQuickOrderGridFormExpanded: this.state.isQuickOrderGridFormExpanded,\n isMobileView: this.state.isMobile,\n container: ArrayExtensions.hasElements(this.state.products) ? this._renderListContainer() : undefined,\n orderActions: this._renderQuickOrderGridActions(quickOrderTemplate?.result)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderQuickOrderGridActions(quickOrderTemplate: QuickOrderTemplate | undefined): IQuickOrderGridActionsViewProps | null {\n const { typeName, context, resources } = this.props;\n const {\n quickOrderGridDeleteButtonText,\n quickOrderGridBuySelectedButtonText,\n quickOrderGridBuySelectedButtonAriaLabel,\n quickOrderGridBuySelectedAddingToCartErrorNotificationTitle,\n quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel,\n quickOrderGridGoToCartText,\n quickOrderGridDialogCloseText,\n quickOrderGridSingleItemText,\n quickOrderGridMultiLineItemFormatText,\n quickOrderGridMultiLinesFormatText,\n quickOrderGridHeaderMessageText,\n addedQuantityText,\n originalPriceText,\n currentPriceText,\n freePriceText\n } = resources;\n if (ArrayExtensions.hasElements(quickOrderTemplate?.quickOrderTemplateLines)) {\n const quickOrderGridActions: IQuickOrderGridActionsProps = {\n data: { quickOrderTemplate },\n moduleClassName: this._className,\n id: 'quick-order-grid',\n typeName,\n context,\n handlers: {\n removeProductList: this._removeProductList\n },\n resources: {\n quickOrderGridDeleteButtonText,\n quickOrderGridBuySelectedButtonText,\n quickOrderGridBuySelectedButtonAriaLabel,\n quickOrderGridBuySelectedAddingToCartErrorNotificationTitle,\n quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel,\n quickOrderGridGoToCartText,\n quickOrderGridDialogCloseText,\n quickOrderGridSingleItemText,\n quickOrderGridMultiLineItemFormatText,\n quickOrderGridMultiLinesFormatText,\n quickOrderGridHeaderMessageText,\n addedQuantityText,\n originalPriceText,\n currentPriceText,\n freePriceText\n }\n };\n\n return QuickOrderGridActionsView(quickOrderGridActions);\n }\n return null;\n }\n\n /**\n * Renders bulk purchase module.\n * @returns Bulk purchase module react node.\n */\n private _renderBulkPurchase(): React.ReactNode {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Temporary switch for the feature which is under development.\n if (!this.props.context.app.config.isBulkPurchaseEnabled) {\n return null;\n }\n\n if (!ArrayExtensions.hasElements(this.props.slots.bulkPurchaseSlots)) {\n return null;\n }\n\n const containerClass = `${this._className}__bulk-purchase`;\n return (\n
\n {React.cloneElement(this.props.slots.bulkPurchaseSlots[0] as React.ReactElement, {\n productDimensions: this.state.productDimensions\n })}\n
\n );\n }\n\n /**\n * Render list container.\n * @returns JSX element.\n */\n private _renderListContainer(): JSX.Element {\n const containerClass = `${this._className}__table-content`;\n return
{this._renderQuickOrderTable(this._className)}
;\n }\n\n /**\n * Initial the products on quick order.\n * @returns List of quick order products or undefined.\n */\n private _initQuickOrderGridProducts(): QuickOrderGridProduct[] {\n const products: QuickOrderTemplateLine[] = this.state.products;\n\n const quickOrderGridProduct: QuickOrderGridProduct[] = products.map((product: QuickOrderTemplateLine) => {\n return new QuickOrderGridProduct(product);\n });\n\n return ArrayExtensions.validValues(quickOrderGridProduct);\n }\n\n /**\n * Method to call on clear button.\n */\n private readonly _removeProductList = () => {\n const { context, data, telemetry, resources } = this.props;\n const { quickOrderTemplate } = data;\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && quickOrderTemplate && quickOrderTemplate.result) {\n ProductListsDataActions.deleteAsync({ callerContext: context.actionContext }, quickOrderTemplate.result.productList)\n .then(() => {\n window.location.reload();\n })\n .catch((error: string) => {\n telemetry.warning('[quick-order-grid] Unable to delete product list.');\n telemetry.error(error);\n this._updateStatusState(\n resources.quickOrderGridDeleteProductListFailedText,\n this._errorCssClass,\n this._errorCssGlyphClass,\n true\n );\n });\n } else {\n telemetry.warning('[quick-order-grid] Failed to delete product list. Product List was not found');\n }\n };\n\n /**\n * Initial the products on quick order.\n * @param className - Class name.\n * @returns JSX element.\n */\n private _renderQuickOrderTable(className: string): JSX.Element {\n const tableClassName = `${className}__table-list`;\n\n return (\n \n );\n }\n\n /**\n * Method to called on product input change.\n * @param query - Product inventory info.\n */\n private readonly _handleInputChange = (query: string): void => {\n const queryMinLength = 4;\n if (!query || query.length > queryMinLength) {\n this.setState({ quantity: 0, productDimensions: [], productResponse: undefined });\n this._updateStatusState('', '', '', false);\n }\n if (this._cancellabelDebounce) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call -- existing code.\n this._cancellabelDebounce.cancel();\n }\n\n const { telemetry, context } = this.props;\n const zeroNumber = 0;\n if (!StringExtensions.isNullOrEmpty(query)) {\n this._cancellabelDebounce = debounce(() => {\n getScanResult(\n new GetScanResultInput(\n context.actionContext.requestContext.apiSettings,\n query,\n context.actionContext.requestContext.apiSettings.channelId\n ),\n this.props.context.actionContext\n )\n .then(results => {\n this.setState({\n productResponse: results?.Product,\n productDimensions: results?.ProductDimensionFull,\n isQuickOrderGridFormExpanded: true\n });\n })\n .catch((error: Error) => {\n telemetry.exception(error);\n telemetry.debug('Unable to get scan results');\n });\n }, this._waitTime);\n\n setTimeout(() => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call -- Existing code.\n this._cancellabelDebounce();\n }, zeroNumber);\n this.setState({ isQuickOrderGridFormExpanded: true });\n } else {\n this.setState({ productResponse: undefined, isQuickOrderGridFormExpanded: true });\n }\n };\n\n /**\n * Method to called on quantity change.\n * @param value - Quantity value.\n */\n private readonly _handleQuantityChange = (value: string): void => {\n const currentValue = Number.parseInt(value, 10);\n const inputElement = this._quantityInput.current instanceof HTMLInputElement && this._quantityInput.current;\n const quantityChangeDebounceTimeout = 200;\n const minimumQuantity = 0;\n\n this.setState({ quantity: currentValue }, () => {\n debounce(() => {\n if (!Number.isNaN(this.state.quantity) && !(this.state.quantity < minimumQuantity) && inputElement) {\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\n inputElement.setAttribute('value', currentValue.toString());\n }\n }, quantityChangeDebounceTimeout)();\n });\n };\n\n /**\n * Method to get dropdwon name.\n * @param dimensionType - Dimension Type.\n * @param resources - String resources.\n * @returns Dropdwon label.\n */\n private readonly _getDropdownName = (dimensionType: number, resources: IProductDimensionConfigureResources): string => {\n const isGiftCard = this.state.productResponse?.IsGiftCard;\n\n switch (dimensionType) {\n case ProductDimensionType.Color: // ProductDimensionType.Color\n return resources.productDimensionTypeColor;\n case ProductDimensionType.Configuration: // ProductDimensionType.Configuration\n return resources.productDimensionTypeConfiguration;\n case ProductDimensionType.Size: // ProductDimensionType.Size\n return resources.productDimensionTypeSize;\n case ProductDimensionType.Style: // ProductDimensionType.Style\n return isGiftCard ? resources.productDimensionTypeAmount : resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n /**\n * Method to update dimension and product in UI.\n */\n private readonly _updateDimensions = async (): Promise => {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n const { productDimensions, productResponse } = this.state;\n const hasProductDimensions = ArrayExtensions.hasElements(productDimensions);\n if (!productResponse || !hasProductDimensions) {\n return;\n }\n\n const dimensionsToUpdate: { [id: number]: string } = { ...this._dimensions };\n this.setState({ isUpdatingDimension: true });\n\n // eslint-disable-next-line no-console -- Testing.\n console.log(this.state.isUpdatingDimension);\n\n // Step 1: Update state to indicate which dimensions are selected\n if (this.state.productDimensionErrorState.otherError) {\n // eslint-disable-next-line react/no-access-state-in-setstate -- existing code.\n const clearOtherErrorState = { ...this.state.productDimensionErrorState };\n clearOtherErrorState.otherError = undefined;\n this.setState({ productDimensionErrorState: clearOtherErrorState });\n }\n\n // Step 2: Clear any errors indicating the dimension wasn't selected\n for (const dimensionKey of Object.keys(dimensionsToUpdate)) {\n if (this.state.productDimensionErrorState.configureErrors[dimensionKey]) {\n // eslint-disable-next-line react/no-access-state-in-setstate -- existing code.\n const errorState = { ...this.state.productDimensionErrorState };\n errorState.configureErrors[dimensionKey] = undefined;\n\n this.setState({ productDimensionErrorState: errorState });\n }\n }\n\n // Step 3, Build the actually selected dimensions, prioritizing the information in state\n // over the information in data\n const mappedDimensions = productDimensions\n ?.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n this._updateDimensionValue(dimension, dimensionsToUpdate[dimension.DimensionTypeValue]) ?? dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => {\n return dimension.DimensionValue;\n });\n\n // Step 4. Use these dimensions hydrate the product. Wrap this in a promise\n // so that places like add to cart can await it\n // eslint-disable-next-line no-async-promise-executor -- existing code\n const selectedProduct = new Promise(async resolve => {\n const newProduct = await getSelectedVariant(\n new SelectedVariantInput(\n productResponse.MasterProductId ? productResponse.MasterProductId : productResponse.RecordId,\n channelId,\n mappedDimensions,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n if (newProduct) {\n await getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(\n newProduct.MasterProductId ? newProduct.MasterProductId : newProduct.RecordId,\n channelId,\n mappedDimensions,\n this.props.context.request\n ),\n actionContext\n );\n }\n\n resolve(newProduct);\n });\n\n const variantProduct = await selectedProduct;\n this.setState({ productResponse: variantProduct !== null ? variantProduct : undefined });\n };\n\n /**\n * Method to get updated dimension value.\n * @param productDimensionFull - Product dimension full.\n * @param newValueId - New Dimension value.\n * @returns Dimension Value.\n */\n private readonly _updateDimensionValue = (\n productDimensionFull: IDimensionForSelectedVariant,\n newValueId: string | undefined\n ): ProductDimensionValue | undefined => {\n if (newValueId && productDimensionFull.DimensionValues) {\n return productDimensionFull.DimensionValues.find(dimension => dimension.RecordId === +newValueId);\n }\n\n return undefined;\n };\n\n /**\n * Method to get dropdwon name.\n * @param dimensionTypeValue - Dimension Type.\n * @param resources - String resources.\n * @param isGiftCard - Flag to check if its a giftcard product.\n * @returns Dropdwon error label.\n */\n private readonly _getDimensionErrorString = (\n dimensionTypeValue: number,\n resources: IQuickOrderGridResources,\n isGiftCard?: boolean\n ): string => {\n const amountErrorMessage = resources.quickOrderGridproductDimensionTypeAmountErrorMessage;\n\n switch (dimensionTypeValue) {\n case ProductDimensionType.Color: // ProductDimensionType.Color\n return resources.quickOrderGridproductDimensionTypeColorErrorMessage;\n case ProductDimensionType.Configuration: // ProductDimensionType.Configuration\n return resources.quickOrderGridproductDimensionTypeConfigurationErrorMessage;\n case ProductDimensionType.Size: // ProductDimensionType.Size\n return resources.quickOrderGridproductDimensionTypeSizeErrorMessage;\n case ProductDimensionType.Style: // ProductDimensionType.Style\n return isGiftCard ? amountErrorMessage : resources.quickOrderGridproductDimensionTypeStyleErrorMessage;\n default:\n return '';\n }\n };\n\n /**\n * Initial the products on quick order.\n * @param productResponse - Simple Product.\n * @param quantity - Product Quantity.\n * @returns Flag to validate productlistline.\n */\n private readonly _validateCart = (productResponse: SimpleProduct, quantity: number): boolean => {\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- existing code\n const missingDimensions = productResponse.Dimensions?.filter(\n dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value)\n );\n const minimumQuantity = 0;\n if (ArrayExtensions.hasElements(missingDimensions)) {\n const userMessage = this._getConfigureErrors(missingDimensions, false);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- existing code\n if (this.state.productDimensionErrorState.configureErrors) {\n // eslint-disable-next-line react/no-access-state-in-setstate -- existing code\n const errorState = { ...this.state.productDimensionErrorState };\n errorState.configureErrors = userMessage;\n\n this.setState({ productDimensionErrorState: errorState });\n return false;\n }\n }\n\n if (quantity <= minimumQuantity) {\n const resources = this.props.resources;\n this._updateStatusState(resources.quickOrderGridWrongQuantityErrorMsg, this._errorCssClass, this._errorCssGlyphClass, true);\n return false;\n }\n return true;\n };\n\n /**\n * Initial the products on quick order.\n * @param result - Simple Product.\n * @param isGiftCard - Product Quantity.\n * @returns Flag to validate cart.\n */\n private _getConfigureErrors(\n result: ProductDimension[] | undefined,\n isGiftCard?: boolean\n ): { [configureId: string]: string | undefined } {\n if (!result) {\n return {};\n }\n const dimensions: { [configureId: string]: string | undefined } = {};\n const resources = this.props.resources;\n for (const dimension of result) {\n dimensions[dimension.DimensionTypeValue] = this._getDimensionErrorString(dimension.DimensionTypeValue, resources, isGiftCard);\n }\n return dimensions;\n }\n\n /**\n * Method to call on quantity change in row.\n * @param itemKey - Product Key.\n * @param quantity - Product quantity.\n * @returns Flag to update status.\n */\n private readonly _changeRowQuantity = (itemKey: string | undefined, quantity: number): boolean => {\n const { context, data, telemetry } = this.props;\n const { quickOrderTemplate } = data;\n if (quickOrderTemplate?.result) {\n const quickOrderTemplateLinesData = quickOrderTemplate.result.quickOrderTemplateLines;\n if (ArrayExtensions.hasElements(quickOrderTemplateLinesData)) {\n const orderLineIndex = quickOrderTemplateLinesData.findIndex(\n (lines: QuickOrderTemplateLine) => lines.productListLine.LineId === itemKey\n );\n const newProductListLine = { ...quickOrderTemplateLinesData[orderLineIndex] };\n if (quickOrderTemplateLinesData[orderLineIndex].productListLine.Quantity === quantity) {\n return true;\n }\n const previousQuantity = newProductListLine.productListLine.Quantity;\n newProductListLine.productListLine.Quantity = quantity;\n const { fullProduct, ...line } = newProductListLine;\n\n ProductListsDataActions.updateProductListLinesAsync(\n { callerContext: context.actionContext },\n quickOrderTemplate.result.productList.Id,\n [line.productListLine]\n )\n .then(list => {\n if (ArrayExtensions.hasElements(list)) {\n const newLine = list.find(lines => lines.LineId === itemKey);\n quickOrderTemplateLinesData[orderLineIndex].productListLine = newLine!;\n const updatedLines = [...quickOrderTemplateLinesData];\n updatedLines[orderLineIndex] = { fullProduct, productListLine: newLine! };\n const updatedProductList = { ...quickOrderTemplate.result, ProductListLines: updatedLines };\n context.actionContext.update(\n new ActiveProductListInput(context.actionContext.requestContext),\n updatedProductList\n );\n return true;\n }\n\n return false;\n })\n .catch((error: Error) => {\n telemetry.warning('[quick-order-grid] Unable to update product quantity.');\n telemetry.error(error.message);\n const userMessage = 'Failed to update quantity value.';\n newProductListLine.productListLine.Quantity = previousQuantity;\n this._updateStatusState(userMessage, this._errorCssClass, this._errorCssGlyphClass, true);\n return false;\n });\n }\n return false;\n }\n\n return false;\n };\n\n /**\n * Method to call on remove item from table.\n * @param line - Order Template Line.\n */\n private readonly _removeItemRowFromTable = (line: QuickOrderTemplateLine): void => {\n const { context, data, telemetry } = this.props;\n const { quickOrderTemplate } = data;\n\n if (quickOrderTemplate?.result) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken) {\n ProductListsDataActions.removeProductListLinesAsync(\n { callerContext: context.actionContext },\n line.productListLine.ProductListId!,\n [line.productListLine]\n )\n .then(() => {\n window.location.reload(false);\n })\n .catch((error: Error) => {\n telemetry.warning('[quick-order-grid] Unable remove item from product list grid');\n telemetry.error(error.message);\n });\n } else {\n telemetry.warning('[quick-order-grid] Unable remove items from product list grid user token was not found');\n }\n }\n };\n\n /**\n * Method to call on add item from form.\n */\n private readonly _addItemToProductListLine = async (): Promise => {\n const {\n context: { actionContext },\n resources,\n telemetry\n } = this.props;\n const {\n quickOrderGridAddedToGridSuccessMessage,\n quickOrderGridAddedToGridFailureMessage,\n quickOrderGridAddedToGridDuplicateError\n } = resources;\n const { productResponse, quantity, productListId } = this.state;\n let newProductList = '';\n\n this._updateStatusState('', '', '', false);\n\n if (productResponse !== undefined && this._validateCart(productResponse, quantity)) {\n if (StringExtensions.isNullOrWhitespace(productListId)) {\n newProductList = this._createProductList();\n } else {\n newProductList = this.state.productListId;\n }\n\n if (StringExtensions.isNullOrWhitespace(newProductList)) {\n this._updateStatusState(quickOrderGridAddedToGridFailureMessage, this._errorCssClass, this._errorCssGlyphClass, true);\n return;\n }\n\n const input = new AddItemToProductListInput(\n newProductList,\n productResponse.RecordId,\n quantity,\n productResponse.DefaultUnitOfMeasure ?? 'ea'\n );\n\n await addItemToProductListAction(input, actionContext)\n .then(result => {\n if (result.ProductListId) {\n this._updateStatusState(quickOrderGridAddedToGridSuccessMessage, 'success', 'fas fa-check', true);\n window.location.reload();\n this.setState({});\n }\n })\n .catch((error: Error) => {\n telemetry.debug('[quick-order-grid] Error trying to Update Grid Line from the quick order grid');\n if (error.name === 'Microsoft_Dynamics_Commerce_Runtime_DuplicateObject') {\n this._updateStatusState(\n quickOrderGridAddedToGridDuplicateError,\n this._errorCssClass,\n this._errorCssGlyphClass,\n true\n );\n } else {\n this._updateStatusState(\n quickOrderGridAddedToGridFailureMessage,\n this._errorCssClass,\n this._errorCssGlyphClass,\n true\n );\n }\n });\n }\n };\n\n /**\n * Method to create product list.\n * @returns - ProductListId.\n */\n private readonly _createProductList = (): string => {\n const {\n context: { actionContext },\n telemetry,\n resources\n } = this.props;\n const { productListId } = this.state;\n const { quickOrderGridAddedToGridFailureMessage } = resources;\n\n if (StringExtensions.isNullOrWhitespace(productListId)) {\n const input = new CreateProductListInput('', ProductListType.QuickOrder);\n\n createProductList(input, actionContext)\n .then(result => {\n if (!StringExtensions.isNullOrWhitespace(result.Id)) {\n this.setState({ productListId: result.Id });\n return result.Id;\n }\n return '';\n })\n .catch((error: Error) => {\n telemetry.debug('[quick-order-grid] Error on creating productlist from quick order grid');\n telemetry.error(error.message);\n this._updateStatusState(quickOrderGridAddedToGridFailureMessage, this._errorCssClass, this._errorCssGlyphClass, true);\n return '';\n });\n return '';\n }\n\n return productListId;\n };\n\n /**\n * Method to create product list.\n * @param messageText - Message Text.\n * @param statusCssString - Css class names.\n * @param messageGlyph - Glyph string.\n * @param isOpen - Flag to show.\n */\n private readonly _updateStatusState = (messageText: string, statusCssString: string, messageGlyph: string, isOpen: boolean): void => {\n this.setState({\n // eslint-disable-next-line react/no-unused-state -- Showing user message in Form component.\n stateMessage: {\n messageText,\n statusCssString,\n messageGlyph,\n isOpen\n }\n });\n };\n}\nexport default QuickOrderGrid;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionConfigureDropdownViewProps, IProductDimensionConfigureViewProps } from '@msdyn365-commerce/components';\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IQuickOrderGridFormViewProps } from './components';\nimport { IQuickOrderGridViewProps } from './quick-order-grid';\n\n/**\n * Render product dimension/configure dropdown.\n * @param dropdown -- Product dimension drop down.\n * @returns Dropdown.\n */\nconst renderConfigureDropdown = (dropdown: IProductDimensionConfigureDropdownViewProps): JSX.Element => {\n const { containerProps, labelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n {heading}\n {errors}\n {select}\n \n );\n};\n\n/**\n * Render product dimension/configure container.\n * @param configure -- Product dimension configuration.\n * @returns Container to have dimension dropdown.\n */\nconst renderConfigure = (configure?: IProductDimensionConfigureViewProps): JSX.Element | null => {\n if (configure !== undefined) {\n const { containerProps, dropdowns } = configure;\n\n return {dropdowns.map(renderConfigureDropdown)};\n }\n return null;\n};\n\n/**\n * Render product dimension/configure container.\n * @param form -- Form props.\n * @param isMobileView -- Flag to check mobile view.\n * @param quickOrderForm - Form component container.\n * @param quickOrderProductContent - Form product component.\n * @param quickOrderMessageContent - Form user message component.\n * @param configure - Product Dimension component.\n * @returns Jsx element of quick order form component.\n */\nconst renderForm = (\n form: IQuickOrderGridFormViewProps,\n isMobileView: boolean,\n quickOrderForm: INodeProps,\n quickOrderProductContent: INodeProps,\n quickOrderMessageContent: INodeProps,\n configure?: IProductDimensionConfigureViewProps\n) => {\n return isMobileView ? (\n \n \n {form.product}\n {renderConfigure(configure)}\n {form.quantity}\n {form.userMessage}\n {form.addToListBtn}\n \n \n ) : (\n \n {form.userMessage}\n \n {form.product}\n {renderConfigure(configure)}\n {form.quantity}\n {form.addToListBtn}\n \n \n );\n};\n\n/**\n * Retrieves current sort criteria.\n * @param props - QuickOrder Grid view props.\n * @returns - Render View.\n */\nconst quickOrderGridView: React.FC = props => {\n const {\n quickOrderGridProps,\n contentProps,\n form,\n quickOrderGridForm,\n drawer,\n configure,\n quickOrderGridFormProductContent,\n quickOrderGridFormMsgContent,\n isMobileView,\n header,\n container,\n actions,\n orderActions\n } = props;\n\n return (\n \n {header}\n {actions && (\n \n {orderActions?.addProductListToBag}\n {orderActions?.removeProductList}\n \n )}\n \n \n {renderForm(\n form as IQuickOrderGridFormViewProps,\n isMobileView,\n quickOrderGridForm,\n quickOrderGridFormProductContent,\n quickOrderGridFormMsgContent,\n configure\n )}\n {props.bulkPurchase}\n \n \n {container}\n \n );\n};\n\nexport default quickOrderGridView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RatingsSummary } from '@msdyn365-commerce/commerce-entities';\nimport { format, INodeProps, Progress } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IHistogramItemsProps {\n ratingsSummary: RatingsSummary;\n resources: IHistogramItemsResources;\n locale: string;\n onClick(stars: number): void;\n}\n\nexport interface IHistogramItemsResources {\n barItemAriaLabel: string;\n}\n\nexport interface IHistogramItemViewProps {\n starLabel: React.ReactElement;\n bar: React.ReactElement;\n percentage: React.ReactElement;\n buttonProps: INodeProps;\n}\n\n/**\n * CartLineItems component.\n */\n\nexport const HistogramItems = (props: IHistogramItemsProps): IHistogramItemViewProps[] => {\n const { ratingsSummary } = props;\n const totalRatingsCount: number = ratingsSummary.totalRatingsCount || 0;\n if (totalRatingsCount === 0) {\n return [];\n }\n return [\n renderItem(props, 5, ratingsSummary.star5Count, totalRatingsCount),\n renderItem(props, 4, ratingsSummary.star4Count, totalRatingsCount),\n renderItem(props, 3, ratingsSummary.star3Count, totalRatingsCount),\n renderItem(props, 2, ratingsSummary.star2Count, totalRatingsCount),\n renderItem(props, 1, ratingsSummary.star1Count, totalRatingsCount)\n ];\n};\n\nconst renderItem = (props: IHistogramItemsProps, stars: number, count?: number, totalCount?: number): IHistogramItemViewProps => {\n count = count || 0;\n totalCount = totalCount || 0;\n const percentage = totalCount === 0 ? 0 : count / totalCount;\n const formattedPercent = new Intl.NumberFormat(props.locale, { style: 'percent' }).format(percentage);\n const ariaLabel = format(props.resources.barItemAriaLabel, stars, formattedPercent);\n\n return {\n starLabel: (\n \n ),\n percentage: (\n \n ),\n bar: ,\n buttonProps: {\n tag: 'button',\n className: 'ms-ratings-histogram__item',\n onClick: () => {\n props.onClick(stars);\n }\n }\n };\n};\n\nexport const AverageRatingNumber: React.FC<{ summary: RatingsSummary }> = (props: { summary: RatingsSummary }) => {\n return (\n

\n {props.summary.averageRating}\n {` `}/ 5\n

\n );\n};\n\nexport const TotalReviews: React.FC<{ summary: RatingsSummary }> = (props: { summary: RatingsSummary }) => {\n return

{props.summary.totalRatingsCount}

;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { RatingComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createRatingsReviewsStateInput } from '../../actions/ratings-reviews-state-data-action';\nimport { AverageRatingNumber, HistogramItems, IHistogramItemViewProps, TotalReviews } from './component/components';\nimport { IRatingsHistogramData } from './ratings-histogram.data';\nimport { IRatingsHistogramProps } from './ratings-histogram.props.autogenerated';\n\nexport interface IRatingsHistogramViewProps extends IRatingsHistogramProps {\n className: string;\n histogramItems: IHistogramItemViewProps[];\n moduleProps: IModuleProps;\n heading: React.ReactNode;\n averageRating: React.ReactNode;\n averageNumber: React.ReactNode;\n totalReviews: React.ReactNode;\n histogramProps: INodeProps;\n ratingsSummaryProps: INodeProps;\n callbacks: IRatingsHistogramCallbacks;\n}\n\nexport interface IRatingsHistogramCallbacks {\n selectFilterBy(stars: number): void;\n}\n\n/**\n * RatingsHistogram component.\n * @extends {React.Component>}\n */\n@observer\nclass RatingsHistogram extends React.PureComponent> {\n constructor(props: IRatingsHistogramProps) {\n super(props);\n this.selectFilterBy = this.selectFilterBy.bind(this);\n }\n\n public render(): JSX.Element | null {\n const { resources } = this.props;\n const { className, heading } = this.props.config;\n const {\n ratingsSummary: { result: ratingsSummary }\n } = this.props.data;\n const ratingCount = ratingsSummary && ratingsSummary.totalRatingsCount ? `${ratingsSummary.totalRatingsCount}` : '0';\n\n const completeClass = classname('ms-ratings-histogram', className);\n const viewProps: IRatingsHistogramViewProps = {\n ...this.props,\n className: completeClass,\n callbacks: {\n selectFilterBy: this.selectFilterBy\n },\n moduleProps: {\n moduleProps: this.props,\n className: completeClass\n },\n histogramItems: ratingsSummary\n ? HistogramItems({\n ratingsSummary,\n resources: { ...resources },\n locale: this.props.context.request.locale,\n onClick: this.selectFilterBy\n })\n : [],\n averageRating: ratingsSummary && (\n \n ),\n averageNumber: ratingsSummary && ,\n totalReviews: ratingsSummary && ,\n ratingsSummaryProps: { className: 'ms-ratings-histogram__summary' },\n heading: heading && (\n \n ),\n histogramProps: { className: 'ms-ratings-histogram__histogram' }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public selectFilterBy(stars: number): void {\n const filterKey = `${stars}`;\n this.props.context.actionContext.update(createRatingsReviewsStateInput({ filterKey }), { filterKey });\n }\n}\n\nexport default RatingsHistogram;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHistogramItemViewProps } from './component/components';\nimport { IRatingsHistogramViewProps } from './ratings-histogram';\n\nconst RatingsHistogramView: React.FC = props => {\n const { heading, histogramItems, histogramProps, moduleProps } = props;\n\n return (\n \n {heading}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n \n );\n};\n\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n {props.percentage}\n \n );\n};\n\nexport default RatingsHistogramView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IWishlistItemDimension {\n key: string;\n className?: string;\n dimensionType: string;\n dimensionValue: string;\n}\n\nexport const WishlistItemDimension: React.FC = ({ key, className, dimensionType, dimensionValue }) => (\n
\n {dimensionType}:\n {dimensionValue}\n
\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 { IAny, ICoreContext, IGeneric, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport {\n CommerceListLine,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getFallbackImageUrl, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IWishlistItemActionMessageState } from '../wishlist-items';\nimport { WishlistItemDimension } from './wishlist-items-dimensions';\n\nexport interface IWishlistItemProps extends CommerceListLine {\n product: SimpleProduct;\n wishlistState: IWishlistItemActionMessageState;\n price?: ProductPrice;\n context: ICoreContext>;\n productUrl: string;\n imageSettings?: IImageSettings;\n removeFromWishlistText: string;\n isInStock: boolean;\n addToCartText: string;\n outOfStockText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n enableImageProductLink?: boolean;\n inventoryInformationLabel?: string;\n inventoryLabelClassName?: string;\n telemetryContent?: ITelemetryContent;\n handlers: {\n onAddToCart(product: SimpleProduct, itemKey: string): void;\n onRemoveItem(productId: number): void | undefined;\n onDismiss(): void;\n };\n resources: {\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n };\n}\n\nexport interface IWishlistItemViewProps {\n key: string;\n productImage: React.ReactNode;\n productLink: React.ReactNode;\n productDimensions?: React.ReactNode[];\n productPrice?: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n productStatusMessage?: React.ReactNode;\n productName?: React.ReactNode;\n productAriaLabel?: string;\n entireProductLink?: string;\n inventoryInformation?: React.ReactNode;\n productUnitOfMeasure?: React.ReactNode;\n}\n\nconst _addItemToCart = (props: IWishlistItemProps): void => {\n const { product, itemKey, handlers } = props;\n const { onAddToCart } = handlers;\n\n onAddToCart && product && itemKey && onAddToCart(product, itemKey);\n};\n\nconst _removeItemFromWishlist = (props: IWishlistItemProps): void => {\n const { onRemoveItem } = props.handlers;\n const { RecordId } = props.product;\n\n onRemoveItem && RecordId && onRemoveItem(RecordId);\n};\n\nconst WishListItemActions = {\n addToCart: _addItemToCart,\n removeItem: _removeItemFromWishlist\n};\n\nconst _renderAriaLabel = (props: IWishlistItemProps): string => {\n const { product, price, context, resources } = props;\n\n const { Name, Dimensions } = product;\n const { productDimensionTypeColor, productDimensionTypeSize, productDimensionTypeStyle } = resources;\n\n let formattedPrice = 'Free';\n let dimensions = null;\n\n if (price) {\n formattedPrice =\n price.BasePrice === 0 ? resources.freePriceText : context.cultureFormatter.formatCurrency(price.BasePrice!, price.CurrencyCode);\n }\n\n if (Dimensions) {\n dimensions = Dimensions.map(productDimension => {\n switch (productDimension.DimensionTypeValue) {\n case 1:\n return `${productDimensionTypeColor}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n case 3:\n return `${productDimensionTypeSize}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n case 4:\n return `${productDimensionTypeStyle}${productDimension.DimensionValue && productDimension.DimensionValue.Value}`;\n default:\n return '';\n }\n });\n }\n\n return `${Name} ${formattedPrice} ${(dimensions && dimensions.join('')) || ''}`;\n};\n\n/**\n * Renders a link to a product based on the given props.\n * @param input - Wishlist item props with the info about the product.\n * @returns React component with a link to a product.\n */\nconst renderProductLink = (input: IWishlistItemProps) => {\n const { productUrl, telemetryContent } = input;\n const { RecordId: recordId, Name: productName } = input.product;\n const payLoad = getPayloadObject('click', telemetryContent!, '', recordId.toString());\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n !StringExtensions.isNullOrWhitespace(productUrl) && (\n \n {productName}\n \n )\n );\n};\n\n/**\n * Renders a product name box.\n * @param productName - The text to display.\n * @returns React component with a name of a product.\n */\nconst renderProductName = (productName: string) => {\n return
{productName}
;\n};\n\n/**\n * Renders inventory information.\n * @param inventoryInformationLabel - The text to display.\n * @param inventoryLabelClassName - The component class name.\n * @returns React component.\n */\nconst renderInventoryInformationLabel = (inventoryInformationLabel: string | undefined, inventoryLabelClassName: string | undefined) => {\n const inventoryCssName = inventoryLabelClassName\n ? `ms-wishlist-items__inventory-label ${inventoryLabelClassName}`\n : 'ms-wishlist-items__inventory-label';\n return (\n !StringExtensions.isNullOrWhitespace(inventoryInformationLabel) && (\n {inventoryInformationLabel}\n )\n );\n};\n\n/**\n * Renders add to cart button.\n * @param input - Wishlist item props with the configuration.\n * @returns React component.\n */\nconst WishlistItemAddToCartButtonComponent = (input: IWishlistItemProps) => {\n const { isInStock, addToCartText, outOfStockText } = input;\n\n // Check if the product is service or not by product type.\n const isServiceItem = input.product.ItemTypeValue === ReleasedProductType.Service;\n\n const addItemAction = React.useCallback(() => {\n WishListItemActions.addToCart(input);\n }, [input]);\n\n return (\n \n {((isServiceItem || isInStock) && addToCartText) || outOfStockText}\n \n );\n};\n\n/**\n * Renders remove from wishlist button.\n * @param input - Wishlist item props with the configuration.\n * @returns React component.\n */\nconst WishlistItemRemoveFromWishlistButtonComponent = (input: IWishlistItemProps) => {\n const { removeFromWishlistText } = input;\n\n const removeItemAction = React.useCallback(() => {\n WishListItemActions.removeItem(input);\n }, [input]);\n\n return \n
{choiceSummary}
\n
\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
\n \n {refineMenu && isExpanded && renderRefiner(refineMenu)}\n \n {refineMenu && isExpanded && renderRefinerFooter(refineMenu, toggle, resources)}\n \n \n\n \n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n \n \n \n );\n};\n\n/**\n * Render Search result Modal.\n * @param modalProps - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createSearchResultModal = (\n modalProps: ISearchResultV2ModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown?: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\n/**\n * Render Refiner Mobile.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefinerMobile = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, refineMenuContainer, refinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render Search result Body.\n * @param props - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createModalBody = (\n props: ISearchResultV2ModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown?: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefinerMobile(refineMenu));\n }\n return null;\n};\n\n/**\n * Render Refiner.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, refineMenuContainer, refinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render Refiner Footer.\n * @param props - The Refine Menu view props.\n * @param handler - The Refine menu toggle function.\n * @param resources - Resources to get the done text and aria label.\n * @returns The JSX Element.\n */\nconst renderRefinerFooter = (\n props: IRefineMenuViewProps,\n handler: MouseEventHandler,\n resources: ISearchResultContainerV2Resources\n): JSX.Element | null => {\n const { refiners } = props;\n if (refiners) {\n return (\n \n \n {resources.doneText}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render sort by drop down.\n * @param props - The sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { sortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return {sortByDropDown};\n }\n return null;\n};\n\n/**\n * Render Title.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, titleContainer } = props;\n if (title) {\n return (\n \n \n {title.titlePrefix}\n {title.titleText}\n \n \n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPriceComponentResources } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Button, getTelemetryObject, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { MouseEventHandler, useEffect, useState } from 'react';\n\nimport { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport {\n ISearchResultContainerProps,\n ISearchResultContainerResources\n} from '../definition-extensions/search-result-container.ext.props.autogenerated';\nimport { ProductComponent } from './components/product.component';\n\n/**\n * DescriptionInterval.\n */\nenum DescriptionInterval {\n productDescriptionInterval = 14,\n productDescriptionIntervalRemainder0 = 0,\n productDescriptionIntervalRemainder9 = 9\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProductCards = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n return (\n \n {props.errorMessage}\n {props.products}\n \n );\n};\n\n/**\n * Returns the product inventory label.\n * @param channelInventoryConfigurationId - The channel configuration Id.\n * @param product - The product.\n * @returns The inventory label.\n */\nfunction getInventoryLabel(channelInventoryConfigurationId: number | undefined, product: ProductSearchResult): string | undefined {\n if (!channelInventoryConfigurationId || !ArrayExtensions.hasElements(product.AttributeValues)) {\n return undefined;\n }\n const inventoryAttribute = product.AttributeValues.find(attribute => attribute.RecordId === channelInventoryConfigurationId);\n if (inventoryAttribute) {\n return inventoryAttribute.TextValue;\n }\n return undefined;\n}\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @param product - The product item data.\n * @param index - The index of each product item.\n * @param isEnabledProductDescription - The flag for showing Product desription tile.\n * @returns The JSX Element.\n */\nconst renderProductCardsDescription = (\n props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>,\n product: ProductSearchResult,\n index: number,\n isEnabledProductDescription?: boolean\n): JSX.Element | null => {\n const { config, context, resources, productsDimensionAvailabilities } = props;\n const telemetryContent = getTelemetryObject(props.context.request.telemetryPageName!, props.friendlyName, props.telemetry);\n const breadCrumbType = props.context.app.config.breadcrumbType;\n const isAllowBack = props.config.allowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\n const classname = isEnabledProductDescription\n ? 'ms-product-search-result__item product__description'\n : 'ms-product-search-result__item';\n const quickviewslot = ArrayExtensions.hasElements(props.slots.quickview) ? props.slots.quickview[0] : undefined;\n const channelInventoryConfigurationId = props.data.products.result?.channelInventoryConfigurationId;\n const isPriceMinMaxFeatureState = props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n\n const productComparisonButton = ArrayExtensions.hasElements(props.slots.productComparisonButton)\n ? props.slots.productComparisonButton[0]\n : null;\n\n return (\n
  • \n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\n />\n
  • \n );\n};\n\n/**\n * Render Clear button for mobile viewport.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nconst renderProducts = (props: ISearchResultContainerViewProps & ISearchResultContainerProps<{}>): JSX.Element | null => {\n const products = props.data.listPageState.result?.activeProducts;\n if (!products || !ArrayExtensions.hasElements(products)) {\n return null;\n }\n const productDescriptionInterval: number = DescriptionInterval.productDescriptionInterval;\n const productDescriptionIntervalRemainder0: number = DescriptionInterval.productDescriptionIntervalRemainder0;\n const productDescriptionIntervalRemainder9: number = DescriptionInterval.productDescriptionIntervalRemainder9;\n return (\n \n {props.errorMessage}\n
      \n {products.map((product: ProductSearchResult, index: number) =>\n index % productDescriptionInterval === productDescriptionIntervalRemainder0 ||\n index % productDescriptionInterval === productDescriptionIntervalRemainder9\n ? renderProductCardsDescription(props, product, index, true)\n : renderProductCardsDescription(props, product, index, false)\n )}\n
    \n
    \n );\n};\n\n/**\n * Render Title Count.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return {title.titleCount};\n }\n return null;\n};\n\n/**\n * Render Category Hierarchy.\n * @param props - The category hierarchy view props.\n * @returns The JSX Element.\n */\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n \n {categoryHierarchyList.map((category, index) => (\n \n {category}\n {categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n \n ))}\n \n );\n }\n\n return null;\n};\n\n/**\n * Function to make filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nexport const configureStickyFilter = (isMobile: boolean, isStickyHeader: boolean): void => {\n // Get heights of cookie and promotion banners\n const defaultValue = 0;\n const defaultOffset = 28;\n const headerContainer: HTMLElement | null = document.querySelector('.ms-header');\n\n const headerHeight: number | undefined = headerContainer?.offsetHeight;\n const containerHeight: number = headerHeight ?? defaultOffset;\n const bannerHeights = isStickyHeader ? defaultValue : containerHeight;\n const headerElement = document.querySelector('header .lock-opaque');\n const defaultContainer = document.querySelector('header .default-container');\n const refinerElement = isMobile ? document.querySelector('.msc-sort-filter-wrapper') : document.querySelector('.ms-refiner-heading');\n if (refinerElement && headerElement && defaultContainer) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-Filter');\n refinerElement.setAttribute('style', `top: ${defaultContainer.clientHeight}px`);\n } else {\n refinerElement.classList.remove('lock-Filter');\n }\n } else if (refinerElement) {\n if (MsDyn365.isBrowser && document.documentElement.scrollTop > bannerHeights) {\n refinerElement.classList.add('lock-top');\n } else {\n refinerElement.classList.remove('lock-top');\n refinerElement.classList.remove('lock-Filter');\n refinerElement.removeAttribute('style');\n }\n }\n};\n\n/**\n * Function to setup filter sticky.\n * @param isMobile - The boolean prop.\n * @param isStickyHeader - The boolean prop.\n */\nfunction stickyFilterSetup(isMobile: boolean, isStickyHeader: boolean): void {\n window.addEventListener('scroll', () => {\n configureStickyFilter(isMobile, isStickyHeader);\n });\n configureStickyFilter(isMobile, isStickyHeader);\n}\n\n/**\n * Function to make filter sticky.\n * @param refinerRefernce - Ref prop for filter.\n * @param toggle - Toggle function for filter menu.\n */\nfunction useOutsideClick(refinerRefernce: React.RefObject, toggle: (event: Event) => void) {\n React.useEffect(() => {\n /**\n * Function to make filter sticky.\n * @param event - Event prop for filter.\n */\n function handleClickOutside(event: Event) {\n const element = document.querySelector('.ms-refine-filter__toggle_collapsed');\n if (refinerRefernce.current && !refinerRefernce.current.contains(event.target as Node) && !element) {\n toggle(event);\n }\n }\n if (MsDyn365.isBrowser) {\n document.addEventListener('click', handleClickOutside);\n }\n return () => {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('click', handleClickOutside);\n }\n };\n }, [refinerRefernce, toggle]);\n}\n\n/**\n * Render the category page items.\n * @param props - The view props.\n * @returns The search Result container module view.\n */\nconst SearchResultContainerView: React.FC> = props => {\n const {\n SearchResultContainer,\n pagination,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n FeatureSearchContainer,\n similarLookProduct,\n errorMessage,\n resources\n } = props;\n useEffect(() => {\n if (props.config.useStickyFilter && MsDyn365.isBrowser) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app context is generic\n stickyFilterSetup(props.isMobile, props.context.app.config.enableStickyHeader as boolean);\n }\n }, [props]);\n const [isExpanded, setIsExpanded] = useState(false);\n const toggle = () => {\n setIsExpanded(!isExpanded);\n };\n const wrapperRefiner = React.useRef(null);\n useOutsideClick(wrapperRefiner, toggle);\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {similarLookProduct ? null : (\n \n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {renderTitleCount(TitleViewProps)}\n \n )}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n {similarLookProduct}\n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n \n );\n }\n return (\n \n {similarLookProduct ? null : (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitle(TitleViewProps)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n \n )}\n {similarLookProduct}\n \n \n \n \n {resources.filterText}\n \n
    {choiceSummary}
    \n
    \n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
    \n
    \n {refineMenu && isExpanded && renderRefiner(refineMenu)}\n \n {refineMenu && isExpanded && renderRefinerFooter(refineMenu, toggle, resources)}\n \n
    \n\n \n {errorMessage}\n {props.config.enableProdutDescription ? renderProducts(props) : renderProductCards(props)}\n {pagination}\n \n
    \n
    \n );\n};\n\n/**\n * Render Search result Modal.\n * @param modalProps - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\n/**\n * Render Refiner Mobile.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefinerMobile = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render Search result Body.\n * @param props - The Search Result Modal view props.\n * @param refineMenu - The Refine Menu view props.\n * @param sortByDropDown - The Sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefinerMobile(refineMenu));\n }\n return null;\n};\n\n/**\n * Render Refiner.\n * @param props - The Refine Menu view props.\n * @returns The JSX Element.\n */\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render Refiner Footer.\n * @param props - The Refine Menu view props.\n * @param handler - The Refine menu toggle function.\n * @param resources - Resources to get the done text and aria label.\n * @returns The JSX Element.\n */\nconst renderRefinerFooter = (\n props: IRefineMenuViewProps,\n handler: MouseEventHandler,\n resources: ISearchResultContainerResources\n): JSX.Element | null => {\n const { refiners } = props;\n if (refiners) {\n return (\n \n \n {resources.doneText}\n \n \n );\n }\n return null;\n};\n\n/**\n * Render sort by drop down.\n * @param props - The sort by view props.\n * @param isRecoSearchPage - The recomandation search page flag.\n * @returns The JSX Element.\n */\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return {sortByDropDown};\n }\n return null;\n};\n\n/**\n * Render Title.\n * @param props - The title view props.\n * @returns The JSX Element.\n */\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n \n \n {title.titlePrefix}\n {title.titleText}\n \n \n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n"],"names":["cartLinesSortOrder","_renderStoreLocation","cartLine","props","FulfillmentStoreId","orgUnitName","_getOrgUnitName","orgUnitLocations","React","className","fulfillmentStoreId","length","foundLocation","find","orgUnitLocation","OrgUnitNumber","OrgUnitName","_assembleCartlines","cartlines","products","reactNodes","map","cartline","index","product","foundProductAvailability","foundProductDeliveryOption","isQuantityLimitsFeatureEnabled","getProductByProductIdAndWarehouse","ProductId","WarehouseId","cartState","getProductByProductId","productAvailabilites","productAvailability","_productAvailability$","ProductAvailableQuantity","productDeliveryOptions","deliveryOption","cartLineImage","cartLinesImages","item","lineId","LineId","cartLineImageUrl","ImageUrl","_foundProductAvailabi","push","_assembleNode","foundProductDeliveryOptions","_product$Behavior","imageSettings","gridSettings","id","typeName","context","resources","removeButtonText","removeItemClickHandler","availableQuantityInStock","isStockCheckEnabled","outOfStockThreshold","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","maxCartlineQuantity","Behavior","MaximumQuantity","isServiceItem","ItemTypeValue","ReleasedProductType","Service","onRemoveClickHandler","onRemoveClickFunction","payLoad","getPayloadObject","telemetryContent","TelemetryConstant","RemoveCartItem","removeCartItemAttribute","getTelemetryAttributes","productImageUrl","PrimaryImageUrl","data","hasError","Quantity","CartLineItemComponent","currentQuantity","isOutOfStock","productUrl","getProductUrlSync","actionContext","undefined","key","isQuantityEditable","primaryImageUrl","displayMode","channelDeliveryOptionConfig","remove","Button","Object","assign","onClick","title","storeLocation","telemetry","error","async","getMiniCartData","ctx","miniCartData","cart","CartLines","hasInvoiceLine","getActiveCartProductsAction","ActiveCartProductsInput","then","catch","exception","Error","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","requestContext","apiSettings","availableQuantity","getDeliveryOptionsForCartLineItems","ProductDeliveryOptionsForCartLineItems","deliveryOptions","CartIcon","constructor","super","retailMultiplePickUpOptionEnabled","getSortedCartLines","sortOrder","lines","descending","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","toString","removeCartLines","warning","debug","loadBmaImages","bmaImageEndPoint","app","config","replace","snapShotId","response","fetch","bmaBaseUrl","json","state","isCartValid","getTelemetryObject","request","telemetryPageName","friendlyName","payload","TelemetryEvent","CheckOut","Checkout","checkoutBySignInAttributes","contentAction","etext","GuestCheckout","checkoutByGuestAttributes","ViewShoppingBag","viewShoppingBagAttributes","_this$props$data$orgU","reaction","_this$props$data$cart","_this$props$data$cart2","_this$props$data$cart3","cartLines","updatedCartLines","updateCartItem","ExtensionProperties","snapShotProperty","e","Key","Value","StringValue","setState","_setOrderQuantityLimitsFeatureFlag","_validateCart","componentDidUpdate","prevProps","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$chan","_this$props$data$feat","enableHoverCart","isAnonymousCheckout","user","isAuthenticated","signInUrl","guestCheckoutUrl","getUrlSync","cartUrl","checkoutURL","_getCheckoutURL","isCartEmpty","shouldShowMiniCart","isProductAddedToCart","addToCartBehavior","AddToCartBehavior","showMiniCart","_getCartLines","some","includeFlyout","status","totalItemsInCart","goToCartButtonText","goToCartButtonTitle","flyoutTitle","flyoutTooltip","tag","UncontrolledTooltip","placement","hideArrow","trigger","target","shouldShowCloseButton","cartPageUrl","price","TotalAmount","priceString","totalPriceFormatString","cultureFormatter","formatCurrency","featureState","feature","Name","IsEnabled","viewProps","_objectSpread","cartIcon","CartIconComponent","cartLabel","cartQtyLabel","FlyoutContainer","CartlinesWrapper","miniCartWrapper","classnames","miniCartItemWrapper","checkoutAsSignInUserButton","disabled","href","checkoutButtonTitle","checkoutAsGuestButton","guestCheckoutButtonTitle","goToCartButton","totalPrice","renderView","_cart$result$cart$Ver","_cart$result","cartVersion","Version","lastValidatedCartVersion","validateCartAsync","ArrayExtensions","hasElements","isAbsoluteUrl","RegExp","test","returnURL","msdyn365Commerce","isBrowser","window","location","origin","includes","channel","PickupDeliveryModeCode","FlyoutCartLineItems","enableStockCheck","maxQuantityForCartLineItem","sizeString","productDimensionTypeSize","colorString","productDimensionTypeColor","configString","productDimensionTypeConfiguration","styleString","productDimensionTypeStyle","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","discountStringText","originalPriceText","currentPriceText","shippingChargesText","removeCartButtonText","outOfStockText","outOfRangeOneText","outOfRangeFormatText","pickupDeliveryModeCode","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find","featureStatuses","customerInformation","customerInfo","IsB2b","__decorate","observer","Node","renderModuleAttributes","_renderCartlines","getInvoicePaymentSummary","checkout","totalAmountLabel","invoiceLabel","invoiceSummaryTitle","checkoutCart","get","heading","InvoiceSummary","orderTotalLabel","checkoutState","getLineItems","_featureState$result","emailDeliveryModeCode","_getDeliveryLocation","locationMatch","_getLineItemComponent","productId","_product","RecordId","showShippingChargesForLineItems","productDimensionTypeAmount","shippingCharges","amountString","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","PickUpAtStore","label","_getEmailDeliveryComponents","emailDeliveryText","EmailDelivery","_getLineItemsComponents","items","isPickUp","_getCartPickDeliveryMode","isEmailDelivery","DeliveryMode","LineItem","pickUpAtStore","emailDelivery","cartLineItem","_channelDeliveryOptio","StringExtensions","isNullOrWhitespace","PickupDeliveryModeCodes","deliveryMode","_countItems","reduce","count","_filterItemsByDiliveryType","type","filter","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","_productDeliveryOptio","DeliveryOptions","Code","Description","suffix","LineItemDeliveryGroup","LineItemList","lineItems","handleLineItemHeadingChange","event","lineItemsHeading","text","value","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","getGroupByStorePickup","groupBy","groupDelivery","cartLinesGroup","cartLinesGrp","entries","forEach","_ref","groupByDeliveryType","keys","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","groupTitle","iconClass","lineItemWraperIcon","lineItemWraper","_getLineItems","editCartText","EditCart","attribute","groupClass","LineItems","Header","Msdyn365","editProps","onEdit","editLink","color","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","getOrderSummary","_context$request$app$","orderSummaryHeading","subTotalLabel","shippingLabel","taxLabel","loyaltyLabel","giftcardLabel","totalDiscountsLabel","freeText","toBeCalculatedText","otherCharges","showLineItems","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","orderSummaryProps","OrderSummary","otherChargeLabel","isShowTaxBreakup","CheckoutGuidedCard","editButtonRef","formCardRef","renderFooder","isVisted","isReady","isSubmitting","isCancelAllowed","hasControlGroup","onCancel","onSubmit","resource","saveBtnLabel","cancelBtnLabel","saveAndContinueBtnLabel","canSubmit","canCancel","Save","SaveContinue","saveBtnAttributes","Cancel","cancelBtnAttributes","classname","focusOnFirstFocusableElement","node","ReactDOM","child","querySelector","focus","focusOnEditButton","editButton","current","scrollToTitle","formCard","isMobile","scrollIntoView","getTitle","step","headingTag","Tag","isActive","onNext","isExpanded","children","isPending","isUpdating","hasInitialized","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","hidden","initialized","ready","pending","updating","ref","innerRef","role","CheckoutGuidedForm","currentStep","getEnabledModules","moduleState","childIds","getModule","childId","isDisabled","getStep","indexOf","getId","getHeading","isEditor","componentDidMount","init","shouldCollapseAfterRedirect","isPaymentVerificationRedirection","shouldEnableSinglePaymentAuthorizationCheckout","hasModuleState","GuidedCard","disableGuidedCheckoutFlow","enableControl","buttonsStates","onPlaceOrderHandler","isBusy","canPlaceOrder","placeOrder","buttonSetState","checkoutBtnText","isPlaceOrderLoading","setIsBusy","useState","Purchase","attributes","_this","errorMessage","isValidationPassed","handleCheckoutHeadingChange","checkoutHeading","isLoading","cartStatus","isEmptyCart","getSlotItems","slots","triggerPaymentWithPlaceOrder","_this$props$data$chec","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","shouldTriggerPaymentWithPlaceOrder","onPlaceOrder","_this$props$data$chec2","checkoutOutOfStockErrorMessage","genericErrorMessage","invalidCartVersionErrorMessage","orderConfirmation","isOverMaxQuantity","_this$props$data$chec3","_checkout$result","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","_this$props$data$chec4","_error$data","name","AdditionalContext","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","_this$props$context$r","_this$props$data$chec5","EmailDeliveryModeCode","emailDeliveryCartLines","lineDeliverySpecifications","line","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","callerContext","Id","updatedCart","_this$props$context$r2","productInventoryInformation","_cart$CartLines","cartlineProduct","productInventory","_productInventory$Pro","IsProductAvailable","getActiveChildModuleStates","onContainerReady","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","validateForCheckout","retry","arguments","isOrderQuantityLimitsFeatureEnabledInHq","isOrderQuantityLimitsFeatureEnabledInSiteSettings","validateForCheckoutAsync","bypassCache","_result$ValidationFai","ValidationFailuresByCartLines","_this$props$data$chec6","refreshCart","refreshError","message","_this$props$data$chec7","_this$props$data$chec8","isEditorialMode","isEmpty","_this$props$data$chec9","params","requestFormData","query","pv","_this$props$data$chec10","_this$props$data$chec11","_this$props$data$chec12","isTermsAndConditionAccepted","_this$props$data$chec13","when","isCartReady","_this$props$data$chec14","_this$props$data$chec15","_this$props$data$chec16","isPaymentSectionContainerReady","_this$props$data$chec17","redirectAdditionalContext","isPaymentVerificationRequired","_this$props$data$chec18","isPaymentSectionContainerHasError","_this$props$data$chec19","_this$props$data$chec20","updateIsPlaceOrderEnabledInRedirection","newIsPlaceOrderEnabledInRedirection","_this$props$data$chec21","_this$props$data$chec22","_this$props$data$chec23","backToShopping","placeOrderText","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","checkoutInformation","isConsentGiven","cookies","device","Type","backToShoppingUrl","termsAndConditions","BackToShopping","backToShoppingAttributes","hasSalesOrder","salesOrder","checkoutProps","moduleProps","headerProps","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","renderMsdyn365Text","loading","Waiting","alert","AlertComponent","_this$props$data$chec24","canShow","guidedForm","GuidedFormComponent","orderSummary","invoicePaymentSummary","placeOrderButton","PlaceOrderButtonComponent","keepShoppingButton","computed","withModuleState","PickUpAtStoreComponent","EmailDeliveryComponent","_ref2","LineItemComponent","_ref3","LineItemGroupComponent","_ref4","lineItem","LineItemGroupComponentWithMultiplePickUp","_ref5","LineItemComponentWithMultiplePickUp","_ref6","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","OrderSummaryComponent","_ref9","subtotal","otherCharge","tax","totalDiscounts","loyalty","giftCard","orderTotal","PaymentSummaryComponent","_ref10","invoices","Module","WishlistItemDimension","dimensionType","dimensionValue","_renderAriaLabel","Dimensions","formattedPrice","dimensions","BasePrice","freePriceText","CurrencyCode","productDimension","DimensionTypeValue","DimensionValue","join","renderProductLink","recordId","productName","productAttributes","renderUnitOfMeasure","unitOfMeasure","unitOfMeasureDisplayType","_renderProductImage","image","fallbackImage","snapshotId","productsCount","defaultImageSettings","xl","cropFocalRegion","BmaImage","altText","src","fallBackSrc","loadFailureBehavior","Image","_renderPrice","moduleId","moduleTypeName","PriceComponent","_renderProductDimensions","dimension","RequestOrderLines","getStockistCustomers","customerAccountNumber","jewelerInfo","readAsync","Attributes","stockist","attr","stockistAttributeName","AttributeValue","getRequestOrderLines","requestOrderId","requestOrderLines","getRequestOrderB2CAsync","queryResultSettings","RequestOrder","trace","productInputs","requestOrderLine","FullProductInput","getProductDetailsCriteriaFromActionInput","getFullProducts","mappedProducts","p","ProductDetails","productInfo","Snapshotid","b2cPrice","B2CPrice","b2bPrice","B2BPrice","handleHeadingChange","_renderHeading","MsDyn365","jewelerName","URLSearchParams","url","requestUrl","search","has","AccountNumber","orderConfirmationHeadingText","orderConfirmationContentText","orderConfirmationHeading","orderConfirmationContent","Products","Product","ProductDimensions","_renderProductList","priceFree","enableImageProductLink","customerInformationData","productPrice","ProductPrice","AdjustedPrice","CustomerContextualPrice","TradeAgreementPrice","getFallbackImageUrl","ItemId","productImage","productLink","productDimensions","productUnitOfMeasure","DefaultUnitOfMeasure","entireProductLink","productAriaLabel","RequestOrderLine","itemKey","IsGiftCard","_renderItem","images","imageSrc","console","log","previewProps","removeClass","BmaPrice","loadBmaPrice","b2bCustomer","getB2BCustomerIdAsync","bmaPriceEndPoint","BMARetailStockist","sum","vk","priceInfo","BmaProductAlloySpecification","loadBmaProductSpecification","bmaReviewEndPoint","review","alloy","translationInfo","properties","disc","fineness","WishListItemActions","handlers","onAddToCart","_addItemToOrderRequest","mode","itemAlreadyAdded","onAddToOrderRequest","onRemoveItem","renderInventoryInformationLabel","inventoryInformationLabel","inventoryLabelClassName","inventoryCssName","WishlistItemAddToCartButtonComponent","isInStock","addToCartText","addItemAction","WishlistItemCustomiseButtonComponent","addProductLink","customiseButtonText","WishlistItemAddToOrderRequestButtonComponent","addToOrderRequestText","style","background","marginTop","AddedToOrderButtonComponent","existsProductIndex","addProductsOrderRequest","findIndex","addToOrderRequestButtonText","addedButtonText","addToOrderButtonText","WishlistItemRemoveFromWishlistButtonComponent","removeFromWishlistText","removeItemAction","_renderProductSpecification","WishlistItemsStatusMessage","errorType","WishlistItems","addEvent","Event","bubbles","cancelable","composed","_addItemOrderRequest","removeProductIndex","splice","_renderAddToMultipleItemsToOrderRequest","addProductToOrderRequest","B2CCustomerId","B2BCustomerId","UnitOfMeasure","BMASnapshotId","createB2CCartServiceAsync","dispatchEvent","_createOrderRequest","addToMultipleCartButtonText","position","top","requestOrderResponse","createRequestOrderAsync","checkbox","document","getElementById","checked","orderConfirmUrl","sitePath","redirectToOrderConfirmUrl","RequestOrderId","_onDismiss","isOpen","_addItemToCart","addedToCartSuccessMessage","addedToCartFailureMessage","invoiceInCartErrorMessage","_getProductInventory","_this$props$context$a","getDeliveryOptionsAsync","isOrderQuantityLimitsFeatureEnabled","addProductToCartInput","quantity","additionalProperties","orderQuantityLimitsFeatureIsEnabled","isAddEmailDeliveryItemToCart","addProductToCart","userMessage","statusCssString","messageGlyph","substatus","_await$cart$cart","curQuantity","maxQtyLimitReachedMessage","_getInventoryValueMessage","_result$errorDetails","errorDetails","LocalizedMessage","_result$errorDetails2","_removeItemFromWishlist","wishlists","userToken","token","wishlistLineId","_getWishlistLineIdFromProductId","removeLinesAsync","commerceList","castCommerceList","update","createGetByCustomerInput","getItemsInWishlists","ActiveWishlistInput","castSimpleProducts","reload","_inventoryLabel","StockLevelLabel","_inventoryClassName","StockLevelCode","toLowerCase","_isProductInStock","productResult","loadTranslationInfo","axios","bmaTranslationMessageEndPoint","CommerceListLines","foundWishlistItem","commerceListLine","matchedSnapShotId","pSnapShotId","emptyWishlistText","wishlistErrorGettingWishlist","errorProps","statusMessage","productsList","emptyViewProps","renderAddToMultipleItemsToCart","addToCartButtonText","addToBMAButtonText","wishlistState","addToCartButton","customiseButton","addToOrderRequestButton","addToBMAButton","addedToOrderButtonComponent","inventoryInformation","removeButton","productStatusMessage","Alert","toggle","onDismiss","productAlloySpecification","WishlistItem","addToBMAText","maxQuantityLimitText","maxQuantityForLineItem","minInventory","Math","min","productInventoryCollection","savedDesignRecordId","SavedDesignMoveToCustomizeButtonComponent","moveToCustomizeText","resultUrl","deleteSavedDesignsList","RecId","deleteSavedDesignsAsync","moveToCustomizeButton","refSavedDesign","CartIconView","_modalContainer","Modal","wrapClassName","isModalOpen","closeModal","_openModal","onTelemetryClick","_renderCartCloseIcon","_renderCartItemCount","cartItemCount","tabIndex","_escFunction","keyCode","KeyCodes","Escape","isAutoDisplayTriggered","addEventListener","componentWillUnmount","removeEventListener","_this$props$data$cart4","emptyCart","cartLineIndex","promoContentItem","_props$data$cart$resu","emptyPrice","renderTotalPrice","subTotalMessage","continueShoppingButtonTitle","renderCartlines","histogramItems","histogramProps","averageRating","componentId","_data$ratingsSummary$","_data$ratingsSummary$2","_data$ratingsSummary$3","_data$ratingsSummary$4","_data$ratingsSummary$5","_data$ratingsSummary$6","reviewsCount","ratingsSummary","reviewsCountString","numberOfReviewsString","format","RatingComponent","avgRating","readOnly","ariaLabel","averageRatingAriaLabel","buttonProps","starLabel","bar","histogramItem","BulkPurchase","_toggleCollapse","_this$props$data$prod","hasDimensionsInProps","hasDimensionsInData","container","content","_renderCollapseContent","_renderCollapseButton","_renderCollapse","bulkPurchaseHeaderTitle","Collapse","_renderMainContent","isMobileDevice","variant","VariantType","Viewport","RichTextComponent","bulkPurchaseDescriptionText","_renderMatrix","_this$props$data$orde","_this$props$data$cust","ProductDimensionsMatrix","orderTemplates","BulkPurchaseViewComponent","description","isChecked","ariaSetSize","ariaPosInSet","onChange","CheckoutDeliveryOptions","selectedItemId","checkoutErrorRef","isSelectDefaultOptionEnabled","useDefaultDeliveryOption","canShip","cartDeliveryMode","getSavedDeliveryOption","loadDeliveryOptions","getCartLinesForShipping","isDeliveryModeExists","getDeliveryOptionSelected","selectedItem","DeliveryOption","DescriptionComponent","getErrorMessage","errorMessageTitle","CheckoutDeliveryOptionsError","ErrorTitleComponent","ErrorMessageComponent","getDeliveryOptionList","code","radioButton","RadioButtonComponent","onDeliveryOptionChange","getSaveButton","onSave","getEditButton","editBtnLabel","getCancelButton","setError","setHasError","onUpdating","clearError","information","updateShouldCollapsePaymentSection","newShouldCollapsePaymentSection","updateCartDeliverySpecification","savedDeliveryOption","onReady","cartLinesForShipping","deliveryModeId","trim","updateCartDeliverySpecificationInput","shippingAddress","onPending","_response$errorDetail","isNullOrEmpty","setIsCancellable","_this$channelDelivery","getDeliveryOptions","cartId","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","filterDeliveryModeOption","FilterDeliveryModeOption","None","FilterOutNonCarrierDeliveryMode","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_unused","deliveryOptionsNotFound","updateHasCartDeliveryMode","newHasCartDeliveryMode","getStoredDeliveryOptions","isExpressCheckoutApplied","isExpressPaymentAppliedInCartPage","currentTarget","property","JSON","parse","_this$expressPaymentD","_this$expressPaymentD2","expressPaymentDetailsFromCartPage","isExpressCheckoutAppliedInCartPage","isDataReady","shouldEnableCheckoutErrorDisplayMessaging","checkoutError","errorLocation","ErrorLocation","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","isError","isShowList","isShowSelected","deliveryOptionAriaLabel","deliveryOptionsData","ErrorComponent","errorMessageData","viewState","isShowSaveButton","hasExternalSubmitGroup","isShowEditButton","isShowCancelButton","DeliveryOptionsList","list","deliveryOptionSelected","waiting","saveButton","cancelButton","observable","action","DeliveryOptionList","DeliveryOptionSelected","onApplyHandler","onApplyGiftCard","preventDefault","onChangeNumberHandler","onEnterGiftCardNumber","onChangePinHandler","onEnterGiftCardPin","onChangeExpHandler","onEnterGiftCardExp","getForm","options","inputRef","inputPinRef","inputExpRef","giftCardNumber","giftCardPin","giftCardExp","supportExternalGiftCard","additionalFields","disableAddGiftCard","applyGiftCardButton","giftCardFormLabel","giftCardNumberLabel","giftCardPinLabel","giftCardExpLabel","giftCardAlertLabel","giftCardPinPlaceholderText","giftCardExpPlaceholderText","formProps","inputPinLabel","inputExpLabel","alertFieldLabel","assertive","fade","includeAlertClass","inputNumber","inputPin","placeholder","inputExp","applyButton","showGiftCardPinInput","showGiftCardExpInput","inputProps","inputNumProps","inputPinProps","inputExpProps","onRemoveHandler","onRemoveGiftCard","_giftCard$Id","getItem","getFormattedPrice","canRemove","enteredGiftCardLabel","giftCardAvailableBalanceLabel","removeGiftCardButton","balance","Balance","CardCurrencyCode","giftCardLast4Digit","substr","selectedGiftCard","itemProps","getList","giftCards","listProps","SupportedGiftCardType","CheckoutGiftCard","isFetchingGiftCard","isRequired","isEnabled","giftCardExtends","onSkip","couldPaidByGiftCard","giftCardSupported","External","shouldBeEnabledForGuest","handleCancelOrSubmit","hasSelectedItem","currencyCode","enterGiftCardNumber","enterGiftCardPin","enterGiftCardExp","removeGiftCard","applyGiftCard","giftCardTypes","getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","getGiftCard","addGiftCard","Pin","ExpirationDate","TenderTypeId","Promise","resolve","findGiftcardTenderTypes","tenderTypes","operationId","giftcardType","matchedTenderTypes","Internal","tenderType","OperationId","ConnectorId","noBalanceError","invalidCardInfoError","invalidCardTypeError","noCardPinError","noCardExpError","supportedGiftCardType","getTenderTypesAsync","internalGiftcardTenderTypes","OPERATIONS","PayGiftCertificate","externalGiftcardTenderTypes","Both","month","Number","parseInt","split","year","getGiftCardAsync","activeGiftCard","emptyInputError","duplicatedCodeError","invalidCodeError","card","resolveCardTypesAsync","CardType","GiftCard","loyaltyAmount","customerAccountAmount","getLoyaltyAmount","getGiftCardTotalAmount","getCustomerAccountAmount","showAdditionalFields","shouldPayGiftCard","isOBORequest","EnabledPaymentsForOBO","moduleClassName","checkoutGiftCardProps","showGiftCard","TitleCompoent","form","From","SelectedGiftCard","GiftCardList","_objectWithoutProperties","_excluded","AddResource","ShowResource","max","ariaValueMax","ariaValueMin","ariaValueNow","onBlur","htmlFor","CheckoutLoyalty","_defaultLoyaltyPoints","loyaltyCard","CardNumber","LoyaltyCardId","updateLoyaltyCardId","loyaltyCardNumber","shouldPayLoyalty","_setErrorMessage","_clearError","_dialogToggleRef","_applyLoyaltyPoints","bind","_removeLoyaltyPoints","_onInputChange","_onBlur","dollarsApplied","maxDollars","isFetchingLoyaltyCard","loyaltyTransactionEstimation","MaxCurrencyValueOfLoyaltyPoints","_updateEstimate","_updateLoyalty","Loyalty","isShowLoyalty","isShowAddLoyalty","checkoutLoyalty","showLoyalty","Heading","loyaltyHeadingText","coveredAmountText","TextComponent","loyaltyCoveredAmountText","amount","addLoyalty","drawer","Drawer","toggleButtonText","_drawerHeader","openGlyph","closeGlyph","glyphPlacement","cardNumber","rewardPoints","RewardPoints","points","_renderPointSection","availablePointsLabel","expiringLoyaltyPointsLabel","loyaltyAmountContainer","appliedLoyaltyAmountContainer","loyaltyAmountLabel","LabelComponent","payWithLoyaltyAmountLabel","loyaltyAmountInput","InputComponent","loyaltyAmountApplyButton","applyCheckoutLoyaltyPaymentText","isNaN","showAppliedAmount","loyaltyAmountAppliedText","loyaltyAmountAppliedPrice","loyaltyAmountRemoveButton","removeCheckoutLoyaltyPaymentText","point","RewardPointId","checkoutLoyaltyRewardPoint","availablePointsText","activePoints","ActivePoints","expiringPointsText","expiringPoints","PointsExpiringSoon","updateLoyaltyAmount","newAmount","parseFloat","num","toFixed","element","channelConfig","Currency","loyalPointsRequest","createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput","_query","callActionOrExecute","_points$MaxCurrencyVa","GetLoyaltyTransactionEstimationInput","newMaxPoints","AddCheckoutLoyalty","rewardPoint","ShowCheckoutLoyalty","isPlaceOrderClicked","customerCreditLimitExceededErrorMessage","missingRequiredCartTenderLinesErrorMessage","checkoutResult","errorCode","setCheckoutErrors","_cart$CartLines2","productsThatShouldValidateInventory","_cartlineProduct$Beha","isStockedItem","IsStockedProduct","cartLinesInventoryValidation","validateCartLinesInventory","isValid","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","address","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","disableForOBO","isPaidOffByCustomerAccount","amountDue","asyncResultStatus","AsyncResultStatusCode","LOADING","_this$props$data$chec27","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","_this$props$data$chec25","_this$props$data$chec26","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","_this$props$data$chec28","_this$props$data$chec29","_this$props$data$chec30","_this$props$data$chec31","_this$props$data$chec32","_this$props$data$chec33","_this$props$data$chec34","_this$props$data$chec35","isBillingAddressHasError","_this$props$data$chec36","_this$props$data$chec37","updateIsBillingAddressHasError","newIsBillingAddressHasError","_this$props$data$chec38","_this$props$data$chec39","_this$props$data$chec40","_this$props$data$chec41","_this$props$data$chec42","_this$props$data$chec43","shouldFocusOnCheckoutError","_this$props$data$chec44","_this$props$data$chec45","_this$props$data$chec46","_this$props$data$chec47","_this$props$data$chec48","_this$props$data$chec49","_this$props$data$chec50","_this$props$data$chec51","_this$props$data$chec52","_this$props$data$chec53","_this$props$data$chec54","_this$props$data$chec55","_this$props$data$chec56","_this$props$data$chec57","_document","_this$props$data$chec58","allCheckoutInformation","info","checkoutExpressPaymentContainer","hasShippingAddress","hasCartDeliveryMode","hasGuestCheckoutEmail","hasExpressPaymentContainer","getElementsByClassName","display","_this$props$data$chec59","_this$props$data$chec60","values","every","SUCCESS","FAILED","shipping","_input$data$catalogs","catalogs","isB2b","_cartLine$CatalogId","fullUrl","URL","searchParams","set","CatalogId","salesAgreementPricePrompt","isTaxIncludedInPrice","IsTaxIncludedInPrice","_getModules","_getId","shouldFocus","childrenModules","childModule","childState","setCheckoutErrorFocus","_state$childIds","currentId","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","PayCard","PayLoyalty","PayCustomerAccount","orderedProducts","redirect","PlaceOrder","balanceCheckButton","GiftCardBalanceCheck","_isEnabled","_getFormattedPrice","_enterGiftCardNumber","_enterGiftCardPin","_enterGiftCardExp","_setError","_applyGiftCard","_getGiftCardTypes","_getGiftCard","_findGiftcardTenderTypes","giftCardBalanceCheckProps","Form","Item","CatalogLabelComponent","catalogId","catalog","CartLineItemFunctions","renderProductDimensions","DimensionStrings","DiscountLines","discountLine","OfferId","OfferName","isSalesLine","PeriodicDiscount","EffectiveAmount","EffectivePercentage","IsInvoiceLine","_props$context$reques","hasShippingMethod","shippingChargeLines","ChargeLines","chargeLine","IsShipping","freightFee","chargeTotal","CalculatedAmount","priceComponent","_cartline$ChargeLines","chargeline","SalesAgreementLineRecordId","_props$primaryImageUr","destructDimensionStrings","fallbackImageUrl","renderDisountLines","renderInventoryLabel","renderShippingLabel","renderOtherCharges","renderSalesAgreementPrompt","productAttribute","imgeClassName","newValue","quantityOnChange","lineIndex","NetAmount","Price","NetAmountWithoutTax","NetPrice","salesAgreementLineId","_generateQuantityandPrice","nodes","IncrementalQuantity","currentCount","decrementButtonAriaLabel","incrementButtonAriaLabel","isCartStateReady","isGiftCard","classNames","DiscountAmount","priceEditorResources","CartLinePriceEditor","validateMediaLocationAsync","mediaLocation","imageData","Uri","AltText","IsApplicableForChildEntities","isApplicableForChildEntities","http","XMLHttpRequest","open","send","getValidProductImages","channelId","selectedProduct","getCatalogId","actionInput","MediaLocationsForSelectedVariantInput","getMediaLocationsForSelectedVariant","mediaLocations","all","pairs","pair","validateProductImages","MediaGallery","_props$config$zoomedI","_inlineZoomDivRef","Map","fullScreenOverlayButtonRef","mediaGalleryImages","defaultGalleryImageSettings","md","defaultThumbnailImageSettings","onExiting","animating","onExited","next","removeInlineZoomStyle","isLastItem","nextIndex","activeIndex","goToIndex","updateZoomedInImage","previous","mediaGalleryItems","isFirstItem","_getCarouselItem","isInPopup","shouldSkipToMainImage","bypassHideOnFailure","_getThumbnailItem","modifiedActiveIndex","ThumbnailItemContainerProps","_generateOnThumbnailClick","onKeyDown","_generateOnThumbnailKeyDown","Picture","imageFallbackOptimize","shouldUseOptimizedImage","_refHandler","divRef","which","Enter","Space","openModalDialog","_toggleModal","imageModalSlider","ZoomView","_mapProductToImageData","carouselprops","Carousel","_renderCarouselItemImageView","_zoomedImageSettings","interval","directionTextPrev","previousScreenshotFlipperText","directionTextNext","nextScreenshotFlipperText","onIndicatorsClickHandler","showPaginationTooltip","hideIndicator","keyboard","handleOnExited","handleOnExiting","isDisabledFunctionality","isMobileImageZoomed","carousel","imageModalSliderProps","modalIsOpen","ontoggle","galleryCarousel","ImagefullView","isImageZoomed","isInitialLoad","skipImageValidation","zoomedImageSettings","galleryImageSettings","_onImageMouseOut","_inlineZoomImageOnHover","_onInlineImageClick","_onContainerZoomImageClick","_onMouseOutLensContainer","_this$props$config$im","source","imageSource","shouldUpdateOnPartialDimensionSelection","_setRenderType","mediaLocationsForSelectedVariant","_this$props$config$th","thumbnailImageSettings","_setImages","_this$props$config$th2","productVariant","_product$productVaria","ObjectExtensions","isNullOrUndefined","_this$props$config$th3","_this$props$config$th4","_this$props$config$im2","isVertical","thumbnailsOrientation","isFullscreenAllowed","allowFullScreen","zoomViewMode","imageZoom","emptyPlaceHolderImage","placeholderImageName","_this$props$config$im3","_mediaLocation$Uri","_mediaLocation$AltTex","curatedImages","_filterMasterImageFromVariant","mediaGalleryCarouselItems","_getMediaGalleryItems","mediaGalleryThumbnailCarouselItems","_getMediaGalleryThumbnailItems","callbackToggle","callbackThumbnailClick","callbackThumbnailKeyDown","CarouselProps","indicatorAriaText","ariaLabelForSlide","Thumbnails","ThumbnailsContainerProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","vertical","flipperPrevLabel","flipperNextLabel","parentId","useTabList","stringify","_this$state$mediaGall","lastUpdate","defaultKey","_getEmptyThumbnailItem","_this$state$mediaGall2","zoomView","_renderEmptyImage","curatedImage","imagesToSet","Date","now","_renderImageInContainerOnZoom","_renderImageFullScreenOnZoom","_renderImageInlineOnZoom","_this$props$config$sh","_this$props$data$prod2","_this$props$data$prod3","shouldHidePrimaryImages","shouldHideMasterProductImagesForVariant","variantImages","isVariantProduct","MasterProductId","itemId","_item$additionalPrope","_this$props$config$da","dataScale","defaultDataScale","onMouseOver","onMouseMove","inlineZoomImageOnMouseMove","_this$props$config$da2","inlineZoomImageOnHover","String","_handleMobileViewZoomedImageClick","mobileZoomedInImageClassName","transform","classList","parentElement","overflow","_this$props$config$da3","bounds","getBoundingClientRect","positionX","clientX","left","positionY","clientY","scaledPositionX","scaledPositionY","add","scrollTo","_this$props$config$da4","innerWidth","inlineZoomInitClick","inlineZoomImageOnMouseOut","onContainerZoomInit","onMouseOutLensContainer","_this$props$config$da5","onMouseOut","onMouseMoveLensContainer","onMouseOverImageContainer","fullScreenTitleText","_product$PrimaryImage","_this$fullScreenOverl","parentDiv","removeAttribute","removeContainerZoomStyle","_renderThumbnails","thumbnails","_renderThumbnailItem","thumbnail","AddToCartProductListComponent","_quickOrderTemplate$q","_quickOrderTemplate$q2","quickOrderTemplate","quickOrderTemplateLines","fullProduct","productListLine","buttonLabel","quickOrderGridBuySelectedButtonText","buttonAriaLabel","quickOrderGridBuySelectedButtonAriaLabel","dialogStrings","_props$resources$quic","_props$resources$quic2","_props$resources$quic3","_props$resources$quic4","_props$resources$quic5","_props$resources$quic6","_props$resources$quic7","_props$resources$free","_props$resources$orig","_props$resources$curr","_props$resources$adde","_props$resources$quic8","_props$resources$quic9","goToCartText","quickOrderGridGoToCartText","continueShoppingText","quickOrderGridDialogCloseText","closeNotificationLabel","quickOrderGridBuySelectedAddingToCartErrorNotificationCloseAriaLabel","headerItemOneText","quickOrderGridSingleItemText","headerItemFormatText","quickOrderGridMultiLineItemFormatText","headerLinesFormatText","quickOrderGridMultiLinesFormatText","headerMessageText","quickOrderGridHeaderMessageText","addedQuantityText","buyAgainNotificationTitle","quickOrderGridBuySelectedAddingToCartErrorNotificationTitle","buyAgainNotificationCloseAriaLabel","getDialogStrings","orderDetailProducts","quickOrder","orderDetails","quickLine","_quickLine$fullProduc","salesLine","OrderDetailsProduct","getOrderDetails","AddToCartComponent","addToCartArialLabel","navigationUrl","shouldSkipSiteSettings","orderDetailsProducts","getQuickOrderGridAddToCartDialog","removeActionHandler","removeProductList","productList","removeQuickOrderList","QuickOrderGridDrawer","_props$collapseProps$","_props$collapseProps","_isManuallyToggled","onToggle","previousState","collapseProps","_drawerGlyphClass","toggleGlyphClassName","isAnimateGlyph","_drawerOpenGlyph","_drawerCloseGlyph","drawerClass","drawerButtonClassName","toggleButtonProps","block","_generateDrawerButtonInnerMarkup","isCollapseState","drawerButtonTextClass","toggleButtonClassName","headingDrawerClass","descriptionDrawerClass","moduleHeadingText","moduleDescriptionText","_generateGlyphMarkup","glyphClass","QuickOrderGridFormComponent","productTextInput","quantityTextInput","quickOrderGridState","maxChars","isAddtoListDisabled","ariaLabelQuantity","ariaLabelProduct","ariaLabelAddtoCart","handleQuantityChange","handleInputChange","handleAddProductListClick","onInputChange","onInputChangeFunction","onQuantityInputChange","onQuantityChangeFunction","productNode","quantityNode","pattern","maxLength","addToListBtn","stateMessage","messageText","QuickOrderGridProduct","productLine","isSelected","QuickOrderGridDesktopHeaderCellsComponent","columnWithNumberClassName","quickOrderGridProductNumberText","quickOrderGridProductText","quickOrderGridUnitPriceText","quickOrderGridUnitOfMeasureText","quickOrderGridQuantityText","quickOrderGridActionsText","QuickOrderGridMobileHeaderCellsComponent","QuickOrderGridTableHeaderComponent","rowClassName","headerCells","QuickOrderGridTableRowProductImageComponent","_props$data$product$p","_props$imageSettings","containerClassName","setShowPreviousActions","onChangeHandler","onChangeQuantity","quickOrderGridProductKey","QuickOrderGridExtraActionsPopupComponent","_props$data$product$p2","quickOrderGridViewDetailsButtonAriaLabel","quickOrderGridViewDetailsButtonText","shouldShowActions","setShowActions","getProductPageUrlSync","onClickViewDetails","shouldShowActionsNewValue","actionsContainerClassName","quickOrderGridRemoveItemButtonAriaLabel","QuickOrderGridDesktopTableRowCellComponent","_props$data$product$p3","_product$Dimensions","_productListLine$Line","_dimension$DimensionV","quickOrderGridProductDimensionsSeparator","renderProductPrice","quickOrderGridInputQuantityAriaLabel","quickOrderGridDecrementButtonAriaLabel","quickOrderGridIncrementButtonAriaLabel","callbacks","QuickOrderGridMobileTableRowCellComponent","_props$data$product$p4","_productListLine$Line2","QuickOrderGridTableRowComponent","QuickOrderGridTableComponent","setIsMobile","isMobileView","quickOrderGridProducts","updateViewport","headerClassName","quickOrderProduct","_quickOrderProduct$pr","_quickOrderProduct$pr2","callBacks","QuickOrderGrid","_waitTime","_dimensionUpdateQueueMaxLength","_errorCssClass","_errorCssGlyphClass","_dimensionUpdateQueue","FinitePromiseQueue","_dimensions","_cssClassNameConfigure","_className","_quickOrderGridCallbacks","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","_getDropdownName","changeUpdatingDimension","isUpdatingDimension","_quickOrderGridRowCallbacks","_removeItemRowFromTable","productListLineId","_changeRowQuantity","_removeProductList","ProductListsDataActions","_updateStatusState","quickOrderGridDeleteProductListFailedText","_handleInputChange","productResponse","_cancellabelDebounce","cancel","isQuickOrderGridFormExpanded","_debounce","getScanResult","GetScanResultInput","results","ProductDimensionFull","setTimeout","_handleQuantityChange","currentValue","inputElement","_quantityInput","HTMLInputElement","setAttribute","_this$state$productRe","ProductDimensionType","Color","Configuration","Size","Style","hasProductDimensions","dimensionsToUpdate","productDimensionErrorState","otherError","clearOtherErrorState","dimensionKey","configureErrors","errorState","mappedDimensions","_this$_updateDimensio","_updateDimensionValue","newProduct","getSelectedVariant","SelectedVariantInput","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","productDimensionFull","newValueId","DimensionValues","_getDimensionErrorString","dimensionTypeValue","amountErrorMessage","quickOrderGridproductDimensionTypeAmountErrorMessage","quickOrderGridproductDimensionTypeColorErrorMessage","quickOrderGridproductDimensionTypeConfigurationErrorMessage","quickOrderGridproductDimensionTypeSizeErrorMessage","quickOrderGridproductDimensionTypeStyleErrorMessage","_productResponse$Dime","missingDimensions","_getConfigureErrors","quickOrderGridWrongQuantityErrorMsg","quickOrderTemplateLinesData","orderLineIndex","newProductListLine","previousQuantity","newLine","updatedLines","updatedProductList","ProductListLines","ActiveProductListInput","ProductListId","_addItemToProductListLine","quickOrderGridAddedToGridSuccessMessage","quickOrderGridAddedToGridFailureMessage","quickOrderGridAddedToGridDuplicateError","productListId","newProductList","_productResponse$Defa","_createProductList","AddItemToProductListInput","addItemToProductListAction","CreateProductListInput","ProductListType","QuickOrder","createProductList","_productTextInput","_telemetryContent","_quickOrderGridFormClass","_quickOrderGridFormProductContent","_quickOrderGridFormMsgContent","quickOrderGridModuleHeading","quickOrderGridModuleDescription","quickOrderGridAddtogrid","quickOrderGridProductQuantityInputLabel","quickOrderGridProductInputLabel","quickOrderGridProductDimensionTypeColor","quickOrderGridProductDimensionTypeConfiguration","quickOrderGridSelectDimensionFormatString","quickOrderGridProductDimensionTypeSize","quickOrderGridProductDimensionTypeStyle","quickOrderGridProductDimensionTypeAmount","quickOrderGridModulePageHeading","productConfigureResources","selectDimensionFormatString","header","quickOrderGridProps","contentProps","isB2bCustomer","actions","bulkPurchase","_renderBulkPurchase","quickOrderGridForm","quickOrderGridFormProductContent","quickOrderGridFormMsgContent","configure","getProductConfigure","_renderListContainer","orderActions","_renderQuickOrderGridActions","quickOrderGridDeleteButtonText","addProductListToBag","QuickOrderGridActionsView","isBulkPurchaseEnabled","bulkPurchaseSlots","containerClass","_renderQuickOrderTable","_initQuickOrderGridProducts","quickOrderGridProduct","validValues","tableClassName","renderConfigureDropdown","dropdown","containerProps","labelContainerProps","errors","select","renderConfigure","dropdowns","renderForm","quickOrderForm","quickOrderProductContent","quickOrderMessageContent","HistogramItems","totalRatingsCount","renderItem","star5Count","star4Count","star3Count","star2Count","star1Count","stars","totalCount","percentage","formattedPercent","Intl","NumberFormat","locale","barItemAriaLabel","Progress","AverageRatingNumber","summary","TotalReviews","RatingsHistogram","selectFilterBy","ratingCount","completeClass","hideCount","averageNumber","totalReviews","ratingsSummaryProps","filterKey","createRatingsReviewsStateInput","noLongerLineExist","_getProductsNoLongerExists","_removeNoLongerExistsLines","_castCommerceList$Com","noLongerExist","noLongerExitsWishlistItemText","statusNotExistsMessage","_getProductNotExists","emptytext","noLongerExisttext","getDefaultColorSwatchSelected","productData","_colorAttribute$swatc","_colorAttribute$swatc2","_colorAttribute$swatc3","attributeValues","colorAttribute","attributeValue","_attributeValue$keyNa","keyName","toLocaleLowerCase","DimensionTypes","defaultSwatch","swatches","isDefault","updateProductUrl","productDetailsPageUrl","coreContext","queryString","sourceUrl","baseUrl","pathname","renderProductUnitOfMeasure","renderLabel","rating","ratingAriaLabelText","reviewCount","ratingCountAriaLabelText","reviewCountArialableText","getReviewAriaLabel","getRatingAriaLabel","ratingAriaLabel","roundedRating","renderPrice","basePrice","adjustedPrice","savingsText","isPriceMinMaxEnabled","priceResources","renderProductPlacementImage","imageUrl","_context$app$config","contextConfig","fallbackImageSource","img","imageProps","ProductComponentV2","createComponentOverride","component","_product$name","_product$recordId","_getProductImageUrlFr","_getProductPageUrlFro","ratingCountAriaLabel","allowBack","quickViewButton","productComparisonButton","isEnabledProductDescription","inventoryLabel","dimensionAvailabilities","swatchItemAriaLabel","MIN_VALUE","productImageUrlFromSwatch","dimensionToPreSelectInProductCard","none","productImageUrls","generateImageUrl","getProductImageUrlFromDefaultColorSwatch","productPageUrlFromSwatch","swatchValue","getProductPageUrlFromDefaultSwatch","productPageUrl","setProductPageUrl","setProductImageUrl","selectedSwatchItems","Dictionary","updatePageAndImageUrl","swatchItem","setValue","productPageUrlWithSwatch","newUrl","delete","swatchProductImageUrl","newImageUrl","isUnitOfMeasureEnabled","totalRatings","defaultUnitOfMeasure","_item$keyName$toLocal","_item$keyName","_item$swatches$map","_item$swatches","dimensionsToDisplayOnProductCard","dimensionsInProductCard","shouldDisplayDimension","_item$recordId","_swatchItem$swatchVal","_swatchItem$swatchVal2","_dimensionAvailabilit","colorHexCode","swatchColorHexCode","swatchImageUrl","dimensionAvailability","_swatchItem$swatchVal3","swatch","ProductComponentV2SwatchComponent","onSelectDimension","hideRating","numberRatings","renderRating","inventoryAvailabilityLabel","quickview","selectedDimensions","getValues","convertDimensionTypeToProductDimensionType","selectedProductId","renderQuickView","renderProductComparisonButton","getDefaultSwatchSelected","_productData$Attribut","_attributeSwatches$fi","AttributeValues","attributeSwatches","_attributeValue$KeyNa","KeyName","Swatches","IsDefault","ProductComponent","_product$Name","_product$RecordId","swatchProductImageUrls","ProductImageUrls","getProductImageUrlFromDefaultSwatch","SwatchValue","encodeURIComponent","AverageRating","TotalRatings","_item$KeyName$toLocal","_item$KeyName","_item$Swatches$map","_item$Swatches","_item$RecordId","_swatchItem$SwatchVal","_swatchItem$SwatchVal2","SwatchColorHexCode","SwatchImageUrl","_swatchItem$SwatchVal3","ProductComponentSwatchComponent","DescriptionInterval","renderProductCards","productsContainer","getInventoryLabel","channelInventoryConfigurationId","inventoryAttribute","textValue","renderProductCardsDescription","_props$data$products$","_props$data$featureSt","productsDimensionAvailabilities","breadCrumbType","breadcrumbType","isAllowBack","allowBackNavigation","quickviewslot","quickView","isPriceMinMaxFeatureState","priceRangeSeparator","masterProductId","renderProducts","_data$products$result","_data$products$result2","listPageState","activeProducts","productDescriptionInterval","productDescriptionIntervalRemainder0","productDescriptionIntervalRemainder9","renderTitleCount","titleContainer","titleCount","configureStickyFilter","isStickyHeader","headerContainer","headerHeight","offsetHeight","bannerHeights","headerElement","defaultContainer","refinerElement","documentElement","scrollTop","clientHeight","createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","modal","modalHeader","createModalBody","modalFooter","modalBody","renderSort","refiners","refineMenuContainer","refinerSectionContainer","submenu","renderRefinerMobile","renderRefiner","renderRefinerFooter","handler","doneAriaLabel","doneText","sortingContainer","renderTitle","titlePrefix","titleText","_props$context$action","searchResultContainer","pagination","productSectionContainer","choiceSummary","modalToggle","searchResultModal","titleViewProps","sortByOptions","categoryNavContainer","refineAndProductSectionContainer","featureSearchContainer","similarLookProduct","useStickyFilter","stickyFilterSetup","enableStickyHeader","setIsExpanded","wrapperRefiner","refinerRefernce","handleClickOutside","contains","useOutsideClick","recommendation","enableProdutDescription","filterText","ProductsContainer","TextValue","_props$data$listPageS","TitleContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","category","RefineMenuContainer","RefinerSectionContainer","SortingContainer","SearchResultContainer","ProductSectionContainer","TitleViewProps","categoryHierarchy","CategoryNavContainer","RefineAndProductSectionContainer","FeatureSearchContainer","useEffect"],"sourceRoot":""}