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BAAmB,IAAIpN,QAHzCmpC,CAACt3C,EAAe40B,IAC7B50B,GAAS40B,EAAS7X,SAAW,IAEiD,GACnFuB,GAAUpb,EAAK+zB,aAAe,GAAK0f,EAAuBz0C,GAChE,OAAOoa,KAAKC,IAAI86B,EAAoB/4B,EAAO,EAoHhB84B,CAAuBv7C,EAAMqG,cAAerG,EAAMqH,MACnEyY,EAAgBg7B,EAAuB96C,EAAMqG,eAC7Cq1C,GAA4BtgB,GAAe,GAAKkgB,EAAiBx7B,EAEnEA,EAAgB,IAChBm7B,EAAWniB,QAAU8iB,EAA0B57C,GAAQ8f,EAAe,UAAW9f,EAAM+W,cAAgB,mBAGvGukC,EAAiB,IACjBL,EAAWliB,SAAW6iB,EAA0B57C,GAAQs7C,EAAgB,YAAat7C,EAAMgX,eAAiB,qBAGhHikC,EAAWjiB,WAAa4iB,EAAyB3wC,EAAAA,EAAC,CAAD,EACxCjL,GAAK,IAAEkX,cAAU/V,IACtBu6C,EACA,QACA17C,EAAM0N,gBACR,CAYN,OATI2uC,EAA2B,IAC3BpB,EAAWpiB,eAAiB+iB,EACxB57C,GACCq8C,EACD,kBACAr8C,EAAMiX,sBAIPgkC,CAAU","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/absolute-checkout-delivery-options.props.autogenerated.ts?640a","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/components/absolute-checkout-delivery-options.description.tsx?575f","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/components/absolute-checkout-delivery-options.error-message.tsx?2438","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/components/absolute-checkout-delivery-options.error-title.tsx?5e9e","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/components/absolute-checkout-delivery-options.radio-button.tsx?a853","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/absolute-checkout-delivery-options.tsx?1b6e","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-delivery-options/absolute-checkout-delivery-options.view.tsx?cdde","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/alert.tsx?0154","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/get-invoice-payment-summary.tsx?cc5c","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/get-line-items.tsx?883d","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/get-order-summary.tsx?2a20","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/guided-card.tsx?a1fd","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/guided-form.tsx?ce91","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/components/place-order-button.tsx?ff60","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/methods/absolute-checkout-recaptcha.ts?0f64","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/methods/empty-active-cart.ts?dde6","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/absolute-checkout-recaptcha.tsx?25be","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/methods/place-order.ts?dd2b","webpack://Msdyn365.Commerce.Online/./src/modules/absolute-checkout-recaptcha/absolute-checkout-recaptcha.view.tsx?4f0c","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/alert.tsx?5f05","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/get-invoice-payment-summary.tsx?a29c","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/get-line-items.tsx?4910","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/get-order-summary.tsx?41cd","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/guided-card.tsx?4453","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/guided-form.tsx?bddd","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/components/place-order-button.tsx?e0ec","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/methods/lli-checkout.ts?5125","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/methods/empty-active-cart.ts?1fd1","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/lli-checkout.tsx?182a","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/methods/place-order.ts?c2ac","webpack://Msdyn365.Commerce.Online/./src/modules/lli-checkout/lli-checkout.view.tsx?0ead","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/alert.tsx?6c1c","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/get-invoice-payment-summary.tsx?a221","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/get-line-items.tsx?15a9","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/get-order-summary.tsx?cce5","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/guided-card.tsx?741d","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/guided-form.tsx?ef00","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/components/place-order-button.tsx?a616","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/recaptcha-checkout.tsx?225e","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/methods/place-order.ts?3b05","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-checkout/recaptcha-checkout.view.tsx?3d4f","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-payment-instrument/components/payment-information.tsx?dd89","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-payment-instrument/recaptcha-payment-instrument.tsx?ce1e","webpack://Msdyn365.Commerce.Online/./src/modules/recaptcha-payment-instrument/recaptcha-payment-instrument.view.tsx?e969","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/checkout-delivery-options.tsx?6764","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/checkout-delivery-options.view.tsx?1e75","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.description.tsx?840c","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-message.tsx?8ca3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.error-title.tsx?f7e7","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-delivery-options/components/checkout-delivery-options.radio-button.tsx?9df9","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.tsx?1d63","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.view.tsx?4299","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/checkout-gift-card.tsx?8fc3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/checkout-gift-card.view.tsx?d99f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-form.tsx?4540","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-item.tsx?d186","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/get-list.tsx?a3f3","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-gift-card/components/title.tsx?3b2f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/checkout-loyalty.tsx?8b4b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/checkout-loyalty.view.tsx?b79f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-input.tsx?cadb","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-label.tsx?e02b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-loyalty/components/checkout-loyalty-text.tsx?895a","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-section-container/checkout-section-container.tsx?c853","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-section-container/checkout-section-container.view.tsx?b4ab","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-section-container/components/loading.tsx?2e57","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-invoice-payment-summary.tsx?9549","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.tsx?6737","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.view.tsx?e4cc","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/alert.tsx?cb1e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-line-items.tsx?92f8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-order-summary.tsx?4a81","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-card.tsx?58e0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-form.tsx?f018","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/place-order-button.tsx?9b41","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/checkout.ts?7b6b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/place-order.ts?5aa0","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-form.tsx?e249","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/components/get-item.tsx?4862","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.tsx?d1f8","webpack://Msdyn365.Commerce.Online/./src/modules/gift-card-balance-check/gift-card-balance-check.view.tsx?a0c9","webpack://Msdyn365.Commerce.Online/./src/invoice-summary-lineitem.tsx?5f61","webpack://Msdyn365.Commerce.Online/./src/order-summary-lineitem.tsx?8a98"],"sourcesContent":["/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IAbsoluteCheckoutDeliveryOptions contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum filterDeliveryModeOption {\r\n none = 'none',\r\n filterOutNonCarrierDeliveryMode = 'filterOutNonCarrierDeliveryMode'\r\n}\r\n\r\nexport const enum useDefaultDeliveryOption {\r\n none = 'none',\r\n displaySelectedDeliveryOption = 'displaySelectedDeliveryOption',\r\n notDisplaySelectedDeliveryOption = 'notDisplaySelectedDeliveryOption'\r\n}\r\n\r\nexport interface IAbsoluteCheckoutDeliveryOptionsConfig extends Msdyn365.IModuleConfig {\r\n heading?: IHeadingData;\r\n filterDeliveryModeOption?: filterDeliveryModeOption;\r\n useDefaultDeliveryOption?: useDefaultDeliveryOption;\r\n className?: string;\r\n shipContent?: Msdyn365.RichText;\r\n}\r\n\r\nexport interface IAbsoluteCheckoutDeliveryOptionsResources {\r\n deliveryOptionsNotFound: string;\r\n genericErrorMessage: string;\r\n errorMessageTitle: string;\r\n ariaLabelText: string;\r\n priceFree: string;\r\n saveBtnLabel: string;\r\n editBtnLabel: string;\r\n cancelBtnLabel: string;\r\n deliveryOptionAriaLabel: string;\r\n}\r\n\r\nexport const enum HeadingTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface IHeadingData {\r\n text: string;\r\n tag?: HeadingTag;\r\n}\r\n\r\nexport interface IAbsoluteCheckoutDeliveryOptionsProps extends Msdyn365.IModule {\r\n resources: IAbsoluteCheckoutDeliveryOptionsResources;\r\n config: IAbsoluteCheckoutDeliveryOptionsConfig;\r\n}\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsDescriptionProps {\r\n description?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.description\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsDescription: React.FC = ({\r\n description\r\n}) => {\r\n if (!description) {\r\n return null;\r\n }\r\n\r\n return (\r\n {description}\r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsDescription;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsErrorMessageProps {\r\n message?: string;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.message\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsErrorMessage: React.FC = ({\r\n message\r\n}) => {\r\n if (!message) {\r\n return null;\r\n }\r\n\r\n return (\r\n

\r\n {message}\r\n

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

\r\n {title}\r\n

