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,EAAcyb,uBAA0B,EAkJvD6rB,GAA4B7wB,GAAe,GAAKwwB,EAAiBzrB,EAAgBC,EAEnFD,EAAgB,IAChBorB,EAAW5c,QAAUwd,EAA0B5vC,GAAQ4jB,EAAe,UAAW5jB,EAAM64B,cAAgB,mBAGvGwW,EAAiB,IACjBL,EAAWtuB,SAAWkvB,EAA0B5vC,GAAQqvC,EAAgB,YAAarvC,EAAM84B,eAAiB,qBAG5GjV,EAAwB,IACxBmrB,EAAW3c,gBAAkBud,EACzB5vC,GACC6jB,EACD,yBACA7jB,EAAMm5B,sBAAwB,2BAItC6V,EAAW1c,WAAasd,EAAyB/4B,EAAAA,EAAC,GACzC7W,GAAK,IAAEg5B,cAAUh4B,IACtB0uC,EACA,QACA1vC,EAAMo0B,iBA1KsBhsB,IAAAA,EAkLpC,OAJIioC,EAAiB,IACjBrB,EAAW7c,eAAiByd,EAA0B5vC,GAAQqwC,EAAgB,kBAAmBrwC,EAAM+4B,sBAGpGiW","sources":["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/address-detail-item.tsx?d9a2","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-date.tsx?bd12","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-options-grp.tsx?3a15","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-cartLine-delivery-options-radio.tsx?045f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.description.tsx?840c","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-message.tsx?8ca3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-title.tsx?f7e7","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.radio-button.tsx?9df9","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/get-line-items.tsx?e389","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/checkout.view.tsx?e4cc","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/alert.tsx?cb1e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-invoice-payment-summary.tsx?9549","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-line-items.tsx?92f8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-order-summary.tsx?4a81","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-card.tsx?58e0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-form.tsx?f018","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/place-order-button.tsx?9b41","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.tsx?6737","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/place-order.ts?5aa0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/actions/get-products-in-active-checkout-cart.ts?1981","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/checkout.ts?7b6b","webpack://Msdyn365.Commerce.Online/./src/invoice-summary-lineitem.tsx?5f61","webpack://Msdyn365.Commerce.Online/./src/order-summary-lineitem.tsx?8a98"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { Cart, ChannelDeliveryOptionConfiguration, FilterDeliveryModeOption } from '@msdyn365-commerce/retail-proxy';\nimport { getDeliveryOptionsAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport {\n Address,\n CartLine,\n DeliveryOption,\n DeliveryPreferenceType,\n LineDeliverySpecification\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n GetDeliveryOptionsForCartLineAddressInput,\n getDeliveryOptionsForCartLineAddress,\n QueryResultSettingsProxy,\n StringExtensions,\n DeliveryOptionsCartLineAddress,\n ArrayExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport groupBy from 'lodash/groupBy';\n\nimport { IImageSettings } from '@msdyn365-commerce/core';\nimport { ErrorComponent } from '../../common/error';\nimport { ICheckoutDeliveryOptionsData } from './checkout-delivery-options.data';\nimport {\n filterDeliveryModeOption,\n ICheckoutDeliveryOptionsProps,\n useDefaultDeliveryOption\n} from './checkout-delivery-options.props.autogenerated';\nimport DescriptionComponent from './components/checkout-delivery-options.description';\nimport ErrorMessageComponent from './components/checkout-delivery-options.error-message';\nimport ErrorTitleComponent from './components/checkout-delivery-options.error-title';\nimport RadioButtonComponent from './components/checkout-delivery-options.radio-button';\nimport { focusOnCheckoutError } from '../../checkout-errors';\nimport { AddressDetailItemFunctionComponent } from './components/address-detail-item';\nimport CheckoutCartLineDeliveryDate from './components/checkout-cartLine-delivery-date';\nimport CheckoutCartLineDeliveryOptionsRadio from './components/checkout-cartLine-delivery-options-radio';\nimport { GetLineItems } from './components/get-line-items';\n\nexport interface ICheckoutDeliveryOptionsModuleProps\n extends ICheckoutDeliveryOptionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutDeliveryOption {\n DeliveryOption: INodeProps;\n description?: React.ReactNode;\n price?: React.ReactNode;\n}\n\nexport interface ICartLineSelectedDeliveryOption {\n cartLineId: string;\n selectedDeliveryOption: string;\n requestDeliveryDate?: string;\n}\n\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\n code: string;\n radioButton?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsList {\n DeliveryOptionsList: INodeProps;\n list: ICheckoutDeliveryOptionEdit[];\n}\n\nexport interface ICheckoutDeliveryOptionsError {\n Error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsViewState {\n isLoading: boolean;\n isError: boolean;\n isShowList: boolean;\n isShowSelected: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutDeliveryOptionsViewProps extends ICheckoutDeliveryOptionsProps<{}> {\n CheckoutDeliveryOptions: IModuleProps;\n selectedItemId: string;\n deliveryOptionsData: DeliveryOption[];\n isLoading: boolean;\n errorMessageData: string;\n viewState: ICheckoutDeliveryOptionsViewState;\n deliveryOptions?: ICheckoutDeliveryOptionsList;\n deliveryOptionSelected?: ICheckoutDeliveryOption;\n errorMessage?: ICheckoutDeliveryOptionsError;\n waiting?: React.ReactNode;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n checkoutCartLineGroupDeliveryOptions?: React.ReactNode;\n enableCheckoutCartLineDeliveryOptions?: boolean;\n cartLineImages?: React.ReactNode;\n onDeliveryOptionChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutDeliveryOptions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutDeliveryOptions extends React.Component {\n @observable private selectedItemId: string = '';\n\n @observable private deliveryOptions: DeliveryOption[] = [];\n\n @observable private isLoading: boolean = false;\n\n @observable private errorMessage?: string;\n\n @observable private groupDeliveryOptions: DeliveryOptionsCartLineAddress[] = [];\n\n @observable private cartLineSelectedDeliveryOptions: ICartLineSelectedDeliveryOption[] = [];\n\n @computed private get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\n }\n\n public get expressPaymentDetailsFromCartPage() {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? JSON.parse(properties) : null;\n }\n\n public get isExpressPaymentAppliedInCartPage(): boolean {\n return this.expressPaymentDetailsFromCartPage?.isExpressCheckoutAppliedInCartPage ?? false;\n }\n\n private cartDeliveryMode?: string;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly isSelectDefaultOptionEnabled?: boolean;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n private readonly isMultipleAddressShippingEnabled?: boolean;\n\n private cartLinesDeliveryOptions: ICartLineSelectedDeliveryOption[] = [];\n\n public constructor(props: ICheckoutDeliveryOptionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isSelectDefaultOptionEnabled =\n this.props.config.useDefaultDeliveryOption && this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\n this.isMultipleAddressShippingEnabled = this.props.config.multipleAddressShippingEnabled;\n }\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?.cartLinesWithShippingAddress,\n async () => {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n async isExpressCheckoutApplied => {\n if (isExpressCheckoutApplied && this.canShip() && !this.isExpressPaymentAppliedInCartPage) {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutDeliveryOptions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutDeliveryOptions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps, nextState: ICheckoutDeliveryOptionsViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n if (!this.canShip()) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const {\n moduleState: { isReady, isUpdating, hasError }\n } = this.props;\n const isError = !this.isLoading && hasError;\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n const { errorMessageTitle, deliveryOptionAriaLabel } = this.props.resources;\n\n const viewProps = {\n ...this.props,\n onDeliveryOptionChange: this.onDeliveryOptionChange,\n selectedItemId: this.selectedItemId,\n deliveryOptionsData: this.deliveryOptions,\n isLoading: this.isLoading,\n alert: this.errorMessage && ,\n errorMessageData: this.errorMessage,\n viewState: {\n isLoading: this.isLoading,\n isError,\n isShowList,\n isShowSelected,\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\n },\n CheckoutDeliveryOptions: {\n moduleProps: this.props,\n className: classname('ms-checkout-delivery-options', this.props.config.className)\n },\n deliveryOptions: {\n DeliveryOptionsList: {\n className: 'ms-checkout-delivery-options__list',\n role: 'list',\n 'aria-label': deliveryOptionAriaLabel\n },\n list: this.getDeliveryOptionList()\n },\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\n errorMessage: this.getErrorMessage(),\n waiting: ,\n checkoutErrorRef: this.checkoutErrorRef,\n checkoutCartLineGroupDeliveryOptions: this.getCheckoutCartLineGroupDeliveryOptions(),\n enableCheckoutCartLineDeliveryOptions: this.isMultipleAddressShippingEnabled,\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSave,\n onEdit: this.onEdit,\n onCancel: this.onCancel\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\n status:\n !(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\n this.canShip()\n ? 'updating'\n : 'disabled'\n });\n\n this.cartDeliveryMode = this.getSavedDeliveryOption();\n if (this.isMultipleAddressShippingEnabled) {\n this.getCartLinesSavedDeliveryOption();\n }\n await this.loadDeliveryOptions();\n };\n\n private readonly canShip = (): boolean => {\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\n };\n\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\n if (deliveryMode) {\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\n return true;\n }\n }\n return false;\n };\n\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\n if (!selectedItem) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const { id, typeName, context } = this.props;\n const { priceFree } = this.props.resources;\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\n const channelConfig = this.props.context.request.channel;\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option-selected' },\n description: ,\n price: (\n \n )\n };\n };\n\n private readonly getErrorMessage = (): ICheckoutDeliveryOptionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n // @ts-expect-error\n CheckoutDeliveryOptionsError: { tag: 'span', className: 'ms-address-form__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getDeliveryOptionList = (): ICheckoutDeliveryOptionEdit[] => {\n const count = this.deliveryOptions.length;\n const { priceFree } = this.props.resources;\n const { id, typeName, context } = this.props;\n const channelConfig = this.props.context.request.channel;\n\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\n const getAriaLabelWithPrice = get(deliveryOption, 'ShippingChargeAmount', 0);\n return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'listitem' },\n code: deliveryOption.Code || '',\n radioButton: (\n \n ),\n description: (\n \n ),\n price: (\n \n )\n };\n });\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save' } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onSave = async (): Promise => {\n await this.onSubmit();\n };\n\n private readonly onEdit = async (): Promise => {\n this.props.telemetry.information('Delivery options onEdit is called.');\n\n this.clearError();\n this.onUpdating();\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Delivery options onSubmit is called.');\n if (this.isMultipleAddressShippingEnabled) {\n this.updateCartLinesDeliverySpecification();\n } else {\n await this.updateCartDeliverySpecification(this.selectedItemId);\n }\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n };\n\n private readonly onCancel = async (): Promise => {\n this.props.telemetry.information('Delivery options onCancel is called.');\n\n // Reset to the saved value\n const savedDeliveryOption = this.getSavedDeliveryOption();\n if (savedDeliveryOption) {\n this.selectedItemId = savedDeliveryOption;\n this.onReady();\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n } else {\n this.onUpdating();\n }\n };\n\n private readonly getSavedDeliveryOption = (): string | undefined => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\n };\n\n private readonly getCartLinesSavedDeliveryOption = (): void => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n cartLinesForShipping.forEach(cartLine => {\n const deliveryMode = cartLine.DeliveryMode !== undefined ? cartLine.DeliveryMode : '';\n if (!cartLine.LineId || StringExtensions.isNullOrEmpty(deliveryMode)) {\n return;\n }\n const cartLineId = cartLine?.LineId;\n const existingCartLineSelectedDeliveryOption = this.cartLinesDeliveryOptions.find(\n cartLineDeliveryOption => cartLineDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryMode;\n } else {\n if (cartLineId !== undefined) {\n this.cartLinesDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryMode });\n }\n }\n });\n };\n\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\n if (deliveryModeId.trim() === '') {\n return;\n }\n\n const { resources } = this.props;\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const updateCartDeliverySpecificationInput = {\n deliveryModeId,\n shippingAddress: checkoutState.shippingAddress,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\n };\n\n this.clearError();\n this.onPending();\n\n await checkoutState.checkoutCart\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\n .then(response => {\n if (response.status === 'FAILED') {\n const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\n this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\n }\n\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n })\n .catch(() => {\n this.setError(resources.genericErrorMessage);\n });\n };\n\n @action\n private readonly updateCartLinesDeliverySpecification = async (): Promise => {\n if (!this.cartLineSelectedDeliveryOptions || !this.cartLineSelectedDeliveryOptions.length) {\n return;\n }\n const { resources } = this.props;\n let lineSpecs: LineDeliverySpecification[] = [];\n const checkoutCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines;\n\n this.cartLineSelectedDeliveryOptions.forEach(group => {\n const address = checkoutCartLines?.find(cartLine => cartLine.LineId === group.cartLineId)?.ShippingAddress;\n const lineSpec = {\n LineId: group.cartLineId,\n DeliverySpecification: {\n DeliveryModeId: group.selectedDeliveryOption,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ShipToAddress,\n DeliveryAddress: address\n }\n };\n lineSpecs.push(lineSpec);\n });\n\n try {\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const response = await checkoutState.checkoutCart.updateCartLinesDeliverySpecification({\n lineDeliverySpecifications: lineSpecs\n });\n\n if (response.status === 'FAILED') {\n this.setError(resources.genericErrorMessage);\n } else {\n const cartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines;\n if (cartLines !== undefined && cartLines.length > 0) {\n cartLines?.forEach(cartLine => {\n const cartLineId = cartLine.LineId?.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n cartLine.RequestedDeliveryDate = existingCartLineSelectedDeliveryOption.requestDeliveryDate\n ? new Date(existingCartLineSelectedDeliveryOption.requestDeliveryDate)\n : undefined;\n }\n });\n await checkoutState.checkoutCart.updateCartLines({ updatedCartLinesObject: cartLines });\n }\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n };\n\n private readonly getCartLinesForShipping = (): CartLine[] => {\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n\n return this.retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context, resources, config } = this.props;\n const cartState = this.props.data.checkout.result?.checkoutCart;\n const cartId = (cartState.cart as Cart).Id;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n try {\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n }\n\n // TODO: Check if we can move this getDeliveryOptions to checkout state\n let deliveryOptionFilter: FilterDeliveryModeOption;\n switch (config.filterDeliveryModeOption) {\n case filterDeliveryModeOption.none:\n deliveryOptionFilter = FilterDeliveryModeOption.None;\n break;\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n break;\n default:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n }\n const response = await getDeliveryOptionsAsync(\n {\n callerContext: context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\n },\n cartId,\n shippingAddress,\n [],\n deliveryOptionFilter,\n true\n );\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n\n if (response && response.length > 0) {\n this.deliveryOptions = response;\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n\n if (this.deliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n } else {\n this.onUpdating();\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: !!this.isSelectDefaultOptionEnabled });\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly getStoredDeliveryOptions = async (): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context } = this.props;\n const cartState = this.props.data.checkout.result.checkoutCart;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n }\n\n if (this.cartDeliveryMode) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly loadDeliveryOptions = async (): Promise => {\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\n const cartLinesForShipping = this.props.data.checkout.result?.cartLinesWithShippingAddress;\n\n if (this.canShip() && (shippingAddress || cartLinesForShipping)) {\n if (\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied\n ) {\n this.isMultipleAddressShippingEnabled\n ? await this.getGroupDeliveryOptions()\n : shippingAddress !== undefined\n ? await this.getDeliveryOptions(shippingAddress)\n : null;\n }\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.getStoredDeliveryOptions();\n }\n\n if (\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.isExpressPaymentAppliedInCartPage\n ) {\n this.onSubmit();\n }\n }\n };\n\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\n const deliveryModeId = event.currentTarget.value;\n this.selectedItemId = deliveryModeId;\n };\n\n private readonly onCartLineDeliveryOptionChange = (\n event: React.ChangeEvent,\n cartLines: CartLine[],\n cartLineId?: string\n ) => {\n const deliveryModeId = event.currentTarget.value;\n if (cartLineId !== undefined) {\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryModeId;\n } else {\n this.cartLineSelectedDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryModeId });\n }\n return;\n }\n\n cartLines.forEach(cartLine => {\n if (!cartLine.LineId) {\n return;\n }\n const cartLineId = cartLine?.LineId.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.selectedDeliveryOption = deliveryModeId;\n } else {\n this.cartLineSelectedDeliveryOptions.push({ cartLineId, selectedDeliveryOption: deliveryModeId });\n }\n });\n };\n\n private readonly onCartLineRequestDeliveryDateChange = (event: React.ChangeEvent, cartLines: CartLine[]) => {\n const deliveryDate = event.currentTarget.value;\n cartLines.forEach(cartLine => {\n if (!cartLine.LineId) {\n return;\n }\n const cartLineId = cartLine?.LineId.toString();\n const existingCartLineSelectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLineId\n );\n if (existingCartLineSelectedDeliveryOption) {\n existingCartLineSelectedDeliveryOption.requestDeliveryDate = deliveryDate;\n } else {\n const deliveryModeId = cartLine.DeliveryMode !== undefined ? cartLine.DeliveryMode : '';\n this.cartLineSelectedDeliveryOptions.push({\n cartLineId,\n selectedDeliveryOption: deliveryModeId,\n requestDeliveryDate: deliveryDate\n });\n }\n });\n };\n\n private readonly onReady = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onUpdating();\n }\n };\n\n private readonly onPending = () => {\n if (!this.isSelectDefaultOptionEnabled) {\n this.props.moduleState.onPending();\n }\n };\n\n private readonly getCheckoutCartLineGroupDeliveryOptions = (): React.ReactNode => {\n const { resources, config } = this.props;\n const shippingCartLines = this.getCartLinesForShipping();\n if (!ArrayExtensions.hasElements(shippingCartLines) || !ArrayExtensions.hasElements(this.groupDeliveryOptions)) {\n return null;\n }\n const imageSettings = this.getImageSettings(config.imageSettings);\n const requestDeliveryDateEnabled = config.enableRequestDeliveryDate === true && this.isMultipleAddressShippingEnabled === true;\n return (\n
\n {this.groupDeliveryOptions.map((groupDeliveryOption: DeliveryOptionsCartLineAddress, index) => {\n const cartLineId = groupDeliveryOption.cartLineIds !== undefined ? groupDeliveryOption.cartLineIds[0] : '';\n const cartLine1 = shippingCartLines.find(cartLine => cartLineId === cartLine?.LineId?.toString() ?? '');\n const cartLine = shippingCartLines.filter(\n cartLine => groupDeliveryOption && (cartLineId === cartLine?.LineId?.toString() ?? '')\n );\n if (groupDeliveryOption !== undefined) {\n const selectedDeliveryOption = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption => cartLineSelectedDeliveryOption.cartLineId === cartLine[0].LineId\n )?.selectedDeliveryOption;\n return (\n
\n
\n \n
\n
\n
\n \n {resources.cartLineGroupDeliveryOptionsLabel}\n \n \n {resources.cartLineGroupDeliveryOptionsText}\n \n {requestDeliveryDateEnabled ? (\n \n ) : null}\n \n
\n {groupDeliveryOption.cartLineIds?.map(cartLineId => {\n const cartLine1 = shippingCartLines.find(\n cartLine => cartLineId === cartLine?.LineId?.toString() ?? ''\n );\n const selectedDeliveryOption1 = this.cartLineSelectedDeliveryOptions.find(\n cartLineSelectedDeliveryOption =>\n cartLineSelectedDeliveryOption.cartLineId === cartLine1?.LineId\n )?.selectedDeliveryOption;\n return (\n \n );\n })}\n
\n
\n );\n } else {\n return null;\n }\n })}\n
\n );\n };\n\n private readonly getGroupDeliveryOptions = async (): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context, resources, config } = this.props;\n const cartState = this.props.data.checkout.result?.checkoutCart;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n try {\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const cartLinesForShipping: CartLine[] = [];\n if (ArrayExtensions.hasElements(shippingCartLines)) {\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.ShippingAddress?.RecordId);\n cartLinesForShipping.push(getGroupByDelivery(shippingCartLines));\n console.log('running delivery option for all lines');\n }\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n }\n\n // TODO: Check if we can move this getDeliveryOptions to checkout state\n let deliveryOptionFilter: FilterDeliveryModeOption;\n switch (config.filterDeliveryModeOption) {\n case filterDeliveryModeOption.none:\n deliveryOptionFilter = FilterDeliveryModeOption.None;\n break;\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n break;\n default:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n }\n const inputData = new GetDeliveryOptionsForCartLineAddressInput(deliveryOptionFilter, shippingCartLines);\n const response = await getDeliveryOptionsForCartLineAddress(inputData, context.actionContext);\n if (response && response.length > 0) {\n this.groupDeliveryOptions = response;\n console.log('groupDeliveryOptions');\n }\n if (this.groupDeliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartLinesDeliveryOptions.length !== 0) {\n this.cartLineSelectedDeliveryOptions = this.cartLinesDeliveryOptions;\n this.cartLinesDeliveryOptions = [];\n this.onReady();\n } else {\n this.onUpdating();\n this.groupDeliveryOptions.forEach(group => {\n const selectedDeliveryOption =\n group.deliveryOptions.length > 0 && group.deliveryOptions[0].Code !== undefined\n ? group.deliveryOptions[0].Code\n : '';\n group.cartLineIds?.forEach(cartLineId => {\n this.cartLineSelectedDeliveryOptions.push({\n cartLineId,\n selectedDeliveryOption\n });\n });\n });\n }\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n }\n this.isLoading = false;\n };\n\n /**\n * Gets the image settings.\n * @param imageSettings - Image settings.\n * @returns IImageSettings.\n */\n private readonly getImageSettings = (imageSettings: IImageSettings | undefined): IImageSettings => {\n return (\n imageSettings || {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n sm: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true\n }\n );\n };\n}\n\nexport default CheckoutDeliveryOptions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutDeliveryOption,\n ICheckoutDeliveryOptionEdit,\n ICheckoutDeliveryOptionsList,\n ICheckoutDeliveryOptionsViewProps\n} from './checkout-delivery-options';\n\nconst DeliveryOptionList: React.FC = ({ DeliveryOptionsList, list }) => {\n if (!list || list.length === 0) {\n return null;\n }\n\n return (\n \n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\n return (\n \n {deliveryOption.radioButton}\n {deliveryOption.description}\n {deliveryOption.price}\n \n );\n })}\n \n );\n};\n\nconst DeliveryOptionSelected: React.FC = ({ DeliveryOption, description, price }) => {\n return (\n \n {description}\n {price}\n \n );\n};\n\nconst CheckoutDeliveryOptionsView: React.FC = props => {\n const {\n CheckoutDeliveryOptions,\n enableCheckoutCartLineDeliveryOptions,\n checkoutErrorRef,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n alert,\n waiting,\n saveButton,\n editButton,\n cancelButton,\n checkoutCartLineGroupDeliveryOptions\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isLoading && waiting}\n {viewState.isError && alert}\n {viewState.isShowList && deliveryOptions && !enableCheckoutCartLineDeliveryOptions && (\n \n )}\n {viewState.isShowList && enableCheckoutCartLineDeliveryOptions && checkoutCartLineGroupDeliveryOptions}\n {viewState.isShowSelected && deliveryOptionSelected && }\n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutDeliveryOptionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAddressDetailItem {\n isNewLine: boolean;\n isShowLabel: boolean;\n labelText: string;\n name: string;\n value: string;\n}\n\n/**\n * Address details item.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDetailItemFunctionComponent: React.FC = (props: IAddressDetailItem) => {\n const { labelText, value } = props;\n\n const className = `ms-checkout-delivery-options__cart-line-grp__item__header__address`;\n return (\n \n {labelText}\n {value}\n \n );\n};\n\nexport default AddressDetailItemFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport { CartLine } from '@msdyn365-commerce/retail-proxy';\nimport React, { useState } from 'react';\n\nexport interface ICheckoutCartLineDeliveryDateProps {\n className?: string;\n isDisabled?: boolean;\n minRangeValue?: string;\n maxRangeValue?: string;\n validationErrorForRange?: string;\n fallbackPattern?: string;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n disclaimerText?: string;\n heading?: string;\n checkBoxLabel?: string;\n onChangeMinValue?: void;\n id?: string;\n cartLines?: CartLine[];\n onChange(event: React.ChangeEvent, cartLines: CartLine[]): void;\n}\n\nconst CheckoutCartLineDeliveryDate: React.FC = ({\n className,\n isDisabled,\n fallbackPattern,\n ariaLabel,\n telemetryContent,\n onChangeMinValue,\n checkBoxLabel,\n disclaimerText,\n heading,\n cartLines,\n onChange\n}) => {\n const [selectedDate, setSelectedDate] = useState('');\n const [isDateEnabled, setIsDateEnabled] = useState(false);\n // State to store today's date\n const [minDate, setMinDate] = useState('');\n\n // Update minDate state with today's date on component mount\n useState(() => {\n const today = new Date().toISOString().split('T')[0];\n setMinDate(today);\n });\n\n const handleDateChange = (event: React.FocusEvent) => {\n const selectedValue = event.target.value;\n // Check if the selected date is allowed\n if (selectedValue >= minDate) {\n setSelectedDate(selectedValue);\n console.log('Selected date is allowed.', selectedValue);\n } else {\n console.log('Selected date is not allowed.');\n }\n\n if (cartLines !== undefined) {\n onChange(event, cartLines);\n }\n };\n\n const handleCheckboxChange = () => {\n setIsDateEnabled(!isDateEnabled);\n };\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n
\n
\n \n {checkBoxLabel}\n
\n {disclaimerText}\n
\n {heading}\n \n
\n
\n );\n};\n\nexport default CheckoutCartLineDeliveryDate;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsGrpRadioButtonProps {\n className: string;\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n groupName: string;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaSetSize\n * @param root0.ariaPosInSet\n * @param root0.ariaLabel\n * @param root0.telemetryContent\n * @param root0.onChange\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsGrpRadioButton: React.FC = ({\n className,\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n groupName,\n telemetryContent,\n onChange\n}) => {\n if (!value) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionRef: React.RefObject = React.createRef();\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsGrpRadioButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\nimport { IAny, ICoreContext, IGeneric } from '@msdyn365-commerce/core';\nimport DescriptionComponent from './checkout-delivery-options.description';\nimport RadioButtonComponent from './checkout-cartLine-delivery-options-grp';\n\nexport interface ICheckoutCartLineDeliveryOptionsRadioButtonProps {\n className: string;\n moduleId: string;\n ariaSetSize: number;\n priceFree: string;\n ariaPosInSet: number;\n selectedItemId: string;\n cartLines: CartLine[];\n deliveryOptions: DeliveryOption[];\n typeName: string;\n context: ICoreContext>;\n groupName: string; // Add groupName prop\n ariaLabel?: string;\n value?: string;\n cartLineId?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent, cartLines: CartLine[], cartLineId?: string): void;\n}\n\n/**\n * Represents a radio button component for checkout cart line delivery options.\n * @param {Object} props - The component props.\n * @param {boolean} props.isChecked - Indicates whether the radio button is checked.\n * @param {string} props.value - The value of the radio button.\n * @param {number} props.ariaSetSize - The total number of radio buttons in the set.\n * @param {number} props.ariaPosInSet - The position of the radio button in the set.\n * @param {string} props.ariaLabel - The ARIA label for the radio button.\n * @param {string} props.telemetryContent - The telemetry content for the radio button.\n * @param {Function} props.onChange - The event handler for when the radio button is changed.\n * @returns {JSX.Element} The rendered radio button component.\n */\nconst CheckoutCartLineDeliveryOptionsRadio: React.FC = ({\n className,\n moduleId,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n deliveryOptions,\n priceFree,\n selectedItemId,\n typeName,\n groupName, // Destructure groupName prop\n context,\n cartLines,\n cartLineId,\n onChange\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n console.log(attributes);\n const channelConfig = context.actionContext.requestContext.channel;\n const count = deliveryOptions.length;\n if (count === 0) {\n return null;\n }\n\n const changeCurrentDeliveryOption = React.useCallback(\n (event: React.ChangeEvent) => {\n onChange(event, cartLines, cartLineId);\n },\n [onChange, cartLines, cartLineId]\n );\n // const selectedDeliveryOptionItem = deliveryOptions.length > 0 ? deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n const deliveryClassName = `${className}__radio-btn-grp`;\n const optionClassName = `${deliveryClassName}-opt`;\n const response = deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => (\n
\n \n \n \n
\n ));\n\n return
{response}
;\n};\n\nexport default CheckoutCartLineDeliveryOptionsRadio;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\n description?: string;\n className?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.description\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description, className }) => {\n if (!description) {\n return null;\n }\n\n const descClassName = StringExtensions.isNullOrEmpty(className) ? 'ms-checkout-delivery-options__description' : className;\n return {description};\n};\n\nexport default CheckoutDeliveryOptionsDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

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

