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F,aAAa2G,KAGxC,OAAKnB,EAAcxF,aAAaC,gBAAkB0G,GAAQA,EAAKC,WAAaD,EAAKC,UAAUzG,OAAS,GACzFwkC,EAAAA,EAAAA,mBACah+B,EAAKC,UAAU7D,KAAI+D,IAC/B,GAAIA,EAAS0gB,UACT,OAAO,IAAIod,EAAAA,aACP99B,EAAS0gB,UACTmQ,EAAI7O,eAAe9G,iBACnB9iB,OACAA,EACAy4B,EAAI7O,eACJhiB,EAASwiB,cAIlBziB,OAAO4sB,SACVkE,GAEC9xB,MAAK+nB,GACEA,GAGG,KAEVtnB,OAAMzF,IAEH,MADA82B,EAAI/2B,UAAUshB,UAAUrhB,GAClB,IAAIiT,MAAM,yFAIJ,IAMxBZ,MA1DuB2xB,IAChB,IAAIR,4BCbR,MAAM9vB,EAAa,CACtBuwB,QAAS,IACTtwB,mBAAoB,IACpBuwB,WAAY,IACZC,mBAAoB","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/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-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"],"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 { Address, CartLine, DeliveryOption } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ErrorComponent } from '../../common/error';\nimport { ICheckoutDeliveryOptionsData } from './checkout-delivery-options.data';\nimport {\n filterDeliveryModeOption,\n ICheckoutDeliveryOptionsProps,\n useDefaultDeliveryOption\n} from './checkout-delivery-options.props.autogenerated';\nimport DescriptionComponent from './components/checkout-delivery-options.description';\nimport ErrorMessageComponent from './components/checkout-delivery-options.error-message';\nimport ErrorTitleComponent from './components/checkout-delivery-options.error-title';\nimport RadioButtonComponent from './components/checkout-delivery-options.radio-button';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutDeliveryOptionsModuleProps\n extends ICheckoutDeliveryOptionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutDeliveryOption {\n DeliveryOption: INodeProps;\n description?: React.ReactNode;\n price?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\n code: string;\n radioButton?: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsList {\n DeliveryOptionsList: INodeProps;\n list: ICheckoutDeliveryOptionEdit[];\n}\n\nexport interface ICheckoutDeliveryOptionsError {\n Error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutDeliveryOptionsViewState {\n isLoading: boolean;\n isError: boolean;\n isShowList: boolean;\n isShowSelected: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutDeliveryOptionsViewProps extends ICheckoutDeliveryOptionsProps<{}> {\n CheckoutDeliveryOptions: IModuleProps;\n selectedItemId: string;\n deliveryOptionsData: DeliveryOption[];\n isLoading: boolean;\n errorMessageData: string;\n viewState: ICheckoutDeliveryOptionsViewState;\n deliveryOptions?: ICheckoutDeliveryOptionsList;\n deliveryOptionSelected?: ICheckoutDeliveryOption;\n errorMessage?: ICheckoutDeliveryOptionsError;\n waiting?: React.ReactNode;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onDeliveryOptionChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutDeliveryOptions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutDeliveryOptions extends React.Component {\n @observable private selectedItemId: string = '';\n\n @observable private deliveryOptions: DeliveryOption[] = [];\n\n @observable private isLoading: boolean = false;\n\n @observable private errorMessage?: string;\n\n @computed private get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n public get expressPaymentDetailsFromCartPage() {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? JSON.parse(properties) : null;\n }\n\n public get isExpressPaymentAppliedInCartPage(): boolean {\n return this.expressPaymentDetailsFromCartPage?.isExpressCheckoutAppliedInCartPage ?? false;\n }\n\n private cartDeliveryMode?: string;\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly isSelectDefaultOptionEnabled?: boolean;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutDeliveryOptionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.isSelectDefaultOptionEnabled =\n this.props.config.useDefaultDeliveryOption && this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddress,\n async () => {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n async isExpressCheckoutApplied => {\n if (isExpressCheckoutApplied && this.canShip() && !this.isExpressPaymentAppliedInCartPage) {\n await this.loadDeliveryOptions();\n this.props.moduleState.setIsCancellable(false);\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n }\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutDeliveryOptions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutDeliveryOptions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps, nextState: ICheckoutDeliveryOptionsViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result?.find(\n feature => feature.Name === multiplePickupStoreSwitchName\n )?.IsEnabled;\n\n if (!this.canShip()) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const {\n moduleState: { isReady, isUpdating, hasError }\n } = this.props;\n const isError = !this.isLoading && hasError;\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n const { errorMessageTitle, deliveryOptionAriaLabel } = this.props.resources;\n\n const viewProps = {\n ...this.props,\n onDeliveryOptionChange: this.onDeliveryOptionChange,\n selectedItemId: this.selectedItemId,\n deliveryOptionsData: this.deliveryOptions,\n isLoading: this.isLoading,\n alert: this.errorMessage && ,\n errorMessageData: this.errorMessage,\n viewState: {\n isLoading: this.isLoading,\n isError,\n isShowList,\n isShowSelected,\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\n },\n CheckoutDeliveryOptions: {\n moduleProps: this.props,\n className: classname('ms-checkout-delivery-options', this.props.config.className)\n },\n deliveryOptions: {\n DeliveryOptionsList: {\n className: 'ms-checkout-delivery-options__list',\n role: 'list',\n 'aria-label': deliveryOptionAriaLabel\n },\n list: this.getDeliveryOptionList()\n },\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\n errorMessage: this.getErrorMessage(),\n waiting: ,\n checkoutErrorRef: this.checkoutErrorRef,\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSave,\n onEdit: this.onEdit,\n onCancel: this.onCancel\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\n status:\n !(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\n this.canShip()\n ? 'updating'\n : 'disabled'\n });\n\n this.cartDeliveryMode = this.getSavedDeliveryOption();\n await this.loadDeliveryOptions();\n };\n\n private readonly canShip = (): boolean => {\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\n };\n\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\n if (deliveryMode) {\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\n return true;\n }\n }\n return false;\n };\n\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\n if (!selectedItem) {\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\n return null;\n }\n\n const { id, typeName, context } = this.props;\n const { priceFree } = this.props.resources;\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\n 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 return {\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'listitem' },\n code: deliveryOption.Code || '',\n radioButton: (\n \n ),\n description: (\n \n ),\n price: (\n \n )\n };\n });\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save' } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\n return (\n \n );\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onSave = async (): Promise => {\n await this.onSubmit();\n };\n\n private readonly onEdit = async (): Promise => {\n this.props.telemetry.information('Delivery options onEdit is called.');\n\n this.clearError();\n this.onUpdating();\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Delivery options onSubmit is called.');\n\n await this.updateCartDeliverySpecification(this.selectedItemId);\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n };\n\n private readonly onCancel = async (): Promise => {\n this.props.telemetry.information('Delivery options onCancel is called.');\n\n // Reset to the saved value\n const savedDeliveryOption = this.getSavedDeliveryOption();\n if (savedDeliveryOption) {\n this.selectedItemId = savedDeliveryOption;\n this.onReady();\n\n await this.props.data.checkout.result?.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n } else {\n this.onUpdating();\n }\n };\n\n private readonly getSavedDeliveryOption = (): string | undefined => {\n const cartLinesForShipping = this.getCartLinesForShipping();\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\n };\n\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\n if (deliveryModeId.trim() === '') {\n return;\n }\n\n const { resources } = this.props;\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const updateCartDeliverySpecificationInput = {\n deliveryModeId,\n shippingAddress: checkoutState.shippingAddress,\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\n };\n\n this.clearError();\n this.onPending();\n\n await checkoutState.checkoutCart\n .updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\n .then(response => {\n if (response.status === 'FAILED') {\n const errorMessage = `${response.errorDetails?.LocalizedMessage}`;\n this.setError(StringExtensions.isNullOrEmpty(errorMessage) ? resources.genericErrorMessage : errorMessage);\n }\n\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n })\n .catch(() => {\n this.setError(resources.genericErrorMessage);\n });\n };\n\n private readonly getCartLinesForShipping = (): CartLine[] => {\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n\n return this.retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context, resources, config } = this.props;\n const cartState = this.props.data.checkout.result?.checkoutCart;\n const cartId = (cartState.cart as Cart).Id;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n try {\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n }\n\n // TODO: Check if we can move this getDeliveryOptions to checkout state\n let deliveryOptionFilter: FilterDeliveryModeOption;\n switch (config.filterDeliveryModeOption) {\n case filterDeliveryModeOption.none:\n deliveryOptionFilter = FilterDeliveryModeOption.None;\n break;\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n break;\n default:\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\n }\n const response = await getDeliveryOptionsAsync(\n {\n callerContext: context.actionContext,\n queryResultSettings: QueryResultSettingsProxy.getPagingFromInputDataOrDefaultValue(context.actionContext)\n },\n cartId,\n shippingAddress,\n [],\n deliveryOptionFilter,\n true\n );\n\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n\n if (response && response.length > 0) {\n this.deliveryOptions = response;\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n\n if (this.deliveryOptions.length === 0) {\n this.setError(resources.deliveryOptionsNotFound);\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n } else {\n this.onUpdating();\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: !!this.isSelectDefaultOptionEnabled });\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly getStoredDeliveryOptions = async (): Promise => {\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const { context } = this.props;\n const cartState = this.props.data.checkout.result.checkoutCart;\n\n if (context) {\n this.isLoading = true;\n this.deliveryOptions = [];\n this.selectedItemId = '';\n this.clearError();\n\n let originalDeliveryMode: string = '';\n const shippingCartLines = this.getCartLinesForShipping();\n const hasShippingDeliveryLines = shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode;\n if (hasShippingDeliveryLines) {\n // First store the delivery mode, so that we can restore the shipping information.\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\n\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\n const cart = cartState.cart;\n await cartState.clearCartLinesDeliveryInformation({\n cart,\n channelDeliveryOptionConfiguration: this.channelDeliveryOptionConfig\n });\n if (hasShippingDeliveryLines) {\n await this.updateCartDeliverySpecification(originalDeliveryMode);\n }\n }\n\n if (this.cartDeliveryMode) {\n this.selectedItemId = this.cartDeliveryMode;\n this.cartDeliveryMode = undefined;\n this.onReady();\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n this.props.data.checkout.result?.updateHasCartDeliveryMode({ newHasCartDeliveryMode: true });\n\n if (!this.props.data.checkout.result.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\n }\n }\n\n this.isLoading = false;\n }\n };\n\n private readonly loadDeliveryOptions = async (): Promise => {\n const shippingAddress = this.props.data.checkout.result?.shippingAddress;\n\n if (this.canShip() && shippingAddress) {\n if (\n !this.props.data.checkout.result?.isPaymentVerificationRedirection ||\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied\n ) {\n await this.getDeliveryOptions(shippingAddress);\n }\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.getStoredDeliveryOptions();\n }\n\n if (\n this.isSelectDefaultOptionEnabled ||\n this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.isExpressPaymentAppliedInCartPage\n ) {\n this.onSubmit();\n }\n }\n };\n\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\n const deliveryModeId = event.currentTarget.value;\n this.selectedItemId = deliveryModeId;\n };\n\n private readonly onReady = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\n this.props.moduleState.onUpdating();\n }\n };\n\n private readonly onPending = () => {\n if (!this.isSelectDefaultOptionEnabled) {\n this.props.moduleState.onPending();\n }\n };\n}\n\nexport default CheckoutDeliveryOptions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutDeliveryOption,\n ICheckoutDeliveryOptionEdit,\n ICheckoutDeliveryOptionsList,\n ICheckoutDeliveryOptionsViewProps\n} from './checkout-delivery-options';\n\nconst DeliveryOptionList: React.FC = ({ DeliveryOptionsList, list }) => {\n if (!list || list.length === 0) {\n return null;\n }\n\n return (\n \n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\n return (\n \n {deliveryOption.radioButton}\n {deliveryOption.description}\n {deliveryOption.price}\n \n );\n })}\n \n );\n};\n\nconst DeliveryOptionSelected: React.FC = ({ DeliveryOption, description, price }) => {\n return (\n \n {description}\n {price}\n \n );\n};\n\nconst CheckoutDeliveryOptionsView: React.FC = props => {\n const {\n CheckoutDeliveryOptions,\n checkoutErrorRef,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n alert,\n waiting,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isLoading && waiting}\n {viewState.isError && alert}\n {viewState.isShowList && deliveryOptions && }\n {viewState.isShowSelected && deliveryOptionSelected && }\n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutDeliveryOptionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\n description?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.description\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsDescription: React.FC = ({ description }) => {\n if (!description) {\n return null;\n }\n\n return {description};\n};\n\nexport default CheckoutDeliveryOptionsDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

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

{title}

;\n};\n\nexport default CheckoutDeliveryOptionsErrorTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\n isChecked: boolean;\n value?: string;\n ariaSetSize: number;\n ariaPosInSet: number;\n ariaLabel?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.value\n * @param root0.ariaSetSize\n * @param root0.ariaPosInSet\n * @param root0.ariaLabel\n * @param root0.telemetryContent\n * @param root0.onChange\n * @extends {React.FC}\n */\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\n isChecked,\n value,\n ariaSetSize,\n ariaPosInSet,\n ariaLabel,\n telemetryContent,\n onChange\n}) => {\n if (!value) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default CheckoutDeliveryOptionsRadioButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CheckoutModule, ErrorLocation, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport {\n getGiftCardAsync,\n getTenderTypesAsync,\n resolveCardTypesAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CardType,\n CardTypeInfo,\n GiftCard,\n RetailOperation,\n TenderType\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { OPERATIONS } from '../checkout';\nimport { ICheckoutGiftCardData } from './checkout-gift-card.data';\nimport { ICheckoutGiftCardProps } from './checkout-gift-card.props.autogenerated';\nimport { getForm, IForm } from './components/get-form';\nimport { getList, IList } from './components/get-list';\nimport TitleCompoent from './components/title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport * from './components/get-form';\nexport * from './components/get-item';\nexport * from './components/get-list';\n\ninterface ICheckoutGiftCardState {\n isFetchingGiftCard: boolean;\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n}\n\nenum SupportedGiftCardType {\n Internal = 'internal',\n External = 'external',\n Both = 'both'\n}\n\nexport interface ICheckoutGiftCardModuleProps extends ICheckoutGiftCardProps, IModuleStateProps {}\n\nexport interface IShowResource {\n title: React.ReactNode;\n list?: IList;\n}\n\nexport interface IAddResource {\n form: IForm;\n list?: IList;\n}\n\nexport interface ICheckoutGiftCardViewProps extends ICheckoutGiftCardProps<{}>, ICheckoutGiftCardState {\n className?: string;\n\n showGiftCard?: IShowResource;\n addGiftCard?: IAddResource;\n\n checkoutGiftCardProps: IModuleProps;\n couldPaidByGiftCard?: boolean;\n isEnabled?: boolean;\n checkoutErrorRef?: React.RefObject;\n onEdit?(): void;\n onCancel?(): void;\n onSubmit?(): void;\n enterGiftCardNumber?(giftCardNumber: string): void;\n enterGiftCardPin?(giftCardNumber: string): void;\n enterGiftCardExp?(giftCardNumber: string): void;\n removeGiftCard?(giftCardNumber: string): void;\n applyGiftCard?(): void;\n}\n\n/**\n *\n * CheckoutGiftCard component.\n * @extends {React.Component, ICheckoutGiftCardState>}\n */\n@observer\nexport class CheckoutGiftCard extends React.Component {\n public state: ICheckoutGiftCardState = {\n isFetchingGiftCard: false,\n errorMessage: '',\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: ''\n };\n\n private readonly inputRef: React.RefObject = React.createRef();\n\n private readonly inputPinRef: React.RefObject = React.createRef();\n\n private readonly inputExpRef: React.RefObject = React.createRef();\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get getCustomerAccountAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n return checkoutState && checkoutState.customerAccountAmount ? checkoutState.customerAccountAmount : 0;\n }\n\n @computed get getGiftCardTotalAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.giftCardExtends) {\n return 0;\n }\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\n const balance: number = giftCard.Balance || 0;\n return count + balance;\n }, 0);\n }\n\n @computed get disableAddGiftCard(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return true;\n }\n return (cart.TotalAmount || 0) - this.getLoyaltyAmount - this.getGiftCardTotalAmount <= 0;\n }\n\n @computed get shouldPayGiftCard(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use gift card card when loyalty points do not cover the total amount\n const amountDue = (cart.TotalAmount || 0) - this.getLoyaltyAmount - this.getCustomerAccountAmount;\n return amountDue > 0;\n }\n\n @computed get hasSelectedItem(): boolean {\n const {\n data: { checkout }\n } = this.props;\n const giftCards = checkout.result && checkout.result.giftCardExtends;\n return !!giftCards && giftCards.length > 0;\n }\n\n public componentDidMount(): void {\n when(\n () => this.isDataReady,\n () => {\n this.init();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutGiftCard && checkoutError.errorMessage) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutGiftCard) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutGiftCardModuleProps, nextState: ICheckoutGiftCardState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n moduleState: { isReady },\n data: { checkout },\n config: { className, showAdditionalFields },\n resources\n } = this.props;\n const { errorMessage, giftCardNumber, giftCardPin, giftCardExp } = this.state;\n const giftCards = checkout.result && checkout.result.giftCardExtends;\n const additionalFields = showAdditionalFields;\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!this.isEnabled() || (!this.shouldPayGiftCard && !isReady)) {\n this.props.context.telemetry.error('Checkout giftcard content is empty, module wont render');\n return null;\n }\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.GiftCard === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout gift card module wont render');\n return null;\n }\n\n const supportExternalGiftCard = supportedGiftCardType !== SupportedGiftCardType.Internal;\n\n const moduleClassName = classname('ms-checkout-gift-card', className, isReady ? 'show' : 'add');\n\n const viewProps: ICheckoutGiftCardViewProps = {\n ...this.props,\n ...this.state,\n className: moduleClassName,\n checkoutErrorRef: this.checkoutErrorRef,\n\n checkoutGiftCardProps: { moduleProps: this.props, className: moduleClassName },\n couldPaidByGiftCard: this.couldPaidByGiftCard(),\n isEnabled: this.isEnabled(),\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n enterGiftCardNumber: this.enterGiftCardNumber,\n enterGiftCardPin: this.enterGiftCardPin,\n enterGiftCardExp: this.enterGiftCardExp,\n removeGiftCard: this.removeGiftCard,\n applyGiftCard: this.applyGiftCard,\n showGiftCard: isReady\n ? {\n title: ,\n list: getList({\n canRemove: false,\n getFormattedPrice: this.getFormattedPrice,\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\n onRemoveGiftCard: this.removeGiftCard,\n resources\n })\n }\n : undefined,\n addGiftCard: !isReady\n ? {\n form: getForm({\n errorMessage,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n inputRef: this.inputRef,\n inputPinRef: this.inputPinRef,\n inputExpRef: this.inputExpRef,\n resources,\n onEnterGiftCardNumber: this.enterGiftCardNumber,\n onEnterGiftCardPin: this.enterGiftCardPin,\n onEnterGiftCardExp: this.enterGiftCardExp,\n onApplyGiftCard: this.applyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n disableAddGiftCard: this.disableAddGiftCard\n }),\n list: getList({\n canRemove: true,\n getFormattedPrice: this.getFormattedPrice,\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\n onRemoveGiftCard: this.removeGiftCard,\n resources\n })\n }\n : undefined\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly init = (): void => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n isRequired: false,\n ...(!this.isEnabled() && { status: 'disabled' })\n });\n\n const giftCards = this.props.data.checkout.result?.giftCardExtends;\n if (giftCards && giftCards.length > 0) {\n this.props.moduleState.onReady();\n } else if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly couldPaidByGiftCard = (): boolean => {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart?.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use gift card when it is not free\n return (cart.TotalAmount || 0) > 0;\n };\n\n private readonly isEnabled = (): boolean => {\n if (\n !this.props.context.request.user.isAuthenticated &&\n this.props.context.app.config.giftCardSupported !== SupportedGiftCardType.External &&\n !this.props.config.shouldBeEnabledForGuest\n ) {\n return false;\n }\n return this.couldPaidByGiftCard();\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section gift card onEdit is called.');\n\n // Show add gift card form\n this.props.moduleState.onUpdating();\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Payment section gift card onCancel is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly onSubmit = (): void => {\n this.props.telemetry.information('Payment section gift card onSubmit is called.');\n\n this.handleCancelOrSubmit();\n };\n\n private readonly handleCancelOrSubmit = () => {\n if (this.hasSelectedItem) {\n // Show summary screen\n this.props.moduleState.onReady();\n } else {\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly getFormattedPrice = (price: number = 0, currencyCode: string = 'USD'): string => {\n return this.props.context.cultureFormatter.formatCurrency(price, currencyCode);\n };\n\n private readonly enterGiftCardNumber = (giftCardNumber: string): void => {\n this.setState({\n giftCardNumber\n });\n this.clearError();\n };\n\n private readonly enterGiftCardPin = (giftCardPin: string): void => {\n this.setState({\n giftCardPin\n });\n this.clearError();\n };\n\n private readonly enterGiftCardExp = (giftCardExp: string): void => {\n this.setState({\n giftCardExp\n });\n this.clearError();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error('Error', errorMessage);\n this.props.telemetry.debug('Error', errorMessage);\n this.props.moduleState.setHasError(true);\n this.setState({\n errorMessage\n });\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n\n private readonly removeGiftCard = async (giftCardNumber: string): Promise => {\n this.props.telemetry.information('Payment section gift card remove is called.');\n\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState) {\n return;\n }\n\n await checkoutState.removeGiftCard({ giftCardNumber });\n };\n\n private readonly applyGiftCard = async (): Promise => {\n this.props.telemetry.information('Payment section gift card apply is called.');\n\n if (this.state.isFetchingGiftCard) {\n return;\n }\n this.setState({\n isFetchingGiftCard: true\n });\n\n const checkoutState = this.props.data.checkout.result;\n const giftCardNumber = this.state.giftCardNumber.trim();\n const giftCardPin = this.state.giftCardPin.trim();\n const giftCardExp = this.state.giftCardExp.trim();\n\n const giftCardTypes = await this.getGiftCardTypes(giftCardNumber);\n const giftCardType = giftCardTypes && giftCardTypes[0];\n const isPinRequired = giftCardType && giftCardType.IsPinRequired;\n const isExpRequired = giftCardType && giftCardType.IsExpirationDateRequired;\n const tenderTypeId = giftCardType && giftCardType.PaymentMethodId;\n const giftCard = await this.getGiftCard(giftCardNumber, giftCardPin, giftCardExp, isPinRequired, isExpRequired, tenderTypeId);\n\n if (checkoutState && giftCard) {\n await checkoutState.addGiftCard({\n giftCard,\n additionalProperties: { Pin: giftCardPin, ExpirationDate: giftCardExp, TenderTypeId: tenderTypeId }\n });\n this.clearError();\n this.setState({\n giftCardNumber: '',\n giftCardPin: '',\n giftCardExp: '',\n isFetchingGiftCard: false\n });\n return Promise.resolve();\n }\n const input = this.inputRef && this.inputRef.current && this.inputRef.current.focus && (this.inputRef.current as HTMLElement);\n input && input.focus();\n this.setState({\n isFetchingGiftCard: false\n });\n this.props.telemetry.information('Payment section fetching gift card is failed.');\n };\n\n private readonly findGiftcardTenderTypes = (\n tenderTypes: TenderType[],\n operationId: RetailOperation,\n giftcardType: string\n ): string[] | undefined => {\n let matchedTenderTypes: TenderType[] | undefined;\n\n switch (giftcardType) {\n case SupportedGiftCardType.Internal:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId === ''\n );\n break;\n case SupportedGiftCardType.External:\n matchedTenderTypes = tenderTypes.filter(\n tenderType => tenderType.OperationId === operationId && tenderType.ConnectorId !== ''\n );\n break;\n default:\n throw new Error('Invalid gift card type');\n }\n\n if (matchedTenderTypes) {\n return matchedTenderTypes.map(tenderType => tenderType.TenderTypeId || '');\n }\n return;\n };\n\n private readonly getGiftCard = async (\n giftCardNumber: string,\n giftCardPin: string,\n giftCardExp: string,\n isPinRequired: boolean | undefined,\n isExpRequired: boolean | undefined,\n tenderTypeId: string | undefined\n ): Promise => {\n const {\n resources: { noBalanceError, invalidCardInfoError, invalidCardTypeError, noCardPinError, noCardExpError }\n } = this.props;\n\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\n\n if (!tenderTypeId) {\n return undefined;\n }\n\n const tenderTypes = await getTenderTypesAsync({ callerContext: this.props.context.actionContext, queryResultSettings: {} }).catch(\n error => {\n throw error;\n }\n );\n\n if (!tenderTypes) {\n throw new Error('Fail to get gift card tender line');\n }\n const internalGiftcardTenderTypes = this.findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.Internal\n );\n const externalGiftcardTenderTypes = this.findGiftcardTenderTypes(\n tenderTypes,\n OPERATIONS.PayGiftCertificate,\n SupportedGiftCardType.External\n );\n\n switch (supportedGiftCardType) {\n case undefined:\n case SupportedGiftCardType.Internal:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.External:\n if (!externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n case SupportedGiftCardType.Both:\n if (!internalGiftcardTenderTypes?.includes(tenderTypeId) && !externalGiftcardTenderTypes?.includes(tenderTypeId)) {\n this.setError(invalidCardTypeError);\n return undefined;\n }\n break;\n default:\n throw new Error('Unsupported gift card type');\n }\n\n if (isPinRequired && giftCardPin === '') {\n this.setError(noCardPinError);\n return undefined;\n }\n\n if (isExpRequired && giftCardExp === '') {\n this.setError(noCardExpError);\n return undefined;\n }\n\n const month = Number.parseInt(giftCardExp.split('/')[0], 10);\n const year = Number.parseInt(giftCardExp.split('/')[1], 10);\n\n return getGiftCardAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, tenderTypeId, giftCardPin, month, year)\n .then(activeGiftCard => {\n if (!activeGiftCard.Balance || activeGiftCard.Balance === 0) {\n this.setError(noBalanceError);\n return;\n }\n return activeGiftCard;\n })\n .catch(error => {\n this.setError(invalidCardInfoError);\n return undefined;\n });\n };\n\n private readonly getGiftCardTypes = async (giftCardNumber: string): Promise => {\n const {\n resources: { emptyInputError, duplicatedCodeError, invalidCodeError },\n data: { checkout }\n } = this.props;\n\n if (!giftCardNumber) {\n this.setError(emptyInputError);\n return undefined;\n }\n\n const isDuplicated = checkout.result && checkout.result.giftCardExtends.some((card: GiftCard) => card.Id === giftCardNumber);\n if (isDuplicated) {\n this.setError(duplicatedCodeError);\n return undefined;\n }\n\n return resolveCardTypesAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, CardType.GiftCard)\n .then(giftCardTypes => {\n if (!giftCardTypes || giftCardTypes.length === 0 || giftCardTypes[0] === undefined) {\n this.setError(invalidCodeError);\n return;\n }\n return giftCardTypes;\n })\n .catch(error => {\n this.setError(invalidCodeError);\n return undefined;\n });\n };\n}\n\nexport default withModuleState(CheckoutGiftCard);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddResource, ICheckoutGiftCardViewProps, IForm, IItem, IList, IShowResource } from './checkout-gift-card';\n\nexport const From: React.FC = ({\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n}) => (\n \n {alert}\n {supportExternalGiftCard ? (\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput && (\n \n {inputPinLabel}\n {inputPin}\n \n )}\n {showGiftCardExpInput && (\n \n {inputExpLabel}\n {inputExp}\n \n )}\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n ) : (\n <>\n {label}\n {inputNumber}\n \n )}\n {applyButton}\n \n);\n\nexport const SelectedGiftCard: React.FC = ({ itemProps, selectedGiftCard, removeButton }) => (\n \n {selectedGiftCard}\n {removeButton}\n \n);\n\nexport const GiftCardList: React.FC = ({ listProps, list }) => (\n \n {list.map(({ id, ...item }) => (\n \n ))}\n \n);\n\nexport const AddResource: React.FC = ({ form, list }) => (\n <>\n {form && }\n {list && }\n \n);\n\nexport const ShowResource: React.FC = ({ title, list }) => (\n <>\n {title}\n {list && }\n \n);\n\nconst CheckoutGiftCardView: React.FC = props => {\n const { checkoutGiftCardProps, checkoutErrorRef, showGiftCard, addGiftCard } = props;\n return (\n \n {showGiftCard && }\n {addGiftCard && }\n \n );\n};\n\nexport default CheckoutGiftCardView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { showAdditionalFields } from '../checkout-gift-card.props.autogenerated';\n\nexport interface IGetFormInput {\n errorMessage: string;\n giftCardNumber: string;\n giftCardPin: string;\n giftCardExp: string;\n inputRef?: React.RefObject;\n inputPinRef?: React.RefObject;\n inputExpRef?: React.RefObject;\n supportExternalGiftCard?: boolean;\n additionalFields?: showAdditionalFields;\n disableAddGiftCard?: boolean;\n resources: {\n applyGiftCardButton: string;\n giftCardFormLabel: string;\n giftCardNumberLabel: string;\n giftCardPinLabel: string;\n giftCardExpLabel: string;\n giftCardAlertLabel: string;\n giftCardPinPlaceholderText: string;\n giftCardExpPlaceholderText: string;\n };\n onEnterGiftCardNumber(giftCardNumber: string): void;\n onEnterGiftCardPin(giftCardPin: string): void;\n onEnterGiftCardExp(giftCardExp: string): void;\n onApplyGiftCard(): Promise;\n}\n\nexport interface IForm {\n formProps: INodeProps;\n label: React.ReactNode;\n inputPinLabel: React.ReactNode;\n inputExpLabel: React.ReactNode;\n alert: React.ReactNode;\n inputProps: INodeProps;\n inputNumProps: INodeProps;\n inputPinProps: INodeProps;\n inputExpProps: INodeProps;\n inputNumber: React.ReactNode;\n inputPin: React.ReactNode;\n inputExp: React.ReactNode;\n applyButton: React.ReactNode;\n supportExternalGiftCard: boolean | undefined;\n showGiftCardPinInput: boolean | undefined;\n showGiftCardExpInput: boolean | undefined;\n alertFieldLabel: React.ReactNode;\n}\n\n/**\n * On Apply Function.\n * @param onApplyGiftCard -On Apply Gift Card Function.\n * @returns Call of Apply Gift Card Function.\n */\nconst onApplyHandler = (onApplyGiftCard: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onApplyGiftCard();\n};\n\n/**\n * On change number Function.\n * @param onEnterGiftCardNumber -On enter gift card number Function.\n * @returns Call of on enter gift card number Function.\n */\nconst onChangeNumberHandler = (onEnterGiftCardNumber: (giftCardNumber: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardNumber(value);\n};\n\n/**\n * On Change pin event.\n * @param onEnterGiftCardPin -On enter gift card pin Function.\n * @returns Call of on enter gift card pin Function.\n */\nconst onChangePinHandler = (onEnterGiftCardPin: (giftCardPin: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardPin(value);\n};\n\n/**\n * On Change Event.\n * @param onEnterGiftCardExp -On enter gift card function.\n * @returns Call of On enter gift card function.\n */\n// Need to filter out the month and year\nconst onChangeExpHandler = (onEnterGiftCardExp: (giftCardExp: string) => void) => (event: React.ChangeEvent) => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n onEnterGiftCardExp(value);\n};\n\nexport const getForm = (options: IGetFormInput): IForm => {\n const {\n errorMessage,\n inputRef,\n inputPinRef,\n inputExpRef,\n giftCardNumber,\n giftCardPin,\n giftCardExp,\n onEnterGiftCardNumber,\n onEnterGiftCardPin,\n onEnterGiftCardExp,\n onApplyGiftCard,\n supportExternalGiftCard,\n additionalFields,\n disableAddGiftCard,\n resources: {\n applyGiftCardButton,\n giftCardFormLabel,\n giftCardNumberLabel,\n giftCardPinLabel,\n giftCardExpLabel,\n giftCardAlertLabel,\n giftCardPinPlaceholderText,\n giftCardExpPlaceholderText\n }\n } = options;\n\n const formProps = {\n className: classnames('ms-checkout-gift-card__form', { 'is-invalid': !!errorMessage }),\n onSubmit: onApplyHandler(onApplyGiftCard),\n tag: 'form' as NodeTag\n };\n\n const label = (\n \n );\n\n const inputPinLabel = (\n \n );\n\n const inputExpLabel = (\n \n );\n\n const alertFieldLabel = (\n \n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const inputProps = {\n className: 'ms-checkout-gift-card__input-fields'\n };\n\n const inputNumProps = {\n className: 'ms-checkout-gift-card__input-num-fields'\n };\n\n const inputPinProps = {\n className: 'ms-checkout-gift-card__input-pin-fields'\n };\n\n const inputExpProps = {\n className: 'ms-checkout-gift-card__input-exp-fields'\n };\n\n const inputNumber = (\n \n );\n\n const inputPin = (\n \n );\n\n const inputExp = (\n \n );\n\n const applyButton = (\n \n {applyGiftCardButton}\n \n );\n\n let showGiftCardPinInput = false;\n let showGiftCardExpInput = false;\n\n switch (additionalFields) {\n case showAdditionalFields.pin:\n showGiftCardPinInput = true;\n break;\n case showAdditionalFields.expirationDate:\n showGiftCardExpInput = true;\n break;\n case showAdditionalFields.pinAndExpirationDate:\n showGiftCardPinInput = true;\n showGiftCardExpInput = true;\n break;\n default:\n }\n\n return {\n formProps,\n label,\n inputPinLabel,\n inputExpLabel,\n alert,\n inputProps,\n inputNumProps,\n inputPinProps,\n inputExpProps,\n inputNumber,\n inputPin,\n inputExp,\n applyButton,\n supportExternalGiftCard,\n showGiftCardPinInput,\n showGiftCardExpInput,\n alertFieldLabel\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IGetItemInput {\n giftCard: IGiftCardExtend;\n canRemove: boolean;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n removeGiftCardButton: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n onRemoveGiftCard(giftCardNumber: string): void;\n}\n\nexport interface IItem {\n itemProps: INodeProps;\n id?: string;\n selectedGiftCard: React.ReactNode;\n removeButton?: React.ReactNode;\n}\n\n/**\n * On remove function.\n * @param onRemoveGiftCard -Gift card number function.\n * @param giftCard -Gift card values.\n * @returns Call of onRemoveGiftCard function.\n */\nconst onRemoveHandler = (onRemoveGiftCard: (giftCardNumber: string) => void, giftCard: IGiftCardExtend) => (): void => {\n onRemoveGiftCard(giftCard.Id ?? '');\n};\n\n/**\n * GiftCardItem component.\n * @param root0\n * @param root0.giftCard\n * @param root0.getFormattedPrice\n * @param root0.canRemove\n * @param root0.onRemoveGiftCard\n * @param root0.resources\n * @param root0.resources.enteredGiftCardLabel\n * @param root0.resources.giftCardAvailableBalanceLabel\n * @param root0.resources.removeGiftCardButton\n * @extends {React.PureComponent}\n */\nexport const getItem = ({\n giftCard,\n getFormattedPrice,\n canRemove,\n onRemoveGiftCard,\n resources: { enteredGiftCardLabel, giftCardAvailableBalanceLabel, removeGiftCardButton }\n}: IGetItemInput): IItem => {\n const balance = getFormattedPrice(giftCard.Balance, giftCard.CardCurrencyCode);\n const giftCardLast4Digit = (giftCard.Id || '').substr(-4);\n\n const itemProps = {\n className: 'ms-checkout-gift-card__item'\n };\n\n const selectedGiftCard = (\n \n {enteredGiftCardLabel}\n {` `}\n {giftCardLast4Digit}\n {' ('}\n {giftCardAvailableBalanceLabel}\n {` `}\n {balance}\n {')'}\n \n );\n\n const removeButton = canRemove && (\n \n );\n\n return {\n itemProps,\n id: giftCard.Id,\n selectedGiftCard,\n removeButton\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\n\nimport { getItem, IItem } from './get-item';\n\ninterface IGetListInput {\n giftCards?: IGiftCardExtend[];\n canRemove: boolean;\n resources: {\n enteredGiftCardLabel: string;\n giftCardAvailableBalanceLabel: string;\n removeGiftCardButton: string;\n };\n getFormattedPrice(price?: number, currencyCode?: string): string;\n onRemoveGiftCard(giftCardNumber: string): void;\n}\n\nexport interface IList {\n listProps: INodeProps;\n list: IItem[];\n}\n\nexport const getList = ({ giftCards, canRemove, resources, getFormattedPrice, onRemoveGiftCard }: IGetListInput): IList | undefined => {\n if (!giftCards || giftCards.length === 0) {\n return undefined;\n }\n\n const listProps = {\n className: 'ms-checkout-gift-card__list'\n };\n\n const list = giftCards.map(giftCard =>\n getItem({\n canRemove,\n getFormattedPrice,\n giftCard,\n onRemoveGiftCard,\n resources\n })\n );\n\n return {\n listProps,\n list\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IGiftCardTitleProps {\n title: string;\n}\n\nconst GiftCardTitle: React.FC = ({ title }) => ;\n\nexport default GiftCardTitle;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { callActionOrExecute } from '@msdyn365-commerce/retail-proxy';\nimport { createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport { LoyaltyPointRedemptionEstimate, LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { GetLoyaltyTransactionEstimationInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Drawer, Heading, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutLoyaltyData } from './checkout-loyalty.data';\nimport { ICheckoutLoyaltyProps } from './checkout-loyalty.props.autogenerated';\nimport InputComponent from './components/checkout-loyalty-input';\nimport LabelComponent from './components/checkout-loyalty-label';\nimport TextComponent from './components/checkout-loyalty-text';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutLoyaltyState {\n dollarsApplied: number;\n isFetchingLoyaltyCard: boolean;\n errorMessage?: string;\n}\n\nexport interface ICheckoutLoyaltyModuleProps extends ICheckoutLoyaltyProps, IModuleStateProps {}\n\nexport interface ICheckoutLoyaltyViewState {\n isShowLoyalty: boolean;\n isShowAddLoyalty: boolean;\n}\n\nexport interface ICheckoutLoyaltyShow {\n heading: React.ReactNode;\n coveredAmountText: React.ReactNode;\n amount: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyRewardPoint {\n checkoutLoyaltyRewardPoint: INodeProps;\n key: string;\n title: React.ReactNode;\n availablePointsText: React.ReactNode;\n activePoints: React.ReactNode;\n expiringPointsText: React.ReactNode;\n expiringPoints: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyAdd {\n heading: React.ReactNode;\n cardNumber: React.ReactNode;\n drawer: INodeProps;\n rewardPoints: ICheckoutLoyaltyRewardPoint[];\n loyaltyAmountContainer: INodeProps;\n appliedLoyaltyAmountContainer: INodeProps;\n loyaltyAmountLabel: React.ReactNode;\n loyaltyAmountInput: React.ReactNode;\n loyaltyAmountApplyButton: React.ReactNode;\n showAppliedAmount: boolean;\n loyaltyAmountAppliedText: React.ReactNode;\n loyaltyAmountAppliedPrice: React.ReactNode;\n loyaltyAmountRemoveButton: React.ReactNode;\n}\n\nexport interface ICheckoutLoyaltyViewProps extends ICheckoutLoyaltyModuleProps {\n checkoutLoyalty: IModuleProps;\n viewState: ICheckoutLoyaltyViewState;\n showLoyalty: ICheckoutLoyaltyShow;\n addLoyalty: ICheckoutLoyaltyAdd;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutLoyalty component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n\n@withModuleState\n@observer\nclass CheckoutLoyalty extends React.Component {\n private readonly _dialogToggleRef: React.RefObject | undefined;\n\n private readonly moduleClassName: string = 'ms-checkout-loyalty';\n\n private readonly _defaultLoyaltyPoints: number = 0;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n constructor(props: ICheckoutLoyaltyModuleProps) {\n super(props);\n this._dialogToggleRef = React.createRef();\n this._applyLoyaltyPoints = this._applyLoyaltyPoints.bind(this);\n this._removeLoyaltyPoints = this._removeLoyaltyPoints.bind(this);\n this._onInputChange = this._onInputChange.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this.state = { dollarsApplied: this.maxDollars, isFetchingLoyaltyCard: false };\n }\n\n @computed get shouldPayLoyalty(): boolean {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return false;\n }\n\n // Use loyalty when cart is not full of free items\n const amountDue = cart.TotalAmount || 0;\n return amountDue > 0;\n }\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.loyaltyCard && this.props.data.loyaltyCard.status) !== 'LOADING' &&\n (this.props.data.loyaltyTransactionEstimation && this.props.data.loyaltyTransactionEstimation.status) !== 'LOADING'\n );\n }\n\n @computed get maxDollars(): number {\n return this.props.data.loyaltyTransactionEstimation.result &&\n this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n ? this.props.data.loyaltyTransactionEstimation.result.MaxCurrencyValueOfLoyaltyPoints\n : 0;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart,\n async () => {\n this._updateEstimate();\n }\n );\n\n reaction(\n () => this.props.data.loyaltyCard.result,\n async () => {\n this._updateLoyalty();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutLoyalty && checkoutError.errorMessage) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutLoyalty) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutLoyaltyModuleProps, nextState: ICheckoutLoyaltyState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n resources,\n renderView,\n moduleState: { hasError, isReady }\n } = this.props;\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.Loyalty === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout loyalty module wont render');\n return null;\n }\n\n if (\n this.props.data.loyaltyCard &&\n this.props.data.loyaltyCard.result &&\n this.props.data.loyaltyCard.result.CardNumber &&\n this.shouldPayLoyalty\n ) {\n const loyaltyCard = this.props.data.loyaltyCard.result;\n const checkoutState = this.props.data.checkout.result;\n let isShowLoyalty = false;\n const errorMessage = this.state.errorMessage;\n\n if (isReady) {\n if (!checkoutState || checkoutState.loyaltyAmount === 0) {\n return null;\n }\n isShowLoyalty = true;\n }\n const channelConfig = this.props.context.request.channel;\n const viewProps = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isShowLoyalty,\n isShowAddLoyalty: !isReady\n },\n alert: hasError && errorMessage && ,\n checkoutLoyalty: {\n moduleProps: this.props,\n className: classnames(\n this.moduleClassName,\n { [`${this.moduleClassName}__applied`]: isShowLoyalty },\n this.props.config.className\n )\n },\n showLoyalty: {\n heading: ,\n coveredAmountText: (\n \n ),\n amount: (\n \n )\n },\n addLoyalty: {\n heading: ,\n drawer: {\n tag: Drawer,\n className: `${this.moduleClassName}__drawer`,\n toggleButtonText: this._drawerHeader(),\n openGlyph: `${this.moduleClassName}__drawer-open`,\n closeGlyph: `${this.moduleClassName}__drawer-close`,\n glyphPlacement: 'end'\n },\n cardNumber: ,\n rewardPoints:\n loyaltyCard.RewardPoints &&\n loyaltyCard.RewardPoints.map((points, index) => {\n return this._renderPointSection(points, resources.availablePointsLabel, resources.expiringLoyaltyPointsLabel);\n }),\n loyaltyAmountContainer: {\n className: `${this.moduleClassName}__amount`\n },\n appliedLoyaltyAmountContainer: {\n className: `${this.moduleClassName}__applied-amount`\n },\n loyaltyAmountLabel: (\n \n ),\n loyaltyAmountInput: (\n \n ),\n loyaltyAmountApplyButton: (\n this.maxDollars ||\n this.state.dollarsApplied <= 0 ||\n isNaN(this.state.dollarsApplied) ||\n this.state.isFetchingLoyaltyCard\n }\n >\n {this.props.resources.applyCheckoutLoyaltyPaymentText}\n \n ),\n showAppliedAmount: checkoutState && checkoutState.loyaltyAmount > 0,\n loyaltyAmountAppliedText: (\n \n ),\n loyaltyAmountAppliedPrice: (\n \n ),\n loyaltyAmountRemoveButton: (\n \n {this.props.resources.removeCheckoutLoyaltyPaymentText}\n \n )\n }\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n this.props.context.telemetry.error('Checkout loyalty content is empty, module wont render');\n return null;\n }\n\n private _drawerHeader(): JSX.Element {\n 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 { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './checkout';\nimport { IEmailDelivery } from './components';\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\n\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\n\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {pickUpAtStore && }\n {emailDelivery && }\n \n);\n\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\n \n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\n LineItemDeliveryGroup,\n LineItemList,\n heading,\n lineItems,\n lineItemWraper,\n lineItemWraperIcon\n}) => (\n \n {lineItemWraperIcon}\n {lineItemWraper}\n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {emailDelivery && }\n \n);\n\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const LineItemsComponent: React.FC = ({\n LineItems,\n Header,\n heading,\n editLink,\n itemsForPickup,\n itemsForShip,\n itemsForEmail,\n itemsGroupWithMulitplePickupMode\n}) => (\n \n \n {heading}\n {editLink}\n \n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\n {itemsGroupWithMulitplePickupMode !== undefined\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\n return ;\n })\n : null}\n \n);\n\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.subtotal}\n {lines.shipping}\n {lines.otherCharge}\n {lines.tax}\n {lines.totalDiscounts}\n {lines.loyalty}\n {lines.customerAccount}\n {lines.giftCard}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.invoices}\n {lines.giftCard}\n {lines.loyalty}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst CheckoutView: React.FC = props => {\n const {\n isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n canShow,\n checkoutProps,\n headerProps,\n hasSalesOrder,\n hasInvoiceLine,\n bodyProps,\n mainProps,\n mainControlProps,\n sideProps,\n sideControlFirstProps,\n sideControlSecondProps,\n termsAndConditionsProps,\n orderConfirmation,\n loading,\n alert,\n title,\n guidedForm,\n orderSummary,\n invoicePaymentSummary,\n lineItems,\n placeOrderButton,\n termsAndConditions,\n keepShoppingButton,\n checkoutExpressPaymentContainer,\n checkoutErrorRef\n } = props;\n\n return (\n \n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\n \n )}\n {!hasSalesOrder && (\n \n {loading}\n {alert}\n {canShow && (\n <>\n \n {checkoutExpressPaymentContainer}\n {checkoutExpressPaymentContainer && {title}}\n {guidedForm}\n {termsAndConditions}\n \n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n {!hasInvoiceLine\n ? orderSummary && \n : invoicePaymentSummary && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n {lineItems && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n )}\n \n )}\n {hasSalesOrder && orderConfirmation}\n \n );\n};\n\nexport default CheckoutView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAlertProps {\n message: string;\n}\n\nconst CheckoutAlert: React.FC = ({ message }) => (\n

\n {message}\n

\n);\n\nexport default CheckoutAlert;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 * The Checkout view props.\n * @extends ICheckoutProps\n */\nexport interface ICheckoutViewProps extends ICheckoutProps {\n className: string;\n canShow?: boolean;\n isEmptyCart?: boolean;\n isConsentGiven?: boolean;\n hasError?: boolean;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n cartStatus?: string;\n isMobile?: boolean;\n isEditorialMode?: boolean;\n backToShoppingUrl?: string;\n editCartLink?: string;\n hasSalesOrder: boolean;\n hasInvoiceLine?: boolean;\n\n checkoutProps: IModuleProps;\n headerProps: INodeProps;\n bodyProps: INodeProps;\n mainProps: INodeProps;\n mainControlProps: INodeProps;\n sideProps: INodeProps;\n sideControlFirstProps: INodeProps;\n sideControlSecondProps: INodeProps;\n termsAndConditionsProps: INodeProps;\n\n guidedForm?: React.ReactNode;\n title?: React.ReactNode;\n loading?: React.ReactNode;\n alert?: React.ReactNode;\n orderSummary?: IOrderSummary;\n invoicePaymentSummary?: IInvoicePaymentSummary;\n lineItems?: ILineItems;\n placeOrderButton?: React.ReactNode;\n termsAndConditions?: React.ReactNode;\n keepShoppingButton?: React.ReactNode;\n orderConfirmation?: React.ReactNode;\n\n checkoutExpressPaymentContainer?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n * The checkout module props interface.\n */\nexport interface ICheckoutModuleProps extends ICheckoutProps, IModuleStateProps {}\n\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\n\n/**\n *\n * CheckoutContainer component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass Checkout extends React.PureComponent {\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\n return this.props.data.checkout?.status;\n }\n\n @computed get isEmptyCart(): boolean {\n if (this.isEditorialMode) {\n // Editorial mode: Ignore empty cart\n return false;\n }\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\n }\n\n @computed get hasError(): boolean {\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\n }\n\n @computed get isEditorialMode(): boolean {\n return this.props.context.request.params.isEditor;\n }\n\n @computed get canPlaceOrder(): boolean {\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\n\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\n\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\n return (\n this.props.moduleState.isReady &&\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\n (this.state.errorMessage === '' ||\n shouldEnableSinglePaymentAuthorizationCheckout ||\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\n );\n }\n\n @computed get isPaidOffByCustomerAccount(): boolean {\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\n\n return customerAccountAmount === amountDue;\n }\n\n @computed get isCartReady(): boolean {\n return (\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\n this.props.data.customerInformation.status !== 'LOADING' &&\n this.props.data.featureState.status !== 'LOADING'\n );\n }\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n const properties =\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\n property => property.Key === 'expressPaymentDetails'\n )?.Value?.StringValue ?? '';\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n public state: ICheckoutState = {\n errorMessage: '',\n isValidationPassed: false,\n isPlaceOrderLoading: false,\n isPlaceOrderClicked: false\n };\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public componentDidMount(): void {\n const {\n resources: { genericErrorMessage }\n } = this.props;\n\n when(\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\n async () => {\n if (this.expressPaymentDetailsFromCartPage) {\n const {\n email,\n tenderLine,\n tokenizedPaymentCard,\n paymentTenderType: paymentTenderTypeFromCartPage,\n isExpressCheckoutAppliedInCartPage,\n isExpressAddressAppliedInCartPage,\n cardPaymentAcceptResult,\n address\n } = this.expressPaymentDetailsFromCartPage;\n\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\n newEmailAddressFromExpressCheckout: email ?? '',\n newTenderLine: tenderLine,\n newTokenizedPaymentCard: tokenizedPaymentCard,\n newPaymentTenderType: paymentTenderTypeFromCartPage,\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\n newCardPaymentAcceptResult: cardPaymentAcceptResult\n });\n\n if (isExpressAddressAppliedInCartPage && address) {\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\n newBillingAddressFromExpressCheckout: address\n });\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\n newShippingAddressFromExpressCheckout: address\n });\n } else {\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\n }\n\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\n newExtensionProperties: [\n {\n Key: 'expressPaymentDetails',\n Value: { StringValue: '' }\n }\n ]\n });\n }\n }\n );\n\n when(\n () => this.hasError,\n () => {\n this.setState({\n errorMessage: genericErrorMessage\n });\n this.props.context.telemetry.error('Failed to get cart');\n }\n );\n\n when(\n () => {\n return this.isEmptyCart;\n },\n () => {\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\n }\n );\n\n when(\n () => this.isCartReady,\n () => {\n this.validateForCheckout();\n }\n );\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\n async isReady => {\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isReady &&\n !this.props.data.checkout.result?.redirectAdditionalContext &&\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\n ) {\n if (!this.state.isPlaceOrderLoading) {\n this.setState({ isPlaceOrderLoading: true });\n }\n\n this.props.telemetry.information(\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\n );\n\n await this.onPlaceOrder();\n\n // If 3D authentication redirection, don't update isPlaceOrderLoading\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\n this.setState({ isPlaceOrderLoading: false });\n }\n }\n }\n );\n\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isBillingAddressHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n // Reaction to enable place order button when redirection is true for new checkout flow.\n reaction(\n () => this.canPlaceOrder,\n async () => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\n newIsPlaceOrderEnabledInRedirection: true\n });\n\n this.props.telemetry.information(\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\n );\n this.props.telemetry.information(\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\n this.canPlaceOrder\n }.`\n );\n }\n } else {\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\n }\n }\n );\n\n // Reaction to update the error message when there is a checkout error.\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n const checkoutErrorLocation: boolean = checkoutError?.errorLocation === ErrorLocation.Checkout;\n // If there is an Error in CheckoutPaymentInstrument module, checkout error location will be updated.\n const checkoutPaymentErrorLocation: boolean =\n checkoutError?.errorCode === ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment\n ? checkoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument\n : checkoutErrorLocation;\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n checkoutError &&\n checkoutError.errorMessage &&\n (checkoutErrorLocation ? checkoutErrorLocation : checkoutPaymentErrorLocation)\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n this.props.data.checkout.result?.shouldFocusOnCheckoutError &&\n this.state.errorMessage\n ) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n\n // eslint-disable-next-line complexity -- ignore the complexity.\n public render(): JSX.Element {\n const {\n moduleState,\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\n resources,\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const { errorMessage } = this.state;\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\n const checkoutClass = classnames('ms-checkout', className);\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\n\n // @ts-expect-error - check the key of slot\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\n\n // @ts-expect-error - check the key of slot\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\n\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n const isMobile =\n this.props.context.request &&\n this.props.context.request.device &&\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\n\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n\n const termsAndConditions =\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\n\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldEnableCheckoutErrorDisplayMessaging =\n this.props.data.checkout?.result?.shouldEnableCheckoutErrorDisplayMessaging ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldFocusOnCheckoutError = this.props.data.checkout?.result?.shouldFocusOnCheckoutError;\n\n let hasExpressPaymentContainer = false;\n\n if (\n typeof window !== 'undefined' &&\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\n ) {\n hasExpressPaymentContainer = true;\n }\n\n let viewProps: ICheckoutViewProps = {\n ...this.props,\n className: checkoutClass,\n checkoutErrorRef: this.checkoutErrorRef,\n isEmptyCart: this.isEmptyCart,\n isConsentGiven,\n hasError: this.hasError,\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n hasSalesOrder:\n this.props.data.checkout &&\n this.props.data.checkout.result !== undefined &&\n this.props.data.checkout.result.salesOrder !== undefined,\n hasInvoiceLine,\n cartStatus: this.cartStatus,\n isMobile,\n backToShoppingUrl,\n editCartLink,\n isEditorialMode: this.isEditorialMode,\n orderConfirmation:\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\n ? this.props.slots.orderConfirmation[0]\n : undefined,\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\n headerProps: { className: 'ms-checkout__head' },\n bodyProps: { className: 'ms-checkout__body' },\n mainProps: { className: 'ms-checkout__main' },\n mainControlProps: { className: 'ms-checkout__main-control' },\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\n checkoutExpressPaymentContainer\n };\n\n if (!isConsentGiven && isAuthenticated) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else if (this.isLoading()) {\n viewProps = {\n ...viewProps,\n loading: \n };\n } else if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else {\n viewProps = {\n ...viewProps,\n alert: errorMessage && ,\n canShow: true,\n guidedForm: checkoutInformation ? (\n \n ) : (\n undefined\n ),\n orderSummary: getOrderSummary(this.props),\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\n placeOrderButton: (\n \n ),\n termsAndConditions,\n keepShoppingButton: backToShoppingUrl && (\n \n {backToShopping}\n \n )\n };\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\n if (isLoading) {\n return AsyncResultStatusCode.LOADING;\n }\n\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\n if (isSuccess) {\n return AsyncResultStatusCode.SUCCESS;\n }\n\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\n if (isFailed) {\n return AsyncResultStatusCode.FAILED;\n }\n\n return undefined;\n }\n\n /**\n * Renders heading.\n * @param checkoutHeading - The checkout heading.\n * @returns React node.\n */\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutHeading!.text = event.target.value);\n\n /**\n * Checks if cart is loading.\n * @returns True if is loading, false otherwise.\n */\n private readonly isLoading = (): boolean => {\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\n };\n\n /**\n * Get slot items.\n * @param key - The slot key.\n * @returns React node or undefined.\n */\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\n const { slots } = this.props;\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\n };\n\n /**\n * Trigger the payment section container submit when placing order.\n */\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\n this.setState({ isPlaceOrderLoading: true });\n\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\n });\n };\n\n /**\n * On place order.\n * @returns Void promise.\n */\n private readonly onPlaceOrder = async (): Promise => {\n const {\n resources: { checkoutOutOfStockErrorMessage },\n context: {\n actionContext,\n app: {\n config: { enableStockCheck = false }\n }\n },\n slots: { orderConfirmation },\n data: { checkout, products }\n } = this.props;\n\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\n this.setState({ isPlaceOrderClicked: true });\n\n // If hasInvoiceLine is true, no inventory check\n if (\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\n enableStockCheck &&\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\n ) {\n this.setState({\n errorMessage: checkoutOutOfStockErrorMessage\n });\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\n } else {\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\n\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\n\n await placeOrder(\n actionContext,\n this.props.data.checkout.result,\n this.props.data.products.result,\n !hasOrderConfirmation,\n updatedCartVersion,\n this.props.data.checkout.result?.isPaymentVerificationRedirection\n ).catch(error => {\n this.handleCheckoutError(error);\n });\n\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\n }\n };\n\n /**\n * Update receipt email address for electronic cart line.\n * @param newGuestCheckoutEmail - The guest checkout email.\n * @returns The updated cart version.\n */\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\n );\n\n let updatedCartVersion: number | undefined;\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\n return {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: emailDeliveryModeCode,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\n }\n };\n });\n\n await updateLineDeliverySpecificationsAsync(\n { callerContext: this.props.context.actionContext },\n (await this.props.data.checkout).checkoutCart.cart.Id,\n lineDeliverySpecifications\n )\n .then(updatedCart => {\n updatedCartVersion = updatedCart.Version;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\n });\n }\n\n return updatedCartVersion;\n };\n\n /**\n * Return true if any product in the cart is over its max quantity.\n * @param cart -- The checkout cart.\n * @param products -- The checkout products.\n * @returns - Is any product in the cart is over max quantity.\n */\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\n let isOverMaxQuantity = false;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n await getAvailabilitiesForCartLineItems(\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\n this.props.context.actionContext\n )\n .then(productInventoryInformation => {\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\n\n cart.CartLines?.map(cartline => {\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\n\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\n const isEmailDelivery =\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n if (foundProductAvailability) {\n productsThatShouldValidateInventory.push(foundProductAvailability);\n }\n }\n });\n\n const cartLinesInventoryValidation = validateCartLinesInventory(\n cart.CartLines ?? [],\n productsThatShouldValidateInventory,\n this.props.context.actionContext,\n products,\n emailDeliveryModeCode\n );\n\n // If is invalid then exceeds the available quantity\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\n return isOverMaxQuantity;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\n });\n\n return isOverMaxQuantity;\n };\n\n /**\n * Gets active child in module state.\n * @returns - The module state manager collection.\n */\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n /**\n * On container ready.\n */\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Checkout onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n\n /**\n * Redirects to cart page.\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\n */\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n if (window && editCartLink) {\n window.location.assign(editCartLink);\n } else {\n this.setState({\n errorMessage: this.props.resources.genericErrorMessage\n });\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\n }\n };\n\n /**\n * Validates for checkout.\n * @param retry - Retry flag.\n */\n private readonly validateForCheckout = (retry: boolean = true): void => {\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\n const { Id, Version } = cart;\n const isOrderQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\n )?.IsEnabled || false;\n const isEcommerceQuantityLimitsFeatureEnabledInHq =\n this.props.data.featureState.result?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n const isB2BSite = isChannelTypeB2B(this.props.context.actionContext.requestContext);\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && isB2BSite) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !isB2BSite)));\n if (\n (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) ||\n isEcommerceQuantityLimitsFeatureEnabledInHq\n ) {\n if (Version && Id) {\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\n .then((result: CartLineValidationResults) => {\n if (result.ValidationFailuresByCartLines?.length !== 0) {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n } else {\n this.setState({ isValidationPassed: true });\n }\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n const cartState = this.props.data.checkout.result?.checkoutCart;\n cartState\n ?.refreshCart({})\n .then(() => {\n this.validateForCheckout(false);\n })\n .catch((refreshError: Error) => {\n this.props.telemetry.warning(refreshError.message);\n this.props.telemetry.debug('Unable to refresh Cart');\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n } else {\n this.setState({ isValidationPassed: true });\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n /**\n * Save the address as Shipping and Billing address.\n * @param tokenizedPaymentCard - Tokenized payment card.\n */\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\n\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\n }\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const address: Address = {\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone\n };\n\n return address;\n };\n\n /**\n * Handle checkout errors.\n * @param error -- The error on checkout api failure.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly handleCheckoutError = (error: any) => {\n const {\n resources: {\n genericErrorMessage,\n invalidCartVersionErrorMessage,\n missingRequiredCartTenderLinesErrorMessage,\n timeoutErrorMessage\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 = timeoutErrorMessage;\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n this.setState({ isPlaceOrderLoading: false });\n return;\n }\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\n const errorCode = error && error.name ? error.name : '';\n // apiError message will be used if errorcode resource/enums is unavailable\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext, apiError);\n } else {\n let errorMessage = genericErrorMessage;\n this.setState({ isPlaceOrderClicked: false });\n\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n errorMessage = invalidCartVersionErrorMessage;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_ExclusiveCouponCannotBeAppliedWithOtherCoupons') {\n // If api error is not available show generic message\n errorMessage = apiError || genericErrorMessage;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n error.data?.AdditionalContext &&\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\n ) {\n return;\n }\n\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n }\n };\n}\n\nexport default Checkout;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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"],"names":["CheckoutDeliveryOptions","React","constructor","props","super","selectedItemId","deliveryOptions","isLoading","retailMultiplePickUpOptionEnabled","checkoutErrorRef","init","async","this","moduleState","onEdit","isSelectDefaultOptionEnabled","undefined","onCancel","onSubmit","status","config","useDefaultDeliveryOption","canShip","cartDeliveryMode","getSavedDeliveryOption","loadDeliveryOptions","_this$props$data$chec","data","checkout","result","checkoutCart","hasInvoiceLine","getCartLinesForShipping","length","isDeliveryModeExists","deliveryMode","find","deliveryOption","Code","getDeliveryOptionSelected","selectedItem","context","telemetry","error","id","typeName","priceFree","resources","price","get","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","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","updateCartDeliverySpecification","savedDeliveryOption","_this$props$data$chec4","onReady","cartLinesForShipping","DeliveryMode","deliveryModeId","trim","checkoutState","updateCartDeliverySpecificationInput","shippingAddress","channelDeliveryOptionConfig","onPending","then","response","_response$errorDetail","errorDetails","LocalizedMessage","StringExtensions","isNullOrEmpty","genericErrorMessage","setIsCancellable","catch","pickupDeliveryModeCode","PickupDeliveryModeCode","emailDeliveryModeCode","EmailDeliveryModeCode","cart","CartLines","filter","cartLine","_this$channelDelivery","PickupDeliveryModeCodes","getDeliveryOptions","_this$props$data$chec5","cartState","cartId","Id","originalDeliveryMode","shippingCartLines","hasShippingDeliveryLines","clearCartLinesDeliveryInformation","channelDeliveryOptionConfiguration","deliveryOptionFilter","filterDeliveryModeOption","FilterDeliveryModeOption","None","FilterOutNonCarrierDeliveryMode","getDeliveryOptionsAsync","callerContext","actionContext","queryResultSettings","QueryResultSettingsProxy","getPagingFromInputDataOrDefaultValue","_unused","deliveryOptionsNotFound","_this$props$data$chec6","_this$props$data$chec7","updateHasCartDeliveryMode","newHasCartDeliveryMode","isPaymentVerificationRedirection","_this$props$data$chec8","getStoredDeliveryOptions","_this$props$data$chec9","_this$props$data$chec10","_this$props$data$chec11","_this$props$data$chec12","_this$props$data$chec13","_this$props$data$chec14","isExpressCheckoutApplied","isExpressPaymentAppliedInCartPage","event","currentTarget","getTelemetryObject","telemetryPageName","friendlyName","_this$props$data$cart","_this$props$data$cart2","properties","ExtensionProperties","property","Key","Value","StringValue","JSON","parse","_this$expressPaymentD","_this$expressPaymentD2","expressPaymentDetailsFromCartPage","isExpressCheckoutAppliedInCartPage","_this$props$data$chec19","when","isDataReady","reaction","_this$props$data$chec15","_this$props$data$chec16","_this$props$data$chec17","_this$props$data$chec18","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec20","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec21","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","shouldComponentUpdate","nextProps","nextState","state","render","_this$props$data$chan","_this$props$data$feat","featureState","feature","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","saveButton","editButton","cancelButton","renderView","__decorate","observable","computed","action","withModuleState","observer","DeliveryOptionList","_ref","Node","key","DeliveryOptionSelected","_ref2","Module","ref","payLoad","getPayloadObject","TelemetryConstant","DeliveryOptions","attributes","getTelemetryAttributes","checked","type","contentAction","etext","name","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","split","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","_ref3","listProps","_ref4","item","_objectWithoutProperties","_excluded","AddResource","_ref5","ShowResource","_ref6","onApplyHandler","preventDefault","onChangeNumberHandler","target","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","checkoutLoyalty","showLoyalty","heading","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","min","max","ariaValueMax","ariaValueMin","ariaValueNow","loyaltyAmountApplyButton","applyCheckoutLoyaltyPaymentText","isNaN","showAppliedAmount","loyaltyAmountAppliedText","loyaltyAmountAppliedPrice","loyaltyAmountRemoveButton","removeCheckoutLoyaltyPaymentText","innerRef","point","RewardPointId","checkoutLoyaltyRewardPoint","availablePointsText","activePoints","ActivePoints","toString","expiringPointsText","expiringPoints","PointsExpiringSoon","updateLoyaltyAmount","newAmount","parseFloat","num","toFixed","element","document","getElementById","isDisabled","loyalPointsRequest","createGetMaxLoyaltyPointsToRedeemForTransactionBalanceInput","_query","bypassCache","callActionOrExecute","_points$MaxCurrencyVa","update","GetLoyaltyTransactionEstimationInput","apiSettings","newMaxPoints","exception","AddCheckoutLoyalty","rewardPoint","ShowCheckoutLoyalty","PickUpAtStoreComponent","PickUpAtStore","location","EmailDeliveryComponent","EmailDelivery","LineItemComponent","LineItem","pickUpAtStore","emailDelivery","LineItemGroupComponent","LineItemDeliveryGroup","LineItemList","lineItems","lineItem","LineId","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","_getLineItemComponent","_input$data$catalogs","product","ProductId","productId","_product","RecordId","imageSettings","showShippingChargesForLineItems","quantityDisplayString","productDimensionTypeColor","productDimensionTypeSize","productDimensionTypeStyle","productDimensionTypeAmount","configString","inputQuantityAriaLabel","discountStringText","shippingCharges","gridSettings","catalogs","productUrl","getProductUrlSync","MsDyn365","isBrowser","isChannelTypeB2B","requestContext","_cartLine$CatalogId","fullUrl","URL","window","href","searchParams","set","CatalogId","CartLineItemComponent","sizeString","colorString","styleString","amountString","originalPriceText","currentPriceText","shippingChargesText","salesAgreementPricePrompt","isQuantityEditable","primaryImageUrl","PrimaryImageUrl","priceCurrency","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","_getEmailDeliveryComponents","emailDeliveryText","_getLineItemsComponents","items","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","groupBy","groupDelivery","cartLinesGroup","cartLinesGrp","entries","forEach","groupByDeliveryType","push","keys","cartLines","lineItemDeliveryGroup","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","groupTitle","iconClass","_getLineItems","products","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","moduleId","_sectionState$childId","sectionState","ArrayExtensions","hasElements","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","useState","payload","TelemetryEvent","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","lineDeliverySpecifications","line","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","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","_this$props$data$feat2","_this$props$context","retry","isOrderQuantityLimitsFeatureEnabledInHq","isEcommerceQuantityLimitsFeatureEnabledInHq","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","isB2BSite","isOrderQuantityLimitsFeatureEnabledInSiteSettings","validateForCheckoutAsync","_result$ValidationFai","ValidationFailuresByCartLines","refreshCart","refreshError","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","address","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","timeoutErrorMessage","checkoutResult","apiError","statusCode","errorCode","setCheckoutErrors","_error$data","AdditionalContext","isEditorialMode","isEmpty","params","disableForOBO","isPaidOffByCustomerAccount","amountDue","_this$props$data$chec22","_this$props$data$chec23","asyncResultStatus","AsyncResultStatusCode","LOADING","_this$props$data$chec24","_this$props$data$chec27","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","_this$props$data$chec25","_this$props$data$chec26","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","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"],"sourceRoot":""}