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AuCT,EAnC2DC,IActD,IAduD,YACxDtkC,EAAW,UACXukC,EAAS,iBACTC,EAAgB,MAChBC,EAAK,SACLC,EAAQ,QACRtiC,EAAO,MACPsxB,EAAK,QACL5uB,EAAO,gBACP6/B,EAAe,aACfC,EAAY,QACZC,EAAO,KACPC,EAAI,OACJxB,GACHgB,EACG,OACIjsC,EAAAA,cAAC8I,EAAAA,OAAML,OAAAC,OAAA,GAAKf,GACP0kC,EACAtiC,EACAsxB,EACA5uB,EACA6/B,GAAmBtsC,EAAAA,cAACipC,EAAexgC,OAAAC,OAAA,GAAK4jC,IACxCH,EACAD,EACAE,EACAnB,GAAUjrC,EAAAA,cAAC+qC,EAAMtiC,OAAAC,OAAA,GAAKuiC,IACvBjrC,EAAAA,cAACwI,EAAAA,KAAI,CAAC1I,UAAU,6CACXysC,GAAgBvsC,EAAAA,cAACmrC,EAAY1iC,OAAAC,OAAA,GAAK6jC,IAClCC,GAAWxsC,EAAAA,cAACurC,EAAO9iC,OAAAC,OAAA,GAAK8jC,KAE5BC,GAAQzsC,EAAAA,cAAC2rC,EAAIljC,OAAAC,OAAA,GAAK+jC","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/nos-checkout-guest-profile/components/get-add-contact-info.tsx?f62d","webpack://Msdyn365.Commerce.Online/./src/modules/nos-checkout-guest-profile/components/get-show-contact-info.tsx?a91c","webpack://Msdyn365.Commerce.Online/./src/modules/nos-checkout-guest-profile/nos-checkout-guest-profile.tsx?f1d6","webpack://Msdyn365.Commerce.Online/./src/modules/nos-checkout-guest-profile/nos-checkout-guest-profile.view.tsx?a64d","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-button.tsx?0f15","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-error.tsx?9874","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-input.tsx?c43d","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-label.tsx?15c1","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-loading-icon.tsx?663f","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-loading-message.tsx?6719","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/components/nos-sign-up-success.tsx?a522","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/nos-sign-up.tsx?8236","webpack://Msdyn365.Commerce.Online/./src/modules/nos-sign-up/nos-sign-up.view.tsx?6b22","webpack://Msdyn365.Commerce.Online/./src/utilities/regex/email-regex.ts?4a25","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.tsx?797a","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/rng.js?7d39","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/regex.js?255d","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/validate.js?f4cd","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/stringify.js?688d","webpack://Msdyn365.Commerce.Online/./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/v4.js?0bec","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/proactive-chat-trigger.ts?ab51","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-amount-trigger.ts?b0a3","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-number-of-items-trigger.ts?5c1e","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-specific-product-trigger.ts?5985","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/consts.ts?4dc3","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/date-range-trigger.ts?d574","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/from-specific-page-trigger.ts?37c0","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/page-visits-trigger.ts?66a6","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-CountryRegion-trigger.ts?5c72","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-page-trigger.ts?9295","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/triggers/wait-on-time-trigger.ts?63fd","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/proactive/index.ts?ef6c","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/ContextProvider.ts?20ff","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/StyleComposers.ts?0cc6","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/helpers/CommerceChatStore.ts?9abc","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/components/ChatCore.tsx?1b5f","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/components/Chat.tsx?5004","webpack://Msdyn365.Commerce.Online/./src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.view.tsx?cb2f","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/checkout-utilities.data.ts?b2cc","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/./src/checkout-errors/checkout-errors.ts?a9e0","webpack://Msdyn365.Commerce.Online/./src/common/error.tsx?096f","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-apple-pay/checkout-apple-pay.view.tsx?222d","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-customer-account-payment/checkout-customer-account-payment.view.tsx?79c6","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-express/checkout-express.view.tsx?134b","webpack://Msdyn365.Commerce.Online/./src/modules/checkout-google-pay/checkout-google-pay.view.tsx?b92f","webpack://Msdyn365.Commerce.Online/./src/modules/cookie-compliance/components/accept-button.tsx?8e73","webpack://Msdyn365.Commerce.Online/./src/modules/cookie-compliance/components/links.tsx?97b8","webpack://Msdyn365.Commerce.Online/./src/modules/cookie-compliance/cookie-compliance.tsx?02ac","webpack://Msdyn365.Commerce.Online/./src/modules/cookie-compliance/cookie-compliance.view.tsx?a33f","webpack://Msdyn365.Commerce.Online/./src/modules/iframe/iframe.tsx?65fe","webpack://Msdyn365.Commerce.Online/./src/modules/iframe/iframe.view.tsx?a7d6","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/cart.view.tsx?3909","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/order-details.view.tsx?027b"],"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 ),\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. 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 emailHeader: 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, emailHeader }, onEdit }: IShowContactInfoInput): IShowContactInfo => ({\r\n showInfoProps: { className: 'ms-checkout-guest-profile__selected-item' },\r\n email: (\r\n
\r\n \r\n
{email}
\r\n
\r\n ),\r\n editButton: canEdit && (\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 { 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 { EmailRegex } from '../../utilities/regex/email-regex';\r\nimport { INosCheckoutGuestProfileData } from './nos-checkout-guest-profile.data';\r\nimport { INosCheckoutGuestProfileProps } from './nos-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 purchaseOrderId: string;\r\n}\r\n\r\n/**\r\n * This setting defines PURCHASEORDERID Key.\r\n */\r\nexport const purchaseOrderIdKey = 'PURCHASEORDERID';\r\n\r\nexport interface ICheckoutGuestProfileModuleProps extends INosCheckoutGuestProfileProps, IModuleStateProps {}\r\n\r\nexport interface ICheckoutGuestProfileViewProps\r\n extends INosCheckoutGuestProfileProps,\r\n ICheckoutGuestProfileState {\r\n moduleProps: IModuleProps;\r\n showContactInfo?: IShowContactInfo;\r\n addContactInfo?: IAddContactInfo;\r\n\r\n addPurchaseOrderIdElement?: JSX.Element;\r\n showPurchaseOrderIdElement?: JSX.Element;\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 private purchaseOrderIdRef: React.RefObject;\r\n\r\n private readonly inputRef: React.RefObject = React.createRef();\r\n\r\n public constructor(props: ICheckoutGuestProfileModuleProps) {\r\n super(props);\r\n\r\n this.state = {\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 purchaseOrderId: this._getAttributeValue(purchaseOrderIdKey) || ''\r\n };\r\n\r\n this.purchaseOrderIdRef = React.createRef();\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\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\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 addPurchaseOrderIdElement: !isReady ? this._renderAddPurchaseOrderId() : undefined,\r\n showPurchaseOrderIdElement: isReady ? this._renderShowPurchaseOrderId() : 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\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 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 /**\r\n * Method _getExtensionPropertyValue.\r\n * @param fieldName -The checkout address properties.\r\n */\r\n private _getAttributeValue = (fieldName: string) => {\r\n const purchaseOrderId =\r\n this.props.data.checkout.result &&\r\n this.props.data.checkout.result.checkoutCart &&\r\n this.props.data.checkout.result.checkoutCart.cart &&\r\n this.props.data.checkout.result.checkoutCart.cart?.AttributeValues?.find(attribute => attribute.Name === fieldName);\r\n\r\n if (purchaseOrderId) {\r\n // @ts-expect-error -- Need to provide data type.\r\n return purchaseOrderId?.TextValue;\r\n }\r\n return undefined;\r\n };\r\n\r\n /**\r\n * Method _getExtensionPropertyValue.\r\n * @param event -The checkout address properties.\r\n */\r\n private _onEditPurchaseOrderId = (event: React.ChangeEvent): void => {\r\n const textArea: HTMLInputElement | null =\r\n this.purchaseOrderIdRef && this.purchaseOrderIdRef.current && this.purchaseOrderIdRef.current;\r\n const purchaseOrderId = (this.purchaseOrderIdRef && this.purchaseOrderIdRef.current && this.purchaseOrderIdRef.current.value) || '';\r\n const text: string = purchaseOrderId;\r\n textArea!.value = text;\r\n this.setState({ purchaseOrderId: text });\r\n };\r\n\r\n /**\r\n * Method to render Purchase Order ID.\r\n */\r\n private _renderAddPurchaseOrderId = (): JSX.Element => {\r\n const { purchaseOrderId } = this.state;\r\n\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n };\r\n\r\n private readonly _updateAttributeValues = async (attributekey: string, value: string) => {\r\n await this.props.data.checkout.result?.checkoutCart.updateAttributeValues({\r\n newAttributeValues: [\r\n {\r\n // @ts-expect-error -- Need to provide data type.\r\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.AttributeTextValue',\r\n Name: attributekey,\r\n TextValue: value,\r\n ExtensionProperties: [],\r\n TextValueTranslations: []\r\n }\r\n ]\r\n });\r\n };\r\n\r\n private _renderShowPurchaseOrderId = (): JSX.Element => {\r\n const { purchaseOrderId } = this.state;\r\n\r\n return (\r\n
\r\n \r\n
\r\n {purchaseOrderId ? purchaseOrderId : this.props.resources.noPurchaseOrderIdText}\r\n
\r\n
\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, purchaseOrderId } = this.state;\r\n\r\n this._updateAttributeValues(purchaseOrderIdKey, purchaseOrderId).catch(error => {\r\n this.props.telemetry.error(`error in _updateExtensionProps ${error}`);\r\n });\r\n\r\n await this.submitEmail(email);\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 } 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 } 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 // Reset purchaseOrderId\r\n const purchaseOrderId = this._getAttributeValue(purchaseOrderIdKey);\r\n this.setState({ purchaseOrderId });\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 './nos-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 = ({\r\n moduleProps,\r\n showContactInfo,\r\n addContactInfo,\r\n addPurchaseOrderIdElement,\r\n showPurchaseOrderIdElement\r\n}) => {\r\n return (\r\n \r\n {showContactInfo && }\r\n {addContactInfo && }\r\n {addPurchaseOrderIdElement && addPurchaseOrderIdElement}\r\n {showPurchaseOrderIdElement && showPurchaseOrderIdElement}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutGuestProfileView;\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 } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpButton {\r\n id?: string;\r\n className: string;\r\n text: string;\r\n ariaLabel: string;\r\n disabled?: boolean;\r\n onClick?(event: React.MouseEvent): void;\r\n}\r\n\r\nconst SignUpButton: React.FC = ({ id, className, text, ariaLabel, disabled, onClick }) => (\r\n \r\n);\r\n\r\nexport default SignUpButton;\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 classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpErrorProps {\r\n id?: string;\r\n className: string;\r\n type?: string;\r\n message?: string;\r\n}\r\n\r\nconst SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\r\n const errorClassName = `${className}__${type}-error`;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default SignUpError;\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 { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpInputProps {\r\n id?: string;\r\n hasFocus?: boolean;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n type: any;\r\n value?: string;\r\n pattern?: string;\r\n className: string;\r\n maxLength?: string;\r\n readOnly?: boolean;\r\n onChange?(event: React.ChangeEvent): void;\r\n}\r\n\r\nexport interface ISignUpInput {\r\n key: string;\r\n AddressItem: INodeProps;\r\n label: React.ReactNode;\r\n alert: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nconst GetMaxLength = (maxLength?: string): number | undefined => {\r\n if (maxLength) {\r\n const parsedMaxLength = Number.parseInt(maxLength, 10);\r\n if (!isNaN(parsedMaxLength)) {\r\n return parsedMaxLength;\r\n }\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nconst SignUpInput: React.FC = ({ id, type, value, pattern, className, maxLength, readOnly, onChange }) => (\r\n \r\n);\r\n\r\nexport default SignUpInput;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpLabel {\r\n id: string;\r\n forId: string;\r\n className: string;\r\n text: string;\r\n}\r\n\r\nconst SignUpLabel: React.FC = ({ id, forId, className, text }) => (\r\n \r\n);\r\n\r\nexport default SignUpLabel;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpLoadingIcon {\r\n className: string;\r\n}\r\n\r\nconst SignUpLoadingIcon: React.FC = ({ className }) =>
;\r\n\r\nexport default SignUpLoadingIcon;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpLoadingMessage {\r\n className: string;\r\n message: string;\r\n}\r\n\r\nconst SignUpLoadingMessage: React.FC = ({ className, message }) => (\r\n
{message}
\r\n);\r\n\r\nexport default SignUpLoadingMessage;\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 classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface ISignUpSuccess {\r\n id?: string;\r\n className: string;\r\n type?: string;\r\n message?: string;\r\n}\r\n\r\nconst SignUpSuccess: React.FC = ({ id, className, type = 'page', message }) => {\r\n const successClassName = `${className}__${type}-success`;\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default SignUpSuccess;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { IModuleProps, INodeProps, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { EmailRegex } from '../../utilities/regex/email-regex';\r\nimport SignUpButtonComponent from './components/nos-sign-up-button';\r\nimport SignUpErrorComponent from './components/nos-sign-up-error';\r\nimport SignUpInputComponent from './components/nos-sign-up-input';\r\nimport SignUpLabelComponent from './components/nos-sign-up-label';\r\nimport SignUpLoadingIconComponent from './components/nos-sign-up-loading-icon';\r\nimport SignUpLoadingMessageComponent from './components/nos-sign-up-loading-message';\r\nimport SignUpSuccessComponent from './components/nos-sign-up-success';\r\nimport { INosSignUpConfig, INosSignUpProps, INosSignUpResources } from './nos-sign-up.props.autogenerated';\r\n\r\nexport interface ISignUpViewState {\r\n isShowLoading: boolean;\r\n}\r\n\r\nexport interface ISignUpItem {\r\n wrapper: INodeProps;\r\n key: string;\r\n label: React.ReactNode;\r\n errorMessage: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nexport interface ISignUpEmailVerification {\r\n isRequired: boolean;\r\n email: ISignUpItem;\r\n buttonWrapper: INodeProps;\r\n buttons: React.ReactNode[];\r\n successMessage: React.ReactNode[];\r\n errorMessage: React.ReactNode[];\r\n verificationControlWrapper: INodeProps;\r\n}\r\n\r\n/**\r\n * SignUp Given Name Verification Interface.\r\n */\r\nexport interface ISignUpGivenNameVerification {\r\n isRequired: boolean;\r\n givenName: ISignUpItem;\r\n errorMessage: React.ReactNode[];\r\n verificationControlWrapper: INodeProps;\r\n}\r\n\r\n/**\r\n * SignUp Surname Verification Interface.\r\n */\r\nexport interface ISignUpSurnameVerification {\r\n isRequired: boolean;\r\n surname: ISignUpItem;\r\n errorMessage: React.ReactNode[];\r\n verificationControlWrapper: INodeProps;\r\n}\r\n\r\nexport interface ISignUpLocalAccount {\r\n localAccount: INodeProps;\r\n items: ISignUpItem[];\r\n emailVerification: ISignUpEmailVerification;\r\n givenNameVerification: ISignUpGivenNameVerification;\r\n surnameVerification: ISignUpSurnameVerification;\r\n buttons: React.ReactNode[];\r\n errorMessage: React.ReactNode[];\r\n disclaimer: React.ReactNode;\r\n}\r\n\r\nexport interface ISignUpLoading {\r\n modal: INodeProps;\r\n modalBody: INodeProps;\r\n icon: React.ReactNode;\r\n message: React.ReactNode;\r\n}\r\n\r\nexport interface ISignUpViewProps {\r\n className: string;\r\n viewState: ISignUpViewState;\r\n loading: ISignUpLoading;\r\n signUp: IModuleProps;\r\n defaultAADConainer: INodeProps;\r\n aadConainer: INodeProps;\r\n heading: React.ReactNode;\r\n signUpLocalAccount: ISignUpLocalAccount;\r\n}\r\n\r\n/**\r\n *\r\n * SignUp component\r\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\r\n * Please ensure any change in module don't break contract with AAD.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass SignUp extends React.Component> {\r\n @observable private isGivenNameVerificationRequried: boolean;\r\n\r\n @observable private isSurnameVerificationRequried: boolean;\r\n\r\n private readonly moduleClassName: string = 'nos-sign-up';\r\n\r\n @observable private givenName: string;\r\n\r\n @observable private surname: string;\r\n\r\n @observable private email: string;\r\n\r\n @observable private emailRegex: string;\r\n\r\n @observable private isEmailVerificationRequried: boolean;\r\n\r\n @observable private isInitialized: boolean;\r\n\r\n @observable private templateVersion: string;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n private initializationTimer: any;\r\n constructor(props: INosSignUpProps) {\r\n super(props);\r\n this.givenName = '';\r\n this.surname = '';\r\n this.email = '';\r\n this.emailRegex = EmailRegex.defaultRegex.source;\r\n this.isEmailVerificationRequried = false;\r\n this.isGivenNameVerificationRequried = false;\r\n this.isSurnameVerificationRequried = false;\r\n this.isInitialized = false;\r\n this.templateVersion = '';\r\n }\r\n\r\n public componentDidMount(): void {\r\n this._onInit();\r\n }\r\n\r\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\r\n public componentDidUpdate(): void {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n window['$element']['initialize']();\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: INosSignUpProps, nextState: ISignUpViewState): 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 { config, resources } = this.props;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n viewState: {\r\n isShowLoading: !this.isInitialized\r\n },\r\n signUp: {\r\n moduleProps: this.props,\r\n className: classnames(this.moduleClassName, config.className)\r\n },\r\n loading: {\r\n modal: {\r\n tag: Modal,\r\n isOpen: true\r\n },\r\n modalBody: {\r\n tag: ModalBody\r\n },\r\n icon: ,\r\n message: \r\n },\r\n defaultAADConainer: {\r\n id: 'api',\r\n style: { display: 'none' }\r\n },\r\n aadConainer: {\r\n id: this.isInitialized ? 'api' : null,\r\n className: `${this.moduleClassName}__container`\r\n },\r\n heading: (\r\n \r\n ),\r\n signUpLocalAccount: this._renderLocalAccount()\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Handles heading content change event.\r\n * @param event - Content editable event.\r\n * @returns - Heading Text.\r\n */\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\r\n\r\n /**\r\n * Handles paragraph content change event.\r\n * @param event - Content editable event.\r\n * @returns - Paragraph Text.\r\n */\r\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.disclaimer = event.target.value);\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n public _onInit = () => {\r\n this._updateErrorMessage();\r\n this._prePopulateData();\r\n\r\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\r\n this.initializationTimer = setInterval(() => {\r\n this._isInitializationSuccessful();\r\n }, 100);\r\n setTimeout(() => {\r\n clearInterval(this.initializationTimer);\r\n }, 10_000);\r\n };\r\n\r\n // After successful AAD initialization, remove waiting and preload any data, if needed.\r\n private readonly _isInitializationSuccessful = () => {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\r\n clearInterval(this.initializationTimer);\r\n this.isInitialized = true;\r\n }\r\n };\r\n\r\n private readonly _prePopulateData = () => {\r\n const resources: INosSignUpResources = this.props.resources || {};\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n window['SA_FIELDS']['AttributeFields'].map(\r\n (obj: { ID: string; PRE: string; PAT: string; UX_INPUT_TYPE: string; PAT_DESC: string; VERIFY: boolean }) => {\r\n const value = obj.PRE ? this._htmlDecode(obj.PRE) : '';\r\n switch (obj.ID.toLowerCase()) {\r\n case 'emailverificationcontrol': {\r\n this.isEmailVerificationRequried = true;\r\n this.templateVersion = 'v2';\r\n break;\r\n }\r\n case 'email': {\r\n this.email = value;\r\n this.emailRegex = obj.PAT;\r\n this.isEmailVerificationRequried = obj.VERIFY;\r\n this.templateVersion = 'v1';\r\n break;\r\n }\r\n case 'givennameverificationcontrol': {\r\n this.isGivenNameVerificationRequried = true;\r\n break;\r\n }\r\n case 'givenname': {\r\n this.givenName = value;\r\n this.isGivenNameVerificationRequried = obj.VERIFY;\r\n break;\r\n }\r\n case 'surnameverificationcontrol': {\r\n this.isEmailVerificationRequried = true;\r\n break;\r\n }\r\n case 'surname': {\r\n this.surname = value;\r\n this.isSurnameVerificationRequried = obj.VERIFY;\r\n break;\r\n }\r\n default:\r\n }\r\n\r\n switch (obj.UX_INPUT_TYPE.toLowerCase()) {\r\n case 'emailbox': {\r\n obj.PAT_DESC = resources.invalidEmailAddressError;\r\n break;\r\n }\r\n default:\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n private _htmlDecode(str: string): string {\r\n const e = document.createElement('div');\r\n\r\n e.innerHTML = str;\r\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue || '';\r\n }\r\n\r\n private readonly _updateErrorMessage = () => {\r\n const resources: INosSignUpResources = this.props.resources || {};\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\r\n if (window && window['CONTENT']) {\r\n const errorMessages = {\r\n required_field: resources.requiredFieldMissingError\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\r\n Object.assign(window['CONTENT'], errorMessages);\r\n }\r\n };\r\n\r\n private readonly getValue = (v1Value: string, v2Value: string): string => {\r\n if (this.templateVersion) {\r\n return this.templateVersion === 'v1' ? v1Value : v2Value;\r\n }\r\n return '';\r\n };\r\n\r\n private _renderLocalAccount(): ISignUpLocalAccount {\r\n const { config, resources } = this.props;\r\n return {\r\n localAccount: {\r\n id: 'attributeList',\r\n className: `${this.moduleClassName}__account-items attr`\r\n },\r\n items: [\r\n this._renderInput(\r\n 'givenName',\r\n 'text',\r\n this.givenName,\r\n resources.firstNameLabelText,\r\n resources.firstNameMaxLength,\r\n '',\r\n '',\r\n true\r\n ),\r\n this._renderInput('surname', 'text', this.surname, resources.lastNameLabelText, resources.lastNameMaxLength, '', '', true),\r\n this._renderInput('email', 'email', this.email, resources.emailAddressLabelText, undefined, this.emailRegex, '', true)\r\n ],\r\n emailVerification: {\r\n isRequired: this.isEmailVerificationRequried,\r\n email: this._renderInput(\r\n this.getValue('email_ver_input', 'emailVerificationCode'),\r\n 'text',\r\n resources.verificationCodeLabelText,\r\n '',\r\n undefined,\r\n undefined,\r\n 'VerificationCode'\r\n ),\r\n verificationControlWrapper: {\r\n id: 'emailVerificationControl',\r\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\r\n },\r\n buttonWrapper: {\r\n className: `${this.moduleClassName}__email-verification-buttons ${this.getValue('verify', '')}`,\r\n 'data-claim_id': 'email'\r\n },\r\n buttons: [\r\n ,\r\n ,\r\n ,\r\n \r\n ],\r\n successMessage: [\r\n ,\r\n \r\n ],\r\n errorMessage: [\r\n ,\r\n ,\r\n ,\r\n ,\r\n ,\r\n ,\r\n \r\n ]\r\n },\r\n givenNameVerification: {\r\n isRequired: this.isGivenNameVerificationRequried,\r\n givenName: this._renderInput(\r\n this.getValue('givenName_ver_input', 'givenNameVerificationCode'),\r\n 'text',\r\n '',\r\n resources.verificationCodeLabelText,\r\n undefined,\r\n undefined,\r\n 'VerificationCode'\r\n ),\r\n verificationControlWrapper: {\r\n id: 'givenNameVerificationControl',\r\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\r\n },\r\n errorMessage: [\r\n \r\n ]\r\n },\r\n surnameVerification: {\r\n isRequired: this.isSurnameVerificationRequried,\r\n surname: this._renderInput(\r\n this.getValue('surname_ver_input', 'surnameVerificationCode'),\r\n 'text',\r\n '',\r\n resources.verificationCodeLabelText,\r\n undefined,\r\n undefined,\r\n 'VerificationCode'\r\n ),\r\n verificationControlWrapper: {\r\n id: 'surnameVerificationControl',\r\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\r\n },\r\n errorMessage: [\r\n \r\n ]\r\n },\r\n buttons: [\r\n ,\r\n \r\n ],\r\n errorMessage: [\r\n ,\r\n ,\r\n \r\n ],\r\n disclaimer: config.disclaimer && (\r\n \r\n )\r\n };\r\n }\r\n\r\n private _renderInput(\r\n id: string,\r\n type: string,\r\n value: string,\r\n labelText: string,\r\n maxLength?: string,\r\n pattern?: string,\r\n cssClassName?: string,\r\n readOnly?: boolean\r\n ): ISignUpItem {\r\n const className = `${this.moduleClassName}__account-item`;\r\n return {\r\n wrapper: {\r\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry', cssClassName)\r\n },\r\n key: id,\r\n label: (\r\n \r\n ),\r\n errorMessage: (\r\n \r\n ),\r\n input: (\r\n \r\n )\r\n };\r\n }\r\n}\r\n\r\nexport default SignUp;\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 {\r\n ISignUpEmailVerification,\r\n ISignUpGivenNameVerification,\r\n ISignUpItem,\r\n ISignUpLoading,\r\n ISignUpLocalAccount,\r\n ISignUpSurnameVerification,\r\n ISignUpViewProps\r\n} from './nos-sign-up';\r\n\r\nconst SignUpItem: React.FC = ({ wrapper, label, errorMessage, input }) => {\r\n return (\r\n \r\n {label}\r\n {errorMessage}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst SignUpEmailVerification: React.FC = ({ email, buttonWrapper, buttons, successMessage, errorMessage }) => {\r\n return (\r\n <>\r\n {successMessage &&\r\n successMessage.map((message: React.ReactNode) => {\r\n return <>{message};\r\n })}\r\n \r\n {errorMessage &&\r\n errorMessage.map((message: React.ReactNode) => {\r\n return <>{message};\r\n })}\r\n \r\n {buttons &&\r\n buttons.map((button: React.ReactNode) => {\r\n return <>{button};\r\n })}\r\n \r\n \r\n );\r\n};\r\n\r\n/**\r\n * Handles validation of sign-up givenName.\r\n * @param event - Content editable event.\r\n * @param event.givenName - Event Given Name.\r\n * @param event.errorMessage - Event Error Message.\r\n * @returns - Error Message for Given Name.\r\n */\r\nconst SignUpGivenNameVerificationComponent: React.FC = ({ givenName, errorMessage }) => {\r\n return (\r\n <>\r\n \r\n {errorMessage.map((message: React.ReactNode) => {\r\n return <>{message};\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Handles validation of signUp surname.\r\n * @param event - Content editable event.\r\n * @param event.surname - Event surname.\r\n * @param event.errorMessage - Event Error Message.\r\n * @returns - Error Message for surname.\r\n */\r\nconst SignUpSurnameVerificationComponent: React.FC = ({ surname, errorMessage }) => {\r\n return (\r\n <>\r\n \r\n {errorMessage.map((message: React.ReactNode) => {\r\n return <>{message};\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst LocalAccount: React.FC = ({\r\n localAccount,\r\n items,\r\n emailVerification,\r\n givenNameVerification,\r\n surnameVerification,\r\n buttons,\r\n errorMessage,\r\n disclaimer\r\n}) => {\r\n return (\r\n \r\n {items &&\r\n items.map((item: ISignUpItem) => {\r\n if (item.key === 'email' && emailVerification.isRequired) {\r\n return (\r\n // eslint-disable-next-line react/jsx-key\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n if (item.key === 'givenName' && givenNameVerification.isRequired) {\r\n return (\r\n // eslint-disable-next-line react/jsx-key\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n if (item.key === 'surname' && surnameVerification.isRequired) {\r\n return (\r\n // eslint-disable-next-line react/jsx-key\r\n \r\n \r\n \r\n \r\n );\r\n }\r\n // eslint-disable-next-line react/jsx-key\r\n return ;\r\n })}\r\n {errorMessage &&\r\n errorMessage.map((error: React.ReactNode, index: number) => {\r\n return {error};\r\n })}\r\n {buttons &&\r\n buttons.map((button: React.ReactNode, index: number) => {\r\n return {button};\r\n })}\r\n {disclaimer}\r\n \r\n );\r\n};\r\n\r\nconst SignUpLoading: React.FC = ({ modal, modalBody, icon, message }) => {\r\n return (\r\n \r\n \r\n {icon}\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nconst SignUpView: React.FC = props => {\r\n const { signUp, viewState, loading, defaultAADConainer, aadConainer, heading, signUpLocalAccount } = props;\r\n\r\n return (\r\n \r\n {viewState.isShowLoading && }\r\n {viewState.isShowLoading && }\r\n \r\n {heading}\r\n {LocalAccount(signUpLocalAccount)}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SignUpView;\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/**\r\n * Regular expressions to validate emails.\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class\r\nexport abstract class EmailRegex {\r\n /**\r\n * Represents a HTML5 Validation Regex.\r\n *\r\n * A valid email address is a string that matches the email production of the following ABNF, the character set for which is Unicode.\r\n * This ABNF implements the extensions described in RFC 1123.\r\n *\r\n * For more info: https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address.\r\n */\r\n // eslint-disable-next-line security/detect-unsafe-regex\r\n public static readonly html5EmailRegex = /^[a-zA-Z0-9.!#$%&'*+=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/;\r\n\r\n /**\r\n * Returns a default regex which should be used for most email validation cases.\r\n *\r\n * As of now, the default regex is HTML5 email regex standard.\r\n * @see EmailRegex.html5EmailRegex - The regex which is set to be default right now.\r\n *\r\n * @returns Regular expression for email validation.\r\n */\r\n public static get defaultRegex(): RegExp {\r\n return EmailRegex.html5EmailRegex;\r\n }\r\n}\r\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';\nimport { isOboRequest } from '@msdyn365-commerce/core-internal';\nimport { IMsdyn365PvaChatConnectorData } from './msdyn365-pva-chat-connector.data';\nimport { IMsdyn365PvaChatConnectorConfig, IMsdyn365PvaChatConnectorProps } from './msdyn365-pva-chat-connector.props.autogenerated';\n\nexport interface IPvaChatConnectorViewProps extends IMsdyn365PvaChatConnectorProps {\n config: IMsdyn365PvaChatConnectorConfig;\n}\n\n/**\n * PvaChatConnector component\n * @extends {React.PureComponent>}\n */\nclass PvaChatConnector extends React.PureComponent> {\n // Loads CDN version of Botframework-Webchat library\n public componentDidMount(): void {\n if (isOboRequest(this.props.context.request)) {\n return;\n }\n\n const url = this.props.config.botFrameworkCDNURL || this.props.context.app.config.pvaChatConnectorBotFrameworkCDNURL;\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.crossOrigin = 'anonymous';\n document.body.appendChild(script);\n }\n\n public render(): JSX.Element | null {\n if (isOboRequest(this.props.context.request)) {\n return null;\n }\n\n return this.props.renderView(this.props);\n }\n}\n\nexport default PvaChatConnector;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProactiveChatTrigger } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\n\n/**\n * ProactiveChatTrigger class - checks if Proactive Chat should be triggered, starts the chat and sets context\n */\nabstract class ProactiveChatTrigger implements IProactiveChatTrigger {\n public props: IPvaChatConnectorViewProps;\n public context: IChatContext;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n this.props = props;\n this.context = context;\n }\n\n /**\n * Generates Chat Context with included properties related to Proactive Chat\n * @returns TContextProvider - Chat Context\n */\n public abstract getContextProvider(): TContextProvider;\n\n /**\n * Generates chat welcome message to be used if Proactive Chat is triggered\n * @returns string - chat welcome message\n */\n public abstract getMessage(): string;\n\n /**\n * Validate specific trigger conditions if Proactive Chat should be initiated\n * @returns boolean (TRUE if Proactive Chat should be triggered)\n */\n public abstract validate(): Promise;\n}\n\nexport default ProactiveChatTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartAmountTrigger class - proactive chat is triggered if cArt amount is in preset boundaries (config.proactiveOnCartAmountMin, config.proactiveOnCartAmountMax)\n */\nclass CartAmountTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private totalInCart: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartAmountMin;\n this.max = this.props.config.proactiveOnCartAmountMax;\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Cart amount proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartAmountTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.totalInCart = cart.cart.TotalAmount || 0;\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.totalInCart && this.totalInCart <= this.max;\n } else {\n retVal = this.min <= this.totalInCart;\n }\n } else {\n if (this.max) {\n retVal = this.totalInCart <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Validation result: '${retVal}'; Cart total: '${this.totalInCart}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Amount',\n eCommerceCustProactiveShoppingCartAmount: `${this.totalInCart}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartAmountMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartAmountTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartNumberOfItemsTrigger class - proactive chat is triggered if Cart Number of Items is in preset boundaries (config.proactiveOnCartNoOfItemsMin, config.proactiveOnCartNoOfItemsMax)\n */\nclass CartNumberOfItemsTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private numberOfItems: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartNoOfItemsMin;\n this.max = this.props.config.proactiveOnCartNoOfItemsMax;\n\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Cart number of items proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartNumberOfItemsTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.numberOfItems = cart.cart.TotalItems || 0;\n\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.numberOfItems && this.numberOfItems <= this.max;\n } else {\n retVal = this.min <= this.numberOfItems;\n }\n } else {\n if (this.max) {\n retVal = this.numberOfItems <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Validation result: '${retVal}'; Number of items in cart: '${this.numberOfItems}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Number of Items',\n eCommerceCustProactiveShoppingCartNumberOfItems: `${this.numberOfItems}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartNoOfItemsMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartNumberOfItemsTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartSpecificProductTrigger class - proactive chat is triggered if a Product in the Cart is in preset list of products (config.proactiveOnCartSpecificProductList)\n */\nclass CartSpecificProductTrigger extends ProactiveChatTrigger {\n private product: string = '';\n\n public async validate(): Promise {\n let isValid = false;\n const cart = await this._getCart();\n if (!cart.isEmpty) {\n if (cart.cart.CartLines) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart line items was '${cart.cart.CartLines?.length}'`\n );\n for (let i = 0; i < cart.cart.CartLines?.length; i++) {\n if (cart.cart.CartLines[i]) {\n if (this.props.config.proactiveOnCartSpecificProductList) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart specific products was configured for proactive chat was '${this.props.config.proactiveOnCartSpecificProductList?.length}'`\n );\n // Find first item, from user-defined list of products, that matches the cart lines' itemId in the cart.\n for (let j = 0; j < (this.props.config.proactiveOnCartSpecificProductList?.length || 0); j++) {\n if (\n this.props.config.proactiveOnCartSpecificProductList &&\n cart.cart.CartLines[i].ItemId &&\n this.props.config.proactiveOnCartSpecificProductList[j] === cart.cart.CartLines[i].ItemId\n ) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Matched cart line item ID '${cart.cart.CartLines[i].ItemId}' against user-defined list of specific products for proactive chat.`\n );\n isValid = true;\n break;\n }\n }\n }\n } else {\n // Rest of the CartLines are undefined\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart did not contain any cart lines.`);\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart was empty.`);\n }\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Specific Product',\n eCommerceCustProactiveShoppingCartSpecificProduct: `${this.product}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartSpecificProductMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartSpecificProductTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum ProactiveChatNames {\n DateRange = 'Date Range',\n FromSpecificPage = 'From Specific Page',\n PageVisits = 'Page Visits',\n SpecificLocation = 'Specific Location',\n SpecificPage = 'Specific Page',\n WaitOnTime = 'Wait On Time'\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * DateRangeTrigger class - proactive chat is triggered if current date is in preset date boundaries (config.proactiveOnDateRangeStart, config.proactiveOnDateRangeEnd)\n */\nclass DateRangeTrigger extends ProactiveChatTrigger {\n private start?: Date;\n private end?: Date;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.start = this._toDate(this.props.config.proactiveOnDateRangeStart);\n this.end = this._toDate(this.props.config.proactiveOnDateRangeEnd);\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Proactive chat initialized with startDate: '${this.start}'; max: '${this.end}'.`\n );\n }\n\n public async validate(): Promise {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n\n let retVal = false;\n if (this.start) {\n if (this.end) {\n retVal = this.start.getTime() <= now.getTime() && now.getTime() <= this.end.getTime();\n } else {\n retVal = this.start.getTime() <= now.getTime();\n }\n } else if (this.end) {\n retVal = now.getTime() <= this.end.getTime();\n }\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Validation result: '${retVal}'; Current date used to compare: '${now}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.DateRange,\n eCommerceCustProactiveFromDate: this.start ? this.start.toUTCString() : '',\n eCommerceCustProactiveToDate: this.end ? this.end.toUTCString() : ''\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnDateRangeMessage || this.props.config.proactiveDefaultMessage;\n }\n\n /**\n * Converts string(us-en) to date\n * @param date string (mm/dd/yyyy)\n * @returns Date or undefined\n */\n private _toDate(date?: string): Date | undefined {\n if (date) {\n const dateParts = date.split('/');\n return new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]);\n } else {\n return undefined;\n }\n }\n}\n\nexport default DateRangeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * FromSpecificPageTrigger class - proactive chat is triggered if user has come from specific page (the one listed in config.proactiveOnFromSpecificPageList)\n */\nclass FromSpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnFromSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Number of items in user-defined list of 'From Specific Page' was '${this.props.config.proactiveOnFromSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnFromSpecificPageList?.length || 0); i++) {\n const fromSpecificPageTrimmed: string = this.props.config.proactiveOnFromSpecificPageList[i].trim();\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] Current page URL: '${window.document.referrer}'.`\n );\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Current item from user-defined list of 'From Specific Page': '${fromSpecificPageTrimmed}'.`\n );\n\n if (window.document.referrer.indexOf(fromSpecificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] User-defined 'From Specific Page' list was undefined.`\n );\n }\n this.props.context.telemetry.debug(`[Chat][${FromSpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.FromSpecificPage,\n eCommerceCustProactiveCameFromPage: window.document.referrer\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnFromSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default FromSpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICookieContext } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/ICookieContext';\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * PageVisitTrigger class - proactive chat is triggered if user has visited current page for (config.proactiveOnPageVisitNumber) or more times\n */\nclass PageVisitTrigger extends ProactiveChatTrigger {\n public visits: number = 0;\n private cookieName: string = 'TimesPageVisited';\n private expdate: Date;\n private cookies: ICookieContext;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.cookies = this.props.context.request.cookies;\n this.expdate = new Date();\n // Set expiry date to 365 days.\n this.expdate.setTime(this.expdate.getTime() + 24 * 60 * 60 * 1000 * 365);\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie expiry date set to: '${this.expdate}'.`);\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie context is given: '${this.cookies.isConsentGiven()}'.`);\n if (this.cookies.isConsentGiven()) {\n this.cookies.setConsentCookie();\n }\n\n this._updateVisitCounter();\n }\n\n public async validate(): Promise {\n let retVal: boolean = false;\n\n if (this.props.config.proactiveOnPageVisitNumber) {\n retVal = this.visits >= this.props.config.proactiveOnPageVisitNumber;\n }\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Validation result: '${retVal}'.`);\n return retVal;\n }\n\n public clear(): void {\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Clearing cookie for page visit counter.`);\n this.cookies.set(this.cookieName, 0, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.PageVisits,\n eCommerceCustProactiveNumberOfVisits: `${this.visits}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnPageVisitMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private _updateVisitCounter(): void {\n this.visits = this.cookies.get(this.cookieName).value || 0;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter BEFORE update: '${this.visits}.`);\n ++this.visits;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter AFTER update: '${this.visits}.`);\n\n this.cookies.set(this.cookieName, this.visits, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n}\n\nexport default PageVisitTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IExtendedRequest } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if user geographically uses the website from specific country/regions(config.proactiveOnSpecificCountryRegionCountry)\n */\nclass SpecificCountryRegionTrigger extends ProactiveChatTrigger {\n private customerCountryCode: string;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.customerCountryCode = (this.props.context.request).suggestedMarket || 'n/a';\n this.props.context.telemetry.debug(\n `[${SpecificCountryRegionTrigger.name}] Customer country code set to: '${this.customerCountryCode}.'`\n );\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.props.config.proactiveOnSpecificLocation\n ? this.props.config.proactiveOnSpecificLocation.toLowerCase().indexOf(this.customerCountryCode.toLowerCase()) > -1\n : false;\n this.props.context.telemetry.debug(`[Chat][${SpecificCountryRegionTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveCountryCode: this.props.config.proactiveOnSpecificLocation || '',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificLocation\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificCountryRegionMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificCountryRegionTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if current page is listed in config.proactiveOnSpecificPageList\n */\nclass SpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${SpecificPageTrigger.name}] Number of items in user-defined list of 'Specific Pages' was '${this.props.config.proactiveOnSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnSpecificPageList?.length || 0); i++) {\n const specificPageTrimmed: string = this.props.config.proactiveOnSpecificPageList[i].trim();\n this.props.context.telemetry.debug(`[] Current location URL: ${window.location.href}.`);\n this.props.context.telemetry.debug(`[] Current item from user-defined list of 'Specific Page': ${specificPageTrimmed}.`);\n if (window.location.href.indexOf(specificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] User-defined 'Specific Page' list was undefined.`);\n }\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificPage\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * WaitOnTimeTrigger - proactive chat is triggered if user stays on current page for more than (config.proactiveOnWaitTimeSeconds) seconds\n */\nclass WaitOnTimeTrigger extends ProactiveChatTrigger {\n private waitTimeInMilliseconds: number | undefined;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n if (this.props.config.proactiveOnWaitTimeSeconds && !isNaN(this.props.config.proactiveOnWaitTimeSeconds)) {\n this.waitTimeInMilliseconds = Number(this.props.config.proactiveOnWaitTimeSeconds) * 1000;\n this.props.context.telemetry.debug(\n `[Chat][${WaitOnTimeTrigger.name}] Wait time (ms) set to: '${this.waitTimeInMilliseconds}'.`\n );\n }\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.waitTimeInMilliseconds !== undefined;\n this.props.context.telemetry.debug(`[Chat][${WaitOnTimeTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n const triggerTime = Date.now() + (this.waitTimeInMilliseconds || 0);\n return () => {\n return triggerTime > Date.now()\n ? this.context\n : {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.WaitOnTime,\n eCommerceCustProactiveTimeOnPage: `${this.waitTimeInMilliseconds ? this.waitTimeInMilliseconds : 0}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnWaitTimeMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default WaitOnTimeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport CartAmountTrigger from './triggers/cart-amount-trigger';\nimport CartNumberOfItemsTrigger from './triggers/cart-number-of-items-trigger';\nimport CartSpecificProductTrigger from './triggers/cart-specific-product-trigger';\nimport DateRangeTrigger from './triggers/date-range-trigger';\nimport FromSpecificPageTrigger from './triggers/from-specific-page-trigger';\nimport PageVisitTrigger from './triggers/page-visits-trigger';\nimport SpecificCountryRegionTrigger from './triggers/specific-CountryRegion-trigger';\nimport SpecificPageTrigger from './triggers/specific-page-trigger';\nimport WaitOnTimeTrigger from './triggers/wait-on-time-trigger';\n\ntype ProactiveChat =\n | typeof DateRangeTrigger\n | typeof SpecificPageTrigger\n | typeof FromSpecificPageTrigger\n | typeof PageVisitTrigger\n | typeof SpecificCountryRegionTrigger\n | typeof CartAmountTrigger\n | typeof CartNumberOfItemsTrigger\n | typeof CartSpecificProductTrigger\n | typeof WaitOnTimeTrigger;\n\n/**\n * List of Proactive Chat Validators in order of validation (first proactive chat that pass validation is triggered, the rest are ommited)\n */\nexport const ProactiveTriggers: ProactiveChat[] = [\n DateRangeTrigger,\n SpecificPageTrigger,\n FromSpecificPageTrigger,\n PageVisitTrigger,\n SpecificCountryRegionTrigger,\n CartAmountTrigger,\n CartNumberOfItemsTrigger,\n CartSpecificProductTrigger,\n WaitOnTimeTrigger\n];\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRequestContextUser } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/IRequestContext';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ProactiveTriggers } from '../proactive';\nimport ProactiveChatTrigger from '../proactive/triggers/proactive-chat-trigger';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { IProactiveData } from './../interfaces';\nimport { IChatContext, TContextProvider } from '../../interfaces';\n\n/**\n *\n * ContextProvider class - generates chat context, and checks for proactive triggers\n */\nclass ContextProvider {\n public data: IProactiveData;\n public props: IPvaChatConnectorViewProps;\n private user: IRequestContextUser;\n private userId: string;\n private context: IChatContext;\n private provider: TContextProvider | undefined;\n\n constructor(props: IPvaChatConnectorViewProps) {\n this.props = props;\n this.user = this.props.context.request.user;\n this.userId = `dl_${uuidv4()}`;\n this.context = this._getContext();\n // Proactive Chat related data\n this.data = {\n enabled: false,\n timeout: this.props.config.proactiveOnWaitTimeSeconds || 0,\n message: this.props.config.proactiveDefaultMessage\n };\n }\n\n /**\n * Executes Proactive Chat validation\n * @returns TContextProvider - a function returning IChatContext object\n */\n public async init(): Promise {\n try {\n await this._proactiveCheck();\n } catch (e) {\n // Use ?debug=true to see telemetry\n // If previous block fails, chat will still be available (no need to display any errors to user)\n this.props.telemetry.exception(e);\n }\n return this.provider || this._getProvider();\n }\n\n /**\n * Returns TContextProvider - a function returning IChatContext object\n */\n private _getProvider(): TContextProvider {\n return () => {\n return {\n eCommerceOperatingUnitNumber: this.props.context.request.apiSettings.oun,\n eCommerceBaseUrl: this.props.context.request.apiSettings.baseUrl,\n eCommerceDataAreaId: this.props.context.request.channel?.InventLocationDataAreaId,\n UserId: this.userId,\n // eCommerceCust...\n AccountNumber: this.user.customerAccountNumber ? this.user.customerAccountNumber : 'N/A',\n Email: this.user.emailAddress ? this.user.emailAddress : 'N/A',\n FirstName: this.user.firstName ? this.user.firstName : this.props.config.anonymousUserName,\n LastName: this.user.lastName ? this.user.lastName : 'N/A',\n Name: this.user.name ? this.user.name : this.props.config.anonymousUserName,\n eCommerceCustPageURL: window.location.href,\n eCommerceCustChatType: 'pva',\n // Proactive chat\n eCommerceCustIsProactiveChat: 'False',\n eCommerceCustProactiveType: 'N/A',\n // Date Range\n eCommerceCustProactiveFromDate: 'N/A',\n eCommerceCustProactiveToDate: 'N/A',\n // From Specific Page\n eCommerceCustProactiveCameFromPage: 'N/A',\n // No. Page Visits\n eCommerceCustProactiveNumberOfVisits: 'N/A',\n // Specific CountryRegion\n eCommerceCustProactiveCountryCode: 'N/A',\n // Specific Page => eCommerceCustPageURL\n // eCommerceCustProactiveSpecificPage: 'N/A',\n // Wait On Time\n eCommerceCustProactiveTimeOnPage: 'N/A',\n // Shopping cart amount\n eCommerceCustProactiveShoppingCartAmount: 'N/A',\n // Shopping cart number of items\n eCommerceCustProactiveShoppingCartNumberOfItems: 'N/A',\n // Shopping cart specific product\n eCommerceCustProactiveShoppingCartSpecificProduct: 'N/A'\n };\n };\n }\n\n /**\n * Returns default IChatContext object\n */\n private _getContext(): IChatContext {\n return this._getProvider()();\n }\n\n /**\n * Validates proactive triggers to check if proactive chat should be initialized\n */\n private async _proactiveCheck(): Promise {\n if (this.props.config.proactiveChatEnabled) {\n for (let i = 0; i < ProactiveTriggers.length; i++) {\n const proactive = new ProactiveTriggers[i](this.props, this.context);\n // Only first detected proactive trigger gets executed\n if (await this._isProactive(proactive)) {\n this.props.context.telemetry.debug(`First detected proactive trigger to be executed: ${proactive}`);\n break;\n }\n }\n }\n }\n\n /**\n * Validates if proactive chat should be triggered for given ProactiveTrigger\n * @param proactive ProactiveChatTrigger\n * @returns boolean\n */\n private async _isProactive(proactive: ProactiveChatTrigger): Promise {\n this.data.enabled = await proactive.validate();\n if (this.data.enabled) {\n this.provider = proactive.getContextProvider();\n this.data.message = proactive.getMessage();\n }\n return this.data.enabled;\n }\n}\n\nexport default ContextProvider;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Style generating functions\n */\nimport { IAvatarStyling, IBubbleStyling, IChatCustomStyle, IChatStyling, IOtherStyling, ISuggestedActionStyling } from '../interfaces';\nimport { IMsdyn365PvaChatConnectorConfig } from '../msdyn365-pva-chat-connector.props.autogenerated';\n\nconst getChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n position: config.position || 'inherit',\n top: config.top ? config.top : 'inherit',\n right: config.right ? config.right : 'inherit',\n bottom: config.bottom ? config.bottom : 'inherit',\n left: config.left ? config.left : 'inherit',\n zIndex: 1000,\n display: 'flex',\n justifyContent: 'flex-end'\n };\n};\n\nconst getMaximizedChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig, isMobileDevice: boolean): React.CSSProperties => {\n if (isMobileDevice) {\n return {\n height: '90%',\n width: '100%',\n bottom: '0.5em',\n right: '0',\n padding: '5px'\n };\n }\n return {\n height: config.chatHeight ? config.chatHeight : '80%',\n width: config.chatWidth ? config.chatWidth : 'inherit'\n };\n};\n\nconst getChatButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n display: 'flex',\n alignItems: 'center',\n backgroundColor: config.startChatButtonBackgroundColor || 'white',\n color: config.startChatButtonTextColor || 'inherit',\n borderColor: config.startChatButtonBorderColor || 'inherit',\n borderRadius: config.startChatButtonBorderRadius || '0px',\n borderStyle: config.startChatButtonBorderStyle || 'solid',\n borderWidth: config.startChatButtonBorderWidth ? config.startChatButtonBorderWidth : '0px',\n padding: config.storeLogoURL ? '2px 20px 2px 2px' : '10px 20px 10px 20px',\n cursor: 'pointer',\n outlineStyle: 'none',\n alignSelf: 'flex-end',\n boxShadow: '0 0 4px rgba(102,102,102,.5)',\n WebkitBoxShadow: '0 0 4px rgba(102,102,102,.5)',\n MozBoxShadow: '0 0 4px rgba(102,102,102,.5)'\n };\n};\n\nconst getButtonStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n marginRight: '12px',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n margin: '5px 12px 5px 5px',\n alignSelf: 'center',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatMessagesStyle = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean): React.CSSProperties => {\n return {\n display: minimized ? 'none' : 'block',\n backgroundColor: config.backgroundColor || 'White',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n };\n};\n\nconst getChatMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n width: '100%',\n position: 'absolute',\n top: config.chatHeaderHeight ? `-${config.chatHeaderHeight}` : '',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getMinimizeButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n borderTop: 'none',\n borderLeft: 'none',\n borderRight: 'none',\n borderBottom: `solid 2px ${config.headerTextColor || 'White'}`,\n backgroundColor: 'transparent',\n padding: '5px 10px 3px 10px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getCloseButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n border: 'none',\n color: config.headerTextColor || 'White',\n backgroundColor: 'transparent',\n padding: '0px 0px 0px 7px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getChatMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n height: '100%',\n width: '100%',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n flexDirection: 'column',\n display: 'flex',\n justifyContent: 'flex-end',\n backgroundColor: config.backgroundColor || 'White'\n };\n};\n\nconst getProactiveMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n boxSizing: 'border-box',\n width: '100%',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n width: '100%',\n padding: '10px 20px',\n boxSizing: 'border-box',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n color: config.headerTextColor || 'inherit',\n cursor: 'pointer',\n padding: '5px 10px',\n outline: 'none',\n border: 'none',\n backgroundColor: config.headerBackgroundColor || 'inherit',\n borderRadius: '25px'\n };\n};\n\nconst getRedDotStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n background: 'Red',\n borderRadius: '50%',\n height: '5px',\n width: '5px',\n position: 'absolute',\n right: '10px',\n bottom: '33px'\n };\n};\n\n/**\n * Generates styles for the chat wrapper, and proactive chat parts\n * @param config IMsdyn365PvaChatConnectorConfig\n * @param minimized boolean\n * @returns IChatCustomStyle\n */\nexport const getChatStyling = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean, isMobileDevice: boolean): IChatCustomStyle => {\n return {\n ChatWrapperStyle: getChatWrapperStyle(config),\n MaximizedChatWrapperStyle: getMaximizedChatWrapperStyle(config, isMobileDevice),\n ChatButtonStyle: getChatButtonStyle(config),\n ButtonStoreLogoStyle: getButtonStoreLogoStyle(config),\n ChatStoreLogoStyle: getChatStoreLogoStyle(config),\n ChatMessagesStyle: getChatMessagesStyle(config, minimized),\n ChatMessageHeader: getChatMessageHeader(config),\n MinimizeButtonStyle: getMinimizeButtonStyle(config),\n CloseButtonStyle: getCloseButtonStyle(config),\n ChatMessageContent: getChatMessageContent(config),\n ProactiveWrapperStyle: getProactiveWrapperStyle(config),\n ProactiveMessageHeader: getProactiveMessageHeader(config),\n ProactiveMessageContent: getProactiveMessageContent(config),\n ProactiveButtonStyle: getProactiveButtonStyle(config),\n RedDotStyle: getRedDotStyle(config)\n };\n};\n\nconst fontFormat = (font?: string): string | undefined => {\n if (font && font.length > 0) {\n const arr = font.split(',');\n for (let i = 0; i < arr.length; i++) {\n arr[i] = `'${arr[i].trim()}'`;\n }\n font = arr.join(', ');\n } else {\n font = \"'Calibri', 'Helvetica Neue', 'Arial', 'sans-serif'\";\n }\n\n return font;\n};\n\nconst getBubbleStyling = (config: IMsdyn365PvaChatConnectorConfig): IBubbleStyling => {\n return {\n bubbleBackground: config.bubbleBackground || 'White',\n bubbleTextColor: config.bubbleTextColor || 'Black',\n bubbleBorderColor: config.bubbleBorderColor || '#e6e6e6',\n bubbleBorderRadius: config.bubbleBorderRadius || '2',\n bubbleBorderStyle: config.bubbleBorderStyle || 'solid',\n bubbleBorderWidth: config.bubbleBorderWidth || '1',\n bubbleFromUserBackground: config.bubbleFromUserBackground || 'White',\n bubbleFromUserTextColor: config.bubbleFromUserTextColor || 'Black',\n bubbleFromUserBorderColor: config.bubbleFromUserBorderColor || '#e6e6e6',\n bubbleFromUserBorderRadius: config.bubbleFromUserBorderRadius || '2',\n bubbleFromUserBorderStyle: config.bubbleFromUserBorderStyle || 'solid',\n bubbleFromUserBorderWidth: config.bubbleFromUserBorderWidth || '1'\n };\n};\n\n// eslint-disable-next-line complexity\nconst getOtherStyling = (config: IMsdyn365PvaChatConnectorConfig): IOtherStyling => {\n return {\n groupTimestamp: config.groupTimestamp || true,\n sendTimeout: config.sendTimeout || '20000',\n sendTimeoutForAttachments: config.sendTimeoutForAttachments || '120000',\n timestampColor: config.timestampColor || 'undefined',\n timestampFormat: config.timestampFormat || 'undefined',\n notificationDebounceTimeout: config.notificationDebounceTimeout || '400',\n hideToaster: config.hideToaster || true,\n toasterHeight: config.toasterHeight || '32',\n toasterMaxHeight: config.toasterMaxHeight || '32 * 5',\n toasterSingularMaxHeight: config.toasterSingularMaxHeight || '50',\n toastFontSize: config.toastFontSize || '87.5%',\n toastIconWidth: config.toastIconWidth || '36',\n toastSeparatorColor: config.toastSeparatorColor || '#E8EAEC',\n toastTextPadding: config.toastTextPadding || '6',\n toastErrorBackgroundColor: config.toastErrorBackgroundColor || '#FDE7E9',\n toastErrorColor: config.toastErrorColor || '#A80000',\n toastInfoBackgroundColor: config.toastInfoBackgroundColor || '#CEF1FF',\n toastInfoColor: config.toastInfoColor || '#105E7D',\n toastSuccessBackgroundColor: config.toastSuccessBackgroundColor || '#DFF6DD',\n toastSuccessColor: config.toastSuccessColor || '#107C10',\n toastWarnBackgroundColor: config.toastWarnBackgroundColor || '#FFF4CE',\n toastWarnColor: config.toastWarnColor || '#3B3A39',\n typingAnimationBackgroundImage: config.typingAnimationBackgroundImage || 'undefined',\n typingAnimationDuration: config.typingAnimationDuration || '5000',\n typingAnimationHeight: config.typingAnimationHeight || '20',\n typingAnimationWidth: config.typingAnimationWidth || '64',\n videoHeight: config.videoHeight || '270',\n markdownExternalLinkIconImage:\n config.markdownExternalLinkIconImage ||\n 'url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDA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mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjMjEyMTIxIiAvPjwvc3ZnPg==)',\n markdownRespectCRLF: config.markdownRespectCRLF || 'true',\n internalLiveRegionFadeAfter: config.internalLiveRegionFadeAfter || '1000',\n accent: config.accent || '#0063B1',\n subtle: config.subtle || '#767676'\n };\n};\n\nconst getAvatarStyling = (config: IMsdyn365PvaChatConnectorConfig): IAvatarStyling => {\n return {\n avatarBorderRadius: config.avatarBorderRadius || '50%',\n avatarSize: config.avatarSize || '40',\n botAvatarBackgroundColor: config.botAvatarBackgroundColor || 'undefined',\n botAvatarImage: config.botAvatarImage || '',\n botAvatarInitials: config.botAvatarInitials || '',\n userAvatarBackgroundColor: config.userAvatarBackgroundColor || 'undefined',\n userAvatarImage: config.userAvatarImage || '',\n userAvatarInitials: config.userAvatarInitials || '',\n showAvatarInGroup: config.showAvatarInGroup || 'status'\n };\n};\n\nconst getSuggestedActionStyling = (config: IMsdyn365PvaChatConnectorConfig): ISuggestedActionStyling => {\n return {\n suggestedActionLayout: config.suggestedActionLayout || 'carousel',\n suggestedActionBackground: config.suggestedActionBackground || 'White',\n suggestedActionTextColor: config.suggestedActionTextColor || '',\n suggestedActionBorderColor: config.suggestedActionBorderColor || '',\n suggestedActionBorderRadius: config.suggestedActionBorderRadius || '0',\n suggestedActionBorderStyle: config.suggestedActionBorderStyle || 'solid',\n suggestedActionBorderWidth: config.suggestedActionBorderWidth || '2',\n suggestedActionDisabledBorderStyle: config.suggestedActionDisabledBorderStyle || 'solid',\n suggestedActionDisabledBorderWidth: config.suggestedActionDisabledBorderWidth || '2',\n suggestedActionDisabledTextColor: config.suggestedActionDisabledTextColor || '',\n suggestedActionHeight: config.suggestedActionHeight || '40',\n suggestedActionImageHeight: config.suggestedActionImageHeight || '20',\n suggestedActionsCarouselFlipperCursor: config.suggestedActionsCarouselFlipperCursor || '',\n suggestedActionsCarouselFlipperBoxWidth: config.suggestedActionsCarouselFlipperBoxWidth || '40',\n suggestedActionsCarouselFlipperSize: config.suggestedActionsCarouselFlipperSize || '20',\n suggestedActionsFlowMaxHeight: config.suggestedActionsFlowMaxHeight || '',\n suggestedActionsStackedHeight: config.suggestedActionsStackedHeight || '',\n suggestedActionsStackedOverflow: config.suggestedActionsStackedOverflow || '2',\n suggestedActionsStackedLayoutButtonMaxHeight: config.suggestedActionsStackedLayoutButtonMaxHeight || '',\n suggestedActionsStackedLayoutButtonTextWrap: config.suggestedActionsStackedLayoutButtonTextWrap || false\n };\n};\n\n/**\n * Generates style options for the Botframework-WebChat widget\n * @param config IMsdyn365PvaChatConnectorConfig\n * @returns IChatStyling\n */\nexport const getChatStyleOptions = (config: IMsdyn365PvaChatConnectorConfig): IChatStyling => {\n const bubbleStyling = getBubbleStyling(config);\n const avatarStyling = getAvatarStyling(config);\n const suggestedActionStyling = getSuggestedActionStyling(config);\n const otherStyling = getOtherStyling(config);\n return {\n hideUploadButton: true,\n primaryFont: fontFormat(config.primaryFont),\n backgroundColor: config.backgroundColor || 'White',\n ...bubbleStyling,\n ...avatarStyling,\n ...suggestedActionStyling,\n ...otherStyling\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { IAction, IDispatch, INext } from '../interfaces';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\n\nexport class CommerceChatStore {\n private props: IPvaChatConnectorViewProps;\n private setNewMessageAction: React.Dispatch>;\n private provider?: TContextProvider;\n\n /**\n * Gets conversation token\n * @param props IPvaChatConnectorViewProps\n */\n public static async getDirectLineToken(props: IPvaChatConnectorViewProps): Promise {\n if (props.config.powervaDirectlineTokenURL && props.config.botID && props.config.tenantID) {\n // use direct line token url, bot id and tenant id from module config to get conversation token\n const url = `${props.config.powervaDirectlineTokenURL}?botId=${props.config.botID}&tenantId=${props.config.tenantID}`;\n const options = { method: 'GET' };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n // use direct line token url, bot id and tenant id from app config to get conversation token\n const url = `${props.context.app.config.pvaChatConnectorPowervaDirectlineTokenURL}?botId=${props.context.app.config.pvaChatConnectorBotID}&tenantId=${props.context.app.config.pvaChatConnectorTenantID}`;\n const options = {\n method: 'GET'\n };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n /**\n * Creates a new instance of commerce store for WebChat\n * @param props IPvaChatConnectorViewProps\n * @param provider TContextProvider\n * @param setNewMessage React.Dispatch>\n */\n constructor(\n props: IPvaChatConnectorViewProps,\n provider: TContextProvider | undefined,\n setNewMessage: React.Dispatch>\n ) {\n this.props = props;\n this.provider = provider;\n this.setNewMessageAction = setNewMessage;\n }\n\n /**\n * Handles custom chat actions\n * @param param0 {\n * dispatch: IDispatch;\n * next: INext;\n * action: IAction;\n * }\n */\n public async actionHandler({ dispatch, next, action }: { dispatch: IDispatch; next: INext; action: IAction }): Promise {\n const atype = action.type;\n\n switch (atype) {\n case 'DIRECT_LINE/CONNECT_FULFILLED': {\n // sets language\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'webchat/join',\n value: { language: window.navigator.language }\n }\n });\n break;\n }\n case 'DIRECT_LINE/INCOMING_ACTIVITY': {\n const activity = action.payload.activity;\n if (activity?.from?.role === 'bot') {\n // Sets flag for new message (will be use to indicate new messages from bot when chat is minimized)\n this.setNewMessageAction(true);\n }\n break;\n }\n case 'DIRECT_LINE/POST_ACTIVITY_FULFILLED': {\n switch (action.payload.activity.name) {\n case 'webchat/join':\n {\n if (this.provider !== undefined) {\n // Sets Chat Context\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'pvaSetContext',\n value: this.provider()\n }\n });\n }\n }\n break;\n case 'pvaSetContext':\n {\n if (this.props.config.triggerQuery) {\n // Initialize chat after Chat Context is set\n dispatch({\n type: 'WEB_CHAT/SEND_MESSAGE_BACK',\n payload: {\n text: this.props.config.triggerQuery\n }\n });\n }\n }\n break;\n default: {\n // default nothing\n }\n }\n break;\n }\n default: {\n // default nothing\n }\n }\n\n return next(action);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useMemo, useState } from 'react';\nimport { getChatStyleOptions } from '../helpers/StyleComposers';\nimport { IChatCoreProps, IAction, IDispatch } from '../interfaces';\nimport { CommerceChatStore } from '../helpers/CommerceChatStore';\n\n/**\n * Just a core Chat component\n * @param props\n */\n\nconst ChatCore: FunctionComponent = (props: IChatCoreProps) => {\n const { ReactWebChat } = window.WebChat;\n\n const [userId, setUserId] = useState('');\n useMemo(() => {\n if (props.provider) {\n const ctx = props.provider();\n if (ctx.UserId) {\n setUserId(typeof ctx.UserId === 'string' ? ctx.UserId : ctx.UserId.value.toString());\n }\n }\n }, [props.provider]);\n\n const directLine = useMemo(() => {\n return window.WebChat.createDirectLine({ token: props.directLineToken });\n }, [props.directLineToken]);\n\n const commerceChatStore = useMemo(() => {\n if (directLine && props.provider) {\n return new CommerceChatStore(props.config, props.provider, props.setNewMessage);\n }\n return undefined;\n }, [props.provider, directLine]);\n\n const store = useMemo(() => {\n return window.WebChat.createStore(\n {},\n ({ dispatch }: { dispatch: IDispatch }) => (next: (action: IAction) => IDispatch) => (action: IAction) => {\n commerceChatStore?.actionHandler({ dispatch, next, action });\n }\n );\n }, [commerceChatStore]);\n const styleOptions = getChatStyleOptions(props.config.config);\n\n return props.directLineToken !== '' ? (\n \n ) : (\n

Please wait while we are connecting.

\n );\n};\n\nexport default ChatCore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport ContextProvider from '../helpers/ContextProvider';\nimport { getChatStyling } from '../helpers/StyleComposers';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { CommerceChatStore } from '../helpers';\nimport ChatCore from './ChatCore';\n\nconst INVALID_TOKEN = 'INVALID_TOKEN';\nconst CLOSE_IMG_DATA =\n 'M443.6,387.1L312.4,255.4l131.5-130c5.4-5.4,5.4-14.2,0-19.6l-37.4-37.6c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4 L256,197.8L124.9,68.3c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4L68,105.9c-5.4,5.4-5.4,14.2,0,19.6l131.5,130L68.4,387.1 c-2.6,2.6-4.1,6.1-4.1,9.8c0,3.7,1.4,7.2,4.1,9.8l37.4,37.6c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1L256,313.1l130.7,131.1 c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1l37.4-37.6c2.6-2.6,4.1-6.1,4.1-9.8C447.7,393.2,446.2,389.7,443.6,387.1z';\n\n/**\n * Outer chat component, displays chat button, and proactive chat, and handles custom actions\n * @param props IPvaChatConnectorViewProps\n */\nconst Chat: FunctionComponent = (props: IPvaChatConnectorViewProps) => {\n const [loaded, setLoaded] = useState(false); // loaded & minimized are needed as ChatWidget should not be removed from DOM (it resets chat)\n const [minimized, setMinimized] = useState(true);\n const [newMessage, setNewMessage] = useState(false); // TODO: use this to indicate new message in minimized chat\n const [token, setToken] = useState(''); // holds conversation token for WebChat\n const [isProactive, setIsProactive] = useState(false); // if proactive chat is triggered\n const [proactiveMessage, setProactiveMessage] = useState(props.config.proactiveDefaultMessage);\n const [closed, setClosed] = useState(false);\n const [provider, setProvider] = useState();\n const isMobileDevice =\n isMobile({ variant: VariantType.Browser, context: props.context.request }) === 'xs' ||\n isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\n const chatStyle = getChatStyling(props.config, minimized, isMobileDevice); // generates chat style objects based on configuration\n const handleMaximizeButtonClick = () => {\n setLoaded(true);\n setMinimized(false);\n setNewMessage(false);\n };\n const handleMinimizeButtonClick = () => {\n setMinimized(true);\n setNewMessage(false);\n };\n const handleCloseButtonClick = () => {\n setClosed(true);\n setLoaded(false);\n setMinimized(true);\n setNewMessage(false);\n setIsProactive(false);\n };\n useEffect(() => {\n if (loaded) {\n CommerceChatStore.getDirectLineToken(props)\n .then(directLineToken => {\n setToken(directLineToken);\n })\n .catch(e => {\n setToken(INVALID_TOKEN);\n props.telemetry.exception(e);\n });\n }\n }, [loaded]);\n useEffect(() => {\n (async () => {\n const contextProvider = new ContextProvider(props); // Generates context (provider) and checks for proactive chat triggers\n const prov = await contextProvider.init();\n if (contextProvider.data.enabled) {\n props.context.telemetry.debug(`[Chat] Proactive chat was enabled: '${contextProvider.data.enabled}'.`);\n // if proactive chat is triggered\n const timeout = contextProvider.data.timeout * 1000; // timeout is there only for WaitOnTime trigger\n setTimeout(() => {\n if (!loaded) {\n props.context.telemetry.debug(`[Chat] Proactive chat was loaded: ${loaded}.`);\n setProactiveMessage(contextProvider.data.message);\n setIsProactive(true);\n }\n }, timeout);\n }\n setProvider(() => prov);\n })().catch(e => props.telemetry.exception(e));\n }, []);\n useEffect(() => {\n if (closed) {\n setClosed(false);\n }\n }, [token, provider]);\n const isValidToken = (): boolean => {\n return `${token}` !== INVALID_TOKEN;\n };\n return (\n \n {minimized && (!isProactive || (isProactive && loaded)) && (\n \n )}\n {minimized && isProactive && !loaded && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n
\n
\n

{proactiveMessage}

\n \n
\n
\n )}\n {loaded && isValidToken() && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n \n
\n
\n \n
\n
\n )}\n {!isValidToken() &&
{props.config.unableToLoadChatMessage}
}\n
\n );\n};\n\nexport default Chat;\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';\nimport { Chat, IPvaChatConnectorViewProps } from './index';\n\nexport default (props: IPvaChatConnectorViewProps) => {\n // Only for CDN loading check, won't be needed with npm package of Botframework-WebChat\n const [loaded, setLoaded] = React.useState(false);\n const p = {\n ...props\n };\n\n // Just to verify that CDN Chat Widget js lib is loaded\n // Remove this block if moving to npm package of Botframework-WebChat\n const interval = setInterval(() => {\n const t = typeof window;\n if (t !== 'undefined' && window.WebChat) {\n setLoaded(true);\n clearInterval(interval);\n }\n }, 100);\n\n return
{loaded && }
;\n};\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, Note, 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 @observable private _customerReference: string = '';\n @observable private _customerRequisition: string = '';\n @observable private _note: Note = {};\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @computed public get customerReference(): Readonly | string {\n return this._customerReference;\n }\n\n @computed public get customerRequisition(): Readonly | string {\n return this._customerRequisition;\n }\n\n @computed public get note(): Readonly | Note[] {\n return this._note;\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(\n newGuestCheckoutEmail: string,\n customerReference: string,\n customerRequisition: string,\n note: Note\n ): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n this._customerReference = customerReference;\n this._customerRequisition = customerRequisition;\n this._note = note;\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/**\n * EnabledPaymentsForOBO enum.\n */\n export enum EnabledPaymentsForOBO {\n OnCustomerAccount = 1,\n ExpressPayment = 0,\n Loyalty = 0,\n GiftCard = 0,\n PaymentInstrument = 0,\n ApplePay = 0\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionContext } from '@msdyn365-commerce/core';\nimport {\n CheckoutModule,\n ErrorCode,\n ErrorLocation,\n ErrorMessageResource,\n getCheckoutState,\n ICheckoutError,\n ICheckoutState\n} from '@msdyn365-commerce/global-state/';\n\n// eslint-disable-next-line @typescript-eslint/no-extraneous-class -- create global class\nexport class CheckoutErrors {\n public static readonly ActionError: ICheckoutError = {\n errorCode: ErrorCode.ActionError,\n errorMessageResource: ErrorMessageResource.checkoutTimeoutErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n errorMessageResource: ErrorMessageResource.blockedLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n errorMessageResource: ErrorMessageResource.customerAccountLimitSignDifferentFromAmountDueErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsAvailableCreditLimitErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n errorMessageResource: ErrorMessageResource.customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_FraudRisk: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n errorMessageResource: ErrorMessageResource.fraudRiskErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n errorMessageResource: ErrorMessageResource.giftCardBalanceInquiryFailedErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n errorMessageResource: ErrorMessageResource.giftCardCurrencyMismatchErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n errorMessageResource: ErrorMessageResource.invalidCartVersionErrorMessage,\n errorLocation: ErrorLocation.Checkout\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n errorMessageResource: ErrorMessageResource.invalidLoyaltyCardNumberErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n errorMessageResource: ErrorMessageResource.invalidPaymentRequestConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n errorMessageResource: ErrorMessageResource.missingRequiredCartTenderLinesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n errorMessageResource: ErrorMessageResource.multipleCustomerAccountPaymentsNotAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n errorMessageResource: ErrorMessageResource.noMoreThanOneLoyaltyTenderErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n errorMessageResource: ErrorMessageResource.noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n errorMessageResource: ErrorMessageResource.noTenderLoyaltyCardErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n errorMessageResource: ErrorMessageResource.notEnoughRewardPointsErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n errorMessageResource: ErrorMessageResource.paymentAlreadyVoidedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n errorMessageResource: ErrorMessageResource.paymentAmountExceedsGiftBalanceErrorMessage,\n errorLocation: ErrorLocation.CheckoutGiftCard\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n errorMessageResource: ErrorMessageResource.paymentRequiresMerchantPropertiesConsoleErrorMessage,\n errorLocation: ErrorLocation.Console\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n errorMessageResource: ErrorMessageResource.paymentUsingUnauthorizedAccountErrorMessage,\n errorLocation: ErrorLocation.CheckoutCustomerAccountPayment\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n errorMessageResource: ErrorMessageResource.refundAmountMoreThanAllowedErrorMessage,\n errorLocation: ErrorLocation.CheckoutLoyalty\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n errorMessageResource: ErrorMessageResource.unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n errorMessageResource: ErrorMessageResource.unableToCancelPaymentErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n errorMessageResource: ErrorMessageResource.unableToReadCardTokenInfoErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult: ICheckoutError = {\n errorCode: ErrorCode.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult,\n errorMessageResource: ErrorMessageResource.unableToRetrieveCardPaymentAcceptResultErrorMessage,\n errorLocation: ErrorLocation.CheckoutPaymentInstrument\n };\n\n public static readonly checkoutErrorsList: ICheckoutError[] = [\n CheckoutErrors.ActionError,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_FraudRisk,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo,\n CheckoutErrors.Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult\n ];\n}\n\nexport async function setCheckoutErrors(\n errorCode: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resources: any,\n isExpressCheckoutApplied: boolean,\n ctx: IActionContext,\n apiError?: string | undefined\n): Promise {\n let clientCheckoutError: ICheckoutError | undefined;\n const consoleCheckoutErrors: ICheckoutError[] = [];\n\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n // find the checkout errors\n for (const checkoutError of CheckoutErrors.checkoutErrorsList) {\n if (errorCode === checkoutError.errorCode) {\n if (checkoutError.errorLocation === ErrorLocation.Console) {\n const consoleCheckoutError: ICheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n consoleCheckoutErrors.push(consoleCheckoutError);\n } else {\n if (clientCheckoutError) {\n ctx.telemetry.exception(new Error('Invalid number of client checkout errors.'));\n throw new Error('Invalid number of client checkout errors.');\n } else {\n clientCheckoutError = {\n errorCode: checkoutError.errorCode,\n errorMessageResource: checkoutError.errorMessageResource,\n errorLocation: checkoutError.errorLocation\n };\n }\n }\n }\n }\n\n // log the console checkout errors\n for (const consoleCheckoutError of consoleCheckoutErrors) {\n consoleCheckoutError.errorMessage = getCheckoutErrorMessage(resources, consoleCheckoutError.errorMessageResource!, apiError!);\n console.log(consoleCheckoutError.errorMessage);\n }\n\n // handle the client checkout error\n if (clientCheckoutError) {\n clientCheckoutError.errorMessage = getCheckoutErrorMessage(resources, clientCheckoutError.errorMessageResource!, apiError!);\n\n if (isExpressCheckoutApplied && clientCheckoutError.errorLocation === ErrorLocation.CheckoutPaymentInstrument) {\n clientCheckoutError.errorLocation = ErrorLocation.Checkout;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: clientCheckoutError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n } else {\n // if could not map to any checkout error(s), show the API error message over generic error\n if (consoleCheckoutErrors.length === 0) {\n const genericError = {\n errorLocation: ErrorLocation.Checkout\n };\n if (apiError) {\n genericError['errorMessage'] = apiError;\n } else {\n genericError['errorMessage'] = resources.genericErrorMessage;\n }\n\n await checkoutState.updateCheckoutError({ newCheckoutError: genericError });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: true });\n }\n }\n}\n\nexport async function focusOnCheckoutError(checkoutErrorRef: React.RefObject, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n checkoutErrorRef.current && checkoutErrorRef.current.scrollIntoView();\n\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule.None });\n await checkoutState.updateShouldFocusOnCheckoutError({ newShouldFocusOnCheckoutError: false });\n}\n\nexport async function setCheckoutErrorFocus(checkoutModuleId: string, ctx: IActionContext): Promise {\n const checkoutState: ICheckoutState = await getCheckoutState(ctx).catch((error: Error) => {\n ctx.telemetry.exception(error);\n throw error;\n });\n\n for (const checkoutModule of Object.keys(CheckoutModule)) {\n if (checkoutModuleId.includes(CheckoutModule[checkoutModule])) {\n await checkoutState.updateCheckoutErrorFocus({ newCheckoutErrorFocus: CheckoutModule[checkoutModule] });\n return;\n }\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getCheckoutErrorMessage(resources: any, errorMessageResource: ErrorMessageResource, errorMessageFromAPI: string): string {\n const errorResource = Object.keys(resources).find(resource => resource === errorMessageResource);\n // return API error when error resource string is not found in checkout definition file\n return errorResource !== undefined ? resources[errorResource] : errorMessageFromAPI;\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 * The payment error.\n */\nexport interface IPaymentError {\n title: string;\n message: string;\n className?: string;\n}\n\n/**\n * The payment error.\n * @param param0 - First param.\n * @param param0.title - Title.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const ErrorComponent: React.FC = ({ title, message, className = 'ms-checkout-payment-instrument' }) => (\n

\n

{title}

\n

{message}

\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICheckoutApplePayViewProps } from './checkout-apple-pay';\n\nconst CheckoutApplePayView: React.FC = props => {\n const { checkoutApplePay, applePayButton, alert } = props;\n\n return (\n \n {alert}\n {applePayButton}\n \n );\n};\n\nexport default CheckoutApplePayView;\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 { ICheckoutCustomerAccountPaymentViewProps, IAccountPaymentEditViewForm, IAccountPaymentSummaryViewForm } from './index';\n\nexport const SummaryForm: React.FC = ({\n formProps,\n label,\n paymentAmount,\n addPaymentButton,\n appliedLine,\n bottomBorder\n}) => (\n \n <>\n {label}\n {paymentAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nexport const EditForm: React.FC = ({\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 {customerName}\n {customerAccountNumber}\n {customerSince}\n {accountCredit}\n {accountDetails}\n {inputLabel}\n {alert}\n {inputAmount}\n {addPaymentButton}\n {appliedLine}\n {bottomBorder}\n \n \n);\n\nconst CheckoutCustomerAccountView: React.FC = props => {\n const { checkoutCustomerAccount, checkoutErrorRef, summaryView, editView, moduleState, alert } = props;\n return (\n \n {alert}\n {moduleState.isReady && summaryView && }\n {!moduleState.isReady && editView && }\n \n );\n};\n\nexport default CheckoutCustomerAccountView;\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 { ICheckoutExpressOverlayModal, ICheckoutExpressViewProps } from './checkout-express';\n\n/**\n * Overlay modal.\n * @param param0 - Modal.\n * @param param0.modal - Modal param.\n * @returns React node.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- public name.\nconst OverlayModal: React.FC = ({ modal }) => {\n return ;\n};\n\n/**\n * Checkout express view.\n * @param param0 - Checkout express view props.\n * @param param0.checkoutExpress - Checkout express.\n * @param param0.waiting - Waiting.\n * @param param0.alert - Alert.\n * @param param0.addPaymentForm - Add payment form.\n * @param param0.overlayModal - Overlay modal.\n * @param param0.title - Module title.\n * @param param0.shouldHideExpressCheckout - ShouldHideExpressCheckout.\n * @returns React node.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Public name.\nconst CheckoutExpressView: React.FC = ({\n checkoutExpress,\n waiting,\n alert,\n addPaymentForm,\n overlayModal,\n title,\n shouldHideExpressCheckout\n}) =>\n shouldHideExpressCheckout ? (\n <>\n ) : (\n \n {title}\n {waiting}\n {alert}\n {addPaymentForm}\n {overlayModal && }\n \n );\n\nexport default CheckoutExpressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICheckoutGooglePayViewProps } from './checkout-google-pay';\n\nconst CheckoutGooglePayView: React.FC = props => {\n const { alert, checkoutGooglePay, checkoutButton } = props;\n return (\n \n {alert}\n
ref?.appendChild(checkoutButton || document.createElement('div'))}>
\n
\n );\n};\n\nexport default CheckoutGooglePayView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICookieComplianceAcceptButton {\n acceptCookiesButtonText?: string;\n acceptCookiesButtonAriaLabel?: string;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onClose(): void;\n}\n\nexport const CookieComplianceAcceptButton: React.FC = ({\n acceptCookiesButtonText,\n acceptCookiesButtonAriaLabel,\n telemetryContent,\n onClose\n}) => {\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, 'accept cookies');\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n {acceptCookiesButtonText}\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 Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IActionLinksData } from '../cookie-compliance.props.autogenerated';\n\nexport interface ICookieComplianceLinks {\n links: IActionLinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ContentCardLinks component.\n * @extends {React.PureComponent}\n */\nexport class CookieComplianceLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n \n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n \n );\n }\n\n private readonly _mapEditableLinks = (linkdata: IActionLinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n };\n}\n\nexport default CookieComplianceLinks;\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 { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IAlertProps, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { CookieComplianceAcceptButton, CookieComplianceLinks } from './components';\nimport { ICookieComplianceConfig, ICookieComplianceProps } from './cookie-compliance.props.autogenerated';\n\n/**\n * Alert state interface.\n */\nexport interface IAlertState {\n visible: boolean;\n}\n\n/**\n * Cookie compliance view props interface.\n */\nexport interface ICookieComplianceViewProps extends ICookieComplianceProps<{}> {\n CookieComplianceBanner: IModuleProps;\n AlertProps: IAlertProps;\n Content: INodeProps;\n text?: React.ReactNode;\n links?: React.ReactNode;\n acceptButton?: React.ReactNode;\n className: string;\n onDismiss(): void;\n}\n\n/**\n *\n * CookieCompliance component.\n * @extends {React.PureComponent>}\n */\nclass CookieCompliance extends React.PureComponent, IAlertState> {\n private readonly cookieRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public constructor(props: ICookieComplianceProps) {\n super(props);\n this.state = { visible: false };\n this.cookieRef = React.createRef();\n this._onDismiss = this._onDismiss.bind(this);\n }\n\n public componentDidMount(): void {\n const { context } = this.props;\n\n if (context && context.request && context.request.cookies && !context.request.cookies.isConsentGiven()) {\n this.setState({ visible: true });\n }\n }\n\n public render(): JSX.Element | null {\n const { config, context, resources, telemetry } = this.props;\n const { acceptCookiesButtonText, acceptCookiesAriaLabel } = resources;\n const { visible } = this.state;\n\n const isConsentGiven = context && context.request && context.request.cookies && context.request.cookies.isConsentGiven();\n let moduleConfig: ICookieComplianceConfig;\n\n try {\n moduleConfig = config;\n } catch (error) {\n telemetry.error(`Something went wrong while rendering the alert module ------${error}`);\n return
{error}
;\n }\n\n if (isConsentGiven && !visible) {\n this.props.context.telemetry.error('Cookie Compliance content is empty, module wont render.');\n return null;\n }\n\n if (!MsDyn365.msdyn365Commerce.isBrowser) {\n return <>;\n }\n\n const viewProps = {\n ...this.props,\n onDismiss: this._onDismiss,\n CookieComplianceBanner: {\n moduleProps: this.props,\n className: classnames('ms-cookie-compliance', moduleConfig.className),\n ref: this.cookieRef\n },\n AlertProps: {\n className: 'ms-cookie-compliance__container',\n color: 'white',\n fade: false\n },\n Content: {\n className: 'ms-cookie-compliance__content'\n },\n text: moduleConfig.content && (\n \n ),\n links: ArrayExtensions.hasElements(moduleConfig.actionLinks) && (\n \n ),\n acceptButton: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles Link content change event.\n * @param linkIndex - Index of link in linkarray.\n * @returns Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: MsDyn365.ContentEditableEvent): void => {\n if (this.props.config.actionLinks?.[linkIndex]) {\n this.props.config.actionLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Handles content change event.\n * @param event - Event.\n */\n public handleContentChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.content = event.target.value;\n };\n\n private _onDismiss(): void {\n const { context } = this.props;\n\n if (context && context.request && context.request.cookies) {\n context.request.cookies.setConsentCookie();\n location.reload();\n }\n this.setState({ visible: false });\n }\n}\n\nexport default CookieCompliance;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICookieComplianceViewProps } from './cookie-compliance';\n\nconst CookieComplianceView: React.FC = props => {\n const { CookieComplianceBanner, AlertProps, Content, acceptButton, text, links } = props;\n\n return (\n \n \n \n {text}\n {links}\n \n {acceptButton}\n \n \n );\n};\nexport default CookieComplianceView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeadingData, IIframeConfig, IIframeProps } from './iframe.props.autogenerated';\n\nexport interface IIframeViewProps extends IIframeProps {\n Heading: React.ReactNode;\n IframeContainer: IModuleProps;\n IFrame: React.ReactNode;\n alert?: React.ReactNode;\n cookieConsentAccepted?: boolean;\n}\n\n/**\n *\n * Iframe component.\n * @extends {React.PureComponent}\n */\nclass Iframe extends React.PureComponent> {\n private readonly iframeRef: React.RefObject;\n\n constructor(props: IIframeProps) {\n super(props);\n this.iframeRef = React.createRef();\n }\n\n public render(): JSX.Element | null {\n const { config, resources } = this.props;\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n if (!(config && config.target && config.target.destinationUrl)) {\n return null;\n }\n\n let srcURL;\n try {\n srcURL = new URL(config.target.destinationUrl);\n } catch (error) {\n this.props.telemetry.exception(error);\n return null;\n }\n\n if (srcURL && srcURL.protocol && srcURL.protocol.toLocaleLowerCase() !== 'https:') {\n return null;\n }\n const iframeClassName = classnames('ms-iframe', config.className);\n\n let viewProps: IIframeViewProps = {\n ...(this.props as IIframeProps),\n Heading: this._createHeading(config.heading!),\n IframeContainer: {\n moduleProps: this.props,\n className: iframeClassName\n },\n IFrame: this._createIframe()\n };\n\n if (!isConsentGiven) {\n viewProps = {\n ...viewProps,\n alert: this._renderAlert(resources.cookieConsentRequiredMessage)\n };\n } else {\n viewProps = {\n ...viewProps,\n cookieConsentAccepted: true\n };\n }\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _createHeading(heading: IHeadingData): React.ReactNode | null {\n if (!heading || !heading.text || heading.text.length === 0) {\n return null;\n }\n\n return ;\n }\n\n private _renderAlert(message: string): React.ReactNode | null {\n return (\n

\n {message}\n

\n );\n }\n\n private _createIframe(): React.ReactNode | null {\n const { config } = this.props;\n const targetURL = config.target.destinationUrl;\n\n return (\n \n );\n }\n}\n\nexport default Iframe;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IIframeViewProps } from './iframe';\n\n/**\n *\n * IFrameView component.\n * @extends {React.PureComponent}\n */\nexport class IFrameView extends React.PureComponent {\n public render(): JSX.Element | null {\n const { Heading, IframeContainer, IFrame, alert, cookieConsentAccepted } = this.props;\n\n return (\n \n {alert}\n {cookieConsentAccepted && cookieConsentAccepted ? (\n <>\n {Heading}\n {IFrame}\n \n ) : null}\n \n );\n }\n}\nexport default IFrameView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n ICartLineItemViewProps,\n ICartlinesViewProps,\n ICartResources,\n ICartViewProps,\n IOrderSummaryErrors\n} from '@msdyn365-commerce-modules/cart';\nimport { IInvoiceSummaryLines } from '@msdyn365-commerce-modules/invoice-payment-summary';\nimport { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Node,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICartProps as ICartExtensionProps } from '../definition-extensions/cart.ext.props.autogenerated';\n\n/**\n * Toggle Bopis Function.\n * @param cartLine -CartLine.\n * @param isBopisSelected -Boolean.\n * @returns Toggle Bopis.\n */\nconst toggleBopisHandler = (cartLine: ICartlinesViewProps, isBopisSelected: boolean) => () => {\n cartLine.pickUpInStore?.callbacks.toggleBopis(!isBopisSelected);\n};\n\n/**\n * Change Store Function.\n * @param cartLine -CartLine.\n * @returns Toggle Bopis.\n */\nconst onChangeStoreHandler = (cartLine: ICartlinesViewProps) => () => {\n cartLine.pickUpInStore?.callbacks.toggleBopis(true);\n};\n\n/**\n * Render Bopis block.\n * @param cartLine - The cart line view props.\n * @param resources - Module resource strings.\n * @param storeSelector - Store selector element.\n * @param telemetryContent - The telemetry object.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderBopisBlock = (\n cartLine: ICartlinesViewProps,\n resources: ICartResources,\n storeSelector: React.ReactNode | undefined,\n telemetryContent?: ITelemetryContent,\n emailDeliveryModeCode?: string\n): JSX.Element | null => {\n // If it is electronic item cart line, then return null for BOPISBlock.\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\n return null;\n }\n\n const {\n shipInsteadDisplayText,\n shipToAddressDisplayText,\n pickItUpDisplayText,\n pickUpAtStoreWithLocationText,\n changeStoreDisplayText\n } = resources;\n\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n
\n {isBopisSelected ? (\n {pickUpAtStoreWithLocationText}\n ) : (\n {shipToAddressDisplayText}\n )}\n
\n {isBopisSelected && (\n
\n {cartLine.pickUpInStore.orgUnitName}\n \n
\n )}\n \n {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\n \n
\n );\n};\n\n/**\n * Render Bopis block.\n * @param cartLine - The cart line view props.\n * @param resources - Module resource strings.\n * @param storeSelector - Store selector element.\n * @param telemetryContent - The telemetry object.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderGroupBopisBlock = (\n cartLine: ICartlinesViewProps,\n resources: ICartResources,\n storeSelector: React.ReactNode | undefined,\n telemetryContent?: ITelemetryContent,\n emailDeliveryModeCode?: string\n): JSX.Element | null => {\n // If it is electronic item cart line, then return null for GroupBOPISBlock.\n if (!cartLine.pickUpInStore || !storeSelector || cartLine.data?.cartline.DeliveryMode === emailDeliveryModeCode) {\n return null;\n }\n\n const { changeStoreDisplayText, shipInsteadDisplayText, pickItUpDisplayText } = resources;\n\n const isBopisSelected = cartLine.pickUpInStore.isBopisSelected;\n\n const payLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const puckUpinStoreAttribute = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n <>\n {isBopisSelected ? (\n \n ) : null}\n \n {isBopisSelected ? shipInsteadDisplayText : pickItUpDisplayText}\n \n \n );\n};\n\n/**\n * Render Cart Lines.\n * @param cartLine - The cart line view props.\n * @param resources - Module resource strings.\n * @param storeSelector - Store selector element.\n * @param telemetryContent - The telemetry object.\n * @param isMultiplePickUp - FLag to check if there multiple pickups.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderCartLine = (\n cartLine: ICartlinesViewProps,\n resources: ICartResources,\n storeSelector: React.ReactNode | undefined,\n telemetryContent?: ITelemetryContent,\n isMultiplePickUp?: boolean,\n emailDeliveryModeCode?: string\n): JSX.Element => {\n if (cartLine.error === resources.outOfStockErrorMessage) {\n return (\n \n {cartLine.addToWishlist}\n {cartLine.remove}\n \n );\n }\n\n if (isMultiplePickUp) {\n return (\n \n {renderGroupBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\n {cartLine.addToOrderTemplate}\n {cartLine.addToWishlist}\n {cartLine.remove}\n \n );\n }\n\n if (cartLine.addToOrderTemplate) {\n return (\n \n {cartLine.addToOrderTemplate}\n {cartLine.addToWishlist}\n {cartLine.remove}\n \n );\n }\n\n return (\n \n {cartLine.addToWishlist}\n {cartLine.remove}\n \n );\n};\n\n/**\n * Render Cart Lines.\n * @param cartLines - The cart line view props.\n * @param resources - Module resource strings.\n * @param storeSelector - Store selector element.\n * @param telemetryContent - The telemetry object.\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderCartlinesInternal = (\n cartLines: ICartlinesViewProps[],\n resources: ICartResources,\n storeSelector: React.ReactNode | undefined,\n telemetryContent?: ITelemetryContent,\n isMultiplePickUp?: boolean,\n emailDeliveryModeCode?: string\n): JSX.Element[] | JSX.Element => {\n return cartLines.map((cartLine, index) => {\n const itemIndex = index;\n return (\n
\n {cartLine.cartline}\n \n {isMultiplePickUp\n ? null\n : renderBopisBlock(cartLine, resources, storeSelector, telemetryContent, emailDeliveryModeCode)}\n {renderCartLine(cartLine, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\n \n
\n );\n });\n};\n\n/**\n * Render Cart Lines.\n * @param props - The cart line props.\n * @param cartLines - The cart line view props.\n * @param resources - Module resource strings.\n * @param storeSelector - Store selector element.\n * @param waitingComponent - Waiting component element.\n * @param cartLoadingStatus - Cart loading status string.\n * @param isCartDataResult - Flag to check if there is cart data.\n * @param telemetryContent - The telemetry object.\n * @param isMultiplePickUp - Flag to check if there multiple pickups.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderCartlines = (\n props: ICartViewProps & ICartExtensionProps<{}>,\n cartLines: ICartlinesViewProps[] | undefined,\n resources: ICartResources,\n storeSelector: React.ReactNode | undefined,\n waitingComponent: React.ReactNode,\n cartLoadingStatus: string,\n isCartDataResult: boolean,\n telemetryContent?: ITelemetryContent,\n isMultiplePickUp?: boolean,\n emailDeliveryModeCode?: string\n): JSX.Element[] | JSX.Element => {\n if (cartLoadingStatus) {\n return <>{cartLoadingStatus};\n }\n\n // Props.CartlinesWrapper is only required on cart lines and when multiple pickup mode is disabled. This is also required to handle the empty cart styling.\n // Else, empty cart multiple pickup mode is disabled falls under the other cart line wrapper which is creating issue with Empty cart scenario.\n if (cartLines) {\n return props.multiplePickUpEnabled ? (\n renderCartlinesInternal(cartLines, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)\n ) : (\n \n {renderCartlinesInternal(cartLines, resources, storeSelector, telemetryContent, isMultiplePickUp, emailDeliveryModeCode)}\n \n );\n }\n\n return isCartDataResult ? (\n
\n
{props.slots.emptyCart}
\n
\n ) : (\n <>{waitingComponent}\n );\n};\n\n/**\n * Render Cart Lines group title.\n * @param cartLine - The cart line view props.\n * @param resources - Module resource strings.\n * @param count - Count of products.\n * @returns JSX Element.\n */\nconst renderCartLinesGroupTitle = (cartLine: ICartlinesViewProps, resources: ICartResources, count: number) => {\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\n const { itemLabel, itemsLabel } = resources;\n const itemCountOne: number = 1;\n const suffix = count > itemCountOne ? itemsLabel : itemLabel;\n const countTitle = `(${count} ${suffix})`;\n return (\n <>\n \n {isBopisSelected ? (\n

\n {cartLine.pickUpInStore?.deliveryOption}\n {', '}\n {cartLine.pickUpInStore?.orgUnitName}\n

\n ) : null}\n

{countTitle}

\n
\n \n );\n};\n\n/**\n * Render Cart Lines group title.\n * @param cartLine - The cart line view props.\n * @param resources - Module resource strings.\n * @param count - Count of products.\n * @param emailDeliveryModeCode - The email delivery mode code.\n * @returns JSX Element.\n */\nconst renderCartLinesGroupHeader = (\n cartLine: ICartlinesViewProps,\n resources: ICartResources,\n count: number,\n emailDeliveryModeCode?: string\n) => {\n const isBopisSelected = cartLine.pickUpInStore?.isBopisSelected;\n const { pickUpText, shippingText, emailshippingText, payInvoicesDisplayText } = resources;\n let groupTitle: string;\n\n groupTitle = isBopisSelected ? pickUpText : shippingText;\n if (cartLine.data && cartLine.data.cartline.IsInvoiceLine) {\n groupTitle = payInvoicesDisplayText;\n } else if (!StringExtensions.isNullOrEmpty(emailDeliveryModeCode)) {\n groupTitle = cartLine.data && cartLine.data.cartline.DeliveryMode === emailDeliveryModeCode ? emailshippingText : groupTitle;\n }\n\n return (\n <>\n
\n

\n

{groupTitle}

\n {renderCartLinesGroupTitle(cartLine, resources, count)}\n
\n \n );\n};\n\n/**\n * Returns count of products.\n * @param cartLine - The cart line view props.\n * @returns Number of products.\n */\nconst countItems = (cartLine: ICartlinesViewProps[]): number => {\n let countItem = 0;\n const defaultItemCount = 0;\n countItem = cartLine.reduce((count, item) => {\n return count + (item.data?.cartline.Quantity ?? defaultItemCount);\n }, defaultItemCount);\n return countItem;\n};\n\n/**\n * Render Cart Lines group.\n * @param props - The cart line view props.\n * @param resources - Module resource strings.\n * @returns JSX Element.\n */\nconst renderCartLinesGroup = (props: ICartViewProps & ICartExtensionProps<{}>, resources: ICartResources): JSX.Element | undefined => {\n if (props.cartLinesGroup && ArrayExtensions.hasElements(props.cartLinesGroup)) {\n return (\n
\n {props.cartLinesGroup.map(cartlines => {\n return (\n
\n {renderCartLinesGroupHeader(\n cartlines[0],\n resources,\n countItems(cartlines),\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\n )}\n {renderCartlines(\n props,\n cartlines,\n props.resources,\n props.storeSelector,\n props.waitingComponent,\n props.cartLoadingStatus,\n props.cartDataResult,\n props.telemetryContent,\n props.multiplePickUpEnabled,\n props.context.actionContext.requestContext.channel?.EmailDeliveryModeCode\n )}\n
\n );\n })}\n
\n );\n }\n return props.cartDataResult ? (\n
\n
{props.slots.emptyCart}
\n
\n ) : (\n <>{props.waitingComponent}\n );\n};\n\n/**\n * Render error block.\n * @param errorData - Error component.\n * @returns JSX Element.\n */\nconst renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\n if (!errorData || !ArrayExtensions.hasElements(errorData.errors)) {\n return null;\n }\n return (\n \n {errorData.header}\n {errorData.errors}\n \n );\n};\n\n/**\n * Render invoice summary.\n * @param invoiceSummaryLines - Invoice summary component.\n * @param orderSummaryItems - Order summary component.\n * @param props - The module props.\n * @returns JSX Element.\n */\nconst renderInvoiceSummarylines = (\n invoiceSummaryLines: IInvoiceSummaryLines | undefined,\n orderSummaryItems: INodeProps,\n props: ICartViewProps\n): JSX.Element | null => {\n if (!invoiceSummaryLines) {\n props.context.telemetry.error('InvoiceSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {invoiceSummaryLines.invoices}\n {invoiceSummaryLines.giftCard}\n {invoiceSummaryLines.loyalty}\n {invoiceSummaryLines.orderTotal}\n \n );\n};\n\n/**\n * Render order summary.\n * @param orderSummaryLines - Order summary component.\n * @param orderSummaryItems - Order summary items component.\n * @param props - The module props.\n * @returns JSX Element.\n */\nconst renderOrderSummarylines = (\n orderSummaryLines: IOrderSummaryLines | undefined,\n orderSummaryItems: INodeProps,\n props: ICartViewProps\n): JSX.Element | null => {\n if (!orderSummaryLines) {\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {orderSummaryLines.subtotal}\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\n {orderSummaryLines.shipping}\n {orderSummaryLines.otherCharge}\n {orderSummaryLines.tax}\n {orderSummaryLines.orderTotal}\n \n );\n};\n\n/**\n * Render error block.\n * @param promotions - The module view props.\n * @returns JSX Element.\n */\nconst renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\n return (\n <>\n \n {promotions.promotionMessage}\n {promotions.promotionSeeAllLink}\n {promotions.promotionDialog}\n \n \n );\n};\n\n/**\n * Render order summary checkout.\n * @param props - The module view props.\n * @returns JSX Element.\n */\nconst renderOrderSummaryCheckout = (props: ICartViewProps): JSX.Element | undefined => {\n return (\n \n {props.cart?.hasInvoiceLine ? null : props.promoCode}\n \n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.expressCheckoutButton && ArrayExtensions.hasElements(props.expressCheckoutButton) ? (\n {props.expressCheckoutButton}\n ) : null}\n \n {props.createTemplateFromCartButton}\n \n );\n};\n\n/**\n * Render order summary checkout button.\n * @param props - The module view props.\n * @returns JSX Element.\n */\nconst renderOrderSummaryCheckoutButton = (props: ICartViewProps): JSX.Element | undefined => {\n return (\n \n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n \n );\n};\n\n/**\n * Render cart view.\n * @param props - The module view props.\n * @returns JSX Element.\n */\nconst CartView: React.FC> = (props: ICartViewProps & ICartExtensionProps<{}>) => {\n const totalItemCountOne: number = 1;\n const updatedTitle = (\n

\n {props.resources.cartTitle}\n \n {` (${Number(props.cart?.totalItemsInCart)} ${props.cart?.totalItemsInCart !== totalItemCountOne ? 'items' : 'item'})`}\n \n

\n );\n return (\n
\n {props.checkoutBlockedDueToUnavailableFunds}\n {updatedTitle}\n
{props.orderSummaryLineitems?.orderTotal}
\n {renderOrderSummaryCheckoutButton(props)}\n {!props.cart?.hasInvoiceLine && props.promotionOptions && renderPromotions(props.promotionOptions)}\n {props.cart?.hasInvoiceLine || props.multiplePickUpEnabled\n ? renderCartLinesGroup(props, props.resources)\n : renderCartlines(\n props,\n props.cartlines,\n props.resources,\n props.storeSelector,\n props.waitingComponent,\n props.cartLoadingStatus,\n props.cartDataResult\n )}\n {props.orderSummaryHeading && (\n \n \n {props.orderSummaryHeading}\n {props.cart?.hasInvoiceLine\n ? renderInvoiceSummarylines(props.invoiceSummaryLineitems, props.OrderSummaryItems, props)\n : renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\n {renderErrorBlock(props.OrderSummaryErrors)}\n \n {renderOrderSummaryCheckout(props)}\n \n )}\n {props.storeSelector}\n
\n );\n};\n\nexport default CartView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IHelp,\n IOrderDetailsViewProps,\n IOrderInformation,\n IOrderSummary,\n IPaymentMethods,\n ISalesLine\n} from '@msdyn365-commerce-modules/order-management';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport const OrderInfomation: React.FC = ({\n orderInformationProps,\n salesId,\n receiptId,\n createdDate,\n count,\n amount,\n channelReferenceId,\n channelName,\n note,\n channelAddress\n}) => (\n \n {channelName}\n {channelAddress}\n {salesId}\n {receiptId}\n {createdDate}\n {count}\n {amount}\n {channelReferenceId}\n {note}\n \n);\n\nexport const SalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton, errors }) => (\n \n {salesLine}\n {buyAgainButton}\n {errors}\n \n);\n\nexport const GroupDelivery: React.FC = ({ deliveryProps, heading, count }) => (\n \n {heading}\n {count}\n \n);\n\nexport const Group: React.FC = ({ groupProps, delivery, address, salesLinesProps, salesLines, isCashAndCarryTransaction }) => (\n \n {delivery && }\n \n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n {!isCashAndCarryTransaction && salesLine.salesStatus}\n {salesLine.data.deliveryType === 'ship' && salesLine.data.shipment ? salesLine.trackingInfo : null}\n \n \n ))}\n \n )}\n {!delivery.showTimeslot && address}\n {delivery.showTimeslot && (\n \n {address}\n {delivery.pickupDateTimeslot}\n \n )}\n \n \n);\n\nexport const Groups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderSummary: React.FC = ({\n orderSummaryProps,\n heading,\n subtotal,\n shipping,\n tax,\n totalAmount,\n earnedPoints\n}) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const Payment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const Help: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderDetailsView: React.FC = ({\n moduleProps,\n viewModes,\n tableViewActions,\n table,\n placedBy,\n heading,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {placedBy}\n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {tableViewActions}\n {viewModes}\n {table}\n {groups && }\n \n {orderSummary && }\n {payment && }\n \n {help && }\n \n );\n};\n\nexport default OrderDetailsView;\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","disabled","canEdit","editBtnLabel","emailHeader","onEdit","showInfoProps","editButton","purchaseOrderIdKey","CheckoutGuestProfile","constructor","props","super","init","async","_this$props$context$r","checkoutState","this","data","checkout","result","hasInvoiceLine","checkoutCart","emailOnCart","cart","ReceiptEmail","context","request","user","emailAddress","isExpressCheckoutApplied","emailAddressFromExpressCheckout","undefined","state","updateGuestProfile","updateHasGuestCheckoutEmail","newHasGuestCheckoutEmail","isEmailValid","moduleState","status","rowEmail","replace","RegExp","setState","setHasError","_getAttributeValue","fieldName","_this$props$data$chec","purchaseOrderId","AttributeValues","find","attribute","Name","TextValue","_onEditPurchaseOrderId","textArea","purchaseOrderIdRef","current","text","_renderAddPurchaseOrderId","style","marginTop","purchaseOrderIdLabelText","placeholder","purchaseOrderIdPlaceHolderText","maxLength","_updateAttributeValues","attributekey","_this$props$data$chec2","updateAttributeValues","newAttributeValues","ExtensionProperties","TextValueTranslations","_renderShowPurchaseOrderId","noPurchaseOrderIdText","EmailRegex","defaultRegex","test","updateGuestCheckoutEmail","newGuestCheckoutEmail","onUpdating","catch","telemetry","submitEmail","onReady","_this$inputRef$curren","focus","guestCheckoutEmail","isAuthenticated","componentDidMount","when","isDataReady","reaction","_this$props$data$chec3","_this$props$data$chec4","isExpressAddressApplied","_this$props$data$chec5","_this$props$data$chec6","shouldComponentUpdate","nextProps","nextState","render","_this$props$data$chec7","_this$props$data$chec8","config","isReady","hasExternalSubmitGroup","viewProps","_objectSpread","moduleProps","showContactInfo","getShowContactInfo","addContactInfo","getAddContactInfo","addPurchaseOrderIdElement","showPurchaseOrderIdElement","renderView","__decorate","computed","withModuleState","observer","ShowContactInfo","Node","Object","assign","AddContactInfo","_ref2","_ref3","Module","ariaLabel","message","errorClassName","GetMaxLength","parsedMaxLength","Number","parseInt","isNaN","pattern","readOnly","forId","htmlFor","successClassName","SignUp","moduleClassName","handleHeadingChange","heading","handleParagraphChange","disclaimer","_onInit","_updateErrorMessage","_prePopulateData","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","window","isInitialized","map","obj","PRE","_htmlDecode","ID","toLowerCase","isEmailVerificationRequried","templateVersion","emailRegex","PAT","VERIFY","isGivenNameVerificationRequried","givenName","surname","isSurnameVerificationRequried","UX_INPUT_TYPE","PAT_DESC","invalidEmailAddressError","errorMessages","required_field","requiredFieldMissingError","getValue","v1Value","v2Value","source","componentDidUpdate","viewState","isShowLoading","signUp","loading","modal","tag","Modal","isOpen","modalBody","ModalBody","icon","SignUpLoadingIconComponent","SignUpLoadingMessageComponent","loadingMessage","defaultAADConainer","display","aadConainer","Msdyn365","editProps","requestContext","signUpLocalAccount","_renderLocalAccount","str","e","document","createElement","innerHTML","childNodes","length","nodeValue","localAccount","items","_renderInput","firstNameLabelText","firstNameMaxLength","lastNameLabelText","lastNameMaxLength","emailAddressLabelText","emailVerification","isRequired","verificationCodeLabelText","verificationControlWrapper","buttonWrapper","buttons","SignUpButtonComponent","key","sendCodeButtonAriaLabel","sendCodeButtonText","verifyCodeButtonAriaLabel","verifyCodeButtonText","resendCodeButtonAriaLabel","resendCodeButtonText","changeEmailButtonAriaLabel","changeEmailButtonText","successMessage","SignUpSuccessComponent","verificationCodeSendSuccess","emailAddressVerifiedSuccess","errorMessage","SignUpErrorComponent","retryError","retryNotAllowedError","throttledError","codeExpiredError","serverError","invalidEmailError","givenNameVerification","requiredFieldMissingSummaryError","surnameVerification","signUpButtonArialabel","signUpButtonText","cancelButtonArialabel","cancelButtonText","fieldIncorrectError","labelText","cssClassName","wrapper","SignUpLabelComponent","SignUpInputComponent","observable","SignUpItem","SignUpEmailVerification","button","SignUpGivenNameVerificationComponent","SignUpSurnameVerificationComponent","_ref4","SignUpLoading","_ref6","_ref5","item","index","LocalAccount","html5EmailRegex","PvaChatConnector","isOboRequest","url","botFrameworkCDNURL","app","pvaChatConnectorBotFrameworkCDNURL","script","src","crossOrigin","body","appendChild","getRandomValues","rnds8","Uint8Array","rng","crypto","bind","msCrypto","Error","uuid","REGEX","byteToHex","i","push","toString","substr","arr","offset","arguments","validate","TypeError","options","buf","rnds","random","stringify","CartAmountTrigger","ProactiveChatTrigger","totalInCart","min","proactiveOnCartAmountMin","max","proactiveOnCartAmountMax","debug","name","_getCart","isEmpty","TotalAmount","retVal","getContextProvider","eCommerceCustIsProactiveChat","eCommerceCustProactiveType","eCommerceCustProactiveShoppingCartAmount","getMessage","proactiveOnCartAmountMessage","proactiveDefaultMessage","getCartState","actionContext","CartNumberOfItemsTrigger","numberOfItems","proactiveOnCartNoOfItemsMin","proactiveOnCartNoOfItemsMax","TotalItems","eCommerceCustProactiveShoppingCartNumberOfItems","proactiveOnCartNoOfItemsMessage","CartSpecificProductTrigger","product","isValid","CartLines","_cart$cart$CartLines","_cart$cart$CartLines2","proactiveOnCartSpecificProductList","_this$props$config$pr","j","_this$props$config$pr2","ItemId","eCommerceCustProactiveShoppingCartSpecificProduct","proactiveOnCartSpecificProductMessage","ProactiveChatNames","DateRangeTrigger","start","_toDate","proactiveOnDateRangeStart","end","proactiveOnDateRangeEnd","now","Date","setHours","getTime","DateRange","eCommerceCustProactiveFromDate","toUTCString","eCommerceCustProactiveToDate","proactiveOnDateRangeMessage","date","dateParts","split","FromSpecificPageTrigger","proactiveOnFromSpecificPageList","fromSpecificPageTrimmed","trim","referrer","indexOf","FromSpecificPage","eCommerceCustProactiveCameFromPage","proactiveOnFromSpecificPageMessage","PageVisitTrigger","visits","cookieName","cookies","expdate","setTime","isConsentGiven","setConsentCookie","_updateVisitCounter","proactiveOnPageVisitNumber","clear","set","domain","location","hostname","path","pathname","expires","PageVisits","eCommerceCustProactiveNumberOfVisits","proactiveOnPageVisitMessage","get","SpecificCountryRegionTrigger","customerCountryCode","suggestedMarket","proactiveOnSpecificLocation","eCommerceCustProactiveCountryCode","SpecificLocation","proactiveOnSpecificCountryRegionMessage","SpecificPageTrigger","proactiveOnSpecificPageList","specificPageTrimmed","href","SpecificPage","proactiveOnSpecificPageMessage","WaitOnTimeTrigger","proactiveOnWaitTimeSeconds","waitTimeInMilliseconds","triggerTime","WaitOnTime","eCommerceCustProactiveTimeOnPage","proactiveOnWaitTimeMessage","ProactiveTriggers","userId","uuidv4","_getContext","enabled","timeout","_proactiveCheck","exception","provider","_getProvider","eCommerceOperatingUnitNumber","apiSettings","oun","eCommerceBaseUrl","baseUrl","eCommerceDataAreaId","channel","InventLocationDataAreaId","UserId","AccountNumber","customerAccountNumber","Email","FirstName","firstName","anonymousUserName","LastName","lastName","eCommerceCustPageURL","eCommerceCustChatType","proactiveChatEnabled","proactive","_isProactive","getChatWrapperStyle","position","top","right","bottom","left","zIndex","justifyContent","getMaximizedChatWrapperStyle","isMobileDevice","height","width","padding","chatHeight","chatWidth","getChatButtonStyle","alignItems","backgroundColor","startChatButtonBackgroundColor","startChatButtonTextColor","borderColor","startChatButtonBorderColor","borderRadius","startChatButtonBorderRadius","borderStyle","startChatButtonBorderStyle","borderWidth","startChatButtonBorderWidth","storeLogoURL","cursor","outlineStyle","alignSelf","boxShadow","WebkitBoxShadow","MozBoxShadow","getButtonStoreLogoStyle","headerBackgroundColor","headerTextColor","marginRight","boxSizing","getChatStoreLogoStyle","margin","getChatMessagesStyle","minimized","getChatMessageHeader","chatHeaderHeight","backgroundImage","headerBackgroundImageURL","backgroundRepeat","flexDirection","chatBorderStyle","chatBorderWidth","getMinimizeButtonStyle","borderTop","borderLeft","borderRight","borderBottom","getCloseButtonStyle","border","getChatMessageContent","chatBorderColor","getProactiveWrapperStyle","getProactiveMessageHeader","getProactiveMessageContent","getProactiveButtonStyle","outline","fontFormat","font","join","CommerceChatStore","setNewMessage","setNewMessageAction","powervaDirectlineTokenURL","botID","tenantID","fetch","method","then","r","json","token","pvaChatConnectorPowervaDirectlineTokenURL","pvaChatConnectorBotID","pvaChatConnectorTenantID","dispatch","next","action","payload","language","navigator","_activity$from","activity","from","triggerQuery","ReactWebChat","WebChat","setUserId","useState","useMemo","ctx","directLine","createDirectLine","directLineToken","commerceChatStore","store","createStore","actionHandler","styleOptions","bubbleStyling","bubbleBackground","bubbleTextColor","bubbleBorderColor","bubbleBorderRadius","bubbleBorderStyle","bubbleBorderWidth","bubbleFromUserBackground","bubbleFromUserTextColor","bubbleFromUserBorderColor","bubbleFromUserBorderRadius","bubbleFromUserBorderStyle","bubbleFromUserBorderWidth","getBubbleStyling","avatarStyling","avatarBorderRadius","avatarSize","botAvatarBackgroundColor","botAvatarImage","botAvatarInitials","userAvatarBackgroundColor","userAvatarImage","userAvatarInitials","showAvatarInGroup","getAvatarStyling","suggestedActionStyling","suggestedActionLayout","suggestedActionBackground","suggestedActionTextColor","suggestedActionBorderColor","suggestedActionBorderRadius","suggestedActionBorderStyle","suggestedActionBorderWidth","suggestedActionDisabledBorderStyle","suggestedActionDisabledBorderWidth","suggestedActionDisabledTextColor","suggestedActionHeight","suggestedActionImageHeight","suggestedActionsCarouselFlipperCursor","suggestedActionsCarouselFlipperBoxWidth","suggestedActionsCarouselFlipperSize","suggestedActionsFlowMaxHeight","suggestedActionsStackedHeight","suggestedActionsStackedOverflow","suggestedActionsStackedLayoutButtonMaxHeight","suggestedActionsStackedLayoutButtonTextWrap","getSuggestedActionStyling","otherStyling","groupTimestamp","sendTimeout","sendTimeoutForAttachments","timestampColor","timestampFormat","notificationDebounceTimeout","hideToaster","toasterHeight","toasterMaxHeight","toasterSingularMaxHeight","toastFontSize","toastIconWidth","toastSeparatorColor","toastTextPadding","toastErrorBackgroundColor","toastErrorColor","toastInfoBackgroundColor","toastInfoColor","toastSuccessBackgroundColor","toastSuccessColor","toastWarnBackgroundColor","toastWarnColor","typingAnimationBackgroundImage","typingAnimationDuration","typingAnimationHeight","typingAnimationWidth","videoHeight","markdownExternalLinkIconImage","markdownRespectCRLF","internalLiveRegionFadeAfter","accent","subtle","getOtherStyling","hideUploadButton","primaryFont","getChatStyleOptions","userID","INVALID_TOKEN","loaded","setLoaded","setMinimized","newMessage","setToken","isProactive","setIsProactive","proactiveMessage","setProactiveMessage","closed","setClosed","setProvider","isMobile","variant","VariantType","Browser","Viewport","chatStyle","getChatStyling","ChatWrapperStyle","MaximizedChatWrapperStyle","ChatButtonStyle","ButtonStoreLogoStyle","ChatStoreLogoStyle","ChatMessagesStyle","ChatMessageHeader","MinimizeButtonStyle","CloseButtonStyle","ChatMessageContent","ProactiveWrapperStyle","ProactiveMessageHeader","ProactiveMessageContent","ProactiveButtonStyle","RedDotStyle","background","handleMaximizeButtonClick","useEffect","getDirectLineToken","contextProvider","ContextProvider","prov","isValidToken","alt","fontWeight","fontSize","chatButtonHeader","chatButtonText","flexGrow","handleMinimizeButtonClick","handleCloseButtonClick","version","viewBox","xmlSpace","d","fill","ChatCore","unableToLoadChatMessage","p","interval","Chat","CheckoutStateInput","_this","getCacheKey","buildCacheKey","getCacheObjectType","dataCacheType","createObservableDataAction","CheckoutState","inputData","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_customerReference","_customerRequisition","_note","_isTermsAndConditionAccepted","_customerAccountAmount","defineProperty","prototype","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateShippingAddress","newShippingAddress","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","filter","giftCard","Id","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","customerReference","customerRequisition","note","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","EnabledPaymentsForOBO","ModuleStatesCacheKey","getModuleStates","cacheKey","moduleStates","update","updateModuleStates","WrappedComponent","_super","ModuleState","call","initializeState","_b","typeName","states","__assign","_a","hasInitialized","isCancellable","isSubmitContainer","childIds","getModuleStateManager","isUpdating","isPending","isSkipped","isDisabled","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","setIsCancellable","setIsSubmitContainer","onPending","onSkip","onDisable","getModule","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","values","_moduleState","modules","_validateLeaf","module","isMatch","_validateContainer","allMatched","skipSkippableItem","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","includes","ArrayExtensions","hasElements","enableControl","__extends","CheckoutErrors","setCheckoutErrors","errorCode","apiError","clientCheckoutError","consoleCheckoutErrors","getCheckoutState","checkoutError","checkoutErrorsList","errorLocation","ErrorLocation","Console","consoleCheckoutError","errorMessageResource","getCheckoutErrorMessage","console","log","CheckoutPaymentInstrument","Checkout","updateCheckoutError","newCheckoutError","updateShouldFocusOnCheckoutError","newShouldFocusOnCheckoutError","genericError","genericErrorMessage","focusOnCheckoutError","checkoutErrorRef","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","CheckoutModule","None","setCheckoutErrorFocus","checkoutModuleId","checkoutModule","keys","errorMessageFromAPI","errorResource","resource","ActionError","ErrorCode","ErrorMessageResource","checkoutTimeoutErrorMessage","Microsoft_Dynamics_Commerce_Runtime_BlockedLoyaltyCard","blockedLoyaltyCardErrorMessage","CheckoutLoyalty","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountLimitSignDifferentFromAmountDue","customerAccountLimitSignDifferentFromAmountDueErrorMessage","CheckoutCustomerAccountPayment","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsAvailableCreditLimit","customerAccountPaymentExceedsAvailableCreditLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsCustomerAccountFloorLimit","customerAccountPaymentExceedsCustomerAccountFloorLimitErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItems","customerAccountPaymentExceedsTotalAmountForCarryOutAndReturnItemsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentForCustomerWithoutAllowOnAccount","customerAccountPaymentForCustomerWithoutAllowOnAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_CustomerAccountPaymentNotAllowedForOpenInvoices","customerAccountPaymentNotAllowedForOpenInvoicesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_FraudRisk","fraudRiskErrorMessage","Microsoft_Dynamics_Commerce_Runtime_GiftCardBalanceInquiryFailed","giftCardBalanceInquiryFailedErrorMessage","CheckoutGiftCard","Microsoft_Dynamics_Commerce_Runtime_GiftCardCurrencyMismatch","giftCardCurrencyMismatchErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidCartVersion","invalidCartVersionErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidLoyaltyCardNumber","invalidLoyaltyCardNumberErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest","invalidPaymentRequestErrorMessage","Microsoft_Dynamics_Commerce_Runtime_InvalidPaymentRequest_Console","invalidPaymentRequestConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MissingRequiredCartTenderLines","missingRequiredCartTenderLinesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_MultipleCustomerAccountPaymentsNotAllowed","multipleCustomerAccountPaymentsNotAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoMoreThanOneLoyaltyTender","noMoreThanOneLoyaltyTenderErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoResponseFromGatewayForGiftCardBalanceInquiry","noResponseFromGatewayForGiftCardBalanceInquiryErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NoTenderLoyaltyCard","noTenderLoyaltyCardErrorMessage","Microsoft_Dynamics_Commerce_Runtime_NotEnoughRewardPoints","notEnoughRewardPointsErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAlreadyVoided","paymentAlreadyVoidedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentAmountExceedsGiftBalance","paymentAmountExceedsGiftBalanceErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties","paymentRequiresMerchantPropertiesErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentRequiresMerchantProperties_Console","paymentRequiresMerchantPropertiesConsoleErrorMessage","Microsoft_Dynamics_Commerce_Runtime_PaymentUsingUnauthorizedAccount","paymentUsingUnauthorizedAccountErrorMessage","Microsoft_Dynamics_Commerce_Runtime_RefundAmountMoreThanAllowed","refundAmountMoreThanAllowedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePayment","unableToAuthorizePaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardAdditionalContextRequired","unableToAuthorizePaymentCardAdditionalContextRequiredErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToAuthorizePaymentCardTypeMissingOrNotSupported","unableToAuthorizePaymentCardTypeMissingOrNotSupportedErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToCancelPayment","unableToCancelPaymentErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToReadCardTokenInfo","unableToReadCardTokenInfoErrorMessage","Microsoft_Dynamics_Commerce_Runtime_UnableToRetrieveCardPaymentAcceptResult","unableToRetrieveCardPaymentAcceptResultErrorMessage","ErrorComponent","checkoutApplePay","applePayButton","alert","SummaryForm","formProps","paymentAmount","addPaymentButton","appliedLine","bottomBorder","EditForm","inputLabel","inputAmount","customerName","customerSince","accountCredit","accountDetails","checkoutCustomerAccount","summaryView","editView","OverlayModal","checkoutExpress","waiting","addPaymentForm","overlayModal","shouldHideExpressCheckout","checkoutGooglePay","checkoutButton","CookieComplianceAcceptButton","acceptCookiesButtonText","acceptCookiesButtonAriaLabel","telemetryContent","onClose","payLoad","getPayloadObject","attributes","getTelemetryAttributes","CookieComplianceLinks","_mapEditableLinks","linkdata","editableLinks","forEach","link","linkText","contentAction","etext","editableLink","linkUrl","destinationUrl","openInNewTab","additionalProperties","onTelemetryClick","links","onTextChange","CookieCompliance","getTelemetryObject","telemetryPageName","friendlyName","handleLinkTextChange","linkIndex","_this$props$config$ac","actionLinks","handleContentChange","content","visible","cookieRef","_onDismiss","acceptCookiesAriaLabel","moduleConfig","MsDyn365","isBrowser","onDismiss","CookieComplianceBanner","AlertProps","fade","Content","acceptButton","reload","Alert","Iframe","iframeRef","srcURL","URL","protocol","toLocaleLowerCase","iframeClassName","Heading","_createHeading","IframeContainer","IFrame","_createIframe","cookieConsentAccepted","_renderAlert","cookieConsentRequiredMessage","targetURL","iframeAriaLabel","IFrameView","toggleBopisHandler","cartLine","isBopisSelected","_cartLine$pickUpInSto","pickUpInStore","callbacks","toggleBopis","onChangeStoreHandler","_cartLine$pickUpInSto2","renderCartLine","storeSelector","isMultiplePickUp","emailDeliveryModeCode","outOfStockErrorMessage","addToWishlist","remove","renderGroupBopisBlock","_cartLine$data2","cartline","DeliveryMode","changeStoreDisplayText","shipInsteadDisplayText","pickItUpDisplayText","TelemetryConstant","PickupInStore","puckUpinStoreAttribute","addToOrderTemplate","renderCartlinesInternal","cartLines","itemIndex","renderBopisBlock","_cartLine$data","shipToAddressDisplayText","pickUpAtStoreWithLocationText","ContainerProps","orgUnitName","renderCartlines","waitingComponent","cartLoadingStatus","isCartDataResult","multiplePickUpEnabled","CartlinesWrapper","slots","emptyCart","renderCartLinesGroupHeader","count","_cartLine$pickUpInSto6","pickUpText","shippingText","emailshippingText","payInvoicesDisplayText","groupTitle","IsInvoiceLine","StringExtensions","isNullOrEmpty","renderCartLinesGroupTitle","_cartLine$pickUpInSto3","_cartLine$pickUpInSto4","_cartLine$pickUpInSto5","itemLabel","itemsLabel","countTitle","deliveryOption","_props$cart2","_props$cart3","_props$orderSummaryLi","_props$cart4","_props$cart5","_props$cart6","updatedTitle","cartTitle","totalItemsInCart","renderModuleAttributes","checkoutBlockedDueToUnavailableFunds","orderSummaryLineitems","orderTotal","checkoutAsSignInUserButton","checkoutAsGuestButton","renderOrderSummaryCheckoutButton","promotionOptions","promotions","promotionMessageWrapper","promotionMessage","promotionSeeAllLink","promotionDialog","renderCartLinesGroup","cartLinesGroup","cartlines","_props$context$action","_props$context$action2","cartlineId","countItem","reduce","_item$data$cartline$Q","_item$data","Quantity","countItems","EmailDeliveryModeCode","cartDataResult","orderSummaryHeading","OrderSummaryWrapper","renderInvoiceSummarylines","invoiceSummaryLines","orderSummaryItems","invoices","loyalty","invoiceSummaryLineitems","OrderSummaryItems","renderOrderSummarylines","orderSummaryLines","subtotal","totalDiscounts","shipping","otherCharge","tax","errorData","OrderSummaryErrors","errors","Wrapper","header","_props$cart","promoCode","expressCheckoutButton","ExpressCheckoutSectionWrapper","createTemplateFromCartButton","renderOrderSummaryCheckout","OrderInfomation","orderInformationProps","salesId","receiptId","createdDate","amount","channelReferenceId","channelName","channelAddress","SalesLine","salesLineProps","salesLine","buyAgainButton","GroupDelivery","deliveryProps","Group","groupProps","delivery","address","salesLinesProps","salesLines","isCashAndCarryTransaction","LineId","salesStatus","deliveryType","shipment","trackingInfo","showTimeslot","pickupProps","pickupDateTimeslot","Groups","groupsProps","groups","group","OrderSummary","orderSummaryProps","totalAmount","earnedPoints","Payment","_ref7","paymentMethodsProps","methods","Help","_ref8","helpProps","needHelpLabel","helpLineNumberLabel","contactNumber","_ref9","viewModes","tableViewActions","table","placedBy","orderInfomation","orderSummary","payment","help"],"sourceRoot":""}