{title}

;\n};\n\nexport default CheckoutDeliveryOptionsErrorTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaSetSize\n * @param root0.ariaPosInSet\n * @param root0.ariaLabel\n * @param root0.telemetryContent\n * @param root0.onChange\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n onChange\n}) => {\n if (!value) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsRadioButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B, TelemetryEvent } from '@msdyn365-commerce/core';\nimport { CartLine, DeliveryOption, ProductCatalog, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { useState } from 'react';\nimport CheckoutCartLineDeliveryOptionsRadio from './checkout-cartLine-delivery-options-radio';\n\nexport interface ICheckoutDeliveryOptionsLineItemsProps {\n className?: string;\n moduleId: string;\n selectedItemId: string;\n context: Msdyn365.ICoreContext;\n typeName: string;\n cartLines: CartLine[];\n imageSettings: Msdyn365.IImageSettings;\n showShippingChargesForLineItems: boolean;\n resources: ICheckoutDeliveryOptionsLineItemsResources;\n deliveryOptions: DeliveryOption[];\n ariaSetSize: number;\n ariaPosInSet: number;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent, cartLines: CartLine[]): void;\n currencyCode?: string;\n products?: SimpleProduct[];\n catalogs?: ProductCatalog[];\n gridSettings?: Msdyn365.IGridSettings;\n cartLineId?: string;\n key?: string;\n}\n\nexport interface ICheckoutDeliveryOptionsLineItemsResources {\n quantityDisplayStringLabel: string;\n productDimensionTypeColor: string;\n productDimensionTypeSize: string;\n productDimensionTypeStyle: string;\n productDimensionTypeAmount: string;\n configString: string;\n discountStringText: string;\n shippingChargesText: string;\n priceFree: string;\n ariaLabel: string;\n changeButtonText?: string;\n deliveryMethodLabel?: string;\n}\n\nconst _getLineItemComponent = (\n context: Msdyn365.ICoreContext,\n cartLine: CartLine,\n product: SimpleProduct,\n moduleId: string,\n typeName: string,\n showShippingChargesForLineItems: boolean,\n imageSettings: Msdyn365.IImageSettings,\n resources: ICheckoutDeliveryOptionsLineItemsResources,\n currencyCode: string,\n catalogs?: ProductCatalog[],\n gridSettings?: Msdyn365.IGridSettings,\n cartLineId?: string\n): JSX.Element | undefined => {\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n\n return (\n \n );\n};\n\nconst _getProduct = (productId: number, products: SimpleProduct[]): SimpleProduct | undefined => {\n return products.find((_product: SimpleProduct) => {\n return productId === _product.RecordId;\n });\n};\n\nexport const GetLineItems: React.FC = (props: ICheckoutDeliveryOptionsLineItemsProps) => {\n const products = props.products;\n const lineClassName = props.className;\n const lineItemClassName = `${lineClassName}-item`;\n const currencyCode = props.currencyCode;\n const changeText = props.resources.changeButtonText;\n const [showDeliveryOption, setShowDeliveryOption] = useState(false);\n\n const handleClick = () => {\n setShowDeliveryOption(!showDeliveryOption);\n };\n if (!props.cartLines || props.cartLines.length === 0 || !products || products.length === 0 || currencyCode === undefined) {\n return null;\n }\n const deliveryCode = props.deliveryOptions.find(option => option.Code === props.selectedItemId);\n const payload = getPayloadObject(TelemetryEvent.UpdateInCart, props.telemetryContent!, changeText !== undefined ? changeText : '', '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payload);\n const response = props.cartLines.map(cartLine => {\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId, products);\n if (!product) {\n return null;\n }\n return (\n
\n {_getLineItemComponent(\n props.context,\n cartLine,\n product,\n props.moduleId,\n props.typeName,\n props.showShippingChargesForLineItems,\n props.imageSettings,\n props.resources,\n currencyCode,\n props.catalogs,\n props.gridSettings\n )}\n
{props.resources.deliveryMethodLabel}
\n
\n {deliveryCode?.Description}\n \n
\n {showDeliveryOption ? (\n \n ) : null}\n
\n );\n });\n\n return
{response}
;\n};\nexport default GetLineItems;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 config,\n resources,\n renderView,\n moduleState: { hasError, isReady }\n } = this.props;\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.Loyalty === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout loyalty module wont render');\n return null;\n }\n\n if (\n this.props.data.loyaltyCard &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n ) {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n const checkoutState = this.props.data.checkout.result;\n let isShowLoyalty = false;\n const errorMessage = this.state.errorMessage;\n\n if (isReady) {\n if (!checkoutState || checkoutState.loyaltyAmount === 0) {\n return null;\n }\n isShowLoyalty = true;\n }\n const channelConfig = this.props.context.request.channel;\n const viewProps = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isShowLoyalty,\n isShowAddLoyalty: !isReady && !config.disableAddLoyaltyComponent\n },\n alert: hasError && errorMessage && ,\n checkoutLoyalty: {\n moduleProps: this.props,\n className: classnames(\n this.moduleClassName,\n { [`${this.moduleClassName}__applied`]: isShowLoyalty },\n this.props.config.className\n )\n },\n showLoyalty: {\n heading: ,\n coveredAmountText: (\n \n ),\n amount: (\n \n )\n },\n addLoyalty: {\n heading: ,\n drawer: {\n tag: Drawer,\n className: `${this.moduleClassName}__drawer`,\n toggleButtonText: this._drawerHeader(),\n openGlyph: `${this.moduleClassName}__drawer-open`,\n closeGlyph: `${this.moduleClassName}__drawer-close`,\n glyphPlacement: 'end'\n },\n cardNumber: ,\n rewardPoints:\n loyaltyCard.RewardPoints &&\n loyaltyCard.RewardPoints.map((points, index) => {\n return this._renderPointSection(points, resources.availablePointsLabel, resources.expiringLoyaltyPointsLabel);\n }),\n loyaltyAmountContainer: {\n className: `${this.moduleClassName}__amount`\n },\n appliedLoyaltyAmountContainer: {\n className: `${this.moduleClassName}__applied-amount`\n },\n loyaltyAmountLabel: (\n \n ),\n loyaltyAmountInput: (\n \n ),\n loyaltyAmountApplyButton: (\n this.maxDollars ||\n this.state.dollarsApplied <= 0 ||\n isNaN(this.state.dollarsApplied) ||\n this.state.isFetchingLoyaltyCard\n }\n >\n {this.props.resources.applyCheckoutLoyaltyPaymentText}\n \n ),\n showAppliedAmount: checkoutState && checkoutState.loyaltyAmount > 0,\n loyaltyAmountAppliedText: (\n \n ),\n loyaltyAmountAppliedPrice: (\n \n ),\n loyaltyAmountRemoveButton: (\n \n {this.props.resources.removeCheckoutLoyaltyPaymentText}\n \n )\n }\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n this.props.context.telemetry.error('Checkout loyalty content is empty, module wont render');\n return null;\n }\n\n private _drawerHeader(): JSX.Element {\n const channelConfig = this.props.context.request.channel;\n return (\n <>\n

