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KlB,EAAmBmB,cACxBC,IAAc,QAAXtB,EAAEgB,EAAMM,WAAG,IAAAtB,EAAAA,EAAI,GAClBkB,aAAcD,EAAWC,aACzBC,cAAeF,EAAWE,cAC1BI,QAASP,EAAMO,QACfC,oBAAoB,OACpBC,uBAAqB,IAG7BpU,EAAAA,cAAA,OAAKF,UAAU,6CACXE,EAAAA,cAAA,QAAMF,UAAU,mDAAmD+S,EAAmBmB,eACtFhU,EAAAA,cAAA,QAAMF,UAAU,sDAAsD+S,EAAmBwB,mBAIzG,EAgDJ,yGCrSO,MAAMC,EAAwD9S,IACjE,MAAM,YACFqM,EAAW,eACXuC,EAAc,qBACdO,EAAoB,mBACpBK,EAAkB,QAClBjE,EAAO,qBACP+D,EAAoB,WACpB5B,EAAU,KACVgC,EAAI,YACJ/B,EAAW,wBACXiC,GACA5P,EACJ,OAAOqM,GAAesB,EAClBnP,EAAAA,cAAC+I,EAAAA,OAAML,OAAAC,OAAA,GAAKyH,GACRpQ,EAAAA,cAACyI,EAAAA,KAAIC,OAAAC,OAAA,GAAKgI,GACL5D,EACAmC,GAELlP,EAAAA,cAACyI,EAAAA,KAAIC,OAAAC,OAAA,GAAKqI,GACL7B,EAAYjF,KAAIqK,GACbvU,EAAAA,cAAAA,EAAAA,SAAA,KAAGuU,MAGXvU,EAAAA,cAACyI,EAAAA,KAAIC,OAAAC,OAAA,GAAKmI,GACLM,EACAF,IAGT,IAAI,EAGZ","sources":["webpack://Citta2.0/./src/modules/checkout-guest-profile-emarsys/components/get-add-contact-info.tsx?233e","webpack://Citta2.0/./src/modules/checkout-guest-profile-emarsys/components/get-show-contact-info.tsx?4546","webpack://Citta2.0/./src/modules/checkout-guest-profile-emarsys/checkout-guest-profile-emarsys.tsx?1c34","webpack://Citta2.0/./src/modules/checkout-guest-profile-emarsys/checkout-guest-profile-emarsys.view.tsx?9340","webpack://Citta2.0/./src/modules/check-in-for-pickup/check-in-confirmation.tsx?406f","webpack://Citta2.0/./src/modules/check-in-for-pickup/check-in-error.tsx?e789","webpack://Citta2.0/./src/modules/check-in-for-pickup/check-in-for-pickup.tsx?8686","webpack://Citta2.0/./src/modules/check-in-for-pickup/check-in-for-pickup.view.tsx?bd7a","webpack://Citta2.0/./src/modules/country-picker/country-picker.tsx?4fcb","webpack://Citta2.0/./src/modules/country-picker/country-picker.view.tsx?0036"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { 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 ),\r\n cancelButton: canCancel && (\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.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { 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: {email},\r\n editButton: canEdit && (\r\n \r\n )\r\n});\r\n\r\nexport default getContactInfo;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { 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 ReCAPTCHA from 'react-google-recaptcha';\r\nimport { computed, reaction, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport * as MsDyn365 from '@msdyn365-commerce/core';\r\n\r\nimport { ICheckoutGuestProfileEmarsysData } from './checkout-guest-profile-emarsys.data';\r\nimport { ICheckoutGuestProfileEmarsysProps } from './checkout-guest-profile-emarsys.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 TermsAndConditionsChecked: boolean;\r\n reCaptchaChecked: boolean;\r\n rCCError: boolean;\r\n\r\n}\r\n\r\nexport interface ICheckoutGuestProfileModuleProps extends ICheckoutGuestProfileEmarsysProps, IModuleStateProps { }\r\n\r\nexport interface ICheckoutGuestProfileViewProps extends ICheckoutGuestProfileEmarsysProps, ICheckoutGuestProfileState {\r\n moduleProps: IModuleProps;\r\n showContactInfo?: IShowContactInfo;\r\n addContactInfo?: IAddContactInfo;\r\n reCaptcha: React.ReactNode;\r\n checkBox: React.ReactNode;\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 TermsAndConditionsChecked: false,\r\n reCaptchaChecked: false,\r\n rCCError: false,\r\n };\r\n\r\n private readonly inputRef: React.RefObject = React.createRef();\r\n private _TermsAndConditionsRef: React.RefObject = React.createRef();\r\n private _recaptchaRef: React.RefObject = React.createRef();\r\n private recaptchaErrorMessage: string | undefined;\r\n // private responseMessage: string | undefined;\r\n\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?.isExpressCheckoutApplied,\r\n async isExpressCheckoutApplied => {\r\n if (isExpressCheckoutApplied && !this.props.data.checkout.result?.isExpressAddressApplied) {\r\n const email = this.props.data.checkout.result?.emailAddressFromExpressCheckout ?? '';\r\n\r\n await this.submitEmail(email);\r\n }\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutGuestProfileModuleProps, 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 // const checkBox : this._renderCheckbox();\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 checkBox: this._renderCheckbox(),\r\n reCaptcha: this._renderReCaptcha(),\r\n\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\r\n ? getShowContactInfo({\r\n canEdit: !hasExternalSubmitGroup,\r\n email,\r\n resources,\r\n onEdit: this.onEdit\r\n })\r\n : undefined,\r\n addContactInfo: !isReady\r\n ? 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 })\r\n : undefined\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n\r\n private _renderCheckbox(): React.ReactNode {\r\n return (\r\n
\r\n
\r\n \r\n\r\n
\r\n\r\n
\r\n )\r\n }\r\n\r\n private _renderReCaptcha(): React.ReactNode {\r\n return (\r\n
\r\n
\r\n {this.state.rCCError ? this._renderRecaptchaAlert('recaptcha-error') : ''}\r\n this._submit()}\r\n />\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderRecaptchaAlert(className: string): JSX.Element {\r\n\r\n if (this.props.config.reCaptchaOption) {\r\n if (!this.state.reCaptchaChecked) {\r\n this.recaptchaErrorMessage = this.props.resources.recaptchaErrorMessage;\r\n }\r\n }\r\n\r\n const rCCError = this.state.rCCError;\r\n return (\r\n <>\r\n {rCCError && (\r\n \r\n {\r\n this.recaptchaErrorMessage &&\r\n <>\r\n \r\n )}\r\n \r\n );\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\r\n ? this.props.context.request.user.emailAddress ?? ''\r\n : emailOnCart ??\r\n (checkoutState?.isExpressCheckoutApplied ? checkoutState.emailAddressFromExpressCheckout : undefined) ??\r\n this.state.email;\r\n\r\n if (email) {\r\n await this.updateGuestProfile(email);\r\n checkoutState?.updateHasGuestCheckoutEmail({ newHasGuestCheckoutEmail: true });\r\n } else {\r\n checkoutState?.updateHasGuestCheckoutEmail({ newHasGuestCheckoutEmail: false });\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 // console.log(\"onChange\")\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 _checkBoxOnChange = () => (e: React.ChangeEvent) => {\r\n const isChecked = this._TermsAndConditionsRef.current && this._TermsAndConditionsRef.current.checked ? this._TermsAndConditionsRef.current.checked : false;\r\n this.setState({TermsAndConditionsChecked: isChecked });\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.telemetry.information('Guest profile onEdit is called.');\r\n this.props.moduleState.onUpdating();\r\n };\r\n\r\n private readonly onSubmit = async (): Promise => {\r\n this.props.telemetry.information('Guest profile onSubmit is called.');\r\n const { email } = this.state;\r\n await this.submitEmail(email);\r\n if(this.state.TermsAndConditionsChecked) {\r\n try {\r\n this._recaptchaRef.current?.execute()\r\n } catch(e) {\r\n console.log(e, 'Please fill the form!');\r\n }\r\n }\r\n };\r\n\r\n private async _submit(): Promise {\r\n let emarsysGroupId = this.props.config.emarsysGroup;\r\n const { email } = this.state;\r\n try {\r\n const response = await MsDyn365.commerceApiRequest(\r\n this.props.context.request,\r\n 'PostCheckoutGuestProfileEmarsys',\r\n 'post',\r\n {\r\n emailAddress: email,\r\n emarsysGroupId: emarsysGroupId,\r\n optIn:true\r\n }\r\n ) as any;\r\n\r\n if (response?.data.Result !== 'Error') {\r\n console.log('emasys success')\r\n } else {\r\n console.log('this is an emasys error')\r\n }\r\n this._recaptchaRef.current?.reset();\r\n } catch (e) {\r\n console.log('rechatcha error')\r\n }\r\n \r\n }\r\n /**\r\n * Submit the email address.\r\n * @param email - The email to be submitted.\r\n *\r\n */\r\n private readonly submitEmail = async (email: string): Promise => {\r\n const isValid = this.isEmailValid(email);\r\n if (!isValid) {\r\n this.props.moduleState.setHasError(true);\r\n\r\n const input = this.inputRef.current?.focus && (this.inputRef.current as HTMLElement);\r\n input?.focus();\r\n\r\n } else {\r\n this.props.moduleState.onReady();\r\n await this.updateGuestProfile(email);\r\n\r\n }\r\n };\r\n\r\n private readonly onCancel = (): void => {\r\n this.props.telemetry.information('Guest profile onCancel is called.');\r\n\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 } 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.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddContactInfo, ICheckoutGuestProfileViewProps, IShowContactInfo } from './checkout-guest-profile-emarsys';\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 {'Email Address'}\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, checkBox, reCaptcha}) => {\r\n return (\r\n \r\n {showContactInfo && }\r\n {addContactInfo && }\r\n {checkBox}\r\n {reCaptcha}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutGuestProfileView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport QRCode from 'qrcode.react';\nimport * as React from 'react';\n\n/**\n * CheckInConfirmation component Properties.\n */\nexport interface ICheckInConfirmationProps {\n /**\n * The confirmation text to show.\n */\n confirmationText: string;\n\n /**\n * Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n */\n shouldShowQrCode: boolean;\n\n /**\n * The label shows for channel reference ID.\n */\n channelReferenceIdLabel: string;\n\n /**\n * The channel reference ID to show. When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n */\n channelReferenceId?: string;\n}\n\n/**\n * CheckInConfirmation component for showing confirmation information after check-in succeed.\n * @param confirmationProps - The confirmation properties.\n * @param confirmationProps.confirmationText - The confirmation text.\n * @param confirmationProps.shouldShowQrCode - Should the order confirmation number shown as QR code or not.\n * If false, the order confirmation number (channel reference ID) will be shown as text.\n * @param confirmationProps.channelReferenceIdLabel - The label shows for channel reference ID.\n * @param confirmationProps.channelReferenceId - The channel reference ID to show.\n * When shouldShowQrCode is true, the ID is shown as QR code, otherwise it is shown as text.\n * @returns The check-in confirmation component.\n */\nexport const CheckInConfirmationComponent: React.FC = ({\n confirmationText,\n shouldShowQrCode,\n channelReferenceIdLabel,\n channelReferenceId\n}) => {\n return (\n
\n

{confirmationText}

\n {channelReferenceId && (\n

\n {`${channelReferenceIdLabel} ${channelReferenceId}`}\n

\n )}\n {channelReferenceId && shouldShowQrCode && (\n \n \n \n )}\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 * as React from 'react';\n\n/**\n * Check-in error properties.\n */\nexport interface ICheckInErrorProps {\n errorMessage?: string;\n}\n\n/**\n * Check-in error.\n * @param errorProps - The error properties.\n * @param errorProps.errorMessage - The error message to show.\n * @returns The alert element showing check-in errors.\n */\nexport const CheckInErrorComponent: React.FC = ({ errorMessage }) => {\n if (!errorMessage) {\n return null;\n }\n\n return (\n \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 { IDictionary } from '@msdyn365-commerce/core';\nimport { CommerceProperty, SalesOrdersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { CheckInConfirmationComponent } from './check-in-confirmation';\nimport { CheckInErrorComponent } from './check-in-error';\nimport { IAdditionalInformationKeysData, ICheckInForPickupConfig, ICheckInForPickupProps } from './check-in-for-pickup.props.autogenerated';\n\n/**\n * The interface representing a piece of additional information data.\n */\ninterface IAdditionalInformation {\n formKey: IAdditionalInformationKeysData;\n value: string;\n}\n\n/**\n * The state for check-in view.\n */\nexport interface ICheckInViewState {\n /**\n * If the module has header error to show.\n */\n isHeaderError: boolean;\n\n /**\n * If the customer has checked in.\n */\n isCheckedIn: boolean;\n\n /**\n * Additional information to capture.\n */\n additionalInformation: IDictionary[];\n}\n\n/**\n * The properties for check-in view.\n */\nexport interface ICheckInViewProps extends ICheckInForPickupProps {\n headerError: React.ReactNode;\n confirmationComponent: React.ReactNode;\n viewState: ICheckInViewState;\n additionalInformationValues: string[];\n checkInForOrderPickup(additionalInformation?: IAdditionalInformation[]): Promise;\n}\n\n/**\n * The state of the CheckInForPickup module.\n */\nexport interface ICheckInForPickupState {\n /**\n * The header error message.\n */\n headerErrorMessage: string;\n\n /**\n * If the customer has checked in successfully.\n */\n isCheckedIn: boolean;\n}\n\n/**\n *\n * CheckIn component.\n * @extends {React.Component, ICheckInForPickupState>}\n */\nclass CheckInForPickup extends React.Component, ICheckInForPickupState> {\n public constructor(props: ICheckInForPickupProps) {\n super(props);\n this.state = {\n headerErrorMessage: '',\n isCheckedIn: false\n };\n }\n\n public render(): JSX.Element | null {\n const isHeaderError: boolean = this.state.headerErrorMessage !== '';\n\n const viewProps = {\n ...this.props,\n headerError: ,\n confirmationComponent: (\n \n ),\n checkInForOrderPickup: this.checkInForOrderPickup,\n additionalInformationValues: this.props.config.additionalInformationKeys\n ? this.props.config.additionalInformationKeys.map(() => {\n return {};\n })\n : undefined,\n viewState: {\n isHeaderError,\n isCheckedIn: this.state.isCheckedIn\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public shouldComponentUpdate(nextProps: ICheckInForPickupProps, nextState: ICheckInForPickupState): boolean {\n if (\n this.props.config.additionalInformationHeading !== nextProps.config.additionalInformationHeading ||\n this.props.config.confirmationText !== nextProps.config.confirmationText\n ) {\n return true;\n }\n if (this.state.headerErrorMessage !== nextState.headerErrorMessage || this.state.isCheckedIn !== nextState.isCheckedIn) {\n return true;\n }\n return false;\n }\n\n public async componentDidMount(): Promise {\n await this._onInit();\n }\n\n /**\n * The async callback for submitting check-in.\n * @param additionalInformationList - The optional additional information captured.\n * @returns The async result.\n */\n public checkInForOrderPickup = async (additionalInformationList?: IAdditionalInformation[]): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query!.channelId, 10);\n const channelReferenceId: string = this.props.context.request.query!.channelReferenceId;\n const packingSlipId: string = this.props.context.request.query!.packingSlipId;\n\n const additionalInformationToSubmit: { formKey: string; value: string }[] | undefined = additionalInformationList?.map(\n additionalInformationKeyValuePair => {\n return {\n formKey: additionalInformationKeyValuePair.formKey.resourceId ?? '',\n value: additionalInformationKeyValuePair.value\n };\n }\n );\n const extensionPropertyList: CommerceProperty[] = [];\n if (!ObjectExtensions.isNullOrUndefined(additionalInformationToSubmit)) {\n for (const additionalInformation of additionalInformationToSubmit) {\n extensionPropertyList.push({\n Key: additionalInformation.formKey,\n Value: {\n StringValue: additionalInformation.value\n }\n });\n }\n }\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId,\n extensionPropertyList\n );\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n return Promise.resolve();\n };\n\n /**\n * The action performed on module initialization.\n * @returns The async result.\n */\n private readonly _onInit = async (): Promise => {\n const channelId: number = Number.parseInt(this.props.context.request.query?.channelId ?? '', 10);\n const channelReferenceId: string | undefined = this.props.context.request.query?.channelReferenceId;\n const packingSlipId: string | undefined = this.props.context.request.query?.packingSlipId;\n if (Number.isNaN(channelId) || !channelReferenceId || !packingSlipId) {\n // No error message shown in editor mode.\n if (this.props.context.request.params.isEditor) {\n return Promise.resolve();\n } else if (this.props.context.request.params.isPreview) {\n this.setState({ headerErrorMessage: this.props.resources.requiredParameterMissingErrorMessage });\n } else {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage });\n }\n this.props.context.telemetry.error(\n 'One or more required URL parameters are missing. ' +\n 'Please make sure you have pass in channelId, channelReferenceId and packingSlipId through URL parameter.'\n );\n return Promise.resolve();\n }\n\n const { additionalInformationKeys } = this.props.config;\n\n const hasAdditionalInformation: boolean = ArrayExtensions.hasElements(additionalInformationKeys);\n\n // Call check-in-for-pickup directly if no additional information to capture.\n if (!hasAdditionalInformation) {\n try {\n await SalesOrdersDataActions.checkInForOrderPickupAsync(\n { callerContext: this.props.context.actionContext, queryResultSettings: {} },\n channelId,\n packingSlipId,\n channelReferenceId\n );\n } catch (error) {\n this.setState({ headerErrorMessage: this.props.resources.genericErrorMessage, isCheckedIn: false });\n this.props.telemetry.error(error);\n return Promise.resolve();\n }\n this.setState({ headerErrorMessage: '', isCheckedIn: true });\n }\n return Promise.resolve();\n };\n}\n\nexport default CheckInForPickup;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { FormBuilder } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICheckInViewProps } from './check-in-for-pickup';\n\n/**\n * The check-in view for submitting check-in, capturing additional information, and showing check-in confirmation.\n * @param props - The check-in view properties.\n * @returns The check-in view as a react component.\n */\nconst CheckInViewComponent: React.FC = (props: ICheckInViewProps) => {\n const { headerError, checkInForOrderPickup, confirmationComponent, viewState } = props;\n return (\n <>\n {viewState.isHeaderError && headerError}\n {!viewState.isHeaderError && ArrayExtensions.hasElements(props.config.additionalInformationKeys) && (\n \n )}\n {!viewState.isHeaderError &&\n !ArrayExtensions.hasElements(props.config.additionalInformationKeys) &&\n viewState.isCheckedIn &&\n confirmationComponent}\n \n );\n};\n\nexport default CheckInViewComponent;\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 { ICookieSetOptions, IImageDimension, ILocaleItems } from '@msdyn365-commerce/core-internal';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerData } from './country-picker.data';\nimport { IActionLinkData, ICountryPickerProps } from './country-picker.props.autogenerated';\n\n/**\n * CountryPicker view props interface.\n */\nexport interface ICountryPickerViewProps extends ICountryPickerProps {\n modalContainer: IModuleProps;\n modalHeaderContainer: INodeProps;\n modalFooterContainer: INodeProps;\n modalBodyContainer: INodeProps;\n heading?: React.ReactNode;\n subheading?: React.ReactNode;\n link?: React.ReactNode;\n countryList?: React.ReactNode[];\n isModalOpen?: boolean;\n state?: ICountryPickerState;\n stayOnCurrentSiteButton?: React.ReactNode;\n}\n\n/**\n * ICountryPickerState: Interface for Country picker State.\n */\nexport interface ICountryPickerState {\n isModalOpen: boolean;\n}\n\n/**\n *\n * CountryPicker component.\n * @extends {React.PureComponent>}\n */\nexport class CountryPicker extends React.PureComponent, ICountryPickerState> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly _preferredSiteStorageKey: string = '_msdyn365___site_';\n\n private readonly _cookieExpirationTime = 5_184_000;\n\n public constructor(props: ICountryPickerProps) {\n super(props);\n let isCookieValueSet: boolean = false;\n if (props.context.request.cookies.get(this._preferredSiteStorageKey).value) {\n isCookieValueSet = true;\n }\n this.state = {\n isModalOpen: !isCookieValueSet && this.props.context.request.marketSettings !== undefined\n };\n }\n\n public render(): JSX.Element | null {\n const { heading, subheading, countryList, actionLink } = this.props.config;\n\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const countryPickerHeading = heading && (\n \n );\n\n const countryPickerSubHeading = subheading && (\n \n );\n\n const countryPickerActionLink = actionLink && this.createLink(actionLink);\n const currentSiteButton = (\n \n );\n\n const viewprops: ICountryPickerViewProps = {\n ...this.props,\n state: this.state,\n isModalOpen: this.state.isModalOpen,\n modalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-country-picker__dialog',\n isOpen: true,\n 'aria-label': 'country-picker',\n toggle: this.closeModal,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: true\n },\n modalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-country-picker__modal-header',\n toggle: this.closeModal,\n closeButtonTabIndex: 1\n },\n modalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-countryPicker__modal-footer'\n },\n modalBodyContainer: {\n tag: ModalBody,\n className: 'ms-counrtyPicker__modal-body'\n },\n heading: countryPickerHeading,\n subheading: countryPickerSubHeading,\n link: countryPickerActionLink,\n countryList: countryList && this.renderCountryList(),\n stayOnCurrentSiteButton: currentSiteButton\n };\n\n return this.props.renderView(viewprops);\n }\n\n /**\n * Initiate close modal.\n */\n public readonly closeModal = (): void => {\n this.setState({\n isModalOpen: false\n });\n };\n\n public handleParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.subheading = event.target.value;\n }\n\n public handleTextChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.heading!.text = event.target.value;\n }\n\n public handleLinkTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.actionLink?.linkText) {\n this.props.config.actionLink.linkText = event.target.value;\n }\n }\n\n public createLink(link?: IActionLinkData): React.ReactNode | null {\n if (!StringExtensions.isNullOrEmpty(link?.linkUrl.destinationUrl)) {\n const linkText = link?.linkText ?? '';\n const payLoad = getPayloadObject('click', this._telemetryContent, '', '');\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: link?.ariaLabel,\n className: 'ms-countryPicker__link',\n linkText,\n linkUrl: link?.linkUrl.destinationUrl,\n openInNewTab: link?.openInNewTab,\n role: 'link',\n additionalProperties: attributes!,\n onClick: onTelemetryClick(this._telemetryContent, payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n public renderCountryList(): React.ReactNode[] | undefined {\n const marketSettings = this.props.context.request.marketSettings;\n if (!marketSettings) {\n return undefined;\n }\n const localeItems = marketSettings.localeItems;\n const countryLinks = localeItems.map((value: ILocaleItems) => {\n return this.renderCountry(value);\n });\n\n return countryLinks;\n }\n\n public renderCountry(localeItem: ILocaleItems): React.ReactNode | null {\n const countryList = this.props.config.countryList;\n let baseUrl = localeItem.localeBaseUrl;\n baseUrl = this._appendProtocolToUrl(baseUrl);\n const matchedCountryItem = countryList?.find(item => item.url === baseUrl);\n if (!matchedCountryItem) {\n return null;\n }\n const imageSize: IImageDimension = { q: 'w=48&h=48&m=6', w: 0, h: 0 };\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: imageSize,\n lg: imageSize,\n xl: imageSize\n },\n lazyload: true\n };\n const image = matchedCountryItem.image;\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: image?.imageSettings ?? defaultImageSettings\n };\n return (\n \n {image && (\n \n )}\n
\n {matchedCountryItem.displayString}\n {matchedCountryItem.displaySubString}\n
\n \n );\n }\n\n /**\n * Writes the current site base url to cookie and closes the country picker modal dialog.\n */\n private readonly _handleStayOnSiteButtonClick = (): void => {\n const currentBaseUrl = this.props.context.request.marketSettings?.currentBaseUrl;\n if (currentBaseUrl) {\n const urlToStore = this._appendProtocolToUrl(currentBaseUrl);\n this._writeToCookie(this._preferredSiteStorageKey, urlToStore);\n }\n this.closeModal();\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n * @returns - This method just writes the cookie to the browser.\n */\n private readonly _handleClick = (storageKey?: string, storageValue?: string) => () => {\n this._writeToCookie(storageKey, storageValue);\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n */\n private readonly _writeToCookie = (storageKey?: string, storageValue?: string): void => {\n if (!storageKey || !storageValue) {\n return;\n }\n const cookieOptions: ICookieSetOptions = { secure: true, sameSite: 'none' };\n cookieOptions.maxAge = this._cookieExpirationTime;\n this.props.context.request.cookies.set(storageKey, storageValue, cookieOptions);\n };\n\n /**\n * Appends protocol to an url.\n * @param baseUrl - Url to be formatted.\n * @returns - URL after appending protocol.\n */\n private readonly _appendProtocolToUrl = (baseUrl: string): string => {\n return !baseUrl.includes('https://') ? `https://${baseUrl}` : baseUrl;\n };\n}\n\nexport default CountryPicker;\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 { ICountryPickerViewProps } from './index';\n\n/**\n * Functional component which renders country picker module.\n * @param props - Configuration for the country picker component.\n * @returns React.FC - Functional component of the country picker module.\n */\nexport const countryPickerView: React.FC = (props: ICountryPickerViewProps) => {\n const {\n isModalOpen,\n modalContainer,\n modalHeaderContainer,\n modalBodyContainer,\n heading,\n modalFooterContainer,\n subheading,\n link,\n countryList,\n stayOnCurrentSiteButton\n } = props;\n return isModalOpen && countryList ? (\n \n \n {heading}\n {subheading}\n \n \n {countryList.map(country => (\n <>{country}\n ))}\n \n \n {stayOnCurrentSiteButton}\n {link}\n \n \n ) : null;\n};\n\nexport default countryPickerView;\n"],"names":["_ref","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","TermsAndConditionsChecked","reCaptchaChecked","rCCError","_TermsAndConditionsRef","_recaptchaRef","init","async","_this$props$context$r","checkoutState","data","checkout","result","hasInvoiceLine","checkoutCart","emailOnCart","cart","ReceiptEmail","isExpressCheckoutApplied","emailAddressFromExpressCheckout","undefined","updateGuestProfile","updateHasGuestCheckoutEmail","newHasGuestCheckoutEmail","isEmailValid","moduleState","status","rowEmail","replace","RegExp","setState","setHasError","_checkBoxOnChange","e","isChecked","current","checked","EmailRegex","defaultRegex","test","updateGuestCheckoutEmail","newGuestCheckoutEmail","telemetry","information","onUpdating","submitEmail","_this$_recaptchaRef$c","execute","console","log","onReady","_this$inputRef$curren","focus","guestCheckoutEmail","isDataReady","componentDidMount","when","reaction","_this$props$data$chec","_this$props$data$chec2","isExpressAddressApplied","_this$props$data$chec3","_this$props$data$chec4","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$chec5","_this$props$data$chec6","config","isReady","hasExternalSubmitGroup","viewProps","_objectSpread","checkBox","_renderCheckbox","reCaptcha","_renderReCaptcha","moduleProps","showContactInfo","getShowContactInfo","addContactInfo","getAddContactInfo","renderView","termsAndConditionsText","href","termsAndConditionsLink","_renderRecaptchaAlert","ReCAPTCHA","sitekey","reCaptchaSiteKey","size","_submit","reCaptchaOption","recaptchaErrorMessage","emarsysGroupId","emarsysGroup","_this$_recaptchaRef$c2","response","MsDyn365","optIn","Result","reset","__decorate","computed","withModuleState","observer","ShowContactInfo","Node","Object","assign","AddContactInfo","_ref2","_ref3","Module","CheckInConfirmationComponent","confirmationText","shouldShowQrCode","channelReferenceIdLabel","channelReferenceId","QRCode","CheckInErrorComponent","errorMessage","CheckInForPickup","super","checkInForOrderPickup","channelId","Number","parseInt","query","packingSlipId","additionalInformationToSubmit","additionalInformationList","map","additionalInformationKeyValuePair","_additionalInformatio","formKey","resourceId","extensionPropertyList","ObjectExtensions","isNullOrUndefined","additionalInformation","push","Key","Value","StringValue","SalesOrdersDataActions","callerContext","actionContext","queryResultSettings","headerErrorMessage","genericErrorMessage","isCheckedIn","Promise","resolve","_onInit","_this$props$context$r2","_this$props$context$r3","_this$props$context$r4","isNaN","params","isEditor","isPreview","requiredParameterMissingErrorMessage","additionalInformationKeys","ArrayExtensions","hasElements","_this$props$context$r5","isHeaderError","headerError","confirmationComponent","defaultConfirmationText","confirmationIdLabel","additionalInformationValues","viewState","additionalInformationHeading","_props$config$additio","FormBuilder","heading","additionalInformationDefaultHeading","submitButtonText","additionalInformationSubmitButtonText","keys","requiredValueMissingErrorMessage","CountryPicker","_telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","_preferredSiteStorageKey","_cookieExpirationTime","closeModal","isModalOpen","_handleStayOnSiteButtonClick","currentBaseUrl","marketSettings","urlToStore","_appendProtocolToUrl","_writeToCookie","_handleClick","storageKey","storageValue","cookieOptions","secure","sameSite","maxAge","cookies","set","baseUrl","includes","isCookieValueSet","get","_heading$tag","subheading","countryList","actionLink","isConsentGiven","countryPickerHeading","tag","text","editProps","handleTextChange","requestContext","countryPickerSubHeading","handleParagraphChange","countryPickerActionLink","createLink","currentSiteButton","tabIndex","stayOnCurrentSiteButtonText","viewprops","modalContainer","Modal","isOpen","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","modalHeaderContainer","ModalHeader","closeButtonTabIndex","modalFooterContainer","ModalFooter","modalBodyContainer","ModalBody","link","renderCountryList","stayOnCurrentSiteButton","handleLinkTextChange","_this$props$config$ac","linkText","StringExtensions","isNullOrEmpty","linkUrl","destinationUrl","_link$linkText","payLoad","getPayloadObject","attributes","getTelemetryAttributes","editableLink","ariaLabel","openInNewTab","additionalProperties","onTelemetryClick","onTextChange","localeItems","renderCountry","localeItem","_image$imageSettings","_image$src","localeBaseUrl","matchedCountryItem","find","item","url","imageSize","q","w","h","defaultImageSettings","viewports","xs","lg","xl","lazyload","image","imageProps","gridSettings","imageSettings","key","displayString","src","altText","loadFailureBehavior","shouldSkipToMainImage","displaySubString","countryPickerView","country"],"sourceRoot":""}