\r\n );\r\n\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsErrorTitle;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutDeliveryOptionsRadioButtonProps {\r\n isChecked: boolean;\r\n value?: string;\r\n ariaSetSize: number;\r\n ariaPosInSet: number;\r\n ariaLabel?: string;\r\n telemetryContent?: ITelemetryContent;\r\n onChange(event: React.ChangeEvent): void;\r\n}\r\n\r\n/**\r\n * AddPaymentForm SFC.\r\n * @param root0\r\n * @param root0.isChecked\r\n * @param root0.value\r\n * @param root0.ariaSetSize\r\n * @param root0.ariaPosInSet\r\n * @param root0.ariaLabel\r\n * @param root0.telemetryContent\r\n * @param root0.onChange\r\n * @extends {React.FC}\r\n */\r\nconst CheckoutDeliveryOptionsRadioButton: React.FC = ({\r\n isChecked,\r\n value,\r\n ariaSetSize,\r\n ariaPosInSet,\r\n ariaLabel,\r\n telemetryContent,\r\n onChange\r\n}) => {\r\n if (!value) {\r\n return null;\r\n }\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.DeliveryOptions);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsRadioButton;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\nimport { PriceComponent } from '@msdyn365-commerce/components';\r\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { Cart, ChannelDeliveryOptionConfiguration, FilterDeliveryModeOption } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n getDeliveryOptionsAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n Address, CartLine, DeliveryOption\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport { action, observable, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IAbsoluteCheckoutDeliveryOptionsData } from './absolute-checkout-delivery-options.data';\r\nimport { filterDeliveryModeOption, IAbsoluteCheckoutDeliveryOptionsProps, useDefaultDeliveryOption } from './absolute-checkout-delivery-options.props.autogenerated';\r\nimport DescriptionComponent from './components/absolute-checkout-delivery-options.description';\r\nimport ErrorMessageComponent from './components/absolute-checkout-delivery-options.error-message';\r\nimport ErrorTitleComponent from './components/absolute-checkout-delivery-options.error-title';\r\nimport RadioButtonComponent from './components/absolute-checkout-delivery-options.radio-button';\r\n\r\nexport interface ICheckoutDeliveryOptionsModuleProps extends IAbsoluteCheckoutDeliveryOptionsProps, IModuleStateProps { }\r\n\r\nexport interface ICheckoutDeliveryOption {\r\n DeliveryOption: INodeProps;\r\n description?: React.ReactNode;\r\n price?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionEdit extends ICheckoutDeliveryOption {\r\n code: string;\r\n radioButton?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsList {\r\n DeliveryOptionsList: INodeProps;\r\n list: ICheckoutDeliveryOptionEdit[];\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsError {\r\n Error: INodeProps;\r\n title: React.ReactNode;\r\n message: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsViewState {\r\n isLoading: boolean;\r\n isError: boolean;\r\n isShowList: boolean;\r\n isShowSelected: boolean;\r\n isShowSaveButton: boolean;\r\n isShowEditButton: boolean;\r\n isShowCancelButton: boolean;\r\n}\r\n\r\nexport interface ICheckoutDeliveryOptionsViewProps extends IAbsoluteCheckoutDeliveryOptionsProps<{}> {\r\n CheckoutDeliveryOptions: IModuleProps;\r\n selectedItemId: string;\r\n deliveryOptionsData: DeliveryOption[];\r\n isLoading: boolean;\r\n errorMessageData: string;\r\n viewState: ICheckoutDeliveryOptionsViewState;\r\n deliveryOptions?: ICheckoutDeliveryOptionsList;\r\n deliveryOptionSelected?: ICheckoutDeliveryOption;\r\n errorMessage?: ICheckoutDeliveryOptionsError;\r\n waiting?: React.ReactNode;\r\n saveButton?: React.ReactNode;\r\n editButton?: React.ReactNode;\r\n cancelButton?: React.ReactNode;\r\n onDeliveryOptionChange(event: React.ChangeEvent): void;\r\n onSave(): void;\r\n onEdit(): void;\r\n onCancel(): void;\r\n shipContent?: string;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutDeliveryOptions component.\r\n * @extends {React.Component>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass CheckoutDeliveryOptions extends React.Component {\r\n @observable private selectedItemId: string = '';\r\n\r\n @observable private deliveryOptions: DeliveryOption[] = [];\r\n\r\n @observable private isLoading: boolean = false;\r\n\r\n @observable private errorMessage?: string;\r\n\r\n private cartDeliveryMode?: string;\r\n\r\n private retailMultiplePickUpOptionEnabled?: boolean = false;\r\n\r\n private channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration;\r\n\r\n private readonly telemetryContent?: ITelemetryContent;\r\n\r\n private readonly isSelectDefaultOptionEnabled?: boolean;\r\n\r\n constructor(props: ICheckoutDeliveryOptionsModuleProps) {\r\n super(props);\r\n console.log(\"MYDEBUG-ACDO: constructor() called\");\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n this.isSelectDefaultOptionEnabled = this.props.config.useDefaultDeliveryOption &&\r\n this.props.config.useDefaultDeliveryOption !== useDefaultDeliveryOption.none;\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n console.log(\"MYDEBUG-ACDO: componentDidMount() called\");\r\n this.props.data.checkout.then(async () => {\r\n await this.init();\r\n });\r\n\r\n reaction(\r\n () => this.props.data.checkout.result && this.props.data.checkout.result.shippingAddress,\r\n async () => {\r\n await this.loadDeliveryOptions();\r\n this.props.moduleState.setIsCancellable(false);\r\n\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutDeliveryOptionsModuleProps,\r\n nextState: ICheckoutDeliveryOptionsViewState): boolean {\r\n console.log(\"MYDEBUG-ACDO: shouldComponentUpdate() called\");\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n console.log(\"MYDEBUG-ACDO: render() called\");\r\n if (!this.canShip()) {\r\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const { shipContent } = this.props.config;\r\n\r\n const ShipContent = shipContent && (\r\n ${shipContent}

`}\r\n editProps={{ onEdit: this.handleParagraphChange1, requestContext: this.props.context.request }}\r\n />\r\n );\r\n\r\n const {\r\n moduleState: { isReady, isUpdating, hasError }\r\n } = this.props;\r\n const isError = !this.isLoading && hasError;\r\n const isShowList = !this.isLoading && !hasError && isUpdating && !this.isSelectDefaultOptionEnabled;\r\n const isShowSelected = !this.isLoading && !hasError && isReady;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n this.channelDeliveryOptionConfig = this.props.data.channelDeliveryOptionConfig?.result;\r\n this.retailMultiplePickUpOptionEnabled = this.props.data.featureState?.result\r\n ?.find(feature => feature.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n const { deliveryOptionAriaLabel } = this.props.resources;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n onDeliveryOptionChange: this.onDeliveryOptionChange,\r\n selectedItemId: this.selectedItemId,\r\n deliveryOptionsData: this.deliveryOptions,\r\n isLoading: this.isLoading,\r\n errorMessageData: this.errorMessage,\r\n viewState: {\r\n isLoading: this.isLoading,\r\n isError,\r\n isShowList,\r\n isShowSelected,\r\n isShowSaveButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup,\r\n isShowEditButton: isShowSelected && !this.props.moduleState.hasExternalSubmitGroup,\r\n isShowCancelButton: isShowList && !this.props.moduleState.hasExternalSubmitGroup && !!this.getSavedDeliveryOption()\r\n },\r\n CheckoutDeliveryOptions: {\r\n moduleProps: this.props,\r\n className: classname('ms-checkout-delivery-options', this.props.config.className)\r\n },\r\n deliveryOptions: {\r\n DeliveryOptionsList: {\r\n className: 'ms-checkout-delivery-options__list',\r\n role: 'listbox',\r\n 'aria-label': deliveryOptionAriaLabel },\r\n list: this.getDeliveryOptionList()\r\n },\r\n deliveryOptionSelected: this.getDeliveryOptionSelected(),\r\n errorMessage: this.getErrorMessage(),\r\n waiting: ,\r\n saveButton: this.getSaveButton(),\r\n editButton: this.getEditButton(),\r\n cancelButton: this.getCancelButton(),\r\n onSave: this.onSave,\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n shipContent: ShipContent\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public handleParagraphChange1 = (event: MsDyn365.ContentEditableEvent) => this.props.config.shipContent! = event.target.value;\r\n\r\n @action\r\n private readonly init = async (): Promise => {\r\n console.log(\"MYDEBUG-ACDO: @action init() called\");\r\n this.props.moduleState.init({\r\n onEdit: this.isSelectDefaultOptionEnabled ? undefined : this.onEdit,\r\n onCancel: this.isSelectDefaultOptionEnabled ? undefined : this.onCancel,\r\n onSubmit: this.isSelectDefaultOptionEnabled ? undefined : this.onSubmit,\r\n status: (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption) &&\r\n this.canShip()) ? 'updating' : 'disabled'\r\n });\r\n\r\n this.cartDeliveryMode = this.getSavedDeliveryOption();\r\n\r\n await this.loadDeliveryOptions();\r\n };\r\n\r\n private readonly canShip = (): boolean => {\r\n console.log(\"MYDEBUG-ACDO: onShip() called\");\r\n const hasInvoice = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n return !hasInvoice && this.getCartLinesForShipping().length > 0;\r\n };\r\n\r\n private readonly isDeliveryModeExists = (deliveryMode: string | undefined): boolean => {\r\n console.log(\"MYDEBUG-ACDO: isDeliveryModeExists() called\");\r\n if (deliveryMode) {\r\n if (this.deliveryOptions.find(deliveryOption => deliveryOption.Code === deliveryMode)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n };\r\n\r\n private readonly getDeliveryOptionSelected = (): ICheckoutDeliveryOption | null => {\r\n console.log(\"MYDEBUG-ACDO: getDeliveryOptionSelected() called\");\r\n const selectedItem = this.deliveryOptions.find(deliveryOption => deliveryOption.Code === this.selectedItemId);\r\n if (!selectedItem) {\r\n this.props.context.telemetry.error('Checkout delivery options content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const { id, typeName, context } = this.props;\r\n const { priceFree } = this.props.resources;\r\n const price = get(selectedItem, 'ShippingChargeAmount', 0);\r\n\r\n return {\r\n DeliveryOption: { className: 'ms-checkout-delivery-options__option-selected' },\r\n description: ,\r\n price: \r\n };\r\n };\r\n\r\n private readonly getErrorMessage = (): ICheckoutDeliveryOptionsError => {\r\n console.log(\"MYDEBUG-ACDO: getErrorMessage() called\");\r\n const { errorMessageTitle } = this.props.resources;\r\n return {\r\n // @ts-expect-error\r\n CheckoutDeliveryOptionsError: { tag: 'span', className: 'ms-address-form__error', role: 'alert', 'aria-live': 'assertive' },\r\n title: ,\r\n message: \r\n };\r\n };\r\n\r\n private readonly getDeliveryOptionList = (): ICheckoutDeliveryOptionEdit[] => {\r\n console.log(\"MYDEBUG-ACDO: getDeliveryOptionList() called\");\r\n const count = this.deliveryOptions.length;\r\n const { priceFree } = this.props.resources;\r\n const { id, typeName, context } = this.props;\r\n\r\n return this.deliveryOptions.map((deliveryOption: DeliveryOption, index: number) => {\r\n return {\r\n DeliveryOption: { className: 'ms-checkout-delivery-options__option', role: 'option' },\r\n code: deliveryOption.Code || '',\r\n radioButton: (\r\n \r\n ),\r\n description: (\r\n \r\n ),\r\n price: (\r\n \r\n )\r\n };\r\n });\r\n };\r\n\r\n private readonly getSaveButton = (): React.ReactNode => {\r\n console.log(\"MYDEBUG-ACDO: getSaveButton() called\");\r\n const { saveBtnLabel = 'Save' } = this.props.resources;\r\n return (\r\n \r\n {saveBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly getEditButton = (): React.ReactNode => {\r\n console.log(\"MYDEBUG-ACDO: getEditButton() called\");\r\n const { editBtnLabel = 'Change' } = this.props.resources;\r\n return (\r\n \r\n {editBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly getCancelButton = (): React.ReactNode => {\r\n console.log(\"MYDEBUG-ACDO: getCancelButton() called\");\r\n const { cancelBtnLabel = 'Cancel' } = this.props.resources;\r\n return (\r\n \r\n {cancelBtnLabel}\r\n \r\n );\r\n };\r\n\r\n private readonly setError = (errorMessage: string): void => {\r\n console.log(\"MYDEBUG-ACDO: setError() called for \" + errorMessage);\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.errorMessage = errorMessage;\r\n };\r\n\r\n private readonly clearError = (): void => {\r\n console.log(\"MYDEBUG-ACDO: clearError() called\");\r\n this.props.moduleState.setHasError(false);\r\n this.errorMessage = undefined;\r\n };\r\n\r\n private readonly onSave = async (): Promise => {\r\n console.log(\"MYDEBUG-ACDO: onSave() called\");\r\n await this.onSubmit();\r\n };\r\n\r\n private readonly onEdit = async (): Promise => {\r\n console.log(\"MYDEBUG-ACDO: onEdit() called\");\r\n this.onUpdating();\r\n\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n }\r\n };\r\n\r\n private readonly onSubmit = async (): Promise => {\r\n console.log(\"MYDEBUG-ACDO: onSubmit() called\");\r\n await this.updateCartDeliverySpecification(this.selectedItemId);\r\n\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n }\r\n };\r\n\r\n private readonly onCancel = (): void => {\r\n console.log(\"MYDEBUG-ACDO: onCancel() called\");\r\n // Reset to the saved value\r\n const savedDeliveryOption = this.getSavedDeliveryOption();\r\n if (savedDeliveryOption) {\r\n this.selectedItemId = savedDeliveryOption;\r\n this.onReady();\r\n } else {\r\n this.onUpdating();\r\n }\r\n };\r\n\r\n private readonly getSavedDeliveryOption = (): string | undefined => {\r\n console.log(\"MYDEBUG-ACDO: getSavedDeliveryOption() called\");\r\n const cartLinesForShipping = this.getCartLinesForShipping();\r\n return cartLinesForShipping[0] && cartLinesForShipping[0].DeliveryMode;\r\n };\r\n\r\n private readonly updateCartDeliverySpecification = async (deliveryModeId: string): Promise => {\r\n console.log(\"MYDEBUG-ACDO: updateCartDelivrySpecification() called\");\r\n if (deliveryModeId.trim() === '') {\r\n return;\r\n }\r\n\r\n const { resources } = this.props;\r\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\r\n const updateCartDeliverySpecificationInput = {\r\n deliveryModeId,\r\n shippingAddress: checkoutState.shippingAddress,\r\n channelDeliveryOptionConfig: this.retailMultiplePickUpOptionEnabled ? this.channelDeliveryOptionConfig : undefined\r\n };\r\n\r\n this.clearError();\r\n this.onPending();\r\n\r\n await checkoutState.checkoutCart.updateCartDeliverySpecification(updateCartDeliverySpecificationInput)\r\n .then((response) => {\r\n if (response.status === 'FAILED') {\r\n this.setError(resources.genericErrorMessage);\r\n } else {\r\n this.onReady();\r\n this.props.moduleState.setIsCancellable(true);\r\n }\r\n })\r\n .catch(\r\n () => {\r\n this.setError(resources.genericErrorMessage);\r\n }\r\n );\r\n };\r\n\r\n private readonly getCartLinesForShipping = (): CartLine[] => {\r\n console.log(\"MYDEBUG-ACDO: getCartLinesForShipping() called\");\r\n const { request } = this.props.context;\r\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\r\n\r\n return this.retailMultiplePickUpOptionEnabled ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(\r\n cartLine => ((cartLine.DeliveryMode && cartLine.DeliveryMode !== '') ? (cartLine.DeliveryMode !== this.channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === cartLine.DeliveryMode) && cartLine.DeliveryMode !== emailDeliveryModeCode) : cartLine)\r\n ) : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).filter(\r\n cartLine => ((cartLine.DeliveryMode && cartLine.DeliveryMode !== '') ? (cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode) : cartLine)\r\n );\r\n };\r\n\r\n private readonly getDeliveryOptions = async (shippingAddress: Address): Promise => {\r\n console.log(\"MYDEBUG-ACDO: getDeliveryOptions() called\");\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const { context, resources, config } = this.props;\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n const cartId = (cartState.cart as Cart).Id;\r\n\r\n if (context) {\r\n this.isLoading = true;\r\n this.deliveryOptions = [];\r\n this.selectedItemId = '';\r\n this.clearError();\r\n\r\n try {\r\n\r\n let originalDeliveryMode: string = '';\r\n const shippingCartLines = this.getCartLinesForShipping();\r\n const hasShippingDeliveryLines = (shippingCartLines && shippingCartLines.length > 0 && shippingCartLines[0].DeliveryMode);\r\n if (hasShippingDeliveryLines) {\r\n\r\n // First store the delivery mode, so that we can restore the shipping information.\r\n originalDeliveryMode = shippingCartLines[0].DeliveryMode || '';\r\n\r\n // Clear the delivery information on retail server, so GetDeliveryOptions charge calculation works correctly\r\n const cart = cartState.cart;\r\n await cartState.clearCartLinesDeliveryInformation({ cart });\r\n }\r\n\r\n // TODO: Check if we can move this getDeliveryOptions to checkout state\r\n let deliveryOptionFilter: FilterDeliveryModeOption;\r\n switch (config.filterDeliveryModeOption) {\r\n case filterDeliveryModeOption.none:\r\n deliveryOptionFilter = FilterDeliveryModeOption.None;\r\n break;\r\n case filterDeliveryModeOption.filterOutNonCarrierDeliveryMode:\r\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\r\n break;\r\n default:\r\n deliveryOptionFilter = FilterDeliveryModeOption.FilterOutNonCarrierDeliveryMode;\r\n }\r\n const response = await getDeliveryOptionsAsync({ callerContext: context.actionContext, queryResultSettings: {} }, cartId, shippingAddress, [], deliveryOptionFilter, true);\r\n\r\n if (hasShippingDeliveryLines) {\r\n await this.updateCartDeliverySpecification(originalDeliveryMode);\r\n }\r\n\r\n if (response && response.length > 0) {\r\n this.deliveryOptions = response;\r\n }\r\n } catch {\r\n this.setError(resources.genericErrorMessage);\r\n }\r\n\r\n if (this.deliveryOptions.length === 0) {\r\n this.setError(resources.deliveryOptionsNotFound);\r\n } else if (this.cartDeliveryMode && this.isDeliveryModeExists(this.cartDeliveryMode)) {\r\n this.selectedItemId = this.cartDeliveryMode;\r\n this.cartDeliveryMode = undefined;\r\n this.onReady();\r\n\r\n // For new checkout flow, when this module is ready, update the flag to call GetCardPaymentAcceptPoint with amountDue.\r\n if (this.props.data.checkout.result.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n await this.props.data.checkout.result.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n }\r\n } else {\r\n this.onUpdating();\r\n this.selectedItemId = this.deliveryOptions.length > 0 ? this.deliveryOptions[0].Code || '' : ''; // By default, select first delivery\r\n }\r\n\r\n this.isLoading = false;\r\n }\r\n };\r\n\r\n private readonly loadDeliveryOptions = async (): Promise => {\r\n console.log(\"MYDEBUG-ACDO: loadDeliveryOptions() called\");\r\n const shippingAddress = this.props.data.checkout.result && this.props.data.checkout.result.shippingAddress;\r\n\r\n if (this.canShip() && shippingAddress) {\r\n await this.getDeliveryOptions(shippingAddress);\r\n\r\n if (this.isSelectDefaultOptionEnabled) {\r\n this.onSubmit();\r\n }\r\n }\r\n };\r\n\r\n private readonly onDeliveryOptionChange = (event: React.ChangeEvent) => {\r\n console.log(\"MYDEBUG-ACDO: onDeliveryOptionChange() called\");\r\n const deliveryModeId = event.currentTarget.value;\r\n this.selectedItemId = deliveryModeId;\r\n };\r\n\r\n private readonly onReady = () => {\r\n console.log(\"MYDEBUG-ACDO: onReady() called\");\r\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\r\n this.props.moduleState.onReady();\r\n }\r\n };\r\n\r\n private readonly onUpdating = () => {\r\n console.log(\"MYDEBUG-ACDO: onUpdating() called\");\r\n if (!(this.props.config.useDefaultDeliveryOption === useDefaultDeliveryOption.notDisplaySelectedDeliveryOption)) {\r\n this.props.moduleState.onUpdating();\r\n }\r\n };\r\n\r\n private readonly onPending = () => {\r\n console.log(\"MYDEBUG-ACDO: onPending() called\");\r\n if (!this.isSelectDefaultOptionEnabled) {\r\n this.props.moduleState.onPending();\r\n }\r\n };\r\n}\r\n\r\nexport default CheckoutDeliveryOptions;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsError, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from './absolute-checkout-delivery-options';\r\n\r\nconst DeliveryOptionList: React.FC = ({\r\n DeliveryOptionsList,\r\n list\r\n}) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n {deliveryOption.radioButton}\r\n {deliveryOption.description}\r\n {deliveryOption.price}\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst DeliveryOptionSelected: React.FC = ({\r\n DeliveryOption,\r\n description,\r\n price\r\n}) => {\r\n\r\n return (\r\n \r\n {description}\r\n {price}\r\n \r\n );\r\n};\r\n\r\nconst ErrorMessage: React.FC = ({\r\n Error,\r\n title,\r\n message\r\n}) => {\r\n\r\n return (\r\n \r\n {title}\r\n {message}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutDeliveryOptionsView: React.FC = props => {\r\n const { CheckoutDeliveryOptions,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionSelected,\r\n errorMessage,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton,\r\n shipContent\r\n } = props;\r\n\r\n return (\r\n\r\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\r\n \r\n {shipContent ? (\r\n
{shipContent}
\r\n ) : null}\r\n {viewState.isLoading && waiting}\r\n {viewState.isError && errorMessage && }\r\n {viewState.isShowList && deliveryOptions && }\r\n {viewState.isShowSelected && deliveryOptionSelected && }\r\n {viewState.isShowSaveButton && saveButton}\r\n {viewState.isShowEditButton && editButton}\r\n {viewState.isShowCancelButton && cancelButton}\r\n
\r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface IAlertProps {\r\n message: string;\r\n}\r\n\r\nconst CheckoutAlert: React.FC = ({ message }) => (\r\n

\r\n {message}\r\n

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

{invoiceSummaryTitle}

,\r\n lines: checkoutCart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: totalAmountLabel,\r\n invoiceLabel,\r\n cart,\r\n context,\r\n typeName,\r\n telemetry,\r\n id,\r\n checkoutState: checkout.result\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\r\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\nimport * as React from 'react';\r\n\r\nimport { IAbsoluteCheckoutRecaptchaData } from '../absolute-checkout-recaptcha.data';\r\nimport { IAbsoluteCheckoutRecaptchaProps } from '../absolute-checkout-recaptcha.props.autogenerated';\r\n\r\ntype deliveryType = 'pickup' | 'ship' | 'email';\r\n\r\nexport interface IPickUpAtStore {\r\n PickUpAtStore: INodeProps;\r\n label: React.ReactNode;\r\n location: React.ReactNode;\r\n}\r\n\r\nexport interface IEmailDelivery {\r\n EmailDelivery: INodeProps;\r\n label: React.ReactNode;\r\n}\r\n\r\nexport interface ILineItem {\r\n LineId: string;\r\n LineItem: INodeProps;\r\n item?: React.ReactNode;\r\n pickUpAtStore?: IPickUpAtStore;\r\n emailDelivery?: IEmailDelivery;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroup {\r\n LineItemDeliveryGroup: INodeProps;\r\n LineItemList: INodeProps;\r\n heading: React.ReactNode;\r\n lineItemWraper?: React.ReactNode;\r\n lineItemWraperIcon?: React.ReactNode;\r\n lineItems: ILineItem[];\r\n}\r\n\r\nexport interface ILineItems {\r\n LineItems: INodeProps;\r\n Header: INodeProps;\r\n heading: React.ReactNode;\r\n editLink: React.ReactNode;\r\n itemsForPickup?: ILineItemDeliveryGroup;\r\n itemsForShip?: ILineItemDeliveryGroup;\r\n itemsForEmail?: ILineItemDeliveryGroup;\r\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\r\n}\r\n\r\nexport const getLineItems = (input: IAbsoluteCheckoutRecaptchaProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\r\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n const _getDeliveryLocation = (cartLine: CartLine): string => {\r\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\r\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\r\n return '';\r\n }\r\n\r\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\r\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\r\n });\r\n\r\n return locationMatch && locationMatch.OrgUnitName;\r\n };\r\n\r\n const _getProduct = (productId: number): SimpleProduct | undefined => {\r\n const products = get(input, 'data.products.result') || [];\r\n return products.find((_product: SimpleProduct) => {\r\n return productId === _product.RecordId;\r\n });\r\n };\r\n\r\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\r\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n config: { imageSettings, showShippingChargesForLineItems },\r\n resources: {\r\n quantityDisplayString,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount,\r\n configString,\r\n inputQuantityAriaLabel,\r\n discountStringText,\r\n shippingCharges\r\n },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = input;\r\n\r\n if (!product) {\r\n return;\r\n }\r\n\r\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\r\n if (MsDyn365.isBrowser) {\r\n const fullUrl = new URL(productUrl, window.location.href);\r\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\r\n productUrl = fullUrl.href;\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\r\n const {\r\n resources: { pickUpAtStoreWithLocationText }\r\n } = input;\r\n\r\n return {\r\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\r\n label: {pickUpAtStoreWithLocationText},\r\n location:
{pickupDeliveryLocation}
\r\n };\r\n };\r\n\r\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\r\n const {\r\n resources: { emailDeliveryText }\r\n } = input;\r\n\r\n return {\r\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\r\n label: {emailDeliveryText}\r\n };\r\n };\r\n\r\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\r\n return items.map(cartLine => {\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const isPickUp = _getCartPickDeliveryMode(cartLine);\r\n const isEmailDelivery =\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\r\n return {\r\n LineId: cartLine.LineId || '',\r\n LineItem: { className: 'ms-checkout__line-item' },\r\n item: _getLineItemComponent(cartLine),\r\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\r\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\r\n };\r\n });\r\n };\r\n\r\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode ===\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode !==\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? shippingCountCheckoutLineItem\r\n : type === 'pickup'\r\n ? inStorePickUpLabel\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _countItems = (items: CartLine[]): number => {\r\n return items.reduce((count, item) => {\r\n return count + (item.Quantity || 0);\r\n }, 0);\r\n };\r\n\r\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n if (type === 'ship') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n } else if (type === 'pickup') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\r\n );\r\n }\r\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\r\n };\r\n\r\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\r\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\r\n return;\r\n }\r\n\r\n const items = _filterItemsByDiliveryType(type);\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const count = _countItems(items);\r\n const title = _getGroupTitleComponent(count, type);\r\n\r\n return {\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(items)\r\n };\r\n };\r\n\r\n const _getLineItems = (): ILineItems | undefined => {\r\n const {\r\n context,\r\n config: { lineItemsHeading },\r\n data: { products },\r\n resources: { editCartText }\r\n } = input;\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\r\n Header: { className: 'ms-checkout__line-items-header' },\r\n heading: lineItemsHeading && lineItemsHeading.text && (\r\n \r\n ),\r\n editLink: (\r\n \r\n {editCartText}\r\n \r\n ),\r\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\r\n itemsForShip: _getLineItemsByDeliveryType('ship'),\r\n itemsForEmail: _getLineItemsByDeliveryType('email'),\r\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\r\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\r\n : undefined\r\n };\r\n };\r\n\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { lineItemsHeading }\r\n } = input;\r\n if (lineItemsHeading) {\r\n lineItemsHeading.text = event.target.value;\r\n }\r\n };\r\n\r\n const _getGroupTitleComponentWithMultiplePickUp = (\r\n count: number,\r\n type: deliveryType,\r\n deliveryMode?: string,\r\n fulFillmentStoreId?: string\r\n ): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n let pickupDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\r\n ? pickupDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\r\n });\r\n\r\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? `(${count} ${suffix})`\r\n : type === 'pickup'\r\n ? `${pickupTitle} (${count} ${suffix})`\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cart.CartLines);\r\n const cartLinesGroup: CartLine[] = [];\r\n const cartLinesGrp: CartLine[][] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\r\n // @ts-expect-error\r\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n Object.keys(cartLinesGroup).forEach(key => {\r\n const cartLines = cartLinesGroup[key];\r\n Object.keys(cartLines).forEach(index => {\r\n const cartLine = cartLines[index];\r\n cartLinesGrp.push(cartLine);\r\n });\r\n });\r\n\r\n return cartLinesGrp;\r\n };\r\n\r\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\r\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: { multiplePickUpLabel, shippingLable }\r\n } = input;\r\n\r\n const items = _filterItemsByMultiplePickupMode();\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\r\n items.map(item => {\r\n const count = _countItems(item);\r\n const cartLine = item[0];\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const type: deliveryType =\r\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\r\n ? 'pickup'\r\n : cartLine.FulfillmentStoreId === '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n ? 'email'\r\n : 'ship';\r\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\r\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\r\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\r\n lineItemDeliveryGroup.push({\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n lineItemWraperIcon:
,\r\n lineItemWraper:
{groupTitle}
,\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(item)\r\n });\r\n });\r\n\r\n return lineItemDeliveryGroup;\r\n };\r\n\r\n return _getLineItems();\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IAbsoluteCheckoutRecaptchaData } from '../absolute-checkout-recaptcha.data';\r\nimport { IAbsoluteCheckoutRecaptchaProps } from '../absolute-checkout-recaptcha.props.autogenerated';\r\n\r\nexport interface IOrderSummary {\r\n orderSummaryProps: INodeProps;\r\n heading?: React.ReactNode;\r\n lines?: IOrderSummaryLines;\r\n}\r\nexport const getOrderSummary = (input: IAbsoluteCheckoutRecaptchaProps): IOrderSummary => {\r\n const {\r\n config: { orderSummaryHeading },\r\n data: { checkout },\r\n resources: {\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n otherCharges\r\n },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutState = get(checkout, 'result');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\r\n const channelConfiguration = context.request.channel!;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n\r\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { orderSummaryHeading }\r\n } = input;\r\n if (orderSummaryHeading) {\r\n orderSummaryHeading.text = event.target.value;\r\n }\r\n };\r\n\r\n return {\r\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n heading: orderSummaryHeading && orderSummaryHeading.text && (\r\n \r\n ),\r\n lines: showLineItems\r\n ? OrderSummary({\r\n checkoutState,\r\n cart,\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n context,\r\n typeName,\r\n id,\r\n channelConfiguration,\r\n telemetry,\r\n otherChargeLabel: otherCharges,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\r\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface ICheckoutGuidedCardProps {\r\n step: number;\r\n title?: HeadingType;\r\n disabled?: boolean; // Module is not available\r\n isActive?: boolean; // Step === currentStep\r\n isVisted?: boolean; // Step < currentStep\r\n isExpanded?: boolean;\r\n isReady?: boolean;\r\n isPending?: boolean;\r\n isUpdating?: boolean;\r\n isSubmitting?: boolean;\r\n isCancelAllowed?: boolean;\r\n isMobile?: boolean;\r\n hasInitialized?: boolean;\r\n hasControlGroup?: boolean;\r\n children: React.ReactNode;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n onNext(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedCard component.\r\n * @extends {React.Component}\r\n */\r\nclass CheckoutGuidedCard extends React.PureComponent {\r\n private readonly editButtonRef: React.RefObject = React.createRef();\r\n\r\n private readonly formCardRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: ICheckoutGuidedCardProps) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\r\n /**\r\n * Move to next step when current step is ready.\r\n */\r\n const { isActive, isReady, onNext, isVisted, onEdit } = this.props;\r\n\r\n // Move to next step after completing the current step\r\n if (isActive && isReady) {\r\n onNext();\r\n }\r\n\r\n // Set the focus to Edit button once edit button appear\r\n // (It happens when current step switch to isReady status)\r\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\r\n const canEdit = isReady && isVisted && !!onEdit;\r\n if (!prevCanEdit && canEdit) {\r\n this.focusOnEditButton();\r\n this.scrollToTitle();\r\n }\r\n\r\n // Set the focus to the first focusable element\r\n // (It happens when current step switch to isUpdating status)\r\n if (prevProps.isReady && !isReady) {\r\n this.focusOnFirstFocusableElement();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n title,\r\n disabled,\r\n isExpanded,\r\n isActive,\r\n isVisted,\r\n children,\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n hasInitialized,\r\n hasControlGroup,\r\n onEdit,\r\n resource\r\n } = this.props;\r\n const { changeBtnLabel } = resource;\r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\r\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\r\n\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
{children}
\r\n\r\n {this.renderFooder()}\r\n
\r\n \r\n );\r\n }\r\n\r\n private readonly renderFooder = (): JSX.Element | null => {\r\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\r\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\r\n\r\n const canSubmit = !isReady && onSubmit;\r\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\r\n\r\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\r\n return null;\r\n }\r\n\r\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\r\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
\r\n {canSubmit && (\r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n private readonly focusOnFirstFocusableElement = (): void => {\r\n const node = this.formCardRef.current as HTMLElement;\r\n const focussableElements = `\r\n a:not([disabled]),\r\n button:not([disabled]),\r\n input[type=submit]:not([disabled]),\r\n input[type=checkbox]:not([disabled]),\r\n input[type=text]:not([disabled]),\r\n input[type=radio]:not([disabled]),\r\n input[type=password]:not([disabled]),\r\n select:not([disabled]),\r\n textarea:not([disabled]),\r\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\r\n `;\r\n\r\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\r\n child && child.focus && child.focus();\r\n };\r\n\r\n private readonly focusOnEditButton = (): void => {\r\n // Focus on edit button\r\n const editButton =\r\n this.editButtonRef &&\r\n this.editButtonRef.current &&\r\n this.editButtonRef.current.focus &&\r\n (this.editButtonRef.current as HTMLElement);\r\n editButton && editButton.focus();\r\n };\r\n\r\n private readonly scrollToTitle = (): void => {\r\n // Scroll window to the title of the step that was just completed only in mobile viewport\r\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\r\n formCard && formCard.scrollIntoView();\r\n };\r\n\r\n private readonly getTitle = (): JSX.Element => {\r\n const { step, title } = this.props;\r\n const { headingTag: Tag = 'h2', text = '' } = title || {};\r\n return (\r\n \r\n \r\n {step + 1}. {` `}\r\n \r\n {text && {text}}\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedCard;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport { computed } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport GuidedCard from './guided-card';\r\n\r\nexport interface ICheckoutGuidedFormProps {\r\n items: React.ReactNode[];\r\n moduleState: IModuleStateManager;\r\n disableGuidedCheckoutFlow?: boolean;\r\n isMobile?: boolean;\r\n isEditor?: boolean;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n hasError?: boolean;\r\n hasShippingAddress?: boolean | undefined;\r\n hasCartDeliveryMode?: boolean | undefined;\r\n hasGuestCheckoutEmail?: boolean | undefined;\r\n isTermsAndConditionAccepted?: boolean | undefined;\r\n}\r\n\r\ninterface ICheckoutGuidedFormState {\r\n currentStep: number;\r\n}\r\n\r\nconst paymentInstrumentModuleId = 'payment-instrument';\r\n\r\n/**\r\n *\r\n * CheckoutGuidedForm component.\r\n * @extends {React.Component}\r\n */\r\n@observer\r\nclass CheckoutGuidedForm extends React.PureComponent {\r\n @computed public get hasMissingInfo(): boolean {\r\n if (\r\n this.props.hasShippingAddress === false ||\r\n this.props.hasCartDeliveryMode === false ||\r\n this.props.hasGuestCheckoutEmail === false ||\r\n this.props.isTermsAndConditionAccepted === false\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n @computed public get hasOrderError(): boolean {\r\n for (const item of this.props.items) {\r\n const childId = this.getId(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public state: ICheckoutGuidedFormState = {\r\n currentStep: 0\r\n };\r\n\r\n public componentDidMount(): void {\r\n /**\r\n * Append child modules.\r\n */\r\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n this.props.moduleState.init({ childIds });\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { moduleState, items, resource } = this.props;\r\n if (!items || !moduleState) {\r\n return null;\r\n }\r\n\r\n const shouldCollapseAfterRedirect =\r\n this.props.isPaymentVerificationRedirection &&\r\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n !this.props.hasError &&\r\n !this.hasMissingInfo &&\r\n !this.hasOrderError;\r\n\r\n return (\r\n
\r\n {items.map((item: React.ReactNode) => {\r\n const childId = this.getId(item);\r\n const step = this.getStep(childId);\r\n const title = this.getHeading(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n const {\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n isDisabled,\r\n isCancelAllowed,\r\n onEdit,\r\n onCancel,\r\n onSubmit,\r\n hasModuleState,\r\n hasInitialized\r\n } = state || ({} as IModuleStateManager);\r\n return (\r\n \r\n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n private readonly getEnabledModules = (): string[] => {\r\n const {\r\n moduleState: { childIds, getModule }\r\n } = this.props;\r\n return childIds.filter((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && !state.isDisabled;\r\n });\r\n };\r\n\r\n private readonly getStep = (id: string): number => {\r\n return this.getEnabledModules().indexOf(id);\r\n };\r\n\r\n private readonly getId = (item: React.ReactNode): string => {\r\n return get(item, 'props.id') || '';\r\n };\r\n\r\n private readonly getHeading = (item: React.ReactNode): Heading => {\r\n return get(item, 'props.config.heading') || '';\r\n };\r\n\r\n private readonly isExpanded = (step: number): boolean => {\r\n if (this.props.isEditor) {\r\n // Editorial mode: Expand all the drawers\r\n return true;\r\n }\r\n return step > -1 && step <= this.state.currentStep;\r\n };\r\n\r\n private readonly isActive = (step: number): boolean => {\r\n return step === this.state.currentStep;\r\n };\r\n\r\n private readonly isVisted = (step: number): boolean => {\r\n return step > -1 && step < this.state.currentStep;\r\n };\r\n\r\n private readonly onNext = (): void => {\r\n this.setState({\r\n currentStep: this.state.currentStep + 1\r\n });\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedForm;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICheckoutPlaceOrderButtonProps {\r\n canPlaceOrder: boolean;\r\n checkoutBtnText: string;\r\n telemetryContent?: ITelemetryContent;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n isExpressCheckoutApplied?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n placeOrder(): Promise;\r\n}\r\n\r\nconst buttonsStates: React.Dispatch>[] = [];\r\n\r\n/**\r\n * On place order function.\r\n * @param isBusy -Check is busy.\r\n * @param canPlaceOrder -Check can place order.\r\n * @param placeOrder -Place order function.\r\n * @returns Set state of button.\r\n */\r\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\r\n if (isBusy || !canPlaceOrder) {\r\n return;\r\n }\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(true);\r\n return true;\r\n });\r\n await placeOrder();\r\n};\r\n\r\nconst CheckoutPlaceOrderButton: React.FC = ({\r\n checkoutBtnText,\r\n canPlaceOrder,\r\n placeOrder,\r\n telemetryContent,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n isPlaceOrderLoading,\r\n isExpressCheckoutApplied,\r\n isPaymentVerificationRedirection\r\n}) => {\r\n const [isBusy, setIsBusy] = useState(false);\r\n buttonsStates.push(setIsBusy);\r\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutPlaceOrderButton;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { checkoutAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { getTenderTypesAsync, resolveCardTypesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport {\r\n Address,\r\n CardPaymentAcceptResult,\r\n CardType,\r\n CartTenderLine,\r\n RetailOperation,\r\n SalesOrder,\r\n TenderType,\r\n TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nexport const OPERATIONS = {\r\n PayCard: 201,\r\n PayGiftCertificate: 214,\r\n PayLoyalty: 207,\r\n PayCustomerAccount: 202\r\n};\r\n\r\nconst getCardTypeId = async (ctx: IActionContext, cardPrefix: string = ''): Promise => {\r\n try {\r\n const response = await resolveCardTypesAsync({ callerContext: ctx }, cardPrefix, CardType.Unknown);\r\n if (response && response.length > 0) {\r\n return response[0].TypeId;\r\n }\r\n } catch (error) {\r\n ctx.telemetry.error('Call to resolveCardTypesAsync failed.', error);\r\n }\r\n return undefined;\r\n};\r\n\r\nconst findTenderIdTypeByOperationId = (tenderTypes: TenderType[], operationId: RetailOperation): string | undefined => {\r\n const matchedTenderType = tenderTypes.find(tenderType => tenderType.OperationId === operationId);\r\n if (matchedTenderType) {\r\n return matchedTenderType.TenderTypeId;\r\n }\r\n return;\r\n};\r\n\r\nconst roundNumber = (value: number) => Number(value.toFixed(2));\r\n\r\nasync function getLoyaltyTenderLine(\r\n ctx: IActionContext,\r\n LoyaltyCardId: string,\r\n Amount: number = 0,\r\n Currency: string = 'USD'\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get gift card tender line');\r\n }\r\n\r\n const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayLoyalty);\r\n return {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n LoyaltyCardId\r\n };\r\n}\r\n\r\nasync function getGiftCardTenderLine(\r\n ctx: IActionContext,\r\n GiftCardId: string = '',\r\n Amount: number = 0,\r\n Currency: string = 'USD',\r\n tenderTypeId?: string,\r\n giftCardPin?: string,\r\n giftCardExpirationYear?: number,\r\n giftCardExpirationMonth?: number\r\n): Promise {\r\n let TenderTypeId = tenderTypeId;\r\n\r\n if (!TenderTypeId) {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get gift card tender line');\r\n }\r\n TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayGiftCertificate);\r\n }\r\n\r\n const GiftCardPin = giftCardPin;\r\n const GiftCardExpirationYear = giftCardExpirationYear;\r\n const GiftCardExpirationMonth = giftCardExpirationMonth;\r\n return {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n GiftCardId,\r\n GiftCardPin,\r\n GiftCardExpirationYear,\r\n GiftCardExpirationMonth\r\n };\r\n}\r\n\r\nasync function getCreditCardTenderLine(\r\n ctx: IActionContext,\r\n tokenizedPaymentCard: TokenizedPaymentCard,\r\n cardPrefix: string = '',\r\n Amount: number = 0,\r\n Currency: string = 'USD',\r\n billingAddress?: Address\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n let cartTypeId = tokenizedPaymentCard.CardTypeId;\r\n\r\n if (!cartTypeId) {\r\n cartTypeId = await getCardTypeId(ctx, cardPrefix);\r\n }\r\n\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get card tender type');\r\n }\r\n\r\n if (!cartTypeId) {\r\n throw new Error('Fail to get card type id');\r\n }\r\n\r\n const TenderTypeId = tokenizedPaymentCard.TenderType ?? findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\r\n const cardTenderLine: CartTenderLine = {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n Amount,\r\n TenderTypeId,\r\n CardTypeId: cartTypeId\r\n };\r\n cardTenderLine.TokenizedPaymentCard = {\r\n ...tokenizedPaymentCard,\r\n CardTypeId: cartTypeId,\r\n\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.TokenizedPaymentCard',\r\n House: tokenizedPaymentCard.House || 'N/A',\r\n ...(tokenizedPaymentCard.CardTokenInfo && {\r\n CardTokenInfo: {\r\n ...tokenizedPaymentCard.CardTokenInfo,\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CardTokenInfo'\r\n }\r\n }),\r\n ...(billingAddress && {\r\n Phone: billingAddress.Phone,\r\n Country: billingAddress.ThreeLetterISORegionName,\r\n Address1: billingAddress.Street,\r\n City: billingAddress.City,\r\n State: billingAddress.State,\r\n Zip: billingAddress.ZipCode\r\n })\r\n };\r\n\r\n return cardTenderLine;\r\n}\r\n\r\n/**\r\n * Get credit card tender line.\r\n * @param context - Action context.\r\n * @param amount - Due amount for credit card.\r\n * @param currency - Currency.\r\n * @param cardPaymentAcceptResult - CardPaymentAcceptResult.\r\n * @param billingAddress - BillingAddress.\r\n * @returns - The credit card tender line.\r\n */\r\nasync function getCreditCardTenderLineForSinglePaymentAuth(\r\n context: IActionContext,\r\n amount: number = 0,\r\n currency: string = 'USD',\r\n cardPaymentAcceptResult?: CardPaymentAcceptResult,\r\n billingAddress?: Address\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: context, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n const tenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\r\n\r\n if (cardPaymentAcceptResult) {\r\n cardPaymentAcceptResult.TokenizedPaymentCard = {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.TokenizedPaymentCard',\r\n House: 'N/A',\r\n ...(billingAddress && {\r\n Phone: billingAddress.Phone,\r\n Country: billingAddress.ThreeLetterISORegionName,\r\n Address1: billingAddress.Street,\r\n City: billingAddress.City,\r\n State: billingAddress.State,\r\n Zip: billingAddress.ZipCode\r\n })\r\n };\r\n }\r\n\r\n const cardTenderLine: CartTenderLine = {\r\n // @ts-expect-error -- existing data.\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency: currency,\r\n Amount: amount,\r\n TenderTypeId: tenderTypeId,\r\n CardPaymentAcceptResult: cardPaymentAcceptResult\r\n };\r\n\r\n return cardTenderLine;\r\n}\r\n\r\nasync function createCustomerAccountTenderLine(ctx: IActionContext, Amount: number, Currency: string = 'USD'): Promise {\r\n const CustomerId = null;\r\n if (!ctx.requestContext.user.isAuthenticated) {\r\n ctx.telemetry.error('A customer id is required to pay with customer account');\r\n }\r\n\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!tenderTypes) {\r\n ctx.telemetry.error('No tender types found for this channel');\r\n }\r\n\r\n const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCustomerAccount);\r\n if (!TenderTypeId) {\r\n ctx.telemetry.error('No customer account tender type');\r\n }\r\n return {\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n\r\n // @ts-expect-error\r\n CustomerId\r\n };\r\n}\r\n\r\nexport default async (\r\n ctx: IActionContext,\r\n updatedCartVersion?: number,\r\n isPaymentVerificationRedirection?: boolean\r\n): Promise => {\r\n const checkoutState = await getCheckoutState(ctx).catch(error => {\r\n throw error;\r\n });\r\n\r\n const cartState = checkoutState.checkoutCart;\r\n\r\n const channelConfiguration = ctx.requestContext.channel;\r\n\r\n if (!cartState || Object.keys(cartState).length === 0 || !channelConfiguration) {\r\n throw new Error('Fail to placeOrder');\r\n }\r\n\r\n const {\r\n giftCardExtends,\r\n tokenizedPaymentCard,\r\n cardPrefix,\r\n guestCheckoutEmail,\r\n billingAddress,\r\n loyaltyAmount,\r\n cardPaymentAcceptResult,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n isExpressCheckoutApplied,\r\n isExpressAddressApplied\r\n } = checkoutState;\r\n const { Currency } = channelConfiguration;\r\n\r\n let amountDue = cartState.cart.AmountDue || 0;\r\n let cartTenderLines;\r\n const getTenderLinePromises = [];\r\n const loyaltyCardNumber = cartState.cart.LoyaltyCardId;\r\n\r\n // Pay by loyalty first\r\n if (loyaltyAmount && loyaltyCardNumber) {\r\n const chargedAmount = roundNumber(Math.min(loyaltyAmount, amountDue));\r\n const loyaltyTenderLinePromise = getLoyaltyTenderLine(ctx, loyaltyCardNumber, chargedAmount, Currency);\r\n getTenderLinePromises.push(loyaltyTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n\r\n ctx.telemetry.information('Checkout loyalty tender line is added.');\r\n } else {\r\n ctx.telemetry.information('Checkout loyalty tender line is not added when no loyaltyAmount or loyaltyCardNumber.');\r\n }\r\n\r\n // Then by gift card\r\n if (giftCardExtends && giftCardExtends.length > 0) {\r\n giftCardExtends.some(giftCardExtend => {\r\n if (giftCardExtend.Balance && amountDue > 0) {\r\n const chargedAmount = roundNumber(Math.min(giftCardExtend.Balance, amountDue));\r\n const tenderTypeId = giftCardExtend.TenderTypeId;\r\n const giftCardPin = giftCardExtend.Pin;\r\n const giftCardExpirationYear = giftCardExtend.ExpirationDate\r\n ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[1], 10)\r\n : undefined;\r\n const giftCardExpirationMonth = giftCardExtend.ExpirationDate\r\n ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[0], 10)\r\n : undefined;\r\n const creditCardTenderLinePromise = getGiftCardTenderLine(\r\n ctx,\r\n giftCardExtend.Id,\r\n chargedAmount,\r\n Currency,\r\n tenderTypeId,\r\n giftCardPin,\r\n giftCardExpirationYear,\r\n giftCardExpirationMonth\r\n );\r\n getTenderLinePromises.push(creditCardTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n\r\n ctx.telemetry.information('Checkout gift card tender line is added.');\r\n } else {\r\n ctx.telemetry.information('Checkout gift card tender line is not added when no balance or no remaining balance.');\r\n }\r\n return amountDue === 0;\r\n });\r\n }\r\n\r\n // Then by customer account\r\n if (checkoutState.customerAccountAmount > 0) {\r\n const chargedAmount = roundNumber(Math.min(checkoutState.customerAccountAmount, amountDue));\r\n const customerAccountTenderLinePromise = createCustomerAccountTenderLine(ctx, chargedAmount, Currency);\r\n getTenderLinePromises.push(customerAccountTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n\r\n ctx.telemetry.information('Checkout customer account amount tender line is added.');\r\n } else {\r\n ctx.telemetry.information('Checkout customer account amount tender line is not added when customerAccountAmount is 0.');\r\n }\r\n\r\n // Pay the rest by credit card\r\n if (amountDue > 0) {\r\n let creditCardTenderLinePromise: Promise;\r\n\r\n if (\r\n shouldEnableSinglePaymentAuthorizationCheckout &&\r\n (!(isExpressCheckoutApplied && !isExpressAddressApplied) || (isExpressCheckoutApplied && isPaymentVerificationRedirection))\r\n ) {\r\n creditCardTenderLinePromise = getCreditCardTenderLineForSinglePaymentAuth(\r\n ctx,\r\n amountDue,\r\n Currency,\r\n cardPaymentAcceptResult,\r\n billingAddress\r\n );\r\n } else {\r\n if (!tokenizedPaymentCard) {\r\n throw new Error('Fail to placeOrder: no token found');\r\n }\r\n creditCardTenderLinePromise = getCreditCardTenderLine(\r\n ctx,\r\n tokenizedPaymentCard,\r\n cardPrefix,\r\n amountDue,\r\n Currency,\r\n billingAddress\r\n );\r\n }\r\n\r\n getTenderLinePromises.push(creditCardTenderLinePromise);\r\n\r\n ctx.telemetry.information('Checkout credit card tender line is added.');\r\n } else {\r\n ctx.telemetry.information('Checkout credit card tender line is not added when no remaining balance for credit card.');\r\n }\r\n\r\n if (getTenderLinePromises.length > 0) {\r\n // When payment methods is required\r\n cartTenderLines = await Promise.all(getTenderLinePromises).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!cartTenderLines || cartTenderLines.length === 0) {\r\n throw new Error('Fail to placeOrder: fail to get cart tender lines');\r\n }\r\n } else {\r\n ctx.telemetry.information('TenderLinePromises length is 0.');\r\n }\r\n\r\n const cartVersion = updatedCartVersion || cartState.cart.Version;\r\n\r\n ctx.telemetry.information('Checkout checkoutAsync is called.');\r\n\r\n // Proceed checkout\r\n const salesOrder = await checkoutAsync(\r\n { callerContext: ctx, bypassCache: 'get' },\r\n cartState.cart.Id,\r\n guestCheckoutEmail,\r\n undefined,\r\n undefined,\r\n cartTenderLines || null,\r\n cartVersion\r\n ).catch(async error => {\r\n if (checkoutState.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\r\n if (error.data?.AdditionalContext) {\r\n ctx.telemetry.warning('CheckoutAsync call failed. AdditionalContext is sent for single payment auth.');\r\n\r\n await checkoutState.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\r\n await checkoutState.updateRedirectAdditionalContext({\r\n newRedirectAdditionalContext: error?.data?.AdditionalContext as string\r\n });\r\n await checkoutState.updateRedirectPaymentConnectorId({\r\n newRedirectPaymentConnectorId: cardPaymentAcceptResult?.Settings?.PaymentConnectorId as string\r\n });\r\n } else {\r\n ctx.telemetry.warning('CheckoutAsync call failed. AdditionalContext is not sent for single payment auth.');\r\n\r\n await checkoutState.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\r\n\r\n await checkoutState.updateCheckoutErrorPaymentConnectorId({\r\n newCheckoutErrorPaymentConnectorId: cardPaymentAcceptResult?.Settings?.PaymentConnectorId as string\r\n });\r\n\r\n if (isPaymentVerificationRedirection) {\r\n ctx.telemetry.warning('RefreshCart when isPaymentVerificationRedirection is true.');\r\n\r\n await checkoutState.checkoutCart.refreshCart({});\r\n await checkoutState.updateIsExpressCheckoutApplied({ newIsExpressCheckoutApplied: false });\r\n await checkoutState.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: false });\r\n }\r\n }\r\n }\r\n\r\n throw error;\r\n });\r\n\r\n if (!salesOrder) {\r\n ctx.telemetry.error('Failed to placeOrder: fail to checkout.');\r\n throw new Error('Fail to placeOrder: fail to checkout');\r\n }\r\n\r\n return salesOrder;\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCartState, getCheckoutState } from '@msdyn365-commerce/global-state';\r\n\r\nasync function emptyActiveCart(ctx: IActionContext): Promise {\r\n let cartState;\r\n let checkoutState;\r\n const lineItemIdsToRemove = [];\r\n\r\n try {\r\n cartState = await getCartState(ctx);\r\n checkoutState = await getCheckoutState(ctx);\r\n } catch (error) {\r\n throw error;\r\n }\r\n\r\n if (!cartState || !cartState.cart) {\r\n throw new Error('Fail to fetch active cart');\r\n }\r\n\r\n if (!checkoutState || !checkoutState.checkoutCart) {\r\n throw new Error('Fail to fetch checkoutCart cart');\r\n }\r\n\r\n const activeCart = cartState.cart;\r\n const checkoutCart = checkoutState.checkoutCart.cart;\r\n\r\n for (const activeCartLine of activeCart.CartLines || []) {\r\n for (const checkoutCartLine of checkoutCart.CartLines || []) {\r\n if (activeCartLine.LineId && activeCartLine.LineId === checkoutCartLine.LineId) {\r\n lineItemIdsToRemove.push(activeCartLine.LineId);\r\n }\r\n }\r\n }\r\n\r\n try {\r\n await cartState.removeCartLines({ cartLineIds: lineItemIdsToRemove });\r\n await cartState.removeAllPromoCodes({});\r\n await checkoutState.removeCheckoutCartId({});\r\n } catch (error) {\r\n throw error;\r\n }\r\n}\r\n\r\nexport default emptyActiveCart;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n updateLineDeliverySpecificationsAsync,\r\n validateForCheckoutAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n Address,\r\n DeliveryPreferenceType,\r\n LineDeliverySpecification,\r\n SimpleProduct,\r\n TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getAvailabilitiesForCartLineItems,\r\n IProductInventoryInformation,\r\n ProductAvailabilitiesForCartLineItems,\r\n validateCartLinesInventory\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { ErrorLocation } from '@msdyn365-commerce/global-state';\r\nimport classnames from 'classnames';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport { action, computed, get, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\n//@ts-ignore\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\n\r\n// This is the production key\r\nconst TEST_SITE_KEY = \"6LcClc0ZAAAAAKoN2AsxwRRd4GMtD_yUG5AwXEhl\";\r\n// This is the test key\r\n//const TEST_SITE_KEY = \"6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\";\r\nconst DELAY = 1500;\r\n\r\nimport { IAbsoluteCheckoutRecaptchaData } from './absolute-checkout-recaptcha.data';\r\nimport { ICheckoutHeadingData, IAbsoluteCheckoutRecaptchaProps } from './absolute-checkout-recaptcha.props.autogenerated';\r\nimport AlertComponent from './components/alert';\r\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { getLineItems, ILineItems } from './components/get-line-items';\r\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\r\nimport GuidedFormComponent from './components/guided-form';\r\nimport PlaceOrderButtonComponent from './components/place-order-button';\r\nimport placeOrder from './methods/place-order';\r\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport * from './components/get-line-items';\r\nexport * from './components/get-order-summary';\r\n\r\n/**\r\n * Device type.\r\n */\r\ntype DeviceType = 'Mobile';\r\n\r\n/**\r\n * The Checkout state.\r\n */\r\ninterface ICheckoutState {\r\n callback: string;\r\n value: any;\r\n load: boolean;\r\n expired: string;\r\n errorMessage: string;\r\n isValidationPassed: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n}\r\n\r\n/**\r\n * The Checkout view props.\r\n * @extends IAbsoluteCheckoutRecaptchaProps\r\n */\r\nexport interface ICheckoutViewProps extends IAbsoluteCheckoutRecaptchaProps {\r\n className: string;\r\n canShow?: boolean;\r\n isEmptyCart?: boolean;\r\n isConsentGiven?: boolean;\r\n hasError?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n cartStatus?: string;\r\n isMobile?: boolean;\r\n isEditorialMode?: boolean;\r\n backToShoppingUrl?: string;\r\n editCartLink?: string;\r\n hasSalesOrder: boolean;\r\n hasInvoiceLine?: boolean;\r\n\r\n checkoutProps: IModuleProps;\r\n headerProps: INodeProps;\r\n bodyProps: INodeProps;\r\n mainProps: INodeProps;\r\n mainControlProps: INodeProps;\r\n sideProps: INodeProps;\r\n sideControlFirstProps: INodeProps;\r\n sideControlSecondProps: INodeProps;\r\n termsAndConditionsProps: INodeProps;\r\n\r\n guidedForm?: React.ReactNode;\r\n title?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n orderSummary?: IOrderSummary;\r\n invoicePaymentSummary?: IInvoicePaymentSummary;\r\n lineItems?: ILineItems;\r\n placeOrderButton?: React.ReactNode;\r\n termsAndConditions?: React.ReactNode;\r\n keepShoppingButton?: React.ReactNode;\r\n orderConfirmation?: React.ReactNode;\r\n\r\n checkoutExpressPaymentContainer?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * The checkout module props interface.\r\n */\r\nexport interface ICheckoutModuleProps extends IAbsoluteCheckoutRecaptchaProps, IModuleStateProps {}\r\n\r\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\r\n\r\n/**\r\n *\r\n * CheckoutContainer component.\r\n * @extends {React.Component}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass Checkout extends React.PureComponent {\r\n\r\n \r\n\r\n handleChange = (value: null) => {\r\n console.log(\"Captcha value:\", value);\r\n this.setState({ value });\r\n // if value is null recaptcha expired\r\n if (value === null) this.setState({ expired: \"true\" });\r\n };\r\n\r\n asyncScriptOnLoad = () => {\r\n this.setState({ callback: \"called!\" });\r\n };\r\n\r\n\r\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\r\n return this.props.data.checkout?.status;\r\n }\r\n\r\n @computed get isEmptyCart(): boolean {\r\n if (this.isEditorialMode) {\r\n // Editorial mode: Ignore empty cart\r\n return false;\r\n }\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\r\n }\r\n\r\n @computed get isEditorialMode(): boolean {\r\n return this.props.context.request.params.isEditor;\r\n }\r\n\r\n @computed get canPlaceOrder(): boolean {\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\r\n return (\r\n this.props.moduleState.isReady &&\r\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\r\n (this.state.errorMessage === '' ||\r\n shouldEnableSinglePaymentAuthorizationCheckout ||\r\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false))\r\n );\r\n }\r\n\r\n @computed get isCartReady(): boolean {\r\n return (\r\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\r\n this.props.data.customerInformation.status !== 'LOADING' &&\r\n this.props.data.featureState.status !== 'LOADING'\r\n );\r\n }\r\n\r\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\r\n const properties =\r\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\r\n property => property.Key === 'expressPaymentDetails'\r\n )?.Value?.StringValue ?? '';\r\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\r\n }\r\n\r\n public state: ICheckoutState = {\r\n callback: \"not fired\",\r\n value: null,\r\n load: false,\r\n expired: \"false\",\r\n errorMessage: '',\r\n isValidationPassed: false,\r\n isPlaceOrderLoading: false\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n public componentDidMount(): void {\r\n const {\r\n resources: { genericErrorMessage }\r\n } = this.props;\r\n\r\n setTimeout(() => {\r\n this.setState({ load: true });\r\n }, DELAY);\r\n\r\n\r\n \r\n\r\n when(\r\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\r\n async () => {\r\n if (this.expressPaymentDetailsFromCartPage) {\r\n const {\r\n email,\r\n tenderLine,\r\n tokenizedPaymentCard,\r\n paymentTenderType: paymentTenderTypeFromCartPage,\r\n isExpressCheckoutAppliedInCartPage,\r\n isExpressAddressAppliedInCartPage,\r\n cardPaymentAcceptResult,\r\n address\r\n } = this.expressPaymentDetailsFromCartPage;\r\n\r\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\r\n newEmailAddressFromExpressCheckout: email ?? '',\r\n newTenderLine: tenderLine,\r\n newTokenizedPaymentCard: tokenizedPaymentCard,\r\n newPaymentTenderType: paymentTenderTypeFromCartPage,\r\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\r\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\r\n newCardPaymentAcceptResult: cardPaymentAcceptResult\r\n });\r\n\r\n if (isExpressAddressAppliedInCartPage && address) {\r\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\r\n newBillingAddressFromExpressCheckout: address\r\n });\r\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\r\n newShippingAddressFromExpressCheckout: address\r\n });\r\n } else {\r\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\r\n }\r\n\r\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\r\n newExtensionProperties: [\r\n {\r\n Key: 'expressPaymentDetails',\r\n Value: { StringValue: '' }\r\n }\r\n ]\r\n });\r\n }\r\n }\r\n );\r\n\r\n when(\r\n () => this.hasError,\r\n () => {\r\n this.setState({\r\n errorMessage: genericErrorMessage\r\n });\r\n this.props.context.telemetry.error('Failed to get cart');\r\n }\r\n );\r\n\r\n when(\r\n () => {\r\n return this.isEmptyCart;\r\n },\r\n () => {\r\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isCartReady,\r\n () => {\r\n this.validateForCheckout();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\r\n async isReady => {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n isReady &&\r\n !this.props.data.checkout.result?.redirectAdditionalContext &&\r\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\r\n ) {\r\n if (!this.state.isPlaceOrderLoading) {\r\n this.setState({ isPlaceOrderLoading: true });\r\n }\r\n\r\n this.props.telemetry.information(\r\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\r\n );\r\n\r\n await this.onPlaceOrder();\r\n\r\n // If 3D authentication redirection, don't update isPlaceOrderLoading\r\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.isBillingAddressHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when redirection is true for new checkout flow.\r\n reaction(\r\n () => this.canPlaceOrder,\r\n async () => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\r\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\r\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\r\n newIsPlaceOrderEnabledInRedirection: true\r\n });\r\n\r\n this.props.telemetry.information(\r\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\r\n );\r\n }\r\n } else {\r\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\r\n }\r\n }\r\n );\r\n\r\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\r\n // Reaction to update the error message when there is a checkout error.\r\n reaction(\r\n () => this.props.data.checkout.result?.checkoutError,\r\n checkoutError => {\r\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.Checkout && checkoutError.errorMessage) {\r\n this._setErrorMessage(checkoutError.errorMessage);\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n // eslint-disable-next-line complexity -- ignore the complexity.\r\n public render(): JSX.Element {\r\n\r\n //@ts-ignore\r\n const { value, load } = this.state || {};\r\n\r\n\r\n const {\r\n moduleState,\r\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\r\n resources,\r\n context: {\r\n request: {\r\n user: { isAuthenticated }\r\n }\r\n }\r\n } = this.props;\r\n const { errorMessage } = this.state;\r\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\r\n const checkoutClass = classnames('ms-checkout', className);\r\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\r\n\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n const isMobile =\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\r\n\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const termsAndConditions =\r\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\r\n\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\r\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\r\n\r\n let hasExpressPaymentContainer = false;\r\n\r\n if (\r\n typeof window !== 'undefined' &&\r\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\r\n ) {\r\n hasExpressPaymentContainer = true;\r\n }\r\n\r\n let viewProps: ICheckoutViewProps = {\r\n ...this.props,\r\n className: checkoutClass,\r\n isEmptyCart: this.isEmptyCart,\r\n isConsentGiven,\r\n hasError: this.hasError,\r\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n hasSalesOrder:\r\n this.props.data.checkout &&\r\n this.props.data.checkout.result !== undefined &&\r\n this.props.data.checkout.result.salesOrder !== undefined,\r\n hasInvoiceLine,\r\n cartStatus: this.cartStatus,\r\n isMobile,\r\n backToShoppingUrl,\r\n editCartLink,\r\n isEditorialMode: this.isEditorialMode,\r\n orderConfirmation:\r\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\r\n ? this.props.slots.orderConfirmation[0]\r\n : undefined,\r\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\r\n headerProps: { className: 'ms-checkout__head' },\r\n bodyProps: { className: 'ms-checkout__body' },\r\n mainProps: { className: 'ms-checkout__main' },\r\n mainControlProps: { className: 'ms-checkout__main-control' },\r\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\r\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\r\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\r\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\r\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\r\n checkoutExpressPaymentContainer\r\n };\r\n\r\n if (!isConsentGiven && isAuthenticated) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else if (this.isLoading()) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: \r\n };\r\n } else if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else {\r\n viewProps = {\r\n ...viewProps,\r\n alert: errorMessage && ,\r\n canShow: true,\r\n guidedForm: checkoutInformation ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n orderSummary: getOrderSummary(this.props),\r\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\r\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\r\n placeOrderButton: (\r\n\r\n <>\r\n \r\n
\r\n

Please confirm you are human to place order

\r\n \r\n
\r\n \r\n {(value !== null) && (\r\n \r\n )}\r\n \r\n\r\n ),\r\n termsAndConditions,\r\n keepShoppingButton: backToShoppingUrl && (\r\n \r\n {backToShopping}\r\n \r\n )\r\n };\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\r\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\r\n if (isLoading) {\r\n return AsyncResultStatusCode.LOADING;\r\n }\r\n\r\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\r\n if (isSuccess) {\r\n return AsyncResultStatusCode.SUCCESS;\r\n }\r\n\r\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\r\n if (isFailed) {\r\n return AsyncResultStatusCode.FAILED;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Renders heading.\r\n * @param checkoutHeading - The checkout heading.\r\n * @returns React node.\r\n */\r\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Event handler for heading change event.\r\n * @param event - The content change event in heading element.\r\n * @returns The new heading value.\r\n */\r\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\r\n (this.props.config.checkoutHeading!.text = event.target.value);\r\n\r\n /**\r\n * Checks if cart is loading.\r\n * @returns True if is loading, false otherwise.\r\n */\r\n private readonly isLoading = (): boolean => {\r\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\r\n };\r\n\r\n /**\r\n * Get slot items.\r\n * @param key - The slot key.\r\n * @returns React node or undefined.\r\n */\r\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\r\n const { slots } = this.props;\r\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\r\n };\r\n\r\n /**\r\n * Trigger the payment section container submit when placing order.\r\n */\r\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\r\n this.setState({ isPlaceOrderLoading: true });\r\n\r\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\r\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\r\n });\r\n };\r\n\r\n /**\r\n * On place order.\r\n * @returns Void promise.\r\n */\r\n private readonly onPlaceOrder = async (): Promise => {\r\n const {\r\n resources: {\r\n checkoutOutOfStockErrorMessage,\r\n genericErrorMessage,\r\n customerCreditLimitExceededErrorMessage,\r\n invalidCartVersionErrorMessage,\r\n missingRequiredCartTenderLinesErrorMessage\r\n },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { enableStockCheck = false }\r\n }\r\n },\r\n slots: { orderConfirmation },\r\n data: { checkout, products }\r\n } = this.props;\r\n\r\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\r\n\r\n // If hasInvoiceLine is true, no inventory check\r\n if (\r\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\r\n enableStockCheck &&\r\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\r\n ) {\r\n this.setState({\r\n errorMessage: checkoutOutOfStockErrorMessage\r\n });\r\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\r\n } else {\r\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\r\n\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n\r\n await placeOrder(\r\n actionContext,\r\n this.props.data.checkout.result,\r\n this.props.data.products.result,\r\n !hasOrderConfirmation,\r\n updatedCartVersion,\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ).catch(error => {\r\n let errorMessage = genericErrorMessage;\r\n\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\r\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\r\n } else if (\r\n error &&\r\n error.name === 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit'\r\n ) {\r\n errorMessage = customerCreditLimitExceededErrorMessage;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n error.data?.AdditionalContext &&\r\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n });\r\n\r\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\r\n }\r\n };\r\n\r\n /**\r\n * Update receipt email address for electronic cart line.\r\n * @param newGuestCheckoutEmail - The guest checkout email.\r\n * @returns The updated cart version.\r\n */\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return {\r\n LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n )\r\n .then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n\r\n /**\r\n * Return true if any product in the cart is over its max quantity.\r\n * @param cart -- The checkout cart.\r\n * @param products -- The checkout products.\r\n * @returns - Is any product in the cart is over max quantity.\r\n */\r\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\r\n let isOverMaxQuantity = false;\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n await getAvailabilitiesForCartLineItems(\r\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\r\n this.props.context.actionContext\r\n )\r\n .then(productInventoryInformation => {\r\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\r\n\r\n cart.CartLines?.map(cartline => {\r\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\r\n\r\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\r\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\r\n const isEmailDelivery =\r\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\r\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\r\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\r\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\r\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n if (foundProductAvailability) {\r\n productsThatShouldValidateInventory.push(foundProductAvailability);\r\n }\r\n }\r\n });\r\n\r\n const cartLinesInventoryValidation = validateCartLinesInventory(\r\n cart.CartLines ?? [],\r\n productsThatShouldValidateInventory,\r\n this.props.context.actionContext,\r\n products,\r\n emailDeliveryModeCode\r\n );\r\n\r\n // If is invalid then exceeds the available quantity\r\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\r\n return isOverMaxQuantity;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\r\n });\r\n\r\n return isOverMaxQuantity;\r\n };\r\n\r\n /**\r\n * Gets active child in module state.\r\n * @returns - The module state manager collection.\r\n */\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n /**\r\n * On container ready.\r\n */\r\n private readonly onContainerReady = (): void => {\r\n this.props.telemetry.information('Checkout onContainerReady is called.');\r\n\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n\r\n /**\r\n * Redirects to cart page.\r\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\r\n */\r\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n if (window && editCartLink) {\r\n window.location.assign(editCartLink);\r\n } else {\r\n this.setState({\r\n errorMessage: this.props.resources.genericErrorMessage\r\n });\r\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\r\n }\r\n };\r\n\r\n /**\r\n * Validates for checkout.\r\n * @param retry - Retry flag.\r\n */\r\n private readonly validateForCheckout = (retry: boolean = true): void => {\r\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\r\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\r\n const { Id, Version } = cart;\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\r\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\r\n if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\r\n if (Version && Id) {\r\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\r\n .then((result: CartLineValidationResults) => {\r\n if (result.ValidationFailuresByCartLines?.length !== 0) {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n cartState\r\n ?.refreshCart({})\r\n .then(() => {\r\n this.validateForCheckout(false);\r\n })\r\n .catch((refreshError: Error) => {\r\n this.props.telemetry.warning(refreshError.message);\r\n this.props.telemetry.debug('Unable to refresh Cart');\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n };\r\n\r\n @action\r\n private readonly _setErrorMessage = (errorMessage: string): void => {\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.setState({\r\n errorMessage\r\n });\r\n };\r\n\r\n /**\r\n * Save the address as Shipping and Billing address.\r\n * @param tokenizedPaymentCard - Tokenized payment card.\r\n */\r\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\r\n const checkoutState = this.props.data.checkout.result;\r\n\r\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\r\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\r\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\r\n\r\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\r\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\r\n }\r\n };\r\n\r\n /**\r\n * Get address from tokenizedPaymentCard.\r\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\r\n * @returns The address.\r\n */\r\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\r\n const address: Address = {\r\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\r\n Name: tokenizedPaymentCard.NameOnCard,\r\n Street: tokenizedPaymentCard.Address1,\r\n StreetNumber: tokenizedPaymentCard.Address2,\r\n City: tokenizedPaymentCard.City,\r\n State: tokenizedPaymentCard.State,\r\n ZipCode: tokenizedPaymentCard.Zip,\r\n Phone: tokenizedPaymentCard.Phone\r\n };\r\n\r\n return address;\r\n };\r\n}\r\n\r\nexport default Checkout;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { SalesOrder, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport checkout from './absolute-checkout-recaptcha';\r\nimport emptyActiveCart from './empty-active-cart';\r\n\r\nexport default async (\r\n ctx: IActionContext,\r\n checkoutState: ICheckoutState | undefined,\r\n orderedProducts: SimpleProduct[] | undefined,\r\n redirect: boolean,\r\n updatedCartVersion?: number,\r\n isPaymentVerificationRedirection?: boolean\r\n) => {\r\n return new Promise(async (resolve: () => void, reject: (reason?: Error) => void) => {\r\n ctx.telemetry.information('Checkout place-order method is triggered.');\r\n\r\n let salesOrder: SalesOrder;\r\n\r\n // Proceed checkout\r\n try {\r\n salesOrder = await checkout(ctx, updatedCartVersion, isPaymentVerificationRedirection);\r\n } catch (error) {\r\n reject(error);\r\n return;\r\n }\r\n\r\n // Remove purchased items from the active cart\r\n try {\r\n ctx.telemetry.information('Checkout emptyActiveCart is called.');\r\n await emptyActiveCart(ctx);\r\n } catch (error) {\r\n reject(error);\r\n return;\r\n }\r\n\r\n if (redirect) {\r\n ctx.telemetry.information('Redirect to order confirmation page.');\r\n\r\n // Redirect to the order confirmation page\r\n const orderConfirmationUrl = getUrlSync('orderConfirmation', ctx) || '';\r\n if (!orderConfirmationUrl) {\r\n reject(new Error('Error: No orderConfirmationUrl'));\r\n return;\r\n }\r\n\r\n const separator = orderConfirmationUrl.includes('?') ? '&' : '?';\r\n const url = `${orderConfirmationUrl}${separator}transactionId=${salesOrder.Id}`;\r\n window.location.assign(url);\r\n } else {\r\n ctx.telemetry.information('Not redirect to order confirmation page.');\r\n\r\n if (checkoutState) {\r\n const result = await checkoutState.updateSalesOrder({\r\n newSalesOrder: salesOrder,\r\n newOrderedProducts: orderedProducts || []\r\n });\r\n\r\n if (result.status === 'FAILED') {\r\n reject(new Error('Error: Updating error state failed'));\r\n return;\r\n }\r\n } else {\r\n reject(new Error('Error: No checkout state'));\r\n return;\r\n }\r\n resolve();\r\n }\r\n });\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './absolute-checkout-recaptcha';\r\nimport { IEmailDelivery } from './components';\r\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n}) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode\r\n}) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {lines.shipping}\r\n {lines.otherCharge}\r\n {lines.tax}\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton,\r\n checkoutExpressPaymentContainer\r\n } = props;\r\n\r\n return (\r\n \r\n {!hasSalesOrder && {title}}\r\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\r\n \r\n )}\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {checkoutExpressPaymentContainer}\r\n {guidedForm}\r\n {termsAndConditions}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && \r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {/* {placeOrderButton}\r\n {keepShoppingButton} */}\r\n \r\n {lineItems && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface IAlertProps {\r\n message: string;\r\n}\r\n\r\nconst CheckoutAlert: React.FC = ({ message }) => (\r\n

\r\n {message}\r\n

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

\r\n { invoiceSummaryTitle }\r\n

,\r\n lines: checkoutCart?.hasInvoiceLine ? InvoiceSummary({\r\n orderTotalLabel: totalAmountLabel,\r\n invoiceLabel,\r\n cart,\r\n context,\r\n typeName,\r\n telemetry,\r\n id,\r\n checkoutState: checkout.result\r\n }) : undefined\r\n };\r\n\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\nimport * as React from 'react';\r\n\r\nimport { ILliCheckoutData } from '../lli-checkout.data';\r\nimport { ILliCheckoutProps } from '../lli-checkout.props.autogenerated';\r\n\r\ntype deliveryType = 'pickup' | 'ship' | 'email';\r\n\r\nexport interface IPickUpAtStore {\r\n PickUpAtStore: INodeProps;\r\n label: React.ReactNode;\r\n location: React.ReactNode;\r\n}\r\n\r\nexport interface IEmailDelivery {\r\n EmailDelivery: INodeProps;\r\n label: React.ReactNode;\r\n}\r\n\r\nexport interface ILineItem {\r\n LineId: string;\r\n LineItem: INodeProps;\r\n item?: React.ReactNode;\r\n pickUpAtStore?: IPickUpAtStore;\r\n emailDelivery?: IEmailDelivery;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroup {\r\n LineItemDeliveryGroup: INodeProps;\r\n LineItemList: INodeProps;\r\n heading: React.ReactNode;\r\n lineItemWraper?: React.ReactNode;\r\n lineItemWraperIcon?: React.ReactNode;\r\n lineItems: ILineItem[];\r\n}\r\n\r\nexport interface ILineItems {\r\n LineItems: INodeProps;\r\n Header: INodeProps;\r\n heading: React.ReactNode;\r\n editLink: React.ReactNode;\r\n itemsForPickup?: ILineItemDeliveryGroup;\r\n itemsForShip?: ILineItemDeliveryGroup;\r\n itemsForEmail?: ILineItemDeliveryGroup;\r\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\r\n}\r\n\r\nexport const getLineItems = (input: ILliCheckoutProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\r\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n const _getDeliveryLocation = (cartLine: CartLine): string => {\r\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\r\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\r\n return '';\r\n }\r\n\r\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\r\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\r\n });\r\n\r\n return locationMatch && locationMatch.OrgUnitName;\r\n };\r\n\r\n const _getProduct = (productId: number): SimpleProduct | undefined => {\r\n const products = get(input, 'data.products.result') || [];\r\n return products.find((_product: SimpleProduct) => {\r\n return productId === _product.RecordId;\r\n });\r\n };\r\n\r\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\r\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n config: { imageSettings, showShippingChargesForLineItems },\r\n resources: {\r\n quantityDisplayString,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount,\r\n configString,\r\n inputQuantityAriaLabel,\r\n discountStringText,\r\n shippingCharges\r\n },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = input;\r\n\r\n if (!product) {\r\n return;\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\r\n const {\r\n resources: { pickUpAtStoreWithLocationText }\r\n } = input;\r\n\r\n return {\r\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\r\n label: \r\n {pickUpAtStoreWithLocationText}\r\n ,\r\n location:
\r\n {pickupDeliveryLocation}\r\n
\r\n };\r\n };\r\n\r\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\r\n const {\r\n resources: { emailDeliveryText }\r\n } = input;\r\n\r\n return {\r\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\r\n label: \r\n {emailDeliveryText}\r\n \r\n };\r\n };\r\n\r\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\r\n return items.map(cartLine => {\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const isPickUp = _getCartPickDeliveryMode(cartLine);\r\n const isEmailDelivery = (cartLine.DeliveryMode && cartLine.DeliveryMode !== '') ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\r\n return {\r\n LineId: cartLine.LineId || '',\r\n LineItem: { className: 'ms-checkout__line-item' },\r\n item: _getLineItemComponent(cartLine),\r\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\r\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\r\n };\r\n });\r\n };\r\n\r\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return (!StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)) ? (retailMultiplePickUpOptionEnabled ? cartLineItem.DeliveryMode === channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === cartLineItem.DeliveryMode) : (cartLineItem.DeliveryMode === pickupDeliveryModeCode)) : false;\r\n };\r\n\r\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return (!StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)) ? (retailMultiplePickUpOptionEnabled ? cartLineItem.DeliveryMode !== channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(deliveryMode => deliveryMode === cartLineItem.DeliveryMode) : (cartLineItem.DeliveryMode !== pickupDeliveryModeCode)) : false;\r\n };\r\n\r\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\r\n const {\r\n resources: {\r\n itemLabel,\r\n itemsLabel,\r\n inStorePickUpLabel,\r\n shippingCountCheckoutLineItem\r\n }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc ? emailDeliveryModeDesc : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)?.Description!;\r\n });\r\n\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title = type === 'ship' ? shippingCountCheckoutLineItem : (type === 'pickup' ? inStorePickUpLabel : `${emailDeliveryModeDesc} (${count} ${suffix})`);\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _countItems = (items: CartLine[]): number => {\r\n return items.reduce((count, item) => {\r\n return count + (item.Quantity || 0);\r\n\r\n }, 0);\r\n };\r\n\r\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n if (type === 'ship') {\r\n return cart.CartLines.filter((\r\n cartLine: CartLine) => ((cartLine.DeliveryMode && cartLine.DeliveryMode !== '') ? (_getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode) : cartLine)\r\n );\r\n } else if (type === 'pickup') {\r\n return cart.CartLines.filter((cartLine: CartLine) => ((cartLine.DeliveryMode && cartLine.DeliveryMode !== '') ? (_getCartPickDeliveryMode(cartLine)) : null)\r\n );\r\n }\r\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\r\n\r\n };\r\n\r\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\r\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\r\n return;\r\n }\r\n\r\n const items = _filterItemsByDiliveryType(type);\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const count = _countItems(items);\r\n const title = _getGroupTitleComponent(count, type);\r\n\r\n return {\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n heading:
\r\n {title}\r\n
,\r\n lineItems: _getLineItemsComponents(items)\r\n };\r\n };\r\n\r\n const _getLineItems = (): ILineItems | undefined => {\r\n const {\r\n context,\r\n config: { lineItemsHeading },\r\n data: { products },\r\n resources: { editCartText }\r\n } = input;\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\r\n Header: { className: 'ms-checkout__line-items-header' },\r\n heading: lineItemsHeading && lineItemsHeading.text && (\r\n \r\n ),\r\n editLink: (\r\n \r\n {editCartText}\r\n \r\n ),\r\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\r\n itemsForShip: _getLineItemsByDeliveryType('ship'),\r\n itemsForEmail: _getLineItemsByDeliveryType('email'),\r\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled ? _getLineItemsByDeliveryTypeWithMulitplePickupMode() : undefined\r\n };\r\n };\r\n\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { lineItemsHeading }\r\n } = input;\r\n lineItemsHeading!.text = event.target.value;\r\n };\r\n\r\n const _getGroupTitleComponentWithMultiplePickUp = (count: number, type: deliveryType, deliveryMode?: string, fulFillmentStoreId?: string): string => {\r\n const {\r\n resources: {\r\n itemLabel,\r\n itemsLabel\r\n }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n let pickupDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc ? emailDeliveryModeDesc : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)?.Description!;\r\n });\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n pickupDeliveryModeDesc = pickupDeliveryModeDesc ? pickupDeliveryModeDesc : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\r\n });\r\n\r\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title = type === 'ship' ? `(${count} ${suffix})` : (type === 'pickup' ? `${pickupTitle} (${count} ${suffix})` : `${emailDeliveryModeDesc} (${count} ${suffix})`);\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => (item.DeliveryMode));\r\n const groupDelivery = getGroupByDelivery(cart.CartLines);\r\n const cartLinesGroup: CartLine[] = [];\r\n const cartLinesGrp: CartLine[][] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\r\n // @ts-expect-error\r\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n Object.keys(cartLinesGroup).forEach(key => {\r\n const cartLines = cartLinesGroup[key];\r\n Object.keys(cartLines).forEach(index => {\r\n const cartLine = cartLines[index];\r\n cartLinesGrp.push(cartLine);\r\n });\r\n });\r\n\r\n return cartLinesGrp;\r\n };\r\n\r\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\r\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: {\r\n multiplePickUpLabel,\r\n shippingLable\r\n }\r\n } = input;\r\n\r\n const items = _filterItemsByMultiplePickupMode();\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\r\n items.map(item => {\r\n const count = _countItems(item);\r\n const cartLine = item[0];\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const type: deliveryType = cartLine.FulfillmentStoreId && cartLine.DeliveryMode ? 'pickup' : (cartLine.FulfillmentStoreId === '' && cartLine.DeliveryMode === emailDeliveryModeCode ? 'email' : 'ship');\r\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\r\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : (type === 'ship' ? shippingLable : 'email');\r\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\r\n lineItemDeliveryGroup.push({\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n lineItemWraperIcon:
,\r\n lineItemWraper:
\r\n {groupTitle}\r\n
,\r\n heading:
\r\n {title}\r\n
,\r\n lineItems: _getLineItemsComponents(item)\r\n });\r\n });\r\n\r\n return lineItemDeliveryGroup;\r\n };\r\n\r\n return _getLineItems();\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { ILliCheckoutData } from '../lli-checkout.data';\r\nimport { ILliCheckoutProps } from '../lli-checkout.props.autogenerated';\r\n\r\nexport interface IOrderSummary {\r\n orderSummaryProps: INodeProps;\r\n heading?: React.ReactNode;\r\n lines?: IOrderSummaryLines;\r\n}\r\nexport const getOrderSummary = (input: ILliCheckoutProps): IOrderSummary => {\r\n const {\r\n config: { orderSummaryHeading },\r\n data: { checkout },\r\n resources: {\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n otherCharges\r\n },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutState = get(checkout, 'result');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\r\n const channelConfiguration = context.request.channel!;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)?.IsEnabled;\r\n\r\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { orderSummaryHeading }\r\n } = input;\r\n orderSummaryHeading!.text = event.target.value;\r\n };\r\n\r\n return {\r\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n heading: orderSummaryHeading && orderSummaryHeading.text && (\r\n \r\n ),\r\n lines: showLineItems ? OrderSummary({\r\n checkoutState,\r\n cart,\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n context,\r\n typeName,\r\n id,\r\n channelConfiguration,\r\n telemetry,\r\n otherChargeLabel: otherCharges,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result\r\n }) : undefined\r\n };\r\n\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport * as React from 'react';\r\nimport ReactDOM from 'react-dom';\r\n\r\nexport interface ICheckoutGuidedCardProps {\r\n step: number;\r\n title?: HeadingType;\r\n disabled?: boolean; // Module is not available\r\n isActive?: boolean; // Step === currentStep\r\n isVisted?: boolean; // Step < currentStep\r\n isExpanded?: boolean;\r\n isReady?: boolean;\r\n isPending?: boolean;\r\n isUpdating?: boolean;\r\n isSubmitting?: boolean;\r\n isCancelAllowed?: boolean;\r\n isMobile?: boolean;\r\n hasInitialized?: boolean;\r\n hasControlGroup?: boolean;\r\n children: React.ReactNode;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n onNext(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedCard component.\r\n * @extends {React.Component}\r\n */\r\nclass CheckoutGuidedCard extends React.PureComponent {\r\n private readonly editButtonRef: React.RefObject = React.createRef();\r\n\r\n private readonly formCardRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n constructor(props: ICheckoutGuidedCardProps) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\r\n /**\r\n * Move to next step when current step is ready.\r\n */\r\n const { isActive, isReady, onNext, isVisted, onEdit } = this.props;\r\n\r\n // Move to next step after completing the current step\r\n if (isActive && isReady) {\r\n onNext();\r\n }\r\n\r\n // Set the focus to Edit button once edit button appear\r\n // (It happens when current step switch to isReady status)\r\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\r\n const canEdit = isReady && isVisted && !!onEdit;\r\n if (!prevCanEdit && canEdit) {\r\n this.focusOnEditButton();\r\n this.scrollToTitle();\r\n }\r\n\r\n // Set the focus to the first focusable element\r\n // (It happens when current step switch to isUpdating status)\r\n if (prevProps.isReady && !isReady) {\r\n this.focusOnFirstFocusableElement();\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n title,\r\n disabled,\r\n isExpanded,\r\n isActive,\r\n isVisted,\r\n children,\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n hasInitialized,\r\n hasControlGroup,\r\n onEdit,\r\n resource\r\n } = this.props;\r\n const { changeBtnLabel } = resource;\r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\r\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\r\n\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
\r\n {children}\r\n
\r\n\r\n {this.renderFooder()}\r\n
\r\n \r\n );\r\n }\r\n\r\n private readonly renderFooder = (): JSX.Element | null => {\r\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\r\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\r\n\r\n const canSubmit = !isReady && onSubmit;\r\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\r\n\r\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\r\n return null;\r\n }\r\n\r\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\r\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n\r\n return (\r\n
\r\n {canSubmit && (\r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n };\r\n\r\n private readonly focusOnFirstFocusableElement = (): void => {\r\n const node = ReactDOM.findDOMNode(this) as HTMLElement;\r\n const focussableElements = `\r\n a:not([disabled]),\r\n button:not([disabled]),\r\n input[type=submit]:not([disabled]),\r\n input[type=checkbox]:not([disabled]),\r\n input[type=text]:not([disabled]),\r\n input[type=radio]:not([disabled]),\r\n input[type=password]:not([disabled]),\r\n select:not([disabled]),\r\n textarea:not([disabled]),\r\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\r\n `;\r\n\r\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\r\n child && child.focus && child.focus();\r\n };\r\n\r\n private readonly focusOnEditButton = (): void => {\r\n // Focus on edit button\r\n const editButton =\r\n this.editButtonRef &&\r\n this.editButtonRef.current &&\r\n this.editButtonRef.current.focus &&\r\n (this.editButtonRef.current as HTMLElement);\r\n editButton && editButton.focus();\r\n };\r\n\r\n private readonly scrollToTitle = (): void => {\r\n // Scroll window to the title of the step that was just completed only in mobile viewport\r\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\r\n formCard && formCard.scrollIntoView();\r\n };\r\n\r\n private readonly getTitle = (): JSX.Element => {\r\n const { step, title } = this.props;\r\n const { headingTag: Tag = 'h2', text = '' } = title || {};\r\n return (\r\n \r\n \r\n {step + 1}\r\n .\r\n {' '}\r\n \r\n {text && \r\n {text}\r\n }\r\n \r\n );\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedCard;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport GuidedCard from './guided-card';\r\n\r\nexport interface ICheckoutGuidedFormProps {\r\n items: React.ReactNode[];\r\n moduleState: IModuleStateManager;\r\n disableGuidedCheckoutFlow?: boolean;\r\n isMobile?: boolean;\r\n isEditor?: boolean;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n}\r\n\r\ninterface ICheckoutGuidedFormState {\r\n currentStep: number;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedForm component.\r\n * @extends {React.Component}\r\n */\r\n@observer\r\nclass CheckoutGuidedForm extends React.PureComponent {\r\n public state: ICheckoutGuidedFormState = {\r\n currentStep: 0\r\n };\r\n\r\n public componentDidMount(): void {\r\n /**\r\n * Append child modules.\r\n */\r\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n this.props.moduleState.init({ childIds });\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { moduleState, items, resource } = this.props;\r\n if (!items || !moduleState) {\r\n return null;\r\n }\r\n\r\n return (\r\n
\r\n {items.map((item: React.ReactNode) => {\r\n const childId = this.getId(item);\r\n const step = this.getStep(childId);\r\n const title = this.getHeading(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n const { isReady, isPending, isUpdating, isDisabled, isCancelAllowed, onEdit, onCancel, onSubmit, hasModuleState, hasInitialized } =\r\n state || ({} as IModuleStateManager);\r\n return (\r\n\r\n \r\n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n private readonly getEnabledModules = (): string[] => {\r\n const {\r\n moduleState: { childIds, getModule }\r\n } = this.props;\r\n return childIds.filter((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && !state.isDisabled;\r\n });\r\n };\r\n\r\n private readonly getStep = (id: string): number => {\r\n return this.getEnabledModules().indexOf(id);\r\n };\r\n\r\n private readonly getId = (item: React.ReactNode): string => {\r\n return get(item, 'props.id') || '';\r\n };\r\n\r\n private readonly getHeading = (item: React.ReactNode): Heading => {\r\n return get(item, 'props.config.heading') || '';\r\n };\r\n\r\n private readonly isExpanded = (step: number): boolean => {\r\n if (this.props.isEditor) {\r\n // Editorial mode: Expand all the drawers\r\n return true;\r\n }\r\n return step > -1 && step <= this.state.currentStep;\r\n };\r\n\r\n private readonly isActive = (step: number): boolean => {\r\n return step === this.state.currentStep;\r\n };\r\n\r\n private readonly isVisted = (step: number): boolean => {\r\n return step > -1 && step < this.state.currentStep;\r\n };\r\n\r\n private readonly onNext = (): void => {\r\n this.setState({\r\n currentStep: this.state.currentStep + 1\r\n });\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedForm;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICheckoutPlaceOrderButtonProps {\r\n canPlaceOrder: boolean;\r\n checkoutBtnText: string;\r\n telemetryContent?: ITelemetryContent;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n placeOrder(): Promise;\r\n}\r\n\r\nconst buttonsStates: React.Dispatch>[] = [];\r\n\r\n/**\r\n * On place order function.\r\n * @param isBusy -Check is busy.\r\n * @param canPlaceOrder -Check can place order.\r\n * @param placeOrder -Place order function.\r\n * @returns Set state of button.\r\n */\r\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\r\n if (isBusy || !canPlaceOrder) {\r\n return;\r\n }\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(true);\r\n return true;\r\n });\r\n await placeOrder();\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(false);\r\n return true;\r\n });\r\n};\r\n\r\nconst CheckoutPlaceOrderButton: React.FC = ({\r\n checkoutBtnText, canPlaceOrder, placeOrder, telemetryContent, shouldEnableSinglePaymentAuthorizationCheckout, isPlaceOrderLoading }) => {\r\n const [isBusy, setIsBusy] = useState(false);\r\n buttonsStates.push(setIsBusy);\r\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout) {\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutPlaceOrderButton;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { checkoutAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n getTenderTypesAsync, resolveCardTypesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport {\r\n Address, CardPaymentAcceptResult, CardType, CartTenderLine, RetailOperation, SalesOrder, TenderType, TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\n\r\nexport const OPERATIONS = {\r\n PayCard: 201,\r\n PayGiftCertificate: 214,\r\n PayLoyalty: 207,\r\n PayCustomerAccount: 202\r\n};\r\n\r\nconst getCardTypeId = async (ctx: IActionContext, cardPrefix: string = ''): Promise => {\r\n try {\r\n const response = await resolveCardTypesAsync({ callerContext: ctx }, cardPrefix, CardType.Unknown);\r\n if (response && response.length > 0) {\r\n return response[0].TypeId;\r\n }\r\n } catch (error) {\r\n ctx.telemetry.error('Call to resolveCardTypesAsync failed.', error);\r\n }\r\n return undefined;\r\n};\r\n\r\nconst findTenderIdTypeByOperationId = (tenderTypes: TenderType[], operationId: RetailOperation): string | undefined => {\r\n const matchedTenderType = tenderTypes.find(tenderType => tenderType.OperationId === operationId);\r\n if (matchedTenderType) {\r\n return matchedTenderType.TenderTypeId;\r\n }\r\n return;\r\n};\r\n\r\nconst roundNumber = (value: number) => Number(value.toFixed(2));\r\n\r\nasync function getLoyaltyTenderLine(\r\n ctx: IActionContext,\r\n LoyaltyCardId: string,\r\n Amount: number = 0,\r\n Currency: string = 'USD'\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get gift card tender line');\r\n }\r\n\r\n const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayLoyalty);\r\n return {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n LoyaltyCardId\r\n };\r\n}\r\n\r\nasync function getGiftCardTenderLine(\r\n ctx: IActionContext,\r\n GiftCardId: string = '',\r\n Amount: number = 0,\r\n Currency: string = 'USD',\r\n tenderTypeId?: string,\r\n giftCardPin?: string,\r\n giftCardExpirationYear?: number,\r\n giftCardExpirationMonth?: number\r\n): Promise {\r\n let TenderTypeId = tenderTypeId;\r\n\r\n if (!TenderTypeId) {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get gift card tender line');\r\n }\r\n TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayGiftCertificate);\r\n }\r\n\r\n const GiftCardPin = giftCardPin;\r\n const GiftCardExpirationYear = giftCardExpirationYear;\r\n const GiftCardExpirationMonth = giftCardExpirationMonth;\r\n return {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n GiftCardId,\r\n GiftCardPin,\r\n GiftCardExpirationYear,\r\n GiftCardExpirationMonth\r\n };\r\n}\r\n\r\nasync function getCreditCardTenderLine(\r\n ctx: IActionContext,\r\n tokenizedPaymentCard: TokenizedPaymentCard,\r\n cardPrefix: string = '',\r\n Amount: number = 0,\r\n Currency: string = 'USD',\r\n billingAddress?: Address\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n let cartTypeId = tokenizedPaymentCard.CardTypeId;\r\n\r\n if (!cartTypeId) {\r\n cartTypeId = await getCardTypeId(ctx, cardPrefix);\r\n }\r\n\r\n if (!tenderTypes) {\r\n throw new Error('Fail to get card tender type');\r\n }\r\n\r\n if (!cartTypeId) {\r\n throw new Error('Fail to get card type id');\r\n }\r\n\r\n const TenderTypeId = tokenizedPaymentCard.TenderType ?? findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\r\n const cardTenderLine: CartTenderLine = {\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n Amount,\r\n TenderTypeId,\r\n CardTypeId: cartTypeId\r\n };\r\n cardTenderLine.TokenizedPaymentCard = {\r\n ...tokenizedPaymentCard,\r\n CardTypeId: cartTypeId,\r\n\r\n // @ts-expect-error\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.TokenizedPaymentCard',\r\n House: tokenizedPaymentCard.House || 'N/A',\r\n ...(tokenizedPaymentCard.CardTokenInfo && {\r\n CardTokenInfo: {\r\n ...tokenizedPaymentCard.CardTokenInfo,\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CardTokenInfo'\r\n }\r\n }),\r\n ...(billingAddress && {\r\n Phone: billingAddress.Phone,\r\n Country: billingAddress.ThreeLetterISORegionName,\r\n Address1: billingAddress.Street,\r\n City: billingAddress.City,\r\n State: billingAddress.State,\r\n Zip: billingAddress.ZipCode\r\n })\r\n };\r\n\r\n return cardTenderLine;\r\n}\r\n\r\n/**\r\n * Get credit card tender line.\r\n * @param context - Action context.\r\n * @param amount - Due amount for credit card.\r\n * @param currency - Currency.\r\n * @param cardPaymentAcceptResult - CardPaymentAcceptResult.\r\n * @returns - The credit card tender line.\r\n */\r\nasync function getCreditCardTenderLineForSinglePaymentAuth(\r\n context: IActionContext,\r\n amount: number = 0,\r\n currency: string = 'USD',\r\n cardPaymentAcceptResult?: CardPaymentAcceptResult\r\n): Promise {\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: context, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n const tenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCard);\r\n\r\n const cardTenderLine: CartTenderLine = {\r\n // @ts-expect-error -- existing data.\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency: currency,\r\n Amount: amount,\r\n TenderTypeId: tenderTypeId,\r\n CardPaymentAcceptResult: cardPaymentAcceptResult\r\n };\r\n\r\n return cardTenderLine;\r\n}\r\n\r\nasync function createCustomerAccountTenderLine(\r\n ctx: IActionContext,\r\n Amount: number,\r\n Currency: string = 'USD'\r\n): Promise {\r\n const CustomerId = null;\r\n if (!ctx.requestContext.user.isAuthenticated) {\r\n ctx.telemetry.error('A customer id is required to pay with customer account');\r\n }\r\n\r\n const tenderTypes = await getTenderTypesAsync({ callerContext: ctx, queryResultSettings: {} }).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!tenderTypes) {\r\n ctx.telemetry.error('No tender types found for this channel');\r\n }\r\n\r\n const TenderTypeId = findTenderIdTypeByOperationId(tenderTypes, OPERATIONS.PayCustomerAccount);\r\n if (!TenderTypeId) {\r\n ctx.telemetry.error('No customer account tender type');\r\n }\r\n return {\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CartTenderLine',\r\n 'Amount@odata.type': '#Decimal',\r\n Currency,\r\n TenderTypeId,\r\n Amount,\r\n\r\n // @ts-expect-error\r\n CustomerId\r\n };\r\n}\r\n\r\nexport default async (ctx: IActionContext, updatedCartVersion?: number, isPaymentVerificationRedirection?: boolean): Promise => {\r\n const checkoutState = await getCheckoutState(ctx).catch(error => {\r\n throw error;\r\n });\r\n\r\n const cartState = checkoutState.checkoutCart;\r\n\r\n const channelConfiguration = ctx.requestContext.channel;\r\n\r\n if (!cartState || Object.keys(cartState).length === 0 || !channelConfiguration) {\r\n throw new Error('Fail to placeOrder');\r\n }\r\n\r\n const {\r\n giftCardExtends,\r\n tokenizedPaymentCard,\r\n cardPrefix,\r\n guestCheckoutEmail,\r\n billingAddress,\r\n loyaltyAmount,\r\n cardPaymentAcceptResult,\r\n shouldEnableSinglePaymentAuthorizationCheckout\r\n } = checkoutState;\r\n const { Currency } = channelConfiguration;\r\n\r\n let amountDue = cartState.cart.AmountDue || 0;\r\n let cartTenderLines;\r\n const getTenderLinePromises = [];\r\n const loyaltyCardNumber = cartState.cart.LoyaltyCardId;\r\n\r\n // Pay by loyalty first\r\n if (loyaltyAmount && loyaltyCardNumber) {\r\n const chargedAmount = roundNumber(Math.min(loyaltyAmount, amountDue));\r\n const loyaltyTenderLinePromise = getLoyaltyTenderLine(ctx, loyaltyCardNumber, chargedAmount, Currency);\r\n getTenderLinePromises.push(loyaltyTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n }\r\n\r\n // Then by gift card\r\n if (giftCardExtends && giftCardExtends.length > 0) {\r\n giftCardExtends.some(giftCardExtend => {\r\n if (giftCardExtend.Balance && amountDue > 0) {\r\n const chargedAmount = roundNumber(Math.min(giftCardExtend.Balance, amountDue));\r\n const tenderTypeId = giftCardExtend.TenderTypeId;\r\n const giftCardPin = giftCardExtend.Pin;\r\n const giftCardExpirationYear = giftCardExtend.ExpirationDate ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[1], 10) : undefined;\r\n const giftCardExpirationMonth = giftCardExtend.ExpirationDate ? Number.parseInt(giftCardExtend.ExpirationDate?.split('/')[0], 10) : undefined;\r\n const creditCardTenderLinePromise = getGiftCardTenderLine(ctx, giftCardExtend.Id, chargedAmount, Currency, tenderTypeId, giftCardPin, giftCardExpirationYear, giftCardExpirationMonth);\r\n getTenderLinePromises.push(creditCardTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n }\r\n return amountDue === 0;\r\n });\r\n }\r\n\r\n // Then by customer account\r\n if (checkoutState.customerAccountAmount > 0) {\r\n const chargedAmount = roundNumber(Math.min(checkoutState.customerAccountAmount, amountDue));\r\n const customerAccountTenderLinePromise = createCustomerAccountTenderLine(ctx, chargedAmount, Currency);\r\n getTenderLinePromises.push(customerAccountTenderLinePromise);\r\n amountDue = roundNumber(amountDue - chargedAmount);\r\n }\r\n\r\n // Pay the rest by credit card\r\n if (amountDue > 0) {\r\n let creditCardTenderLinePromise: Promise;\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout) {\r\n creditCardTenderLinePromise = getCreditCardTenderLineForSinglePaymentAuth(\r\n ctx,\r\n amountDue,\r\n Currency,\r\n cardPaymentAcceptResult\r\n );\r\n } else {\r\n if (!tokenizedPaymentCard) {\r\n throw new Error('Fail to placeOrder: no token found');\r\n }\r\n creditCardTenderLinePromise = getCreditCardTenderLine(\r\n ctx,\r\n tokenizedPaymentCard,\r\n cardPrefix,\r\n amountDue,\r\n Currency,\r\n billingAddress\r\n );\r\n }\r\n\r\n getTenderLinePromises.push(creditCardTenderLinePromise);\r\n }\r\n\r\n if (getTenderLinePromises.length > 0) {\r\n // When payment methods is required\r\n cartTenderLines = await Promise.all(getTenderLinePromises).catch(error => {\r\n throw error;\r\n });\r\n\r\n if (!cartTenderLines || cartTenderLines.length === 0) {\r\n throw new Error('Fail to placeOrder: fail to get cart tender lines');\r\n }\r\n }\r\n\r\n const cartVersion = updatedCartVersion || cartState.cart.Version;\r\n\r\n console.log(\"CHECKOUT CALL\");\r\n console.log(cartState.cart.Id);\r\n console.log(cartState.attributeValues);\r\n\r\n // Proceed checkout\r\n const salesOrder = await checkoutAsync(\r\n { callerContext: ctx, bypassCache: 'get' },\r\n cartState.cart.Id,\r\n guestCheckoutEmail,\r\n undefined,\r\n undefined,\r\n cartTenderLines || null,\r\n cartVersion\r\n ).catch(async error => {\r\n if (checkoutState.shouldEnableSinglePaymentAuthorizationCheckout) {\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\r\n if (error.data?.AdditionalContext) {\r\n await checkoutState.updateShouldCollapsePaymentSection({ newShouldCollapsePaymentSection: true });\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown type.\r\n await checkoutState.updateRedirectAdditionalContext({ newRedirectAdditionalContext: error?.data?.AdditionalContext as string });\r\n } else {\r\n await checkoutState.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\r\n\r\n if (isPaymentVerificationRedirection) {\r\n await checkoutState.checkoutCart.refreshCart({});\r\n }\r\n }\r\n }\r\n\r\n throw error;\r\n });\r\n\r\n if (!salesOrder) {\r\n throw new Error('Fail to placeOrder: fail to checkout');\r\n }\r\n\r\n return salesOrder;\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { getCartState, getCheckoutState } from '@msdyn365-commerce/global-state';\r\n\r\nasync function emptyActiveCart(ctx: IActionContext): Promise {\r\n let cartState;\r\n let checkoutState;\r\n const lineItemIdsToRemove = [];\r\n\r\n try {\r\n cartState = await getCartState(ctx);\r\n checkoutState = await getCheckoutState(ctx);\r\n } catch (error) {\r\n throw error;\r\n }\r\n\r\n if (!cartState || !cartState.cart) {\r\n throw new Error('Fail to fetch active cart');\r\n }\r\n\r\n if (!checkoutState || !checkoutState.checkoutCart) {\r\n throw new Error('Fail to fetch checkoutCart cart');\r\n }\r\n\r\n const activeCart = cartState.cart;\r\n const checkoutCart = checkoutState.checkoutCart.cart;\r\n\r\n for (const activeCartLine of activeCart.CartLines || []) {\r\n for (const checkoutCartLine of checkoutCart.CartLines || []) {\r\n if (activeCartLine.LineId && activeCartLine.LineId === checkoutCartLine.LineId) {\r\n lineItemIdsToRemove.push(activeCartLine.LineId);\r\n }\r\n }\r\n }\r\n\r\n try {\r\n await cartState.removeCartLines({ cartLineIds: lineItemIdsToRemove });\r\n await cartState.removeAllPromoCodes({});\r\n await checkoutState.removeCheckoutCartId({});\r\n } catch (error) {\r\n throw error;\r\n }\r\n}\r\n\r\nexport default emptyActiveCart;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\r\nimport { updateLineDeliverySpecificationsAsync, validateForCheckoutAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { DeliveryPreferenceType, LineDeliverySpecification, ReleasedProductType, SimpleProduct }\r\n from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { ArrayExtensions, getAvailabilitiesForCartLineItems, ProductAvailabilitiesForCartLineItems } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, TelemetryConstant, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport { computed, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ILliCheckoutData } from './lli-checkout.data';\r\nimport { ICheckoutHeadingData, ILliCheckoutProps } from './lli-checkout.props.autogenerated';\r\nimport AlertComponent from './components/alert';\r\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { getLineItems, ILineItems } from './components/get-line-items';\r\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\r\nimport GuidedFormComponent from './components/guided-form';\r\nimport PlaceOrderButtonComponent from './components/place-order-button';\r\nimport placeOrder from './methods/place-order';\r\n\r\nexport * from './components/get-line-items';\r\nexport * from './components/get-order-summary';\r\n\r\ntype DeviceType = 'Mobile';\r\n\r\ninterface ICheckoutState {\r\n errorMessage: string;\r\n isValidationPassed: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n}\r\n\r\nexport interface ICheckoutViewProps extends ILliCheckoutProps {\r\n className: string;\r\n canShow?: boolean;\r\n isEmptyCart?: boolean;\r\n isConsentGiven?: boolean;\r\n hasError?: boolean;\r\n cartStatus?: string;\r\n isMobile?: boolean;\r\n isEditorialMode?: boolean;\r\n backToShoppingUrl?: string;\r\n editCartLink?: string;\r\n hasSalesOrder: boolean;\r\n hasInvoiceLine?: boolean;\r\n\r\n checkoutProps: IModuleProps;\r\n headerProps: INodeProps;\r\n bodyProps: INodeProps;\r\n mainProps: INodeProps;\r\n mainControlProps: INodeProps;\r\n sideProps: INodeProps;\r\n sideControlFirstProps: INodeProps;\r\n sideControlSecondProps: INodeProps;\r\n termsAndConditionsProps: INodeProps;\r\n\r\n guidedForm?: React.ReactNode;\r\n title?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n orderSummary?: IOrderSummary;\r\n invoicePaymentSummary?: IInvoicePaymentSummary;\r\n lineItems?: ILineItems;\r\n placeOrderButton?: React.ReactNode;\r\n termsAndConditions?: React.ReactNode;\r\n keepShoppingButton?: React.ReactNode;\r\n orderConfirmation?: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutModuleProps extends ILliCheckoutProps, IModuleStateProps { }\r\n\r\n/**\r\n *\r\n * CheckoutContainer component.\r\n * @extends {React.Component}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass Checkout extends React.PureComponent {\r\n\r\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\r\n console.log(\"MYDEBUG-lli: @computed get cartStatus() called\");\r\n return this.props.data.checkout?.status;\r\n }\r\n\r\n @computed get isEmptyCart(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get isEmptyCart() called\");\r\n if (this.isEditorialMode) {\r\n // Editorial mode: Ignore empty cart\r\n return false;\r\n }\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get hasError() called\");\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\r\n }\r\n\r\n @computed get isEditorialMode(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get isEditorialMode() called\");\r\n return this.props.context.request.params.isEditor;\r\n }\r\n\r\n @computed public get isPaymentVerificationRedirection(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get isPaymentVerificationRedirection() called\");\r\n const { requestFormData, query } = this.props.context.request;\r\n return !!((requestFormData || (query && query.pv === '1')));\r\n }\r\n\r\n @computed get canPlaceOrder(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get canPlaceOrder() called\");\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n\r\n const shouldEnableSinglePaymentAuthorizationCheckout = this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\r\n return this.props.moduleState.isReady &&\r\n (isTermsAndConditionAccepted === undefined ||\r\n isTermsAndConditionAccepted ||\r\n shouldEnableSinglePaymentAuthorizationCheckout) &&\r\n ((this.state.errorMessage === '' || shouldEnableSinglePaymentAuthorizationCheckout) || this.isPaymentVerificationRedirection);\r\n }\r\n\r\n @computed get isCartReady(): boolean {\r\n console.log(\"MYDEBUG-lli: @computed get isCartReady() called\");\r\n return !!this.props.data.checkout.result?.checkoutCart?.cart &&\r\n this.props.data.customerInformation.status !== 'LOADING' &&\r\n this.props.data.featureState.status !== 'LOADING';\r\n }\r\n\r\n public state: ICheckoutState = {\r\n errorMessage: '',\r\n isValidationPassed: false,\r\n isPlaceOrderLoading: false\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry);\r\n\r\n public componentDidMount(): void {\r\n console.log(\"MYDEBUG-lli: componentDidMount() called\");\r\n const {\r\n resources: { genericErrorMessage }\r\n } = this.props;\r\n\r\n when(\r\n () => this.hasError,\r\n () => {\r\n console.log(\"MYDEBUG-lli: when (this.hasError) tripped\");\r\n this.setState({\r\n errorMessage: genericErrorMessage\r\n });\r\n this.props.context.telemetry.error('Failed to get cart');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isEmptyCart,\r\n () => {\r\n console.log(\"MYDEBUG-lli: when (this.isEmptyCart) tripped\");\r\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isCartReady,\r\n () => {\r\n console.log(\"MYDEBUG-lli: when (this.isCartReady) tripped\");\r\n this.validateForCheckout();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n console.log(\"MYDEBUG-lli: reaction (this.props.moduleState.isReady) tripped\");\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\r\n async (isReady) => {\r\n console.log(\"MYDEBUG-lli: reaction (this.props.data.checkout.result?.isPaymentSectionContainerReady) tripped\");\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && isReady &&\r\n !this.props.data.checkout.result.redirectAdditionalContext) {\r\n if (!this.state.isPlaceOrderLoading) {\r\n this.setState({ isPlaceOrderLoading: true });\r\n }\r\n\r\n await this.onPlaceOrder();\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\r\n (hasError) => {\r\n console.log(\"MYDEBUG-lli: reaction (this.props.data.checkout.result?.isPaymentSectionContainerHasError) tripped\");\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when redirection is true for new checkout flow.\r\n reaction(\r\n () => this.canPlaceOrder,\r\n async () => {\r\n console.log(\"MYDEBUG-lli: reaction (this.canPlaceOrder) tripped\");\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\r\n const { requestFormData, query } = this.props.context.request;\r\n const isRedirection = !!((requestFormData && query && query.pv === '1'));\r\n if (isRedirection) {\r\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\r\n newIsPlaceOrderEnabledInRedirection: true\r\n });\r\n }\r\n }\r\n }\r\n );\r\n }\r\n\r\n // eslint-disable-next-line complexity -- ignore the complexity.\r\n public render(): JSX.Element {\r\n console.log(\"MYDEBUG-lli: render() called\");\r\n const {\r\n moduleState,\r\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\r\n resources\r\n } = this.props;\r\n const { errorMessage } = this.state;\r\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\r\n const checkoutClass = classnames('ms-checkout', className);\r\n const checkoutInformation = this.getSlotItems('checkoutInformation');\r\n\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n const isMobile =\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\r\n\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const termsAndConditions =\r\n this.props.slots.termsAndConditions &&\r\n this.props.slots.termsAndConditions.length > 0 &&\r\n this.props.slots.termsAndConditions[0];\r\n\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\r\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\r\n\r\n let viewProps: ICheckoutViewProps = {\r\n ...this.props,\r\n className: checkoutClass,\r\n isEmptyCart: this.isEmptyCart,\r\n isConsentGiven,\r\n hasError: this.hasError,\r\n hasSalesOrder: this.props.data.checkout && this.props.data.checkout.result !== undefined && this.props.data.checkout.result.salesOrder !== undefined,\r\n hasInvoiceLine,\r\n cartStatus: this.cartStatus,\r\n isMobile,\r\n backToShoppingUrl,\r\n editCartLink,\r\n isEditorialMode: this.isEditorialMode,\r\n orderConfirmation: this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0 ? this.props.slots.orderConfirmation[0] : undefined,\r\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\r\n headerProps: { className: 'ms-checkout__head' },\r\n bodyProps: { className: 'ms-checkout__body' },\r\n mainProps: { className: 'ms-checkout__main' },\r\n mainControlProps: { className: 'ms-checkout__main-control' },\r\n sideProps: { className: 'ms-checkout__side' },\r\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\r\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\r\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\r\n title: checkoutHeading && (\r\n this.renderMsdyn365Text(checkoutHeading)\r\n )\r\n };\r\n\r\n if (!isConsentGiven) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else if (this.isLoading()) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: \r\n };\r\n } else if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else {\r\n const shouldEnableSinglePaymentAuthorizationCheckout: boolean =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n viewProps = {\r\n ...viewProps,\r\n alert: errorMessage && ,\r\n canShow: true,\r\n guidedForm: checkoutInformation ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n orderSummary: getOrderSummary(this.props),\r\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\r\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\r\n placeOrderButton: (\r\n \r\n ),\r\n termsAndConditions,\r\n keepShoppingButton: backToShoppingUrl && (\r\n \r\n {backToShopping}\r\n \r\n )\r\n };\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\r\n console.log(\"MYDEBUG-lli: renderMsdyn365Text() called\");\r\n return (\r\n \r\n );\r\n }\r\n\r\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.checkoutHeading!.text = event.target.value;\r\n\r\n private readonly isLoading = (): boolean => {\r\n console.log(\"MYDEBUG-lli: isLoading() called\");\r\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\r\n };\r\n\r\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\r\n console.log(\"MYDEBUG-lli: getSlotItems() called\");\r\n const { slots } = this.props;\r\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\r\n };\r\n\r\n /**\r\n * Trigger the payment section container submit when placing order.\r\n */\r\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\r\n console.log(\"MYDEBUG-lli: triggerPaymentWithPlaceOrder() called\");\r\n this.setState({ isPlaceOrderLoading: true });\r\n\r\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder(\r\n { newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder });\r\n };\r\n\r\n private readonly onPlaceOrder = async (): Promise => {\r\n console.log(\"MYDEBUG-lli: onPlaceOrder() called\");\r\n const {\r\n resources: { checkoutOutOfStockErrorMessage, genericErrorMessage, invalidCartVersionErrorMessage },\r\n context: { actionContext, app: { config: { enableStockCheck = false } } },\r\n slots: { orderConfirmation },\r\n data: { checkout, products }\r\n } = this.props;\r\n\r\n // If hasInvoiceLine is true, no inventory check\r\n if (!this.props.data.checkout.result?.checkoutCart.hasInvoiceLine && enableStockCheck &&\r\n await this.isOverMaxQuantity((await checkout).checkoutCart.cart, (await products))) {\r\n this.setState({\r\n errorMessage: checkoutOutOfStockErrorMessage\r\n });\r\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\r\n } else {\r\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\r\n\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n\r\n await placeOrder(actionContext, this.props.data.checkout.result, this.props.data.products.result,\r\n !hasOrderConfirmation, updatedCartVersion, this.isPaymentVerificationRedirection).catch(error => {\r\n let errorMessage = genericErrorMessage;\r\n\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && error.data?.AdditionalContext &&\r\n !this.isPaymentVerificationRedirection) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n });\r\n }\r\n };\r\n\r\n // Update receipt email address for electronic cart line\r\n // return the updated cart version\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n console.log(\"MYDEBUG-lli: updateCartLineEmailAddress() called\");\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => (cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode)\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return { LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n ).then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n }).catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n\r\n /**\r\n * Return true if any product in the cart is over its max quantity.\r\n * @param cart -- The checkout cart.\r\n * @param products -- The checkout products.\r\n * @returns -- Is any product in the cart is over max quantity.\r\n */\r\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\r\n console.log(\"MYDEBUG-lli: isOverMaxQuantity() called\");\r\n let isOverMaxQuantity = false;\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n await getAvailabilitiesForCartLineItems(\r\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\r\n this.props.context.actionContext\r\n ).then(productInventoryInformation => {\r\n cart.CartLines?.map((cartline) => {\r\n\r\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\r\n const isServiceItem = cartlineProduct?.ItemTypeValue === ReleasedProductType.Service;\r\n\r\n // If product is service item or cartline is electronic delivery, then no inventory check\r\n if (!isServiceItem && cartline.DeliveryMode !== emailDeliveryModeCode && ArrayExtensions.hasElements(productInventoryInformation)) {\r\n const foundProductAvailability = productInventoryInformation.find((productInventory) => {\r\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n\r\n if (!(foundProductAvailability?.IsProductAvailable && foundProductAvailability.ProductAvailableQuantity.AvailableQuantity !== undefined &&\r\n cartline.Quantity && cartline.Quantity <= foundProductAvailability.ProductAvailableQuantity.AvailableQuantity)) {\r\n isOverMaxQuantity = true;\r\n }\r\n }\r\n });\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\r\n });\r\n\r\n return isOverMaxQuantity;\r\n };\r\n\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n console.log(\"MYDEBUG-lli: getActiveChildModuleStates() called\");\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n private readonly onContainerReady = (): void => {\r\n console.log(\"MYDEBUG-lli: onContainerReady() called\");\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n\r\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\r\n console.log(\"MYDEBUG-lli: redirectToCartPage() called\");\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n if (window && editCartLink) {\r\n window.location.assign(editCartLink);\r\n } else {\r\n this.setState({\r\n errorMessage: this.props.resources.genericErrorMessage\r\n });\r\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\r\n }\r\n };\r\n\r\n private readonly validateForCheckout = (retry: boolean = true): void => {\r\n console.log(\"MYDEBUG-lli: validateForCheckout() called\");\r\n const notFoundEditCartLinkMessage = 'Cart doesn\\'t pass validation, but no editCartLink found';\r\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\r\n const { Id, Version } = cart;\r\n const isOrderQuantityLimitsFeatureEnabledInHq = this.props.data.featureState.result\r\n ?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings = defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\r\n if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\r\n if (Version && Id) {\r\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\r\n .then((result: CartLineValidationResults) => {\r\n if (result.ValidationFailuresByCartLines?.length !== 0) {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n })\r\n .catch((error) => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n cartState?.refreshCart({})\r\n .then(() => {\r\n this.validateForCheckout(false);\r\n })\r\n .catch((refreshError: Error) => {\r\n this.props.telemetry.warning(refreshError.message);\r\n this.props.telemetry.debug('Unable to refresh Cart');\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n };\r\n}\r\n\r\nexport default Checkout;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { SalesOrder, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\n\r\nimport checkout from './lli-checkout';\r\nimport emptyActiveCart from './empty-active-cart';\r\n\r\nexport default async (ctx: IActionContext, checkoutState: ICheckoutState | undefined, orderedProducts: SimpleProduct[] | undefined,\r\n redirect: boolean, updatedCartVersion?: number, isPaymentVerificationRedirection?: boolean) => {\r\n return new Promise(async (resolve: () => void, reject: (reason?: Error) => void) => {\r\n let salesOrder: SalesOrder;\r\n\r\n // Proceed checkout\r\n try {\r\n salesOrder = await checkout(ctx, updatedCartVersion, isPaymentVerificationRedirection);\r\n } catch (error) {\r\n reject(error); return;\r\n }\r\n\r\n // Remove purchased items from the active cart\r\n try {\r\n await emptyActiveCart(ctx);\r\n } catch (error) {\r\n reject(error); return;\r\n }\r\n\r\n if (redirect) {\r\n // Redirect to the order confirmation page\r\n const orderConfirmationUrl = getUrlSync('orderConfirmation', ctx) || '';\r\n if (!orderConfirmationUrl) {\r\n reject(new Error('Error: No orderConfirmationUrl')); return;\r\n }\r\n\r\n const separator = orderConfirmationUrl.includes('?') ? '&' : '?';\r\n const url = `${orderConfirmationUrl}${separator}transactionId=${salesOrder.Id}`;\r\n window.location.assign(url);\r\n } else {\r\n if (checkoutState) {\r\n const result = await checkoutState.updateSalesOrder({ newSalesOrder: salesOrder, newOrderedProducts: orderedProducts || [] });\r\n\r\n if (result.status === 'FAILED') {\r\n reject(new Error('Error: Updating error state failed')); return;\r\n }\r\n } else {\r\n reject(new Error('Error: No checkout state')); return;\r\n }\r\n resolve();\r\n }\r\n });\r\n};\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './lli-checkout';\r\nimport { IEmailDelivery } from './components';\r\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => (\r\n \r\n {label}\r\n \r\n);\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems, lineItemWraper, lineItemWraperIcon }) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({ LineItems, Header, heading, editLink, itemsForPickup, itemsForShip, itemsForEmail, itemsGroupWithMulitplePickupMode }) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n }) : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {lines.shipping}\r\n {lines.otherCharge}\r\n {lines.tax}\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton\r\n } = props;\r\n\r\n return (\r\n \r\n {!hasSalesOrder && \r\n {title}\r\n }\r\n {!hasSalesOrder &&\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {guidedForm}\r\n \r\n {termsAndConditions}\r\n \r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine ? orderSummary && : invoicePaymentSummary && }\r\n \r\n \r\n {termsAndConditions}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n {lineItems && }\r\n \r\n \r\n {termsAndConditions}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n )}\r\n }\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\ninterface IAlertProps {\r\n message: string;\r\n}\r\n\r\nconst CheckoutAlert: React.FC = ({ message }) => (\r\n

\r\n {message}\r\n

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

{invoiceSummaryTitle}

,\r\n lines: checkoutCart?.hasInvoiceLine\r\n ? InvoiceSummary({\r\n orderTotalLabel: totalAmountLabel,\r\n invoiceLabel,\r\n cart,\r\n context,\r\n typeName,\r\n telemetry,\r\n id,\r\n checkoutState: checkout.result\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\r\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport groupBy from 'lodash/groupBy';\r\nimport * as React from 'react';\r\n\r\nimport { IRecaptchaCheckoutData } from '../recaptcha-checkout.data';\r\nimport { IRecaptchaCheckoutProps } from '../recaptcha-checkout.props.autogenerated';\r\n\r\ntype deliveryType = 'pickup' | 'ship' | 'email';\r\n\r\nexport interface IPickUpAtStore {\r\n PickUpAtStore: INodeProps;\r\n label: React.ReactNode;\r\n location: React.ReactNode;\r\n}\r\n\r\nexport interface IEmailDelivery {\r\n EmailDelivery: INodeProps;\r\n label: React.ReactNode;\r\n}\r\n\r\nexport interface ILineItem {\r\n LineId: string;\r\n LineItem: INodeProps;\r\n item?: React.ReactNode;\r\n pickUpAtStore?: IPickUpAtStore;\r\n emailDelivery?: IEmailDelivery;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroup {\r\n LineItemDeliveryGroup: INodeProps;\r\n LineItemList: INodeProps;\r\n heading: React.ReactNode;\r\n lineItemWraper?: React.ReactNode;\r\n lineItemWraperIcon?: React.ReactNode;\r\n lineItems: ILineItem[];\r\n}\r\n\r\nexport interface ILineItems {\r\n LineItems: INodeProps;\r\n Header: INodeProps;\r\n heading: React.ReactNode;\r\n editLink: React.ReactNode;\r\n itemsForPickup?: ILineItemDeliveryGroup;\r\n itemsForShip?: ILineItemDeliveryGroup;\r\n itemsForEmail?: ILineItemDeliveryGroup;\r\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\r\n}\r\n\r\nexport const getLineItems = (input: IRecaptchaCheckoutProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\r\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n const _getDeliveryLocation = (cartLine: CartLine): string => {\r\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\r\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\r\n return '';\r\n }\r\n\r\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\r\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\r\n });\r\n\r\n return locationMatch && locationMatch.OrgUnitName;\r\n };\r\n\r\n const _getProduct = (productId: number): SimpleProduct | undefined => {\r\n const products = get(input, 'data.products.result') || [];\r\n return products.find((_product: SimpleProduct) => {\r\n return productId === _product.RecordId;\r\n });\r\n };\r\n\r\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\r\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\r\n const {\r\n id,\r\n typeName,\r\n context,\r\n config: { imageSettings, showShippingChargesForLineItems },\r\n resources: {\r\n quantityDisplayString,\r\n productDimensionTypeColor,\r\n productDimensionTypeSize,\r\n productDimensionTypeStyle,\r\n productDimensionTypeAmount,\r\n configString,\r\n inputQuantityAriaLabel,\r\n discountStringText,\r\n shippingCharges\r\n },\r\n context: {\r\n request: { gridSettings }\r\n }\r\n } = input;\r\n const catalogs = input.data.catalogs?.result;\r\n if (!product) {\r\n return;\r\n }\r\n\r\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\r\n if (MsDyn365.isBrowser && context.request.user.isB2b) {\r\n const fullUrl = new URL(productUrl, window.location.href);\r\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\r\n productUrl = fullUrl.href;\r\n }\r\n\r\n return (\r\n \r\n );\r\n };\r\n\r\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\r\n const {\r\n resources: { pickUpAtStoreWithLocationText }\r\n } = input;\r\n\r\n return {\r\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\r\n label: {pickUpAtStoreWithLocationText},\r\n location:
{pickupDeliveryLocation}
\r\n };\r\n };\r\n\r\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\r\n const {\r\n resources: { emailDeliveryText }\r\n } = input;\r\n\r\n return {\r\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\r\n label: {emailDeliveryText}\r\n };\r\n };\r\n\r\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\r\n return items.map(cartLine => {\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const isPickUp = _getCartPickDeliveryMode(cartLine);\r\n const isEmailDelivery =\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\r\n return {\r\n LineId: cartLine.LineId || '',\r\n LineItem: { className: 'ms-checkout__line-item' },\r\n item: _getLineItemComponent(cartLine),\r\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\r\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\r\n };\r\n });\r\n };\r\n\r\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode ===\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\r\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\r\n ? retailMultiplePickUpOptionEnabled\r\n ? cartLineItem.DeliveryMode !==\r\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\r\n )\r\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\r\n : false;\r\n };\r\n\r\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? shippingCountCheckoutLineItem\r\n : type === 'pickup'\r\n ? inStorePickUpLabel\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _countItems = (items: CartLine[]): number => {\r\n return items.reduce((count, item) => {\r\n return count + (item.Quantity || 0);\r\n }, 0);\r\n };\r\n\r\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n if (type === 'ship') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n } else if (type === 'pickup') {\r\n return cart.CartLines.filter((cartLine: CartLine) =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\r\n );\r\n }\r\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\r\n };\r\n\r\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\r\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\r\n return;\r\n }\r\n\r\n const items = _filterItemsByDiliveryType(type);\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const count = _countItems(items);\r\n const title = _getGroupTitleComponent(count, type);\r\n\r\n return {\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(items)\r\n };\r\n };\r\n\r\n const _getLineItems = (): ILineItems | undefined => {\r\n const {\r\n context,\r\n config: { lineItemsHeading },\r\n data: { products },\r\n resources: { editCartText }\r\n } = input;\r\n\r\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\r\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\r\n return undefined;\r\n }\r\n\r\n return {\r\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\r\n Header: { className: 'ms-checkout__line-items-header' },\r\n heading: lineItemsHeading && lineItemsHeading.text && (\r\n \r\n ),\r\n editLink: (\r\n \r\n {editCartText}\r\n \r\n ),\r\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\r\n itemsForShip: _getLineItemsByDeliveryType('ship'),\r\n itemsForEmail: _getLineItemsByDeliveryType('email'),\r\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\r\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\r\n : undefined\r\n };\r\n };\r\n\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { lineItemsHeading }\r\n } = input;\r\n if (lineItemsHeading) {\r\n lineItemsHeading.text = event.target.value;\r\n }\r\n };\r\n\r\n const _getGroupTitleComponentWithMultiplePickUp = (\r\n count: number,\r\n type: deliveryType,\r\n deliveryMode?: string,\r\n fulFillmentStoreId?: string\r\n ): string => {\r\n const {\r\n resources: { itemLabel, itemsLabel }\r\n } = input;\r\n\r\n let emailDeliveryModeDesc: string = '';\r\n let pickupDeliveryModeDesc: string = '';\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n emailDeliveryModeDesc = emailDeliveryModeDesc\r\n ? emailDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\r\n ?.Description!;\r\n });\r\n\r\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\r\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\r\n ? pickupDeliveryModeDesc\r\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\r\n });\r\n\r\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\r\n const suffix = count > 1 ? itemsLabel : itemLabel;\r\n const title =\r\n type === 'ship'\r\n ? `(${count} ${suffix})`\r\n : type === 'pickup'\r\n ? `${pickupTitle} (${count} ${suffix})`\r\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\r\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\r\n };\r\n\r\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\r\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\r\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\r\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\r\n const groupDelivery = getGroupByDelivery(cart.CartLines);\r\n const cartLinesGroup: CartLine[] = [];\r\n const cartLinesGrp: CartLine[][] = [];\r\n\r\n // 1) Group by store and pick up mode\r\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\r\n // @ts-expect-error\r\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\r\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\r\n });\r\n\r\n Object.keys(cartLinesGroup).forEach(key => {\r\n const cartLines = cartLinesGroup[key];\r\n Object.keys(cartLines).forEach(index => {\r\n const cartLine = cartLines[index];\r\n cartLinesGrp.push(cartLine);\r\n });\r\n });\r\n\r\n return cartLinesGrp;\r\n };\r\n\r\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\r\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\r\n return;\r\n }\r\n\r\n const {\r\n resources: { multiplePickUpLabel, shippingLable }\r\n } = input;\r\n\r\n const items = _filterItemsByMultiplePickupMode();\r\n\r\n if (items.length === 0) {\r\n return undefined;\r\n }\r\n\r\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\r\n items.map(item => {\r\n const count = _countItems(item);\r\n const cartLine = item[0];\r\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\r\n const type: deliveryType =\r\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\r\n ? 'pickup'\r\n : cartLine.FulfillmentStoreId === '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n ? 'email'\r\n : 'ship';\r\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\r\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\r\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\r\n lineItemDeliveryGroup.push({\r\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\r\n LineItemList: { className: 'ms-checkout__line-items-list' },\r\n lineItemWraperIcon:
,\r\n lineItemWraper:
{groupTitle}
,\r\n heading:
{title}
,\r\n lineItems: _getLineItemsComponents(item)\r\n });\r\n });\r\n\r\n return lineItemDeliveryGroup;\r\n };\r\n\r\n return _getLineItems();\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\n\r\nimport { IRecaptchaCheckoutData } from '../recaptcha-checkout.data';\r\nimport { IRecaptchaCheckoutProps } from '../recaptcha-checkout.props.autogenerated';\r\n\r\nexport interface IOrderSummary {\r\n orderSummaryProps: INodeProps;\r\n heading?: React.ReactNode;\r\n lines?: IOrderSummaryLines;\r\n}\r\nexport const getOrderSummary = (input: IRecaptchaCheckoutProps): IOrderSummary => {\r\n const {\r\n config: { orderSummaryHeading },\r\n data: { checkout },\r\n resources: {\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n otherCharges\r\n },\r\n context,\r\n typeName,\r\n id,\r\n telemetry\r\n } = input;\r\n\r\n const checkoutState = get(checkout, 'result');\r\n const cart = get(checkout, 'result.checkoutCart.cart');\r\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\r\n const channelConfiguration = context.request.channel!;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = input.data;\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\r\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\r\n\r\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n const {\r\n config: { orderSummaryHeading }\r\n } = input;\r\n if (orderSummaryHeading) {\r\n orderSummaryHeading.text = event.target.value;\r\n }\r\n };\r\n\r\n return {\r\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n heading: orderSummaryHeading && orderSummaryHeading.text && (\r\n \r\n ),\r\n lines: showLineItems\r\n ? OrderSummary({\r\n checkoutState,\r\n cart,\r\n subTotalLabel,\r\n shippingLabel,\r\n taxLabel,\r\n orderTotalLabel,\r\n loyaltyLabel,\r\n giftcardLabel,\r\n totalDiscountsLabel,\r\n freeText,\r\n toBeCalculatedText,\r\n context,\r\n typeName,\r\n id,\r\n channelConfiguration,\r\n telemetry,\r\n otherChargeLabel: otherCharges,\r\n retailMultiplePickUpOptionEnabled,\r\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\r\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\r\n isShowTaxBreakup: isShowOrHideTaxEnabled\r\n })\r\n : undefined\r\n };\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n IPayLoad,\r\n ITelemetryContent,\r\n TelemetryConstant\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport * as React from 'react';\r\nimport { focusOnCheckoutError, setCheckoutErrorFocus } from '@msdyn365-commerce-modules/checkout';\r\n\r\n// Nick ReCaptcha Begin\r\n//@ts-ignore\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\n\r\n// This is the production key\r\n//const TEST_SITE_KEY = \"6LcClc0ZAAAAAKoN2AsxwRRd4GMtD_yUG5AwXEhl\";\r\n// This is the test key\r\nconst TEST_SITE_KEY = \"6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\";\r\nconst DELAY = 1500;\r\n// Nick ReCaptcha End\r\n\r\nexport interface ICheckoutGuidedCardProps {\r\n // Nick ReCaptcha Begin\r\n value: null;\r\n // Nick ReCaptcha End\r\n id?: string;\r\n step: number;\r\n title?: HeadingType;\r\n disabled?: boolean; // Module is not available\r\n isActive?: boolean; // Step === currentStep\r\n isVisted?: boolean; // Step < currentStep\r\n isExpanded?: boolean;\r\n isReady?: boolean;\r\n isPending?: boolean;\r\n isUpdating?: boolean;\r\n isSubmitting?: boolean;\r\n isCancelAllowed?: boolean;\r\n isMobile?: boolean;\r\n hasInitialized?: boolean;\r\n hasControlGroup?: boolean;\r\n shouldFocus?: boolean;\r\n children: React.ReactNode;\r\n moduleState?: IModuleStateManager;\r\n actionContext?: IActionContext;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n telemetryContent?: ITelemetryContent;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n onNext(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuidedCard component.\r\n * @extends {React.Component}\r\n */\r\nclass CheckoutGuidedCard extends React.PureComponent {\r\n private readonly editButtonRef: React.RefObject = React.createRef();\r\n\r\n private readonly formCardRef: React.RefObject = React.createRef();\r\n\r\n private readonly payLoad: IPayLoad;\r\n\r\n // Nick ReCaptcha Begin\r\n handleChange = (value: null) => {\r\n console.log(\"Captcha value:\", value);\r\n this.setState({ value });\r\n // if value is null recaptcha expired\r\n if (value === null) this.setState({ expired: \"true\" });\r\n };\r\n asyncScriptOnLoad = () => {\r\n this.setState({ callback: \"called!\", value: null });\r\n };\r\n // Nick Recaptcha End\r\n\r\n constructor(props: ICheckoutGuidedCardProps) {\r\n super(props);\r\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\r\n }\r\n\r\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\r\n /**\r\n * Move to next step when current step is ready.\r\n */\r\n const { isActive, isReady, onNext, isVisted, onEdit, shouldFocus, children, moduleState, actionContext } = this.props;\r\n\r\n \r\n setTimeout(() => {\r\n \r\n this.setState({ load: true });\r\n \r\n }, DELAY);\r\n\r\n \r\n\r\n // Move to next step after completing the current step\r\n if (isActive && isReady) {\r\n onNext();\r\n }\r\n\r\n // Set the focus to Edit button once edit button appear\r\n // (It happens when current step switch to isReady status)\r\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\r\n const canEdit = isReady && isVisted && !!onEdit;\r\n if (!prevCanEdit && canEdit) {\r\n this.focusOnEditButton();\r\n this.scrollToTitle();\r\n }\r\n\r\n // Set the focus to the first focusable element\r\n // (It happens when current step switch to isUpdating status)\r\n if (prevProps.isReady && !isReady) {\r\n this.focusOnFirstFocusableElement();\r\n }\r\n\r\n // Set the focus for the checkout error\r\n if (shouldFocus && actionContext) {\r\n const childrenModules = this._getModules(children);\r\n\r\n // Set the focus for the module within the checkout section container\r\n if (childrenModules.length > 0) {\r\n for (const childModule of childrenModules) {\r\n const childId = this._getId(childModule);\r\n const childState = moduleState?.getModule(childId);\r\n\r\n if (childState?.hasError) {\r\n console.log('Nicks First Error');\r\n setCheckoutErrorFocus(childId, actionContext);\r\n return;\r\n }\r\n }\r\n } else {\r\n focusOnCheckoutError(this.formCardRef, actionContext);\r\n console.log('Nicks Second Error');\r\n }\r\n }\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n title,\r\n disabled,\r\n isExpanded,\r\n isActive,\r\n isVisted,\r\n children,\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n hasInitialized,\r\n hasControlGroup,\r\n onEdit,\r\n resource\r\n } = this.props;\r\n const { changeBtnLabel } = resource;\r\n\r\n \r\n\r\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\r\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\r\n const { step } = this.props;\r\n\r\n if(step === 3) {\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
{children}
\r\n\r\n {this.renderFooder()}\r\n
\r\n \r\n );\r\n } else {\r\n return (\r\n \r\n
\r\n {this.getTitle()}\r\n\r\n {canEdit && (\r\n \r\n {changeBtnLabel}\r\n \r\n )}\r\n
\r\n\r\n \r\n
{children}
\r\n\r\n {this.renderFooder()}\r\n \r\n \r\n );\r\n }\r\n }\r\n\r\n private readonly renderFooder = (): JSX.Element | null => {\r\n\r\n //@ts-ignore\r\n const { value, load } = this.state || {};\r\n \r\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\r\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\r\n\r\n const canSubmit = !isReady && onSubmit;\r\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\r\n\r\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\r\n return null;\r\n }\r\n\r\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\r\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\r\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\r\n const { step } = this.props;\r\n\r\n if(step === 3) {\r\n console.log(value);\r\n return (\r\n
\r\n \r\n\r\n \r\n \r\n {(canSubmit && (value !== null || undefined)) && ( \r\n \r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n \r\n {canSubmit && (\r\n \r\n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\r\n \r\n )}\r\n {canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n )}\r\n
\r\n );\r\n }\r\n };\r\n\r\n private readonly focusOnFirstFocusableElement = (): void => {\r\n const node = this.formCardRef.current as HTMLElement;\r\n const focussableElements = `\r\n a:not([disabled]),\r\n button:not([disabled]),\r\n input[type=submit]:not([disabled]),\r\n input[type=checkbox]:not([disabled]),\r\n input[type=text]:not([disabled]),\r\n input[type=radio]:not([disabled]),\r\n input[type=password]:not([disabled]),\r\n select:not([disabled]),\r\n textarea:not([disabled]),\r\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\r\n `;\r\n\r\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\r\n child && child.focus && child.focus();\r\n };\r\n\r\n private readonly focusOnEditButton = (): void => {\r\n // Focus on edit button\r\n const editButton =\r\n this.editButtonRef &&\r\n this.editButtonRef.current &&\r\n this.editButtonRef.current.focus &&\r\n (this.editButtonRef.current as HTMLElement);\r\n editButton && editButton.focus();\r\n };\r\n\r\n private readonly scrollToTitle = (): void => {\r\n // Scroll window to the title of the step that was just completed only in mobile viewport\r\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\r\n formCard && formCard.scrollIntoView();\r\n };\r\n\r\n private readonly getTitle = (): JSX.Element => {\r\n const { step, title } = this.props;\r\n const { headingTag: Tag = 'h2', text = '' } = title || {};\r\n return (\r\n \r\n \r\n {step + 1}. {` `}\r\n \r\n {text && {text}}\r\n \r\n );\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private readonly _getModules = (item: React.ReactNode): any[] => {\r\n return get(item, 'props.modules.primary') || [];\r\n };\r\n\r\n private readonly _getId = (item: React.ReactNode): string => {\r\n return get(item, 'id') || '';\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedCard;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport { ICoreContext } from '@msdyn365-commerce/core';\r\nimport get from 'lodash/get';\r\nimport { computed } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport GuidedCard from './guided-card';\r\n\r\nexport interface ICheckoutGuidedFormProps {\r\n items: React.ReactNode[];\r\n moduleState: IModuleStateManager;\r\n disableGuidedCheckoutFlow?: boolean;\r\n isMobile?: boolean;\r\n isEditor?: boolean;\r\n resource: {\r\n checkoutStepTitleFormat: string;\r\n saveBtnLabel: string;\r\n changeBtnLabel: string;\r\n cancelBtnLabel: string;\r\n saveAndContinueBtnLabel: string;\r\n };\r\n requestContext?: ICoreContext;\r\n telemetryContent?: ITelemetryContent;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n hasError?: boolean;\r\n hasShippingAddress?: boolean | undefined;\r\n hasCartDeliveryMode?: boolean | undefined;\r\n hasGuestCheckoutEmail?: boolean | undefined;\r\n isTermsAndConditionAccepted?: boolean | undefined;\r\n shouldEnableCheckoutErrorDisplayMessaging?: boolean;\r\n shouldFocusOnCheckoutError?: boolean | undefined;\r\n}\r\n\r\ninterface ICheckoutGuidedFormState {\r\n currentStep: number;\r\n}\r\n\r\nconst paymentInstrumentModuleId = 'payment-instrument';\r\n\r\n/**\r\n *\r\n * CheckoutGuidedForm component.\r\n * @extends {React.Component}\r\n */\r\n@observer\r\nclass CheckoutGuidedForm extends React.PureComponent {\r\n @computed public get hasMissingInfo(): boolean {\r\n if (\r\n this.props.hasShippingAddress === false ||\r\n this.props.hasCartDeliveryMode === false ||\r\n this.props.hasGuestCheckoutEmail === false ||\r\n this.props.isTermsAndConditionAccepted === false\r\n ) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n @computed public get hasOrderError(): boolean {\r\n for (const item of this.props.items) {\r\n const childId = this.getId(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n public state: ICheckoutGuidedFormState = {\r\n currentStep: 0\r\n };\r\n\r\n public componentDidMount(): void {\r\n /**\r\n * Append child modules.\r\n */\r\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n this.props.moduleState.init({ childIds });\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { moduleState, items, resource } = this.props;\r\n if (!items || !moduleState) {\r\n return null;\r\n }\r\n\r\n const shouldCollapseAfterRedirect =\r\n this.props.isPaymentVerificationRedirection &&\r\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n !this.props.hasError &&\r\n !this.hasMissingInfo &&\r\n !this.hasOrderError;\r\n\r\n let previousModuleHasError = false;\r\n\r\n return (\r\n
\r\n {items.map((item: React.ReactNode) => {\r\n const childId = this.getId(item);\r\n const step = this.getStep(childId);\r\n const title = this.getHeading(item);\r\n const state = this.props.moduleState.getModule(childId);\r\n const {\r\n isReady,\r\n isPending,\r\n isUpdating,\r\n isDisabled,\r\n isCancelAllowed,\r\n onEdit,\r\n onCancel,\r\n onSubmit,\r\n hasModuleState,\r\n hasInitialized,\r\n hasError\r\n } = state || ({} as IModuleStateManager);\r\n\r\n let shouldFocus =\r\n !!this.props.shouldEnableCheckoutErrorDisplayMessaging &&\r\n !!this.props.shouldFocusOnCheckoutError &&\r\n !previousModuleHasError &&\r\n hasError;\r\n previousModuleHasError = previousModuleHasError || shouldFocus;\r\n\r\n return (\r\n \r\n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\r\n \r\n );\r\n })}\r\n
\r\n );\r\n }\r\n\r\n private readonly getEnabledModules = (): string[] => {\r\n const {\r\n moduleState: { childIds, getModule }\r\n } = this.props;\r\n return childIds.filter((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && !state.isDisabled;\r\n });\r\n };\r\n\r\n private readonly getStep = (id: string): number => {\r\n return this.getEnabledModules().indexOf(id);\r\n };\r\n\r\n private readonly getId = (item: React.ReactNode): string => {\r\n return get(item, 'props.id') || '';\r\n };\r\n\r\n private readonly getHeading = (item: React.ReactNode): Heading => {\r\n return get(item, 'props.config.heading') || '';\r\n };\r\n\r\n private readonly isExpanded = (step: number): boolean => {\r\n if (this.props.isEditor) {\r\n // Editorial mode: Expand all the drawers\r\n return true;\r\n }\r\n return step > -1 && step <= this.state.currentStep;\r\n };\r\n\r\n private readonly isActive = (step: number): boolean => {\r\n return step === this.state.currentStep;\r\n };\r\n\r\n private readonly isVisted = (step: number): boolean => {\r\n return step > -1 && step < this.state.currentStep;\r\n };\r\n\r\n private readonly onNext = (): void => {\r\n this.setState({\r\n currentStep: this.state.currentStep + 1\r\n });\r\n };\r\n}\r\n\r\nexport default CheckoutGuidedForm;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\ninterface ICheckoutPlaceOrderButtonProps {\r\n canPlaceOrder: boolean;\r\n checkoutBtnText: string;\r\n telemetryContent?: ITelemetryContent;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n isExpressCheckoutApplied?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n placeOrder(): Promise;\r\n}\r\n\r\nconst buttonsStates: React.Dispatch>[] = [];\r\n\r\n/**\r\n * On place order function.\r\n * @param isBusy -Check is busy.\r\n * @param canPlaceOrder -Check can place order.\r\n * @param placeOrder -Place order function.\r\n * @returns Set state of button.\r\n */\r\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\r\n if (isBusy || !canPlaceOrder) {\r\n return;\r\n }\r\n buttonsStates.map(buttonSetState => {\r\n buttonSetState(true);\r\n return true;\r\n });\r\n await placeOrder();\r\n};\r\n\r\nconst CheckoutPlaceOrderButton: React.FC = ({\r\n checkoutBtnText,\r\n canPlaceOrder,\r\n placeOrder,\r\n telemetryContent,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n isPlaceOrderLoading,\r\n isExpressCheckoutApplied,\r\n isPaymentVerificationRedirection\r\n}) => {\r\n const [isBusy, setIsBusy] = useState(false);\r\n buttonsStates.push(setIsBusy);\r\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\r\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n }\r\n\r\n return (\r\n \r\n {checkoutBtnText}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutPlaceOrderButton;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n updateLineDeliverySpecificationsAsync,\r\n validateForCheckoutAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport {\r\n Address,\r\n DeliveryPreferenceType,\r\n LineDeliverySpecification,\r\n SimpleProduct,\r\n TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport {\r\n ArrayExtensions,\r\n getAvailabilitiesForCartLineItems,\r\n IProductInventoryInformation,\r\n ProductAvailabilitiesForCartLineItems,\r\n validateCartLinesInventory\r\n} from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n Button,\r\n getPayloadObject,\r\n getTelemetryAttributes,\r\n getTelemetryObject,\r\n IModuleProps,\r\n INodeProps,\r\n ITelemetryContent,\r\n TelemetryConstant,\r\n Waiting\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport { ErrorLocation } from '@msdyn365-commerce/global-state';\r\nimport classnames from 'classnames';\r\nimport isEmpty from 'lodash/isEmpty';\r\nimport { action, computed, get, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { IRecaptchaCheckoutData } from './recaptcha-checkout.data';\r\nimport { ICheckoutHeadingData, IRecaptchaCheckoutProps } from './recaptcha-checkout.props.autogenerated';\r\nimport AlertComponent from './components/alert';\r\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\nimport { getLineItems, ILineItems } from './components/get-line-items';\r\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\r\nimport GuidedFormComponent from './components/guided-form';\r\nimport PlaceOrderButtonComponent from './components/place-order-button';\r\nimport placeOrder from './methods/place-order';\r\nimport { focusOnCheckoutError, setCheckoutErrors } from '@msdyn365-commerce-modules/checkout';\r\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport * from './components/get-line-items';\r\nexport * from './components/get-order-summary';\r\n\r\n/**\r\n * Device type.\r\n */\r\ntype DeviceType = 'Mobile';\r\n\r\n/**\r\n * The Checkout state.\r\n */\r\ninterface ICheckoutState {\r\n errorMessage: string;\r\n \r\n isValidationPassed: boolean;\r\n isPlaceOrderLoading?: boolean;\r\n isPlaceOrderClicked?: boolean;\r\n}\r\n\r\n/**\r\n * The Checkout view props.\r\n * @extends IRecaptchaCheckoutProps\r\n */\r\nexport interface ICheckoutViewProps extends IRecaptchaCheckoutProps {\r\n className: string;\r\n canShow?: boolean;\r\n isEmptyCart?: boolean;\r\n isConsentGiven?: boolean;\r\n hasError?: boolean;\r\n isPaymentVerificationRedirection?: boolean;\r\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\r\n cartStatus?: string;\r\n isMobile?: boolean;\r\n isEditorialMode?: boolean;\r\n backToShoppingUrl?: string;\r\n editCartLink?: string;\r\n hasSalesOrder: boolean;\r\n hasInvoiceLine?: boolean;\r\n\r\n checkoutProps: IModuleProps;\r\n headerProps: INodeProps;\r\n bodyProps: INodeProps;\r\n mainProps: INodeProps;\r\n mainControlProps: INodeProps;\r\n sideProps: INodeProps;\r\n sideControlFirstProps: INodeProps;\r\n sideControlSecondProps: INodeProps;\r\n termsAndConditionsProps: INodeProps;\r\n\r\n guidedForm?: React.ReactNode;\r\n title?: React.ReactNode;\r\n loading?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n orderSummary?: IOrderSummary;\r\n invoicePaymentSummary?: IInvoicePaymentSummary;\r\n lineItems?: ILineItems;\r\n placeOrderButton?: React.ReactNode;\r\n termsAndConditions?: React.ReactNode;\r\n keepShoppingButton?: React.ReactNode;\r\n orderConfirmation?: React.ReactNode;\r\n\r\n checkoutExpressPaymentContainer?: React.ReactNode;\r\n checkoutErrorRef?: React.RefObject;\r\n}\r\n\r\n/**\r\n * The checkout module props interface.\r\n */\r\nexport interface ICheckoutModuleProps extends IRecaptchaCheckoutProps, IModuleStateProps {}\r\n\r\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\r\n\r\n/**\r\n *\r\n * CheckoutContainer component.\r\n * @extends {React.Component}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass Checkout extends React.PureComponent {\r\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\r\n return this.props.data.checkout?.status;\r\n }\r\n\r\n @computed get isEmptyCart(): boolean {\r\n if (this.isEditorialMode) {\r\n // Editorial mode: Ignore empty cart\r\n return false;\r\n }\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\r\n }\r\n\r\n @computed get hasError(): boolean {\r\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\r\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\r\n }\r\n\r\n @computed get isEditorialMode(): boolean {\r\n return this.props.context.request.params.isEditor;\r\n }\r\n\r\n @computed get canPlaceOrder(): boolean {\r\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\r\n\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\r\n\r\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\r\n return (\r\n this.props.moduleState.isReady &&\r\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\r\n (this.state.errorMessage === '' ||\r\n shouldEnableSinglePaymentAuthorizationCheckout ||\r\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\r\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\r\n );\r\n }\r\n\r\n @computed get isPaidOffByCustomerAccount(): boolean {\r\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\r\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\r\n\r\n return customerAccountAmount === amountDue;\r\n }\r\n\r\n @computed get isCartReady(): boolean {\r\n return (\r\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\r\n this.props.data.customerInformation.status !== 'LOADING' &&\r\n this.props.data.featureState.status !== 'LOADING'\r\n );\r\n }\r\n\r\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\r\n const properties =\r\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\r\n property => property.Key === 'expressPaymentDetails'\r\n )?.Value?.StringValue ?? '';\r\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\r\n }\r\n\r\n public state: ICheckoutState = {\r\n errorMessage: '',\r\n isValidationPassed: false,\r\n isPlaceOrderLoading: false,\r\n isPlaceOrderClicked: false\r\n };\r\n\r\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\r\n\r\n public componentDidMount(): void {\r\n const {\r\n resources: { genericErrorMessage }\r\n } = this.props;\r\n\r\n when(\r\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\r\n async () => {\r\n if (this.expressPaymentDetailsFromCartPage) {\r\n const {\r\n email,\r\n tenderLine,\r\n tokenizedPaymentCard,\r\n paymentTenderType: paymentTenderTypeFromCartPage,\r\n isExpressCheckoutAppliedInCartPage,\r\n isExpressAddressAppliedInCartPage,\r\n cardPaymentAcceptResult,\r\n address\r\n } = this.expressPaymentDetailsFromCartPage;\r\n\r\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\r\n newEmailAddressFromExpressCheckout: email ?? '',\r\n newTenderLine: tenderLine,\r\n newTokenizedPaymentCard: tokenizedPaymentCard,\r\n newPaymentTenderType: paymentTenderTypeFromCartPage,\r\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\r\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\r\n newCardPaymentAcceptResult: cardPaymentAcceptResult\r\n });\r\n\r\n if (isExpressAddressAppliedInCartPage && address) {\r\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\r\n newBillingAddressFromExpressCheckout: address\r\n });\r\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\r\n newShippingAddressFromExpressCheckout: address\r\n });\r\n } else {\r\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\r\n }\r\n\r\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\r\n newExtensionProperties: [\r\n {\r\n Key: 'expressPaymentDetails',\r\n Value: { StringValue: '' }\r\n }\r\n ]\r\n });\r\n }\r\n }\r\n );\r\n\r\n when(\r\n () => this.hasError,\r\n () => {\r\n this.setState({\r\n errorMessage: genericErrorMessage\r\n });\r\n this.props.context.telemetry.error('Failed to get cart');\r\n }\r\n );\r\n\r\n when(\r\n () => {\r\n return this.isEmptyCart;\r\n },\r\n () => {\r\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\r\n }\r\n );\r\n\r\n when(\r\n () => this.isCartReady,\r\n () => {\r\n this.validateForCheckout();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\r\n async isReady => {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n isReady &&\r\n !this.props.data.checkout.result?.redirectAdditionalContext &&\r\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\r\n ) {\r\n if (!this.state.isPlaceOrderLoading) {\r\n this.setState({ isPlaceOrderLoading: true });\r\n }\r\n\r\n this.props.telemetry.information(\r\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\r\n );\r\n\r\n await this.onPlaceOrder();\r\n\r\n // If 3D authentication redirection, don't update isPlaceOrderLoading\r\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n }\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.isBillingAddressHasError,\r\n hasError => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\r\n this.setState({ isPlaceOrderLoading: false });\r\n\r\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\r\n\r\n this.props.telemetry.information(\r\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\r\n );\r\n }\r\n }\r\n );\r\n\r\n // Reaction to enable place order button when redirection is true for new checkout flow.\r\n reaction(\r\n () => this.canPlaceOrder,\r\n async () => {\r\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\r\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\r\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\r\n newIsPlaceOrderEnabledInRedirection: true\r\n });\r\n\r\n this.props.telemetry.information(\r\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\r\n );\r\n } else {\r\n this.props.telemetry.information(\r\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\r\n );\r\n this.props.telemetry.information(\r\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\r\n this.canPlaceOrder\r\n }.`\r\n );\r\n }\r\n } else {\r\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\r\n }\r\n }\r\n );\r\n\r\n // Reaction to update the error message when there is a checkout error.\r\n reaction(\r\n () => this.props.data.checkout.result?.checkoutError,\r\n checkoutError => {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\r\n checkoutError &&\r\n checkoutError.errorLocation === ErrorLocation.Checkout &&\r\n checkoutError.errorMessage\r\n ) {\r\n this._setErrorMessage(checkoutError.errorMessage);\r\n }\r\n }\r\n );\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (\r\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\r\n this.props.data.checkout.result?.shouldFocusOnCheckoutError &&\r\n this.state.errorMessage\r\n ) {\r\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\r\n }\r\n }\r\n\r\n // eslint-disable-next-line complexity -- ignore the complexity.\r\n public render(): JSX.Element {\r\n const {\r\n moduleState,\r\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\r\n resources,\r\n context: {\r\n request: {\r\n user: { isAuthenticated }\r\n }\r\n }\r\n } = this.props;\r\n const { errorMessage } = this.state;\r\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\r\n const checkoutClass = classnames('ms-checkout', className);\r\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\r\n\r\n // @ts-expect-error - check the key of slot\r\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\r\n\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n const isMobile =\r\n this.props.context.request &&\r\n this.props.context.request.device &&\r\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\r\n\r\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n\r\n const termsAndConditions =\r\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\r\n\r\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\r\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\r\n\r\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\r\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\r\n const shouldEnableSinglePaymentAuthorizationCheckout =\r\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const shouldEnableCheckoutErrorDisplayMessaging =\r\n this.props.data.checkout?.result?.shouldEnableCheckoutErrorDisplayMessaging ?? false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\r\n const shouldFocusOnCheckoutError = this.props.data.checkout?.result?.shouldFocusOnCheckoutError;\r\n\r\n let hasExpressPaymentContainer = false;\r\n\r\n if (\r\n typeof window !== 'undefined' &&\r\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\r\n ) {\r\n hasExpressPaymentContainer = true;\r\n }\r\n\r\n let viewProps: ICheckoutViewProps = {\r\n ...this.props,\r\n className: checkoutClass,\r\n checkoutErrorRef: this.checkoutErrorRef,\r\n isEmptyCart: this.isEmptyCart,\r\n isConsentGiven,\r\n hasError: this.hasError,\r\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n hasSalesOrder:\r\n this.props.data.checkout &&\r\n this.props.data.checkout.result !== undefined &&\r\n this.props.data.checkout.result.salesOrder !== undefined,\r\n hasInvoiceLine,\r\n cartStatus: this.cartStatus,\r\n isMobile,\r\n backToShoppingUrl,\r\n editCartLink,\r\n isEditorialMode: this.isEditorialMode,\r\n orderConfirmation:\r\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\r\n ? this.props.slots.orderConfirmation[0]\r\n : undefined,\r\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\r\n headerProps: { className: 'ms-checkout__head' },\r\n bodyProps: { className: 'ms-checkout__body' },\r\n mainProps: { className: 'ms-checkout__main' },\r\n mainControlProps: { className: 'ms-checkout__main-control' },\r\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\r\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\r\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\r\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\r\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\r\n checkoutExpressPaymentContainer\r\n };\r\n\r\n if (!isConsentGiven && isAuthenticated) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else if (this.isLoading()) {\r\n viewProps = {\r\n ...viewProps,\r\n loading: \r\n };\r\n } else if (this.hasError) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: \r\n };\r\n } else {\r\n viewProps = {\r\n ...viewProps,\r\n alert: errorMessage && ,\r\n canShow: true,\r\n guidedForm: checkoutInformation ? (\r\n \r\n ) : (\r\n undefined\r\n ),\r\n orderSummary: getOrderSummary(this.props),\r\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\r\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\r\n placeOrderButton: (\r\n \r\n ),\r\n termsAndConditions,\r\n keepShoppingButton: backToShoppingUrl && (\r\n \r\n {backToShopping}\r\n \r\n )\r\n };\r\n }\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\r\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\r\n if (isLoading) {\r\n return AsyncResultStatusCode.LOADING;\r\n }\r\n\r\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\r\n if (isSuccess) {\r\n return AsyncResultStatusCode.SUCCESS;\r\n }\r\n\r\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\r\n if (isFailed) {\r\n return AsyncResultStatusCode.FAILED;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Renders heading.\r\n * @param checkoutHeading - The checkout heading.\r\n * @returns React node.\r\n */\r\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * Event handler for heading change event.\r\n * @param event - The content change event in heading element.\r\n * @returns The new heading value.\r\n */\r\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\r\n (this.props.config.checkoutHeading!.text = event.target.value);\r\n\r\n /**\r\n * Checks if cart is loading.\r\n * @returns True if is loading, false otherwise.\r\n */\r\n private readonly isLoading = (): boolean => {\r\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\r\n };\r\n\r\n /**\r\n * Get slot items.\r\n * @param key - The slot key.\r\n * @returns React node or undefined.\r\n */\r\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\r\n const { slots } = this.props;\r\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\r\n };\r\n\r\n /**\r\n * Trigger the payment section container submit when placing order.\r\n */\r\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\r\n this.setState({ isPlaceOrderLoading: true });\r\n\r\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\r\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\r\n });\r\n };\r\n\r\n /**\r\n * On place order.\r\n * @returns Void promise.\r\n */\r\n private readonly onPlaceOrder = async (): Promise => {\r\n const {\r\n resources: {\r\n checkoutOutOfStockErrorMessage,\r\n genericErrorMessage,\r\n customerCreditLimitExceededErrorMessage,\r\n invalidCartVersionErrorMessage,\r\n missingRequiredCartTenderLinesErrorMessage\r\n },\r\n context: {\r\n actionContext,\r\n app: {\r\n config: { enableStockCheck = false }\r\n }\r\n },\r\n slots: { orderConfirmation },\r\n data: { checkout, products }\r\n } = this.props;\r\n\r\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\r\n this.setState({ isPlaceOrderClicked: true });\r\n\r\n // If hasInvoiceLine is true, no inventory check\r\n if (\r\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\r\n enableStockCheck &&\r\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\r\n ) {\r\n this.setState({\r\n errorMessage: checkoutOutOfStockErrorMessage\r\n });\r\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\r\n } else {\r\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\r\n\r\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\r\n\r\n await placeOrder(\r\n actionContext,\r\n this.props.data.checkout.result,\r\n this.props.data.products.result,\r\n !hasOrderConfirmation,\r\n updatedCartVersion,\r\n this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ).catch(error => {\r\n const checkoutResult = this.props.data.checkout.result;\r\n\r\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\r\n const errorCode = error && error.name ? error.name : '';\r\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext);\r\n } else {\r\n let errorMessage = genericErrorMessage;\r\n this.setState({ isPlaceOrderClicked: false });\r\n\r\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n errorMessage = invalidCartVersionErrorMessage;\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\r\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\r\n } else if (\r\n error &&\r\n error.name === 'Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit'\r\n ) {\r\n errorMessage = customerCreditLimitExceededErrorMessage;\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n error.data?.AdditionalContext &&\r\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\r\n ) {\r\n return;\r\n }\r\n\r\n this.setState({\r\n errorMessage\r\n });\r\n this.props.telemetry.exception(error);\r\n }\r\n });\r\n\r\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\r\n }\r\n };\r\n\r\n /**\r\n * Update receipt email address for electronic cart line.\r\n * @param newGuestCheckoutEmail - The guest checkout email.\r\n * @returns The updated cart version.\r\n */\r\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\r\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\r\n );\r\n\r\n let updatedCartVersion: number | undefined;\r\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\r\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\r\n return {\r\n LineId: line.LineId,\r\n DeliverySpecification: {\r\n DeliveryModeId: emailDeliveryModeCode,\r\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\r\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\r\n }\r\n };\r\n });\r\n\r\n await updateLineDeliverySpecificationsAsync(\r\n { callerContext: this.props.context.actionContext },\r\n (await this.props.data.checkout).checkoutCart.cart.Id,\r\n lineDeliverySpecifications\r\n )\r\n .then(updatedCart => {\r\n updatedCartVersion = updatedCart.Version;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\r\n });\r\n }\r\n\r\n return updatedCartVersion;\r\n };\r\n\r\n /**\r\n * Return true if any product in the cart is over its max quantity.\r\n * @param cart -- The checkout cart.\r\n * @param products -- The checkout products.\r\n * @returns - Is any product in the cart is over max quantity.\r\n */\r\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\r\n let isOverMaxQuantity = false;\r\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\r\n\r\n await getAvailabilitiesForCartLineItems(\r\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\r\n this.props.context.actionContext\r\n )\r\n .then(productInventoryInformation => {\r\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\r\n\r\n cart.CartLines?.map(cartline => {\r\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\r\n\r\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\r\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\r\n const isEmailDelivery =\r\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\r\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\r\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\r\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\r\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\r\n });\r\n if (foundProductAvailability) {\r\n productsThatShouldValidateInventory.push(foundProductAvailability);\r\n }\r\n }\r\n });\r\n\r\n const cartLinesInventoryValidation = validateCartLinesInventory(\r\n cart.CartLines ?? [],\r\n productsThatShouldValidateInventory,\r\n this.props.context.actionContext,\r\n products,\r\n emailDeliveryModeCode\r\n );\r\n\r\n // If is invalid then exceeds the available quantity\r\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\r\n return isOverMaxQuantity;\r\n })\r\n .catch(error => {\r\n this.props.context.actionContext.telemetry.exception(error);\r\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\r\n });\r\n\r\n return isOverMaxQuantity;\r\n };\r\n\r\n /**\r\n * Gets active child in module state.\r\n * @returns - The module state manager collection.\r\n */\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n /**\r\n * On container ready.\r\n */\r\n private readonly onContainerReady = (): void => {\r\n this.props.telemetry.information('Checkout onContainerReady is called.');\r\n\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n\r\n /**\r\n * Redirects to cart page.\r\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\r\n */\r\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\r\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\r\n if (window && editCartLink) {\r\n window.location.assign(editCartLink);\r\n } else {\r\n this.setState({\r\n errorMessage: this.props.resources.genericErrorMessage\r\n });\r\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\r\n }\r\n };\r\n\r\n /**\r\n * Validates for checkout.\r\n * @param retry - Retry flag.\r\n */\r\n private readonly validateForCheckout = (retry: boolean = true): void => {\r\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\r\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\r\n const { Id, Version } = cart;\r\n const isOrderQuantityLimitsFeatureEnabledInHq =\r\n this.props.data.featureState.result?.find(\r\n featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature'\r\n )?.IsEnabled || false;\r\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\r\n const customerInfo = this.props.data.customerInformation.result;\r\n\r\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\r\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\r\n (customerInfo &&\r\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && customerInfo.IsB2b) ||\r\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !customerInfo.IsB2b)));\r\n if (isOrderQuantityLimitsFeatureEnabledInHq && isOrderQuantityLimitsFeatureEnabledInSiteSettings) {\r\n if (Version && Id) {\r\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\r\n .then((result: CartLineValidationResults) => {\r\n if (result.ValidationFailuresByCartLines?.length !== 0) {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n })\r\n .catch(error => {\r\n this.props.telemetry.warning(error);\r\n this.props.telemetry.debug('Unable to validate Cart');\r\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\r\n const cartState = this.props.data.checkout.result?.checkoutCart;\r\n cartState\r\n ?.refreshCart({})\r\n .then(() => {\r\n this.validateForCheckout(false);\r\n })\r\n .catch((refreshError: Error) => {\r\n this.props.telemetry.warning(refreshError.message);\r\n this.props.telemetry.debug('Unable to refresh Cart');\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n });\r\n } else {\r\n this.redirectToCartPage(notFoundEditCartLinkMessage);\r\n }\r\n } else {\r\n this.setState({ isValidationPassed: true });\r\n }\r\n };\r\n\r\n @action\r\n private readonly _setErrorMessage = (errorMessage: string): void => {\r\n this.props.telemetry.error(errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.props.moduleState.onUpdating();\r\n this.setState({\r\n errorMessage\r\n });\r\n };\r\n\r\n /**\r\n * Save the address as Shipping and Billing address.\r\n * @param tokenizedPaymentCard - Tokenized payment card.\r\n */\r\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\r\n const checkoutState = this.props.data.checkout.result;\r\n\r\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\r\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\r\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\r\n\r\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\r\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\r\n }\r\n };\r\n\r\n /**\r\n * Get address from tokenizedPaymentCard.\r\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\r\n * @returns The address.\r\n */\r\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\r\n const address: Address = {\r\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\r\n Name: tokenizedPaymentCard.NameOnCard,\r\n Street: tokenizedPaymentCard.Address1,\r\n StreetNumber: tokenizedPaymentCard.Address2,\r\n City: tokenizedPaymentCard.City,\r\n State: tokenizedPaymentCard.State,\r\n ZipCode: tokenizedPaymentCard.Zip,\r\n Phone: tokenizedPaymentCard.Phone\r\n };\r\n\r\n return address;\r\n };\r\n}\r\n\r\nexport default Checkout;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IActionContext } from '@msdyn365-commerce/core';\r\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\r\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { PlaceOrder } from '@msdyn365-commerce-modules/checkout';\r\n\r\nexport default async (\r\n ctx: IActionContext,\r\n checkoutState: ICheckoutState | undefined,\r\n orderedProducts: SimpleProduct[] | undefined,\r\n redirect: boolean,\r\n updatedCartVersion?: number,\r\n isPaymentVerificationRedirection?: boolean\r\n) => {\r\n return PlaceOrder(ctx, checkoutState, orderedProducts, redirect, updatedCartVersion, isPaymentVerificationRedirection);\r\n};\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutViewProps, ILineItem, ILineItemDeliveryGroup, ILineItems, IOrderSummary, IPickUpAtStore } from './recaptcha-checkout';\r\nimport { IEmailDelivery } from './components';\r\nimport { IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\r\n \r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n}) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode\r\n}) => (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n);\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {lines.shipping}\r\n {lines.otherCharge}\r\n {lines.tax}\r\n {lines.totalDiscounts}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst CheckoutView: React.FC = props => {\r\n const {\r\n isPaymentVerificationRedirection,\r\n shouldEnableSinglePaymentAuthorizationCheckout,\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton,\r\n checkoutExpressPaymentContainer,\r\n checkoutErrorRef\r\n } = props;\r\n\r\n return (\r\n \r\n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\r\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\r\n \r\n )}\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {checkoutExpressPaymentContainer}\r\n {checkoutExpressPaymentContainer && {title}}\r\n {guidedForm}\r\n {termsAndConditions}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && \r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n {lineItems && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Address, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IPaymentInformationProps {\r\n resources: {\r\n changePaymentButtonText: string;\r\n cardTitle: string;\r\n cardNumberLabel: string;\r\n expiresDateLabel: string;\r\n addressTitle: string;\r\n };\r\n tokenizedPaymentCard?: TokenizedPaymentCard;\r\n tenderLine?: TenderLine;\r\n billingAddress?: Address;\r\n canEdit?: boolean;\r\n onEdit?(): void;\r\n}\r\n\r\n/**\r\n * PaymentInformation SFC.\r\n * @param root0\r\n * @param root0.resources\r\n * @param root0.resources.changePaymentButtonText\r\n * @param root0.resources.cardTitle\r\n * @param root0.resources.cardNumberLabel\r\n * @param root0.resources.expiresDateLabel\r\n * @param root0.resources.addressTitle\r\n * @param root0.tokenizedPaymentCard\r\n * @param root0.tenderLine\r\n * @param root0.billingAddress\r\n * @param root0.onEdit\r\n * @param root0.canEdit\r\n * @extends {React.SFC}\r\n */\r\nconst PaymentInformation: React.SFC = ({\r\n resources: { changePaymentButtonText, cardTitle, cardNumberLabel, expiresDateLabel, addressTitle },\r\n tokenizedPaymentCard,\r\n tenderLine,\r\n billingAddress,\r\n onEdit,\r\n canEdit\r\n}) => {\r\n const { NameOnCard = '', CardTypeId, CardTokenInfo = {}, ExpirationMonth = 0, ExpirationYear = 0 } = tokenizedPaymentCard || {};\r\n const { MaskedCardNumber = '' } = CardTokenInfo || tenderLine || {};\r\n const cardLastNDigit = MaskedCardNumber.substr(-4);\r\n\r\n // @ts-expect-error\r\n const isValidCardNumber = !isNaN(cardLastNDigit) && cardLastNDigit !== '';\r\n const { Name, Street, StreetNumber, City, State, ZipCode, ThreeLetterISORegionName, Phone } = billingAddress || {};\r\n\r\n return (\r\n
\r\n

{cardTitle}

\r\n

{NameOnCard}

\r\n {CardTypeId &&

{CardTypeId}

}\r\n {isValidCardNumber && (\r\n

\r\n {cardNumberLabel} {` `} {cardLastNDigit}\r\n

\r\n )}\r\n {(ExpirationMonth > 0 || ExpirationYear > 0) && (\r\n

\r\n {expiresDateLabel} {` `} {ExpirationMonth}/{ExpirationYear}\r\n

\r\n )}\r\n {billingAddress && (\r\n <>\r\n

{addressTitle}

\r\n

\r\n {Name}\r\n {` `}\r\n {Street}\r\n

\r\n {StreetNumber &&

{StreetNumber}

}\r\n

\r\n {City},{State}\r\n {` `}\r\n {ZipCode}\r\n {` `}\r\n {ThreeLetterISORegionName}\r\n {` `}\r\n {Phone}\r\n

\r\n \r\n )}\r\n {canEdit && (\r\n \r\n )}\r\n
\r\n );\r\n};\r\n\r\nexport default React.memo(PaymentInformation);\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { AsyncResultStatus, getUrlSync } from '@msdyn365-commerce/core';\r\nimport { CheckoutModule, ErrorLocation, IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport { CardType } from '@msdyn365-commerce/retail-proxy';\r\nimport { retrieveCardPaymentAcceptResultAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\r\nimport { resolveCardTypesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport {\r\n Address,\r\n CardPaymentAcceptResult,\r\n CartLine,\r\n TokenizedPaymentCard\r\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { IModuleProps, INodeProps, Modal } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport get from 'lodash/get';\r\nimport { action, computed, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { AsyncResultStatusCode } from '@msdyn365-commerce-modules/checkout';\r\nimport { AddPaymentFormComponent } from '@msdyn365-commerce-modules/checkout';\r\nimport { ErrorComponent } from '@msdyn365-commerce-modules/checkout';\r\nimport { Iframe } from '@msdyn365-commerce-modules/checkout';\r\nimport {\r\n paymentConnectorExtraContextMessage,\r\n PaymentConnectorPostMessageType,\r\n paymentConnectorSubmitMessage\r\n} from '@msdyn365-commerce-modules/checkout';\r\nimport { WaitingComponent } from '@msdyn365-commerce-modules/checkout';\r\nimport { IVisibilityObserverProps, withVisibilityObserver } from '@msdyn365-commerce-modules/checkout';\r\nimport getCardPaymentAcceptPointAction, { GetCardPaymentAcceptPointInput } from './actions/get-card-payment-accept-point';\r\nimport { IRecaptchaPaymentInstrumentData } from './recaptcha-payment-instrument.data';\r\nimport { IRecaptchaPaymentInstrumentProps } from './recaptcha-payment-instrument.props.autogenerated';\r\nimport PaymentInformationComponent from './components/payment-information';\r\nimport { focusOnCheckoutError, setCheckoutErrors } from '@msdyn365-commerce-modules/checkout';\r\n\r\n\r\n//@ts-ignore\r\nimport ReCAPTCHA from 'react-google-recaptcha';\r\n\r\n// This is the production key\r\nconst TEST_SITE_KEY = \"6LcClc0ZAAAAAKoN2AsxwRRd4GMtD_yUG5AwXEhl\";\r\n// This is the test key\r\n//const TEST_SITE_KEY = \"6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\";\r\nconst DELAY = 1500;\r\n\r\n\r\nexport interface ICheckoutPaymentInstrumentModuleProps\r\n extends IRecaptchaPaymentInstrumentProps,\r\n IModuleStateProps,\r\n IVisibilityObserverProps {}\r\n\r\ninterface ICheckoutPaymentInstrumentState {\r\n value: any;\r\n errorMessage?: string;\r\n isFetchingPaymentConnector?: boolean;\r\n paymentConnectorHeight?: number;\r\n isPaymentVerificationRequried?: boolean;\r\n paymentVerificationPostData?: string;\r\n isPaymentProcessing?: boolean;\r\n isOverlayModal?: boolean;\r\n isExpressCheckoutApplied?: boolean;\r\n errorPaymentConnectorId?: string;\r\n}\r\n\r\nexport interface ICheckoutPaymentOverlayModal {\r\n modal: INodeProps;\r\n}\r\n\r\nexport interface ICheckoutPaymentInstrumentViewProps extends IRecaptchaPaymentInstrumentProps<{}>, ICheckoutPaymentInstrumentState {\r\n value: null;\r\n className?: string;\r\n checkoutPaymentInstrument: IModuleProps;\r\n waiting?: React.ReactNode;\r\n alert?: React.ReactNode;\r\n paymentInformation?: React.ReactNode;\r\n addPaymentForm?: React.ReactNode;\r\n overlayModal?: ICheckoutPaymentOverlayModal;\r\n isVisible?: boolean;\r\n checkoutErrorRef?: React.RefObject;\r\n}\r\n\r\nconst zeroAmount = 0;\r\n\r\n/**\r\n *\r\n * CheckoutPaymentInstrument component.\r\n * @extends {React.Component>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nexport class CheckoutPaymentInstrument extends React.PureComponent {\r\n\r\n handleChange = (value: null) => {\r\n console.log(\"Captcha value:\", value);\r\n this.setState({ value });\r\n // if value is null recaptcha expired\r\n if (value === null) this.setState({ expired: \"true\" });\r\n };\r\n\r\n asyncScriptOnLoad = () => {\r\n this.setState({ callback: \"called!\" });\r\n };\r\n\r\n\r\n @computed get getLoyaltyAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n return checkoutState && checkoutState.loyaltyAmount ? checkoutState.loyaltyAmount : 0;\r\n }\r\n\r\n @computed get getCustomerAccountAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n return checkoutState && checkoutState.customerAccountAmount ? checkoutState.customerAccountAmount : 0;\r\n }\r\n\r\n @computed get getGiftCardTotalAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState || !checkoutState.giftCardExtends) {\r\n return 0;\r\n }\r\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\r\n const balance: number = giftCard.Balance || 0;\r\n return count + balance;\r\n }, 0);\r\n }\r\n\r\n @computed public get amountDue(): number {\r\n const {\r\n data: { checkout }\r\n } = this.props;\r\n if (!checkout.result) {\r\n return 0;\r\n }\r\n\r\n const checkoutResult = checkout.result;\r\n const cart = checkoutResult.checkoutCart.cart;\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0) {\r\n return 0;\r\n }\r\n\r\n // Use the card for payment after all other payment methods\r\n return (cart.TotalAmount || zeroAmount) - this.getGiftCardTotalAmount - this.getLoyaltyAmount - this.getCustomerAccountAmount;\r\n }\r\n\r\n @computed get shouldPaidByCard(): boolean {\r\n const {\r\n data: { checkout },\r\n config\r\n } = this.props;\r\n if (!checkout.result) {\r\n return false;\r\n }\r\n\r\n const checkoutResult = checkout.result;\r\n\r\n const { paymentTenderType, tokenizedPaymentCard, isExpressAddressApplied } = checkoutResult;\r\n const isPaidByOtherPaymentSource =\r\n config.paymenTenderType?.toLocaleLowerCase() !== paymentTenderType?.toLocaleLowerCase() &&\r\n (tokenizedPaymentCard || isExpressAddressApplied);\r\n\r\n return this.amountDue > zeroAmount && !isPaidByOtherPaymentSource;\r\n }\r\n\r\n @computed get isCartContainsItemsForShipping(): boolean {\r\n const pickupDeliveryModeCode = get(this.props, 'context.request.channel.PickupDeliveryModeCode');\r\n const emailDeliveryModeCode = get(this.props, 'context.request.channel.EmailDeliveryModeCode');\r\n const { channelDeliveryOptionConfig, featureState } = this.props.data;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n return retailMultiplePickUpOptionEnabled\r\n ? (get(this.props, 'data.checkout.result.checkoutCart.cart.CartLines') || []).some(\r\n (cartLine: CartLine) =>\r\n cartLine.DeliveryMode !==\r\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLine.DeliveryMode\r\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n )\r\n : (get(this.props, 'data.checkout.result.checkoutCart.cart.CartLines') || []).some(\r\n (cartLine: CartLine) =>\r\n cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n );\r\n }\r\n\r\n @computed get isCartHasSelectedDeliveryMethods(): boolean {\r\n return (get(this.props, 'data.checkout.result.checkoutCart.cart.CartLines') || []).every(\r\n (cartLine: CartLine) => !!cartLine.DeliveryMode\r\n );\r\n }\r\n\r\n @computed get asyncResultStatus(): AsyncResultStatus | undefined {\r\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\r\n if (isLoading) {\r\n return AsyncResultStatusCode.LOADING;\r\n }\r\n\r\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\r\n if (isSuccess) {\r\n return AsyncResultStatusCode.SUCCESS;\r\n }\r\n\r\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\r\n if (isFailed) {\r\n return AsyncResultStatusCode.FAILED;\r\n }\r\n return;\r\n }\r\n\r\n @computed get hasSelectedItem(): boolean {\r\n return !!get(this.props.data, 'checkoutState.result.tokenizedPaymentCard');\r\n }\r\n\r\n @computed get shouldReloadAcceptPage(): boolean {\r\n return !get(this.props.data, 'cardPaymentAcceptPoint.result.NotReloadAcceptPageContentWhenAmountChanged');\r\n }\r\n\r\n @computed get requestUrlOrigin(): string {\r\n const origin = get(window, 'location.origin');\r\n const requestUrl =\r\n typeof get(this.props, 'context.request.url.requestUrl') === 'string'\r\n ? new URL(get(this.props, 'context.request.url.requestUrl'))\r\n : get(this.props, 'context.request.url.requestUrl');\r\n return origin || requestUrl.origin;\r\n }\r\n\r\n public state: ICheckoutPaymentInstrumentState = {\r\n isFetchingPaymentConnector: true,\r\n value: null\r\n };\r\n\r\n private readonly moduleClassName: string = 'ms-checkout-payment-instrument';\r\n\r\n private readonly iframeRef: React.RefObject