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C,GAEA,IACMH,EADU7E,EAAKwC,MACEtJ,GACvB,QAAK2L,IAKAA,EAAO1B,UAAuC,IAA3B0B,EAAO1B,SAAS8B,OAKjCjF,EAAKuF,mBAAmBrM,EAAI0L,EAAQG,EAAYC,GAJ5ChF,EAAKkF,cAAchM,EAAI0L,KAWrB5E,EAAAA,uBAAyB,WACtC,QAASA,EAAK/F,MAAM0L,eAQP3F,EAAAA,eAAiB,SAAC9G,GAG/B,QAFgB8G,EAAKwC,MACEtJ,IA/PvB8G,EAAK4F,kBAAiB,EAkQ9B,OArQ0BC,EAAAA,EAAAA,IAAAA,EAAAA,GAMfC,EAAAA,UAAAA,sBAAP,SAA6BjJ,GACzB,OAAI7C,KAAKC,QAAU4C,GAMhBiJ,EAAAA,UAAAA,OAAP,WACY,IAAA5M,EAAOc,KAAKC,MAAK,GACzB,OAAOxB,EAAAA,cAACiK,GAAgB,WAAK1I,KAAKC,MAAK,CAAEsB,YAAavB,KAAKqK,sBAAsBnL,OAfnF4M,GAAW,SADhBjI,EAAAA,IAAQ,uCACHiI,GAAN,CAA0BrN,EAAAA,mBC5B9BoM,EAAOkB,QAAUtN,cCAjBoM,EAAOkB,QAAUC","sources":["webpack://msdyn365.commerce.online/./src/modules/c-checkout-guest-profile/components/get-add-contact-info.tsx?3437","webpack://msdyn365.commerce.online/./src/modules/c-checkout-guest-profile/components/get-show-contact-info.tsx?35a3","webpack://msdyn365.commerce.online/./src/modules/c-checkout-guest-profile/c-checkout-guest-profile.tsx?78f8","webpack://msdyn365.commerce.online/./src/modules/c-checkout-guest-profile/c-checkout-guest-profile.view.tsx?148e","webpack://msdyn365.commerce.online/./lib/c-checkout-guest-profile/module-registration.js?9159","webpack://msdyn365.commerce.online/../../src/checkout-state-data-action.ts?8344","webpack://msdyn365.commerce.online/../../src/checkout-state.ts?acd8","webpack://msdyn365.commerce.online/../../../src/module-state-manager/module-state.ts?7579","webpack://msdyn365.commerce.online/../../../src/module-state-manager/with-module-state.tsx?61ca","webpack://msdyn365.commerce.online/external var \"React\"?0d3b","webpack://msdyn365.commerce.online/external var \"ReactDOM\"?853b"],"sourcesContent":["/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface IAddContactInfoInput {\r\n inputRef?: React.RefObject;\r\n hasError: boolean;\r\n email: string;\r\n resources: {\r\n emailLabel: string;\r\n emailErrortext: string;\r\n saveBtnLabel: string;\r\n cancelBtnLabel: string;\r\n };\r\n canSubmit: boolean;\r\n canCancel: boolean;\r\n onChange(email: string): void;\r\n onSubmit(): void;\r\n onCancel(): void;\r\n}\r\n\r\nexport interface IAddContactInfo {\r\n addFormProps: INodeProps;\r\n submitButton: React.ReactNode;\r\n cancelButton: React.ReactNode;\r\n inputGroupProps: INodeProps;\r\n label: React.ReactNode;\r\n error: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\n/**\r\n * On Input change handler function.\r\n * @param onChange -On change input function.\r\n * @returns Call of onChange function.\r\n */\r\nconst onInputChangeHandler = (onChange: (email: string) => void) => (event: React.ChangeEvent): void => {\r\n onChange(event.target.value || '');\r\n};\r\n\r\nconst getAddContactInfo = ({\r\n hasError,\r\n inputRef,\r\n email,\r\n canSubmit,\r\n canCancel,\r\n onChange,\r\n onSubmit,\r\n onCancel,\r\n resources: { emailLabel, emailErrortext, saveBtnLabel, cancelBtnLabel }\r\n}: IAddContactInfoInput): IAddContactInfo => {\r\n const onInputChange = onInputChangeHandler(onChange);\r\n\r\n return {\r\n addFormProps: { className: 'ms-checkout-guest-profile__add-contact-info' },\r\n submitButton: canSubmit && (\r\n \r\n {saveBtnLabel}\r\n \r\n ),\r\n cancelButton: canCancel && (\r\n \r\n {cancelBtnLabel}\r\n \r\n ),\r\n inputGroupProps: { className: classnames('ms-checkout-guest-profile__input', { 'is-invalid': hasError }) },\r\n label: (\r\n \r\n ),\r\n error: hasError && (\r\n \r\n {emailErrortext}\r\n \r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n};\r\n\r\nexport default getAddContactInfo;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IShowContactInfoInput {\r\n canEdit: boolean;\r\n email: string;\r\n resources: {\r\n editBtnLabel: string;\r\n };\r\n onEdit(): void;\r\n}\r\n\r\nexport interface IShowContactInfo {\r\n showInfoProps: INodeProps;\r\n email: React.ReactNode;\r\n editButton?: React.ReactNode;\r\n}\r\n\r\nconst getContactInfo = ({ canEdit, email, resources: { editBtnLabel }, onEdit }: IShowContactInfoInput): IShowContactInfo => ({\r\n showInfoProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n email: \r\n {email}\r\n ,\r\n editButton: canEdit && (\r\n \r\n {editBtnLabel}\r\n \r\n )\r\n});\r\n\r\nexport default getContactInfo;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ICCheckoutGuestProfileData } from './c-checkout-guest-profile.data';\r\nimport { ICCheckoutGuestProfileProps } from './c-checkout-guest-profile.props.autogenerated';\r\nimport getAddContactInfo, { IAddContactInfo } from './components/get-add-contact-info';\r\nimport getShowContactInfo, { IShowContactInfo } from './components/get-show-contact-info';\r\n\r\nexport * from './components/get-add-contact-info';\r\nexport * from './components/get-show-contact-info';\r\n\r\ninterface ICheckoutGuestProfileState {\r\n email: string;\r\n}\r\n\r\nexport interface ICheckoutGuestProfileModuleProps extends ICCheckoutGuestProfileProps, IModuleStateProps { }\r\n\r\nexport interface ICheckoutGuestProfileViewProps extends ICCheckoutGuestProfileProps, ICheckoutGuestProfileState {\r\n moduleProps: IModuleProps;\r\n showContactInfo?: IShowContactInfo;\r\n addContactInfo?: IAddContactInfo;\r\n\r\n onChange?(email: string): void;\r\n onEdit?(): void;\r\n onSubmit?(): void;\r\n onCancel?(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGuestProfile component.\r\n * @extends {React.PureComponent, ICheckoutGuestProfileState>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass CheckoutGuestProfile extends React.Component {\r\n public state: ICheckoutGuestProfileState = {\r\n email:\r\n (this.props.context &&\r\n this.props.context.request &&\r\n this.props.context.request.user &&\r\n this.props.context.request.user.isAuthenticated &&\r\n this.props.context.request.user.emailAddress) ||\r\n ''\r\n };\r\n\r\n private readonly inputRef: React.RefObject = React.createRef();\r\n\r\n @computed get isDataReady(): boolean {\r\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\r\n }\r\n\r\n public componentDidMount(): void {\r\n when(\r\n () => this.isDataReady,\r\n async () => {\r\n await this.init();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.emailAddressFromExpressCheckout,\r\n async () => {\r\n this.props.moduleState.onReady();\r\n await this.updateGuestProfile(this.props.data.checkout.result?.emailAddressFromExpressCheckout ?? '');\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutGuestProfileModuleProps,\r\n nextState: ICheckoutGuestProfileState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n config: { className },\r\n resources,\r\n moduleState: { isReady, hasError, hasExternalSubmitGroup }\r\n } = this.props;\r\n const email = this.props.data.checkout.result?.guestCheckoutEmail ?? '';\r\n\r\n const viewProps: ICheckoutGuestProfileViewProps = {\r\n ...this.props,\r\n ...this.state,\r\n onChange: this.onChange,\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onSubmit: this.onSubmit,\r\n\r\n moduleProps: {\r\n moduleProps: this.props,\r\n className: classnames('ms-checkout-guest-profile', className, isReady ? 'show' : 'add')\r\n },\r\n showContactInfo: isReady ? getShowContactInfo({\r\n canEdit: !hasExternalSubmitGroup,\r\n email,\r\n resources,\r\n onEdit: this.onEdit\r\n }) : undefined,\r\n addContactInfo: !isReady ? getAddContactInfo({\r\n email: this.state.email,\r\n hasError,\r\n resources,\r\n inputRef: this.inputRef,\r\n onChange: this.onChange,\r\n canSubmit: !hasExternalSubmitGroup,\r\n onSubmit: this.onSubmit,\r\n canCancel: !hasExternalSubmitGroup && !!email,\r\n onCancel: this.onCancel\r\n }) : undefined\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private readonly init = async (): Promise => {\r\n const checkoutState = this.props.data.checkout.result;\r\n\r\n const hasInvoiceLine = checkoutState?.checkoutCart.hasInvoiceLine;\r\n\r\n const emailOnCart = checkoutState?.checkoutCart.cart.ReceiptEmail;\r\n const email = hasInvoiceLine ? (this.props.context.request.user.emailAddress ?? '') : (emailOnCart ??\r\n (checkoutState?.isExpressCheckoutApplied ? checkoutState.emailAddressFromExpressCheckout : undefined) ?? this.state.email);\r\n\r\n if (email) {\r\n await this.updateGuestProfile(email);\r\n }\r\n\r\n const isEmailValid = this.isEmailValid(email);\r\n this.props.moduleState.init({\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onSubmit: this.onSubmit,\r\n status: hasInvoiceLine ? 'disabled' : (email && isEmailValid ? 'ready' : 'updating'),\r\n hasError: !!email && !isEmailValid\r\n });\r\n };\r\n\r\n private readonly onChange = (rowEmail: string): void => {\r\n const email = (rowEmail || '').replace(new RegExp('[<>]', 'gi'), '');\r\n this.setState({ email });\r\n if (this.props.moduleState.hasError) {\r\n // Clear error during user updating the email\r\n this.props.moduleState.setHasError(false);\r\n }\r\n };\r\n\r\n private readonly isEmailValid = (email: string): boolean => {\r\n return EmailRegex.defaultRegex.test(email);\r\n };\r\n\r\n private readonly updateGuestProfile = async (newGuestCheckoutEmail: string): Promise => {\r\n if (this.props.data.checkout.result) {\r\n await this.props.data.checkout.result.updateGuestCheckoutEmail({ newGuestCheckoutEmail });\r\n this.setState({ email: newGuestCheckoutEmail });\r\n }\r\n };\r\n\r\n private readonly onEdit = (): void => {\r\n this.props.moduleState.onUpdating();\r\n };\r\n\r\n private readonly onSubmit = async (): Promise => {\r\n const { email } = this.state;\r\n const isValid = this.isEmailValid(email);\r\n if (!isValid) {\r\n this.props.moduleState.setHasError(true);\r\n\r\n // Get error, focus back on the input field\r\n const input = this.inputRef.current?.focus && (this.inputRef.current as HTMLElement);\r\n input?.focus();\r\n } else {\r\n this.props.moduleState.onReady();\r\n await this.updateGuestProfile(email);\r\n }\r\n };\r\n\r\n private readonly onCancel = (): void => {\r\n // Reset to the saved value\r\n if (!this.props.data.checkout.result) {\r\n return;\r\n }\r\n\r\n const email = this.props.data.checkout.result.guestCheckoutEmail;\r\n if (!email) {\r\n // It has no saved email, set to status updating and request user to fill the email form\r\n this.props.moduleState.onUpdating();\r\n\r\n } else {\r\n // It has saved email, set to status ready\r\n this.setState({\r\n email\r\n });\r\n this.props.moduleState.setHasError(false);\r\n this.props.moduleState.onReady();\r\n }\r\n };\r\n}\r\n\r\nexport default CheckoutGuestProfile;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddContactInfo, ICheckoutGuestProfileViewProps, IShowContactInfo } from './c-checkout-guest-profile';\r\n\r\nexport const ShowContactInfo: React.FC = ({ showInfoProps, email, editButton }) => (\r\n \r\n {email}\r\n {editButton}\r\n \r\n);\r\n\r\nexport const AddContactInfo: React.FC = ({\r\n addFormProps,\r\n submitButton,\r\n cancelButton,\r\n inputGroupProps,\r\n label,\r\n error,\r\n input\r\n}) => (\r\n \r\n \r\n {label}\r\n {error}\r\n {input}\r\n \r\n {submitButton}\r\n {cancelButton}\r\n \r\n);\r\n\r\nconst CheckoutGuestProfileView: React.FC = ({ moduleProps, showContactInfo, addContactInfo }) => {\r\n return (\r\n \r\n {showContactInfo && }\r\n {addContactInfo && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutGuestProfileView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n const registerActionId = (actionPath) => {\n if (binding.dataActions[actionPath] &&\n binding.dataActions[actionPath].default &&\n binding.dataActions[actionPath].default.prototype &&\n binding.dataActions[actionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[actionPath].default.prototype.id] = binding.dataActions[actionPath];\n } else {\n Object.keys(binding.dataActions[actionPath] || {}).forEach(exportName => {\n if (binding.dataActions[actionPath][exportName] &&\n binding.dataActions[actionPath][exportName].prototype &&\n binding.dataActions[actionPath][exportName].prototype.Action) {\n binding.dataActions[binding.dataActions[actionPath][exportName].prototype.id] = binding.dataActions[actionPath][exportName];\n }\n })\n }\n };\n\n const registerSanitizedActionPath = (sanitizedActionPath, dataAction) => {\n if (process.env.NODE_ENV === 'development') {\n if (!dataAction.default) {\n throw new Error('Data action path does not have a default export');\n }\n if (!(dataAction.default.prototype.id && binding.dataActions[dataAction.default.prototype.id]) || !binding.dataActions[sanitizedActionPath]) {\n binding.dataActions[sanitizedActionPath] = dataAction;\n }\n } else {\n binding.dataActions[sanitizedActionPath] = dataAction;\n if (!binding.dataActions[sanitizedActionPath].default) {\n throw new Error('Data action path ' + sanitizedActionPath + ' does not have a default export');\n }\n binding.dataActions[sanitizedActionPath].default.prototype.RegistrationId = sanitizedActionPath;\n if (binding.dataActions[sanitizedActionPath].default.prototype.id) {\n binding.dataActions[binding.dataActions[sanitizedActionPath].default.prototype.id] = sanitizedActionPath;\n }\n }\n };\n \n\n (binding.modules['c-checkout-guest-profile'] = {\n c: () => require('partner/modules/c-checkout-guest-profile/c-checkout-guest-profile.tsx'),\n $type: 'contentModule',\n da: [{name:'cart', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action', runOn: 1},{name:'checkout', path:'@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action', runOn: 1}],\n \n iNM: false,\n ns: '__local__',\n n: 'c-checkout-guest-profile',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/c-checkout-guest-profile'\n });\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/cart-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n {\n const sanitizedActionPath = '@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action';\n let dataAction = require('@msdyn365-commerce/global-state/dist/lib/data-actions/checkout-state-data-action');\n registerSanitizedActionPath(sanitizedActionPath, dataAction);\n }\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['__local__|__local__|modules|c-checkout-guest-profile|c-checkout-guest-profile'] = {\n c: () => require('partner/modules/c-checkout-guest-profile/c-checkout-guest-profile.view.tsx'),\n cn: '__local__-__local__-c-checkout-guest-profile'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n CacheType,\n createObservableDataAction,\n IAction,\n IActionContext,\n IActionInput,\n IAny,\n ICommerceApiSettings,\n ICreateActionContext,\n IGeneric\n} from '@msdyn365-commerce/core';\nimport { buildCacheKey } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { CheckoutState } from './checkout-state';\n\n/**\n * CheckoutState - action input.\n */\nexport class CheckoutStateInput implements IActionInput {\n private readonly apiSettings: ICommerceApiSettings;\n\n constructor(apiSettings: ICommerceApiSettings) {\n this.apiSettings = apiSettings;\n }\n\n public getCacheKey = () => buildCacheKey('CheckoutState', this.apiSettings);\n\n public getCacheObjectType = () => 'CheckoutState';\n\n public dataCacheType = (): CacheType => 'request';\n}\n\n/**\n * CheckoutState - action.\n * @param input\n * @param ctx\n */\nexport async function checkoutStateAction(input: CheckoutStateInput, ctx: IActionContext): Promise {\n return new CheckoutState();\n}\n\n/**\n * CheckoutState - create new input for create action.\n * @param inputData\n */\nconst createInput = (inputData: ICreateActionContext>): IActionInput => {\n return new CheckoutStateInput(inputData.requestContext.apiSettings);\n};\n\n/**\n * CheckoutState - create action.\n */\nexport const checkoutStateActionDataAction = createObservableDataAction({\n action: >checkoutStateAction,\n input: createInput\n});\n\nexport default checkoutStateActionDataAction;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n @computed public get tokenizedPaymentCard(): Readonly | undefined {\n return this._tokenizedPaymentCard;\n }\n\n @observable private _tenderLine: TenderLine | undefined;\n\n @computed public get tenderLine(): Readonly | undefined {\n return this._tenderLine;\n }\n\n @observable private _billingAddress: Address | undefined;\n\n @computed public get billingAddress(): Readonly
| undefined {\n return this._billingAddress;\n }\n\n @observable private _shippingAddress: Address | undefined;\n\n @computed public get shippingAddress(): Readonly
| undefined {\n return this._shippingAddress;\n }\n\n @observable private _cardPrefix: string | undefined;\n\n @computed public get cardPrefix(): Readonly | undefined {\n return this._cardPrefix;\n }\n\n @observable private _giftCards: GiftCard[] = [];\n\n @computed public get giftCards(): readonly GiftCard[] {\n return this._giftCards;\n }\n\n @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n return this._giftCardExtends;\n }\n\n @observable private _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly | undefined {\n return this._loyaltyCardNumber;\n }\n\n @observable private _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly | number {\n return this._loyaltyAmount;\n }\n\n @observable private _guestCheckoutEmail: string = '';\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @observable private _isTermsAndConditionAccepted: boolean = false;\n\n @computed public get isTermsAndConditionAccepted(): Readonly | boolean {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable private _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly | number {\n return this._customerAccountAmount;\n }\n\n @action\n public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n this._tokenizedPaymentCard = newTokenizedPaymentCard;\n }\n\n @action\n public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n this._tenderLine = newTenderLine;\n }\n\n @action\n public updateShippingAddress(newShippingAddress: Address): void {\n this._shippingAddress = newShippingAddress;\n }\n\n @action\n public updateBillingAddress(newBillingAddress: Address): void {\n this._billingAddress = newBillingAddress;\n }\n\n @action\n public updateCardPrefix(newCardPrefix: string): void {\n this._cardPrefix = newCardPrefix;\n }\n\n @action\n public removeGiftCard(giftCardNumber: string): void {\n this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public removeGiftCardExtend(giftCardNumber: string): void {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public addGiftCard(giftCard: GiftCard): void {\n this._giftCards = [giftCard, ...this._giftCards];\n }\n\n @action\n public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n this._giftCardExtends = [giftCard, ...this._giftCards];\n }\n\n @action\n public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n this._loyaltyCardNumber = newLoyaltyCardNumber;\n }\n\n @action\n public updateLoyaltyAmount(newAmount: number): void {\n this._loyaltyAmount = newAmount;\n }\n\n @action\n public updateGuestCheckoutEmail(newGuestCheckoutEmail: string): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n }\n\n @action\n public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n }\n\n @action\n public updateCustomerAccountAmount(newAmount: number): void {\n this._customerAccountAmount = newAmount;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

(WrappedComponent: React.ComponentType

): React.ComponentType

=> {\n /**\n *\n * ModuleState component.\n * @extends {React.Component

}\n */\n @observer\n class ModuleState extends React.Component

{\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["hasError","inputRef","email","canSubmit","canCancel","onChange","onSubmit","onCancel","resources","emailLabel","emailErrortext","saveBtnLabel","cancelBtnLabel","onInputChange","event","target","value","onInputChangeHandler","addFormProps","className","submitButton","React","Button","title","color","onClick","cancelButton","inputGroupProps","classnames","label","id","error","role","input","ref","type","canEdit","editBtnLabel","onEdit","showInfoProps","editButton","CheckoutGuestProfile","constructor","state","this","props","context","request","user","isAuthenticated","emailAddress","init","async","checkoutState","data","checkout","result","hasInvoiceLine","checkoutCart","emailOnCart","cart","ReceiptEmail","isExpressCheckoutApplied","emailAddressFromExpressCheckout","undefined","updateGuestProfile","isEmailValid","moduleState","status","rowEmail","replace","RegExp","setState","setHasError","EmailRegex","defaultRegex","test","updateGuestCheckoutEmail","newGuestCheckoutEmail","onUpdating","onReady","current","focus","guestCheckoutEmail","componentDidMount","when","isDataReady","reaction","shouldComponentUpdate","nextProps","nextState","render","config","isReady","hasExternalSubmitGroup","viewProps","moduleProps","showContactInfo","getShowContactInfo","addContactInfo","getAddContactInfo","renderView","__decorate","computed","withModuleState","observer","ShowContactInfo","Node","AddContactInfo","Module","binding","modules","dataActions","registerSanitizedActionPath","sanitizedActionPath","dataAction","default","Error","prototype","RegistrationId","c","require","$type","da","name","path","runOn","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","apiSettings","getCacheKey","buildCacheKey","_this","getCacheObjectType","dataCacheType","createObservableDataAction","action","ctx","CheckoutState","inputData","CheckoutStateInput","requestContext","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","Object","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","newTokenizedPaymentCard","newTenderLine","newShippingAddress","newBillingAddress","newCardPrefix","giftCardNumber","filter","giftCard","Id","newLoyaltyCardNumber","newAmount","newIsTermsAndConditionAccepted","observable","getModuleStates","cacheKey","ModuleStatesCacheKey","moduleStates","get","update","WrappedComponent","_super","typeName","states","actionContext","hasInitialized","isRequired","isCancellable","isSubmitContainer","childIds","telemetry","validate","isUpdating","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onPending","onSkip","onDisable","getModule","moduleId","getModuleStateManager","getModuleByTypeName","getModuleStateManagerByTypeName","options","values","find","_moduleState","source","module","isMatch","allMatched","skipSkippableItem","length","_validateLeaf","app","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","_validateContainer","includes","ArrayExtensions","hasElements","enableControl","initializeState","__extends","ModuleState","exports","ReactDOM"],"sourceRoot":""}