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iBACjBhnH,EAAgB,uBAChBinH,GACArsH,EAEJ,OACIb,EAAAA,cAACmc,EAAAA,OAAMrT,OAAAC,OAAA,GAAKihH,GACPp4F,EACAs7F,EACW,YAAXrhG,GAAwBwtC,EACxB2zD,GAAY3rG,GAAYA,EAASpgB,OAAS,GACvCjB,EAAAA,cAAC+b,EAAAA,KAAIjT,OAAAC,OAAA,GAAKikH,GACL3rG,GACGA,EAASxhB,KAAImF,GACFA,GAAWixE,EAAYjxE,EAAStF,EAASutH,EAAmBv2D,EAAgBzwD","sources":["webpack://msdyn365.commerce.online/./src/components/cartlineitem-variant.component.tsx?53a2","webpack://msdyn365.commerce.online/./src/components/master-prod-display-name.tsx?6719","webpack://msdyn365.commerce.online/./src/modules/smwe-search/actions/get-auto-suggest-suggestions.ts?511b","webpack://msdyn365.commerce.online/./src/modules/smwe-search/components/smwe-search.keywordsuggest.tsx?378f","webpack://msdyn365.commerce.online/./src/modules/smwe-search/components/smwe-search.productsuggest.tsx?3dda","webpack://msdyn365.commerce.online/./src/modules/smwe-search/components/smwe-search.categorysuggest.tsx?c893","webpack://msdyn365.commerce.online/./src/modules/smwe-search/components/smwe-search.form.tsx?b365","webpack://msdyn365.commerce.online/./src/modules/smwe-search/components/smwe-search.label.tsx?6de6","webpack://msdyn365.commerce.online/./src/modules/smwe-search/smwe-search.tsx?d385","webpack://msdyn365.commerce.online/./src/modules/smwe-search/smwe-search.view.tsx?12de","webpack://msdyn365.commerce.online/./src/themes/blend/views/smwe-search.view.tsx?7dc6","webpack://msdyn365.commerce.online/./src/themes/colsolare/views/smwe-search.view.tsx?6357","webpack://msdyn365.commerce.online/./src/themes/columbiacrest/views/smwe-search.view.tsx?353b","webpack://msdyn365.commerce.online/./src/themes/conn-creek/views/smwe-search.view.tsx?1efd","webpack://msdyn365.commerce.online/./src/themes/elicit/views/smwe-search.view.tsx?c5b3","webpack://msdyn365.commerce.online/./src/themes/emp/views/smwe-search.view.tsx?8bf9","webpack://msdyn365.commerce.online/./src/themes/enoteca/views/smwe-search.view.tsx?81b8","webpack://msdyn365.commerce.online/./src/themes/erath/views/smwe-search.view.tsx?4746","webpack://msdyn365.commerce.online/./src/themes/fth/views/smwe-search.view.tsx?3d00","webpack://msdyn365.commerce.online/./src/themes/generazioni/views/smwe-search.view.tsx?c1ed","webpack://msdyn365.commerce.online/./src/themes/intrinsic-wine-co/views/smwe-search.view.tsx?9431","webpack://msdyn365.commerce.online/./src/themes/north-star/views/smwe-search.view.tsx?b6a2","webpack://msdyn365.commerce.online/./src/themes/patzhall/views/smwe-search.view.tsx?7d90","webpack://msdyn365.commerce.online/./src/themes/spring-valley-vineyard/views/smwe-search.view.tsx?93ce","webpack://msdyn365.commerce.online/./src/themes/stagsleap/views/smwe-search.view.tsx?f319","webpack://msdyn365.commerce.online/./src/themes/stemichelle-new/views/smwe-search.view.tsx?cf97","webpack://msdyn365.commerce.online/./src/themes/stemichelle/views/smwe-search.view.tsx?d041","webpack://msdyn365.commerce.online/./src/themes/wine-estates/views/smwe-search.view.tsx?c04d","webpack://msdyn365.commerce.online/./src/modules/carousel/carousel.tsx?80d4","webpack://msdyn365.commerce.online/./src/modules/carousel/carousel.view.tsx?d82f","webpack://msdyn365.commerce.online/./src/validate-cart.ts?cd50","webpack://msdyn365.commerce.online/./src/Common/get-product.ts?0a21","webpack://msdyn365.commerce.online/./src/modules/cart-icon/components/flyout-cart-line-items.tsx?f2c4","webpack://msdyn365.commerce.online/./src/modules/cart-icon/utils/get-products-in-mini-cart.ts?3c15","webpack://msdyn365.commerce.online/./src/modules/cart-icon/cart-icon.tsx?4ae8","webpack://msdyn365.commerce.online/./src/modules/cart-icon/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/components/address-detail-item.tsx?d9a2","webpack://msdyn365.commerce.online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-date.tsx?bd12","webpack://msdyn365.commerce.online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-options-grp.tsx?3a15","webpack://msdyn365.commerce.online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-options-radio.tsx?045f","webpack://msdyn365.commerce.online/./src/modules/checkout-delivery-options/components/get-line-items.tsx?e389","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/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-invoice-payment-summary.tsx?9549","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/invoice-summary-lineitem.tsx?5f61","webpack://msdyn365.commerce.online/./src/order-summary-lineitem.tsx?8a98","webpack://msdyn365.commerce.online/./src/modules/order-template-list/components/order-template-list.tsx?86c4","webpack://msdyn365.commerce.online/./src/modules/order-template-list/components/orderTemplateList-status-message.tsx?183c","webpack://msdyn365.commerce.online/./src/modules/order-template-list/components/create-order-template.tsx?ea38","webpack://msdyn365.commerce.online/./src/modules/order-template-list/order-template-list.tsx?18d0","webpack://msdyn365.commerce.online/./src/modules/order-template-list/order-template-list.view.tsx?103b","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/spinner.tsx?b423","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/add-line.tsx?5f8a","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/dropdown.tsx?1cba","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/not-found.tsx?392d","webpack://msdyn365.commerce.online/./src/modules/order-template/components/common/order-template-quantity.tsx?99a1","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/product-configuration.tsx?b256","webpack://msdyn365.commerce.online/./src/modules/order-template/components/add-line/product-list.tsx?4284","webpack://msdyn365.commerce.online/./src/modules/order-template/components/bulk-actions.tsx?dbe8","webpack://msdyn365.commerce.online/./src/modules/order-template/components/order-template-actions.tsx?8136","webpack://msdyn365.commerce.online/./src/modules/order-template/components/order-template-lines.tsx?3703","webpack://msdyn365.commerce.online/./src/modules/order-template/components/order-template-lines-status-message.tsx?2986","webpack://msdyn365.commerce.online/./src/modules/order-template/components/order-template-table-heading.tsx?665c","webpack://msdyn365.commerce.online/./src/modules/order-template/order-template.tsx?4ecb","webpack://msdyn365.commerce.online/./src/modules/order-template/order-template.view.tsx?a45e","webpack://msdyn365.commerce.online/./src/modules/product-comparison-preview/product-comparison-preview.tsx?39f6","webpack://msdyn365.commerce.online/./src/modules/product-comparison-preview/product-comparison-preview.view.tsx?28cb","webpack://msdyn365.commerce.online/./src/modules/product-comparison/base/product-specification.tsx?75ed","webpack://msdyn365.commerce.online/./src/modules/product-comparison/base/remove-from-comparison-button.tsx?1d8c","webpack://msdyn365.commerce.online/./src/modules/product-comparison/product-comparison.tsx?4f74","webpack://msdyn365.commerce.online/./src/modules/product-comparison/product-comparison.view.tsx?a0a9","webpack://msdyn365.commerce.online/./src/modules/promo-banner/components/close-button.tsx?063b","webpack://msdyn365.commerce.online/./src/modules/promo-banner/components/links.tsx?2587","webpack://msdyn365.commerce.online/./src/modules/promo-banner/components/text.tsx?782b","webpack://msdyn365.commerce.online/./src/modules/promo-banner/promo-banner.tsx?9ee9","webpack://msdyn365.commerce.online/./src/modules/promo-banner/promo-banner.view.tsx?7f77","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/components/utilities.ts?1806","webpack://msdyn365.commerce.online/./src/modules/quick-order-grid/quick-order-grid.view.tsx?f941","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/utilities.ts?8569","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/choice-summary.tsx?3f71","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/error-message.tsx?6302","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/feature-search-result-item.tsx?71fa","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/link.tsx?52c2","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/modal.tsx?d78e","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/product-search-result-items.tsx?5174","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/range-refine-item.tsx?6288","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/refine-item.tsx?a594","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/range-refine-item-input.tsx?09aa","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/refine-submenu.tsx?1292","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/separator.tsx?4ea6","webpack://msdyn365.commerce.online/./src/modules/search-result-container/components/title.tsx?c269","webpack://msdyn365.commerce.online/./src/modules/search-result-container/search-result-container.tsx?7500","webpack://msdyn365.commerce.online/./src/modules/search-result-container/search-result-container.view.tsx?b779","webpack://msdyn365.commerce.online/./src/search-state.ts?dd10","webpack://msdyn365.commerce.online/./src/modules/social-share-item/social-share-item.tsx?bbcb","webpack://msdyn365.commerce.online/./src/modules/social-share-item/social-share-item.view.tsx?2d3e","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"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { ArrayExtensions, getFallbackImageUrl, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { IComponentProps, IGridSettings, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { ChannelDeliveryOptionConfiguration, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { CartLine as CartLineType, SalesLine as SalesLineType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classNames from 'classnames';\r\nimport * as React from 'react';\r\nimport { MasterProdDisplay } from './master-prod-display-name';\r\n\r\n/**\r\n * ICartlineResourceString: Interface for specifying the\r\n * resource strings that the component needs\r\n */\r\nexport interface ICartlineResourceString {\r\n /** Display string for discount label */\r\n discountStringText: string;\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n /** Display string for quantity label */\r\n quantityDisplayString: string;\r\n /** Display string for quantity label */\r\n inputQuantityAriaLabel: string;\r\n /** Aria label for the decrement button in quanitity component */\r\n decrementButtonAriaLabel?: string;\r\n /** Aria label for the increment button in quanitity component */\r\n incrementButtonAriaLabel?: string;\r\n /** original text screenreader */\r\n originalPriceText: string;\r\n /** current text screenreader */\r\n currentPriceText: string;\r\n /** shipping Charges Text */\r\n shippingChargesText: string;\r\n}\r\n\r\ninterface ICartLineData {\r\n cartLine: CartLineType | SalesLineType;\r\n product?: SimpleProduct;\r\n}\r\n\r\nexport type CartLineDisplayMode = 'DEFAULT' | 'COMPACT';\r\n\r\n/**\r\n * ICartLineProps: The props required to render cartLineitem\r\n */\r\nexport interface ICartLineProps extends IComponentProps {\r\n /** The flag to change the quantity component from interactible to static */\r\n disableQuantityInteractivity?: boolean;\r\n /** The primary image url */\r\n primaryImageUrl?: string;\r\n /** The product url */\r\n productUrl?: string;\r\n /** GridSettings for the product image in cartLine */\r\n gridSettings: IGridSettings;\r\n /** ImageSettings for the product image in cartLine */\r\n imageSettings: IImageSettings;\r\n /** Boolean flag to indicate if the item is out of stock */\r\n isOutOfStock?: boolean;\r\n /** Flag to make quantity section editable */\r\n isQuantityEditable?: boolean;\r\n /** Max quantity for line item */\r\n maxQuantity?: number;\r\n /** Current quantity for line item */\r\n currentQuantity?: number;\r\n /** Resource string for the component */\r\n resources: ICartlineResourceString;\r\n /** SalesLine flag */\r\n isSalesLine?: boolean;\r\n /** Error message to show in place of quantity */\r\n errorMessage?: string;\r\n /** Display mode to use */\r\n displayMode?: CartLineDisplayMode;\r\n /** Inventory information label */\r\n inventoryInformationLabel?: string;\r\n /** Inventory information class name */\r\n inventoryLabelClassName?: string;\r\n /** Flag to show/hide shipping charges for line items */\r\n showShippingChargesForLineItems?: boolean;\r\n /** Boolean flag to indicate if cart state status is ready */\r\n isCartStateReady?: boolean;\r\n /** Chanel Delivery Option configuration is from api. */\r\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n /** The telemetry content */\r\n telemetryContent?: ITelemetryContent;\r\n /** Quantity onChange callback */\r\n quantityOnChange?(cartLine: CartLineType, newQuantity: number): void;\r\n}\r\n\r\ninterface IDimensionStrings {\r\n /** String for size key */\r\n sizeString: string;\r\n /** String for color key */\r\n colorString: string;\r\n /** String associated with the configuration product dimension */\r\n configString: string;\r\n /** String for style key */\r\n styleString: string;\r\n /** String for amount key */\r\n amountString?: string;\r\n}\r\n\r\nconst CartLineItemFunctions = {\r\n renderProductDimensions: (Product: SimpleProduct, DimensionStrings: IDimensionStrings) => {\r\n if (!Product || !Product.Dimensions) {\r\n return [];\r\n }\r\n\r\n return Product.Dimensions.map(productDimension => {\r\n\r\n if (productDimension.DimensionTypeValue === 1) {\r\n return (\r\n
\r\n {DimensionStrings.colorString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 2) {\r\n return (\r\n
\r\n {DimensionStrings.configString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 3) {\r\n return (\r\n
\r\n {DimensionStrings.sizeString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n\r\n if (productDimension.DimensionTypeValue === 4) {\r\n return (\r\n
\r\n {Product.IsGiftCard ? DimensionStrings.amountString : DimensionStrings.styleString}\r\n {productDimension.DimensionValue && productDimension.DimensionValue.Value}\r\n
\r\n );\r\n }\r\n return null;\r\n });\r\n },\r\n renderDiscountLines: (props: ICartLineProps) => {\r\n\r\n if (!props.data.cartLine.DiscountLines || props.data.cartLine.DiscountLines.length === 0) {\r\n return null;\r\n }\r\n return props.data.cartLine.DiscountLines.map((discountLine, index) => {\r\n return (\r\n
\r\n \r\n {discountLine.OfferName ? discountLine.OfferName : ''}:\r\n {` ${props.resources.discountStringText || 'Discount'} `}\r\n \r\n \r\n {discountLine.DiscountCost && (\r\n <>\r\n \r\n \r\n )}\r\n \r\n \r\n {` (${discountLine.Percentage !== undefined ? discountLine.Percentage : ''}%)`}\r\n \r\n
\r\n );\r\n });\r\n },\r\n renderInventoryLabel: (props: ICartLineProps) => {\r\n if (!props.inventoryInformationLabel) {\r\n return null;\r\n }\r\n const inventoryCssName = props.inventoryLabelClassName ? `msc-cart-line__product-inventory-label ${props.inventoryLabelClassName}` : 'msc-cart-line__product-inventory-label';\r\n return (\r\n {props.inventoryInformationLabel}\r\n );\r\n },\r\n renderShippingLabel: (props: ICartLineProps) => {\r\n const pickupDeliveryModeCode = props.context.request.channel?.PickupDeliveryModeCode;\r\n const channelDeliveryOptionConfig = props.channelDeliveryOptionConfig;\r\n const cartline = props.data.cartLine;\r\n let hasShippingMethod = false;\r\n if(channelDeliveryOptionConfig !== undefined) {\r\n hasShippingMethod = !!cartline.DeliveryMode && channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.some(deliveryMode => deliveryMode !== cartline.DeliveryMode) ? true : false;\r\n } else {\r\n hasShippingMethod = !!cartline.DeliveryMode && cartline.DeliveryMode !== pickupDeliveryModeCode ? true : false;\r\n }\r\n if (!hasShippingMethod) {\r\n return undefined;\r\n }\r\n\r\n const shippingChargeLines = (cartline.ChargeLines || []).filter(chargeLine => chargeLine.IsShipping);\r\n\r\n if (shippingChargeLines.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const freightFee = shippingChargeLines.reduce((chargeTotal, chargeLine) => {\r\n return chargeTotal + (chargeLine.CalculatedAmount || 0);\r\n }, 0);\r\n\r\n const priceComponent = (\r\n \r\n );\r\n return (\r\n <>\r\n \r\n \r\n {priceComponent}\r\n \r\n \r\n );\r\n },\r\n renderOtherCharges: (props: ICartLineProps) => {\r\n const cartline = props.data.cartLine;\r\n const otherCharges = cartline.ChargeLines?.filter((chargeline) => !chargeline.IsShipping);\r\n\r\n return otherCharges && otherCharges.map((otherCharge, key) => {\r\n return otherCharge && otherCharge.CalculatedAmount ? (\r\n
\r\n \r\n \r\n \r\n \r\n
\r\n ) : '';\r\n }) || undefined;\r\n }\r\n};\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nconst CartLine: React.FC = (props: ICartLineProps) => {\r\n const { isSalesLine, productUrl, resources } = props;\r\n const { product, cartLine } = props.data;\r\n\r\n const destructDimensionStrings = {\r\n sizeString: resources.sizeString,\r\n colorString: resources.colorString,\r\n styleString: resources.styleString,\r\n configString: resources.configString,\r\n amountString: resources.amountString\r\n };\r\n const fallbackImageUrl = product && getFallbackImageUrl(product.ItemId, props.context.actionContext.requestContext.apiSettings);\r\n const imageSettings = props.imageSettings;\r\n imageSettings.cropFocalRegion = !ObjectExtensions.isNullOrUndefined(imageSettings);\r\n const { inputQuantityAriaLabel } = props.resources;\r\n const productDimensions = product && CartLineItemFunctions.renderProductDimensions(product, destructDimensionStrings);\r\n const renderDisountLines = CartLineItemFunctions.renderDiscountLines(props);\r\n const renderInventoryLabel = CartLineItemFunctions.renderInventoryLabel(props);\r\n const renderShippingLabel = CartLineItemFunctions.renderShippingLabel(props);\r\n const renderOtherCharges = CartLineItemFunctions.renderOtherCharges(props);\r\n const payLoad = getPayloadObject('click', props.telemetryContent!, '', product?.RecordId.toString());\r\n const prodAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n const productName = product?.Name || cartLine.Description;\r\n\r\n const _generateErrorMessage = (): JSX.Element | null => {\r\n if (props.errorMessage) {\r\n return (\r\n
\r\n \r\n {props.errorMessage}\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n };\r\n\r\n const _updateQuantity = (event: React.ChangeEvent) => {\r\n if (props.quantityOnChange) {\r\n props.quantityOnChange(props.data.cartLine, parseInt(event.target.value, 10));\r\n }\r\n };\r\n\r\n const _generateMenu = (quantity: number) => {\r\n const nodes = [];\r\n\r\n for (let i = 1; i <= quantity; i++) {\r\n\r\n // tslint:disable-next-line:react-a11y-role-has-required-aria-props\r\n nodes.push();\r\n }\r\n\r\n return nodes;\r\n };\r\n\r\n const _generateSelectMenu = (quantity: number, currentQuantity: number | undefined): JSX.Element => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _generateQuantityAndPrice = (): JSX.Element[] | null => {\r\n const nodes = [];\r\n\r\n const errorMessage = _generateErrorMessage();\r\n\r\n if (props.isOutOfStock) {\r\n if (errorMessage) {\r\n return [errorMessage];\r\n }\r\n\r\n return null;\r\n }\r\n\r\n if (props.isQuantityEditable && !props.data.product?.IsGiftCard) {\r\n if (errorMessage) {\r\n nodes.push(errorMessage);\r\n }\r\n nodes.push(_generateSelectMenu(props.maxQuantity || 10, props.currentQuantity));\r\n } else {\r\n nodes.push(\r\n
\r\n \r\n {errorMessage}\r\n {props.data.cartLine.Quantity}\r\n
\r\n );\r\n }\r\n\r\n nodes.push(\r\n
\r\n \r\n
\r\n );\r\n\r\n return nodes;\r\n };\r\n\r\n if (props.displayMode === 'COMPACT') {\r\n const reducedDimensions: string = product?.Dimensions ? product.Dimensions.reduce(\r\n (str, productDimension) => {\r\n if (productDimension.DimensionValue && productDimension.DimensionValue.Value) {\r\n if (str) {\r\n return `${str}, ${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return `${productDimension.DimensionValue.Value}`;\r\n }\r\n\r\n return str;\r\n },\r\n '') : '';\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n {productName}\r\n {reducedDimensions !== '' ?\r\n
{reducedDimensions}
:\r\n ''\r\n }\r\n {\r\n _generateQuantityAndPrice()\r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n let jsxName = {productName};\r\n if (product?.MasterProductId) {\r\n jsxName = ;\r\n }\r\n\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n
\r\n {jsxName}\r\n {\r\n ArrayExtensions.hasElements(productDimensions) ?\r\n
{productDimensions}
:\r\n ''\r\n }\r\n {renderDisountLines}\r\n {renderInventoryLabel}\r\n {props.showShippingChargesForLineItems &&
\r\n {renderShippingLabel}\r\n
}\r\n {renderOtherCharges}\r\n
\r\n {\r\n _generateQuantityAndPrice()\r\n }\r\n
\r\n
\r\n );\r\n};\r\n\r\n// @ts-ignore\r\nexport const CartLineItemComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'CartLineItem',\r\n { component: CartLine, ...CartLineItemFunctions }\r\n);","import React from 'react';\r\nimport { ICartLineProps } from './cartlineitem.component';\r\nimport { ICartLineProps as ICheckoutCartLineProps } from './cartlineitem-variant.component';\r\nimport { getSelectedVariant, SelectedVariantInput } from '@msdyn365-commerce-modules/retail-actions';\r\n\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\n\r\ninterface IMasterProdDisplay {\r\n masterProdId: number,\r\n variantName: string,\r\n props: ICartLineProps | ICheckoutCartLineProps\r\n}\r\nexport class MasterProdDisplay extends React.Component {\r\n constructor(props: IMasterProdDisplay) {\r\n super(props);\r\n this.state = {\r\n prodName: ''\r\n };\r\n }\r\n public componentDidMount() {\r\n const masterProductInput = new SelectedVariantInput(this.props.masterProdId, this.props.props.context.request.apiSettings.channelId);\r\n getSelectedVariant(masterProductInput, this.props.props.context.actionContext).then(masterProduct => {\r\n this.setState({ prodName: masterProduct?.Name || '' });\r\n }).catch(e => console.error(e));\r\n }\r\n\r\n public render(): JSX.Element {\r\n let name = {this.props.variantName};\r\n if (this.state.prodName !== '') {\r\n name = {this.state.prodName} - {this.props.variantName};\r\n }\r\n return name;\r\n }\r\n}\r\n\r\nexport async function getMasterProduct(masterId: number, ctx: IActionContext): Promise {\r\n const masterProductInput = new SelectedVariantInput(masterId, ctx.requestContext.apiSettings.channelId);\r\n return getSelectedVariant(masterProductInput, ctx);\r\n}","/* eslint-disable no-duplicate-imports */\r\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\r\nimport {\r\n CacheType, createObservableDataAction, IAction, IActionContext, IActionInput,\r\n ICreateActionContext\r\n} from '@msdyn365-commerce/core';\r\nimport { SearchSuggestion, SearchSuggestionCriteria } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getSearchSuggestionsAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\n\r\n// @ts-ignore\r\nexport const enum SuggestionType {\r\n Category = 'ScopedCategory',\r\n Keyword = 'Keyword',\r\n Product = 'Product',\r\n None = 'None'\r\n}\r\n\r\n/**\r\n * Input class for auto suggest search input\r\n */\r\nexport class AutoSuggestInput implements IActionInput {\r\n public searchQuery?: string;\r\n public topResultsCount?: number;\r\n public suggestionType?: string;\r\n public hitPrefix?: string;\r\n public hitSuffix?: string;\r\n\r\n constructor(searchText?: string, top?: number, suggestionType?: string, hitPrefix?: string, hitSuffix?: string) {\r\n this.searchQuery = searchText;\r\n this.topResultsCount = top;\r\n this.suggestionType = suggestionType;\r\n this.hitPrefix = hitPrefix;\r\n this.hitSuffix = hitSuffix;\r\n }\r\n\r\n public getCacheKey = () => `AutoSuggestSearchSuggestions`;\r\n public getCacheObjectType = () => 'AutoSuggestSearchSuggestions';\r\n public dataCacheType = (): CacheType => 'none';\r\n}\r\n\r\nconst createInput = (inputData: ICreateActionContext) => {\r\n return new AutoSuggestInput();\r\n};\r\n\r\n/**\r\n * Calls the Retail API and returns a auto-suggest suggestions\r\n */\r\nexport async function getSearchSuggestionsAction(input: AutoSuggestInput, ctx: IActionContext): Promise {\r\n // If no input is provided fail out\r\n if (!input || !input.searchQuery) {\r\n throw new Error('[getSearchSuggestionsAction]No valid Input was provided, failing');\r\n }\r\n\r\n const autosuggest: Autosuggestions = {};\r\n\r\n const autoSuggestPromises = [\r\n _getAutoSuggest(input, autosuggest, ctx),\r\n ];\r\n return Promise.all(autoSuggestPromises).then(() => {\r\n return autosuggest;\r\n });\r\n}\r\n\r\nasync function _getAutoSuggest(\r\n input: AutoSuggestInput,\r\n autosuggest: Autosuggestions,\r\n ctx: IActionContext\r\n): Promise {\r\n const searchCriteria: SearchSuggestionCriteria = {\r\n ProductSearchCriteria: {\r\n SearchCondition: input.searchQuery && input.searchQuery.length > 0 ? input.searchQuery : '',\r\n Context: {\r\n ChannelId: +ctx.requestContext.apiSettings.channelId,\r\n CatalogId: +ctx.requestContext.apiSettings.catalogId\r\n }\r\n },\r\n HitPrefix: input.hitPrefix,\r\n HitSuffix: input.hitSuffix,\r\n SuggestionType: input.suggestionType\r\n };\r\n\r\n const searchSuggestions = await getSearchSuggestionsAsync(\r\n { callerContext: ctx, queryResultSettings: { Paging: { Top: input.topResultsCount } } },\r\n searchCriteria\r\n );\r\n\r\n if (searchSuggestions && searchSuggestions.length > 0) {\r\n // Generate image url\r\n searchSuggestions.map(\r\n (item: SearchSuggestion) =>\r\n (item.ImageUrl = item.ImageUrl ? generateImageUrl(item.ImageUrl, ctx.requestContext.apiSettings) : '')\r\n );\r\n\r\n autosuggest.AllSearchResults = searchSuggestions;\r\n } else {\r\n ctx.telemetry.error(`[getSearchSuggestionsAction] unable to get availabilites for search with suggestion type ${searchCriteria.SuggestionType}`);\r\n }\r\n}\r\n\r\nexport default createObservableDataAction({\r\n id: '@msdyn365-commerce-modules/search/get-auto-suggest-suggestions',\r\n action: >getSearchSuggestionsAction,\r\n input: createInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. 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\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { ISmweSearchData } from '../smwe-search.data';\r\nimport { ISmweSearchProps } from '../smwe-search.props.autogenerated';\r\n\r\nexport interface ISearchKeywordSuggestProps {\r\n searchKeywordSuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: ISmweSearchProps;\r\n searchText: string;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ISearchKeywordViewProps {\r\n text: React.ReactNode[];\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\n\r\n/**\r\n *\r\n * KeywordSuggestionsComponent\r\n */\r\nexport const KeywordSuggestionsComponent = (props: ISearchKeywordSuggestProps): ISearchKeywordViewProps | undefined => {\r\n const {\r\n suggestions,\r\n hitPrefix,\r\n hitSuffix\r\n } = props;\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n const reactNodes: React.ReactNode[] = [];\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, props));\r\n });\r\n\r\n return { text: reactNodes };\r\n};\r\n\r\nconst _assembleNode = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps) => {\r\n const ariaLabel = item.Value &&\r\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n payLoad.contentAction.etext = ariaLabel;\r\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n return (\r\n
  • \r\n \r\n {_generateLink(item, hitPrefix, hitSuffix, props) &&\r\n _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\r\n \r\n
  • \r\n );\r\n};\r\n\r\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, props: ISearchKeywordSuggestProps): string => {\r\n const { searchPageURL, searchQsp } = props;\r\n\r\n const formattedLink = (suggestion.Value as string)\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n const route = searchPageURL || '';\r\n return formattedLink && formattedLink.length > 0\r\n ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${searchQsp}=${formattedLink}`\r\n : route;\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n const formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return ;\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. 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\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { getRichTextHtml, IActionContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\r\nimport { SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getPayloadObject, getTelemetryAttributes, INodeProps, IPayLoad, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport { ISmweSearchData } from '../smwe-search.data';\r\nimport { ISmweSearchProps } from '../smwe-search.props.autogenerated';\r\n\r\nexport interface ISearchProductSuggestProps {\r\n searchProductSuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: ISmweSearchProps;\r\n searchText: string;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetry: ITelemetry;\r\n moduleType: string;\r\n moduleId: string;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ISearchProductViewProps {\r\n title: React.ReactNode;\r\n items: ISearchProductItemViewProps[];\r\n}\r\n\r\nexport interface ISearchProductItemViewProps {\r\n text: React.ReactNode;\r\n thumbnail: React.ReactNode;\r\n price: React.ReactNode;\r\n LiProduct: INodeProps;\r\n AProduct: INodeProps;\r\n id: string | undefined;\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\nlet telemetryContent: ITelemetryContent | undefined;\r\n\r\n/**\r\n *\r\n * ProductSuggestionsComponent\r\n */\r\nexport const ProductSuggestionsComponent = (props: ISearchProductSuggestProps): ISearchProductViewProps | undefined => {\r\n const {\r\n suggestions,\r\n hitSuffix,\r\n hitPrefix,\r\n autoSuggestProps: {\r\n context: { actionContext },\r\n resources: { productSuggestionHeading }\r\n },\r\n moduleType,\r\n moduleId\r\n } = props;\r\n const reactNodes: ISearchProductItemViewProps[] = [];\r\n telemetryContent = props.telemetryContent;\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, hitPrefix, hitSuffix, actionContext, props, moduleType, moduleId));\r\n });\r\n\r\n const titleNode = _renderTitle(productSuggestionHeading);\r\n\r\n return { title: titleNode, items: reactNodes };\r\n};\r\n\r\nconst _renderTitle = (productSuggestionHeading: string) => {\r\n const productAutoSuggestionHeading = productSuggestionHeading ? productSuggestionHeading : 'Go to products';\r\n\r\n return
  • {productAutoSuggestionHeading}
  • ;\r\n};\r\n\r\nconst _assembleNode = (\r\n item: SearchSuggestion,\r\n hitPrefix: string,\r\n hitSuffix: string,\r\n actionContext: IActionContext,\r\n props: ISearchProductSuggestProps,\r\n moduleType: string,\r\n moduleId: string\r\n): ISearchProductItemViewProps => {\r\n const altText =\r\n item.Value &&\r\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n return {\r\n text: _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix),\r\n thumbnail: _renderThumbnail(item, altText ? altText : '', props),\r\n price:\r\n item.Id &&\r\n item.Value3 &&\r\n item.Value3.Value &&\r\n item.Value3.Value.DecimalValue &&\r\n _renderPrice(item.Value3.Value.DecimalValue, item.Value3.Value.DecimalValue, moduleId, moduleType, props),\r\n LiProduct: _getLiWrapper(),\r\n AProduct: _getAWrapper(item, hitPrefix, hitSuffix, actionContext),\r\n id: item.Id\r\n };\r\n};\r\n\r\nconst _getLiWrapper = () => {\r\n return {\r\n className: 'msc-autoSuggest__productResults-item',\r\n tag: 'li' as NodeTag\r\n };\r\n};\r\n\r\nconst _getAWrapper = (item: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\r\n const ariaLabel = item.Value &&\r\n (item.Value).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n payLoad.contentAction.recid = item.Id;\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return {\r\n className: 'msc-autoSuggest__productResults-item',\r\n tag: 'a' as NodeTag,\r\n 'aria-label': ariaLabel,\r\n href: _generateLink(item, hitPrefix, hitSuffix, actionContext),\r\n ...attribute\r\n };\r\n};\r\n\r\nconst _generateLink = (suggestion: SearchSuggestion, hitPrefix: string, hitSuffix: string, actionContext: IActionContext) => {\r\n const formattedLink = (suggestion.Value as string).replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n return suggestion.Value && suggestion.Id ?\r\n getProductPageUrlSync(formattedLink,suggestion.Id as unknown as number, actionContext, undefined) : '';\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n const formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return ;\r\n};\r\n\r\nconst _renderPrice = (adjustedPrice: number, basePrice: number, moduleId: string, moduleType: string, props: ISearchProductSuggestProps): JSX.Element | null => {\r\n const {\r\n autoSuggestProps: { context }\r\n } = props;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst _renderThumbnail = (suggestion: SearchSuggestion, altText: string, props: ISearchProductSuggestProps): JSX.Element | null => {\r\n const {\r\n autoSuggestProps: {\r\n context: {\r\n request: { gridSettings }\r\n },\r\n config: { imageSettings }\r\n }\r\n } = props;\r\n if(imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n\r\n if (!suggestion || !suggestion.ImageUrl) {\r\n props.telemetry.error('Search suggestion content is empty, module wont render.');\r\n return null;\r\n }\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=40&h=40&m=6`, w: 0, h: 0 },\r\n xl: { q: `w=40&h=40&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n return (\r\n \r\n );\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. 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\nimport { getRichTextHtml } from '@msdyn365-commerce/core';\r\nimport { ProductRefiner, ProductRefinerValue, SearchSuggestion } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ISmweSearchData } from '../smwe-search.data';\r\nimport { ISmweSearchProps } from '../smwe-search.props.autogenerated';\r\n\r\nexport interface ISearchCategorySuggestProps {\r\n searchCategorySuggestClass: string;\r\n searchPageURL: string;\r\n searchQsp: string | undefined;\r\n hitPrefix: string;\r\n hitSuffix: string;\r\n autoSuggestProps: ISmweSearchProps;\r\n searchText: string;\r\n searchRefiners: ProductRefiner[] | undefined;\r\n suggestions: SearchSuggestion[] | undefined;\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\nexport interface ISearchCategoryViewProps {\r\n title: React.ReactNode;\r\n text: React.ReactNode[];\r\n}\r\n\r\nlet payLoad: IPayLoad;\r\n\r\n/**\r\n *\r\n * CategorySuggestionsComponent\r\n */\r\nexport const CategorySuggestionsComponent = (props: ISearchCategorySuggestProps): ISearchCategoryViewProps | undefined => {\r\n const {\r\n suggestions,\r\n searchText,\r\n autoSuggestProps: {\r\n resources: { categorySuggestionHeading }\r\n }\r\n } = props;\r\n\r\n if (!suggestions) {\r\n return undefined;\r\n }\r\n\r\n const reactNodes: React.ReactNode[] = [];\r\n payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n\r\n suggestions.map(item => {\r\n reactNodes.push(_assembleNode(item, props));\r\n });\r\n\r\n const titleNode = _renderTitle(categorySuggestionHeading, searchText);\r\n\r\n return { title: titleNode, text: reactNodes };\r\n};\r\n\r\nconst _renderTitle = (categorySuggestionHeading: string, searchText: string) => {\r\n const categoryAutoSuggestionHeading = categorySuggestionHeading\r\n ? format(categorySuggestionHeading, searchText)\r\n : `Search \"${searchText}\" in categories`;\r\n\r\n return
  • {categoryAutoSuggestionHeading}
  • ;\r\n};\r\n\r\nconst _assembleNode = (item: SearchSuggestion, props: ISearchCategorySuggestProps) => {\r\n const { searchText, hitPrefix, hitSuffix } = props;\r\n\r\n const splitValue = item.Value && item.Value.split('|').pop();\r\n const ariaLabel = splitValue\r\n ? splitValue.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '')\r\n : item.Value && item.Value.replace(new RegExp(`[${hitPrefix}]`, 'gi'), '').replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n payLoad.contentAction.etext = item.Value;\r\n const attribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\r\n return (\r\n
  • \r\n \r\n {_generateLink(item, searchText, props) && _getHighlightedText(item.Value ? item.Value : '', hitPrefix, hitSuffix)}\r\n \r\n
  • \r\n );\r\n};\r\n\r\nconst _generateLink = (suggestion: SearchSuggestion, searchText: string, props: ISearchCategorySuggestProps): string => {\r\n return suggestion && suggestion.Id ? _getCategoryLink(suggestion.Id, searchText, props) : '';\r\n};\r\n\r\nconst _getCategoryLink = (id: string, searchText: string, props: ISearchCategorySuggestProps): string => {\r\n const { searchPageURL, searchQsp, searchRefiners } = props;\r\n\r\n const route = searchPageURL || '';\r\n const urlPath = `${route}${route.indexOf('?') === -1 ? '?' : '&'}${searchQsp}=${searchText}`;\r\n const categoryRefiners =\r\n searchRefiners &&\r\n searchRefiners.find(refiners => {\r\n return refiners.KeyName === 'Category';\r\n });\r\n const refiner =\r\n categoryRefiners &&\r\n categoryRefiners.Values &&\r\n categoryRefiners.Values.find(item => {\r\n return item.RefinerRecordId === parseInt(id, 10);\r\n });\r\n\r\n const encodedRefiner = refiner && encodeURIComponent(JSON.stringify(compressRefiners([refiner])));\r\n\r\n return encodedRefiner ? `${urlPath}&refiners=${encodedRefiner}` : urlPath;\r\n};\r\n\r\nconst _getHighlightedText = (suggestion: string, hitPrefix: string, hitSuffix: string): JSX.Element => {\r\n let formattedText = suggestion\r\n .replace(new RegExp(`[${hitPrefix}]`, 'gi'), '')\r\n .replace(new RegExp(`[${hitSuffix}]`, 'gi'), '');\r\n formattedText = formattedText.split('|').pop() || '';\r\n\r\n // tslint:disable:react-no-dangerous-html\r\n return ;\r\n};\r\n\r\n// TODO: This code is currently duplicated in categoryautosuggest need to either remove one of these files\r\n// or move this code to a common place\r\nconst compressedRefinerKeys = ['DataTypeValue', 'LeftValueBoundString', 'RefinerRecordId', 'RefinerSourceValue', 'RightValueBoundString', 'UnitText'];\r\n\r\n/**\r\n * Compressed a list of refiners for use in URLs\r\n * @param refiners The uncompressed refiners\r\n */\r\nconst compressRefiners = (refiners: ProductRefinerValue[]) => {\r\n const compressedRefiners: (string | number)[][] = [];\r\n\r\n refiners.forEach((refiner) => {\r\n const compressedRefiner: (string | number)[] = [];\r\n compressedRefinerKeys.forEach((refinerKey) => {\r\n // @ts-ignore: This line is intentionally not typesafe\r\n compressedRefiner.push(refiner[refinerKey]);\r\n });\r\n compressedRefiners.push(compressedRefiner);\r\n });\r\n\r\n return compressedRefiners;\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ISearchFormProps {\r\n hideSearchLabel: boolean | undefined;\r\n isSearchFormExpanded: boolean | undefined;\r\n disableSubmitSearch: boolean | undefined;\r\n searchTextInput: React.RefObject;\r\n maxChars: number;\r\n searchQsp: string;\r\n searchPlaceholder: string;\r\n query: string;\r\n ariaLabelCancel: string;\r\n ariaLabelSearch: string;\r\n ariaLabelSubmit: string;\r\n handleCancelSearchChange(): void;\r\n handleInputChange(query: string): void;\r\n}\r\n\r\nexport interface ISearchFormViewProps {\r\n label: React.ReactNode;\r\n input: React.ReactNode;\r\n submitBtn: React.ReactNode;\r\n cancelBtn: React.ReactNode;\r\n\r\n}\r\n\r\nexport const FormComponent = (props: ISearchFormProps): ISearchFormViewProps => {\r\n const {\r\n searchQsp,\r\n searchPlaceholder,\r\n hideSearchLabel,\r\n isSearchFormExpanded,\r\n searchTextInput,\r\n handleInputChange,\r\n maxChars,\r\n disableSubmitSearch,\r\n handleCancelSearchChange,\r\n query,\r\n ariaLabelCancel,\r\n ariaLabelSearch,\r\n ariaLabelSubmit\r\n } = props;\r\n\r\n const onInputChange = (e: React.ChangeEvent): void => {\r\n handleInputChange(e.target.value || '');\r\n };\r\n\r\n const labelNode = ;\r\n\r\n const inputNode = !hideSearchLabel ? (\r\n \r\n ) : (\r\n \r\n );\r\n\r\n const submitBtnNode = !disableSubmitSearch && (\r\n \r\n \r\n );\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { createSearchStateInput } from '@msdyn365-commerce-modules/search-utilities';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, KeyCodes } from '@msdyn365-commerce-modules/utilities';\r\nimport { Autosuggestions } from '@msdyn365-commerce/commerce-entities';\r\nimport { getUrlSync } from '@msdyn365-commerce/core';\r\nimport { ProductRefiner } from '@msdyn365-commerce/retail-proxy';\r\nimport { getProductSearchRefinersAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\r\nimport classnames from 'classnames';\r\nimport { debounce } from 'lodash';\r\nimport * as React from 'react';\r\n\r\nimport getSearchSuggestionsAction, { AutoSuggestInput, SuggestionType } from './actions/get-auto-suggest-suggestions';\r\nimport {\r\n CategorySuggestionsComponent,\r\n FormComponent,\r\n ISearchCategoryViewProps,\r\n ISearchKeywordViewProps,\r\n ISearchProductViewProps,\r\n KeywordSuggestionsComponent,\r\n LabelComponent,\r\n ProductSuggestionsComponent\r\n} from './components';\r\nimport { ISmweSearchData } from './smwe-search.data';\r\nimport { ISmweSearchProps, ISuggestionTypeCriterionData } from './smwe-search.props.autogenerated';\r\n\r\nexport interface ISearchState {\r\n isSearchFormExpanded: boolean;\r\n searchText: string;\r\n searchKeywordSuggestClass: string;\r\n searchProductSuggestClass: string;\r\n searchCategorySuggestClass: string;\r\n suggestions: Autosuggestions | undefined;\r\n searchRefiners?: ProductRefiner[] | undefined;\r\n autoSuggestAriaLabel: string;\r\n isInitialState: boolean;\r\n}\r\n\r\nexport interface ISearchViewProps extends ISmweSearchProps {\r\n Search: IModuleProps;\r\n AutoSuggestAriaLabel: INodeProps;\r\n AutoSuggestAriaLabelText: string;\r\n searchText: string;\r\n AutoSuggest: INodeProps;\r\n KeywordSuggest: INodeProps;\r\n ProductSuggest: INodeProps;\r\n CategorySuggest: INodeProps;\r\n SearchForm: INodeProps;\r\n FormWrapper: INodeProps;\r\n UlKeyword: INodeProps;\r\n UlProduct: INodeProps;\r\n UlCategory: INodeProps;\r\n label: React.ReactNode;\r\n form: React.ReactNode;\r\n autosuggestKeyword?: ISearchKeywordViewProps;\r\n autosuggestProduct?: ISearchProductViewProps;\r\n autosuggestCategory?: ISearchCategoryViewProps;\r\n callbacks: {\r\n handleCancelSearchChange(): void;\r\n };\r\n isSearchFormExpanded: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Search module\r\n * @extends {React.Component, ISearchState>}\r\n */\r\nclass Search extends React.Component, ISearchState> {\r\n private searchTextInput: React.RefObject;\r\n private searchCollapsedLabel: React.RefObject;\r\n private formReference: React.RefObject;\r\n private maxChars: number;\r\n private inputSuggestionType?: ISuggestionTypeCriterionData[];\r\n private topResultsCount?: number;\r\n private hitPrefix: string = '{';\r\n private hitSuffix: string = '}';\r\n private waitTime: number = 500;\r\n private autoSuggestResultScreenReaderDiv: React.RefObject;\r\n private autoSuggestResultDiv: React.RefObject;\r\n private searchFormClass: string;\r\n private searchLabelClass: string;\r\n private telemetryContent: ITelemetryContent;\r\n // @ts-ignore\r\n private cancellabelDebounce: debounce;\r\n\r\n constructor(props: ISmweSearchProps) {\r\n super(props);\r\n this.searchTextInput = React.createRef();\r\n this.searchCollapsedLabel = React.createRef();\r\n this.autoSuggestResultScreenReaderDiv = React.createRef();\r\n this.autoSuggestResultDiv = React.createRef();\r\n this.formReference = React.createRef();\r\n this.state = {\r\n isSearchFormExpanded: false,\r\n searchText: '',\r\n searchKeywordSuggestClass: 'ms-search__autoSuggest__keyword',\r\n searchProductSuggestClass: 'ms-search__autoSuggest__product',\r\n searchCategorySuggestClass: 'ms-search__autoSuggest__category',\r\n suggestions: undefined,\r\n searchRefiners: undefined,\r\n autoSuggestAriaLabel: '',\r\n isInitialState: true\r\n };\r\n this.maxChars =\r\n (this.props.context &&\r\n this.props.context.app &&\r\n this.props.context.app.config &&\r\n this.props.context.app.config.searchInputMaxLength) ||\r\n 50;\r\n this.inputSuggestionType = this.props.config && this.props.config.suggestionTypeCriterion;\r\n this.topResultsCount = this.props.config && this.props.config.topResultsCount ? this.props.config.topResultsCount : 5;\r\n this.searchFormClass = 'ms-search__form';\r\n this.searchLabelClass = 'ms-search__label';\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n document.body && document.body.addEventListener('mousedown', this._focusOutTarget);\r\n window && window.addEventListener('keyup', this._keyup);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n document.body && document.body.removeEventListener('mousedown', this._focusOutTarget, false);\r\n window && window.removeEventListener('keyup', this._keyup, false);\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n const {\r\n config: { hideSearchLabel }\r\n } = this.props;\r\n const { isSearchFormExpanded, isInitialState } = this.state;\r\n\r\n if (!this.props.context.request.params.isEditor) {\r\n if (!hideSearchLabel && isSearchFormExpanded) {\r\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\r\n } else if (!isInitialState) {\r\n this.searchCollapsedLabel && this.searchCollapsedLabel.current && this.searchCollapsedLabel.current.focus();\r\n }\r\n }\r\n }\r\n\r\n // tslint:disable-next-line: cyclomatic-complexity max-func-body-length\r\n public render(): JSX.Element {\r\n const {\r\n context,\r\n resources: { searchtext, searchLabelArialLabel, cancelBtnAriaLabel, searchBtnAriaLabel, submitBtnAriaLabel},\r\n config: { hideSearchLabel, disableSubmitSearch, searchplaceholderText, className = '' }\r\n } = this.props;\r\n\r\n const {\r\n isSearchFormExpanded,\r\n searchText,\r\n searchKeywordSuggestClass,\r\n searchProductSuggestClass,\r\n searchCategorySuggestClass,\r\n suggestions,\r\n searchRefiners\r\n } = this.state;\r\n\r\n const searchQsp = (context && context.app && context.app.config && context.app.config.searchQueryStringParameter) || 'q';\r\n const searchPageURL = getUrlSync('search', context && context.actionContext) || '';\r\n const searchURL = this._appendQueryParams(searchPageURL, searchText, searchQsp);\r\n const searchPlaceholder = searchplaceholderText && searchplaceholderText.length > 0 ? searchplaceholderText : 'Search in Fabrikam';\r\n\r\n const keywordSuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter(\r\n i => i.SuggestionType === SuggestionType.Keyword || i.SuggestionType === SuggestionType.None\r\n );\r\n const productSuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter(i => i.SuggestionType === SuggestionType.Product);\r\n const categorySuggestions =\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n suggestions.AllSearchResults.filter(i => i.SuggestionType === SuggestionType.Category);\r\n\r\n const viewProps: ISearchViewProps = {\r\n ...(this.props as ISmweSearchProps),\r\n\r\n Search: {\r\n moduleProps: this.props,\r\n className: `${classnames('ms-search', className)} ${disableSubmitSearch ? 'no-submit' : 'with-submit'}`,\r\n },\r\n AutoSuggestAriaLabel: {\r\n tag: 'div',\r\n className: 'msc-autoSuggest__screen-reader',\r\n 'aria-live': 'assertive',\r\n ref: this.autoSuggestResultScreenReaderDiv\r\n },\r\n AutoSuggestAriaLabelText: this.state.autoSuggestAriaLabel,\r\n searchText: this.state.searchText,\r\n AutoSuggest: {\r\n ref: this.autoSuggestResultDiv,\r\n className: 'ms-search__autoSuggest'\r\n },\r\n KeywordSuggest: {\r\n className: searchKeywordSuggestClass\r\n },\r\n ProductSuggest: {\r\n className: searchProductSuggestClass\r\n },\r\n CategorySuggest: {\r\n className: searchCategorySuggestClass\r\n },\r\n SearchForm: {\r\n className: `${this.searchFormClass} ${isSearchFormExpanded ? 'bx-show' : 'bx-hide'}`,id:'SearchFormModal'\r\n },\r\n FormWrapper: {\r\n tag: 'form',\r\n ref: this.formReference,\r\n className: 'ms-search__searchForm',\r\n 'aria-label': 'Search',\r\n name: 'searchForm',\r\n role: 'search',\r\n action: searchURL,\r\n autoComplete: 'off',\r\n onSubmit: this._handleSubmit\r\n },\r\n UlKeyword: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__keywordResults-items', className)\r\n },\r\n UlProduct: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__productResults-items', className)\r\n },\r\n UlCategory: {\r\n tag: 'ul',\r\n className: classnames('msc-autoSuggest__categoryResults-items', className)\r\n },\r\n label:LabelComponent({\r\n isSearchFormExpanded: isSearchFormExpanded,\r\n searchLabelClass: `${this.searchLabelClass} ${isSearchFormExpanded ? 'bx-hide' : 'bx-show'}`,\r\n searchtext: searchtext,\r\n searchLabelArialLabel: searchLabelArialLabel,\r\n searchCollapsedLabel: this.searchCollapsedLabel,\r\n hideSearchLabel: hideSearchLabel,\r\n handleCancelSearchChange: this._handleCancelSearchChange,\r\n telemetryContent: this.telemetryContent\r\n }),\r\n form: FormComponent({\r\n ariaLabelCancel: cancelBtnAriaLabel,\r\n ariaLabelSearch: searchBtnAriaLabel,\r\n ariaLabelSubmit: submitBtnAriaLabel,\r\n hideSearchLabel: hideSearchLabel,\r\n searchTextInput: this.searchTextInput,\r\n isSearchFormExpanded: isSearchFormExpanded,\r\n disableSubmitSearch: disableSubmitSearch,\r\n handleInputChange: this._handleInputChange,\r\n handleCancelSearchChange: this._handleCancelSearchChange,\r\n maxChars: this.maxChars,\r\n searchQsp: searchQsp,\r\n searchPlaceholder: searchPlaceholder,\r\n query: searchText\r\n }),\r\n autosuggestKeyword:\r\n searchText && searchText.length > 0 && keywordSuggestions && keywordSuggestions.length > 0\r\n ? KeywordSuggestionsComponent({\r\n searchKeywordSuggestClass: searchKeywordSuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: keywordSuggestions,\r\n telemetryContent: this.telemetryContent\r\n })\r\n : undefined,\r\n autosuggestProduct:\r\n searchText && searchText.length > 0 && productSuggestions && productSuggestions.length > 0\r\n ? ProductSuggestionsComponent({\r\n searchProductSuggestClass: searchProductSuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: productSuggestions,\r\n telemetry: this.props.telemetry,\r\n moduleType: this.props.typeName,\r\n moduleId: this.props.id,\r\n telemetryContent: this.telemetryContent\r\n })\r\n : undefined,\r\n autosuggestCategory:\r\n searchText && searchText.length > 0 && categorySuggestions && categorySuggestions.length > 0\r\n ? CategorySuggestionsComponent({\r\n searchCategorySuggestClass: searchCategorySuggestClass,\r\n searchPageURL: searchPageURL,\r\n searchQsp: searchQsp,\r\n hitPrefix: this.hitPrefix,\r\n hitSuffix: this.hitSuffix,\r\n autoSuggestProps: this.props,\r\n searchText: searchText,\r\n suggestions: categorySuggestions,\r\n searchRefiners: searchRefiners,\r\n telemetryContent: this.telemetryContent\r\n })\r\n : undefined,\r\n callbacks: {\r\n handleCancelSearchChange: this._handleCancelSearchChange\r\n },\r\n isSearchFormExpanded: this.state.isSearchFormExpanded\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n // tslint:disable-next-line:no-any\r\n private _focusOutTarget = (e: any): void => {\r\n const { suggestions } = this.state;\r\n\r\n if (\r\n suggestions &&\r\n suggestions.AllSearchResults &&\r\n e.target.closest('.ms-search') === null\r\n ) {\r\n this._clearAutoSuggestState();\r\n }\r\n };\r\n\r\n private _keyup = (e: KeyboardEvent): void => {\r\n const { suggestions } = this.state;\r\n\r\n if (suggestions && suggestions.AllSearchResults && e.keyCode === KeyCodes.Escape) {\r\n this._clearAutoSuggestState();\r\n } else if(this.state.isSearchFormExpanded && e.keyCode === KeyCodes.Escape) {\r\n if(this.state.isSearchFormExpanded) {\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n }\r\n\r\n if (!((this.formReference.current && this.formReference.current.contains(e.target as unknown as Node)) ||\r\n (this.autoSuggestResultDiv.current && this.autoSuggestResultDiv.current.contains(e.target as unknown as Node)))) {\r\n if (suggestions && suggestions.AllSearchResults) {\r\n this._clearAutoSuggestState();\r\n }\r\n\r\n if(this.state.isSearchFormExpanded) {\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n }\r\n };\r\n\r\n private _clearAutoSuggestState = (): void => {\r\n const {\r\n context: { actionContext },\r\n data: { searchState }\r\n } = this.props;\r\n\r\n if (this.searchTextInput.current && this.searchTextInput.current.value.length > 0) {\r\n searchState.searchText = '';\r\n searchState.defaultBasicSearchUrl = '';\r\n searchState.searchQueryStringParameter = '';\r\n actionContext ? actionContext.update(createSearchStateInput(searchState), searchState) : null;\r\n this.searchTextInput.current.value = '';\r\n }\r\n\r\n this.setState({ searchText: '', suggestions: undefined, searchRefiners: undefined });\r\n };\r\n\r\n private _handleInputChange = (query: string): void => {\r\n if (!query || query.length < this.maxChars) {\r\n this.setState({ searchText: query });\r\n }\r\n\r\n if (this.cancellabelDebounce) {\r\n this.cancellabelDebounce.cancel();\r\n }\r\n\r\n const {\r\n telemetry,\r\n context,\r\n data: { searchState }\r\n } = this.props;\r\n\r\n if (context) {\r\n if (query && query.length > 0) {\r\n if (query.length > this.maxChars) {\r\n return;\r\n }\r\n\r\n this.cancellabelDebounce = debounce(() => {\r\n getSearchSuggestionsAction(\r\n new AutoSuggestInput(\r\n query,\r\n this.topResultsCount,\r\n this._getSuggestionType(this.inputSuggestionType),\r\n this.hitPrefix,\r\n this.hitSuffix\r\n ),\r\n context.actionContext\r\n )\r\n .then(results => {\r\n this._getSearchRefiners(query)\r\n .then(refiners => {\r\n this.setState({ suggestions: results, searchRefiners: refiners,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results) });\r\n })\r\n .catch(error => {\r\n this.setState({ suggestions: results, searchRefiners: undefined,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount(results) });\r\n telemetry.exception(error);\r\n telemetry.debug('Unable to get refiners results');\r\n });\r\n })\r\n .catch(error => {\r\n this.setState({ suggestions: undefined, searchRefiners: undefined,\r\n autoSuggestAriaLabel: this._setAutoSuggestResultCount() });\r\n telemetry.exception(error);\r\n telemetry.debug('Unable to get auto suggest results');\r\n });\r\n }, this.waitTime);\r\n\r\n setTimeout(() => {\r\n this.cancellabelDebounce();\r\n }, 0);\r\n\r\n searchState.searchText = query;\r\n } else {\r\n this.setState({ suggestions: undefined, searchRefiners: undefined });\r\n searchState.searchText = '';\r\n }\r\n context.actionContext.update(createSearchStateInput(searchState), searchState);\r\n }\r\n };\r\n\r\n private _getSuggestionType = (suggestionTypes?: ISuggestionTypeCriterionData[]): string => {\r\n if (suggestionTypes && suggestionTypes.length > 0) {\r\n const distinctSuggestionTypes: string[] = [];\r\n suggestionTypes && suggestionTypes.forEach((suggestionTypeItem, index) => {\r\n suggestionTypeItem.SuggestionType && distinctSuggestionTypes.push(suggestionTypeItem.SuggestionType.charAt(0).toUpperCase() + suggestionTypeItem.SuggestionType.slice(1));\r\n });\r\n return distinctSuggestionTypes.join(',');\r\n }\r\n return 'Keyword, Product, ScopedCategory';\r\n };\r\n\r\n private async _getSearchRefiners(searchText: string): Promise {\r\n const { actionContext: ctx } = this.props.context;\r\n return getProductSearchRefinersAsync(\r\n { callerContext: ctx },\r\n {\r\n SearchCondition: searchText,\r\n Context: {\r\n ChannelId: +ctx.requestContext.apiSettings.channelId,\r\n CatalogId: +ctx.requestContext.apiSettings.catalogId\r\n }\r\n }\r\n );\r\n }\r\n\r\n private _handleSubmit = (\r\n e: React.MouseEvent | React.KeyboardEvent | React.FormEvent\r\n ): void => {\r\n const {\r\n config: { disableSubmitSearch },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { searchQueryStringParameter }\r\n }\r\n }\r\n } = this.props;\r\n\r\n const query = this.searchTextInput.current && this.searchTextInput.current.value;\r\n e.preventDefault();\r\n\r\n if (!query || (query && query.length === 0) || disableSubmitSearch) {\r\n this.searchTextInput && this.searchTextInput.current && this.searchTextInput.current.focus();\r\n } else {\r\n const searchQsp = searchQueryStringParameter || 'q';\r\n const searchURL = this._appendQueryParams(getUrlSync('search', actionContext) || '', query, searchQsp);\r\n document.location.href = searchURL;\r\n }\r\n };\r\n\r\n private _handleCancelSearchChange = (): void => {\r\n const { isSearchFormExpanded, suggestions } = this.state;\r\n\r\n if (!isSearchFormExpanded) {\r\n this.setState({\r\n isSearchFormExpanded: true,\r\n searchText: '',\r\n isInitialState: false\r\n });\r\n } else {\r\n if (suggestions && suggestions.AllSearchResults) {\r\n this._clearAutoSuggestState();\r\n }\r\n\r\n this.setState({ isSearchFormExpanded: false });\r\n }\r\n };\r\n\r\n private _appendQueryParams = (route: string, query: string, qsp: string): string => {\r\n if (route && route.length > 0) {\r\n return query && query.length > 0 ? `${route}${route.indexOf('?') === -1 ? '?' : '&'}${qsp}=${query}` : route;\r\n }\r\n return '';\r\n };\r\n\r\n private _setAutoSuggestResultCount = (result?: Autosuggestions) => {\r\n const itemCount = result?.AllSearchResults?.filter(i=>i.SuggestionType === SuggestionType.Product);\r\n if (this.autoSuggestResultScreenReaderDiv.current !== null) {\r\n const ariaLiveRegion = this.autoSuggestResultScreenReaderDiv.current;\r\n const suggestResultString = `${this.props.resources.autoSuggestFoundMessage} with ${itemCount?.length} results`;\r\n const emptyResultString = this.props.resources.noAutoSuggestionMessage;\r\n ariaLiveRegion.innerText = result && (result.AllSearchResults && result.AllSearchResults.length > 0) ? suggestResultString : emptyResultString;\r\n ariaLiveRegion.setAttribute('aria-live','assertive');\r\n return ariaLiveRegion.innerText;\r\n } else {\r\n return '';\r\n }\r\n };\r\n}\r\n\r\nexport default Search;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from './components';\r\nimport { ISearchViewProps } from './smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n \r\n {_renderForm(form as ISearchFormViewProps, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n {form.submitBtn}\r\n
    \r\n
    \r\n {form.label}\r\n {form.input}\r\n
    \r\n {form.cancelBtn}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n form,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n React.useEffect(() => {\r\n document.body.addEventListener('keydown', (e: any) => handleKeyDown(e));\r\n });\r\n\r\n return (\r\n \r\n {label}\r\n \r\n {_renderForm(form as ISearchFormViewProps, FormWrapper, props)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst handleKeyDown = (e: React.KeyboardEvent): void => {\r\n const showClass = document.getElementsByClassName('ms-search__form bx-show');\r\n if (showClass) {\r\n //Fetch node list from which required elements could be grabbed as needed.\r\n const focusable = document.getElementById('SearchFormModal');\r\n const elements = focusable?.querySelectorAll('input, a, select, textarea, li, [tabindex]:not([tabindex=\"-1\"]), button') as NodeListOf;\r\n const firstFocusable = elements[0];\r\n const lastFocusable = elements[elements.length - 1];\r\n\r\n if (e.ctrlKey || e.altKey) {\r\n return;\r\n }\r\n\r\n const keys = {\r\n 9: () => { //9 = TAB\r\n if (e.shiftKey && e.target === firstFocusable) {\r\n lastFocusable.focus();\r\n console.log('Last Focusable');\r\n e.preventDefault();\r\n }\r\n\r\n if (e.target === lastFocusable) {\r\n firstFocusable.focus();\r\n console.log('First Focusable');\r\n e.preventDefault();\r\n }\r\n }\r\n };\r\n if (keys[e.keyCode]) {\r\n keys[e.keyCode]();\r\n }\r\n }\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, FormWrapper: INodeProps, props: ISearchViewProps) => {\r\n const {\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n } = props;\r\n return (\r\n \r\n {form.submitBtn}\r\n
    \r\n
    \r\n {form.label}\r\n {form.input}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n
    \r\n {form.cancelBtn}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n /* eslint-disable react/no-unknown-property */\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n \r\n {_renderForm(form as ISearchFormViewProps, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n {form.submitBtn}\r\n
    \r\n
    \r\n {form.label}\r\n {form.input}\r\n
    \r\n {form.cancelBtn}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n form,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n return (\r\n \r\n {label}\r\n {_renderForm(form as ISearchFormViewProps, SearchForm, FormWrapper)}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, SearchForm: INodeProps, FormWrapper: INodeProps) => {\r\n return (\r\n \r\n \r\n {form.submitBtn}\r\n {form.label}\r\n {form.input}\r\n {form.cancelBtn}\r\n \r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price !== 0 && (
    {item.price}
    )}\r\n
    \r\n
    \r\n );\r\n })}\r\n
    \r\n
    \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { ISearchCategoryViewProps, ISearchFormViewProps, ISearchKeywordViewProps, ISearchProductViewProps } from '../../../modules/smwe-search/./components';\r\nimport { ISearchViewProps } from '../../../modules/smwe-search/./smwe-search';\r\n\r\nconst SearchView: React.FC = props => {\r\n const {\r\n Search,\r\n form,\r\n SearchForm,\r\n FormWrapper,\r\n label\r\n } = props;\r\n\r\n React.useEffect(() => {\r\n document.body.addEventListener('keydown', (e: any) => handleKeyDown(e));\r\n });\r\n\r\n return (\r\n \r\n {label}\r\n \r\n {_renderForm(form as ISearchFormViewProps, FormWrapper, props)}\r\n \r\n \r\n );\r\n};\r\n\r\nconst handleKeyDown = (e: React.KeyboardEvent): void => {\r\n const showClass = document.getElementsByClassName('ms-search__form bx-show');\r\n if (showClass) {\r\n //Fetch node list from which required elements could be grabbed as needed.\r\n const focusable = document.getElementById('SearchFormModal');\r\n const elements = focusable?.querySelectorAll('input, a, select, textarea, li, [tabindex]:not([tabindex=\"-1\"]), button') as NodeListOf;\r\n const firstFocusable = elements[0];\r\n const lastFocusable = elements[elements.length - 1];\r\n\r\n if (e.ctrlKey || e.altKey) {\r\n return;\r\n }\r\n\r\n const keys = {\r\n 9: () => { //9 = TAB\r\n if (e.shiftKey && e.target === firstFocusable) {\r\n lastFocusable.focus();\r\n console.log('Last Focusable');\r\n e.preventDefault();\r\n }\r\n\r\n if (e.target === lastFocusable) {\r\n firstFocusable.focus();\r\n console.log('First Focusable');\r\n e.preventDefault();\r\n }\r\n }\r\n };\r\n if (keys[e.keyCode]) {\r\n keys[e.keyCode]();\r\n }\r\n }\r\n};\r\n\r\nconst _renderForm = (form: ISearchFormViewProps, FormWrapper: INodeProps, props: ISearchViewProps) => {\r\n const {\r\n AutoSuggestAriaLabel,\r\n AutoSuggestAriaLabelText,\r\n searchText,\r\n AutoSuggest,\r\n KeywordSuggest,\r\n ProductSuggest,\r\n CategorySuggest,\r\n UlKeyword,\r\n UlProduct,\r\n UlCategory,\r\n autosuggestCategory,\r\n autosuggestKeyword,\r\n autosuggestProduct,\r\n } = props;\r\n return (\r\n \r\n {form.submitBtn}\r\n
    \r\n
    \r\n {form.label}\r\n {form.input}\r\n \r\n {searchText && searchText.length > 0 ?\r\n {AutoSuggestAriaLabelText} : ''\r\n }\r\n {_renderKeywordSuggestions(KeywordSuggest, UlKeyword, autosuggestKeyword)}\r\n {_renderProductSuggestions(ProductSuggest, UlProduct, autosuggestProduct)}\r\n {_renderCategorySuggestions(CategorySuggest, UlCategory, autosuggestCategory)}\r\n \r\n
    \r\n {form.cancelBtn}\r\n \r\n );\r\n};\r\n\r\nconst _renderKeywordSuggestions = (\r\n KeywordSuggest: INodeProps,\r\n UlKeyword: INodeProps,\r\n keywordSuggestions?: ISearchKeywordViewProps\r\n) => {\r\n return (\r\n keywordSuggestions && (\r\n \r\n \r\n {keywordSuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderProductSuggestions = (\r\n ProductSuggest: INodeProps,\r\n UlProduct: INodeProps,\r\n productSuggestions?: ISearchProductViewProps\r\n) => {\r\n return (\r\n productSuggestions && (\r\n /* eslint-disable react/no-unknown-property */\r\n \r\n \r\n {productSuggestions.title}\r\n {productSuggestions.items.map((item, index) => {\r\n return (\r\n \r\n \r\n {item.thumbnail}\r\n {item.text}\r\n {item.price}\r\n \r\n \r\n );\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nconst _renderCategorySuggestions = (\r\n CategorySuggest: INodeProps,\r\n UlCategory: INodeProps,\r\n categorySuggestions?: ISearchCategoryViewProps\r\n) => {\r\n return (\r\n categorySuggestions && (\r\n \r\n \r\n {categorySuggestions.title}\r\n {categorySuggestions.text.map(text => {\r\n return text;\r\n })}\r\n \r\n \r\n )\r\n );\r\n};\r\n\r\nexport default SearchView;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselData } from './carousel.data';\nimport { ICarouselProps } from './carousel.props.autogenerated';\nimport { ICarouselState } from './carousel.state';\n\nexport interface ICarouselViewProps extends ICarouselProps<{}>, ICarouselState {\n closeAnimation: string;\n carouselContainer: IModuleProps;\n telemetryContent: ITelemetryContent;\n next(): void;\n previous(): void;\n onIndicatorsClickHandler(): void;\n handleDismissCarousel(): void;\n handleOnExited(): void;\n handleOnExiting(): void;\n}\n\n/**\n *\n * CarouselModule component.\n * @extends {React.PureComponent>}\n */\nclass CarouselModule extends React.PureComponent, ICarouselState> {\n private animating: boolean;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: ICarouselProps, state: ICarouselState) {\n super(props);\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\n this.animating = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\n this.setState({ dismissCarousel: false });\n }\n }\n }\n\n public render(): JSX.Element | null {\n if (this.state.dismissCarousel) {\n return null;\n }\n\n const { className } = this.props.config;\n\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n ...this.state,\n telemetryContent: this.telemetryContent,\n carouselContainer: {\n moduleProps: this.props,\n className: classnames('ms-carousel', className)\n },\n closeAnimation: this.state.closeNow ? 'close-now' : '',\n next: this._next,\n previous: this._previous,\n onIndicatorsClickHandler: this._goToIndex,\n handleDismissCarousel: this._handleDismissCarousel,\n handleOnExited: this._onExited,\n handleOnExiting: this._onExiting\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Function implementation to dismiss the Carousel.\n */\n private readonly _handleDismissCarousel = (): void => {\n if (this.props.context && this.props.context.request && this.props.context.request.cookies) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\n this.setState({ dismissCarousel: true });\n }\n };\n\n /**\n * Function implementation to move to next slide.\n */\n private readonly _next = (): void => {\n const { slots } = this.props;\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n /**\n * Function implementation to move to previous slide.\n */\n private readonly _previous = (): void => {\n const slots = this.props.slots && this.props.slots.content;\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n };\n\n private readonly _onExiting = (): void => {\n this.animating = true;\n };\n\n private readonly _onExited = (): void => {\n this.animating = false;\n this.setState({ closeNow: false });\n };\n\n /**\n * Function implementation to move to a given slide.\n * @param newIndex\n */\n private readonly _goToIndex = (newIndex: number): void => {\n if (this.animating) {\n return;\n }\n this.setState({ activeIndex: newIndex });\n };\n}\n\nexport default CarouselModule;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Carousel } from '@msdyn365-commerce/components';\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICarouselViewProps } from './carousel';\n\n/**\n * Returns item slots.\n * @returns Array of item slots.\n * @param props -Props.\n */\nconst retrieveItems = (props: ICarouselViewProps): React.ReactNode[] => {\n let items = [];\n items = props.slots && props.slots.content && props.slots.content.length > 0 ? props.slots.content : [];\n return items;\n};\nconst CarouselView: React.FC = props => (\n \n \n \n);\n\nexport default CarouselView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport {\n AsyncResult,\n CartLine,\n CartLineValidationResults,\n CartLineValidationResultsByLineId,\n CartsDataActions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\n\nimport { ITelemetry } from '@msdyn365-commerce/telemetry-internal';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Validate the cart.\n * @param isQuantityLimitsFeatureEnabled -- Is the quantity limits feature enabled.\n * @param cart -- The cart state to validate.\n * @param telemetry -- The telemetry.\n * @param propsContext -- The props context.\n * @param shouldRetry -- Should retry.\n * @returns A list of line data validation failures.\n */\nexport async function validateCartAsync(\n cart: AsyncResult,\n telemetry: ITelemetry,\n propsContext: ICoreContext,\n shouldRetry: boolean = true\n): Promise {\n let cartResult: ICartState;\n let cartVersion: number | undefined;\n try {\n cartResult = await cart;\n cartVersion = cartResult.cart.Version;\n } catch (error) {\n telemetry.warning(error);\n telemetry.debug('Unable to get cart or cart version.');\n return AsyncResult.resolve();\n }\n\n if (cartVersion) {\n try {\n const validationResult: CartLineValidationResults = await CartsDataActions.validateForCheckoutAsync(\n { callerContext: propsContext.actionContext, bypassCache: 'none' },\n cartResult.cart.Id,\n cartVersion\n );\n\n return await AsyncResult.resolve(validationResult.ValidationResultsByLineId ?? undefined);\n } catch (error) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- error type is not defined.\n if (shouldRetry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n try {\n await cartResult.refreshCart({});\n } catch (refreshError) {\n telemetry.warning(refreshError);\n telemetry.debug('Unable to refresh Cart');\n return AsyncResult.resolve();\n }\n try {\n await validateCartAsync(cart, telemetry, propsContext, false);\n return AsyncResult.resolve();\n } catch (validateError) {\n telemetry.warning(validateError);\n telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n }\n\n telemetry.warning(error);\n telemetry.debug('Unable to validate Cart');\n return AsyncResult.resolve();\n }\n } else {\n telemetry.warning('Cart version not found for Cart validation request.');\n return AsyncResult.resolve();\n }\n}\n\n/**\n * Check if cart line quantity update is success.\n * @param isQuantityLimitsFeatureEnabled -- Is quantity limits feature enabled.\n * @param cartResult -- The cart result.\n * @param telemetry -- The telemetry.\n * @param products -- The products.\n * @param cartLineToUpdate -- The cart line to update.\n * @param quantity -- The quantity.\n * @returns Boolean to indicate if the cart line quantity is updated.\n */\nexport async function isCartLineQuantityUpdatedAsync(\n isQuantityLimitsFeatureEnabled: boolean | undefined,\n cartResult: ICartState | undefined,\n telemetry: ITelemetry,\n products: SimpleProduct[] | undefined,\n cartLineToUpdate: CartLine,\n quantity: number\n): Promise {\n if (cartResult) {\n let isUsingDefaultOrderSettingsMax: boolean = false;\n if (ArrayExtensions.hasElements(products) && isQuantityLimitsFeatureEnabled) {\n const modifiedProduct: SimpleProduct | undefined = products.find(\n (product: SimpleProduct) => product.RecordId === cartLineToUpdate.ProductId\n );\n isUsingDefaultOrderSettingsMax = !!modifiedProduct && !!modifiedProduct.Behavior?.MaximumQuantity;\n } else {\n isUsingDefaultOrderSettingsMax = false;\n }\n\n const input = {\n cartLineId: cartLineToUpdate.LineId!.toString(),\n newQuantity: quantity,\n additionalProperties: { isUsingDefaultOrderSettingsMax }\n };\n\n try {\n const updateLineResult: ICartActionResult = await cartResult.updateCartLineQuantity(input);\n return await AsyncResult.resolve(updateLineResult.status === 'SUCCESS');\n } catch (error) {\n telemetry.warning((error as Error).message);\n telemetry.debug('Unable to update Cart Line quantity');\n }\n }\n\n return AsyncResult.resolve(false);\n}\n\n/**\n * Update cart line with cart action result.\n * @param isQuantityLimitsFeatureEnabled -- Is quantity limits feature enabled.\n * @param cartResult -- The cart result.\n * @param telemetry -- The telemetry.\n * @param products -- The products.\n * @param cartLineToUpdate -- The cart line to update.\n * @param quantity -- The quantity.\n * @returns Boolean to indicate if the cart line quantity is updated.\n */\nexport async function cartLineQuantityUpdatedAsync(\n isQuantityLimitsFeatureEnabled: boolean | undefined,\n cartResult: ICartState | undefined,\n telemetry: ITelemetry,\n products: SimpleProduct[] | undefined,\n cartLineToUpdate: CartLine,\n quantity: number\n): Promise {\n if (cartResult) {\n let isUsingDefaultOrderSettingsMax: boolean = false;\n if (ArrayExtensions.hasElements(products) && isQuantityLimitsFeatureEnabled) {\n const modifiedProduct: SimpleProduct | undefined = products.find(\n (product: SimpleProduct) => product.RecordId === cartLineToUpdate.ProductId\n );\n isUsingDefaultOrderSettingsMax = !!modifiedProduct && !!modifiedProduct.Behavior?.MaximumQuantity;\n } else {\n isUsingDefaultOrderSettingsMax = false;\n }\n\n const input = {\n cartLineId: cartLineToUpdate.LineId!.toString(),\n newQuantity: quantity,\n additionalProperties: { isUsingDefaultOrderSettingsMax }\n };\n\n try {\n const updateLineResult: ICartActionResult = await cartResult.updateCartLineQuantity(input);\n return await AsyncResult.resolve(updateLineResult);\n } catch (error) {\n telemetry.warning((error as Error).message);\n telemetry.debug('Unable to update Cart Line quantity');\n }\n }\n\n return AsyncResult.resolve();\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Find the product in array of products considering product id.\n * @param productId - The searched product id.\n * @param products - The array of products in which search is executed.\n * @returns - The found product.\n */\nexport function getProductByProductId(productId: number | undefined, products?: SimpleProduct[]): SimpleProduct | undefined {\n if (productId !== undefined && ArrayExtensions.hasElements(products)) {\n return products.find(product => {\n return productId === product.RecordId;\n });\n }\n\n return undefined;\n}\n\n/**\n * Find the product in array of products considering product id and product behavior's warehouse.\n * @param productId - The searched product id.\n * @param products - The array of products in which search is executed.\n * @param warehouseId - Warehouse id of cartLine.\n * @param cartState - The cart start in case cart line has no warehouse.\n * @returns - The found product.\n */\nexport function getProductByProductIdAndWarehouse(\n productId: number | undefined,\n products?: SimpleProduct[],\n warehouseId?: string,\n cartState?: ICartState\n): SimpleProduct | undefined {\n const targetWarehouseValue = warehouseId ?? cartState?.cart.WarehouseId;\n\n if (productId !== undefined && ArrayExtensions.hasElements(products)) {\n return products.find(product => {\n return productId === product.RecordId && product.Behavior?.InventoryLocationId === targetWarehouseValue;\n });\n }\n\n return undefined;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent, ICartlineResourceString } from '@msdyn365-commerce/components';\nimport MsDyn365, { ICoreContext, IGridSettings, IImageSettings, ITelemetry, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n OrgUnitLocation,\n ProductAvailableQuantity,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, IProductInventoryInformation } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '../../../Common/get-product';\n\nexport interface IFlyoutCartLineItemsProps {\n cartlines: CartLine[];\n cartState: ICartState | undefined;\n orgUnitLocations: OrgUnitLocation[] | undefined;\n resources: ICartlineResourceString;\n productAvailabilites: IProductInventoryInformation[] | undefined;\n products: SimpleProduct[] | undefined;\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\n pickupDeliveryModeCode?: string;\n catalogs?: ProductCatalog[];\n\n /**\n * GridSettings for the product image in cartline\n */\n gridSettings: IGridSettings;\n\n /**\n * ImageSettings for the product image in cartline\n */\n imageSettings: IImageSettings;\n id: string;\n typeName: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n removeButtonText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n maxCartlineQuantity: number;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n isQuantityLimitsFeatureEnabled: boolean;\n\n outOfStockThreshold: number;\n isStockCheckEnabled: boolean;\n telemetryContent?: ITelemetryContent;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\nexport interface IFlyoutCartLineItemViewProps {\n cartline: React.ReactNode;\n remove: React.ReactNode;\n storeLocation: React.ReactNode;\n hasError: boolean;\n\n data: {\n product: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getCartItemAvailableQuantity = (\n isStockCheckEnabled: boolean,\n outOfStockThreshold: number,\n productAvailability?: ProductAvailableQuantity\n): number => {\n if (isStockCheckEnabled) {\n if (\n !productAvailability ||\n !productAvailability.AvailableQuantity ||\n productAvailability.AvailableQuantity <= 0 ||\n productAvailability.AvailableQuantity <= outOfStockThreshold\n ) {\n return 0;\n }\n return productAvailability.AvailableQuantity - outOfStockThreshold;\n }\n\n return 0;\n};\n\nconst _getCartItemMaxQuantity = (\n maxQuantityByConfig: number,\n isStockCheckEnabled: boolean,\n availableQuantityInStock: number,\n isQuantityLimitsFeatureEnabled: boolean,\n maxByQuantityLimitsFeature: number\n) => {\n if (isQuantityLimitsFeatureEnabled) {\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\n\n // If max by feature in not defined when feature is on then we suggest that there is no max by feature\n // and consider available qty if stock check enabled and max from config in site settings.\n if (!maxByQuantityLimitsFeature) {\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\n }\n\n return isStockCheckEnabled\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\n ? maxByQuantityLimitsFeatureResult\n : availableQuantityInStock\n : maxByQuantityLimitsFeatureResult;\n }\n if (isStockCheckEnabled) {\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\n }\n return maxQuantityByConfig;\n};\n\n/**\n * On Remove Click functionality.\n * @param removeItemClickHandler -Remove item click function.\n * @param cartline -CartLine.\n * @returns Remove change value.\n */\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\n removeItemClickHandler(cartline);\n};\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct,\n props: IFlyoutCartLineItemsProps,\n index: number,\n foundProductAvailability?: ProductAvailableQuantity,\n foundProductDeliveryOptions?: ProductDeliveryOptions\n): IFlyoutCartLineItemViewProps => {\n const { imageSettings, gridSettings, id, typeName, context, resources, removeButtonText, removeItemClickHandler } = props;\n\n const availableQuantityInStock = _getCartItemAvailableQuantity(\n props.isStockCheckEnabled,\n props.outOfStockThreshold,\n foundProductAvailability\n );\n const maxQuantity =\n product &&\n _getCartItemMaxQuantity(\n props.maxCartlineQuantity,\n props.isStockCheckEnabled,\n availableQuantityInStock,\n props.isQuantityLimitsFeatureEnabled,\n product?.Behavior?.MaximumQuantity || 0\n );\n\n // Check if the product is service or not by product type\n const isServiceItem = product.ItemTypeValue === ReleasedProductType.Service;\n\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.RemoveCartItem);\n const removeCartItemAttribute = getTelemetryAttributes(props.telemetryContent!, payLoad);\n\n let productUrl = getProductUrlSync(product, props.context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(props.context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartline.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n\n return {\n data: {\n product,\n cartline\n },\n hasError: !isServiceItem && props.isStockCheckEnabled ? cartline.Quantity! > maxQuantity : false,\n cartline: (\n \n ),\n remove: (\n \n {removeButtonText}\n \n ),\n storeLocation: _renderStoreLocation(cartline, props)\n };\n};\n\nconst _renderDeliveryLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): string | undefined => {\n let deliverylocation;\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartLine.ProductId;\n });\n }\n const delivery = foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === cartLine.DeliveryMode);\n const location = delivery?.Description;\n\n // eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n if (location) {\n deliverylocation = `${location}, ${orgUnitName}`;\n } else {\n deliverylocation = `${orgUnitName}`;\n }\n } else {\n deliverylocation = props.resources.shippingText;\n }\n return deliverylocation;\n};\n\nconst _renderStoreLocation = (cartLine: CartLine | null | undefined, props: IFlyoutCartLineItemsProps): JSX.Element | null => {\n if (cartLine && cartLine.FulfillmentStoreId) {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, props.orgUnitLocations);\n\n if (orgUnitName) {\n return (\n
    \n {orgUnitName}\n
    \n );\n }\n }\n\n return null;\n};\n\nconst _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\n return '';\n }\n\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\n });\n\n if (foundLocation) {\n return foundLocation.OrgUnitName;\n }\n return fulfillmentStoreId;\n};\n\nconst _assembleCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: IFlyoutCartLineItemsProps\n): IFlyoutCartLineItemViewProps[] | null => {\n const reactNodes: IFlyoutCartLineItemViewProps[] = [];\n\n if (!products || products.length === 0) {\n props.context.telemetry.error('Cartlines content is empty, module wont render');\n return null;\n }\n\n cartlines.map((cartline, index) => {\n let product;\n if (props.isQuantityLimitsFeatureEnabled) {\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\n // to check productId and WarehouseId for identification.\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\n } else {\n product = getProductByProductId(cartline.ProductId, products);\n }\n let foundProductAvailability;\n if (props.productAvailabilites && props.productAvailabilites.length > 0) {\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\n return productAvailability.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n }\n let foundProductDeliveryOption;\n if (props.productDeliveryOptions && props.productDeliveryOptions.length > 0) {\n foundProductDeliveryOption = props.productDeliveryOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n if (product) {\n reactNodes.push(\n _assembleNode(\n cartline,\n product,\n props,\n index,\n foundProductAvailability?.ProductAvailableQuantity,\n foundProductDeliveryOption\n )\n );\n }\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component.\n */\n\nexport const FlyoutCartLineItems = (props: IFlyoutCartLineItemsProps) => {\n const { products, cartlines } = props;\n return _assembleCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ProductDeliveryOptions, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n ActiveCartProductsInput,\n getActiveCartProductsAction,\n getAvailabilitiesForCartLineItems,\n getDeliveryOptionsForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n ProductDeliveryOptionsForCartLineItems\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * IMiniCartData entity interface.\n */\nexport interface IMiniCartData {\n products?: SimpleProduct[];\n productAvailabilites?: IProductInventoryInformation[];\n deliveryOptions?: ProductDeliveryOptions[];\n}\n\nexport const createInput = () => {\n return new ActiveCartProductsInput();\n};\n\n/**\n * Calls the Retail API and returns a mini cart data.\n * @param ctx\n * @param cartState\n */\nexport async function getMiniCartData(ctx: IActionContext, cartState: ICartState): Promise {\n const miniCartData: IMiniCartData = {};\n\n const cart = cartState.cart;\n\n // If there are cart lines, make call to get products\n // If there are invocie linese, then there is no products, so don't make call to get products\n if (cart && cart.CartLines && cart.CartLines.length > 0 && !cartState.hasInvoiceLine) {\n await getActiveCartProductsAction(new ActiveCartProductsInput(), ctx)\n .then(products => {\n if (products) {\n miniCartData.products = products;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getAvailabilitiesForCartLineItems(new ProductAvailabilitiesForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(availableQuantity => {\n if (availableQuantity) {\n miniCartData.productAvailabilites = availableQuantity;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n\n await getDeliveryOptionsForCartLineItems(new ProductDeliveryOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(deliveryOptions => {\n if (deliveryOptions) {\n miniCartData.deliveryOptions = deliveryOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCartWithProdcuts]Unable to hydrate cart with product information');\n });\n }\n\n return miniCartData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToCartBehavior, CartIconComponent } from '@msdyn365-commerce/components';\nimport { getUrlSync, IDictionary, IImageSettings, msdyn365Commerce, TelemetryEvent } from '@msdyn365-commerce/core';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n CartLineValidationResultsByLineId,\n OrgUnitLocation\n} from '@msdyn365-commerce/retail-proxy';\nimport { validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\nimport { ArrayExtensions, validateCartLinesInventory } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n UncontrolledTooltip,\n updateMaxQuantityForCartLineItem,\n urlCheck\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport React from 'react';\n\nimport { ICartIconData } from './cart-icon.data';\nimport { cartLinesSortOrder, ICartIconProps } from './cart-icon.props.autogenerated';\nimport { FlyoutCartLineItems, IFlyoutCartLineItemViewProps } from './components/flyout-cart-line-items';\nimport { getMiniCartData, IMiniCartData } from './utils/get-products-in-mini-cart';\n\nexport interface IMiniCartState {\n miniCartData: IMiniCartData;\n orgUnitLocations?: OrgUnitLocation[];\n isQuantityLimitsFeatureEnabled: boolean;\n isCartValid: boolean;\n}\n\nexport interface ICartIconViewProps extends ICartIconProps {\n className: string;\n cartIcon: React.ReactNode;\n FlyoutContainer?: INodeProps;\n CartlinesWrapper: INodeProps;\n miniCartWrapper: INodeProps;\n miniCartItemWrapper: INodeProps;\n cartlines?: IFlyoutCartLineItemViewProps[];\n flyoutTitle: React.ReactNode;\n totalPrice: React.ReactNode;\n checkoutAsGuestButton?: React.ReactNode;\n checkoutAsSignInUserButton?: React.ReactNode;\n goToCartButton?: React.ReactNode;\n waitingComponent?: React.ReactNode;\n isCartLoading: boolean;\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n}\n\n/**\n *\n * Cart component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass CartIcon extends React.Component, IMiniCartState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutBySignInAttributes: IDictionary | undefined;\n\n private readonly checkoutByGuestAttributes: IDictionary | undefined;\n\n private readonly viewShoppingBagAttributes: IDictionary | undefined;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private lastValidatedCartVersion: number | undefined;\n\n constructor(props: ICartIconProps) {\n super(props);\n this.state = {\n miniCartData: {},\n isCartValid: true,\n isQuantityLimitsFeatureEnabled: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payload = getPayloadObject(TelemetryEvent.CheckOut, this.telemetryContent, TelemetryConstant.Checkout);\n this.checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.GuestCheckout;\n this.checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n\n payload.contentAction.etext = TelemetryConstant.ViewShoppingBag;\n this.viewShoppingBagAttributes = getTelemetryAttributes(this.telemetryContent, payload);\n }\n\n public async componentDidMount(): Promise {\n const context = this.props.context.actionContext;\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n this.setState({\n miniCartData: await getMiniCartData(context, this.props.data.cart.result!)\n });\n }\n );\n await this._setQuantityLimitsFeatureFlag();\n\n this.setState({\n orgUnitLocations: this.props.data.orgUnitLocations?.result\n });\n\n this._validateCart();\n }\n\n public componentDidUpdate(prevProps: ICartIconProps): void {\n this._validateCart();\n }\n\n public shouldComponentUpdate(nextProps: ICartIconProps, nextState: IMiniCartState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n // eslint-disable-next-line complexity -- disabling the complexity for this method for now as its causing lot of other warnings\n public render(): JSX.Element | null {\n const {\n id,\n typeName,\n config: { enableHoverCart, isAnonymousCheckout },\n context: {\n request: {\n user: { isAuthenticated, signInUrl }\n }\n },\n context,\n resources\n } = this.props;\n\n const cart = (this.props.data.cart && this.props.data.cart.result) || undefined;\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n const checkoutURL = this._getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- check config.\n const shouldShowMiniCart =\n cart?.isProductAddedToCart && this.props.context.app.config.addToCartBehavior === AddToCartBehavior.showMiniCart;\n const hasInvoiceLine = cart?.hasInvoiceLine;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n const cartLines = this._getCartLines();\n const validInventoryAcrossCartLines = validateCartLinesInventory(\n cart?.cart.CartLines ?? [],\n this.state.miniCartData.productAvailabilites ?? [],\n this.props.context.actionContext,\n this.state.miniCartData.products ?? [],\n emailDeliveryModeCode\n );\n const hasError =\n !validInventoryAcrossCartLines?.isValid ||\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\n const includeFlyout = this.props.data.cart && this.props.data.cart.status === 'SUCCESS' && enableHoverCart;\n const totalItemsInCart = cart?.totalItemsInCart ? cart.totalItemsInCart : 0;\n const goToCartButtonText = resources.goToCartButtonTitle.replace('{count}', totalItemsInCart.toString());\n const flyoutTitle = resources.flyoutTitle;\n const flyoutTooltip = {\n tag: UncontrolledTooltip,\n shouldShowMiniCart,\n placement: 'bottom-end',\n hideArrow: true,\n className: 'ms-cart-icon__flyout-container',\n trigger: 'hover',\n displayMode: 'FLYOUT',\n target: id,\n shouldShowCloseButton: true,\n cartPageUrl: cartUrl,\n hideAriaHidden: true\n };\n\n // If there are invoice lines, don't update mini cart price\n const price = (cart && !cart.hasInvoiceLine && cart.cart.TotalAmount) || undefined;\n const priceString = price\n ? resources.totalPriceFormatString.replace('{price}', context.cultureFormatter.formatCurrency(price))\n : '';\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n const viewProps = {\n ...this.props,\n cartIcon: (\n \n ),\n cartlines: cartLines,\n FlyoutContainer: includeFlyout ? flyoutTooltip : undefined,\n CartlinesWrapper: {\n className: 'ms-cart-icon__cart-lines'\n },\n miniCartWrapper: {\n className: classnames('ms-cart-icon'),\n id: this.props.id\n },\n miniCartItemWrapper: {\n className: classnames('msc-cart-lines-item')\n },\n\n // If there are invoice lines, don't update mini cart checkout button\n // Checkout button will display by default to maintain backward compatibility. When Anonymous user checkout is enabled &&\n // user is authenticated then we will show the checkout button otherwise we will show the guest checkout button.\n checkoutAsSignInUserButton:\n !isCartEmpty && !hasInvoiceLine && (!isAnonymousCheckout || isAuthenticated) ? (\n \n {resources.checkoutButtonTitle}\n \n ) : null,\n checkoutAsGuestButton:\n isAnonymousCheckout && !isCartEmpty && !isAuthenticated ? (\n \n {resources.guestCheckoutButtonTitle}\n \n ) : null,\n goToCartButton: (\n \n {goToCartButtonText}\n \n ),\n checkoutBlockedDueToUnavailableFunds: null,\n flyoutTitle: {flyoutTitle},\n totalPrice:
    {priceString}
    \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _validateCart(): void {\n const {\n data: { cart }\n } = this.props;\n const cartVersion = cart.result?.cart?.Version ?? undefined;\n if (this.lastValidatedCartVersion === cartVersion) {\n return;\n }\n\n this.lastValidatedCartVersion = cartVersion; // This field is populated to block concurrent requests\n\n if (this.state.isQuantityLimitsFeatureEnabled) {\n validateCartAsync(cart, this.props.telemetry, this.props.context)\n .then((result: CartLineValidationResultsByLineId | undefined) => {\n this.setState({ isCartValid: !ArrayExtensions.hasElements(result?.ValidationResultsPairs) });\n })\n .catch(() => {\n this.setState({ isCartValid: false });\n });\n } else {\n this.setState({ isCartValid: true });\n }\n }\n\n private _getCheckoutURL(isAuthenticated: boolean, guestCheckoutUrl: string, signInUrl: string): string {\n if (isAuthenticated) {\n return guestCheckoutUrl;\n }\n\n const isAbsoluteUrl = urlCheck(guestCheckoutUrl);\n let returnURL = guestCheckoutUrl;\n if (msdyn365Commerce.isBrowser && !isAbsoluteUrl) {\n returnURL = `${window.location.origin}${guestCheckoutUrl}`;\n }\n\n return `${signInUrl}${!signInUrl.includes('?') ? '?' : '&'}ru=${returnURL}`;\n }\n\n /**\n * Sort cartline items.\n * @param cartlines - Cartlines to be sorted.\n * @param sortOrder - Ascending or descending.\n * @returns - Sorted cartlines.\n */\n private readonly getSortedCartLines = (cartlines: CartLine[], sortOrder?: cartLinesSortOrder): CartLine[] => {\n const lines: CartLine[] = [...cartlines];\n const zero: number = 0;\n\n if (sortOrder === cartLinesSortOrder.descending) {\n return lines.sort((item1, item2) => (item2.LineNumber ?? zero) - (item1.LineNumber ?? zero));\n }\n return lines.sort((item1, item2) => (item1.LineNumber ?? zero) - (item2.LineNumber ?? zero));\n };\n\n private _getCartLines(): IFlyoutCartLineItemViewProps[] | null {\n const {\n context: {\n request: { channel: { PickupDeliveryModeCode } = { PickupDeliveryModeCode: undefined } }\n },\n config,\n telemetry,\n resources\n } = this.props;\n\n const imageSettings = this._getImageSettings(config.imageSettings);\n const cart = this.props.data.cart && this.props.data.cart.result;\n\n // Cart-icon could be placed in each page\n // so we check cart content to reduce number of RS calls\n return this.state.miniCartData.products && cart && cart.cart.CartLines && cart.cart.CartLines.length > 0\n ? FlyoutCartLineItems({\n cartlines: this.getSortedCartLines(cart.cart.CartLines, config.cartLinesSortOrder),\n products: this.state.miniCartData.products,\n productAvailabilites: this.state.miniCartData.productAvailabilites,\n productDeliveryOptions: this.state.miniCartData.deliveryOptions,\n imageSettings,\n outOfStockThreshold: this.props.context.app.config.outOfStockThreshold || 0,\n isStockCheckEnabled: this.props.context.app.config.enableStockCheck || false,\n maxCartlineQuantity: updateMaxQuantityForCartLineItem(this.props.context.app.config.maxQuantityForCartLineItem),\n gridSettings: this.props.context.request.gridSettings!,\n context: this.props.context,\n typeName: this.props.typeName,\n id: this.props.id,\n resources: {\n sizeString: resources.productDimensionTypeSize,\n colorString: resources.productDimensionTypeColor,\n configString: resources.productDimensionTypeConfiguration,\n styleString: resources.productDimensionTypeStyle,\n quantityDisplayString: resources.quantityDisplayText,\n salesAgreementPricePrompt: resources.salesAgreementPricePrompt,\n inputQuantityAriaLabel: '', // Not used\n discountStringText: '', // Not used\n originalPriceText: '',\n currentPriceText: '',\n shippingChargesText: '',\n shippingText: resources.shippingText\n },\n telemetry,\n removeButtonText: resources.removeCartButtonText,\n outOfStockText: '', // Not used\n outOfRangeOneText: '', // Not used\n outOfRangeFormatText: '', // Not used\n cartState: cart,\n orgUnitLocations: this.state.orgUnitLocations,\n removeItemClickHandler: this._removeItemFromCartHandler,\n pickupDeliveryModeCode: PickupDeliveryModeCode,\n telemetryContent: this.telemetryContent,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined,\n isQuantityLimitsFeatureEnabled: this.state.isQuantityLimitsFeatureEnabled,\n catalogs: this.props.data.catalogs?.result\n })\n : null;\n }\n\n private readonly _getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return (\n imageSettings || {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true\n }\n );\n };\n\n private readonly _removeItemFromCartHandler = (cartlineToRemove: CartLine) => {\n if (this.props.data.cart.result) {\n const input = {\n cartLineIds: [cartlineToRemove.LineId!.toString()]\n };\n this.props.data.cart.result.removeCartLines(input).catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to Remove Cart Line');\n });\n }\n };\n\n private async _setQuantityLimitsFeatureFlag(): Promise {\n const featureStatuses = await this.props.data.featureState;\n\n const isChannelQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n if (isChannelQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n return;\n }\n\n const useSiteBuilderSettings = featureStatuses?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n if (!defaultOrderQuantityLimitsFeatureConfig || defaultOrderQuantityLimitsFeatureConfig === 'none') {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n\n try {\n const featureStatuses = await this.props.data.featureState;\n const isQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n if (!isQuantityLimitsFeatureEnabledInHq) {\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n } catch (error) {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get feature states');\n this.setState({ isQuantityLimitsFeatureEnabled: false });\n return;\n }\n if (defaultOrderQuantityLimitsFeatureConfig === 'all') {\n this.setState({ isQuantityLimitsFeatureEnabled: true });\n } else {\n this.props.data.customerInformation\n .then(customerInfo => {\n const result =\n !!customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b));\n this.setState({ isQuantityLimitsFeatureEnabled: result });\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to get customer info');\n });\n }\n } else {\n const cartConfiguration = await this.props.data.cartConfiguration;\n this.setState({ isQuantityLimitsFeatureEnabled: !(cartConfiguration?.IgnoreOrderSettings ?? false) });\n return;\n }\n }\n}\n\nexport default CartIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 {props.checkoutBlockedDueToUnavailableFunds}\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 { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\n description?: string;\n className?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.description\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description, className }) => {\n if (!description) {\n return null;\n }\n\n const descClassName = StringExtensions.isNullOrEmpty(className) ? 'ms-checkout-delivery-options__description' : className;\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 * as React from 'react';\n\nexport interface IAddressDetailItem {\n isNewLine: boolean;\n isShowLabel: boolean;\n labelText: string;\n name: string;\n value: string;\n}\n\n/**\n * Address details item.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDetailItemFunctionComponent: React.FC = (props: IAddressDetailItem) => {\n const { labelText, value } = props;\n\n const className = `ms-checkout-delivery-options__cart-line-grp__item__header__address`;\n return (\n \n {labelText}\n {value}\n \n );\n};\n\nexport default AddressDetailItemFunctionComponent;\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 { CartLine } from '@msdyn365-commerce/retail-proxy';\nimport React, { useState } from 'react';\n\nexport interface ICheckoutCartLineDeliveryDateProps {\n className?: string;\n isDisabled?: boolean;\n minRangeValue?: string;\n maxRangeValue?: string;\n validationErrorForRange?: string;\n fallbackPattern?: string;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n disclaimerText?: string;\n heading?: string;\n checkBoxLabel?: string;\n onChangeMinValue?: void;\n id?: string;\n cartLines?: CartLine[];\n onChange(event: React.ChangeEvent, cartLines: CartLine[]): void;\n}\n\nconst CheckoutCartLineDeliveryDate: React.FC = ({\n className,\n isDisabled,\n fallbackPattern,\n ariaLabel,\n telemetryContent,\n onChangeMinValue,\n checkBoxLabel,\n disclaimerText,\n heading,\n cartLines,\n onChange\n}) => {\n const [selectedDate, setSelectedDate] = useState('');\n const [isDateEnabled, setIsDateEnabled] = useState(false);\n // State to store today's date\n const [minDate, setMinDate] = useState('');\n\n // Update minDate state with today's date on component mount\n useState(() => {\n const today = new Date().toISOString().split('T')[0];\n setMinDate(today);\n });\n\n const handleDateChange = (event: React.FocusEvent) => {\n const selectedValue = event.target.value;\n // Check if the selected date is allowed\n if (selectedValue >= minDate) {\n setSelectedDate(selectedValue);\n console.log('Selected date is allowed.', selectedValue);\n } else {\n console.log('Selected date is not allowed.');\n }\n\n if (cartLines !== undefined) {\n onChange(event, cartLines);\n }\n };\n\n const handleCheckboxChange = () => {\n setIsDateEnabled(!isDateEnabled);\n };\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n
    \n
    \n \n {checkBoxLabel}\n
    \n {disclaimerText}\n
    \n {heading}\n \n
    \n
    \n );\n};\n\nexport default CheckoutCartLineDeliveryDate;\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 ICheckoutDeliveryOptionsGrpRadioButtonProps {\n className: string;\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n groupName: string;\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 CheckoutDeliveryOptionsGrpRadioButton: React.FC = ({\n className,\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n groupName,\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 const deliveryOptionRef: React.RefObject = React.createRef();\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsGrpRadioButton;\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';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport DescriptionComponent from './checkout-delivery-options.description';\nimport RadioButtonComponent from './checkout-cartLine-delivery-options-grp';\n\nexport interface ICheckoutCartLineDeliveryOptionsRadioButtonProps {\n className: string;\n moduleId: string;\n ariaSetSize: number;\n priceFree: string;\n ariaPosInSet: number;\n selectedItemId: string;\n cartLines: CartLine[];\n deliveryOptions: DeliveryOption[];\n typeName: string;\n context: ICoreContext>;\n groupName: string; // Add groupName prop\n ariaLabel?: string;\n value?: string;\n cartLineId?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent, cartLines: CartLine[], cartLineId?: string): void;\n}\n\n/**\n * Represents a radio button component for checkout cart line delivery options.\n * @param {Object} props - The component props.\n * @param {boolean} props.isChecked - Indicates whether the radio button is checked.\n * @param {string} props.value - The value of the radio button.\n * @param {number} props.ariaSetSize - The total number of radio buttons in the set.\n * @param {number} props.ariaPosInSet - The position of the radio button in the set.\n * @param {string} props.ariaLabel - The ARIA label for the radio button.\n * @param {string} props.telemetryContent - The telemetry content for the radio button.\n * @param {Function} props.onChange - The event handler for when the radio button is changed.\n * @returns {JSX.Element} The rendered radio button component.\n */\nconst CheckoutCartLineDeliveryOptionsRadio: React.FC = ({\n className,\n moduleId,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n deliveryOptions,\n priceFree,\n selectedItemId,\n typeName,\n groupName, // Destructure groupName prop\n context,\n cartLines,\n cartLineId,\n onChange\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n console.log(attributes);\n const channelConfig = context.actionContext.requestContext.channel;\n const count = deliveryOptions.length;\n if (count === 0) {\n return null;\n }\n\n const changeCurrentDeliveryOption = React.useCallback(\n (event: React.ChangeEvent) => {\n onChange(event, cartLines, cartLineId);\n },\n [onChange, cartLines, cartLineId]\n );\n // const selectedDeliveryOptionItem = deliveryOptions.length > 0 ? deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n const deliveryClassName = `${className}__radio-btn-grp`;\n const optionClassName = `${deliveryClassName}-opt`;\n const response = deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => (\n
    \n \n \n \n
    \n ));\n\n return
    {response}
    ;\n};\n\nexport default CheckoutCartLineDeliveryOptionsRadio;\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 { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B, TelemetryEvent } from '@msdyn365-commerce/core';\nimport { CartLine, DeliveryOption, ProductCatalog, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { useState } from 'react';\nimport CheckoutCartLineDeliveryOptionsRadio from './checkout-cartLine-delivery-options-radio';\n\nexport interface ICheckoutDeliveryOptionsLineItemsProps {\n className?: string;\n moduleId: string;\n selectedItemId: string;\n context: Msdyn365.ICoreContext;\n typeName: string;\n cartLines: CartLine[];\n imageSettings: Msdyn365.IImageSettings;\n showShippingChargesForLineItems: boolean;\n resources: ICheckoutDeliveryOptionsLineItemsResources;\n deliveryOptions: DeliveryOption[];\n ariaSetSize: number;\n ariaPosInSet: number;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent, cartLines: CartLine[]): void;\n currencyCode?: string;\n products?: SimpleProduct[];\n catalogs?: ProductCatalog[];\n gridSettings?: Msdyn365.IGridSettings;\n cartLineId?: string;\n key?: string;\n}\n\nexport interface ICheckoutDeliveryOptionsLineItemsResources {\n quantityDisplayStringLabel: string;\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n productDimensionTypeAmount: string;\n configString: string;\n discountStringText: string;\n shippingChargesText: string;\n priceFree: string;\n ariaLabel: string;\n changeButtonText?: string;\n deliveryMethodLabel?: string;\n}\n\nconst _getLineItemComponent = (\n context: Msdyn365.ICoreContext,\n cartLine: CartLine,\n product: SimpleProduct,\n moduleId: string,\n typeName: string,\n showShippingChargesForLineItems: boolean,\n imageSettings: Msdyn365.IImageSettings,\n resources: ICheckoutDeliveryOptionsLineItemsResources,\n currencyCode: string,\n catalogs?: ProductCatalog[],\n gridSettings?: Msdyn365.IGridSettings,\n cartLineId?: string\n): JSX.Element | undefined => {\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n\n return (\n \n );\n};\n\nconst _getProduct = (productId: number, products: SimpleProduct[]): SimpleProduct | undefined => {\n return products.find((_product: SimpleProduct) => {\n return productId === _product.RecordId;\n });\n};\n\nexport const GetLineItems: React.FC = (props: ICheckoutDeliveryOptionsLineItemsProps) => {\n const products = props.products;\n const lineClassName = props.className;\n const lineItemClassName = `${lineClassName}-item`;\n const currencyCode = props.currencyCode;\n const changeText = props.resources.changeButtonText;\n const [showDeliveryOption, setShowDeliveryOption] = useState(false);\n\n const handleClick = () => {\n setShowDeliveryOption(!showDeliveryOption);\n };\n if (!props.cartLines || props.cartLines.length === 0 || !products || products.length === 0 || currencyCode === undefined) {\n return null;\n }\n const deliveryCode = props.deliveryOptions.find(option => option.Code === props.selectedItemId);\n const payload = getPayloadObject(TelemetryEvent.UpdateInCart, props.telemetryContent!, changeText !== undefined ? changeText : '', '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n const response = props.cartLines.map(cartLine => {\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId, products);\n if (!product) {\n return null;\n }\n return (\n
    \n {_getLineItemComponent(\n props.context,\n cartLine,\n product,\n props.moduleId,\n props.typeName,\n props.showShippingChargesForLineItems,\n props.imageSettings,\n props.resources,\n currencyCode,\n props.catalogs,\n props.gridSettings\n )}\n
    {props.resources.deliveryMethodLabel}
    \n
    \n {deliveryCode?.Description}\n \n
    \n {showDeliveryOption ? (\n \n ) : null}\n
    \n );\n });\n\n return
    {response}
    ;\n};\nexport default GetLineItems;\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 {\n Address,\n CartLine,\n DeliveryOption,\n DeliveryPreferenceType,\n LineDeliverySpecification\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n GetDeliveryOptionsForCartLineAddressInput,\n getDeliveryOptionsForCartLineAddress,\n QueryResultSettingsProxy,\n StringExtensions,\n DeliveryOptionsCartLineAddress,\n ArrayExtensions\n} 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';\nimport groupBy from 'lodash/groupBy';\n\nimport { IImageSettings } from '@msdyn365-commerce/core';\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';\nimport { AddressDetailItemFunctionComponent } from './components/address-detail-item';\nimport CheckoutCartLineDeliveryDate from './components/checkout-cartLine-delivery-date';\nimport CheckoutCartLineDeliveryOptionsRadio from './components/checkout-cartLine-delivery-options-radio';\nimport { GetLineItems } from './components/get-line-items';\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 ICartLineSelectedDeliveryOption {\n cartLineId: string;\n selectedDeliveryOption: string;\n requestDeliveryDate?: string;\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 checkoutCartLineGroupDeliveryOptions?: React.ReactNode;\n enableCheckoutCartLineDeliveryOptions?: boolean;\n cartLineImages?: React.ReactNode;\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 @observable private groupDeliveryOptions: DeliveryOptionsCartLineAddress[] = [];\n\n @observable private cartLineSelectedDeliveryOptions: ICartLineSelectedDeliveryOption[] = [];\n\n @computed private get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\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 private readonly isMultipleAddressShippingEnabled?: boolean;\n\n private readonly timeoutRetailCall: number;\n\n private cartLinesDeliveryOptions: ICartLineSelectedDeliveryOption[] = [];\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 this.isMultipleAddressShippingEnabled = this.props.config.multipleAddressShippingEnabled;\n this.timeoutRetailCall = this.props.config.timeoutToCallRetail !== undefined ? this.props.config.timeoutToCallRetail : 0;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n if (\n (this.props.data.checkout.result?.isExpressCheckoutApplied && this.canShip()) ||\n this.isExpressPaymentAppliedInCartPage\n ) {\n await this.init();\n } else {\n // Wait for a specific time (e.g., 2000 milliseconds = 2 seconds)\n await new Promise(resolve => setTimeout(resolve, this.timeoutRetailCall));\n // Then call the init function\n await this.init();\n }\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?.cartLinesWithShippingAddress,\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 checkoutCartLineGroupDeliveryOptions: this.getCheckoutCartLineGroupDeliveryOptions(),\n enableCheckoutCartLineDeliveryOptions: this.isMultipleAddressShippingEnabled,\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 if (this.isMultipleAddressShippingEnabled) {\n this.getCartLinesSavedDeliveryOption();\n }\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 const channelConfig = this.props.context.request.channel;\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 const channelConfig = this.props.context.request.channel;\n\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\n const getAriaLabelWithPrice = get(deliveryOption, 'ShippingChargeAmount', 0);\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 if (this.isMultipleAddressShippingEnabled) {\n this.updateCartLinesDeliverySpecification();\n } else {\n await this.updateCartDeliverySpecification(this.selectedItemId);\n }\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 getCartLinesSavedDeliveryOption = (): void => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n cartLinesForShipping.forEach(cartLine => {\n const deliveryMode = cartLine.DeliveryMode !== undefined ? cartLine.DeliveryMode : '';\n if (!cartLine.LineId || StringExtensions.isNullOrEmpty(deliveryMode)) {\n return;\n }\n const cartLineId = cartLine?.LineId;\n const existingCartLineSelectedDeliveryOption = this.cartLinesDeliveryOptions.find(\n cartLineDeliveryOption => cartLineDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryMode;\n } else {\n if (cartLineId !== undefined) {\n this.cartLinesDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryMode });\n }\n }\n });\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 @action\n private readonly updateCartLinesDeliverySpecification = async (): Promise => {\n if (!this.cartLineSelectedDeliveryOptions || !this.cartLineSelectedDeliveryOptions.length) {\n return;\n }\n const { resources } = this.props;\n let lineSpecs: LineDeliverySpecification[] = [];\n const checkoutCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines;\n\n this.cartLineSelectedDeliveryOptions.forEach(group => {\n const address = checkoutCartLines?.find(cartLine => cartLine.LineId === group.cartLineId)?.ShippingAddress;\n const lineSpec = {\n LineId: group.cartLineId,\n DeliverySpecification: {\n DeliveryModeId: group.selectedDeliveryOption,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ShipToAddress,\n DeliveryAddress: address\n }\n };\n lineSpecs.push(lineSpec);\n });\n\n try {\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const response = await checkoutState.checkoutCart.updateCartLinesDeliverySpecification({\n lineDeliverySpecifications: lineSpecs\n });\n\n if (response.status === 'FAILED') {\n this.setError(resources.genericErrorMessage);\n } else {\n const cartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines;\n if (cartLines !== undefined && cartLines.length > 0) {\n cartLines?.forEach(cartLine => {\n const cartLineId = cartLine.LineId?.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n cartLine.RequestedDeliveryDate = existingCartLineSelectedDeliveryOption.requestDeliveryDate\n ? new Date(existingCartLineSelectedDeliveryOption.requestDeliveryDate)\n : undefined;\n }\n });\n await checkoutState.checkoutCart.updateCartLines({ updatedCartLinesObject: cartLines });\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 const cartLinesForShipping = this.props.data.checkout.result?.cartLinesWithShippingAddress;\n\n if (this.canShip() && (shippingAddress || cartLinesForShipping)) {\n if (\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied\n ) {\n this.isMultipleAddressShippingEnabled\n ? await this.getGroupDeliveryOptions()\n : shippingAddress !== undefined\n ? await this.getDeliveryOptions(shippingAddress)\n : null;\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 onCartLineDeliveryOptionChange = (\n event: React.ChangeEvent,\n cartLines: CartLine[],\n cartLineId?: string\n ) => {\n const deliveryModeId = event.currentTarget.value;\n if (cartLineId !== undefined) {\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n console.log('existingCartLineSelectedDeliveryOption');\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryModeId;\n console.log('cartLineSelectedDeliveryOptions object if existing');\n } else {\n this.cartLineSelectedDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryModeId });\n console.log('cartLineSelectedDeliveryOptions object new line id');\n }\n return;\n }\n\n cartLines.forEach(cartLine => {\n if (!cartLine.LineId) {\n return;\n }\n const cartLineId = cartLine?.LineId.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryModeId;\n } else {\n this.cartLineSelectedDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryModeId });\n }\n });\n };\n\n private readonly onCartLineRequestDeliveryDateChange = (event: React.ChangeEvent, cartLines: CartLine[]) => {\n const deliveryDate = event.currentTarget.value;\n cartLines.forEach(cartLine => {\n if (!cartLine.LineId) {\n return;\n }\n const cartLineId = cartLine?.LineId.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.requestDeliveryDate = deliveryDate;\n } else {\n const deliveryModeId = cartLine.DeliveryMode !== undefined ? cartLine.DeliveryMode : '';\n this.cartLineSelectedDeliveryOptions.push({\n cartLineId,\n selectedDeliveryOption: deliveryModeId,\n requestDeliveryDate: deliveryDate\n });\n }\n });\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 private readonly getCheckoutCartLineGroupDeliveryOptions = (): React.ReactNode => {\n const { resources, config } = this.props;\n const shippingCartLines = this.getCartLinesForShipping();\n if (!ArrayExtensions.hasElements(shippingCartLines) || !ArrayExtensions.hasElements(this.groupDeliveryOptions)) {\n return null;\n }\n const imageSettings = this.getImageSettings(config.imageSettings);\n const requestDeliveryDateEnabled = config.enableRequestDeliveryDate === true && this.isMultipleAddressShippingEnabled === true;\n return (\n
    \n {this.groupDeliveryOptions.map((groupDeliveryOption: DeliveryOptionsCartLineAddress, index) => {\n const cartLineId = groupDeliveryOption.cartLineIds !== undefined ? groupDeliveryOption.cartLineIds[0] : '';\n const cartLine1 = shippingCartLines.find(cartLine => cartLineId === cartLine?.LineId?.toString() ?? '');\n const cartLine = shippingCartLines.filter(\n cartLine => groupDeliveryOption && (cartLineId === cartLine?.LineId?.toString() ?? '')\n );\n if (groupDeliveryOption !== undefined) {\n const selectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLine[0].LineId\n )?.selectedDeliveryOption;\n return (\n
    \n
    \n \n
    \n
    \n
    \n \n {resources.cartLineGroupDeliveryOptionsLabel}\n \n \n {resources.cartLineGroupDeliveryOptionsText}\n \n {requestDeliveryDateEnabled ? (\n \n ) : null}\n \n
    \n {groupDeliveryOption.cartLineIds?.map(cartLineId => {\n const cartLine1 = shippingCartLines.find(\n cartLine => cartLineId === cartLine?.LineId?.toString() ?? ''\n );\n const selectedDeliveryOption1 = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption =>\n cartLineSelectedDeliveryOption.cartLineId === cartLine1?.LineId\n )?.selectedDeliveryOption;\n return (\n \n );\n })}\n
    \n
    \n );\n } else {\n return null;\n }\n })}\n
    \n );\n };\n\n private readonly getGroupDeliveryOptions = async (): 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\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 cartLinesForShipping: CartLine[] = [];\n if (ArrayExtensions.hasElements(shippingCartLines)) {\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.ShippingAddress?.RecordId);\n cartLinesForShipping.push(getGroupByDelivery(shippingCartLines));\n console.log('running delivery option for all lines');\n }\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 inputData = new GetDeliveryOptionsForCartLineAddressInput(deliveryOptionFilter, shippingCartLines);\n const response = await getDeliveryOptionsForCartLineAddress(inputData, context.actionContext);\n if (response && response.length > 0) {\n this.groupDeliveryOptions = response;\n console.log('groupDeliveryOptions');\n }\n if (this.groupDeliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartLinesDeliveryOptions.length !== 0) {\n this.cartLineSelectedDeliveryOptions = this.cartLinesDeliveryOptions;\n this.cartLinesDeliveryOptions = [];\n this.onReady();\n } else {\n this.onUpdating();\n this.groupDeliveryOptions.forEach(group => {\n const selectedDeliveryOption =\n group.deliveryOptions.length > 0 && group.deliveryOptions[0].Code !== undefined\n ? group.deliveryOptions[0].Code\n : '';\n group.cartLineIds?.forEach(cartLineId => {\n this.cartLineSelectedDeliveryOptions.push({\n cartLineId,\n selectedDeliveryOption\n });\n });\n });\n }\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n }\n this.isLoading = false;\n };\n\n /**\n * Gets the image settings.\n * @param imageSettings - Image settings.\n * @returns IImageSettings.\n */\n private readonly getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return (\n imageSettings || {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true\n }\n );\n };\n}\n\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 enableCheckoutCartLineDeliveryOptions,\n checkoutErrorRef,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n alert,\n waiting,\n saveButton,\n editButton,\n cancelButton,\n checkoutCartLineGroupDeliveryOptions\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 && !enableCheckoutCartLineDeliveryOptions && (\n \n )}\n {viewState.isShowList && enableCheckoutCartLineDeliveryOptions && checkoutCartLineGroupDeliveryOptions}\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 config,\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 const channelConfig = this.props.context.request.channel;\n const viewProps = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isShowLoyalty,\n isShowAddLoyalty: !isReady && !config.disableAddLoyaltyComponent\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 const channelConfig = this.props.context.request.channel;\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } 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 { ErrorCode, 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 * Known action error failure states\n */\nexport const enum ActionErrorStatus {\n Timeout = 'Timeout',\n HookTimeout = 'Hook Timeout',\n ServiceUnavailable = 'Service Unavailable'\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 moduleState?: IModuleStateManager;\n telemetryContent?: ITelemetryContent;\n checkoutGuidedFormHasError?: 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 const checkoutErrorLocation: boolean = checkoutError?.errorLocation === ErrorLocation.Checkout;\n // If there is an Error in CheckoutPaymentInstrument module, checkout error location will be updated.\n const checkoutPaymentErrorLocation: boolean =\n checkoutError?.errorCode === ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment\n ? checkoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument\n : checkoutErrorLocation;\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n checkoutError &&\n checkoutError.errorMessage &&\n (checkoutErrorLocation ? checkoutErrorLocation : checkoutPaymentErrorLocation)\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 moduleState,\n telemetryContent: this.telemetryContent,\n checkoutGuidedFormHasError: !!errorMessage\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: { checkoutOutOfStockErrorMessage },\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 this.handleCheckoutError(error);\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 let electronicDeliveryInvoiceAddress: Address;\n\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\n\n if (hasShippingAddress && this.props.config.useShippingAddressAsElectronicDeliveryInvoiceAddress) {\n electronicDeliveryInvoiceAddress = this.props.data.checkout?.result?.shippingAddress as Address;\n }\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 DeliveryAddress: hasShippingAddress ? electronicDeliveryInvoiceAddress : undefined\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 if (this._shouldValidateQuantityLimits()) {\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 private readonly _shouldValidateQuantityLimits = (): boolean => {\n const featureStatuses = this.props.data.featureState.result;\n const isECommerceQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n\n if (isECommerceQuantityLimitsFeatureEnabledInHq) {\n return true;\n }\n\n const isOrderQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')\n ?.IsEnabled || false;\n\n if (!isOrderQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n\n const useSiteBuilderSettings = featureStatuses?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n const isB2BSite = isChannelTypeB2B(this.props.context.actionContext.requestContext);\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && isB2BSite) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !isB2BSite)));\n\n return isOrderQuantityLimitsFeatureEnabledInSiteSettings ?? false;\n } else {\n const cartConfiguration = this.props.data.cartConfiguration?.result;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\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 /**\n * Handle checkout errors.\n * @param error -- The error on checkout api failure.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly handleCheckoutError = (error: any) => {\n // Here checkout failure message will be shown if there is any error in checkout api except data validation.\n const {\n resources: {\n genericErrorMessage,\n invalidCartVersionErrorMessage,\n missingRequiredCartTenderLinesErrorMessage,\n checkoutApiFailureErrorMessage,\n invoiceCheckoutApiFailureErrorMessage\n },\n context: { actionContext }\n } = this.props;\n const checkoutResult = this.props.data.checkout.result;\n const apiError = error && error.message;\n if (error?.statusCode === 500) {\n const errorMessage = checkoutApiFailureErrorMessage;\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n this.setState({ isPlaceOrderLoading: false });\n return;\n }\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\n const errorCode = error && error.name ? error.name : '';\n // apiError message will be used if errorcode resource/enums is unavailable\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext, apiError);\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 (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_ExclusiveCouponCannotBeAppliedWithOtherCoupons') {\n // If api error is not available show generic message\n errorMessage = apiError || genericErrorMessage;\n } else {\n if (error.status === ActionErrorStatus.Timeout || error.status === ActionErrorStatus.ServiceUnavailable) {\n errorMessage = checkoutResult?.checkoutCart.hasInvoiceLine\n ? invoiceCheckoutApiFailureErrorMessage\n : checkoutApiFailureErrorMessage;\n }\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\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 {\n ICheckoutViewProps,\n ILineItem,\n ILineItemDeliveryGroup,\n ILineItems,\n IOrderSummary,\n IPickUpAtStore,\n IEmailDelivery,\n IInvoicePaymentSummary\n} from './index';\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.customerAccount}\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 { 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 { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } 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 && isChannelTypeB2B(context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n const currencyCode = get(input, 'context.request.channel.Currency');\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 === '' &&\n cartLine.DeliveryMode === emailDeliveryModeCode &&\n !StringExtensions.isNullOrEmpty(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 customerAccountLabel\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 customerAccountLabel\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 const childModule = this._enableAfterModule();\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 /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _enableAfterModule = (): string => {\n const childIds: string[] = this.props.items.map((item: React.ReactNode) => get(item, 'props.id')).filter(Boolean);\n let id: string = '';\n for (let i = 0; i < childIds.length - 1; i++) {\n const childId = childIds[i];\n const nextChildId = childIds[i + 1];\n if (this._isPaymentSectionContainer(childId) && nextChildId) {\n id = nextChildId;\n }\n }\n return id;\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n const sectionState = this.props.moduleState.getModule(moduleId);\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n sectionState.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer) {\n return true;\n }\n return false;\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, moduleChildId: string, childId: string): boolean => {\n if (this.props.isEditor) {\n // Editorial mode: Expand all the drawers\n return true;\n }\n if (this.props.shouldEnableSinglePaymentAuthorizationCheckout && moduleChildId === childId) {\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, IGiftCardBalanceCheckViewProps } from './index';\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, validateCatalogId } 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 priceCurrency?: string;\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 validateCatalogId(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 =\n product &&\n getFallbackImageUrl(\n product.ItemId,\n props.context.actionContext.requestContext.apiSettings,\n props.context.request.app?.config?.OmniChannelMedia\n );\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 { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, CartLine } from '@msdyn365-commerce/retail-proxy';\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IInvoiceSummaryProps {\n orderTotalLabel: string;\n invoiceLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n id: string;\n typeName: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n}\n\nexport interface IInvoiceSummaryLines {\n orderTotal: React.ReactNode;\n invoices: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n}\n\ninterface IInvoiceSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n}\n\nconst InvoiceSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel\n}) => {\n return (\n

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

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

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

    \n );\n};\n\nconst _buildOrderSummarySection = (\n props: IOrderSummaryProps,\n price: number | undefined,\n cssLabel: string,\n label: string = ''\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computedCustomerAccountAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.customerAccountAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nconst getDeliveryConfiguration = (\n cart: Cart,\n channelConfiguration: ChannelConfiguration,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n retailMultiplePickUpOptionEnabled?: boolean,\n isTaxIncludedInPrice?: boolean,\n isShowTaxBreakup?: boolean\n): IShippingOrderLine => {\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\n const cartLines = cart.CartLines || [];\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\n const taxOnShippingCharge = cart.TaxOnShippingCharge !== undefined ? cart.TaxOnShippingCharge : 0;\n const shippingChargeAmount = cart.ShippingChargeAmount !== undefined ? cart.ShippingChargeAmount : 0;\n\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True shippingChargeAmount\n // True True shippingChargeAmount\n // True false shippingChargeAmount + taxOnShippingCharge\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n let freightFee: number | undefined = 0;\n if (isTaxIncludedInPrice === undefined || isShowTaxBreakup === undefined) {\n freightFee = cart.ShippingChargeAmount;\n } else {\n freightFee = isTaxIncludedInPrice && !isShowTaxBreakup ? shippingChargeAmount + taxOnShippingCharge : cart.ShippingChargeAmount;\n }\n const canShip = deliveryModes.some(\n deliveryMode =>\n !(\n deliveryMode !== '' &&\n (deliveryMode ===\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) ||\n deliveryMode === emailDeliveryModeCode)\n )\n );\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\n const hasShippingMethod = deliveryModes.some(\n deliveryMode =>\n !!deliveryMode &&\n deliveryMode !==\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) &&\n deliveryMode !== emailDeliveryModeCode\n );\n return {\n canShip,\n hasDeliveryMethod,\n hasShippingMethod,\n freightFee\n } as IShippingOrderLine;\n};\n\nconst getDeliveryMode = (\n deliveryMode?: string,\n featureSate: boolean = false,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n pickupDeliveryMode?: string\n) => {\n if (!featureSate) {\n return pickupDeliveryMode;\n }\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\n};\n\n// eslint-disable-next-line complexity\nexport const OrderSummary = (props: IOrderSummaryProps) => {\n const {\n SubtotalAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n SubtotalAmountWithoutTax,\n TaxAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n TaxOnNonShippingCharges,\n DiscountAmount = 0,\n TotalAmount,\n OtherChargeAmount\n } = props.cart;\n\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(\n props.cart,\n props.channelConfiguration,\n props.channelDeliveryOptionConfig,\n props.retailMultiplePickUpOptionEnabled,\n props.isTaxIncludedInPrice,\n props.isShowTaxBreakup\n );\n\n let reactNodes: IOrderSummaryLines;\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n if (props.isTaxIncludedInPrice === undefined || props.isShowTaxBreakup === undefined) {\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, SubtotalAmount, 'sub-total', props.subTotalLabel),\n tax: _buildOrderSummarySection(props, hasDeliveryMethod ? TaxAmount : undefined, 'tax-amount', props.taxLabel),\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, OtherChargeAmount, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n } else {\n const otherChargeAmount = OtherChargeAmount !== undefined ? OtherChargeAmount : 0;\n const taxOnNonShippingCharges = TaxOnNonShippingCharges !== undefined ? TaxOnNonShippingCharges : 0;\n const isTaxGreaterThanZero = TaxAmount !== undefined && TaxAmount > 0;\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True otherChargeAmount\n // True True otherChargeAmount\n // True false otherChargeAmount+TaxOnNonShippingCharges\n\n const otherChargeAmountTotal =\n props.isTaxIncludedInPrice && !props.isShowTaxBreakup ? otherChargeAmount + taxOnNonShippingCharges : otherChargeAmount;\n\n const subtotalAmountActual = props.isTaxIncludedInPrice && props.isShowTaxBreakup ? SubtotalAmountWithoutTax : SubtotalAmount;\n\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, subtotalAmountActual, 'sub-total', props.subTotalLabel),\n tax: props.isShowTaxBreakup\n ? _buildOrderSummarySection(\n props,\n hasDeliveryMethod || isTaxGreaterThanZero ? TaxAmount : undefined,\n 'tax-amount',\n props.taxLabel\n )\n : '',\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, otherChargeAmountTotal, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n }\n if (canShip) {\n reactNodes.shipping = _buildOrderSummarySection(props, hasShippingMethod ? freightFee : undefined, 'shipping', props.shippingLabel);\n }\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const customerAccountAmount = _computedCustomerAccountAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount - customerAccountAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\n }\n\n if (customerAccountAmount > 0) {\n reactNodes.customerAccount = _buildOrderSummarySection(\n props,\n -customerAccountAmount,\n 'customer-credit-amount',\n props.customerAccountLabel || 'Customer Credit amount'\n );\n }\n\n reactNodes.orderTotal = _buildOrderSummarySection(\n { ...props, freeText: undefined },\n totalAmountAfterGiftCard,\n 'total',\n props.orderTotalLabel\n );\n }\n\n if (DiscountAmount > 0) {\n reactNodes.totalDiscounts = _buildOrderSummarySection(props, -DiscountAmount, 'total-discounts', props.totalDiscountsLabel);\n }\n\n return reactNodes;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddOrderTemplateToCartComponent, ILinesAddedToCartDialogResources } from '@msdyn365-commerce/components';\nimport { getUrlSync, ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { ProductList, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n getFallbackImageUrl,\n getProductUrlSync,\n OrderTemplate,\n OrderTemplateLine,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateActionMessageState } from '../order-template-list';\n\nexport interface ISingleOrderTemplateProps extends ProductList {\n orderTemplateState: IOrderTemplateActionMessageState;\n name?: string;\n orderTemplate: OrderTemplate;\n context: ICoreContext;\n imageSettings?: IImageSettings;\n enableImageProductLink?: boolean;\n removeFromOrderTemplateListText: string;\n addToBagText: string;\n index: number;\n itemKey: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n handlers: {\n onRemoveOrderTemplate(id: string): void | undefined;\n onDismiss(): void;\n };\n resources: {\n closeWindowButtonText: string;\n addToCartFailureMessage: string;\n addToCartSuccessMessage: string;\n addToCartProcessMessage: string;\n orderTemplateErrorMessage: string;\n linesAddedToCartDialogResources: ILinesAddedToCartDialogResources;\n };\n telemetryContent?: ITelemetryContent;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n}\n\nexport interface ISingleOrderTemplateViewProps {\n key: string;\n orderTemplateImage: React.ReactNode;\n addToCartButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n orderTemplateStatusMessage?: React.ReactNode;\n orderTemplateName?: React.ReactNode;\n orderTemplateAriaLabel?: string;\n orderTemplateHeaderDivider?: React.ReactNode;\n}\n\nconst _removeItemFromOrderTemplateList = (props: ISingleOrderTemplateProps): void => {\n const { onRemoveOrderTemplate } = props.handlers;\n const { itemKey } = props;\n\n onRemoveOrderTemplate && itemKey && onRemoveOrderTemplate(itemKey);\n};\n\nconst OrderTemplateActions = {\n removeOrderTemplate: _removeItemFromOrderTemplateList\n};\n\n/**\n * Remove order template action.\n * @param input -Single order template props.\n * @returns Set remove order template.\n */\nconst removeOrderTemplateActionHandler = (input: ISingleOrderTemplateProps) => () => {\n OrderTemplateActions.removeOrderTemplate(input);\n};\n\nexport const OrderTemplateRender = (input: ISingleOrderTemplateProps): ISingleOrderTemplateViewProps | null => {\n const {\n Id,\n orderTemplate,\n removeFromOrderTemplateListText,\n orderTemplateState,\n handlers,\n name,\n imageSettings,\n context,\n telemetryContent,\n enableImageProductLink\n } = input;\n\n if (!Id) {\n return null;\n }\n\n const _getOrderTemplatePageUrl = (): string => {\n const url = getUrlSync('ordertemplate', context.actionContext) ?? '';\n const separator = url.includes('?') ? '&' : '?';\n if (Id) {\n return `${url}${separator}id=${Id}`;\n }\n return '';\n };\n\n const { onDismiss } = handlers;\n\n return {\n key: `${Id}-template`,\n orderTemplateImage: _renderOrderTemplateImages(context, orderTemplate.orderTemplateLines, imageSettings, enableImageProductLink),\n orderTemplateAriaLabel: _renderAriaLabel(input),\n orderTemplateName: (\n
    \n \n
    \n {orderTemplate.totalLines}\n {` `}\n line items\n
    \n
    \n
    \n ),\n addToCartButton: (\n
    \n \n
    \n ),\n removeButton: (\n \n ),\n orderTemplateStatusMessage: orderTemplateState && orderTemplateState.isOpen && orderTemplateState.userMessage && (\n
    \n \n {orderTemplateState.userMessage}\n \n
    \n )\n };\n};\n\n/**\n * On image click handler.\n * @param productUrl -Product url value.\n * @returns Assign window location.\n */\nconst onClickHandler = (productUrl: string) => () => {\n window.location.assign(productUrl);\n};\n\nconst _renderOrderTemplateImages = (\n context: ICoreContext,\n orderTemplateLines?: OrderTemplateLine[],\n imageSettings?: IImageSettings,\n enableImageProductLink?: boolean\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n lg: { q: 'w=140&h=140&m=6', w: 0, h: 0 },\n xl: { q: 'w=140&h=140&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n if (orderTemplateLines) {\n const count = orderTemplateLines.length < 4 ? orderTemplateLines.length : 4;\n\n return (\n
    \n {orderTemplateLines?.slice(0, count).map(line => {\n const productUrl = line.fullProduct\n ? _updateProductUrlCatalog(line.fullProduct.ProductDetails, context, line?.productListLine?.CatalogId)\n : '';\n\n return (\n \n );\n })}\n
    \n );\n }\n return
    ;\n};\n\n// This method is used to update the product url with the catalogId\nconst _updateProductUrlCatalog = (productDetails: SimpleProduct, context: ICoreContext, catalogId: number | undefined): string => {\n const productUrl = getProductUrlSync(productDetails, context.actionContext, undefined);\n if (!StringExtensions.isNullOrWhitespace(productUrl) && catalogId !== undefined) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${catalogId ?? 0}`);\n return fullUrl.href;\n }\n return productUrl;\n};\n\nconst _renderAriaLabel = (props: ISingleOrderTemplateProps): string => {\n const { name } = props;\n return `${name}`;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { orderTemplateListStatus } from '../order-template-list';\n\nexport interface IOrderTemplateListStatusMessageProps {\n className?: string;\n errorType: orderTemplateListStatus;\n text?: string;\n}\n\nexport const OrderTemplateListStatusMessage: React.FC = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return

    {text}

    ;\n case 'FAILED':\n return

    {text}

    ;\n case 'LOADING':\n default:\n return

    {text}

    ;\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IOrderTemplateNameDialogResources, OrderTemplateNameDialog } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport React, { useState } from 'react';\n\nconst modalCloseButtonReference: React.RefObject = React.createRef();\n\n/**\n * The Create Order Template Button Props.\n */\nexport interface ICreateOrderTemplateButtonProps extends IComponentProps {\n /**\n * The label for create order template.\n */\n createOrderTemplateText: string;\n\n /**\n * The create order template dialog resources.\n */\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n\n /**\n * The delegate to fire when dialog captured any user entry.\n */\n onOrderTemplateCreated(): Promise;\n}\n\nconst CreateOrderTemplateButton: React.FC = props => {\n const onCancelHandler = React.useCallback(() => {\n return;\n }, []);\n const [isCreateOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = useState(false);\n const onCreateButtonClick = React.useCallback(() => {\n setOrderTemplateNameDialogOpen(true);\n }, []);\n\n return (\n <>\n \n {props.createOrderTemplateText}\n \n \n \n );\n};\n\nexport default CreateOrderTemplateButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IOrderTemplateNameDialogResources } from '@msdyn365-commerce/components';\nimport { deleteAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport { OrderTemplate } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport Spinner from '../order-template/components/add-line/spinner';\nimport {\n ISingleOrderTemplateProps,\n ISingleOrderTemplateViewProps,\n OrderTemplateListStatusMessage,\n OrderTemplateRender\n} from './components';\nimport CreateNewTemplateButtonComponent from './components/create-order-template';\nimport { IOrderTemplateListData } from './order-template-list.data';\nimport { HeadingTag, IOrderTemplateListProps, IOrderTemplateListResources } from './order-template-list.props.autogenerated';\n\nexport interface IOrderTemplateActionMessageState {\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n headerStatusMessage: string;\n}\n\nexport type orderTemplateListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IOrderTemplateListViewProps extends IOrderTemplateListProps {\n OrderTemplateList: IModuleProps;\n status?: orderTemplateListStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n OrderTemplates?: INodeProps;\n OrderTemplate?: INodeProps;\n orderTemplates?: ISingleOrderTemplateViewProps[];\n createOrderTemplateButton?: React.ReactNode;\n templateHeaderStatusMessage?: React.ReactNode;\n}\n\n/**\n *\n * OrderTemplateList component.\n * @extends {React.PureComponent, IOrderTemplateListActionMessageState>}\n */\n@observer\nclass OrderTemplateList extends React.Component, IOrderTemplateActionMessageState> {\n constructor(props: IOrderTemplateListProps) {\n super(props);\n this.state = {\n itemKey: '',\n userMessage: '',\n headerStatusMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false\n };\n }\n\n public async componentDidMount(): Promise {\n this.setState({});\n }\n\n public shouldComponentUpdate(\n nextProps: IOrderTemplateListProps,\n nextState: IOrderTemplateActionMessageState\n ): 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 { className, heading } = this.props.config;\n const { emptyOrderTemplateText, createNewTemplateButtonText } = this.props.resources;\n const { orderTemplates } = this.props.data;\n const orderTemplatesData = orderTemplates && orderTemplates.result;\n const orderTemplateListHeading = heading?.text ?? this.props.resources.orderTemplateListTitle;\n\n if (orderTemplates.status === 'LOADING') {\n const errorProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'LOADING',\n statusMessage: ,\n heading: (\n \n )\n };\n return this.props.renderView(errorProps);\n }\n\n if (orderTemplatesData && orderTemplatesData.length === 0) {\n // When no order templates are found for customer\n const emptyViewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'EMPTY',\n statusMessage: ,\n createOrderTemplateButton: (\n \n ),\n heading: (\n \n )\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IOrderTemplateListViewProps = {\n ...(this.props as IOrderTemplateListProps),\n OrderTemplateList: {\n moduleProps: this.props,\n className: classnames('ms-order-template', className)\n },\n status: 'SUCCESS',\n heading: ,\n createOrderTemplateButton: (\n \n ),\n templateHeaderStatusMessage: this.state.isOpen && this.state.headerStatusMessage && (\n
    \n \n {this.state.headerStatusMessage}\n \n
    \n ),\n OrderTemplates: {\n className: 'ms-order-template__list-item',\n tag: 'ul'\n },\n OrderTemplate: {\n className: 'ms-order-template__tile',\n tag: 'li'\n },\n orderTemplates: orderTemplatesData && this._renderOrderTemplateList(orderTemplatesData)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _generateOrderTemplateNameDialogResources(resources: IOrderTemplateListResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.createOrderTemplateHeader,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateNameAriaLabel,\n orderTemplateDescription: resources.createOrderTemplateDescription,\n\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n\n orderTemplateButtonLabel: resources.createOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelNewOrderTemplateCreationButtonText\n };\n }\n\n private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (this.props.data.featureState) {\n isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n return isMultipleCatalogFeatureEnabledInHq;\n };\n\n private _renderOrderTemplateList(orderTemplates: OrderTemplate[]): ISingleOrderTemplateViewProps[] {\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n return orderTemplates.map((orderTemplate: OrderTemplate, index) => {\n const currentTemplateProps: ISingleOrderTemplateProps = {\n orderTemplateState: this.state,\n Id: orderTemplate.productList.Id,\n name: orderTemplate.productList.Name,\n orderTemplate,\n context,\n imageSettings,\n enableImageProductLink,\n removeFromOrderTemplateListText: 'remove',\n addToBagText: this.props.resources.addToBagButtonText,\n index,\n itemKey: orderTemplate.productList.Id,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n handlers: {\n onRemoveOrderTemplate: this._onRemoveFromOrderTemplateList,\n onDismiss: this._onDismiss\n },\n resources: {\n closeWindowButtonText: this.props.resources.closeWindowButtonText,\n addToCartFailureMessage: this.props.resources.addToCartFailureMessage,\n addToCartSuccessMessage: this.props.resources.addToCartSuccessMessage,\n addToCartProcessMessage: this.props.resources.addToCartProcessMessage,\n orderTemplateErrorMessage: this.props.resources.orderTemplateErrorMessage,\n linesAddedToCartDialogResources: {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n linesAddedToCartHeaderItemsOneText: this.props.resources.linesAddedToCartHeaderItemsOneText,\n linesAddedToCartHeaderLinesOneText: this.props.resources.linesAddedToCartHeaderLinesOneText,\n linesAddedToCartHeaderLinesFormatText: this.props.resources.linesAddedToCartHeaderLinesFormatText,\n linesAddedToCartHeaderMessageText: this.props.resources.linesAddedToCartHeaderMessageText\n }\n },\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled()\n };\n\n return OrderTemplateRender(currentTemplateProps)!;\n });\n }\n\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _reloadPage = async () => {\n window.location.reload();\n };\n\n private readonly _onRemoveFromOrderTemplateList = (productListId: string): void | undefined => {\n const { context, data, telemetry, resources } = this.props;\n const { orderTemplates } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplates.result && orderTemplates.result[0] && productListId) {\n const orderTemplate = orderTemplates.result.find(p => p.productList.Id === productListId);\n if (orderTemplate) {\n deleteAsync({ callerContext: context.actionContext }, orderTemplate.productList)\n .then()\n .catch((error: string) => {\n telemetry.warning('[order-template-list] Unable to delete order template.');\n telemetry.error(error);\n this.setState({\n itemKey: productListId,\n headerStatusMessage: resources.deleteOrderTemplateFailedText,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n })\n .then(this._reloadPage)\n .catch((error: string) => {\n telemetry.warning('[order-template-list] Unable to delete order template.');\n telemetry.error(error);\n });\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template. Order template was not found');\n }\n } else {\n telemetry.warning('[order-template-list] Failed to delete order template.');\n }\n }\n };\n}\n\nexport default OrderTemplateList;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISingleOrderTemplateViewProps } from './components';\nimport { IOrderTemplateListViewProps } from './order-template-list';\n\nexport const OrderTemplateListView: React.FC = props => {\n const {\n OrderTemplateList,\n status,\n statusMessage,\n heading,\n OrderTemplates,\n orderTemplates,\n OrderTemplate,\n createOrderTemplateButton,\n templateHeaderStatusMessage\n } = props;\n\n return (\n \n {heading}\n {status !== 'SUCCESS' && statusMessage}\n \n {createOrderTemplateButton}\n {templateHeaderStatusMessage}\n \n {OrderTemplates && orderTemplates && orderTemplates.length > 0 && (\n \n {orderTemplates &&\n orderTemplates.map(orderTemplate => {\n return _renderOrderTemplate(orderTemplate, OrderTemplate);\n })}\n \n )}\n \n );\n};\n\nconst _renderOrderTemplate = (orderTemplate: ISingleOrderTemplateViewProps, OrderTemplate?: INodeProps): JSX.Element | null => {\n const { key, addToCartButton, orderTemplateImage, orderTemplateStatusMessage, removeButton, orderTemplateName } = orderTemplate;\n return (\n \n {orderTemplateName}\n {orderTemplateImage}\n {addToCartButton}\n {removeButton}\n {orderTemplateStatusMessage}\n \n );\n};\n\nexport default OrderTemplateListView;\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 default (props: { className: string; msg?: string }) => (\n <>\n
    \n {props?.msg &&
    {props?.msg}
    }\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { getCatalogId, ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductListLine, ProductSearchCriteria, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { searchByCriteriaAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport { ProductCatalog, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n addItemToOrderTemplate,\n AddItemToOrderTemplateInput,\n ArrayExtensions,\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getSelectedVariant,\n SelectedVariantInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalHeader, getPayloadObject, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport { get } from 'lodash';\nimport { computed } from 'mobx';\nimport React from 'react';\n\nimport { IProductConfigurationState, NotFoundComponent, ProductConfiguration, ProductList } from '.';\nimport Spinner from './spinner';\n\nexport interface IAddLineToTemplateProps {\n context: ICoreContext;\n resources: IAddLineToTemplateResources;\n orderTemplateId: string;\n imageSettings?: IImageSettings;\n isMultipleCatalogFeatureEnabledInHq: boolean;\n catalogs?: ProductCatalog[] | undefined;\n telemetryContent?: ITelemetryContent;\n}\n\nexport interface IAddLineToTemplateResources {\n addLineModalLinkText: string;\n searchButtonAriaLabel: string;\n searchInputAriaLabel: string;\n searchModalPlaceholderText: string;\n selectCatalogTitleText: string;\n selectProductButtonText: string;\n addItemToTemplateText: string;\n addLineProductUnitPricePrefix: string;\n backButtonText: string;\n decrementButtonAriaLabel: string;\n incrementButtonAriaLabel: string;\n quantitySelectLabel: string;\n addLineProductUnitOfMeasurePrefix: string;\n notFoundSearchErrorNotice: string;\n notFoundSearchErrorRedediation: string;\n searchErrorMessage: string;\n productDimensionTypeColor: string;\n productDimensionTypeConfiguration: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n searchResultsCountVerbage: string;\n searchResultsCountSubject: string;\n addToTemplateConfirmation: string;\n totalPriceLabel: string;\n progressNotificationText: string;\n addToTemplateDuplicateError: string;\n addToTemplateGenericError: string;\n dimensionMissingError: string;\n backToResultsText?: string;\n}\n\nenum CONTENT {\n Search,\n ProductList,\n ProductConfiguration,\n NotFound,\n Error,\n Loading\n}\n\ninterface IAddLineToTemplateState {\n isOpen: boolean;\n query: string;\n products: ProductSearchResult[];\n productCatalogs: ProductCatalog[] | null;\n content: number;\n selectedProduct: SimpleProduct | null;\n selectedCatalogId: number | undefined;\n selectedProductDimensions?: ProductDimensionFull[];\n selectedQuantity?: number;\n reloadPage?: boolean;\n}\n\n/**\n * Add Lines to order template.\n */\nexport class AddLineToTemplate extends React.Component {\n public state: IAddLineToTemplateState = {\n isOpen: false,\n query: '',\n products: [],\n productCatalogs: [],\n content: CONTENT.Search,\n selectedProduct: null,\n selectedCatalogId: 0\n };\n\n public defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n lg: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n xl: { q: 'w=64&h=64&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n public searchTextInput: React.RefObject = React.createRef(); // @TODO public/private\n\n private readonly addLineButtonRef: React.RefObject = React.createRef();\n\n constructor(props: IAddLineToTemplateProps) {\n super(props);\n }\n\n public onComponentDidMount(): void {\n this.searchTextInput.current?.focus();\n }\n\n public componentDidMount(): void {\n this._getCatalogs();\n }\n\n public onComponentDidUpdate(): void {\n this.searchTextInput.current?.focus();\n }\n\n @computed get showBackArrow(): boolean {\n return this.state.content === CONTENT.ProductConfiguration;\n }\n\n public shouldComponentUpdate(nextProps: IAddLineToTemplateProps, nextState: IAddLineToTemplateState): 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 {\n resources: { addLineModalLinkText, backToResultsText }\n } = this.props;\n\n const modalProps = {\n ...this.props,\n className: 'msc-add-line-to-template',\n toggle: this._toggleModalHandler,\n isOpen: this.state.isOpen,\n ariaLabel: addLineModalLinkText\n };\n\n return (\n <>\n \n \n {this.showBackArrow && (\n \n )}\n {addLineModalLinkText}\n \n {this._renderContent()}\n \n \n \n {addLineModalLinkText}\n \n \n );\n }\n\n private readonly _renderSearchForm = () => {\n const {\n resources: { searchButtonAriaLabel, searchModalPlaceholderText, selectCatalogTitleText }\n } = this.props;\n\n return (\n \n {this.state.productCatalogs && ArrayExtensions.hasElements(this.state.productCatalogs) && (\n <>\n \n \n {this._getCatalogNodes()}\n \n \n )}\n
    \n \n
    \n \n );\n };\n\n private readonly _onSearchSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n\n const query = get(this, 'searchTextInput.current.value', null);\n\n if (!query) {\n return;\n }\n\n this.setState({\n content: CONTENT.Loading\n });\n\n this._getSearchResults(query)\n .then(result => {\n if (result.length === 0) {\n this.setState({\n products: result,\n content: CONTENT.NotFound\n });\n } else {\n this.setState({\n products: result,\n content: CONTENT.ProductList\n });\n }\n })\n .catch(error => {\n this.setState({\n content: CONTENT.Error\n });\n });\n };\n\n private readonly _onQuantityChangeHandler = (event: React.ChangeEvent) => {\n this.setState({\n selectedQuantity: +event.target.value\n });\n };\n\n private readonly _onSelectItem = async (product: ProductSearchResult): Promise => {\n const {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n } = this.props.context;\n const varianteInput = new SelectedVariantInput(product.RecordId, channelId, [], undefined, this.props.context.request);\n const productVariant = await getSelectedVariant(varianteInput, actionContext);\n\n if (!productVariant) {\n this.props.context.telemetry.error('Error retrieving product variant');\n return Promise.resolve([]);\n }\n\n const dimensions = await this._getProductDimensions(product as SimpleProduct);\n\n this.setState({\n selectedProductDimensions: dimensions,\n content: CONTENT.ProductConfiguration,\n selectedProduct: productVariant\n });\n\n return dimensions;\n };\n\n private readonly _onInputChange = (event: React.ChangeEvent): void => {\n this.setState({\n query: event.target.value\n });\n };\n\n private readonly _onBackButtonClickHandler = (): void => {\n this.setState({\n content: CONTENT.ProductList\n });\n };\n\n private readonly _highlightSearchTerm = (name: string) => {\n const parsedName = name && unescape(name.replace(new RegExp(this.state.query, 'i'), '$&'));\n\n return (\n \n );\n };\n\n private readonly _resultCountText = (): string => {\n return this.props.resources.searchResultsCountVerbage\n .replace('{count}', this.state.products.length.toString())\n .replace('{subject}', `${this.props.resources.searchResultsCountSubject}${this.state.products.length > 1 ? 's' : ''}`);\n };\n\n private _renderContent(): React.ReactNode | null {\n switch (this.state.content) {\n case CONTENT.ProductConfiguration:\n const { selectedProduct, selectedProductDimensions } = this.state;\n const viewProps = {\n ...this.props,\n imageSettings: this.props.imageSettings || this.defaultImageSettings,\n product: selectedProduct!,\n dimensions: selectedProductDimensions!,\n addToTemplateHandler: this._addItemToTemplateHandler,\n onQuantityChangeHandler: this._onQuantityChangeHandler,\n highlightSearchTerm: this._highlightSearchTerm,\n searchForm: this._renderSearchForm()\n };\n\n return ;\n\n case CONTENT.ProductList:\n const productProps = {\n ...this.props,\n imageSettings: this.props.imageSettings || this.defaultImageSettings,\n clickHandler: this._onSelectItem,\n products: this.state.products,\n highlightSearchTerm: this._highlightSearchTerm,\n searchForm: this._renderSearchForm(),\n renderResultCountText: this._resultCountText\n };\n\n return (\n \n \n \n );\n\n case CONTENT.Loading:\n return (\n \n {this._renderSearchForm()}\n \n \n );\n\n case CONTENT.NotFound:\n const { notFoundSearchErrorNotice, notFoundSearchErrorRedediation } = this.props.resources;\n\n return (\n \n

    {this._resultCountText()}

    \n {this._renderSearchForm()}\n \n
    \n );\n\n case CONTENT.Error:\n return (\n \n {this._renderSearchForm()}\n
    \n {this.props.resources.searchErrorMessage}\n
    \n
    \n );\n\n default:\n return {this._renderSearchForm()};\n }\n }\n\n private readonly _addItemToTemplateHandler = async (config: IProductConfigurationState): Promise => {\n const {\n orderTemplateId,\n context: { actionContext },\n isMultipleCatalogFeatureEnabledInHq\n } = this.props;\n const catalogId = this.state.selectedCatalogId;\n const input = isMultipleCatalogFeatureEnabledInHq\n ? new AddItemToOrderTemplateInput(\n orderTemplateId,\n config.product.RecordId,\n config.quantity,\n config.product.DefaultUnitOfMeasure || 'ea',\n isMultipleCatalogFeatureEnabledInHq,\n catalogId\n )\n : new AddItemToOrderTemplateInput(\n orderTemplateId,\n config.product.RecordId,\n config.quantity,\n config.product.DefaultUnitOfMeasure || 'ea'\n );\n const result = await addItemToOrderTemplate(input, actionContext);\n this.setState({\n isOpen: false,\n reloadPage: true\n });\n // reload when closing\n window.location.reload();\n return result;\n };\n\n /**\n *\n * Get all active product catalogs.\n */\n private _getCatalogs(): void {\n const { isMultipleCatalogFeatureEnabledInHq, catalogs } = this.props;\n\n // if Channel Multiple Catalogs Feature is enabled then show all catalogs.\n const productCatalogs = isMultipleCatalogFeatureEnabledInHq && catalogs ? catalogs : [];\n\n // get the current catalog id.\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n // set the current catalog id as a default selected catalog id from the url\n this.setState({\n productCatalogs: productCatalogs,\n selectedCatalogId: catalogId\n });\n }\n\n private _getCatalogNodes(): JSX.Element[] | null {\n const { productCatalogs, selectedCatalogId } = this.state;\n if (productCatalogs && ArrayExtensions.hasElements(productCatalogs)) {\n return productCatalogs.map((productCatalog: ProductCatalog) => {\n // initially select default catalog in dropdown\n const isSelected = productCatalog.RecordId === selectedCatalogId;\n return (\n \n );\n });\n }\n return [];\n }\n\n private readonly _onCatalogSelectionChange = (event: React.ChangeEvent) => {\n this.setState({\n selectedCatalogId: Number.parseInt(event.target.value, 10)\n });\n };\n\n private _getSearchResults(searchText: string): Promise {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n const { selectedCatalogId } = this.state;\n const searchCriteriaInput: ProductSearchCriteria = {};\n\n searchCriteriaInput.Context = {\n ChannelId: channelId,\n CatalogId: selectedCatalogId\n };\n\n if (process.env.NODE_ENV === 'development' && process.env.ENABLE_CLOUD_SEARCH?.toLowerCase() !== 'true') {\n searchCriteriaInput.IncludeAttributes = false;\n } else {\n searchCriteriaInput.IncludeAttributes = true;\n }\n searchCriteriaInput.SearchCondition = searchText;\n\n return searchByCriteriaAsync({ callerContext: actionContext }, searchCriteriaInput);\n }\n\n private async _getProductDimensions(product: SimpleProduct): Promise {\n const {\n context: {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n }\n } = this.props;\n const id = product.MasterProductId ? product.MasterProductId : product.RecordId;\n\n return getDimensionsForSelectedVariant(\n new GetDimensionsForSelectedVariantInput(id, channelId, [], this.props.context.request),\n actionContext\n );\n }\n\n private readonly _toggleModalHandler = () => {\n if (this.state.isOpen) {\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'add-item-to-template', '');\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'add-item-to-template');\n this._getCatalogs();\n this.addLineButtonRef.current!.focus();\n }\n\n this.setState({\n isOpen: !this.state.isOpen,\n content: CONTENT.Search\n });\n\n if (this.state.reloadPage) {\n window.location.reload();\n this.setState({\n reloadPage: false\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 { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IDropdownState {\n /**\n * @friendlyName selectedIndex\n * @description Selected index.\n */\n selectedIndex: string;\n}\n\nexport interface IDropdownProps {\n dropdownId: number;\n dropdownName: string;\n dropdownList: IDropdownItemProps[];\n telemetryContent?: ITelemetryContent;\n onChange?(selection: IDropdownOnSelection): void;\n}\n\nexport interface IDropdownItemProps {\n value: string;\n id: number;\n}\n\nexport interface IDropdownOnSelection {\n dropdownId: number;\n selectId: string;\n selectedValue: string;\n}\n\n/**\n *\n * DropDown component.\n * @extends {React.PureComponent}\n */\nexport class Dropdown extends React.PureComponent {\n private readonly selectMenu: React.RefObject = React.createRef();\n\n constructor(props: IDropdownProps, state: IDropdownState) {\n super(props);\n this.state = {\n selectedIndex: ''\n };\n }\n\n public componentDidMount(): void {\n if (this.selectMenu.current) {\n this.selectMenu.current.selectedIndex = 0;\n }\n }\n\n public render(): JSX.Element {\n const { dropdownId, dropdownList, dropdownName } = this.props;\n\n return (\n \n {dropdownList.map(\n (item: IDropdownItemProps) =>\n item && (\n \n {item.value}\n \n )\n )}\n \n );\n }\n\n private readonly _onChanged = (event: React.ChangeEvent): void => {\n this.setState({ selectedIndex: event.target.value });\n\n if (this.props.onChange) {\n this.props.onChange({\n dropdownId: this.props.dropdownId,\n selectId: event.target.value,\n selectedValue: event.target.innerText\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 * as React from 'react';\n\nexport const NotFoundComponent = (props: { error: string; msg: string }) => (\n <>\n
    \n
    {props.error}
    \n
    {props.msg}
    \n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { debounce } from 'lodash';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\ninterface IQuantityProps {\n min?: number;\n max: number;\n currentCount?: number;\n disabled?: boolean;\n incrementGlyphClass?: string;\n decrementGlyphClass?: string;\n decrementButtonAriaLabel?: string;\n incrementButtonAriaLabel?: string;\n inputQuantityAriaLabel?: string;\n id?: string;\n onChange?(newValue: number): void;\n}\n\ninterface IQuantityState {\n currentInput: number;\n}\n\n/**\n * Quantity Component - This component is used to add or remove quantity.\n */\n@observer\nexport default class OrderTemplateQuantity extends React.PureComponent {\n public static defaultProps: Partial = {\n min: 1,\n decrementGlyphClass: 'fas fa-minus',\n incrementGlyphClass: 'fas fa-plus'\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n constructor(props: IQuantityProps) {\n super(props);\n this.state = { currentInput: props.currentCount || 1 };\n this._handleChange = this._handleChange.bind(this);\n\n reaction(\n () => this.props.currentCount,\n () => {\n this.setState({ currentInput: this.props.currentCount || 1 });\n }\n );\n }\n\n public render(): JSX.Element {\n const glyphMinusClassName: string = `${this.props.decrementGlyphClass!} quantity__controls-glyph`;\n const glyphPlusClassName: string = `${this.props.incrementGlyphClass!} quantity__controls-glyph`;\n const disabled = this.props.currentCount === this.props.min;\n const incDisabled = this.props.currentCount === this.props.max;\n const currentValue = this.state.currentInput;\n let extraClass = '';\n if (disabled) {\n // The quantity has reached its boundaries (max or min)\n extraClass = 'disabled';\n } else if (this.props.disabled) {\n // This.props.disabled shows if the state is not succeded yet\n extraClass = 'transition';\n }\n const getChangeHandler = (amount: number) => () => {\n this._onIncrementalChange(amount);\n };\n\n return (\n
    \n \n \n \n \n \n \n \n
    \n );\n }\n\n private _onIncrementalChange(amount: number): void {\n const updatedQuantity = this.state.currentInput + amount;\n\n if (updatedQuantity >= 1 && updatedQuantity <= this.props.max) {\n this.props.onChange && this.props.onChange(updatedQuantity);\n }\n }\n\n private _handleChange(e: React.ChangeEvent): void {\n const currentValue = Number.parseInt(e.target.value, 10);\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n const inputElement =\n this.inputRef && this.inputRef.current && this.inputRef.current instanceof HTMLInputElement && this.inputRef.current;\n\n if (currentValue > this.props.max) {\n this.setState({ currentInput: this.props.max });\n } else {\n this.setState({ currentInput: currentValue }, () => {\n debounce(() => {\n if (!isNaN(this.state.currentInput) && !(this.state.currentInput < minValue) && inputElement) {\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\n inputElement.setAttribute('value', currentValue.toString());\n }\n }, 200)();\n });\n }\n }\n\n private readonly _validateMin = (): void => {\n const minValue = this.props.min === undefined ? 1 : this.props.min;\n\n if (isNaN(this.state.currentInput) || this.state.currentInput < minValue) {\n this.props.onChange && this.props.onChange(minValue);\n } else {\n this.props.onChange && this.props.onChange(this.state.currentInput);\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 { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductDimensionValue, ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n getDimensionsForSelectedVariant,\n GetDimensionsForSelectedVariantInput,\n getFallbackImageUrl,\n getPriceForSelectedVariant,\n getProductAvailabilitiesForSelectedVariant,\n getSelectedVariant,\n IProductInventoryInformation,\n PriceForSelectedVariantInput,\n ProductAvailabilitiesForSelectedVariantInput,\n SelectedVariantInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, ITelemetryContent, ModalBody, ModalFooter } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport OrderTemplateQuantity from '../common/order-template-quantity';\nimport { Dropdown, IAddLineToTemplateProps, IAddLineToTemplateResources, IDropdownItemProps, IDropdownOnSelection } from '.';\n\nexport interface IProductCnnfigurationProps extends IAddLineToTemplateProps {\n product: SimpleProduct;\n dimensions: ProductDimensionFull[];\n imageSettings: IImageSettings;\n telemetryContent?: ITelemetryContent;\n searchForm: React.ReactNode;\n addToTemplateHandler(params: IProductConfigurationState): Promise;\n highlightSearchTerm(name: string): React.ReactNode;\n}\n\nexport interface IProductConfigurationState {\n quantity: number;\n unitPrice: number;\n totalPrice: number;\n product: SimpleProduct;\n dimensions: ProductDimensionFull[];\n selectedDimensions: {};\n productAvailableQuantity?: IProductInventoryInformation;\n buttonDisabled: boolean;\n showAddConfirmation: boolean;\n errorMessage?: string;\n isBusy: boolean;\n errors: { dimension?: string[]; add?: string };\n}\n\n/**\n * Configure selected product for addition to order template.\n */\nexport class ProductConfiguration extends React.Component {\n private selectedDimensions: {} = {};\n\n constructor(props: IProductCnnfigurationProps) {\n super(props);\n\n this.state = {\n quantity: 1,\n unitPrice: props.product.Price,\n totalPrice: props.product.Price,\n product: props.product,\n dimensions: props.dimensions.sort((a, b) => a.DimensionTypeValue - b.DimensionTypeValue),\n selectedDimensions: {},\n buttonDisabled: false,\n showAddConfirmation: false\n } as IProductConfigurationState;\n }\n\n public shouldComponentUpdate(nextProps: IProductCnnfigurationProps, nextState: IProductConfigurationState): 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 {\n context: {\n actionContext: {\n requestContext: { apiSettings }\n },\n request: { gridSettings }\n },\n resources: {\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n totalPriceLabel\n },\n imageSettings,\n highlightSearchTerm\n } = this.props;\n const { buttonDisabled, product, quantity, unitPrice, totalPrice, showAddConfirmation, errors } = this.state;\n const isMultipleCatalogSelect = this.props.isMultipleCatalogFeatureEnabledInHq ? 'isMultipleCatalogSelect' : '';\n return (\n <>\n \n {this.props.searchForm}\n
    \n
    \n
    \n \n
    \n
    {product?.ItemId}
    \n {highlightSearchTerm(product?.Name ?? '')}\n
    \n {addLineProductUnitPricePrefix}\n {` `}\n {this._formatPrice(unitPrice)}\n
    \n
    \n {addLineProductUnitOfMeasurePrefix}\n {` `}\n {product?.DefaultUnitOfMeasure}\n
    \n
    \n
    \n
    {this._getDimensionsNodes()}
    \n
    \n
    \n
    {quantitySelectLabel}
    \n \n
    \n
    \n
    \n {totalPriceLabel}\n {` `}\n {this._formatPrice(totalPrice)}\n
    \n
    \n \n {showAddConfirmation && (\n \n
    \n )}\n {errors?.add && (\n
    \n
    \n )}\n \n {addItemToTemplateText}\n \n \n \n );\n }\n\n private _getConfirmationMessage(): string {\n const selectedDimensionNames = this.state.dimensions\n .map(dimension => {\n let variant = dimension.DimensionValues?.find(\n value => value.RecordId === this.selectedDimensions[dimension.DimensionTypeValue]\n )?.Value;\n if (dimension.DimensionTypeValue === 3) {\n variant = `size ${variant}`;\n }\n return variant;\n })\n .filter(value => value);\n\n return this.props.resources.addToTemplateConfirmation\n .replace('{count}', this.state.quantity.toString())\n .replace('{productAndDimensions}', `${this.state.product.Name}, ${Object.values(selectedDimensionNames).join(', ')}`);\n }\n\n private _getDimensionsNodes(): React.ReactElement[] {\n const { dimensions } = this.state;\n const { resources } = this.props;\n\n return dimensions?.map((dimension: ProductDimensionFull) => {\n const { DimensionValues, DimensionTypeValue } = dimension;\n const mapDimensions = (value: ProductDimensionValue): IDropdownItemProps => ({\n id: value.RecordId,\n value: value.Value || ''\n });\n const dimensionName = this._getDropdownName(DimensionTypeValue, resources);\n const dropdownList: IDropdownItemProps[] = DimensionValues ? DimensionValues.map(mapDimensions) : [];\n dropdownList.unshift({ id: 0, value: `Choose a ${dimensionName}` });\n\n return (\n
    \n
    {dimensionName}
    \n {this.state.errors?.dimension?.includes(DimensionTypeValue.toString()) && (\n \n \n \n )}\n \n
    \n );\n });\n }\n\n private readonly _getDimensionsError = (dimensionName: string) =>\n this.props.resources.dimensionMissingError.replace(/{dimensionName}/g, dimensionName);\n\n private readonly _addToTemplateHandler = async (event: React.MouseEvent) => {\n // Hide confirmation of previous addition when adding multiple items\n this.setState({\n isBusy: true,\n showAddConfirmation: false,\n errors: { ...this.state.errors, add: undefined }\n });\n\n const missingDimensions = this.state.dimensions\n .map(dimension => dimension.DimensionTypeValue.toString())\n .filter(type => !this.selectedDimensions[type]);\n\n this.setState({\n errors: { dimension: missingDimensions }\n });\n if (missingDimensions.length > 0) {\n this.setState({\n isBusy: false\n });\n return;\n }\n\n this.props\n .addToTemplateHandler({ ...this.state })\n .then(status => {\n // Validate against the existance of a ProductListId\n if (status.ProductListId) {\n this.setState({\n isBusy: false,\n showAddConfirmation: true\n });\n }\n })\n .catch(error => {\n const { addToTemplateDuplicateError, addToTemplateGenericError } = this.props.resources;\n let errorMessage;\n\n if (error.error.name === 'Microsoft_Dynamics_Commerce_Runtime_DuplicateObject') {\n errorMessage = addToTemplateDuplicateError;\n } else {\n errorMessage = addToTemplateGenericError;\n }\n\n this.setState({\n isBusy: false,\n errors: { ...this.state.errors, add: errorMessage }\n });\n this.props.context.telemetry.error('Error adding item to order template');\n });\n };\n\n private readonly _onQuantityChange = (newValue: number) => {\n this.setState({\n quantity: newValue,\n totalPrice: newValue * this.props.product.Price\n });\n };\n\n private readonly _updateDimensionValue = (\n productDimensionFull: ProductDimensionFull,\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 // Rehydrate the selected variants price, available dimensions & sizes\n private readonly _onDimensionChanged = async (selection: IDropdownOnSelection): Promise => {\n const { product, dimensions, context } = this.props;\n const {\n actionContext,\n request: {\n apiSettings: { channelId }\n }\n } = context;\n\n // Remaining error notifications for missing dimensions\n const remainingDimensionsErrors = this.state.errors?.dimension?.filter(id => id !== selection.dropdownId.toString());\n\n this.setState({\n isBusy: false,\n showAddConfirmation: false,\n buttonDisabled: true,\n errors: { add: undefined, dimension: remainingDimensionsErrors }\n });\n\n // Update currently selected dimensions\n this.selectedDimensions[selection.dropdownId] = +selection.selectId;\n\n const mappedDimensions = dimensions\n ?.map(dimension => {\n return {\n DimensionTypeValue: dimension.DimensionTypeValue,\n DimensionValue:\n this._updateDimensionValue(dimension, this.selectedDimensions[dimension.DimensionTypeValue]) ||\n dimension.DimensionValue,\n ExtensionProperties: dimension.ExtensionProperties\n };\n })\n .filter(dimension => {\n return dimension && dimension.DimensionValue;\n });\n\n const variantProduct = await getSelectedVariant(\n new SelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId,\n mappedDimensions,\n undefined,\n this.props.context.request\n ),\n actionContext\n );\n\n if (!variantProduct) {\n this.props.context.telemetry.error(\n `Error retrieving variant product for product ${product.MasterProductId ? product.MasterProductId : product.RecordId}`\n );\n return;\n }\n\n const dimensionInput = new GetDimensionsForSelectedVariantInput(\n variantProduct.RecordId,\n channelId,\n mappedDimensions,\n this.props.context.request\n );\n const variantDimensions = await getDimensionsForSelectedVariant(dimensionInput, actionContext);\n\n if (!variantDimensions) {\n this.props.context.telemetry.error('Error retrieving dimensions for reconfigured product variant');\n this.setState({\n buttonDisabled: false\n });\n return;\n }\n\n const availabilityInput = new ProductAvailabilitiesForSelectedVariantInput(\n product.MasterProductId ? product.MasterProductId : product.RecordId,\n channelId\n );\n\n // @TODO sync UX quantity w/ actual availability\n const newAvailableQuantity = await getProductAvailabilitiesForSelectedVariant(availabilityInput, actionContext);\n const priceInput = new PriceForSelectedVariantInput(product.RecordId, channelId);\n const productPrice = await getPriceForSelectedVariant(priceInput, actionContext);\n\n if (!productPrice) {\n this.props.context.telemetry.error('Error retrieving price for reconfigured product variant');\n this.setState({\n buttonDisabled: false\n });\n return;\n }\n\n this.setState({\n buttonDisabled: false,\n productAvailableQuantity: (newAvailableQuantity && newAvailableQuantity[0]) || undefined,\n unitPrice: +(productPrice.BasePrice || product.Price),\n dimensions: variantDimensions.sort((a, b) => a.DimensionTypeValue - b.DimensionTypeValue),\n product: variantProduct\n });\n };\n\n private readonly _getDropdownName = (dimensionType: number, resources: IAddLineToTemplateResources): string => {\n switch (dimensionType) {\n case 1: // Color\n return resources.productDimensionTypeColor;\n case 2: // Configuration\n return resources.productDimensionTypeConfiguration;\n case 3: // Size\n return resources.productDimensionTypeSize;\n case 4: // Style\n return resources.productDimensionTypeStyle;\n default:\n return '';\n }\n };\n\n private _formatPrice(price: number): string {\n const {\n context: {\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n }\n } = this.props;\n\n return formatCurrency(price.toFixed(2), currencyCode);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProductDimensionFull } from '@msdyn365-commerce/commerce-entities';\nimport { IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { IAddLineToTemplateProps } from '.';\n\nexport interface IProductListProps extends IAddLineToTemplateProps {\n products: ProductSearchResult[];\n imageSettings: IImageSettings;\n searchForm: React.ReactNode;\n clickHandler(product: ProductSearchResult): Promise;\n highlightSearchTerm(name: string): React.ReactNode;\n renderResultCountText(): string;\n}\n\nexport const ProductList = (props: IProductListProps) => {\n const {\n products,\n context: {\n actionContext: {\n requestContext: { apiSettings }\n },\n request: { gridSettings },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n clickHandler,\n highlightSearchTerm,\n renderResultCountText,\n resources: { selectProductButtonText },\n imageSettings\n } = props;\n\n return (\n <>\n

    \n {renderResultCountText()}\n

    \n {props.searchForm}\n
    \n {products.map((product: ProductSearchResult, index: number) => {\n const { Price, ItemId, Name, PrimaryImageUrl } = product;\n const price = formatCurrency(Price.toFixed(2), currencyCode);\n const primaryImageSource = generateImageUrl(PrimaryImageUrl ?? '', apiSettings) ?? '';\n const fallBackImg = getFallbackImageUrl(ItemId, apiSettings, props.context.request.app?.config?.OmniChannelMedia) ?? '';\n\n return (\n
    \n
    \n \n
    \n
    {ItemId}
    \n {highlightSearchTerm(Name ?? '')}\n
    \n
    \n
    \n {price}\n \n
    \n
    \n );\n })}\n
    \n \n );\n};\n\ninterface IProductSelectButton {\n product: ProductSearchResult;\n buttonText: string;\n clickHandler(product: ProductSearchResult): Promise;\n}\n\nconst ProductSelectButton = (props: IProductSelectButton) => {\n const [isBusy, setBusy] = useState(false);\n const { product, buttonText, clickHandler } = props;\n const getClickHandler = React.useCallback(async () => {\n setBusy(!isBusy);\n await clickHandler(product);\n setBusy(!isBusy);\n }, [clickHandler, isBusy, product]);\n\n return (\n \n {buttonText}\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, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateLineViewModel } from '../order-template';\nimport { IOrderTemplateData } from '../order-template.data';\nimport { IOrderTemplateProps } from '../order-template.props.autogenerated';\nimport { AddLineToTemplate } from '.';\n\ninterface IOrderTemplateBulkActionsProps extends IOrderTemplateProps {\n orderTemplateId: string;\n selectedLines: IOrderTemplateLineViewModel[];\n isMinifiedView: boolean;\n isMultipleCatalogFeatureEnabledInHq: boolean;\n telemetryContent?: ITelemetryContent;\n onAddSelectionToBag(): void;\n onRemoveSelection(): void;\n}\n\ninterface IOrderTemplateBulkActionsState {\n isAddDisabled: boolean;\n isRemoveDisabled: boolean;\n}\n\n/**\n * Bulk Order Template line actions.\n */\nexport class OrderTemplateBulkActions extends React.PureComponent {\n public state: IOrderTemplateBulkActionsState = {\n isAddDisabled: true,\n isRemoveDisabled: true\n };\n\n public static getDerivedStateFromProps(\n props: IOrderTemplateBulkActionsProps,\n state: IOrderTemplateBulkActionsState\n ): IOrderTemplateBulkActionsState {\n const selectedLines = props.selectedLines.length;\n let nextState = { ...state };\n nextState = {\n isAddDisabled: selectedLines === 0,\n isRemoveDisabled: selectedLines === 0\n };\n return nextState;\n }\n\n public render(): JSX.Element {\n const {\n addLineModalLinkText,\n searchButtonAriaLabel,\n searchInputAriaLabel,\n searchModalPlaceholderText,\n selectCatalogTitleText,\n selectProductButtonText,\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n backButtonText,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n notFoundSearchErrorNotice,\n notFoundSearchErrorRedediation,\n searchErrorMessage,\n productDimensionTypeColor,\n productDimensionTypeConfiguration,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n addSelectedToBagButtonText,\n removeSelectedToBagButtonText,\n searchResultsCountVerbage,\n searchResultsCountSubject,\n addToTemplateConfirmation,\n totalPriceLabel,\n progressNotificationText,\n addToTemplateDuplicateError,\n addToTemplateGenericError,\n dimensionMissingError\n } = this.props.resources;\n\n const addLineProps = {\n context: this.props.context,\n telemetryContent: this.props.telemetryContent,\n resources: {\n addLineModalLinkText,\n searchButtonAriaLabel,\n searchInputAriaLabel,\n searchModalPlaceholderText,\n selectCatalogTitleText,\n selectProductButtonText,\n addItemToTemplateText,\n addLineProductUnitPricePrefix,\n backButtonText,\n decrementButtonAriaLabel,\n incrementButtonAriaLabel,\n quantitySelectLabel,\n addLineProductUnitOfMeasurePrefix,\n notFoundSearchErrorNotice,\n notFoundSearchErrorRedediation,\n searchErrorMessage,\n productDimensionTypeColor,\n productDimensionTypeConfiguration,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n searchResultsCountVerbage,\n searchResultsCountSubject,\n addToTemplateConfirmation,\n totalPriceLabel,\n progressNotificationText,\n addToTemplateDuplicateError,\n addToTemplateGenericError,\n dimensionMissingError\n },\n imageSettings: this.props.config.imageSettings,\n orderTemplateId: this.props.orderTemplateId,\n isMultipleCatalogFeatureEnabledInHq: this.props.isMultipleCatalogFeatureEnabledInHq,\n catalogs: this.props.data.catalogs?.result\n };\n\n return (\n <>\n \n \n \n {!this.props.isMinifiedView && addSelectedToBagButtonText}\n \n \n \n {!this.props.isMinifiedView && removeSelectedToBagButtonText}\n \n \n );\n }\n\n private readonly addHandler = (event: React.MouseEvent) => {\n this.setState({\n isAddDisabled: true\n });\n\n this.props.onAddSelectionToBag();\n\n this.setState({\n isAddDisabled: false\n });\n };\n\n private readonly removeHandler = (event: React.MouseEvent) => {\n this.setState({\n isRemoveDisabled: true\n });\n\n this.props.onRemoveSelection();\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 AddOrderTemplateToCartComponent,\n ILinesAddedToCartDialogResources,\n IOrderTemplateNameDialogResources,\n RenameOrderTemplateComponent,\n OrderTemplateNameDialog\n} from '@msdyn365-commerce/components';\nimport { IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductList } from '@msdyn365-commerce/retail-proxy';\nimport { OrderTemplate, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent, Popover } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { useState } from 'react';\n\nexport interface IOrderTemplateActionsData {\n orderTemplate: OrderTemplate;\n}\n\nexport interface IOrderTemplateActionsProps extends IComponentProps {\n context: ICoreContext;\n telemetryContent?: ITelemetryContent;\n handlers: {\n onRemoveTemplate(orderTemplateId: string): void;\n onRenameTemplate(orderTemplate: ProductList): Promise;\n };\n renameOrderTemplateDialogStrings: IOrderTemplateNameDialogResources;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n resources: {\n addTemplateToBagButtonText: string;\n renameTemplateButtonText: string;\n deleteTemplateButtonText: string;\n closeWindowButtonText: string;\n addToCartFailureMessage: string;\n addToCartSuccessMessage: string;\n addToCartProcessMessage: string;\n orderTemplateErrorMessage: string;\n linesAddedToCartDialogResources: ILinesAddedToCartDialogResources;\n };\n}\n\nexport interface IOrderTemplateActionsViewProps {\n addTemplateToBag: React.ReactNode;\n renameTemplate?: React.ReactNode;\n removeTemplate?: React.ReactNode;\n isMultipleCatalogsFeatureEnabled?: boolean;\n actionsSplitButton?: React.ReactNode;\n}\n\n/**\n * Remove Order Action.\n * @param props -Order template action props.\n * @returns Remove order template.\n */\nconst removeOrderActionHandler = (props: IOrderTemplateActionsProps) => () => {\n _removeOrderTemplate(props);\n};\n\nexport const OrderTemplateActionsView = (props: IOrderTemplateActionsProps): IOrderTemplateActionsViewProps => {\n const { resources, isMultipleCatalogFeatureEnabledInHq } = props;\n const { deleteTemplateButtonText } = resources;\n\n return {\n addTemplateToBag: _getOrderTemplateAddToCartDialog(props),\n renameTemplate: !isMultipleCatalogFeatureEnabledInHq && _getOrderTemplateRenameControl(props),\n removeTemplate: !isMultipleCatalogFeatureEnabledInHq && (\n \n ),\n actionsSplitButton: isMultipleCatalogFeatureEnabledInHq && \n };\n};\n\nconst _removeOrderTemplate = (props: IOrderTemplateActionsProps): void => {\n const {\n data: { orderTemplate },\n handlers\n } = props;\n const { onRemoveTemplate } = handlers;\n\n if (onRemoveTemplate) {\n onRemoveTemplate(orderTemplate.productList.Id);\n }\n};\n\nconst _getOrderTemplateAddToCartDialog = (props: IOrderTemplateActionsProps): React.ReactNode => {\n const {\n data: { orderTemplate },\n typeName,\n id,\n context,\n telemetryContent,\n resources,\n isMultipleCatalogFeatureEnabledInHq\n } = props;\n const {\n addTemplateToBagButtonText,\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources\n } = resources;\n\n const dialogStrings = {\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources\n };\n\n return (\n \n );\n};\n\nconst _getOrderTemplateRenameControl = (props: IOrderTemplateActionsProps): React.ReactNode => {\n const { renameOrderTemplateDialogStrings, resources, context, handlers } = props;\n return (\n \n );\n};\n\nlet buttonEventReference: HTMLButtonElement | undefined;\nexport const ActionsSplitButton: React.FC = (props: IOrderTemplateActionsProps) => {\n const [isStatementRequestAdminDropdownOpen, setIsStatementRequestAdminDropdownOpen] = useState(false);\n const [renameOrderTemplateDialogOpen, setOrderTemplateNameDialogOpen] = React.useState(false);\n\n const onOrderTemplateNameCancel = () => {\n context.telemetry.debug('Rename of template was canceled.');\n buttonEventReference?.focus();\n };\n\n const onRenameButtonClick = (event: React.MouseEvent) => {\n buttonEventReference = event.target as HTMLButtonElement;\n setOrderTemplateNameDialogOpen(true);\n event.preventDefault();\n };\n const onToggleDropdown1 = () => {\n setIsStatementRequestAdminDropdownOpen(!isStatementRequestAdminDropdownOpen);\n };\n const {\n data: { orderTemplate },\n resources,\n renameOrderTemplateDialogStrings,\n context\n } = props;\n\n const className = 'ms-order-template-action-bar';\n\n const popoverReference = React.createRef();\n const renderModalPopup = (\n \n );\n const requestStatementDropdownString = `request-statement-dropdown-id-${Random.Guid.generateGuid()}`;\n\n return (\n
    \n {renderModalPopup}\n \n {'Options'}\n \n \n \n\n \n {'Delete'}\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 { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, IImageSettings, Image, ITelemetry } from '@msdyn365-commerce/core';\nimport { ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ProductPrice, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions, getFallbackImageUrl, validateCatalogId } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { IOrderTemplateLineViewModel } from '../order-template';\nimport OrderTemplateQuantity from './common/order-template-quantity';\n\nexport interface IOrderTemplateLineProps extends ProductListLine {\n orderTemplateLine: IOrderTemplateLineViewModel;\n productListLine: ProductListLine;\n price?: ProductPrice;\n context: ICoreContext;\n productUrl: string;\n imageSettings?: IImageSettings;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n quantity: number;\n isQuantityDisabledForUpdate?: boolean;\n handlers: {\n onAddToBag(product: SimpleProduct, quantity: number, itemKey: string, catalogId?: number | undefined): void;\n onRemoveItem(line: IOrderTemplateLineViewModel): void;\n onChangeQuantity(orderTemplateLineId: string, quantity: number, props?: IOrderTemplateLineProps): void;\n onSelect(line: IOrderTemplateLineViewModel, isChecked: boolean): void;\n };\n resources: {\n selectOneRowText?: string;\n moreButtonText?: string;\n viewProductDetailsText?: string;\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n originalPriceText: string;\n currentPriceText: string;\n freePriceText: string;\n inputQuantityAriaLabel: string;\n removeFromOrderTemplateLinesText: string;\n addToBagButtonText: string;\n deleteButtonText: string;\n incrementButtonAriaLabel?: string;\n decrementButtonAriaLabel?: string;\n editOrderTemplateLineQuantityError?: string;\n unavailableProductErrorMessage?: string;\n outOfStockProductErrorMessage?: string;\n };\n index: number;\n isMobile: boolean;\n productQuantityView?: React.ReactNode;\n addToBagButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n toggleDetailsDisplayed(props: IOrderTemplateLineProps): void;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n catalogs?: ProductCatalog[];\n error?: string;\n shouldDisable?: boolean;\n}\n\nexport interface IOrderTemplateLineViewProps {\n key?: string;\n productImage: React.ReactNode;\n productPrice?: React.ReactNode;\n addToBagButton?: React.ReactNode;\n removeButton?: React.ReactNode;\n productName?: string;\n productNumber?: React.ReactNode;\n productInfo?: React.ReactNode;\n productLabel?: React.ReactNode;\n productUnitOfMeasure?: React.ReactNode;\n productQuantity?: number;\n productQuantityView?: React.ReactNode;\n productListId?: string;\n selectLine?: React.ReactNode;\n popUp?: JSX.Element;\n extraActionsPopup?: JSX.Element | null | undefined;\n isMobile?: boolean;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n productLineCatalog?: React.ReactNode;\n disabled?: boolean;\n}\n\ninterface IEventHandlerFactory {\n getAddToBag(): (event: React.MouseEvent) => void;\n getRemoveItem(): (event: React.MouseEvent) => void;\n}\n\nconst OrderTemplateLineActions = (props: IOrderTemplateLineProps): IEventHandlerFactory => {\n const { orderTemplateLine, productListLine, quantity, handlers } = props;\n const { LineId, CatalogId } = productListLine;\n const { onAddToBag, onRemoveItem } = handlers;\n\n return {\n getAddToBag: () => (event: React.MouseEvent) => {\n LineId &&\n orderTemplateLine.fullProduct &&\n onAddToBag(orderTemplateLine.fullProduct.ProductDetails, quantity, LineId, CatalogId);\n },\n getRemoveItem: () => (event: React.MouseEvent) => LineId && onRemoveItem(props.orderTemplateLine)\n };\n};\n\ninterface IPopupProps extends IOrderTemplateLineProps {\n addButtonClassName: string;\n removeButtonClassName: string;\n}\n\nconst PopUp = (props: IPopupProps): JSX.Element | null => {\n const { addToBagButtonText, removeFromOrderTemplateLinesText, moreButtonText, viewProductDetailsText } = props.resources;\n const [showMobile, setShowMobile] = useState(false);\n const componentClassName = 'ms-table';\n\n const getViewHandler = () => (event: React.MouseEvent) => {\n props.toggleDetailsDisplayed(props);\n };\n\n const toggle = React.useCallback(() => {\n setShowMobile(!showMobile);\n }, [showMobile]);\n\n return (\n
    \n \n {showMobile && (\n
    \n \n View\n \n {getActionButton(\n props.isMobile,\n props.removeButtonClassName,\n removeFromOrderTemplateLinesText,\n OrderTemplateLineActions(props).getRemoveItem()\n )}\n {getActionButton(\n props.isMobile,\n props.addButtonClassName,\n addToBagButtonText,\n OrderTemplateLineActions(props).getAddToBag()\n )}\n
    \n )}\n
    \n );\n};\n\nconst getActionButton = (\n isMobile: boolean,\n className: string,\n buttonText: string,\n clickHandler: (event: React.MouseEvent) => void\n): React.ReactNode => (\n \n);\n\nconst getDesktopActionButton = (\n className: string,\n buttonText: string,\n clickHandler: (event: React.MouseEvent) => void\n): React.ReactNode => (\n \n);\n/**\n * On Select line function.\n * @param orderTemplateLine -Order template line.\n * @param input -Order template line props.\n * @returns Set on select order template.\n */\nconst onSelectLineHandler = (orderTemplateLine: IOrderTemplateLineViewModel, input: IOrderTemplateLineProps) => (\n event: React.ChangeEvent\n) => {\n orderTemplateLine.isChecked = !orderTemplateLine.isChecked;\n\n input.handlers.onSelect(orderTemplateLine, event.target.checked);\n};\n\nexport const OrderTemplateLineView = (input: IOrderTemplateLineProps): IOrderTemplateLineViewProps | null => {\n const {\n orderTemplateLine,\n productListLine,\n price,\n context,\n imageSettings,\n quantity,\n resources,\n isMobile,\n isMultipleCatalogFeatureEnabledInHq\n } = input;\n const product = orderTemplateLine.fullProduct;\n const { LineId, UnitOfMeasure } = productListLine;\n const { removeFromOrderTemplateLinesText, addToBagButtonText, selectOneRowText } = resources;\n if (!product) {\n return null;\n }\n\n const { ItemId, PrimaryImageUrl } = product.ProductDetails;\n const fallbackImage = getFallbackImageUrl(\n ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const addButtonClassName = input.isMobile ? 'ms-table__row-links-add' : 'ms-order-template-table-line__product-add-button';\n const removeButtonClassName = input.isMobile ? 'ms-table__row-links-delete' : 'ms-order-template-table-line__product-remove-button';\n\n return {\n isMobile,\n isMultipleCatalogFeatureEnabledInHq: isMultipleCatalogFeatureEnabledInHq,\n selectLine: (\n \n ),\n key: LineId!,\n productLineCatalog: isMultipleCatalogFeatureEnabledInHq && renderProductCatalog(input),\n productImage: _renderProductImage(\n 'ms-order-template-table-line__product-image',\n context,\n product.ProductDetails.Name!,\n PrimaryImageUrl,\n fallbackImage,\n imageSettings\n ),\n productInfo: renderProductInfo(input),\n productPrice: price && _renderPrice(input),\n productNumber: product && (\n <>\n
    {ItemId}
    \n {input.error !== 'NONE' ? (\n
    {_renderProductError(input)}
    \n ) : (\n undefined\n )}\n \n ),\n productUnitOfMeasure: price ? (\n
    {UnitOfMeasure || price.UnitOfMeasure}
    \n ) : (\n undefined\n ),\n productListId: LineId!,\n removeButton:\n !isMultipleCatalogFeatureEnabledInHq &&\n getActionButton(\n input.isMobile,\n removeButtonClassName,\n removeFromOrderTemplateLinesText,\n OrderTemplateLineActions(input).getRemoveItem()\n ),\n productQuantityView:
    {_generateQuantity(input, LineId!)}
    ,\n productQuantity: quantity,\n addToBagButton:\n !isMultipleCatalogFeatureEnabledInHq &&\n getActionButton(input.isMobile, addButtonClassName, addToBagButtonText, OrderTemplateLineActions(input).getAddToBag()),\n extraActionsPopup:\n !isMobile && isMultipleCatalogFeatureEnabledInHq ? (\n \n ) : (\n undefined\n ),\n popUp: ,\n disabled: input.shouldDisable\n };\n};\n\nconst ExtraActionsPopup = (props: IPopupProps): JSX.Element | null => {\n const [showActions, setShowActions] = useState(false);\n const toggle = React.useCallback(() => {\n setShowActions(!showActions);\n }, [showActions]);\n\n const className = 'ms-order-template-table-line__extra-actions-cell';\n const actionsContainerClassName = `${className}__actions-container`;\n return (\n
    \n
    \n );\n};\n\nexport const OrderTemplateMobileLineView = (input: IOrderTemplateLineProps): IOrderTemplateLineViewProps | undefined => {\n const { orderTemplateLine, productListLine, price, context, imageSettings, isMultipleCatalogFeatureEnabledInHq } = input;\n const product = orderTemplateLine.fullProduct;\n const { LineId, UnitOfMeasure } = productListLine;\n if (!product) {\n return;\n }\n const { ItemId, PrimaryImageUrl } = product.ProductDetails;\n const fallbackImage = getFallbackImageUrl(\n ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n\n return {\n productLineCatalog: isMultipleCatalogFeatureEnabledInHq && renderProductCatalog(input),\n productImage: _renderProductImage(\n 'thumbnail',\n context,\n product.ProductDetails.Name!,\n PrimaryImageUrl,\n fallbackImage,\n imageSettings\n ),\n productInfo: renderProductInfo(input),\n productPrice: price && _renderPrice(input),\n productNumber: ItemId,\n productUnitOfMeasure: UnitOfMeasure || price?.UnitOfMeasure,\n productQuantityView: _generateQuantity(input, LineId!)\n };\n};\n\nexport interface IOrderTemplateProductQuantityViewProps {\n ContainerProps: INodeProps;\n input: React.ReactNode;\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: (orderTemplateLineId: string, quantity: number, props?: IOrderTemplateLineProps | undefined) => void,\n itemKey: string,\n props: IOrderTemplateLineProps\n) => (newValue: number) => {\n if (onChangeQuantity) {\n onChangeQuantity(itemKey, newValue, props);\n }\n};\n\nconst _generateQuantity = (props: IOrderTemplateLineProps, itemKey: string): React.ReactNode => {\n const { handlers, resources, quantity } = props;\n const { onChangeQuantity } = handlers;\n return (\n \n );\n};\n\nexport const _renderProductImage = (\n className: string,\n context: ICoreContext,\n heading: string,\n image?: string,\n fallbackImage?: string,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n lg: { q: 'w=64&h=64&m=6', w: 0, h: 0 },\n xl: { q: 'w=64&h=64&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n};\n\nexport const renderProductCatalog = (props: IOrderTemplateLineProps) => {\n const catalogId = props.productListLine.CatalogId;\n validateCatalogId(catalogId);\n\n if (!props.context.request.user.isB2b || !catalogId || !ArrayExtensions.hasElements(props.catalogs)) {\n return null;\n }\n\n const catalog = props.catalogs.find(item => item.RecordId === catalogId);\n\n if (!catalog || !catalog.Name) {\n return null;\n }\n\n return
    {catalog.Name}
    ;\n};\n\nconst _renderPrice = (props: IOrderTemplateLineProps): JSX.Element | null => {\n const { price, context, moduleId, moduleTypeName, resources } = props;\n\n if (price) {\n return (\n \n );\n }\n return null;\n};\n\nconst _renderProductDimensions = (props: IOrderTemplateLineProps): (string | undefined)[] => {\n const { orderTemplateLine } = props;\n\n if (!orderTemplateLine.fullProduct || !orderTemplateLine.fullProduct.ProductDetails.Dimensions) {\n return [];\n }\n\n return orderTemplateLine.fullProduct.ProductDetails.Dimensions.map(dimension => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n\n return dimension.DimensionValue.Value;\n });\n};\n\nconst _renderProductError = (props: IOrderTemplateLineProps) => {\n const { error, resources } = props;\n\n if (!error) {\n return '';\n }\n\n const errorMessages = {\n OOS: resources.outOfStockProductErrorMessage,\n UNASSORTED: resources.unavailableProductErrorMessage,\n NONE: ''\n };\n\n return errorMessages[error];\n};\n\nexport const renderProductInfo = (props: IOrderTemplateLineProps): React.ReactNode | undefined => {\n const { orderTemplateLine, productUrl } = props;\n const name = orderTemplateLine.fullProduct?.ProductDetails.Name;\n\n const dimensions = _renderProductDimensions(props);\n if (!orderTemplateLine.fullProduct) {\n return [];\n }\n\n const productName = productUrl ? (\n \n {name}\n \n ) : (\n
    {name}
    \n );\n\n const dimensionsLine: string = dimensions.join(', ');\n\n return (\n
    \n
    {productName}
    \n
    {dimensionsLine}
    \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 classnames from 'classnames';\nimport * as React from 'react';\n\nimport { orderTemplateLinesStatus } from '../order-template';\n\nexport interface IOrderTemplateLinesStatusMessageProps {\n className?: string;\n errorType: orderTemplateLinesStatus;\n text?: string;\n}\n\nexport const OrderTemplateLinesStatusMessage: React.FC = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return

    {text}

    ;\n case 'FAILED':\n return

    {text}

    ;\n case 'LOADING':\n default:\n return

    {text}

    ;\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\nimport { IOrderTemplateLineViewModel } from '../order-template';\n\nexport interface IOrderTemplateTableHeadingProps {\n selectAllRowsText?: string;\n productNumber: string;\n productName: string;\n productUnitPrice: string;\n productUOM: string;\n productQuantity: string;\n productActions: string;\n lines: IOrderTemplateLineViewModel[];\n isMobile: boolean;\n clickHandler(isChecked: boolean): void;\n productImage?: string;\n isMultipleCatalogFeatureEnabledInHq?: boolean;\n productLineCatalogName?: string;\n}\n\n/**\n * Order Template's table state.\n */\nexport interface IOrderTemplateTableHeadingState {\n isChecked: boolean;\n}\n\nexport interface IOrderTemplateTableShortHeading {\n productNumber: string;\n productActions: string;\n}\n\n/**\n * Order Template's table heading.\n */\nexport class OrderTemplateTableHeading extends React.PureComponent {\n public state: IOrderTemplateTableHeadingState = {\n isChecked: false\n };\n\n private readonly componentClassName: string = 'ms-table';\n\n public static getDerivedStateFromProps(\n props: IOrderTemplateTableHeadingProps,\n state: IOrderTemplateTableHeadingState\n ): IOrderTemplateTableHeadingState {\n const checkedLines = props.lines.filter(line => !line.isChecked).length;\n let nextState = { ...state };\n nextState = { isChecked: checkedLines === 0 };\n return nextState;\n }\n\n public getOnChange = () => (event: React.ChangeEvent) => {\n this.setState(\n {\n isChecked: this.state.isChecked\n },\n () => {\n this.props.clickHandler(!this.state.isChecked);\n }\n );\n };\n\n public render(): JSX.Element {\n return (\n \n \n \n \n \n {!this.props.isMobile && this.props.isMultipleCatalogFeatureEnabledInHq ? (\n {this.props.productLineCatalogName}\n ) : null}\n {!this.props.isMobile ? {this.props.productImage} : null}\n {this.props.productNumber}\n {!this.props.isMobile ? {this.props.productName} : null}\n {!this.props.isMobile ? {this.props.productUnitPrice} : null}\n {!this.props.isMobile ? {this.props.productUOM} : null}\n {!this.props.isMobile ? {this.props.productQuantity} : null}\n {!this.props.isMobile ? {this.props.productActions} : }\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 IItemAddedToCartDialogData,\n IItemAddedToCartDialogResources,\n ILinesAddedToCartDialogResources,\n IOrderTemplateNameDialogResources,\n ItemAddedToCartDialog\n} from '@msdyn365-commerce/components';\nimport MsDyn365, { AsyncResult, getCatalogId, getUrlSync, ICoreContext, IRequestContext } from '@msdyn365-commerce/core';\nimport { ICartActionResult } from '@msdyn365-commerce/global-state';\nimport { ProductList, ProductListLine } from '@msdyn365-commerce/retail-proxy';\nimport {\n deleteAsync,\n removeProductListLinesAsync,\n updateProductListLinesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductListsDataActions.g';\nimport { FeatureState, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n ArrayExtensions,\n createGetFeatureStateInput,\n getFeatureState,\n getPriceForSelectedVariant,\n getProductUrlSync,\n ObjectExtensions,\n OrderTemplate,\n OrderTemplateLine,\n PriceForSelectedVariantInput,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n getTelemetryObject,\n Heading,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n UncontrolledPagination\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport debounce from 'lodash/debounce';\nimport { action, computed, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n IOrderTemplateActionsProps,\n IOrderTemplateActionsViewProps,\n IOrderTemplateLineProps,\n IOrderTemplateLineViewProps,\n IOrderTemplateTableHeadingProps,\n OrderTemplateActionsView,\n OrderTemplateLinesStatusMessage,\n OrderTemplateLineView,\n OrderTemplateMobileLineView,\n OrderTemplateTableHeading\n} from '../..';\nimport { ActiveOrderTemplateLinesInput } from './actions/get-order-template';\nimport { OrderTemplateBulkActions } from './components/bulk-actions';\nimport { IOrderTemplateData } from './order-template.data';\nimport { IOrderTemplateProps, IOrderTemplateResources } from './order-template.props.autogenerated';\nimport Spinner from './components/add-line/spinner';\n\nexport interface IOrderTemplateLineActionMessageState {\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n isItemAddedToOrderTemplateOpen: boolean;\n isConfirmAddSelectionToBagModalOpen: boolean;\n itemAddedToCartDialogData?: IItemAddedToCartDialogData;\n productSelection: IOrderTemplateLineViewModel[];\n isDetailsDisplayed: boolean;\n detailedProductView?: IOrderTemplateLineViewProps;\n isQuantityDisabledForUpdate?: boolean;\n}\n\nexport type orderTemplateLinesStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface IOrderTemplateViewProps extends IOrderTemplateProps {\n OrderTemplateLines: IModuleProps;\n callbacks?: IOrderTemplateLinesCallbacks;\n status?: orderTemplateLinesStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n OrderTemplateActions?: INodeProps;\n ProductsTable?: INodeProps;\n ProductsTableRow?: INodeProps;\n ProductsTableHeading?: React.ReactNode;\n ProductDetails?: INodeProps;\n orderLines?: IOrderTemplateLineViewProps[];\n productListLines?: ProductListLine[];\n productsStatusMessage?: React.ReactNode;\n orderActions?: IOrderTemplateActionsViewProps | null;\n resources: IOrderTemplateResources;\n pagination?: React.ReactNode;\n itemAddedToCartDialog?: React.ReactNode;\n bulkOrderLineActions?: React.ReactNode;\n isDetailsDisplayed?: boolean;\n detailedProduct?: IOrderTemplateLineProps;\n detailedProductView?: IOrderTemplateLineViewProps;\n productQuantityView?: React.ReactNode;\n addButton?: React.ReactNode;\n isMobile?: boolean;\n toggleDetailsDisplayed?(props: IOrderTemplateLineProps | undefined): void;\n}\n\nexport interface IOrderTemplateLinesCallbacks {\n updateQuantity(itemKey: string, quantity: number): void;\n}\n\nexport interface IOrderTemplateLineViewModel extends OrderTemplateLine {\n isChecked: boolean;\n productQuantityView: React.ReactNode;\n}\n\n/**\n *\n * OrderTemplateLines component.\n * @extends {React.PureComponent, IOrderTemplateLineActionMessageState>}\n */\n@observer\nclass OrderTemplateLines extends React.Component, IOrderTemplateLineActionMessageState> {\n private readonly className: string;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable\n private _viewport: GridSize;\n\n @computed get isMobile(): boolean {\n return this._viewport === 'xs' || this._viewport === 'sm';\n }\n\n constructor(props: IOrderTemplateProps, state: IOrderTemplateLineActionMessageState) {\n super(props);\n this.className = 'ms-order-template';\n this._viewport =\n props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._updateViewport = this._updateViewport.bind(this);\n\n this.state = {\n itemKey: '',\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false,\n isItemAddedToOrderTemplateOpen: false,\n isConfirmAddSelectionToBagModalOpen: false,\n productSelection: [],\n isDetailsDisplayed: false,\n isQuantityDisabledForUpdate: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this._updateViewport();\n\n if (MsDyn365.isBrowser && !this.props.context.request.user.isAuthenticated && !this.props.context.request.params.isEditor) {\n window.location.assign(this.props.context.request.user.signInUrl || '/');\n }\n }\n\n @action\n public async componentDidMount(): Promise {\n this.setState({});\n const orderTemplate = await this.props.data.orderTemplate;\n this.props.config.heading!.text = orderTemplate?.productList.Name || '';\n this.setState({\n productSelection: orderTemplate?.orderTemplateLines as IOrderTemplateLineViewModel[]\n });\n\n if (MsDyn365.isBrowser) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public shouldComponentUpdate(\n nextProps: IOrderTemplateProps,\n nextState: IOrderTemplateLineActionMessageState\n ): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { heading, className } = this.props.config;\n const { emptyOrderTemplateLinesText, errorGettingOrderTemplateLines } = this.props.resources;\n const { orderTemplate, cart } = this.props.data;\n\n if (cart.status === 'LOADING' || ObjectExtensions.isNullOrUndefined(orderTemplate) || orderTemplate.status === 'LOADING') {\n const errorProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(this.className, className)\n },\n status: 'LOADING',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources\n };\n return this.props.renderView(errorProps);\n }\n\n if (cart.status === 'FAILED' || orderTemplate.status === 'FAILED') {\n const errorProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'FAILED',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources\n };\n\n return this.props.renderView(errorProps);\n }\n\n const orderTemplateResult = orderTemplate && orderTemplate.result;\n const orderTemplateLines = orderTemplateResult && orderTemplateResult.orderTemplateLines;\n\n if (!orderTemplateResult || !orderTemplateLines || orderTemplateLines.length === 0) {\n if (orderTemplateResult && !this._isFirstPage() && MsDyn365.isBrowser) {\n window.location.href = this._getOrderTemplatePageUrl();\n return null;\n }\n\n const emptyViewProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'EMPTY',\n statusMessage: ,\n heading: heading && ,\n resources: this.props.resources,\n orderActions:\n orderTemplateResult &&\n this._renderOrderTemplateActions(orderTemplateResult, this._isChannelMultipleCatalogsFeatureEnabled()),\n bulkOrderLineActions: orderTemplateResult && this._getOrderTemplateLineActions(orderTemplateResult.productList.Id),\n OrderTemplateActions: {\n className: `${this.className}-action-bar`,\n tag: 'div'\n }\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IOrderTemplateViewProps = {\n ...(this.props as IOrderTemplateProps),\n OrderTemplateLines: {\n moduleProps: this.props,\n className: classnames(`${this.className}`, className)\n },\n status: 'SUCCESS',\n productsStatusMessage: this.state.isOpen && (\n
    \n \n {this.state.userMessage}\n \n
    \n ),\n heading: heading && ,\n OrderTemplateActions: {\n className: `${this.className}-action-bar`,\n tag: 'div'\n },\n ProductsTable: {\n className: `${this.className}__table`,\n tag: 'table',\n role: 'grid'\n },\n ProductsTableRow: {\n className: `${this.className}-table-line`,\n tag: 'tr'\n },\n ProductsTableHeading: this._renderProductListHeader(this.props.resources),\n ProductDetails: {\n className: `${this.className}-table-line__link`,\n tag: 'a'\n },\n orderLines: this._renderProductList(),\n callbacks: { updateQuantity: debounce(this._changeQuantity, 2000) },\n orderActions: this._renderOrderTemplateActions(orderTemplateResult, this._isChannelMultipleCatalogsFeatureEnabled()),\n pagination: this._renderPagination(),\n itemAddedToCartDialog: this._renderItemAddedToCartDialog(),\n bulkOrderLineActions: this._getOrderTemplateLineActions(orderTemplateResult.productList.Id),\n isDetailsDisplayed: this.state.isDetailsDisplayed,\n toggleDetailsDisplayed: this._toggleDetailsDisplayed,\n detailedProductView: this.state.detailedProductView,\n isMobile: this.isMobile\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public onSelect(line: IOrderTemplateLineViewModel, isChecked: boolean): void {\n line.isChecked = isChecked;\n\n const updated =\n this.state.productSelection.map(product => {\n if (product.fullProduct?.ProductDetails.ItemId === line.fullProduct?.ProductDetails.ItemId) {\n line.isChecked = isChecked;\n }\n return product;\n }) || [];\n\n this.setState({\n productSelection: updated\n });\n }\n\n public onSelectAll(isChecked: boolean): void {\n const updated =\n this.state.productSelection.map(line => {\n line.isChecked = isChecked;\n return line;\n }) || [];\n\n this.setState({\n productSelection: updated\n });\n }\n\n private _renderProductListHeader(resources: IOrderTemplateResources): React.ReactNode {\n const {\n productImage,\n productNumberText,\n productText,\n productUnitPriceText,\n productUOMText,\n productQuantityText,\n productActionsText,\n selectAllRowsText,\n productLineCatalogName\n } = resources;\n const headers: IOrderTemplateTableHeadingProps = {\n productImage: productImage,\n productNumber: productNumberText,\n productName: productText,\n productUnitPrice: productUnitPriceText,\n productUOM: productUOMText,\n productQuantity: productQuantityText,\n productActions: productActionsText,\n selectAllRowsText,\n lines: this.state.productSelection,\n isMobile: this.isMobile,\n clickHandler: (isChecked: boolean) => {\n this.onSelectAll(isChecked);\n },\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled(),\n productLineCatalogName: productLineCatalogName\n };\n\n return ;\n }\n\n private _getOrderTemplateLineActions(orderTemplateId: string): React.ReactNode {\n return (\n line.isChecked)}\n onAddSelectionToBag={this._onAddSelectionToBag}\n onRemoveSelection={this._onRemoveSelection}\n isMinifiedView={this.isMobile}\n isMultipleCatalogFeatureEnabledInHq={this._isChannelMultipleCatalogsFeatureEnabled()}\n telemetryContent={this.telemetryContent}\n />\n );\n }\n\n private _generateLinesAddedToCartDialogResources(): ILinesAddedToCartDialogResources {\n return {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n linesAddedToCartHeaderItemsOneText: this.props.resources.linesAddedToCartHeaderItemsOneText,\n linesAddedToCartHeaderLinesOneText: this.props.resources.linesAddedToCartHeaderLinesOneText,\n linesAddedToCartHeaderLinesFormatText: this.props.resources.linesAddedToCartHeaderLinesFormatText,\n linesAddedToCartHeaderMessageText: this.props.resources.linesAddedToCartHeaderMessageText\n };\n }\n\n private _generateItemAddedToCartDialogResources(): IItemAddedToCartDialogResources {\n return {\n viewCartButtonText: this.props.resources.viewCartButtonText,\n orderTemplateCloseButtonText: this.props.resources.orderTemplateCloseButtonText,\n itemAddedToCartHeaderItemOneText: this.props.resources.itemAddedToCartHeaderItemOneText,\n itemAddedToCartHeaderItemFormatText: this.props.resources.itemAddedToCartHeaderItemFormatText,\n itemAddedToCartHeaderMessageText: this.props.resources.itemAddedToCartHeaderMessageText,\n freePriceText: this.props.resources.freePriceText,\n originalPriceText: this.props.resources.originalPriceText,\n currentPriceText: this.props.resources.currentPriceText\n };\n }\n\n private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (this.props.data.featureState) {\n isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n return isMultipleCatalogFeatureEnabledInHq;\n };\n\n private readonly _onRemoveSelection = (): void => {\n const { context, resources } = this.props;\n const { telemetry } = context;\n const { removeSelectedFailureMessage, removeSelectedSuccessMessage } = resources;\n const lines = this.state.productSelection;\n const productListLines = lines && lines.length && lines.filter(line => line.isChecked).map(line => line.productListLine);\n\n if (productListLines && productListLines.length > 0) {\n const productListId = productListLines[0].ProductListId;\n\n const maxWaitTimeInMilliSeconds: number = 1000;\n removeProductListLinesAsync({ callerContext: context.actionContext }, productListId!, productListLines)\n .then(async () => {\n this.setState({\n userMessage: removeSelectedSuccessMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n // eslint-disable-next-line no-promise-executor-return -- fix\n await new Promise(resolve => setTimeout(resolve, maxWaitTimeInMilliSeconds));\n window.location.reload();\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable remove items from the order template lines');\n telemetry.error(error);\n this.setState({\n userMessage: removeSelectedFailureMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n });\n }\n };\n\n private readonly _getOrderTemplatePageUrl = (): string => {\n let url = getUrlSync('ordertemplate', this.props.context.actionContext) || '';\n url = url.includes('?') ? url.substr(0, url.indexOf('?')) : url;\n if (this.props.data.orderTemplate?.result?.productList.Id) {\n return `${url}?id=${this.props.data.orderTemplate.result.productList.Id}`;\n }\n return '';\n };\n\n private readonly _onAddSelectionToBag = async (): Promise => {\n const lines = this.state.productSelection;\n const selectedLines = lines.filter(line => line.isChecked);\n if (selectedLines.length > 0) {\n for (const productLine of selectedLines) {\n const itemKey = productLine.fullProduct?.ProductDetails.ItemId ?? '';\n const product = productLine.fullProduct?.ProductDetails ?? {\n RecordId: 0,\n ProductTypeValue: 0,\n BasePrice: 0,\n Price: 0,\n AdjustedPrice: 0\n };\n const quantity = productLine.productListLine.Quantity ?? 0;\n if (this._isChannelMultipleCatalogsFeatureEnabled()) {\n const catalogId = productLine.productListLine.CatalogId;\n await this._addItemToBag(product, quantity, itemKey, catalogId);\n } else {\n await this._addItemToBag(product, quantity, itemKey);\n }\n }\n }\n return Promise.resolve(void 0);\n };\n\n private _renderOrderTemplateActions(\n orderTemplate: OrderTemplate,\n isMultipleCatalogFeatureEnabledInHq: boolean\n ): IOrderTemplateActionsViewProps {\n const { id, typeName, context, resources } = this.props;\n const {\n addTemplateToBagButtonText,\n renameTemplateButtonText,\n deleteTemplateButtonText,\n closeWindowButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n orderTemplateErrorMessage\n } = resources;\n\n const orderTemplateActions: IOrderTemplateActionsProps = {\n data: { orderTemplate },\n id,\n typeName,\n context,\n telemetryContent: this.telemetryContent,\n handlers: {\n onRenameTemplate: this._renameTemplate,\n onRemoveTemplate: this._removeTemplate\n },\n isMultipleCatalogFeatureEnabledInHq,\n renameOrderTemplateDialogStrings: this._generateOrderTemplateNameDialogResources(resources),\n resources: {\n addTemplateToBagButtonText,\n renameTemplateButtonText,\n deleteTemplateButtonText,\n addToCartFailureMessage,\n addToCartSuccessMessage,\n addToCartProcessMessage,\n closeWindowButtonText,\n orderTemplateErrorMessage,\n linesAddedToCartDialogResources: this._generateLinesAddedToCartDialogResources()\n }\n };\n\n return OrderTemplateActionsView(orderTemplateActions);\n }\n\n private _generateOrderTemplateNameDialogResources(resources: IOrderTemplateResources): IOrderTemplateNameDialogResources {\n return {\n orderTemplateHeaderLabel: resources.renameOrderTemplateTitleText,\n orderTemplateTitleLabel: resources.orderTemplateTitle,\n orderTemplateNameAriaLabel: resources.orderTemplateTitle,\n orderTemplateDescription: '',\n defaultOrderTemplateName: resources.defaultOrderTemplateName,\n orderTemplateButtonLabel: resources.renameOrderTemplateButtonText,\n orderTemplateCancelButtonLabel: resources.cancelBtnLabel\n };\n }\n\n private readonly _getCurrentUrl = (reqContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n return new URL(reqContext.url.requestUrl.href);\n };\n\n /**\n * On close handler.\n */\n private readonly onCloseHandler = () => {\n this.setState({\n itemKey: this.state.itemKey,\n userMessage: this.state.userMessage,\n statusCssString: this.state.statusCssString,\n messageGlyph: this.state.messageGlyph,\n isOpen: this.state.isOpen,\n isItemAddedToOrderTemplateOpen: false\n });\n };\n\n private readonly _renderItemAddedToCartDialog = (): React.ReactNode | null => {\n if (!this.state.itemAddedToCartDialogData) {\n return null;\n }\n const isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState?.result?.find(feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature')\n ?.IsEnabled || false;\n\n return (\n \n );\n };\n\n private _isFirstPage(): boolean {\n return this._getCurrentPageNumber() === 0;\n }\n\n private _getCurrentPageNumber(): number {\n const itemsPerPage = this.props.config.itemsPerPage || 50;\n return (this.props.context.request.query && +this.props.context.request.query.skip / itemsPerPage) || 0;\n }\n\n private readonly _renderPagination = (): React.ReactNode | null => {\n const { config, context, data, resources } = this.props;\n const orderTemplate = data && data.orderTemplate && data.orderTemplate.result;\n if (!orderTemplate) {\n return null;\n }\n\n const fullUrl = this._getCurrentUrl(context.request);\n const itemsPerPage = config.itemsPerPage || 50;\n const currentPageNumber = this._getCurrentPageNumber();\n const skipCount = currentPageNumber * itemsPerPage;\n const totalItems = orderTemplate && orderTemplate.totalLines;\n const previousText = resources.flipperPrevious;\n const nextText = resources.flipperNext;\n\n if (totalItems <= itemsPerPage) {\n return null;\n }\n\n return (\n \n );\n };\n\n private _renderProductList(): IOrderTemplateLineViewProps[] {\n const {\n selectOneRowText,\n moreButtonText,\n viewProductDetailsText,\n priceFree,\n originalPriceText,\n currentPriceText,\n addOrderTemplateItemToBagButtonText,\n removeItemFromOrderTemplateButtonText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n inputQuantityAriaLabel,\n deleteButtonText,\n incrementButtonAriaLabel,\n decrementButtonAriaLabel,\n unavailableProductErrorMessage,\n outOfStockProductErrorMessage\n } = this.props.resources;\n\n const { context, telemetry, data } = this.props;\n const { catalogs } = data;\n const { imageSettings } = this.props.config;\n\n return this.state.productSelection.map((line, index) => {\n const currentProductProps: IOrderTemplateLineProps = {\n orderTemplateLine: line,\n productListLine: line.productListLine,\n price: line.fullProduct?.ProductPrice,\n error: line.error,\n shouldDisable: line.shouldDisable,\n context,\n isQuantityDisabledForUpdate: this.state.isQuantityDisabledForUpdate,\n productUrl: line.fullProduct\n ? this._updateProductUrlCatalog(line.fullProduct.ProductDetails, context, line.productListLine.CatalogId)\n : '',\n imageSettings,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n quantity: line.productListLine.Quantity!,\n handlers: {\n onAddToBag: this._addItemToBag,\n onRemoveItem: this._removeItemFromOrderTemplateLines,\n onChangeQuantity: this._changeQuantity,\n onSelect: this.onSelect.bind(this)\n },\n resources: {\n selectOneRowText,\n moreButtonText,\n viewProductDetailsText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText,\n inputQuantityAriaLabel,\n removeFromOrderTemplateLinesText: removeItemFromOrderTemplateButtonText,\n addToBagButtonText: addOrderTemplateItemToBagButtonText,\n deleteButtonText,\n incrementButtonAriaLabel,\n decrementButtonAriaLabel,\n unavailableProductErrorMessage,\n outOfStockProductErrorMessage\n },\n index,\n isMobile: this.isMobile,\n toggleDetailsDisplayed: this._toggleDetailsDisplayed,\n isMultipleCatalogFeatureEnabledInHq: this._isChannelMultipleCatalogsFeatureEnabled(),\n catalogs: catalogs && catalogs.result\n };\n\n return OrderTemplateLineView(currentProductProps)!;\n });\n }\n\n private readonly _toggleDetailsDisplayed = (props: IOrderTemplateLineProps): void => {\n let state = {\n isDetailsDisplayed: !this.state.isDetailsDisplayed\n };\n if (props) {\n state = {\n ...state,\n ...{\n detailedProductView: OrderTemplateMobileLineView(props)\n }\n };\n }\n this.setState(state);\n };\n\n // This method is used to update the product url with the catalogId\n private readonly _updateProductUrlCatalog = (\n productDetails: SimpleProduct,\n context: ICoreContext,\n catalogId: number | undefined\n ): string => {\n const productUrl = getProductUrlSync(productDetails, context.actionContext, undefined);\n if (!StringExtensions.isNullOrWhitespace(productUrl) && catalogId !== undefined) {\n const absoluteUrl = new URL(productUrl, window.location.href);\n absoluteUrl.searchParams.set('catalogid', `${catalogId ?? 0}`);\n return absoluteUrl.href;\n }\n\n return productUrl;\n };\n\n // Dismiss alert when addingToCart/removeItem\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _changeQuantity = async (itemKey: string, quantity: number, props?: IOrderTemplateLineProps) => {\n const { context, data, telemetry, config, resources } = this.props;\n const { orderTemplate } = data;\n\n if (context) {\n if (orderTemplate?.result) {\n const orderTemplateLinesData = orderTemplate.result.orderTemplateLines;\n if (orderTemplateLinesData) {\n const orderLineIndex = orderTemplateLinesData.findIndex(\n (lines: OrderTemplateLine) => lines.productListLine.LineId === itemKey\n );\n const newProductListLine = { ...orderTemplateLinesData[orderLineIndex] };\n if (orderTemplateLinesData[orderLineIndex].productListLine.Quantity === quantity) {\n return;\n }\n const prevQuantity = newProductListLine.productListLine.Quantity;\n newProductListLine.productListLine.Quantity = quantity;\n const { fullProduct, ...line } = newProductListLine;\n\n // Update mobile modal\n if (props) {\n props.quantity = quantity;\n this.setState({\n detailedProductView: OrderTemplateMobileLineView(props)\n });\n }\n\n this.setState({\n isQuantityDisabledForUpdate: true\n });\n\n updateProductListLinesAsync({ callerContext: context.actionContext }, orderTemplate.result.productList.Id, [\n line.productListLine\n ])\n .then(list => {\n this.setState({\n itemKey,\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isQuantityDisabledForUpdate: false,\n isOpen: false\n });\n if (list) {\n const newLine = list.find(lines => lines.LineId === itemKey);\n orderTemplateLinesData[orderLineIndex].productListLine = newLine!;\n const updatedLines = [...orderTemplateLinesData];\n updatedLines[orderLineIndex] = { fullProduct, productListLine: newLine! };\n const updatedOrderTemplate = { ...orderTemplate.result, ProductListLines: updatedLines };\n context.actionContext.update(\n new ActiveOrderTemplateLinesInput(context.actionContext.requestContext, config),\n updatedOrderTemplate\n );\n }\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable to update product quantity.');\n telemetry.error(error);\n const userMessage = resources.editOrderTemplateLineQuantityError;\n if (props) {\n props && (props.productListLine.Quantity = prevQuantity);\n this.setState({\n itemKey,\n userMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isQuantityDisabledForUpdate: false,\n isOpen: true,\n detailedProductView: OrderTemplateMobileLineView(props)\n });\n } else {\n newProductListLine.productListLine.Quantity = prevQuantity;\n this.setState({\n itemKey,\n userMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isQuantityDisabledForUpdate: false,\n isOpen: true\n });\n }\n });\n }\n }\n }\n };\n\n private readonly _addItemToBag = async (\n product: SimpleProduct,\n quantity: number,\n itemKey: string,\n catalogId?: number | undefined\n ): Promise => {\n const { context, data, resources, telemetry } = this.props;\n const { cart } = data;\n const { maxQuantityLimitText, addedToCartFailureMessage } = resources;\n\n if (context) {\n if (cart.result) {\n const addProductToCartInput = {\n product,\n count: quantity,\n catalogId\n };\n\n await cart.result\n .addProductToCart(addProductToCartInput)\n .then((result: ICartActionResult) => {\n if (result.status === 'SUCCESS') {\n return getPriceForSelectedVariant(\n new PriceForSelectedVariantInput(\n product.RecordId,\n this.props.context.actionContext.requestContext.apiSettings.channelId,\n product\n ),\n this.props.context.actionContext\n ).then(priceResult => {\n if (!priceResult) {\n return AsyncResult.reject('Failed to retrieve product price');\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- read config file.\n const isMiniCart = context.app.config.addToCartBehavior === 'showMiniCart';\n this.setState({\n itemKey,\n userMessage: '',\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: false,\n isItemAddedToOrderTemplateOpen: !isMiniCart,\n itemAddedToCartDialogData: {\n product,\n productPrice: priceResult,\n quantity\n },\n isDetailsDisplayed: false\n });\n return AsyncResult.resolve();\n });\n } else {\n switch (result.substatus) {\n case 'MAXQUANTITY':\n if (context.app.config.maxQuantityForCartLineItem) {\n const cartLineQuantity: number | undefined =\n cart.result?.cart.CartLines &&\n cart.result?.cart.CartLines.find(result => result.ProductId === product.RecordId)?.Quantity;\n const defaultMessage = `You can only add ${context.app.config.maxQuantityForCartLineItem} of this item to your shopping bag`;\n this.setState({\n itemKey,\n userMessage:\n cartLineQuantity !== undefined\n ? maxQuantityLimitText\n .replace('{curQuantity}', cartLineQuantity.toString())\n .replace(\n '{maxQuantity}',\n context.app.config.maxQuantityForCartLineItem.toString()\n ) || defaultMessage\n : defaultMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n } else {\n const defaultMessage = `Max quantity for cart line item is undefined. Please define in configuration settings.`;\n this.setState({\n itemKey,\n userMessage: defaultMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n case 'INVOICEINCART': {\n this.setState({\n itemKey,\n userMessage: result.errorDetails?.LocalizedMessage || addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n default:\n telemetry.debug('[order-template-lines] Unable to Update Cart Line from the order template lines');\n this.setState({\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n return AsyncResult.resolve();\n }\n }\n })\n .catch((error: Error) => {\n telemetry.warning(error.message);\n telemetry.debug('[order-template-lines] Error trying to Update Cart Line from the order template lines');\n if (StringExtensions.isNullOrWhitespace(error.message)) {\n this.setState({\n itemKey,\n userMessage: error.message,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else {\n this.setState({\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }\n });\n }\n }\n };\n\n private readonly _removeItemFromOrderTemplateLines = async (line: IOrderTemplateLineViewModel) => {\n const { context, data, telemetry } = this.props;\n const { orderTemplate } = data;\n\n if (context && context.actionContext) {\n const maxWaitTimeInMilliSeconds: number = 1000;\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplate?.result && line) {\n const featureStates = await getFeatureState(createGetFeatureStateInput(context.actionContext), context.actionContext);\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (ArrayExtensions.hasElements(featureStates)) {\n isMultipleCatalogFeatureEnabledInHq =\n featureStates.find(\n (featureState: FeatureState) => featureState.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n const catalogId = getCatalogId(context.actionContext.requestContext);\n if (isMultipleCatalogFeatureEnabledInHq) {\n line.productListLine.CatalogId = catalogId;\n }\n removeProductListLinesAsync({ callerContext: context.actionContext }, line.productListLine.ProductListId!, [\n line.productListLine\n ])\n .then(async () => {\n // eslint-disable-next-line no-promise-executor-return -- fix\n await new Promise(resolve => setTimeout(resolve, maxWaitTimeInMilliSeconds));\n window.location.reload();\n })\n .catch(error => {\n telemetry.warning('[order-template-lines] Unable remove items from the order template lines');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\n '[order-template-lines] Unable remove items from the order template lines user token or lineItemID was not found'\n );\n }\n }\n };\n\n private readonly _renameTemplate = async (_template: ProductList): Promise => {\n window.location.reload();\n return Promise.resolve();\n };\n\n private readonly _removeTemplate = () => {\n const { context, data, telemetry, resources } = this.props;\n const { orderTemplate } = data;\n\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && orderTemplate && orderTemplate.result) {\n deleteAsync({ callerContext: context.actionContext }, orderTemplate.result.productList)\n .then()\n .catch((error: string) => {\n telemetry.warning('[order-template] Unable to delete order template.');\n telemetry.error(error);\n this.setState({\n itemKey: orderTemplate.result?.productList.Id || '',\n userMessage: resources.deleteOrderTemplateFailedText,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n });\n const newLink = getUrlSync('ordertemplatelist', this.props.context.actionContext);\n if (newLink) {\n window.location.assign(newLink);\n }\n } else {\n telemetry.warning('[order-template] Failed to delete order template. Order template was not found');\n }\n } else {\n telemetry.warning('[order-template] Failed to delete order template.');\n }\n };\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n }\n\n private readonly _getViewport = (): GridSize => {\n const { context } = this.props;\n\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (MsDyn365.isBrowser && window.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n
    \n
    \n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n
    \n {paginationNextText}\n
    \n );\n };\n}\n\nexport default OrderTemplateLines;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, INodeProps, Modal, ModalBody, ModalFooter, ModalHeader, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateLineViewProps } from './components';\nimport { IOrderTemplateViewProps } from './order-template';\n\nconst OrderTemplateLinesView: React.FC = (props: IOrderTemplateViewProps) => {\n const {\n OrderTemplateLines,\n status,\n statusMessage,\n heading,\n ProductsTable,\n ProductsTableHeading,\n orderLines,\n ProductsTableRow,\n productsStatusMessage,\n OrderTemplateActions,\n orderActions,\n pagination,\n itemAddedToCartDialog,\n bulkOrderLineActions,\n isDetailsDisplayed,\n detailedProductView,\n toggleDetailsDisplayed,\n resources: {\n cancelBtnLabel,\n productNumberText,\n productText,\n productUnitPriceText,\n productUOMText,\n productQuantityText,\n productLineCatalogName\n }\n } = props;\n\n const toggleDetails = React.useCallback(() => {\n toggleDetailsDisplayed && toggleDetailsDisplayed(undefined);\n }, [toggleDetailsDisplayed]);\n\n return (\n \n {heading}\n {OrderTemplateActions && (\n \n {orderActions?.addTemplateToBag}\n {orderActions?.renameTemplate}\n {orderActions?.removeTemplate}\n {orderActions?.actionsSplitButton}\n {!isDetailsDisplayed && productsStatusMessage}\n \n )}\n {bulkOrderLineActions}\n {status !== 'SUCCESS' && statusMessage}\n {ProductsTable && orderLines && orderLines.length > 0 && (\n \n \n {ProductsTableHeading}\n \n {orderLines &&\n orderLines.map(product => {\n return _renderItem(product, productQuantityText, ProductsTableRow);\n })}\n \n \n {pagination}\n \n )}\n {itemAddedToCartDialog}\n \n Product Details\n \n
      \n
    • {detailedProductView?.productImage}
    • \n
    • \n {productText}:\n {detailedProductView?.productInfo}\n
    • \n
    • \n {productLineCatalogName}:\n {detailedProductView?.productLineCatalog}\n
    • \n
    • \n {productNumberText}:\n {detailedProductView?.productNumber}\n
    • \n
    • \n {productUnitPriceText}:\n {` `}\n {detailedProductView?.productPrice}\n
    • \n
    • \n {productUOMText}:\n {` `}\n {detailedProductView?.productUnitOfMeasure}\n
    • \n
    • \n {productQuantityText}:\n {detailedProductView?.productQuantityView}\n
    • \n {productsStatusMessage &&
    • {productsStatusMessage}
    • }\n
    \n
    \n \n \n \n \n
    \n );\n};\n\nconst _renderItem = (product: IOrderTemplateLineViewProps, quantityLabel: string, ProductsTableRow?: INodeProps): JSX.Element | null => {\n if (!product) {\n return null;\n }\n\n const {\n key,\n selectLine,\n productLineCatalog,\n productImage,\n productPrice,\n productNumber,\n addToBagButton,\n removeButton,\n productInfo,\n productUnitOfMeasure,\n productQuantityView,\n productQuantity,\n popUp,\n isMobile,\n extraActionsPopup,\n isMultipleCatalogFeatureEnabledInHq,\n disabled\n } = product;\n\n const lineVisibility = disabled\n ? {\n pointerEvents: 'none',\n opacity: 0.5\n }\n : {\n pointerEvents: 'auto',\n opacity: 1\n };\n\n const disableElement: React.CSSProperties = lineVisibility as React.CSSProperties;\n\n return (\n \n {selectLine}\n {!isMobile && isMultipleCatalogFeatureEnabledInHq && {productLineCatalog}}\n {productImage}\n {isMobile ? (\n \n
    {productNumber}
    \n
    \n {quantityLabel}:{` `}\n {productQuantity}\n
    \n \n ) : (\n {productNumber}\n )}\n {!isMobile && {productInfo}}\n {!isMobile && {productPrice}}\n {!isMobile && {productUnitOfMeasure}}\n {!isMobile && {productQuantityView}}\n {isMobile && {popUp}}\n {!isMobile && !isMultipleCatalogFeatureEnabledInHq && (\n \n {addToBagButton}\n {removeButton}\n \n )}\n {extraActionsPopup}\n
    \n );\n};\n\nexport default OrderTemplateLinesView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce, { getCatalogId, getUrlSync, IImageSettings, Image, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n convertProductDimensionTypeToDimensionTypes,\n getFallbackImageUrl,\n getProductUrlSync,\n ObjectExtensions,\n Random,\n StringExtensions,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { RemoveFromComparisonButtonComponent } from '../product-comparison';\nimport { ProductComparisonState } from '../product-comparison-state';\nimport {\n getProductsInPreviewProductComparisonAction,\n GetProductsInPreviewProductComparisonInput,\n IProductComparisonProductData\n} from './actions';\nimport { IProductComparisonPreviewData } from './product-comparison-preview.data';\nimport { IProductComparisonPreviewProps } from './product-comparison-preview.props.autogenerated';\n\n/**\n * Represents product comparison view props for main product info.\n */\nexport interface IProductComparisonPreviewProductMainInfo {\n productData: IProductComparisonProductData;\n productNameLink?: string;\n\n removeFromComparisonButton: React.ReactNode;\n productImage: React.ReactNode;\n productLink: React.ReactNode;\n}\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonPreviewViewProps extends IProductComparisonPreviewProps<{}> {\n moduleProps: IModuleProps;\n collapseButton: INodeProps;\n isMainContentReady: boolean;\n\n hasUserInteractedWithComparison?: boolean;\n isExpanded?: boolean;\n subheaderText?: string;\n productsMainInfo?: IProductComparisonPreviewProductMainInfo[];\n previewGreyPlaceHolders?: React.ReactNode;\n\n productComparisonLink?: string;\n goToComparisonButton?: React.ReactNode;\n clearAllButton?: React.ReactNode;\n\n handleCollapseClick?(): void;\n clearAllProductsFromTheComparison?(): void;\n removeProductFromList?(itemId: string): void;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonPreviewState {\n isExpanded?: boolean;\n productsData?: IProductComparisonProductData[];\n greyPlaceHoldersCount?: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonPreviewFullProps extends IProductComparisonPreviewProps {}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonPreview extends React.PureComponent {\n public static readonly className = 'ms-product-comparison-preview';\n\n public static readonly containerClassName = `${ProductComparisonPreview.className}__container`;\n\n public static readonly mainContainerClassName = `${ProductComparisonPreview.containerClassName}__main-container`;\n\n public static readonly headerClassName = `${ProductComparisonPreview.mainContainerClassName}__header`;\n\n public static readonly headerLabelClassName = `${ProductComparisonPreview.headerClassName}__label`;\n\n public static readonly tableClassName = `${ProductComparisonPreview.mainContainerClassName}__table`;\n\n public static readonly tableRowClassName = `${ProductComparisonPreview.tableClassName}__product-row`;\n\n public static readonly footerClassName = `${ProductComparisonPreview.mainContainerClassName}__footer`;\n\n public static readonly collapseButtonClassName = `${ProductComparisonPreview.headerClassName}__collapse`;\n\n public static _displayedInstanceId?: string;\n\n private readonly _instanceId: string;\n\n private _hasUserInteractedWithComparison: boolean;\n\n public constructor(props: IProductComparisonPreviewFullProps) {\n super(props);\n\n this.state = {};\n\n this._instanceId = `${ProductComparisonPreview.className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n ProductComparisonPreview._displayedInstanceId = this._instanceId;\n\n this._hasUserInteractedWithComparison = false;\n }\n\n public componentDidMount(): void {\n if (this._instanceId !== ProductComparisonPreview._displayedInstanceId) {\n return;\n }\n\n this._loadProducts();\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).listModifiedEvent.subscribe(\n {\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this._hasUserInteractedWithComparison = true;\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data downloading.\n this._loadProducts();\n }\n }\n );\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode {\n if (this._instanceId !== ProductComparisonPreview._displayedInstanceId) {\n return null;\n }\n\n const viewProps: IProductComparisonPreviewViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: ProductComparisonPreview.className,\n id: this._instanceId\n },\n collapseButton: this._renderCollapseButton(),\n isMainContentReady: false,\n hasUserInteractedWithComparison: this._hasUserInteractedWithComparison\n };\n\n const productData = this._getProdutComparisonDataByCatalogId(this.state.productsData ?? this.props.data.productsData?.result);\n\n if (!ArrayExtensions.hasElements(productData)) {\n return this.props.renderView(viewProps);\n }\n\n viewProps.isMainContentReady = true;\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit)) {\n viewProps.subheaderText = this.props.resources.productComparisonPreviewHeaderTextWithLimit\n .replace('{0}', productData.length.toString())\n .replace('{1}', productsLimit.toString());\n }\n\n viewProps.isExpanded = this.state.isExpanded;\n viewProps.handleCollapseClick = this._handleCollapseClick;\n viewProps.productsMainInfo = this._getProductsMainInfo(productData);\n viewProps.previewGreyPlaceHolders = this._renderGreyPlaceHolders(productData);\n viewProps.productComparisonLink = getUrlSync('product-comparison', this.props.context.actionContext);\n viewProps.clearAllProductsFromTheComparison = this._clearAllProductsFromTheComparison;\n viewProps.removeProductFromList = this._removeProductFromList;\n viewProps.goToComparisonButton = this._renderGoToComparisonButton(viewProps.productComparisonLink);\n viewProps.clearAllButton = this._renderClearAllButton();\n\n return this.props.renderView(viewProps);\n }\n private _getProdutComparisonDataByCatalogId(productData: IProductComparisonProductData[] | undefined): IProductComparisonProductData[] {\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n const productByCatalogId = productData?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n private async _loadProducts(): Promise {\n const items = ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).items;\n const input = new GetProductsInPreviewProductComparisonInput(items);\n const productData = await getProductsInPreviewProductComparisonAction(input, this.props.context.actionContext);\n const productDataByCatalogId = this._getProdutComparisonDataByCatalogId(productData);\n this.setState({ productsData: productDataByCatalogId });\n this._getGreyPlaceHoldersCount(productDataByCatalogId);\n }\n\n private _getGreyPlaceHoldersCount(productData: IProductComparisonProductData[]): number | undefined {\n if (productData && ArrayExtensions.hasElements(productData)) {\n const limit = this._getProductsLimit();\n if (limit && this.props.context.app.config.displayGreyPlaceHolders) {\n const placeHolder = limit - productData.length;\n this.setState({ greyPlaceHoldersCount: placeHolder });\n return placeHolder;\n }\n }\n return;\n }\n\n private _getProductsMainInfo(products: IProductComparisonProductData[]): IProductComparisonPreviewProductMainInfo[] {\n const productImageContainerClassName = `${ProductComparisonPreview.tableRowClassName}__product-image-container`;\n const productImageClassName = `${productImageContainerClassName}__product-image`;\n const productNameClassName = `${ProductComparisonPreview.tableRowClassName}__product-name`;\n\n return products.map(productData => {\n const product = productData.product;\n\n let productNameLink: string | undefined;\n if (msdyn365Commerce.isBrowser) {\n const productUrl = getProductUrlSync(product, this.props.context.actionContext);\n const fullUrl = new URL(productUrl, window.location.href);\n if (isChannelTypeB2B(this.props.context.actionContext.requestContext)) {\n fullUrl.searchParams.set('catalogid', `${productData.catalogId}`);\n }\n product.Dimensions?.map(dimension => {\n const dimensionValue = dimension.DimensionValue?.Value;\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n const dimensionName = convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue);\n fullUrl.searchParams.set(dimensionName, dimensionValue!);\n }\n });\n productNameLink = fullUrl.href;\n }\n\n return {\n productNameLink,\n productData,\n removeFromComparisonButton: (\n \n ),\n productImage: (\n \n {this._renderProductImage(productImageClassName, productData.product)}\n \n ),\n productLink: (\n \n {productData.product.Name}\n \n )\n };\n });\n }\n\n /**\n * Represents product comparison preview view.\n * @returns Elements.\n */\n private _renderGreyPlaceHolders = (productData: IProductComparisonProductData[]): React.ReactNode[] | undefined => {\n const counts = this.state.greyPlaceHoldersCount;\n if (this.props.context.app.config.displayGreyPlaceHolders && counts! > 0) {\n const elements = [];\n for (let index = 0; index < counts!; index++) {\n elements.push(\n \n
    \n \n );\n }\n return elements;\n }\n return;\n };\n\n /**\n * Removes the product from a list.\n * @param itemId - The id of a product to remove.\n */\n private readonly _removeProductFromList = (itemId: string): void => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).removeItemById(itemId);\n this.setState(previousState => {\n return {\n productsData: previousState.productsData?.filter(item => item.itemId !== itemId)\n };\n });\n };\n\n /**\n * Toggle collapsing.\n */\n private readonly _handleCollapseClick: () => void = () => {\n this.setState(previousState => {\n return {\n isExpanded: !(previousState.isExpanded ?? this._hasUserInteractedWithComparison)\n };\n });\n };\n\n /**\n * Removes all products from the comparison.\n */\n private readonly _clearAllProductsFromTheComparison = () => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).clearAll();\n this.setState({ productsData: [] });\n };\n\n private _getProductsLimit(): number | undefined {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Retrieves product image react node.\n * @param className - Class name to use.\n * @param product - Product info.\n * @returns React node.\n */\n private _renderProductImage(className: string, product?: SimpleProduct): React.ReactNode | undefined {\n if (ObjectExtensions.isNullOrUndefined(product)) {\n return undefined;\n }\n\n const defaultImageSettingQ = 'w=140&h=140&m=6';\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: defaultImageSettingQ, w: 0, h: 0 },\n lg: { q: defaultImageSettingQ, w: 0, h: 0 },\n xl: { q: defaultImageSettingQ, w: 0, h: 0 }\n },\n lazyload: true\n };\n\n return (\n \n );\n }\n\n private _renderCollapseButton(): INodeProps {\n const shouldBeExpanded = this.state.isExpanded ?? this._hasUserInteractedWithComparison;\n const headerContainerClassName = `${ProductComparisonPreview.mainContainerClassName}__header_button`;\n let collapseClassName = `${ProductComparisonPreview.collapseButtonClassName}__expanded`;\n if (!shouldBeExpanded) {\n collapseClassName = `${ProductComparisonPreview.collapseButtonClassName}__collapsed`;\n }\n\n return {\n className: classnames(headerContainerClassName, ProductComparisonPreview.collapseButtonClassName, collapseClassName),\n onClick: this._handleCollapseClick,\n role: 'button',\n tabIndex: 0\n };\n }\n\n private _renderGoToComparisonButton(productComparisonLink: string | undefined): React.ReactNode {\n return (\n \n {this.props.resources.productComparisonCompareProductsButtonText}\n \n );\n }\n\n private _renderClearAllButton(): React.ReactNode {\n return (\n \n {this.props.resources.productComparisonClearAllProductsButtonText}\n \n );\n }\n}\n\nexport default ProductComparisonPreview;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport msdyn365Commerce from '@msdyn365-commerce/core';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IProductComparisonPreviewViewProps, ProductComparisonPreview } from './product-comparison-preview';\n\n/**\n * Represents product comparison preview view.\n * @param props - View props for product comparison preview.\n * @returns Functional component of product comparison preview.\n */\nexport const ProductComparisonPreviewViewFunctionalComponent: React.FC = props => {\n if (!props.isMainContentReady) {\n return null;\n }\n\n const shouldBeExpanded = props.isExpanded ?? props.hasUserInteractedWithComparison;\n\n const containerClassName = classnames(\n ProductComparisonPreview.mainContainerClassName,\n shouldBeExpanded ? '' : `${ProductComparisonPreview.mainContainerClassName}__collapsed`\n );\n\n return (\n \n \n \n \n \n \n \n \n \n {props.resources.productComparisonPreviewHeaderText}\n \n \n {props.subheaderText}\n \n \n \n \n \n \n \n {props.productsMainInfo?.map(info => {\n return (\n \n {info.removeFromComparisonButton}\n {info.productImage}\n \n );\n })}\n {props.previewGreyPlaceHolders}\n \n \n {props.productsMainInfo?.map(info => {\n return (\n \n {msdyn365Commerce.isBrowser ? info.productLink : undefined}\n \n );\n })}\n \n \n \n \n \n {props.clearAllButton}\n {props.goToComparisonButton}\n \n \n \n \n );\n};\n\nexport default ProductComparisonPreviewViewFunctionalComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getRichTextHtml, ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeValue } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\n/**\n * Represents resources for the component.\n */\nexport interface IProductSpecificationResources {\n productComparisonProductItemSpecificationTrue: string;\n productComparisonProductItemSpecificationFalse: string;\n}\n\n/**\n * Represent configuration of the component.\n */\nexport interface IProductSpecificationProps {\n telemetry: ITelemetry;\n specification?: AttributeValue;\n context: ICoreContext;\n\n resources: IProductSpecificationResources;\n}\n\n/**\n * Represents the product specification values that comes from the server.\n */\nexport enum SpecificationDataTypeValues {\n none = 0,\n currency = 1,\n dateTime = 2,\n decimal = 3,\n integer = 4,\n text = 5,\n boolean = 6,\n video = 40,\n image = 41\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductSpecification extends React.PureComponent {\n private static _renderCurrencyCell(product: AttributeValue): React.ReactNode | null {\n if (ObjectExtensions.isNullOrUndefined(product.CurrencyValue)) {\n return null;\n }\n\n return (\n \n {product.CurrencyCode}\n {product.CurrencyValue}\n \n );\n }\n\n private static _renderDateTimeCell(product: AttributeValue): React.ReactNode | null {\n if (ObjectExtensions.isFunction(product.DateTimeOffsetValue?.toUTCString)) {\n return null;\n }\n\n return {product.DateTimeOffsetValue!.toUTCString()};\n }\n\n private static _renderIntegerCell(product: AttributeValue): React.ReactNode | null {\n if (ObjectExtensions.isNullOrUndefined(product.IntegerValue)) {\n return null;\n }\n\n return {product.IntegerValue};\n }\n\n private static _renderDecimalCell(product: AttributeValue): React.ReactNode | null {\n if (ObjectExtensions.isNullOrUndefined(product.FloatValue)) {\n return null;\n }\n\n return {product.FloatValue};\n }\n\n private static _renderTextCell(product: AttributeValue): React.ReactNode | null {\n if (ObjectExtensions.isNullOrUndefined(product.TextValue)) {\n return null;\n }\n\n // eslint-disable-next-line react/no-danger -- Implementation is a copy.\n return ;\n }\n\n public constructor(props: IProductSpecificationProps) {\n super(props);\n }\n\n public render(): React.ReactNode | null {\n const specification = this.props.specification;\n if (ObjectExtensions.isNullOrUndefined(specification)) {\n return null;\n }\n\n switch (specification.DataTypeValue) {\n case SpecificationDataTypeValues.none:\n // Return span here instead of null so the row still shows\n return ;\n case SpecificationDataTypeValues.currency:\n return ProductSpecification._renderCurrencyCell(specification);\n case SpecificationDataTypeValues.dateTime:\n return ProductSpecification._renderDateTimeCell(specification);\n case SpecificationDataTypeValues.decimal:\n return ProductSpecification._renderDecimalCell(specification);\n case SpecificationDataTypeValues.integer:\n return ProductSpecification._renderIntegerCell(specification);\n case SpecificationDataTypeValues.text:\n return ProductSpecification._renderTextCell(specification);\n case SpecificationDataTypeValues.boolean:\n return this._renderTrueFalseCell(specification);\n case SpecificationDataTypeValues.video:\n this.props.telemetry.warning('Got video specification type, not supported yet so skipping line');\n return null;\n case SpecificationDataTypeValues.image:\n this.props.telemetry.warning('Got image specification type, not supported yet so skipping line');\n return null;\n default:\n this.props.telemetry.warning(`Got unknown specification type ${specification.DataTypeValue ?? 'null'} so skipping line`);\n return null;\n }\n }\n\n private _renderTrueFalseCell(product: AttributeValue): React.ReactNode | null {\n if (product.BooleanValue) {\n return {this.props.resources.productComparisonProductItemSpecificationTrue};\n }\n return {this.props.resources.productComparisonProductItemSpecificationFalse};\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 } from '@msdyn365-commerce/core';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React, { useCallback } from 'react';\n\n/**\n * Resources for the remove from comparison button component.\n */\nexport interface IRemoveFromComparisonButtonResources {\n productComparisonRemoveProductFromListAriaLabel: string;\n}\n\n/**\n * The configuration of the remove from comparison button component.\n */\nexport interface IRemoveFromComparisonButtonComponentProps extends IComponentProps {\n className: string;\n itemId: string;\n\n resources: IRemoveFromComparisonButtonResources;\n\n onClickHandler(itemId: string): void;\n}\n\n/**\n * Represents a button which handles adding to product comparison.\n * @param props - Configuration of the component.\n * @returns React functional component.\n */\nconst RemoveFromComparisonButtonFunctionalComponent: React.FC = (\n props: IRemoveFromComparisonButtonComponentProps\n) => {\n const onClick = useCallback(() => {\n props.onClickHandler(props.itemId);\n }, [props]);\n\n const { className } = props;\n\n return \n );\n }\n\n private readonly _goBack = (): void => {\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\n if (document.referrer === '') {\n window.location.href = backToShoppingUrl;\n } else {\n window.history.back();\n }\n };\n\n /**\n * Retrieves localized text for dimension.\n * @param dimensionId - Dimension id.\n * @returns Localized text.\n */\n private _getDimensionName(dimensionId: number): string | undefined {\n if (dimensionId === ProductDimensionType.Color) {\n return this.props.resources.productComparisonProductItemColorDimension;\n }\n if (dimensionId === ProductDimensionType.Size) {\n return this.props.resources.productComparisonProductItemSizeDimension;\n }\n\n if (dimensionId === ProductDimensionType.Style) {\n return this.props.resources.productComparisonProductItemStyleDimension;\n }\n return undefined;\n }\n\n private getUpdatedDimensionsProps(dimensionId: number, products: IProductComparisonProductMainInfo[]) {\n const dimensionClassName = `${ProductComparison.dimensionsRowClassName}__dimension-${dimensionId}`;\n const dimensionDescription = this._getDimensionName(dimensionId);\n const dimensionName = convertProductDimensionTypeToDimensionTypes(dimensionId);\n let dimensionSelectionType = SelectionType.text;\n\n const dimensionsAsSwatchConfiguration: DimensionTypes[] | undefined = this.props.context.app.config.dimensionsAsSwatchType;\n if (\n ArrayExtensions.hasElements(dimensionsAsSwatchConfiguration) &&\n !dimensionsAsSwatchConfiguration?.includes(DimensionTypes.none) &&\n dimensionsAsSwatchConfiguration?.includes(dimensionName)\n ) {\n dimensionSelectionType = SelectionType.swatch;\n }\n\n const productDimensionValues = products.map(productMainInfo => {\n let dimension: IDimensionResult[] = [];\n let textValue: string = '';\n let renderSwatch: JSX.Element | undefined;\n this.props.data.productsData?.result?.map(productsDimension => {\n if (productsDimension.productInfo.RecordId === productMainInfo.product.productInfo.RecordId) {\n dimension = productsDimension.dimensions?.dimensions ?? [];\n }\n return dimension;\n });\n\n if (dimensionSelectionType === SelectionType.swatch) {\n renderSwatch = (\n
    \n {dimension.map(dimensionItems => {\n return (\n \n {dimensionItems.result.map(dimensionItem => {\n let currentDimensionId: number | undefined;\n const swatches =\n dimensionItem.map(swatchItem => {\n let isDefaultDimension: boolean = false;\n const selectedDimensions = productMainInfo.product.productInfo.Dimensions?.filter(\n item => item.DimensionTypeValue === swatchItem.DimensionTypeValue\n );\n selectedDimensions?.map(selectedDimension => {\n if (\n selectedDimension.DimensionValue !== undefined &&\n selectedDimension.DimensionValue.DimensionId ===\n swatchItem.DimensionValue?.DimensionId\n ) {\n isDefaultDimension = true;\n }\n return isDefaultDimension;\n });\n\n if (swatchItem.DimensionTypeValue === dimensionId) {\n currentDimensionId = swatchItem.DimensionTypeValue;\n }\n const dimensionType = dimensionName;\n return {\n itemId: `${swatchItem.DimensionValue?.RecordId ?? ''}-${swatchItem.DimensionValue\n ?.Value ?? ''}`,\n value: swatchItem.DimensionValue?.Value ?? '',\n dimensionType,\n colorHexCode: swatchItem.DimensionValue?.ColorHexCode,\n imageUrl: swatchItem.DimensionValue?.ImageUrl,\n isDefault: isDefaultDimension\n };\n }) ?? [];\n if (currentDimensionId && currentDimensionId === dimensionId) {\n return (\n \n );\n }\n return null;\n })}\n
    \n );\n })}\n
    \n );\n }\n\n if (dimensionSelectionType === SelectionType.text) {\n dimension.map(item => {\n return item.result.map(items => {\n return items.map(dimensionItem => {\n if (dimensionItem.DimensionTypeValue === dimensionId) {\n const productDimensionSeperatorValue =\n textValue !== ''\n ? this.props.resources.productDimensionSeparator\n : this.props.resources.productDimensionSeparator.replace('/', '');\n textValue = textValue + format(productDimensionSeperatorValue, dimensionItem.DimensionValue?.Value ?? '');\n }\n return textValue;\n });\n });\n });\n }\n\n const dimensionProps = {\n RecordId: productMainInfo.product.productInfo.RecordId,\n Value: textValue,\n DimensionId: dimensionId,\n ImageUrl: productMainInfo.product.productInfo.PrimaryImageUrl\n };\n\n return {\n dimensionProps,\n productMainInfo,\n node: (\n
    \n {dimensionSelectionType === SelectionType.swatch ? renderSwatch : dimensionProps.Value}\n
    \n )\n };\n });\n return {\n dimensionId,\n dimensionName: dimensionDescription,\n dimensionClassName,\n productDimensionValues\n };\n }\n private _getSpecificationProps(specifications: AttributeValue[], products: IProductComparisonProductMainInfo[]) {\n return specifications.map(specification => {\n const specificationClassName = `${ProductComparison.specificationsRowClassName}__specification-${specification.Name!}`;\n\n const specificationValues = products.map(productMainInfo => {\n const productSpecification = productMainInfo.product.specifications?.specificationsList.find(\n productSpecifications => productSpecifications.Name === specification.Name\n );\n\n return {\n productSpecification,\n productMainInfo,\n node: (\n
    \n \n
    \n )\n };\n });\n\n return {\n specification,\n specificationClassName,\n specificationValues\n };\n });\n }\n\n private _renderHeading(): React.ReactNode {\n return ;\n }\n\n private _renderLoading(): React.ReactNode {\n return
    {this.props.resources.productComparisonLoadingText}
    ;\n }\n\n private _renderClearAllButton(): React.ReactNode {\n return (\n \n {this.props.resources.productComparisonClearAllButtonText}\n \n );\n }\n\n /**\n * Retrieves unique dimension ids of product.\n * @param products - Product.\n * @returns Unique dimension ids.\n */\n private getProductsDimensionsIds(products: IProductComparisonItemData[]): number[] {\n const dimensions = products.map(product => product.productInfo.Dimensions);\n const allDimensions: ProductDimension[] = ArrayExtensions.flatten(dimensions);\n\n const dimensionIds = ArrayExtensions.validValues(allDimensions.map(dimension => dimension.DimensionTypeValue));\n const uniqueDimensionIds = ArrayExtensions.unique(dimensionIds);\n\n return uniqueDimensionIds;\n }\n\n private _renderPreviousClicker(): React.ReactNode {\n return (\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 { min, max, 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 { min, max, 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 { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\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 isOrderQuantityLimitsFeatureEnabled: boolean;\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 const isOrderQuantityLimitsFeatureEnabled = props.data.isOrderQuantityLimitsFeatureEnabled;\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 let quantity = quickOrderProduct.productLine.productListLine.Quantity!;\n const product = quickOrderProduct.productLine.fullProduct;\n let min: number = 1;\n let max: number = 10;\n const behavior = product?.ProductDetails?.Behavior;\n if (isOrderQuantityLimitsFeatureEnabled && !ObjectExtensions.isNullOrUndefined(behavior)) {\n if (behavior.MinimumQuantity && behavior.MinimumQuantity > 0) {\n min = behavior.MinimumQuantity;\n }\n if (behavior.MaximumQuantity && behavior.MaximumQuantity > 0) {\n max = behavior.MaximumQuantity;\n }\n quantity = Math.max(quantity, min);\n }\n const price = quickOrderProduct.productLine.fullProduct?.ProductPrice;\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 ObjectExtensions,\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 { getCatalogId } from '@msdyn365-commerce/core';\nimport { ActiveProductListInput } from './actions';\nimport {\n EcommerceQuantityLimitConfigurationsFeatureName,\n IQuickOrderGridActionsProps,\n IQuickOrderGridActionsViewProps,\n IQuickOrderGridRowCallbacks,\n IQuickOrderGridState,\n QuickOrderGridActionsView,\n QuickOrderGridDrawer,\n QuickOrderGridFormComponent,\n QuickOrderGridProduct,\n QuickOrderGridTableComponent,\n RetailDefaultOrderQuantityLimitsFeatureName\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 _initializedDimensions: Set = new Set();\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 _isOrderQuantityLimitsFeatureEnabled: boolean = false;\n\n private _isChannelLimitsFeatureEnabled: boolean = false;\n\n private _applyDefaultOrderSettingsForCartLine: boolean = false;\n\n private readonly _quickOrderGridCallbacks: IProductDimensionCallbacks = {\n initializeDimension: (initializedDimension: string): void => {\n if (initializedDimension) {\n this._initializedDimensions.add(initializedDimension);\n }\n },\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 // Only trigger _updateDimensions when all dimensions are initialized\n if (this._initializedDimensions.size === this.state.productDimensions?.length) {\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 /**\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 min: 0,\n max: 10,\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 this._isOrderQuantityLimitsFeatureEnabled =\n this.props.data.featureState.result?.find(featureState => featureState.Name === RetailDefaultOrderQuantityLimitsFeatureName)\n ?.IsEnabled ?? false;\n\n this._isChannelLimitsFeatureEnabled =\n this.props.data.featureState.result?.find(featureState => featureState.Name === EcommerceQuantityLimitConfigurationsFeatureName)\n ?.IsEnabled ?? false;\n\n const cartConfiguration = this.props.data.cartConfiguration;\n this._applyDefaultOrderSettingsForCartLine = cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\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 minQuantity: this.state.min ?? 0,\n maxQuantity: this.state.max ?? 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 onErrorMessage: (message: string) =>\n this.setState({\n topStateMessage: {\n messageText: message,\n statusCssString: this._errorCssClass,\n messageGlyph: this._errorCssGlyphClass,\n isOpen: true\n }\n })\n },\n quickOrderGridState: this.state,\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 private _updateQuantitiesInState(product: SimpleProduct): void {\n const min: number = this._getMinQuantityForCartLineItem(this._isOrderQuantityLimitsFeatureEnabled, product);\n const max: number = this._getMaxQuantityForCartLineItem(\n this._isChannelLimitsFeatureEnabled || this._isOrderQuantityLimitsFeatureEnabled,\n product\n );\n let quantity: number = this._getQuantity(\n this._isOrderQuantityLimitsFeatureEnabled,\n this._applyDefaultOrderSettingsForCartLine,\n product\n );\n quantity = Math.max(quantity, min);\n\n this.setState({\n min,\n max,\n quantity\n });\n }\n\n private _getMinQuantityForCartLineItem(isOrderQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n if (\n isOrderQuantityLimitsFeatureEnabled &&\n this._getIgnoreOrderSettings() &&\n product?.Behavior?.MinimumQuantity &&\n product.Behavior.MinimumQuantity > 0\n ) {\n return product.Behavior.MinimumQuantity;\n }\n\n return 1;\n }\n\n private _getMaxQuantityForCartLineItem(isQuantityLimitsFeatureEnabled: boolean, product: SimpleProduct): number {\n if (\n isQuantityLimitsFeatureEnabled &&\n this._getIgnoreOrderSettings() &&\n product?.Behavior?.MaximumQuantity &&\n product.Behavior.MaximumQuantity > 0\n ) {\n return product.Behavior.MaximumQuantity;\n }\n\n return this.props.context.app.config.maxQuantityForCartLineItem;\n }\n\n /**\n * Retrieves the value of the IgnoreOrderSettings property from the cart configuration.\n * If the property is not present, it defaults to false.\n * @returns {boolean} The value of the IgnoreOrderSettings property.\n */\n private _getIgnoreOrderSettings(): boolean {\n const cartConfiguration = this.props.data.cartConfiguration;\n return !(cartConfiguration?.result?.IgnoreOrderSettings ?? false);\n }\n\n private _getQuantity(\n isOrderQuantityLimitsFeatureEnabled: boolean,\n applyDefaultOrderSettingsForCartLine: boolean,\n product: SimpleProduct\n ): number {\n let defaultQuantity = 1;\n\n if (!isOrderQuantityLimitsFeatureEnabled || !applyDefaultOrderSettingsForCartLine) {\n return defaultQuantity;\n }\n\n if (product?.Behavior?.DefaultQuantity && product.Behavior.DefaultQuantity > 0) {\n defaultQuantity = product.Behavior.DefaultQuantity;\n }\n\n return defaultQuantity;\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 if (results?.Product) {\n this._updateQuantitiesInState(results.Product);\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 let currentValue = Number.parseInt(value, 10);\n const inputElement = this._quantityInput.current instanceof HTMLInputElement && this._quantityInput.current;\n const quantityChangeDebounceTimeout = 200;\n let minimumQuantity = 0;\n let needToUpdateUIValue: boolean = false;\n if (this._isOrderQuantityLimitsFeatureEnabled && !ObjectExtensions.isNullOrUndefined(this.state.productResponse?.Behavior)) {\n const behavior = this.state.productResponse!.Behavior;\n minimumQuantity = behavior?.MinimumQuantity ?? 0;\n const newCurrentValue = Math.max(currentValue, minimumQuantity);\n if (newCurrentValue !== currentValue) {\n needToUpdateUIValue = true;\n }\n currentValue = newCurrentValue;\n }\n\n this.setState({ quantity: currentValue }, () => {\n debounce(() => {\n if (needToUpdateUIValue && !Number.isNaN(this.state.quantity) && inputElement) {\n inputElement.setAttribute('aria-valuenow', currentValue.toString());\n inputElement.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 // 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 private readonly _isChannelMultipleCatalogsFeatureEnabled = (): boolean => {\n let isMultipleCatalogFeatureEnabledInHq = false;\n if (this.props.data.featureState) {\n isMultipleCatalogFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n feature => feature.Name === 'Dynamics.AX.Application.ChannelMultipleCatalogsFeature'\n )?.IsEnabled || false;\n }\n return isMultipleCatalogFeatureEnabledInHq;\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 // get the current catalog id.\n const catalogId = getCatalogId(this.props.context.request);\n\n this._updateStatusState('', '', '', false);\n\n if (productResponse !== undefined && this._validateCart(productResponse, quantity)) {\n if (StringExtensions.isNullOrWhitespace(productListId)) {\n await this._createProductList();\n }\n\n if (StringExtensions.isNullOrWhitespace(this.state.productListId)) {\n this._updateStatusState(quickOrderGridAddedToGridFailureMessage, this._errorCssClass, this._errorCssGlyphClass, true);\n return;\n }\n const input = new AddItemToProductListInput(\n this.state.productListId,\n productResponse.RecordId,\n quantity,\n productResponse.DefaultUnitOfMeasure ?? 'ea',\n this._isChannelMultipleCatalogsFeatureEnabled(),\n catalogId\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 _createProductList = async (): Promise => {\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 await 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 { IErrorState } from '@msdyn365-commerce/components';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IDimensionForSelectedVariant, OrderTemplateLine } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { QuickOrderGridProduct } from './quick-order-grid-product';\n\n/**\n * QuickOrderGrid state message Interface.\n */\nexport interface IQuickOrderGridStateMessage {\n isOpen: boolean;\n messageGlyph: string;\n messageText: string;\n statusCssString: string;\n}\n\n/**\n * QuickOrderGrid state Interface.\n */\nexport interface IQuickOrderGridState {\n isQuickOrderGridFormExpanded: boolean;\n isUpdatingDimension?: boolean;\n productResponse: SimpleProduct | undefined;\n productDimensions: IDimensionForSelectedVariant[] | undefined;\n min: number | undefined;\n max: number | undefined;\n quantity: number;\n stateMessage?: IQuickOrderGridStateMessage;\n topStateMessage?: IQuickOrderGridStateMessage;\n productDimensionErrorState: IErrorState;\n isMobile: boolean;\n products: OrderTemplateLine[];\n productListId: string;\n}\n\n/**\n * QuickOrder Grid Row view.\n */\nexport interface IQuickOrderGridRowViewModel extends OrderTemplateLine {\n isChecked: boolean;\n}\n\n/**\n * Interface for quick order callbacks.\n */\nexport interface IQuickOrderGridRowCallbacks {\n onRemoveItem(line: QuickOrderGridProduct): void;\n onChangeQuantity(orderTemplateLineId: string | undefined, quantity: number): boolean;\n}\n\n/**\n * Interface for quick order grid action view props.\n */\nexport interface IQuickOrderGridActionsViewProps {\n addProductListToBag: React.ReactNode;\n removeProductList?: React.ReactNode;\n userMessage?: React.ReactNode;\n}\n\nexport const RetailDefaultOrderQuantityLimitsFeatureName: string = 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature';\n\nexport const EcommerceQuantityLimitConfigurationsFeatureName: string =\n 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature';\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 { IQuickOrderGridViewProps, IQuickOrderGridFormViewProps } from './index';\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?.userMessage}\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 { ITelemetry } from '@msdyn365-commerce/core';\nimport { AttributeDataType, DisplayTemplate, ProductRefinerValue, RefinerType } from '@msdyn365-commerce/retail-proxy';\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { DimensionTypes } from '@msdyn365-commerce-modules/retail-actions';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\n/**\n * Types of product refiner values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerValueDataTypeValue {\n /**\n * Range slider is used for selections like price.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Range = 1,\n\n /**\n * Range input is a different way to specify ranges and can be expressed with input boxes\n * as well as a set of discrete single-select type values.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n RangeInput = 4,\n\n /**\n * This is a discrete list item, either multi-select or single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n List = 5,\n\n /**\n * Boolean types allows only single-select.\n * @deprecated This will be removed soon. Please, use `AttributeDataType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { AttributeDataType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Boolean = 6\n}\n\n/**\n * Types of product refiners.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerTypeValue {\n /**\n * Refiner values are single-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Single = 0,\n\n /**\n * Refiner values are multi-select.\n * @deprecated This will be removed soon. Please, use `RefinerType` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { RefinerType } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Multi = 1\n}\n\n/**\n * ProductRefinerSource enum type.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\nexport enum ProductRefinerSource {\n /**\n * The None member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n None = 0,\n\n /**\n * The Attribute member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Attribute = 1,\n\n /**\n * The Category member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Category = 2,\n\n /**\n * The Price member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Price = 3,\n\n /**\n * The Rating member.\n * @deprecated This will be removed soon. Please, use `ProductRefinerSource` from `@msdyn365-commerce/retail-proxy` instead.\n * @example\n * ```\n * import { ProductRefinerSource } from `@msdyn365-commerce/retail-proxy`;\n * ```\n */\n Rating = 4\n}\n\nexport interface IRefineItemData {\n sourceValue?: number;\n swatchImageUrl?: string;\n swatchColorHexCode?: string;\n refinerItemId: number;\n dataTypeValue?: number;\n name: string;\n label: string;\n count?: number;\n isChecked: boolean;\n refineItemUrl?: string;\n minValue?: string;\n maxValue?: string;\n dimensionType?: DimensionTypes;\n rowNumber?: number;\n unitText?: string;\n updatedSliderMaxValue?: string;\n updatedSliderMinValue?: string;\n}\n/**\n * Checks if the data type value corresponds to a slider.\n * @param dataTypeValue\n */\nexport function isRangeType(dataTypeValue: number | undefined): boolean {\n return dataTypeValue === AttributeDataType.Currency || dataTypeValue === AttributeDataType.Decimal;\n}\n\n/**\n * Checks if the data type value corresponds to a range type integer.\n * @param dataTypeValue\n */\nexport function isRangeTypeForInteger(dataTypeValue: number | undefined): boolean {\n return (\n dataTypeValue === AttributeDataType.Currency ||\n dataTypeValue === AttributeDataType.Decimal ||\n dataTypeValue === AttributeDataType.Integer\n );\n}\n\n/**\n * Checks if the data type value corresponds to a custom input box Range.\n * @param dataTypeValue\n */\nexport function isCustomRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy\n): boolean {\n return (\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion?.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n );\n}\n\n/**\n * Checks if the selectedRefinementCriterion is siingle type with API va;ues or custom type.\n * If custom type then RowNumber is null\n * @param dataTypeValue\n */\nexport function isSingleSelectRangeTypeIntegerSelected(\n selectedRefinementCriterion: ProductRefinerValue,\n productRefinerValue: ProductRefinerValue\n): boolean {\n return (\n productRefinerValue.LeftValueBoundString === selectedRefinementCriterion?.LeftValueBoundString &&\n productRefinerValue.RightValueBoundString === selectedRefinementCriterion?.RightValueBoundString &&\n selectedRefinementCriterion?.RowNumber !== undefined &&\n selectedRefinementCriterion?.RowNumber !== null &&\n selectedRefinementCriterion !== undefined\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n */\nexport function findMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue | undefined {\n // If the value is a range, then match only on data type value; otherwise match on item string\n return refinementCriteria.find((refinementCriterion: ProductRefinerValue) =>\n isMatchingRefinementCriterion(productRefinerValue, refinementCriterion)\n );\n}\n\n/**\n * Find the refinement criterion associated with this product refiner value.\n * @param productRefinerValue Product refiner value to match.\n * @param refinementCriteria Selected refinement criteria.\n * @param refinementCriterion\n */\nexport function isMatchingRefinementCriterion(\n productRefinerValue: ProductRefinerValue,\n refinementCriterion: ProductRefinerValue,\n parent?: IProductRefinerHierarchy\n): boolean {\n // If the value is a range, then match only on data type value; otherwise match on item string\n // Distinguish by displaytype also\n return (\n refinementCriterion.RefinerRecordId === productRefinerValue.RefinerRecordId &&\n refinementCriterion.RefinerSourceValue === productRefinerValue.RefinerSourceValue &&\n refinementCriterion.DataTypeValue === productRefinerValue.DataTypeValue &&\n ((parent?.DisplayTemplateValue === DisplayTemplate.Range\n ? isRangeType(refinementCriterion.DataTypeValue)\n : isRangeTypeForInteger(refinementCriterion.DataTypeValue)) ||\n refinementCriterion.LeftValueBoundString === productRefinerValue.LeftValueBoundString)\n );\n}\n\nexport function getIntegerRangeName(productRefinerValue: ProductRefinerValue): string {\n let rangeValue = '';\n\n if (productRefinerValue.LeftValueBoundString === '' && productRefinerValue.RightValueBoundString !== '') {\n rangeValue = `< ${productRefinerValue.RightValueBoundLocalizedString || productRefinerValue.RightValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString === '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `> ${productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString}`;\n } else if (productRefinerValue.RightValueBoundString !== '' && productRefinerValue.LeftValueBoundString !== '') {\n rangeValue = `${productRefinerValue.LeftValueBoundLocalizedString ||\n productRefinerValue.LeftValueBoundString} - ${productRefinerValue.RightValueBoundString ||\n productRefinerValue.RightValueBoundString}`;\n }\n return rangeValue;\n}\n\n/**\n * Get input without formatting.\n * @param input - Input string.\n * @returns - Returns number.\n */\nexport function getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNumber = Number(input);\n if (!Number.isNaN(inputAsNumber)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n // const reverseLookupResult = formattedPriceReverseLookup.get(input);\n // return reverseLookupResult || input;\n return input;\n}\n\nexport function getUpdatedRefinementCriteria(\n itemToggleNotification: IRefineItemToggleNotification,\n currentRefinementCriteria: ProductRefinerValue[]\n): ProductRefinerValue[] {\n const updatedRefinementCriteria: ProductRefinerValue[] = [];\n let toggledItemFound = false;\n\n // Keeping only itemToggled value for integer-range type in currentRefinementCriteria\n if (\n itemToggleNotification.parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n itemToggleNotification.parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n currentRefinementCriteria = currentRefinementCriteria.filter(r => {\n return r.RefinerRecordId !== itemToggleNotification.productRefinerValue.RefinerRecordId;\n });\n }\n\n currentRefinementCriteria.forEach((selectedCriterion: ProductRefinerValue) => {\n if (\n isMatchingRefinementCriterion(\n itemToggleNotification.productRefinerValue,\n selectedCriterion,\n itemToggleNotification.parentProductRefinerHierarchy\n )\n ) {\n toggledItemFound = true;\n if (itemToggleNotification.isSelecting) {\n const next = {\n ...selectedCriterion,\n LeftValueBoundString:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n selectedCriterion.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n selectedCriterion.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n } // Else the item is being de-selected, so omit it from the refinement criteria\n } else {\n // Keep existing criterion because it is not in the item toggle notification\n updatedRefinementCriteria.push(selectedCriterion);\n }\n });\n\n if (!toggledItemFound) {\n const next = {\n ...itemToggleNotification.productRefinerValue,\n LeftValueBoundString:\n (itemToggleNotification.rangeStart !== undefined && `${itemToggleNotification.rangeStart}`) ||\n itemToggleNotification.productRefinerValue.LeftValueBoundString,\n RightValueBoundString:\n (itemToggleNotification.rangeEnd !== undefined && `${itemToggleNotification.rangeEnd}`) ||\n itemToggleNotification.productRefinerValue.RightValueBoundString\n };\n updatedRefinementCriteria.push(next);\n\n // If single select, then deselect any others in the parent refiner group\n if (\n (itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.Text ||\n itemToggleNotification.productRefinerValue.DataTypeValue === AttributeDataType.TrueFalse) &&\n itemToggleNotification.parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect\n ) {\n itemToggleNotification.parentProductRefinerHierarchy.Values.forEach((child: ProductRefinerValue) => {\n if (child.RefinerRecordId === next.RefinerRecordId && child.LeftValueBoundString === next.LeftValueBoundString) {\n // Do nothing\n } else {\n const matchingIndex = updatedRefinementCriteria.findIndex((criterion: ProductRefinerValue) =>\n isMatchingRefinementCriterion(child, criterion, itemToggleNotification.parentProductRefinerHierarchy)\n );\n if (matchingIndex > -1) {\n updatedRefinementCriteria.splice(matchingIndex, 1);\n }\n }\n });\n }\n }\n\n return updatedRefinementCriteria;\n}\n\nexport function formatPrice(\n amount: string | undefined,\n currency: string | undefined,\n locale: string | undefined,\n telemetry: ITelemetry\n): string {\n if (!amount || !currency) {\n telemetry.trace(`[refine-menu.utilities.formatPrice] could not format price for ${amount} ${currency}`);\n return amount || '';\n }\n const priceAmount = (amount && Number(amount)) || 0;\n let result: string;\n\n try {\n result = new Intl.NumberFormat(locale, {\n style: 'currency',\n currencyDisplay: 'symbol',\n currency,\n minimumFractionDigits: 0\n }).format(priceAmount);\n } catch (error) {\n result = `${priceAmount} ${currency}`;\n telemetry.warning(`[refine-menu.utilities.formatPrice] Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AttributeDataType, DisplayTemplate, ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ProductListInventoryFilteringOptions } from '../actions';\nimport { IChoiceSummaryProps } from './choice-summary.props';\nimport { getIntegerRangeName, isMatchingRefinementCriterion, isRangeType } from './utilities';\n\ninterface IRefinerMap {\n key: string;\n value: ProductRefinerValue;\n rangeDisplayType?: number | undefined;\n}\n\n/**\n * ChoiceSummary component.\n */\n@observer\nexport default class ChoiceSummary extends React.PureComponent {\n private readonly closeButtonGlyph: string = 'msi-close-btn';\n\n private readonly payLoad: IPayLoad;\n\n @computed get selectedRefinersMap(): IRefinerMap[] {\n let { selectedChoices } = this.props;\n const { channelInventoryConfigurationId, refinerHierarchy } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n if (this.props.context?.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n selectedChoices = selectedChoices.filter(choice => {\n const parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) =>\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, choice))\n );\n return parent && parent.RecordId !== channelInventoryConfigurationId;\n });\n }\n return selectedChoices.map((selectedRefiner: ProductRefinerValue, index) => {\n const rangeParentDisplay = refinerHierarchy.filter(p => p.RecordId === selectedRefiner.RefinerRecordId);\n return {\n key: this._getKeyForRefinerValue(selectedRefiner, index.toString()),\n value: selectedRefiner,\n // parameter to store Display Template type\n rangeDisplayType: rangeParentDisplay[0]?.DisplayTemplateValue || undefined\n } as IRefinerMap;\n });\n }\n\n constructor(props: Readonly) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public render(): JSX.Element {\n const { clearAllText, label, classNames, choiceAriaLabel, closeAriaLabel } = this.props;\n const items = this.selectedRefinersMap;\n this.payLoad.contentAction.etext = clearAllText;\n const clearAllAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n return (\n
    \n {items.length > 0 && label && {label}}\n
      \n {items.map((item: IRefinerMap) => {\n this.payLoad.contentAction.etext = item.key;\n const attribute = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n // Get range value for Range display and integer type only (not for Integer with TextBox(4) display)\n const rangeInteger =\n item.value.DataTypeValue === AttributeDataType.Integer &&\n item.rangeDisplayType &&\n item.rangeDisplayType === DisplayTemplate.Range &&\n item.value.RefinerRecordId !== 0;\n const newIntRange = rangeInteger\n ? item.key\n : item.value.LeftValueBoundString && item.value.LeftValueBoundLocalizedString === ''\n ? item.value.LeftValueBoundString\n : (item.value.LeftValueBoundLocalizedString || item.value.LeftValueBoundLocalizedString === undefined) &&\n item.value.RefinerRecordId === 0\n ? item.key\n : item.value.LeftValueBoundString;\n return (\n
    • \n \n {newIntRange}\n \n \n
    • \n );\n })}\n
    \n {items.length > 0 && clearAllText && (\n \n {clearAllText}\n \n )}\n
    \n );\n }\n\n private _getKeyForRefinerValue(productRefinerValue: ProductRefinerValue, index: string): string {\n const { choiceFormat, choiceRangeValueFormat, refinerHierarchy, telemetry, refinerValues } = this.props;\n const overallFormat = choiceFormat || '{1}';\n const rangeFormat = choiceRangeValueFormat;\n let refinerName = '';\n let parent: IProductRefinerHierarchy | undefined;\n if (refinerHierarchy && refinerHierarchy.find) {\n parent = refinerHierarchy.find(\n (hierarchy: IProductRefinerHierarchy) =>\n !!hierarchy.Values.find((value: ProductRefinerValue) => isMatchingRefinementCriterion(value, productRefinerValue))\n );\n\n if (!parent) {\n telemetry.warning('[choice-summary] could not find parent of selected refiner value');\n } else {\n refinerName = parent.KeyName || '';\n }\n }\n\n let refinerValueName: string;\n if (isRangeType(productRefinerValue.DataTypeValue)) {\n refinerValueName = rangeFormat\n .replace('{0}', this._formatPrice(productRefinerValue.LeftValueBoundString, productRefinerValue.UnitText))\n .replace('{1}', this._formatPrice(productRefinerValue.RightValueBoundString, productRefinerValue.UnitText));\n } else if (productRefinerValue.RefinerRecordId === 0) {\n const filterValue = refinerValues?.Values.find(\n refiner => refiner.LeftValueBoundString === productRefinerValue.LeftValueBoundString\n );\n refinerValueName = (filterValue ? filterValue.LeftValueBoundLocalizedString : productRefinerValue.LeftValueBoundString) || '';\n } else {\n refinerValueName = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n }\n\n if (refinerName === 'Rating' || refinerName === 'Price') {\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}`);\n }\n // Adding integer range format\n if (\n productRefinerValue.DataTypeValue === AttributeDataType.Integer &&\n parent?.DisplayTemplateValue === DisplayTemplate.Range &&\n productRefinerValue.RefinerRecordId !== 0\n ) {\n refinerValueName = getIntegerRangeName(productRefinerValue);\n return refinerValueName;\n }\n return overallFormat.replace('{0}', refinerName).replace('{1}', `${refinerValueName}_${refinerName}_${index}`);\n }\n\n private _formatPrice(amount: string | undefined, currency: string | undefined): string {\n if (!amount || !currency) {\n this.props.telemetry.trace('[choice-summary] could not format price');\n return amount || '';\n }\n let result = amount;\n\n try {\n result = this.props.context!.cultureFormatter.formatCurrency(Number(amount), currency);\n } catch (error) {\n this.props.telemetry.warning(`Failed to format price for ${result}: ${error}`);\n }\n\n return result;\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n e.stopPropagation();\n\n const target = e.currentTarget as HTMLElement;\n const clearAll = target.getAttribute('class')!.includes('choice-summary__clear-all');\n const selectedRefiner = clearAll ? undefined : this._getSelectedRefinerChoice(target);\n\n if (this.props.onChoiceClicked) {\n this.props.onChoiceClicked({\n clearAll,\n itemClicked: target,\n choiceClicked: selectedRefiner,\n nextItemToFocus: target.nextSibling as HTMLElement\n });\n }\n };\n\n private _getSelectedRefinerChoice(itemClicked: HTMLElement): ProductRefinerValue | undefined {\n const result = this.selectedRefinersMap.find(selected => itemClicked.id === selected.key);\n return (result && result.value) || 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 React from 'react';\n\ninterface IErrorMessage {\n text?: string;\n}\n\nexport const ErrorMessage: React.FC = ({ text }) => {\n return (\n \n
    \n {` `}\n {text}\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 { ICoreContext, IGridSettings, IImageData, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\n// Import { IComponent, IComponentProps, ICoreContext, IGridSettings, IImageData, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\n\ninterface IFeatureSearchResultItem {\n product: SimpleProduct | null;\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n telemetryContent?: ITelemetryContent;\n recommendation?: string;\n}\n\nexport const FeatureSearchResultItem: React.FC = ({\n product,\n context,\n imageSettings,\n resources,\n telemetryContent,\n recommendation\n}) => {\n if (product === null) {\n return null;\n }\n\n const productName = product.Name;\n const productRecordId = product && product.RecordId ? product.RecordId : 0;\n const productUrl = getProductPageUrlSync(product.Name || '', productRecordId, context && context.actionContext, undefined);\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const heading =\n recommendation && recommendation === 'descriptions' ? resources.featureSimilarDescriptionTitle : resources.featureSimilarLooksTitle;\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', telemetryContent!, productName!, productRecordId.toString());\n\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n
    \n \n
    \n {renderProductPlacementImage(\n imageSettings,\n context.request.gridSettings,\n product.PrimaryImageUrl,\n product.Name,\n fallbackImage,\n context.actionContext.requestContext\n )}\n
    \n \n
    \n

    {heading}

    \n {renderProductTitle(product?.Name)}\n
    \n
    \n );\n};\n\nfunction renderProductPlacementImage(\n imageSettings?: IImageSettings,\n gridSettings?: IGridSettings,\n imageUrl?: string,\n altText?: string,\n fallbackImage?: string,\n context?: IRequestContext\n): JSX.Element | null {\n if (!imageUrl || !gridSettings || !imageSettings) {\n return null;\n }\n const img: IImageData = {\n src: imageUrl,\n altText: altText ? altText : ''\n };\n const imageProps = {\n gridSettings,\n imageSettings,\n fallBackSrc: fallbackImage\n };\n return ;\n}\n\nfunction renderProductTitle(title?: string): JSX.Element | null {\n return

    {title}

    ;\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 ILink {\n className?: string;\n text?: string;\n href?: string;\n ariaLabel?: string;\n}\n\nexport const Link: React.FC = ({ text, className, href, ariaLabel }) => (\n \n {' '}\n {text}{' '}\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, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ISearchResultModalViewProps {\n modal: React.ReactElement;\n modalHeader: React.ReactElement;\n modalFooter: React.ReactElement;\n modalBody: React.ReactElement;\n}\n\ninterface IModalToggleProps {\n innerRef: React.RefObject | undefined;\n id: string;\n text: string;\n ariaLabel: string;\n onClick(): void;\n}\n\nexport interface ISearchResultModalResources {\n modalTitle: string;\n modalCloseButtonText: string;\n}\n\nexport interface ISearchResultModalProps {\n resources: ISearchResultModalResources;\n isOpen: boolean;\n returnRef: React.RefObject | undefined;\n onModalToggle(): void;\n}\n\nexport const ModalToggle: React.FC = (props: IModalToggleProps) => {\n const { text, onClick, ariaLabel, innerRef, id } = props;\n return (\n \n );\n};\n\nexport const SearchResultModal = (props: ISearchResultModalProps): ISearchResultModalViewProps => {\n return {\n modal: modalNode(props),\n modalHeader: modalHeaderNode(props),\n modalFooter: modalFooterNode(props),\n modalBody: \n };\n};\n\nconst modalNode = (props: ISearchResultModalProps) => {\n return (\n \n );\n};\n\nconst modalHeaderNode = (props: ISearchResultModalProps) => {\n return {props.resources.modalTitle};\n};\n\nconst modalFooterNode = (props: ISearchResultModalProps) => {\n return (\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 { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, IImageSettings } from '@msdyn365-commerce/core';\nimport { ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultContainerResources } from '../search-result-container.props.autogenerated';\n\ninterface IProductSearchResultItems {\n products: ProductSearchResult[];\n context: ICoreContext;\n resources: ISearchResultContainerResources;\n imageSettings?: IImageSettings;\n moduleType: string;\n moduleId: string;\n allowBackNavigation?: boolean;\n telemetryContent: ITelemetryContent;\n quickviewSlot?: {} | null | undefined;\n productComparisonButton?: {} | null | undefined;\n channelInventoryConfigurationId?: number;\n isPriceMinMaxEnabled?: boolean;\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\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 */\nexport function 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\nexport const ProductSearchResultItems: React.FC = ({\n products,\n context,\n imageSettings,\n resources,\n moduleType,\n moduleId,\n allowBackNavigation,\n telemetryContent,\n quickviewSlot,\n productComparisonButton,\n channelInventoryConfigurationId,\n isPriceMinMaxEnabled,\n productsDimensionAvailabilities\n}) => {\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return (\n
      \n {products.map((product: ProductSearchResult, index: number) => (\n
    • \n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === product.MasterProductId\n )}\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 { ISliderLabel, ISliderThumbProps, Slider } from '@msdyn365-commerce-modules/utilities';\nimport debounce from 'lodash/debounce';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IRefineItemProps, IRefineItemState } from './refine-item';\n\ntype InputType = 'Min' | 'Max';\n\nexport type RangeRefineItemType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemProps extends IRefineItemProps {\n rangeType: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n sliderKey?: string;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n touchedMin: boolean;\n touchedMax: boolean;\n sliderId: string;\n minValue: string | undefined;\n maxValue: string | undefined;\n labels: ISliderLabel[];\n sliderThumbs: ISliderThumbProps[];\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItem extends React.Component {\n private readonly _formattedPriceReverseLookup: Map = new Map();\n\n private readonly minInput: React.RefObject;\n\n private readonly maxInput: React.RefObject;\n\n @computed get currencyCode(): string {\n return this.props.productRefinerValue.UnitText || '';\n }\n\n public constructor(props: IRangeRefineItemProps) {\n super(props);\n this._onRangeUpdate = this._onRangeUpdate.bind(this);\n this._onRangeUpdateEnd = this._onRangeUpdateEnd.bind(this);\n this._handleRangeTooltipText = this._handleRangeTooltipText.bind(this);\n this._changeMin = this._changeMin.bind(this);\n this._changeMax = this._changeMax.bind(this);\n this._finishChangeMin = this._finishChangeMin.bind(this);\n this._finishChangeMax = this._finishChangeMax.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n\n const { selectedRefinementCriterion } = this.props;\n const initialMin = selectedRefinementCriterion?.LeftValueBoundString ?? '0';\n const initialMax = selectedRefinementCriterion?.RightValueBoundString;\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\n this.state = {\n isChecked: false,\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n touchedMin: false,\n touchedMax: false,\n sliderId,\n minValue,\n maxValue,\n labels,\n sliderThumbs\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemProps, nextState: IRangeRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemProps): void {\n if (previousProps !== this.props) {\n this.updateSliderProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n const { productRefinerValue, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerValue || !parentProductRefinerHierarchy) {\n refineItemCommonProps.telemetry.error(\n 'Cannot render refine value range without productRefinerValue and parentProductRefinerHierarchy'\n );\n return undefined;\n }\n\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n\n return this._renderSlider();\n }\n\n /**\n * Function to update slider props.\n */\n private updateSliderProps(): void {\n const sliderId = `slider_${String(this.props.parentProductRefinerHierarchy.RecordId)}_${String(\n this.props.productRefinerValue.RefinerRecordId\n )}`;\n const minValue = this.props.productRefinerValue.LeftValueBoundString;\n const maxValue = this.props.productRefinerValue.RightValueBoundString;\n const minPrice = this._formatPrice(minValue);\n const maxPrice = this._formatPrice(maxValue);\n const labels: ISliderLabel[] = this.getLabels(sliderId, minPrice, maxPrice);\n const selectedMin =\n this.props.selectedRefinementCriterion?.LeftValueBoundString ?? this.props.productRefinerValue.LeftValueBoundString ?? '0';\n const selectedMax =\n this.props.selectedRefinementCriterion?.RightValueBoundString ??\n this.props.productRefinerValue.RightValueBoundString ??\n maxValue;\n const selectedMinPrice = this._formatPrice(selectedMin);\n const selectedMaxPrice = this._formatPrice(selectedMax);\n const sliderKeyString = this.props.sliderKey ? `_${String(this.props.sliderKey)}` : '';\n const sliderThumbs: ISliderThumbProps[] = this.getSliderThumbs(\n sliderId,\n sliderKeyString,\n selectedMin,\n selectedMinPrice,\n selectedMax,\n selectedMaxPrice,\n maxPrice\n );\n this.setState({ sliderId, minValue, maxValue, labels, sliderThumbs });\n }\n\n /**\n * Function to create the labels for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param minPrice - Slider min value.\n * @param maxPrice - Slider max value.\n * @returns Array labels.\n */\n private readonly getLabels = (sliderId: string, minPrice: string, maxPrice: string): ISliderLabel[] => {\n return [\n {\n labelId: `${sliderId}_start`,\n labelString: `${minPrice}`,\n labelPositioning: 'start'\n },\n {\n labelId: `${sliderId}_end`,\n labelString: `${maxPrice}`,\n labelPositioning: 'end'\n }\n ];\n };\n\n /**\n * Function to create the slider thumbs for slider.\n * @param sliderId - Slider element id for the DOM.\n * @param sliderKey - Unique key for slider.\n * @param selectedMin - Slider selected min value.\n * @param selectedMinPrice - Slider selected min price.\n * @param selectedMax - Slider selected max value.\n * @param selectedMaxPrice - Slider selected max price..\n * @param maxPrice - Slider max price..\n * @returns Slider Thumb Props.\n */\n private readonly getSliderThumbs = (\n sliderId: string,\n sliderKey: string,\n selectedMin: string,\n selectedMinPrice: string,\n selectedMax: string | undefined,\n selectedMaxPrice: string,\n maxPrice: string\n ): ISliderThumbProps[] => {\n const sliderThumbDefaultValue = 0;\n return [\n {\n id: `${sliderId}${sliderKey}_slider_thumb_start`,\n value: (selectedMin && Number(selectedMin)) || sliderThumbDefaultValue,\n ariaLabel: `${this.props.minValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMinPrice}`\n },\n {\n id: `${sliderId}${sliderKey}_slider_thumb_end`,\n value: Number(selectedMax) || Number(maxPrice),\n ariaLabel: `${this.props.maxValueSliderThumbAriaLabel ?? ''} ${this.currencyCode}`,\n ariaValueText: `${selectedMaxPrice}`\n }\n ];\n };\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { selectedMin, selectedMax, touchedMin, touchedMax, validationErrorMin, validationErrorMax } = this.state;\n\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', parentProductRefinerHierarchy.KeyName || '');\n const formAttrs = {\n 'aria-label': rangeAriaLabel,\n 'aria-disabled': isDisabled\n };\n\n // To enable price formatting of selected fields, this is the approach:\n // initial value: min=0 formatted as price, max=undefined\n // onFocus/onChange: convert to number (unformat) and mark as touched to indicate value is being edited\n // onBlur: validate and format entered value as price\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\n const minLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-min';\n const maxLabelClassName = 'ms-refine-submenu__input-range-label refine-submenu__input-range-label-max';\n const formattedSelectedMin = this._getFormattedSelectedValue(selectedMin, touchedMin, validationErrorMin);\n const formattedSelectedMax = this._getFormattedSelectedValue(selectedMax, touchedMax, validationErrorMax);\n return (\n
    \n \n \n {validationErrorMin && (\n \n {validationErrorMin}\n \n )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \n )}\n
    \n );\n }\n\n private _renderSlider(): JSX.Element | undefined {\n const { isDisabled, sliderKey } = this.props;\n const ariaAttributes = {\n 'aria-disabled': isDisabled\n };\n\n return (\n \n );\n }\n\n private _changeMin(event: React.FocusEvent): void {\n this._changeValue(event, 'Min');\n }\n\n private _changeMax(event: React.FocusEvent): void {\n this._changeValue(event, 'Max');\n }\n\n private _changeValue(event: React.FocusEvent, inputType: InputType): void {\n const selectedKey = `selected${inputType}`;\n const touchedKey = `touched${inputType}`;\n this.setState({\n [selectedKey]: this._getInputWithoutFormatting(event.currentTarget.value),\n [touchedKey]: true\n });\n }\n\n private _finishChangeMin(event: React.FocusEvent): boolean {\n const selectedMinValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = this.props;\n const max = (selectedRefinementCriterion && selectedRefinementCriterion.RightValueBoundString) || undefined;\n\n const maxNum = max ? Number(max) : undefined;\n\n if (isNaN(minInput)) {\n this.setState({ validationErrorMin: refineItemCommonProps.validationErrorNaN });\n this._focus('Min');\n return false;\n }\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minInput,\n rangeEnd: maxNum\n });\n return true;\n }\n this._focus('Min');\n\n return false;\n }\n\n private _finishChangeMax(event: React.FocusEvent): boolean {\n const selectedMaxValue = this._getInputWithoutFormatting(event.currentTarget.value);\n this.setState({\n selectedMax: selectedMaxValue,\n maxTouched: false\n });\n const maxInput = Number(selectedMaxValue);\n const {\n onToggle,\n parentProductRefinerHierarchy,\n productRefinerValue,\n refineItemCommonProps,\n selectedRefinementCriterion\n } = this.props;\n const min = (selectedRefinementCriterion && selectedRefinementCriterion.LeftValueBoundString) || '0';\n\n const minNum = Number(min);\n\n if (isNaN(maxInput)) {\n this.setState({ validationErrorMax: refineItemCommonProps.validationErrorNaN });\n this._focus('Max');\n return false;\n }\n\n if (this._validateRange(minNum, maxInput)) {\n if (productRefinerValue) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: minNum,\n rangeEnd: maxInput\n });\n } else {\n this._focus('Max');\n }\n return true;\n }\n\n return false;\n }\n\n private _focus(inputType: InputType): void {\n const ref = inputType === 'Max' ? this.maxInput : this.minInput;\n\n setTimeout(() => {\n if (ref && ref.current) {\n ref.current.focus();\n }\n }, 50);\n }\n\n private _getFormattedSelectedValue(\n selected: string | undefined,\n touched: boolean,\n validationError: string | undefined\n ): string | undefined {\n if (touched || validationError || selected === undefined) {\n return selected;\n }\n return this._formatPrice(selected);\n }\n\n private _validateRange(min: number, max: number | undefined): boolean {\n const { refineItemCommonProps } = this.props;\n if (max === undefined) {\n return true;\n }\n\n if (min > max) {\n this.setState({\n validationErrorMin: refineItemCommonProps.validationErrorRange,\n validationErrorMax: refineItemCommonProps.validationErrorRange\n });\n return false;\n }\n\n return true;\n }\n\n private _formatPrice(amount: string | undefined): string {\n if (this.props.productRefinerValue.RefinerRecordId === 0) {\n const result = this.props.context.cultureFormatter.formatCurrency(Number(amount), this.currencyCode);\n return result;\n }\n return amount || '';\n }\n\n private _getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNum = Number(input);\n if (!isNaN(inputAsNum)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\n return reverseLookupResult || input;\n }\n\n // NOTE: Fix types once Shared Components build pipeline bug fixed\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onRangeUpdate(sliderChangeNotification: any): void {\n // Need to filter out mousemove events as these cause errors after the menu updates and slider re-renders\n if (sliderChangeNotification.eventType !== 'mousemove') {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _onRangeUpdateEnd(sliderChangeNotification: any): void {\n const { onToggle, parentProductRefinerHierarchy, productRefinerValue } = this.props;\n if (productRefinerValue && sliderChangeNotification) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true,\n rangeStart: sliderChangeNotification.firstThumbValue,\n rangeEnd: sliderChangeNotification.secondThumbValue\n });\n\n this._focusOnSliderThumb(sliderChangeNotification);\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private _focusOnSliderThumb(sliderChangeNotification: any): void {\n if (sliderChangeNotification.id) {\n const element = document.getElementById(`${sliderChangeNotification.id}range`);\n if (element) {\n setTimeout(() => {\n element.focus();\n }, 0);\n }\n }\n }\n\n private _handleRangeTooltipText(tooltip: number): string {\n return this._formatPrice(`${tooltip}`);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { RatingComponent, SwatchComponent } from '@msdyn365-commerce/components';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} from '@msdyn365-commerce/retail-proxy';\nimport { checkIfShouldDisplayAsSwatch, DimensionTypes, IDimensionsApp, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { getIntegerRangeName, isSingleSelectRangeTypeIntegerSelected } from './utilities';\n\n/**\n * RefineItem properties.\n */\nexport interface IRefineItemProps {\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n productRefinerValue: ProductRefinerValue;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n selectedRefinerValues?: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n index?: number;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n refineItemAriaLabel?: string;\n refineItemsAriaLabel?: string;\n isMobileView?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onToggle(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine item state.\n */\nexport interface IRefineItemState extends React.ComponentState {\n isChecked: boolean;\n renderingError?: object;\n}\n\n/**\n * Single-select and multi-select refine item component (controlled by RefineSubmenu).\n */\nexport default class RefineItem extends React.Component {\n private readonly anchorType: React.RefObject;\n\n private readonly payLoad: IPayLoad;\n\n public constructor(props: IRefineItemProps) {\n super(props);\n this._onClick = this._onClick.bind(this);\n this.state = {\n isChecked: !!this.props.selectedRefinementCriterion\n };\n this.anchorType = React.createRef();\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, '');\n }\n\n public shouldComponentUpdate(nextProps: IRefineItemProps, nextState: IRefineItemState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | undefined {\n const {\n isDisabled,\n refineItemCommonProps,\n parentProductRefinerHierarchy,\n productRefinerValue,\n selectedRefinementCriterion,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n index,\n children,\n onToggle,\n context,\n telemetryContent,\n refineItemAriaLabel,\n refineItemsAriaLabel,\n ...attrs\n } = this.props;\n if (!productRefinerValue) {\n refineItemCommonProps.telemetry.error('[refine-item] Cannot render refineItem without productRefinerValue');\n return undefined;\n }\n if (!productRefinerValue.LeftValueBoundString) {\n refineItemCommonProps.telemetry.warning(\n `[refine-item] RefineItem without LeftValueBoundString: ${JSON.stringify(productRefinerValue)}`\n );\n }\n const isSingleSelect = parentProductRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect;\n let itemTypeClassName = isSingleSelect ? 'single-select' : 'multi-select';\n itemTypeClassName = `ms-refine-submenu-item ${itemTypeClassName}`;\n const inputType = isSingleSelect ? 'radio' : 'checkbox';\n const isChecked = !!selectedRefinementCriterion;\n itemTypeClassName = isChecked ? `${itemTypeClassName}-checked` : itemTypeClassName;\n if (parentProductRefinerHierarchy.SourceValue === ProductRefinerSource.Rating) {\n return this._renderRating(\n productRefinerValue,\n parentProductRefinerHierarchy,\n isChecked,\n context,\n index,\n telemetryContent,\n productCountAriaLabel,\n singleProductCountAriaLabel\n );\n }\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString ?? productRefinerValue.LeftValueBoundString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const productText = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const productCount = productRefinerValue.Count || 0;\n let refineMenuItemAriaLabel;\n if (productCount === 1) {\n refineMenuItemAriaLabel = refineItemAriaLabel\n ? format(refineItemAriaLabel, parentProductRefinerHierarchy.KeyName, productText)\n : '';\n } else {\n refineMenuItemAriaLabel = refineItemsAriaLabel\n ? format(refineItemsAriaLabel, parentProductRefinerHierarchy.KeyName, productText, productCount)\n : '';\n }\n\n const dimensionType = (this.props.parentProductRefinerHierarchy.KeyName?.toLocaleLowerCase() ?? '') as DimensionTypes;\n const shouldDisplayAsSwatch = this._getShouldDisplayAsSwatch(dimensionType);\n\n let className = 'ms-refine-submenu-item';\n if (shouldDisplayAsSwatch) {\n className = classnames(className, `ms-refine-submenu-item__dimension__${dimensionType}`);\n }\n\n // If the swatch has no color or image specified, it should be displayed as text.\n // We don't use swatch logic to display the number of the results found together with the text.\n const hasColor = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchColorHexCode);\n const hasImage = !StringExtensions.isNullOrWhitespace(productRefinerValue.SwatchImageUrl);\n const hasContentSwatch = hasColor || hasImage;\n if (\n parentProductRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n parentProductRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n const rangeValue = getIntegerRangeName(productRefinerValue);\n return (\n
  • \n \n \n \n
  • \n );\n } else {\n return (\n
  • \n \n {hasContentSwatch && shouldDisplayAsSwatch && this._renderSwatch(dimensionType)}\n \n \n
  • \n );\n }\n }\n\n private _getShouldDisplayAsSwatch(dimensionType: DimensionTypes) {\n const shouldDisplayAsSwatch = checkIfShouldDisplayAsSwatch(dimensionType, this.props.context as ICoreContext);\n return shouldDisplayAsSwatch;\n }\n\n private _renderSwatch(dimensionType: DimensionTypes): JSX.Element | null {\n const productRefinerValue = this.props.productRefinerValue;\n\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const text = productRefinerValue.LeftValueBoundLocalizedString || productRefinerValue.LeftValueBoundString || '';\n const swatchItems = [\n {\n itemId: `${productRefinerValue.RefinerRecordId ?? ''}-${dimensionType}-${text}`,\n value: text,\n dimensionType,\n colorHexCode: productRefinerValue.SwatchColorHexCode,\n imageUrl: productRefinerValue.SwatchImageUrl\n }\n ];\n\n return (\n \n );\n }\n\n private _getRefinerUrl(): string {\n const { urlBuilder, parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n\n if (productRefinerValue) {\n return urlBuilder({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n }\n\n return '';\n }\n\n private readonly _onClick = (e: React.MouseEvent): void => {\n e.preventDefault();\n\n const { parentProductRefinerHierarchy, productRefinerValue, selectedRefinementCriterion } = this.props;\n if (productRefinerValue) {\n this.props.onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: !selectedRefinementCriterion\n });\n\n setTimeout(() => {\n this.anchorType.current && this.anchorType.current.focus();\n }, 0);\n }\n };\n\n private _renderRating(\n productRefinerValue: ProductRefinerValue,\n parentProductRefinerHierarchy: IProductRefinerHierarchy,\n isChecked: boolean,\n context: ICoreContext,\n index?: number,\n telemetryContent?: ITelemetryContent,\n ratingUserCountAriaLabel?: string,\n ratingSingleUserCountAriaLabel?: string\n ): JSX.Element | undefined {\n if (productRefinerValue.LeftValueBoundString) {\n this.payLoad.contentAction.etext = productRefinerValue.LeftValueBoundLocalizedString;\n const attribute = getTelemetryAttributes(telemetryContent!, this.payLoad);\n const refinerRating = Number.parseInt(productRefinerValue.LeftValueBoundString, 10);\n const ratingRefiner = this.props.selectedRefinerValues?.find(\n value => value.DataTypeValue === productRefinerValue.DataTypeValue\n );\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- Replace with actual value for empty string.\n const selectedRating = Number.parseInt(ratingRefiner?.LeftValueBoundString || '0', 10);\n const defaultChkProductCount = 1;\n let ratingComponentClass: string = 'ms-rating-component';\n if (refinerRating > selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__up`;\n } else if (refinerRating < selectedRating) {\n ratingComponentClass = `${ratingComponentClass}__down`;\n } else {\n ratingComponentClass = `${ratingComponentClass}__current`;\n }\n const productCountAriaLabelValue =\n productRefinerValue.Count !== undefined && productRefinerValue.Count === defaultChkProductCount\n ? ratingSingleUserCountAriaLabel && format(ratingSingleUserCountAriaLabel, productRefinerValue.Count)\n : ratingUserCountAriaLabel && format(ratingUserCountAriaLabel, productRefinerValue.Count);\n return (\n \n \n \n \n {productRefinerValue.Count !== undefined && `(${productRefinerValue.Count})`}\n \n \n \n );\n }\n return 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 { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { isUndefined } from 'lodash';\nimport { ProductRefinerValue } from '@msdyn365-commerce/retail-proxy';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IRefineItemState } from './refine-item';\nimport { isCustomRangeTypeIntegerSelected } from './utilities';\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\n\nexport type RangeRefineItemInputType = 'slider' | 'input';\n\n/**\n * Range refine item properties.\n */\nexport interface IRangeRefineItemInputProps {\n parentProductRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinementCriterion: ProductRefinerValue | undefined;\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n rangeType: RangeRefineItemInputType;\n\n /**\n * The telemetry content\n */\n onToggle(notfication: Readonly): void;\n}\n\n/**\n * Range refine item state.\n */\nexport interface IRangeRefineItemInputState extends IRefineItemState {\n validationErrorMin: string | undefined;\n validationErrorMax: string | undefined;\n selectedMin: string | undefined;\n selectedMax: string | undefined;\n invalidData: boolean | undefined;\n}\n\n/**\n * RangeRefineItem component (controlled by RefineSubmenu).\n */\n@observer\nexport default class RangeRefineItemInput extends React.Component {\n private readonly _formattedPriceReverseLookup: Map = new Map();\n\n private readonly minInput: React.RefObject;\n\n private readonly maxInput: React.RefObject;\n\n public constructor(props: IRangeRefineItemInputProps) {\n super(props);\n this._changeMinInputRange = this._changeMinInputRange.bind(this);\n this._changeMaxInputRange = this._changeMaxInputRange.bind(this);\n this._applyCustom = this._applyCustom.bind(this);\n\n this.minInput = React.createRef();\n this.maxInput = React.createRef();\n let initialMin = '';\n let initialMax = '';\n const { selectedRefinementCriterion, parentProductRefinerHierarchy } = this.props;\n if (selectedRefinementCriterion) {\n initialMin = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.LeftValueBoundString || '';\n initialMax = isCustomRangeTypeIntegerSelected(selectedRefinementCriterion, parentProductRefinerHierarchy)\n ? ''\n : selectedRefinementCriterion?.RightValueBoundString || '';\n }\n\n this.state = {\n validationErrorMin: undefined,\n validationErrorMax: undefined,\n selectedMin: initialMin,\n selectedMax: initialMax,\n invalidData: !(initialMin && initialMax),\n isChecked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: IRangeRefineItemInputProps, nextState: IRangeRefineItemInputState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n nextState.invalidData = !(nextState.selectedMin && nextState.selectedMax);\n return true;\n }\n\n public componentDidUpdate(previousProps: IRangeRefineItemInputProps): void {\n if (previousProps !== this.props) {\n this.updateInputRangerProps();\n }\n }\n\n public render(): JSX.Element | undefined {\n if (this.props.rangeType === 'input') {\n return this._renderInputFields();\n }\n return undefined;\n }\n\n // /**\n // * Function to update slider props.\n // */\n private updateInputRangerProps(): void {\n const selectedMin = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.LeftValueBoundString;\n const selectedMax = !isUndefined(this.props.selectedRefinementCriterion?.RowNumber)\n ? ''\n : this.props.selectedRefinementCriterion?.RightValueBoundString;\n this.setState({ selectedMin, selectedMax });\n }\n\n private _renderInputFields(): JSX.Element | undefined {\n const { isDisabled, parentProductRefinerHierarchy, refineItemCommonProps } = this.props;\n const { validationErrorMin, validationErrorMax } = this.state;\n\n const rangeAriaLabel = (refineItemCommonProps.rangeNameFormat || '{0}').replace('{0}', parentProductRefinerHierarchy.KeyName || '');\n const formAttrs = {\n 'aria-label': rangeAriaLabel,\n 'aria-disabled': isDisabled\n };\n\n const minInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-min ${\n validationErrorMin ? 'refine-submenu__input-range--error' : ''\n }`;\n const maxInputClassName = `ms-refine-submenu__input-range refine-submenu__input-range-max ${\n validationErrorMax ? 'refine-submenu__input-range--error' : ''\n }`;\n return (\n
  • \n
    \n
    \n \n {' - '}\n \n {validationErrorMin && (\n \n {validationErrorMin}\n \n )}\n {validationErrorMax && validationErrorMin !== validationErrorMax && (\n \n {validationErrorMax}\n \n )}\n
    \n
    \n \n
    \n
    \n
  • \n );\n }\n\n private _applyCustom(event: React.MouseEvent): void {\n const selectedMinValue = this._getInputWithoutFormatting(this.state.selectedMin || '');\n this.setState({\n selectedMin: selectedMinValue,\n minTouched: false\n });\n const minInput = Number(selectedMinValue);\n const { onToggle, parentProductRefinerHierarchy } = this.props;\n const max = this.state.selectedMax;\n\n const maxNum = max ? Number(max) : undefined;\n const productRefinerValue: ProductRefinerValue = {\n RefinerRecordId: parentProductRefinerHierarchy.Values[0].RefinerRecordId,\n LeftValueBoundString: this.state.selectedMin,\n RightValueBoundString: this.state.selectedMax,\n DataTypeValue: parentProductRefinerHierarchy.DataTypeValue,\n RefinerSourceValue: parentProductRefinerHierarchy.Values[0].RefinerSourceValue\n };\n\n if (this._validateRange(minInput, maxNum)) {\n onToggle({\n parentProductRefinerHierarchy,\n productRefinerValue,\n isSelecting: true\n });\n }\n }\n\n private _changeMinInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMin: event.target.value.trim()\n });\n }\n\n private _changeMaxInputRange(event: React.ChangeEvent): void {\n this.setState({\n selectedMax: event.target.value.trim()\n });\n }\n\n private _validateRange(min: number, max: number | undefined): boolean {\n const { refineItemCommonProps } = this.props;\n if (max === undefined) {\n return true;\n }\n\n if (min > max) {\n this.setState({\n validationErrorMin: refineItemCommonProps.validationErrorRange,\n validationErrorMax: refineItemCommonProps.validationErrorRange\n });\n return false;\n }\n\n return true;\n }\n\n private _getInputWithoutFormatting(input: string): string {\n // First try to cast raw input to a number\n const inputAsNum = Number(input);\n if (!isNaN(inputAsNum)) {\n return input;\n }\n\n // Otherwise try a reverse lookup and fall back to the raw input if all else fails\n const reverseLookupResult = this._formattedPriceReverseLookup.get(input);\n return reverseLookupResult || input;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport {\n AttributeDataType,\n DisplayTemplate,\n ProductRefinerSource,\n ProductRefinerValue,\n RefinerType\n} from '@msdyn365-commerce/retail-proxy';\nimport { Button, Collapse, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport RangeRefineItem, { RangeRefineItemType } from './range-refine-item';\nimport RefineItem from './refine-item';\nimport { IRefineItemCommonProps } from './refine-item.props.common';\nimport { IRefineItemToggleNotification } from './refine-item-toggle-notification';\nimport { findMatchingRefinementCriterion, isRangeTypeForInteger } from './utilities';\nimport RangeRefineItemInput from './range-refine-item-input';\n\n/**\n * Properties associated with the RefineSubmenu component.\n */\nexport interface IRefineSubmenuProps {\n tempRangeTypeTODO: RangeRefineItemType;\n minValueSliderThumbAriaLabel?: string;\n maxValueSliderThumbAriaLabel?: string;\n productRefinerHierarchy: IProductRefinerHierarchy;\n selectedRefinerValues: ProductRefinerValue[];\n refineItemCommonProps: IRefineItemCommonProps;\n isDisabled: boolean;\n isExpandedOnInitialLoad: boolean;\n context: ICoreContext>;\n moduleId: string;\n moduleTypeName: string;\n productCountAriaLabel?: string;\n singleProductCountAriaLabel?: string;\n refineItemAriaLabel?: string;\n refineItemsAriaLabel?: string;\n isMobile?: boolean;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onUpdateRefiners(notfication: Readonly): void;\n urlBuilder(refiner: IRefineItemToggleNotification): string;\n}\n\n/**\n * Refine submenu state.\n */\nexport interface IRefineSubmenuState extends React.ComponentState {\n expanded: boolean;\n}\n\n/**\n *\n * The RefineSubmenu component renders the submenu category and child items.\n * This computed observes the stateful category hierarchy object.\n * @extends {React.PureComponent}\n */\nclass RefineSubmenu extends React.Component {\n constructor(props: IRefineSubmenuProps) {\n super(props);\n\n this._onToggleItem = this._onToggleItem.bind(this);\n this._onToggleSubmenu = this._onToggleSubmenu.bind(this);\n\n const isExpanded = this.props.isExpandedOnInitialLoad;\n\n this.state = {\n expanded: isExpanded\n };\n }\n\n public shouldComponentUpdate(nextProps: IRefineSubmenuProps, nextState: IRefineSubmenuState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { productRefinerHierarchy, refineItemCommonProps } = this.props;\n\n if (!productRefinerHierarchy) {\n refineItemCommonProps.telemetry.error('Cannot render submenu without refiner hierarchy data');\n }\n\n if (productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating && this.props.context.app.config.hideRating) {\n return null;\n }\n\n const className = classnames(\n 'ms-refine-submenu',\n 'list-group',\n productRefinerHierarchy.KeyName // Deprecated because of the localization issues. Leaving for backward compatibility reasons.\n );\n\n return (\n
    \n \n {productRefinerHierarchy.KeyName}\n \n \n {this._renderChildItems(productRefinerHierarchy)}\n \n
    \n );\n }\n\n private _renderChildItems(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n if (\n productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range\n ) {\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n // Check if is of integer range type\n if (isRangeTypeForInteger(productRefinerHierarchy.DataTypeValue)) {\n return this._renderRange(productRefinerHierarchy);\n }\n return this._renderSingleMultiSelect(productRefinerHierarchy);\n }\n\n private _renderSingleMultiSelect(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n productCountAriaLabel,\n singleProductCountAriaLabel,\n refineItemAriaLabel,\n refineItemsAriaLabel,\n isMobile\n } = this.props;\n const isSingleSelect =\n productRefinerHierarchy.RefinerTypeValue === RefinerType.SingleSelect &&\n productRefinerHierarchy.SourceValue === ProductRefinerSource.Rating;\n const role = isSingleSelect ? { role: 'listbox' } : undefined;\n let selectedRefinementCriterion: ProductRefinerValue | undefined = {};\n const refinerValuesList = productRefinerHierarchy.Values || [];\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `[refine-submenu] Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n return (\n \n refinerValuesList.find(value => value.RefinerRecordId === selectedValue.RefinerRecordId)\n )}\n refineItemCommonProps={refineItemCommonProps}\n onToggle={this._onToggleItem}\n urlBuilder={this.props.urlBuilder}\n isDisabled={isDisabled}\n key={index}\n index={index}\n context={context}\n moduleId={this.props.moduleId}\n moduleTypeName={this.props.moduleTypeName}\n telemetryContent={this.props.telemetryContent}\n productCountAriaLabel={productCountAriaLabel}\n refineItemAriaLabel={refineItemAriaLabel}\n refineItemsAriaLabel={refineItemsAriaLabel}\n singleProductCountAriaLabel={singleProductCountAriaLabel}\n isMobileView={isMobile}\n />\n );\n });\n return (\n \n {listItems}\n {productRefinerHierarchy.DataTypeValue === AttributeDataType.Integer &&\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range && (\n \n )}\n \n );\n }\n\n private _getRangeType(productRefinerHierarchy: IProductRefinerHierarchy): 'input' | 'slider' {\n if (\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Range ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.Slider ||\n productRefinerHierarchy.DisplayTemplateValue === DisplayTemplate.SliderWithBars\n ) {\n return 'slider';\n }\n return 'input';\n }\n\n private _renderRange(productRefinerHierarchy: IProductRefinerHierarchy): JSX.Element | null {\n const {\n isDisabled,\n refineItemCommonProps,\n selectedRefinerValues,\n context,\n minValueSliderThumbAriaLabel,\n maxValueSliderThumbAriaLabel\n } = this.props;\n const submenuClassNamePrefix = 'ms-refine-submenu__item list-group-item refine-submenu__item';\n const refinerValuesList = productRefinerHierarchy.Values || [];\n const listItems = refinerValuesList.map((child: ProductRefinerValue, index: number) => {\n if (!child) {\n refineItemCommonProps.telemetry.error(\n `Could not render refine item for refiner ${productRefinerHierarchy.RecordId} (${productRefinerHierarchy.KeyName})`\n );\n return null;\n }\n\n const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n\n const rangeType = this._getRangeType(productRefinerHierarchy);\n const key = selectedRefinementCriterion\n ? `${selectedRefinementCriterion.LeftValueBoundString}-${selectedRefinementCriterion.RightValueBoundString}`\n : `not-selected-${index}`;\n return (\n
  • \n \n
  • \n );\n });\n return
      {listItems}
    ;\n }\n\n private _onToggleItem(itemToggleNotification: IRefineItemToggleNotification): void {\n this.props.onUpdateRefiners(itemToggleNotification);\n }\n\n private _onToggleSubmenu(): void {\n this.setState(prevState => ({\n expanded: !prevState.expanded\n }));\n }\n}\n\nexport default RefineSubmenu;\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 ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => (\n \n {` `}\n {separator}\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 * as React from 'react';\n\ninterface ITitle {\n className: string;\n text: string;\n}\n\nexport const Title: React.FC = ({ text, className }) => (\n \n {` `}\n {text}\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 CategoryHierarchy as CategoryHierarchyData,\n IProductRefinerHierarchy,\n IProductsDimensionsAvailabilities\n} from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { getCatalogId, ICoreContext } from '@msdyn365-commerce/core';\nimport {\n ChannelInventoryConfiguration,\n format,\n ProductPrice,\n ProductRefinerValue,\n SortColumn,\n StoreOperationsDataActions,\n TextValueTranslation\n} from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n PriceForProductSearchResultInput,\n ObjectExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption,\n IModuleProps,\n INodeProps,\n isMobile,\n ITelemetryContent,\n LabeledDropdown,\n UncontrolledPagination,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, transaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n buildListPageUrl,\n getCollectionProducts,\n getCollectionRefinersAction,\n getCurrentUrl,\n GetFullProductsByCollectionInput,\n IFullProductsSearchResultsWithCount,\n parseQueryParam,\n ProductListInventoryFilteringOptions,\n RefinersByCollectionInput,\n sortOptions\n} from './actions';\nimport { hydrateRefinersFromUrl } from './actions/url-utils';\nimport {\n ErrorMessage,\n FeatureSearchResultItem,\n getUpdatedRefinementCriteria,\n IChoiceSummaryClickNotification,\n IRefineItemCommonProps,\n IRefineItemToggleNotification,\n ISearchResultModalViewProps,\n isMatchingRefinementCriterion,\n Link,\n ModalToggle,\n ProductSearchResultItems,\n SearchResultModal,\n Separator,\n Title\n} from './components';\nimport ChoiceSummary from './components/choice-summary';\nimport RefineSubmenu from './components/refine-submenu';\nimport { ListPageState } from './list-page-state';\nimport { ISearchResultContainerData } from './search-result-container.data';\nimport { expandRefinersCount, ISearchResultContainerProps } from './search-result-container.props.autogenerated';\n\nexport interface ISearchResultContainerViewProps extends ISearchResultContainerProps {\n products?: React.ReactNode;\n className?: string;\n SearchResultContainer: IModuleProps;\n TitleViewProps: ITitleViewProps;\n categoryHierarchy: ICategoryHierarchyViewProps;\n pagination?: React.ReactNode;\n ProductsContainer: INodeProps;\n ProductSectionContainer: INodeProps;\n refineMenu: IRefineMenuViewProps;\n sortByOptions: ISortByViewProps;\n choiceSummary?: React.ReactNode;\n modalToggle: React.ReactNode;\n searchResultModal: ISearchResultModalViewProps;\n isMobile: boolean;\n CategoryNavContainer: INodeProps;\n RefineAndProductSectionContainer: INodeProps;\n errorMessage: React.ReactNode;\n FeatureSearchContainer: INodeProps;\n similarLookProduct?: React.ReactNode;\n productPrices?: ProductPrice[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\nexport interface ITitleViewProps {\n TitleContainer: INodeProps;\n title: ISearchResultTitle;\n}\n\nexport interface IRefineMenuViewProps {\n RefineMenuContainer: INodeProps;\n RefinerSectionContainer: INodeProps;\n refiners?: React.ReactNode[];\n}\n\nexport interface ICategoryHierarchyViewProps {\n categoryHierarchyList?: React.ReactNode[];\n categoryHierarchySeparator?: React.ReactNode;\n CategoryHierarchyContainer: INodeProps;\n}\n\nexport interface ISortByViewProps {\n SortingContainer: INodeProps;\n sortByDropDown?: React.ReactNode;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Title component for search result container.\n */\nexport interface ISearchResultTitle {\n titlePrefix?: React.ReactNode;\n titleText?: React.ReactNode;\n titleCount?: React.ReactNode;\n}\n\nexport interface ISearchResultContainerState {\n sortingState: ISortByCollectionState;\n modalIsOpen: boolean;\n refiners: IProductRefinerHierarchy[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n channelInventoryConfiguration?: ChannelInventoryConfiguration;\n}\n\ninterface ISortByCollectionState {\n selectedSortByOption: ILabeledDropdownOption;\n pending: boolean;\n}\n\n/**\n *\n * SearchResultContainer component.\n * @extends {React.PureComponent>}\n */\n@observer\nexport default class SearchResultContainer extends React.PureComponent<\n ISearchResultContainerProps,\n ISearchResultContainerState\n> {\n @computed get isMobile(): boolean {\n return this._viewport === 'xs' || this._viewport === 'sm';\n }\n\n private readonly sortByDropdownOptions: ILabeledDropdownOption[] = [\n { key: sortOptions.sortByOptionRelevanceDesc, value: this.props.resources.sortByOptionRelevanceDesc },\n { key: sortOptions.sortByOptionNameAsc, value: this.props.resources.sortByOptionNameAsc },\n { key: sortOptions.sortByOptionNameDesc, value: this.props.resources.sortByOptionNameDesc },\n { key: sortOptions.sortByOptionPriceAsc, value: this.props.resources.sortByOptionPriceAsc },\n { key: sortOptions.sortByOptionPriceDesc, value: this.props.resources.sortByOptionPriceDesc },\n { key: sortOptions.sortByOptionRatingDesc, value: this.props.resources.sortByOptionRatingDesc },\n { key: sortOptions.sortByOptionBestSelling, value: this.props.resources.sortByOptionBestSelling },\n { key: sortOptions.sortByOptionNewScore, value: this.props.resources.sortByOptionNewScore },\n { key: sortOptions.sortByOptionTrendingScore, value: this.props.resources.sortByOptionTrendingScore }\n ];\n\n private readonly _refineItemCommonProps: IRefineItemCommonProps;\n\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n\n @observable\n private _viewport: GridSize = 'lg';\n\n private readonly _modalToggleRef: React.RefObject;\n\n private readonly _sortAndFilterContainerRef: React.RefObject;\n\n private expandrefinerCount: number | undefined = 0;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n private readonly defaultPageNumber = 0;\n\n private readonly catalogId = getCatalogId(this.props.context.request);\n\n private isListPageStateUpdated: boolean = false;\n\n private _isMounted: boolean = false;\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation?.Text;\n }\n\n public constructor(props: ISearchResultContainerProps, state: ISearchResultContainerState) {\n super(props);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Check required.\n this._viewport = props.context.request?.device?.Type === 'Mobile' ? 'xs' : 'lg';\n this._modalToggleRef = React.createRef();\n this._sortAndFilterContainerRef = React.createRef();\n this._toggleModal = this._toggleModal.bind(this);\n this._updateViewport = this._updateViewport.bind(this);\n this.productPrices = [];\n this.state = {\n sortingState: {\n pending: false,\n selectedSortByOption: this.sortByDropdownOptions[0]\n },\n modalIsOpen: false,\n refiners: [],\n channelInventoryConfiguration: undefined\n };\n const { placeholderTextMax, minLabel, maxLabel, rangeNameFormat } = this.props.resources;\n\n const locale = this.props.context.request.locale;\n const telemetry = this.props.telemetry;\n const validationErrorNaN = this.props.resources.validationErrorNotNumber;\n const validationErrorRange = this.props.resources.validationErrorNotRange;\n this._refineItemCommonProps = {\n telemetry,\n locale,\n placeholderTextMax,\n minLabel,\n maxLabel,\n rangeNameFormat,\n validationErrorNaN,\n validationErrorRange\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this._updateViewport();\n }\n public async componentDidMount(): Promise {\n this._isMounted = true;\n if (MsDyn365.isBrowser && window.addEventListener) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n\n const listPageState = await this.props.data.listPageState;\n const products = await this.props.data.products;\n const channelInventoryConfiguration = await StoreOperationsDataActions.getInventoryConfigurationAsync({\n callerContext: this.props.context.actionContext\n });\n if (this._isMounted) {\n this.setState({ channelInventoryConfiguration });\n }\n\n this._updateListPageState(listPageState, products);\n\n // Initialize reaction based on listPageState properties\n reaction(\n () => {\n return [\n listPageState.activeFilters?.length,\n listPageState.currentPageNumber,\n ArrayExtensions.hasElements(listPageState.sortingCritera?.Columns)\n ];\n },\n async () => {\n const newListPageState = await this.props.data.listPageState;\n const input = new GetFullProductsByCollectionInput(\n newListPageState.pageType,\n this.props.context.request.apiSettings,\n {\n Paging: {\n Top: this.props.config.itemsPerPage,\n Skip: Math.max(newListPageState.pageSize * (newListPageState.currentPageNumber ?? 0), 0)\n },\n count: true,\n Sorting: newListPageState.sortingCritera ?? {}\n },\n newListPageState.activeFilters ?? [],\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\n +(this.props.context.request.urlTokens.recordId || 0),\n\n // eslint-disable-next-line max-len -- existing code\n this.props.context.request.query?.q\n ? this.props.context.request.query.q\n : JSON.stringify({\n ProductId: this.props.context.request.query?.productId,\n Recommendation: this.props.context.request.query?.recommendation\n }),\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Required check.\n !!this.props?.config?.includeAttributes,\n this.props.config.updateRefinerPanel,\n this.props.context.request.locale,\n this.catalogId,\n channelInventoryConfiguration\n );\n\n const productResults = await getCollectionProducts(input, this.props.context.actionContext);\n newListPageState.totalProductCount = productResults.count;\n newListPageState.activeProducts = productResults.products;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- check is required.\n if (\n this.props.config.enableAffiliationBasedPricing &&\n this.props.context.actionContext.requestContext?.user?.isAuthenticated\n ) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\n this._getActivePrice();\n }\n\n await this._updateVariantAvailability();\n\n if (this.props.config.updateRefinerPanel) {\n const refinerInput = new RefinersByCollectionInput(\n newListPageState.pageType,\n this.props.context.request.apiSettings,\n {\n Paging: {\n Top: this.props.config.itemsPerPage,\n Skip: Math.max(\n newListPageState.pageSize * (newListPageState.currentPageNumber ?? this.defaultPageNumber),\n this.defaultPageNumber\n )\n },\n count: true,\n Sorting: newListPageState.sortingCritera ?? {}\n },\n newListPageState.activeFilters ?? [],\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- RecordId is string. Check required.\n +(this.props.context.request.urlTokens.recordId || 0),\n this.props.context.request.query?.q\n ? this.props.context.request.query.q\n : this.props.context.request.query?.productId,\n false,\n this.props.config.updateRefinerPanel,\n undefined,\n this.catalogId,\n channelInventoryConfiguration\n );\n\n const refiners = await getCollectionRefinersAction(refinerInput, this.props.context.actionContext);\n this.setState({ refiners });\n }\n }\n );\n\n if (\n this.props.config.enableAffiliationBasedPricing &&\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Condition required.\n this.props.context.actionContext.requestContext?.user?.isAuthenticated\n ) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities data without blocking the UI.\n this._getActivePrice();\n }\n await this._updateVariantAvailability();\n }\n\n public componentWillUnmount(): void {\n this._isMounted = false;\n if (MsDyn365.isBrowser && window.removeEventListener) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public render(): JSX.Element {\n const {\n config: { imageSettings, className },\n resources,\n data: { listPageState, products: productCollection, featureProduct }\n } = this.props;\n\n if (!this.isListPageStateUpdated && listPageState.result && productCollection.result) {\n this._updateListPageState(listPageState.result, productCollection.result);\n this.isListPageStateUpdated = true;\n }\n\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const searchProduct = listPageState.result?.featureProduct ?? featureProduct.result ?? null;\n let errorText = '';\n if (!ArrayExtensions.hasElements(products)) {\n errorText = this._pageType === 'Category' ? resources.resultCategoryNotFoundText : resources.resultSearchNotFoundText;\n }\n const productsComponent = this._getProducts();\n const featureComponent = (\n \n );\n\n const searchResultContainerViewProps = {\n ...this.props,\n products: productsComponent,\n TitleViewProps: this._getCollectionTitle(),\n categoryHierarchy: !this.props.config.disableHierarchy && this._getCategoryHierarchy(),\n refineMenu: this._getRefineMenu(),\n className: classnames('ms-search-result-container', className),\n SearchResultContainer: {\n moduleProps: this.props,\n className: classnames('ms-search-result-container', className)\n },\n sortByOptions: this.props.data.listPageState.result?.totalProductCount !== 0 ? this._getSortingDropDown() : null,\n pagination: this._getPagination(),\n ProductsContainer: { className: 'ms-search-result-container__Products' },\n ProductSectionContainer: { className: 'ms-search-result-container__product-section' },\n CategoryNavContainer: { className: 'ms-search-result-container__category-nav-section' },\n RefineAndProductSectionContainer: { className: 'ms-search-result-container__refine-product-section' },\n choiceSummary: this._getChoiceSummary(),\n modalToggle:\n this.props.data.listPageState.result?.totalProductCount !== 0 ? (\n \n ) : null,\n searchResultModal: this._getSearchResultModal(),\n isMobile: this.isMobile,\n errorMessage: errorText && ,\n FeatureSearchContainer: { className: 'ms-feature-search-result' },\n similarLookProduct: searchProduct ? featureComponent : null,\n productPrices: this.productPrices,\n productsDimensionAvailabilities: this.state.productsDimensionAvailabilities\n };\n return this.props.renderView(searchResultContainerViewProps) as React.ReactElement;\n }\n\n /**\n * Get products variants dimension availabilities.\n * @returns Void.\n */\n private readonly _updateVariantAvailability = async (): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n if (\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none) &&\n this.props.config.includeAttributes\n ) {\n await this._getProductsDimensionsAvailabilities();\n }\n };\n\n /**\n * Update the list page state with initial data.\n * @param listPageState -- List page State.\n * @param products -- Products.\n */\n @action\n private readonly _updateListPageState = (listPageState: ListPageState, products: IFullProductsSearchResultsWithCount): void => {\n let querySorting: SortColumn[] = [];\n const defaultPageNumber: number = 10;\n\n if (this._pageType === 'Category') {\n listPageState.pageType = 'Category';\n } else {\n listPageState.pageType = 'Search';\n }\n\n if (this.props.context.request.query?.sorting) {\n querySorting = JSON.parse(decodeURIComponent(this.props.context.request.query.sorting)) as SortColumn[];\n }\n\n listPageState.currentPageNumber =\n (this.props.context.request.query?.skip &&\n +this.props.context.request.query.skip / (this.props.config.itemsPerPage ?? defaultPageNumber)) ||\n 0;\n listPageState.sortingCritera = { Columns: querySorting };\n listPageState.pageSize = this.props.config.itemsPerPage ?? defaultPageNumber;\n listPageState.activeProducts = products.products;\n listPageState.totalProductCount = products.count;\n listPageState.activeFilters = hydrateRefinersFromUrl(this.props.context.request) || [];\n if (this.props.context.request.query?.productId) {\n const featureProduct = this.props.data.featureProduct.result;\n if (featureProduct) {\n listPageState.featureProduct = featureProduct;\n }\n }\n };\n\n /**\n * Get products dimension availabilities.\n * @returns Void.\n */\n private readonly _getProductsDimensionsAvailabilities = async (): Promise => {\n const productsList = this.props.data.listPageState.result?.activeProducts ?? [];\n\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n productsList,\n this.props.context as ICoreContext,\n DimensionSwatchDisplayTypes.productCard\n ),\n this.props.context.actionContext\n );\n\n if (ArrayExtensions.hasElements(productsDimensionAvailabilities)) {\n this.setState({ productsDimensionAvailabilities });\n }\n };\n\n /**\n * Get the active price for the products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.props.data.listPageState.result?.activeProducts ?? [];\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n\n const listPageState = await this.props.data.listPageState;\n listPageState.activeProducts = products;\n };\n\n private readonly _getSearchResultModal = (): ISearchResultModalViewProps => {\n const { resources } = this.props;\n return SearchResultModal({\n resources: {\n modalCloseButtonText: resources.modalCloseButtonText,\n modalTitle: resources.modalTitle\n },\n isOpen: this.state.modalIsOpen,\n returnRef: this._modalToggleRef,\n onModalToggle: this._toggleModal\n });\n };\n\n private readonly _getCollectionTitle = (): ITitleViewProps => {\n const { data, context, resources } = this.props;\n\n let collectionTitle: string | undefined = '';\n if (context && context.request && context.request.query && context.request.query.q) {\n collectionTitle = `\"${context.request.query.q}\"`;\n } else {\n collectionTitle =\n (data.category.result &&\n SearchResultContainer.getFriendlyName(context.request.locale, data.category.result.NameTranslations)) ||\n (data.category.result && data.category.result.Name) ||\n this.props.context.request.query?.title ||\n '';\n }\n let productCountText = '';\n let productCountNumber: number | undefined;\n if (data.listPageState && data.listPageState.result && data.listPageState.result.totalProductCount !== undefined) {\n productCountNumber = data.listPageState.result.totalProductCount;\n } else if (data.products && data.products.result) {\n productCountNumber = data.products.result.count;\n }\n\n if (productCountNumber && productCountNumber !== 0) {\n productCountText =\n productCountNumber !== 1\n ? format(this.props.resources.numberOfProducts, productCountNumber)\n : this.props.resources.oneProduct;\n } else {\n productCountText = format(this.props.resources.numberOfProducts, 0);\n }\n const pageName = context.request.telemetryPageName ? `result-count-${context.request.telemetryPageName.toLowerCase()}` : '';\n const titlePrefix = ;\n const titleText = collectionTitle && <Title className='ms-search-result__collection-title-text' text={collectionTitle} />;\n const titleCount = <Title className='ms-search-result__collection-title-count' text={productCountText} />;\n\n return {\n TitleContainer: { className: `ms-search-result-container__title ${pageName}` },\n title: {\n titlePrefix,\n titleText,\n titleCount\n }\n };\n };\n\n private readonly _getCategoryHierarchy = (): ICategoryHierarchyViewProps => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n const categoryLinks =\n categoryHierarchy &&\n categoryHierarchy.map((value: CategoryHierarchyData, index: number) => {\n return (\n <Link\n key={index}\n text={value.Name}\n ariaLabel={`${this.props.resources.categoryLinkAriaLabel} ${value.Name}`}\n href={value.Url}\n />\n );\n });\n const categoryLinkSeparator = <Separator separator='/' />;\n\n return {\n CategoryHierarchyContainer: { tag: 'nav', className: 'ms-search-result-container__category-hierarchy' },\n categoryHierarchyList: categoryLinks,\n categoryHierarchySeparator: categoryLinkSeparator\n };\n };\n\n private readonly _getSortingDropDown = (): ISortByViewProps => {\n const { resources } = this.props;\n const activeDropdown = this._getCurrentlySelectedOption() || this.state.sortingState.selectedSortByOption;\n let dropdownOptions = this._getAllSortByOptions();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- App config settings are of \"any\" value.\n if (this.props.context.app.config.hideRating) {\n dropdownOptions = dropdownOptions.filter(dropdownOption => dropdownOption.key !== sortOptions.sortByOptionRatingDesc);\n }\n\n const dropdown = (\n <LabeledDropdown\n labelClassname='reviews-list-sort-by'\n labelText={resources.sortByDropdownLabel}\n dropdownId='categorySortByDropdown'\n dropdownClassname='reviews-list-dropdown'\n toggleColor='link'\n dropdownOptions={dropdownOptions}\n selectedOption={activeDropdown}\n onSelectOption={this._updateSortByDropdown}\n ref={this._sortAndFilterContainerRef}\n />\n );\n return {\n SortingContainer: { className: 'ms-search-result-container__Sort-by-category' },\n sortByDropDown: dropdown\n };\n };\n\n private readonly _getPagination = (): React.ReactNode => {\n const { config, context, data, resources } = this.props;\n const listPageState = data.listPageState.result;\n const fullUrl = getCurrentUrl(context.request);\n const itemsPerPage = config.itemsPerPage || 10;\n // eslint-disable-next-line max-len -- existing code\n const skipCount = !ObjectExtensions.isNullOrUndefined(listPageState?.currentPageNumber)\n ? listPageState!.currentPageNumber * (this.props.config.itemsPerPage || 10)\n : (this.props.context.request.query && +this.props.context.request.query.skip) || 0;\n const totalItems = listPageState?.totalProductCount || 0;\n const previousText = resources.flipperPrevious;\n const nextText = resources.flipperNext;\n\n if (totalItems <= itemsPerPage) {\n return null;\n }\n return (\n <UncontrolledPagination\n className='ms-search-result-container__pagination'\n role='navigation'\n aria-label={resources.paginationAriaLabel}\n url={fullUrl.href}\n qsp='skip'\n items={totalItems}\n itemsPerPage={itemsPerPage}\n startingItem={skipCount}\n previousText={this._renderPrev(previousText)}\n nextText={this._renderNext(nextText)}\n previousAriaLabel={previousText}\n nextAriaLabel={nextText}\n telemetryContent={this.telemetryContent}\n />\n );\n };\n\n private readonly _getRefineMenu = (): IRefineMenuViewProps => {\n const { data, context, config } = this.props;\n const tempRangeTypeTODO = context.request.query && context.request.query.inputRange ? 'input' : 'slider';\n const validRefiners =\n this.props.config.updateRefinerPanel && ArrayExtensions.hasElements(this.state.refiners)\n ? this.state.refiners.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\n })\n : data.refiners.result &&\n data.refiners.result.filter(refiner => {\n return ArrayExtensions.hasElements(refiner.Values) && !this._shouldHideFromRefiners(refiner);\n });\n\n const activeRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n this._getexpandRefinerCount(validRefiners && validRefiners.length, config.expandRefinersCount);\n const expandedRefiners = this.expandrefinerCount;\n const subMenus =\n validRefiners &&\n validRefiners.map((productRefinerHierarchy: IProductRefinerHierarchy, index: number) => {\n return (\n <RefineSubmenu\n productRefinerHierarchy={productRefinerHierarchy}\n selectedRefinerValues={activeRefiners}\n refineItemCommonProps={this._refineItemCommonProps}\n minValueSliderThumbAriaLabel={this.props.resources.minValueSliderThumbAriaLabel}\n maxValueSliderThumbAriaLabel={this.props.resources.maxValueSliderThumbAriaLabel}\n key={index}\n onUpdateRefiners={this._onUpdateRefiners}\n urlBuilder={this._buildRefinerUrl}\n isDisabled={false}\n isExpandedOnInitialLoad={!!(expandedRefiners && expandedRefiners > index)}\n tempRangeTypeTODO={tempRangeTypeTODO}\n context={context}\n moduleId={this.props.id}\n moduleTypeName={this.props.typeName}\n telemetryContent={this.telemetryContent}\n productCountAriaLabel={this.props.resources.productCountAriaLabel}\n refineItemAriaLabel={this.props.resources.refineItemAriaLabel}\n refineItemsAriaLabel={this.props.resources.refineItemsAriaLabel}\n singleProductCountAriaLabel={this.props.resources.singleProductCountAriaLabel}\n isMobile={this.isMobile}\n />\n );\n });\n\n return {\n RefineMenuContainer: { className: 'ms-search-result-container__refine-menu' },\n RefinerSectionContainer: { className: 'ms-search-result-container__refiner-section' },\n refiners: subMenus\n };\n };\n\n /**\n * Should hide from refiners.\n * @param refiner - The refiner.\n * @returns ShouldHideFromRefiners.\n */\n private readonly _shouldHideFromRefiners = (refiner: IProductRefinerHierarchy): boolean => {\n const { channelInventoryConfiguration } = this.state;\n const isInventorySortableAttribute =\n (this.props.data.products.result?.inventoryAwareSortableAttributeId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.inventoryAwareSortableAttributeId) ||\n (channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.ProductAvailabilitySortableAttributeRecordId);\n\n const isInventoryProductAttribute =\n (this.props.data.products.result?.channelInventoryConfigurationId !== 0 &&\n refiner.RecordId === this.props.data.products.result?.channelInventoryConfigurationId) ||\n (channelInventoryConfiguration?.InventoryProductAttributeRecordId !== 0 &&\n refiner.RecordId === channelInventoryConfiguration?.InventoryProductAttributeRecordId);\n\n // Always hide sortable attribute since it's just for sorting products in Azure search, not for customers\n return (\n isInventorySortableAttribute ||\n (this.props.context.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS &&\n isInventoryProductAttribute)\n );\n };\n\n private readonly _getChoiceSummary = (): React.ReactNode => {\n const { resources, data, telemetry } = this.props;\n const { channelInventoryConfiguration } = this.state;\n const selectedRefiners = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n const refinerValueName = this.props.data.refiners.result?.find(rating => rating.KeyName === 'Rating');\n return (\n <ChoiceSummary\n classNames='ms-choice-summary-by-category'\n clearAllText={resources.clearAllText}\n label={resources.choiceSummaryLabel}\n closeAriaLabel={resources.closeAriaLabel}\n selectedChoices={selectedRefiners}\n // @ts-expect-error: NOTE Type-unsafe line below, null refinersByCategoryHierarchy case not handled\n refinerHierarchy={data.refiners.result}\n choiceFormat={resources.choiceFormat}\n choiceRangeValueFormat={resources.choiceRangeValueFormat}\n telemetry={telemetry}\n onChoiceClicked={this._onChoiceClicked}\n urlBuilder={this._buildRefinerUrlForChoiceSummary}\n choiceAriaLabel={resources.choiceAriaLabel}\n telemetryContent={this.telemetryContent}\n context={this.props.context}\n channelInventoryConfigurationId={channelInventoryConfiguration?.InventoryProductAttributeRecordId}\n refinerValues={refinerValueName}\n />\n );\n };\n\n /**\n * Get Active products.\n * @returns - JSX Elements.\n */\n private readonly _getProducts = (): JSX.Element => {\n const {\n config: { imageSettings, allowBackNavigation: shouldAllowBackNavigation }\n } = this.props;\n const { resources } = this.props;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access -- Reading config value.\n const breadCrumbType: string = this.props.context.app.config.breadcrumbType;\n const shouldAllowBack = shouldAllowBackNavigation && (breadCrumbType === 'back' || breadCrumbType === 'categoryAndBack');\n\n const products = (this.props.data.listPageState.result && this.props.data.listPageState.result.activeProducts) || [];\n const quickviewSlot = this.props.slots?.quickview?.[0];\n const productComparisonButton = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const isPriceMinMaxFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n return (\n <ProductSearchResultItems\n products={products}\n context={this.props.context}\n imageSettings={imageSettings}\n resources={resources}\n moduleType={this.props.typeName}\n moduleId={this.props.id}\n allowBackNavigation={shouldAllowBack}\n telemetryContent={this.telemetryContent}\n quickviewSlot={quickviewSlot}\n productComparisonButton={productComparisonButton}\n channelInventoryConfigurationId={this.props.data.products.result?.channelInventoryConfigurationId}\n isPriceMinMaxEnabled={isPriceMinMaxFeatureState?.IsEnabled}\n productsDimensionAvailabilities={this.state.productsDimensionAvailabilities}\n />\n );\n };\n\n private readonly _updateSortByDropdown = (notification: ILabeledDropdownOnChangeNotification): void => {\n const {\n context: { request: requestContext, actionContext }\n } = this.props;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n // eslint-disable-next-line max-len -- existing code\n const error = `[sort-by-category] cannot sort without context: ${!requestContext ? 'requestContext ' : ''} ${\n !actionContext ? 'actionContext ' : ''\n } could not be found`;\n this.props.telemetry.warning(error);\n return;\n }\n\n window.history.pushState(\n {},\n '',\n buildListPageUrl(\n getCurrentUrl(this.props.context.request),\n undefined,\n [this._getSortColumnFromSelectedOption(notification.selectedOption)],\n undefined\n )\n );\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.sortingCritera = {\n Columns: [this._getSortColumnFromSelectedOption(notification.selectedOption)]\n };\n });\n };\n\n private readonly _getSortColumnFromSelectedOption = (option: ILabeledDropdownOption): SortColumn => {\n const { data } = this.props;\n\n if (!data.searchConfiguration.result) {\n return {};\n }\n\n const mappedConfiguration = data.searchConfiguration.result.find(searchConfiguration => {\n return searchConfiguration.key === option.key;\n });\n\n if (mappedConfiguration) {\n return mappedConfiguration.sortColumn;\n }\n\n return {};\n };\n\n /**\n * Retrieves current sort criteria.\n * @returns Sort criteria column which is currently active or undefined if it's not specified.\n */\n private readonly _getSortCriteriaColumn = (): SortColumn | undefined => {\n const sortCriteria = this.props.data.listPageState.result?.sortingCritera;\n if (ArrayExtensions.hasElements(sortCriteria?.Columns)) {\n return sortCriteria!.Columns[0];\n }\n\n const queryColumns = parseQueryParam<SortColumn[]>('sorting', this.props.context.request);\n if (ArrayExtensions.hasElements(queryColumns)) {\n return queryColumns[0];\n }\n\n return undefined;\n };\n\n /**\n * Retrieves dropdown options.\n * @returns All dropdown options.\n */\n private readonly _getAllSortByOptions = (): ILabeledDropdownOption[] => {\n const searchConfiguration = this.props.data.searchConfiguration.result;\n\n if (!searchConfiguration) {\n return [];\n }\n\n const mappedSearchConfiguration = this.sortByDropdownOptions.filter(mappedSearchConfig =>\n searchConfiguration.find(item => mappedSearchConfig.key === item.key)\n );\n\n return ArrayExtensions.validValues(mappedSearchConfiguration);\n };\n\n /**\n * Retrieves current selected dropdown option based on the sort criteria.\n * @returns Current dropdown option.\n */\n private readonly _getCurrentlySelectedOption = (): ILabeledDropdownOption | undefined => {\n const activeSortColumn = this._getSortCriteriaColumn();\n\n const searchConfiguration = this.props.data.searchConfiguration.result;\n\n if (!activeSortColumn || !searchConfiguration) {\n return undefined;\n }\n\n const activeMappedConfig = searchConfiguration.find(\n mappedSearchConfig =>\n mappedSearchConfig.sortColumn.ColumnName === activeSortColumn.ColumnName &&\n mappedSearchConfig.sortColumn.IsDescending === activeSortColumn.IsDescending\n );\n if (!activeMappedConfig) {\n return undefined;\n }\n\n return this.sortByDropdownOptions.find(dropdownOption => dropdownOption.key === activeMappedConfig.key);\n };\n\n private readonly _onUpdateRefiners = (itemToggleNotification: IRefineItemToggleNotification): void => {\n const {\n context: { request: requestContext, actionContext }\n } = this.props;\n\n if (!requestContext || !actionContext || !this.props.data.listPageState.result) {\n const error = `Refine menu cannot refine search criteria: \n ${!requestContext ? 'requestContext ' : ''} ${!actionContext ? 'actionContext ' : ''} could not be found`;\n this.props.telemetry.warning(error);\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Server side the list PageState will not be called.\n const updatedRefinementCriteria = getUpdatedRefinementCriteria(\n itemToggleNotification,\n this.props.data.listPageState.result?.activeFilters || []\n );\n\n window.history.pushState({}, '', buildListPageUrl(getCurrentUrl(this.props.context.request), updatedRefinementCriteria));\n transaction(() => {\n this.props.data.listPageState.result!.currentPageNumber = 0;\n this.props.data.listPageState.result!.activeFilters = updatedRefinementCriteria;\n });\n };\n\n private readonly _buildRefinerUrl = (itemToggleNotification: IRefineItemToggleNotification): string => {\n if (this.props.data.listPageState.result) {\n const newRefinementCriteria = getUpdatedRefinementCriteria(\n itemToggleNotification,\n this.props.data.listPageState.result.activeFilters || []\n );\n\n return buildListPageUrl(getCurrentUrl(this.props.context.request), newRefinementCriteria);\n }\n this.props.telemetry.warning('[buildRefinerQueryString]List Page State Not available, unable to build refiner URL');\n return '';\n };\n\n private readonly _onChoiceClicked = (notification: IChoiceSummaryClickNotification): void => {\n const { data, telemetry } = this.props;\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked]ListPageState unavailable, unable to update refiners.');\n return;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!notification.clearAll) {\n const selectedChoice = notification.choiceClicked;\n if (!selectedChoice) {\n telemetry.warning('[choice-summary-by-category._onChoiceClicked] Choice could not be determined');\n return;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedChoice, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n\n // Set focus to sort and filter\n const dropdownElementId = this._sortAndFilterContainerRef.current && this._sortAndFilterContainerRef.current.props.dropdownId;\n const dropdownElement = dropdownElementId && document.getElementById(dropdownElementId);\n setTimeout(() => {\n dropdownElement && dropdownElement.focus();\n }, 50);\n }\n\n const fullUrl = getCurrentUrl(this.props.context.request);\n window.history.pushState({}, '', buildListPageUrl(fullUrl, currentRefinementCriteria));\n data.listPageState.result.currentPageNumber = 0;\n data.listPageState.result.activeFilters = currentRefinementCriteria;\n };\n\n private readonly _buildRefinerUrlForChoiceSummary = (selectedRefiner: ProductRefinerValue, isClearAll: boolean): string => {\n const { data, telemetry } = this.props;\n const fullUrl = getCurrentUrl(this.props.context.request);\n\n if (!data.listPageState.result) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl]ListPageState unavailable, unable to create refiner URL.');\n return fullUrl.href;\n }\n\n let currentRefinementCriteria = (data.listPageState.result && data.listPageState.result.activeFilters) || [];\n\n if (!isClearAll) {\n if (!selectedRefiner) {\n telemetry.warning('[choice-summary-by-category._buildRefinerUrl] URL for Choice could not be determined');\n return fullUrl.href;\n }\n currentRefinementCriteria = currentRefinementCriteria.filter(\n (selectedCriterion: ProductRefinerValue) => !isMatchingRefinementCriterion(selectedRefiner, selectedCriterion)\n );\n } else {\n currentRefinementCriteria = [];\n }\n\n return buildListPageUrl(fullUrl, currentRefinementCriteria);\n };\n\n private _getViewport(): GridSize {\n if (MsDyn365.isBrowser) {\n return isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n }\n return isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n }\n\n private _toggleModal(): void {\n this.setState({\n modalIsOpen: !this.state.modalIsOpen\n });\n }\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n\n if (this.state.modalIsOpen && !this.isMobile) {\n this._toggleModal();\n }\n }\n\n private readonly _getexpandRefinerCount = (validRefiners?: number, refinerCount?: expandRefinersCount): void => {\n switch (refinerCount) {\n case expandRefinersCount.all:\n this.expandrefinerCount = validRefiners;\n break;\n case expandRefinersCount.one:\n this.expandrefinerCount = 1;\n break;\n case expandRefinersCount.two:\n this.expandrefinerCount = 2;\n break;\n case expandRefinersCount.three:\n this.expandrefinerCount = 3;\n break;\n case expandRefinersCount.four:\n this.expandrefinerCount = 4;\n break;\n default:\n this.expandrefinerCount = 0;\n }\n };\n\n /**\n * Renders a Pagination previous text.\n * @param paginationPreviousText - Pagination previous text from resources.\n * @returns Previous text and flipper icon.\n */\n private readonly _renderPrev = (paginationPreviousText: string) => {\n return (\n <div className='msc-pagination__prev'>\n <span className='ms-search-result__pagination-left' aria-hidden='true' />\n <span className='prev-text'>{paginationPreviousText}</span>\n </div>\n );\n };\n\n /**\n * Renders a Pagination next text.\n * @param paginationNextText - Pagination next text from resources.\n * @returns Next text and flipper icon.\n */\n private readonly _renderNext = (paginationNextText: string) => {\n return (\n <div className='msc-pagination__next'>\n <span className='next-text'>{paginationNextText}</span>\n <span className='ms-search-result__pagination-right' aria-hidden='true' />\n </div>\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISearchResultModalViewProps } from './components';\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from './search-result-container';\n\nconst SearchResultContainerView: React.FC<ISearchResultContainerViewProps> = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n <Module {...SearchResultContainer}>\n {renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Module>\n );\n }\n return (\n <Module {...SearchResultContainer}>\n <Node {...CategoryNavContainer}>\n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {TitleViewProps && renderTitleCount(TitleViewProps)}\n </Node>\n <Node {...RefineAndProductSectionContainer}>\n {refineMenu && renderRefiner(refineMenu)}\n <Node {...ProductSectionContainer}>\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n <Node {...FeatureSearchContainer}>{similarLookProduct}</Node>\n <Node {...ProductsContainer}>\n {errorMessage}\n {products}\n </Node>\n {pagination}\n </Node>\n </Node>\n </Module>\n );\n};\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\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), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n <Node {...RefinerSectionContainer}>\n <Node {...RefineMenuContainer}>\n {refiners.map((submenu, index) => (\n <React.Fragment key={index}>{submenu}</React.Fragment>\n ))}\n </Node>\n </Node>\n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return <Node {...SortingContainer}>{sortByDropDown}</Node>;\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n <Node {...CategoryHierarchyContainer}>\n {categoryHierarchyList.map((category, index) => (\n <React.Fragment key={index}>\n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n </React.Fragment>\n ))}\n </Node>\n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h2>\n {title.titlePrefix}\n {title.titleText}\n </h2>\n </Node>\n );\n }\n return null;\n};\n\nconst renderTitleCount = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n <Node {...TitleContainer}>\n <h5>{title.titleCount}</h5>\n </Node>\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 { observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a autosuggest.\n */\nexport class SearchState {\n @observable public searchText?: string;\n\n @observable public defaultBasicSearchUrl?: string;\n\n @observable public searchQueryStringParameter?: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { SocialMedia, SocialMediaComponent } from '@msdyn365-commerce/components';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISocialShareItemConfig, ISocialShareItemProps, socialMedia } from './social-share-item.props.autogenerated';\n\nexport interface ISocialShareItemViewProps extends ISocialShareItemProps<ISocialShareItemConfig> {\n SocialShareItemElement: React.ReactNode | null;\n SocialShareItem: IModuleProps;\n}\n\n/**\n *\n * SocialShareItem component.\n * @extends {React.PureComponent<ISocialShareItemProps<ISocialShareItemConfig>>}\n */\nclass SocialShareItem extends React.PureComponent<ISocialShareItemProps<ISocialShareItemConfig>> {\n constructor(props: ISocialShareItemProps<ISocialShareItemConfig>) {\n super(props);\n\n this._getSocialShareItem = this._getSocialShareItem.bind(this);\n }\n\n public render(): JSX.Element | null {\n const viewprops = {\n ...this.props,\n SocialShareItem: {\n moduleProps: this.props,\n className: 'ms-social-share-item'\n },\n SocialShareItemElement: this._getSocialShareItem()\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n\n private _getSocialShareItem(): React.ReactNode | null {\n const src = this.props.config.icon;\n if (MsDyn365.isBrowser) {\n switch (this.props.config.socialMedia) {\n case socialMedia.facebook:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Facebook}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_facebook`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.twitter:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Twitter}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_twitter`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.pinterest:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Pinterest}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_pinterest`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.linkedin:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Linkedin}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_linkedin`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n case socialMedia.mail:\n return (\n <SocialMediaComponent\n socialMedia={SocialMedia.Mail}\n postUrl={document.URL}\n context={this.context}\n id={`${this.props.id}_mail`}\n typeName={this.props.typeName}\n data={{}}\n src={src}\n />\n );\n default:\n return null;\n }\n }\n return null;\n }\n}\n\nexport default SocialShareItem;\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 React from 'react';\n\nimport { ISocialShareItemViewProps } from './social-share-item';\n\nexport const SocialShareItemView: React.FC<ISocialShareItemViewProps> = props => {\n const { SocialShareItem, SocialShareItemElement } = props;\n\n if (!SocialShareItemElement) {\n props.context.telemetry.error('Social media is not valid, module wont render');\n return null;\n }\n return <Module {...SocialShareItem}>{SocialShareItemElement}</Module>;\n};\n\nexport default SocialShareItemView;\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<IWishlistItemDimension> = ({ key, className, dimensionType, dimensionValue }) => (\n <div key={key} className={className}>\n <span className='msc-wishlist-dimension__label'>{dimensionType}:</span>\n <span className='msc-wishlist-dimension__value'>{dimensionValue}</span>\n </div>\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, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport {\n CommerceListLine,\n ProductPrice,\n ReleasedProductType,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n convertProductDimensionTypeToDimensionTypes,\n getFallbackImageUrl,\n StringExtensions\n} 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<IGeneric<IAny>>;\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 _getFullProductLink = (props: IWishlistItemProps): string => {\n if (!msdyn365Commerce.isBrowser) {\n return '';\n }\n\n const fullUrl = new URL(props.productUrl, window.location.href);\n for (const dimension of props.product.Dimensions ?? []) {\n const dimensionValue = dimension.DimensionValue?.Value;\n if (!StringExtensions.isNullOrWhitespace(dimensionValue)) {\n const dimensionName = convertProductDimensionTypeToDimensionTypes(dimension.DimensionTypeValue);\n fullUrl.searchParams.set(dimensionName, dimensionValue!);\n }\n }\n return fullUrl.href;\n // return updateProductUrl(productUrl, context, swatch);\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 * @param productUrl - The url to the product.\n * @returns React component with a link to a product.\n */\nconst renderProductLink = (input: IWishlistItemProps, productUrl: string) => {\n const { 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 const productPageUrlWithSwatch = productUrl;\n return (\n !StringExtensions.isNullOrWhitespace(productPageUrlWithSwatch) && (\n <a\n href={productPageUrlWithSwatch}\n className='ms-wishlist-items__product-link'\n {...productAttributes}\n aria-label={_renderAriaLabel(input)}\n >\n {productName}\n </a>\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 <div className='ms-wishlist-items__product-title'>{productName}</div>;\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 <span className={inventoryCssName}>{inventoryInformationLabel}</span>\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 <Button\n className='ms-wishlist-items__product-add-button'\n title={((isServiceItem || isInStock) && addToCartText) || outOfStockText}\n onClick={addItemAction}\n disabled={!(isServiceItem || isInStock)}\n >\n {((isServiceItem || isInStock) && addToCartText) || outOfStockText}\n </Button>\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 <button className='ms-wishlist-items__product-remove-button' aria-label={removeFromWishlistText} onClick={removeItemAction} />;\n};\n\n/**\n * Gets the react node for product unit of measure display.\n * @param context - Module context.\n * @param unitOfMeasure - Product unit of measure.\n * @returns The node representing markup for unit of measure component.\n */\nconst renderUnitOfMeasure = (context: ICoreContext<IGeneric<IAny>>, unitOfMeasure?: string) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- Do not need type check for appsettings\n if (context.app.config && (!context.app.config.unitOfMeasureDisplayType || context.app.config.unitOfMeasureDisplayType === 'none')) {\n return undefined;\n }\n\n if (!unitOfMeasure) {\n return undefined;\n }\n\n return (\n <div className='msc-wishlistitems__product-unit-of-measure'>\n <span>{unitOfMeasure}</span>\n </div>\n );\n};\n\nexport const WishlistItem = (input: IWishlistItemProps): IWishlistItemViewProps | null => {\n const {\n product,\n price,\n context,\n imageSettings,\n wishlistState,\n itemKey,\n handlers,\n inventoryInformationLabel,\n enableImageProductLink,\n inventoryLabelClassName\n } = input;\n\n if (!product) {\n return null;\n }\n\n const { RecordId, Name, PrimaryImageUrl, Dimensions } = product;\n if (product.RecordId) {\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n const productUrl = _getFullProductLink(input);\n const productImage =\n Name &&\n _renderProductImage(\n context,\n product.Name!,\n PrimaryImageUrl === undefined ? fallbackImage : PrimaryImageUrl,\n fallbackImage,\n imageSettings\n );\n return {\n key: `${RecordId}-item`,\n productImage,\n productLink: renderProductLink(input, productUrl),\n productDimensions: Dimensions && _renderProductDimensions(input),\n productPrice: price && _renderPrice(input),\n productUnitOfMeasure: product.DefaultUnitOfMeasure && renderUnitOfMeasure(context, product.DefaultUnitOfMeasure),\n entireProductLink: enableImageProductLink ? productUrl : undefined,\n productAriaLabel: enableImageProductLink ? _renderAriaLabel(input) : undefined,\n productName: enableImageProductLink && Name && renderProductName(Name),\n\n addToCartButton: <WishlistItemAddToCartButtonComponent {...input} />,\n inventoryInformation: renderInventoryInformationLabel(inventoryInformationLabel, inventoryLabelClassName),\n removeButton: <WishlistItemRemoveFromWishlistButtonComponent {...input} />,\n productStatusMessage: wishlistState &&\n wishlistState.isOpen &&\n wishlistState.productId === RecordId &&\n wishlistState.itemKey === itemKey && (\n <div className='ms-wishlist-items__product-status'>\n <Alert color={wishlistState.statusCssString} isOpen={wishlistState.isOpen} toggle={handlers.onDismiss}>\n <span>{wishlistState.userMessage}</span>\n </Alert>\n </div>\n )\n };\n }\n return null;\n};\n\nconst _renderProductImage = (\n context: ICoreContext,\n heading: string,\n image?: string,\n fallbackImage?: string,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n if (image) {\n return (\n <Image\n requestContext={context.actionContext.requestContext}\n className='ms-wishlist-items__product-image'\n altText={heading}\n title={heading}\n src={image}\n fallBackSrc={fallbackImage}\n gridSettings={context.request.gridSettings!}\n imageSettings={imageSettings || defaultImageSettings}\n loadFailureBehavior='empty'\n />\n );\n }\n return null;\n};\n\nconst _renderPrice = (props: IWishlistItemProps): JSX.Element | null => {\n const { price, context, moduleId, moduleTypeName, resources } = props;\n\n if (price) {\n return (\n <PriceComponent\n id={moduleId}\n typeName={moduleTypeName}\n data={{ price }}\n className='ms-wishlist-items__product-price'\n freePriceText={resources.freePriceText}\n originalPriceText={resources.originalPriceText}\n currentPriceText={resources.currentPriceText}\n context={context}\n />\n );\n }\n return null;\n};\n\nconst _renderProductDimensions = (props: IWishlistItemProps): (React.ReactNode | undefined)[] => {\n const { product, resources } = props;\n\n if (!product || !product.Dimensions) {\n return [];\n }\n\n return product.Dimensions.map((dimension, index) => {\n if (!dimension.DimensionValue || !dimension.DimensionValue.Value) {\n return undefined;\n }\n\n let type = '';\n\n switch (dimension.DimensionTypeValue) {\n case 1: {\n type = resources.productDimensionTypeColor;\n break;\n }\n case 3: {\n type = resources.productDimensionTypeSize;\n break;\n }\n case 4: {\n type = resources.productDimensionTypeStyle;\n break;\n }\n default:\n return undefined;\n }\n\n return (\n <WishlistItemDimension\n key={`${product.RecordId}-dimensions-${index}`}\n className='msc-price ms-wishlist-items__product-dimension'\n dimensionType={type}\n dimensionValue={dimension.DimensionValue.Value}\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 classnames from 'classnames';\nimport * as React from 'react';\n\nimport { wishlistStatus } from '../wishlist-items';\n\nexport interface IWishlistItemsStatusMessageProps {\n className?: string;\n errorType: wishlistStatus;\n text?: string;\n}\n\nexport const WishlistItemsStatusMessage: React.FC<IWishlistItemsStatusMessageProps> = ({ className, errorType, text }) => {\n switch (errorType) {\n case 'EMPTY':\n return <p className={classnames('ms-wishlist-items__message-empty', className)}>{text}</p>;\n case 'FAILED':\n return <p className={classnames('ms-wishlist-items__message-failed', className)}>{text}</p>;\n case 'LOADING':\n default:\n return <p className={className ? 'ms-wishlist-items__message-exists-product' : 'ms-wishlist-items__message-waiting'}>{text}</p>;\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { FullProduct } from '@msdyn365-commerce/commerce-entities';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { AsyncResult, CommerceList, CommerceListLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { createGetByCustomerInput, removeLinesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CommerceListsDataActions.g';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/ProductsDataActions.g';\nimport {\n ArrayExtensions,\n getProductUrlSync,\n IProductInventoryInformation,\n QueryResultSettingsProxy\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n updateMaxQuantityForCartLineItem\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport getItemsInWishlists, { ActiveWishlistInput } from './actions/get-items-in-wishlists';\nimport { IWishlistItemViewProps, WishlistItem, WishlistItemsStatusMessage } from './components';\nimport { IWishlistItemsData } from './wishlist-items.data';\nimport { IHeadingData, IWishlistItemsProps } from './wishlist-items.props.autogenerated';\n\nexport interface IWishlistItemActionMessageState {\n productId: number;\n itemKey: string;\n userMessage: string;\n statusCssString: string;\n messageGlyph: string;\n isOpen: boolean;\n isError: boolean;\n}\n\nexport type wishlistStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\n\nexport interface IWishlistItemsViewProps extends IWishlistItemsProps<IWishlistItemsData> {\n WishlistItems: IModuleProps;\n status?: wishlistStatus;\n statusMessage?: React.ReactNode;\n heading?: React.ReactNode;\n Products?: INodeProps;\n Product?: INodeProps;\n ProductDetails?: INodeProps;\n ProductDimensions?: INodeProps;\n products?: IWishlistItemViewProps[];\n telemetryContent?: ITelemetryContent;\n statusNotExistsMessage?: React.ReactNode;\n}\n\n/**\n *\n * WishlistItems component.\n * @extends {React.PureComponent<IWishlistItemsProps<IWishlistItemsData>, IWishlistItemActionMessageState>}\n */\n@observer\nclass WishlistItems extends React.Component<IWishlistItemsProps<IWishlistItemsData>, IWishlistItemActionMessageState> {\n private readonly telemetryContent: ITelemetryContent;\n constructor(props: IWishlistItemsProps<IWishlistItemsData>) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise<void> {\n this.setState({ isError: false });\n }\n\n public shouldComponentUpdate(nextProps: IWishlistItemsProps<IWishlistItemsData>, nextState: IWishlistItemActionMessageState): 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 { heading, className } = this.props.config;\n const { emptyWishlistText, wishlistErrorGettingWishlist, noLongerExitsWishlistItemText } = this.props.resources;\n const { cart, productAvailability, wishlists, products } = this.props.data;\n\n if (cart.status === 'LOADING' || productAvailability.status === 'LOADING' || wishlists.status === 'LOADING') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'LOADING',\n\n statusMessage: <WishlistItemsStatusMessage errorType='LOADING' text='Loading...' />,\n heading: this._renderHeading(heading)\n };\n return this.props.renderView(errorProps);\n }\n\n if (cart.status === 'FAILED' || productAvailability.status === 'FAILED' || wishlists.status === 'FAILED') {\n const errorProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'FAILED',\n statusMessage: <WishlistItemsStatusMessage errorType='FAILED' text={wishlistErrorGettingWishlist} />,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(errorProps);\n }\n\n const productsList = products && (products as AsyncResult<FullProduct[]>).result;\n\n if (productsList && productsList.length === 0) {\n const emptyViewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'EMPTY',\n statusMessage: <WishlistItemsStatusMessage errorType='EMPTY' text={emptyWishlistText} />,\n heading: this._renderHeading(heading)\n };\n\n return this.props.renderView(emptyViewProps);\n }\n\n const viewProps: IWishlistItemsViewProps = {\n ...(this.props as IWishlistItemsProps<IWishlistItemsData>),\n WishlistItems: {\n moduleProps: this.props,\n className: classnames('ms-wishlist-items', className)\n },\n status: 'SUCCESS',\n heading: this._renderHeading(heading),\n Products: {\n className: 'ms-wishlist-items__products',\n tag: 'ul'\n },\n Product: {\n className: 'ms-wishlist-items__product',\n tag: 'li'\n },\n ProductDetails: {\n className: 'ms-wishlist-items__product-link',\n tag: 'a'\n },\n telemetryContent: this.telemetryContent,\n ProductDimensions: {\n className: 'ms-wishlist-items__product-dimensions'\n },\n products: productsList && this._renderProductList(productsList),\n statusNotExistsMessage:\n productsList && this._getProductNotExists(productsList, emptyWishlistText, noLongerExitsWishlistItemText)\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 private _getProductNotExists(products: FullProduct[], emptytext: string, noLongerExisttext: string): JSX.Element | null {\n if (this.state && this.state.isError) {\n if (products.length === 0) {\n return <WishlistItemsStatusMessage errorType='SUCCESS' text={emptytext} />;\n }\n return (\n <WishlistItemsStatusMessage\n className={'ms-wishlist-items__message-exists-product'}\n errorType='SUCCESS'\n text={noLongerExisttext}\n />\n );\n }\n return null;\n }\n private _renderProductList(products: FullProduct[]): IWishlistItemViewProps[] {\n const {\n priceFree,\n originalPriceText,\n currentPriceText,\n addToCartButtonText,\n outOfStockText,\n removeButtonText,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n productDimensionTypeAmount\n } = this.props.resources;\n const { context, telemetry } = this.props;\n const { imageSettings, enableImageProductLink } = this.props.config;\n\n return products.map((product: FullProduct, index) => {\n const currentProductProps = {\n product: product.ProductDetails,\n price: product.ProductPrice,\n context,\n wishlistState: this.state,\n productUrl: getProductUrlSync(product.ProductDetails, context.actionContext, undefined),\n imageSettings,\n removeFromWishlistText: removeButtonText,\n isInStock: this._isProductInStock(product),\n addToCartText: addToCartButtonText,\n outOfStockText,\n index,\n itemKey: `${product.ProductDetails.RecordId}-${product.ProductDetails.ItemId}-${index}`,\n telemetry,\n moduleId: this.props.id,\n moduleTypeName: this.props.typeName,\n enableImageProductLink,\n inventoryInformationLabel: this._inventoryLabel(product),\n inventoryLabelClassName: this._inventoryClassName(product),\n telemetryContent: this.telemetryContent,\n handlers: {\n onAddToCart: this._addItemToCart,\n onRemoveItem: this._removeItemFromWishlist,\n onDismiss: this._onDismiss\n },\n resources: {\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle: product.ProductDetails.IsGiftCard ? productDimensionTypeAmount : productDimensionTypeStyle,\n freePriceText: priceFree,\n originalPriceText,\n currentPriceText\n }\n };\n return WishlistItem(currentProductProps)!;\n });\n }\n\n // Dismiss alert when addingToCart/removeItem\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private readonly _renderHeading = (heading?: IHeadingData): JSX.Element | undefined => {\n if (!heading) {\n return undefined;\n }\n return (\n <MsDyn365.Text\n className='ms-wishlist-items__heading'\n tag={heading.tag || 'h2'}\n text={heading.text}\n editProps={{ onEdit: this.handleHeadingChange, requestContext: this.props.context.request }}\n />\n );\n };\n\n private readonly _addItemToCart = async (product: SimpleProduct, itemKey: string): Promise<void> => {\n const { context, data, resources, telemetry } = this.props;\n const { cart, productAvailability } = data;\n const { addedToCartSuccessMessage, addedToCartFailureMessage, invoiceInCartErrorMessage } = resources;\n\n const productInventoryInformation = this._getProductInventory({ ProductDetails: product }, productAvailability.result);\n\n if (context) {\n if (cart.result) {\n // Check if the product delivery mode is electronic\n const emailDeliveryModeCode = this.props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode;\n\n const deliveryOptions = await getDeliveryOptionsAsync(\n {\n callerContext: this.props.context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(this.props.context.actionContext)\n },\n [product.RecordId]\n );\n const validateQuantity = this.isQuantityValidationRequired();\n const quantity = this.respectQuantityLimits() ? product?.Behavior?.MinimumQuantity ?? 1 : 1;\n\n const addProductToCartInput = {\n product,\n count: quantity,\n enableStockCheck: context.app.config.enableStockCheck,\n availableQuantity: productInventoryInformation\n ? productInventoryInformation.ProductAvailableQuantity.AvailableQuantity\n : 0,\n additionalProperties: { validateQuantity: validateQuantity },\n isAddEmailDeliveryItemToCart:\n ArrayExtensions.hasElements(deliveryOptions) &&\n ArrayExtensions.hasElements(deliveryOptions[0].DeliveryOptions) &&\n deliveryOptions[0].DeliveryOptions[0].Code === emailDeliveryModeCode\n };\n\n cart.result\n .addProductToCart(addProductToCartInput)\n .then(async result => {\n if (result.status === 'SUCCESS') {\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartSuccessMessage,\n statusCssString: 'success',\n messageGlyph: 'fas fa-check',\n isOpen: true\n });\n } else if (result.substatus === 'MAXQUANTITY') {\n const curQuantity =\n (await cart).cart?.CartLines?.find(item => item.ProductId === product.RecordId)?.Quantity || 0;\n const maxQtyLimitReachedMessage = this._getInventoryValueMessage(productInventoryInformation, curQuantity);\n\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: maxQtyLimitReachedMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else if (result.substatus === 'QUANTITYLIMITS' && validateQuantity) {\n const maxQtyLimitReachedMessage = result.errorDetails?.LocalizedMessage!;\n\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: maxQtyLimitReachedMessage || addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else if (result.substatus === 'INVOICEINCART') {\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: result.errorDetails?.LocalizedMessage || invoiceInCartErrorMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n } else {\n this.props.telemetry.debug('[wishlist-items] Unable to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n }\n })\n .catch(error => {\n telemetry.warning(error);\n telemetry.debug('[wishlist-items] Error trying to Update Cart Line from the wishlist');\n this.setState({\n productId: product.RecordId,\n itemKey,\n userMessage: addedToCartFailureMessage,\n statusCssString: 'danger',\n messageGlyph: 'fas fa-exclamation-triangle',\n isOpen: true\n });\n });\n }\n }\n };\n\n private isQuantityValidationRequired = (): boolean => {\n const isChannelQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n\n const isOrderQuantityLimitsFeatureEnabled = this.isOrderQuantityLimitsFeatureEnabled();\n return isOrderQuantityLimitsFeatureEnabled || isChannelQuantityLimitsFeatureEnabledInHq;\n };\n\n private respectQuantityLimits = (): boolean => {\n const isOrderQuantityLimitsFeatureEnabled = this.isOrderQuantityLimitsFeatureEnabled();\n const validateLimitsPerLine = this.props.data.cartConfiguration?.result?.ValidateDefaultOrderSettingsPerLine ?? false;\n return isOrderQuantityLimitsFeatureEnabled && validateLimitsPerLine;\n };\n\n private isOrderQuantityLimitsFeatureEnabled = (): boolean => {\n const isOrderQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n\n if (!isOrderQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n\n const useSiteBuilderSettings = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n\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 false);\n\n return isOrderQuantityLimitsFeatureEnabledInSiteSettings;\n } else {\n const cartConfiguration = this.props.data.cartConfiguration?.result;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n }\n };\n\n private readonly _removeItemFromWishlist = (productId: number): void => {\n const { context, data, telemetry } = this.props;\n const { wishlists } = data;\n let noLongerLineExist: CommerceListLine[] | undefined = [];\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n const wishlistLineId = this._getWishlistLineIdFromProductId(productId);\n if (userToken && wishlists.result && wishlists.result[0] && wishlistLineId) {\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, [{ LineId: wishlistLineId }])\n .then(commerceList => {\n const castCommerceList: CommerceList | null = commerceList as CommerceList | null;\n\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\n noLongerLineExist = this._getProductsNoLongerExists(castCommerceList);\n if (noLongerLineExist && noLongerLineExist.length > 0) {\n this._removeNoLongerExistsLines(noLongerLineExist);\n } else {\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\n .then(products => {\n const castSimpleProducts: FullProduct[] | null = products as FullProduct[] | null;\n if (castSimpleProducts && castSimpleProducts.length > 0) {\n this.setState({ isError: false });\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\n telemetry.error(error);\n });\n }\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\"[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn't found\");\n }\n }\n };\n\n private _getInventoryValueMessage(product: IProductInventoryInformation | undefined, curQuantity: number): string {\n const { context, resources } = this.props;\n const { maxQuantityLimitText } = resources;\n\n const maxQuantityForLineItem = updateMaxQuantityForCartLineItem(context.app.config.maxQuantityForCartLineItem);\n\n if (!product || !product.ProductAvailableQuantity.AvailableQuantity || !context.app.config.enableStockCheck) {\n return maxQuantityLimitText\n .replace('{maxQuantity}', maxQuantityForLineItem.toString())\n .replace('{curQuantity}', curQuantity.toString());\n }\n\n const minInventory = Math.min(maxQuantityForLineItem, product.ProductAvailableQuantity.AvailableQuantity);\n\n return maxQuantityLimitText.replace('{maxQuantity}', minInventory.toString()).replace('{curQuantity}', curQuantity.toString());\n }\n\n private _getProductInventory(\n product: FullProduct,\n productInventoryCollection: IProductInventoryInformation[] | undefined\n ): IProductInventoryInformation | undefined {\n if (productInventoryCollection && productInventoryCollection.length > 0) {\n for (const productResult of productInventoryCollection) {\n if (product.ProductDetails.RecordId === productResult.ProductAvailableQuantity.ProductId) {\n return productResult;\n }\n }\n }\n return undefined;\n }\n\n private readonly _inventoryLabel = (product: FullProduct): string | undefined => {\n const { productAvailability } = this.props.data;\n if (productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if (productInventoryInformation) {\n return productInventoryInformation.StockLevelLabel;\n }\n }\n\n return undefined;\n };\n\n private readonly _inventoryClassName = (product: FullProduct): string | undefined => {\n const { productAvailability } = this.props.data;\n if (productAvailability && productAvailability.result) {\n const productInventoryInformation = this._getProductInventory(product, productAvailability.result);\n if (productInventoryInformation && productInventoryInformation.StockLevelCode) {\n return `ms-wishlist-items__${productInventoryInformation.StockLevelCode.toLowerCase()}`;\n }\n }\n\n return undefined;\n };\n\n private readonly _isProductInStock = (product: FullProduct): boolean => {\n const { data, context } = this.props;\n const { productAvailability } = data;\n\n if (!context.app.config.enableStockCheck) {\n return true;\n }\n\n if (!productAvailability.result || !product.ProductDetails) {\n return false;\n }\n\n for (const productResult of productAvailability.result) {\n if (\n productResult.ProductAvailableQuantity &&\n productResult.ProductAvailableQuantity.ProductId &&\n productResult.ProductAvailableQuantity.ProductId === product.ProductDetails.RecordId\n ) {\n return productResult.IsProductAvailable;\n }\n }\n\n return false;\n };\n\n private readonly _getWishlistLineIdFromProductId = (productId: number): number | null => {\n const { wishlists } = this.props.data;\n\n if (\n !wishlists.result ||\n wishlists.result.length === 0 ||\n !wishlists.result[0].CommerceListLines ||\n wishlists.result[0].CommerceListLines.length === 0\n ) {\n this.props.telemetry.error('Wishlist content is empty, module wont render.');\n return null;\n }\n\n const foundWishlistItem = wishlists.result[0].CommerceListLines.filter(commerceListLine => {\n return commerceListLine.ProductId === productId;\n });\n\n if (foundWishlistItem && foundWishlistItem[0].LineId) {\n return foundWishlistItem[0].LineId;\n }\n return null;\n };\n\n private readonly _getProductsNoLongerExists = (castCommerceList: CommerceList): CommerceListLine[] | undefined => {\n const noLongerExist: CommerceListLine[] | undefined = [];\n castCommerceList.CommerceListLines?.map(line => {\n const { products } = this.props.data;\n const productsList = products && (products as AsyncResult<FullProduct[]>).result!;\n\n const skipRemove = productsList.filter(product => product.ProductDetails.RecordId === line.ProductId);\n if (skipRemove.length === 0) {\n noLongerExist?.push({ LineId: line.LineId });\n }\n });\n return noLongerExist;\n };\n\n private readonly _removeNoLongerExistsLines = (noLongerLineExist: CommerceListLine[]) => {\n const { context, data, telemetry } = this.props;\n const { wishlists } = data;\n if (context && context.actionContext) {\n const userToken = context.request.user.isAuthenticated && context.request.user.token;\n if (userToken && wishlists.result && wishlists.result[0]) {\n removeLinesAsync({ callerContext: context.actionContext }, wishlists.result[0].Id, noLongerLineExist)\n .then(commerceList => {\n const castCommerceList: CommerceList | null = commerceList as CommerceList | null;\n if (castCommerceList && castCommerceList.Id && context.request.user.isAuthenticated) {\n context.actionContext.update(createGetByCustomerInput({}, null), [castCommerceList]);\n getItemsInWishlists(new ActiveWishlistInput(), context.actionContext)\n .then(products => {\n const castSimpleProducts: FullProduct[] | null = products as FullProduct[] | null;\n if (castSimpleProducts && castSimpleProducts.length > 0) {\n this.setState({ isError: true });\n context.actionContext.update(new ActiveWishlistInput(), castSimpleProducts);\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable to hyderate the wishlist with product information');\n telemetry.error(error);\n });\n }\n })\n .catch(error => {\n telemetry.warning('[wishlist-items] Unable remove items from the wishlist');\n telemetry.error(error);\n });\n } else {\n telemetry.warning(\"[wishlist-items] Unable remove items from the wishlist user token or lineItemID wasn't found\");\n }\n }\n };\n}\n\nexport default WishlistItems;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Module,\n Node\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IWishlistItemViewProps } from '../..';\nimport { IWishlistItemsViewProps } from './wishlist-items';\n\nconst WishlistItemsView: React.FC<IWishlistItemsViewProps> = props => {\n const {\n WishlistItems,\n status,\n statusMessage,\n heading,\n Products,\n products,\n Product,\n ProductDetails,\n ProductDimensions,\n telemetryContent,\n statusNotExistsMessage\n } = props;\n\n return (\n <Module {...WishlistItems}>\n {heading}\n {statusNotExistsMessage}\n {status !== 'SUCCESS' && statusMessage}\n {Products && products && products.length > 0 && (\n <Node {...Products}>\n {products &&\n products.map(product => {\n return product && _renderItem(product, Product, ProductDimensions, ProductDetails, telemetryContent);\n })}\n </Node>\n )}\n </Module>\n );\n};\n\nconst _renderItem = (\n product: IWishlistItemViewProps,\n Product?: INodeProps,\n ProductDimensions?: INodeProps,\n ProductDetails?: INodeProps,\n telemetryContent?: ITelemetryContent\n): JSX.Element | null => {\n const {\n key,\n productImage,\n productLink,\n productPrice,\n productDimensions,\n addToCartButton,\n removeButton,\n productStatusMessage,\n entireProductLink,\n productName,\n productAriaLabel,\n inventoryInformation,\n productUnitOfMeasure\n } = product;\n const payLoad = getPayloadObject('click', telemetryContent!, '', key);\n const productAttributes = getTelemetryAttributes(telemetryContent!, payLoad);\n if (entireProductLink) {\n return (\n <Node key={key} className={Product!.className} {...Product}>\n <Node\n href={entireProductLink}\n className={classnames('entire-product-link ', ProductDetails!.className)}\n {...productAttributes}\n aria-label={productAriaLabel}\n tag={ProductDetails!.tag}\n >\n {productImage}\n {productName}\n {productDimensions && ProductDimensions && (\n <Node {...ProductDimensions}>\n {productDimensions.map(dimension => {\n return dimension;\n })}\n </Node>\n )}\n {productPrice}\n {productUnitOfMeasure}\n </Node>\n {inventoryInformation}\n {addToCartButton}\n {removeButton}\n {productStatusMessage}\n </Node>\n );\n }\n return (\n <Node key={key} className={Product!.className} {...Product}>\n {productImage}\n {productLink}\n {productDimensions && ProductDimensions && (\n <Node {...ProductDimensions}>\n {productDimensions.map(dimension => {\n return dimension;\n })}\n </Node>\n )}\n {productPrice}\n {addToCartButton}\n {removeButton}\n {productStatusMessage}\n </Node>\n );\n};\n\nexport default WishlistItemsView;\n"],"names":["CartLineItemFunctions","renderProductDimensions","Product","DimensionStrings","Dimensions","map","productDimension","DimensionTypeValue","React","key","RecordId","className","colorString","DimensionValue","Value","configString","sizeString","IsGiftCard","amountString","styleString","renderDiscountLines","props","data","cartLine","DiscountLines","length","discountLine","index","OfferId","OfferName","resources","discountStringText","DiscountCost","PriceComponent","isSalesLine","price","CustomerContextualPrice","PeriodicDiscount","DiscountAmountWithoutTax","BasePrice","DiscountAmount","context","id","typeName","undefined","Percentage","renderInventoryLabel","inventoryInformationLabel","inventoryCssName","inventoryLabelClassName","renderShippingLabel","_props$context$reques","pickupDeliveryModeCode","request","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","cartline","hasShippingMethod","_channelDeliveryOptio","DeliveryMode","PickupDeliveryModeCodes","some","deliveryMode","shippingChargeLines","ChargeLines","filter","chargeLine","IsShipping","freightFee","reduce","chargeTotal","CalculatedAmount","priceComponent","freePriceText","shippingChargesText","renderOtherCharges","_cartline$ChargeLines","otherCharges","chargeline","otherCharge","Description","CartLineItemComponent","msdyn365Commerce","createComponent","_objectSpread","component","productUrl","product","destructDimensionStrings","fallbackImageUrl","getFallbackImageUrl","ItemId","actionContext","requestContext","apiSettings","imageSettings","cropFocalRegion","ObjectExtensions","isNullOrUndefined","inputQuantityAriaLabel","productDimensions","renderDisountLines","payLoad","getPayloadObject","telemetryContent","toString","prodAttribute","getTelemetryAttributes","productName","Name","_updateQuantity","event","quantityOnChange","parseInt","target","value","_generateSelectMenu","quantity","currentQuantity","onChange","nodes","i","push","_generateMenu","_generateQuantityAndPrice","_props$data$product","errorMessage","isOutOfStock","isQuantityEditable","classNames","Quantity","quantityDisplayString","maxQuantity","NetAmount","Price","NetAmountWithoutTax","NetPrice","originalPriceText","currentPriceText","displayMode","reducedDimensions","str","Image","src","primaryImageUrl","fallBackSrc","altText","gridSettings","loadFailureBehavior","Object","assign","href","jsxName","MasterProductId","MasterProdDisplay","masterProdId","variantName","ArrayExtensions","hasElements","showShippingChargesForLineItems","constructor","super","this","state","prodName","componentDidMount","masterProductInput","SelectedVariantInput","channelId","getSelectedVariant","then","masterProduct","setState","catch","e","console","error","render","name","SuggestionType","AutoSuggestInput","searchText","top","suggestionType","hitPrefix","hitSuffix","getCacheKey","getCacheObjectType","dataCacheType","searchQuery","topResultsCount","async","_getAutoSuggest","input","autosuggest","ctx","searchCriteria","ProductSearchCriteria","SearchCondition","Context","ChannelId","CatalogId","catalogId","HitPrefix","HitSuffix","searchSuggestions","getSearchSuggestionsAsync","callerContext","queryResultSettings","Paging","Top","item","ImageUrl","generateImageUrl","AllSearchResults","telemetry","createObservableDataAction","action","Error","autoSuggestPromises","Promise","all","inputData","KeywordSuggestionsComponent","suggestions","reactNodes","_assembleNode","text","ariaLabel","replace","RegExp","contentAction","etext","attribute","Id","_generateLink","_getHighlightedText","suggestion","searchPageURL","searchQsp","formattedLink","route","indexOf","formattedText","dangerouslySetInnerHTML","getRichTextHtml","ProductSuggestionsComponent","autoSuggestProps","productSuggestionHeading","moduleType","moduleId","title","_renderTitle","items","productAutoSuggestionHeading","thumbnail","_renderThumbnail","Value3","DecimalValue","_renderPrice","LiProduct","_getLiWrapper","AProduct","_getAWrapper","tag","recid","getProductPageUrlSync","adjustedPrice","basePrice","config","defaultImageSettings","viewports","xs","q","w","h","lg","xl","lazyload","CategorySuggestionsComponent","categorySuggestionHeading","categoryAutoSuggestionHeading","format","splitValue","split","pop","_getCategoryLink","searchRefiners","urlPath","categoryRefiners","find","refiners","KeyName","refiner","Values","RefinerRecordId","encodedRefiner","encodeURIComponent","JSON","stringify","compressRefiners","compressedRefinerKeys","compressedRefiners","forEach","compressedRefiner","refinerKey","FormComponent","searchPlaceholder","hideSearchLabel","isSearchFormExpanded","searchTextInput","handleInputChange","maxChars","disableSubmitSearch","handleCancelSearchChange","query","ariaLabelCancel","ariaLabelSearch","ariaLabelSubmit","onInputChange","labelNode","htmlFor","inputNode","type","placeholder","ref","maxLength","submitBtnNode","Button","label","cancelBtn","onClick","submitBtn","LabelComponent","searchLabelClass","searchtext","searchCollapsedLabel","attributes","innerRef","Search","waitTime","_focusOutTarget","closest","_clearAutoSuggestState","_keyup","keyCode","KeyCodes","Escape","formReference","current","contains","autoSuggestResultDiv","searchState","defaultBasicSearchUrl","searchQueryStringParameter","update","createSearchStateInput","_handleInputChange","cancellabelDebounce","cancel","_debounce","getSearchSuggestionsAction","_getSuggestionType","inputSuggestionType","results","_getSearchRefiners","autoSuggestAriaLabel","_setAutoSuggestResultCount","exception","debug","setTimeout","suggestionTypes","distinctSuggestionTypes","suggestionTypeItem","charAt","toUpperCase","slice","join","_handleSubmit","app","preventDefault","focus","searchURL","_appendQueryParams","getUrlSync","document","location","_handleCancelSearchChange","isInitialState","qsp","result","_result$AllSearchResu","itemCount","autoSuggestResultScreenReaderDiv","ariaLiveRegion","suggestResultString","autoSuggestFoundMessage","emptyResultString","noAutoSuggestionMessage","innerText","setAttribute","searchKeywordSuggestClass","searchProductSuggestClass","searchCategorySuggestClass","searchInputMaxLength","suggestionTypeCriterion","searchFormClass","getTelemetryObject","telemetryPageName","friendlyName","body","addEventListener","window","componentWillUnmount","removeEventListener","componentDidUpdate","params","isEditor","searchLabelArialLabel","cancelBtnAriaLabel","searchBtnAriaLabel","submitBtnAriaLabel","searchplaceholderText","keywordSuggestions","Keyword","None","productSuggestions","categorySuggestions","Category","viewProps","moduleProps","classnames","AutoSuggestAriaLabel","AutoSuggestAriaLabelText","AutoSuggest","KeywordSuggest","ProductSuggest","CategorySuggest","SearchForm","FormWrapper","role","autoComplete","onSubmit","UlKeyword","UlProduct","UlCategory","form","autosuggestKeyword","autosuggestProduct","autosuggestCategory","callbacks","renderView","getProductSearchRefinersAsync","_renderForm","Node","_renderKeywordSuggestions","_renderProductSuggestions","_renderCategorySuggestions","Module","handleKeyDown","getElementsByClassName","focusable","getElementById","elements","querySelectorAll","firstFocusable","lastFocusable","ctrlKey","altKey","keys","9","shiftKey","log","CarouselModule","_handleDismissCarousel","cookies","set","dismissCarousel","_next","slots","nextIndex","activeIndex","content","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","get","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","retrieveItems","renderModuleAttributes","Carousel","pause","pauseOnHover","ride","autoplay","interval","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","keyboard","validateCartAsync","cart","propsContext","cartResult","cartVersion","shouldRetry","arguments","Version","warning","AsyncResult","resolve","_validationResult$Val","validationResult","CartsDataActions","bypassCache","ValidationResultsByLineId","refreshCart","refreshError","validateError","cartLineQuantityUpdatedAsync","isQuantityLimitsFeatureEnabled","products","cartLineToUpdate","isUsingDefaultOrderSettingsMax","_modifiedProduct$Beha2","modifiedProduct","ProductId","Behavior","MaximumQuantity","cartLineId","LineId","newQuantity","additionalProperties","updateLineResult","updateCartLineQuantity","message","getProductByProductId","productId","getProductByProductIdAndWarehouse","warehouseId","cartState","targetWarehouseValue","WarehouseId","_product$Behavior","InventoryLocationId","_renderDeliveryLocation","deliverylocation","FulfillmentStoreId","_foundProductDelivery","orgUnitName","_getOrgUnitName","orgUnitLocations","foundProductDeliveryOption","productDeliveryOptions","deliveryOption","delivery","DeliveryOptions","option","Code","shippingText","_renderStoreLocation","fulfillmentStoreId","foundLocation","orgUnitLocation","OrgUnitNumber","OrgUnitName","_assembleCartlines","cartlines","foundProductAvailability","_foundProductAvailabi","productAvailabilites","productAvailability","_productAvailability$","ProductAvailableQuantity","foundProductDeliveryOptions","removeButtonText","removeItemClickHandler","availableQuantityInStock","isStockCheckEnabled","outOfStockThreshold","AvailableQuantity","_getCartItemAvailableQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","maxCartlineQuantity","isServiceItem","ItemTypeValue","ReleasedProductType","Service","onRemoveClickHandler","onRemoveClickFunction","TelemetryConstant","RemoveCartItem","removeCartItemAttribute","getProductUrlSync","MsDyn365","isBrowser","isChannelTypeB2B","_cartline$CatalogId","fullUrl","URL","searchParams","hasError","catalogs","PrimaryImageUrl","deliveryLocation","remove","storeLocation","getMiniCartData","miniCartData","CartLines","hasInvoiceLine","getActiveCartProductsAction","ActiveCartProductsInput","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","availableQuantity","getDeliveryOptionsForCartLineItems","ProductDeliveryOptionsForCartLineItems","deliveryOptions","CartIcon","retailMultiplePickUpOptionEnabled","getSortedCartLines","sortOrder","lines","sort","item1","item2","_item2$LineNumber","_item1$LineNumber","LineNumber","_item1$LineNumber2","_item2$LineNumber2","_getImageSettings","sm","_removeItemFromCartHandler","cartlineToRemove","cartLineIds","removeCartLines","isCartValid","payload","TelemetryEvent","CheckOut","Checkout","checkoutBySignInAttributes","GuestCheckout","checkoutByGuestAttributes","ViewShoppingBag","viewShoppingBagAttributes","_this$props$data$orgU","reaction","_this$props$data$cart","_setQuantityLimitsFeatureFlag","_validateCart","prevProps","shouldComponentUpdate","nextProps","nextState","_this$props$context$r","_cart$cart$CartLines","_this$state$miniCartD","_this$state$miniCartD2","_this$props$data$chan","_this$props$data$feat","enableHoverCart","isAnonymousCheckout","user","isAuthenticated","signInUrl","guestCheckoutUrl","cartUrl","checkoutURL","_getCheckoutURL","isCartEmpty","shouldShowMiniCart","isProductAddedToCart","addToCartBehavior","AddToCartBehavior","showMiniCart","emailDeliveryModeCode","EmailDeliveryModeCode","cartLines","_getCartLines","validInventoryAcrossCartLines","validateCartLinesInventory","isValid","includeFlyout","status","totalItemsInCart","goToCartButtonText","goToCartButtonTitle","flyoutTitle","flyoutTooltip","UncontrolledTooltip","placement","hideArrow","trigger","shouldShowCloseButton","cartPageUrl","hideAriaHidden","TotalAmount","priceString","totalPriceFormatString","cultureFormatter","formatCurrency","featureState","feature","IsEnabled","cartIcon","CartIconComponent","cartLabel","cartQtyLabel","FlyoutContainer","CartlinesWrapper","miniCartWrapper","miniCartItemWrapper","checkoutAsSignInUserButton","disabled","checkoutButtonTitle","checkoutAsGuestButton","guestCheckoutButtonTitle","goToCartButton","checkoutBlockedDueToUnavailableFunds","totalPrice","_cart$result$cart$Ver","_cart$result","lastValidatedCartVersion","ValidationResultsPairs","isAbsoluteUrl","urlCheck","returnURL","origin","includes","_this$props$data$cata","FlyoutCartLineItems","cartLinesSortOrder","enableStockCheck","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","productDimensionTypeSize","productDimensionTypeColor","productDimensionTypeConfiguration","productDimensionTypeStyle","quantityDisplayText","salesAgreementPricePrompt","removeCartButtonText","outOfStockText","outOfRangeOneText","outOfRangeFormatText","_featureStatuses$find","_featureStatuses$find2","featureStatuses","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find3","customerInformation","customerInfo","IsB2b","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","__decorate","observer","_renderCartlines","_ref","description","descClassName","StringExtensions","isNullOrEmpty","isChecked","ariaSetSize","ariaPosInSet","checked","AddressDetailItemFunctionComponent","labelText","isDisabled","fallbackPattern","onChangeMinValue","checkBoxLabel","disclaimerText","heading","selectedDate","setSelectedDate","useState","isDateEnabled","setIsDateEnabled","minDate","setMinDate","today","Date","toISOString","handleCheckboxChange","selectedValue","min","pattern","groupName","deliveryOptionRef","priceFree","selectedItemId","channelConfig","count","changeCurrentDeliveryOption","deliveryClassName","optionClassName","response","RadioButtonComponent","DescriptionComponent","currencyCode","Currency","GetLineItems","lineClassName","lineItemClassName","changeText","changeButtonText","showDeliveryOption","setShowDeliveryOption","handleClick","deliveryCode","UpdateInCart","_getProduct","_product","_getLineItemComponent","_cartLine$CatalogId","productDimensionTypeAmount","quantityDisplayStringLabel","priceCurrency","deliveryMethodLabel","CheckoutCartLineDeliveryOptionsRadio","CheckoutDeliveryOptions","isLoading","groupDeliveryOptions","cartLineSelectedDeliveryOptions","checkoutErrorRef","cartLinesDeliveryOptions","init","moduleState","onEdit","isSelectDefaultOptionEnabled","onCancel","useDefaultDeliveryOption","canShip","cartDeliveryMode","getSavedDeliveryOption","isMultipleAddressShippingEnabled","getCartLinesSavedDeliveryOption","loadDeliveryOptions","_this$props$data$chec","checkout","checkoutCart","getCartLinesForShipping","isDeliveryModeExists","getDeliveryOptionSelected","selectedItem","DeliveryOption","getErrorMessage","errorMessageTitle","CheckoutDeliveryOptionsError","ErrorTitleComponent","ErrorMessageComponent","getDeliveryOptionList","getAriaLabelWithPrice","code","radioButton","onDeliveryOptionChange","getSaveButton","saveBtnLabel","color","onSave","getEditButton","editBtnLabel","getCancelButton","cancelBtnLabel","setError","setHasError","onUpdating","clearError","_this$props$data$chec2","information","updateShouldCollapsePaymentSection","newShouldCollapsePaymentSection","_this$props$data$chec3","updateCartLinesDeliverySpecification","updateCartDeliverySpecification","savedDeliveryOption","_this$props$data$chec4","onReady","cartLinesForShipping","existingCartLineSelectedDeliveryOption","cartLineDeliveryOption","selectedDeliveryOption","deliveryModeId","trim","checkoutState","updateCartDeliverySpecificationInput","shippingAddress","onPending","_response$errorDetail","errorDetails","LocalizedMessage","genericErrorMessage","setIsCancellable","_this$props$data$chec5","lineSpecs","checkoutCartLines","group","_checkoutCartLines$fi","address","ShippingAddress","lineSpec","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ShipToAddress","DeliveryAddress","lineDeliverySpecifications","_this$props$data$chec6","_cartLine$LineId","cartLineSelectedDeliveryOption","RequestedDeliveryDate","requestDeliveryDate","updateCartLines","updatedCartLinesObject","_unused","_this$channelDelivery","getDeliveryOptions","_this$props$data$chec7","cartId","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","filterDeliveryModeOption","FilterDeliveryModeOption","FilterOutNonCarrierDeliveryMode","getDeliveryOptionsAsync","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_unused2","deliveryOptionsNotFound","_this$props$data$chec8","_this$props$data$chec9","updateHasCartDeliveryMode","newHasCartDeliveryMode","isPaymentVerificationRedirection","_this$props$data$chec10","getStoredDeliveryOptions","_this$props$data$chec11","_this$props$data$chec12","_this$props$data$chec13","cartLinesWithShippingAddress","_this$props$data$chec14","_this$props$data$chec15","_this$props$data$chec16","_this$props$data$chec17","isExpressCheckoutApplied","getGroupDeliveryOptions","isExpressPaymentAppliedInCartPage","currentTarget","onCartLineDeliveryOptionChange","onCartLineRequestDeliveryDateChange","deliveryDate","getCheckoutCartLineGroupDeliveryOptions","getImageSettings","requestDeliveryDateEnabled","enableRequestDeliveryDate","groupDeliveryOption","cartLine1","_cartLine$LineId2","_ref2","_cartLine$LineId3","_this$cartLineSelecte","_cartLine1$ShippingAd","_cartLine1$ShippingAd2","_groupDeliveryOption$","isNewLine","isShowLabel","cartLineGroupShippingAddressLabel","FullAddress","cartLineGroupDeliveryOptionsLabel","cartLineGroupDeliveryOptionsText","CheckoutCartLineDeliveryDate","cartLineGroupDeliveryRequestDeliveryDateText","cartLineGroupDeliveryRequestDeliveryDateDisclaimerText","cartLineGroupDeliveryRequestDeliveryDate","_this$cartLineSelecte2","_this$props$data$prod","_ref3","_cartLine$LineId4","selectedDeliveryOption1","shippingChargesString","_this$props$data$chec18","getGroupByDelivery","groupBy","_item$ShippingAddress","GetDeliveryOptionsForCartLineAddressInput","getDeliveryOptionsForCartLineAddress","_group$cartLineIds","_unused3","multipleAddressShippingEnabled","timeoutRetailCall","timeoutToCallRetail","_this$props$data$cart2","properties","ExtensionProperties","property","Key","StringValue","parse","_this$expressPaymentD","_this$expressPaymentD2","expressPaymentDetailsFromCartPage","isExpressCheckoutAppliedInCartPage","_this$props$data$chec26","when","isDataReady","_this$props$data$chec19","_this$props$data$chec20","_this$props$data$chec21","_this$props$data$chec22","_this$props$data$chec23","_this$props$data$chec24","_this$props$data$chec25","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec27","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec28","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","isReady","isUpdating","isError","isShowList","isShowSelected","deliveryOptionAriaLabel","deliveryOptionsData","alert","ErrorComponent","errorMessageData","viewState","isShowSaveButton","hasExternalSubmitGroup","isShowEditButton","isShowCancelButton","classname","DeliveryOptionsList","list","deliveryOptionSelected","waiting","Waiting","checkoutCartLineGroupDeliveryOptions","enableCheckoutCartLineDeliveryOptions","saveButton","editButton","cancelButton","observable","computed","withModuleState","DeliveryOptionList","DeliveryOptionSelected","onApplyHandler","onApplyGiftCard","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","Alert","assertive","fade","includeAlertClass","isOpen","inputNumber","inputPin","inputExp","applyButton","showGiftCardPinInput","showGiftCardExpInput","inputProps","inputNumProps","inputPinProps","inputExpProps","onRemoveHandler","onRemoveGiftCard","giftCard","_giftCard$Id","getItem","getFormattedPrice","canRemove","enteredGiftCardLabel","giftCardAvailableBalanceLabel","removeGiftCardButton","balance","Balance","CardCurrencyCode","giftCardLast4Digit","substr","selectedGiftCard","removeButton","itemProps","getList","giftCards","listProps","SupportedGiftCardType","CheckoutGiftCard","_this","isFetchingGiftCard","isRequired","isEnabled","giftCardExtends","onSkip","couldPaidByGiftCard","giftCardSupported","External","shouldBeEnabledForGuest","handleCancelOrSubmit","hasSelectedItem","enterGiftCardNumber","enterGiftCardPin","enterGiftCardExp","removeGiftCard","applyGiftCard","giftCardTypes","getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","getGiftCard","addGiftCard","Pin","ExpirationDate","TenderTypeId","findGiftcardTenderTypes","tenderTypes","operationId","giftcardType","matchedTenderTypes","Internal","tenderType","OperationId","ConnectorId","noBalanceError","invalidCardInfoError","invalidCardTypeError","noCardPinError","noCardExpError","supportedGiftCardType","getTenderTypesAsync","internalGiftcardTenderTypes","OPERATIONS","PayGiftCertificate","externalGiftcardTenderTypes","Both","month","Number","year","getGiftCardAsync","activeGiftCard","emptyInputError","duplicatedCodeError","invalidCodeError","card","resolveCardTypesAsync","CardType","GiftCard","loyaltyAmount","customerAccountAmount","getLoyaltyAmount","getGiftCardTotalAmount","getCustomerAccountAmount","showAdditionalFields","shouldPayGiftCard","isOBORequest","EnabledPaymentsForOBO","moduleClassName","checkoutGiftCardProps","showGiftCard","TitleCompoent","From","SelectedGiftCard","GiftCardList","_ref4","_objectWithoutProperties","_excluded","AddResource","_ref5","ShowResource","_ref6","max","step","ariaValueMax","ariaValueMin","ariaValueNow","onBlur","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","disableAddLoyaltyComponent","checkoutLoyalty","showLoyalty","Heading","headingTag","loyaltyHeadingText","coveredAmountText","TextComponent","loyaltyCoveredAmountText","amount","addLoyalty","drawer","Drawer","toggleButtonText","_drawerHeader","openGlyph","closeGlyph","glyphPlacement","cardNumber","rewardPoints","RewardPoints","points","_renderPointSection","availablePointsLabel","expiringLoyaltyPointsLabel","loyaltyAmountContainer","appliedLoyaltyAmountContainer","loyaltyAmountLabel","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","loyalPointsRequest","createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput","_query","callActionOrExecute","_points$MaxCurrencyVa","GetLoyaltyTransactionEstimationInput","newMaxPoints","AddCheckoutLoyalty","rewardPoint","ShowCheckoutLoyalty","isValidationPassed","isPlaceOrderLoading","isPlaceOrderClicked","handleCheckoutHeadingChange","checkoutHeading","cartStatus","isEmptyCart","getSlotItems","triggerPaymentWithPlaceOrder","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","shouldTriggerPaymentWithPlaceOrder","onPlaceOrder","checkoutOutOfStockErrorMessage","orderConfirmation","isOverMaxQuantity","_checkout$result","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","placeOrder","handleCheckoutError","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","electronicDeliveryInvoiceAddress","hasShippingAddress","useShippingAddressAsElectronicDeliveryInvoiceAddress","emailDeliveryCartLines","line","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","updatedCart","_this$props$context$r2","productInventoryInformation","_cart$CartLines","_cart$CartLines2","productsThatShouldValidateInventory","_cartlineProduct$Beha","cartlineProduct","isStockedItem","IsStockedProduct","isEmailDelivery","productInventory","_productInventory$Pro","cartLinesInventoryValidation","getActiveChildModuleStates","childIds","getModule","hasModuleState","onContainerReady","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","Msdyn365","validateForCheckout","retry","_shouldValidateQuantityLimits","validateForCheckoutAsync","_result$ValidationFai","ValidationFailuresByCartLines","isB2BSite","isOrderQuantityLimitsFeatureEnabledInSiteSettings","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","checkoutApiFailureErrorMessage","invoiceCheckoutApiFailureErrorMessage","checkoutResult","apiError","statusCode","errorCode","setCheckoutErrors","_error$data","shouldEnableSinglePaymentAuthorizationCheckout","AdditionalContext","isEditorialMode","isEmpty","isTermsAndConditionAccepted","disableForOBO","isPaidOffByCustomerAccount","amountDue","asyncResultStatus","AsyncResultStatusCode","LOADING","_this$props$data$chec29","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","isCartReady","_this$props$data$chec30","isPaymentSectionContainerReady","_this$props$data$chec31","_this$props$data$chec32","_this$props$data$chec33","_this$props$data$chec34","redirectAdditionalContext","isPaymentVerificationRequired","_this$props$data$chec35","isPaymentSectionContainerHasError","_this$props$data$chec36","_this$props$data$chec37","isBillingAddressHasError","_this$props$data$chec38","_this$props$data$chec39","updateIsBillingAddressHasError","newIsBillingAddressHasError","canPlaceOrder","_this$props$data$chec40","_this$props$data$chec41","updateIsPlaceOrderEnabledInRedirection","newIsPlaceOrderEnabledInRedirection","_this$props$data$chec42","_this$props$data$chec43","checkoutErrorLocation","checkoutPaymentErrorLocation","ErrorCode","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","CheckoutPaymentInstrument","_this$props$data$chec44","_this$props$data$chec45","shouldFocusOnCheckoutError","_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","_this$props$data$chec58","_this$props$data$chec59","_document","_this$props$data$chec60","disableGuidedCheckoutFlow","backToShopping","placeOrderText","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","allCheckoutInformation","checkoutInformation","info","checkoutExpressPaymentContainer","isConsentGiven","isMobile","device","Type","backToShoppingUrl","termsAndConditions","BackToShopping","backToShoppingAttributes","checkoutBtnText","hasCartDeliveryMode","hasGuestCheckoutEmail","hasExpressPaymentContainer","style","display","hasSalesOrder","salesOrder","checkoutProps","headerProps","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","renderMsdyn365Text","AlertComponent","loading","_this$props$data$chec61","_this$props$data$chec62","canShow","guidedForm","GuidedFormComponent","resource","orderSummary","getOrderSummary","invoicePaymentSummary","getInvoicePaymentSummary","lineItems","getLineItems","placeOrderButton","PlaceOrderButtonComponent","keepShoppingButton","checkoutGuidedFormHasError","values","every","SUCCESS","FAILED","editProps","PickUpAtStoreComponent","PickUpAtStore","EmailDeliveryComponent","EmailDelivery","LineItemComponent","LineItem","pickUpAtStore","emailDelivery","LineItemGroupComponent","LineItemDeliveryGroup","LineItemList","lineItem","LineItemGroupComponentWithMultiplePickUp","lineItemWraper","lineItemWraperIcon","LineItemComponentWithMultiplePickUp","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","LineItems","Header","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","OrderSummaryComponent","_ref9","subtotal","shipping","tax","totalDiscounts","loyalty","customerAccount","orderTotal","PaymentSummaryComponent","_ref10","invoices","totalAmountLabel","invoiceLabel","invoiceSummaryTitle","InvoiceSummary","orderTotalLabel","_featureState$result","_getDeliveryLocation","locationMatch","_input$data$catalogs","shippingCharges","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","_getEmailDeliveryComponents","emailDeliveryText","_getLineItemsComponents","isPickUp","_getCartPickDeliveryMode","cartLineItem","isNullOrWhitespace","_countItems","_filterItemsByDiliveryType","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","_productDeliveryOptio","suffix","handleLineItemHeadingChange","lineItemsHeading","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","getGroupByStorePickup","groupDelivery","cartLinesGroup","cartLinesGrp","entries","groupByDeliveryType","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","groupTitle","iconClass","_getLineItems","editCartText","EditCart","groupClass","orderSummaryHeading","subTotalLabel","shippingLabel","taxLabel","loyaltyLabel","giftcardLabel","totalDiscountsLabel","freeText","toBeCalculatedText","customerAccountLabel","showLineItems","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","orderSummaryProps","OrderSummary","otherChargeLabel","isTaxIncludedInPrice","IsTaxIncludedInPrice","isShowTaxBreakup","CheckoutGuidedCard","editButtonRef","formCardRef","renderFooder","isVisted","isSubmitting","isCancelAllowed","hasControlGroup","saveAndContinueBtnLabel","canSubmit","canCancel","Save","SaveContinue","saveBtnAttributes","Cancel","cancelBtnAttributes","focusOnFirstFocusableElement","node","child","querySelector","focusOnEditButton","scrollToTitle","formCard","scrollIntoView","getTitle","Tag","_getModules","_getId","isActive","onNext","shouldFocus","children","childrenModules","childModule","childId","childState","setCheckoutErrorFocus","isExpanded","isPending","hasInitialized","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","hidden","initialized","ready","pending","updating","paymentInstrumentModuleId","CheckoutGuidedForm","currentStep","getEnabledModules","_enableAfterModule","Boolean","nextChildId","_isPaymentSectionContainer","_sectionState$childId","sectionState","currentId","getStep","getId","getHeading","moduleChildId","_state$childIds","shouldCollapseAfterRedirect","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","GuidedCard","enableControl","buttonsStates","onPlaceOrderHandler","isBusy","buttonSetState","setIsBusy","Purchase","PayCard","PayLoyalty","PayCustomerAccount","orderedProducts","redirect","PlaceOrder","balanceCheckButton","GiftCardBalanceCheck","_isEnabled","_getFormattedPrice","_enterGiftCardNumber","_enterGiftCardPin","_enterGiftCardExp","_setError","_applyGiftCard","_getGiftCardTypes","_getGiftCard","_findGiftcardTenderTypes","giftCardBalanceCheckProps","Form","Item","CatalogLabelComponent","validateCatalogId","isB2b","catalog","EffectiveAmount","EffectivePercentage","IsInvoiceLine","unitOfMeasureDisplayType","DefaultUnitOfMeasure","SalesAgreementLineRecordId","_props$context$reques2","_props$primaryImageUr","OmniChannelMedia","renderUnitOfMeasure","renderSalesAgreementPrompt","productAttribute","imgeClassName","newValue","lineIndex","NetAmountWithAllInclusiveTax","GrossAmount","ExtendedPrice","salesAgreementLineId","_generateQuantityandPrice","IncrementalQuantity","currentCount","decrementButtonAriaLabel","incrementButtonAriaLabel","isCartStateReady","isGiftCard","priceEditorResources","CartLinePriceEditor","InvoiceSummaryLine","cssLabel","_buildPaymentSummarySection","_computedLoyaltyAmount","invoiceLines","invoiceLine","InvoiceAmount","InvoiceId","giftCardAmount","_computeGiftCardAmount","giftCardTotalValue","giftCardCounter","Math","totalAmountAfterGiftCard","OrderSummaryLine","_buildOrderSummarySection","getDeliveryMode","featureSate","pickupDeliveryMode","dM","SubtotalAmount","SubtotalAmountWithoutTax","TaxAmount","TaxOnNonShippingCharges","OtherChargeAmount","hasDeliveryMethod","getDeliveryConfiguration","deliveryModes","taxOnShippingCharge","TaxOnShippingCharge","shippingChargeAmount","ShippingChargeAmount","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual","OrderTemplateActions","onRemoveOrderTemplate","handlers","itemKey","removeOrderTemplateActionHandler","OrderTemplateRender","orderTemplate","removeFromOrderTemplateListText","orderTemplateState","enableImageProductLink","onDismiss","orderTemplateImage","_renderOrderTemplateImages","orderTemplateLines","orderTemplateAriaLabel","_renderAriaLabel","orderTemplateName","_getOrderTemplatePageUrl","_getUrlSync","url","separator","totalLines","addToCartButton","AddOrderTemplateToCartComponent","moduleTypeName","addToCartText","addToBagText","dialogStrings","isMultipleCatalogFeatureEnabledInHq","orderTemplateStatusMessage","userMessage","statusCssString","toggle","onClickHandler","_line$productListLine","_line$fullProduct$Pro","_line$fullProduct","_line$fullProduct2","_line$fullProduct$Pro2","_line$fullProduct3","_getFallbackImageUrl","_line$fullProduct4","_context$request$app","fullProduct","_updateProductUrlCatalog","ProductDetails","productListLine","productDetails","OrderTemplateListStatusMessage","errorType","modalCloseButtonReference","onCancelHandler","isCreateOrderTemplateDialogOpen","setOrderTemplateNameDialogOpen","onCreateButtonClick","createOrderTemplateText","OrderTemplateNameDialog","modalOpen","isUpdateDialog","setModalOpen","createOrderTemplateDialogResources","onSuccess","onOrderTemplateCreated","parentElementRef","OrderTemplateList","_isChannelMultipleCatalogsFeatureEnabled","_onDismiss","_reloadPage","reload","_onRemoveFromOrderTemplateList","productListId","orderTemplates","token","p","productList","deleteAsync","headerStatusMessage","deleteOrderTemplateFailedText","messageGlyph","_heading$text","_heading$tag3","emptyOrderTemplateText","createNewTemplateButtonText","orderTemplatesData","orderTemplateListHeading","orderTemplateListTitle","_heading$tag","errorProps","statusMessage","Spinner","msg","progressNotificationText","_heading$tag2","emptyViewProps","createOrderTemplateButton","CreateNewTemplateButtonComponent","_generateOrderTemplateNameDialogResources","templateHeaderStatusMessage","OrderTemplates","OrderTemplate","_renderOrderTemplateList","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","currentTemplateProps","addToBagButtonText","closeWindowButtonText","addToCartFailureMessage","addToCartSuccessMessage","addToCartProcessMessage","orderTemplateErrorMessage","linesAddedToCartDialogResources","viewCartButtonText","orderTemplateCloseButtonText","linesAddedToCartHeaderItemsOneText","linesAddedToCartHeaderLinesOneText","linesAddedToCartHeaderLinesFormatText","linesAddedToCartHeaderMessageText","OrderTemplateListView","_renderOrderTemplate","CONTENT","AddLineToTemplate","productCatalogs","selectedProduct","selectedCatalogId","addLineButtonRef","_renderSearchForm","searchButtonAriaLabel","searchModalPlaceholderText","selectCatalogTitleText","_onSearchSubmit","_onCatalogSelectionChange","_getCatalogNodes","autoFocus","_get","Loading","_getSearchResults","NotFound","ProductList","_onQuantityChangeHandler","selectedQuantity","_onSelectItem","varianteInput","productVariant","dimensions","_getProductDimensions","selectedProductDimensions","ProductConfiguration","_onBackButtonClickHandler","_highlightSearchTerm","parsedName","unescape","__html","_resultCountText","searchResultsCountVerbage","searchResultsCountSubject","_addItemToTemplateHandler","orderTemplateId","AddItemToOrderTemplateInput","addItemToOrderTemplate","reloadPage","_toggleModalHandler","onTelemetryClick","_getCatalogs","onComponentDidMount","_this$searchTextInput","onComponentDidUpdate","_this$searchTextInput2","addLineModalLinkText","backToResultsText","modalProps","Modal","ModalHeader","showBackArrow","_renderContent","addToTemplateHandler","onQuantityChangeHandler","highlightSearchTerm","searchForm","productProps","clickHandler","renderResultCountText","ModalBody","notFoundSearchErrorNotice","notFoundSearchErrorRedediation","NotFoundComponent","searchErrorMessage","getCatalogId","productCatalog","isSelected","selected","searchCriteriaInput","IncludeAttributes","searchByCriteriaAsync","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","Dropdown","selectMenu","_onChanged","selectedIndex","dropdownId","selectId","dropdownList","dropdownName","OrderTemplateQuantity","_validateMin","minValue","currentInput","_handleChange","glyphMinusClassName","decrementGlyphClass","glyphPlusClassName","incrementGlyphClass","incDisabled","currentValue","extraClass","getChangeHandler","_onIncrementalChange","tabIndex","updatedQuantity","inputElement","HTMLInputElement","defaultProps","selectedDimensions","_getDimensionsError","dimensionName","dimensionMissingError","_addToTemplateHandler","showAddConfirmation","errors","add","missingDimensions","dimension","ProductListId","addToTemplateDuplicateError","addToTemplateGenericError","_onQuantityChange","_updateDimensionValue","productDimensionFull","newValueId","DimensionValues","_onDimensionChanged","_this$state$errors","remainingDimensionsErrors","selection","buttonDisabled","mappedDimensions","variantProduct","dimensionInput","variantDimensions","availabilityInput","ProductAvailabilitiesForSelectedVariantInput","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","priceInput","PriceForSelectedVariantInput","productPrice","getPriceForSelectedVariant","productAvailableQuantity","unitPrice","a","b","_getDropdownName","dimensionType","_product$Name","_product$PrimaryImage","_product$Name2","addItemToTemplateText","addLineProductUnitPricePrefix","quantitySelectLabel","addLineProductUnitOfMeasurePrefix","totalPriceLabel","isMultipleCatalogSelect","_formatPrice","_getDimensionsNodes","ModalFooter","_getConfirmationMessage","selectedDimensionNames","_dimension$DimensionV","variant","addToTemplateConfirmation","_this$state$errors2","unshift","selectProductButtonText","_generateImageUrl","primaryImageSource","fallBackImg","ProductSelectButton","buttonText","setBusy","getClickHandler","OrderTemplateBulkActions","isAddDisabled","isRemoveDisabled","addHandler","onAddSelectionToBag","removeHandler","onRemoveSelection","selectedLines","searchInputAriaLabel","backButtonText","addSelectedToBagButtonText","removeSelectedToBagButtonText","addLineProps","isMinifiedView","removeOrderActionHandler","_removeOrderTemplate","onRemoveTemplate","_getOrderTemplateAddToCartDialog","addTemplateToBagButtonText","_getOrderTemplateRenameControl","renameOrderTemplateDialogStrings","RenameOrderTemplateComponent","onRenameTemplate","renameOrderTemplateButtonText","renameTemplateButtonText","buttonEventReference","ActionsSplitButton","isStatementRequestAdminDropdownOpen","setIsStatementRequestAdminDropdownOpen","renameOrderTemplateDialogOpen","onToggleDropdown1","popoverReference","renderModalPopup","existingOrderTemplate","onOrderTemplateNameCancel","_buttonEventReference","requestStatementDropdownString","Random","Guid","generateGuid","Popover","OrderTemplateLineActions","orderTemplateLine","onAddToBag","onRemoveItem","getAddToBag","getRemoveItem","PopUp","removeFromOrderTemplateLinesText","moreButtonText","viewProductDetailsText","showMobile","setShowMobile","toggleDetailsDisplayed","getActionButton","removeButtonClassName","addButtonClassName","getDesktopActionButton","onSelectLineHandler","onSelect","ExtraActionsPopup","showActions","setShowActions","actionsContainerClassName","OrderTemplateMobileLineView","_context$request$app2","UnitOfMeasure","fallbackImage","productLineCatalog","renderProductCatalog","productImage","_renderProductImage","productInfo","renderProductInfo","productNumber","productUnitOfMeasure","productQuantityView","_generateQuantity","onChangeHandler","onChangeQuantity","isQuantityDisabledForUpdate","image","_context$actionContex","_context$request","_renderProductError","OOS","outOfStockProductErrorMessage","UNASSORTED","unavailableProductErrorMessage","NONE","_orderTemplateLine$fu","_renderProductDimensions","dimensionsLine","OrderTemplateLinesStatusMessage","OrderTemplateTableHeading","componentClassName","getOnChange","checkedLines","scope","selectAllRowsText","productLineCatalogName","productUnitPrice","productUOM","productQuantity","productActions","OrderTemplateLines","_onRemoveSelection","removeSelectedFailureMessage","removeSelectedSuccessMessage","productSelection","productListLines","maxWaitTimeInMilliSeconds","removeProductListLinesAsync","_this$props$data$orde","_onAddSelectionToBag","productLine","_productLine$fullProd","_productLine$fullProd2","_productLine$fullProd3","_productLine$fullProd4","_productLine$productL","ProductTypeValue","AdjustedPrice","_addItemToBag","_getCurrentUrl","reqContext","requestUrl","onCloseHandler","isItemAddedToOrderTemplateOpen","_renderItemAddedToCartDialog","_this$props$data$feat2","itemAddedToCartDialogData","ItemAddedToCartDialog","_generateItemAddedToCartDialogResources","onClose","_renderPagination","itemsPerPage","skipCount","_getCurrentPageNumber","totalItems","previousText","nextText","UncontrolledPagination","paginationAriaLabel","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_toggleDetailsDisplayed","isDetailsDisplayed","detailedProductView","absoluteUrl","_changeQuantity","orderTemplateLinesData","orderLineIndex","findIndex","newProductListLine","prevQuantity","updateProductListLinesAsync","newLine","updatedLines","updatedOrderTemplate","ProductListLines","ActiveOrderTemplateLinesInput","editOrderTemplateLineQuantityError","maxQuantityLimitText","addedToCartFailureMessage","addProductToCartInput","addProductToCart","priceResult","reject","isMiniCart","substatus","_cart$result2","cartLineQuantity","defaultMessage","_result$errorDetails","_removeItemFromOrderTemplateLines","userToken","featureStates","getFeatureState","createGetFeatureStateInput","_featureStates$find","_renameTemplate","_removeTemplate","_orderTemplate$result","newLink","_getViewport","innerWidth","md","paginationPreviousText","paginationNextText","_viewport","_updateViewport","isConfirmAddSelectionToBagModalOpen","emptyOrderTemplateLinesText","errorGettingOrderTemplateLines","orderTemplateResult","_isFirstPage","orderActions","_renderOrderTemplateActions","bulkOrderLineActions","_getOrderTemplateLineActions","productsStatusMessage","ProductsTable","ProductsTableRow","ProductsTableHeading","_renderProductListHeader","orderLines","_renderProductList","updateQuantity","debounce","pagination","itemAddedToCartDialog","updated","_product$fullProduct","onSelectAll","productNumberText","productText","productUnitPriceText","productUOMText","productQuantityText","productActionsText","headers","_generateLinesAddedToCartDialogResources","itemAddedToCartHeaderItemOneText","itemAddedToCartHeaderItemFormatText","itemAddedToCartHeaderMessageText","deleteTemplateButtonText","addTemplateToBag","renameTemplate","removeTemplate","actionsSplitButton","OrderTemplateActionsView","renameOrderTemplateTitleText","skip","selectOneRowText","addOrderTemplateItemToBagButtonText","removeItemFromOrderTemplateButtonText","deleteButtonText","selectLine","addToBagButton","extraActionsPopup","popUp","shouldDisable","OrderTemplateLineView","ProductPrice","_renderItem","quantityLabel","disableElement","pointerEvents","opacity","toggleDetails","wrapClassName","applicationNode","ProductComparisonPreview","_renderGreyPlaceHolders","productData","counts","greyPlaceHoldersCount","displayGreyPlaceHolders","_removeProductFromList","itemId","_this$props$data$acco","ProductComparisonState","instance","accountInformation","removeItemById","previousState","_previousState$produc","productsData","_handleCollapseClick","_previousState$isExpa","_hasUserInteractedWithComparison","_clearAllProductsFromTheComparison","_this$props$data$acco2","clearAll","_instanceId","_displayedInstanceId","_this$props$data$acco3","_loadProducts","listModifiedEvent","subscribe","instanceId","handler","_this$props$data$acco4","unsubscribe","_this$state$productsD","collapseButton","_renderCollapseButton","isMainContentReady","hasUserInteractedWithComparison","_getProdutComparisonDataByCatalogId","productsLimit","_getProductsLimit","subheaderText","productComparisonPreviewHeaderTextWithLimit","handleCollapseClick","productsMainInfo","_getProductsMainInfo","previewGreyPlaceHolders","productComparisonLink","clearAllProductsFromTheComparison","removeProductFromList","goToComparisonButton","_renderGoToComparisonButton","clearAllButton","_renderClearAllButton","_productData$filter","_this$props$data$acco5","GetProductsInPreviewProductComparisonInput","getProductsInPreviewProductComparisonAction","productDataByCatalogId","_getGreyPlaceHoldersCount","limit","placeHolder","productImageContainerClassName","tableRowClassName","productImageClassName","productNameClassName","productNameLink","_product$Dimensions","dimensionValue","convertProductDimensionTypeToDimensionTypes","removeFromComparisonButton","RemoveFromComparisonButtonComponent","productLink","viewport","VariantType","Browser","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","defaultImageSettingQ","_this$state$isExpande","shouldBeExpanded","headerContainerClassName","mainContainerClassName","collapseClassName","collapseButtonClassName","footerClassName","productComparisonCompareProductsButtonText","productComparisonClearAllProductsButtonText","containerClassName","headerClassName","headerLabelClassName","tableClassName","ProductComparisonPreviewViewFunctionalComponent","_props$isExpanded","_props$productsMainIn","_props$productsMainIn2","productComparisonPreviewHeaderText","SpecificationDataTypeValues","ProductSpecification","CurrencyValue","CurrencyCode","_product$DateTimeOffs","isFunction","DateTimeOffsetValue","toUTCString","IntegerValue","FloatValue","TextValue","_specification$DataTy","specification","DataTypeValue","none","currency","_renderCurrencyCell","dateTime","_renderDateTimeCell","decimal","_renderDecimalCell","integer","_renderIntegerCell","_renderTextCell","boolean","_renderTrueFalseCell","video","BooleanValue","productComparisonProductItemSpecificationTrue","productComparisonProductItemSpecificationFalse","RemoveFromComparisonButtonFunctionalComponent","useCallback","productComparisonRemoveProductFromListAriaLabel","SelectionType","ProductClickerDirections","ProductComparison","_clearAllProductsFromComparison","_configureBoxShadowOnScroll","_this$_tableReference","_tableReference","comparisonProductCardHeader","tableHeaderClassName","Array","from","documentElement","scrollTop","classList","tableHeaderLockedClassName","_handleScroll","_this$_tableHeaderRef","_tableHeaderReference","scrollTo","left","scrollLeft","_checkClickersState","_handleScrollClick","direction","_this$_tableBodyRefer","_this$_tableCellRefer","_document$body$parent","tableBody","_tableBodyReference","newLeftPosition","cellWidth","_tableCellReference","clientWidth","_getCellWidth","scrollPosition","ceil","minLeftPosition","maxScroll","scrollWidth","parentElement","getAttribute","currentClickerPosition","change","hoverStateLastUpdate","now","hoveringCellItemId","_handlePreviousClick","_document$body$parent2","right","_handleNextClick","_document$body$parent3","_this$_tableBodyRefer2","floor","_this$_tableBodyRefer3","_document$body$parent4","_shouldShowNextClicker","forceUpdate","_shouldShowPreviousClicker","newClickerPosition","_handleHoverIn","_hoveringCellItemId","_handleHoverOut","_goBack","referrer","history","back","specifications","_product$specificatio","specificationsList","allSpecifications","flatten","specificationNames","validValues","AttributeValueId","uniqueSpecificationNames","unique","allDimensions","dimensionIds","actionBarClassName","clearAllProductsFromComparison","isEmptyContent","_renderHeading","_renderLoading","actionBarContainerProps","_getActionBarContainerProps","previousClicker","_renderPreviousClicker","nextClicker","_renderNextClicker","_renderBackToShoppingButton","emptyComparison","emptyComparisonContentSlots","_getProductComparisonDataByCatalogId","productCountText","productComparisonCountText","productsMainInfoData","allUniqueDimensionIds","getProductsDimensionsIds","updatedDimensionProps","getUpdatedDimensionsProps","tableReference","tableHeaderReference","tableBodyReference","tableCellReference","shouldShowPreviousClicker","shouldShowNextClicker","handlePreviousClick","handleNextClick","handleScroll","handleHoverIn","handleHoverOut","uniqueDimensionIds","_getProductsDimensions","dimensionsProps","uniqueSpecifications","_getProductsSpecifications","specificationsProps","_getSpecificationProps","GetProductsInProductComparisonInput","getProductsInProductComparisonAction","_renderQuickView","_product$productInfo$","quickViewSlot","quickViews","selectedProductId","defaultImageSettingsQ","_getTableHeaderProps","isHoverModeEnabled","tableHeaderCellClassName","onMouseEnter","onMouseLeave","_getTableCellProps","cellClassName","tableCellClassName","_renderProductRating","rating","_ratingValue$reviewsC","averageRating","ratingValue","RatingComponent","avgRating","readOnly","productComparisonProductItemRatingAriaLabel","ratingCount","reviewsCount","shouldShowFullRatingDescription","backToShoppingLabel","_getDimensionName","dimensionId","ProductDimensionType","Color","productComparisonProductItemColorDimension","Size","productComparisonProductItemSizeDimension","Style","productComparisonProductItemStyleDimension","dimensionClassName","dimensionsRowClassName","dimensionDescription","dimensionSelectionType","dimensionsAsSwatchConfiguration","dimensionsAsSwatchType","DimensionTypes","swatch","productDimensionValues","productMainInfo","_this$props$data$prod2","renderSwatch","textValue","productsDimension","_productsDimension$di","_productsDimension$di2","dimensionItems","dimensionItem","_dimensionItem$map","currentDimensionId","swatches","swatchItem","_productMainInfo$prod","_swatchItem$Dimension2","_swatchItem$Dimension3","_swatchItem$Dimension4","_swatchItem$Dimension5","_swatchItem$Dimension6","_swatchItem$Dimension7","_swatchItem$Dimension8","_swatchItem$Dimension9","isDefaultDimension","selectedDimension","_swatchItem$Dimension","DimensionId","colorHexCode","ColorHexCode","imageUrl","isDefault","SwatchComponent","isSelectionEnabled","_dimensionItem$Dimens","_dimensionItem$Dimens2","productDimensionSeperatorValue","productDimensionSeparator","dimensionProps","specificationClassName","specificationsRowClassName","specificationValues","_productMainInfo$prod2","productSpecification","productSpecifications","productComparisonTitle","productComparisonLoadingText","productComparisonClearAllButtonAriaLabel","productComparisonClearAllButtonText","tableClickerClassName","onKeyUp","productComparisonPreviousProduct","productComparisonNextProduct","_renderRemoveFromComparisonButton","productRowClassName","currentCatalogId","productUrlLink","_product$productInfo$2","_dimension$DimensionV2","isFromCurrentCatalog","productPriceClassName","cellNewWidth","width","minWidth","maxWidth","cellContainerProps","productComparisonProductItemFreePrice","productComparisonProductItemOriginalPrice","productComparisonProductItemCurrentPrice","quickView","goToProductDetailsButton","productComparisonGoToProductDetailsButtonText","tableCellProps","tableHeaderProps","productRating","productDescription","_renderProductDescription","tableBodyClassName","tableRowContentClassName","tableRowContentInformationClassName","renderDynamicHeaderCells","headerName","tabindex","renderDynamicCells","ProductComparisonViewFunctionalComponent","_props$productsMainIn5","_props$dimensionsProp","_props$specifications","_props$productsMainIn8","_props$productsMainIn9","actionsClassName","onScroll","_props$productsMainIn3","_props$productsMainIn4","productComparisonProductItemRating","_props$productsMainIn6","_props$productsMainIn7","productComparisonProductItemDescription","specificationProps","attributeBooleanStringValue","AttributeDataType","TrueFalse","productComparisonProductItemSku","PromoBannerCloseButton","closeButtonAriaLabel","PromoBannerClose","PromoBannerLinks","links","onTextChange","editableLinks","_mapEditableLinks","linkdata","link","linkText","editableLink","linkUrl","destinationUrl","openInNewTab","PromoBannerText","PromoBanner","isVisible","handleTextChange","bannerMessages","handleLinkTextChange","linkIndex","_isLastItem","_isFirstItem","closeButtonLabel","bannerText","bannerAriaLabel","handleLinks","handleText","promoBannerProps","promoBannerTextProps","promoBannerLinksProps","contentProps","promoBannerText","carouselProps","hideIndicator","closeButton","slides","AddToCartProductListComponent","_quickOrderTemplate$q","_quickOrderTemplate$q2","quickOrderTemplate","quickOrderTemplateLines","buttonLabel","quickOrderGridBuySelectedButtonText","buttonAriaLabel","quickOrderGridBuySelectedButtonAriaLabel","_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","onError","getQuickOrderGridAddToCartDialog","_result$cartActionRes","cartActionResult","onErrorMessage","removeActionHandler","removeProductList","removeQuickOrderList","QuickOrderGridDrawer","_props$collapseProps$","_props$collapseProps","_isManuallyToggled","onToggle","collapseProps","_drawerGlyphClass","toggleGlyphClassName","isAnimateGlyph","_drawerOpenGlyph","_drawerCloseGlyph","drawerClass","drawerButtonClassName","toggleButtonProps","block","_generateDrawerButtonInnerMarkup","Collapse","isCollapseState","drawerButtonTextClass","toggleButtonClassName","headingDrawerClass","descriptionDrawerClass","moduleHeadingText","moduleDescriptionText","_generateGlyphMarkup","glyphClass","QuickOrderGridFormComponent","productTextInput","quantityTextInput","quickOrderGridState","minQuantity","isAddtoListDisabled","ariaLabelQuantity","ariaLabelProduct","ariaLabelAddtoCart","handleQuantityChange","handleAddProductListClick","onInputChangeFunction","onQuantityInputChange","onQuantityChangeFunction","productNode","quantityNode","addToListBtn","stateMessage","messageText","QuickOrderGridProduct","QuickOrderGridDesktopHeaderCellsComponent","columnWithNumberClassName","quickOrderGridProductNumberText","quickOrderGridProductText","quickOrderGridUnitPriceText","quickOrderGridUnitOfMeasureText","quickOrderGridQuantityText","quickOrderGridActionsText","QuickOrderGridMobileHeaderCellsComponent","QuickOrderGridTableHeaderComponent","rowClassName","headerCells","QuickOrderGridTableRowProductImageComponent","_props$data$product$p","_props$imageSettings","setShowPreviousActions","quickOrderGridProductKey","QuickOrderGridExtraActionsPopupComponent","_props$data$product$p2","quickOrderGridViewDetailsButtonAriaLabel","quickOrderGridViewDetailsButtonText","shouldShowActions","onClickViewDetails","shouldShowActionsNewValue","quickOrderGridRemoveItemButtonAriaLabel","QuickOrderGridDesktopTableRowCellComponent","_props$data$product$p3","_productListLine$Line","quickOrderGridProductDimensionsSeparator","renderProductPrice","quickOrderGridInputQuantityAriaLabel","quickOrderGridDecrementButtonAriaLabel","quickOrderGridIncrementButtonAriaLabel","QuickOrderGridMobileTableRowCellComponent","_props$data$product$p4","_productListLine$Line2","QuickOrderGridTableRowComponent","Viewport","QuickOrderGridTableComponent","setIsMobile","isMobileView","quickOrderGridProducts","isOrderQuantityLimitsFeatureEnabled","updateViewport","quickOrderProduct","_product$ProductDetai","_quickOrderProduct$pr","_quickOrderProduct$pr2","behavior","MinimumQuantity","callBacks","QuickOrderGrid","_this$props$data$feat3","_this$props$data$feat4","_this$props$data$feat5","_cartConfiguration$re","_cartConfiguration$re2","_waitTime","_dimensionUpdateQueueMaxLength","_errorCssClass","_errorCssGlyphClass","_dimensionUpdateQueue","FinitePromiseQueue","_dimensions","_initializedDimensions","Set","_cssClassNameConfigure","_className","_isOrderQuantityLimitsFeatureEnabled","_isChannelLimitsFeatureEnabled","_applyDefaultOrderSettingsForCartLine","_quickOrderGridCallbacks","initializeDimension","initializedDimension","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","_this$state$productDi","size","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","changeUpdatingDimension","isUpdatingDimension","_quickOrderGridRowCallbacks","_removeItemRowFromTable","productListLineId","_changeRowQuantity","_removeProductList","ProductListsDataActions","_updateStatusState","quickOrderGridDeleteProductListFailedText","productResponse","_cancellabelDebounce","isQuickOrderGridFormExpanded","getScanResult","GetScanResultInput","ProductDimensionFull","_updateQuantitiesInState","_handleQuantityChange","_this$state$productRe","_quantityInput","minimumQuantity","needToUpdateUIValue","_behavior$MinimumQuan","newCurrentValue","_this$state$productRe2","Configuration","hasProductDimensions","dimensionsToUpdate","productDimensionErrorState","otherError","clearOtherErrorState","dimensionKey","configureErrors","errorState","_this$_updateDimensio","newProduct","_getDimensionErrorString","dimensionTypeValue","amountErrorMessage","quickOrderGridproductDimensionTypeAmountErrorMessage","quickOrderGridproductDimensionTypeColorErrorMessage","quickOrderGridproductDimensionTypeConfigurationErrorMessage","quickOrderGridproductDimensionTypeSizeErrorMessage","quickOrderGridproductDimensionTypeStyleErrorMessage","_productResponse$Dime","_getConfigureErrors","quickOrderGridWrongQuantityErrorMsg","quickOrderTemplateLinesData","previousQuantity","updatedProductList","ActiveProductListInput","_addItemToProductListLine","quickOrderGridAddedToGridSuccessMessage","quickOrderGridAddedToGridFailureMessage","quickOrderGridAddedToGridDuplicateError","_productResponse$Defa","_createProductList","AddItemToProductListInput","addItemToProductListAction","CreateProductListInput","ProductListType","QuickOrder","createProductList","_productTextInput","_telemetryContent","_quickOrderGridFormClass","_quickOrderGridFormProductContent","_quickOrderGridFormMsgContent","ValidateDefaultOrderSettingsPerLine","_this$state$min","_this$state$max","quickOrderGridModuleHeading","quickOrderGridModuleDescription","quickOrderGridAddtogrid","quickOrderGridProductQuantityInputLabel","quickOrderGridProductInputLabel","quickOrderGridProductDimensionTypeColor","quickOrderGridProductDimensionTypeConfiguration","quickOrderGridSelectDimensionFormatString","quickOrderGridProductDimensionTypeSize","quickOrderGridProductDimensionTypeStyle","quickOrderGridProductDimensionTypeAmount","quickOrderGridModulePageHeading","productConfigureResources","selectDimensionFormatString","header","quickOrderGridProps","isB2bCustomer","actions","bulkPurchase","_renderBulkPurchase","quickOrderGridForm","quickOrderGridFormProductContent","quickOrderGridFormMsgContent","configure","getProductConfigure","container","_renderListContainer","_renderQuickOrderGridActions","quickOrderGridDeleteButtonText","userMessageNode","topStateMessage","addProductListToBag","QuickOrderGridActionsView","isBulkPurchaseEnabled","bulkPurchaseSlots","containerClass","_renderQuickOrderTable","_initQuickOrderGridProducts","quickOrderGridProduct","_getMinQuantityForCartLineItem","_getMaxQuantityForCartLineItem","_getQuantity","_getIgnoreOrderSettings","_product$Behavior2","_cartConfiguration$re3","_cartConfiguration$re4","applyDefaultOrderSettingsForCartLine","_product$Behavior3","defaultQuantity","DefaultQuantity","renderConfigureDropdown","dropdown","containerProps","labelContainerProps","select","renderConfigure","dropdowns","renderForm","quickOrderForm","quickOrderProductContent","quickOrderMessageContent","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","ProductRefinerSource","isRangeType","dataTypeValue","Decimal","isRangeTypeForInteger","Integer","isCustomRangeTypeIntegerSelected","selectedRefinementCriterion","parentProductRefinerHierarchy","RowNumber","DisplayTemplateValue","DisplayTemplate","Range","isSingleSelectRangeTypeIntegerSelected","productRefinerValue","LeftValueBoundString","RightValueBoundString","findMatchingRefinementCriterion","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","parent","RefinerSourceValue","getIntegerRangeName","rangeValue","RightValueBoundLocalizedString","LeftValueBoundLocalizedString","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","r","selectedCriterion","isSelecting","rangeStart","rangeEnd","Text","RefinerTypeValue","RefinerType","SingleSelect","matchingIndex","criterion","splice","ChoiceSummary","closeButtonGlyph","_onClick","stopPropagation","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","selectedChoices","channelInventoryConfigurationId","refinerHierarchy","productListInventoryDisplay","ProductListInventoryFilteringOptions","HideOOS","choice","hierarchy","_rangeParentDisplay$","rangeParentDisplay","_getKeyForRefinerValue","rangeDisplayType","clearAllText","choiceAriaLabel","closeAriaLabel","selectedRefinersMap","clearAllAttributes","newIntRange","urlBuilder","_parent","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","UnitText","filterValue","trace","ErrorMessage","FeatureSearchResultItem","recommendation","productRecordId","featureSimilarDescriptionTitle","featureSimilarLooksTitle","img","imageProps","renderProductPlacementImage","Link","ModalToggle","modalNode","returnFocusRef","returnRef","onModalToggle","zIndex","modalHeaderNode","modalTitle","modalFooterNode","modalCloseButtonText","getInventoryLabel","AttributeValues","inventoryAttribute","ProductSearchResultItems","allowBackNavigation","quickviewSlot","productComparisonButton","isPriceMinMaxEnabled","productsDimensionAvailabilities","priceResources","priceRangeSeparator","ProductComponent","ratingAriaLabel","allowBack","quickViewButton","inventoryLabel","swatchItemAriaLabel","dimensionAvailabilities","dimensionAvailability","masterProductId","RangeRefineItem","_selectedRefinementCr","_this$props$selectedR","_this$props$selectedR2","_this$props$selectedR3","_this$props$selectedR4","_formattedPriceReverseLookup","Map","getLabels","sliderId","minPrice","maxPrice","labelId","labelString","labelPositioning","getSliderThumbs","sliderKey","selectedMin","selectedMinPrice","selectedMax","selectedMaxPrice","_this$props$minValueS","_this$props$maxValueS","minValueSliderThumbAriaLabel","ariaValueText","maxValueSliderThumbAriaLabel","_onRangeUpdate","_onRangeUpdateEnd","_handleRangeTooltipText","_changeMin","_changeMax","_finishChangeMin","_finishChangeMax","minInput","maxInput","initialMin","initialMax","String","maxValue","labels","sliderKeyString","sliderThumbs","validationErrorMin","validationErrorMax","touchedMin","touchedMax","previousProps","updateSliderProps","refineItemCommonProps","rangeType","_renderInputFields","_renderSlider","_this$props$selectedR5","_this$props$selectedR6","_this$props$selectedR7","_this$props$selectedR8","formAttrs","rangeNameFormat","minInputClassName","maxInputClassName","formattedSelectedMin","_getFormattedSelectedValue","formattedSelectedMax","minLabel","onFocus","maxLabel","placeholderTextMax","ariaAttributes","Slider","inForm","orientation","showLabels","showTooltip","onChangeEnd","handleTooltipText","_changeValue","inputType","selectedKey","touchedKey","_getInputWithoutFormatting","selectedMinValue","minTouched","maxNum","validationErrorNaN","_focus","_validateRange","selectedMaxValue","maxTouched","minNum","touched","validationError","validationErrorRange","inputAsNum","sliderChangeNotification","eventType","firstThumbValue","secondThumbValue","_focusOnSliderThumb","tooltip","RefineItem","anchorType","_productRefinerValue$","_this$props$parentPro","_this$props$parentPro2","_this$props","productCountAriaLabel","singleProductCountAriaLabel","refineItemAriaLabel","refineItemsAriaLabel","attrs","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","productCount","Count","refineMenuItemAriaLabel","toLocaleLowerCase","shouldDisplayAsSwatch","_getShouldDisplayAsSwatch","hasColor","SwatchColorHexCode","hasImage","SwatchImageUrl","hasContentSwatch","_getRefinerUrl","_renderSwatch","checkIfShouldDisplayAsSwatch","_productRefinerValue$2","swatchItems","isRefineItem","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$3","refinerRating","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","hideCount","RangeRefineItemInput","_changeMinInputRange","_changeMaxInputRange","_applyCustom","invalidData","updateInputRangerProps","_isUndefined","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpandedOnInitialLoad","productRefinerHierarchy","hideRating","timeout","_renderChildItems","_renderSingleMultiSelect","_renderRange","refinerValuesList","listItems","_getRangeType","SliderWithBars","onUpdateRefiners","prevState","Separator","Title","SearchResultContainer","SearchResultContainer_1","sortByDropdownOptions","sortOptions","sortByOptionRelevanceDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionRatingDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","_pageType","urlTokens","pageType","expandrefinerCount","defaultPageNumber","isListPageStateUpdated","_isMounted","_updateVariantAvailability","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","includeAttributes","_getProductsDimensionsAvailabilities","_updateListPageState","listPageState","_this$props$config$it","_this$props$config$it2","_this$props$context$r3","querySorting","sorting","decodeURIComponent","currentPageNumber","sortingCritera","Columns","pageSize","activeProducts","totalProductCount","activeFilters","hydrateRefinersFromUrl","featureProduct","_this$props$data$list","_this$props$data$list2","productsList","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","_getActivePrice","_this$props$data$list3","_this$props$data$list4","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSearchResultModal","modal","modalHeader","modalFooter","modalBody","SearchResultModal","modalIsOpen","_modalToggleRef","_toggleModal","_getCollectionTitle","collectionTitle","_this$props$context$r4","category","getFriendlyName","locale","NameTranslations","productCountNumber","numberOfProducts","oneProduct","TitleContainer","toLowerCase","titlePrefix","searchTextPrefix","titleText","titleCount","_getCategoryHierarchy","categoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryLinkAriaLabel","Url","categoryHierarchySeparator","_getSortingDropDown","activeDropdown","_getCurrentlySelectedOption","sortingState","selectedSortByOption","dropdownOptions","_getAllSortByOptions","dropdownOption","SortingContainer","sortByDropDown","LabeledDropdown","labelClassname","sortByDropdownLabel","dropdownClassname","toggleColor","selectedOption","onSelectOption","_updateSortByDropdown","_sortAndFilterContainerRef","_getPagination","getCurrentUrl","_getRefineMenu","tempRangeTypeTODO","inputRange","validRefiners","updateRefinerPanel","_shouldHideFromRefiners","activeRefiners","_getexpandRefinerCount","expandRefinersCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","_this$props$data$prod3","_this$props$data$prod4","channelInventoryConfiguration","isInventorySortableAttribute","inventoryAwareSortableAttributeId","ProductAvailabilitySortableAttributeRecordId","isInventoryProductAttribute","InventoryProductAttributeRecordId","_getChoiceSummary","_this$props$data$refi","selectedRefiners","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$slots","_this$props$data$prod5","shouldAllowBackNavigation","breadCrumbType","breadcrumbType","shouldAllowBack","quickview","isPriceMinMaxFeatureState","notification","pushState","buildListPageUrl","_getSortColumnFromSelectedOption","transaction","searchConfiguration","mappedConfiguration","sortColumn","_getSortCriteriaColumn","_this$props$data$list5","sortCriteria","queryColumns","parseQueryParam","mappedSearchConfiguration","mappedSearchConfig","activeSortColumn","activeMappedConfig","ColumnName","IsDescending","_this$props$data$list6","newRefinementCriteria","dropdownElementId","dropdownElement","selectedChoice","isClearAll","refinerCount","productPrices","validationErrorNotNumber","validationErrorNotRange","nameTranslations","_nameTranslation","nameTranslation","Language","_this$props$context$a2","StoreOperationsDataActions","_listPageState$active","_listPageState$sortin","_newListPageState$cur","_newListPageState$sor","_newListPageState$act","_this$props$context$r5","_this$props$context$r6","_this$props$context$r7","_this$props$context$a","newListPageState","GetFullProductsByCollectionInput","Skip","Sorting","recordId","Recommendation","productResults","getCollectionProducts","enableAffiliationBasedPricing","_newListPageState$cur2","_newListPageState$sor2","_newListPageState$act2","_this$props$context$r8","_this$props$context$r9","refinerInput","RefinersByCollectionInput","getCollectionRefinersAction","_listPageState$result","_listPageState$result2","_this$props$context$r10","_this$props$data$list7","_this$props$data$list8","productCollection","searchProduct","errorText","resultCategoryNotFoundText","resultSearchNotFoundText","productsComponent","featureComponent","searchResultContainerViewProps","TitleViewProps","disableHierarchy","refineMenu","sortByOptions","ProductsContainer","ProductSectionContainer","CategoryNavContainer","RefineAndProductSectionContainer","choiceSummary","modalToggle","searchResultModal","FeatureSearchContainer","similarLookProduct","createSearchResultModal","isRecoSearchPage","createModalBody","renderSort","renderRefiner","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","_props$context$action","SearchState","SocialShareItem","_getSocialShareItem","viewprops","SocialShareItemElement","icon","socialMedia","SocialMediaComponent","SocialMedia","Facebook","postUrl","Twitter","Pinterest","Linkedin","Mail","SocialShareItemView","WishlistItemDimension","WishListItemActions","onAddToCart","formattedPrice","renderProductLink","productAttributes","productPageUrlWithSwatch","renderInventoryInformationLabel","WishlistItemAddToCartButtonComponent","isInStock","addItemAction","WishlistItemRemoveFromWishlistButtonComponent","removeFromWishlistText","removeItemAction","unitOfMeasure","WishlistItem","wishlistState","_props$product$Dimens","_getFullProductLink","entireProductLink","productAriaLabel","inventoryInformation","productStatusMessage","WishlistItemsStatusMessage","WishlistItems","handleHeadingChange","_addItemToCart","addedToCartSuccessMessage","invoiceInCartErrorMessage","_getProductInventory","_product$Behavior$Min","validateQuantity","isQuantityValidationRequired","respectQuantityLimits","isAddEmailDeliveryItemToCart","_await$cart$cart","curQuantity","maxQtyLimitReachedMessage","_getInventoryValueMessage","_result$errorDetails2","isChannelQuantityLimitsFeatureEnabledInHq","validateLimitsPerLine","_this$props$data$cart3","_removeItemFromWishlist","wishlists","noLongerLineExist","wishlistLineId","_getWishlistLineIdFromProductId","removeLinesAsync","commerceList","castCommerceList","_getProductsNoLongerExists","_removeNoLongerExistsLines","createGetByCustomerInput","getItemsInWishlists","ActiveWishlistInput","castSimpleProducts","_inventoryLabel","StockLevelLabel","_inventoryClassName","StockLevelCode","_isProductInStock","productResult","IsProductAvailable","CommerceListLines","foundWishlistItem","commerceListLine","_castCommerceList$Com","noLongerExist","emptyWishlistText","wishlistErrorGettingWishlist","noLongerExitsWishlistItemText","Products","ProductDimensions","statusNotExistsMessage","_getProductNotExists","emptytext","noLongerExisttext","addToCartButtonText","currentProductProps","maxQuantityForLineItem","minInventory","productInventoryCollection"],"sourceRoot":""}