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AAAA,cAAA,KAAGC,UAAU,kCAAkCmD,KAAKT,MAAM4C,UAAUgpF,iBACnEnrF,KAAKT,MAAM4rB,2BACXnrB,KAAKT,MAAM8rB,sBACgB,QAA3B5C,EAAAzoB,KAAKT,MAAMwB,KAAK4F,KAAK1F,cAAM,IAAAwnB,GAA3BA,EAA6BoE,QAAU,KAAO7sB,KAAKT,MAAM6rF,eAC1DxuF,IAAAA,cAACgT,EAAAA,KAAI,CAAC/S,UAAU,6BACgB,QAA3BmwB,EAAAhtB,KAAKT,MAAMwB,KAAK4F,KAAK1F,cAAM,IAAA+rB,GAA3BA,EAA6BH,QAC1BjwB,IAAAA,cAACiH,EAAAA,OAAM,CACHhH,UAAU,mCACVylB,MAAMyG,EAAAA,EAAAA,IAAW,OAAQ/oB,KAAKT,MAAMsC,QAAQgH,gBAE3C7I,KAAKT,MAAM4C,UAAUkpF,6BAE1B,SA1HRC,IAAChmE,EAAuD/lB,GAwMhF","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/filtered-delivery-options.props.autogenerated.ts?9ca7","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/components/filtered-delivery-options.description.tsx?b6af","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/components/filtered-delivery-options.error-message.tsx?a76a","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/components/filtered-delivery-options.error-title.tsx?829f","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/components/filtered-delivery-options.radio-button.tsx?9751","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/filtered-delivery-options.tsx?9a97","webpack://Msdyn365.Commerce.Online/./src/modules/filtered-delivery-options/filtered-delivery-options.view.tsx?6bae","webpack://Msdyn365.Commerce.Online/./src/modules/bulk-purchase/bulk-purchase.tsx?9fd5","webpack://Msdyn365.Commerce.Online/./src/modules/bulk-purchase/bulk-purchase.view.tsx?feac","webpack://Msdyn365.Commerce.Online/./src/modules/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/actions/get-pickup-options-for-cartlines.ts?acad","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-pick-up-in-store.tsx?dca8","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-items.tsx?f6b2","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-groups.tsx?f076","webpack://Msdyn365.Commerce.Online/./src/modules/cart/utils/get-promotion-in-cart.ts?4195","webpack://Msdyn365.Commerce.Online/./src/modules/cart/cart.tsx?d4e4","webpack://Msdyn365.Commerce.Online/./src/modules/cart/components/cart-line-items-promotion.tsx?80d9","webpack://Msdyn365.Commerce.Online/./src/modules/cart/cart.view.tsx?d8c2","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-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-express-payment-container/checkout-express-payment-container.tsx?1d63","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.view.tsx?4299","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-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-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-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-section-container/checkout-section-container.tsx?c853","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-section-container/checkout-section-container.view.tsx?b4ab","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-section-container/components/loading.tsx?2e57","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-invoice-payment-summary.tsx?9549","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.tsx?6737","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.view.tsx?e4cc","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/alert.tsx?cb1e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-line-items.tsx?92f8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-order-summary.tsx?4a81","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-card.tsx?58e0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-form.tsx?f018","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/place-order-button.tsx?9b41","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/checkout.ts?7b6b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/place-order.ts?5aa0","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-form.tsx?e249","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-item.tsx?4862","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.tsx?d1f8","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.view.tsx?a0c9","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/components/promocode.component.tsx?d9d6","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/product-collection/product-collection.tsx?4008","webpack://Msdyn365.Commerce.Online/./src/modules/product-collection/product-collection.view.tsx?5d36","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-drawer.tsx?f8b4","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-form.tsx?eb54","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-product.ts?7702","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-table/components/quick-order-table-header-component.tsx?49e7","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-table/components/quick-order-table-row-component.tsx?e487","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/components/quick-order-table/quick-order-table-component.tsx?46c1","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/quick-order.tsx?ef21","webpack://Msdyn365.Commerce.Online/./src/modules/quick-order/quick-order.view.tsx?a96d","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/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/modules/video-player/components/additional-content.tsx?b368","webpack://Msdyn365.Commerce.Online/./src/modules/video-player/video-player.tsx?53e5","webpack://Msdyn365.Commerce.Online/./src/modules/video-player/video-player.view.tsx?fedb","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/cart-icon.view.tsx?7ec9"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IFilteredDeliveryOptions contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum filterDeliveryModeOption {\r\n none = 'none',\r\n filterOutNonCarrierDeliveryMode = 'filterOutNonCarrierDeliveryMode'\r\n}\r\n\r\nexport const enum useDefaultDeliveryOption {\r\n none = 'none',\r\n displaySelectedDeliveryOption = 'displaySelectedDeliveryOption',\r\n notDisplaySelectedDeliveryOption = 'notDisplaySelectedDeliveryOption'\r\n}\r\n\r\nexport interface IFilteredDeliveryOptionsConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n filterDeliveryModeOption?: filterDeliveryModeOption;\r\n useDefaultDeliveryOption?: useDefaultDeliveryOption;\r\n className?: string;\r\n clientRender?: boolean;\r\n enableAddressFilter?: boolean;\r\n nameExcludedStrings?: string;\r\n cityExcludedStrings?: string;\r\n streetExcludedStrings?: string;\r\n excludedAddressErrorMessage?: string;\r\n paragraph?: Msdyn365.RichText;\r\n}\r\n\r\nexport interface IFilteredDeliveryOptionsResources {\r\n deliveryOptionsNotFound: string;\r\n genericErrorMessage: string;\r\n errorMessageTitle: string;\r\n ariaLabelText: string;\r\n priceFree: string;\r\n saveBtnLabel: string;\r\n editBtnLabel: string;\r\n cancelBtnLabel: string;\r\n deliveryOptionAriaLabel: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface IFilteredDeliveryOptionsProps extends Msdyn365.IModule {\r\n resources: IFilteredDeliveryOptionsResources;\r\n config: IFilteredDeliveryOptionsConfig;\r\n}\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\r\n description?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.description\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description }) => {\r\n if (!description) {\r\n return null;\r\n }\r\n\r\n return {description};\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsDescription;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\r\n message?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.message\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({ message }) => {\r\n if (!message) {\r\n return null;\r\n }\r\n\r\n return

{message}

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

{title}