{this.props.resources.loyaltyCoveredAmountText}

\n \n \n );\n }\n\n private _renderPointSection(\n point: LoyaltyRewardPoint,\n loyaltyCoveredAmountText: string,\n expiringLoyaltyPointsLabel: string\n ): ICheckoutLoyaltyRewardPoint {\n return {\n key: point.RewardPointId || '',\n checkoutLoyaltyRewardPoint: {\n className: `${this.moduleClassName}__program`\n },\n title: ,\n availablePointsText: ,\n activePoints: (\n \n ),\n expiringPointsText: ,\n expiringPoints: (\n \n )\n };\n }\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n isRequired: false,\n ...(!this.isEnabled() && { status: 'disabled' })\n });\n\n const savedLoyaltyAmount = this.props.data.checkout.result?.loyaltyAmount;\n if (savedLoyaltyAmount) {\n this.props.moduleState.onReady();\n } else if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.props.moduleState.onSkip();\n } else if (\n this.props.data.loyaltyCard.result &&\n this.props.data.checkout.result &&\n this.props.data.loyaltyCard.result.CardNumber !== this.props.data.checkout.result.checkoutCart.cart.LoyaltyCardId\n ) {\n this.props.data.checkout.result.checkoutCart\n .updateLoyaltyCardId({ loyaltyCardNumber: this.props.data.loyaltyCard.result.CardNumber })\n .catch(error => {\n if (this.context.telemetry) {\n this.context.telemetry.warning(error);\n this.context.telemetry.debug('Unable to update the loyalty card');\n }\n });\n }\n };\n\n private readonly onEdit = () => {\n this.props.telemetry.information('Payment section loyalty onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly onCancel = () => {\n this.props.telemetry.information('Payment section loyalty onCancel is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly onSubmit = () => {\n this.props.telemetry.information('Payment section loyalty onSubmit is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.loyaltyAmount > 0) {\n // Show summary screen\n this.props.moduleState.onReady();\n } else {\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly isEnabled = () => {\n return (\n this.props.context.request.user.isAuthenticated &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n );\n };\n\n private async _applyLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty apply button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: Number.parseFloat(this.state.dollarsApplied.toString()) });\n this.setState({\n isFetchingLoyaltyCard: true\n });\n }\n\n private async _removeLoyaltyPoints(): Promise {\n this.props.telemetry.information('Payment section loyalty remove button onClick is called.');\n\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n return;\n }\n\n this._clearError();\n await checkoutState.updateLoyaltyAmount({ newAmount: 0 });\n this.setState({\n dollarsApplied: 0\n });\n }\n\n private _onInputChange(event: React.ChangeEvent): void {\n const value = event.currentTarget.value;\n this.setState({ dollarsApplied: value.length > 0 ? Number(value) : Number.parseFloat(value), isFetchingLoyaltyCard: false });\n }\n\n private _onBlur(event: React.FocusEvent): void {\n const num = Number.parseFloat(event.currentTarget.value).toFixed(2);\n const element = document.getElementById(`${this.props.id}-label`) as HTMLInputElement;\n if (element && num) {\n element.value = num;\n this.setState({ dollarsApplied: Number.parseFloat(num) });\n }\n }\n\n private _updateLoyalty(): void {\n if (this.props.moduleState.isDisabled && this.isEnabled()) {\n this._updateEstimate();\n this.props.moduleState.onUpdating();\n }\n }\n\n private _updateEstimate(): void {\n const card = this.props.data.loyaltyCard.result;\n const checkout = this.props.data.checkout.result;\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n const channelConfig = this.props.context.request.channel;\n if (card && card.CardNumber && cart && channelConfig) {\n const currencyCode = channelConfig.Currency || '';\n const loyalPointsRequest = createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput(cart.Id, card.CardNumber, currencyCode);\n\n // @ts-expect-error\n // Due to bug 23214358, this is getting improperly cached. Need to turn on cache bypass for now to work around issue\n loyalPointsRequest._query.options.bypassCache = 'get';\n\n callActionOrExecute(loyalPointsRequest, this.props.context.actionContext)\n .then(async points => {\n this.props.context.actionContext.update(\n new GetLoyaltyTransactionEstimationInput(this.props.context.request.apiSettings),\n points\n );\n const newMaxPoints = points.MaxCurrencyValueOfLoyaltyPoints ?? this._defaultLoyaltyPoints;\n\n // If points are already applied, ensure you don't apply more points than max\n if (checkout && checkout.loyaltyAmount > newMaxPoints) {\n await checkout.updateLoyaltyAmount({ newAmount: newMaxPoints });\n }\n\n this.setState({ dollarsApplied: newMaxPoints, isFetchingLoyaltyCard: false });\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n this.props.context.actionContext.telemetry.debug('Error getting Loyalty Point Redemption Estimate');\n });\n }\n }\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutLoyalty;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyAdd, ICheckoutLoyaltyRewardPoint, ICheckoutLoyaltyShow, ICheckoutLoyaltyViewProps } from './checkout-loyalty';\n\nconst AddCheckoutLoyalty: React.FC = ({\n heading,\n cardNumber,\n drawer,\n rewardPoints,\n loyaltyAmountContainer,\n appliedLoyaltyAmountContainer,\n loyaltyAmountLabel,\n loyaltyAmountInput,\n loyaltyAmountApplyButton,\n showAppliedAmount,\n loyaltyAmountAppliedText,\n loyaltyAmountAppliedPrice,\n loyaltyAmountRemoveButton\n}) => {\n return (\n <>\n {heading}\n {cardNumber}\n \n {rewardPoints.map((rewardPoint: ICheckoutLoyaltyRewardPoint) => {\n return (\n \n {rewardPoint.title}\n {rewardPoint.availablePointsText}\n {rewardPoint.activePoints}\n {rewardPoint.expiringPointsText}\n {rewardPoint.expiringPoints}\n \n );\n })}\n \n \n {loyaltyAmountLabel}\n {loyaltyAmountInput}\n {loyaltyAmountApplyButton}\n {showAppliedAmount && (\n \n {loyaltyAmountAppliedText}\n {loyaltyAmountAppliedPrice}\n {loyaltyAmountRemoveButton}\n \n )}\n \n \n );\n};\n\nconst ShowCheckoutLoyalty: React.FC = ({ heading, coveredAmountText, amount }) => {\n return (\n <>\n {heading}\n {coveredAmountText}\n {amount}\n \n );\n};\n\nconst CheckoutLoyaltyView: React.FC = props => {\n const { checkoutLoyalty, checkoutErrorRef, alert, viewState, showLoyalty, addLoyalty } = props;\n\n return (\n \n {alert}\n {viewState.isShowLoyalty && }\n {viewState.isShowAddLoyalty && }\n \n );\n};\n\nexport default CheckoutLoyaltyView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as 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 { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutViewProps,\n ILineItem,\n ILineItemDeliveryGroup,\n ILineItems,\n IOrderSummary,\n IPickUpAtStore,\n IEmailDelivery,\n IInvoicePaymentSummary\n} from './index';\n\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\n\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {pickUpAtStore && }\n {emailDelivery && }\n \n);\n\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\n \n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\n LineItemDeliveryGroup,\n LineItemList,\n heading,\n lineItems,\n lineItemWraper,\n lineItemWraperIcon\n}) => (\n \n {lineItemWraperIcon}\n {lineItemWraper}\n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {emailDelivery && }\n \n);\n\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const LineItemsComponent: React.FC = ({\n LineItems,\n Header,\n heading,\n editLink,\n itemsForPickup,\n itemsForShip,\n itemsForEmail,\n itemsGroupWithMulitplePickupMode\n}) => (\n \n \n {heading}\n {editLink}\n \n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\n {itemsGroupWithMulitplePickupMode !== undefined\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\n return ;\n })\n : null}\n \n);\n\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.subtotal}\n {lines.shipping}\n {lines.otherCharge}\n {lines.tax}\n {lines.totalDiscounts}\n {lines.loyalty}\n {lines.customerAccount}\n {lines.giftCard}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.invoices}\n {lines.giftCard}\n {lines.loyalty}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst CheckoutView: React.FC = props => {\n const {\n isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n canShow,\n checkoutProps,\n headerProps,\n hasSalesOrder,\n hasInvoiceLine,\n bodyProps,\n mainProps,\n mainControlProps,\n sideProps,\n sideControlFirstProps,\n sideControlSecondProps,\n termsAndConditionsProps,\n orderConfirmation,\n loading,\n alert,\n title,\n guidedForm,\n orderSummary,\n invoicePaymentSummary,\n lineItems,\n placeOrderButton,\n termsAndConditions,\n keepShoppingButton,\n checkoutExpressPaymentContainer,\n checkoutErrorRef\n } = props;\n\n return (\n \n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\n \n )}\n {!hasSalesOrder && (\n \n {loading}\n {alert}\n {canShow && (\n <>\n \n {checkoutExpressPaymentContainer}\n {checkoutExpressPaymentContainer && {title}}\n {guidedForm}\n {termsAndConditions}\n \n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n {!hasInvoiceLine\n ? orderSummary && \n : invoicePaymentSummary && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n {lineItems && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n )}\n \n )}\n {hasSalesOrder && orderConfirmation}\n \n );\n};\n\nexport default CheckoutView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAlertProps {\n message: string;\n}\n\nconst CheckoutAlert: React.FC = ({ message }) => (\n

\n {message}\n

\n);\n\nexport default CheckoutAlert;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IInvoiceSummaryLines, InvoiceSummary } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IInvoicePaymentSummary {\n heading?: React.ReactNode;\n lines?: IInvoiceSummaryLines;\n}\nexport const getInvoicePaymentSummary = (input: ICheckoutProps): IInvoicePaymentSummary => {\n const {\n data: { checkout },\n resources: { totalAmountLabel, invoiceLabel, invoiceSummaryTitle },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutCart = get(checkout, 'result.checkoutCart');\n const cart = get(checkout, 'result.checkoutCart.cart');\n\n return {\n heading:

{invoiceSummaryTitle}

,\n lines: checkoutCart?.hasInvoiceLine\n ? InvoiceSummary({\n orderTotalLabel: totalAmountLabel,\n invoiceLabel,\n cart,\n context,\n typeName,\n telemetry,\n id,\n checkoutState: checkout.result\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport groupBy from 'lodash/groupBy';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\ntype deliveryType = 'pickup' | 'ship' | 'email';\n\nexport interface IPickUpAtStore {\n PickUpAtStore: INodeProps;\n label: React.ReactNode;\n location: React.ReactNode;\n}\n\nexport interface IEmailDelivery {\n EmailDelivery: INodeProps;\n label: React.ReactNode;\n}\n\nexport interface ILineItem {\n LineId: string;\n LineItem: INodeProps;\n item?: React.ReactNode;\n pickUpAtStore?: IPickUpAtStore;\n emailDelivery?: IEmailDelivery;\n}\n\nexport interface ILineItemDeliveryGroup {\n LineItemDeliveryGroup: INodeProps;\n LineItemList: INodeProps;\n heading: React.ReactNode;\n lineItemWraper?: React.ReactNode;\n lineItemWraperIcon?: React.ReactNode;\n lineItems: ILineItem[];\n}\n\nexport interface ILineItems {\n LineItems: INodeProps;\n Header: INodeProps;\n heading: React.ReactNode;\n editLink: React.ReactNode;\n itemsForPickup?: ILineItemDeliveryGroup;\n itemsForShip?: ILineItemDeliveryGroup;\n itemsForEmail?: ILineItemDeliveryGroup;\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\n}\n\nexport const getLineItems = (input: ICheckoutProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const _getDeliveryLocation = (cartLine: CartLine): string => {\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\n return '';\n }\n\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\n });\n\n return locationMatch && locationMatch.OrgUnitName;\n };\n\n const _getProduct = (productId: number): SimpleProduct | undefined => {\n const products = get(input, 'data.products.result') || [];\n return products.find((_product: SimpleProduct) => {\n return productId === _product.RecordId;\n });\n };\n\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\n const {\n id,\n typeName,\n context,\n config: { imageSettings, showShippingChargesForLineItems },\n resources: {\n quantityDisplayString,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n productDimensionTypeAmount,\n configString,\n inputQuantityAriaLabel,\n discountStringText,\n shippingCharges\n },\n context: {\n request: { gridSettings }\n }\n } = input;\n const catalogs = input.data.catalogs?.result;\n if (!product) {\n return;\n }\n\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n const currencyCode = get(input, 'context.request.channel.Currency');\n return (\n \n );\n };\n\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\n const {\n resources: { pickUpAtStoreWithLocationText }\n } = input;\n\n return {\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\n label: {pickUpAtStoreWithLocationText},\n location:
{pickupDeliveryLocation}
\n };\n };\n\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\n const {\n resources: { emailDeliveryText }\n } = input;\n\n return {\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\n label: {emailDeliveryText}\n };\n };\n\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\n return items.map(cartLine => {\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const isPickUp = _getCartPickDeliveryMode(cartLine);\n const isEmailDelivery =\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\n return {\n LineId: cartLine.LineId || '',\n LineItem: { className: 'ms-checkout__line-item' },\n item: _getLineItemComponent(cartLine),\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\n };\n });\n };\n\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode ===\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\n : false;\n };\n\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode !==\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\n : false;\n };\n\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\n const {\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? shippingCountCheckoutLineItem\n : type === 'pickup'\n ? inStorePickUpLabel\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _countItems = (items: CartLine[]): number => {\n return items.reduce((count, item) => {\n return count + (item.Quantity || 0);\n }, 0);\n };\n\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n if (type === 'ship') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n } else if (type === 'pickup') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\n );\n }\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\n };\n\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\n return;\n }\n\n const items = _filterItemsByDiliveryType(type);\n\n if (items.length === 0) {\n return undefined;\n }\n\n const count = _countItems(items);\n const title = _getGroupTitleComponent(count, type);\n\n return {\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n heading:
{title}
,\n lineItems: _getLineItemsComponents(items)\n };\n };\n\n const _getLineItems = (): ILineItems | undefined => {\n const {\n context,\n config: { lineItemsHeading },\n data: { products },\n resources: { editCartText }\n } = input;\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\n return undefined;\n }\n\n return {\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\n Header: { className: 'ms-checkout__line-items-header' },\n heading: lineItemsHeading && lineItemsHeading.text && (\n \n ),\n editLink: (\n \n {editCartText}\n \n ),\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\n itemsForShip: _getLineItemsByDeliveryType('ship'),\n itemsForEmail: _getLineItemsByDeliveryType('email'),\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\n : undefined\n };\n };\n\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { lineItemsHeading }\n } = input;\n if (lineItemsHeading) {\n lineItemsHeading.text = event.target.value;\n }\n };\n\n const _getGroupTitleComponentWithMultiplePickUp = (\n count: number,\n type: deliveryType,\n deliveryMode?: string,\n fulFillmentStoreId?: string\n ): string => {\n const {\n resources: { itemLabel, itemsLabel }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n let pickupDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\n ? pickupDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\n });\n\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? `(${count} ${suffix})`\n : type === 'pickup'\n ? `${pickupTitle} (${count} ${suffix})`\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\n const groupDelivery = getGroupByDelivery(cart.CartLines);\n const cartLinesGroup: CartLine[] = [];\n const cartLinesGrp: CartLine[][] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\n // @ts-expect-error\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n cartLinesGrp.push(cartLine);\n });\n });\n\n return cartLinesGrp;\n };\n\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\n return;\n }\n\n const {\n resources: { multiplePickUpLabel, shippingLable }\n } = input;\n\n const items = _filterItemsByMultiplePickupMode();\n\n if (items.length === 0) {\n return undefined;\n }\n\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\n items.map(item => {\n const count = _countItems(item);\n const cartLine = item[0];\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const type: deliveryType =\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\n ? 'pickup'\n : cartLine.FulfillmentStoreId === '' &&\n cartLine.DeliveryMode === emailDeliveryModeCode &&\n !StringExtensions.isNullOrEmpty(emailDeliveryModeCode)\n ? 'email'\n : 'ship';\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\n lineItemDeliveryGroup.push({\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n lineItemWraperIcon:
,\n lineItemWraper:
{groupTitle}
,\n heading:
{title}
,\n lineItems: _getLineItemsComponents(item)\n });\n });\n\n return lineItemDeliveryGroup;\n };\n\n return _getLineItems();\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IOrderSummary {\n orderSummaryProps: INodeProps;\n heading?: React.ReactNode;\n lines?: IOrderSummaryLines;\n}\nexport const getOrderSummary = (input: ICheckoutProps): IOrderSummary => {\n const {\n config: { orderSummaryHeading },\n data: { checkout },\n resources: {\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n otherCharges,\n customerAccountLabel\n },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutState = get(checkout, 'result');\n const cart = get(checkout, 'result.checkoutCart.cart');\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\n const channelConfiguration = context.request.channel!;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\n\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { orderSummaryHeading }\n } = input;\n if (orderSummaryHeading) {\n orderSummaryHeading.text = event.target.value;\n }\n };\n\n return {\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\n heading: orderSummaryHeading && orderSummaryHeading.text && (\n \n ),\n lines: showLineItems\n ? OrderSummary({\n checkoutState,\n cart,\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n context,\n typeName,\n id,\n channelConfiguration,\n telemetry,\n otherChargeLabel: otherCharges,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\n isShowTaxBreakup: isShowOrHideTaxEnabled,\n customerAccountLabel\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport * as React from 'react';\nimport { focusOnCheckoutError, setCheckoutErrorFocus } from '../../../checkout-errors';\n\nexport interface ICheckoutGuidedCardProps {\n id?: string;\n step: number;\n title?: HeadingType;\n disabled?: boolean; // Module is not available\n isActive?: boolean; // Step === currentStep\n isVisted?: boolean; // Step < currentStep\n isExpanded?: boolean;\n isReady?: boolean;\n isPending?: boolean;\n isUpdating?: boolean;\n isSubmitting?: boolean;\n isCancelAllowed?: boolean;\n isMobile?: boolean;\n hasInitialized?: boolean;\n hasControlGroup?: boolean;\n shouldFocus?: boolean;\n children: React.ReactNode;\n moduleState?: IModuleStateManager;\n actionContext?: IActionContext;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n telemetryContent?: ITelemetryContent;\n onEdit?(): void;\n onCancel?(): void;\n onSubmit?(): void;\n onNext(): void;\n}\n\n/**\n *\n * CheckoutGuidedCard component.\n * @extends {React.Component}\n */\nclass CheckoutGuidedCard extends React.PureComponent {\n private readonly editButtonRef: React.RefObject = React.createRef();\n\n private readonly formCardRef: React.RefObject = React.createRef();\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: ICheckoutGuidedCardProps) {\n super(props);\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\n }\n\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\n /**\n * Move to next step when current step is ready.\n */\n const { isActive, isReady, onNext, isVisted, onEdit, shouldFocus, children, moduleState, actionContext } = this.props;\n\n // Move to next step after completing the current step\n if (isActive && isReady) {\n onNext();\n }\n\n // Set the focus to Edit button once edit button appear\n // (It happens when current step switch to isReady status)\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\n const canEdit = isReady && isVisted && !!onEdit;\n if (!prevCanEdit && canEdit) {\n this.focusOnEditButton();\n this.scrollToTitle();\n }\n\n // Set the focus to the first focusable element\n // (It happens when current step switch to isUpdating status)\n if (prevProps.isReady && !isReady) {\n this.focusOnFirstFocusableElement();\n }\n\n // Set the focus for the checkout error\n if (shouldFocus && actionContext) {\n const childrenModules = this._getModules(children);\n\n // Set the focus for the module within the checkout section container\n if (childrenModules.length > 0) {\n for (const childModule of childrenModules) {\n const childId = this._getId(childModule);\n const childState = moduleState?.getModule(childId);\n\n if (childState?.hasError) {\n setCheckoutErrorFocus(childId, actionContext);\n return;\n }\n }\n } else {\n focusOnCheckoutError(this.formCardRef, actionContext);\n }\n }\n }\n\n public render(): JSX.Element | null {\n const {\n title,\n disabled,\n isExpanded,\n isActive,\n isVisted,\n children,\n isReady,\n isPending,\n isUpdating,\n hasInitialized,\n hasControlGroup,\n onEdit,\n resource\n } = this.props;\n const { changeBtnLabel } = resource;\n\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\n\n return (\n \n
\n {this.getTitle()}\n\n {canEdit && (\n \n {changeBtnLabel}\n \n )}\n
\n\n \n
{children}
\n\n {this.renderFooder()}\n
\n \n );\n }\n\n private readonly renderFooder = (): JSX.Element | null => {\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\n\n const canSubmit = !isReady && onSubmit;\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\n\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\n return null;\n }\n\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n {canSubmit && (\n \n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\n \n )}\n {canCancel && (\n \n {cancelBtnLabel}\n \n )}\n
\n );\n };\n\n private readonly focusOnFirstFocusableElement = (): void => {\n const node = this.formCardRef.current as HTMLElement;\n const focussableElements = `\n a:not([disabled]),\n button:not([disabled]),\n input[type=submit]:not([disabled]),\n input[type=checkbox]:not([disabled]),\n input[type=text]:not([disabled]),\n input[type=radio]:not([disabled]),\n input[type=password]:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\n `;\n\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\n child && child.focus && child.focus();\n };\n\n private readonly focusOnEditButton = (): void => {\n // Focus on edit button\n const editButton =\n this.editButtonRef &&\n this.editButtonRef.current &&\n this.editButtonRef.current.focus &&\n (this.editButtonRef.current as HTMLElement);\n editButton && editButton.focus();\n };\n\n private readonly scrollToTitle = (): void => {\n // Scroll window to the title of the step that was just completed only in mobile viewport\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\n formCard && formCard.scrollIntoView();\n };\n\n private readonly getTitle = (): JSX.Element => {\n const { step, title } = this.props;\n const { headingTag: Tag = 'h2', text = '' } = title || {};\n return (\n \n \n {step + 1}. {` `}\n \n {text && {text}}\n \n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _getModules = (item: React.ReactNode): any[] => {\n return get(item, 'props.modules.primary') || [];\n };\n\n private readonly _getId = (item: React.ReactNode): string => {\n return get(item, 'id') || '';\n };\n}\n\nexport default CheckoutGuidedCard;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport GuidedCard from './guided-card';\n\nexport interface ICheckoutGuidedFormProps {\n items: React.ReactNode[];\n moduleState: IModuleStateManager;\n disableGuidedCheckoutFlow?: boolean;\n isMobile?: boolean;\n isEditor?: boolean;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n requestContext?: ICoreContext;\n telemetryContent?: ITelemetryContent;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n hasError?: boolean;\n hasShippingAddress?: boolean | undefined;\n hasCartDeliveryMode?: boolean | undefined;\n hasGuestCheckoutEmail?: boolean | undefined;\n isTermsAndConditionAccepted?: boolean | undefined;\n shouldEnableCheckoutErrorDisplayMessaging?: boolean;\n shouldFocusOnCheckoutError?: boolean | undefined;\n}\n\ninterface ICheckoutGuidedFormState {\n currentStep: number;\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\n/**\n *\n * CheckoutGuidedForm component.\n * @extends {React.Component}\n */\n@observer\nclass CheckoutGuidedForm extends React.PureComponent {\n @computed public get hasMissingInfo(): boolean {\n if (\n this.props.hasShippingAddress === false ||\n this.props.hasCartDeliveryMode === false ||\n this.props.hasGuestCheckoutEmail === false ||\n this.props.isTermsAndConditionAccepted === false\n ) {\n return true;\n }\n\n return false;\n }\n\n @computed public get hasOrderError(): boolean {\n for (const item of this.props.items) {\n const childId = this.getId(item);\n const state = this.props.moduleState.getModule(childId);\n\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\n return true;\n }\n }\n\n return false;\n }\n\n public state: ICheckoutGuidedFormState = {\n currentStep: 0\n };\n\n public componentDidMount(): void {\n /**\n * Append child modules.\n */\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\n this.props.moduleState.init({ childIds });\n }\n\n public render(): JSX.Element | null {\n const { moduleState, items, resource } = this.props;\n if (!items || !moduleState) {\n return null;\n }\n\n const shouldCollapseAfterRedirect =\n this.props.isPaymentVerificationRedirection &&\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\n !this.props.hasError &&\n !this.hasMissingInfo &&\n !this.hasOrderError;\n\n let previousModuleHasError = false;\n const childModule = this._enableAfterModule();\n return (\n
\n {items.map((item: React.ReactNode) => {\n const childId = this.getId(item);\n const step = this.getStep(childId);\n const title = this.getHeading(item);\n const state = this.props.moduleState.getModule(childId);\n const {\n isReady,\n isPending,\n isUpdating,\n isDisabled,\n isCancelAllowed,\n onEdit,\n onCancel,\n onSubmit,\n hasModuleState,\n hasInitialized,\n hasError\n } = state || ({} as IModuleStateManager);\n\n let shouldFocus =\n !!this.props.shouldEnableCheckoutErrorDisplayMessaging &&\n !!this.props.shouldFocusOnCheckoutError &&\n !previousModuleHasError &&\n hasError;\n previousModuleHasError = previousModuleHasError || shouldFocus;\n\n return (\n \n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\n \n );\n })}\n
\n );\n }\n\n private readonly getEnabledModules = (): string[] => {\n const {\n moduleState: { childIds, getModule }\n } = this.props;\n return childIds.filter((childId: string) => {\n const state = getModule(childId);\n return !!state && !state.isDisabled;\n });\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _enableAfterModule = (): string => {\n const childIds: string[] = this.props.items.map((item: React.ReactNode) => get(item, 'props.id')).filter(Boolean);\n let id: string = '';\n for (let i = 0; i < childIds.length - 1; i++) {\n const childId = childIds[i];\n const nextChildId = childIds[i + 1];\n if (this._isPaymentSectionContainer(childId) && nextChildId) {\n id = nextChildId;\n }\n }\n return id;\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n const sectionState = this.props.moduleState.getModule(moduleId);\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n sectionState.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer) {\n return true;\n }\n return false;\n };\n\n private readonly getStep = (id: string): number => {\n return this.getEnabledModules().indexOf(id);\n };\n\n private readonly getId = (item: React.ReactNode): string => {\n return get(item, 'props.id') || '';\n };\n\n private readonly getHeading = (item: React.ReactNode): Heading => {\n return get(item, 'props.config.heading') || '';\n };\n\n private readonly isExpanded = (step: number, moduleChildId: string, childId: string): boolean => {\n if (this.props.isEditor) {\n // Editorial mode: Expand all the drawers\n return true;\n }\n if (this.props.shouldEnableSinglePaymentAuthorizationCheckout && moduleChildId === childId) {\n return true;\n }\n return step > -1 && step <= this.state.currentStep;\n };\n\n private readonly isActive = (step: number): boolean => {\n return step === this.state.currentStep;\n };\n\n private readonly isVisted = (step: number): boolean => {\n return step > -1 && step < this.state.currentStep;\n };\n\n private readonly onNext = (): void => {\n this.setState({\n currentStep: this.state.currentStep + 1\n });\n };\n}\n\nexport default CheckoutGuidedForm;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\ninterface ICheckoutPlaceOrderButtonProps {\n canPlaceOrder: boolean;\n checkoutBtnText: string;\n telemetryContent?: ITelemetryContent;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n isPlaceOrderLoading?: boolean;\n isExpressCheckoutApplied?: boolean;\n isPaymentVerificationRedirection?: boolean;\n placeOrder(): Promise;\n}\n\nconst buttonsStates: React.Dispatch>[] = [];\n\n/**\n * On place order function.\n * @param isBusy -Check is busy.\n * @param canPlaceOrder -Check can place order.\n * @param placeOrder -Place order function.\n * @returns Set state of button.\n */\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\n if (isBusy || !canPlaceOrder) {\n return;\n }\n buttonsStates.map(buttonSetState => {\n buttonSetState(true);\n return true;\n });\n await placeOrder();\n};\n\nconst CheckoutPlaceOrderButton: React.FC = ({\n checkoutBtnText,\n canPlaceOrder,\n placeOrder,\n telemetryContent,\n shouldEnableSinglePaymentAuthorizationCheckout,\n isPlaceOrderLoading,\n isExpressCheckoutApplied,\n isPaymentVerificationRedirection\n}) => {\n const [isBusy, setIsBusy] = useState(false);\n buttonsStates.push(setIsBusy);\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\n return (\n \n {checkoutBtnText}\n \n );\n }\n\n return (\n \n {checkoutBtnText}\n \n );\n};\n\nexport default CheckoutPlaceOrderButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\nimport {\n updateLineDeliverySpecificationsAsync,\n validateForCheckoutAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport {\n Address,\n DeliveryPreferenceType,\n LineDeliverySpecification,\n SimpleProduct,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getAvailabilitiesForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n validateCartLinesInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n Waiting\n} from '@msdyn365-commerce-modules/utilities';\nimport { ErrorCode, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/isEmpty';\nimport { action, computed, get, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutData } from './checkout.data';\nimport { ICheckoutHeadingData, ICheckoutProps } from './checkout.props.autogenerated';\nimport AlertComponent from './components/alert';\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\nimport { getLineItems, ILineItems } from './components/get-line-items';\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\nimport GuidedFormComponent from './components/guided-form';\nimport PlaceOrderButtonComponent from './components/place-order-button';\nimport placeOrder from './methods/place-order';\nimport { focusOnCheckoutError, setCheckoutErrors } from '../../checkout-errors';\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '../../common';\n\nexport * from './components/get-line-items';\nexport * from './components/get-order-summary';\n\n/**\n * Device type.\n */\ntype DeviceType = 'Mobile';\n\n/**\n * The Checkout state.\n */\ninterface ICheckoutState {\n errorMessage: string;\n isValidationPassed: boolean;\n isPlaceOrderLoading?: boolean;\n isPlaceOrderClicked?: boolean;\n}\n\n/**\n * Known action error failure states\n */\nexport const enum ActionErrorStatus {\n Timeout = 'Timeout',\n HookTimeout = 'Hook Timeout',\n ServiceUnavailable = 'Service Unavailable'\n}\n\n/**\n * The Checkout view props.\n * @extends ICheckoutProps\n */\nexport interface ICheckoutViewProps extends ICheckoutProps {\n className: string;\n canShow?: boolean;\n isEmptyCart?: boolean;\n isConsentGiven?: boolean;\n hasError?: boolean;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n cartStatus?: string;\n isMobile?: boolean;\n isEditorialMode?: boolean;\n backToShoppingUrl?: string;\n editCartLink?: string;\n hasSalesOrder: boolean;\n hasInvoiceLine?: boolean;\n\n 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 if (this._shouldValidateQuantityLimits()) {\n if (Version && Id) {\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\n .then((result: CartLineValidationResults) => {\n if (result.ValidationFailuresByCartLines?.length !== 0) {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n } else {\n this.setState({ isValidationPassed: true });\n }\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n const cartState = this.props.data.checkout.result?.checkoutCart;\n cartState\n ?.refreshCart({})\n .then(() => {\n this.validateForCheckout(false);\n })\n .catch((refreshError: Error) => {\n this.props.telemetry.warning(refreshError.message);\n this.props.telemetry.debug('Unable to refresh Cart');\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n } else {\n this.setState({ isValidationPassed: true });\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _shouldValidateQuantityLimits = (): boolean => {\n const featureStatuses = this.props.data.featureState.result;\n const isECommerceQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n\n if (isECommerceQuantityLimitsFeatureEnabledInHq) {\n return true;\n }\n\n const isOrderQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')\n ?.IsEnabled || false;\n\n if (!isOrderQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n\n const useSiteBuilderSettings = featureStatuses?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n const isB2BSite = isChannelTypeB2B(this.props.context.actionContext.requestContext);\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && isB2BSite) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !isB2BSite)));\n\n return isOrderQuantityLimitsFeatureEnabledInSiteSettings ?? false;\n } else {\n const cartConfiguration = this.props.data.cartConfiguration?.result;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n }\n };\n\n /**\n * Save the address as Shipping and Billing address.\n * @param tokenizedPaymentCard - Tokenized payment card.\n */\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\n\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\n }\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const address: Address = {\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone\n };\n\n return address;\n };\n\n /**\n * Handle checkout errors.\n * @param error -- The error on checkout api failure.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly handleCheckoutError = (error: any) => {\n // Here checkout failure message will be shown if there is any error in checkout api except data validation.\n const {\n resources: {\n genericErrorMessage,\n invalidCartVersionErrorMessage,\n missingRequiredCartTenderLinesErrorMessage,\n checkoutApiFailureErrorMessage,\n invoiceCheckoutApiFailureErrorMessage\n },\n context: { actionContext }\n } = this.props;\n const checkoutResult = this.props.data.checkout.result;\n const apiError = error && error.message;\n if (error?.statusCode === 500) {\n const errorMessage = checkoutApiFailureErrorMessage;\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n this.setState({ isPlaceOrderLoading: false });\n return;\n }\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\n const errorCode = error && error.name ? error.name : '';\n // apiError message will be used if errorcode resource/enums is unavailable\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext, apiError);\n } else {\n let errorMessage = genericErrorMessage;\n this.setState({ isPlaceOrderClicked: false });\n\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n errorMessage = invalidCartVersionErrorMessage;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_ExclusiveCouponCannotBeAppliedWithOtherCoupons') {\n // If api error is not available show generic message\n errorMessage = apiError || genericErrorMessage;\n } else {\n if (error.status === ActionErrorStatus.Timeout || error.status === ActionErrorStatus.ServiceUnavailable) {\n errorMessage = checkoutResult?.checkoutCart.hasInvoiceLine\n ? invoiceCheckoutApiFailureErrorMessage\n : checkoutApiFailureErrorMessage;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n error.data?.AdditionalContext &&\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\n ) {\n return;\n }\n\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n }\n };\n}\n\nexport default Checkout;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\nimport { getCheckoutState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getSimpleProducts, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for ActiveCheckoutCartWithProducts data action.\n */\nexport class ActiveCheckoutCartProductsInput implements IActionInput {\n public getCacheKey = () => 'ActiveCheckoutCartProducts';\n\n public getCacheObjectType = () => 'ActiveCheckoutCartProducts';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport const createInput = () => {\n return new ActiveCheckoutCartProductsInput();\n};\n\n/**\n * Calls the Retail API and returns a cart object based on the passed GetCartInput.\n * @param input\n * @param ctx\n */\nexport async function getActiveCheckoutCartProductsAction(\n input: ActiveCheckoutCartProductsInput,\n ctx: IActionContext\n): Promise {\n // If no cart ID is provided in input, we need to create a cart object\n if (!input) {\n ctx.telemetry.exception(new Error('[getActiveCheckoutCartWithProducts]No valid Input was provided, failing'));\n throw new Error('[getActiveCheckoutCartWithProducts]No valid Input was provided, failing');\n }\n\n const checkoutState = await getCheckoutState(ctx);\n const cart = checkoutState.checkoutCart.cart;\n\n // If there are cart lines, make call to get products\n if (!checkoutState.checkoutCart.hasInvoiceLine && cart && cart.CartLines && cart.CartLines.length > 0) {\n return getSimpleProducts(\n cart.CartLines.map(cartLine => {\n if (cartLine.ProductId) {\n return new ProductInput(\n cartLine.ProductId,\n ctx.requestContext.apiSettings,\n undefined,\n undefined,\n ctx.requestContext,\n cartLine.CatalogId\n );\n }\n return undefined;\n }).filter(Boolean),\n ctx\n )\n .then(products => {\n if (products) {\n return products;\n }\n return [];\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCheckoutCartWithProdcuts]Unable to hydrate cart with product information');\n });\n }\n\n return [];\n}\n\nexport const getActiveCheckoutCartProductsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/checkout/get-products-in-active-checkout-cart',\n action: >getActiveCheckoutCartProductsAction,\n input: createInput\n});\n\nexport default getActiveCheckoutCartProductsActionDataAction;\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 { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, CartLine } from '@msdyn365-commerce/retail-proxy';\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IInvoiceSummaryProps {\n orderTotalLabel: string;\n invoiceLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n id: string;\n typeName: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n}\n\nexport interface IInvoiceSummaryLines {\n orderTotal: React.ReactNode;\n invoices: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n}\n\ninterface IInvoiceSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n}\n\nconst InvoiceSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel\n}) => {\n return (\n

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

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

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

\n );\n};\n\nconst _buildOrderSummarySection = (\n props: IOrderSummaryProps,\n price: number | undefined,\n cssLabel: string,\n label: string = ''\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computedCustomerAccountAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.customerAccountAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nconst getDeliveryConfiguration = (\n cart: Cart,\n channelConfiguration: ChannelConfiguration,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n retailMultiplePickUpOptionEnabled?: boolean,\n isTaxIncludedInPrice?: boolean,\n isShowTaxBreakup?: boolean\n): IShippingOrderLine => {\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\n const cartLines = cart.CartLines || [];\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\n const taxOnShippingCharge = cart.TaxOnShippingCharge !== undefined ? cart.TaxOnShippingCharge : 0;\n const shippingChargeAmount = cart.ShippingChargeAmount !== undefined ? cart.ShippingChargeAmount : 0;\n\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True shippingChargeAmount\n // True True shippingChargeAmount\n // True false shippingChargeAmount + taxOnShippingCharge\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n let freightFee: number | undefined = 0;\n if (isTaxIncludedInPrice === undefined || isShowTaxBreakup === undefined) {\n freightFee = cart.ShippingChargeAmount;\n } else {\n freightFee = isTaxIncludedInPrice && !isShowTaxBreakup ? shippingChargeAmount + taxOnShippingCharge : cart.ShippingChargeAmount;\n }\n const canShip = deliveryModes.some(\n deliveryMode =>\n !(\n deliveryMode !== '' &&\n (deliveryMode ===\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) ||\n deliveryMode === emailDeliveryModeCode)\n )\n );\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\n const hasShippingMethod = deliveryModes.some(\n deliveryMode =>\n !!deliveryMode &&\n deliveryMode !==\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) &&\n deliveryMode !== emailDeliveryModeCode\n );\n return {\n canShip,\n hasDeliveryMethod,\n hasShippingMethod,\n freightFee\n } as IShippingOrderLine;\n};\n\nconst getDeliveryMode = (\n deliveryMode?: string,\n featureSate: boolean = false,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n pickupDeliveryMode?: string\n) => {\n if (!featureSate) {\n return pickupDeliveryMode;\n }\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\n};\n\n// eslint-disable-next-line complexity\nexport const OrderSummary = (props: IOrderSummaryProps) => {\n const {\n SubtotalAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n SubtotalAmountWithoutTax,\n TaxAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n TaxOnNonShippingCharges,\n DiscountAmount = 0,\n TotalAmount,\n OtherChargeAmount\n } = props.cart;\n\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(\n props.cart,\n props.channelConfiguration,\n props.channelDeliveryOptionConfig,\n props.retailMultiplePickUpOptionEnabled,\n props.isTaxIncludedInPrice,\n props.isShowTaxBreakup\n );\n\n let reactNodes: IOrderSummaryLines;\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n if (props.isTaxIncludedInPrice === undefined || props.isShowTaxBreakup === undefined) {\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, SubtotalAmount, 'sub-total', props.subTotalLabel),\n tax: _buildOrderSummarySection(props, hasDeliveryMethod ? TaxAmount : undefined, 'tax-amount', props.taxLabel),\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, OtherChargeAmount, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n } else {\n const otherChargeAmount = OtherChargeAmount !== undefined ? OtherChargeAmount : 0;\n const taxOnNonShippingCharges = TaxOnNonShippingCharges !== undefined ? TaxOnNonShippingCharges : 0;\n const isTaxGreaterThanZero = TaxAmount !== undefined && TaxAmount > 0;\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True otherChargeAmount\n // True True otherChargeAmount\n // True false otherChargeAmount+TaxOnNonShippingCharges\n\n const otherChargeAmountTotal =\n props.isTaxIncludedInPrice && !props.isShowTaxBreakup ? otherChargeAmount + taxOnNonShippingCharges : otherChargeAmount;\n\n const subtotalAmountActual = props.isTaxIncludedInPrice && props.isShowTaxBreakup ? SubtotalAmountWithoutTax : SubtotalAmount;\n\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, subtotalAmountActual, 'sub-total', props.subTotalLabel),\n tax: props.isShowTaxBreakup\n ? _buildOrderSummarySection(\n props,\n hasDeliveryMethod || isTaxGreaterThanZero ? TaxAmount : undefined,\n 'tax-amount',\n props.taxLabel\n )\n : '',\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, otherChargeAmountTotal, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n }\n if (canShip) {\n reactNodes.shipping = _buildOrderSummarySection(props, hasShippingMethod ? freightFee : undefined, 'shipping', props.shippingLabel);\n }\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const customerAccountAmount = _computedCustomerAccountAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount - customerAccountAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\n }\n\n if (customerAccountAmount > 0) {\n reactNodes.customerAccount = _buildOrderSummarySection(\n props,\n -customerAccountAmount,\n 'customer-credit-amount',\n props.customerAccountLabel || 'Customer Credit amount'\n );\n }\n\n reactNodes.orderTotal = _buildOrderSummarySection(\n { ...props, freeText: undefined },\n totalAmountAfterGiftCard,\n 'total',\n props.orderTotalLabel\n );\n }\n\n if (DiscountAmount > 0) {\n reactNodes.totalDiscounts = _buildOrderSummarySection(props, -DiscountAmount, 'total-discounts', props.totalDiscountsLabel);\n }\n\n return reactNodes;\n};\n"],"names":["CheckoutDeliveryOptions","React","constructor","props","super","selectedItemId","deliveryOptions","isLoading","groupDeliveryOptions","cartLineSelectedDeliveryOptions","retailMultiplePickUpOptionEnabled","checkoutErrorRef","cartLinesDeliveryOptions","init","async","this","moduleState","onEdit","isSelectDefaultOptionEnabled","undefined","onCancel","onSubmit","status","config","useDefaultDeliveryOption","canShip","cartDeliveryMode","getSavedDeliveryOption","isMultipleAddressShippingEnabled","getCartLinesSavedDeliveryOption","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","channelConfig","request","channel","DeliveryOption","className","description","DescriptionComponent","Object","assign","Description","PriceComponent","CustomerContextualPrice","freePriceText","currencyCode","Currency","getErrorMessage","errorMessageTitle","CheckoutDeliveryOptionsError","tag","role","title","ErrorTitleComponent","message","ErrorMessageComponent","errorMessage","getDeliveryOptionList","count","map","index","getAriaLabelWithPrice","code","radioButton","RadioButtonComponent","isChecked","value","ariaSetSize","ariaPosInSet","ariaLabel","onChange","onDeliveryOptionChange","telemetryContent","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","updateCartLinesDeliverySpecification","updateCartDeliverySpecification","savedDeliveryOption","_this$props$data$chec4","onReady","cartLinesForShipping","DeliveryMode","forEach","cartLine","LineId","StringExtensions","isNullOrEmpty","cartLineId","existingCartLineSelectedDeliveryOption","cartLineDeliveryOption","selectedDeliveryOption","push","deliveryModeId","trim","checkoutState","updateCartDeliverySpecificationInput","shippingAddress","channelDeliveryOptionConfig","onPending","then","response","_response$errorDetail","errorDetails","LocalizedMessage","genericErrorMessage","setIsCancellable","catch","_this$props$data$chec5","lineSpecs","checkoutCartLines","cart","CartLines","group","_checkoutCartLines$fi","address","ShippingAddress","lineSpec","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ShipToAddress","DeliveryAddress","lineDeliverySpecifications","_this$props$data$chec6","cartLines","_cartLine$LineId","toString","cartLineSelectedDeliveryOption","RequestedDeliveryDate","requestDeliveryDate","Date","updateCartLines","updatedCartLinesObject","_unused","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","filter","_this$channelDelivery","PickupDeliveryModeCodes","getDeliveryOptions","_this$props$data$chec7","cartState","cartId","Id","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","filterDeliveryModeOption","FilterDeliveryModeOption","None","FilterOutNonCarrierDeliveryMode","getDeliveryOptionsAsync","callerContext","actionContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_unused2","deliveryOptionsNotFound","_this$props$data$chec8","_this$props$data$chec9","updateHasCartDeliveryMode","newHasCartDeliveryMode","isPaymentVerificationRedirection","_this$props$data$chec10","getStoredDeliveryOptions","_this$props$data$chec11","_this$props$data$chec12","_this$props$data$chec13","cartLinesWithShippingAddress","_this$props$data$chec14","_this$props$data$chec15","_this$props$data$chec16","_this$props$data$chec17","isExpressCheckoutApplied","getGroupDeliveryOptions","isExpressPaymentAppliedInCartPage","event","currentTarget","onCartLineDeliveryOptionChange","onCartLineRequestDeliveryDateChange","deliveryDate","getCheckoutCartLineGroupDeliveryOptions","ArrayExtensions","hasElements","imageSettings","getImageSettings","requestDeliveryDateEnabled","enableRequestDeliveryDate","groupDeliveryOption","cartLineIds","cartLine1","_ref","_cartLine$LineId2","_ref2","_cartLine$LineId3","_this$cartLineSelecte","_cartLine1$ShippingAd","_cartLine1$ShippingAd2","_groupDeliveryOption$","key","AddressDetailItemFunctionComponent","isNewLine","isShowLabel","labelText","cartLineGroupShippingAddressLabel","name","FullAddress","cartLineGroupDeliveryOptionsLabel","cartLineGroupDeliveryOptionsText","CheckoutCartLineDeliveryDate","heading","cartLineGroupDeliveryRequestDeliveryDateText","disclaimerText","cartLineGroupDeliveryRequestDeliveryDateDisclaimerText","checkBoxLabel","cartLineGroupDeliveryRequestDeliveryDate","CheckoutCartLineDeliveryOptionsRadio","moduleId","groupName","_this$cartLineSelecte2","_this$props$data$prod","_this$props$data$cata","_ref3","_cartLine$LineId4","selectedDeliveryOption1","GetLineItems","products","gridSettings","configString","discountStringText","shippingChargesText","shippingChargesString","productDimensionTypeColor","productDimensionTypeSize","productDimensionTypeStyle","productDimensionTypeAmount","quantityDisplayStringLabel","quantityDisplayString","changeButtonText","deliveryMethodLabel","catalogs","showShippingChargesForLineItems","_this$props$data$chec18","getGroupByDelivery","items","groupBy","item","_item$ShippingAddress","RecordId","console","log","inputData","GetDeliveryOptionsForCartLineAddressInput","getDeliveryOptionsForCartLineAddress","_group$cartLineIds","_unused3","viewports","xs","q","w","h","sm","lg","lazyload","getTelemetryObject","telemetryPageName","friendlyName","multipleAddressShippingEnabled","_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$chec25","when","isDataReady","reaction","_this$props$data$chec19","_this$props$data$chec20","_this$props$data$chec21","_this$props$data$chec22","_this$props$data$chec23","_this$props$data$chec24","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec26","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec27","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","shouldComponentUpdate","nextProps","nextState","state","render","_this$props$data$chan","_this$props$data$feat","featureState","feature","Name","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","checkoutCartLineGroupDeliveryOptions","enableCheckoutCartLineDeliveryOptions","saveButton","editButton","cancelButton","renderView","__decorate","observable","computed","action","withModuleState","observer","DeliveryOptionList","Node","DeliveryOptionSelected","Module","ref","isDisabled","fallbackPattern","onChangeMinValue","selectedDate","setSelectedDate","useState","isDateEnabled","setIsDateEnabled","minDate","setMinDate","today","toISOString","split","payLoad","getPayloadObject","TelemetryConstant","DeliveryOptions","attributes","getTelemetryAttributes","type","checked","handleCheckboxChange","selectedValue","target","min","pattern","deliveryOptionRef","contentAction","etext","requestContext","changeCurrentDeliveryOption","deliveryClassName","optionClassName","descClassName","lineClassName","lineItemClassName","changeText","showDeliveryOption","setShowDeliveryOption","handleClick","deliveryCode","option","payload","TelemetryEvent","UpdateInCart","product","ProductId","_getProduct","productId","_product","_getLineItemComponent","productUrl","getProductUrlSync","MsDyn365","isBrowser","isChannelTypeB2B","_cartLine$CatalogId","fullUrl","URL","window","location","href","searchParams","set","CatalogId","CartLineItemComponent","sizeString","colorString","styleString","amountString","inputQuantityAriaLabel","originalPriceText","currentPriceText","salesAgreementPricePrompt","isQuantityEditable","primaryImageUrl","PrimaryImageUrl","priceCurrency","SupportedGiftCardType","CheckoutGiftCard","_this","isFetchingGiftCard","giftCardNumber","giftCardPin","giftCardExp","inputRef","inputPinRef","inputExpRef","isRequired","isEnabled","giftCards","giftCardExtends","onSkip","couldPaidByGiftCard","TotalAmount","user","isAuthenticated","app","giftCardSupported","External","shouldBeEnabledForGuest","handleCancelOrSubmit","hasSelectedItem","getFormattedPrice","arguments","cultureFormatter","formatCurrency","enterGiftCardNumber","setState","enterGiftCardPin","enterGiftCardExp","debug","removeGiftCard","applyGiftCard","giftCardTypes","getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","giftCard","getGiftCard","addGiftCard","additionalProperties","Pin","ExpirationDate","TenderTypeId","Promise","resolve","input","current","focus","findGiftcardTenderTypes","tenderTypes","operationId","giftcardType","matchedTenderTypes","Internal","tenderType","OperationId","ConnectorId","Error","noBalanceError","invalidCardInfoError","invalidCardTypeError","noCardPinError","noCardExpError","supportedGiftCardType","getTenderTypesAsync","internalGiftcardTenderTypes","OPERATIONS","PayGiftCertificate","externalGiftcardTenderTypes","includes","Both","month","Number","parseInt","year","getGiftCardAsync","activeGiftCard","Balance","emptyInputError","duplicatedCodeError","invalidCodeError","some","card","resolveCardTypesAsync","CardType","GiftCard","loyaltyAmount","customerAccountAmount","reduce","getLoyaltyAmount","getGiftCardTotalAmount","getCustomerAccountAmount","componentDidMount","showAdditionalFields","additionalFields","shouldPayGiftCard","isOBORequest","EnabledPaymentsForOBO","supportExternalGiftCard","moduleClassName","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","listProps","_ref4","_objectWithoutProperties","_excluded","AddResource","_ref5","ShowResource","_ref6","onApplyHandler","preventDefault","onChangeNumberHandler","replace","RegExp","onChangePinHandler","onChangeExpHandler","options","applyGiftCardButton","giftCardNumberLabel","giftCardPinLabel","giftCardExpLabel","giftCardAlertLabel","giftCardPinPlaceholderText","giftCardExpPlaceholderText","classnames","Alert","assertive","fade","includeAlertClass","isOpen","placeholder","onRemoveHandler","_giftCard$Id","getItem","enteredGiftCardLabel","giftCardAvailableBalanceLabel","removeGiftCardButton","balance","CardCurrencyCode","giftCardLast4Digit","substr","CheckoutLoyalty","_defaultLoyaltyPoints","loyaltyCard","CardNumber","LoyaltyCardId","updateLoyaltyCardId","loyaltyCardNumber","warning","shouldPayLoyalty","_setErrorMessage","_clearError","_dialogToggleRef","_applyLoyaltyPoints","bind","_removeLoyaltyPoints","_onInputChange","_onBlur","dollarsApplied","maxDollars","isFetchingLoyaltyCard","loyaltyTransactionEstimation","MaxCurrencyValueOfLoyaltyPoints","_updateEstimate","_updateLoyalty","Loyalty","isShowLoyalty","isShowAddLoyalty","disableAddLoyaltyComponent","checkoutLoyalty","showLoyalty","Heading","headingTag","text","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","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","element","document","getElementById","loyalPointsRequest","createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput","_query","bypassCache","callActionOrExecute","_points$MaxCurrencyVa","update","GetLoyaltyTransactionEstimationInput","apiSettings","newMaxPoints","exception","AddCheckoutLoyalty","rewardPoint","ShowCheckoutLoyalty","PickUpAtStoreComponent","PickUpAtStore","EmailDeliveryComponent","EmailDelivery","LineItemComponent","LineItem","pickUpAtStore","emailDelivery","LineItemGroupComponent","LineItemDeliveryGroup","LineItemList","lineItems","lineItem","LineItemGroupComponentWithMultiplePickUp","lineItemWraper","lineItemWraperIcon","LineItemComponentWithMultiplePickUp","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","LineItems","Header","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","OrderSummaryComponent","_ref9","lines","subtotal","shipping","otherCharge","tax","totalDiscounts","loyalty","customerAccount","orderTotal","PaymentSummaryComponent","_ref10","invoices","shouldEnableSinglePaymentAuthorizationCheckout","canShow","checkoutProps","headerProps","hasSalesOrder","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","orderConfirmation","loading","guidedForm","orderSummary","invoicePaymentSummary","placeOrderButton","termsAndConditions","keepShoppingButton","checkoutExpressPaymentContainer","getInvoicePaymentSummary","totalAmountLabel","invoiceLabel","invoiceSummaryTitle","InvoiceSummary","orderTotalLabel","getLineItems","_featureState$result","_getDeliveryLocation","orgUnitLocations","FulfillmentStoreId","locationMatch","OrgUnitNumber","OrgUnitName","_input$data$catalogs","shippingCharges","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","_getEmailDeliveryComponents","emailDeliveryText","_getLineItemsComponents","isPickUp","_getCartPickDeliveryMode","isEmailDelivery","cartLineItem","_channelDeliveryOptio","isNullOrWhitespace","_countItems","Quantity","_filterItemsByDiliveryType","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","productDeliveryOptions","_productDeliveryOptio","suffix","handleLineItemHeadingChange","lineItemsHeading","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","getGroupByStorePickup","groupDelivery","cartLinesGroup","cartLinesGrp","entries","groupByDeliveryType","keys","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","groupTitle","iconClass","_getLineItems","editCartText","EditCart","attribute","groupClass","Msdyn365","editProps","getOrderSummary","orderSummaryHeading","subTotalLabel","shippingLabel","taxLabel","loyaltyLabel","giftcardLabel","totalDiscountsLabel","freeText","toBeCalculatedText","otherCharges","customerAccountLabel","showLineItems","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","orderSummaryProps","OrderSummary","otherChargeLabel","isTaxIncludedInPrice","IsTaxIncludedInPrice","isShowTaxBreakup","CheckoutGuidedCard","editButtonRef","formCardRef","renderFooder","isVisted","isSubmitting","isCancelAllowed","hasControlGroup","resource","saveAndContinueBtnLabel","canSubmit","canCancel","Save","SaveContinue","saveBtnAttributes","Cancel","cancelBtnAttributes","focusOnFirstFocusableElement","node","child","querySelector","focusOnEditButton","scrollToTitle","formCard","isMobile","scrollIntoView","getTitle","Tag","_getModules","_getId","componentDidUpdate","prevProps","isActive","onNext","shouldFocus","children","childrenModules","childModule","childId","childState","getModule","setCheckoutErrorFocus","isExpanded","isPending","hasInitialized","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","hidden","initialized","ready","pending","updating","paymentInstrumentModuleId","CheckoutGuidedForm","currentStep","getEnabledModules","childIds","_enableAfterModule","Boolean","i","nextChildId","_isPaymentSectionContainer","_sectionState$childId","sectionState","currentId","getStep","indexOf","getId","getHeading","moduleChildId","isEditor","hasShippingAddress","hasCartDeliveryMode","hasGuestCheckoutEmail","isTermsAndConditionAccepted","_state$childIds","shouldCollapseAfterRedirect","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","hasModuleState","shouldFocusOnCheckoutError","GuidedCard","disableGuidedCheckoutFlow","enableControl","buttonsStates","onPlaceOrderHandler","isBusy","canPlaceOrder","placeOrder","buttonSetState","checkoutBtnText","isPlaceOrderLoading","setIsBusy","Purchase","Checkout","isValidationPassed","isPlaceOrderClicked","handleCheckoutHeadingChange","checkoutHeading","cartStatus","isEmptyCart","getSlotItems","slots","triggerPaymentWithPlaceOrder","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","shouldTriggerPaymentWithPlaceOrder","onPlaceOrder","checkoutOutOfStockErrorMessage","enableStockCheck","isOverMaxQuantity","_checkout$result","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","ctx","orderedProducts","redirect","PlaceOrder","handleCheckoutError","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","_this$props$context$r","emailDeliveryCartLines","line","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","updatedCart","Version","_this$props$context$r2","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","productInventoryInformation","_cart$CartLines","_cart$CartLines2","productsThatShouldValidateInventory","cartline","_cartlineProduct$Beha","cartlineProduct","isStockedItem","Behavior","IsStockedProduct","foundProductAvailability","productInventory","_productInventory$Pro","ProductAvailableQuantity","cartLinesInventoryValidation","validateCartLinesInventory","isValid","getActiveChildModuleStates","onContainerReady","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","validateForCheckout","retry","_shouldValidateQuantityLimits","validateForCheckoutAsync","_result$ValidationFai","ValidationFailuresByCartLines","refreshCart","refreshError","_featureStatuses$find","_featureStatuses$find2","_featureStatuses$find3","featureStatuses","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","isB2BSite","isOrderQuantityLimitsFeatureEnabledInSiteSettings","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","checkoutApiFailureErrorMessage","invoiceCheckoutApiFailureErrorMessage","checkoutResult","apiError","statusCode","errorCode","setCheckoutErrors","_error$data","AdditionalContext","isEditorialMode","isEmpty","params","disableForOBO","isPaidOffByCustomerAccount","amountDue","asyncResultStatus","AsyncResultStatusCode","LOADING","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","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","_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","_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","backToShopping","placeOrderText","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","allCheckoutInformation","checkoutInformation","info","isConsentGiven","cookies","device","Type","backToShoppingUrl","BackToShopping","backToShoppingAttributes","hasExpressPaymentContainer","getElementsByClassName","style","display","salesOrder","renderMsdyn365Text","AlertComponent","_this$props$data$chec59","_this$props$data$chec60","GuidedFormComponent","PlaceOrderButtonComponent","values","every","SUCCESS","FAILED","ActiveCheckoutCartProductsInput","getCacheKey","getCacheObjectType","dataCacheType","createObservableDataAction","getCheckoutState","getSimpleProducts","ProductInput","createInput","PayCard","PayLoyalty","PayCustomerAccount","InvoiceSummaryLine","cssLabel","_buildPaymentSummarySection","_computedLoyaltyAmount","invoiceLines","IsInvoiceLine","reactNodes","invoiceLine","InvoiceAmount","format","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","ShippingChargeAmount","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual"],"sourceRoot":""}