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EAAAA,cAACgrB,EAAiB3iB,OAAAC,OAAA,GAAKqiB,IACtB/K,EAAU2K,kBAAoBK,EAC9BhL,EAAU4K,kBAAoBK,EAC9BjL,EAAU6K,oBAAsBK,EAC5B,gECxBjB,MA6BA,EA7B+Fxe,IAO1F,IAP2F,UAC5Fgc,EAAS,UACTC,EAAS,SACTvc,EAAQ,iBACRyc,EAAgB,SAChBD,EAAQ,GACR9c,GACHY,EACG,MAAM4e,GAAUC,EAAAA,EAAAA,kBAAiB,QAAS1C,EAAmB,IACvD2C,GAAYC,EAAAA,EAAAA,wBAAuB5C,EAAmByC,GAE5D,OACIlrB,EAAAA,cAAAA,EAAAA,SAAA,KACIA,EAAAA,cAAA,QAAAqI,OAAAC,OAAA,CACIL,UAAU,mDACVmE,KAAK,WAAU,aACHmc,EAAS,eACPD,EACdgD,KAAK,6BACL9C,SAAUA,EACVxc,SAAUA,EACV2d,QAASrB,EACT5c,GAAIA,GACA0f,IAET,+CCpCX,MAQA,EARuG9e,IAAgB,IAAf,QAAE7D,GAAS6D,EAC/G,OAAK7D,EAIEzI,EAAAA,cAAA,KAAGiI,UAAU,mDAAmDQ,GAH5D,IAGwE,+CCLvF,MAQA,EARmG6D,IAAc,IAAb,MAAE/D,GAAO+D,EACzG,OAAK/D,EAIEvI,EAAAA,cAAA,KAAGiI,UAAU,iDAAiDM,GAH1D,IAGoE","sources":["webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.tsx?de67","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-edit-mode.tsx?83e6","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-customer-account-payment/components/get-account-payment-form-summary-mode.tsx?5675","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-express-payment-container/checkout-express-payment-container.tsx?1d63","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-express-payment-container/checkout-express-payment-container.view.tsx?4299","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/checkout-pickup.tsx?28aa","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/checkout-pickup.view.tsx?d64e","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/components/checkout-pickup-group.tsx?9de7","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/components/checkout-pickup-utility.ts?b7eb","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/components/checkout-pickup-date-dropdown.tsx?e5a3","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-pickup/components/checkout-pickup-timeslot-dropdown.tsx?aef8","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-section-container/checkout-section-container.tsx?c853","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-section-container/checkout-section-container.view.tsx?b4ab","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-section-container/components/loading.tsx?2e57","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.tsx?9243","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-terms-and-conditions/checkout-terms-and-conditions.view.tsx?26e8","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.check-box.tsx?3b17","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-message.tsx?c6a5","webpack://venchi-ecommerce-msdyn365/./src/modules/checkout-terms-and-conditions/components/checkout-terms-and-conditions.error-title.tsx?f908"],"sourcesContent":["/*!\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 { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateManager, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { action, computed, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentData } from './checkout-customer-account-payment.data';\nimport { ICheckoutCustomerAccountPaymentProps } from './checkout-customer-account-payment.props.autogenerated';\nimport { getAccountPaymentFormEditMode, IAccountPaymentEditViewForm } from './components/get-account-payment-form-edit-mode';\nimport { getAccountPaymentFormSummaryMode, IAccountPaymentSummaryViewForm } from './components/get-account-payment-form-summary-mode';\nimport { ErrorComponent } from '../../common/error';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutCustomerAccountPaymentViewProps\n extends ICheckoutCustomerAccountPaymentProps {\n checkoutCustomerAccount: IModuleProps;\n summaryView: IAccountPaymentSummaryViewForm;\n editView: IAccountPaymentEditViewForm;\n moduleState: IModuleStateManager;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\nexport interface ICheckoutCustomerAccountPaymentState {\n paymentAmount: number;\n isCreditSectionExpanded: boolean;\n customizedAmt: string;\n amountVariable: string;\n errorMessage?: string;\n handleSaveAndContinue?: boolean;\n}\n\n/**\n *\n * CheckoutCustomerAccount component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nexport class CheckoutCustomerAccountPayment extends React.Component<\n ICheckoutCustomerAccountPaymentViewProps,\n ICheckoutCustomerAccountPaymentState\n> {\n private readonly defaultLocale: string = 'en-us';\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerInfo = get(this.props, 'data.customerInformation.result');\n const request = get(this.props, 'context.request');\n const b2bChannel = isChannelTypeB2B(request);\n const platform = get(this.props, 'context.request.app.platform');\n\n return (\n customerInfo &&\n customerInfo.AllowOnAccountPayment === true &&\n platform &&\n (platform.enableCustomerAccountPayment === 'all' ||\n (platform.enableCustomerAccountPayment === 'b2b' && b2bChannel) ||\n (platform.enableCustomerAccountPayment === 'b2c' && !b2bChannel))\n );\n }\n\n @computed get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.loyaltyAmount) {\n return 0;\n }\n return checkoutState.loyaltyAmount;\n }\n\n @computed get maxPaymentAmount(): number {\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\n if (!cart) {\n return 0;\n }\n\n // Use customer account after loyalty.\n const amountDue = Math.max(0, (cart.TotalAmount || 0) - this.getLoyaltyAmount);\n\n // If the user has a mandatory credit limit, then the max amount must not be more than that\n if (this.props.data.customerInformation?.result?.MandatoryCreditLimit) {\n return Math.min(this.getAvailableCredit(this.props.data.creditBalances?.result), amountDue);\n }\n return amountDue;\n }\n\n @computed get errorMessage(): string | undefined {\n if (this.state.paymentAmount > this.maxPaymentAmount) {\n return this.props.resources.invalidAmountExceedAmountDueMessage;\n }\n\n if (this.state.paymentAmount < 0) {\n return this.props.resources.invalidAmountNegativeMessage;\n }\n\n return undefined;\n }\n\n @computed get currencyCode(): string | undefined {\n return get(this.props, 'context.request.channel.Currency');\n }\n\n @computed get availableCredit(): number {\n const creditBalances = get(this.props, 'data.creditBalances.result');\n\n return creditBalances ? this.getAvailableCredit(creditBalances) : 0;\n }\n\n @computed get orderTotal(): number {\n const orderTotal = get(this.props, 'data.checkout.result.checkoutCart.cart.TotalAmount');\n\n return orderTotal ? orderTotal : 0;\n }\n\n @computed get formattedExcessCredit(): string | undefined {\n const excessCredit = this.availableCredit - this.orderTotal;\n return excessCredit < 0 ? this.props.context.cultureFormatter.formatCurrency(excessCredit, this.currencyCode) : undefined;\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n private readonly baseClassName: string = 'ms-checkout-customer-account';\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutCustomerAccountPaymentViewProps) {\n super(props);\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n this.state = {\n paymentAmount: this.maxPaymentAmount,\n isCreditSectionExpanded: false,\n customizedAmt: new Intl.NumberFormat(locale).format(this.maxPaymentAmount),\n amountVariable: this.maxPaymentAmount.toString(),\n handleSaveAndContinue: false\n };\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n // When the cart.TotalAmount gets updated (like if selecting the delivery option adds a charge) we need to update the amount based on the new total amount.\n reaction(\n () =>\n this.props.data.checkout.result &&\n this.props.data.checkout.result.checkoutCart.cart &&\n this.props.data.checkout.result.checkoutCart.cart.TotalAmount,\n totalAmount => {\n this.updateMaxAmount(this.maxPaymentAmount);\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutCustomerAccountPayment &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutCustomerAccountPayment) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutCustomerAccountPaymentProps,\n nextState: ICheckoutCustomerAccountPaymentState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const customerInfo = this.props.data.customerInformation?.result;\n\n if (!this.isCustomerAccountPaymentEnabled) {\n this.props.context.telemetry.information(\n 'customer account payments will not display, because the feature is disabled or not enabled for this type of customer'\n );\n return null;\n }\n\n const checkoutState = this.props.data.checkout.result;\n const cart = checkoutState ? checkoutState.checkoutCart.cart : undefined;\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\n const creditBalances = this.props.data.creditBalances.result;\n\n if (!cart || hasInvoiceLine) {\n return null;\n }\n const resources = this.props.resources;\n const locale = get(this.props, 'context.request.locale') || this.defaultLocale;\n\n const customerSinceDate = new Date(customerInfo?.CreatedDateTime || 0).toLocaleDateString(locale);\n\n const hasError = this.props.moduleState.hasError;\n const errorMessage = this.state.errorMessage;\n\n const props = {\n ...this.props,\n checkoutErrorRef: this.checkoutErrorRef,\n checkoutCustomerAccount: {\n moduleProps: this.props,\n className: classnames(this.baseClassName)\n },\n alert: hasError && errorMessage && (\n \n ),\n editView: getAccountPaymentFormEditMode({\n onAddPayment: this.addPayment,\n resources,\n customizedAmt: this.state.customizedAmt,\n amountVariable: this.state.amountVariable,\n amount: this.state.paymentAmount,\n onChangePaymentAmount: this.onChangePaymentAmount,\n maxAmount: this.maxPaymentAmount,\n customer: customerInfo,\n customerCreatedDate: customerSinceDate,\n availableCredit: this.props.context.cultureFormatter.formatCurrency(\n this.getAvailableCredit(creditBalances),\n this.currencyCode\n ),\n showCreditLimit: customerInfo?.MandatoryCreditLimit || false,\n errorMessage: this.errorMessage,\n onToggleCreditSection: this.toggleCreditSection,\n creditSectionIsExpanded: this.state.isCreditSectionExpanded,\n orderTotal: this.props.context.cultureFormatter.formatCurrency(this.orderTotal, this.currencyCode),\n excessCredit: this.formattedExcessCredit,\n onRemovePayment: this.removePayment,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined,\n locale:\n this.props.context && this.props.context.request && this.props.context.request.locale\n ? this.props.context.request.locale\n : this.defaultLocale,\n skipOnChangeLogic: this.props.context.request.features?.skipCheckoutOnChangeLogic\n }),\n summaryView: getAccountPaymentFormSummaryMode({\n resources,\n amount: this.state.paymentAmount,\n appliedAmount:\n checkoutState && checkoutState.customerAccountAmount > 0\n ? this.props.context.cultureFormatter.formatCurrency(checkoutState.customerAccountAmount, this.currencyCode)\n : undefined\n })\n };\n\n return this.props.renderView(props) as React.ReactElement;\n }\n\n private readonly getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\n let availableCredit = 0;\n\n if (!creditBalances) {\n return 0;\n }\n\n if (creditBalances.InvoiceAccountCreditLimit === 0) {\n availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\n } else {\n availableCredit =\n creditBalances.InvoiceAccountCreditLimit -\n creditBalances.InvoiceAccountBalance -\n creditBalances.InvoiceAccountPendingBalance;\n }\n\n return availableCredit;\n };\n\n private readonly addPayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({ handleSaveAndContinue: true });\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: this.state.paymentAmount });\n this.props.context.telemetry.information('customer account payment amount updated');\n };\n\n private readonly toggleCreditSection = (): void => {\n this.setState({\n isCreditSectionExpanded: !this.state.isCreditSectionExpanded\n });\n };\n\n private readonly init = async (): Promise => {\n this.props.moduleState.init({\n onCancel: this.handleCancelOrSubmit,\n onSubmit: this.handleCancelOrSubmit,\n onEdit: this.onEdit\n });\n\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount !== 0) {\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onChangePaymentAmount = (customizedAmt: string, paymentAmount: number, amountVariable: string): void => {\n this.setState({\n customizedAmt: customizedAmt,\n paymentAmount: paymentAmount,\n amountVariable: amountVariable\n });\n };\n\n private readonly updateMaxAmount = (newAmount: number): void => {\n // If the user has already set an amount, we should not override that in the UI because it will be confusing.\n if (this.props.data.checkout.result && this.props.data.checkout.result.customerAccountAmount === 0) {\n this.setState({\n // We should never allow a negative amount.\n paymentAmount: Math.max(0, newAmount),\n customizedAmt: Math.max(0, newAmount).toString()\n });\n }\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Payment section customer account payment onEdit is called.');\n\n this.props.moduleState.onUpdating();\n };\n\n private readonly handleCancelOrSubmit = () => {\n const checkoutState = this.props.data.checkout.result;\n if (checkoutState && checkoutState.customerAccountAmount > 0) {\n this.setState({ handleSaveAndContinue: false });\n this.props.telemetry.information('Payment section customer account payment onSubmit is called.');\n\n if (\n Msdyn365.isOboRequest(this.props.context.request) &&\n checkoutState?.customerAccountAmount !== checkoutState?.checkoutCart.cart.TotalAmount\n ) {\n this._setErrorMessage(this.props.resources.invalidAmountForOBOMessage);\n } else {\n this.props.moduleState.onReady();\n }\n } else if (\n checkoutState?.customerAccountAmount === 0 &&\n !this.state.handleSaveAndContinue &&\n this.props.config.isCheckoutCustomerAccountPaymentRequired\n ) {\n this._setErrorMessage(this.props.resources.customerAccountCreditErrorMessage);\n } else {\n this.props.telemetry.information('Payment section customer account payment onCancel is called.');\n\n // Skip the module\n this.props.moduleState.onSkip();\n }\n };\n\n private readonly removePayment = async (): Promise => {\n const checkoutState = this.props.data.checkout.result;\n\n if (!checkoutState) {\n this.props.context.telemetry.error('checkout state not found');\n return;\n }\n\n this.setState({\n paymentAmount: 0\n });\n\n this.onChangePaymentAmount('', NaN, '0');\n\n this._clearError();\n await checkoutState.updateCustomerAccountAmount({ newAmount: 0 });\n this.props.context.telemetry.information('customer account payment removed');\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n}\n\nexport default CheckoutCustomerAccountPayment;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { Alert, Button, INodeProps, NodeTag, getLocaleBasedCustomizedPrice, ILocalizedPrice } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentEditViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n customizedAmt: string;\n amount: number;\n amountVariable: string;\n maxAmount: number;\n customer: Customer | undefined;\n customerCreatedDate: string;\n availableCredit: string;\n showCreditLimit: boolean;\n errorMessage: string | undefined;\n creditSectionIsExpanded: boolean;\n orderTotal: string;\n excessCredit: string | undefined;\n appliedAmount: string | undefined;\n locale: string;\n onAddPayment(): Promise;\n onChangePaymentAmount(customizedAmt: string, paymentAmount: number, amountVariable: string): void;\n onToggleCreditSection(): void;\n onRemovePayment(): Promise;\n skipOnChangeLogic?: boolean;\n}\n\nexport interface IAccountPaymentEditViewForm {\n formProps: INodeProps;\n inputLabel: React.ReactNode;\n inputAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n customerName: React.ReactNode;\n customerAccountNumber: React.ReactNode;\n customerSince: React.ReactNode;\n accountCredit: React.ReactNode;\n alert: React.ReactNode;\n accountDetails: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n}\n\n/**\n * On Add Account Payment Function.\n * @param onAddPayment -On Add Payment Function.\n * @returns Call of Add payment function.\n */\nconst onAddAccountPayment = (onAddPayment: () => Promise) => async (event: React.SyntheticEvent): Promise => {\n event.preventDefault();\n await onAddPayment();\n};\n\n/**\n * On Change Amount Function.\n * @param onChangePaymentAmount -On Change Payment Amount Function.\n * @returns Call of Change payment Amount function.\n */\nconst onChangeAmountHandler = (\n customizedAmt: string,\n paymentAmount: number,\n amountVariable: string,\n locale: string,\n onChangePaymentAmount: (customizedAmt: string, paymentAmount: number, amountVariable: string) => void\n) => (event: React.ChangeEvent) => {\n const value = event.target.value;\n const customState: ILocalizedPrice = {\n customizedAmount: customizedAmt,\n amountVariable: amountVariable,\n paymentAmount: paymentAmount\n };\n const returnModifiedState = getLocaleBasedCustomizedPrice(value, customState, locale, keyCode);\n customizedAmt = returnModifiedState.customizedAmount as string;\n paymentAmount = returnModifiedState.paymentAmount as number;\n amountVariable = returnModifiedState.amountVariable as string;\n onChangePaymentAmount(customizedAmt, paymentAmount, amountVariable);\n keyCode = 0;\n};\n\nlet keyCode: number = 0;\nexport const getAccountPaymentFormEditMode = (options: IGetAccountPaymentEditViewFormInput): IAccountPaymentEditViewForm => {\n const {\n resources,\n onAddPayment,\n amount,\n customizedAmt,\n amountVariable,\n onChangePaymentAmount,\n maxAmount,\n customer,\n customerCreatedDate,\n availableCredit,\n showCreditLimit,\n errorMessage,\n onToggleCreditSection,\n creditSectionIsExpanded,\n orderTotal,\n excessCredit,\n onRemovePayment,\n appliedAmount,\n locale,\n skipOnChangeLogic\n } = options;\n\n const {\n addPaymentButtonLabel,\n inputAmountLabel,\n inputAmountAriaLabel,\n customerSinceLabel,\n accountCreditLabel,\n creditDetailsSectionLabel,\n orderTotalLabel,\n availableCreditLabel,\n creditExcessLabel,\n appliedCustomerAccountPaymentLabel,\n removeCustomerAccountPaymentLabel,\n accountCreditDetails\n } = resources;\n\n const inputLabel = (\n \n {inputAmountLabel}\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-edit',\n onSubmit: onAddAccountPayment(onAddPayment),\n tag: 'form' as NodeTag\n };\n\n const addPaymentButton = (\n maxAmount || amount < 0 || Number.isNaN(amount)}\n >\n {addPaymentButtonLabel}\n \n );\n\n const inputAmount = (\n onChangePaymentAmount(value, Number(value), value)\n : onChangeAmountHandler(customizedAmt, amount, amountVariable, locale, onChangePaymentAmount)\n }\n onKeyDown={event => (keyCode = event.which)}\n aria-label={inputAmountAriaLabel}\n aria-valuemin={0}\n aria-valuemax={maxAmount}\n aria-valuenow={amount}\n min={0}\n max={maxAmount}\n />\n );\n\n const customerName =
{customer?.Name}
;\n\n const customerAccountNumber =
#{customer?.AccountNumber}
;\n\n const customerSince = (\n
\n {customerSinceLabel}\n {customerCreatedDate}\n
\n );\n\n const accountCredit = (\n <>\n {accountCreditLabel}\n {showCreditLimit && {availableCredit}}\n \n \n );\n\n const accountDetails = creditSectionIsExpanded ? (\n
\n <>\n
\n \n \n {creditDetailsSectionLabel}\n \n
\n \n
\n {availableCreditLabel}\n {availableCredit}\n
\n
\n {orderTotalLabel}\n {orderTotal}\n
\n
\n {creditExcessLabel}\n {excessCredit ?? '0'}\n
\n
\n ) : (\n undefined\n );\n\n const alert = (\n \n {errorMessage}\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n \n {removeCustomerAccountPaymentLabel}\n \n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n inputLabel,\n inputAmount,\n addPaymentButton,\n customerName,\n customerAccountNumber,\n customerSince,\n accountCredit,\n alert,\n accountDetails,\n appliedLine,\n bottomBorder\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutCustomerAccountPaymentResources } from '../checkout-customer-account-payment.props.autogenerated';\n\nexport interface IGetAccountPaymentSummaryViewFormInput {\n resources: ICheckoutCustomerAccountPaymentResources;\n amount: number;\n appliedAmount: string | undefined;\n}\n\nexport interface IAccountPaymentSummaryViewForm {\n formProps: INodeProps;\n label: React.ReactNode;\n paymentAmount: React.ReactNode;\n addPaymentButton: React.ReactNode;\n appliedLine: React.ReactNode;\n bottomBorder: React.ReactNode;\n alert?: React.ReactNode;\n paymentAmountInput?: React.ReactNode;\n}\n\nexport const getAccountPaymentFormSummaryMode = (options: IGetAccountPaymentSummaryViewFormInput): IAccountPaymentSummaryViewForm => {\n const { resources, amount, appliedAmount } = options;\n\n const { addPaymentButtonLabel, inputAmountSummaryLabel, appliedCustomerAccountPaymentLabel, inputAmountAriaLabel } = resources;\n\n const label = (\n \n );\n\n const formProps = {\n className: 'ms-checkout-customer-account__form-summary',\n tag: 'form' as NodeTag\n };\n\n const paymentAmount = ;\n\n const paymentAmountInput = (\n \n );\n\n const addPaymentButton = (\n \n );\n\n const appliedLine = appliedAmount ? (\n
\n {appliedCustomerAccountPaymentLabel}\n {appliedAmount}\n
\n ) : (\n undefined\n );\n\n const bottomBorder =
;\n\n return {\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder,\n paymentAmountInput\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport classname from 'classnames';\n\nimport { reaction } from 'mobx';\nimport { ICheckoutExpressPaymentContainerData } from './checkout-express-payment-container.data';\nimport {\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerHeadingData\n} from './checkout-express-payment-container.props.autogenerated';\nimport { WaitingComponent } from '../../common/waiting';\n\n/**\n * ICheckoutExpressPaymentContainerModuleProps interface.\n */\nexport interface ICheckoutExpressPaymentContainerModuleProps\n extends ICheckoutExpressPaymentContainerProps,\n IModuleStateProps {}\n\nexport interface ICheckoutExpressPaymentContainerViewProps\n extends ICheckoutExpressPaymentContainerProps<{}>,\n ICheckoutExpressPaymentContainerState {\n checkoutPlainContainerProps: IModuleProps;\n items: React.ReactNode[];\n isReady?: boolean;\n waiting?: React.ReactNode;\n title?: React.ReactNode;\n headerProps: INodeProps;\n}\n\n/**\n * Checkout Express Payment Container State.\n */\nexport interface ICheckoutExpressPaymentContainerState {\n isReady?: boolean;\n shouldHideExpressPaymentContainer?: boolean;\n}\n\n/**\n *\n * CheckoutExpressPaymentContainer component\n * @extends {React.PureComponent>}\n */\n@observer\nexport class CheckoutExpressPaymentContainer extends React.PureComponent<\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerState\n> {\n private readonly moduleClassName: string = 'ms-checkout-express-section-container';\n\n public constructor(props: ICheckoutExpressPaymentContainerModuleProps) {\n super(props);\n this.state = {\n isReady: false,\n shouldHideExpressPaymentContainer: this.props.data.checkout.result?.shippingAddressFromExpressCheckout ? true : false\n };\n }\n\n public componentDidMount(): void {\n reaction(\n () => this.props.data.checkout.result?.isExpressPaymentModulesReady,\n () => {\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n } else {\n let isReady = true;\n\n for (const item of items) {\n // @ts-ignore\n if (item.key.includes('checkout-express')) {\n // @ts-ignore\n const extensionPropertyKey = `is${item.props.config.paymentTenderType}ExpressModuleReady`;\n\n const isModuleReady =\n this.props.data.checkout.result?.isExpressPaymentModulesReady?.find(\n property => property.Key === extensionPropertyKey\n )?.Value?.BooleanValue ?? false;\n isReady = isReady && isModuleReady;\n }\n }\n this.setState({ isReady });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n isExpressCheckoutApplied => {\n this.setState({ shouldHideExpressPaymentContainer: isExpressCheckoutApplied });\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { checkoutExpressPaymentContainerHeading },\n resources: { checkoutExpressPaymentSectionLoadingMessage },\n data: { checkout }\n } = this.props;\n\n if (!checkout.result || checkout.result?.isExpressCheckoutApplied || checkout.result?.isPaymentVerificationRedirection) {\n this.props.context.telemetry.information('Other payment is applied, checkout express payment container module wont render');\n return null;\n }\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.ExpressPayment === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout express payment container module wont render');\n return null;\n }\n\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n return null;\n }\n\n const shouldHideExpressPaymentContainerClassName: string = this.state.shouldHideExpressPaymentContainer ? 'hide' : '';\n\n const moduleClassName = classname(\n 'ms-checkout-express-payment-container',\n this.props.config.className,\n shouldHideExpressPaymentContainerClassName\n );\n\n const viewProps: ICheckoutExpressPaymentContainerViewProps = {\n ...this.props,\n\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items,\n isReady: this.state.isReady,\n waiting: ,\n title: checkoutExpressPaymentContainerHeading && this._renderMsdyn365Text(checkoutExpressPaymentContainerHeading),\n headerProps: { className: 'ms-checkout-express-payment-container__head' }\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n /**\n * Renders heading.\n * @param checkoutExpressPaymentContainerHeading - The checkout express container heading.\n * @returns React node.\n */\n private _renderMsdyn365Text(checkoutExpressPaymentContainerHeading: ICheckoutExpressPaymentContainerHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n private _handleCheckoutExpressContainerHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutExpressPaymentContainerHeading!.text = event.target.value);\n}\n\nexport default CheckoutExpressPaymentContainer;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutExpressPaymentContainerViewProps } from './checkout-express-payment-container';\n\ninterface IContainerItemsComponent {\n isLoadingClassName: string;\n items: React.ReactNode[];\n}\n\nconst ContainerItemsComponent: React.FC = ({ isLoadingClassName, items }) => (\n
{items}
\n);\n\nconst CheckoutExpressPaymentContainerView: React.FC = ({\n checkoutPlainContainerProps,\n items,\n isReady,\n waiting,\n title,\n headerProps\n}) => {\n const isLoadingClassName: string = isReady ? 'showContainer' : 'notShowContainer';\n return (\n \n {title}\n {!isReady && waiting}\n \n \n );\n};\n\nexport default CheckoutExpressPaymentContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CheckoutModule, ErrorLocation, ICheckoutState } from '@msdyn365-commerce/global-state';\nimport { getEstimatedPickupTimeslotAvailabilitiesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport {\n CartLine,\n LineDeliverySpecification,\n OrgUnitLocation,\n PickupTimeslotAvailability,\n PickupTimeslotAvailabilitySearchCriteria,\n ProductDeliveryOptions,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getFallbackImageUrl,\n getSimpleProducts,\n ObjectExtensions,\n ProductInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { format, IModuleProps, isNullOrWhiteSpace, Waiting } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutPickupData } from './checkout-pickup.data';\nimport { ICheckoutPickupProps } from './checkout-pickup.props.autogenerated';\nimport {\n CheckoutPickupDateDropdown,\n CheckoutPickupError,\n CheckoutPickupTimeslotDropdown,\n getDate,\n getTimeslot,\n getUTCDateWithoutTime\n} from './components';\nimport {\n CheckoutPickupAddress,\n CheckoutPickupCartLines,\n CheckoutPickupGroupHeader,\n CheckoutPickupTimeslotInfo,\n DefaultImageSettings,\n ICheckoutPickupAddressProps,\n ICheckoutPickupCartLineInfo,\n ICheckoutPickupCartLinesProps,\n ICheckoutPickupGroup,\n ICheckoutPickupGroupHeaderProps,\n ICheckoutPickupGroupViewProps,\n ICheckoutPickupTimeslotInfoProps,\n PickupTimeslotAvailabilityState\n} from './components/checkout-pickup-group';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutPickupModuleProps extends ICheckoutPickupProps, IModuleStateProps {}\n\nexport interface ICheckoutPickupState {\n pickupGroups: ICheckoutPickupGroup[];\n}\n\nexport interface ICheckoutPickupViewState {\n isLoading: boolean;\n isHeaderError: boolean;\n isShowDropdown: boolean;\n isShowSelected: boolean;\n}\n\nexport interface ICheckoutPickupViewProps extends ICheckoutPickupProps<{}> {\n checkoutPickup: IModuleProps;\n viewState: ICheckoutPickupViewState;\n headerError: React.ReactNode;\n waiting: React.ReactNode;\n pickupGroups: ICheckoutPickupGroupViewProps[];\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutPickup component.\n * @extends {React.Component}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutPickup extends React.Component {\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isLoading: boolean = false;\n\n @observable private headerErrorMessage?: string;\n\n @computed get isDataReady(): boolean {\n return (\n (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS' &&\n (this.props.data.orgUnitLocations.result && this.props.data.orgUnitLocations.status) === 'SUCCESS'\n );\n }\n\n constructor(props: ICheckoutPickupModuleProps) {\n super(props);\n this.state = { pickupGroups: [] };\n\n this.setDateHandler = this.setDateHandler.bind(this);\n this.setTimeslotHandler = this.setTimeslotHandler.bind(this);\n }\n\n public componentDidMount(): void {\n when(\n () => this.isDataReady,\n async () => {\n await this.initPickupGroup();\n this.initModuleState();\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (checkoutError && checkoutError.errorLocation === ErrorLocation.CheckoutPickup && checkoutError.errorMessage) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutPickup) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutPickupModuleProps, nextState: ICheckoutPickupState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this.isDataReady || !this.canPickup()) {\n return null;\n }\n\n const { resources, config, context } = this.props;\n\n const {\n pickupDateLabel,\n pickupTimeslotLabel,\n pickupDateDefaultText,\n pickupTimeslotDefaultText,\n itemsText,\n singleItemText,\n pickupDateTimeslotText,\n pickupTimeslotPlaceHolder,\n pickupLocationLabel\n } = resources;\n\n const { locale } = context.request;\n const { className, imageSettings, useHour12TimeFormat } = config;\n const defaultClassName = 'ms-checkout-pickup';\n const groupsViewProps: ICheckoutPickupGroupViewProps[] = [];\n\n this.state.pickupGroups.forEach((value, index) => {\n // Divider line for each pickup group\n const groupDivider: React.ReactNode = index !== 0 &&
;\n\n // Line images\n const cartlines: ICheckoutPickupCartLineInfo[] = value.cartLines\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId || '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: `${defaultClassName}__group-line-image`,\n altText: line.product?.Name,\n src: line.product?.PrimaryImageUrl || '',\n fallBackSrc: getFallbackImageUrl(\n line.product?.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n ),\n gridSettings: context.request.gridSettings!,\n imageSettings: imageSettings || DefaultImageSettings,\n loadFailureBehavior: 'empty'\n },\n quantity: line.cartLine.Quantity || 0\n }));\n\n // Heading for each group\n const numberOfCartLines = this._countItems(cartlines);\n const itemText = numberOfCartLines > 1 ? itemsText : singleItemText;\n const itemTitle = `(${format(itemText, numberOfCartLines)})`;\n const headerProps: ICheckoutPickupGroupHeaderProps = {\n moduleClassName: defaultClassName,\n storeInfo: `${value.pickupModeName}, ${value.storeName}`,\n items: itemTitle\n };\n const groupHeader: React.ReactNode = ;\n\n const lineImageProps: ICheckoutPickupCartLinesProps = {\n moduleClassName: defaultClassName,\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x))\n };\n const cartLineImages: React.ReactNode = ;\n\n // Selected pickup date and timeslot node\n const dateString = getDate(value.selectedDate, locale);\n const timeslotString = getTimeslot(\n pickupTimeslotPlaceHolder,\n value.selectedTimeslot?.StartDateTime,\n value.selectedTimeslot?.EndDateTime,\n locale,\n useHour12TimeFormat\n );\n const timeslotInfoProps: ICheckoutPickupTimeslotInfoProps = {\n moduleClassName: defaultClassName,\n title: pickupDateTimeslotText,\n content: `${dateString} ${timeslotString}`\n };\n const selectedDateTimeslotNode: React.ReactNode = ;\n\n // Pickup address\n const addressProps: ICheckoutPickupAddressProps = {\n moduleClassName: defaultClassName,\n title: pickupLocationLabel,\n address: value.pickupAddress\n };\n const pickupAddress: React.ReactNode = ;\n\n // Pickup date and timeslot dropdown list\n const dropdownClassName = `${defaultClassName}__group-datetime-dropdown`;\n const labelClassName = `${dropdownClassName}-label`;\n const dropdownSelectClassName = `${dropdownClassName}-select`;\n const dateDropdownNode: React.ReactNode = (\n \n );\n\n const timeslotDropdownNode: React.ReactNode = (\n \n );\n\n const viewProp: ICheckoutPickupGroupViewProps = {\n moduleProps: { ...this.props },\n pickupGroupContainer: { className: `${defaultClassName}__group` },\n dateTimeslotContainer: { className: `${defaultClassName}__group-datetime` },\n pickupStoreId: value.pickupStoreId,\n pickupModeName: value.pickupModeName,\n deliveryMode: value.deliveryMode,\n groupDivider,\n groupHeader,\n groupErrorMessage: ,\n cartLineImages,\n pickupDateDropdown: dateDropdownNode,\n pickupTimeslotDropdown: timeslotDropdownNode,\n selectedDateTimeslot: selectedDateTimeslotNode,\n pickupAddress\n };\n\n groupsViewProps.push(viewProp);\n });\n\n const {\n moduleState: { isReady, hasError }\n } = this.props;\n const isHeaderError = !this.isLoading && this.headerErrorMessage !== undefined;\n const isShowDropdown = !this.isLoading && !isReady;\n const isShowSelected = !this.isLoading && !hasError && isReady;\n\n const viewProps: ICheckoutPickupViewProps = {\n ...this.props,\n checkoutPickup: {\n moduleProps: this.props,\n className: classname(defaultClassName, className)\n },\n viewState: {\n isLoading: this.isLoading,\n isHeaderError,\n isShowSelected,\n isShowDropdown\n },\n headerError: ,\n waiting: ,\n pickupGroups: groupsViewProps,\n checkoutErrorRef: this.checkoutErrorRef\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n @action\n public async setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): Promise {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n newGroup.selectedDate = pickupDate;\n newGroup.selectedTimeslot = undefined; // Clear the selected timeslot in any case\n newGroup.timeslotErrorMessage = undefined; // Clear the timeslot error message if any\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = undefined;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = undefined;\n }\n });\n\n if (pickupDate) {\n // Date is set\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: pickupDate,\n EndDate: pickupDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n const timeslotResults: PickupTimeslotAvailability[] = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n newGroup.dateErrorMessage =\n newGroup.availableTimeslots.length === 0 ? this.props.resources.noAvailableTimeslotError : undefined;\n } else {\n // Date is not set\n newGroup.availableTimeslots = [];\n newGroup.dateErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n public setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void {\n const oldGroup = this.state.pickupGroups.find(\n group => group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode\n );\n if (!oldGroup) {\n return;\n }\n\n const newGroup: ICheckoutPickupGroup = { ...oldGroup };\n\n newGroup.selectedTimeslot = pickupTimeslot;\n newGroup.lineDeliverySpecs.forEach((lineSpec: LineDeliverySpecification) => {\n if (lineSpec.DeliverySpecification) {\n lineSpec.DeliverySpecification.PickupTimeslotStartDateTime = pickupTimeslot?.StartDateTime;\n lineSpec.DeliverySpecification.PickupTimeslotEndDateTime = pickupTimeslot?.EndDateTime;\n }\n });\n\n if (pickupTimeslot) {\n newGroup.timeslotErrorMessage = undefined;\n }\n\n const groups = this.state.pickupGroups.map(group => {\n if (group.pickupStoreId === pickupStoreId && group.deliveryMode === deliveryMode) {\n return newGroup;\n }\n return group;\n });\n\n this.setState({ pickupGroups: groups });\n }\n\n @action\n private readonly initModuleState = (): void => {\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onSubmit: this.onSubmit,\n status: this.canPickup() ? (this.isPickupTimeSlotSet() ? 'ready' : 'updating') : 'disabled'\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly onReady = (): void => {\n this.props.moduleState.onReady();\n };\n\n private readonly onPending = (): void => {\n this.props.moduleState.onPending();\n };\n\n private readonly onSubmit = async (): Promise => {\n await this.updateCartLinePickupDateTimeslot();\n };\n\n private readonly setError = (errorMessage: string, isHeaderError: boolean = true): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n if (isHeaderError) {\n this.headerErrorMessage = errorMessage;\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.headerErrorMessage = undefined;\n };\n\n @action\n private readonly initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this.getCartLinesforPickup();\n let products: SimpleProduct[] = [];\n try {\n products = await this.getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n const pickupGroups: ICheckoutPickupGroup[] = [];\n const locations: OrgUnitLocation[] = this.props.data.orgUnitLocations.result || [];\n this.isLoading = true;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState, deliveryOptions } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n for (const line of pickupCartLines) {\n const group: ICheckoutPickupGroup | undefined = pickupGroups.find(\n x => x.pickupStoreId === line.FulfillmentStoreId && x.deliveryMode === line.DeliveryMode\n );\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n const lineDeliverySpecification: LineDeliverySpecification = {\n LineId: line.LineId,\n DeliverySpecification: {\n DeliveryModeId: line.DeliveryMode,\n DeliveryPreferenceTypeValue: 2,\n PickUpStoreId: line.FulfillmentStoreId,\n PickupTimeslotStartDateTime: line.PickupTimeslotStartDateTime,\n PickupTimeslotEndDateTime: line.PickupTimeslotEndDateTime,\n DeliveryAddress: line.ShippingAddress\n }\n };\n if (group) {\n group.lineDeliverySpecs.push(lineDeliverySpecification);\n group.cartLines.push({ cartLine: line, product });\n } else {\n // Group not exists yet\n const location: OrgUnitLocation | undefined = locations.find(x => x.OrgUnitNumber === line.FulfillmentStoreId);\n const storeName: string = this.getStoreName(location, line);\n const selectedDate: Date | undefined =\n line.PickupTimeslotStartDateTime && getUTCDateWithoutTime(line.PickupTimeslotStartDateTime);\n const selectedTimeslot =\n line.PickupTimeslotStartDateTime && line.PickupTimeslotEndDateTime\n ? { StartDateTime: line.PickupTimeslotStartDateTime, EndDateTime: line.PickupTimeslotEndDateTime }\n : undefined;\n const newGroup: ICheckoutPickupGroup = {\n pickupModeName: retailMultiplePickUpOptionEnabled\n ? this.getPickupModeDescription(\n this.props.resources.generalPickupText,\n line.DeliveryMode,\n deliveryOptions?.result,\n product\n )\n : this.props.resources.generalPickupText,\n pickupStoreId: line.FulfillmentStoreId || '',\n deliveryMode: line.DeliveryMode || '',\n storeName,\n pickupAddress: line.ShippingAddress,\n availabilityState: PickupTimeslotAvailabilityState.None,\n lineDeliverySpecs: [lineDeliverySpecification],\n cartLines: [{ cartLine: line, product }],\n availableDates: [],\n availableTimeslots: [],\n selectedDate,\n selectedTimeslot\n };\n\n let dailyGroupingResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n SearchOptionValue: 1 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.DailyGroupingTimeslotOnly\n };\n dailyGroupingResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availabilityState = this.getPickupTimeslotAvailabilityState(dailyGroupingResults);\n if (newGroup.availabilityState === PickupTimeslotAvailabilityState.NotAvailable) {\n newGroup.groupErrorMessage = this.props.resources.noAvailableDateError;\n this.setError(newGroup.groupErrorMessage, false);\n }\n dailyGroupingResults.forEach(value => {\n if (value.StartDateTime && (value.AvailableCapacity || 0) > 0) {\n newGroup.availableDates.push(getUTCDateWithoutTime(value.StartDateTime));\n }\n });\n\n if (selectedDate) {\n let timeslotResults: PickupTimeslotAvailability[] = [];\n try {\n const searchCriteria: PickupTimeslotAvailabilitySearchCriteria = {\n DeliveryModeCode: newGroup.deliveryMode,\n StoreId: newGroup.pickupStoreId,\n StartDate: selectedDate,\n EndDate: selectedDate,\n SearchOptionValue: 2 // Test runtime does not recognize PickupTimeslotAvailabilitySearchOption.All\n };\n timeslotResults = await getEstimatedPickupTimeslotAvailabilitiesAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {}, bypassCache: 'get' },\n searchCriteria\n );\n } catch (error) {\n this.props.telemetry.error(error);\n }\n newGroup.availableTimeslots = timeslotResults.filter(value => (value.AvailableCapacity || 0) > 0);\n }\n pickupGroups.push(newGroup);\n }\n }\n\n const filteredPickupGroups = pickupGroups.filter(\n group =>\n group.availabilityState === PickupTimeslotAvailabilityState.Available ||\n group.availabilityState === PickupTimeslotAvailabilityState.NotAvailable\n );\n\n if (!ArrayExtensions.hasElements(filteredPickupGroups)) {\n this.props.context.telemetry.error('Data is not ready or pickup group is empty, module wont render.');\n }\n this.isLoading = false;\n this.setState({ pickupGroups: filteredPickupGroups });\n };\n\n @action\n private readonly updateCartLinePickupDateTimeslot = async (): Promise => {\n if (!this.validateTimeslot()) {\n return;\n }\n const { resources } = this.props;\n let lineSpecs: LineDeliverySpecification[] = [];\n\n this.state.pickupGroups.forEach(group => {\n lineSpecs = lineSpecs.concat(group.lineDeliverySpecs);\n });\n\n this.clearError();\n this.onPending();\n\n try {\n const checkoutState = this.props.data.checkout.result as ICheckoutState;\n const response = await checkoutState.checkoutCart.updateCartLinePickupDateTimeslot({ lineDeliverySpecifications: lineSpecs });\n\n if (response.status === 'FAILED') {\n this.setError(resources.genericErrorMessage);\n } else {\n this.onReady();\n this.props.moduleState.setIsCancellable(true);\n }\n } catch {\n this.setError(resources.genericErrorMessage);\n }\n };\n\n private readonly getProductsByCartLines = async (channelId: number, cartLines: CartLine[]): Promise => {\n const actionContext = this.props.context.actionContext;\n const productInputs = cartLines\n .filter(line => !ObjectExtensions.isNullOrUndefined(line.ProductId))\n .map(\n line =>\n new ProductInput(\n line.ProductId || 0,\n actionContext.requestContext.apiSettings,\n channelId,\n undefined,\n actionContext.requestContext\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n private readonly validateTimeslot = (): boolean => {\n let validationResult = true;\n this.state.pickupGroups.forEach(group => {\n switch (group.availabilityState) {\n case PickupTimeslotAvailabilityState.NotAvailable:\n // Need customer to select another store in this case\n validationResult = false;\n break;\n case PickupTimeslotAvailabilityState.Available:\n if (!group.selectedDate || !group.selectedTimeslot) {\n if (!group.selectedDate) {\n group.dateErrorMessage = this.props.resources.pickupDateRequired;\n }\n if (!group.selectedTimeslot) {\n group.timeslotErrorMessage = this.props.resources.pickupTimeslotRequired;\n }\n this.setError(this.props.resources.pickupDateTimeslotRequired, false);\n validationResult = false;\n } else {\n group.dateErrorMessage = undefined;\n group.timeslotErrorMessage = undefined;\n }\n break;\n\n // We consider timeslot not defined as fallback case\n case PickupTimeslotAvailabilityState.NotDefined:\n default:\n }\n });\n\n return validationResult;\n };\n\n private readonly getStoreName = (orgUnitLocation: OrgUnitLocation | undefined, cartLine: CartLine): string => {\n return orgUnitLocation?.OrgUnitName || cartLine.ShippingAddress?.Name || cartLine.FulfillmentStoreId || '';\n };\n\n private readonly canPickup = (): boolean => {\n return ArrayExtensions.hasElements(this.state.pickupGroups);\n };\n\n private readonly isPickupTimeSlotSet = (): boolean => {\n return (\n ArrayExtensions.hasElements(this.state.pickupGroups) &&\n this.state.pickupGroups.every(\n group =>\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.StartDateTime) &&\n !ObjectExtensions.isNullOrUndefined(group.selectedTimeslot?.EndDateTime)\n )\n );\n };\n\n private readonly getCartLinesforPickup = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this.isPickupLine(line)) || [];\n };\n\n private readonly isPickupMode = (deliveryMode: string | undefined): boolean => {\n const pickupDeliveryModeCode = this.props.context.request.channel?.PickupDeliveryModeCode;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props?.data;\n const retailMultiplePickUpOptionEnabled = featureState?.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n if (retailMultiplePickUpOptionEnabled && deliveryMode !== undefined) {\n const pickupDeliveryMode = channelDeliveryOptionConfig?.result?.PickupDeliveryModeCodes?.includes(deliveryMode);\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode === pickupDeliveryModeCode;\n };\n\n private readonly isPickupLine = (line: CartLine): boolean => {\n return (\n this.isPickupMode(line.DeliveryMode) && line.FulfillmentStoreId !== undefined && !isNullOrWhiteSpace(line.FulfillmentStoreId)\n );\n };\n\n private readonly getPickupModeDescription = (\n resourceString: string,\n deliveryMode?: string,\n deliveryOptions?: ProductDeliveryOptions[],\n product?: SimpleProduct\n ): string => {\n let deliveryOption: string = resourceString;\n if (ArrayExtensions.hasElements(deliveryOptions) && product !== undefined) {\n let foundProductDeliveryOption;\n foundProductDeliveryOption = deliveryOptions?.find(deliveryO => {\n return deliveryO && deliveryO.ProductId === product.RecordId;\n });\n const deliveryDesc = foundProductDeliveryOption?.DeliveryOptions\n ? foundProductDeliveryOption?.DeliveryOptions?.find(option => option.Code === deliveryMode)?.Description\n : resourceString;\n if (deliveryDesc !== undefined) {\n deliveryOption = deliveryDesc;\n }\n }\n return deliveryOption;\n };\n\n private readonly getPickupTimeslotAvailabilityState = (dailyResult: PickupTimeslotAvailability[]) => {\n let state: PickupTimeslotAvailabilityState = PickupTimeslotAvailabilityState.None;\n if (!ArrayExtensions.hasElements(dailyResult)) {\n state = PickupTimeslotAvailabilityState.NotDefined;\n } else if (dailyResult.every(date => (date.AvailableCapacity || 0) <= 0)) {\n state = PickupTimeslotAvailabilityState.NotAvailable;\n } else {\n state = PickupTimeslotAvailabilityState.Available;\n }\n return state;\n };\n\n /**\n * Returns count of products.\n * @param cartLine - The checkout pickup cart line info props.\n * @returns Number of products.\n */\n private readonly _countItems = (cartlines: ICheckoutPickupCartLineInfo[]): number => {\n return cartlines.reduce((count, line) => {\n return count + (line.quantity || 0);\n }, 0);\n };\n}\n\nexport default CheckoutPickup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutPickupGroupViewProps, ICheckoutPickupViewProps } from './index';\n\nconst CheckoutPickupView: React.FC = props => {\n const { checkoutPickup, checkoutErrorRef, viewState, headerError, waiting, pickupGroups } = props;\n\n return (\n \n {viewState.isLoading && waiting}\n {viewState.isHeaderError && headerError}\n {pickupGroups.map(\n (pickupGroupViewProps: ICheckoutPickupGroupViewProps, index: number): React.ReactElement => {\n const {\n pickupGroupContainer,\n dateTimeslotContainer,\n groupDivider,\n groupHeader,\n groupErrorMessage,\n cartLineImages,\n pickupDateDropdown,\n pickupTimeslotDropdown,\n selectedDateTimeslot,\n pickupAddress\n } = pickupGroupViewProps;\n\n return (\n \n {groupDivider}\n {groupHeader}\n {groupErrorMessage}\n {cartLineImages}\n {viewState.isShowDropdown && (\n \n {pickupDateDropdown}\n {pickupTimeslotDropdown}\n \n )}\n {viewState.isShowSelected && pickupAddress}\n {viewState.isShowSelected && selectedDateTimeslot}\n \n );\n }\n )}\n \n );\n};\n\nexport default CheckoutPickupView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageProps, IImageSettings, Image, IModule } from '@msdyn365-commerce/core';\nimport {\n Address,\n CartLine,\n LineDeliverySpecification,\n PickupTimeslotAvailability,\n SimpleProduct\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ICheckoutPickupGroupKey {\n pickupStoreId: string;\n deliveryMode: string;\n}\n\nexport interface ICheckoutPickupGroup extends ICheckoutPickupGroupKey {\n pickupModeName: string;\n storeName: string;\n pickupAddress?: Address;\n availabilityState: PickupTimeslotAvailabilityState;\n groupErrorMessage?: string;\n dateErrorMessage?: string;\n timeslotErrorMessage?: string;\n lineDeliverySpecs: LineDeliverySpecification[];\n cartLines: ICartLineWithProduct[];\n\n availableDates: Date[];\n availableTimeslots: PickupTimeslotAvailability[];\n\n selectedDate?: Date;\n selectedTimeslot?: PickupTimeslotAvailability;\n}\n\nexport enum PickupTimeslotAvailabilityState {\n None,\n Available,\n NotDefined,\n NotAvailable // All slots occupied\n}\n\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\nexport interface ICheckoutPickupGroupViewProps {\n moduleProps: IModule;\n\n pickupGroupContainer: INodeProps;\n dateTimeslotContainer: INodeProps;\n\n pickupStoreId: string;\n pickupModeName: string;\n deliveryMode: string;\n\n groupDivider: React.ReactNode;\n groupHeader: React.ReactNode;\n groupErrorMessage: React.ReactNode;\n cartLineImages: React.ReactNode;\n pickupDateDropdown: React.ReactNode;\n pickupTimeslotDropdown: React.ReactNode;\n\n selectedDateTimeslot: React.ReactNode;\n pickupAddress: React.ReactNode;\n}\n\nexport interface ICheckoutPickupErrorProps {\n errorMessage?: string;\n}\n\nexport const CheckoutPickupError: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \n \n );\n};\n\nexport interface ICheckoutPickupGroupHeaderProps {\n moduleClassName: string;\n storeInfo: string;\n items: string;\n}\n\nexport const CheckoutPickupGroupHeader: React.FC = ({ moduleClassName, storeInfo, items }) => {\n return (\n
\n
{storeInfo}
\n
{items}
\n
\n );\n};\n\nexport interface ICheckoutPickupTimeslotInfoProps {\n moduleClassName: string;\n title: string;\n content: string;\n}\n\nexport const CheckoutPickupTimeslotInfo: React.FC = ({ moduleClassName, title, content }) => {\n return (\n
\n
{title}
\n
{content}
\n
\n );\n};\n\nexport interface ICheckoutPickupAddressProps {\n moduleClassName: string;\n title: string;\n address?: Address;\n}\n\nexport const CheckoutPickupAddress: React.FC = ({ moduleClassName, title, address }) => {\n if (!address) {\n return null;\n }\n\n return (\n
\n
{title}
\n {address.Name && {address.Name}}\n <>\n {address.Street && {address.Street}}\n {address.City && {address.City}}\n {address.State && {`, ${address.State}`}}\n {address.County && {`, ${address.County}`}}\n {address.ZipCode && {` ${address.ZipCode}`}}\n {address.ThreeLetterISORegionName && (\n \n {` ${address.ThreeLetterISORegionName}`}\n \n )}\n \n
\n );\n};\n\nexport interface ICheckoutPickupCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\nexport interface ICheckoutPickupCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutPickupCartLineInfo[];\n}\n\nexport const CheckoutPickupCartLines: React.FC = ({ moduleClassName, cartLines }) => {\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n return (\n
\n {cartLines.map(prop => {\n const showQty = prop.quantity > 1;\n let className = `${moduleClassName}__group-product-image`;\n if (showQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {showQty &&
{prop.quantity}
}\n
\n );\n })}\n
\n );\n};\n\nexport const DefaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=108&h=108&q=80&m=6&f=jpg\"', w: 108, h: 108 },\n lg: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n xl: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 }\n },\n lazyload: true,\n quality: 80\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format } from '@msdyn365-commerce-modules/utilities';\n\nexport function getDate(date: Date | undefined, locale: string): string {\n if (!date) {\n return '';\n }\n const options: Intl.DateTimeFormatOptions = {\n timeZone: 'UTC'\n };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return formatter.format(new Date(date));\n}\n\nexport const getTimeslot = (\n placeHolder: string,\n startDate: Date | undefined,\n endDate: Date | undefined,\n locale: string,\n useHour12TimeFormat?: boolean\n): string => {\n if (!startDate || !endDate) {\n return '';\n }\n let options: Intl.DateTimeFormatOptions = { hour: 'numeric', minute: 'numeric' };\n options = useHour12TimeFormat\n ? { hour: 'numeric', minute: 'numeric', timeZone: 'UTC' }\n : { hour: 'numeric', minute: 'numeric', timeZone: 'UTC', hour12: true };\n const formatter = new Intl.DateTimeFormat(locale, options);\n return format(placeHolder, formatter.format(new Date(startDate)), formatter.format(new Date(endDate)));\n};\n\nexport const getUTCDateWithoutTime = (input: Date): Date => {\n const date: Date = new Date(input);\n return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), 0, 0, 0));\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getDate } from './checkout-pickup-utility';\n\nexport interface IPickupDropdownProps {\n pickupStoreId: string;\n deliveryMode: string;\n\n className: string;\n labelClassname?: string;\n labelText: string;\n defaultText: string;\n errorMessage?: string;\n\n locale: string;\n\n // Props for the LabeledDropdown component\n dropdownId: string;\n controlledByParent: boolean;\n toggleColor?: string;\n dropdownClassname?: string;\n}\n\nexport interface IPickupDateDropdownProps extends IPickupDropdownProps {\n availableDates: Date[];\n selectedDate?: Date;\n setDateHandler(pickupStoreId: string, deliveryMode: string, pickupDate: Date | undefined): void;\n}\n\n/**\n *\n * CheckoutPickupDateDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupDateDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getDateMap(): Map {\n const map = new Map();\n this.props.availableDates.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupDateDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateDateSelection = this.updateDateSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableDates,\n selectedDate,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapDatesToOptions(availableDates, selectedDate);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateDateSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setDateHandler } = this.props;\n const date: Date | undefined = this.getDate(notification);\n setDateHandler(pickupStoreId, deliveryMode, date);\n };\n\n private readonly getDate = (notification: ILabeledDropdownOnChangeNotification): Date | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getDateMap.has(key)) {\n return undefined;\n }\n return this.getDateMap.get(key);\n };\n\n private readonly mapDatesToOptions = (\n dates: Date[],\n selectedDate: Date | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { locale } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = dates.map((value: Date, index: number) => {\n return {\n key: index.toString(),\n value: getDate(value, locale)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = dates.findIndex((value: Date) => selectedDate !== undefined && selectedDate.getTime() === value.getTime());\n if (index >= 0 && selectedDate) {\n selectedOption = {\n key: index.toString(),\n value: getDate(selectedDate, locale)\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PickupTimeslotAvailability } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { LabeledDropdown } from '@msdyn365-commerce-modules/utilities';\nimport {\n ILabeledDropdownOnChangeNotification,\n ILabeledDropdownOption\n} from '@msdyn365-commerce-modules/utilities/dist/types/labeled-dropdown/LabeledDropdown.props';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { IPickupDropdownProps } from './checkout-pickup-date-dropdown';\nimport { CheckoutPickupError } from './checkout-pickup-group';\nimport { getTimeslot } from './checkout-pickup-utility';\n\nexport interface IPickupTimeslotDropdownProps extends IPickupDropdownProps {\n availableTimeslots: PickupTimeslotAvailability[];\n selectedTimeslot?: PickupTimeslotAvailability;\n timeslotPlaceHolder: string;\n setTimeslotHandler(pickupStoreId: string, deliveryMode: string, pickupTimeslot: PickupTimeslotAvailability | undefined): void;\n useHour12TimeFormat?: boolean;\n}\n\n/**\n *\n * CheckoutPickupTimeslotDropdown component.\n * @extends {React.Component}\n */\nexport class CheckoutPickupTimeslotDropdown extends React.PureComponent {\n private readonly defaultKey: number = -1;\n\n private readonly defaultOption: ILabeledDropdownOption;\n\n // As the LabeledDropdown control only offers key and value, we need to map the key with date and timeslot data\n @computed get getTimeslotMap(): Map {\n const map = new Map();\n this.props.availableTimeslots.forEach((value, index) => {\n map.set(index.toString(), value);\n });\n return map;\n }\n\n constructor(props: IPickupTimeslotDropdownProps) {\n super(props);\n this.defaultOption = { key: this.defaultKey.toString(), value: props.defaultText };\n this.updateTimeslotSelection = this.updateTimeslotSelection.bind(this);\n }\n\n public render(): JSX.Element | null {\n const {\n className,\n labelClassname,\n labelText,\n errorMessage,\n dropdownId,\n availableTimeslots,\n selectedTimeslot,\n controlledByParent,\n toggleColor,\n dropdownClassname\n } = this.props;\n\n const { dropdownOptions, selectedOption } = this.mapTimeslotsToOptions(availableTimeslots, selectedTimeslot);\n\n return (\n
\n \n \n \n
\n );\n }\n\n private readonly updateTimeslotSelection = (notification: ILabeledDropdownOnChangeNotification): void => {\n const { pickupStoreId, deliveryMode, setTimeslotHandler } = this.props;\n const timeslot: PickupTimeslotAvailability | undefined = this.getTimeslot(notification);\n setTimeslotHandler(pickupStoreId, deliveryMode, timeslot);\n };\n\n private readonly getTimeslot = (notification: ILabeledDropdownOnChangeNotification): PickupTimeslotAvailability | undefined => {\n const key: string = notification.selectedOption.key;\n if (key === this.defaultKey.toString() || !this.getTimeslotMap.has(key)) {\n return undefined;\n }\n return this.getTimeslotMap.get(key);\n };\n\n private readonly mapTimeslotsToOptions = (\n timeslots: PickupTimeslotAvailability[],\n selectedTimeslot: PickupTimeslotAvailability | undefined\n ): { dropdownOptions: ILabeledDropdownOption[]; selectedOption: ILabeledDropdownOption | undefined } => {\n const { timeslotPlaceHolder, locale, useHour12TimeFormat } = this.props;\n let options: ILabeledDropdownOption[] = [];\n let selectedOption: ILabeledDropdownOption = this.defaultOption;\n\n options = timeslots.map((value: PickupTimeslotAvailability, index: number) => {\n return {\n key: index.toString(),\n value: getTimeslot(timeslotPlaceHolder, value.StartDateTime, value.EndDateTime, locale, useHour12TimeFormat)\n };\n });\n options.unshift(this.defaultOption);\n\n const index: number = timeslots.findIndex(\n value =>\n selectedTimeslot !== undefined &&\n selectedTimeslot.StartDateTime?.getTime() === value.StartDateTime?.getTime() &&\n selectedTimeslot.EndDateTime?.getTime() === value.EndDateTime?.getTime()\n );\n if (index >= 0 && selectedTimeslot) {\n selectedOption = {\n key: index.toString(),\n value: getTimeslot(\n timeslotPlaceHolder,\n selectedTimeslot.StartDateTime,\n selectedTimeslot.EndDateTime,\n locale,\n useHour12TimeFormat\n )\n };\n }\n\n return {\n dropdownOptions: options,\n selectedOption\n };\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutSectionContainerData } from './checkout-section-container.data';\nimport { ICheckoutSectionContainerProps } from './checkout-section-container.props.autogenerated';\nimport LoadingComponent from './components/loading';\n\n/**\n * ICheckoutSectionContainerModuleProps interface.\n */\nexport interface ICheckoutSectionContainerModuleProps\n extends ICheckoutSectionContainerProps,\n IModuleStateProps {\n enableControl: boolean;\n}\n\ninterface ICheckoutSectionContainerState {\n isCollapse?: boolean;\n}\n\nexport interface ICheckoutSectionContainerItem {\n id: string;\n loading?: React.ReactNode;\n itemProps: INodeProps;\n item: React.ReactNode;\n}\n\nexport interface ICheckoutSectionContainerViewProps extends ICheckoutSectionContainerProps<{}> {\n className: string;\n checkoutPlainContainerProps: IModuleProps;\n items: ICheckoutSectionContainerItem[];\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst zeroAmount = 0;\n\n/**\n *\n * CheckoutPlainContainer component.\n * @extends {React.Component>}\n */\n@observer\nexport class CheckoutPlainContainer extends React.Component {\n @computed public get amountDue(): number {\n const {\n data: { checkout }\n } = this.props;\n if (!checkout?.result) {\n return 0;\n }\n\n const checkoutResult = checkout.result;\n const cart = checkoutResult.checkoutCart?.cart;\n if (!cart || !cart.CartLines || !ArrayExtensions.hasElements(cart.CartLines)) {\n return 0;\n }\n\n return cart.TotalAmount ?? zeroAmount;\n }\n\n public constructor(props: ICheckoutSectionContainerModuleProps) {\n super(props);\n this.state = { isCollapse: false };\n }\n\n public componentDidMount(): void {\n const items = this.getItems();\n const childIds = items.map((item: React.ReactNode) => get(item, 'props.id'));\n const shouldEnableSinglePaymentAuthorizationCheckout: boolean =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onCancel,\n onSubmit: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onSubmit,\n childIds\n });\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n reaction(\n () => this.props.moduleState.shouldSubmitContainer,\n () => {\n this.onSubmit();\n }\n );\n\n // Reaction to collapse the payment section for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.shouldCollapsePaymentSection,\n shouldCollapsePaymentSection => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.setState({ isCollapse: shouldCollapsePaymentSection });\n }\n }\n );\n\n // Reaction to submit section container for new checkout flow\n reaction(\n () => this.props.data.checkout.result?.shouldTriggerPaymentWithPlaceOrder,\n () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.onSubmit();\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerReady for new checkout flow.\n reaction(\n () => this.props.moduleState.isReady,\n async isReady => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer && this.amountDue > zeroAmount) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: isReady\n });\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerHasError for new checkout flow.\n reaction(\n () => this.props.moduleState.hasError,\n async hasError => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerHasError({\n newIsPaymentSectionContainerHasError: hasError\n });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isCheckoutCallFailed,\n async () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer && this.props.data.checkout.result?.isCheckoutCallFailed) {\n this.onEdit();\n await this.props.data.checkout.result.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (!this.props.moduleState.hasExternalSubmitGroup) {\n return;\n }\n\n /**\n * Review all modules to updating status if one of the modules has error.\n */\n const { childIds, hasError, getModule } = this.props.moduleState;\n const hasReadyOrSkippedItems = childIds.some((childId: string) => {\n const state = getModule(childId);\n return !!state && (state.isReady || state.isSkipped);\n });\n if (hasReadyOrSkippedItems && hasError) {\n this.onEdit();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutSectionContainerModuleProps, nextState: ICheckoutSectionContainerState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n enableControl,\n moduleState,\n config: { width }\n } = this.props;\n\n const items = this.getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout section content is empty, module wont render');\n return null;\n }\n\n const moduleClassName = classname(\n 'ms-checkout-section-container',\n {\n 'has-initialized': moduleState.hasInitialized,\n 'is-ready': moduleState.isReady,\n 'is-updating': !moduleState.isReady,\n container: width === 'container',\n 'col-12 fullwidth': width === 'fluid'\n },\n this.props.config.className\n );\n\n const viewProps: ICheckoutSectionContainerViewProps = {\n ...this.props,\n\n className: moduleClassName,\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items.map((item: React.ReactNode) => {\n const childId = get(item, 'props.id');\n const state = moduleState.getModule(childId);\n\n // Modules has not completed initializing or it's disable\n const hidden =\n this.state.isCollapse || (state.hasModuleState && (!state.hasInitialized || state.isDisabled || state.isSkipped));\n return {\n id: childId,\n loading: state.hasModuleState && !state.hasInitialized && ,\n itemProps: {\n 'data-type-name': state.typeName,\n className: classname('ms-checkout-section-container__item', {\n hidden,\n initialized: state.hasInitialized,\n disabled: state.isDisabled,\n skipped: state.isSkipped,\n ready: state.isReady,\n updating: state.isUpdating,\n pending: state.isPending\n })\n },\n item: React.cloneElement(item as React.ReactElement, { enableControl })\n };\n })\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n private readonly clearError = (): void => {\n // Clear error before action, otherwise it will rise conflict;\n this.getActiveChildModuleStates().forEach(state => {\n state.hasError && state.setHasError(false);\n });\n };\n\n private readonly onSubmit = (): void => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n this.props.telemetry.information('Section container onSubmit is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onSubmit && state.onSubmit();\n });\n\n // Handle when the amount due is zero\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isPaymentSectionContainer &&\n this.amountDue === zeroAmount\n ) {\n this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: true\n });\n }\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Section container onCancel is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onCancel && state.onCancel();\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Section container onEdit is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n (state.isReady || state.isSkipped) && state.onEdit && state.onEdit();\n });\n };\n\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Section container onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n}\n\nexport default withModuleState(CheckoutPlainContainer);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckoutSectionContainerItem, ICheckoutSectionContainerViewProps } from './checkout-section-container';\n\nconst ItemComponent: React.FC = ({ loading, itemProps, item }) => (\n <>\n {loading}\n {item}\n \n);\n\nconst CheckoutSectionContainerView: React.FC = ({ checkoutPlainContainerProps, items }) => (\n \n {items.map(item => (\n \n ))}\n \n);\n\nexport default CheckoutSectionContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nconst Loading: React.FC = () =>
;\n\nexport default Loading;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { Button, getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport classname from 'classnames';\nimport { action, computed, observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutTermsAndConditionsData } from './checkout-terms-and-conditions.data';\nimport { ICheckoutTermsAndConditionsProps } from './checkout-terms-and-conditions.props.autogenerated';\nimport CheckboxComponent from './components/checkout-terms-and-conditions.check-box';\nimport ErrorMessageComponent from './components/checkout-terms-and-conditions.error-message';\nimport ErrorTitleComponent from './components/checkout-terms-and-conditions.error-title';\nimport { focusOnCheckoutError } from '../../checkout-errors';\n\nexport interface ICheckoutTermsAndConditionsModuleProps\n extends ICheckoutTermsAndConditionsProps,\n IModuleStateProps {}\n\nexport interface ICheckoutTermsAndConditions {\n termsAndConditionAcceptance: INodeProps;\n checkBox: React.ReactNode;\n description: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsError {\n error: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ICheckoutTermsAndConditionsViewState {\n isError: boolean;\n isShowSaveButton: boolean;\n isShowEditButton: boolean;\n isShowCancelButton: boolean;\n}\n\nexport interface ICheckoutTermsAndConditionsViewProps extends ICheckoutTermsAndConditionsProps<{}> {\n checkoutTermsAndConditions: IModuleProps;\n isTermsAccepted: boolean;\n errorMessageData: string;\n viewState: ICheckoutTermsAndConditionsViewState;\n termsAndConditionsContent: ICheckoutTermsAndConditions;\n errorMessage?: ICheckoutTermsAndConditionsError;\n saveButton?: React.ReactNode;\n editButton?: React.ReactNode;\n cancelButton?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n onChange(event: React.ChangeEvent): void;\n onSave(): void;\n onEdit(): void;\n onCancel(): void;\n}\n\n/**\n *\n * CheckoutTermsAndConditions component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutTermsAndConditions extends React.Component {\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n @observable private isTermsAccepted: boolean = true;\n\n @observable private errorMessage?: string;\n\n constructor(props: ICheckoutTermsAndConditionsModuleProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n @computed get isDataReady(): boolean {\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\n }\n\n @computed get isShowButtons(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && (showControlButtons || false);\n }\n\n @computed get isAutoSave(): boolean {\n const { showControlButtons } = this.props.config;\n return !this.props.moduleState.hasExternalSubmitGroup && !showControlButtons;\n }\n\n @computed get defaultTermsAndConditionAcceptedValue(): boolean {\n const { showCheckbox } = this.props.config;\n return !showCheckbox;\n }\n\n public async componentDidMount(): Promise {\n when(\n () => this.isDataReady,\n async () => {\n await this.init();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.isTermsAndConditionAccepted,\n async () => {\n this.isTermsAccepted =\n this.props.data.checkout.result?.isTermsAndConditionAccepted || this.defaultTermsAndConditionAcceptedValue;\n }\n );\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutTermsAndConditions &&\n checkoutError.errorMessage\n ) {\n this.setError(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutTermsAndConditions) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutTermsAndConditionsModuleProps,\n nextState: ICheckoutTermsAndConditionsViewState\n ): boolean {\n if (this.state === nextState && this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n moduleState: { isReady, hasError },\n config: { className }\n } = this.props;\n const isTermsAndConditionAccepted = this.props.data.checkout.result?.isTermsAndConditionAccepted;\n const isError = hasError;\n const isShowContent = !isReady;\n const isShowSelected = !hasError && isReady;\n\n const viewProps = {\n ...this.props,\n ...this.state,\n isTermsAccepted: this.isTermsAccepted,\n errorMessageData: this.errorMessage,\n checkoutErrorRef: this.checkoutErrorRef,\n viewState: {\n isError,\n isShowSaveButton: isShowContent && this.isShowButtons,\n isShowEditButton: isShowSelected && this.isShowButtons,\n isShowCancelButton: isShowContent && this.isShowButtons && isTermsAndConditionAccepted\n },\n checkoutTermsAndConditions: {\n moduleProps: this.props,\n className: classname('ms-checkout-terms-and-conditions', className)\n },\n termsAndConditionsContent: this.getTermsAndConditions(),\n errorMessage: this.getErrorMessage(),\n saveButton: this.getSaveButton(),\n editButton: this.getEditButton(),\n cancelButton: this.getCancelButton(),\n onSave: this.onSubmit,\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onChange: this.onChange\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleTextChange = (event: MsDyn365.ContentEditableEvent) => (this.props.config.description = event.target.value);\n\n private readonly getTermsAndConditions = (): ICheckoutTermsAndConditions => {\n const {\n moduleState: { isReady },\n config: { showCheckbox, description }\n } = this.props;\n const isDisabled = isReady && !this.isAutoSave;\n const isTermsAndConditionAccepted = this.isTermsAccepted;\n const { checkboxAriaLabel } = this.props.resources;\n return {\n termsAndConditionAcceptance: { className: 'ms-checkout-terms-and-conditions__container' },\n checkBox: showCheckbox && (\n \n ),\n description: (\n \n )\n };\n };\n\n @action\n private readonly init = async (): Promise => {\n const {\n data,\n config: { showCheckbox }\n } = this.props;\n\n const hasInvoiceLine = this.props.data.checkout.result?.checkoutCart.hasInvoiceLine;\n\n // If hasInvoiceLine is true, this is for b2b and isTermsAccepted should be true\n if (hasInvoiceLine || data.checkout.result?.isTermsAndConditionAccepted || !showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(true);\n this.isTermsAccepted = true;\n } else if (showCheckbox) {\n await this.updateTermsAndConditionsAcceptance(false);\n this.isTermsAccepted = false;\n }\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit,\n status: hasInvoiceLine ? 'disabled' : this.isTermsAccepted ? 'ready' : 'updating'\n });\n\n if (this.props.data.checkout.result?.isPaymentVerificationRedirection) {\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly getErrorMessage = (): ICheckoutTermsAndConditionsError => {\n const { errorMessageTitle } = this.props.resources;\n return {\n error: { tag: 'div', className: 'ms-checkout-terms-and-conditions__error', role: 'alert', 'aria-live': 'assertive' },\n title: ,\n message: \n };\n };\n\n private readonly getCancelButton = (): React.ReactNode => {\n const { cancelBtnLabel = 'Cancel', cancelBtnAriaLabel } = this.props.resources;\n return (\n \n {cancelBtnLabel}\n \n );\n };\n\n private readonly getSaveButton = (): React.ReactNode => {\n const { saveBtnLabel = 'Save', saveBtnAriaLabel } = this.props.resources;\n return (\n \n {saveBtnLabel}\n \n );\n };\n\n private readonly getEditButton = (): React.ReactNode => {\n const { editBtnLabel = 'Change', editBtnAriaLabel } = this.props.resources;\n return (\n \n {editBtnLabel}\n \n );\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Terms and conditions onEdit is called.');\n\n this.onUpdating();\n };\n\n private readonly onSubmit = async (): Promise => {\n this.props.telemetry.information('Terms and conditions onSubmit is called.');\n\n if (!this.isTermsAccepted) {\n if (this.isAutoSave) {\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n } else {\n this.setError(this.props.resources.errorMessage);\n this.props.moduleState.setHasError(true);\n }\n } else {\n this.clearError();\n await this.updateTermsAndConditionsAcceptance(this.isTermsAccepted);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly onUpdating = () => {\n this.props.moduleState.onUpdating();\n };\n\n private readonly setError = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.errorMessage = errorMessage;\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Terms and conditions onCancel is called.');\n\n // Reset to the saved value\n if (!this.props.data.checkout.result) {\n return;\n }\n\n const isTermsAccepted = this.props.data.checkout.result.isTermsAndConditionAccepted;\n if (!isTermsAccepted) {\n // It has no saved email, set to status updating and request user to fill the email form\n this.props.moduleState.onUpdating();\n } else {\n // It has saved email, set to status ready\n this.isTermsAccepted = true;\n this.props.moduleState.setHasError(false);\n this.props.moduleState.onReady();\n }\n };\n\n private readonly updateTermsAndConditionsAcceptance = async (isTermsAccepted: boolean): Promise => {\n if (this.props.data.checkout.result) {\n await this.props.data.checkout.result.updateTermsAndConditionsAcceptance({ newIsTermsAndConditionAccepted: isTermsAccepted });\n }\n };\n\n private readonly clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.errorMessage = undefined;\n };\n\n private readonly onChange = async (event: React.ChangeEvent) => {\n const checked = event.target.checked;\n this.isTermsAccepted = checked;\n\n if (this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout) {\n await this.props.data.checkout.result.updateIsTermsAndConditionsChecked({ newIsTermsAndConditionChecked: checked });\n }\n\n if (this.isAutoSave) {\n await this.onSubmit();\n }\n };\n}\n\nexport default CheckoutTermsAndConditions;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ICheckoutTermsAndConditions,\n ICheckoutTermsAndConditionsError,\n ICheckoutTermsAndConditionsViewProps\n} from './checkout-terms-and-conditions';\n\nconst TermsAndCondition: React.FC = ({ termsAndConditionAcceptance, checkBox, description }) => {\n return (\n \n {checkBox}\n {description}\n \n );\n};\n\nconst ErrorMessage: React.FC = ({ error, title, message }) => {\n return (\n \n {title}\n {message}\n \n );\n};\n\nconst CheckoutTermsAndConditionsView: React.FC = props => {\n const {\n checkoutTermsAndConditions,\n checkoutErrorRef,\n viewState,\n termsAndConditionsContent,\n errorMessage,\n saveButton,\n editButton,\n cancelButton\n } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isError && errorMessage && }\n \n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutTermsAndConditionsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsCheckboxProps {\n isChecked: boolean;\n ariaLabel?: string;\n disabled: boolean;\n id?: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.isChecked\n * @param root0.ariaLabel\n * @param root0.disabled\n * @param root0.telemetryContent\n * @param root0.onChange\n * @param root0.id\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsCheckbox: React.FC = ({\n isChecked,\n ariaLabel,\n disabled,\n telemetryContent,\n onChange,\n id\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n const attribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n <>\n \n \n );\n};\n\nexport default CheckoutTermsAndConditionsCheckbox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ICheckoutTermsAndConditionsErrorMessageProps {\n message?: string;\n}\n\n/**\n * AddPaymentForm SFC.\n * @param root0\n * @param root0.message\n * @extends {React.FC}\n */\nconst CheckoutTermsAndConditionsErrorMessage: React.FC = ({ message }) => {\n if (!message) {\n return null;\n }\n\n return

{message}

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

{title}

;\n};\n\nexport default CheckoutTermsAndConditionsErrorTitle;\n"],"names":["CheckoutCustomerAccountPayment","React","constructor","props","super","defaultLocale","baseClassName","checkoutErrorRef","getAvailableCredit","creditBalances","availableCredit","InvoiceAccountCreditLimit","CreditLimit","Balance","PendingBalance","InvoiceAccountBalance","InvoiceAccountPendingBalance","addPayment","async","checkoutState","this","data","checkout","result","setState","handleSaveAndContinue","_clearError","updateCustomerAccountAmount","newAmount","state","paymentAmount","context","telemetry","information","error","toggleCreditSection","isCreditSectionExpanded","init","moduleState","onCancel","handleCancelOrSubmit","onSubmit","onEdit","customerAccountAmount","onReady","onChangePaymentAmount","customizedAmt","amountVariable","updateMaxAmount","Math","max","toString","onUpdating","Msdyn365","request","checkoutCart","cart","TotalAmount","_setErrorMessage","resources","invalidAmountForOBOMessage","config","isCheckoutCustomerAccountPaymentRequired","customerAccountCreditErrorMessage","onSkip","removePayment","NaN","errorMessage","setHasError","locale","get","maxPaymentAmount","Intl","NumberFormat","format","isCustomerAccountPaymentEnabled","customerInfo","b2bChannel","isChannelTypeB2B","platform","AllowOnAccountPayment","enableCustomerAccountPayment","getLoyaltyAmount","loyaltyAmount","_this$props$data$cust","undefined","amountDue","_this$props$data$cred","customerInformation","MandatoryCreditLimit","min","invalidAmountExceedAmountDueMessage","invalidAmountNegativeMessage","currencyCode","orderTotal","formattedExcessCredit","excessCredit","cultureFormatter","formatCurrency","isDataReady","status","_this$props$data$chec","when","reaction","totalAmount","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec2","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec3","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","actionContext","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$cust2","_this$props$context$r","hasInvoiceLine","customerSinceDate","Date","CreatedDateTime","toLocaleDateString","hasError","_objectSpread","checkoutCustomerAccount","moduleProps","className","classnames","alert","ErrorComponent","Object","assign","title","errorMessageTitle","message","editView","getAccountPaymentFormEditMode","onAddPayment","amount","maxAmount","customer","customerCreatedDate","showCreditLimit","onToggleCreditSection","creditSectionIsExpanded","onRemovePayment","appliedAmount","skipOnChangeLogic","features","skipCheckoutOnChangeLogic","summaryView","getAccountPaymentFormSummaryMode","renderView","__decorate","computed","action","withModuleState","observer","onAddAccountPayment","event","preventDefault","onChangeAmountHandler","value","target","customState","customizedAmount","returnModifiedState","getLocaleBasedCustomizedPrice","keyCode","options","addPaymentButtonLabel","inputAmountLabel","inputAmountAriaLabel","customerSinceLabel","accountCreditLabel","creditDetailsSectionLabel","orderTotalLabel","availableCreditLabel","creditExcessLabel","appliedCustomerAccountPaymentLabel","removeCustomerAccountPaymentLabel","accountCreditDetails","inputLabel","id","formProps","tag","addPaymentButton","Button","onClick","disabled","Number","isNaN","inputAmount","type","onInput","_ref","currentTarget","onKeyDown","which","customerName","Name","customerAccountNumber","AccountNumber","customerSince","accountCredit","role","accountDetails","Alert","assertive","fade","includeAlertClass","isOpen","appliedLine","bottomBorder","inputAmountSummaryLabel","label","paymentAmountInput","CheckoutExpressPaymentContainer","moduleClassName","_getItems","slots","primary","length","_handleCheckoutExpressContainerHeadingChange","checkoutExpressPaymentContainerHeading","text","isReady","shouldHideExpressPaymentContainer","shippingAddressFromExpressCheckout","componentDidMount","isExpressPaymentModulesReady","items","item","key","includes","_this$props$data$chec4","extensionPropertyKey","paymentTenderType","isModuleReady","find","property","Key","Value","BooleanValue","_this$props$data$chec5","isExpressCheckoutApplied","_checkout$result","_checkout$result2","checkoutExpressPaymentSectionLoadingMessage","isPaymentVerificationRedirection","user","isOBORequest","EnabledPaymentsForOBO","ExpressPayment","shouldHideExpressPaymentContainerClassName","classname","viewProps","checkoutPlainContainerProps","waiting","WaitingComponent","_renderMsdyn365Text","headerProps","editProps","requestContext","ContainerItemsComponent","isLoadingClassName","_ref2","Module","Node","CheckoutPickup","_this","isLoading","initModuleState","canPickup","isPickupTimeSlotSet","onPending","updateCartLinePickupDateTimeslot","setError","isHeaderError","arguments","headerErrorMessage","clearError","initPickupGroup","_this$props","_featureState$result","pickupCartLines","getCartLinesforPickup","products","getProductsByCartLines","ChannelId","pickupGroups","locations","orgUnitLocations","featureState","deliveryOptions","retailMultiplePickUpOptionEnabled","feature","IsEnabled","line","group","x","pickupStoreId","FulfillmentStoreId","deliveryMode","DeliveryMode","product","RecordId","ProductId","lineDeliverySpecification","LineId","DeliverySpecification","DeliveryModeId","DeliveryPreferenceTypeValue","PickUpStoreId","PickupTimeslotStartDateTime","PickupTimeslotEndDateTime","DeliveryAddress","ShippingAddress","lineDeliverySpecs","push","cartLines","cartLine","location","OrgUnitNumber","storeName","getStoreName","selectedDate","getUTCDateWithoutTime","selectedTimeslot","StartDateTime","EndDateTime","newGroup","pickupModeName","getPickupModeDescription","generalPickupText","pickupAddress","availabilityState","PickupTimeslotAvailabilityState","None","availableDates","availableTimeslots","dailyGroupingResults","searchCriteria","DeliveryModeCode","StoreId","SearchOptionValue","getEstimatedPickupTimeslotAvailabilitiesAsync","callerContext","queryResultSettings","getPickupTimeslotAvailabilityState","NotAvailable","groupErrorMessage","noAvailableDateError","forEach","AvailableCapacity","timeslotResults","StartDate","EndDate","bypassCache","filter","filteredPickupGroups","Available","ArrayExtensions","hasElements","validateTimeslot","lineSpecs","concat","lineDeliverySpecifications","genericErrorMessage","setIsCancellable","_unused","channelId","productInputs","ObjectExtensions","isNullOrUndefined","map","ProductInput","apiSettings","getSimpleProducts","validationResult","dateErrorMessage","timeslotErrorMessage","pickupDateRequired","pickupTimeslotRequired","pickupDateTimeslotRequired","NotDefined","orgUnitLocation","_cartLine$ShippingAdd","OrgUnitName","every","_group$selectedTimesl","_group$selectedTimesl2","CartLines","isPickupLine","isPickupMode","_this$props2","_featureState$result2","pickupDeliveryModeCode","channel","PickupDeliveryModeCode","channelDeliveryOptionConfig","_channelDeliveryOptio","pickupDeliveryMode","PickupDeliveryModeCodes","isNullOrWhiteSpace","resourceString","deliveryOption","_foundProductDelivery","_foundProductDelivery2","foundProductDeliveryOption","deliveryO","deliveryDesc","DeliveryOptions","option","Code","Description","dailyResult","date","_countItems","cartlines","reduce","count","quantity","setDateHandler","bind","setTimeslotHandler","pickupDateLabel","pickupTimeslotLabel","pickupDateDefaultText","pickupTimeslotDefaultText","itemsText","singleItemText","pickupDateTimeslotText","pickupTimeslotPlaceHolder","pickupLocationLabel","imageSettings","useHour12TimeFormat","defaultClassName","groupsViewProps","index","_value$selectedTimesl","_value$selectedTimesl2","groupDivider","_line$product","_line$product2","_line$product3","_context$request$app","lineId","imageProps","altText","src","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","app","OmniChannelMedia","gridSettings","DefaultImageSettings","loadFailureBehavior","Quantity","numberOfCartLines","itemText","itemTitle","storeInfo","groupHeader","CheckoutPickupGroupHeader","lineImageProps","cartLineImages","CheckoutPickupCartLines","dateString","getDate","timeslotString","getTimeslot","timeslotInfoProps","content","selectedDateTimeslotNode","CheckoutPickupTimeslotInfo","addressProps","address","CheckoutPickupAddress","dropdownClassName","labelClassName","dropdownSelectClassName","dateDropdownNode","CheckoutPickupDateDropdown","defaultText","labelText","dropdownId","controlledByParent","labelClassname","dropdownClassname","timeslotDropdownNode","CheckoutPickupTimeslotDropdown","timeslotPlaceHolder","viewProp","pickupGroupContainer","dateTimeslotContainer","CheckoutPickupError","pickupDateDropdown","pickupTimeslotDropdown","selectedDateTimeslot","isShowDropdown","isShowSelected","checkoutPickup","viewState","headerError","Waiting","pickupDate","oldGroup","lineSpec","noAvailableTimeslotError","groups","pickupTimeslot","observable","ref","pickupGroupViewProps","_ref3","_ref4","Street","City","State","County","ZipCode","ThreeLetterISORegionName","_ref5","prop","showQty","Image","viewports","xs","q","w","h","lg","xl","lazyload","quality","DateTimeFormat","timeZone","placeHolder","startDate","endDate","hour","minute","hour12","formatter","input","UTC","getUTCFullYear","getUTCMonth","getUTCDate","defaultKey","updateDateSelection","notification","selectedOption","getDateMap","has","mapDatesToOptions","dates","defaultOption","unshift","findIndex","getTime","dropdownOptions","Map","set","toggleColor","htmlFor","LabeledDropdown","onSelectOption","updateTimeslotSelection","getTimeslotMap","mapTimeslotsToOptions","timeslots","_selectedTimeslot$Sta","_value$StartDateTime","_selectedTimeslot$End","_value$EndDateTime","paymentInstrumentModuleId","CheckoutPlainContainer","getItems","getActiveChildModuleStates","childIds","getModule","isDisabled","hasModuleState","isPaymentSectionContainer","childId","shouldEnableSinglePaymentAuthorizationCheckout","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","isSkipped","onContainerReady","isCollapse","_checkoutResult$check","_cart$TotalAmount","shouldSubmitContainer","shouldCollapsePaymentSection","_this$props$data$chec6","shouldTriggerPaymentWithPlaceOrder","_this$props$data$chec7","_this$props$data$chec8","updateIsPaymentSectionContainerHasError","newIsPaymentSectionContainerHasError","_this$props$data$chec9","isCheckoutCallFailed","_this$props$data$chec10","updateIsCheckoutCallFailed","newIsCheckoutCallFailed","componentDidUpdate","hasExternalSubmitGroup","some","enableControl","width","hasInitialized","container","hidden","loading","LoadingComponent","itemProps","typeName","initialized","skipped","ready","updating","isUpdating","pending","isPending","ItemComponent","Loading","CheckoutTermsAndConditions","isTermsAccepted","handleTextChange","description","getTermsAndConditions","showCheckbox","isAutoSave","isTermsAndConditionAccepted","checkboxAriaLabel","termsAndConditionAcceptance","checkBox","CheckboxComponent","isChecked","ariaLabel","onChange","telemetryContent","MsDyn365","_data$checkout$result","updateTermsAndConditionsAcceptance","getErrorMessage","ErrorTitleComponent","ErrorMessageComponent","getCancelButton","cancelBtnLabel","cancelBtnAriaLabel","color","getSaveButton","saveBtnLabel","saveBtnAriaLabel","getEditButton","editBtnLabel","editBtnAriaLabel","newIsTermsAndConditionAccepted","checked","updateIsTermsAndConditionsChecked","newIsTermsAndConditionChecked","getTelemetryObject","telemetryPageName","friendlyName","isShowButtons","showControlButtons","defaultTermsAndConditionAcceptedValue","isError","isShowContent","errorMessageData","isShowSaveButton","isShowEditButton","isShowCancelButton","checkoutTermsAndConditions","termsAndConditionsContent","saveButton","editButton","cancelButton","onSave","TermsAndCondition","ErrorMessage","payLoad","getPayloadObject","attribute","getTelemetryAttributes","name"],"sourceRoot":""}