;\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsErrorTitle;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\r\n isChecked: boolean;\r\n value?: string;\r\n ariaSetSize: number;\r\n ariaPosInSet: number;\r\n ariaLabel?: string;\r\n telemetryContent?: ITelemetryContent;\r\n onChange(event: React.ChangeEvent): void;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.isChecked\r\n * @param root0.value\r\n * @param root0.ariaSetSize\r\n * @param root0.ariaPosInSet\r\n * @param root0.ariaLabel\r\n * @param root0.telemetryContent\r\n * @param root0.onChange\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\r\n isChecked,\r\n value,\r\n ariaSetSize,\r\n ariaPosInSet,\r\n ariaLabel,\r\n telemetryContent,\r\n onChange\r\n}) => {\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsRadioButton;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { Cart, ChannelDeliveryOptionConfiguration, FilterDeliveryModeOption } from '@msdyn365-commerce/retail-proxy';\r\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { Address, CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport { action, computed, observable, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ErrorComponent } from '@msdyn365-commerce-modules/checkout';\r\nimport { IFilteredDeliveryOptionsData } from './filtered-delivery-options.data';\r\nimport {\r\n filterDeliveryModeOption,\r\n IFilteredDeliveryOptionsProps,\r\n useDefaultDeliveryOption\r\n} from './filtered-delivery-options.props.autogenerated';\r\nimport DescriptionComponent from './components/filtered-delivery-options.description';\r\nimport ErrorMessageComponent from './components/filtered-delivery-options.error-message';\r\nimport ErrorTitleComponent from './components/filtered-delivery-options.error-title';\r\nimport RadioButtonComponent from './components/filtered-delivery-options.radio-button';\r\nimport { focusOnCheckoutError } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport interface ICheckoutDeliveryOptionsModuleProps\r\n extends IFilteredDeliveryOptionsProps,\r\n IModuleStateProps {}\r\n\r\nexport interface ICheckoutDeliveryOption {\r\n DeliveryOption: INodeProps;\r\n description?: React.ReactNode;\r\n price?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\r\n code: string;\r\n radioButton?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsList {\r\n DeliveryOptionsList: INodeProps;\r\n list: ICheckoutDeliveryOptionEdit[];\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsError {\r\n Error: INodeProps;\r\n title: React.ReactNode;\r\n message: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsViewState {\r\n isLoading: boolean;\r\n isError: boolean;\r\n isShowList: boolean;\r\n isShowSelected: boolean;\r\n isShowSaveButton: boolean;\r\n isShowEditButton: boolean;\r\n isShowCancelButton: boolean;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsViewProps extends IFilteredDeliveryOptionsProps<{}> {\r\n CheckoutDeliveryOptions: IModuleProps;\r\n selectedItemId: string;\r\n deliveryOptionsData: DeliveryOption[];\r\n isLoading: boolean;\r\n errorMessageData: string;\r\n viewState: ICheckoutDeliveryOptionsViewState;\r\n deliveryOptions?: ICheckoutDeliveryOptionsList;\r\n deliveryOptionSelected?: ICheckoutDeliveryOption;\r\n errorMessage?: ICheckoutDeliveryOptionsError;\r\n waiting?: React.ReactNode;\r\n saveButton?: React.ReactNode;\r\n editButton?: React.ReactNode;\r\n cancelButton?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n checkoutErrorRef?: React.RefObject;\r\n onDeliveryOptionChange(event: React.ChangeEvent): void;\r\n onSave(): void;\r\n onEdit(): void;\r\n onCancel(): void;\r\n}\r\n\r\nfunction parseStringToArray(input: string): string[] {\r\n // Split the string by comma\r\n const elements = input.split(',');\r\n // Trim whitespace and remove single or double quotes from each element\r\n return elements.map(element => element.trim().replace(/^[\"']|[\"']$/g, ''));\r\n}\r\n\r\nfunction createRegexExcludedPatterns(excludedValuesString: string | undefined): RegExp | null {\r\n if (!excludedValuesString) {\r\n return null;\r\n }\r\n const substrings = parseStringToArray(excludedValuesString);\r\n // Create a regular expression from the substrings\r\n const regexString = substrings.map(s => s.toLowerCase().replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')).join('|');\r\n // eslint-disable-next-line security/detect-non-literal-regexp\r\n return new RegExp(regexString);\r\n}\r\nfunction validateAddressString(addressFieldString: string, regexExcludedStrings: RegExp): boolean {\r\n const lowerCaseAddressField = addressFieldString.toLowerCase();\r\n // Create a regular expression from the substrings\r\n return !regexExcludedStrings.test(lowerCaseAddressField);\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutDeliveryOptions component.\r\n * @extends {React.Component>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass CheckoutDeliveryOptions extends React.Component {\r\n @observable private selectedItemId: string = '';\r\n\r\n @observable private deliveryOptions: DeliveryOption[] = [];\r\n\r\n @observable private isLoading: boolean = false;\r\n\r\n @observable private errorMessage?: string;\r\n\r\n @computed private get isDataReady(): boolean {\r\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\r\n }\r\n\r\n public get expressPaymentDetailsFromCartPage() {\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n const properties =\r\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\r\n ?.StringValue ?? '';\r\n\r\n return properties ? JSON.parse(properties) : null;\r\n }\r\n\r\n public get isExpressPaymentAppliedInCartPage(): boolean {\r\n return this.expressPaymentDetailsFromCartPage?.isExpressCheckoutAppliedInCartPage ?? false;\r\n }\r\n\r\n private cartDeliveryMode?: string;\r\n\r\n private retailMultiplePickUpOptionEnabled?: boolean = false;\r\n\r\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n private readonly telemetryContent?: ITelemetryContent;\r\n\r\n private readonly isSelectDefaultOptionEnabled?: boolean;\r\n\r\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\r\n\r\n private readonly deliveryNameExcludedValuesRegExp: RegExp | null;\r\n private readonly deliveryStreetExcludedValuesRegExp: RegExp | null;\r\n private readonly deliveryCityExcludedValuesRegExp: RegExp | null;\r\n\r\n public constructor(props: ICheckoutDeliveryOptionsModuleProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n this.isSelectDefaultOptionEnabled =\r\n this.props.config.useDefaultDeliveryOption && this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\r\n this.deliveryNameExcludedValuesRegExp = createRegexExcludedPatterns(props.config.nameExcludedStrings);\r\n this.deliveryCityExcludedValuesRegExp = createRegexExcludedPatterns(props.config.cityExcludedStrings);\r\n this.deliveryStreetExcludedValuesRegExp = createRegexExcludedPatterns(props.config.streetExcludedStrings);\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n when(\r\n () => this.isDataReady,\r\n async () => {\r\n await this.init();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.shippingAddress,\r\n async () => {\r\n await this.loadDeliveryOptions();\r\n this.props.moduleState.setIsCancellable(false);\r\n\r\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\r\n async isExpressCheckoutApplied => {\r\n if (isExpressCheckoutApplied && this.canShip() && !this.isExpressPaymentAppliedInCartPage) {\r\n await this.loadDeliveryOptions();\r\n this.props.moduleState.setIsCancellable(false);\r\n\r\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n }\r\n }\r\n );\r\n\r\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\r\n reaction(\r\n () => this.props.data.checkout.result?.checkoutError,\r\n checkoutError => {\r\n if (\r\n checkoutError &&\r\n checkoutError.errorLocation === ErrorLocation.CheckoutDeliveryOptions &&\r\n checkoutError.errorMessage\r\n ) {\r\n this.setError(checkoutError.errorMessage);\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.checkoutErrorFocus,\r\n checkoutErrorFocus => {\r\n if (checkoutErrorFocus === CheckoutModule.CheckoutDeliveryOptions) {\r\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps, nextState: ICheckoutDeliveryOptionsViewState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\r\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\r\n feature => feature.Name === multiplePickupStoreSwitchName\r\n )?.IsEnabled;\r\n\r\n if (!this.canShip()) {\r\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const {\r\n moduleState: { isReady, isUpdating, hasError }\r\n } = this.props;\r\n const isError = !this.isLoading && hasError;\r\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\r\n const isShowSelected = !this.isLoading && !hasError && isReady;\r\n const { errorMessageTitle, deliveryOptionAriaLabel } = this.props.resources;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n onDeliveryOptionChange: this.onDeliveryOptionChange,\r\n selectedItemId: this.selectedItemId,\r\n deliveryOptionsData: this.deliveryOptions,\r\n isLoading: this.isLoading,\r\n alert: this.errorMessage && ,\r\n errorMessageData: this.errorMessage,\r\n viewState: {\r\n isLoading: this.isLoading,\r\n isError,\r\n isShowList,\r\n isShowSelected,\r\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\r\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\r\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\r\n },\r\n CheckoutDeliveryOptions: {\r\n moduleProps: this.props,\r\n className: classname('ms-checkout-delivery-options', this.props.config.className)\r\n },\r\n deliveryOptions: {\r\n DeliveryOptionsList: {\r\n className: 'ms-checkout-delivery-options__list',\r\n role: 'list',\r\n 'aria-label': deliveryOptionAriaLabel\r\n },\r\n list: this.getDeliveryOptionList()\r\n },\r\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\r\n errorMessage: this.getErrorMessage(),\r\n waiting: ,\r\n checkoutErrorRef: this.checkoutErrorRef,\r\n saveButton: this.getSaveButton(),\r\n editButton: this.getEditButton(),\r\n cancelButton: this.getCancelButton(),\r\n onSave: this.onSave,\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n @action\r\n private readonly init = async (): Promise => {\r\n this.props.moduleState.init({\r\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\r\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\r\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\r\n status:\r\n !(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\r\n this.canShip()\r\n ? 'updating'\r\n : 'disabled'\r\n });\r\n\r\n this.cartDeliveryMode = this.getSavedDeliveryOption();\r\n await this.loadDeliveryOptions();\r\n };\r\n\r\n private readonly canShip = (): boolean => {\r\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\r\n };\r\n\r\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\r\n if (deliveryMode) {\r\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\r\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\r\n if (!selectedItem) {\r\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const { id, typeName, context } = this.props;\r\n const { priceFree } = this.props.resources;\r\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\r\n\r\n return {\r\n DeliveryOption: { className: 'ms-checkout-delivery-options__option-selected' },\r\n description: ,\r\n price: (\r\n \r\n )\r\n };\r\n };\r\n\r\n private readonly getErrorMessage = (): ICheckoutDeliveryOptionsError => {\r\n const { errorMessageTitle } = this.props.resources;\r\n return {\r\n // @ts-expect-error\r\n CheckoutDeliveryOptionsError: { tag: 'span', className: 'ms-address-form__error', role: 'alert', 'aria-live': 'assertive' },\r\n title: ,\r\n message: \r\n };\r\n };\r\n\r\n private readonly getDeliveryOptionList = (): ICheckoutDeliveryOptionEdit[] => {\r\n const count = this.deliveryOptions.length;\r\n const { priceFree } = this.props.resources;\r\n const { id, typeName, context } = this.props;\r\n\r\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\r\n return {\r\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'listitem' },\r\n code: deliveryOption.Code || '',\r\n radioButton: (\r\n \r\n ),\r\n description: (\r\n \r\n ),\r\n price: (\r\n \r\n )\r\n };\r\n });\r\n };\r\n\r\n private readonly getSaveButton = (): React.ReactNode => {\r\n const { saveBtnLabel = 'Save' } = this.props.resources;\r\n return (\r\n \r\n {saveBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly getEditButton = (): React.ReactNode => {\r\n const { editBtnLabel = 'Change' } = this.props.resources;\r\n return (\r\n \r\n );\r\n };\r\n\r\n private readonly getCancelButton = (): React.ReactNode => {\r\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\r\n return (\r\n \r\n );\r\n };\r\n\r\n private readonly setError = (errorMessage: string): void => {\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.errorMessage = errorMessage;\r\n };\r\n\r\n private readonly clearError = (): void => {\r\n this.props.moduleState.setHasError(false);\r\n this.errorMessage = undefined;\r\n };\r\n\r\n private readonly onSave = async (): Promise => {\r\n await this.onSubmit();\r\n };\r\n\r\n private readonly onEdit = async (): Promise => {\r\n this.props.telemetry.information('Delivery options onEdit is called.');\r\n\r\n this.clearError();\r\n this.onUpdating();\r\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n };\r\n\r\n private readonly onSubmit = async (): Promise => {\r\n this.props.telemetry.information('Delivery options onSubmit is called.');\r\n\r\n await this.updateCartDeliverySpecification(this.selectedItemId);\r\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n };\r\n\r\n private readonly onCancel = async (): Promise => {\r\n this.props.telemetry.information('Delivery options onCancel is called.');\r\n\r\n // Reset to the saved value\r\n const savedDeliveryOption = this.getSavedDeliveryOption();\r\n if (savedDeliveryOption) {\r\n this.selectedItemId = savedDeliveryOption;\r\n this.onReady();\r\n\r\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n } else {\r\n this.onUpdating();\r\n }\r\n };\r\n\r\n private readonly getSavedDeliveryOption = (): string | undefined => {\r\n const cartLinesForShipping = this.getCartLinesForShipping();\r\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\r\n };\r\n\r\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\r\n if (deliveryModeId.trim() === '') {\r\n return;\r\n }\r\n\r\n const { resources } = this.props;\r\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\r\n const updateCartDeliverySpecificationInput = {\r\n deliveryModeId,\r\n shippingAddress: checkoutState.shippingAddress,\r\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\r\n };\r\n\r\n this.clearError();\r\n this.onPending();\r\n\r\n await checkoutState.checkoutCart\r\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\r\n .then(response => {\r\n if (response.status === 'FAILED') {\r\n const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\r\n this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\r\n }\r\n\r\n this.onReady();\r\n this.props.moduleState.setIsCancellable(true);\r\n })\r\n .catch(() => {\r\n this.setError(resources.genericErrorMessage);\r\n });\r\n };\r\n\r\n private readonly getCartLinesForShipping = (): CartLine[] => {\r\n const { request } = this.props.context;\r\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\r\n\r\n return this.retailMultiplePickUpOptionEnabled\r\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !==\r\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLine.DeliveryMode\r\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n )\r\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n };\r\n\r\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const { context, resources, config } = this.props;\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n const cartId = (cartState.cart as Cart).Id;\r\n\r\n if (context) {\r\n this.isLoading = true;\r\n this.deliveryOptions = [];\r\n this.selectedItemId = '';\r\n this.clearError();\r\n\r\n try {\r\n let originalDeliveryMode: string = '';\r\n const shippingCartLines = this.getCartLinesForShipping();\r\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\r\n if (hasShippingDeliveryLines) {\r\n // First store the delivery mode, so that we can restore the shipping information.\r\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\r\n\r\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\r\n const cart = cartState.cart;\r\n await cartState.clearCartLinesDeliveryInformation({\r\n cart,\r\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\r\n });\r\n }\r\n\r\n // TODO: Check if we can move this getDeliveryOptions to checkout state\r\n let deliveryOptionFilter: FilterDeliveryModeOption;\r\n switch (config.filterDeliveryModeOption) {\r\n case filterDeliveryModeOption.none:\r\n deliveryOptionFilter = FilterDeliveryModeOption.None;\r\n break;\r\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\r\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\r\n break;\r\n default:\r\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\r\n }\r\n if (config.enableAddressFilter) {\r\n let isAddressValid = true;\r\n\r\n if (\r\n this.deliveryNameExcludedValuesRegExp &&\r\n !validateAddressString(shippingAddress.Name!, this.deliveryNameExcludedValuesRegExp)\r\n ) {\r\n isAddressValid = false;\r\n } else if (\r\n this.deliveryCityExcludedValuesRegExp &&\r\n !validateAddressString(shippingAddress.City!, this.deliveryCityExcludedValuesRegExp)\r\n ) {\r\n isAddressValid = false;\r\n } else if (\r\n this.deliveryStreetExcludedValuesRegExp &&\r\n !validateAddressString(shippingAddress.Street!, this.deliveryStreetExcludedValuesRegExp)\r\n ) {\r\n isAddressValid = false;\r\n }\r\n if (!isAddressValid) {\r\n this.setError(config.excludedAddressErrorMessage ?? '');\r\n this.isLoading = false;\r\n return;\r\n }\r\n }\r\n const response = await getDeliveryOptionsAsync(\r\n {\r\n callerContext: context.actionContext,\r\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\r\n },\r\n cartId,\r\n shippingAddress,\r\n [],\r\n deliveryOptionFilter,\r\n true\r\n );\r\n\r\n if (hasShippingDeliveryLines) {\r\n await this.updateCartDeliverySpecification(originalDeliveryMode);\r\n }\r\n\r\n var sortedDeliveryOptions: DeliveryOption[];\r\n if (response && response.length > 0) {\r\n sortedDeliveryOptions = response.sort((a, b) => {\r\n return a.ShippingChargeAmount! - b.ShippingChargeAmount!;\r\n });\r\n this.deliveryOptions = sortedDeliveryOptions;\r\n }\r\n } catch {\r\n this.setError(resources.genericErrorMessage);\r\n }\r\n\r\n if (this.deliveryOptions.length === 0) {\r\n this.setError(resources.deliveryOptionsNotFound);\r\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\r\n this.selectedItemId = this.cartDeliveryMode;\r\n this.cartDeliveryMode = undefined;\r\n this.onReady();\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\r\n\r\n if (!this.props.data.checkout.result?.isPaymentVerificationRedirection) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n }\r\n } else {\r\n this.onUpdating();\r\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: !!this.isSelectDefaultOptionEnabled });\r\n }\r\n\r\n this.isLoading = false;\r\n }\r\n };\r\n\r\n private readonly getStoredDeliveryOptions = async (): Promise => {\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const { context } = this.props;\r\n const cartState = this.props.data.checkout.result.checkoutCart;\r\n\r\n if (context) {\r\n this.isLoading = true;\r\n this.deliveryOptions = [];\r\n this.selectedItemId = '';\r\n this.clearError();\r\n\r\n let originalDeliveryMode: string = '';\r\n const shippingCartLines = this.getCartLinesForShipping();\r\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\r\n if (hasShippingDeliveryLines) {\r\n // First store the delivery mode, so that we can restore the shipping information.\r\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\r\n\r\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\r\n const cart = cartState.cart;\r\n await cartState.clearCartLinesDeliveryInformation({\r\n cart,\r\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\r\n });\r\n if (hasShippingDeliveryLines) {\r\n await this.updateCartDeliverySpecification(originalDeliveryMode);\r\n }\r\n }\r\n\r\n if (this.cartDeliveryMode) {\r\n this.selectedItemId = this.cartDeliveryMode;\r\n this.cartDeliveryMode = undefined;\r\n this.onReady();\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\r\n\r\n if (!this.props.data.checkout.result.isPaymentVerificationRedirection) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n }\r\n }\r\n\r\n this.isLoading = false;\r\n }\r\n };\r\n\r\n private readonly loadDeliveryOptions = async (): Promise => {\r\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\r\n\r\n if (this.canShip() && shippingAddress) {\r\n if (\r\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\r\n this.isSelectDefaultOptionEnabled ||\r\n this.props.data.checkout.result?.isExpressCheckoutApplied\r\n ) {\r\n await this.getDeliveryOptions(shippingAddress);\r\n }\r\n\r\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\r\n await this.getStoredDeliveryOptions();\r\n }\r\n\r\n if (\r\n this.isSelectDefaultOptionEnabled ||\r\n this.props.data.checkout.result?.isExpressCheckoutApplied ||\r\n this.isExpressPaymentAppliedInCartPage\r\n ) {\r\n this.onSubmit();\r\n }\r\n }\r\n };\r\n\r\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\r\n const deliveryModeId = event.currentTarget.value;\r\n this.selectedItemId = deliveryModeId;\r\n };\r\n\r\n private readonly onReady = () => {\r\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\r\n this.props.moduleState.onReady();\r\n }\r\n };\r\n\r\n private readonly onUpdating = () => {\r\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\r\n this.props.moduleState.onUpdating();\r\n }\r\n };\r\n\r\n private readonly onPending = () => {\r\n if (!this.isSelectDefaultOptionEnabled) {\r\n this.props.moduleState.onPending();\r\n }\r\n };\r\n}\r\n\r\nexport default CheckoutDeliveryOptions;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\n\r\nimport {\r\n ICheckoutDeliveryOption,\r\n ICheckoutDeliveryOptionEdit,\r\n ICheckoutDeliveryOptionsList,\r\n ICheckoutDeliveryOptionsViewProps\r\n} from './filtered-delivery-options';\r\n\r\nconst DeliveryOptionList: React.FC = ({ DeliveryOptionsList, list }) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n \r\n {deliveryOption.radioButton}\r\n {deliveryOption.description}\r\n {deliveryOption.price}\r\n \r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst DeliveryOptionSelected: React.FC = ({ DeliveryOption, description, price }) => {\r\n return (\r\n \r\n {description}\r\n {price}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutDeliveryOptionsView: React.FC = props => {\r\n const {\r\n CheckoutDeliveryOptions,\r\n checkoutErrorRef,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionSelected,\r\n alert,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton\r\n } = props;\r\n\r\n const extraTextField = props.config.paragraph;\r\n const extraText = extraTextField && ;\r\n\r\n return (\r\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\r\n \r\n {extraText}\r\n {viewState.isLoading && waiting}\r\n {viewState.isError && alert}\r\n {viewState.isShowList && deliveryOptions && }\r\n {viewState.isShowSelected && deliveryOptionSelected && }\r\n {viewState.isShowSaveButton && saveButton}\r\n {viewState.isShowEditButton && editButton}\r\n {viewState.isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProductDimensionsWithAvailabilitiesFull } from '@msdyn365-commerce/commerce-entities';\nimport { ProductDimensionsMatrix } from '@msdyn365-commerce/components';\nimport { RichTextComponent } from '@msdyn365-commerce/core';\nimport { ICoreContext } from '@msdyn365-commerce/core-internal';\nimport { ArrayExtensions, IDimensionsApp } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Collapse, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBulkPurchaseData } from './bulk-purchase.data';\nimport { IBulkPurchaseProps } from './bulk-purchase.props.autogenerated';\n\n/**\n * Additional optional props for the bulk purchase.\n */\nexport interface IBulkPurchaseExtendedProps extends IBulkPurchaseProps {\n productDimensions?: IProductDimensionsWithAvailabilitiesFull[];\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseViewProps extends IBulkPurchaseProps {\n container: IModuleProps;\n content: React.ReactElement;\n}\n\n/**\n * View for the bulk purchase module.\n */\nexport interface IBulkPurchaseState {\n isExpanded: boolean;\n}\n\n/**\n * Bulk-purchase module.\n */\nexport class BulkPurchase extends React.PureComponent {\n public static readonly className = 'ms-bulk-purchase';\n private readonly collapseRef: React.RefObject = React.createRef();\n\n public constructor(props: IBulkPurchaseExtendedProps) {\n super(props);\n\n this.state = {\n isExpanded: false\n };\n }\n\n public render(): React.ReactElement | null {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n const hasDimensionsInData = ArrayExtensions.hasElements(this.props.data.productDimensions?.result);\n if (!hasDimensionsInProps && !hasDimensionsInData) {\n return null;\n }\n\n const viewProps: IBulkPurchaseViewProps = {\n ...this.props,\n container: {\n moduleProps: this.props,\n className: classnames(BulkPurchase.className, this.props.config.className)\n },\n content: this._renderCollapseContent(`${BulkPurchase.className}__content`)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderCollapseContent(className: string): React.ReactElement {\n return (\n
\n {this._renderCollapseButton(`${className}__collapse-button`)}\n {this._renderCollapse(`${className}__collapse`)}\n
\n );\n }\n\n private _renderCollapseButton(className: string): React.ReactElement {\n return (\n \n {this.props.resources.bulkPurchaseHeaderTitle}\n \n );\n }\n\n /**\n *This function is being used to handel variant change dropdown.\n */\n private _dimensionDropDownChange = () => {\n this.collapseRef.current?.reEvaluateHeight();\n };\n\n private _renderCollapse(className: string): React.ReactElement {\n return (\n \n {this._renderMainContent(`${className}__main-content`)}\n \n );\n }\n\n private _renderMainContent(className: string): React.ReactElement {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return (\n
\n {!isMobileDevice && (\n
\n \n
\n )}\n {this._renderMatrix(`${className}__matrix-container`)}\n
\n );\n }\n\n private _renderMatrix(className: string): React.ReactElement {\n const hasDimensionsInProps = ArrayExtensions.hasElements(this.props.productDimensions);\n\n return (\n }\n data={{\n dimensions: hasDimensionsInProps ? this.props.productDimensions! : this.props.data.productDimensions!.result!,\n orderTemplates: this.props.data.orderTemplates?.result,\n customerInformation: this.props.data.customerInformation?.result\n }}\n resources={this.props.resources}\n dimensionOnChange={this._dimensionDropDownChange}\n />\n );\n }\n\n /**\n * Callback which toggles collapse mode.\n */\n private readonly _toggleCollapse = () => {\n this.setState(state => ({\n isExpanded: !state.isExpanded\n }));\n };\n}\n\nexport default BulkPurchase;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBulkPurchaseViewProps } from './bulk-purchase';\n\n/**\n * Bulk purchase view.\n * @param props - Bulk purchase view props.\n * @returns React node with a module.\n */\nexport const BulkPurchaseViewComponent: React.FC = props => {\n return {props.content};\n};\n\nexport default BulkPurchaseViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 isQuantityLimitsFeatureEnabled: boolean | undefined,\n cart: AsyncResult,\n telemetry: ITelemetry,\n propsContext: ICoreContext,\n shouldRetry: boolean = true\n): Promise {\n if (!isQuantityLimitsFeatureEnabled) {\n return AsyncResult.resolve();\n }\n\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(isQuantityLimitsFeatureEnabled, 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 {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { ProductDeliveryOptions, ProductsDataActions } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n ActiveCartProductsInput,\n QueryResultSettingsProxy,\n buildCacheKey,\n getActiveCartProductsAction\n} from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for pickup delivery options for items in cart.\n */\nexport class ProductPickUpOptionsForCartLineItems implements IActionInput {\n public readonly apiSettings: ICommerceApiSettings;\n\n public constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n /**\n * Get Cache Key.\n * @returns - Cache key string.\n */\n public getCacheKey = (): string => buildCacheKey('ActiveCartLineItemsPickUpOptions', this.apiSettings);\n\n /**\n * Get Cachetype Name.\n * @returns - Cache name string.\n */\n public getCacheObjectType = (): string => 'ActiveCartLineItemsPickUpOptions';\n\n /**\n * Get Cachetype.\n * @returns - CacheType enum.\n */\n public dataCacheType = (): CacheType => 'none';\n}\n\n/**\n * CreateInput method for the GetPickUpOptionCartLineItems method.\n * @param inputData - The input data passed to the createInput method.\n * @returns - Input for data action.\n */\nconst createInput = (inputData: ICreateActionContext>) => {\n return new ProductPickUpOptionsForCartLineItems(inputData.requestContext.apiSettings);\n};\n\n/**\n * The action method for the GetPickUpOptionCartLineItems data action.\n * @param input - The action input.\n * @param context - The action context.\n * @returns - Order Template object.\n */\nexport async function getPickUpOptionsForCartLineItems(\n input: ProductPickUpOptionsForCartLineItems,\n context: IActionContext\n): Promise {\n // If no input is provided fail out\n if (!input.apiSettings.channelId) {\n throw new Error('[getPickUpOptionsForCartLineItems]No valid Input was provided, failing');\n }\n const cartState = await getCartState(context);\n const cart = cartState.cart;\n const products = await getActiveCartProductsAction(new ActiveCartProductsInput(), context);\n const filterOption = 4;\n const response: ProductDeliveryOptions[] = [];\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- existing code.\n if (cart === undefined || !ArrayExtensions.hasElements(products)) {\n return Promise.resolve(response);\n }\n\n const pickupoptions = await ProductsDataActions.getDeliveryOptionsAsync(\n {\n callerContext: context,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context)\n },\n products.map(product => product.RecordId),\n {},\n filterOption\n );\n\n return pickupoptions;\n}\n\n/**\n * The GetPickupOptionCartLineItems Data Action\n * Returns pickup options.\n */\nexport const getPickUpOptionsForCartLineItemsDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/retail-actions/get-pickup-options-for-cartlines',\n action: getPickUpOptionsForCartLineItems as IAction,\n input: createInput\n});\n\nexport default getPickUpOptionsForCartLineItemsDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n CartLine,\n ChannelDeliveryOptionConfiguration,\n DeliveryOption,\n OrgUnitLocation,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPickUpInStoreViewProps {\n callbacks: {\n toggleBopis(isBopisSelected: boolean): void;\n };\n defaultComponent?: React.ReactNode;\n orgUnitName?: string;\n isBopisSelected: boolean;\n ContainerProps: INodeProps;\n deliveryOption?: string;\n}\n\nexport interface IPickUpInStoreProps {\n cartline: CartLine;\n product: SimpleProduct;\n shipitText: string;\n pickUpInStoreText: string;\n changeStoreText: string;\n cartState: ICartState | undefined;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n orgUnitLocations?: OrgUnitLocation[] | undefined;\n deliveryOptions?: ProductDeliveryOptions;\n pickupDeliveryModeCode?: string;\n storeSelectorModuleId?: string;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n retailMulitplePickupFeatureState?: boolean;\n locationChangedHandler(): void;\n}\n\nexport const PickUpInStore = (props: IPickUpInStoreProps): IPickUpInStoreViewProps | undefined => {\n const _onLocationChangedCallback = async (\n orgUnitLocation: OrgUnitLocation,\n cartState: ICartState | undefined,\n cartline: CartLine,\n deliveryMode?: string\n ) => {\n if (!cartState) {\n return Promise.resolve();\n }\n return cartState\n .updateCartLinePickupLocation({ cartLineId: cartline.LineId!, location: orgUnitLocation, deliveryMode })\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {});\n };\n\n const _toggleBOPIS = (isBopisSelected: boolean) => {\n const { storeSelectorStateManager, product, cartline, cartState, storeSelectorModuleId } = props;\n\n if (isBopisSelected) {\n if (!storeSelectorStateManager) {\n return;\n }\n storeSelectorStateManager\n .openDialog({\n id: storeSelectorModuleId,\n product,\n alreadySelectedLocation: {\n OrgUnitNumber: cartline.FulfillmentStoreId\n },\n deliveryOptions: props.deliveryOptions,\n onLocationSelected: async (orgUnitLocation, deliveryMode: string | undefined) => {\n return _onLocationChangedCallback(orgUnitLocation, cartState, cartline, deliveryMode);\n }\n })\n .catch(error => {});\n } else {\n if (!cartState) {\n return;\n }\n cartline.DeliveryMode = '';\n cartline.FulfillmentStoreId = '';\n cartline.ShippingAddress = {};\n cartState\n .clearCartLinePickupLocation({ cartLineId: cartline.LineId! })\n .then(result => {\n if (result.status === 'SUCCESS') {\n props.locationChangedHandler();\n }\n })\n .catch(error => {});\n }\n };\n\n const _getOrgUnitName = (fulfillmentStoreId: string | undefined, orgUnitLocations: OrgUnitLocation[] | undefined) => {\n if (!orgUnitLocations || !fulfillmentStoreId || orgUnitLocations.length === 0) {\n return '';\n }\n\n const foundLocation = orgUnitLocations.find(orgUnitLocation => {\n return orgUnitLocation.OrgUnitNumber === fulfillmentStoreId;\n });\n\n if (foundLocation) {\n return foundLocation.OrgUnitName;\n }\n return fulfillmentStoreId;\n };\n\n const _renderShippingMethod = (\n cartLine: CartLine,\n shipItText: string,\n pickupInStoretext: string,\n changeStoreText: string,\n orgUnitLocations: OrgUnitLocation[] | undefined\n ): JSX.Element => {\n const orgUnitName = _getOrgUnitName(cartLine.FulfillmentStoreId, orgUnitLocations);\n const bopisSelected = !!cartLine.FulfillmentStoreId;\n\n const toggleBOPIS = (isBopisSelected: boolean) => {\n return () => {\n _toggleBOPIS(isBopisSelected);\n };\n };\n\n return (\n <>\n \n \n {cartLine.FulfillmentStoreId ? (\n
\n {orgUnitName}\n \n
\n ) : null}\n \n );\n };\n\n const _getDeliveryOption = (pickupStore: IPickUpInStoreProps, deliveryOptions: ProductDeliveryOptions) => {\n const delivery = deliveryOptions?.DeliveryOptions?.find(option => option.Code === pickupStore.pickupDeliveryModeCode);\n return delivery?.Description;\n };\n\n /**\n * Method to check if we have atleast one common delivery code between product and channel.\n * @param productdeliveryOptions - Product DeliveryOption List.\n * @param storePickUpOptionList - Channel DeliveryOption List.\n * @returns Boolean flag.\n */\n const matchDeliveryOptions = (\n productdeliveryOptions: DeliveryOption[] | undefined,\n storePickUpOptionList: string[] | undefined\n ): boolean => {\n const deliveryOption: string[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup = storePickUpOptionList?.find(deliveryCode => deliveryCode === delivery.Code);\n if (pickup) {\n deliveryOption.push(pickup);\n }\n return deliveryOption;\n });\n\n return ArrayExtensions.hasElements(deliveryOption);\n };\n\n // If no delivery options present on the product, or none of the delivery options\n // match the PickupDeliveryModeCode, that means the item cannot be used for BOPIS\n if (!props.deliveryOptions || !props.deliveryOptions.DeliveryOptions) {\n return undefined;\n }\n\n if (props.retailMulitplePickupFeatureState && props.channelDeliveryOptionConfig) {\n if (!matchDeliveryOptions(props.deliveryOptions.DeliveryOptions, props.channelDeliveryOptionConfig?.PickupDeliveryModeCodes)) {\n return undefined;\n }\n } else if (\n !props.pickupDeliveryModeCode ||\n !props.deliveryOptions.DeliveryOptions.find(option => option.Code === props.pickupDeliveryModeCode)\n ) {\n return undefined;\n }\n\n return {\n callbacks: {\n toggleBopis: _toggleBOPIS\n },\n defaultComponent: _renderShippingMethod(\n props.cartline,\n props.shipitText,\n props.pickUpInStoreText,\n props.changeStoreText,\n props.orgUnitLocations\n ),\n orgUnitName: _getOrgUnitName(props.cartline.FulfillmentStoreId, props.orgUnitLocations),\n isBopisSelected: !!props.cartline.FulfillmentStoreId,\n deliveryOption: _getDeliveryOption(props, props.deliveryOptions),\n ContainerProps: {\n className: 'msc-cart-line__bopis-container'\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n AddToOrderTemplateComponent,\n AddToWishlistComponent,\n CartLineItemComponent,\n IAddToOrderTemplateDialogResources,\n ICartlineResourceString,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n IOrderTemplateNameDialogResources,\n IWishlistActionSuccessResult\n} from '@msdyn365-commerce/components';\nimport MsDyn365, {\n IAny,\n ICoreContext,\n IGeneric,\n IGridSettings,\n IImageSettings,\n ITelemetry,\n TelemetryEvent,\n isChannelTypeB2B\n} from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport {\n AsyncResult,\n CartLine,\n CartLineValidationResultsByLineId,\n ChannelDeliveryOptionConfiguration,\n CommerceList,\n Customer,\n OrgUnitLocation,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy';\nimport { ProductCatalog, ProductDimensionType, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\nimport {\n ArrayExtensions,\n getInvoiceDetailsPageUrlSync,\n getProductUrlSync,\n IProductInventoryInformation,\n isCartLineItemPickUpType,\n ObjectExtensions,\n OrderTemplate,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { getProductByProductId, getProductByProductIdAndWarehouse } from '../../../Common/get-product';\nimport { IPickUpInStoreViewProps, PickUpInStore } from './cart-pick-up-in-store';\n\nexport interface ICartLineItemsProps {\n cartlines: CartLine[];\n cartlinesErrors: CartLineValidationResultsByLineId;\n cartState: ICartState | undefined;\n orgUnitLocations: OrgUnitLocation[] | undefined;\n resources: ICartlineResourceString;\n productAvailabilites: IProductInventoryInformation[] | undefined;\n products: SimpleProduct[] | undefined;\n productDeliveryOptions: ProductDeliveryOptions[] | undefined;\n pickupDeliveryModeCode?: string;\n catalogs?: ProductCatalog[];\n retailMulitplePickupFeatureState?: boolean;\n\n /* GridSettings for the product image in cartline */\n gridSettings: IGridSettings;\n\n /* ImageSettings for the product image in cartline */\n imageSettings: IImageSettings;\n id: string;\n typeName: string;\n context: ICoreContext>;\n telemetry: ITelemetry;\n removeButtonText: string;\n addToWishlistButtonText: string;\n removeFromWishlistButtonText: string;\n shipItText: string;\n pickitUpText: string;\n changeStoreText: string;\n outOfStockText: string;\n outOfRangeOneText: string;\n outOfRangeFormatText: string;\n storeSelectorStateManager: IStoreSelectorStateManager | undefined;\n isStockCheckEnabled: boolean;\n wishlists: CommerceList[] | undefined;\n defaultWishlistName: string;\n maxCartlineQuantity: number;\n includeErrors?: boolean;\n showShippingChargesForLineItems?: boolean;\n telemetryContent?: ITelemetryContent;\n isQuantityLimitsFeatureEnabled: boolean;\n hasInvoiceLine?: boolean;\n storeSelectorModuleId?: string;\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n addToOrderTemplateDialogResources: IAddToOrderTemplateDialogResources;\n createOrderTemplateDialogResources: IOrderTemplateNameDialogResources;\n itemAddedToOrderTemplateDialogResources: IItemAddedToOrderTemplateDialogResources;\n duplicateItemsWhenAddingToOrderTemplateDialogResources: IDuplicateItemsWhenAddingToOrderTemplateDialogResources;\n\n addToOrderTemplateButtonText: string;\n addToOrderTemplateButtonTooltip: string;\n addToOrderTemplateMessage: string;\n addItemToOrderTemplateError: string;\n orderTemplates: OrderTemplate[] | undefined;\n customerInformation: Customer | undefined;\n shouldIgnoreWarehouse: boolean | undefined;\n productAvailability?: AsyncResult;\n productPickUpOptions?: ProductDeliveryOptions[] | undefined;\n\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n updateCartLinesQuantitySuccessHandler(cartline: CartLine, quantity: number, lineIndex?: number): boolean;\n locationChangedHandler(): void;\n}\n\nexport interface ICartlinesViewProps {\n cartline: React.ReactNode;\n pickUpInStore?: IPickUpInStoreViewProps;\n remove: React.ReactNode;\n addToWishlist: React.ReactNode | undefined;\n addToOrderTemplate: React.ReactNode | undefined;\n\n error?: string;\n cartlineId?: string;\n hasError?: boolean;\n data?: {\n product?: SimpleProduct;\n cartline: CartLine;\n };\n}\n\nconst _getCartItemAvailableQuantity = (\n isStockCheckEnabled: boolean,\n productAvailability: IProductInventoryInformation | undefined\n): number => {\n if (\n !isStockCheckEnabled ||\n !productAvailability ||\n !productAvailability.ProductAvailableQuantity ||\n !productAvailability.IsProductAvailable ||\n !productAvailability.ProductAvailableQuantity.AvailableQuantity\n ) {\n return 0;\n }\n\n return productAvailability.ProductAvailableQuantity.AvailableQuantity;\n};\n\nconst _getCartItemMaxQuantity = (\n maxQuantityByConfig: number,\n isStockCheckEnabled: boolean,\n availableQuantityInStock: number,\n isQuantityLimitsFeatureEnabled: boolean,\n maxByQuantityLimitsFeature: number\n) => {\n if (isQuantityLimitsFeatureEnabled) {\n let maxByQuantityLimitsFeatureResult = maxByQuantityLimitsFeature;\n\n // If max by feature in not defined when feature is on then we suggest that there no max by feature\n // and consider available qty if stock check enabled and max from config in site settings.\n if (!maxByQuantityLimitsFeature) {\n maxByQuantityLimitsFeatureResult = maxQuantityByConfig || 10;\n }\n\n return isStockCheckEnabled\n ? maxByQuantityLimitsFeatureResult < availableQuantityInStock\n ? maxByQuantityLimitsFeatureResult\n : availableQuantityInStock\n : maxByQuantityLimitsFeatureResult;\n }\n if (isStockCheckEnabled) {\n return availableQuantityInStock < maxQuantityByConfig ? availableQuantityInStock : maxQuantityByConfig;\n }\n return maxQuantityByConfig;\n};\n\nconst _getErrorMessage = (\n availableQuantityInStock: number,\n currentQuantity: number,\n props: ICartLineItemsProps,\n shouldSkipStockCheck: boolean,\n cartLine: CartLine,\n lineId: string | undefined,\n foundProductAvailability?: IProductInventoryInformation\n): string | undefined => {\n const finalErrorMessages: string[] = [];\n\n const isLoadingDeliveryOptions = props.productAvailability?.status === 'LOADING';\n if (isLoadingDeliveryOptions) {\n return undefined;\n }\n // check availability passed as prop for each cartline\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\n if (foundProductAvailability === undefined) {\n finalErrorMessages.push(props.outOfStockText);\n return finalErrorMessages.toString();\n }\n }\n if (props.includeErrors && props.isStockCheckEnabled && !shouldSkipStockCheck) {\n if (availableQuantityInStock <= 0) {\n finalErrorMessages.push(props.outOfStockText);\n } else if (availableQuantityInStock < currentQuantity) {\n if (availableQuantityInStock === 1) {\n finalErrorMessages.push(props.outOfRangeOneText);\n } else {\n finalErrorMessages.push(props.outOfRangeFormatText.replace('{numLeft}', availableQuantityInStock.toString()));\n }\n }\n }\n\n // Server-side validation\n const checkForErrors = props.cartlinesErrors.ValidationResultsPairs;\n const errorsFoundByLineId = checkForErrors?.filter(index => index.LineId === lineId);\n if (errorsFoundByLineId !== undefined) {\n for (const i of errorsFoundByLineId) {\n if (ArrayExtensions.hasElements(i.ValidationFailures)) {\n i.ValidationFailures.forEach(validation => {\n if (validation.ErrorContext !== undefined) {\n finalErrorMessages.push(validation.ErrorContext);\n }\n });\n }\n }\n }\n\n if (ArrayExtensions.hasElements(finalErrorMessages)) {\n return finalErrorMessages.join(' ');\n }\n\n return undefined;\n};\n\n/**\n * On Remove Click functionality.\n * @param removeItemClickHandler -Remove item click function.\n * @param cartline -CartLine.\n * @returns Remove change value.\n */\nconst onRemoveClickFunction = (removeItemClickHandler: (cartlineToRemove: CartLine) => void, cartline: CartLine) => () => {\n removeItemClickHandler(cartline);\n};\n\n// eslint-disable-next-line complexity -- Auto-suppressed.\nconst _assembleNode = (\n cartline: CartLine,\n product: SimpleProduct | undefined,\n props: ICartLineItemsProps,\n index: number,\n foundProductAvailability?: IProductInventoryInformation,\n productPickUpOptions?: ProductDeliveryOptions\n): ICartlinesViewProps => {\n const {\n imageSettings,\n gridSettings,\n id,\n typeName,\n context,\n resources,\n removeButtonText,\n removeItemClickHandler,\n moveToWishlistSuccessHandler,\n addToOrderTemplateButtonText,\n addToOrderTemplateButtonTooltip,\n addToOrderTemplateDialogResources,\n createOrderTemplateDialogResources,\n itemAddedToOrderTemplateDialogResources,\n duplicateItemsWhenAddingToOrderTemplateDialogResources,\n addToWishlistButtonText,\n removeFromWishlistButtonText,\n orderTemplates,\n customerInformation,\n wishlists,\n defaultWishlistName,\n storeSelectorModuleId\n } = props;\n\n const isAuthenticated = context.request.user.isAuthenticated;\n const nameOfWishlist = wishlists && wishlists.length > 0 && wishlists[0].Name ? wishlists[0].Name : defaultWishlistName;\n const availableQuantityInStock = _getCartItemAvailableQuantity(props.isStockCheckEnabled, foundProductAvailability);\n\n const maxQuantity =\n product &&\n _getCartItemMaxQuantity(\n props.maxCartlineQuantity,\n props.isStockCheckEnabled,\n availableQuantityInStock,\n props.isQuantityLimitsFeatureEnabled,\n product?.Behavior?.MaximumQuantity || 0\n );\n\n // Skip stock check if the cart line is a service item or an invoice line\n const shouldSkipStockCheck = product?.ItemTypeValue === ReleasedProductType.Service || !!cartline.IsInvoiceLine;\n\n const errorMessage = ObjectExtensions.isNullOrUndefined(maxQuantity)\n ? undefined\n : _getErrorMessage(\n availableQuantityInStock,\n cartline.Quantity!,\n props,\n shouldSkipStockCheck,\n cartline,\n cartline.LineId,\n foundProductAvailability\n );\n\n const onRemoveClickHandler = onRemoveClickFunction(removeItemClickHandler, cartline);\n\n const payload = getPayloadObject(TelemetryEvent.RemoveFromCart, props.telemetryContent!, removeButtonText, '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n\n const inventoryLbl = foundProductAvailability?.StockLevelLabel;\n const inventoryCode = foundProductAvailability\n ? `ms-cart-line__inventory-code-${foundProductAvailability.StockLevelCode?.toLowerCase()}`\n : undefined;\n const productDimension = 4;\n const customPriceDimensionType = productDimension as ProductDimensionType.Style;\n const isCustomPriceSelected =\n product?.Dimensions?.find(dimension => dimension.DimensionTypeValue === customPriceDimensionType)?.DimensionValue?.Value ===\n 'Custom';\n\n let productUrl: string | undefined;\n if (product) {\n productUrl = getProductUrlSync(product, props.context.actionContext, undefined);\n\n if (MsDyn365.isBrowser && isChannelTypeB2B(props.context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartline.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n } else {\n productUrl = getInvoiceDetailsPageUrlSync(cartline.Description || '', props.context.actionContext);\n }\n\n return {\n data: {\n product,\n cartline\n },\n cartlineId: cartline.LineId,\n error: errorMessage,\n hasError:\n (!shouldSkipStockCheck && props.isStockCheckEnabled ? cartline.Quantity! > (maxQuantity ?? 0) : false) ||\n (!ObjectExtensions.isNullOrUndefined(errorMessage) && !StringExtensions.isNullOrEmpty(errorMessage)),\n cartline: (\n \n ),\n pickUpInStore: product\n ? PickUpInStore({\n storeSelectorModuleId,\n cartState: props.cartState,\n cartline,\n product,\n shipitText: props.shipItText,\n pickUpInStoreText: props.pickitUpText,\n changeStoreText: props.changeStoreText,\n storeSelectorStateManager: props.storeSelectorStateManager,\n orgUnitLocations: props.orgUnitLocations,\n deliveryOptions: productPickUpOptions,\n pickupDeliveryModeCode:\n cartline.DeliveryMode !== (undefined || '') ? cartline.DeliveryMode : props.pickupDeliveryModeCode,\n retailMulitplePickupFeatureState: props.retailMulitplePickupFeatureState,\n channelDeliveryOptionConfig: props.channelDeliveryOptionConfig,\n locationChangedHandler: props.locationChangedHandler\n })\n : undefined,\n remove: (\n \n ),\n addToWishlist:\n isAuthenticated && product && !isCustomPriceSelected ? (\n \n ) : (\n undefined\n ),\n addToOrderTemplate:\n isAuthenticated && orderTemplates && product ? (\n \n ) : (\n undefined\n )\n };\n};\n\nexport const assembleCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[] | null => {\n const reactNodes: ICartlinesViewProps[] = [];\n\n cartlines.map((cartline, index) => {\n let product;\n if (props.isQuantityLimitsFeatureEnabled) {\n // When feature is enabled the same products could have different quantity limits in Behavior so we need\n // to check productId and WarehouseId for identification.\n product = getProductByProductIdAndWarehouse(cartline.ProductId, products, cartline.WarehouseId, props.cartState);\n } else {\n product = getProductByProductId(cartline.ProductId, products);\n }\n let foundProductAvailability;\n\n // check if cartlineitem is pickup item\n const isPickUpItem = isCartLineItemPickUpType(\n cartline,\n props.retailMulitplePickupFeatureState,\n props.channelDeliveryOptionConfig,\n props.pickupDeliveryModeCode\n );\n if (props.productAvailabilites && ArrayExtensions.hasElements(props.productAvailabilites)) {\n foundProductAvailability = props.productAvailabilites.find(productAvailability => {\n if (!props.shouldIgnoreWarehouse && isPickUpItem) {\n // check warehouse only if siteBuilder setting is not \"Based on aggregate for shipping and pickup warehouses\" and cartlineitem is pickupitem\n return (\n productAvailability.ProductAvailableQuantity?.ProductId === cartline.ProductId &&\n productAvailability.InventLocationId?.toUpperCase() === cartline.WarehouseId?.toUpperCase()\n );\n }\n return productAvailability.ProductAvailableQuantity.ProductId === cartline.ProductId;\n });\n }\n\n let productPickUpOptions;\n if (props.productPickUpOptions !== undefined && ArrayExtensions.hasElements(props.productPickUpOptions)) {\n productPickUpOptions = props.productPickUpOptions.find(deliveryOption => {\n return deliveryOption && deliveryOption.ProductId === cartline.ProductId;\n });\n }\n reactNodes.push(_assembleNode(cartline, product, props, index, foundProductAvailability, productPickUpOptions));\n });\n\n return reactNodes;\n};\n\n/**\n * CartLineItems component.\n * @param props\n */\nexport const CartLineItems = (props: ICartLineItemsProps) => {\n const { products, cartlines } = props;\n return assembleCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport groupBy from 'lodash/groupBy';\n\nimport { assembleCartlines, ICartLineItemsProps, ICartlinesViewProps } from './cart-line-items';\n\nconst _assembleGroupCartlines = (\n cartlines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[][] | null => {\n const reactNodes: ICartlinesViewProps[][] = [];\n if (!products || products.length === 0) {\n props.context.telemetry.error('Products content is empty, module wont render');\n return null;\n }\n\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\n const groupDelivery = getGroupByDelivery(cartlines);\n const cartLinesGroup: CartLine[] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryType, groupByDeliveryType]) => {\n // @ts-expect-error\n groupDelivery[deliveryType] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n // 2) Create cartlines group\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n const carLineViewProps = assembleCartlines(cartLine, products, props);\n if (carLineViewProps !== null) {\n reactNodes.push(carLineViewProps);\n }\n });\n });\n\n return reactNodes;\n};\n\nconst _assembleGroupInvoiceCartlines = (\n cartLines: CartLine[],\n products: SimpleProduct[] | undefined,\n props: ICartLineItemsProps\n): ICartlinesViewProps[][] | null => {\n const reactNodes: ICartlinesViewProps[][] = [];\n if (cartLines && cartLines.length > 0) {\n // Create invoice cartLines group\n const carLineViewProps = assembleCartlines(cartLines, products, props);\n if (carLineViewProps !== null) {\n reactNodes.push(carLineViewProps);\n }\n }\n return reactNodes;\n};\n\n/**\n * CartLine Group component.\n * @param props\n */\nexport const CartLineGroupItems = (props: ICartLineItemsProps) => {\n const { products, cartlines, hasInvoiceLine } = props;\n return hasInvoiceLine\n ? _assembleGroupInvoiceCartlines(cartlines, products, props)\n : _assembleGroupCartlines(cartlines, products, props);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { CartPromotionLine } from '@msdyn365-commerce/retail-proxy';\nimport { getPromotionOptionsForCartLineItems, PromotionOptionsForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * IPromotionData entity interface.\n */\nexport interface IPromotionData {\n promotionOptions?: CartPromotionLine[];\n}\n\n/**\n * Calls the Retail API and returns a promotion data.\n * @param ctx\n */\nexport async function getPromotionData(ctx: IActionContext): Promise {\n const promotionData: IPromotionData = {};\n\n await getPromotionOptionsForCartLineItems(new PromotionOptionsForCartLineItems(ctx.requestContext.apiSettings), ctx)\n .then(promotionOptions => {\n if (promotionOptions) {\n promotionData.promotionOptions = promotionOptions;\n }\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n return {};\n });\n\n return promotionData;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IAddToOrderTemplateDialogResources,\n IDuplicateItemsWhenAddingToOrderTemplateDialogResources,\n IItemAddedToOrderTemplateDialogResources,\n ILinesAddedToOrderTemplateDialogResources,\n IOrderTemplateNameDialogResources,\n IWishlistActionSuccessResult,\n PromoCodeComponent,\n SaveCartToOrderTemplateComponent\n} from '@msdyn365-commerce/components';\nimport MsDyn365, { getUrlSync, IImageSettings, isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ICartActionResult, ICartState } from '@msdyn365-commerce/global-state';\nimport { AsyncResult, CartLine, CartLineValidationResultsByLineId, LineValidationResult } from '@msdyn365-commerce/retail-proxy';\nimport { ProductDeliveryOptions, ReleasedProductType } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { cartLineQuantityUpdatedAsync, validateCartAsync } from '@msdyn365-commerce-modules/cart-utilities';\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport {\n ActiveCartProductsInput,\n ArrayExtensions,\n getActiveCartProductsAction,\n ICartLineInventoryValidationResult,\n ObjectExtensions,\n validateCartLinesInventory,\n ProductPickUpOptionsForCartLineItems\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Alert,\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant,\n Waiting,\n updateMaxQuantityForCartLineItem,\n urlCheck\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport React from 'react';\nimport { getPickUpOptionsForCartLineItems } from './actions/get-pickup-options-for-cartlines';\n\nimport { ICartData } from './cart.data';\nimport { ICartProps, ICartResources } from './cart.props.autogenerated';\nimport { CartLineGroupItems } from './components/cart-line-groups';\nimport { CartLineItems, ICartlinesViewProps } from './components/cart-line-items';\nimport { cartPromotions, ICartLineItemViewProps } from './components/cart-line-items-promotion';\nimport { getPromotionData, IPromotionData } from './utils/get-promotion-in-cart';\n\n/**\n * Cart view props interface.\n */\nexport interface ICartViewProps extends ICartProps {\n className: string;\n title?: React.ReactNode;\n CartlinesWrapper: INodeProps;\n cartlines?: ICartlinesViewProps[];\n cartLinesGroup?: ICartlinesViewProps[][];\n cart: ICartState | undefined;\n orderSummaryHeading: React.ReactNode;\n orderSummaryLineitems?: IOrderSummaryLines;\n invoiceSummaryLineitems?: IInvoiceSummaryLines;\n OrderSummaryWrapper: INodeProps;\n OrderSummaryItems: INodeProps;\n OrderSummaryErrors?: IOrderSummaryErrors;\n checkoutAsGuestButton: React.ReactNode;\n checkoutAsSignInUserButton: React.ReactNode;\n storeSelector?: React.ReactNode;\n expressCheckoutButton?: React.ReactNode[];\n ExpressCheckoutSectionWrapper: INodeProps;\n backToShoppingButton: React.ReactNode;\n waitingComponent: React.ReactNode;\n promotionOptions?: ICartLineItemViewProps;\n promoCode: React.ReactNode;\n cartLoadingStatus: string;\n cartDataResult: boolean;\n multiplePickUpEnabled?: boolean;\n createTemplateFromCartButton: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n checkoutBlockedDueToUnavailableFunds?: React.ReactNode;\n removeItemClickHandler(cartlineToRemove: CartLine): void;\n moveToWishlistSuccessHandler(result: IWishlistActionSuccessResult, cartlineId: CartLine): void;\n}\n\n/**\n * Order summary errors interface.\n */\nexport interface IOrderSummaryErrors {\n Wrapper: INodeProps;\n header: React.ReactNode;\n errors: React.ReactNode[];\n}\n\n/**\n * Cart component state interface.\n */\ninterface ICartComponentState {\n showPromotionDialog: boolean;\n cartlinesErrors: CartLineValidationResultsByLineId;\n promotionData: IPromotionData;\n isCartValid: boolean;\n productPickUpOptions?: ProductDeliveryOptions[];\n}\n\n/**\n * Cart component.\n * @extends {React.PureComponent>}\n */\n@observer\nclass Cart extends React.Component> {\n public state: ICartComponentState;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n private isQuantityLimitsFeatureEnabled: boolean = false;\n\n private _isMounted: boolean = false;\n\n private readonly promotionPopupId: string = 'cart-promotion-popup';\n\n public constructor(props: ICartProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this.promotionLinkClick = this.promotionLinkClick.bind(this);\n this.promotionCloseButtonclick = this.promotionCloseButtonclick.bind(this);\n\n this.state = {\n showPromotionDialog: false,\n promotionData: {},\n isCartValid: true,\n productPickUpOptions: undefined,\n cartlinesErrors: {}\n };\n }\n\n /**\n * Component did mount function.\n */\n public async componentDidMount(): Promise {\n this._isMounted = true;\n const {\n config,\n context: { actionContext }\n } = this.props;\n\n this.isQuantityLimitsFeatureEnabled = await this.getOrderQuantityLimitsFeatureFlag();\n if (this.isQuantityLimitsFeatureEnabled) {\n await this.validateCart();\n }\n\n if (config.showAvailablePromotions) {\n if (this._isMounted && this.props.data.cart.result?.cart.CartLines) {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n if (this._isMounted) {\n this.setState({ promotionData: await getPromotionData(actionContext) });\n }\n }\n );\n }\n reaction(\n () => this.props.data.cart.result?.cart.CartLines,\n async () => {\n if (this._isMounted) {\n const input = new ProductPickUpOptionsForCartLineItems(actionContext.requestContext.apiSettings);\n this.setState({ productPickUpOptions: await getPickUpOptionsForCartLineItems(input, actionContext) });\n }\n }\n );\n }\n\n /**\n * Component will unmount function.\n */\n public componentWillUnmount(): void {\n this._isMounted = false;\n }\n\n /**\n * Should component update function.\n * @param nextProps - Next props.\n * @param nextState - Next state.\n * @returns True if component should update, false otherwise.\n */\n public shouldComponentUpdate(nextProps: ICartProps, nextState: ICartComponentState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n /* eslint-disable complexity -- Disabling complexity for render method */\n public render(): JSX.Element | null {\n const {\n data: {\n cart: { result: cart },\n products: { result: products }\n },\n context: {\n request: {\n user: { isAuthenticated, signInUrl }\n }\n },\n resources\n } = this.props;\n\n const guestCheckoutUrl = getUrlSync('checkout', this.props.context.actionContext) || '';\n const backToShoppingUrl = getUrlSync('home', this.props.context.actionContext) || '';\n const checkoutURL = this.getCheckoutURL(isAuthenticated, guestCheckoutUrl, signInUrl || '');\n const isCartEmpty = cart && cart.cart.CartLines && cart.cart.CartLines.length === 0;\n const cartLines = this._getCartLines();\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n const validInventoryAcrossCartLines = validateCartLinesInventory(\n cart?.cart.CartLines ?? [],\n this.props.data.productAvailabilites.result ?? [],\n this.props.context.actionContext,\n products ?? [],\n emailDeliveryModeCode\n );\n\n const hasError =\n !validInventoryAcrossCartLines?.isValid ||\n (!validInventoryAcrossCartLines && !this.state.isCartValid) ||\n (cartLines ? cartLines.some(cartline => cartline.hasError) : false);\n const RetailMultiplePickupFeatureState = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature'\n );\n const multiplePickUpEnabled = RetailMultiplePickupFeatureState?.IsEnabled;\n const cartLinesGroup = cart?.hasInvoiceLine || multiplePickUpEnabled ? this.getCartLinesGroup() : null;\n this.payLoad.contentAction.etext = TelemetryConstant.Checkout;\n const checkoutBySignInAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.GuestCheckout;\n const checkoutByGuestAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.BackToShopping;\n const backtoShoppingAttributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n\n // If there's inventory issues across multiple cart lines then update the error and display as part of the order summary\n if (validInventoryAcrossCartLines && !validInventoryAcrossCartLines.isValid) {\n if (multiplePickUpEnabled && cartLinesGroup !== null) {\n for (const cartLineGroup of cartLinesGroup) {\n this._updateCartLineErrorForInvalidInventory(cartLineGroup, validInventoryAcrossCartLines);\n }\n }\n\n this._updateCartLineErrorForInvalidInventory(cartLines, validInventoryAcrossCartLines);\n }\n\n const viewProps = {\n ...this.props,\n className: classnames('ms-cart'),\n title:

{resources.cartTitle}

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

{resources.invoiceSummaryTitle}

\n ) : (\n

{resources.orderSummaryTitle}

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

{cartEmptyText}

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

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

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

\n

{groupTitle}

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

{props.resources.emptyCartText}

\n {props.backToShoppingButton}\n
\n
\n ) : (\n <>{props.waitingComponent}\n );\n};\n\nconst CartView: React.FC = (props: ICartViewProps) => (\n
\n {props.checkoutBlockedDueToUnavailableFunds}\n {props.title}\n {!props.cart?.hasInvoiceLine && props.promotionOptions && _renderPromotions(props.promotionOptions)}\n {props.multiplePickUpEnabled ? (\n renderCartLinesGroup(props)\n ) : (\n \n {_renderCartlines(\n props.cartlines,\n props.resources.emptyCartText,\n props.CartlinesWrapper,\n props.storeSelector,\n props.backToShoppingButton,\n props.waitingComponent,\n props.cartLoadingStatus,\n props.cartDataResult\n )}\n \n )}\n {props.orderSummaryHeading && (\n \n {props.orderSummaryHeading}\n {props.cart?.hasInvoiceLine\n ? _renderInvoiceSummarylines(props.invoiceSummaryLineitems, props.OrderSummaryItems, props)\n : _renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\n {_renderErrorBlock(props.OrderSummaryErrors)}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.expressCheckoutButton && ArrayExtensions.hasElements(props.expressCheckoutButton) ? (\n {props.expressCheckoutButton}\n ) : null}\n {props.backToShoppingButton}\n {props.createTemplateFromCartButton}\n \n )}\n {props.storeSelector}\n
\n);\n\nexport default CartView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { Cart, ChannelDeliveryOptionConfiguration, FilterDeliveryModeOption } from '@msdyn365-commerce/retail-proxy';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { Address, CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ErrorComponent } from '../../common/error';\nimport { ICheckoutDeliveryOptionsData } from './checkout-delivery-options.data';\nimport {\n filterDeliveryModeOption,\n ICheckoutDeliveryOptionsProps,\n useDefaultDeliveryOption\n} from './checkout-delivery-options.props.autogenerated';\nimport DescriptionComponent from './components/checkout-delivery-options.description';\nimport ErrorMessageComponent from './components/checkout-delivery-options.error-message';\nimport ErrorTitleComponent from './components/checkout-delivery-options.error-title';\nimport RadioButtonComponent from './components/checkout-delivery-options.radio-button';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutDeliveryOptionsModuleProps\n extends ICheckoutDeliveryOptionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutDeliveryOption {\n DeliveryOption: INodeProps;\n description?: React.ReactNode;\n price?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\n code: string;\n radioButton?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsList {\n DeliveryOptionsList: INodeProps;\n list: ICheckoutDeliveryOptionEdit[];\n}\n\nexport interface ICheckoutDeliveryOptionsError {\n Error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsViewState {\n isLoading: boolean;\n isError: boolean;\n isShowList: boolean;\n isShowSelected: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutDeliveryOptionsViewProps extends ICheckoutDeliveryOptionsProps<{}> {\n CheckoutDeliveryOptions: IModuleProps;\n selectedItemId: string;\n deliveryOptionsData: DeliveryOption[];\n isLoading: boolean;\n errorMessageData: string;\n viewState: ICheckoutDeliveryOptionsViewState;\n deliveryOptions?: ICheckoutDeliveryOptionsList;\n deliveryOptionSelected?: ICheckoutDeliveryOption;\n errorMessage?: ICheckoutDeliveryOptionsError;\n waiting?: React.ReactNode;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onDeliveryOptionChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutDeliveryOptions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutDeliveryOptions extends React.Component {\n @observable private selectedItemId: string = '';\n\n @observable private deliveryOptions: DeliveryOption[] = [];\n\n @observable private isLoading: boolean = false;\n\n @observable private errorMessage?: string;\n\n @computed private get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n public get expressPaymentDetailsFromCartPage() {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? JSON.parse(properties) : null;\n }\n\n public get isExpressPaymentAppliedInCartPage(): boolean {\n return this.expressPaymentDetailsFromCartPage?.isExpressCheckoutAppliedInCartPage ?? false;\n }\n\n private cartDeliveryMode?: string;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly isSelectDefaultOptionEnabled?: boolean;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutDeliveryOptionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isSelectDefaultOptionEnabled =\n this.props.config.useDefaultDeliveryOption && this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddress,\n async () => {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n async isExpressCheckoutApplied => {\n if (isExpressCheckoutApplied && this.canShip() && !this.isExpressPaymentAppliedInCartPage) {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutDeliveryOptions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutDeliveryOptions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps, nextState: ICheckoutDeliveryOptionsViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n if (!this.canShip()) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const {\n moduleState: { isReady, isUpdating, hasError }\n } = this.props;\n const isError = !this.isLoading && hasError;\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n const { errorMessageTitle, deliveryOptionAriaLabel } = this.props.resources;\n\n const viewProps = {\n ...this.props,\n onDeliveryOptionChange: this.onDeliveryOptionChange,\n selectedItemId: this.selectedItemId,\n deliveryOptionsData: this.deliveryOptions,\n isLoading: this.isLoading,\n alert: this.errorMessage && ,\n errorMessageData: this.errorMessage,\n viewState: {\n isLoading: this.isLoading,\n isError,\n isShowList,\n isShowSelected,\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\n },\n CheckoutDeliveryOptions: {\n moduleProps: this.props,\n className: classname('ms-checkout-delivery-options', this.props.config.className)\n },\n deliveryOptions: {\n DeliveryOptionsList: {\n className: 'ms-checkout-delivery-options__list',\n role: 'list',\n 'aria-label': deliveryOptionAriaLabel\n },\n list: this.getDeliveryOptionList()\n },\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\n errorMessage: this.getErrorMessage(),\n waiting: ,\n checkoutErrorRef: this.checkoutErrorRef,\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSave,\n onEdit: this.onEdit,\n onCancel: this.onCancel\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\n status:\n !(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\n this.canShip()\n ? 'updating'\n : 'disabled'\n });\n\n this.cartDeliveryMode = this.getSavedDeliveryOption();\n await this.loadDeliveryOptions();\n };\n\n private readonly canShip = (): boolean => {\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\n };\n\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\n if (deliveryMode) {\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\n return true;\n }\n }\n return false;\n };\n\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\n if (!selectedItem) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const { id, typeName, context } = this.props;\n const { priceFree } = this.props.resources;\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\n\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option-selected' },\n description: ,\n price: (\n \n )\n };\n };\n\n private readonly getErrorMessage = (): ICheckoutDeliveryOptionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n // @ts-expect-error\n CheckoutDeliveryOptionsError: { tag: 'span', className: 'ms-address-form__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getDeliveryOptionList = (): ICheckoutDeliveryOptionEdit[] => {\n const count = this.deliveryOptions.length;\n const { priceFree } = this.props.resources;\n const { id, typeName, context } = this.props;\n\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'listitem' },\n code: deliveryOption.Code || '',\n radioButton: (\n \n ),\n description: (\n \n ),\n price: (\n \n )\n };\n });\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save' } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onSave = async (): Promise => {\n await this.onSubmit();\n };\n\n private readonly onEdit = async (): Promise => {\n this.props.telemetry.information('Delivery options onEdit is called.');\n\n this.clearError();\n this.onUpdating();\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Delivery options onSubmit is called.');\n\n await this.updateCartDeliverySpecification(this.selectedItemId);\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n };\n\n private readonly onCancel = async (): Promise => {\n this.props.telemetry.information('Delivery options onCancel is called.');\n\n // Reset to the saved value\n const savedDeliveryOption = this.getSavedDeliveryOption();\n if (savedDeliveryOption) {\n this.selectedItemId = savedDeliveryOption;\n this.onReady();\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n } else {\n this.onUpdating();\n }\n };\n\n private readonly getSavedDeliveryOption = (): string | undefined => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\n };\n\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\n if (deliveryModeId.trim() === '') {\n return;\n }\n\n const { resources } = this.props;\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const updateCartDeliverySpecificationInput = {\n deliveryModeId,\n shippingAddress: checkoutState.shippingAddress,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\n };\n\n this.clearError();\n this.onPending();\n\n await checkoutState.checkoutCart\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\n .then(response => {\n if (response.status === 'FAILED') {\n const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\n this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\n }\n\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n })\n .catch(() => {\n this.setError(resources.genericErrorMessage);\n });\n };\n\n private readonly getCartLinesForShipping = (): CartLine[] => {\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n\n return this.retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context, resources, config } = this.props;\n const cartState = this.props.data.checkout.result?.checkoutCart;\n const cartId = (cartState.cart as Cart).Id;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n try {\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n }\n\n // TODO: Check if we can move this getDeliveryOptions to checkout state\n let deliveryOptionFilter: FilterDeliveryModeOption;\n switch (config.filterDeliveryModeOption) {\n case filterDeliveryModeOption.none:\n deliveryOptionFilter = FilterDeliveryModeOption.None;\n break;\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n break;\n default:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n }\n const response = await getDeliveryOptionsAsync(\n {\n callerContext: context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\n },\n cartId,\n shippingAddress,\n [],\n deliveryOptionFilter,\n true\n );\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n\n if (response && response.length > 0) {\n this.deliveryOptions = response;\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n\n if (this.deliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n } else {\n this.onUpdating();\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: !!this.isSelectDefaultOptionEnabled });\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly getStoredDeliveryOptions = async (): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context } = this.props;\n const cartState = this.props.data.checkout.result.checkoutCart;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n }\n\n if (this.cartDeliveryMode) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly loadDeliveryOptions = async (): Promise => {\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\n\n if (this.canShip() && shippingAddress) {\n if (\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied\n ) {\n await this.getDeliveryOptions(shippingAddress);\n }\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.getStoredDeliveryOptions();\n }\n\n if (\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.isExpressPaymentAppliedInCartPage\n ) {\n this.onSubmit();\n }\n }\n };\n\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\n const deliveryModeId = event.currentTarget.value;\n this.selectedItemId = deliveryModeId;\n };\n\n private readonly onReady = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onUpdating();\n }\n };\n\n private readonly onPending = () => {\n if (!this.isSelectDefaultOptionEnabled) {\n this.props.moduleState.onPending();\n }\n };\n}\n\nexport default CheckoutDeliveryOptions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutDeliveryOption,\n ICheckoutDeliveryOptionEdit,\n ICheckoutDeliveryOptionsList,\n ICheckoutDeliveryOptionsViewProps\n} from './checkout-delivery-options';\n\nconst DeliveryOptionList: React.FC = ({ DeliveryOptionsList, list }) => {\n if (!list || list.length === 0) {\n return null;\n }\n\n return (\n \n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\n return (\n \n {deliveryOption.radioButton}\n {deliveryOption.description}\n {deliveryOption.price}\n \n );\n })}\n \n );\n};\n\nconst DeliveryOptionSelected: React.FC = ({ DeliveryOption, description, price }) => {\n return (\n \n {description}\n {price}\n \n );\n};\n\nconst CheckoutDeliveryOptionsView: React.FC = props => {\n const {\n CheckoutDeliveryOptions,\n checkoutErrorRef,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n alert,\n waiting,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isLoading && waiting}\n {viewState.isError && alert}\n {viewState.isShowList && deliveryOptions && }\n {viewState.isShowSelected && deliveryOptionSelected && }\n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutDeliveryOptionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\n description?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.description\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description }) => {\n if (!description) {\n return null;\n }\n\n return {description};\n};\n\nexport default CheckoutDeliveryOptionsDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

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

{title}

;\n};\n\nexport default CheckoutDeliveryOptionsErrorTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaSetSize\n * @param root0.ariaPosInSet\n * @param root0.ariaLabel\n * @param root0.telemetryContent\n * @param root0.onChange\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n onChange\n}) => {\n if (!value) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsRadioButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport classname from 'classnames';\n\nimport { reaction } from 'mobx';\nimport { ICheckoutExpressPaymentContainerData } from './checkout-express-payment-container.data';\nimport {\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerHeadingData\n} from './checkout-express-payment-container.props.autogenerated';\nimport { WaitingComponent } from '../../common/waiting';\n\n/**\n * ICheckoutExpressPaymentContainerModuleProps interface.\n */\nexport interface ICheckoutExpressPaymentContainerModuleProps\n extends ICheckoutExpressPaymentContainerProps,\n IModuleStateProps {}\n\nexport interface ICheckoutExpressPaymentContainerViewProps\n extends ICheckoutExpressPaymentContainerProps<{}>,\n ICheckoutExpressPaymentContainerState {\n checkoutPlainContainerProps: IModuleProps;\n items: React.ReactNode[];\n isReady?: boolean;\n waiting?: React.ReactNode;\n title?: React.ReactNode;\n headerProps: INodeProps;\n}\n\n/**\n * Checkout Express Payment Container State.\n */\nexport interface ICheckoutExpressPaymentContainerState {\n isReady?: boolean;\n shouldHideExpressPaymentContainer?: boolean;\n}\n\n/**\n *\n * CheckoutExpressPaymentContainer component\n * @extends {React.PureComponent>}\n */\n@observer\nexport class CheckoutExpressPaymentContainer extends React.PureComponent<\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerState\n> {\n private readonly moduleClassName: string = 'ms-checkout-express-section-container';\n\n public constructor(props: ICheckoutExpressPaymentContainerModuleProps) {\n super(props);\n this.state = {\n isReady: false,\n shouldHideExpressPaymentContainer: this.props.data.checkout.result?.shippingAddressFromExpressCheckout ? true : false\n };\n }\n\n public componentDidMount(): void {\n reaction(\n () => this.props.data.checkout.result?.isExpressPaymentModulesReady,\n () => {\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n } else {\n let isReady = true;\n\n for (const item of items) {\n // @ts-ignore\n if (item.key.includes('checkout-express')) {\n // @ts-ignore\n const extensionPropertyKey = `is${item.props.config.paymentTenderType}ExpressModuleReady`;\n\n const isModuleReady =\n this.props.data.checkout.result?.isExpressPaymentModulesReady?.find(\n property => property.Key === extensionPropertyKey\n )?.Value?.BooleanValue ?? false;\n isReady = isReady && isModuleReady;\n }\n }\n this.setState({ isReady });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n isExpressCheckoutApplied => {\n this.setState({ shouldHideExpressPaymentContainer: isExpressCheckoutApplied });\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { checkoutExpressPaymentContainerHeading },\n resources: { checkoutExpressPaymentSectionLoadingMessage },\n data: { checkout }\n } = this.props;\n\n if (!checkout.result || checkout.result?.isExpressCheckoutApplied || checkout.result?.isPaymentVerificationRedirection) {\n this.props.context.telemetry.information('Other payment is applied, checkout express payment container module wont render');\n return null;\n }\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.ExpressPayment === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout express payment container module wont render');\n return null;\n }\n\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n return null;\n }\n\n const shouldHideExpressPaymentContainerClassName: string = this.state.shouldHideExpressPaymentContainer ? 'hide' : '';\n\n const moduleClassName = classname(\n 'ms-checkout-express-payment-container',\n this.props.config.className,\n shouldHideExpressPaymentContainerClassName\n );\n\n const viewProps: ICheckoutExpressPaymentContainerViewProps = {\n ...this.props,\n\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items,\n isReady: this.state.isReady,\n waiting: ,\n title: checkoutExpressPaymentContainerHeading && this._renderMsdyn365Text(checkoutExpressPaymentContainerHeading),\n headerProps: { className: 'ms-checkout-express-payment-container__head' }\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n /**\n * Renders heading.\n * @param checkoutExpressPaymentContainerHeading - The checkout express container heading.\n * @returns React node.\n */\n private _renderMsdyn365Text(checkoutExpressPaymentContainerHeading: ICheckoutExpressPaymentContainerHeadingData): 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 private _handleCheckoutExpressContainerHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutExpressPaymentContainerHeading!.text = event.target.value);\n}\n\nexport default CheckoutExpressPaymentContainer;\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 { ICheckoutExpressPaymentContainerViewProps } from './checkout-express-payment-container';\n\ninterface IContainerItemsComponent {\n isLoadingClassName: string;\n items: React.ReactNode[];\n}\n\nconst ContainerItemsComponent: React.FC = ({ isLoadingClassName, items }) => (\n
{items}
\n);\n\nconst CheckoutExpressPaymentContainerView: React.FC = ({\n checkoutPlainContainerProps,\n items,\n isReady,\n waiting,\n title,\n headerProps\n}) => {\n const isLoadingClassName: string = isReady ? 'showContainer' : 'notShowContainer';\n return (\n \n {title}\n {!isReady && waiting}\n \n \n );\n};\n\nexport default CheckoutExpressPaymentContainerView;\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 { 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 { PriceComponent } from '@msdyn365-commerce/components';\nimport { callActionOrExecute } from '@msdyn365-commerce/retail-proxy';\nimport { createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { LoyaltyPointRedemptionEstimate, LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { GetLoyaltyTransactionEstimationInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Drawer, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyData } from './checkout-loyalty.data';\nimport { ICheckoutLoyaltyProps } from './checkout-loyalty.props.autogenerated';\nimport InputComponent from './components/checkout-loyalty-input';\nimport LabelComponent from './components/checkout-loyalty-label';\nimport TextComponent from './components/checkout-loyalty-text';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutLoyaltyState {\n dollarsApplied: number;\n isFetchingLoyaltyCard: boolean;\n errorMessage?: string;\n}\n\nexport interface ICheckoutLoyaltyModuleProps extends ICheckoutLoyaltyProps, IModuleStateProps {}\n\nexport interface ICheckoutLoyaltyViewState {\n isShowLoyalty: boolean;\n isShowAddLoyalty: boolean;\n}\n\nexport interface ICheckoutLoyaltyShow {\n heading: React.ReactNode;\n coveredAmountText: React.ReactNode;\n amount: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyRewardPoint {\n checkoutLoyaltyRewardPoint: INodeProps;\n key: string;\n title: React.ReactNode;\n availablePointsText: React.ReactNode;\n activePoints: React.ReactNode;\n expiringPointsText: React.ReactNode;\n expiringPoints: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyAdd {\n heading: React.ReactNode;\n cardNumber: React.ReactNode;\n drawer: INodeProps;\n rewardPoints: ICheckoutLoyaltyRewardPoint[];\n loyaltyAmountContainer: INodeProps;\n appliedLoyaltyAmountContainer: INodeProps;\n loyaltyAmountLabel: React.ReactNode;\n loyaltyAmountInput: React.ReactNode;\n loyaltyAmountApplyButton: React.ReactNode;\n showAppliedAmount: boolean;\n loyaltyAmountAppliedText: React.ReactNode;\n loyaltyAmountAppliedPrice: React.ReactNode;\n loyaltyAmountRemoveButton: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyViewProps extends ICheckoutLoyaltyModuleProps {\n checkoutLoyalty: IModuleProps;\n viewState: ICheckoutLoyaltyViewState;\n showLoyalty: ICheckoutLoyaltyShow;\n addLoyalty: ICheckoutLoyaltyAdd;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutLoyalty component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n\n@withModuleState\n@observer\nclass CheckoutLoyalty extends React.Component {\n private readonly _dialogToggleRef: React.RefObject | undefined;\n\n private readonly moduleClassName: string = 'ms-checkout-loyalty';\n\n private readonly _defaultLoyaltyPoints: number = 0;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n constructor(props: ICheckoutLoyaltyModuleProps) {\n super(props);\n this._dialogToggleRef = React.createRef();\n this._applyLoyaltyPoints = this._applyLoyaltyPoints.bind(this);\n this._removeLoyaltyPoints = this._removeLoyaltyPoints.bind(this);\n this._onInputChange = this._onInputChange.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this.state = { dollarsApplied: this.maxDollars, isFetchingLoyaltyCard: false };\n }\n\n @computed get shouldPayLoyalty(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use loyalty when cart is not full of free items\n const amountDue = cart.TotalAmount || 0;\n return amountDue > 0;\n }\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.loyaltyCard && this.props.data.loyaltyCard.status) !== 'LOADING' &&\n (this.props.data.loyaltyTransactionEstimation && this.props.data.loyaltyTransactionEstimation.status) !== 'LOADING'\n );\n }\n\n @computed get maxDollars(): number {\n return this.props.data.loyaltyTransactionEstimation.result &&\n this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n ? this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n : 0;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart,\n async () => {\n this._updateEstimate();\n }\n );\n\n reaction(\n () => this.props.data.loyaltyCard.result,\n async () => {\n this._updateLoyalty();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutLoyalty && checkoutError.errorMessage) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutLoyalty) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutLoyaltyModuleProps, nextState: ICheckoutLoyaltyState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n resources,\n renderView,\n moduleState: { hasError, isReady }\n } = this.props;\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.Loyalty === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout loyalty module wont render');\n return null;\n }\n\n if (\n this.props.data.loyaltyCard &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n ) {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n const checkoutState = this.props.data.checkout.result;\n let isShowLoyalty = false;\n const errorMessage = this.state.errorMessage;\n\n if (isReady) {\n if (!checkoutState || checkoutState.loyaltyAmount === 0) {\n return null;\n }\n isShowLoyalty = true;\n }\n\n const viewProps = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isShowLoyalty,\n isShowAddLoyalty: !isReady\n },\n alert: hasError && errorMessage && ,\n checkoutLoyalty: {\n moduleProps: this.props,\n className: classnames(\n this.moduleClassName,\n { [`${this.moduleClassName}__applied`]: isShowLoyalty },\n this.props.config.className\n )\n },\n showLoyalty: {\n heading: ,\n coveredAmountText: (\n \n ),\n amount: (\n \n )\n },\n addLoyalty: {\n heading: ,\n drawer: {\n tag: Drawer,\n className: `${this.moduleClassName}__drawer`,\n toggleButtonText: this._drawerHeader(),\n openGlyph: `${this.moduleClassName}__drawer-open`,\n closeGlyph: `${this.moduleClassName}__drawer-close`,\n glyphPlacement: 'end'\n },\n cardNumber: ,\n rewardPoints:\n loyaltyCard.RewardPoints &&\n loyaltyCard.RewardPoints.map((points, index) => {\n return this._renderPointSection(points, resources.availablePointsLabel, resources.expiringLoyaltyPointsLabel);\n }),\n loyaltyAmountContainer: {\n className: `${this.moduleClassName}__amount`\n },\n appliedLoyaltyAmountContainer: {\n className: `${this.moduleClassName}__applied-amount`\n },\n loyaltyAmountLabel: (\n \n ),\n loyaltyAmountInput: (\n \n ),\n loyaltyAmountApplyButton: (\n this.maxDollars ||\n this.state.dollarsApplied <= 0 ||\n isNaN(this.state.dollarsApplied) ||\n this.state.isFetchingLoyaltyCard\n }\n >\n {this.props.resources.applyCheckoutLoyaltyPaymentText}\n \n ),\n showAppliedAmount: checkoutState && checkoutState.loyaltyAmount > 0,\n loyaltyAmountAppliedText: (\n \n ),\n loyaltyAmountAppliedPrice: (\n \n ),\n loyaltyAmountRemoveButton: (\n \n {this.props.resources.removeCheckoutLoyaltyPaymentText}\n \n )\n }\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n this.props.context.telemetry.error('Checkout loyalty content is empty, module wont render');\n return null;\n }\n\n private _drawerHeader(): JSX.Element {\n return (\n <>\n

{this.props.resources.loyaltyCoveredAmountText}

\n \n \n );\n }\n\n private _renderPointSection(\n point: LoyaltyRewardPoint,\n loyaltyCoveredAmountText: string,\n expiringLoyaltyPointsLabel: string\n ): ICheckoutLoyaltyRewardPoint {\n return {\n key: point.RewardPointId || '',\n checkoutLoyaltyRewardPoint: {\n className: `${this.moduleClassName}__program`\n },\n title: ,\n availablePointsText: ,\n activePoints: (\n \n ),\n expiringPointsText: ,\n expiringPoints: (\n \n )\n };\n }\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n isRequired: false,\n ...(!this.isEnabled() && { status: 'disabled' })\n });\n\n const savedLoyaltyAmount = this.props.data.checkout.result?.loyaltyAmount;\n if (savedLoyaltyAmount) {\n this.props.moduleState.onReady();\n } else if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.props.moduleState.onSkip();\n } else if (\n this.props.data.loyaltyCard.result &&\n this.props.data.checkout.result &&\n this.props.data.loyaltyCard.result.CardNumber !== this.props.data.checkout.result.checkoutCart.cart.LoyaltyCardId\n ) {\n this.props.data.checkout.result.checkoutCart\n .updateLoyaltyCardId({ loyaltyCardNumber: this.props.data.loyaltyCard.result.CardNumber })\n .catch(error => {\n if (this.context.telemetry) {\n this.context.telemetry.warning(error);\n this.context.telemetry.debug('Unable to update the loyalty card');\n }\n });\n }\n };\n\n private readonly onEdit = () => {\n this.props.telemetry.information('Payment section loyalty onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly onCancel = () => {\n this.props.telemetry.information('Payment section loyalty onCancel is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly onSubmit = () => {\n this.props.telemetry.information('Payment section loyalty onSubmit is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.loyaltyAmount > 0) {\n // Show summary screen\n this.props.moduleState.onReady();\n } else {\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly isEnabled = () => {\n return (\n this.props.context.request.user.isAuthenticated &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n );\n };\n\n private async _applyLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty apply button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: Number.parseFloat(this.state.dollarsApplied.toString()) });\n this.setState({\n isFetchingLoyaltyCard: true\n });\n }\n\n private async _removeLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty remove button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: 0 });\n this.setState({\n dollarsApplied: 0\n });\n }\n\n private _onInputChange(event: React.ChangeEvent): void {\n const value = event.currentTarget.value;\n this.setState({ dollarsApplied: value.length > 0 ? Number(value) : Number.parseFloat(value), isFetchingLoyaltyCard: false });\n }\n\n private _onBlur(event: React.FocusEvent): void {\n const num = Number.parseFloat(event.currentTarget.value).toFixed(2);\n const element = document.getElementById(`${this.props.id}-label`) as HTMLInputElement;\n if (element && num) {\n element.value = num;\n this.setState({ dollarsApplied: Number.parseFloat(num) });\n }\n }\n\n private _updateLoyalty(): void {\n if (this.props.moduleState.isDisabled && this.isEnabled()) {\n this._updateEstimate();\n this.props.moduleState.onUpdating();\n }\n }\n\n private _updateEstimate(): void {\n const card = this.props.data.loyaltyCard.result;\n const checkout = this.props.data.checkout.result;\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n const channelConfig = this.props.context.request.channel;\n if (card && card.CardNumber && cart && channelConfig) {\n const currencyCode = channelConfig.Currency || '';\n const loyalPointsRequest = createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput(cart.Id, card.CardNumber, currencyCode);\n\n // @ts-expect-error\n // Due to bug 23214358, this is getting improperly cached. Need to turn on cache bypass for now to work around issue\n loyalPointsRequest._query.options.bypassCache = 'get';\n\n callActionOrExecute(loyalPointsRequest, this.props.context.actionContext)\n .then(async points => {\n this.props.context.actionContext.update(\n new GetLoyaltyTransactionEstimationInput(this.props.context.request.apiSettings),\n points\n );\n const newMaxPoints = points.MaxCurrencyValueOfLoyaltyPoints ?? this._defaultLoyaltyPoints;\n\n // If points are already applied, ensure you don't apply more points than max\n if (checkout && checkout.loyaltyAmount > newMaxPoints) {\n await checkout.updateLoyaltyAmount({ newAmount: newMaxPoints });\n }\n\n this.setState({ dollarsApplied: newMaxPoints, isFetchingLoyaltyCard: false });\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n this.props.context.actionContext.telemetry.debug('Error getting Loyalty Point Redemption Estimate');\n });\n }\n }\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutLoyalty;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyAdd, ICheckoutLoyaltyRewardPoint, ICheckoutLoyaltyShow, ICheckoutLoyaltyViewProps } from './checkout-loyalty';\n\nconst AddCheckoutLoyalty: React.FC = ({\n heading,\n cardNumber,\n drawer,\n rewardPoints,\n loyaltyAmountContainer,\n appliedLoyaltyAmountContainer,\n loyaltyAmountLabel,\n loyaltyAmountInput,\n loyaltyAmountApplyButton,\n showAppliedAmount,\n loyaltyAmountAppliedText,\n loyaltyAmountAppliedPrice,\n loyaltyAmountRemoveButton\n}) => {\n return (\n <>\n {heading}\n {cardNumber}\n \n {rewardPoints.map((rewardPoint: ICheckoutLoyaltyRewardPoint) => {\n return (\n \n {rewardPoint.title}\n {rewardPoint.availablePointsText}\n {rewardPoint.activePoints}\n {rewardPoint.expiringPointsText}\n {rewardPoint.expiringPoints}\n \n );\n })}\n \n \n {loyaltyAmountLabel}\n {loyaltyAmountInput}\n {loyaltyAmountApplyButton}\n {showAppliedAmount && (\n \n {loyaltyAmountAppliedText}\n {loyaltyAmountAppliedPrice}\n {loyaltyAmountRemoveButton}\n \n )}\n \n \n );\n};\n\nconst ShowCheckoutLoyalty: React.FC = ({ heading, coveredAmountText, amount }) => {\n return (\n <>\n {heading}\n {coveredAmountText}\n {amount}\n \n );\n};\n\nconst CheckoutLoyaltyView: React.FC = props => {\n const { checkoutLoyalty, checkoutErrorRef, alert, viewState, showLoyalty, addLoyalty } = props;\n\n return (\n \n {alert}\n {viewState.isShowLoyalty && }\n {viewState.isShowAddLoyalty && }\n \n );\n};\n\nexport default CheckoutLoyaltyView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * 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 { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutSectionContainerData } from './checkout-section-container.data';\nimport { ICheckoutSectionContainerProps } from './checkout-section-container.props.autogenerated';\nimport LoadingComponent from './components/loading';\n\n/**\n * ICheckoutSectionContainerModuleProps interface.\n */\nexport interface ICheckoutSectionContainerModuleProps\n extends ICheckoutSectionContainerProps,\n IModuleStateProps {\n enableControl: boolean;\n}\n\ninterface ICheckoutSectionContainerState {\n isCollapse?: boolean;\n}\n\nexport interface ICheckoutSectionContainerItem {\n id: string;\n loading?: React.ReactNode;\n itemProps: INodeProps;\n item: React.ReactNode;\n}\n\nexport interface ICheckoutSectionContainerViewProps extends ICheckoutSectionContainerProps<{}> {\n className: string;\n checkoutPlainContainerProps: IModuleProps;\n items: ICheckoutSectionContainerItem[];\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst zeroAmount = 0;\n\n/**\n *\n * CheckoutPlainContainer component.\n * @extends {React.Component>}\n */\n@observer\nexport class CheckoutPlainContainer extends React.Component {\n @computed public get amountDue(): number {\n const {\n data: { checkout }\n } = this.props;\n if (!checkout?.result) {\n return 0;\n }\n\n const checkoutResult = checkout.result;\n const cart = checkoutResult.checkoutCart?.cart;\n if (!cart || !cart.CartLines || !ArrayExtensions.hasElements(cart.CartLines)) {\n return 0;\n }\n\n return cart.TotalAmount ?? zeroAmount;\n }\n\n public constructor(props: ICheckoutSectionContainerModuleProps) {\n super(props);\n this.state = { isCollapse: false };\n }\n\n public componentDidMount(): void {\n const items = this.getItems();\n const childIds = items.map((item: React.ReactNode) => get(item, 'props.id'));\n const shouldEnableSinglePaymentAuthorizationCheckout: boolean =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onCancel,\n onSubmit: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onSubmit,\n childIds\n });\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n reaction(\n () => this.props.moduleState.shouldSubmitContainer,\n () => {\n this.onSubmit();\n }\n );\n\n // Reaction to collapse the payment section for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.shouldCollapsePaymentSection,\n shouldCollapsePaymentSection => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.setState({ isCollapse: shouldCollapsePaymentSection });\n }\n }\n );\n\n // Reaction to submit section container for new checkout flow\n reaction(\n () => this.props.data.checkout.result?.shouldTriggerPaymentWithPlaceOrder,\n () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.onSubmit();\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerReady for new checkout flow.\n reaction(\n () => this.props.moduleState.isReady,\n async isReady => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer && this.amountDue > zeroAmount) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: isReady\n });\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerHasError for new checkout flow.\n reaction(\n () => this.props.moduleState.hasError,\n async hasError => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerHasError({\n newIsPaymentSectionContainerHasError: hasError\n });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isCheckoutCallFailed,\n async () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer && this.props.data.checkout.result?.isCheckoutCallFailed) {\n this.onEdit();\n await this.props.data.checkout.result.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (!this.props.moduleState.hasExternalSubmitGroup) {\n return;\n }\n\n /**\n * Review all modules to updating status if one of the modules has error.\n */\n const { childIds, hasError, getModule } = this.props.moduleState;\n const hasReadyOrSkippedItems = childIds.some((childId: string) => {\n const state = getModule(childId);\n return !!state && (state.isReady || state.isSkipped);\n });\n if (hasReadyOrSkippedItems && hasError) {\n this.onEdit();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutSectionContainerModuleProps, nextState: ICheckoutSectionContainerState): 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 enableControl,\n moduleState,\n config: { width }\n } = this.props;\n\n const items = this.getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout section content is empty, module wont render');\n return null;\n }\n\n const moduleClassName = classname(\n 'ms-checkout-section-container',\n {\n 'has-initialized': moduleState.hasInitialized,\n 'is-ready': moduleState.isReady,\n 'is-updating': !moduleState.isReady,\n container: width === 'container',\n 'col-12 fullwidth': width === 'fluid'\n },\n this.props.config.className\n );\n\n const viewProps: ICheckoutSectionContainerViewProps = {\n ...this.props,\n\n className: moduleClassName,\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items.map((item: React.ReactNode) => {\n const childId = get(item, 'props.id');\n const state = moduleState.getModule(childId);\n\n // Modules has not completed initializing or it's disable\n const hidden =\n this.state.isCollapse || (state.hasModuleState && (!state.hasInitialized || state.isDisabled || state.isSkipped));\n return {\n id: childId,\n loading: state.hasModuleState && !state.hasInitialized && ,\n itemProps: {\n 'data-type-name': state.typeName,\n className: classname('ms-checkout-section-container__item', {\n hidden,\n initialized: state.hasInitialized,\n disabled: state.isDisabled,\n skipped: state.isSkipped,\n ready: state.isReady,\n updating: state.isUpdating,\n pending: state.isPending\n })\n },\n item: React.cloneElement(item as React.ReactElement, { enableControl })\n };\n })\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\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 private readonly clearError = (): void => {\n // Clear error before action, otherwise it will rise conflict;\n this.getActiveChildModuleStates().forEach(state => {\n state.hasError && state.setHasError(false);\n });\n };\n\n private readonly onSubmit = (): void => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n this.props.telemetry.information('Section container onSubmit is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onSubmit && state.onSubmit();\n });\n\n // Handle when the amount due is zero\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isPaymentSectionContainer &&\n this.amountDue === zeroAmount\n ) {\n this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: true\n });\n }\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Section container onCancel is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onCancel && state.onCancel();\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Section container onEdit is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n (state.isReady || state.isSkipped) && state.onEdit && state.onEdit();\n });\n };\n\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Section container onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n}\n\nexport default withModuleState(CheckoutPlainContainer);\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 { ICheckoutSectionContainerItem, ICheckoutSectionContainerViewProps } from './checkout-section-container';\n\nconst ItemComponent: React.FC = ({ loading, itemProps, item }) => (\n <>\n {loading}\n {item}\n \n);\n\nconst CheckoutSectionContainerView: React.FC = ({ checkoutPlainContainerProps, items }) => (\n \n {items.map(item => (\n \n ))}\n \n);\n\nexport default CheckoutSectionContainerView;\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\nconst Loading: React.FC = () =>
;\n\nexport default Loading;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IInvoicePaymentSummary {\n heading?: React.ReactNode;\n lines?: IInvoiceSummaryLines;\n}\nexport const getInvoicePaymentSummary = (input: ICheckoutProps): IInvoicePaymentSummary => {\n const {\n data: { checkout },\n resources: { totalAmountLabel, invoiceLabel, invoiceSummaryTitle },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutCart = get(checkout, 'result.checkoutCart');\n const cart = get(checkout, 'result.checkoutCart.cart');\n\n return {\n heading:

{invoiceSummaryTitle}

,\n lines: checkoutCart?.hasInvoiceLine\n ? InvoiceSummary({\n orderTotalLabel: totalAmountLabel,\n invoiceLabel,\n cart,\n context,\n typeName,\n telemetry,\n id,\n checkoutState: checkout.result\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { 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 * The Checkout view props.\n * @extends ICheckoutProps\n */\nexport interface ICheckoutViewProps extends ICheckoutProps {\n className: string;\n canShow?: boolean;\n isEmptyCart?: boolean;\n isConsentGiven?: boolean;\n hasError?: boolean;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n cartStatus?: string;\n isMobile?: boolean;\n isEditorialMode?: boolean;\n backToShoppingUrl?: string;\n editCartLink?: string;\n hasSalesOrder: boolean;\n hasInvoiceLine?: boolean;\n\n checkoutProps: IModuleProps;\n headerProps: INodeProps;\n bodyProps: INodeProps;\n mainProps: INodeProps;\n mainControlProps: INodeProps;\n sideProps: INodeProps;\n sideControlFirstProps: INodeProps;\n sideControlSecondProps: INodeProps;\n termsAndConditionsProps: INodeProps;\n\n guidedForm?: React.ReactNode;\n title?: React.ReactNode;\n loading?: React.ReactNode;\n alert?: React.ReactNode;\n orderSummary?: IOrderSummary;\n invoicePaymentSummary?: IInvoicePaymentSummary;\n lineItems?: ILineItems;\n placeOrderButton?: React.ReactNode;\n termsAndConditions?: React.ReactNode;\n keepShoppingButton?: React.ReactNode;\n orderConfirmation?: React.ReactNode;\n\n checkoutExpressPaymentContainer?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n * The checkout module props interface.\n */\nexport interface ICheckoutModuleProps extends ICheckoutProps, IModuleStateProps {}\n\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\n\n/**\n *\n * CheckoutContainer component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass Checkout extends React.PureComponent {\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\n return this.props.data.checkout?.status;\n }\n\n @computed get isEmptyCart(): boolean {\n if (this.isEditorialMode) {\n // Editorial mode: Ignore empty cart\n return false;\n }\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\n }\n\n @computed get hasError(): boolean {\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\n }\n\n @computed get isEditorialMode(): boolean {\n return this.props.context.request.params.isEditor;\n }\n\n @computed get canPlaceOrder(): boolean {\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\n\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\n\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\n return (\n this.props.moduleState.isReady &&\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\n (this.state.errorMessage === '' ||\n shouldEnableSinglePaymentAuthorizationCheckout ||\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\n );\n }\n\n @computed get isPaidOffByCustomerAccount(): boolean {\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\n\n return customerAccountAmount === amountDue;\n }\n\n @computed get isCartReady(): boolean {\n return (\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\n this.props.data.customerInformation.status !== 'LOADING' &&\n this.props.data.featureState.status !== 'LOADING'\n );\n }\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n const properties =\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\n property => property.Key === 'expressPaymentDetails'\n )?.Value?.StringValue ?? '';\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n public state: ICheckoutState = {\n errorMessage: '',\n isValidationPassed: false,\n isPlaceOrderLoading: false,\n isPlaceOrderClicked: false\n };\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public componentDidMount(): void {\n const {\n resources: { genericErrorMessage }\n } = this.props;\n\n when(\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\n async () => {\n if (this.expressPaymentDetailsFromCartPage) {\n const {\n email,\n tenderLine,\n tokenizedPaymentCard,\n paymentTenderType: paymentTenderTypeFromCartPage,\n isExpressCheckoutAppliedInCartPage,\n isExpressAddressAppliedInCartPage,\n cardPaymentAcceptResult,\n address\n } = this.expressPaymentDetailsFromCartPage;\n\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\n newEmailAddressFromExpressCheckout: email ?? '',\n newTenderLine: tenderLine,\n newTokenizedPaymentCard: tokenizedPaymentCard,\n newPaymentTenderType: paymentTenderTypeFromCartPage,\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\n newCardPaymentAcceptResult: cardPaymentAcceptResult\n });\n\n if (isExpressAddressAppliedInCartPage && address) {\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\n newBillingAddressFromExpressCheckout: address\n });\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\n newShippingAddressFromExpressCheckout: address\n });\n } else {\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\n }\n\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\n newExtensionProperties: [\n {\n Key: 'expressPaymentDetails',\n Value: { StringValue: '' }\n }\n ]\n });\n }\n }\n );\n\n when(\n () => this.hasError,\n () => {\n this.setState({\n errorMessage: genericErrorMessage\n });\n this.props.context.telemetry.error('Failed to get cart');\n }\n );\n\n when(\n () => {\n return this.isEmptyCart;\n },\n () => {\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\n }\n );\n\n when(\n () => this.isCartReady,\n () => {\n this.validateForCheckout();\n }\n );\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\n async isReady => {\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isReady &&\n !this.props.data.checkout.result?.redirectAdditionalContext &&\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\n ) {\n if (!this.state.isPlaceOrderLoading) {\n this.setState({ isPlaceOrderLoading: true });\n }\n\n this.props.telemetry.information(\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\n );\n\n await this.onPlaceOrder();\n\n // If 3D authentication redirection, don't update isPlaceOrderLoading\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\n this.setState({ isPlaceOrderLoading: false });\n }\n }\n }\n );\n\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isBillingAddressHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n // Reaction to enable place order button when redirection is true for new checkout flow.\n reaction(\n () => this.canPlaceOrder,\n async () => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\n newIsPlaceOrderEnabledInRedirection: true\n });\n\n this.props.telemetry.information(\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\n );\n this.props.telemetry.information(\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\n this.canPlaceOrder\n }.`\n );\n }\n } else {\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\n }\n }\n );\n\n // Reaction to update the error message when there is a checkout error.\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n 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 };\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 const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\n );\n\n let updatedCartVersion: number | undefined;\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\n return {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: emailDeliveryModeCode,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\n }\n };\n });\n\n await updateLineDeliverySpecificationsAsync(\n { callerContext: this.props.context.actionContext },\n (await this.props.data.checkout).checkoutCart.cart.Id,\n lineDeliverySpecifications\n )\n .then(updatedCart => {\n updatedCartVersion = updatedCart.Version;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\n });\n }\n\n return updatedCartVersion;\n };\n\n /**\n * Return true if any product in the cart is over its max quantity.\n * @param cart -- The checkout cart.\n * @param products -- The checkout products.\n * @returns - Is any product in the cart is over max quantity.\n */\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\n let isOverMaxQuantity = false;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n await getAvailabilitiesForCartLineItems(\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\n this.props.context.actionContext\n )\n .then(productInventoryInformation => {\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\n\n cart.CartLines?.map(cartline => {\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\n\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\n const isEmailDelivery =\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n if (foundProductAvailability) {\n productsThatShouldValidateInventory.push(foundProductAvailability);\n }\n }\n });\n\n const cartLinesInventoryValidation = validateCartLinesInventory(\n cart.CartLines ?? [],\n productsThatShouldValidateInventory,\n this.props.context.actionContext,\n products,\n emailDeliveryModeCode\n );\n\n // If is invalid then exceeds the available quantity\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\n return isOverMaxQuantity;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\n });\n\n return isOverMaxQuantity;\n };\n\n /**\n * Gets active child in module state.\n * @returns - The module state manager collection.\n */\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n /**\n * On container ready.\n */\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Checkout onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n\n /**\n * Redirects to cart page.\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\n */\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n if (window && editCartLink) {\n window.location.assign(editCartLink);\n } else {\n this.setState({\n errorMessage: this.props.resources.genericErrorMessage\n });\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\n }\n };\n\n /**\n * Validates for checkout.\n * @param retry - Retry flag.\n */\n private readonly validateForCheckout = (retry: boolean = true): void => {\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\n const { Id, Version } = cart;\n const isOrderQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n 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 if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\n if (Version && Id) {\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\n .then((result: CartLineValidationResults) => {\n if (result.ValidationFailuresByCartLines?.length !== 0) {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n } else {\n this.setState({ isValidationPassed: true });\n }\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n const cartState = this.props.data.checkout.result?.checkoutCart;\n cartState\n ?.refreshCart({})\n .then(() => {\n this.validateForCheckout(false);\n })\n .catch((refreshError: Error) => {\n this.props.telemetry.warning(refreshError.message);\n this.props.telemetry.debug('Unable to refresh Cart');\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n } else {\n this.setState({ isValidationPassed: true });\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n /**\n * Save the address as Shipping and Billing address.\n * @param tokenizedPaymentCard - Tokenized payment card.\n */\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\n\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\n }\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const address: Address = {\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone\n };\n\n return address;\n };\n\n /**\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 },\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 }\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 { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './checkout';\nimport { IEmailDelivery } from './components';\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\n\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\n\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {pickUpAtStore && }\n {emailDelivery && }\n \n);\n\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\n \n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\n LineItemDeliveryGroup,\n LineItemList,\n heading,\n lineItems,\n lineItemWraper,\n lineItemWraperIcon\n}) => (\n \n {lineItemWraperIcon}\n {lineItemWraper}\n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {emailDelivery && }\n \n);\n\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const LineItemsComponent: React.FC = ({\n LineItems,\n Header,\n heading,\n editLink,\n itemsForPickup,\n itemsForShip,\n itemsForEmail,\n itemsGroupWithMulitplePickupMode\n}) => (\n \n \n {heading}\n {editLink}\n \n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\n {itemsGroupWithMulitplePickupMode !== undefined\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\n return ;\n })\n : null}\n \n);\n\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.subtotal}\n {lines.shipping}\n {lines.otherCharge}\n {lines.tax}\n {lines.totalDiscounts}\n {lines.loyalty}\n {lines.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 { 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\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 } from './components';\nimport { IGiftCardBalanceCheckViewProps } from './gift-card-balance-check';\n\nexport const Form: React.FC = ({\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n}) => (\n \n {alert}\n {supportExternalGiftCard ? (\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput && (\n \n {inputPinLabel}\n {inputPin}\n \n )}\n {showGiftCardExpInput && (\n \n {inputExpLabel}\n {inputExp}\n \n )}\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n ) : (\n <>\n {label}\n {inputNumber}\n \n )}\n {applyButton}\n \n);\n\nexport const Item: React.FC = ({ itemProps, selectedGiftCard }) => {selectedGiftCard};\n\nconst GiftCardBalanceCheckView: React.FC = props => {\n const { giftCardBalanceCheckProps, form, item } = props;\n return (\n \n {form &&
}\n {item && }\n \n );\n};\n\nexport default GiftCardBalanceCheckView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Coupon } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPromoCodeProps extends IComponentProps<{}> {\n cart: ICartState | undefined;\n promoCodeHeadingText: string;\n appliedPromoCodeHeadingText: string;\n removePromoAriaLabelFormat: string;\n promoPlaceholderText: string;\n promoCodeApplyButtonText: string;\n collapseTimeOut: number;\n removePromoText: string;\n invalidPromoCodeErrorText: string;\n failedToAddPromoCodeErrorText: string;\n duplicatePromoCodeErrorText: string;\n failedToRemovePromoCodeErrorText: string;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n promoCodeApplyCallback?(): void;\n}\n\ninterface IPromoCodeState {\n isCollapseOpen: boolean;\n promoCodeInputValue: string;\n error: string;\n canApply: boolean;\n}\n\n/**\n *\n * The PromoCode component renders the promocode section.\n * @extends {React.PureComponent}\n */\nclass PromoCode extends React.Component {\n private readonly payLoad: IPayLoad;\n\n constructor(props: IPromoCodeProps, state: IPromoCodeState) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\n this.state = {\n isCollapseOpen: false,\n promoCodeInputValue: '',\n error: '',\n canApply: false\n };\n }\n\n public shouldComponentUpdate(nextProps: IPromoCodeProps, nextState: IPromoCodeState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n return (\n
\n
{this.props.promoCodeHeadingText}
\n {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\n

\n {this.state.error}\n

\n {this._renderAppliedPromoCode(this.props)}\n
\n );\n }\n\n private readonly _onInputChangeHandler = (e: React.ChangeEvent) => {\n const error = e.target.value === '' ? '' : this.state.error;\n this.setState({\n promoCodeInputValue: e.target.value.trim(),\n error,\n canApply: !!e.target.value\n });\n };\n\n private readonly _applyPromotion = (cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart) {\n return;\n }\n const appliedPromo = this.state.promoCodeInputValue;\n\n cartState\n .addPromoCode({ promoCode: appliedPromo })\n .then(result => {\n if (result.status === 'SUCCESS') {\n // Show success text\n this.setState({ promoCodeInputValue: '', error: '', canApply: false });\n } else if (result.substatus === 'ALREADYADDED') {\n this.setState({ error: this.props.duplicatePromoCodeErrorText });\n } else {\n this.setState({ error: this.props.invalidPromoCodeErrorText });\n }\n })\n .catch(error => {\n this.setState({ error: this.props.failedToAddPromoCodeErrorText });\n });\n };\n\n /**\n * On Submit function.\n * @param cartState -Cartstate.\n * @returns Apply promotion.\n */\n private readonly _onSubmitHandler = (cartState: ICartState | undefined) => (event: React.FormEvent) => {\n event.preventDefault();\n this._applyPromotionHandler(cartState);\n };\n\n /**\n * On apply promotion function.\n * @param cartState -Cartstate.\n * @returns Apply promotion.\n */\n private readonly _applyPromotionHandler = (cartState: ICartState | undefined) => () => {\n this._applyPromotion(cartState);\n };\n\n private readonly _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n \n
\n \n \n {promoCodeApplyButtonText}\n \n
\n \n );\n };\n\n private readonly _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent) => {\n if (!cartState) {\n return;\n }\n const code = event.currentTarget.getAttribute('data-value') || '';\n cartState\n .removePromoCodes({\n promoCodes: [code]\n })\n .then(result => {\n if (result.status === 'SUCCESS') {\n this.setState({ error: '' });\n }\n })\n .catch(() => {\n this.setState({ error: this.props.failedToRemovePromoCodeErrorText });\n });\n };\n\n private readonly _calculateDiscount = (code: string, cartState: ICartState | undefined) => {\n if (!cartState || !cartState.cart || !cartState.cart.CartLines || cartState.cart.CartLines.length === 0 || !code) {\n return;\n }\n let discountAmount = 0;\n for (const line of cartState.cart.CartLines) {\n if (line.DiscountLines) {\n for (const discountLine of line.DiscountLines) {\n if (discountLine.DiscountCode === code) {\n discountAmount += discountLine.DiscountCost!;\n }\n }\n }\n }\n return discountAmount * -1;\n };\n\n private readonly _renderAppliedPromoCode = (props: IPromoCodeProps) => {\n if (!props.cart || !props.cart.cart || !props.cart.cart.Coupons || props.cart.cart.Coupons.length === 0) {\n return;\n }\n\n const removePromotionHandler = (event: React.MouseEvent) => {\n this._removePromotion(props.cart, event);\n };\n\n const promoCodTotalDiscount = props.cart.cart.Coupons.reduce((count: number, coupon: Coupon) => {\n return count + (this._calculateDiscount(coupon.Code || '', props.cart) || 0);\n }, 0);\n\n return (\n <>\n
\n
{this.props.appliedPromoCodeHeadingText}
\n \n
\n {props.cart.cart.Coupons.map((coupon: Coupon) => {\n const ariaLabel = props.removePromoAriaLabelFormat\n ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code)\n : '';\n\n return (\n
\n
\n {coupon.Code}{' '}\n \n
\n \n {props.removePromoText}\n \n
\n );\n })}\n \n );\n };\n}\n\nexport default PromoCode;\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}\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}) => {\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 { IProductsDimensionsAvailabilities } from '@msdyn365-commerce/commerce-entities';\nimport { IPriceComponentResources, ProductComponent } from '@msdyn365-commerce/components';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getCatalogId, getUrlSync, ICoreContext } from '@msdyn365-commerce/core';\nimport { ProductPrice, ProductSearchResult } from '@msdyn365-commerce/retail-proxy';\nimport {\n ArrayExtensions,\n DimensionAvailabilitiesForProductSearchResultInput,\n DimensionTypes,\n DimensionSwatchDisplayTypes,\n getDimensionAvailabilitiesForProductSearchResultAction,\n getPriceForProductSearchResult,\n IDimensionsApp,\n ObjectExtensions,\n PriceForProductSearchResultInput,\n validateCatalogId\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getTelemetryObject,\n IComponentNodeProps,\n IModuleProps,\n INodeProps,\n ISingleSlideCarouselProps,\n ITelemetryContent,\n NodeTag,\n SingleSlideCarousel\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IProductCollectionData } from './product-collection.data';\nimport { IProductCollectionProps, layout } from './product-collection.props.autogenerated';\n\nexport interface IProductCollectionViewProps extends IProductCollectionProps {\n heading?: React.ReactNode;\n ProductCollectionContainer: IModuleProps;\n SingleSlideCarouselComponentProps: INodeProps;\n GridComponentProps: INodeProps;\n products: IProductComponentViewProps[];\n isCarousel: boolean;\n productPrices?: ProductPrice[];\n seeAllButton?: React.ReactNode;\n}\n\nexport interface IProductComponentViewProps {\n ProductContainer: INodeProps;\n productComponent: React.ReactNode;\n}\nexport interface IProductComponentState {\n products: ProductSearchResult[];\n productsDimensionAvailabilities?: IProductsDimensionsAvailabilities[][];\n}\n\n/**\n * ProductCollection component.\n */\nclass ProductCollection extends React.PureComponent, IProductComponentState> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly productPrices: ProductPrice[];\n\n constructor(props: IProductCollectionProps) {\n super(props);\n this.productPrices = [];\n this.state = {\n products: this.props.config.productCollection.products || []\n };\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 {\n if (this.props.config.enableAffiliationBasedPricing && this.props.context.actionContext.requestContext.user.isAuthenticated) {\n await this._getActivePrice();\n }\n }\n\n public render(): JSX.Element | null {\n const { heading, className, shouldDisplaySeeAllButton } = this.props.config;\n const { resources } = this.props;\n const recommendation = this.props.config.productCollection.recommendationListId;\n\n // Initialize state in case if the products were not found during initial module render\n // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Initialize data if not there.\n this.initProductState(this.props.config.productCollection);\n\n const products = this.state.products;\n const isCarousel = this.props.config.layout === layout.carousel;\n const headingLabel = heading ? heading.text : '';\n const headingComponent = heading && (\n \n );\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- product check for safety.\n const updatedProducts = products?.map((item: ProductSearchResult, index: number) => {\n const getProductData = this._getProduct(item, index);\n return !ObjectExtensions.isNullOrUndefined(getProductData) ? getProductData : undefined;\n });\n\n const productCollectionViewProps = {\n ...this.props,\n heading: headingComponent,\n SingleSlideCarouselComponentProps: {\n tag: SingleSlideCarousel,\n className: '',\n flipperPrevLabel: `${headingLabel} ${resources.flipperPrevious}`,\n flipperNextLabel: `${headingLabel} ${resources.flipperNext}`,\n parentId: this.props.id,\n telemetryContent: this.telemetryContent\n } as IComponentNodeProps,\n ProductCollectionContainer: {\n moduleProps: this.props,\n className: classnames('ms-product-collection', className)\n },\n GridComponentProps: {\n tag: 'ul' as NodeTag,\n className: 'ms-product-collection__items'\n },\n isCarousel,\n\n products:\n ArrayExtensions.hasElements(updatedProducts) &&\n updatedProducts.filter(item => {\n return item !== undefined;\n }),\n productPrices: this.productPrices,\n seeAllButton:\n recommendation && shouldDisplaySeeAllButton && ArrayExtensions.hasElements(updatedProducts)\n ? this._getSeeAllButton(recommendation, headingLabel)\n : undefined\n };\n return this.props.renderView(productCollectionViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n /**\n * Get products dimension availabilities.\n * @param products - Products.\n * @returns Promise.\n */\n private readonly _getProductsDimensionsAvailabilities = async (products: ProductSearchResult[]): Promise => {\n const context = this.props.context as ICoreContext;\n const dimensionsToDisplayOnProductCard = context.app.config.dimensionsInProductCard;\n const dimensionsToDisplayAsSwatch = context.app.config.dimensionsAsSwatchType;\n const validProducts = ArrayExtensions.validValues(products);\n if (\n ArrayExtensions.hasElements(validProducts) &&\n ArrayExtensions.hasElements(dimensionsToDisplayOnProductCard) &&\n !dimensionsToDisplayOnProductCard.includes(DimensionTypes.none) &&\n ArrayExtensions.hasElements(dimensionsToDisplayAsSwatch) &&\n !dimensionsToDisplayAsSwatch.includes(DimensionTypes.none)\n ) {\n const productsDimensionAvailabilities = await getDimensionAvailabilitiesForProductSearchResultAction(\n new DimensionAvailabilitiesForProductSearchResultInput(\n validProducts,\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 /**\n * Helper method to initialize products state.\n * @param productCollection - List of products.\n */\n private readonly initProductState = async (productCollection: Msdyn365.IProductList) => {\n let products = this.state.products;\n const productCollectionProducts = productCollection.products;\n if (!ArrayExtensions.hasElements(products) && ArrayExtensions.hasElements(productCollectionProducts)) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (\n ArrayExtensions.hasElements(products) &&\n ArrayExtensions.hasElements(productCollectionProducts) &&\n !ArrayExtensions.equals(products, productCollectionProducts)\n ) {\n products = productCollectionProducts;\n this.setState({ products });\n } else if (productCollectionProducts === undefined && ArrayExtensions.hasElements(this.state.products)) {\n products = [];\n this.setState({ products: products });\n }\n\n if (Msdyn365.msdyn365Commerce.isBrowser && !ArrayExtensions.hasElements(this.state.productsDimensionAvailabilities)) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n };\n\n private readonly _getProduct = (product: ProductSearchResult, index: number): IProductComponentViewProps | null => {\n if (!product || !product.Name) {\n this.props.telemetry.trace('[product-collection] Product or product name is null');\n return null;\n }\n const telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const { imageSettings, allowBackNavigation } = this.props.config;\n const resources = this.props.resources;\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n const allowBack = allowBackNavigation && (breaCrumbType === 'back' || breaCrumbType === 'categoryAndBack');\n const quickviewSlot =\n this.props.slots && this.props.slots.quickview && this.props.slots.quickview.length > 0 ? this.props.slots.quickview[0] : null;\n const productComparisonButtonSlot = ArrayExtensions.hasElements(this.props.slots.productComparisonButton)\n ? this.props.slots.productComparisonButton[0]\n : null;\n\n const reviewCount = 1;\n const reviewTotalRatings = Number(product.TotalRatings);\n const reviewCountAriaLabelValue =\n reviewTotalRatings > reviewCount ? resources.ratingCountAriaLabel : resources.ratingCountAriaLabelSingleUser;\n const isPriceMinMaxEnabled = this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailSearchPriceRangeFeature'\n );\n const priceResources: IPriceComponentResources = {\n priceRangeSeparator: resources.priceRangeSeparator\n };\n return {\n ProductContainer: {\n tag: 'li' as NodeTag,\n className: 'ms-product-collection__item',\n role: 'listitem',\n key: index\n },\n productComponent: (\n \n ArrayExtensions.hasElements(dimensionAvailability) &&\n dimensionAvailability[0].masterProductId === (product.MasterProductId ?? product.RecordId)\n )}\n />\n )\n };\n };\n\n /**\n * Get the active price for products.\n */\n private readonly _getActivePrice = async (): Promise => {\n const productsList = this.state.products;\n const products = await getPriceForProductSearchResult(\n new PriceForProductSearchResultInput(productsList),\n this.props.context.actionContext\n );\n if (Msdyn365.msdyn365Commerce.isBrowser) {\n await this._getProductsDimensionsAvailabilities(products);\n }\n\n this.setState({ products });\n };\n\n /**\n * Get the see all button.\n * @param recommendation - Recommendation.\n * @param headingLabel - Heading label.\n * @returns IProductComponentSeeAllViewProps - Product component see all view props.\n */\n private readonly _getSeeAllButton = (recommendation: string, headingLabel: string): React.ReactNode => {\n if (!Msdyn365.msdyn365Commerce.isBrowser) {\n return null;\n }\n\n const catalogId = getCatalogId(this.props.context.request);\n validateCatalogId(catalogId);\n const searchPageLink = getUrlSync('search', this.props.context.actionContext);\n if (!searchPageLink) {\n return null;\n }\n\n const url = new URL(searchPageLink, window.location.href);\n url.searchParams.set('recommendation', recommendation);\n url.searchParams.set('title', headingLabel);\n url.searchParams.set('catalogid', `${catalogId}`);\n\n return (\n \n {this.props.resources.seeAllButtonText}\n \n );\n };\n}\n\nexport default ProductCollection;\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 { IProductCollectionViewProps, IProductComponentViewProps } from './product-collection';\n\nconst ProductCollectionView: React.FC = props => {\n const {\n heading,\n ProductCollectionContainer,\n products,\n SingleSlideCarouselComponentProps,\n GridComponentProps,\n isCarousel,\n seeAllButton\n } = props;\n\n if (products) {\n return (\n \n {heading}\n {seeAllButton}\n {isCarousel ? _renderCarousel(SingleSlideCarouselComponentProps, products) : _renderGrid(GridComponentProps, products)}\n \n );\n }\n props.context.telemetry.error('Product collection content is empty, module wont render.');\n return null;\n};\n\nconst _renderCarousel = (carouselContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderGrid = (gridContainer: INodeProps, items: IProductComponentViewProps[]): JSX.Element => {\n return {items && items.map(_renderProduct)};\n};\n\nconst _renderProduct = (product: IProductComponentViewProps): JSX.Element => {\n const { ProductContainer, productComponent } = product;\n\n return {productComponent};\n};\n\nexport default ProductCollectionView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, Collapse, ICollapseProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IQuickOrderDrawerProps } from './quick-order-drawer-props';\n\nexport interface IQuickOrderDrawerState {\n isOpen: boolean;\n}\n\nexport type GlyphPlacement = 'start' | 'end';\n\n/**\n * Quick Order Drawer - This is a full width uncontrolled collapse where the button glyph changes\n * when the drawer is open and closed.\n */\n\nexport default class QuickOrderDrawer extends React.Component {\n public state: IQuickOrderDrawerState;\n\n private readonly drawerOpenGlyph: string;\n\n private readonly drawerCloseGlyph: string;\n\n private readonly drawerGlyphClass: string;\n\n private isManuallyToggled: boolean;\n\n constructor(props: IQuickOrderDrawerProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this.isManuallyToggled = false;\n this.state = { isOpen: (props.collapseProps && props.collapseProps.isOpen) || false };\n this.drawerGlyphClass = classnames('drawer__glyph', this.props.toggleGlyphClassName ? this.props.toggleGlyphClassName : '');\n\n if (this.props.animateGlyph) {\n this.drawerOpenGlyph = classnames(\n this.drawerGlyphClass,\n this.props.openGlyph ? this.props.openGlyph : this.props.closeGlyph ? this.props.closeGlyph : ''\n );\n this.drawerCloseGlyph = this.drawerOpenGlyph;\n } else {\n this.drawerOpenGlyph = classnames(this.drawerGlyphClass, this.props.openGlyph ? this.props.openGlyph : '');\n this.drawerCloseGlyph = classnames(this.drawerGlyphClass, this.props.closeGlyph ? this.props.closeGlyph : '');\n }\n }\n\n public shouldComponentUpdate(nextProps: IQuickOrderDrawerProps, nextState: IQuickOrderDrawerState): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const collapseProps = { ...this.props.collapseProps } as ICollapseProps;\n\n // If the drawer is manually toggled by pressing the button, then we use the internal state\n if (collapseProps.isOpen === undefined || this.isManuallyToggled) {\n collapseProps.isOpen = this.state.isOpen;\n } else {\n // eslint-disable-next-line react/no-direct-mutation-state\n this.state.isOpen = collapseProps.isOpen;\n }\n collapseProps.children = this.props.children;\n const drawerClass = classnames('drawer', this.props.className ? this.props.className : '');\n this.isManuallyToggled = false;\n return (\n
\n \n {this._generateDrawerButtonInnerMarkup(collapseProps.isOpen)}\n \n \n
\n );\n }\n\n private _generateDrawerButtonInnerMarkup(collapseState: boolean): JSX.Element {\n const drawerButtonTextClass = classnames(\n 'drawer__buttontext',\n this.props.toggleButtonClassName ? this.props.toggleButtonClassName : ''\n );\n return (\n <>\n

{this.props.moduleHeadingText}

\n \n {this.props.moduleDescriptionText}\n \n {this._generateGlyphMarkup('drawer__glyph__end', collapseState)}\n \n );\n }\n\n private _generateGlyphMarkup(location: string, collapseState: boolean): JSX.Element {\n let glyphClass = collapseState ? this.drawerOpenGlyph : this.drawerCloseGlyph;\n glyphClass = `${glyphClass} ${location}`;\n return ;\n }\n\n private _toggle(e: React.MouseEvent | React.KeyboardEvent): void {\n e.preventDefault();\n this.setState({ isOpen: !this.state.isOpen });\n this.isManuallyToggled = true;\n if (this.props.onToggle) {\n this.props.onToggle(this.state);\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 { Alert, Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IQuickOrderState } from '../quick-order';\n\nexport interface IQuickOrderFormProps {\n disableAddtoCart: boolean | undefined;\n productTextInput: React.RefObject;\n quantityTextInput: React.RefObject;\n maxChars: number;\n maxQuantity?: number;\n ariaLabelQuantity: string;\n ariaLabelProduct: string;\n ariaLabelAddtoCart: string;\n addQuantityPlaceholderText: string;\n quickOrderState: IQuickOrderState;\n handleInputChange(query: string): void;\n handleQuantityChange(query: string): void;\n handleAddToCartClick(): Promise;\n}\n\nexport interface IQuickOrderFormViewProps {\n product: React.ReactNode;\n quantity: React.ReactNode;\n addToCartBtn: React.ReactNode;\n userMessage?: React.ReactNode;\n}\n\n/**\n * On Input Change functionality.\n * @param handleInputChange -Input change function.\n * @returns Input change value.\n */\nconst onInputChangeFunction = (handleInputChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleInputChange(event.target.value || '');\n};\n\n/**\n * On Quantity Change functionality.\n * @param handleQuantityChange -Quantity change function.\n * @returns Quantity change value.\n */\nconst onQuantityChangeFunction = (handleQuantityChange: (query: string) => void) => (event: React.ChangeEvent) => {\n handleQuantityChange(event.target.value || '');\n};\n\nexport const QuickOrderFormComponent = (props: IQuickOrderFormProps): IQuickOrderFormViewProps => {\n const {\n productTextInput,\n quantityTextInput,\n quickOrderState,\n maxChars,\n maxQuantity,\n disableAddtoCart,\n ariaLabelQuantity,\n ariaLabelProduct,\n ariaLabelAddtoCart,\n addQuantityPlaceholderText,\n handleQuantityChange,\n handleInputChange,\n handleAddToCartClick\n } = props;\n\n const onInputChange = onInputChangeFunction(handleInputChange);\n\n const onQuantityInputChange = onQuantityChangeFunction(handleQuantityChange);\n\n const productNode = (\n
\n

\n {ariaLabelProduct}\n

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

\n {ariaLabelQuantity}\n

\n \n
\n );\n\n const addtoCartNode = (\n
\n \n {ariaLabelAddtoCart}\n \n
\n );\n\n const userMessageNode =\n quickOrderState && quickOrderState.stateMessage ? (\n \n \n {quickOrderState.stateMessage.messageText}\n \n ) : (\n undefined\n );\n\n return {\n product: productNode,\n addToCartBtn: addtoCartNode,\n quantity: quantityNode,\n userMessage: userMessageNode\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { observable } from 'mobx';\n\n/**\n * Represents a product for quick order.\n */\nexport class QuickOrderProduct {\n @observable\n public isSelected: boolean;\n\n public readonly cartLine: CartLine;\n\n public readonly simpleProduct: SimpleProduct;\n\n public constructor(cartLine: CartLine, simpleProduct: SimpleProduct) {\n this.cartLine = cartLine;\n this.simpleProduct = simpleProduct;\n this.isSelected = false;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\n/**\n * Interface for quick order table header resources.\n */\nexport interface IQuickOrderTableHeaderResources {\n quickOrderProductNumberText: string;\n quickOrderProductText: string;\n quickOrderUnitPriceText: string;\n quickOrderUnitOfMeasureText: string;\n quickOrderQuantityText: string;\n quickOrderTotalText: string;\n quickOrderActionsText: string;\n}\n\n/**\n * Interface for quick order table props.\n */\nexport interface IQuickOrderTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isMobile: boolean;\n resources: IQuickOrderTableHeaderResources;\n}\n\n/**\n * Interface for quick order table header component.\n */\nexport interface IQuickOrderTableHeaderComponent extends IComponent {}\n\n/**\n * Get the quick order header cells for desktop.\n * @param props -- The quick order table header props.\n * @returns The list of cells for quick order header component in desktop version.\n */\nconst QuickOrderDesktopHeaderCellsComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const { resources } = props;\n const columnWithNumberClassName = `${props.className}__row__column-with-number`;\n return (\n <>\n \n \n \n {resources.quickOrderProductNumberText}\n {resources.quickOrderProductText}\n {resources.quickOrderUnitPriceText}\n {resources.quickOrderUnitOfMeasureText}\n {resources.quickOrderQuantityText}\n {resources.quickOrderTotalText}\n {resources.quickOrderActionsText}\n \n );\n};\n\n/**\n * Get the quick order header cells for mobile.\n * @param props -- The quick order table header props.\n * @returns The quick order header component in desktop version.\n */\nconst QuickOrderMobileHeaderCellsComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const { resources } = props;\n return (\n <>\n \n {resources.quickOrderProductNumberText}\n \n \n );\n};\n\n/**\n * Quick order table header component.\n * @param props - Configuration of the component.\n * @returns React node with the header.\n */\nexport const QuickOrderTableHeaderComponent: React.FC = (props: IQuickOrderTableHeaderProps) => {\n const rowClassName = `${props.className}__row`;\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = ;\n } else {\n headerCells = ;\n }\n\n return (\n \n {headerCells}\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, ICoreContext, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { CartLine, format, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IncrementalQuantity } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\n/**\n * Data required to render each quick order row.\n */\nexport interface IQuickOrderTableRowData {\n cartLine: CartLine;\n product: SimpleProduct;\n}\n\n/**\n * Resources for quick order table rows.\n */\nexport interface IQuickOrderTableRowResources {\n quickOrderQuantityMobileText: string;\n quickOrderProductDimensionsSeparator: string;\n quickOrderViewDetailsButtonText: string;\n quickOrderViewDetailsButtonAriaLabel: string;\n quickOrderRemoveItemButtonAriaLabel: string;\n quickOrderInputQuantityAriaLabel: string;\n quickOrderDecrementButtonAriaLabel: string;\n quickOrderIncrementButtonAriaLabel: string;\n}\n\n/**\n * Interface for quick order table props.\n */\nexport interface IQuickOrderTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n imageSettings?: IImageSettings;\n isMobile: boolean;\n resources: IQuickOrderTableRowResources;\n}\n\n/**\n * The default image settings for quick order table row.\n */\nconst defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=80&h=80&m=6', w: 0, h: 0 },\n lg: { q: 'w=147&h=147&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n};\n\n/**\n * Renders product image for quick order row.\n * @param props - Quick order table row props.\n * @returns React element.\n */\nconst QuickOrderTableRowProductImageComponent: React.FC = (props: IQuickOrderTableRowProps) => {\n const fallbackImageUrl = getFallbackImageUrl(props.data.product.ItemId, props.context.actionContext.requestContext.apiSettings);\n\n const containerClassName = `${props.className}__product-image-container`;\n\n return (\n
\n \n
\n );\n};\n\n/**\n * Renders actions popup for the mobile view.\n * @param props - Configuration for popup.\n * @returns A react node with actions..\n */\nconst QuickOrderExtraActionsPopupComponent: React.FC = (props: IQuickOrderTableRowProps): JSX.Element | null => {\n const product: SimpleProduct = props.data.product;\n\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 if (StringExtensions.isNullOrWhitespace(productUrl)) {\n return null;\n }\n\n const className = `${props.className}__extra-actions-cell`;\n\n return (\n
\n
\n );\n};\n\n/**\n * Renders quick order table rows for desktop view.\n * @param props - Configuration for the rows.\n * @returns A react node with a list of quick order rows for desktop view.\n */\nexport const QuickOrderDesktopTableRowCellComponent: React.FC = (props: IQuickOrderTableRowProps) => {\n const product: SimpleProduct = props.data.product;\n const cartLine: CartLine = props.data.cartLine;\n const columnWithNumberClassName = `${props.className}__column-with-number`;\n\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.quickOrderProductDimensionsSeparator)}\n \n
\n \n {cartLine.Price}\n {cartLine.UnitOfMeasureSymbol}\n \n \n \n {cartLine.TotalAmount}\n \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 { ProductRefinerSource, ProductRefinerValue, RefinerType } 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';\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\n return (\n
  • \n \n {hasContentSwatch && shouldDisplayAsSwatch && this._renderSwatch(dimensionType)}\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 { IProductRefinerHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport { DisplayTemplate, ProductRefinerSource, ProductRefinerValue, RefinerType } 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, isRangeType } from './utilities';\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 // If (this.props.productRefinerHierarchy.DataTypeValue === ProductRefinerValueDataTypeValue.Range) {\n // isExpanded = true;\n // }\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 (isRangeType(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 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 const selectedRefinementCriterion = findMatchingRefinementCriterion(child, selectedRefinerValues);\n\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 \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} 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 { computed, observable, reaction, transaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n BaseCollectionInput,\n buildListPageUrl,\n getCollectionProducts,\n getCollectionRefinersAction,\n getCurrentUrl,\n GetFullProductsByCollectionInput,\n getInventoryRefinerAction,\n IFullProductsSearchResultsWithCount,\n InventoryInStockRefinerValueInput,\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 // Push inventory in stock refiner when productListInventoryDisplay is hide oos\n const inventoryRefiner = await this._getInventoryRefiner(listPageState, channelInventoryConfiguration);\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 inventoryRefiner\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 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 // eslint-disable-next-line @typescript-eslint/no-floating-promises -- Call api to retrieve the availabilities of dimensions data without blocking the UI.\n this._getProductsDimensionsAvailabilities();\n }\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 inventoryRefiner\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 }\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 * Update the list page state with initial data.\n * @param listPageState -- List page State.\n * @param products -- Products.\n */\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 &&\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 = 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 /**\n * Get inventory refiners.\n * @param listPageState The listPageState\n * @returns inventory refiner.\n */\n private readonly _getInventoryRefiner = async (\n listPageState: ListPageState,\n channelInventoryConfiguration: ChannelInventoryConfiguration\n ): Promise<IProductRefinerHierarchy | undefined> => {\n if (this.props.context.app.config.productListInventoryDisplay === ProductListInventoryFilteringOptions.HideOOS) {\n const baseCollectionInput = new BaseCollectionInput(\n listPageState.pageType,\n this.props.context.request.apiSettings,\n {\n count: true\n },\n\n // Parameter - refiners\n [],\n\n // Parameter - category\n undefined,\n\n // Parameter - searchText\n '',\n\n // Parameter - includeAttributes\n false,\n\n // Parameter - isUpdateRefinerPanel\n false,\n\n // Parameter - locale\n undefined,\n this.catalogId,\n channelInventoryConfiguration\n );\n const inventoryInStockRefinerValueInput = new InventoryInStockRefinerValueInput(\n baseCollectionInput,\n channelInventoryConfiguration?.InventoryProductAttributeRecordId\n );\n return getInventoryRefinerAction(inventoryInStockRefinerValueInput, this.props.context.actionContext);\n }\n return Promise.resolve(undefined);\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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAdditionalContentData, ILinksData } from '../video-player.props.autogenerated';\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content Component props.\n */\nexport interface IVideoPlayerAdditionalContentProps {\n requestContext: Msdyn365.IRequestContext;\n additionalContent: IAdditionalContentData | undefined;\n handleAdditionalTextChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalParagraphChange(event: Msdyn365.ContentEditableEvent): void;\n handleAdditionalLinkTextChange(linkIndex: number, event: Msdyn365.ContentEditableEvent): void;\n}\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content view props.\n */\nexport interface IVideoPlayerAdditionalContentViewProps {\n additionalContentNode: INodeProps;\n additionalContentItems?: IVideoPlayerAdditionalContentItemViewProps;\n}\n\n/**\n * IVideoPlayerAdditionalContentProps: Interface for\n * Video Player Additional Content Item view props.\n */\nexport interface IVideoPlayerAdditionalContentItemViewProps {\n heading: React.ReactNode;\n text: React.ReactNode;\n links: React.ReactNode;\n additionalContentItemContainer: INodeProps;\n additionalContentItemLinks: INodeProps;\n}\n\n/**\n * Renders additional content heading.\n * @param additionalContentHeading - Additional content heading.\n * @param props - Video Player Additional content component props.\n * @returns Heading Node.\n */\nconst renderHeading = (additionalContentHeading: string, props: IVideoPlayerAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Text\n text={additionalContentHeading}\n tag='p'\n className='ms-video-player__details__additional-content__text'\n editProps={{\n /**\n * On edit event for heading text change.\n * @param event - Change event.\n */\n onEdit: event => {\n props.handleAdditionalTextChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param additionalContentParagraphText - Additional content paragraph text.\n * @param props - Video Player Additional content component props.\n * @returns Paragraph Node.\n */\nconst renderParagraph = (additionalContentParagraphText: string, props: IVideoPlayerAdditionalContentProps) => {\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Text\n text={additionalContentParagraphText}\n tag='p'\n className='ms-video-player__details__additional-content__paragraph'\n editProps={{\n /**\n * On edit event for heading text change.\n * @param event - Change event.\n */\n onEdit: event => {\n props.handleAdditionalParagraphChange(event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Renders additional content heading.\n * @param ctaLink - Additional content link.\n * @param props - Video Player Additional content component props.\n * @param linkIndex - Additional content link index.\n * @returns Link Node.\n */\nconst renderLinks = (ctaLink: ILinksData, props: IVideoPlayerAdditionalContentProps, linkIndex: number) => {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: ctaLink.ariaLabel,\n className: 'ms-video-player__details__additional-content__cta__links',\n linkText: ctaLink.linkText,\n linkUrl: ctaLink.linkUrl.destinationUrl,\n openInNewTab: ctaLink.openInNewTab,\n role: 'link'\n };\n const requestContext = props.requestContext;\n return (\n <Msdyn365.Link\n key={linkIndex}\n link={editableLink}\n editProps={{\n /**\n * Handle additional Link Text change.\n * @param event - The keyboard event.\n */\n onTextChange: event => {\n props.handleAdditionalLinkTextChange(linkIndex, event);\n },\n requestContext\n }}\n />\n );\n};\n\n/**\n * Create node for each additonal content item.\n * @param item - Video Player additonal content item props.\n * @param props - Video Player Additional content component props.\n * @returns IVideoPlayerAdditionalContentItemViewProps.\n */\nconst getAdditionalContentItems = (\n item: IAdditionalContentData,\n props: IVideoPlayerAdditionalContentProps\n): IVideoPlayerAdditionalContentItemViewProps => {\n const headingNode = item.heading && renderHeading(item.heading, props);\n const paragraphNode = item.subtext && renderParagraph(item.subtext, props);\n const linksNode = item.links?.map((ctaLink: ILinksData, index: number) => {\n return renderLinks(ctaLink, props, index);\n });\n\n return {\n heading: headingNode,\n text: paragraphNode,\n links: linksNode,\n additionalContentItemContainer: { className: 'ms-video-player__details__additional-content__container' },\n additionalContentItemLinks: { className: 'ms-video-player__details__additional-content__cta' }\n };\n};\n\n/**\n * VideoPlayerAdditionalContent component.\n * @param props - Video Player Additional content component props.\n * @returns Video Player Additional content view props.\n */\nexport const videoPlayerAdditionalContent = (\n props: IVideoPlayerAdditionalContentProps\n): IVideoPlayerAdditionalContentViewProps | undefined => {\n const { additionalContent } = props;\n if (!additionalContent) {\n return undefined;\n }\n\n const reactNodes: IVideoPlayerAdditionalContentItemViewProps = getAdditionalContentItems(additionalContent, props);\n return {\n additionalContentNode: { className: 'ms-video-player__details__additional-content' },\n additionalContentItems: reactNodes\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IPlayerData, IPlayerOptions, IPlayerResources, IVideoMetadata, Player } from '@msdyn365-commerce/components';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport {\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n INodeProps,\n isMobile,\n ITelemetryContent,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IVideoPlayerAdditionalContentViewProps, videoPlayerAdditionalContent } from './components/additional-content';\nimport { ILinksData, IVideoPlayerConfig, IVideoPlayerProps } from './video-player.props.autogenerated';\n\nexport interface IVideoPlayerViewProps extends IVideoPlayerProps<{}> {\n player: React.ReactNode;\n title?: React.ReactNode;\n text?: React.ReactNode;\n links?: React.ReactNode;\n detailsContainer?: INodeProps;\n detailsContainerCta?: INodeProps;\n additionalContent?: IVideoPlayerAdditionalContentViewProps;\n handleText?(): void;\n handleParagraph?(): void;\n handleAdditionalText?(): void;\n handleAdditionalParagraph?(): void;\n handleLink?(): void;\n handleAdditionalLink?(): void;\n}\n\n/**\n *\n * VideoPlayer component.\n * @extends {React.PureComponent<IVideoPlayerProps<IVideoPlayerData>>}\n */\nclass VideoPlayer extends React.PureComponent<IVideoPlayerProps<IVideoPlayerConfig>> {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly isMobileDevice: boolean;\n\n public constructor(props: IVideoPlayerProps<IVideoPlayerConfig>) {\n super(props);\n this.isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const options = {\n ...this.props.config,\n isMobileDevice: this.isMobileDevice\n };\n const video: MsDyn365.IVideoData = this.props.config.video;\n const playerResources: IPlayerResources = {\n playAriaLabel: this.props.resources.playLabel,\n pauseAriaLabel: this.props.resources.pauseLabel,\n playingAriaLabel: this.props.resources.playingLabel,\n pausedAriaLabel: this.props.resources.pausedLabel,\n muteAriaLabel: this.props.resources.muteLabel,\n unMuteAriaLabel: this.props.resources.unMuteLabel,\n fullScreenAriaLabel: this.props.resources.fullScreenLabel,\n exitFullScreenAriaLabel: this.props.resources.exitFullScreenLabel,\n seekBarLabel: this.props.resources.seekBarLabel,\n videoTimeDurationLabel: this.props.resources.videoTimeDurationLabel,\n closedCaptionLabel: this.props.resources.closedCaptionLabel\n };\n const videoMetaData: IVideoMetadata = {};\n\n if (video) {\n videoMetaData.videoId = video.id;\n videoMetaData.title = video.title;\n videoMetaData.duration = video.playTime;\n\n if (video.thumbnail) {\n videoMetaData.posterframeUrl = video.thumbnail.src;\n }\n\n if (video._links?.binaryReferences) {\n videoMetaData.videoBinaryReferences = video._links.binaryReferences;\n }\n }\n const videoPlayerData: IPlayerData = { options: options as IPlayerOptions, metaData: videoMetaData };\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\n player: (\n <MsDyn365.Video className='' editProps={{ key: this.props.config.video, requestContext: this.props.context.request }}>\n <Player\n playerData={videoPlayerData}\n playerResources={playerResources}\n telemetryContent={this.telemetryContent}\n isEditor={this.props.context.request.params.isEditor}\n />\n </MsDyn365.Video>\n ),\n title: this._getVideoDetailsHeading(),\n text: this._getVideoDetailsParagraph(),\n links: this._getVideoDetailsLinks(),\n detailsContainer: { className: 'ms-video-player__details' },\n detailsContainerCTA: { className: 'ms-video-player__details__cta' },\n additionalContent: videoPlayerAdditionalContent({\n requestContext: this.props.context.request,\n additionalContent: this.props.config.additionalContent,\n handleAdditionalTextChange: this.handleAdditionalTextChange,\n handleAdditionalParagraphChange: this.handleAdditionalParagraphChange,\n handleAdditionalLinkTextChange: this.handleAdditionalLinkTextChange\n }),\n handleText: this.handleTextChange,\n handleParagraph: this.handleParagraphChange,\n handleAdditionalText: this.handleAdditionalTextChange,\n handleAdditionalParagraph: this.handleAdditionalParagraphChange,\n handleLink: this.handleLinkTextChange,\n handleAdditionalLink: this.handleAdditionalTextChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle link text change.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.links && this.props.config.links[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * Handle text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handle paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * Handle additional text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.heading = event.target.value;\n }\n }\n\n /**\n * Handle additional link text change.\n * @param linkIndex - The link index.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalLinkTextChange(linkIndex: number, event: MsDyn365.ContentEditableEvent): void {\n const additionalContent = this.props.config.additionalContent ?? {};\n if (additionalContent.links) {\n additionalContent.links[Number(linkIndex)].linkText = event.target.value;\n }\n }\n\n /**\n * Handle additional paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleAdditionalParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.additionalContent) {\n this.props.config.additionalContent.subtext = event.target.value;\n }\n }\n\n /**\n * Get video details links.\n * @returns - React node.\n */\n private _getVideoDetailsLinks(): React.ReactNode[] | undefined {\n const { links } = this.props.config;\n const payLoad = getPayloadObject('click', this.telemetryContent, '');\n\n return links?.map((linkData: ILinksData, index: number) => {\n payLoad.contentAction.etext = linkData.linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n const linkId = index;\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: linkData.ariaLabel,\n className: 'ms-video-player__details__cta__link',\n linkText: linkData.linkText,\n linkUrl: linkData.linkUrl.destinationUrl,\n openInNewTab: linkData.openInNewTab,\n role: 'button',\n additionalProperties: attributes\n };\n\n return (\n <MsDyn365.Link\n key={linkId}\n link={editableLink}\n editProps={{\n /**\n * Handle additional paragraph change.\n * @param event - The keyboard event.\n */\n onTextChange: event => {\n this.handleLinkTextChange(index, event);\n },\n requestContext: this.props.context.request\n }}\n />\n );\n });\n }\n\n private _getVideoDetailsHeading(): React.ReactNode | undefined {\n const { heading } = this.props.config;\n\n return (\n heading && (\n <MsDyn365.Text\n className='ms-video-player__details__title'\n tag={heading.tag ?? 'h1'}\n text={heading.text}\n editProps={{ onEdit: this.handleTextChange, requestContext: this.props.context.request }}\n />\n )\n );\n }\n\n private _getVideoDetailsParagraph(): React.ReactNode | undefined {\n const { paragraph } = this.props.config;\n\n return (\n paragraph && (\n <MsDyn365.RichTextComponent\n text={paragraph}\n className='ms-video-player__details__text'\n editProps={{ onEdit: this.handleParagraphChange, requestContext: this.props.context.request }}\n />\n )\n );\n }\n}\n\nexport default VideoPlayer;\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 { IVideoPlayerAdditionalContentViewProps } from './components/additional-content';\nimport { IVideoPlayerViewProps } from './video-player';\n\n/**\n * Render Additional Content.\n * @param additionalContent - Additional content view props.\n * @returns JSX Element.\n */\nconst renderAdditionalContent = (additionalContent: IVideoPlayerAdditionalContentViewProps) => {\n if (additionalContent.additionalContentItems) {\n return (\n <Node {...additionalContent.additionalContentNode}>\n <>\n {additionalContent.additionalContentItems.heading}\n <Node {...additionalContent.additionalContentItems.additionalContentItemContainer}>\n {additionalContent.additionalContentItems.text}\n <Node {...additionalContent.additionalContentItems.additionalContentItemLinks}>\n {additionalContent.additionalContentItems.links}\n </Node>\n </Node>\n </>\n </Node>\n );\n }\n\n return null;\n};\n\nconst VideoPlayerView: React.FC<IVideoPlayerViewProps> = props => {\n return (\n <div id={props.id} className='ms-video-player' {...props.renderModuleAttributes(props)}>\n {props.player}\n <Node {...props.detailsContainer} className={props.detailsContainer ? props.detailsContainer.className : ''}>\n {props.title}\n {props.text}\n {props.additionalContent && renderAdditionalContent(props.additionalContent)}\n <Node {...props.detailsContainerCta} className={props.detailsContainerCta ? props.detailsContainerCta.className : ''}>\n {props.links}\n </Node>\n </Node>\n </div>\n );\n};\n\nexport default VideoPlayerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AddToCartBehavior } from '@msdyn365-commerce/components';\nimport MsDyn365, { getUrlSync } from '@msdyn365-commerce/core';\nimport { ICartIconViewProps, ICartViewProps, IFlyoutCartLineItemViewProps } from '@msdyn365-commerce-modules/cart';\nimport { Button, getPayloadObject, INodeProps, KeyCodes, Modal, Node, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { ICartIconProps as ICartIconExtensionProps } from '../definition-extensions/cart-icon.ext.props.autogenerated';\n\n/**\n * ICartIconViewState: Interface for Cart Icon View State.\n */\ninterface ICartIconViewState {\n isModalOpen: boolean;\n}\n\n/**\n * Render Cart lines.\n * @param cartLines - Flyout cart line view props.\n * @param props - Cart icon view props.-\n * @returns JSX Element.\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\n return cartLines.map((cartLine, index) => {\n const cartLineIndex = index;\n return (\n <Node {...props.miniCartItemWrapper} key={cartLineIndex}>\n <Node className={classnames(cartLine.storeLocation ? 'msc-cart-line__set-net-price' : '')}>{cartLine.cartline}</Node>\n {cartLine.storeLocation}\n {cartLine.remove}\n </Node>\n );\n });\n};\n\n/**\n * Initiate total price.\n * @param props - Cart icon view props.\n * @returns JSX Element.\n */\nconst renderTotalPrice = (props: ICartIconViewProps & ICartIconExtensionProps<{}>): JSX.Element | null => {\n const cart = props.data.cart.result ?? undefined;\n const price = cart && !cart.hasInvoiceLine && (cart.cart.TotalAmount || undefined);\n const totalPrice = price\n ? props.context.cultureFormatter.formatCurrency(price)\n : props.context.cultureFormatter.formatCurrency(props.resources.emptyPrice);\n return (\n <div className='ms-cart-icon__subTotalText'>\n <span className='ms-cart-icon__subTotalPriceText'>\n {props.resources.totalPriceFormatString}\n <span className='ms-cart-icon__subTotalPrice'>{totalPrice}</span>\n </span>\n </div>\n );\n};\n\n/**\n *\n * CartIconView component.\n * @extends {React.PureComponent<ICartIconViewProps>}\n */\nexport class CartIconView extends React.PureComponent<\n ICartViewProps & ICartIconViewProps & ICartIconExtensionProps<{}>,\n ICartIconViewState\n> {\n private isAutoDisplayTriggered: boolean;\n\n private readonly cartIconRef: React.RefObject<HTMLButtonElement> = React.createRef();\n\n public constructor(props: ICartViewProps & ICartIconViewState & ICartIconViewProps & ICartIconExtensionProps<{}>) {\n super(props);\n this.isAutoDisplayTriggered = false;\n this.state = {\n isModalOpen: false\n };\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n window.addEventListener('keydown', this._escFunction, false);\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('keydown', this._escFunction, false);\n }\n }\n\n /**\n * Render Cart Item count.\n * @returns JSX Element.\n */\n public render(): JSX.Element | null {\n const cart = this.props.data.cart.result ?? undefined;\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 if (shouldShowMiniCart) {\n if (!this.isAutoDisplayTriggered) {\n // First time trigger auto mini cart.\n this.setState({ isModalOpen: true });\n this.isAutoDisplayTriggered = true;\n } else if (!this.state.isModalOpen) {\n // If modal is closed, reset the flag.\n this.isAutoDisplayTriggered = false;\n }\n }\n return (\n <Node {...this.props.miniCartWrapper} {...this.props.renderModuleAttributes(this.props)}>\n <button onClick={this._openModal} className='ms-cart-icon-wrapper msc-btn' ref={this.cartIconRef}>\n {this.props.cartIcon}\n </button>\n <Node {...this._modalContainer()}>\n <Node className='ms-cart-icon__header msc-modal__header'>\n {this.props.flyoutTitle}\n {this._renderCartItemCount(this.props)}\n {this._renderCartCloseIcon()}\n </Node>\n <Node className='ms-cart-icon__body msc-modal__body'>\n {this.props.data.cart.result?.isEmpty ? this.props.slots.emptyCart : null}\n {this.props.checkoutBlockedDueToUnavailableFunds}\n <Node {...this.props.CartlinesWrapper}>{renderCartlines(this.props.cartlines, this.props)}</Node>\n </Node>\n <Node className='ms-cart-icon__footer msc-modal__footer'>\n {this.props.slots.promoContentItem}\n {renderTotalPrice(this.props)}\n <p className='ms-cart-icon__subtotal-message'>{this.props.resources.subTotalMessage}</p>\n {this.props.checkoutAsSignInUserButton}\n {this.props.checkoutAsGuestButton}\n {this.props.data.cart.result?.isEmpty ? null : this.props.goToCartButton}\n <Node className='ms-cart-icon__btn-section'>\n {this.props.data.cart.result?.isEmpty ? (\n <Button\n className='ms-cart-icon__btn-backtoshopping'\n href={getUrlSync('home', this.props.context.actionContext)}\n >\n {this.props.resources.continueShoppingButtonTitle}\n </Button>\n ) : null}\n </Node>\n </Node>\n </Node>\n </Node>\n );\n }\n\n /**\n * Initiate modal container.\n * @returns Inode props.\n */\n private readonly _modalContainer = (): INodeProps => {\n return {\n tag: Modal,\n placement: 'bottom-end',\n hideArrow: true,\n className: 'ms-cart-icon__minicartmodal-container',\n wrapClassName: 'ms-cart-icon__minicartmodal',\n isOpen: this.state.isModalOpen,\n toggle: this.closeModal\n };\n };\n\n /**\n * Initiate open modal.\n */\n private readonly _openModal = (): void => {\n const payLoad = getPayloadObject('click', this.props.telemetryContent!, 'cart-icon', '');\n onTelemetryClick(this.props.telemetryContent!, payLoad, 'cart-icon');\n this.setState({\n isModalOpen: true\n });\n };\n\n /**\n * Initiate close modal.\n */\n private readonly closeModal = (): void => {\n this.cartIconRef.current?.focus();\n this.setState({\n isModalOpen: false\n });\n };\n\n /**\n * Initiate cart close Icon.\n * @returns JSX Element.\n */\n private readonly _renderCartCloseIcon = (): JSX.Element | null => {\n return <Button className='ms-cart-icon__btn-close' aria-label='Close' onClick={this.closeModal} />;\n };\n\n /**\n * Render Cart Item count.\n * @param props - Cart icon view props.\n * @returns JSX Element.\n */\n private readonly _renderCartItemCount = (props: ICartIconViewProps & ICartIconExtensionProps<{}>): JSX.Element | null => {\n const defaultCartItemCount: number = 0;\n\n const cartItemlength = props.data.cart.result ? props.data.cart.result.totalItemsInCart : defaultCartItemCount;\n const cartItemCount = `${cartItemlength} ${props.resources.items}`;\n\n return <Node className='ms-cart-icon__count'>{cartItemCount}</Node>;\n };\n\n /**\n * Handle escape click to close modal.\n * @param event - On press of any key.\n */\n private readonly _escFunction = (event: KeyboardEvent) => {\n if (event.keyCode === KeyCodes.Escape && this.state.isModalOpen) {\n this.closeModal();\n }\n };\n}\n\nexport default CartIconView;\n"],"names":["filterDeliveryModeOption","useDefaultDeliveryOption","HeadingTag","_ref","description","React","className","message","title","isChecked","value","ariaSetSize","ariaPosInSet","ariaLabel","telemetryContent","onChange","payLoad","getPayloadObject","TelemetryConstant","DeliveryOptions","attributes","getTelemetryAttributes","Object","assign","checked","type","contentAction","etext","name","createRegexExcludedPatterns","excludedValuesString","regexString","split","map","element","trim","replace","s","toLowerCase","join","RegExp","validateAddressString","addressFieldString","regexExcludedStrings","lowerCaseAddressField","test","CheckoutDeliveryOptions","constructor","props","super","selectedItemId","deliveryOptions","isLoading","retailMultiplePickUpOptionEnabled","checkoutErrorRef","init","async","this","moduleState","onEdit","isSelectDefaultOptionEnabled","undefined","onCancel","onSubmit","status","config","notDisplaySelectedDeliveryOption","canShip","cartDeliveryMode","getSavedDeliveryOption","loadDeliveryOptions","_this$props$data$chec","data","checkout","result","checkoutCart","hasInvoiceLine","getCartLinesForShipping","length","isDeliveryModeExists","deliveryMode","find","deliveryOption","Code","getDeliveryOptionSelected","selectedItem","context","telemetry","error","id","typeName","priceFree","resources","price","get","DeliveryOption","DescriptionComponent","Description","PriceComponent","CustomerContextualPrice","freePriceText","getErrorMessage","errorMessageTitle","CheckoutDeliveryOptionsError","tag","role","ErrorTitleComponent","ErrorMessageComponent","errorMessage","getDeliveryOptionList","count","index","code","radioButton","RadioButtonComponent","onDeliveryOptionChange","getSaveButton","saveBtnLabel","Button","color","disabled","onClick","onSave","getEditButton","editBtnLabel","getCancelButton","cancelBtnLabel","setError","setHasError","onUpdating","clearError","_this$props$data$chec2","information","updateShouldCollapsePaymentSection","newShouldCollapsePaymentSection","_this$props$data$chec3","updateCartDeliverySpecification","savedDeliveryOption","_this$props$data$chec4","onReady","cartLinesForShipping","DeliveryMode","deliveryModeId","checkoutState","updateCartDeliverySpecificationInput","shippingAddress","channelDeliveryOptionConfig","onPending","then","response","_response$errorDetail","errorDetails","LocalizedMessage","StringExtensions","isNullOrEmpty","genericErrorMessage","setIsCancellable","catch","request","pickupDeliveryModeCode","channel","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","cart","CartLines","filter","cartLine","_this$channelDelivery","PickupDeliveryModeCodes","getDeliveryOptions","_this$props$data$chec5","cartState","cartId","Id","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","none","FilterDeliveryModeOption","None","filterOutNonCarrierDeliveryMode","FilterOutNonCarrierDeliveryMode","enableAddressFilter","isAddressValid","_config$excludedAddre","deliveryNameExcludedValuesRegExp","Name","deliveryCityExcludedValuesRegExp","City","deliveryStreetExcludedValuesRegExp","Street","excludedAddressErrorMessage","getDeliveryOptionsAsync","callerContext","actionContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","sortedDeliveryOptions","sort","a","b","ShippingChargeAmount","_unused","deliveryOptionsNotFound","_this$props$data$chec6","_this$props$data$chec7","updateHasCartDeliveryMode","newHasCartDeliveryMode","isPaymentVerificationRedirection","_this$props$data$chec8","getStoredDeliveryOptions","_this$props$data$chec9","_this$props$data$chec10","_this$props$data$chec11","_this$props$data$chec12","_this$props$data$chec13","_this$props$data$chec14","isExpressCheckoutApplied","isExpressPaymentAppliedInCartPage","event","currentTarget","getTelemetryObject","telemetryPageName","friendlyName","nameExcludedStrings","cityExcludedStrings","streetExcludedStrings","_this$props$data$cart","_this$props$data$cart2","properties","ExtensionProperties","property","Key","Value","StringValue","JSON","parse","_this$expressPaymentD","_this$expressPaymentD2","expressPaymentDetailsFromCartPage","isExpressCheckoutAppliedInCartPage","_this$props$data$chec19","when","isDataReady","reaction","_this$props$data$chec15","_this$props$data$chec16","_this$props$data$chec17","_this$props$data$chec18","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec20","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec21","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","shouldComponentUpdate","nextProps","nextState","state","render","_this$props$data$chan","_this$props$data$feat","featureState","feature","IsEnabled","isReady","isUpdating","hasError","isError","isShowList","isShowSelected","deliveryOptionAriaLabel","viewProps","_objectSpread","deliveryOptionsData","alert","ErrorComponent","errorMessageData","viewState","isShowSaveButton","hasExternalSubmitGroup","isShowEditButton","isShowCancelButton","moduleProps","classname","DeliveryOptionsList","list","deliveryOptionSelected","waiting","Waiting","saveButton","editButton","cancelButton","renderView","__decorate","observable","computed","action","withModuleState","observer","DeliveryOptionList","Node","key","DeliveryOptionSelected","_ref2","extraTextField","paragraph","extraText","RichTextComponent","text","Module","ref","BulkPurchase","collapseRef","_dimensionDropDownChange","_this$collapseRef$cur","current","reEvaluateHeight","_toggleCollapse","setState","isExpanded","_this$props$data$prod","hasDimensionsInProps","ArrayExtensions","hasElements","productDimensions","hasDimensionsInData","container","classnames","content","_renderCollapseContent","_renderCollapseButton","_renderCollapse","bulkPurchaseHeaderTitle","Collapse","isOpen","_renderMainContent","isMobileDevice","isMobile","variant","VariantType","Viewport","bulkPurchaseDescriptionText","_renderMatrix","_this$props$data$orde","_this$props$data$cust","ProductDimensionsMatrix","dimensions","orderTemplates","customerInformation","dimensionOnChange","BulkPurchaseViewComponent","CarouselModule","_handleDismissCarousel","cookies","set","dismissCarousel","_next","slots","nextIndex","activeIndex","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","componentDidMount","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","retrieveItems","items","renderModuleAttributes","Carousel","pause","pauseOnHover","ride","autoplay","interval","transitionType","hideFlipper","dismissEnabled","dismissCarouselAriaText","ariaLabelForDismissButton","indicatorAriaText","ariaLabelForSlide","directionTextPrev","flipperPrevious","directionTextNext","flipperNext","keyboard","validateCartAsync","isQuantityLimitsFeatureEnabled","propsContext","cartResult","cartVersion","shouldRetry","arguments","AsyncResult","resolve","Version","warning","debug","_validationResult$Val","validationResult","CartsDataActions","bypassCache","ValidationResultsByLineId","refreshCart","refreshError","validateError","cartLineQuantityUpdatedAsync","products","cartLineToUpdate","quantity","isUsingDefaultOrderSettingsMax","_modifiedProduct$Beha2","modifiedProduct","product","RecordId","ProductId","Behavior","MaximumQuantity","input","cartLineId","LineId","toString","newQuantity","additionalProperties","updateLineResult","updateCartLineQuantity","getProductByProductId","productId","getProductByProductIdAndWarehouse","warehouseId","targetWarehouseValue","WarehouseId","_product$Behavior","InventoryLocationId","ProductPickUpOptionsForCartLineItems","apiSettings","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","getPickUpOptionsForCartLineItems","channelId","Error","getCartState","getActiveCartProductsAction","ActiveCartProductsInput","Promise","ProductsDataActions","createObservableDataAction","inputData","requestContext","PickUpInStore","_toggleBOPIS","isBopisSelected","storeSelectorStateManager","cartline","storeSelectorModuleId","openDialog","alreadySelectedLocation","OrgUnitNumber","FulfillmentStoreId","onLocationSelected","orgUnitLocation","updateCartLinePickupLocation","location","locationChangedHandler","_onLocationChangedCallback","ShippingAddress","clearCartLinePickupLocation","_getOrgUnitName","fulfillmentStoreId","orgUnitLocations","foundLocation","OrgUnitName","_props$channelDeliver","retailMulitplePickupFeatureState","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","delivery","pickup","deliveryCode","push","option","callbacks","toggleBopis","defaultComponent","_renderShippingMethod","shipItText","pickupInStoretext","changeStoreText","orgUnitName","bopisSelected","toggleBOPIS","shipitText","pickUpInStoreText","_getDeliveryOption","pickupStore","_deliveryOptions$Deli","ContainerProps","_assembleNode","foundProductAvailability","productPickUpOptions","_foundProductAvailabi","_product$Dimensions","_props$cartState","imageSettings","gridSettings","removeButtonText","removeItemClickHandler","moveToWishlistSuccessHandler","addToOrderTemplateButtonText","addToOrderTemplateButtonTooltip","addToOrderTemplateDialogResources","createOrderTemplateDialogResources","itemAddedToOrderTemplateDialogResources","duplicateItemsWhenAddingToOrderTemplateDialogResources","addToWishlistButtonText","removeFromWishlistButtonText","wishlists","defaultWishlistName","isAuthenticated","user","nameOfWishlist","availableQuantityInStock","isStockCheckEnabled","productAvailability","ProductAvailableQuantity","IsProductAvailable","AvailableQuantity","_getCartItemAvailableQuantity","maxQuantity","_getCartItemMaxQuantity","maxQuantityByConfig","maxByQuantityLimitsFeature","maxByQuantityLimitsFeatureResult","maxCartlineQuantity","shouldSkipStockCheck","ItemTypeValue","ReleasedProductType","Service","IsInvoiceLine","ObjectExtensions","isNullOrUndefined","_getErrorMessage","currentQuantity","lineId","_props$productAvailab","finalErrorMessages","productAvailabilites","outOfStockText","includeErrors","outOfRangeOneText","outOfRangeFormatText","checkForErrors","cartlinesErrors","ValidationResultsPairs","errorsFoundByLineId","i","ValidationFailures","forEach","validation","ErrorContext","Quantity","onRemoveClickHandler","onRemoveClickFunction","payload","TelemetryEvent","RemoveFromCart","inventoryLbl","StockLevelLabel","inventoryCode","StockLevelCode","isCustomPriceSelected","Dimensions","dimension","DimensionTypeValue","DimensionValue","productUrl","getProductUrlSync","MsDyn365","isBrowser","isChannelTypeB2B","_cartline$CatalogId","fullUrl","URL","window","href","searchParams","CatalogId","getInvoiceDetailsPageUrlSync","cartlineId","CartLineItemComponent","catalogs","isOutOfStock","lineIndex","isQuantityEditable","quantityOnChange","updateCartLinesQuantitySuccessHandler","primaryImageUrl","PrimaryImageUrl","inventoryInformationLabel","inventoryLabelClassName","isCartStateReady","showShippingChargesForLineItems","pickUpInStore","pickitUpText","remove","addToWishlist","AddToWishlistComponent","showButtonText","showStatusMessage","showRemoveButton","showButtonTooltip","ariaRole","onSuccess","addToOrderTemplate","AddToOrderTemplateComponent","shouldShowButtonFailedTooltip","disableButton","app","disableTooltip","assembleCartlines","cartlines","reactNodes","isPickUpItem","isCartLineItemPickUpType","_productAvailability$","_productAvailability$2","_cartline$WarehouseId","shouldIgnoreWarehouse","InventLocationId","toUpperCase","CartLineGroupItems","_assembleGroupInvoiceCartlines","cartLines","carLineViewProps","_assembleGroupCartlines","getGroupByStorePickup","groupBy","item","groupDelivery","cartLinesGroup","entries","deliveryType","groupByDeliveryType","keys","getPromotionData","ctx","promotionData","getPromotionOptionsForCartLineItems","PromotionOptionsForCartLineItems","promotionOptions","exception","Cart","_isMounted","promotionPopupId","promotionLinkClick","showPromotionDialog","promotionCloseButtonclick","_hidePromotionDialog","getImageSettings","viewports","xs","q","w","h","sm","lg","lazyload","removeItemFromCartHandler","cartlineToRemove","cartLineIds","removeCartLines","validateCart","updateCartlineQuantity","cartlineToUpdate","cartActionResult","_cartActionResult$err","lineUpdateFailure","validationResults","fulfillmentStoreIdUpdated","bind","isCartValid","getOrderQuantityLimitsFeatureFlag","showAvailablePromotions","_this$props$data$cart3","componentWillUnmount","_this$props$context$r","_cart$cart$CartLines","signInUrl","guestCheckoutUrl","getUrlSync","backToShoppingUrl","checkoutURL","getCheckoutURL","isCartEmpty","_getCartLines","validInventoryAcrossCartLines","validateCartLinesInventory","isValid","some","RetailMultiplePickupFeatureState","multiplePickUpEnabled","getCartLinesGroup","Checkout","checkoutBySignInAttributes","GuestCheckout","checkoutByGuestAttributes","BackToShopping","backtoShoppingAttributes","cartLineGroup","_updateCartLineErrorForInvalidInventory","cartTitle","CartlinesWrapper","OrderSummaryWrapper","OrderSummaryItems","promoCode","_getPromoCode","_getPromotions","removePromoAriaLabelFormat","orderSummaryHeading","invoiceSummaryTitle","orderSummaryTitle","orderSummaryLineitems","_getOrderSummaryLineItems","invoiceSummaryLineitems","_getInvoiceSummaryLineItems","checkoutAsSignInUserButton","checkoutButtonTitle","checkoutAsGuestButton","showGuestCheckoutButton","guestCheckoutButtonTitle","expressCheckoutButton","paymentExpress","ExpressCheckoutSectionWrapper","backToShoppingButton","backToShoppingButtonTitle","createTemplateFromCartButton","_displayAddCartToTemplate","SaveCartToOrderTemplateComponent","_generateAddToOrderTemplateDialogResources","_generateOrderTemplateNameDialogResources","linesAddedToOrderTemplateDialogResources","_generateLinesAddedToOrderTemplateDialogResources","_generateDuplicateItemsWhenAddingToOrderTemplateDialogResources","createOrderTemplateFromCartButton","createOrderTemplateFromCartButtonTooltip","checkoutBlockedDueToUnavailableFunds","storeSelector","waitingComponent","cartLoadingStatus","cartLoadingErrorMessage","cartDataResult","isEmpty","OrderSummaryErrors","_getOrderSummaryErrors","_this$props$data$cart4","_cart$cart","showPromotionPopup","promotions","promotionLinkText","promotionPopupHeading","onCloseButtonClick","onSeeAllClick","titleId","promotionMessageWrapper","promotionMessage","promotionStringHeading","promotionSeeAllLink","tabIndex","promotionDialog","Modal","toggle","ModalHeader","ModalBody","_promotion","_promotion$Promotion","Promotion","OfferName","ModalFooter","cartPromotions","promotionCloseButtonAriaLabel","cartLineInventoryValidationResult","productIdWithErrors","productIdWithError","_element$data","outOfStockErrorMessage","allErrors","_cartline$data","_cartline$data$produc","fullError","line","Wrapper","Alert","assertive","outOfStockErrorMessageHeader","header","errors","InvoiceSummary","orderTotalLabel","totalAmountLabel","invoiceLabel","_this$props","_featureState$result","_this$props$context$r2","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","OrderSummary","subTotalLabel","itemsWithCountLabel","shippingLabel","estimatedShippingLabel","otherChargeLabel","otherCharges","taxLabel","estimatedTaxLabel","orderTotal","totalDiscountsLabel","toBeCalculatedText","yetToBeCalculatedText","freeText","isTaxIncludedInPrice","IsTaxIncludedInPrice","isShowTaxBreakup","PromoCodeComponent","promoCodeHeadingText","promoPlaceholderText","promoCodeApplyButtonText","appliedPromoCodeHeadingText","collapseTimeOut","removePromoText","invalidPromoCodeErrorText","failedToAddPromoCodeErrorText","failedToRemovePromoCodeErrorText","duplicatePromoCodeErrorText","duplicatePromotionErrorText","addToOrderTemplateHeader","noOrderTemplatesMessage","noOrderTemplatesDescription","createAnOrderTemplateButtonText","createNewOrderTemplateButtonText","cancelOrderTemplateCreationButtonText","selectTemplatesText","addToTemplateButtonText","lineItemsText","_generateItemAddedToOrderTemplateDialogResources","viewOrderTemplateButtonText","continueShoppingButtonText","itemAddedToOrderTemplateHeaderItemOneText","itemAddedToOrderTemplateHeaderItemFormatText","itemAddedToOrderTemplateHeaderMessageText","originalPriceText","currentPriceText","linesAddedToOrderTemplateHeaderItemsOneText","linesAddedToOrderTemplateHeaderItemsFormatText","linesAddedToOrderTemplateHeaderLinesOneText","linesAddedToOrderTemplateHeaderLinesFormatText","linesAddedToOrderTemplateHeaderMessageText","linesAddedToOrderTemplateCustomPriceAlertMessageText","duplicatedProductsHeader","duplicatedProductsDescription","updateQuantityButtonText","cancelDuplicateItemsButtonText","orderTemplateHeaderLabel","createOrderTemplateHeader","orderTemplateTitleLabel","orderTemplateTitle","orderTemplateNameAriaLabel","orderTemplateDescription","createOrderTemplateDescription","defaultOrderTemplateName","orderTemplateButtonLabel","createOrderTemplateButtonText","orderTemplateCancelButtonLabel","cancelNewOrderTemplateCreationButtonText","_this$props$data$feat2","_this$props$data$cata","modules","storeSelectorId","CartLineItems","productDeliveryOptions","enableStockCheck","updateMaxQuantityForCartLineItem","maxQuantityForCartLineItem","warehouseAggregation","sizeString","productDimensionTypeSize","colorString","productDimensionTypeColor","configString","productDimensionTypeConfiguration","styleString","productDimensionTypeStyle","amountString","productDimensionTypeAmount","quantityDisplayString","quantityDisplayText","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","discountStringText","shippingChargesText","shippingCharges","salesAgreementPricePrompt","priceEditorResources","removeCartButtonText","shipInsteadDisplayText","pickItUpDisplayText","changeStoreDisplayText","errorMessageOutOfRangeOneLeft","errorMessageOutOfRangeFormat","showOutOfStockErrors","addToOrderTemplateMessage","addItemToOrderTemplateError","isAbsoluteUrl","urlCheck","returnURL","origin","includes","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","_featureStatuses$find","featureStatuses","customerInfo","IsB2b","_this$props$data$feat3","_this$props$data$cata2","_this$props$data$chan2","_this$props$data$cart5","cartLinesPickUpOptions","_renderCartlines","cartEmptyText","_cartLine$cartlineId","renderCartLinesGroupHeader","pickUpText","shippingText","emailShippingText","titleSeparate","_cartLine$pickUpInSto4","groupTitle","renderCartLinesGroupTitle","_cartLine$pickUpInSto","_cartLine$pickUpInSto2","_cartLine$pickUpInSto3","_props$cart","_props$cart2","errorData","_props$context$action","emailshippingText","emptyCartText","renderCartLinesGroup","_renderInvoiceSummarylines","invoiceSummaryLines","invoices","giftCard","loyalty","_renderOrderSummarylines","orderSummaryLines","subtotal","shipping","otherCharge","tax","totalDiscounts","CheckoutExpressPaymentContainer","moduleClassName","_getItems","primary","_handleCheckoutExpressContainerHeadingChange","checkoutExpressPaymentContainerHeading","target","shouldHideExpressPaymentContainer","shippingAddressFromExpressCheckout","isExpressPaymentModulesReady","extensionPropertyKey","paymentTenderType","isModuleReady","BooleanValue","_checkout$result","_checkout$result2","checkoutExpressPaymentSectionLoadingMessage","isOBORequest","EnabledPaymentsForOBO","ExpressPayment","shouldHideExpressPaymentContainerClassName","checkoutPlainContainerProps","WaitingComponent","_renderMsdyn365Text","headerProps","Msdyn365","editProps","ContainerItemsComponent","isLoadingClassName","SupportedGiftCardType","CheckoutGiftCard","_this","isFetchingGiftCard","giftCardNumber","giftCardPin","giftCardExp","inputRef","inputPinRef","inputExpRef","isRequired","isEnabled","giftCards","giftCardExtends","onSkip","couldPaidByGiftCard","TotalAmount","giftCardSupported","External","shouldBeEnabledForGuest","handleCancelOrSubmit","hasSelectedItem","getFormattedPrice","currencyCode","cultureFormatter","formatCurrency","enterGiftCardNumber","enterGiftCardPin","enterGiftCardExp","removeGiftCard","applyGiftCard","giftCardTypes","getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","getGiftCard","addGiftCard","Pin","ExpirationDate","TenderTypeId","focus","findGiftcardTenderTypes","tenderTypes","operationId","giftcardType","matchedTenderTypes","Internal","tenderType","OperationId","ConnectorId","noBalanceError","invalidCardInfoError","invalidCardTypeError","noCardPinError","noCardExpError","supportedGiftCardType","getTenderTypesAsync","internalGiftcardTenderTypes","OPERATIONS","PayGiftCertificate","externalGiftcardTenderTypes","Both","month","Number","parseInt","year","getGiftCardAsync","activeGiftCard","Balance","emptyInputError","duplicatedCodeError","invalidCodeError","card","resolveCardTypesAsync","CardType","GiftCard","loyaltyAmount","customerAccountAmount","reduce","getLoyaltyAmount","getGiftCardTotalAmount","getCustomerAccountAmount","showAdditionalFields","additionalFields","shouldPayGiftCard","supportExternalGiftCard","checkoutGiftCardProps","showGiftCard","TitleCompoent","giftCardFormLabel","getList","canRemove","onRemoveGiftCard","form","getForm","onEnterGiftCardNumber","onEnterGiftCardPin","onEnterGiftCardExp","onApplyGiftCard","disableAddGiftCard","From","formProps","label","inputPinLabel","inputExpLabel","inputProps","inputNumProps","inputPinProps","inputExpProps","inputNumber","inputPin","inputExp","applyButton","showGiftCardPinInput","showGiftCardExpInput","alertFieldLabel","SelectedGiftCard","itemProps","selectedGiftCard","removeButton","GiftCardList","_ref3","listProps","_ref4","_objectWithoutProperties","_excluded","AddResource","_ref5","ShowResource","_ref6","onApplyHandler","preventDefault","onChangeNumberHandler","onChangePinHandler","onChangeExpHandler","options","applyGiftCardButton","giftCardNumberLabel","giftCardPinLabel","giftCardExpLabel","giftCardAlertLabel","giftCardPinPlaceholderText","giftCardExpPlaceholderText","fade","includeAlertClass","placeholder","onRemoveHandler","_giftCard$Id","getItem","enteredGiftCardLabel","giftCardAvailableBalanceLabel","removeGiftCardButton","balance","CardCurrencyCode","giftCardLast4Digit","substr","CheckoutLoyalty","_defaultLoyaltyPoints","loyaltyCard","CardNumber","LoyaltyCardId","updateLoyaltyCardId","loyaltyCardNumber","shouldPayLoyalty","_setErrorMessage","_clearError","_dialogToggleRef","_applyLoyaltyPoints","_removeLoyaltyPoints","_onInputChange","_onBlur","dollarsApplied","maxDollars","isFetchingLoyaltyCard","loyaltyTransactionEstimation","MaxCurrencyValueOfLoyaltyPoints","_updateEstimate","_updateLoyalty","Loyalty","isShowLoyalty","isShowAddLoyalty","checkoutLoyalty","showLoyalty","heading","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","LabelComponent","payWithLoyaltyAmountLabel","htmlFor","loyaltyAmountInput","InputComponent","onBlur","step","min","max","ariaValueMax","ariaValueMin","ariaValueNow","loyaltyAmountApplyButton","applyCheckoutLoyaltyPaymentText","isNaN","showAppliedAmount","loyaltyAmountAppliedText","loyaltyAmountAppliedPrice","loyaltyAmountRemoveButton","removeCheckoutLoyaltyPaymentText","innerRef","point","RewardPointId","checkoutLoyaltyRewardPoint","availablePointsText","activePoints","ActivePoints","expiringPointsText","expiringPoints","PointsExpiringSoon","updateLoyaltyAmount","newAmount","parseFloat","num","toFixed","document","getElementById","isDisabled","channelConfig","Currency","loyalPointsRequest","createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput","_query","callActionOrExecute","_points$MaxCurrencyVa","update","GetLoyaltyTransactionEstimationInput","newMaxPoints","AddCheckoutLoyalty","rewardPoint","ShowCheckoutLoyalty","paymentInstrumentModuleId","CheckoutPlainContainer","getItems","getActiveChildModuleStates","childIds","getModule","hasModuleState","isPaymentSectionContainer","childId","shouldEnableSinglePaymentAuthorizationCheckout","amountDue","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","isSkipped","onContainerReady","isCollapse","_checkoutResult$check","_cart$TotalAmount","shouldSubmitContainer","shouldCollapsePaymentSection","shouldTriggerPaymentWithPlaceOrder","updateIsPaymentSectionContainerHasError","newIsPaymentSectionContainerHasError","isCheckoutCallFailed","updateIsCheckoutCallFailed","newIsCheckoutCallFailed","componentDidUpdate","enableControl","width","hasInitialized","hidden","loading","LoadingComponent","initialized","skipped","ready","updating","pending","isPending","ItemComponent","Loading","getInvoicePaymentSummary","lines","isValidationPassed","isPlaceOrderLoading","isPlaceOrderClicked","handleCheckoutHeadingChange","checkoutHeading","cartStatus","isEmptyCart","getSlotItems","triggerPaymentWithPlaceOrder","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","onPlaceOrder","checkoutOutOfStockErrorMessage","orderConfirmation","isOverMaxQuantity","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","placeOrder","handleCheckoutError","emailDeliveryCartLines","lineDeliverySpecifications","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","updatedCart","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","productInventoryInformation","_cart$CartLines","_cart$CartLines2","productsThatShouldValidateInventory","_cartlineProduct$Beha","cartlineProduct","isStockedItem","IsStockedProduct","isEmailDelivery","productInventory","_productInventory$Pro","cartLinesInventoryValidation","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","validateForCheckout","retry","isOrderQuantityLimitsFeatureEnabledInHq","isB2BSite","isOrderQuantityLimitsFeatureEnabledInSiteSettings","validateForCheckoutAsync","_result$ValidationFai","ValidationFailuresByCartLines","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","address","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Address1","StreetNumber","Address2","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","checkoutApiFailureErrorMessage","checkoutResult","apiError","statusCode","errorCode","setCheckoutErrors","_error$data","AdditionalContext","isEditorialMode","params","isEditor","isTermsAndConditionAccepted","disableForOBO","isPaidOffByCustomerAccount","_this$props$data$chec22","_this$props$data$chec23","asyncResultStatus","AsyncResultStatusCode","LOADING","_this$props$data$chec24","_this$props$data$chec27","email","tenderLine","paymentTenderTypeFromCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","_this$props$data$chec25","_this$props$data$chec26","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","isCartReady","_this$props$data$chec28","isPaymentSectionContainerReady","_this$props$data$chec29","_this$props$data$chec30","_this$props$data$chec31","_this$props$data$chec32","redirectAdditionalContext","isPaymentVerificationRequired","_this$props$data$chec33","isPaymentSectionContainerHasError","_this$props$data$chec34","_this$props$data$chec35","isBillingAddressHasError","_this$props$data$chec36","_this$props$data$chec37","updateIsBillingAddressHasError","newIsBillingAddressHasError","canPlaceOrder","_this$props$data$chec38","_this$props$data$chec39","updateIsPlaceOrderEnabledInRedirection","newIsPlaceOrderEnabledInRedirection","_this$props$data$chec40","_this$props$data$chec41","checkoutErrorLocation","checkoutPaymentErrorLocation","ErrorCode","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","CheckoutPaymentInstrument","_this$props$data$chec42","_this$props$data$chec43","shouldFocusOnCheckoutError","_this$props$data$chec44","_this$props$data$chec45","_this$props$data$chec46","_this$props$data$chec47","_this$props$data$chec48","_this$props$data$chec49","_this$props$data$chec50","_this$props$data$chec51","_this$props$data$chec52","_this$props$data$chec53","_this$props$data$chec54","_this$props$data$chec55","_this$props$data$chec56","_this$props$data$chec57","_document","_this$props$data$chec58","disableGuidedCheckoutFlow","backToShopping","placeOrderText","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","allCheckoutInformation","checkoutInformation","info","checkoutExpressPaymentContainer","isConsentGiven","device","Type","termsAndConditions","backToShoppingAttributes","checkoutBtnText","hasShippingAddress","hasCartDeliveryMode","hasGuestCheckoutEmail","hasExpressPaymentContainer","getElementsByClassName","style","display","hasSalesOrder","salesOrder","checkoutProps","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","renderMsdyn365Text","AlertComponent","_this$props$data$chec59","_this$props$data$chec60","canShow","guidedForm","GuidedFormComponent","resource","orderSummary","getOrderSummary","invoicePaymentSummary","lineItems","getLineItems","placeOrderButton","PlaceOrderButtonComponent","keepShoppingButton","values","every","SUCCESS","FAILED","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","customerAccount","PaymentSummaryComponent","_ref10","_getDeliveryLocation","locationMatch","_getLineItemComponent","_input$data$catalogs","_product","_cartLine$CatalogId","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","_getEmailDeliveryComponents","emailDeliveryText","_getLineItemsComponents","isPickUp","_getCartPickDeliveryMode","cartLineItem","_channelDeliveryOptio","isNullOrWhitespace","_countItems","_filterItemsByDiliveryType","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","_productDeliveryOptio","suffix","handleLineItemHeadingChange","lineItemsHeading","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","cartLinesGrp","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","iconClass","_getLineItems","editCartText","EditCart","attribute","groupClass","loyaltyLabel","giftcardLabel","customerAccountLabel","showLineItems","orderSummaryProps","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","prevProps","isActive","onNext","shouldFocus","children","childrenModules","childModule","childState","setCheckoutErrorFocus","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","CheckoutGuidedForm","currentStep","getEnabledModules","_enableAfterModule","Boolean","nextChildId","_isPaymentSectionContainer","moduleId","_sectionState$childId","sectionState","currentId","getStep","indexOf","getId","getHeading","moduleChildId","_state$childIds","shouldCollapseAfterRedirect","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","GuidedCard","buttonsStates","onPlaceOrderHandler","isBusy","buttonSetState","setIsBusy","useState","Purchase","PayCard","PayLoyalty","PayCustomerAccount","orderedProducts","redirect","PlaceOrder","balanceCheckButton","GiftCardBalanceCheck","_isEnabled","_getFormattedPrice","_enterGiftCardNumber","_enterGiftCardPin","_enterGiftCardExp","_setError","_applyGiftCard","_getGiftCardTypes","_getGiftCard","_findGiftcardTenderTypes","giftCardBalanceCheckProps","Form","Item","PromoCode","_onInputChangeHandler","e","promoCodeInputValue","canApply","_applyPromotion","appliedPromo","addPromoCode","substatus","_onSubmitHandler","_applyPromotionHandler","_renderForm","_removePromotion","getAttribute","removePromoCodes","promoCodes","_calculateDiscount","discountAmount","DiscountLines","discountLine","DiscountCode","DiscountCost","_renderAppliedPromoCode","Coupons","removePromotionHandler","promoCodTotalDiscount","coupon","format","ApplyPromoCode","isCollapseOpen","InvoiceSummaryLine","cssLabel","_buildPaymentSummarySection","_computedLoyaltyAmount","invoiceLines","invoiceLine","InvoiceAmount","InvoiceId","giftCardAmount","_computeGiftCardAmount","giftCardTotalValue","giftCardCounter","Math","totalAmountAfterGiftCard","OrderSummaryLine","_buildOrderSummarySection","getDeliveryMode","featureSate","pickupDeliveryMode","dM","SubtotalAmount","SubtotalAmountWithoutTax","TaxAmount","TaxOnNonShippingCharges","DiscountAmount","OtherChargeAmount","hasDeliveryMethod","hasShippingMethod","freightFee","getDeliveryConfiguration","deliveryModes","taxOnShippingCharge","TaxOnShippingCharge","shippingChargeAmount","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual","ProductCollection","handleHeadingChange","_getProductsDimensionsAvailabilities","dimensionsToDisplayOnProductCard","dimensionsInProductCard","dimensionsToDisplayAsSwatch","dimensionsAsSwatchType","validProducts","validValues","DimensionTypes","productsDimensionAvailabilities","getDimensionAvailabilitiesForProductSearchResultAction","DimensionAvailabilitiesForProductSearchResultInput","DimensionSwatchDisplayTypes","productCard","initProductState","productCollectionProducts","productCollection","equals","_getProduct","_this$state$productsD","trace","allowBackNavigation","breaCrumbType","breadcrumbType","allowBack","quickviewSlot","quickview","productComparisonButtonSlot","productComparisonButton","reviewCountAriaLabelValue","TotalRatings","ratingCountAriaLabel","ratingCountAriaLabelSingleUser","isPriceMinMaxEnabled","priceResources","priceRangeSeparator","ProductContainer","productComponent","ProductComponent","ratingAriaLabel","quickViewButton","dimensionAvailabilities","dimensionAvailability","_product$MasterProduc","masterProductId","MasterProductId","_getActivePrice","productsList","getPriceForProductSearchResult","PriceForProductSearchResultInput","_getSeeAllButton","recommendation","headingLabel","catalogId","getCatalogId","validateCatalogId","searchPageLink","url","seeAllButtonText","productPrices","enableAffiliationBasedPricing","shouldDisplaySeeAllButton","recommendationListId","isCarousel","layout","headingComponent","updatedProducts","getProductData","productCollectionViewProps","SingleSlideCarouselComponentProps","SingleSlideCarousel","flipperPrevLabel","flipperNextLabel","parentId","ProductCollectionContainer","GridComponentProps","seeAllButton","_renderCarousel","_renderProduct","_renderGrid","gridContainer","QuickOrderDrawer","_toggle","isManuallyToggled","collapseProps","drawerGlyphClass","toggleGlyphClassName","animateGlyph","drawerOpenGlyph","drawerCloseGlyph","drawerClass","toggleButtonProps","block","_generateDrawerButtonInnerMarkup","collapseState","drawerButtonTextClass","toggleButtonClassName","moduleHeadingText","moduleDescriptionText","_generateGlyphMarkup","glyphClass","onToggle","QuickOrderFormComponent","productTextInput","quantityTextInput","quickOrderState","maxChars","disableAddtoCart","ariaLabelQuantity","ariaLabelProduct","ariaLabelAddtoCart","addQuantityPlaceholderText","handleQuantityChange","handleInputChange","handleAddToCartClick","onInputChange","onInputChangeFunction","onQuantityInputChange","onQuantityChangeFunction","productNode","quantityNode","pattern","maxLength","addToCartBtn","userMessage","stateMessage","statusCssString","messageGlyph","messageText","QuickOrderProduct","simpleProduct","isSelected","QuickOrderDesktopHeaderCellsComponent","columnWithNumberClassName","quickOrderProductNumberText","quickOrderProductText","quickOrderUnitPriceText","quickOrderUnitOfMeasureText","quickOrderQuantityText","quickOrderTotalText","quickOrderActionsText","QuickOrderMobileHeaderCellsComponent","QuickOrderTableHeaderComponent","rowClassName","headerCells","defaultImageSettings","cropFocalRegion","QuickOrderTableRowProductImageComponent","_props$data$product$P","_props$imageSettings","fallbackImageUrl","getFallbackImageUrl","ItemId","containerClassName","Image","altText","src","fallBackSrc","loadFailureBehavior","QuickOrderExtraActionsPopupComponent","getProductPageUrlSync","QuickOrderDesktopTableRowCellComponent","_cartLine$LineId","_dimension$DimensionV","dimensionValue","quickOrderProductDimensionsSeparator","Price","UnitOfMeasureSymbol","IncrementalQuantity","currentCount","quickOrderInputQuantityAriaLabel","quickOrderDecrementButtonAriaLabel","quickOrderIncrementButtonAriaLabel","isGiftCard","IsGiftCard","quickOrderRemoveItemButtonAriaLabel","QuickOrderMobileTableRowCellComponent","quickOrderQuantityMobileText","QuickOrderTableRowComponent","QuickOrderTableComponent","setIsMobile","isMobileView","quickOrderProducts","updateViewport","addEventListener","headerClassName","quickOrderProduct","QuickOrder","waitTime","dimensionUpdateQueue","FinitePromiseQueue","cssClassNameConfigure","quickOrderCallbacks","dimensionSelectedAsync","selectedDimensionId","selectedDimensionValueId","enqueue","_updateDimensions","FinitePromiseQueueError","ProcessWasDiscardedFromTheQueue","getDropdownName","dimensionType","_getDropdownName","changeUpdatingDimension","isUpdatingDimension","_handleInputChange","query","productText","productResponse","inputQuantityText","quantityInput","HTMLInputElement","cancellabelDebounce","cancel","isQuickOrderFormExpanded","_debounce","getScanResult","GetScanResultInput","results","Product","ProductDimensionFull","setTimeout","_addItemToCart","quickOrderAddedToCartSuccessMessage","quickOrderAddedToCartFailureMessage","_validateCart","_this$props$context$a","defaultDeliveryOption","isOrderQuantityLimitsFeatureEnabled","productAvailableQuantity","_updateAvailablity","addProductToCartInput","availableQuantity","orderQuantityLimitsFeatureIsEnabled","isAddEmailDeliveryItemToCart","addProductToCart","inputProductText","maxQtyLimitReachedMessage","_getMaxQtyMessage","_result$errorDetails","_getConcatenatedMaxQtyMessage","quickOrderMaxQuantityLimitText","quickOrderAlreadyItemQuantityText","_handleQuantityChange","currentValue","inputElement","setAttribute","_updateDimensionValue","productDimensionFull","newValueId","DimensionValues","_this$state$productRe","dimensionsToUpdate","productDimensionErrorState","otherError","clearOtherErrorState","configureErrors","errorState","mappedDimensions","selectedProduct","reject","newProduct","getSelectedVariant","SelectedVariantInput","getDimensionsForSelectedVariant","GetDimensionsForSelectedVariantInput","variantProduct","newAvailableQuantity","getProductAvailabilitiesForSelectedVariant","ProductAvailabilitiesForSelectedVariantInput","productAvailable","_getDimensionErrorString","dimensionTypeValue","quickOrderproductDimensionTypeColorErrorMessage","quickOrderproductDimensionTypeConfigurationErrorMessage","quickOrderproductDimensionTypeSizeErrorMessage","quickOrderproductDimensionTypeAmountErrorMessage","quickOrderproductDimensionTypeStyleErrorMessage","_updateProductAvailablity","_productResponse$Dime","missingDimensions","_getConfigureErrors","quickOrderWrongQuantityErrorMsg","quickOrderOutofStockErrorMsg","viewport","quickOrderFormClass","quickOrderFormProductContent","quickOrderFormMsgContent","quickOrderModuleHeading","quickOrderModuleDescription","quickOrderAddtobag","quickOrderProductQuantityInputLabel","quickOrderProductInputLabel","quickOrderProductDimensionTypeColor","quickOrderProductDimensionTypeConfiguration","quickOrderSelectDimensionFormatString","quickOrderProductDimensionTypeSize","quickOrderProductDimensionTypeStyle","quickOrderProductDimensionTypeAmount","quickAddQuantityPlaceholderText","productConfigureResources","selectDimensionFormatString","quickOrderProps","contentProps","isB2B","quickOrderForm","quickOrderList","_renderQuickOrderTable","configure","getProductConfigure","_initQuickOrderProducts","tableClassName","productInventoryInfo","_cart$result","maxQuantityForLineItem","addedQuantity","_item$ItemId","_this$state$productRe2","minInventory","renderConfigure","containerProps","dropdowns","renderConfigureDropdown","dropdown","labelContainerProps","select","renderForm","quickOrderProductContent","quickOrderMsgContent","ProductRefinerValueDataTypeValue","ProductRefinerTypeValue","ProductRefinerSource","isRangeType","dataTypeValue","AttributeDataType","Decimal","Integer","findMatchingRefinementCriterion","productRefinerValue","refinementCriteria","refinementCriterion","isMatchingRefinementCriterion","RefinerRecordId","RefinerSourceValue","DataTypeValue","LeftValueBoundString","getUpdatedRefinementCriteria","itemToggleNotification","currentRefinementCriteria","updatedRefinementCriteria","toggledItemFound","selectedCriterion","isSelecting","rangeStart","RightValueBoundString","rangeEnd","Text","TrueFalse","parentProductRefinerHierarchy","RefinerTypeValue","RefinerType","SingleSelect","Values","matchingIndex","findIndex","criterion","splice","ChoiceSummary","closeButtonGlyph","_onClick","stopPropagation","clearAll","selectedRefiner","_getSelectedRefinerChoice","onChoiceClicked","itemClicked","choiceClicked","nextItemToFocus","nextSibling","selectedChoices","channelInventoryConfigurationId","refinerHierarchy","productListInventoryDisplay","ProductListInventoryFilteringOptions","HideOOS","choice","parent","hierarchy","_getKeyForRefinerValue","clearAllText","classNames","choiceAriaLabel","closeAriaLabel","selectedRefinersMap","clearAllAttributes","urlBuilder","LeftValueBoundLocalizedString","choiceFormat","choiceRangeValueFormat","refinerValues","overallFormat","rangeFormat","refinerValueName","refinerName","KeyName","_formatPrice","UnitText","filterValue","refiner","currency","selected","ErrorMessage","FeatureSearchResultItem","productName","productRecordId","fallbackImage","featureSimilarDescriptionTitle","featureSimilarLooksTitle","onTelemetryClick","imageUrl","img","imageProps","renderProductPlacementImage","Link","ModalToggle","modalNode","autoFocus","applicationNode","returnFocusRef","returnRef","onModalToggle","zIndex","modalHeaderNode","modalTitle","modalFooterNode","modalCloseButtonText","getInventoryLabel","AttributeValues","inventoryAttribute","TextValue","ProductSearchResultItems","moduleType","inventoryLabel","swatchItemAriaLabel","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","selectedRefinementCriterion","initialMin","initialMax","String","minValue","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","debounce","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","productCountAriaLabel","singleProductCountAriaLabel","refineItemAriaLabel","refineItemsAriaLabel","attrs","stringify","isSingleSelect","itemTypeClassName","SourceValue","Rating","_renderRating","productCount","Count","refineMenuItemAriaLabel","toLocaleLowerCase","shouldDisplayAsSwatch","_getShouldDisplayAsSwatch","hasColor","SwatchColorHexCode","hasImage","SwatchImageUrl","hasContentSwatch","_getRefinerUrl","_renderSwatch","checkIfShouldDisplayAsSwatch","_productRefinerValue$2","swatchItems","itemId","colorHexCode","SwatchComponent","isSelectionEnabled","isRefineItem","ratingUserCountAriaLabel","ratingSingleUserCountAriaLabel","_productRefinerValue$3","refinerRating","ratingRefiner","selectedRefinerValues","selectedRating","defaultChkProductCount","ratingComponentClass","productCountAriaLabelValue","RatingComponent","avgRating","ratingCount","hideCount","readOnly","moduleTypeName","RefineSubmenu","_onToggleItem","_onToggleSubmenu","isExpandedOnInitialLoad","productRefinerHierarchy","hideRating","timeout","_renderChildItems","_renderRange","_renderSingleMultiSelect","refinerValuesList","listItems","selectedValue","_getRangeType","DisplayTemplateValue","DisplayTemplate","Range","SliderWithBars","onUpdateRefiners","prevState","Separator","separator","Title","SearchResultContainer","SearchResultContainer_1","_props$context$reques","sortByDropdownOptions","sortOptions","sortByOptionRelevanceDesc","sortByOptionNameAsc","sortByOptionNameDesc","sortByOptionPriceAsc","sortByOptionPriceDesc","sortByOptionRatingDesc","sortByOptionBestSelling","sortByOptionNewScore","sortByOptionTrendingScore","_pageType","urlTokens","pageType","_viewport","expandrefinerCount","defaultPageNumber","isListPageStateUpdated","_updateListPageState","listPageState","_this$props$config$it","_this$props$config$it2","querySorting","sorting","decodeURIComponent","currentPageNumber","skip","itemsPerPage","sortingCritera","Columns","pageSize","activeProducts","totalProductCount","activeFilters","hydrateRefinersFromUrl","featureProduct","_this$props$data$list","_this$props$data$list2","_this$props$data$list3","_this$props$data$list4","_getSearchResultModal","modal","modalHeader","modalFooter","modalBody","SearchResultModal","modalIsOpen","_modalToggleRef","_toggleModal","_getCollectionTitle","collectionTitle","_this$props$context$r3","category","getFriendlyName","locale","NameTranslations","productCountNumber","productCountText","numberOfProducts","oneProduct","TitleContainer","titlePrefix","searchTextPrefix","titleText","titleCount","_getCategoryHierarchy","categoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryLinkAriaLabel","Url","categoryHierarchySeparator","_getSortingDropDown","activeDropdown","_getCurrentlySelectedOption","sortingState","selectedSortByOption","dropdownOptions","_getAllSortByOptions","dropdownOption","SortingContainer","sortByDropDown","LabeledDropdown","labelClassname","labelText","sortByDropdownLabel","dropdownId","dropdownClassname","toggleColor","selectedOption","onSelectOption","_updateSortByDropdown","_sortAndFilterContainerRef","_getPagination","getCurrentUrl","skipCount","totalItems","previousText","nextText","UncontrolledPagination","paginationAriaLabel","qsp","startingItem","_renderPrev","_renderNext","previousAriaLabel","nextAriaLabel","_getRefineMenu","tempRangeTypeTODO","inputRange","validRefiners","updateRefinerPanel","refiners","_shouldHideFromRefiners","activeRefiners","_getexpandRefinerCount","expandRefinersCount","expandedRefiners","RefineMenuContainer","RefinerSectionContainer","_refineItemCommonProps","_onUpdateRefiners","_buildRefinerUrl","_this$props$data$prod2","_this$props$data$prod3","_this$props$data$prod4","channelInventoryConfiguration","isInventorySortableAttribute","inventoryAwareSortableAttributeId","ProductAvailabilitySortableAttributeRecordId","isInventoryProductAttribute","InventoryProductAttributeRecordId","_getInventoryRefiner","baseCollectionInput","BaseCollectionInput","inventoryInStockRefinerValueInput","InventoryInStockRefinerValueInput","getInventoryRefinerAction","_getChoiceSummary","_this$props$data$refi","selectedRefiners","rating","choiceSummaryLabel","_onChoiceClicked","_buildRefinerUrlForChoiceSummary","_getProducts","_this$props$slots","_this$props$data$prod5","shouldAllowBackNavigation","breadCrumbType","shouldAllowBack","isPriceMinMaxFeatureState","notification","history","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","paginationPreviousText","paginationNextText","_updateViewport","validationErrorNotNumber","validationErrorNotRange","nameTranslations","_nameTranslation","nameTranslation","Language","_this$props$context$a2","StoreOperationsDataActions","inventoryRefiner","_listPageState$active","_listPageState$sortin","_newListPageState$cur","_newListPageState$sor","_newListPageState$act","_this$props$context$r4","_this$props$context$r5","_this$props$context$r6","newListPageState","GetFullProductsByCollectionInput","Paging","Top","Skip","Sorting","recordId","Recommendation","includeAttributes","productResults","getCollectionProducts","_newListPageState$cur2","_newListPageState$sor2","_newListPageState$act2","_this$props$context$r7","_this$props$context$r8","refinerInput","RefinersByCollectionInput","getCollectionRefinersAction","removeEventListener","_listPageState$result","_listPageState$result2","_this$props$context$r9","_this$props$data$list7","_this$props$data$list8","searchProduct","errorText","resultCategoryNotFoundText","resultSearchNotFoundText","productsComponent","featureComponent","searchResultContainerViewProps","TitleViewProps","disableHierarchy","refineMenu","sortByOptions","pagination","ProductsContainer","ProductSectionContainer","CategoryNavContainer","RefineAndProductSectionContainer","choiceSummary","modalToggle","searchResultModal","FeatureSearchContainer","similarLookProduct","_getViewport","Browser","createSearchResultModal","modalProps","isRecoSearchPage","createModalBody","renderSort","renderRefiner","submenu","renderCategoryHierarchy","renderTitle","renderTitleCount","getAdditionalContentItems","_item$links","renderHeading","additionalContentHeading","handleAdditionalTextChange","subtext","renderParagraph","additionalContentParagraphText","handleAdditionalParagraphChange","links","ctaLink","renderLinks","linkIndex","editableLink","linkText","linkUrl","destinationUrl","openInNewTab","link","onTextChange","handleAdditionalLinkTextChange","additionalContentItemContainer","additionalContentItemLinks","videoPlayerAdditionalContent","additionalContent","additionalContentNode","additionalContentItems","VideoPlayer","handleTextChange","handleParagraphChange","video","playerResources","playAriaLabel","playLabel","pauseAriaLabel","pauseLabel","playingAriaLabel","playingLabel","pausedAriaLabel","pausedLabel","muteAriaLabel","muteLabel","unMuteAriaLabel","unMuteLabel","fullScreenAriaLabel","fullScreenLabel","exitFullScreenAriaLabel","exitFullScreenLabel","seekBarLabel","videoTimeDurationLabel","closedCaptionLabel","videoMetaData","_video$_links","videoId","duration","playTime","thumbnail","posterframeUrl","_links","binaryReferences","videoBinaryReferences","videoPlayerData","metaData","player","Player","playerData","_getVideoDetailsHeading","_getVideoDetailsParagraph","_getVideoDetailsLinks","detailsContainer","detailsContainerCTA","handleText","handleParagraph","handleAdditionalText","handleAdditionalParagraph","handleLink","handleLinkTextChange","handleAdditionalLink","_this$props$config$ad","linkData","linkId","_heading$tag","detailsContainerCta","CartIconView","cartIconRef","_modalContainer","placement","hideArrow","wrapClassName","isModalOpen","closeModal","_openModal","_this$cartIconRef$cur","_renderCartCloseIcon","_renderCartItemCount","cartItemCount","totalItemsInCart","_escFunction","keyCode","KeyCodes","Escape","isAutoDisplayTriggered","isProductAddedToCart","addToCartBehavior","AddToCartBehavior","showMiniCart","miniCartWrapper","cartIcon","flyoutTitle","emptyCart","cartLineIndex","miniCartItemWrapper","storeLocation","promoContentItem","_props$data$cart$resu","totalPrice","emptyPrice","totalPriceFormatString","renderTotalPrice","subTotalMessage","goToCartButton","continueShoppingButtonTitle","renderCartlines"],"sourceRoot":""}