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GAA4B/gB,GAAe,GAAKsgB,EAAiBR,EAAgB7f,EAEnF6f,EAAgB,IAChBG,EAAWtR,QAAUsS,EAA0BruB,GAAQktB,EAAe,UAAWltB,EAAM4kB,cAAgB,mBAGvG8I,EAAiB,IACjBL,EAAWpR,SAAWoS,EAA0BruB,GAAQ0tB,EAAgB,YAAa1tB,EAAM6kB,eAAiB,qBAG5GxX,EAAwB,IACxBggB,EAAWrR,gBAAkBqS,EACzBruB,GACCqN,EACD,yBACArN,EAAMklB,sBAAwB,2BAItCmI,EAAWnR,WAAamS,EAAyB1Y,EAAAA,EAAC,GACzC3V,GAAK,IAAE+kB,cAAUtmB,IACtB0vB,EACA,QACAnuB,EAAM8c,iBA1KsBnf,IAAAA,EAkLpC,OAJIoxB,EAAiB,IACjB1B,EAAWvR,eAAiBuS,EAA0BruB,GAAQ+uB,EAAgB,kBAAmB/uB,EAAM8kB,sBAGpGuI","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/checkout/actions/get-products-in-active-checkout-cart.ts?1981","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.tsx?6737","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/checkout.view.tsx?e4cc","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/alert.tsx?cb1e","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-invoice-payment-summary.tsx?9549","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-line-items.tsx?92f8","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/get-order-summary.tsx?4a81","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-card.tsx?58e0","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/guided-form.tsx?f018","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/components/place-order-button.tsx?9b41","webpack://Msdyn365.Commerce.Online/./src/modules/checkout/methods/place-order.ts?5aa0","webpack://Msdyn365.Commerce.Online/./src/invoice-summary-lineitem.tsx?5f61","webpack://Msdyn365.Commerce.Online/./src/order-summary-lineitem.tsx?8a98"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, createObservableDataAction, IAction, IActionContext, IActionInput } from '@msdyn365-commerce/core';\nimport { getCheckoutState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getSimpleProducts, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\n\n/**\n * Input class for ActiveCheckoutCartWithProducts data action.\n */\nexport class ActiveCheckoutCartProductsInput implements IActionInput {\n public getCacheKey = () => 'ActiveCheckoutCartProducts';\n\n public getCacheObjectType = () => 'ActiveCheckoutCartProducts';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport const createInput = () => {\n return new ActiveCheckoutCartProductsInput();\n};\n\n/**\n * Calls the Retail API and returns a cart object based on the passed GetCartInput.\n * @param input\n * @param ctx\n */\nexport async function getActiveCheckoutCartProductsAction(\n input: ActiveCheckoutCartProductsInput,\n ctx: IActionContext\n): Promise {\n // If no cart ID is provided in input, we need to create a cart object\n if (!input) {\n ctx.telemetry.exception(new Error('[getActiveCheckoutCartWithProducts]No valid Input was provided, failing'));\n throw new Error('[getActiveCheckoutCartWithProducts]No valid Input was provided, failing');\n }\n\n const checkoutState = await getCheckoutState(ctx);\n const cart = checkoutState.checkoutCart.cart;\n\n // If there are cart lines, make call to get products\n if (!checkoutState.checkoutCart.hasInvoiceLine && cart && cart.CartLines && cart.CartLines.length > 0) {\n return getSimpleProducts(\n cart.CartLines.map(cartLine => {\n if (cartLine.ProductId) {\n return new ProductInput(\n cartLine.ProductId,\n ctx.requestContext.apiSettings,\n undefined,\n undefined,\n ctx.requestContext,\n cartLine.CatalogId\n );\n }\n return undefined;\n }).filter(Boolean),\n ctx\n )\n .then(products => {\n if (products) {\n return products;\n }\n return [];\n })\n .catch(error => {\n ctx.telemetry.exception(error);\n throw new Error('[getActiveCheckoutCartWithProdcuts]Unable to hydrate cart with product information');\n });\n }\n\n return [];\n}\n\nexport const getActiveCheckoutCartProductsActionDataAction = createObservableDataAction({\n id: '@msdyn365-commerce-modules/checkout/get-products-in-active-checkout-cart',\n action: >getActiveCheckoutCartProductsAction,\n input: createInput\n});\n\nexport default getActiveCheckoutCartProductsActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { AsyncResultStatus, Cart, CartLineValidationResults } from '@msdyn365-commerce/retail-proxy';\nimport {\n updateLineDeliverySpecificationsAsync,\n validateForCheckoutAsync\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CartsDataActions.g';\nimport {\n Address,\n DeliveryPreferenceType,\n LineDeliverySpecification,\n SimpleProduct,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getAvailabilitiesForCartLineItems,\n IProductInventoryInformation,\n ProductAvailabilitiesForCartLineItems,\n validateCartLinesInventory\n} from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant,\n Waiting\n} from '@msdyn365-commerce-modules/utilities';\nimport { ErrorCode, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport isEmpty from 'lodash/isEmpty';\nimport { action, computed, get, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutData } from './checkout.data';\nimport { ICheckoutHeadingData, ICheckoutProps } from './checkout.props.autogenerated';\nimport AlertComponent from './components/alert';\nimport { getInvoicePaymentSummary, IInvoicePaymentSummary } from './components/get-invoice-payment-summary';\nimport { getLineItems, ILineItems } from './components/get-line-items';\nimport { getOrderSummary, IOrderSummary } from './components/get-order-summary';\nimport GuidedFormComponent from './components/guided-form';\nimport PlaceOrderButtonComponent from './components/place-order-button';\nimport placeOrder from './methods/place-order';\nimport { focusOnCheckoutError, setCheckoutErrors } from '../../checkout-errors';\nimport { AsyncResultStatusCode, IExpressPaymentDetails } from '../../common';\n\nexport * from './components/get-line-items';\nexport * from './components/get-order-summary';\n\n/**\n * Device type.\n */\ntype DeviceType = 'Mobile';\n\n/**\n * The Checkout state.\n */\ninterface ICheckoutState {\n errorMessage: string;\n isValidationPassed: boolean;\n isPlaceOrderLoading?: boolean;\n isPlaceOrderClicked?: boolean;\n}\n\n/**\n * Known action error failure states\n */\nexport const enum ActionErrorStatus {\n Timeout = 'Timeout',\n HookTimeout = 'Hook Timeout',\n ServiceUnavailable = 'Service Unavailable'\n}\n\n/**\n * The Checkout view props.\n * @extends ICheckoutProps\n */\nexport interface ICheckoutViewProps extends ICheckoutProps {\n className: string;\n canShow?: boolean;\n isEmptyCart?: boolean;\n isConsentGiven?: boolean;\n hasError?: boolean;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n cartStatus?: string;\n isMobile?: boolean;\n isEditorialMode?: boolean;\n backToShoppingUrl?: string;\n editCartLink?: string;\n hasSalesOrder: boolean;\n hasInvoiceLine?: boolean;\n\n checkoutProps: IModuleProps;\n headerProps: INodeProps;\n bodyProps: INodeProps;\n mainProps: INodeProps;\n mainControlProps: INodeProps;\n sideProps: INodeProps;\n sideControlFirstProps: INodeProps;\n sideControlSecondProps: INodeProps;\n termsAndConditionsProps: INodeProps;\n\n guidedForm?: React.ReactNode;\n title?: React.ReactNode;\n loading?: React.ReactNode;\n alert?: React.ReactNode;\n orderSummary?: IOrderSummary;\n invoicePaymentSummary?: IInvoicePaymentSummary;\n lineItems?: ILineItems;\n placeOrderButton?: React.ReactNode;\n termsAndConditions?: React.ReactNode;\n keepShoppingButton?: React.ReactNode;\n orderConfirmation?: React.ReactNode;\n\n checkoutExpressPaymentContainer?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n * The checkout module props interface.\n */\nexport interface ICheckoutModuleProps extends ICheckoutProps, IModuleStateProps {}\n\nconst expressPaymentSectionClassName = 'msc-express-payment-container';\n\n/**\n *\n * CheckoutContainer component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass Checkout extends React.PureComponent {\n @computed get cartStatus(): Msdyn365.AsyncResultStatus {\n return this.props.data.checkout?.status;\n }\n\n @computed get isEmptyCart(): boolean {\n if (this.isEditorialMode) {\n // Editorial mode: Ignore empty cart\n return false;\n }\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'SUCCESS' && !!cart && !isEmpty(cart) && (!cart.CartLines || cart.CartLines.length === 0);\n }\n\n @computed get hasError(): boolean {\n const cart = this.props.data.checkout?.result?.checkoutCart?.cart;\n return this.cartStatus === 'FAILED' || (this.cartStatus === 'SUCCESS' && (!cart || isEmpty(cart)));\n }\n\n @computed get isEditorialMode(): boolean {\n return this.props.context.request.params.isEditor;\n }\n\n @computed get canPlaceOrder(): boolean {\n const isTermsAndConditionAccepted = this.props.data.checkout.result && this.props.data.checkout.result?.isTermsAndConditionAccepted;\n\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n const disableForOBO = Msdyn365.isOboRequest(this.props.context.request) && !this.isPaidOffByCustomerAccount;\n\n // If isTermsAndConditionAccepted is undefined means TermsAndCondition module is not added to page and we should able to place order.\n return (\n this.props.moduleState.isReady &&\n (isTermsAndConditionAccepted === undefined || isTermsAndConditionAccepted || shouldEnableSinglePaymentAuthorizationCheckout) &&\n (this.state.errorMessage === '' ||\n shouldEnableSinglePaymentAuthorizationCheckout ||\n (this.props.data.checkout.result?.isPaymentVerificationRedirection ?? false)) &&\n !(shouldEnableSinglePaymentAuthorizationCheckout && disableForOBO)\n );\n }\n\n @computed get isPaidOffByCustomerAccount(): boolean {\n const amountDue = this.props.data.checkout.result?.checkoutCart.cart.TotalAmount ?? 0;\n const customerAccountAmount = this.props.data.checkout.result?.customerAccountAmount ?? 0;\n\n return customerAccountAmount === amountDue;\n }\n\n @computed get isCartReady(): boolean {\n return (\n !!this.props.data.checkout.result?.checkoutCart?.cart &&\n this.props.data.customerInformation.status !== 'LOADING' &&\n this.props.data.featureState.status !== 'LOADING'\n );\n }\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n const properties =\n this.props.data.checkout?.result?.checkoutCart?.cart?.ExtensionProperties?.find(\n property => property.Key === 'expressPaymentDetails'\n )?.Value?.StringValue ?? '';\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n public state: ICheckoutState = {\n errorMessage: '',\n isValidationPassed: false,\n isPlaceOrderLoading: false,\n isPlaceOrderClicked: false\n };\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public componentDidMount(): void {\n const {\n resources: { genericErrorMessage }\n } = this.props;\n\n when(\n () => this.asyncResultStatus !== AsyncResultStatusCode.LOADING,\n async () => {\n if (this.expressPaymentDetailsFromCartPage) {\n const {\n email,\n tenderLine,\n tokenizedPaymentCard,\n paymentTenderType: paymentTenderTypeFromCartPage,\n isExpressCheckoutAppliedInCartPage,\n isExpressAddressAppliedInCartPage,\n cardPaymentAcceptResult,\n address\n } = this.expressPaymentDetailsFromCartPage;\n\n this.props.data.checkout.result?.updateExpressCheckoutDetails({\n newEmailAddressFromExpressCheckout: email ?? '',\n newTenderLine: tenderLine,\n newTokenizedPaymentCard: tokenizedPaymentCard,\n newPaymentTenderType: paymentTenderTypeFromCartPage,\n newIsExpressCheckoutApplied: isExpressCheckoutAppliedInCartPage,\n newIsExpressAddressApplied: isExpressAddressAppliedInCartPage,\n newCardPaymentAcceptResult: cardPaymentAcceptResult\n });\n\n if (isExpressAddressAppliedInCartPage && address) {\n this.props.data.checkout.result?.updateBillingAddressFromExpressCheckout({\n newBillingAddressFromExpressCheckout: address\n });\n this.props.data.checkout.result?.updateShippingAddressFromExpressCheckout({\n newShippingAddressFromExpressCheckout: address\n });\n } else {\n void this._saveShippingAndBillingAddress(tokenizedPaymentCard);\n }\n\n this.props.data.checkout.result?.checkoutCart.updateExtensionProperties({\n newExtensionProperties: [\n {\n Key: 'expressPaymentDetails',\n Value: { StringValue: '' }\n }\n ]\n });\n }\n }\n );\n\n when(\n () => this.hasError,\n () => {\n this.setState({\n errorMessage: genericErrorMessage\n });\n this.props.context.telemetry.error('Failed to get cart');\n }\n );\n\n when(\n () => {\n return this.isEmptyCart;\n },\n () => {\n this.redirectToCartPage('Cart is empty, but no editCartLink found');\n }\n );\n\n when(\n () => this.isCartReady,\n () => {\n this.validateForCheckout();\n }\n );\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n // Reaction to call place order when isPaymentSectionContainerReady is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerReady,\n async isReady => {\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isReady &&\n !this.props.data.checkout.result?.redirectAdditionalContext &&\n (!this.props.data.checkout.result?.isExpressCheckoutApplied ||\n this.props.data.checkout.result?.isPaymentVerificationRedirection)\n ) {\n if (!this.state.isPlaceOrderLoading) {\n this.setState({ isPlaceOrderLoading: true });\n }\n\n this.props.telemetry.information(\n 'Call onPlaceOrder as reaction when isPaymentSectionContainerReady is updated for single auth payment.'\n );\n\n await this.onPlaceOrder();\n\n // If 3D authentication redirection, don't update isPlaceOrderLoading\n if (!this.props.data.checkout.result.isPaymentVerificationRequired) {\n this.setState({ isPlaceOrderLoading: false });\n }\n }\n }\n );\n\n // Reaction to enable place order button when isPaymentSectionContainerHasError is true for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.isPaymentSectionContainerHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isPaymentSectionContainerHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isPaymentSectionContainerHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isBillingAddressHasError,\n hasError => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && hasError) {\n this.setState({ isPlaceOrderLoading: false });\n\n this.props.data.checkout.result?.updateIsBillingAddressHasError({ newIsBillingAddressHasError: false });\n\n this.props.telemetry.information(\n 'Enable place order button as reaction when isBillingAddressHasError is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when isBillingAddressHasError is updated to false or not single auth payment.'\n );\n }\n }\n );\n\n // Reaction to enable place order button when redirection is true for new checkout flow.\n reaction(\n () => this.canPlaceOrder,\n async () => {\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout && this.canPlaceOrder) {\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n await this.props.data.checkout.result.updateIsPlaceOrderEnabledInRedirection({\n newIsPlaceOrderEnabledInRedirection: true\n });\n\n this.props.telemetry.information(\n 'Set isPaymentVerificationRedirection to true as reaction when canPlaceOrder is updated to true for single auth payment.'\n );\n } else {\n this.props.telemetry.information(\n 'No reaction when canPlaceOrder is updated to true but isPaymentVerificationRedirection is false for single auth payment.'\n );\n this.props.telemetry.information(\n `isOBORequest is ${Msdyn365.isOboRequest(this.props.context.request)} and canPlaceOrder is ${\n this.canPlaceOrder\n }.`\n );\n }\n } else {\n this.props.telemetry.information('No reaction when canPlaceOrder is updated to false or not single auth payment.');\n }\n }\n );\n\n // Reaction to update the error message when there is a checkout error.\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n const checkoutErrorLocation: boolean = checkoutError?.errorLocation === ErrorLocation.Checkout;\n // If there is an Error in CheckoutPaymentInstrument module, checkout error location will be updated.\n const checkoutPaymentErrorLocation: boolean =\n checkoutError?.errorCode === ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment\n ? checkoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument\n : checkoutErrorLocation;\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n checkoutError &&\n checkoutError.errorMessage &&\n (checkoutErrorLocation ? checkoutErrorLocation : checkoutPaymentErrorLocation)\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (\n this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging &&\n this.props.data.checkout.result?.shouldFocusOnCheckoutError &&\n this.state.errorMessage\n ) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n\n // eslint-disable-next-line complexity -- ignore the complexity.\n public render(): JSX.Element {\n const {\n moduleState,\n config: { className, checkoutHeading, disableGuidedCheckoutFlow },\n resources,\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const { errorMessage } = this.state;\n const { backToShopping, placeOrderText, confirmPaymentText, cookieConsentRequiredMessage, genericErrorMessage } = resources;\n const checkoutClass = classnames('ms-checkout', className);\n const allCheckoutInformation = this.getSlotItems('checkoutInformation');\n\n // @ts-expect-error - check the key of slot\n const checkoutInformation = allCheckoutInformation?.filter(info => !info?.key.includes('express-payment'));\n\n // @ts-expect-error - check the key of slot\n const checkoutExpressPaymentContainer = allCheckoutInformation?.find(info => info?.key.includes('express-payment'));\n\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n const isMobile =\n this.props.context.request &&\n this.props.context.request.device &&\n (this.props.context.request.device.Type as DeviceType) === 'Mobile';\n\n const backToShoppingUrl = Msdyn365.getUrlSync('home', this.props.context.actionContext) || '';\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n\n const termsAndConditions =\n this.props.slots.termsAndConditions && this.props.slots.termsAndConditions.length > 0 && this.props.slots.termsAndConditions[0];\n\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n const backToShoppingAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n\n const hasInvoiceLine = this.props.data.checkout && this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n const checkoutBtnText = hasInvoiceLine ? confirmPaymentText : placeOrderText;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const shouldEnableSinglePaymentAuthorizationCheckout =\n this.props.data.checkout?.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isExpressCheckoutApplied = this.props.data.checkout?.result?.isExpressCheckoutApplied ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasShippingAddress = this.props.data.checkout?.result?.hasShippingAddress;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasCartDeliveryMode = this.props.data.checkout?.result?.hasCartDeliveryMode;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const hasGuestCheckoutEmail = this.props.data.checkout?.result?.hasGuestCheckoutEmail;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isTermsAndConditionAccepted = this.props.data.checkout?.result?.isTermsAndConditionAccepted;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const isPaymentVerificationRedirection = this.props.data.checkout?.result?.isPaymentVerificationRedirection ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldEnableCheckoutErrorDisplayMessaging =\n this.props.data.checkout?.result?.shouldEnableCheckoutErrorDisplayMessaging ?? false;\n\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check null/undefined.\n const shouldFocusOnCheckoutError = this.props.data.checkout?.result?.shouldFocusOnCheckoutError;\n\n let hasExpressPaymentContainer = false;\n\n if (\n typeof window !== 'undefined' &&\n (document?.getElementsByClassName(expressPaymentSectionClassName) as HTMLCollectionOf)[0]?.style.display === ''\n ) {\n hasExpressPaymentContainer = true;\n }\n\n let viewProps: ICheckoutViewProps = {\n ...this.props,\n className: checkoutClass,\n checkoutErrorRef: this.checkoutErrorRef,\n isEmptyCart: this.isEmptyCart,\n isConsentGiven,\n hasError: this.hasError,\n isPaymentVerificationRedirection: this.props.data.checkout?.result?.isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n hasSalesOrder:\n this.props.data.checkout &&\n this.props.data.checkout.result !== undefined &&\n this.props.data.checkout.result.salesOrder !== undefined,\n hasInvoiceLine,\n cartStatus: this.cartStatus,\n isMobile,\n backToShoppingUrl,\n editCartLink,\n isEditorialMode: this.isEditorialMode,\n orderConfirmation:\n this.props.slots.orderConfirmation && this.props.slots.orderConfirmation.length > 0\n ? this.props.slots.orderConfirmation[0]\n : undefined,\n checkoutProps: { moduleProps: this.props, className: checkoutClass },\n headerProps: { className: 'ms-checkout__head' },\n bodyProps: { className: 'ms-checkout__body' },\n mainProps: { className: 'ms-checkout__main' },\n mainControlProps: { className: 'ms-checkout__main-control' },\n sideProps: { className: hasExpressPaymentContainer ? 'ms-checkout__has-express-side' : 'ms-checkout__side' },\n sideControlFirstProps: { className: 'ms-checkout__side-control-first' },\n sideControlSecondProps: { className: 'ms-checkout__side-control-second' },\n termsAndConditionsProps: { className: 'ms-checkout__terms-and-conditions' },\n title: checkoutHeading && this.renderMsdyn365Text(checkoutHeading),\n checkoutExpressPaymentContainer\n };\n\n if (!isConsentGiven && isAuthenticated) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else if (this.isLoading()) {\n viewProps = {\n ...viewProps,\n loading: \n };\n } else if (this.hasError) {\n viewProps = {\n ...viewProps,\n alert: \n };\n } else {\n viewProps = {\n ...viewProps,\n alert: errorMessage && ,\n canShow: true,\n guidedForm: checkoutInformation ? (\n \n ) : (\n undefined\n ),\n orderSummary: getOrderSummary(this.props),\n invoicePaymentSummary: getInvoicePaymentSummary(this.props),\n lineItems: hasInvoiceLine ? undefined : getLineItems(this.props, this.telemetryContent),\n placeOrderButton: (\n \n ),\n termsAndConditions,\n keepShoppingButton: backToShoppingUrl && (\n \n {backToShopping}\n \n )\n };\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @computed public get asyncResultStatus(): AsyncResultStatus | undefined {\n const isLoading = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.LOADING);\n if (isLoading) {\n return AsyncResultStatusCode.LOADING;\n }\n\n const isSuccess = Object.values(this.props.data).every(data => get(data, 'status') === AsyncResultStatusCode.SUCCESS);\n if (isSuccess) {\n return AsyncResultStatusCode.SUCCESS;\n }\n\n const isFailed = Object.values(this.props.data).some(data => get(data, 'status') === AsyncResultStatusCode.FAILED);\n if (isFailed) {\n return AsyncResultStatusCode.FAILED;\n }\n\n return undefined;\n }\n\n /**\n * Renders heading.\n * @param checkoutHeading - The checkout heading.\n * @returns React node.\n */\n public renderMsdyn365Text(checkoutHeading: ICheckoutHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n public handleCheckoutHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutHeading!.text = event.target.value);\n\n /**\n * Checks if cart is loading.\n * @returns True if is loading, false otherwise.\n */\n private readonly isLoading = (): boolean => {\n return !this.cartStatus || this.cartStatus === 'LOADING' || this.isEmptyCart || !this.state.isValidationPassed;\n };\n\n /**\n * Get slot items.\n * @param key - The slot key.\n * @returns React node or undefined.\n */\n private readonly getSlotItems = (key: string): React.ReactNode[] | undefined => {\n const { slots } = this.props;\n return slots && slots[key] && slots[key].length > 0 ? slots[key] : undefined;\n };\n\n /**\n * Trigger the payment section container submit when placing order.\n */\n private readonly triggerPaymentWithPlaceOrder = async (): Promise => {\n this.setState({ isPlaceOrderLoading: true });\n\n await this.props.data.checkout.result?.updateShouldTriggerPaymentWithPlaceOrder({\n newShouldTriggerPaymentWithPlaceOrder: !this.props.data.checkout.result.shouldTriggerPaymentWithPlaceOrder\n });\n };\n\n /**\n * On place order.\n * @returns Void promise.\n */\n private readonly onPlaceOrder = async (): Promise => {\n const {\n resources: { checkoutOutOfStockErrorMessage },\n context: {\n actionContext,\n app: {\n config: { enableStockCheck = false }\n }\n },\n slots: { orderConfirmation },\n data: { checkout, products }\n } = this.props;\n\n this.props.telemetry.information('Checkout onPlaceOrder is called.');\n this.setState({ isPlaceOrderClicked: true });\n\n // If hasInvoiceLine is true, no inventory check\n if (\n !this.props.data.checkout.result?.checkoutCart.hasInvoiceLine &&\n enableStockCheck &&\n (await this.isOverMaxQuantity((await checkout).checkoutCart.cart, await products))\n ) {\n this.setState({\n errorMessage: checkoutOutOfStockErrorMessage\n });\n this.props.context.telemetry.error(checkoutOutOfStockErrorMessage);\n } else {\n const hasOrderConfirmation = orderConfirmation && orderConfirmation.length > 0;\n\n const updatedCartVersion = await this.updateCartLineEmailAddress(this.props.data.checkout.result?.guestCheckoutEmail || '');\n\n await placeOrder(\n actionContext,\n this.props.data.checkout.result,\n this.props.data.products.result,\n !hasOrderConfirmation,\n updatedCartVersion,\n this.props.data.checkout.result?.isPaymentVerificationRedirection\n ).catch(error => {\n this.handleCheckoutError(error);\n });\n\n await checkout.result?.updateIsPaymentSectionContainerReady({ newIsPaymentSectionContainerReady: false });\n }\n };\n\n /**\n * Update receipt email address for electronic cart line.\n * @param newGuestCheckoutEmail - The guest checkout email.\n * @returns The updated cart version.\n */\n private readonly updateCartLineEmailAddress = async (newGuestCheckoutEmail: string): Promise => {\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n const emailDeliveryCartLines = this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(\n cartLine => cartLine.DeliveryMode && cartLine.DeliveryMode !== '' && cartLine.DeliveryMode === emailDeliveryModeCode\n );\n\n let updatedCartVersion: number | undefined;\n if (emailDeliveryCartLines && emailDeliveryCartLines.length > 0) {\n const lineDeliverySpecifications: LineDeliverySpecification[] = emailDeliveryCartLines.map(line => {\n return {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: emailDeliveryModeCode,\n DeliveryPreferenceTypeValue: DeliveryPreferenceType.ElectronicDelivery,\n ElectronicDeliveryEmailAddress: newGuestCheckoutEmail\n }\n };\n });\n\n await updateLineDeliverySpecificationsAsync(\n { callerContext: this.props.context.actionContext },\n (await this.props.data.checkout).checkoutCart.cart.Id,\n lineDeliverySpecifications\n )\n .then(updatedCart => {\n updatedCartVersion = updatedCart.Version;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[updateLineDeliverySpecificationsAsync] Unable to update electronic delivery email address in cart');\n });\n }\n\n return updatedCartVersion;\n };\n\n /**\n * Return true if any product in the cart is over its max quantity.\n * @param cart -- The checkout cart.\n * @param products -- The checkout products.\n * @returns - Is any product in the cart is over max quantity.\n */\n private readonly isOverMaxQuantity = async (cart: Cart, products: SimpleProduct[]): Promise => {\n let isOverMaxQuantity = false;\n const emailDeliveryModeCode = this.props.context.request.channel?.EmailDeliveryModeCode;\n\n await getAvailabilitiesForCartLineItems(\n new ProductAvailabilitiesForCartLineItems(this.props.context.actionContext.requestContext.apiSettings),\n this.props.context.actionContext\n )\n .then(productInventoryInformation => {\n const productsThatShouldValidateInventory: IProductInventoryInformation[] = [];\n\n cart.CartLines?.map(cartline => {\n const cartlineProduct = products.find(product => product.RecordId === cartline.ProductId);\n\n // If product is non-stocked or cartline is electronic delivery, then no inventory check\n const isStockedItem = cartlineProduct?.Behavior?.IsStockedProduct;\n const isEmailDelivery =\n cartline.DeliveryMode && cartline.DeliveryMode !== '' ? cartline.DeliveryMode === emailDeliveryModeCode : false;\n const shouldSkipInventoryCheck = !isStockedItem || isEmailDelivery;\n if (!shouldSkipInventoryCheck && ArrayExtensions.hasElements(productInventoryInformation)) {\n const foundProductAvailability = productInventoryInformation.find(productInventory => {\n return productInventory.ProductAvailableQuantity?.ProductId! === cartline.ProductId;\n });\n if (foundProductAvailability) {\n productsThatShouldValidateInventory.push(foundProductAvailability);\n }\n }\n });\n\n const cartLinesInventoryValidation = validateCartLinesInventory(\n cart.CartLines ?? [],\n productsThatShouldValidateInventory,\n this.props.context.actionContext,\n products,\n emailDeliveryModeCode\n );\n\n // If is invalid then exceeds the available quantity\n isOverMaxQuantity = !cartLinesInventoryValidation.isValid;\n return isOverMaxQuantity;\n })\n .catch(error => {\n this.props.context.actionContext.telemetry.exception(error);\n throw new Error('[getAvailabilitiesForCartLineItems] Unable to get availabilities for products in checkout cart');\n });\n\n return isOverMaxQuantity;\n };\n\n /**\n * Gets active child in module state.\n * @returns - The module state manager collection.\n */\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n /**\n * On container ready.\n */\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Checkout onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n\n /**\n * Redirects to cart page.\n * @param notFoundEditCartLinkMessage - Not found edit cart link message.\n */\n private readonly redirectToCartPage = (notFoundEditCartLinkMessage: string): void => {\n const editCartLink = Msdyn365.getUrlSync('cart', this.props.context.actionContext) || '';\n if (window && editCartLink) {\n window.location.assign(editCartLink);\n } else {\n this.setState({\n errorMessage: this.props.resources.genericErrorMessage\n });\n this.props.context.telemetry.error(notFoundEditCartLinkMessage);\n }\n };\n\n /**\n * Validates for checkout.\n * @param retry - Retry flag.\n */\n private readonly validateForCheckout = (retry: boolean = true): void => {\n const notFoundEditCartLinkMessage = \"Cart doesn't pass validation, but no editCartLink found\";\n const cart = this.props.data.checkout.result!.checkoutCart.cart;\n const { Id, Version } = cart;\n if (this._shouldValidateQuantityLimits()) {\n if (Version && Id) {\n validateForCheckoutAsync({ callerContext: this.props.context.actionContext, bypassCache: 'none' }, Id, Version)\n .then((result: CartLineValidationResults) => {\n if (result.ValidationFailuresByCartLines?.length !== 0) {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n } else {\n this.setState({ isValidationPassed: true });\n }\n })\n .catch(error => {\n this.props.telemetry.warning(error);\n this.props.telemetry.debug('Unable to validate Cart');\n if (retry && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n const cartState = this.props.data.checkout.result?.checkoutCart;\n cartState\n ?.refreshCart({})\n .then(() => {\n this.validateForCheckout(false);\n })\n .catch((refreshError: Error) => {\n this.props.telemetry.warning(refreshError.message);\n this.props.telemetry.debug('Unable to refresh Cart');\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n });\n } else {\n this.redirectToCartPage(notFoundEditCartLinkMessage);\n }\n } else {\n this.setState({ isValidationPassed: true });\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _shouldValidateQuantityLimits = (): boolean => {\n const featureStatuses = this.props.data.featureState.result;\n const isECommerceQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(\n featureState => featureState.Name === 'Dynamics.AX.Application.EcommerceQuantityLimitConfigurationsFeature'\n )?.IsEnabled || false;\n\n if (isECommerceQuantityLimitsFeatureEnabledInHq) {\n return true;\n }\n\n const isOrderQuantityLimitsFeatureEnabledInHq =\n featureStatuses?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailDefaultOrderQuantityLimitsFeature')\n ?.IsEnabled || false;\n\n if (!isOrderQuantityLimitsFeatureEnabledInHq) {\n return false;\n }\n\n const useSiteBuilderSettings = featureStatuses?.find(\n featureState => featureState.Name === 'RevertToSiteBuilderOrderQuantityLimitsSettings'\n )?.IsEnabled;\n\n if (useSiteBuilderSettings) {\n const defaultOrderQuantityLimitsFeatureConfig = this.props.context?.request?.app?.platform?.enableDefaultOrderQuantityLimits;\n const customerInfo = this.props.data.customerInformation.result;\n const isB2BSite = isChannelTypeB2B(this.props.context.actionContext.requestContext);\n\n const isOrderQuantityLimitsFeatureEnabledInSiteSettings =\n defaultOrderQuantityLimitsFeatureConfig === 'all' ||\n (customerInfo &&\n ((defaultOrderQuantityLimitsFeatureConfig === 'b2b' && isB2BSite) ||\n (defaultOrderQuantityLimitsFeatureConfig === 'b2c' && !isB2BSite)));\n\n return isOrderQuantityLimitsFeatureEnabledInSiteSettings ?? false;\n } else {\n const cartConfiguration = this.props.data.cartConfiguration?.result;\n return !(cartConfiguration?.IgnoreOrderSettings ?? false);\n }\n };\n\n /**\n * Save the address as Shipping and Billing address.\n * @param tokenizedPaymentCard - Tokenized payment card.\n */\n private readonly _saveShippingAndBillingAddress = async (tokenizedPaymentCard?: TokenizedPaymentCard): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n // For Paypal, the address returned in TokenizedPaymentCard will be used as both shipping and billing address.\n if (checkoutState && tokenizedPaymentCard && tokenizedPaymentCard.Zip) {\n const address: Address = this._getAddressFromTokenizedPaymentCard(tokenizedPaymentCard);\n\n await checkoutState.updateBillingAddressFromExpressCheckout({ newBillingAddressFromExpressCheckout: address });\n await checkoutState.updateShippingAddressFromExpressCheckout({ newShippingAddressFromExpressCheckout: address });\n }\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly _getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const address: Address = {\n TwoLetterISORegionName: tokenizedPaymentCard.Country,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone\n };\n\n return address;\n };\n\n /**\n * Handle checkout errors.\n * @param error -- The error on checkout api failure.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly handleCheckoutError = (error: any) => {\n // Here checkout failure message will be shown if there is any error in checkout api except data validation.\n const {\n resources: {\n genericErrorMessage,\n invalidCartVersionErrorMessage,\n missingRequiredCartTenderLinesErrorMessage,\n checkoutApiFailureErrorMessage,\n invoiceCheckoutApiFailureErrorMessage\n },\n context: { actionContext }\n } = this.props;\n const checkoutResult = this.props.data.checkout.result;\n const apiError = error && error.message;\n if (error?.statusCode === 500) {\n const errorMessage = checkoutApiFailureErrorMessage;\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n this.setState({ isPlaceOrderLoading: false });\n return;\n }\n if (checkoutResult && checkoutResult.shouldEnableCheckoutErrorDisplayMessaging) {\n const errorCode = error && error.name ? error.name : '';\n // apiError message will be used if errorcode resource/enums is unavailable\n setCheckoutErrors(errorCode, this.props.resources, !!checkoutResult.isExpressCheckoutApplied, actionContext, apiError);\n } else {\n let errorMessage = genericErrorMessage;\n this.setState({ isPlaceOrderClicked: false });\n\n if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion') {\n errorMessage = invalidCartVersionErrorMessage;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines') {\n errorMessage = missingRequiredCartTenderLinesErrorMessage;\n } else if (error && error.name === 'Microsoft_Dynamics_Commerce_Runtime_ExclusiveCouponCannotBeAppliedWithOtherCoupons') {\n // If api error is not available show generic message\n errorMessage = apiError || genericErrorMessage;\n } else {\n if (error.status === ActionErrorStatus.Timeout || error.status === ActionErrorStatus.ServiceUnavailable) {\n errorMessage = checkoutResult?.checkoutCart.hasInvoiceLine\n ? invoiceCheckoutApiFailureErrorMessage\n : checkoutApiFailureErrorMessage;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- unknown error type.\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n error.data?.AdditionalContext &&\n !this.props.data.checkout.result?.isPaymentVerificationRedirection\n ) {\n return;\n }\n\n this.setState({\n errorMessage\n });\n this.props.telemetry.exception(error);\n }\n };\n}\n\nexport default Checkout;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutViewProps,\n ILineItem,\n ILineItemDeliveryGroup,\n ILineItems,\n IOrderSummary,\n IPickUpAtStore,\n IEmailDelivery,\n IInvoicePaymentSummary\n} from './index';\n\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) => {label};\n\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {pickUpAtStore && }\n {emailDelivery && }\n \n);\n\nexport const LineItemGroupComponent: React.FC = ({ LineItemDeliveryGroup, LineItemList, heading, lineItems }) => (\n \n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\n LineItemDeliveryGroup,\n LineItemList,\n heading,\n lineItems,\n lineItemWraper,\n lineItemWraperIcon\n}) => (\n \n {lineItemWraperIcon}\n {lineItemWraper}\n {heading}\n \n {lineItems.map(lineItem => (\n \n ))}\n \n \n);\n\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\n \n {item}\n {emailDelivery && }\n \n);\n\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({ PickUpAtStore, label, location }) => (\n \n {label}\n {location}\n \n);\n\nexport const LineItemsComponent: React.FC = ({\n LineItems,\n Header,\n heading,\n editLink,\n itemsForPickup,\n itemsForShip,\n itemsForEmail,\n itemsGroupWithMulitplePickupMode\n}) => (\n \n \n {heading}\n {editLink}\n \n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail && }\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip && }\n {itemsGroupWithMulitplePickupMode !== undefined\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\n return ;\n })\n : null}\n \n);\n\nconst OrderSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.subtotal}\n {lines.shipping}\n {lines.otherCharge}\n {lines.tax}\n {lines.totalDiscounts}\n {lines.loyalty}\n {lines.customerAccount}\n {lines.giftCard}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\n
\n {heading}\n
\n {lines && (\n <>\n {lines.invoices}\n {lines.giftCard}\n {lines.loyalty}\n {lines.orderTotal}\n \n )}\n
\n
\n);\n\nconst CheckoutView: React.FC = props => {\n const {\n isPaymentVerificationRedirection,\n shouldEnableSinglePaymentAuthorizationCheckout,\n canShow,\n checkoutProps,\n headerProps,\n hasSalesOrder,\n hasInvoiceLine,\n bodyProps,\n mainProps,\n mainControlProps,\n sideProps,\n sideControlFirstProps,\n sideControlSecondProps,\n termsAndConditionsProps,\n orderConfirmation,\n loading,\n alert,\n title,\n guidedForm,\n orderSummary,\n invoicePaymentSummary,\n lineItems,\n placeOrderButton,\n termsAndConditions,\n keepShoppingButton,\n checkoutExpressPaymentContainer,\n checkoutErrorRef\n } = props;\n\n return (\n \n {!hasSalesOrder && !checkoutExpressPaymentContainer && {title}}\n {!hasSalesOrder && isPaymentVerificationRedirection && shouldEnableSinglePaymentAuthorizationCheckout && !alert && !loading && (\n \n )}\n {!hasSalesOrder && (\n \n {loading}\n {alert}\n {canShow && (\n <>\n \n {checkoutExpressPaymentContainer}\n {checkoutExpressPaymentContainer && {title}}\n {guidedForm}\n {termsAndConditions}\n \n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n {!hasInvoiceLine\n ? orderSummary && \n : invoicePaymentSummary && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n {lineItems && }\n \n {termsAndConditions}\n {placeOrderButton}\n {keepShoppingButton}\n \n \n \n )}\n \n )}\n {hasSalesOrder && orderConfirmation}\n \n );\n};\n\nexport default CheckoutView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAlertProps {\n message: string;\n}\n\nconst CheckoutAlert: React.FC = ({ message }) => (\n

\n {message}\n

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

{invoiceSummaryTitle}

,\n lines: checkoutCart?.hasInvoiceLine\n ? InvoiceSummary({\n orderTotalLabel: totalAmountLabel,\n invoiceLabel,\n cart,\n context,\n typeName,\n telemetry,\n id,\n checkoutState: checkout.result\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CartLineItemComponent } from '@msdyn365-commerce/components';\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CartLine, OrgUnitLocation, SimpleProduct } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { getProductUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport groupBy from 'lodash/groupBy';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\ntype deliveryType = 'pickup' | 'ship' | 'email';\n\nexport interface IPickUpAtStore {\n PickUpAtStore: INodeProps;\n label: React.ReactNode;\n location: React.ReactNode;\n}\n\nexport interface IEmailDelivery {\n EmailDelivery: INodeProps;\n label: React.ReactNode;\n}\n\nexport interface ILineItem {\n LineId: string;\n LineItem: INodeProps;\n item?: React.ReactNode;\n pickUpAtStore?: IPickUpAtStore;\n emailDelivery?: IEmailDelivery;\n}\n\nexport interface ILineItemDeliveryGroup {\n LineItemDeliveryGroup: INodeProps;\n LineItemList: INodeProps;\n heading: React.ReactNode;\n lineItemWraper?: React.ReactNode;\n lineItemWraperIcon?: React.ReactNode;\n lineItems: ILineItem[];\n}\n\nexport interface ILineItems {\n LineItems: INodeProps;\n Header: INodeProps;\n heading: React.ReactNode;\n editLink: React.ReactNode;\n itemsForPickup?: ILineItemDeliveryGroup;\n itemsForShip?: ILineItemDeliveryGroup;\n itemsForEmail?: ILineItemDeliveryGroup;\n itemsGroupWithMulitplePickupMode?: ILineItemDeliveryGroup[];\n}\n\nexport const getLineItems = (input: ICheckoutProps, telemetryContent?: ITelemetryContent): ILineItems | undefined => {\n const pickupDeliveryModeCode = get(input, 'context.request.channel.PickupDeliveryModeCode');\n const emailDeliveryModeCode = get(input, 'context.request.channel.EmailDeliveryModeCode');\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const _getDeliveryLocation = (cartLine: CartLine): string => {\n const orgUnitLocations = get(input, 'data.orgUnitLocations.result');\n if (!cartLine.FulfillmentStoreId || !orgUnitLocations) {\n return '';\n }\n\n const locationMatch = (orgUnitLocations || []).find((location: OrgUnitLocation): boolean => {\n return location.OrgUnitNumber === cartLine.FulfillmentStoreId;\n });\n\n return locationMatch && locationMatch.OrgUnitName;\n };\n\n const _getProduct = (productId: number): SimpleProduct | undefined => {\n const products = get(input, 'data.products.result') || [];\n return products.find((_product: SimpleProduct) => {\n return productId === _product.RecordId;\n });\n };\n\n const _getLineItemComponent = (cartLine: CartLine): JSX.Element | undefined => {\n const product = cartLine.ProductId && _getProduct(cartLine.ProductId);\n const {\n id,\n typeName,\n context,\n config: { imageSettings, showShippingChargesForLineItems },\n resources: {\n quantityDisplayString,\n productDimensionTypeColor,\n productDimensionTypeSize,\n productDimensionTypeStyle,\n productDimensionTypeAmount,\n configString,\n inputQuantityAriaLabel,\n discountStringText,\n shippingCharges\n },\n context: {\n request: { gridSettings }\n }\n } = input;\n const catalogs = input.data.catalogs?.result;\n if (!product) {\n return;\n }\n\n let productUrl = getProductUrlSync(product, context.actionContext, undefined);\n if (MsDyn365.isBrowser && isChannelTypeB2B(context.actionContext.requestContext)) {\n const fullUrl = new URL(productUrl, window.location.href);\n fullUrl.searchParams.set('catalogid', `${cartLine.CatalogId ?? 0}`);\n productUrl = fullUrl.href;\n }\n const currencyCode = get(input, 'context.request.channel.Currency');\n return (\n \n );\n };\n\n const _getPickUpAtStoreComponents = (pickupDeliveryLocation: string): IPickUpAtStore => {\n const {\n resources: { pickUpAtStoreWithLocationText }\n } = input;\n\n return {\n PickUpAtStore: { className: 'ms-checkout__pick-up-at-store' },\n label: {pickUpAtStoreWithLocationText},\n location:
{pickupDeliveryLocation}
\n };\n };\n\n const _getEmailDeliveryComponents = (): IEmailDelivery => {\n const {\n resources: { emailDeliveryText }\n } = input;\n\n return {\n EmailDelivery: { className: 'ms-checkout__email-delivery' },\n label: {emailDeliveryText}\n };\n };\n\n const _getLineItemsComponents = (items: CartLine[]): ILineItem[] => {\n return items.map(cartLine => {\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const isPickUp = _getCartPickDeliveryMode(cartLine);\n const isEmailDelivery =\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? cartLine.DeliveryMode === emailDeliveryModeCode : false;\n return {\n LineId: cartLine.LineId || '',\n LineItem: { className: 'ms-checkout__line-item' },\n item: _getLineItemComponent(cartLine),\n pickUpAtStore: isPickUp ? _getPickUpAtStoreComponents(pickupDeliveryLocation) : undefined,\n emailDelivery: isEmailDelivery ? _getEmailDeliveryComponents() : undefined\n };\n });\n };\n\n const _getCartPickDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode ===\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode === pickupDeliveryModeCode\n : false;\n };\n\n const _getCartShipDeliveryMode = (cartLineItem: CartLine): boolean => {\n return !StringExtensions.isNullOrWhitespace(cartLineItem.DeliveryMode)\n ? retailMultiplePickUpOptionEnabled\n ? cartLineItem.DeliveryMode !==\n channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLineItem.DeliveryMode\n )\n : cartLineItem.DeliveryMode !== pickupDeliveryModeCode\n : false;\n };\n\n const _getGroupTitleComponent = (count: number, type: deliveryType): string => {\n const {\n resources: { itemLabel, itemsLabel, inStorePickUpLabel, shippingCountCheckoutLineItem }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? shippingCountCheckoutLineItem\n : type === 'pickup'\n ? inStorePickUpLabel\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _countItems = (items: CartLine[]): number => {\n return items.reduce((count, item) => {\n return count + (item.Quantity || 0);\n }, 0);\n };\n\n const _filterItemsByDiliveryType = (type: deliveryType): CartLine[] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n if (type === 'ship') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? _getCartShipDeliveryMode(cartLine) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n } else if (type === 'pickup') {\n return cart.CartLines.filter((cartLine: CartLine) =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== '' ? _getCartPickDeliveryMode(cartLine) : null\n );\n }\n return cart.CartLines.filter((cartLine: CartLine) => cartLine.DeliveryMode === emailDeliveryModeCode);\n };\n\n const _getLineItemsByDeliveryType = (type: deliveryType): ILineItemDeliveryGroup | undefined => {\n if ((pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) && (type === 'pickup' || type === 'email')) {\n return;\n }\n\n const items = _filterItemsByDiliveryType(type);\n\n if (items.length === 0) {\n return undefined;\n }\n\n const count = _countItems(items);\n const title = _getGroupTitleComponent(count, type);\n\n return {\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n heading:
{title}
,\n lineItems: _getLineItemsComponents(items)\n };\n };\n\n const _getLineItems = (): ILineItems | undefined => {\n const {\n context,\n config: { lineItemsHeading },\n data: { products },\n resources: { editCartText }\n } = input;\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.EditCart);\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const groupClass = retailMultiplePickUpOptionEnabled ? ' multiple-pickup-enabled' : '';\n if (!cart || !cart.CartLines || cart.CartLines.length === 0 || !products) {\n return undefined;\n }\n\n return {\n LineItems: { className: `ms-checkout__line-items${groupClass}` },\n Header: { className: 'ms-checkout__line-items-header' },\n heading: lineItemsHeading && lineItemsHeading.text && (\n \n ),\n editLink: (\n \n {editCartText}\n \n ),\n itemsForPickup: _getLineItemsByDeliveryType('pickup'),\n itemsForShip: _getLineItemsByDeliveryType('ship'),\n itemsForEmail: _getLineItemsByDeliveryType('email'),\n itemsGroupWithMulitplePickupMode: retailMultiplePickUpOptionEnabled\n ? _getLineItemsByDeliveryTypeWithMulitplePickupMode()\n : undefined\n };\n };\n\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { lineItemsHeading }\n } = input;\n if (lineItemsHeading) {\n lineItemsHeading.text = event.target.value;\n }\n };\n\n const _getGroupTitleComponentWithMultiplePickUp = (\n count: number,\n type: deliveryType,\n deliveryMode?: string,\n fulFillmentStoreId?: string\n ): string => {\n const {\n resources: { itemLabel, itemsLabel }\n } = input;\n\n let emailDeliveryModeDesc: string = '';\n let pickupDeliveryModeDesc: string = '';\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n emailDeliveryModeDesc = emailDeliveryModeDesc\n ? emailDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === emailDeliveryModeCode)\n ?.Description!;\n });\n\n input.data.deliveryOptions.result?.find(productDeliveryOptions => {\n pickupDeliveryModeDesc = pickupDeliveryModeDesc\n ? pickupDeliveryModeDesc\n : productDeliveryOptions.DeliveryOptions?.find(deliveryOption => deliveryOption.Code === deliveryMode)?.Description!;\n });\n\n const pickupTitle: string = `${pickupDeliveryModeDesc}, ${fulFillmentStoreId}`;\n const suffix = count > 1 ? itemsLabel : itemLabel;\n const title =\n type === 'ship'\n ? `(${count} ${suffix})`\n : type === 'pickup'\n ? `${pickupTitle} (${count} ${suffix})`\n : `${emailDeliveryModeDesc} (${count} ${suffix})`;\n return title.replace('{count}', count.toString()).replace('{suffix}', suffix);\n };\n\n const _filterItemsByMultiplePickupMode = (): CartLine[][] => {\n const cart = get(input, 'data.checkout.result.checkoutCart.cart');\n const getGroupByStorePickup = (items: CartLine[]) => groupBy(items, item => item.FulfillmentStoreId);\n const getGroupByDelivery = (items: CartLine[]) => groupBy(items, item => item.DeliveryMode);\n const groupDelivery = getGroupByDelivery(cart.CartLines);\n const cartLinesGroup: CartLine[] = [];\n const cartLinesGrp: CartLine[][] = [];\n\n // 1) Group by store and pick up mode\n Object.entries(groupDelivery).forEach(([deliveryMode, groupByDeliveryType]) => {\n // @ts-expect-error\n groupDelivery[deliveryMode] = getGroupByStorePickup(groupByDeliveryType);\n cartLinesGroup.push(getGroupByStorePickup(groupByDeliveryType));\n });\n\n Object.keys(cartLinesGroup).forEach(key => {\n const cartLines = cartLinesGroup[key];\n Object.keys(cartLines).forEach(index => {\n const cartLine = cartLines[index];\n cartLinesGrp.push(cartLine);\n });\n });\n\n return cartLinesGrp;\n };\n\n const _getLineItemsByDeliveryTypeWithMulitplePickupMode = (): ILineItemDeliveryGroup[] | undefined => {\n if (pickupDeliveryModeCode === '' || pickupDeliveryModeCode === undefined) {\n return;\n }\n\n const {\n resources: { multiplePickUpLabel, shippingLable }\n } = input;\n\n const items = _filterItemsByMultiplePickupMode();\n\n if (items.length === 0) {\n return undefined;\n }\n\n const lineItemDeliveryGroup: ILineItemDeliveryGroup[] = [];\n items.map(item => {\n const count = _countItems(item);\n const cartLine = item[0];\n const pickupDeliveryLocation = _getDeliveryLocation(cartLine);\n const type: deliveryType =\n cartLine.FulfillmentStoreId && cartLine.DeliveryMode\n ? 'pickup'\n : cartLine.FulfillmentStoreId === '' &&\n cartLine.DeliveryMode === emailDeliveryModeCode &&\n !StringExtensions.isNullOrEmpty(emailDeliveryModeCode)\n ? 'email'\n : 'ship';\n const title = _getGroupTitleComponentWithMultiplePickUp(count, type, cartLine.DeliveryMode, pickupDeliveryLocation);\n const groupTitle = type === 'pickup' ? multiplePickUpLabel : type === 'ship' ? shippingLable : 'email';\n const iconClass = `ms-checkout__line-items-group-title-multiple-pickup-${type}icon`;\n lineItemDeliveryGroup.push({\n LineItemDeliveryGroup: { className: classnames('ms-checkout__line-items-delivery-group multiple-pickup', type) },\n LineItemList: { className: 'ms-checkout__line-items-list' },\n lineItemWraperIcon:
,\n lineItemWraper:
{groupTitle}
,\n heading:
{title}
,\n lineItems: _getLineItemsComponents(item)\n });\n });\n\n return lineItemDeliveryGroup;\n };\n\n return _getLineItems();\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IOrderSummaryLines, OrderSummary } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport get from 'lodash/get';\nimport * as React from 'react';\n\nimport { ICheckoutData } from '../checkout.data';\nimport { ICheckoutProps } from '../checkout.props.autogenerated';\n\nexport interface IOrderSummary {\n orderSummaryProps: INodeProps;\n heading?: React.ReactNode;\n lines?: IOrderSummaryLines;\n}\nexport const getOrderSummary = (input: ICheckoutProps): IOrderSummary => {\n const {\n config: { orderSummaryHeading },\n data: { checkout },\n resources: {\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n otherCharges,\n customerAccountLabel\n },\n context,\n typeName,\n id,\n telemetry\n } = input;\n\n const checkoutState = get(checkout, 'result');\n const cart = get(checkout, 'result.checkoutCart.cart');\n const showLineItems = cart.CartLines && cart.CartLines.length > 0;\n const channelConfiguration = context.request.channel!;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = input.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- app configs are of generic type\n const isShowOrHideTaxEnabled = context.request.app.config.isEnableShowOrHideSalesTaxECommerceEnabled === true;\n\n const handleOrderSummaryHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n const {\n config: { orderSummaryHeading }\n } = input;\n if (orderSummaryHeading) {\n orderSummaryHeading.text = event.target.value;\n }\n };\n\n return {\n orderSummaryProps: { className: 'ms-checkout-guest-profile__selected-item' },\n heading: orderSummaryHeading && orderSummaryHeading.text && (\n \n ),\n lines: showLineItems\n ? OrderSummary({\n checkoutState,\n cart,\n subTotalLabel,\n shippingLabel,\n taxLabel,\n orderTotalLabel,\n loyaltyLabel,\n giftcardLabel,\n totalDiscountsLabel,\n freeText,\n toBeCalculatedText,\n context,\n typeName,\n id,\n channelConfiguration,\n telemetry,\n otherChargeLabel: otherCharges,\n retailMultiplePickUpOptionEnabled,\n channelDeliveryOptionConfig: channelDeliveryOptionConfig?.result,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- existing property.\n isTaxIncludedInPrice: cart.IsTaxIncludedInPrice,\n isShowTaxBreakup: isShowOrHideTaxEnabled,\n customerAccountLabel\n })\n : undefined\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading as HeadingType } from '@msdyn365-commerce-modules/data-types';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n IPayLoad,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport * as React from 'react';\nimport { focusOnCheckoutError, setCheckoutErrorFocus } from '../../../checkout-errors';\n\nexport interface ICheckoutGuidedCardProps {\n id?: string;\n step: number;\n title?: HeadingType;\n disabled?: boolean; // Module is not available\n isActive?: boolean; // Step === currentStep\n isVisted?: boolean; // Step < currentStep\n isExpanded?: boolean;\n isReady?: boolean;\n isPending?: boolean;\n isUpdating?: boolean;\n isSubmitting?: boolean;\n isCancelAllowed?: boolean;\n isMobile?: boolean;\n hasInitialized?: boolean;\n hasControlGroup?: boolean;\n shouldFocus?: boolean;\n children: React.ReactNode;\n moduleState?: IModuleStateManager;\n actionContext?: IActionContext;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n telemetryContent?: ITelemetryContent;\n onEdit?(): void;\n onCancel?(): void;\n onSubmit?(): void;\n onNext(): void;\n}\n\n/**\n *\n * CheckoutGuidedCard component.\n * @extends {React.Component}\n */\nclass CheckoutGuidedCard extends React.PureComponent {\n private readonly editButtonRef: React.RefObject = React.createRef();\n\n private readonly formCardRef: React.RefObject = React.createRef();\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: ICheckoutGuidedCardProps) {\n super(props);\n this.payLoad = getPayloadObject('click', props.telemetryContent!, '');\n }\n\n public componentDidUpdate(prevProps: ICheckoutGuidedCardProps): void {\n /**\n * Move to next step when current step is ready.\n */\n const { isActive, isReady, onNext, isVisted, onEdit, shouldFocus, children, moduleState, actionContext } = this.props;\n\n // Move to next step after completing the current step\n if (isActive && isReady) {\n onNext();\n }\n\n // Set the focus to Edit button once edit button appear\n // (It happens when current step switch to isReady status)\n const prevCanEdit = prevProps.isReady && prevProps.isVisted && !!prevProps.onEdit;\n const canEdit = isReady && isVisted && !!onEdit;\n if (!prevCanEdit && canEdit) {\n this.focusOnEditButton();\n this.scrollToTitle();\n }\n\n // Set the focus to the first focusable element\n // (It happens when current step switch to isUpdating status)\n if (prevProps.isReady && !isReady) {\n this.focusOnFirstFocusableElement();\n }\n\n // Set the focus for the checkout error\n if (shouldFocus && actionContext) {\n const childrenModules = this._getModules(children);\n\n // Set the focus for the module within the checkout section container\n if (childrenModules.length > 0) {\n for (const childModule of childrenModules) {\n const childId = this._getId(childModule);\n const childState = moduleState?.getModule(childId);\n\n if (childState?.hasError) {\n setCheckoutErrorFocus(childId, actionContext);\n return;\n }\n }\n } else {\n focusOnCheckoutError(this.formCardRef, actionContext);\n }\n }\n }\n\n public render(): JSX.Element | null {\n const {\n title,\n disabled,\n isExpanded,\n isActive,\n isVisted,\n children,\n isReady,\n isPending,\n isUpdating,\n hasInitialized,\n hasControlGroup,\n onEdit,\n resource\n } = this.props;\n const { changeBtnLabel } = resource;\n\n this.payLoad.contentAction.etext = TelemetryConstant.CheckoutChange;\n const changeBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n const canEdit = hasControlGroup && isReady && isVisted && onEdit;\n\n return (\n \n
\n {this.getTitle()}\n\n {canEdit && (\n \n {changeBtnLabel}\n \n )}\n
\n\n \n
{children}
\n\n {this.renderFooder()}\n
\n \n );\n }\n\n private readonly renderFooder = (): JSX.Element | null => {\n const { isVisted, isReady, isSubmitting, isCancelAllowed, hasControlGroup, onCancel, onSubmit, resource } = this.props;\n const { saveBtnLabel, cancelBtnLabel, saveAndContinueBtnLabel } = resource;\n\n const canSubmit = !isReady && onSubmit;\n const canCancel = !isReady && isVisted && isCancelAllowed && onCancel;\n\n if (!hasControlGroup || (!canSubmit && !canCancel)) {\n return null;\n }\n\n this.payLoad.contentAction.etext = isVisted ? TelemetryConstant.Save : TelemetryConstant.SaveContinue;\n const saveBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.Cancel;\n const cancelBtnAttributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n {canSubmit && (\n \n {isVisted && isCancelAllowed ? saveBtnLabel : saveAndContinueBtnLabel}\n \n )}\n {canCancel && (\n \n {cancelBtnLabel}\n \n )}\n
\n );\n };\n\n private readonly focusOnFirstFocusableElement = (): void => {\n const node = this.formCardRef.current as HTMLElement;\n const focussableElements = `\n a:not([disabled]),\n button:not([disabled]),\n input[type=submit]:not([disabled]),\n input[type=checkbox]:not([disabled]),\n input[type=text]:not([disabled]),\n input[type=radio]:not([disabled]),\n input[type=password]:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n [tabindex]:not([disabled]):not([tabindex=\"-1\"])\n `;\n\n const child = node && node.querySelector && (node.querySelector(focussableElements) as HTMLElement);\n child && child.focus && child.focus();\n };\n\n private readonly focusOnEditButton = (): void => {\n // Focus on edit button\n const editButton =\n this.editButtonRef &&\n this.editButtonRef.current &&\n this.editButtonRef.current.focus &&\n (this.editButtonRef.current as HTMLElement);\n editButton && editButton.focus();\n };\n\n private readonly scrollToTitle = (): void => {\n // Scroll window to the title of the step that was just completed only in mobile viewport\n const formCard = this.props.isMobile && this.formCardRef && this.formCardRef.current && (this.formCardRef.current as HTMLElement);\n formCard && formCard.scrollIntoView();\n };\n\n private readonly getTitle = (): JSX.Element => {\n const { step, title } = this.props;\n const { headingTag: Tag = 'h2', text = '' } = title || {};\n return (\n \n \n {step + 1}. {` `}\n \n {text && {text}}\n \n );\n };\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _getModules = (item: React.ReactNode): any[] => {\n return get(item, 'props.modules.primary') || [];\n };\n\n private readonly _getId = (item: React.ReactNode): string => {\n return get(item, 'id') || '';\n };\n}\n\nexport default CheckoutGuidedCard;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { ICoreContext } from '@msdyn365-commerce/core';\nimport get from 'lodash/get';\nimport { computed } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport GuidedCard from './guided-card';\n\nexport interface ICheckoutGuidedFormProps {\n items: React.ReactNode[];\n moduleState: IModuleStateManager;\n disableGuidedCheckoutFlow?: boolean;\n isMobile?: boolean;\n isEditor?: boolean;\n resource: {\n checkoutStepTitleFormat: string;\n saveBtnLabel: string;\n changeBtnLabel: string;\n cancelBtnLabel: string;\n saveAndContinueBtnLabel: string;\n };\n requestContext?: ICoreContext;\n telemetryContent?: ITelemetryContent;\n isPaymentVerificationRedirection?: boolean;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n hasError?: boolean;\n hasShippingAddress?: boolean | undefined;\n hasCartDeliveryMode?: boolean | undefined;\n hasGuestCheckoutEmail?: boolean | undefined;\n isTermsAndConditionAccepted?: boolean | undefined;\n shouldEnableCheckoutErrorDisplayMessaging?: boolean;\n shouldFocusOnCheckoutError?: boolean | undefined;\n}\n\ninterface ICheckoutGuidedFormState {\n currentStep: number;\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\n/**\n *\n * CheckoutGuidedForm component.\n * @extends {React.Component}\n */\n@observer\nclass CheckoutGuidedForm extends React.PureComponent {\n @computed public get hasMissingInfo(): boolean {\n if (\n this.props.hasShippingAddress === false ||\n this.props.hasCartDeliveryMode === false ||\n this.props.hasGuestCheckoutEmail === false ||\n this.props.isTermsAndConditionAccepted === false\n ) {\n return true;\n }\n\n return false;\n }\n\n @computed public get hasOrderError(): boolean {\n for (const item of this.props.items) {\n const childId = this.getId(item);\n const state = this.props.moduleState.getModule(childId);\n\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n state.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (!isPaymentSectionContainer && !state.isDisabled && state.hasError) {\n return true;\n }\n }\n\n return false;\n }\n\n public state: ICheckoutGuidedFormState = {\n currentStep: 0\n };\n\n public componentDidMount(): void {\n /**\n * Append child modules.\n */\n const childIds = this.props.items.map((item: React.ReactNode) => get(item, 'props.id'));\n this.props.moduleState.init({ childIds });\n }\n\n public render(): JSX.Element | null {\n const { moduleState, items, resource } = this.props;\n if (!items || !moduleState) {\n return null;\n }\n\n const shouldCollapseAfterRedirect =\n this.props.isPaymentVerificationRedirection &&\n this.props.shouldEnableSinglePaymentAuthorizationCheckout &&\n !this.props.hasError &&\n !this.hasMissingInfo &&\n !this.hasOrderError;\n\n let previousModuleHasError = false;\n const childModule = this._enableAfterModule();\n return (\n
\n {items.map((item: React.ReactNode) => {\n const childId = this.getId(item);\n const step = this.getStep(childId);\n const title = this.getHeading(item);\n const state = this.props.moduleState.getModule(childId);\n const {\n isReady,\n isPending,\n isUpdating,\n isDisabled,\n isCancelAllowed,\n onEdit,\n onCancel,\n onSubmit,\n hasModuleState,\n hasInitialized,\n hasError\n } = state || ({} as IModuleStateManager);\n\n let shouldFocus =\n !!this.props.shouldEnableCheckoutErrorDisplayMessaging &&\n !!this.props.shouldFocusOnCheckoutError &&\n !previousModuleHasError &&\n hasError;\n previousModuleHasError = previousModuleHasError || shouldFocus;\n\n return (\n \n {React.cloneElement(item as React.ReactElement, { enableControl: true })}\n \n );\n })}\n
\n );\n }\n\n private readonly getEnabledModules = (): string[] => {\n const {\n moduleState: { childIds, getModule }\n } = this.props;\n return childIds.filter((childId: string) => {\n const state = getModule(childId);\n return !!state && !state.isDisabled;\n });\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly _enableAfterModule = (): string => {\n const childIds: string[] = this.props.items.map((item: React.ReactNode) => get(item, 'props.id')).filter(Boolean);\n let id: string = '';\n for (let i = 0; i < childIds.length - 1; i++) {\n const childId = childIds[i];\n const nextChildId = childIds[i + 1];\n if (this._isPaymentSectionContainer(childId) && nextChildId) {\n id = nextChildId;\n }\n }\n return id;\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n const sectionState = this.props.moduleState.getModule(moduleId);\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n sectionState.childIds?.filter(currentId => currentId?.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer) {\n return true;\n }\n return false;\n };\n\n private readonly getStep = (id: string): number => {\n return this.getEnabledModules().indexOf(id);\n };\n\n private readonly getId = (item: React.ReactNode): string => {\n return get(item, 'props.id') || '';\n };\n\n private readonly getHeading = (item: React.ReactNode): Heading => {\n return get(item, 'props.config.heading') || '';\n };\n\n private readonly isExpanded = (step: number, moduleChildId: string, childId: string): boolean => {\n if (this.props.isEditor) {\n // Editorial mode: Expand all the drawers\n return true;\n }\n if (this.props.shouldEnableSinglePaymentAuthorizationCheckout && moduleChildId === childId) {\n return true;\n }\n return step > -1 && step <= this.state.currentStep;\n };\n\n private readonly isActive = (step: number): boolean => {\n return step === this.state.currentStep;\n };\n\n private readonly isVisted = (step: number): boolean => {\n return step > -1 && step < this.state.currentStep;\n };\n\n private readonly onNext = (): void => {\n this.setState({\n currentStep: this.state.currentStep + 1\n });\n };\n}\n\nexport default CheckoutGuidedForm;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { TelemetryEvent } from '@msdyn365-commerce/core';\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\ninterface ICheckoutPlaceOrderButtonProps {\n canPlaceOrder: boolean;\n checkoutBtnText: string;\n telemetryContent?: ITelemetryContent;\n shouldEnableSinglePaymentAuthorizationCheckout?: boolean;\n isPlaceOrderLoading?: boolean;\n isExpressCheckoutApplied?: boolean;\n isPaymentVerificationRedirection?: boolean;\n placeOrder(): Promise;\n}\n\nconst buttonsStates: React.Dispatch>[] = [];\n\n/**\n * On place order function.\n * @param isBusy -Check is busy.\n * @param canPlaceOrder -Check can place order.\n * @param placeOrder -Place order function.\n * @returns Set state of button.\n */\nconst onPlaceOrderHandler = (isBusy: boolean, canPlaceOrder: boolean, placeOrder: () => Promise) => async () => {\n if (isBusy || !canPlaceOrder) {\n return;\n }\n buttonsStates.map(buttonSetState => {\n buttonSetState(true);\n return true;\n });\n await placeOrder();\n};\n\nconst CheckoutPlaceOrderButton: React.FC = ({\n checkoutBtnText,\n canPlaceOrder,\n placeOrder,\n telemetryContent,\n shouldEnableSinglePaymentAuthorizationCheckout,\n isPlaceOrderLoading,\n isExpressCheckoutApplied,\n isPaymentVerificationRedirection\n}) => {\n const [isBusy, setIsBusy] = useState(false);\n buttonsStates.push(setIsBusy);\n const payload = getPayloadObject(TelemetryEvent.Purchase, telemetryContent!, checkoutBtnText, '');\n const attributes = getTelemetryAttributes(telemetryContent!, payload);\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && (!isExpressCheckoutApplied || isPaymentVerificationRedirection)) {\n return (\n \n {checkoutBtnText}\n \n );\n }\n\n return (\n \n {checkoutBtnText}\n \n );\n};\n\nexport default CheckoutPlaceOrderButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport { ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { PlaceOrder } from '../../../common/place-order';\n\nexport default async (\n ctx: IActionContext,\n checkoutState: ICheckoutState | undefined,\n orderedProducts: SimpleProduct[] | undefined,\n redirect: boolean,\n updatedCartVersion?: number,\n isPaymentVerificationRedirection?: boolean\n) => {\n return PlaceOrder(ctx, checkoutState, orderedProducts, redirect, updatedCartVersion, isPaymentVerificationRedirection);\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PriceComponent } from '@msdyn365-commerce/components';\nimport { ICoreContext, ITelemetry } from '@msdyn365-commerce/core';\nimport { ICheckoutState, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Cart, CartLine } from '@msdyn365-commerce/retail-proxy';\nimport { format } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IInvoiceSummaryProps {\n orderTotalLabel: string;\n invoiceLabel: string;\n loyaltyLabel?: string;\n giftcardLabel?: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n cart: Cart;\n id: string;\n typeName: string;\n freeText?: string;\n toBeCalculatedText?: string;\n checkoutState?: ICheckoutState;\n}\n\nexport interface IInvoiceSummaryLines {\n orderTotal: React.ReactNode;\n invoices: React.ReactNode;\n giftCard?: React.ReactNode;\n loyalty?: React.ReactNode;\n}\n\ninterface IInvoiceSummaryLineProps {\n label: string;\n context: ICoreContext;\n telemetry: ITelemetry;\n price?: number;\n freeText?: string;\n toBeCalculatedText?: string;\n id: string;\n typeName: string;\n cssLabel: string;\n}\n\nconst InvoiceSummaryLine: React.FC = ({\n price,\n label,\n context,\n id,\n typeName,\n toBeCalculatedText,\n freeText,\n cssLabel\n}) => {\n return (\n

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

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

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

\n );\n};\n\nconst _buildOrderSummarySection = (\n props: IOrderSummaryProps,\n price: number | undefined,\n cssLabel: string,\n label: string = ''\n): React.ReactNode => {\n return (\n \n );\n};\n\nconst _computedLoyaltyAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.loyaltyAmount) || 0;\n};\n\nconst _computedCustomerAccountAmount = (checkoutState: ICheckoutState): number => {\n return (checkoutState && checkoutState.customerAccountAmount) || 0;\n};\n\nconst _computeGiftCardAmount = (checkoutState: ICheckoutState, cart: Cart): number => {\n const giftCardCounter = (count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n };\n const giftCardTotalValue = (checkoutState.giftCardExtends || []).reduce(giftCardCounter, 0);\n const amount = (cart.TotalAmount || 0) - _computedLoyaltyAmount(checkoutState);\n return Math.min(giftCardTotalValue, amount);\n};\n\nconst getDeliveryConfiguration = (\n cart: Cart,\n channelConfiguration: ChannelConfiguration,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n retailMultiplePickUpOptionEnabled?: boolean,\n isTaxIncludedInPrice?: boolean,\n isShowTaxBreakup?: boolean\n): IShippingOrderLine => {\n const pickupDeliveryModeCode = channelConfiguration && channelConfiguration.PickupDeliveryModeCode;\n const emailDeliveryModeCode = channelConfiguration && channelConfiguration.EmailDeliveryModeCode;\n const cartLines = cart.CartLines || [];\n const deliveryModes = cartLines.map(cartLine => cartLine.DeliveryMode);\n const taxOnShippingCharge = cart.TaxOnShippingCharge !== undefined ? cart.TaxOnShippingCharge : 0;\n const shippingChargeAmount = cart.ShippingChargeAmount !== undefined ? cart.ShippingChargeAmount : 0;\n\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True shippingChargeAmount\n // True True shippingChargeAmount\n // True false shippingChargeAmount + taxOnShippingCharge\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n let freightFee: number | undefined = 0;\n if (isTaxIncludedInPrice === undefined || isShowTaxBreakup === undefined) {\n freightFee = cart.ShippingChargeAmount;\n } else {\n freightFee = isTaxIncludedInPrice && !isShowTaxBreakup ? shippingChargeAmount + taxOnShippingCharge : cart.ShippingChargeAmount;\n }\n const canShip = deliveryModes.some(\n deliveryMode =>\n !(\n deliveryMode !== '' &&\n (deliveryMode ===\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) ||\n deliveryMode === emailDeliveryModeCode)\n )\n );\n const hasDeliveryMethod = deliveryModes.some(deliveryMode => !!deliveryMode && deliveryMode !== emailDeliveryModeCode);\n const hasShippingMethod = deliveryModes.some(\n deliveryMode =>\n !!deliveryMode &&\n deliveryMode !==\n getDeliveryMode(deliveryMode, retailMultiplePickUpOptionEnabled, channelDeliveryOptionConfig, pickupDeliveryModeCode) &&\n deliveryMode !== emailDeliveryModeCode\n );\n return {\n canShip,\n hasDeliveryMethod,\n hasShippingMethod,\n freightFee\n } as IShippingOrderLine;\n};\n\nconst getDeliveryMode = (\n deliveryMode?: string,\n featureSate: boolean = false,\n channelDeliveryOptionConfig?: ChannelDeliveryOptionConfiguration,\n pickupDeliveryMode?: string\n) => {\n if (!featureSate) {\n return pickupDeliveryMode;\n }\n return channelDeliveryOptionConfig?.PickupDeliveryModeCodes?.find(dM => dM === deliveryMode);\n};\n\n// eslint-disable-next-line complexity\nexport const OrderSummary = (props: IOrderSummaryProps) => {\n const {\n SubtotalAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n SubtotalAmountWithoutTax,\n TaxAmount,\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Existing Property.\n TaxOnNonShippingCharges,\n DiscountAmount = 0,\n TotalAmount,\n OtherChargeAmount\n } = props.cart;\n\n const { canShip, hasDeliveryMethod, hasShippingMethod, freightFee } = getDeliveryConfiguration(\n props.cart,\n props.channelConfiguration,\n props.channelDeliveryOptionConfig,\n props.retailMultiplePickUpOptionEnabled,\n props.isTaxIncludedInPrice,\n props.isShowTaxBreakup\n );\n\n let reactNodes: IOrderSummaryLines;\n // if either of isTaxIncludedInPrice or isShowTaxBreakup is undefined then we will execute old logic\n if (props.isTaxIncludedInPrice === undefined || props.isShowTaxBreakup === undefined) {\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, SubtotalAmount, 'sub-total', props.subTotalLabel),\n tax: _buildOrderSummarySection(props, hasDeliveryMethod ? TaxAmount : undefined, 'tax-amount', props.taxLabel),\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, OtherChargeAmount, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n } else {\n const otherChargeAmount = OtherChargeAmount !== undefined ? OtherChargeAmount : 0;\n const taxOnNonShippingCharges = TaxOnNonShippingCharges !== undefined ? TaxOnNonShippingCharges : 0;\n const isTaxGreaterThanZero = TaxAmount !== undefined && TaxAmount > 0;\n // isTaxIncludedInPrice isShowTaxBreakup useProperties\n // False False/True otherChargeAmount\n // True True otherChargeAmount\n // True false otherChargeAmount+TaxOnNonShippingCharges\n\n const otherChargeAmountTotal =\n props.isTaxIncludedInPrice && !props.isShowTaxBreakup ? otherChargeAmount + taxOnNonShippingCharges : otherChargeAmount;\n\n const subtotalAmountActual = props.isTaxIncludedInPrice && props.isShowTaxBreakup ? SubtotalAmountWithoutTax : SubtotalAmount;\n\n reactNodes = {\n subtotal: _buildOrderSummarySection(props, subtotalAmountActual, 'sub-total', props.subTotalLabel),\n tax: props.isShowTaxBreakup\n ? _buildOrderSummarySection(\n props,\n hasDeliveryMethod || isTaxGreaterThanZero ? TaxAmount : undefined,\n 'tax-amount',\n props.taxLabel\n )\n : '',\n orderTotal: _buildOrderSummarySection(props, TotalAmount, 'total', props.orderTotalLabel),\n otherCharge:\n (OtherChargeAmount && _buildOrderSummarySection(props, otherChargeAmountTotal, 'other-charges', props.otherChargeLabel)) ||\n undefined\n };\n }\n if (canShip) {\n reactNodes.shipping = _buildOrderSummarySection(props, hasShippingMethod ? freightFee : undefined, 'shipping', props.shippingLabel);\n }\n if (props.checkoutState) {\n const giftCardAmount = _computeGiftCardAmount(props.checkoutState, props.cart);\n const loyaltyAmount = _computedLoyaltyAmount(props.checkoutState);\n const customerAccountAmount = _computedCustomerAccountAmount(props.checkoutState);\n const totalAmountAfterGiftCard = (TotalAmount || 0) - giftCardAmount - loyaltyAmount - customerAccountAmount;\n\n if (loyaltyAmount > 0) {\n reactNodes.loyalty = _buildOrderSummarySection(props, -loyaltyAmount, 'loyalty', props.loyaltyLabel || 'Loyalty amount');\n }\n\n if (giftCardAmount > 0) {\n reactNodes.giftCard = _buildOrderSummarySection(props, -giftCardAmount, 'gift-card', props.giftcardLabel || 'Gift card amount');\n }\n\n if (customerAccountAmount > 0) {\n reactNodes.customerAccount = _buildOrderSummarySection(\n props,\n -customerAccountAmount,\n 'customer-credit-amount',\n props.customerAccountLabel || 'Customer Credit amount'\n );\n }\n\n reactNodes.orderTotal = _buildOrderSummarySection(\n { ...props, freeText: undefined },\n totalAmountAfterGiftCard,\n 'total',\n props.orderTotalLabel\n );\n }\n\n if (DiscountAmount > 0) {\n reactNodes.totalDiscounts = _buildOrderSummarySection(props, -DiscountAmount, 'total-discounts', props.totalDiscountsLabel);\n }\n\n return reactNodes;\n};\n"],"names":["ActiveCheckoutCartProductsInput","constructor","getCacheKey","getCacheObjectType","dataCacheType","createInput","async","getActiveCheckoutCartProductsAction","input","ctx","telemetry","exception","Error","checkoutState","getCheckoutState","cart","checkoutCart","hasInvoiceLine","CartLines","length","getSimpleProducts","map","cartLine","ProductId","ProductInput","requestContext","apiSettings","undefined","CatalogId","filter","Boolean","then","products","catch","error","getActiveCheckoutCartProductsActionDataAction","createObservableDataAction","id","action","Checkout","React","_this","state","errorMessage","isValidationPassed","isPlaceOrderLoading","isPlaceOrderClicked","telemetryContent","getTelemetryObject","this","props","context","request","telemetryPageName","friendlyName","checkoutErrorRef","handleCheckoutHeadingChange","event","config","checkoutHeading","text","target","value","isLoading","cartStatus","isEmptyCart","getSlotItems","key","slots","triggerPaymentWithPlaceOrder","_this$props$data$chec","setState","data","checkout","result","updateShouldTriggerPaymentWithPlaceOrder","newShouldTriggerPaymentWithPlaceOrder","shouldTriggerPaymentWithPlaceOrder","onPlaceOrder","_this$props$data$chec2","resources","checkoutOutOfStockErrorMessage","actionContext","app","enableStockCheck","orderConfirmation","information","isOverMaxQuantity","_this$props$data$chec3","_this$props$data$chec4","_checkout$result","hasOrderConfirmation","updatedCartVersion","updateCartLineEmailAddress","guestCheckoutEmail","placeOrder","isPaymentVerificationRedirection","handleCheckoutError","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","_this$props$context$r","_this$props$data$chec5","emailDeliveryModeCode","channel","EmailDeliveryModeCode","emailDeliveryCartLines","DeliveryMode","lineDeliverySpecifications","line","LineId","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","DeliveryPreferenceType","ElectronicDelivery","ElectronicDeliveryEmailAddress","newGuestCheckoutEmail","updateLineDeliverySpecificationsAsync","callerContext","Id","updatedCart","Version","_this$props$context$r2","getAvailabilitiesForCartLineItems","ProductAvailabilitiesForCartLineItems","productInventoryInformation","_cart$CartLines","_cart$CartLines2","productsThatShouldValidateInventory","cartline","_cartlineProduct$Beha","cartlineProduct","find","product","RecordId","isStockedItem","Behavior","IsStockedProduct","isEmailDelivery","ArrayExtensions","hasElements","foundProductAvailability","productInventory","_productInventory$Pro","ProductAvailableQuantity","push","cartLinesInventoryValidation","validateCartLinesInventory","isValid","getActiveChildModuleStates","childIds","getModule","moduleState","isDisabled","hasModuleState","onContainerReady","forEach","isReady","redirectToCartPage","notFoundEditCartLinkMessage","editCartLink","Msdyn365","window","location","assign","genericErrorMessage","validateForCheckout","retry","arguments","_shouldValidateQuantityLimits","validateForCheckoutAsync","bypassCache","_result$ValidationFai","ValidationFailuresByCartLines","warning","debug","name","_this$props$data$chec6","cartState","refreshCart","refreshError","message","_setErrorMessage","setHasError","onUpdating","_featureStatuses$find","_featureStatuses$find2","_featureStatuses$find3","featureStatuses","featureState","Name","IsEnabled","_this$props$context","defaultOrderQuantityLimitsFeatureConfig","platform","enableDefaultOrderQuantityLimits","customerInfo","customerInformation","isB2BSite","isChannelTypeB2B","isOrderQuantityLimitsFeatureEnabledInSiteSettings","_this$props$data$cart","_cartConfiguration$Ig","cartConfiguration","IgnoreOrderSettings","_saveShippingAndBillingAddress","tokenizedPaymentCard","Zip","address","_getAddressFromTokenizedPaymentCard","updateBillingAddressFromExpressCheckout","newBillingAddressFromExpressCheckout","updateShippingAddressFromExpressCheckout","newShippingAddressFromExpressCheckout","TwoLetterISORegionName","Country","NameOnCard","Street","Address1","StreetNumber","Address2","City","State","ZipCode","Phone","invalidCartVersionErrorMessage","missingRequiredCartTenderLinesErrorMessage","checkoutApiFailureErrorMessage","invoiceCheckoutApiFailureErrorMessage","checkoutResult","apiError","statusCode","shouldEnableCheckoutErrorDisplayMessaging","errorCode","setCheckoutErrors","isExpressCheckoutApplied","_this$props$data$chec7","_error$data","_this$props$data$chec8","status","shouldEnableSinglePaymentAuthorizationCheckout","AdditionalContext","_this$props$data$chec9","_this$props$data$chec10","isEditorialMode","isEmpty","_this$props$data$chec11","params","isEditor","_this$props$data$chec12","_this$props$data$chec13","_this$props$data$chec14","_this$props$data$chec15","_this$props$data$chec16","isTermsAndConditionAccepted","disableForOBO","isPaidOffByCustomerAccount","_this$props$data$chec17","_this$props$data$chec18","_this$props$data$chec19","_this$props$data$chec20","amountDue","TotalAmount","customerAccountAmount","_this$props$data$chec21","_this$props$data$chec22","_this$props$data$chec23","properties","ExtensionProperties","property","Key","Value","StringValue","JSON","parse","componentDidMount","when","asyncResultStatus","AsyncResultStatusCode","LOADING","expressPaymentDetailsFromCartPage","_this$props$data$chec24","_this$props$data$chec27","email","tenderLine","paymentTenderType","paymentTenderTypeFromCartPage","isExpressCheckoutAppliedInCartPage","isExpressAddressAppliedInCartPage","cardPaymentAcceptResult","_this$props$data$chec25","_this$props$data$chec26","updateExpressCheckoutDetails","newEmailAddressFromExpressCheckout","newTenderLine","newTokenizedPaymentCard","newPaymentTenderType","newIsExpressCheckoutApplied","newIsExpressAddressApplied","newCardPaymentAcceptResult","updateExtensionProperties","newExtensionProperties","hasError","isCartReady","reaction","_this$props$data$chec28","isPaymentSectionContainerReady","_this$props$data$chec29","_this$props$data$chec30","_this$props$data$chec31","_this$props$data$chec32","redirectAdditionalContext","isPaymentVerificationRequired","_this$props$data$chec33","isPaymentSectionContainerHasError","_this$props$data$chec34","_this$props$data$chec35","isBillingAddressHasError","_this$props$data$chec36","_this$props$data$chec37","updateIsBillingAddressHasError","newIsBillingAddressHasError","canPlaceOrder","_this$props$data$chec38","_this$props$data$chec39","updateIsPlaceOrderEnabledInRedirection","newIsPlaceOrderEnabledInRedirection","_this$props$data$chec40","checkoutError","_this$props$data$chec41","checkoutErrorLocation","errorLocation","ErrorLocation","checkoutPaymentErrorLocation","ErrorCode","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","CheckoutPaymentInstrument","componentDidUpdate","_this$props$data$chec42","_this$props$data$chec43","shouldFocusOnCheckoutError","focusOnCheckoutError","render","_this$props$data$chec44","_this$props$data$chec45","_this$props$data$chec46","_this$props$data$chec47","_this$props$data$chec48","_this$props$data$chec49","_this$props$data$chec50","_this$props$data$chec51","_this$props$data$chec52","_this$props$data$chec53","_this$props$data$chec54","_this$props$data$chec55","_this$props$data$chec56","_this$props$data$chec57","_document","_this$props$data$chec58","className","disableGuidedCheckoutFlow","user","isAuthenticated","backToShopping","placeOrderText","confirmPaymentText","cookieConsentRequiredMessage","checkoutClass","classnames","allCheckoutInformation","checkoutInformation","info","includes","checkoutExpressPaymentContainer","isConsentGiven","cookies","isMobile","device","Type","backToShoppingUrl","termsAndConditions","payLoad","getPayloadObject","TelemetryConstant","BackToShopping","backToShoppingAttributes","getTelemetryAttributes","checkoutBtnText","hasShippingAddress","hasCartDeliveryMode","hasGuestCheckoutEmail","hasExpressPaymentContainer","document","getElementsByClassName","style","display","viewProps","_objectSpread","hasSalesOrder","salesOrder","checkoutProps","moduleProps","headerProps","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","title","renderMsdyn365Text","alert","AlertComponent","Object","loading","Waiting","_this$props$data$chec59","_this$props$data$chec60","canShow","guidedForm","GuidedFormComponent","items","resource","orderSummary","getOrderSummary","invoicePaymentSummary","getInvoicePaymentSummary","lineItems","getLineItems","placeOrderButton","PlaceOrderButtonComponent","keepShoppingButton","Button","color","href","disabled","renderView","values","some","get","every","SUCCESS","FAILED","tag","editProps","onEdit","__decorate","computed","withModuleState","observer","PickUpAtStoreComponent","_ref","PickUpAtStore","label","Node","EmailDeliveryComponent","_ref2","EmailDelivery","LineItemComponent","_ref3","LineItem","item","pickUpAtStore","emailDelivery","LineItemGroupComponent","_ref4","LineItemDeliveryGroup","LineItemList","heading","lineItem","LineItemGroupComponentWithMultiplePickUp","_ref5","lineItemWraper","lineItemWraperIcon","LineItemComponentWithMultiplePickUp","_ref6","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","LineItems","Header","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","index","OrderSummaryComponent","_ref9","lines","subtotal","shipping","otherCharge","tax","totalDiscounts","loyalty","customerAccount","giftCard","orderTotal","PaymentSummaryComponent","_ref10","invoices","Module","ref","role","totalAmountLabel","invoiceLabel","invoiceSummaryTitle","typeName","InvoiceSummary","orderTotalLabel","_featureState$result","pickupDeliveryModeCode","channelDeliveryOptionConfig","retailMultiplePickUpOptionEnabled","feature","_getDeliveryLocation","orgUnitLocations","FulfillmentStoreId","locationMatch","OrgUnitNumber","OrgUnitName","_getLineItemComponent","_input$data$catalogs","productId","_product","imageSettings","showShippingChargesForLineItems","quantityDisplayString","productDimensionTypeColor","productDimensionTypeSize","productDimensionTypeStyle","productDimensionTypeAmount","configString","inputQuantityAriaLabel","discountStringText","shippingCharges","gridSettings","catalogs","productUrl","getProductUrlSync","MsDyn365","isBrowser","_cartLine$CatalogId","fullUrl","URL","searchParams","set","currencyCode","CartLineItemComponent","sizeString","colorString","styleString","amountString","originalPriceText","currentPriceText","shippingChargesText","salesAgreementPricePrompt","isQuantityEditable","primaryImageUrl","PrimaryImageUrl","priceCurrency","_getPickUpAtStoreComponents","pickupDeliveryLocation","pickUpAtStoreWithLocationText","_getEmailDeliveryComponents","emailDeliveryText","_getLineItemsComponents","isPickUp","_getCartPickDeliveryMode","cartLineItem","_channelDeliveryOptio","StringExtensions","isNullOrWhitespace","PickupDeliveryModeCodes","deliveryMode","_countItems","reduce","count","Quantity","_filterItemsByDiliveryType","type","_channelDeliveryOptio2","_getLineItemsByDeliveryType","_getGroupTitleComponent","_input$data$deliveryO","itemLabel","itemsLabel","inStorePickUpLabel","shippingCountCheckoutLineItem","emailDeliveryModeDesc","deliveryOptions","productDeliveryOptions","_productDeliveryOptio","DeliveryOptions","deliveryOption","Code","Description","suffix","replace","toString","handleLineItemHeadingChange","lineItemsHeading","_getLineItemsByDeliveryTypeWithMulitplePickupMode","multiplePickUpLabel","shippingLable","_filterItemsByMultiplePickupMode","getGroupByStorePickup","groupBy","groupDelivery","cartLinesGroup","cartLinesGrp","entries","groupByDeliveryType","keys","cartLines","lineItemDeliveryGroup","isNullOrEmpty","_getGroupTitleComponentWithMultiplePickUp","fulFillmentStoreId","_input$data$deliveryO2","_input$data$deliveryO3","pickupDeliveryModeDesc","_productDeliveryOptio2","_productDeliveryOptio3","groupTitle","iconClass","_getLineItems","editCartText","EditCart","attribute","groupClass","orderSummaryHeading","subTotalLabel","shippingLabel","taxLabel","loyaltyLabel","giftcardLabel","totalDiscountsLabel","freeText","toBeCalculatedText","otherCharges","customerAccountLabel","showLineItems","channelConfiguration","isShowOrHideTaxEnabled","isEnableShowOrHideSalesTaxECommerceEnabled","orderSummaryProps","OrderSummary","otherChargeLabel","isTaxIncludedInPrice","IsTaxIncludedInPrice","isShowTaxBreakup","CheckoutGuidedCard","super","editButtonRef","formCardRef","renderFooder","isVisted","isSubmitting","isCancelAllowed","hasControlGroup","onCancel","onSubmit","saveBtnLabel","cancelBtnLabel","saveAndContinueBtnLabel","canSubmit","canCancel","contentAction","etext","Save","SaveContinue","saveBtnAttributes","Cancel","cancelBtnAttributes","classname","onClick","focusOnFirstFocusableElement","node","current","child","querySelector","focus","focusOnEditButton","editButton","scrollToTitle","formCard","scrollIntoView","getTitle","step","headingTag","Tag","_getModules","_getId","prevProps","isActive","onNext","shouldFocus","children","childrenModules","childModule","childId","childState","setCheckoutErrorFocus","isExpanded","isPending","isUpdating","hasInitialized","changeBtnLabel","CheckoutChange","changeBtnAttributes","canEdit","active","expanded","closed","visted","hidden","initialized","ready","pending","updating","innerRef","paymentInstrumentModuleId","CheckoutGuidedForm","currentStep","getEnabledModules","_enableAfterModule","i","nextChildId","_isPaymentSectionContainer","moduleId","_sectionState$childId","sectionState","currentId","getStep","indexOf","getId","getHeading","moduleChildId","_state$childIds","init","shouldCollapseAfterRedirect","hasMissingInfo","hasOrderError","previousModuleHasError","_this$props$requestCo","GuidedCard","enableControl","buttonsStates","onPlaceOrderHandler","isBusy","buttonSetState","setIsBusy","useState","payload","TelemetryEvent","Purchase","attributes","orderedProducts","redirect","PlaceOrder","InvoiceSummaryLine","price","cssLabel","PriceComponent","CustomerContextualPrice","freePriceText","_buildPaymentSummarySection","_computedLoyaltyAmount","loyaltyAmount","invoiceLines","IsInvoiceLine","reactNodes","invoiceLine","InvoiceAmount","format","InvoiceId","giftCardAmount","_computeGiftCardAmount","giftCardTotalValue","giftCardExtends","giftCardCounter","Balance","amount","Math","min","totalAmountAfterGiftCard","OrderSummaryLine","_buildOrderSummarySection","Currency","getDeliveryMode","featureSate","pickupDeliveryMode","dM","SubtotalAmount","SubtotalAmountWithoutTax","TaxAmount","TaxOnNonShippingCharges","DiscountAmount","OtherChargeAmount","canShip","hasDeliveryMethod","hasShippingMethod","freightFee","getDeliveryConfiguration","PickupDeliveryModeCode","deliveryModes","taxOnShippingCharge","TaxOnShippingCharge","shippingChargeAmount","ShippingChargeAmount","otherChargeAmount","taxOnNonShippingCharges","isTaxGreaterThanZero","otherChargeAmountTotal","subtotalAmountActual"],"sourceRoot":""}