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GrC,IAAIC,EAAmB,GAInBA,EADAF,EAF4B,GACC,OAIlB37B,EAAAA,EAAAA,QAAO07B,EAAcC,GAEpC,MAAMtnC,GAAQ2L,EAAAA,EAAAA,QAAOy7B,EAAWE,GAG1BpuC,GAAUC,EAAAA,EAAAA,kBAAiB,QAASlhB,EAAMigB,iBAAmB,YAAa,IAC1EsB,GAAaC,EAAAA,EAAAA,wBAAuBxhB,EAAMigB,iBAAmBgB,GAC7DpF,EAA6B,CAC/B2zC,WAAY1tD,EAAO,UAAY,UAEnC,OACIlC,EAAAA,cAAA,MAAAud,OAAAC,OAAA,CAAKrL,UAAU,gBAAgBJ,KAAK,SAAQ,aAAaoW,EAAO3I,MAAO2I,GAAWxG,GAC9E3hB,EAAAA,cAAA,OAAKmS,UAAU,uBAAsB,iBAAa8J,MAAOA,GACpD0zC,GAEH,IAIDE,EAAsE9e,EAAAA,GAAiB+e,wBAGlG,gXAAUttD,CAAA,CAAIyuC,UAAWqe,GA5CM,CAAC,IA8ClC","sources":["webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/pva-chat-connector.tsx?def7","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/proactive-chat-trigger.ts?734c","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/cart-amount-trigger.ts?742f","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/cart-number-of-items-trigger.ts?d5f8","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/cart-specific-product-trigger.ts?2cd6","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/helpers/consts.ts?02a5","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/date-range-trigger.ts?8bfc","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/from-specific-page-trigger.ts?fd6f","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/page-visits-trigger.ts?cce7","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/specific-CountryRegion-trigger.ts?e87a","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/specific-page-trigger.ts?6e03","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/triggers/wait-on-time-trigger.ts?d898","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/proactive/index.ts?36a2","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/helpers/ContextProvider.ts?4518","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/helpers/StyleComposers.ts?0192","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/helpers/CommerceChatStore.ts?5b45","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/components/ChatCore.tsx?a412","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/components/Chat.tsx?1581","webpack://venchi-ecommerce-msdyn365/./src/modules/pva-chat-connector/pva-chat-connector.view.tsx?3d5c","webpack://venchi-ecommerce-msdyn365/./src/themes/venchi/views/ratings-histogram.view.tsx?62be","webpack://venchi-ecommerce-msdyn365/./src/modules/account-generic-tile/account-generic-tile.tsx?4353","webpack://venchi-ecommerce-msdyn365/./src/modules/account-generic-tile/account-generic-tile.view.tsx?4b58","webpack://venchi-ecommerce-msdyn365/./src/modules/account-generic-tile/components/account-generic-tile-links.tsx?2bc7","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-button.tsx?c1c2","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-error.tsx?347f","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-input.tsx?fd25","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-label.tsx?aab5","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-loading-icon.tsx?d70e","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-loading-message.tsx?d239","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/components/password-reset-verification-success.tsx?3c81","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/password-reset-verification.tsx?691f","webpack://venchi-ecommerce-msdyn365/./src/modules/password-reset-verification/password-reset-verification.view.tsx?dffa","webpack://venchi-ecommerce-msdyn365/./src/common/address-autosuggest.ts?f5a2","webpack://venchi-ecommerce-msdyn365/./src/common/address-common.ts?cf4b","webpack://venchi-ecommerce-msdyn365/./src/common/address-format.data.ts?6cbf","webpack://venchi-ecommerce-msdyn365/./src/common/address-format.ts?4f04","webpack://venchi-ecommerce-msdyn365/./src/common/address-meta-data.ts?c6e6","webpack://venchi-ecommerce-msdyn365/./src/common/address-module.data.ts?697a","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-checkbox.tsx?eb1a","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-add.tsx?e6a6","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-alert.tsx?10d1","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-button.tsx?7f7b","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-detail-item.tsx?5209","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-dropdown.tsx?f24b","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-error-message.tsx?89ad","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-error-title.tsx?3926","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-input.tsx?8073","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-label.tsx?6864","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-list.tsx?a628","webpack://venchi-ecommerce-msdyn365/./src/common/components/address-show.tsx?3f60","webpack://venchi-ecommerce-msdyn365/./src/modules/account-management-address/account-management-address.tsx?27e7","webpack://venchi-ecommerce-msdyn365/./src/modules/account-management-address/account-management-address.view.tsx?8c9f","webpack://venchi-ecommerce-msdyn365/./src/modules/business-account-address/business-account-address.tsx?299e","webpack://venchi-ecommerce-msdyn365/./src/modules/business-account-address/business-account-address.view.tsx?5078","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/components/sign-up-button.tsx?e1d9","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/components/sign-up-error.tsx?7f8a","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/components/sign-up-input.tsx?5bbe","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/components/sign-up-label.tsx?4988","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/components/sign-up-radio-button.tsx?f8c1","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/business-sign-up.tsx?13a2","webpack://venchi-ecommerce-msdyn365/./src/modules/business-sign-up/business-sign-up.view.tsx?e2f8","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/components/search-bar.tsx?63c1","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/components/data-grid.tsx?ddec","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/components/business-partner-users-table.tsx?c677","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/components/business-partners-table.tsx?8b1d","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/business-partners.tsx?57a6","webpack://venchi-ecommerce-msdyn365/./src/modules/business-partners/business-partners.view.tsx?b34e","webpack://venchi-ecommerce-msdyn365/./src/modules/footer-category/footer-category.tsx?e0bd","webpack://venchi-ecommerce-msdyn365/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/components/invoice-details-header.tsx?a6c6","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/components/invoice-details-payment-summary.tsx?3434","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/components/invoice-details-products.tsx?8f29","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/helpers/invoice-data.ts?608f","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/invoice-details.tsx?b51a","webpack://venchi-ecommerce-msdyn365/./src/modules/invoice-details/invoice-details.view.tsx?3784","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/invoice-error-component.tsx?2ff9","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/invoices-filter-component.tsx?5fd4","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?f5e1","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?48db","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9790","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/make-payment-component.tsx?1427","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/pay-invoice-component.tsx?6f61","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/request-invoice-button.tsx?9eb0","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/helpers/invoice-data.ts?00b1","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/helpers/invoice-status.ts?5841","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/helpers/pay-invoices.ts?30c0","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/components/request-invoice-modal.tsx?f9b5","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/invoices-list.tsx?2d55","webpack://venchi-ecommerce-msdyn365/./src/modules/invoices-list/invoices-list.view.tsx?8b51","webpack://venchi-ecommerce-msdyn365/./src/modules/subscribe/subscribe.tsx?9fea","webpack://venchi-ecommerce-msdyn365/./src/modules/subscribe/subscribe.view.tsx?19c8","webpack://venchi-ecommerce-msdyn365/./src/modules/adventureworks/views/components/carticon.component.tsx?3c7c"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\nimport { isOboRequest } from '@msdyn365-commerce/core-internal';\r\nimport { IPvaChatConnectorData } from './pva-chat-connector.data';\r\nimport { IPvaChatConnectorConfig, IPvaChatConnectorProps } from './pva-chat-connector.props.autogenerated';\r\n\r\nexport interface IPvaChatConnectorViewProps extends IPvaChatConnectorProps {\r\n config: IPvaChatConnectorConfig;\r\n}\r\n\r\n/**\r\n * PvaChatConnector component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass PvaChatConnector extends React.PureComponent> {\r\n // Loads CDN version of Botframework-Webchat library\r\n public componentDidMount(): void {\r\n if (isOboRequest(this.props.context.request)) {\r\n return;\r\n }\r\n\r\n const url = this.props.config.botFrameworkCDNURL || this.props.context.app.config.pvaChatConnectorBotFrameworkCDNURL;\r\n const script = document.createElement('script');\r\n script.src = url;\r\n script.async = true;\r\n script.crossOrigin = 'anonymous';\r\n document.body.appendChild(script);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n if (isOboRequest(this.props.context.request)) {\r\n return null;\r\n }\r\n\r\n return this.props.renderView(this.props);\r\n }\r\n}\r\n\r\nexport default PvaChatConnector;\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 { IProactiveChatTrigger } from '../../interfaces';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\n\r\n/**\r\n * ProactiveChatTrigger class - checks if Proactive Chat should be triggered, starts the chat and sets context\r\n */\r\nabstract class ProactiveChatTrigger implements IProactiveChatTrigger {\r\n public props: IPvaChatConnectorViewProps;\r\n public context: IChatContext;\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n this.props = props;\r\n this.context = context;\r\n }\r\n\r\n /**\r\n * Generates Chat Context with included properties related to Proactive Chat\r\n * @returns TContextProvider - Chat Context\r\n */\r\n public abstract getContextProvider(): TContextProvider;\r\n\r\n /**\r\n * Generates chat welcome message to be used if Proactive Chat is triggered\r\n * @returns string - chat welcome message\r\n */\r\n public abstract getMessage(): string;\r\n\r\n /**\r\n * Validate specific trigger conditions if Proactive Chat should be initiated\r\n * @returns boolean (TRUE if Proactive Chat should be triggered)\r\n */\r\n public abstract validate(): Promise;\r\n}\r\n\r\nexport default ProactiveChatTrigger;\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// @ts-ignore\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * CartAmountTrigger class - proactive chat is triggered if cArt amount is in preset boundaries (config.proactiveOnCartAmountMin, config.proactiveOnCartAmountMax)\r\n */\r\nclass CartAmountTrigger extends ProactiveChatTrigger {\r\n private min?: number;\r\n private max?: number;\r\n private totalInCart: number = 0;\r\n\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n this.min = this.props.config.proactiveOnCartAmountMin;\r\n this.max = this.props.config.proactiveOnCartAmountMax;\r\n this.props.context.telemetry.debug(\r\n `[Chat][${CartAmountTrigger.name}] Cart amount proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\r\n );\r\n }\r\n\r\n public async validate(): Promise {\r\n const cart = await this._getCart();\r\n if (cart.isEmpty) {\r\n this.props.context.telemetry.debug(`[Chat][${CartAmountTrigger.name}] Cart was empty. Validation returning 'false'.`);\r\n return false;\r\n }\r\n\r\n this.totalInCart = cart.cart.TotalAmount || 0;\r\n let retVal = false;\r\n if (this.min) {\r\n if (this.max) {\r\n retVal = this.min <= this.totalInCart && this.totalInCart <= this.max;\r\n } else {\r\n retVal = this.min <= this.totalInCart;\r\n }\r\n } else {\r\n if (this.max) {\r\n retVal = this.totalInCart <= this.max;\r\n } else {\r\n retVal = false;\r\n }\r\n }\r\n this.props.context.telemetry.debug(\r\n `[Chat][${CartAmountTrigger.name}] Validation result: '${retVal}'; Cart total: '${this.totalInCart}'.`\r\n );\r\n return retVal;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: 'Cart Amount',\r\n eCommerceCustProactiveShoppingCartAmount: `${this.totalInCart}`\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnCartAmountMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n\r\n private async _getCart(): Promise {\r\n return getCartState(this.props.context.actionContext);\r\n }\r\n}\r\n\r\nexport default CartAmountTrigger;\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// @ts-ignore\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * CartNumberOfItemsTrigger class - proactive chat is triggered if Cart Number of Items is in preset boundaries (config.proactiveOnCartNoOfItemsMin, config.proactiveOnCartNoOfItemsMax)\r\n */\r\nclass CartNumberOfItemsTrigger extends ProactiveChatTrigger {\r\n private min?: number;\r\n private max?: number;\r\n private numberOfItems: number = 0;\r\n\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n this.min = this.props.config.proactiveOnCartNoOfItemsMin;\r\n this.max = this.props.config.proactiveOnCartNoOfItemsMax;\r\n\r\n this.props.context.telemetry.debug(\r\n `[${CartNumberOfItemsTrigger.name}] Cart number of items proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\r\n );\r\n }\r\n\r\n public async validate(): Promise {\r\n const cart = await this._getCart();\r\n if (cart.isEmpty) {\r\n this.props.context.telemetry.debug(`[Chat][${CartNumberOfItemsTrigger.name}] Cart was empty. Validation returning 'false'.`);\r\n return false;\r\n }\r\n\r\n this.numberOfItems = cart.cart.TotalItems || 0;\r\n\r\n let retVal = false;\r\n if (this.min) {\r\n if (this.max) {\r\n retVal = this.min <= this.numberOfItems && this.numberOfItems <= this.max;\r\n } else {\r\n retVal = this.min <= this.numberOfItems;\r\n }\r\n } else {\r\n if (this.max) {\r\n retVal = this.numberOfItems <= this.max;\r\n } else {\r\n retVal = false;\r\n }\r\n }\r\n this.props.context.telemetry.debug(\r\n `[${CartNumberOfItemsTrigger.name}] Validation result: '${retVal}'; Number of items in cart: '${this.numberOfItems}'.`\r\n );\r\n return retVal;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: 'Cart Number of Items',\r\n eCommerceCustProactiveShoppingCartNumberOfItems: `${this.numberOfItems}`\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnCartNoOfItemsMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n\r\n private async _getCart(): Promise {\r\n return getCartState(this.props.context.actionContext);\r\n }\r\n}\r\n\r\nexport default CartNumberOfItemsTrigger;\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// @ts-ignore\r\n/* eslint-disable no-duplicate-imports */\r\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\r\nimport { TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * CartSpecificProductTrigger class - proactive chat is triggered if a Product in the Cart is in preset list of products (config.proactiveOnCartSpecificProductList)\r\n */\r\nclass CartSpecificProductTrigger extends ProactiveChatTrigger {\r\n private product: string = '';\r\n\r\n public async validate(): Promise {\r\n let isValid = false;\r\n const cart = await this._getCart();\r\n if (!cart.isEmpty) {\r\n if (cart.cart.CartLines) {\r\n this.props.context.telemetry.debug(\r\n `[${CartSpecificProductTrigger.name}] Number of cart line items was '${cart.cart.CartLines?.length}'`\r\n );\r\n for (let i = 0; i < cart.cart.CartLines?.length; i++) {\r\n if (cart.cart.CartLines[i]) {\r\n if (this.props.config.proactiveOnCartSpecificProductList) {\r\n this.props.context.telemetry.debug(\r\n `[${CartSpecificProductTrigger.name}] Number of cart specific products was configured for proactive chat was '${this.props.config.proactiveOnCartSpecificProductList?.length}'`\r\n );\r\n // Find first item, from user-defined list of products, that matches the cart lines' itemId in the cart.\r\n for (let j = 0; j < (this.props.config.proactiveOnCartSpecificProductList?.length || 0); j++) {\r\n if (\r\n this.props.config.proactiveOnCartSpecificProductList &&\r\n cart.cart.CartLines[i].ItemId &&\r\n this.props.config.proactiveOnCartSpecificProductList[j] === cart.cart.CartLines[i].ItemId\r\n ) {\r\n this.props.context.telemetry.debug(\r\n `[${CartSpecificProductTrigger.name}] Matched cart line item ID '${cart.cart.CartLines[i].ItemId}' against user-defined list of specific products for proactive chat.`\r\n );\r\n isValid = true;\r\n break;\r\n }\r\n }\r\n }\r\n } else {\r\n // Rest of the CartLines are undefined\r\n break;\r\n }\r\n }\r\n } else {\r\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart did not contain any cart lines.`);\r\n }\r\n } else {\r\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart was empty.`);\r\n }\r\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Validation returning '${isValid}'.`);\r\n return isValid;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: 'Cart Specific Product',\r\n eCommerceCustProactiveShoppingCartSpecificProduct: `${this.product}`\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnCartSpecificProductMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n\r\n private async _getCart(): Promise {\r\n return getCartState(this.props.context.actionContext);\r\n }\r\n}\r\n\r\nexport default CartSpecificProductTrigger;\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\nexport enum ProactiveChatNames {\r\n DateRange = 'Date Range',\r\n FromSpecificPage = 'From Specific Page',\r\n PageVisits = 'Page Visits',\r\n SpecificLocation = 'Specific Location',\r\n SpecificPage = 'Specific Page',\r\n WaitOnTime = 'Wait On Time'\r\n}\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 { ProactiveChatNames } from '../../helpers/consts';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * DateRangeTrigger class - proactive chat is triggered if current date is in preset date boundaries (config.proactiveOnDateRangeStart, config.proactiveOnDateRangeEnd)\r\n */\r\nclass DateRangeTrigger extends ProactiveChatTrigger {\r\n private start?: Date;\r\n private end?: Date;\r\n\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n this.start = this._toDate(this.props.config.proactiveOnDateRangeStart);\r\n this.end = this._toDate(this.props.config.proactiveOnDateRangeEnd);\r\n\r\n this.props.context.telemetry.debug(\r\n `[${DateRangeTrigger.name}] Proactive chat initialized with startDate: '${this.start}'; max: '${this.end}'.`\r\n );\r\n }\r\n\r\n public async validate(): Promise {\r\n const now = new Date();\r\n now.setHours(0, 0, 0, 0);\r\n\r\n let retVal = false;\r\n if (this.start) {\r\n if (this.end) {\r\n retVal = this.start.getTime() <= now.getTime() && now.getTime() <= this.end.getTime();\r\n } else {\r\n retVal = this.start.getTime() <= now.getTime();\r\n }\r\n } else if (this.end) {\r\n retVal = now.getTime() <= this.end.getTime();\r\n }\r\n\r\n this.props.context.telemetry.debug(\r\n `[${DateRangeTrigger.name}] Validation result: '${retVal}'; Current date used to compare: '${now}'.`\r\n );\r\n return retVal;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: ProactiveChatNames.DateRange,\r\n eCommerceCustProactiveFromDate: this.start ? this.start.toUTCString() : '',\r\n eCommerceCustProactiveToDate: this.end ? this.end.toUTCString() : ''\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnDateRangeMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n\r\n /**\r\n * Converts string(us-en) to date\r\n * @param date string (mm/dd/yyyy)\r\n * @returns Date or undefined\r\n */\r\n private _toDate(date?: string): Date | undefined {\r\n if (date) {\r\n const dateParts = date.split('/');\r\n return new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]);\r\n } else {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nexport default DateRangeTrigger;\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 { ProactiveChatNames } from '../../helpers/consts';\r\nimport { TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * FromSpecificPageTrigger class - proactive chat is triggered if user has come from specific page (the one listed in config.proactiveOnFromSpecificPageList)\r\n */\r\nclass FromSpecificPageTrigger extends ProactiveChatTrigger {\r\n public async validate(): Promise {\r\n let isValid = false;\r\n if (this.props.config.proactiveOnFromSpecificPageList) {\r\n this.props.context.telemetry.debug(\r\n `[${FromSpecificPageTrigger.name}] Number of items in user-defined list of 'From Specific Page' was '${this.props.config.proactiveOnFromSpecificPageList?.length}'.`\r\n );\r\n for (let i = 0; i < (this.props.config.proactiveOnFromSpecificPageList?.length || 0); i++) {\r\n const fromSpecificPageTrimmed: string = this.props.config.proactiveOnFromSpecificPageList[i].trim();\r\n this.props.context.telemetry.debug(\r\n `[Chat][${FromSpecificPageTrigger.name}] Current page URL: '${window.document.referrer}'.`\r\n );\r\n this.props.context.telemetry.debug(\r\n `[${FromSpecificPageTrigger.name}] Current item from user-defined list of 'From Specific Page': '${fromSpecificPageTrimmed}'.`\r\n );\r\n\r\n if (window.document.referrer.indexOf(fromSpecificPageTrimmed) > -1) {\r\n isValid = true;\r\n break;\r\n }\r\n }\r\n } else {\r\n this.props.context.telemetry.debug(\r\n `[Chat][${FromSpecificPageTrigger.name}] User-defined 'From Specific Page' list was undefined.`\r\n );\r\n }\r\n this.props.context.telemetry.debug(`[Chat][${FromSpecificPageTrigger.name}] Validation returning '${isValid}'.`);\r\n return isValid;\r\n }\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: ProactiveChatNames.FromSpecificPage,\r\n eCommerceCustProactiveCameFromPage: window.document.referrer\r\n };\r\n };\r\n }\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnFromSpecificPageMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n}\r\n\r\nexport default FromSpecificPageTrigger;\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 { ICookieContext } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/ICookieContext';\r\nimport { ProactiveChatNames } from '../../helpers/consts';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * PageVisitTrigger class - proactive chat is triggered if user has visited current page for (config.proactiveOnPageVisitNumber) or more times\r\n */\r\nclass PageVisitTrigger extends ProactiveChatTrigger {\r\n public visits: number = 0;\r\n private cookieName: string = 'TimesPageVisited';\r\n private expdate: Date;\r\n private cookies: ICookieContext;\r\n\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n this.cookies = this.props.context.request.cookies;\r\n this.expdate = new Date();\r\n // Set expiry date to 365 days.\r\n this.expdate.setTime(this.expdate.getTime() + 24 * 60 * 60 * 1000 * 365);\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie expiry date set to: '${this.expdate}'.`);\r\n\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie context is given: '${this.cookies.isConsentGiven()}'.`);\r\n if (this.cookies.isConsentGiven()) {\r\n this.cookies.setConsentCookie();\r\n }\r\n\r\n this._updateVisitCounter();\r\n }\r\n\r\n public async validate(): Promise {\r\n let retVal: boolean = false;\r\n\r\n if (this.props.config.proactiveOnPageVisitNumber) {\r\n retVal = this.visits >= this.props.config.proactiveOnPageVisitNumber;\r\n }\r\n\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Validation result: '${retVal}'.`);\r\n return retVal;\r\n }\r\n\r\n public clear(): void {\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Clearing cookie for page visit counter.`);\r\n this.cookies.set(this.cookieName, 0, {\r\n domain: window.location.hostname,\r\n path: window.location.pathname,\r\n expires: this.expdate\r\n });\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: ProactiveChatNames.PageVisits,\r\n eCommerceCustProactiveNumberOfVisits: `${this.visits}`\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnPageVisitMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n\r\n private _updateVisitCounter(): void {\r\n this.visits = this.cookies.get(this.cookieName).value || 0;\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter BEFORE update: '${this.visits}.`);\r\n ++this.visits;\r\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter AFTER update: '${this.visits}.`);\r\n\r\n this.cookies.set(this.cookieName, this.visits, {\r\n domain: window.location.hostname,\r\n path: window.location.pathname,\r\n expires: this.expdate\r\n });\r\n }\r\n}\r\n\r\nexport default PageVisitTrigger;\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 { ProactiveChatNames } from '../../helpers/consts';\r\nimport { IExtendedRequest } from '../../interfaces';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * SpecificPageTrigger class - proactive chat is triggered if user geographically uses the website from specific country/regions(config.proactiveOnSpecificCountryRegionCountry)\r\n */\r\nclass SpecificCountryRegionTrigger extends ProactiveChatTrigger {\r\n private customerCountryCode: string;\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n this.customerCountryCode = (this.props.context.request).suggestedMarket || 'n/a';\r\n this.props.context.telemetry.debug(\r\n `[${SpecificCountryRegionTrigger.name}] Customer country code set to: '${this.customerCountryCode}.'`\r\n );\r\n }\r\n\r\n public async validate(): Promise {\r\n const retVal: boolean = this.props.config.proactiveOnSpecificLocation\r\n ? this.props.config.proactiveOnSpecificLocation.toLowerCase().indexOf(this.customerCountryCode.toLowerCase()) > -1\r\n : false;\r\n this.props.context.telemetry.debug(`[Chat][${SpecificCountryRegionTrigger.name}] Validation returning '${retVal}'.`);\r\n return retVal;\r\n }\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveCountryCode: this.props.config.proactiveOnSpecificLocation || '',\r\n eCommerceCustProactiveType: ProactiveChatNames.SpecificLocation\r\n };\r\n };\r\n }\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnSpecificCountryRegionMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n}\r\n\r\nexport default SpecificCountryRegionTrigger;\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 { ProactiveChatNames } from '../../helpers/consts';\r\nimport { TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * SpecificPageTrigger class - proactive chat is triggered if current page is listed in config.proactiveOnSpecificPageList\r\n */\r\nclass SpecificPageTrigger extends ProactiveChatTrigger {\r\n public async validate(): Promise {\r\n let isValid = false;\r\n if (this.props.config.proactiveOnSpecificPageList) {\r\n this.props.context.telemetry.debug(\r\n `[${SpecificPageTrigger.name}] Number of items in user-defined list of 'Specific Pages' was '${this.props.config.proactiveOnSpecificPageList?.length}'.`\r\n );\r\n for (let i = 0; i < (this.props.config.proactiveOnSpecificPageList?.length || 0); i++) {\r\n const specificPageTrimmed: string = this.props.config.proactiveOnSpecificPageList[i].trim();\r\n this.props.context.telemetry.debug(`[] Current location URL: ${window.location.href}.`);\r\n this.props.context.telemetry.debug(`[] Current item from user-defined list of 'Specific Page': ${specificPageTrimmed}.`);\r\n if (window.location.href.indexOf(specificPageTrimmed) > -1) {\r\n isValid = true;\r\n break;\r\n }\r\n }\r\n } else {\r\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] User-defined 'Specific Page' list was undefined.`);\r\n }\r\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] Validation returning '${isValid}'.`);\r\n return isValid;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: ProactiveChatNames.SpecificPage\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnSpecificPageMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n}\r\n\r\nexport default SpecificPageTrigger;\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 { ProactiveChatNames } from '../../helpers/consts';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../../pva-chat-connector';\r\nimport ProactiveChatTrigger from './proactive-chat-trigger';\r\n\r\n/**\r\n * WaitOnTimeTrigger - proactive chat is triggered if user stays on current page for more than (config.proactiveOnWaitTimeSeconds) seconds\r\n */\r\nclass WaitOnTimeTrigger extends ProactiveChatTrigger {\r\n private waitTimeInMilliseconds: number | undefined;\r\n\r\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\r\n super(props, context);\r\n if (this.props.config.proactiveOnWaitTimeSeconds && !isNaN(this.props.config.proactiveOnWaitTimeSeconds)) {\r\n this.waitTimeInMilliseconds = Number(this.props.config.proactiveOnWaitTimeSeconds) * 1000;\r\n this.props.context.telemetry.debug(\r\n `[Chat][${WaitOnTimeTrigger.name}] Wait time (ms) set to: '${this.waitTimeInMilliseconds}'.`\r\n );\r\n }\r\n }\r\n\r\n public async validate(): Promise {\r\n const retVal: boolean = this.waitTimeInMilliseconds !== undefined;\r\n this.props.context.telemetry.debug(`[Chat][${WaitOnTimeTrigger.name}] Validation returning '${retVal}'.`);\r\n return retVal;\r\n }\r\n\r\n public getContextProvider(): TContextProvider {\r\n const triggerTime = Date.now() + (this.waitTimeInMilliseconds || 0);\r\n return () => {\r\n return triggerTime > Date.now()\r\n ? this.context\r\n : {\r\n ...this.context,\r\n eCommerceCustIsProactiveChat: 'True',\r\n eCommerceCustProactiveType: ProactiveChatNames.WaitOnTime,\r\n eCommerceCustProactiveTimeOnPage: `${this.waitTimeInMilliseconds ? this.waitTimeInMilliseconds : 0}`\r\n };\r\n };\r\n }\r\n\r\n public getMessage(): string {\r\n // @TODO: Add message processing if needed\r\n return this.props.config.proactiveOnWaitTimeMessage || this.props.config.proactiveDefaultMessage;\r\n }\r\n}\r\n\r\nexport default WaitOnTimeTrigger;\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 CartAmountTrigger from './triggers/cart-amount-trigger';\r\nimport CartNumberOfItemsTrigger from './triggers/cart-number-of-items-trigger';\r\nimport CartSpecificProductTrigger from './triggers/cart-specific-product-trigger';\r\nimport DateRangeTrigger from './triggers/date-range-trigger';\r\nimport FromSpecificPageTrigger from './triggers/from-specific-page-trigger';\r\nimport PageVisitTrigger from './triggers/page-visits-trigger';\r\nimport SpecificCountryRegionTrigger from './triggers/specific-CountryRegion-trigger';\r\nimport SpecificPageTrigger from './triggers/specific-page-trigger';\r\nimport WaitOnTimeTrigger from './triggers/wait-on-time-trigger';\r\n\r\ntype ProactiveChat =\r\n | typeof DateRangeTrigger\r\n | typeof SpecificPageTrigger\r\n | typeof FromSpecificPageTrigger\r\n | typeof PageVisitTrigger\r\n | typeof SpecificCountryRegionTrigger\r\n | typeof CartAmountTrigger\r\n | typeof CartNumberOfItemsTrigger\r\n | typeof CartSpecificProductTrigger\r\n | typeof WaitOnTimeTrigger;\r\n\r\n/**\r\n * List of Proactive Chat Validators in order of validation (first proactive chat that pass validation is triggered, the rest are ommited)\r\n */\r\nexport const ProactiveTriggers: ProactiveChat[] = [\r\n DateRangeTrigger,\r\n SpecificPageTrigger,\r\n FromSpecificPageTrigger,\r\n PageVisitTrigger,\r\n SpecificCountryRegionTrigger,\r\n CartAmountTrigger,\r\n CartNumberOfItemsTrigger,\r\n CartSpecificProductTrigger,\r\n WaitOnTimeTrigger\r\n];\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 { IRequestContextUser } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/IRequestContext';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { ProactiveTriggers } from '../proactive';\r\nimport ProactiveChatTrigger from '../proactive/triggers/proactive-chat-trigger';\r\nimport { IPvaChatConnectorViewProps } from '../pva-chat-connector';\r\nimport { IProactiveData } from './../interfaces';\r\nimport { IChatContext, TContextProvider } from '@msdyn365-commerce-modules/chat';\r\n\r\n/**\r\n *\r\n * ContextProvider class - generates chat context, and checks for proactive triggers\r\n */\r\nclass ContextProvider {\r\n public data: IProactiveData;\r\n public props: IPvaChatConnectorViewProps;\r\n private user: IRequestContextUser;\r\n private userId: string;\r\n private context: IChatContext;\r\n private provider: TContextProvider | undefined;\r\n\r\n constructor(props: IPvaChatConnectorViewProps) {\r\n this.props = props;\r\n this.user = this.props.context.request.user;\r\n this.userId = `dl_${uuidv4()}`;\r\n this.context = this._getContext();\r\n // Proactive Chat related data\r\n this.data = {\r\n enabled: false,\r\n timeout: this.props.config.proactiveOnWaitTimeSeconds || 0,\r\n message: this.props.config.proactiveDefaultMessage\r\n };\r\n }\r\n\r\n /**\r\n * Executes Proactive Chat validation\r\n * @returns TContextProvider - a function returning IChatContext object\r\n */\r\n public async init(): Promise {\r\n try {\r\n await this._proactiveCheck();\r\n } catch (e) {\r\n // Use ?debug=true to see telemetry\r\n // If previous block fails, chat will still be available (no need to display any errors to user)\r\n this.props.telemetry.exception(e);\r\n }\r\n return this.provider || this._getProvider();\r\n }\r\n\r\n /**\r\n * Returns TContextProvider - a function returning IChatContext object\r\n */\r\n private _getProvider(): TContextProvider {\r\n return () => {\r\n return {\r\n eCommerceOperatingUnitNumber: this.props.context.request.apiSettings.oun,\r\n eCommerceBaseUrl: this.props.context.request.apiSettings.baseUrl,\r\n eCommerceDataAreaId: this.props.context.request.channel?.InventLocationDataAreaId,\r\n UserId: this.userId,\r\n // eCommerceCust...\r\n AccountNumber: this.user.customerAccountNumber ? this.user.customerAccountNumber : 'N/A',\r\n Email: this.user.emailAddress ? this.user.emailAddress : 'N/A',\r\n FirstName: this.user.firstName ? this.user.firstName : this.props.config.anonymousUserName,\r\n LastName: this.user.lastName ? this.user.lastName : 'N/A',\r\n Name: this.user.name ? this.user.name : this.props.config.anonymousUserName,\r\n eCommerceCustPageURL: window.location.href,\r\n eCommerceCustChatType: 'pva',\r\n // Proactive chat\r\n eCommerceCustIsProactiveChat: 'False',\r\n eCommerceCustProactiveType: 'N/A',\r\n // Date Range\r\n eCommerceCustProactiveFromDate: 'N/A',\r\n eCommerceCustProactiveToDate: 'N/A',\r\n // From Specific Page\r\n eCommerceCustProactiveCameFromPage: 'N/A',\r\n // No. Page Visits\r\n eCommerceCustProactiveNumberOfVisits: 'N/A',\r\n // Specific CountryRegion\r\n eCommerceCustProactiveCountryCode: 'N/A',\r\n // Specific Page => eCommerceCustPageURL\r\n // eCommerceCustProactiveSpecificPage: 'N/A',\r\n // Wait On Time\r\n eCommerceCustProactiveTimeOnPage: 'N/A',\r\n // Shopping cart amount\r\n eCommerceCustProactiveShoppingCartAmount: 'N/A',\r\n // Shopping cart number of items\r\n eCommerceCustProactiveShoppingCartNumberOfItems: 'N/A',\r\n // Shopping cart specific product\r\n eCommerceCustProactiveShoppingCartSpecificProduct: 'N/A'\r\n };\r\n };\r\n }\r\n\r\n /**\r\n * Returns default IChatContext object\r\n */\r\n private _getContext(): IChatContext {\r\n return this._getProvider()();\r\n }\r\n\r\n /**\r\n * Validates proactive triggers to check if proactive chat should be initialized\r\n */\r\n private async _proactiveCheck(): Promise {\r\n if (this.props.config.proactiveChatEnabled) {\r\n for (let i = 0; i < ProactiveTriggers.length; i++) {\r\n const proactive = new ProactiveTriggers[i](this.props, this.context);\r\n // Only first detected proactive trigger gets executed\r\n if (await this._isProactive(proactive)) {\r\n this.props.context.telemetry.debug(`First detected proactive trigger to be executed: ${proactive}`);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Validates if proactive chat should be triggered for given ProactiveTrigger\r\n * @param proactive ProactiveChatTrigger\r\n * @returns boolean\r\n */\r\n private async _isProactive(proactive: ProactiveChatTrigger): Promise {\r\n this.data.enabled = await proactive.validate();\r\n if (this.data.enabled) {\r\n this.provider = proactive.getContextProvider();\r\n this.data.message = proactive.getMessage();\r\n }\r\n return this.data.enabled;\r\n }\r\n}\r\n\r\nexport default ContextProvider;\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 * Style generating functions\r\n */\r\n/* eslint-disable no-duplicate-imports */\r\nimport { IAvatarStyling, IBubbleStyling, IChatCustomStyle, IChatStyling, IOtherStyling, ISuggestedActionStyling } from '../interfaces';\r\nimport { IPvaChatConnectorConfig } from '../pva-chat-connector.props.autogenerated';\r\n\r\nconst getChatWrapperStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n position: config.position || 'inherit',\r\n top: config.top ? config.top : 'inherit',\r\n right: config.right ? config.right : 'inherit',\r\n bottom: config.bottom ? config.bottom : 'inherit',\r\n left: config.left ? config.left : 'inherit',\r\n zIndex: 1000,\r\n display: 'flex',\r\n justifyContent: 'flex-end'\r\n };\r\n};\r\n\r\nconst getMaximizedChatWrapperStyle = (config: IPvaChatConnectorConfig, isMobileDevice: boolean): React.CSSProperties => {\r\n if (isMobileDevice) {\r\n return {\r\n height: '90%',\r\n width: '100%',\r\n bottom: '0.5em',\r\n right: '0',\r\n padding: '5px'\r\n };\r\n }\r\n return {\r\n height: config.chatHeight ? config.chatHeight : '80%',\r\n width: config.chatWidth ? config.chatWidth : 'inherit'\r\n };\r\n};\r\n\r\nconst getChatButtonStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n display: 'flex',\r\n alignItems: 'center',\r\n backgroundColor: config.startChatButtonBackgroundColor || 'white',\r\n color: config.startChatButtonTextColor || 'inherit',\r\n borderColor: config.startChatButtonBorderColor || 'inherit',\r\n borderRadius: config.startChatButtonBorderRadius || '0px',\r\n borderStyle: config.startChatButtonBorderStyle || 'solid',\r\n borderWidth: config.startChatButtonBorderWidth ? config.startChatButtonBorderWidth : '0px',\r\n padding: config.storeLogoURL ? '2px 20px 2px 2px' : '10px 20px 10px 20px',\r\n cursor: 'pointer',\r\n outlineStyle: 'none',\r\n alignSelf: 'flex-end',\r\n boxShadow: '0 0 4px rgba(102,102,102,.5)',\r\n WebkitBoxShadow: '0 0 4px rgba(102,102,102,.5)',\r\n MozBoxShadow: '0 0 4px rgba(102,102,102,.5)'\r\n };\r\n};\r\n\r\nconst getButtonStoreLogoStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n backgroundColor: config.headerBackgroundColor || 'inherit',\r\n color: config.headerTextColor || 'inherit',\r\n borderRadius: '50%',\r\n padding: '11px',\r\n width: '30px',\r\n height: '30px',\r\n marginRight: '12px',\r\n borderStyle: 'solid',\r\n borderWidth: '1px',\r\n boxSizing: 'content-box'\r\n };\r\n};\r\n\r\nconst getChatStoreLogoStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n backgroundColor: config.headerBackgroundColor || 'inherit',\r\n color: config.headerTextColor || 'inherit',\r\n borderRadius: '50%',\r\n padding: '11px',\r\n width: '30px',\r\n height: '30px',\r\n margin: '5px 12px 5px 5px',\r\n alignSelf: 'center',\r\n borderStyle: 'solid',\r\n borderWidth: '1px',\r\n boxSizing: 'content-box'\r\n };\r\n};\r\n\r\nconst getChatMessagesStyle = (config: IPvaChatConnectorConfig, minimized: boolean): React.CSSProperties => {\r\n return {\r\n display: minimized ? 'none' : 'block',\r\n backgroundColor: config.backgroundColor || 'White',\r\n height: '100%',\r\n width: '100%',\r\n boxSizing: 'border-box',\r\n position: 'relative'\r\n };\r\n};\r\n\r\nconst getChatMessageHeader = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n backgroundColor: config.headerBackgroundColor || 'inherit',\r\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\r\n color: config.headerTextColor || 'inherit',\r\n backgroundRepeat: 'no-repeat',\r\n display: 'flex',\r\n alignItems: 'flex-start',\r\n flexDirection: 'row',\r\n width: '100%',\r\n position: 'absolute',\r\n top: config.chatHeaderHeight ? `-${config.chatHeaderHeight}` : '',\r\n height: config.chatHeaderHeight,\r\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\r\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\r\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\r\n };\r\n};\r\n\r\nconst getMinimizeButtonStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n borderTop: 'none',\r\n borderLeft: 'none',\r\n borderRight: 'none',\r\n borderBottom: `solid 2px ${config.headerTextColor || 'White'}`,\r\n backgroundColor: 'transparent',\r\n padding: '5px 10px 3px 10px',\r\n cursor: 'pointer',\r\n outlineStyle: 'none',\r\n marginTop: '7px',\r\n marginRight: '7px'\r\n };\r\n};\r\n\r\nconst getCloseButtonStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n border: 'none',\r\n color: config.headerTextColor || 'White',\r\n backgroundColor: 'transparent',\r\n padding: '0px 0px 0px 7px',\r\n cursor: 'pointer',\r\n outlineStyle: 'none',\r\n marginTop: '7px',\r\n marginRight: '7px'\r\n };\r\n};\r\n\r\nconst getChatMessageContent = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n height: '100%',\r\n width: '100%',\r\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\r\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\r\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\r\n };\r\n};\r\n\r\nconst getProactiveWrapperStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n flexDirection: 'column',\r\n display: 'flex',\r\n justifyContent: 'flex-end',\r\n backgroundColor: config.backgroundColor || 'White'\r\n };\r\n};\r\n\r\nconst getProactiveMessageHeader = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n backgroundColor: config.headerBackgroundColor || 'inherit',\r\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\r\n color: config.headerTextColor || 'inherit',\r\n backgroundRepeat: 'no-repeat',\r\n display: 'flex',\r\n alignItems: 'flex-start',\r\n flexDirection: 'row',\r\n boxSizing: 'border-box',\r\n width: '100%',\r\n height: config.chatHeaderHeight,\r\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\r\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\r\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\r\n };\r\n};\r\n\r\nconst getProactiveMessageContent = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n width: '100%',\r\n padding: '10px 20px',\r\n boxSizing: 'border-box',\r\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\r\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\r\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\r\n };\r\n};\r\n\r\nconst getProactiveButtonStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\r\n return {\r\n color: config.headerTextColor || 'inherit',\r\n cursor: 'pointer',\r\n padding: '5px 10px',\r\n outline: 'none',\r\n border: 'none',\r\n backgroundColor: config.headerBackgroundColor || 'inherit',\r\n borderRadius: '25px'\r\n };\r\n};\r\n\r\nconst getRedDotStyle = (config: IPvaChatConnectorConfig): React.CSSProperties => {\r\n return {\r\n background: 'Red',\r\n borderRadius: '50%',\r\n height: '5px',\r\n width: '5px',\r\n position: 'absolute',\r\n right: '10px',\r\n bottom: '33px'\r\n };\r\n};\r\n\r\n/**\r\n * Generates styles for the chat wrapper, and proactive chat parts\r\n * @param config IPvaChatConnectorConfig\r\n * @param minimized boolean\r\n * @returns IChatCustomStyle\r\n */\r\nexport const getChatStyling = (config: IPvaChatConnectorConfig, minimized: boolean, isMobileDevice: boolean): IChatCustomStyle => {\r\n return {\r\n ChatWrapperStyle: getChatWrapperStyle(config),\r\n MaximizedChatWrapperStyle: getMaximizedChatWrapperStyle(config, isMobileDevice),\r\n ChatButtonStyle: getChatButtonStyle(config),\r\n ButtonStoreLogoStyle: getButtonStoreLogoStyle(config),\r\n ChatStoreLogoStyle: getChatStoreLogoStyle(config),\r\n ChatMessagesStyle: getChatMessagesStyle(config, minimized),\r\n ChatMessageHeader: getChatMessageHeader(config),\r\n MinimizeButtonStyle: getMinimizeButtonStyle(config),\r\n CloseButtonStyle: getCloseButtonStyle(config),\r\n ChatMessageContent: getChatMessageContent(config),\r\n ProactiveWrapperStyle: getProactiveWrapperStyle(config),\r\n ProactiveMessageHeader: getProactiveMessageHeader(config),\r\n ProactiveMessageContent: getProactiveMessageContent(config),\r\n ProactiveButtonStyle: getProactiveButtonStyle(config),\r\n RedDotStyle: getRedDotStyle(config)\r\n };\r\n};\r\n\r\nconst fontFormat = (font?: string): string | undefined => {\r\n if (font && font.length > 0) {\r\n const arr = font.split(',');\r\n for (let i = 0; i < arr.length; i++) {\r\n arr[i] = `'${arr[i].trim()}'`;\r\n }\r\n font = arr.join(', ');\r\n } else {\r\n font = \"'Calibri', 'Helvetica Neue', 'Arial', 'sans-serif'\";\r\n }\r\n\r\n return font;\r\n};\r\n\r\nconst getBubbleStyling = (config: IPvaChatConnectorConfig): IBubbleStyling => {\r\n return {\r\n bubbleBackground: config.bubbleBackground || 'White',\r\n bubbleTextColor: config.bubbleTextColor || 'Black',\r\n bubbleBorderColor: config.bubbleBorderColor || '#e6e6e6',\r\n bubbleBorderRadius: config.bubbleBorderRadius || '2',\r\n bubbleBorderStyle: config.bubbleBorderStyle || 'solid',\r\n bubbleBorderWidth: config.bubbleBorderWidth || '1',\r\n bubbleFromUserBackground: config.bubbleFromUserBackground || 'White',\r\n bubbleFromUserTextColor: config.bubbleFromUserTextColor || 'Black',\r\n bubbleFromUserBorderColor: config.bubbleFromUserBorderColor || '#e6e6e6',\r\n bubbleFromUserBorderRadius: config.bubbleFromUserBorderRadius || '2',\r\n bubbleFromUserBorderStyle: config.bubbleFromUserBorderStyle || 'solid',\r\n bubbleFromUserBorderWidth: config.bubbleFromUserBorderWidth || '1'\r\n };\r\n};\r\n\r\n// eslint-disable-next-line complexity\r\nconst getOtherStyling = (config: IPvaChatConnectorConfig): IOtherStyling => {\r\n return {\r\n groupTimestamp: config.groupTimestamp || true,\r\n sendTimeout: config.sendTimeout || '20000',\r\n sendTimeoutForAttachments: config.sendTimeoutForAttachments || '120000',\r\n timestampColor: config.timestampColor || 'undefined',\r\n timestampFormat: config.timestampFormat || 'undefined',\r\n notificationDebounceTimeout: config.notificationDebounceTimeout || '400',\r\n hideToaster: config.hideToaster || true,\r\n toasterHeight: config.toasterHeight || '32',\r\n toasterMaxHeight: config.toasterMaxHeight || '32 * 5',\r\n toasterSingularMaxHeight: config.toasterSingularMaxHeight || '50',\r\n toastFontSize: config.toastFontSize || '87.5%',\r\n toastIconWidth: config.toastIconWidth || '36',\r\n toastSeparatorColor: config.toastSeparatorColor || '#E8EAEC',\r\n toastTextPadding: config.toastTextPadding || '6',\r\n toastErrorBackgroundColor: config.toastErrorBackgroundColor || '#FDE7E9',\r\n toastErrorColor: config.toastErrorColor || '#A80000',\r\n toastInfoBackgroundColor: config.toastInfoBackgroundColor || '#CEF1FF',\r\n toastInfoColor: config.toastInfoColor || '#105E7D',\r\n toastSuccessBackgroundColor: config.toastSuccessBackgroundColor || '#DFF6DD',\r\n toastSuccessColor: config.toastSuccessColor || '#107C10',\r\n toastWarnBackgroundColor: config.toastWarnBackgroundColor || '#FFF4CE',\r\n toastWarnColor: config.toastWarnColor || '#3B3A39',\r\n typingAnimationBackgroundImage: config.typingAnimationBackgroundImage || 'undefined',\r\n typingAnimationDuration: config.typingAnimationDuration || '5000',\r\n typingAnimationHeight: config.typingAnimationHeight || '20',\r\n typingAnimationWidth: config.typingAnimationWidth || '64',\r\n videoHeight: config.videoHeight || '270',\r\n markdownExternalLinkIconImage:\r\n config.markdownExternalLinkIconImage ||\r\n 'url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2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uMTU4ODVMMjAuNzgwNCAzLjIyMTU2TDIwLjg2NDEgMy4zMjAxNEwyMC45MTgzIDMuNDEwMjVMMjAuOTU3IDMuNTAwNTdMMjAuOTc2MiAzLjU2NDc2TDIwLjk4OTggMy42Mjg2MkwyMC45OTkyIDMuNzIyODJMMjAuOTk5NyAxMC4yNTU0QzIwLjk5OTcgMTAuNjY5NiAyMC42NjM5IDExLjAwNTQgMjAuMjQ5NyAxMS4wMDU0QzE5Ljg3IDExLjAwNTQgMTkuNTU2MiAxMC43MjMyIDE5LjUwNjUgMTAuMzU3MUwxOS40OTk3IDEwLjI1NTRMMTkuNDk4OSA1LjU2MTQ3TDEyLjI3OTcgMTIuNzg0N0MxMi4wMTM0IDEzLjA1MSAxMS41OTY4IDEzLjA3NTMgMTEuMzAzMSAxMi44NTc1TDExLjIxOSAxMi43ODQ5QzEwLjk1MjcgMTIuNTE4NyAxMC45Mjg0IDEyLjEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjMjEyMTIxIiAvPjwvc3ZnPg==)',\r\n markdownRespectCRLF: config.markdownRespectCRLF || 'true',\r\n internalLiveRegionFadeAfter: config.internalLiveRegionFadeAfter || '1000',\r\n accent: config.accent || '#0063B1',\r\n subtle: config.subtle || '#767676'\r\n };\r\n};\r\n\r\nconst getAvatarStyling = (config: IPvaChatConnectorConfig): IAvatarStyling => {\r\n return {\r\n avatarBorderRadius: config.avatarBorderRadius || '50%',\r\n avatarSize: config.avatarSize || '40',\r\n botAvatarBackgroundColor: config.botAvatarBackgroundColor || 'undefined',\r\n botAvatarImage: config.botAvatarImage || '',\r\n botAvatarInitials: config.botAvatarInitials || '',\r\n userAvatarBackgroundColor: config.userAvatarBackgroundColor || 'undefined',\r\n userAvatarImage: config.userAvatarImage || '',\r\n userAvatarInitials: config.userAvatarInitials || '',\r\n showAvatarInGroup: config.showAvatarInGroup || 'status'\r\n };\r\n};\r\n\r\nconst getSuggestedActionStyling = (config: IPvaChatConnectorConfig): ISuggestedActionStyling => {\r\n return {\r\n suggestedActionLayout: config.suggestedActionLayout || 'carousel',\r\n suggestedActionBackground: config.suggestedActionBackground || 'White',\r\n suggestedActionTextColor: config.suggestedActionTextColor || '',\r\n suggestedActionBorderColor: config.suggestedActionBorderColor || '',\r\n suggestedActionBorderRadius: config.suggestedActionBorderRadius || '0',\r\n suggestedActionBorderStyle: config.suggestedActionBorderStyle || 'solid',\r\n suggestedActionBorderWidth: config.suggestedActionBorderWidth || '2',\r\n suggestedActionDisabledBorderStyle: config.suggestedActionDisabledBorderStyle || 'solid',\r\n suggestedActionDisabledBorderWidth: config.suggestedActionDisabledBorderWidth || '2',\r\n suggestedActionDisabledTextColor: config.suggestedActionDisabledTextColor || '',\r\n suggestedActionHeight: config.suggestedActionHeight || '40',\r\n suggestedActionImageHeight: config.suggestedActionImageHeight || '20',\r\n suggestedActionsCarouselFlipperCursor: config.suggestedActionsCarouselFlipperCursor || '',\r\n suggestedActionsCarouselFlipperBoxWidth: config.suggestedActionsCarouselFlipperBoxWidth || '40',\r\n suggestedActionsCarouselFlipperSize: config.suggestedActionsCarouselFlipperSize || '20',\r\n suggestedActionsFlowMaxHeight: config.suggestedActionsFlowMaxHeight || '',\r\n suggestedActionsStackedHeight: config.suggestedActionsStackedHeight || '',\r\n suggestedActionsStackedOverflow: config.suggestedActionsStackedOverflow || '2',\r\n suggestedActionsStackedLayoutButtonMaxHeight: config.suggestedActionsStackedLayoutButtonMaxHeight || '',\r\n suggestedActionsStackedLayoutButtonTextWrap: config.suggestedActionsStackedLayoutButtonTextWrap || false\r\n };\r\n};\r\n\r\n/**\r\n * Generates style options for the Botframework-WebChat widget\r\n * @param config IPvaChatConnectorConfig\r\n * @returns IChatStyling\r\n */\r\nexport const getChatStyleOptions = (config: IPvaChatConnectorConfig): IChatStyling => {\r\n const bubbleStyling = getBubbleStyling(config);\r\n const avatarStyling = getAvatarStyling(config);\r\n const suggestedActionStyling = getSuggestedActionStyling(config);\r\n const otherStyling = getOtherStyling(config);\r\n return {\r\n hideUploadButton: true,\r\n primaryFont: fontFormat(config.primaryFont),\r\n backgroundColor: config.backgroundColor || 'White',\r\n ...bubbleStyling,\r\n ...avatarStyling,\r\n ...suggestedActionStyling,\r\n ...otherStyling\r\n };\r\n};\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 React from 'react';\r\nimport { IAction, IDispatch, INext } from '../interfaces';\r\nimport { TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../pva-chat-connector';\r\n\r\nexport class CommerceChatStore {\r\n private props: IPvaChatConnectorViewProps;\r\n private setNewMessageAction: React.Dispatch>;\r\n private provider?: TContextProvider;\r\n\r\n /**\r\n * Gets conversation token\r\n * @param props IPvaChatConnectorViewProps\r\n */\r\n public static async getDirectLineToken(props: IPvaChatConnectorViewProps): Promise {\r\n if (props.config.powervaDirectlineTokenURL && props.config.botID && props.config.tenantID) {\r\n // use direct line token url, bot id and tenant id from module config to get conversation token\r\n const url = `${props.config.powervaDirectlineTokenURL}?botId=${props.config.botID}&tenantId=${props.config.tenantID}`;\r\n const options = { method: 'GET' };\r\n return fetch(url, options)\r\n .then(r => r.json())\r\n .then(r => {\r\n if (r.token) {\r\n return r.token;\r\n } else {\r\n throw r;\r\n }\r\n });\r\n }\r\n\r\n // use direct line token url, bot id and tenant id from app config to get conversation token\r\n const url = `${props.context.app.config.pvaChatConnectorPowervaDirectlineTokenURL}?botId=${props.context.app.config.pvaChatConnectorBotID}&tenantId=${props.context.app.config.pvaChatConnectorTenantID}`;\r\n const options = {\r\n method: 'GET'\r\n };\r\n return fetch(url, options)\r\n .then(r => r.json())\r\n .then(r => {\r\n if (r.token) {\r\n return r.token;\r\n } else {\r\n throw r;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Creates a new instance of commerce store for WebChat\r\n * @param props IPvaChatConnectorViewProps\r\n * @param provider TContextProvider\r\n * @param setNewMessage React.Dispatch>\r\n */\r\n constructor(\r\n props: IPvaChatConnectorViewProps,\r\n provider: TContextProvider | undefined,\r\n setNewMessage: React.Dispatch>\r\n ) {\r\n this.props = props;\r\n this.provider = provider;\r\n this.setNewMessageAction = setNewMessage;\r\n }\r\n\r\n /**\r\n * Handles custom chat actions\r\n * @param param0 {\r\n * dispatch: IDispatch;\r\n * next: INext;\r\n * action: IAction;\r\n * }\r\n */\r\n public async actionHandler({ dispatch, next, action }: { dispatch: IDispatch; next: INext; action: IAction }): Promise {\r\n const atype = action.type;\r\n\r\n switch (atype) {\r\n case 'DIRECT_LINE/CONNECT_FULFILLED': {\r\n // sets language\r\n dispatch({\r\n type: 'WEB_CHAT/SEND_EVENT',\r\n payload: {\r\n name: 'webchat/join',\r\n value: { language: window.navigator.language }\r\n }\r\n });\r\n break;\r\n }\r\n case 'DIRECT_LINE/INCOMING_ACTIVITY': {\r\n const activity = action.payload.activity;\r\n if (activity?.from?.role === 'bot') {\r\n // Sets flag for new message (will be use to indicate new messages from bot when chat is minimized)\r\n this.setNewMessageAction(true);\r\n }\r\n break;\r\n }\r\n case 'DIRECT_LINE/POST_ACTIVITY_FULFILLED': {\r\n switch (action.payload.activity.name) {\r\n case 'webchat/join':\r\n {\r\n if (this.provider !== undefined) {\r\n // Sets Chat Context\r\n dispatch({\r\n type: 'WEB_CHAT/SEND_EVENT',\r\n payload: {\r\n name: 'pvaSetContext',\r\n value: this.provider()\r\n }\r\n });\r\n }\r\n }\r\n break;\r\n case 'pvaSetContext':\r\n {\r\n if (this.props.config.triggerQuery) {\r\n // Initialize chat after Chat Context is set\r\n dispatch({\r\n type: 'WEB_CHAT/SEND_MESSAGE_BACK',\r\n payload: {\r\n text: this.props.config.triggerQuery\r\n }\r\n });\r\n }\r\n }\r\n break;\r\n default: {\r\n // default nothing\r\n }\r\n }\r\n break;\r\n }\r\n default: {\r\n // default nothing\r\n }\r\n }\r\n\r\n return next(action);\r\n }\r\n}\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 React, { FunctionComponent, useMemo, useState } from 'react';\r\nimport { getChatStyleOptions } from '../helpers/StyleComposers';\r\nimport { IChatCoreProps, IAction, IDispatch } from '../interfaces';\r\nimport { CommerceChatStore } from '../helpers/CommerceChatStore';\r\nimport { IPvaChatConnectorConfig } from '../pva-chat-connector.props.autogenerated';\r\n\r\n/**\r\n * Just a core Chat component\r\n * @param props\r\n */\r\n\r\nconst TermsAndConditionsLink = ({ href }: { href?: string }) => {\r\n return (\r\n

\r\n By using this bot, you agree to these \r\n \r\n terms and conditions\r\n \r\n

\r\n );\r\n};\r\n\r\nconst CustomWebChat = ({ config }: { config: IPvaChatConnectorConfig }) => {\r\n const { Components } = window.WebChat;\r\n\r\n return (\r\n \r\n \r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst ChatCore: FunctionComponent = (props: IChatCoreProps) => {\r\n const { Components } = window.WebChat;\r\n\r\n const [userId, setUserId] = useState('');\r\n useMemo(() => {\r\n if (props.provider) {\r\n const ctx = props.provider();\r\n if (ctx.UserId) {\r\n setUserId(typeof ctx.UserId === 'string' ? ctx.UserId : ctx.UserId.value.toString());\r\n }\r\n }\r\n }, [props.provider]);\r\n\r\n const directLine = useMemo(() => {\r\n return window.WebChat.createDirectLine({ token: props.directLineToken });\r\n }, [props.directLineToken]);\r\n\r\n const commerceChatStore = useMemo(() => {\r\n if (directLine && props.provider) {\r\n return new CommerceChatStore(props.config, props.provider, props.setNewMessage);\r\n }\r\n return undefined;\r\n }, [props.provider, directLine]);\r\n\r\n const store = useMemo(() => {\r\n return window.WebChat.createStore(\r\n {},\r\n ({ dispatch }: { dispatch: IDispatch }) => (next: (action: IAction) => IDispatch) => (action: IAction) => {\r\n commerceChatStore?.actionHandler({ dispatch, next, action });\r\n }\r\n );\r\n }, [commerceChatStore]);\r\n const styleOptions = getChatStyleOptions(props.config.config);\r\n\r\n return props.directLineToken !== '' ? (\r\n \r\n \r\n \r\n ) : (\r\n

Please wait while we are connecting.

\r\n );\r\n};\r\n\r\nexport default ChatCore;\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 React, { FunctionComponent, useEffect, useState } from 'react';\r\nimport { isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\r\nimport ContextProvider from '../helpers/ContextProvider';\r\nimport { getChatStyling } from '../helpers/StyleComposers';\r\nimport { TContextProvider } from '@msdyn365-commerce-modules/chat';\r\nimport { IPvaChatConnectorViewProps } from '../pva-chat-connector';\r\nimport { CommerceChatStore } from '../helpers';\r\nimport ChatCore from './ChatCore';\r\n\r\nconst INVALID_TOKEN = 'INVALID_TOKEN';\r\nconst CLOSE_IMG_DATA =\r\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';\r\n\r\n/**\r\n * Outer chat component, displays chat button, and proactive chat, and handles custom actions\r\n * @param props IPvaChatConnectorViewProps\r\n */\r\nconst Chat: FunctionComponent = (props: IPvaChatConnectorViewProps) => {\r\n const [loaded, setLoaded] = useState(false); // loaded & minimized are needed as ChatWidget should not be removed from DOM (it resets chat)\r\n const [minimized, setMinimized] = useState(true);\r\n const [newMessage, setNewMessage] = useState(false); // TODO: use this to indicate new message in minimized chat\r\n const [token, setToken] = useState(''); // holds conversation token for WebChat\r\n const [isProactive, setIsProactive] = useState(false); // if proactive chat is triggered\r\n const [proactiveMessage, setProactiveMessage] = useState(props.config.proactiveDefaultMessage);\r\n const [closed, setClosed] = useState(false);\r\n const [provider, setProvider] = useState();\r\n const isMobileDevice =\r\n isMobile({ variant: VariantType.Browser, context: props.context.request }) === 'xs' ||\r\n isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\r\n const chatStyle = getChatStyling(props.config, minimized, isMobileDevice); // generates chat style objects based on configuration\r\n const handleMaximizeButtonClick = () => {\r\n setLoaded(true);\r\n setMinimized(false);\r\n setNewMessage(false);\r\n };\r\n const handleMinimizeButtonClick = () => {\r\n setMinimized(true);\r\n setNewMessage(false);\r\n };\r\n const handleCloseButtonClick = () => {\r\n setClosed(true);\r\n setLoaded(false);\r\n setMinimized(true);\r\n setNewMessage(false);\r\n setIsProactive(false);\r\n };\r\n useEffect(() => {\r\n if (loaded) {\r\n CommerceChatStore.getDirectLineToken(props)\r\n .then(directLineToken => {\r\n setToken(directLineToken);\r\n })\r\n .catch(e => {\r\n setToken(INVALID_TOKEN);\r\n props.telemetry.exception(e);\r\n });\r\n }\r\n }, [loaded]);\r\n useEffect(() => {\r\n (async () => {\r\n const contextProvider = new ContextProvider(props); // Generates context (provider) and checks for proactive chat triggers\r\n const prov = await contextProvider.init();\r\n if (contextProvider.data.enabled) {\r\n props.context.telemetry.debug(`[Chat] Proactive chat was enabled: '${contextProvider.data.enabled}'.`);\r\n // if proactive chat is triggered\r\n const timeout = contextProvider.data.timeout * 1000; // timeout is there only for WaitOnTime trigger\r\n setTimeout(() => {\r\n if (!loaded) {\r\n props.context.telemetry.debug(`[Chat] Proactive chat was loaded: ${loaded}.`);\r\n setProactiveMessage(contextProvider.data.message);\r\n setIsProactive(true);\r\n }\r\n }, timeout);\r\n }\r\n setProvider(() => prov);\r\n })().catch(e => props.telemetry.exception(e));\r\n }, []);\r\n useEffect(() => {\r\n if (closed) {\r\n setClosed(false);\r\n }\r\n }, [token, provider]);\r\n const isValidToken = (): boolean => {\r\n return `${token}` !== INVALID_TOKEN;\r\n };\r\n return (\r\n \r\n {minimized && (!isProactive || (isProactive && loaded)) && (\r\n \r\n )}\r\n {minimized && isProactive && !loaded && (\r\n
\r\n
\r\n {props.config.storeLogoURL && (\r\n logo\r\n )}\r\n
\r\n
\r\n
\r\n

{proactiveMessage}

\r\n \r\n
\r\n
\r\n )}\r\n {loaded && isValidToken() && (\r\n
\r\n
\r\n {props.config.storeLogoURL && (\r\n logo\r\n )}\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n )}\r\n {!isValidToken() &&
{props.config.unableToLoadChatMessage}
}\r\n
\r\n );\r\n};\r\n\r\nexport default Chat;\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\nimport Chat from './components/Chat';\r\nimport { IPvaChatConnectorViewProps } from './pva-chat-connector';\r\n\r\nexport default (props: IPvaChatConnectorViewProps) => {\r\n // Only for CDN loading check, won't be needed with npm package of Botframework-WebChat\r\n const [loaded, setLoaded] = React.useState(false);\r\n\r\n // Just to verify that CDN Chat Widget js lib is loaded\r\n // Remove this block if moving to npm package of Botframework-WebChat\r\n const interval = setInterval(() => {\r\n const t = typeof window;\r\n if (t !== 'undefined' && window.WebChat) {\r\n setLoaded(true);\r\n clearInterval(interval);\r\n }\r\n }, 100);\r\n\r\n return
{loaded && }
;\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { IHistogramItemViewProps, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nconst RatingsHistogramView: React.FC = props => {\r\n const { /* heading, */ histogramItems, histogramProps, moduleProps } = props;\r\n // @ts-ignore\r\n const title = props.resources.ratingReviewsText ?? '';\r\n return (\r\n \r\n

{title}

\r\n {_averageRating(props)}\r\n \r\n {histogramItems.map((item, index) => {\r\n return histogramItem(item, 5 - index);\r\n })}\r\n \r\n
\r\n );\r\n};\r\n\r\nconst getStar = (star: number, value: number): string => {\r\n if (star - value <= 0) return '__star';\r\n else if (star - value > 0 && star - value < 1) return '__half-star';\r\n else return '__empty-star';\r\n};\r\n\r\nconst _renderStars = (value: number, className?: string) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst _averageRating = (props: IRatingsHistogramViewProps) => {\r\n // @ts-ignore\r\n const avRating = props?.averageRating?.props?.avgRating ?? 0;\r\n // @ts-ignore\r\n const totalReviews = props?.averageNumber?.props?.summary?.reviewsCount ?? 0;\r\n const ratingsLabel = props?.resources?.ratingReviewsText ?? '';\r\n return (\r\n
\r\n
\r\n {props.context.cultureFormatter.formatNumber(avRating)}\r\n /5\r\n
\r\n
\r\n {`${totalReviews} ${ratingsLabel}`}\r\n {_renderStars(avRating, 'heading')}\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst histogramItem = (props: IHistogramItemViewProps, starsNumber: number) => {\r\n return (\r\n \r\n {/* {props.starLabel} */}\r\n {_renderStars(starsNumber, 'histogram')}\r\n {props.bar}\r\n {/* {props.percentage} */}\r\n \r\n );\r\n};\r\n\r\nexport default RatingsHistogramView;\r\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 { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountGenericTileConfig, IAccountGenericTileProps } from './account-generic-tile.props.autogenerated';\nimport LinksComponent from './components/account-generic-tile-links';\n\nexport interface IAccountGenericTileViewProps extends IAccountGenericTileProps {\n AccountGenericTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n}\n\n/**\n *\n * AccountGeneric component.\n * @extends {React.PureComponent>}\n */\nclass AccountGenericTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountGenericTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { className, heading, links } = config;\n\n const viewProps = {\n ...this.props,\n className,\n AccountGenericTile: {\n moduleProps: this.props,\n className: classnames('ms-account-generic-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountGenericTile;\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 { IAccountGenericTileViewProps } from './account-generic-tile';\n\nconst AccountGenericTileView: React.FC = props => {\n const { AccountGenericTile, heading, links } = props;\n\n return (\n \n {heading}\n {links}\n \n );\n};\n\nexport default AccountGenericTileView;\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 } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-generic-tile.props.autogenerated';\n\nexport interface IAccountGenericTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountGenericTileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-generic-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountGenericTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst PasswordResetVerificationButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n telemetryContent,\n disabled,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default PasswordResetVerificationButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default PasswordResetVerificationError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IPasswordResetVerificationInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst PasswordResetVerificationInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n onChange\n}) => (\n \n);\n\nexport default PasswordResetVerificationInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst PasswordResetVerificationLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default PasswordResetVerificationLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationLoadingIcon {\n className: string;\n}\n\nconst PasswordResetVerificationLoadingIcon: React.FC = ({ className }) => (\n
\n);\n\nexport default PasswordResetVerificationLoadingIcon;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationLoadingMessage {\n className: string;\n message: string;\n}\n\nconst PasswordResetVerificationLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default PasswordResetVerificationLoadingMessage;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationSuccess {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationSuccess: React.FC = ({ id, className, type = 'page', message }) => {\n const successClassName = `${className}__${type}-success`;\n\n return (\n \n );\n};\n\nexport default PasswordResetVerificationSuccess;\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 { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport PasswordResetVerificationButtonComponent from './components/password-reset-verification-button';\nimport PasswordResetVerificationErrorComponent from './components/password-reset-verification-error';\nimport PasswordResetVerificationInputComponent from './components/password-reset-verification-input';\nimport PasswordResetVerificationLabelComponent from './components/password-reset-verification-label';\nimport PasswordResetVerificationLoadingIconComponent from './components/password-reset-verification-loading-icon';\nimport PasswordResetVerificationLoadingMessageComponent from './components/password-reset-verification-loading-message';\nimport PasswordResetVerificationSuccessComponent from './components/password-reset-verification-success';\nimport { IPasswordResetVerificationConfig, IPasswordResetVerificationProps } from './password-reset-verification.props.autogenerated';\n\nexport interface IPasswordResetVerificationViewState {\n isShowLoading: boolean;\n}\n\nexport interface IPasswordResetVerificationItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationLocalAccount {\n localAccount: INodeProps;\n verificationControlWrapper: INodeProps;\n items: IPasswordResetVerificationItem[];\n successMessage: React.ReactNode[];\n errorMessage: React.ReactNode[];\n verificationButtonsWrapper: INodeProps;\n verificationButtons: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IPasswordResetVerificationLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationViewProps {\n className: string;\n viewState: IPasswordResetVerificationViewState;\n loading: IPasswordResetVerificationLoading;\n passwordResetVerification: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n passwordResetVerificationLocalAccount: IPasswordResetVerificationLocalAccount;\n}\n\n/**\n *\n * PasswordResetVerification component.\n * @extends {React.Component>}\n */\n@observer\nclass PasswordResetVerification extends React.Component> {\n private readonly moduleClassName: string = 'ms-password-reset-verification';\n\n private readonly telemetryContent: ITelemetryContent;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n @observable private templateVersion: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: IPasswordResetVerificationProps) {\n super(props);\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.templateVersion = '';\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(\n nextProps: IPasswordResetVerificationProps,\n nextState: IPasswordResetVerificationViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n passwordResetVerification: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: (\n \n )\n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n heading: config.heading && (\n \n ),\n passwordResetVerificationLocalAccount: this._renderLocalAccount()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\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.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private _prePopulateData(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PAT: string }) => {\n if (obj.ID.toLowerCase() === 'email') {\n this.emailRegex = obj.PAT;\n } else if (obj.ID.toLowerCase() === 'emailverificationcontrol') {\n this.templateVersion = 'v2';\n }\n });\n if (!this.templateVersion) {\n this.templateVersion = 'v1';\n }\n }\n }\n\n private _updateErrorMessage(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const message = {\n verifying_blurb: this.props.resources.loadingMessage\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], message);\n }\n }\n\n private _renderLocalAccount(): IPasswordResetVerificationLocalAccount {\n const { resources } = this.props;\n return {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n verificationControlWrapper: {\n id: 'emailVerificationControl',\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\n },\n items: [\n this._renderInput('email', 'email', resources.emailAddressLabelText, undefined, this.emailRegex),\n this._renderInput(\n this.getValue('email_ver_input', 'emailVerificationCode'),\n 'text',\n resources.verificationCodeLabelText,\n undefined,\n undefined,\n 'VerificationCode'\n )\n ],\n successMessage: [\n ,\n\n \n ],\n errorMessage: [\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n \n ],\n verificationButtonsWrapper: {\n className: `${this.moduleClassName}__email-verification-buttons ${this.getValue('verify', '')}`,\n 'data-claim_id': 'email'\n },\n verificationButtons: [\n ,\n ,\n ,\n \n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n ,\n \n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n }\n\n private _renderInput(\n id: string,\n type: string,\n labelText: string,\n maxLength?: string,\n pattern?: string,\n cssClassName?: string\n ): IPasswordResetVerificationItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry', cssClassName)\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n };\n }\n\n private readonly getValue = (v1Value: string, v2Value: string): string => {\n if (this.templateVersion) {\n return this.templateVersion === 'v1' ? v1Value : v2Value;\n }\n return '';\n };\n}\n\nexport default PasswordResetVerification;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IPasswordResetVerificationItem,\n IPasswordResetVerificationLoading,\n IPasswordResetVerificationLocalAccount,\n IPasswordResetVerificationViewProps\n} from './password-reset-verification';\n\nconst PasswordResetVerificationItem: React.FC = ({ wrapper, label, errorMessage, input }) => {\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst LocalAccount: React.FC = ({\n localAccount,\n verificationControlWrapper,\n items,\n successMessage,\n errorMessage,\n verificationButtonsWrapper,\n verificationButtons,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n return (\n \n \n {successMessage &&\n successMessage.map((message: React.ReactNode, index: number) => {\n return {message};\n })}\n {items &&\n items.map((item: IPasswordResetVerificationItem) => {\n // eslint-disable-next-line react/jsx-key\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n \n {verificationButtons &&\n verificationButtons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \n\n \n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \n\n \n \n \n \n \n );\n};\n\nconst PasswordResetVerificationLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst PasswordResetVerificationView: React.FC = props => {\n const {\n passwordResetVerification,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n heading,\n passwordResetVerificationLocalAccount\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(passwordResetVerificationLocalAccount)}\n \n \n );\n};\n\nexport default PasswordResetVerificationView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IAutoSuggestOptions } from './address-autosuggest.data';\n\n/**\n *\n * Auto Suggest.\n */\nexport class AutoSuggest {\n public readonly excludedAddressFields: string[] = ['ThreeLetterISORegionName', 'Name', 'AddressTypeValue', 'Phone'];\n\n private readonly telemetry: ITelemetry;\n\n private readonly countryCode?: string;\n\n private readonly bingMapsApiKey?: string;\n\n private readonly defaultLanguageId?: string;\n\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private autoSuggestOptions: IAutoSuggestOptions;\n\n constructor(\n telemetry: ITelemetry,\n autoSuggestOptions: IAutoSuggestOptions,\n BingMapsApiKey?: string,\n countryCode?: string,\n defaultLanguageId?: string\n ) {\n this.telemetry = telemetry;\n this.autoSuggestOptions = autoSuggestOptions;\n this.bingMapsApiKey = BingMapsApiKey;\n this.countryCode = countryCode;\n this.defaultLanguageId = defaultLanguageId;\n }\n\n public attachAutoSuggest = (\n inputId: string,\n containerId: string,\n selectedSuggestionCallback: (result: Microsoft.Maps.ISuggestionResult) => void\n ): void => {\n if (!this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n callback: () => {\n const options = { ...this.autoSuggestOptions, countryCode: this.countryCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(inputId, containerId, selectedSuggestionCallback);\n document.querySelector(inputId)?.setAttribute('role', 'combobox');\n setTimeout(() => {\n document.querySelector(inputId)?.setAttribute('type', 'text');\n }, 0);\n },\n errorCallback: () => {\n if (this.telemetry) {\n this.telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: this.bingMapsApiKey\n });\n }\n };\n\n public changeAutoSuggestionCountryCode = (countryCode?: string): void => {\n if (this.autoSuggestManager) {\n this.autoSuggestOptions.countryCode = countryCode;\n this.autoSuggestManager.setOptions(this.autoSuggestOptions);\n }\n };\n\n public disposeAutoSuggest = (): void => {\n this.autoSuggestManager?.detachAutosuggest();\n this.autoSuggestManager?.dispose();\n this.autoSuggestManager = undefined;\n };\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _loadMapAPI = async (storeSelectorStateManager: IStoreSelectorStateManager): Promise => {\n await storeSelectorStateManager.loadMapApi({\n key: this.bingMapsApiKey,\n lang: this.defaultLanguageId,\n market: this.countryCode\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 { IActionInput, ICoreContext, IObservableAction, ITelemetry } from '@msdyn365-commerce/core';\nimport {\n Address,\n AddressPurpose,\n CountryRegionInfo,\n StateProvinceInfo\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n addAddress,\n AddressManagementInput,\n ArrayExtensions,\n updateAddress,\n updatePrimaryAddress\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport { getAddressPurposesAction, GetAddressPurposesInput } from '../actions/get-address-purposes';\nimport { getStateProvinceAction, GetStateProvincesInput } from '../actions/get-state-provinces';\nimport { IAddressResource, IAddressResponse } from './address-module.data';\n\n/**\n *\n * Address common.\n */\nexport class AddressCommon {\n private readonly context: ICoreContext;\n\n private readonly resources: IAddressResource;\n\n private readonly telemetry: ITelemetry;\n\n constructor(context: ICoreContext, resources: IAddressResource, telemetry: ITelemetry) {\n this.context = context;\n this.resources = resources;\n this.telemetry = telemetry;\n }\n\n public getDefaultCountryRegionId = (countryRegionId: string, countryRegions: CountryRegionInfo[], market?: string): string => {\n const marketISOCode = market || 'US';\n const currentCountryRegion = countryRegions.find(countryRegion => (countryRegion.ISOCode || '') === marketISOCode);\n return (currentCountryRegion && currentCountryRegion.CountryRegionId) || countryRegionId;\n };\n\n public parseRetailException = (resources: IAddressResource): IAddressResponse => {\n return {\n errorTitle: resources.addressErrorMessageTitle,\n errorMessage: resources.addressGenericErrorMessage\n };\n };\n\n public isAuthenticatedFlow = (): boolean => {\n return this.context.request.user.isAuthenticated;\n };\n\n public getStateProvinces = async (countryRegionId: string): Promise => {\n let response: StateProvinceInfo[] = [];\n if (this.context && this.context.actionContext) {\n try {\n const input = new GetStateProvincesInput(countryRegionId, this.context.request.apiSettings);\n response = await getStateProvinceAction(input, this.context.actionContext);\n } catch (error) {\n if (this.telemetry) {\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to get state provinces');\n }\n }\n }\n return Promise.resolve(response);\n };\n\n // For any address, check for common requried field else treat it as invalid\\empty address.\n public isEmpty = (address: Address): boolean => {\n if (address && address.ThreeLetterISORegionName && (address.State || address.City)) {\n return false;\n }\n\n return true;\n };\n\n public addCustomerAddress = async (address: Address): Promise => {\n await this.updateLogisticsLocationRoleRecordId(address);\n return this.submitCustomerAddress(addAddress, address);\n };\n\n public updateCustomerAddress = async (address: Address): Promise => {\n await this.updateLogisticsLocationRoleRecordId(address);\n return this.submitCustomerAddress(updateAddress, address);\n };\n\n public updateCustomerPrimaryAddress = async (address: Address): Promise => {\n return this.submitCustomerAddress(updatePrimaryAddress, address);\n };\n\n private readonly submitCustomerAddress = async (\n addressAction: IObservableAction,\n address: Address\n ): Promise => {\n address.AddressTypeValue = address.AddressTypeValue || 7; // 7 sets it to HOME by default\n\n const input = new AddressManagementInput(address);\n return this.execAddressAction(addressAction, input, address);\n };\n\n private readonly execAddressAction = async (\n addressAction: IObservableAction,\n input: IActionInput | IActionInput[],\n address: Address\n ): Promise => {\n let response: IAddressResponse = {};\n\n if (this.context && this.context.actionContext) {\n try {\n const addresses = await addressAction(input, this.context.actionContext);\n if (addresses.length > 0) {\n response.address = address.RecordId ? address : addresses[addresses.length - 1];\n } else {\n response.address = address;\n }\n response.customerAddresses = addresses;\n } catch (error) {\n if (this.telemetry) {\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to exec address action');\n }\n response = this.parseRetailException(this.resources);\n }\n }\n return Promise.resolve(response);\n };\n\n /**\n * Function to get the address purposes and update the LogisticsLocationRoleRecordId to update the address type.\n * @param address - Address object.\n * @returns Returns void.\n */\n private readonly updateLogisticsLocationRoleRecordId = async (address: Address): Promise => {\n let addressPurposes: AddressPurpose[] = [];\n try {\n const input: GetAddressPurposesInput = new GetAddressPurposesInput(this.context.request.apiSettings);\n addressPurposes = await getAddressPurposesAction(input, this.context.actionContext);\n } catch (error) {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- Supparsing the any type for error.\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to get address purposes');\n }\n if (ArrayExtensions.hasElements(addressPurposes)) {\n const addressPurpose: AddressPurpose | undefined = addressPurposes.find(\n purpose => purpose.AddressType === address.AddressTypeValue\n );\n if (addressPurpose) {\n address.LogisticsLocationRoleRecordId = addressPurpose.RecordId;\n }\n }\n };\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport enum AddressItemDisplayType {\n Input = 'Input',\n Dropdown = 'Dropdown',\n Checkbox = 'Checkbox'\n}\n\nexport enum AddressValidationRuleType {\n Required = 'Required',\n Format = 'Format',\n MaxLength = 'MaxLength'\n}\n\nexport enum AddressItemType {\n Name = 1001,\n Phone = 1002,\n IsPrimary = 1003,\n AddressTypeValue = 1004,\n ZipCode = 1,\n City = 2,\n County = 3,\n State = 4,\n ThreeLetterISORegionName = 5,\n Street = 6,\n DistrictName = 7,\n StreetNumber = 8,\n BuildingCompliment = 9,\n Postbox = 10,\n House_RU = 21,\n Flat_RU = 22,\n CountryOKSMCode_RU = 23\n}\n\nexport interface IAddressItem {\n name: string;\n type: AddressItemType;\n label: string;\n maxLength: number;\n displayType: AddressItemDisplayType;\n validationRules?: IAddressValidationRule[];\n isNewLine: boolean;\n}\n\nexport interface IAddressValidationRule {\n type: AddressValidationRuleType;\n regEx: string;\n message: string;\n}\n\nexport interface IAddressDropdownsData {\n [index: string]: { key?: string | number; value?: string }[];\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Address,\n AddressPurpose,\n CountryRegionInfo,\n StateProvinceInfo\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { get, set } from 'mobx';\n\nimport { AddressItemType, IAddressDropdownsData, IAddressItem, IAddressValidationRule } from './address-format.data';\nimport { AddressMetaData } from './address-meta-data';\n\n/**\n *\n * Retail Service Address format parser.\n */\nexport class AddressFormat {\n private readonly countryRegionsInfo?: CountryRegionInfo[];\n\n private readonly addressPurposes?: AddressPurpose[];\n\n private readonly addressMetaData: AddressMetaData;\n\n constructor(countryRegionsInfo: CountryRegionInfo[], addressMetaData: AddressMetaData, addressPurposes: AddressPurpose[]) {\n this.countryRegionsInfo = countryRegionsInfo;\n this.addressMetaData = addressMetaData;\n this.addressPurposes = addressPurposes;\n }\n\n public getAddressFormat(countryRegionId: string): IAddressItem[] {\n const countryRegionInfo = this._getCountryRegionInfo(countryRegionId);\n if (countryRegionInfo) {\n return this._getAddressDisplayFormat(countryRegionInfo);\n }\n return [];\n }\n\n public getCountryFormat(): { key?: string; value?: string }[] {\n return (this.countryRegionsInfo || []).map(countryRegion => {\n return {\n key: countryRegion.CountryRegionId,\n value: countryRegion.ShortName\n };\n });\n }\n\n public getStateFormat(stateProvinceInfo?: StateProvinceInfo[]): { key?: string; value?: string }[] {\n return (stateProvinceInfo || []).map(state => {\n return {\n key: state.StateId,\n value: state.StateName\n };\n });\n }\n\n public getAddressTypeFormat(): { key?: number; value?: string }[] {\n return (this.addressPurposes || []).map(addressPurpose => {\n return {\n key: addressPurpose.AddressType,\n value: addressPurpose.Description\n };\n });\n }\n\n public getPrefilledAddressDropdownData = (\n stateDefaultSelectionText: string,\n stateProvinceInfo?: StateProvinceInfo[]\n ): IAddressDropdownsData => {\n const defaultStateText = {\n key: '',\n value: stateDefaultSelectionText\n };\n const dropdownData: IAddressDropdownsData = {};\n\n dropdownData[AddressItemType[AddressItemType.ThreeLetterISORegionName]] = this.getCountryFormat();\n dropdownData[AddressItemType[AddressItemType.State]] = this.getStateFormat(stateProvinceInfo);\n dropdownData[AddressItemType[AddressItemType.State]].unshift(defaultStateText);\n dropdownData[AddressItemType[AddressItemType.AddressTypeValue]] = this.getAddressTypeFormat();\n\n return dropdownData;\n };\n\n public getTwoLetterISORegionName = (countryRegionId: string): string | undefined => {\n const countryRegionInfo = this._getCountryRegionInfo(countryRegionId);\n\n return countryRegionInfo!.ISOCode;\n };\n\n public validateAddressFormat = (\n address: Address,\n validationError: Address,\n countryRegionId: string,\n propertyName?: string\n ): boolean => {\n let isValid: boolean = true;\n let validationtor;\n const addressFormat = this.getAddressFormat(address.ThreeLetterISORegionName || countryRegionId);\n\n addressFormat.forEach(addressFormatItem => {\n if (!propertyName || (propertyName && addressFormatItem.name === propertyName)) {\n validationtor = this._inputValidation(addressFormatItem, validationError, address);\n if (validationtor !== undefined) {\n isValid = validationtor;\n }\n }\n });\n\n return isValid;\n };\n\n public getTranformedAddress = (result: Microsoft.Maps.ISuggestionResult, stateProvinceInfo?: StateProvinceInfo[]): Address => {\n const address: Address = {};\n\n // Zip Code\n if (result.address.postalCode !== undefined) {\n address.ZipCode = result.address.postalCode;\n } else {\n address.ZipCode = '';\n }\n\n // State\n if (stateProvinceInfo) {\n const selectedState = stateProvinceInfo.find(state => state.StateName === result.address.adminDistrict);\n if (!selectedState) {\n address.State = '';\n address.StateName = result.address.adminDistrict;\n } else {\n address.State = selectedState.StateId;\n address.StateName = selectedState.StateName;\n }\n }\n\n // Street\n if (result.address.addressLine !== undefined) {\n address.Street = result.address.addressLine;\n } else {\n address.Street = ' ';\n }\n\n // City\n if (result.address.locality !== undefined) {\n address.City = result.address.locality;\n } else {\n address.City = '';\n }\n\n // District\n if (result.address.district !== undefined) {\n address.DistrictName = result.address.district;\n address.CountyName = result.address.district;\n } else {\n address.DistrictName = '';\n }\n\n // Formatted Address\n address.FullAddress = result.address.formattedAddress;\n\n return address;\n };\n\n private _inputValidation(addressFormatItem: IAddressItem, validationError: Address, address: Address): boolean | undefined {\n set(validationError, { [addressFormatItem.name]: null });\n for (const validationRule of addressFormatItem.validationRules || []) {\n if (!this._validateRegEx(address, addressFormatItem.name, validationRule)) {\n set(validationError, { [addressFormatItem.name]: validationRule.message });\n return false;\n }\n }\n return undefined;\n }\n\n private readonly _validateRegEx = (address: Address, propertyName: string, validationRule: IAddressValidationRule): boolean => {\n if (validationRule.regEx && validationRule.regEx.length > 0) {\n const regex = new RegExp(validationRule.regEx);\n return regex.test((get(address, propertyName) as string) || '');\n }\n return true;\n };\n\n private _getCountryRegionInfo(countryRegionId: string): CountryRegionInfo | undefined {\n return (this.countryRegionsInfo || []).find(countryRegion => {\n return (countryRegion.CountryRegionId || '').toLowerCase() === countryRegionId.toLowerCase();\n });\n }\n\n private _getAddressDisplayFormat(countryRegionInfo: CountryRegionInfo): IAddressItem[] {\n const addressDisplayItem: IAddressItem[] = [];\n\n if (countryRegionInfo && countryRegionInfo.AddressFormatLines) {\n const AddressTypeItem = this._extendAddressDisplayFormat(AddressItemType.AddressTypeValue, true);\n if (AddressTypeItem) {\n addressDisplayItem.push(AddressTypeItem);\n }\n\n const nameDisplayItem = this._extendAddressDisplayFormat(AddressItemType.Name, true);\n if (nameDisplayItem) {\n addressDisplayItem.push(nameDisplayItem);\n }\n\n countryRegionInfo.AddressFormatLines.forEach(formatLine => {\n if (formatLine.AddressComponentNameValue) {\n const addressItem = this.addressMetaData.getItemFormat(formatLine.AddressComponentNameValue);\n if (addressItem) {\n addressItem.isNewLine = formatLine.NewLine || false;\n addressDisplayItem.push(addressItem);\n }\n }\n });\n\n const phoneDisplayItem = this._extendAddressDisplayFormat(AddressItemType.Phone, false);\n if (phoneDisplayItem) {\n addressDisplayItem.push(phoneDisplayItem);\n }\n\n const isPrimaryDisplayItem = this._extendAddressDisplayFormat(AddressItemType.IsPrimary, false);\n if (isPrimaryDisplayItem) {\n addressDisplayItem.push(isPrimaryDisplayItem);\n }\n }\n\n return addressDisplayItem;\n }\n\n private _extendAddressDisplayFormat(type: AddressItemType, isNewLine: boolean): IAddressItem | undefined {\n const addressItem = this.addressMetaData.getItemFormat(type);\n if (addressItem) {\n addressItem.isNewLine = isNewLine;\n }\n return addressItem;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PhoneRegex } from '@msdyn365-commerce-modules/retail-actions';\n\nimport {\n AddressItemDisplayType,\n AddressItemType,\n AddressValidationRuleType,\n IAddressItem,\n IAddressValidationRule\n} from './address-format.data';\nimport { IAddressResource } from './address-module.data';\n\n/**\n * Address meta data.\n */\nexport class AddressMetaData {\n private readonly metaData: IAddressItem[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly requiredFieldRegEx: string = '\\\\S';\n\n private readonly maxLengthRegEx: string = '^.{0,20}$';\n\n private readonly resourcesPrefix: string = 'address';\n\n private readonly maxLength: number = 64;\n\n private readonly requiredFields: AddressItemType[];\n\n private readonly excludedTypes: AddressItemType[];\n\n constructor(resources: IAddressResource, excluded?: AddressItemType[], required?: AddressItemType[]) {\n this.resources = resources || {};\n this.excludedTypes = excluded || [];\n this.requiredFields =\n required !== undefined\n ? required\n : [\n AddressItemType.AddressTypeValue,\n AddressItemType.Name,\n AddressItemType.ZipCode,\n AddressItemType.City,\n AddressItemType.State,\n AddressItemType.ThreeLetterISORegionName,\n AddressItemType.Street\n ];\n this._init();\n }\n\n public getItemFormat(id: number): IAddressItem | undefined {\n return this.metaData.find(item => {\n return item.type === id;\n });\n }\n\n private _init(): void {\n this._addItem(AddressItemType.Name, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Phone, AddressItemDisplayType.Input, PhoneRegex.defaultRegex);\n this._addItem(AddressItemType.ZipCode, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.City, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.County, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.State, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.ThreeLetterISORegionName, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.Street, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.DistrictName, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.StreetNumber, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.BuildingCompliment, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Postbox, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.House_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Flat_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.CountryOKSMCode_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.AddressTypeValue, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.IsPrimary, AddressItemDisplayType.Checkbox);\n }\n\n private _addItem(type: AddressItemType, displayType: AddressItemDisplayType, format?: string): void {\n if (this.excludedTypes.includes(type)) {\n return;\n }\n\n const nameKey = AddressItemType[type].replace('_', '');\n\n // Find out if currentItem is required field\n const validationRules = this._validationRules(type, nameKey, format);\n const isRequired = validationRules.some(rule => rule.type === AddressValidationRuleType.Required);\n\n // If no optional string is provided in resource file, use the original label text\n const optionalString =\n this.resources[`${this.resourcesPrefix}${nameKey}LabelOptional`] || this.resources[`${this.resourcesPrefix}${nameKey}Label`];\n const item: IAddressItem = {\n type,\n displayType,\n name: AddressItemType[type],\n label: isRequired ? this.resources[`${this.resourcesPrefix}${nameKey}Label`] : optionalString,\n maxLength: this.maxLength,\n validationRules,\n isNewLine: true\n };\n\n this.metaData.push(item);\n }\n\n private _validationRules(type: AddressItemType, name: string, format?: string): IAddressValidationRule[] {\n const validationRules: IAddressValidationRule[] = [];\n\n for (const ruleType of Object.keys(AddressValidationRuleType)) {\n const key = `${this.resourcesPrefix}${name}${ruleType}`;\n const message: string = this.resources[`${key}ErrorMessage`];\n switch (ruleType) {\n case AddressValidationRuleType.Required: {\n if (this.requiredFields.find((itemType: AddressItemType) => itemType === type)) {\n validationRules.push(this._validationRule(ruleType, this.requiredFieldRegEx, message));\n }\n break;\n }\n case AddressValidationRuleType.Format: {\n validationRules.push(this._validationRule(ruleType, format!, message));\n break;\n }\n case AddressValidationRuleType.MaxLength: {\n if (type === AddressItemType.Phone) {\n validationRules.push(this._validationRule(ruleType, this.maxLengthRegEx, message));\n }\n\n break;\n }\n default:\n }\n }\n return validationRules;\n }\n\n private _validationRule(type: AddressValidationRuleType, regEx: string, message: string): IAddressValidationRule {\n return {\n type,\n regEx,\n message\n };\n }\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Address } from '@msdyn365-commerce/retail-proxy';\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\n\nexport enum AddressOperation {\n Add = 'Add',\n Show = 'Show',\n Update = 'Update',\n List = 'List',\n Multiple = 'Multiple'\n}\n\nexport enum AddressType {\n Shipping = 'Shipping',\n Billing = 'Billing',\n Invoice = 'Invoice',\n Company = 'Company'\n}\n\nexport interface IDropdownDisplayData {\n [index: string]: { key?: string; value?: string }[];\n}\n\nexport interface IAddressResponse {\n errorTitle?: string;\n errorMessage?: string;\n customerAddresses?: Address[];\n address?: Address;\n}\n\nexport interface IAddressConfig {\n heading?: Heading;\n primaryAddressSectionHeading?: Heading;\n otherAddressSectionHeading?: Heading;\n addAddressHeading?: Heading;\n editAddressHeading?: Heading;\n}\n\nexport interface IAddressResource {\n addressChangeCheckboxAriaLabel: string;\n addressAddButtonText: string;\n addressAddButtonAriaLabel: string;\n addressAddNewButtonText?: string;\n addressAddNewButtonAriaLabel?: string;\n addressPrimaryButtonText: string;\n addressPrimaryButtonAriaLabel: string;\n addressEditButtonText: string;\n addressEditButtonAriaLabel: string;\n addressRemoveButtonText: string;\n addressRemoveButtonAriaLabel: string;\n addressSaveButtonText: string;\n addressSaveButtonAriaLabel: string;\n addressCancelButtonText: string;\n addressCancelButtonAriaLabel: string;\n addressStateDefaultSelectionText: string;\n addressNameLabel: string;\n addressNameLabelOptional?: string;\n addressNameRequiredErrorMessage: string;\n addressPhoneLabel: string;\n addressPhoneLabelOptional?: string;\n addressPhoneRequiredErrorMessage: string;\n addressPhoneMaxLengthErrorMessage?:string;\n addressZipCodeLabel: string;\n addressZipCodeLabelOptional?: string;\n addressZipCodeRequiredErrorMessage: string;\n addressCityLabel: string;\n addressCityLabelOptional?: string;\n addressCityRequiredErrorMessage: string;\n addressCountyLabel: string;\n addressCountyLabelOptional?: string;\n addressCountyRequiredErrorMessage: string;\n addressStateLabel: string;\n addressStateLabelOptional?: string;\n addressStateRequiredErrorMessage: string;\n addressThreeLetterISORegionNameLabel: string;\n addressThreeLetterISORegionNameLabelOptional?: string;\n addressThreeLetterISORegionNameRequiredErrorMessage: string;\n addressStreetRequiredErrorMessage: string;\n addressDistrictLabel: string;\n addressDistrictLabelOptional?: string;\n addressDistrictNameLabel: string;\n addressDistrictNameLabelOptional?: string;\n addressDistrictRequiredErrorMessage: string;\n addressStreetNumberLabel: string;\n addressStreetNumberLabelOptional?: string;\n addressStreetNumberRequiredErrorMessage: string;\n addressBuildingComplimentLabel: string;\n addressBuildingComplimentLabelOptional?: string;\n addressBuildingComplimentRequiredErrorMessage: string;\n addressPostboxLabel: string;\n addressPostboxLabelOptional?: string;\n addressPostboxRequiredErrorMessage: string;\n addressHouseRULabel: string;\n addressHouseRULabelOptional?: string;\n addressHouseRURequiredErrorMessage: string;\n addressFlatRULabel: string;\n addressFlatRULabelOptional?: string;\n addressFlatRURequiredErrorMessage: string;\n addressCountryOKSMCodeRULabel: string;\n addressCountryOKSMCodeRURequiredErrorMessage: string;\n addressErrorMessageTitle: string;\n addressGenericErrorMessage: string;\n addressEmptyListAddressMessage: string;\n removeAddressNotification?: string;\n addressProductImage?: string;\n addressProductNumberText?: string;\n addressProductText?: string;\n addressProductUnitPriceText?: string;\n addressProductUOMText?: string;\n addressProductQuantityText?: string;\n addressProductActionsText?: string;\n addressSelectAllRowsText?: string;\n addressProductAddressText?: string;\n addressShipMultipleText?: string;\n addressShipMultipleAriaLabel?: string;\n saveAndContinueBtnLabel?: string;\n addressShipSingleText?: string;\n addressShipSingleAriaLabel?: string;\n clearSelectionButtonText?: string;\n clearSelectionButtonAriaLabel?: string;\n chooseAddressForSelectedItemsText?: string;\n chooseAddressForSelectedItemsAriaLabel?: string;\n noAddressSelectedAriaLabel?: string;\n unavailableProductErrorMessage?: string;\n outOfStockProductErrorMessage?: string;\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAdressCheckbox {\n id?: string;\n name?: string;\n className: string;\n type: string;\n isChecked: boolean;\n autoFocus?: boolean;\n additionalAddributes?: object;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Address checkbox.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressCheckboxFunctionComponent: React.FC = (props: IAdressCheckbox) => {\n const {\n id: itemId,\n name,\n className,\n type,\n isChecked,\n additionalAddributes,\n telemetryContent,\n autoFocus: shouldBeAutoFocused,\n onChange\n } = props;\n\n const payLoad = getPayloadObject('click', telemetryContent!, name!);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressCheckboxFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Heading as HeadingData } from '@msdyn365-commerce-modules/data-types';\nimport { Heading, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { get } from 'mobx';\nimport * as React from 'react';\n\nimport {\n AddressItemDisplayType,\n AddressItemType,\n AddressValidationRuleType,\n IAddressDropdownsData,\n IAddressItem,\n IAddressValidationRule\n} from '../address-format.data';\nimport { AddressType, IAddressResource, IAddressResponse } from '../address-module.data';\nimport AddressAlertComponent from './address-alert';\nimport AddressButtonComponent from './address-button';\nimport AdressCheckboxComponent from './address-checkbox';\nimport AdressDropdownComponent from './address-dropdown';\nimport AddressErrorMessageComponent from './address-error-message';\nimport AddressErrorTitleComponent from './address-error-title';\nimport AddressInputComponent from './address-input';\nimport AddressLabelComponent from './address-label';\n\nexport interface IAddressAddInputProps {\n isUpdating?: boolean;\n hasError?: boolean;\n hasExternalSubmitGroup?: boolean;\n addressType: AddressType;\n addressFormat: IAddressItem[];\n defaultCountryRegionId: string;\n defaultAddressType: number;\n selectedAddress?: Address;\n dropdownDisplayData: IAddressDropdownsData;\n resources: IAddressResource;\n addressActionResponse?: IAddressResponse;\n addAddressHeading?: HeadingData;\n editAddressHeading?: HeadingData;\n validationError?: object;\n telemetryContent?: ITelemetryContent;\n shouldAutoFocus?: boolean;\n onInputChange(event: React.ChangeEvent): void;\n onDropdownChange(event: React.ChangeEvent): void;\n onSave?(): void;\n onCancel?(): void;\n}\n\nexport interface IAddressError {\n AddressError: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAddressAddItem {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IAddressAddUpdateProps {\n AddressForm: INodeProps;\n heading: React.ReactNode;\n items: IAddressAddItem[];\n hasError: boolean;\n error: IAddressError;\n isShowSaveButton: boolean;\n saveButton: React.ReactNode;\n isShowCancelButton: boolean;\n cancelButton: React.ReactNode;\n}\n\nconst getRequriedAttribute = (validationRules?: IAddressValidationRule[]): object => {\n const requriedRule = (validationRules || []).find(validationRule => {\n return validationRule.type === AddressValidationRuleType.Required;\n });\n\n return requriedRule ? { 'aria-required': true } : {};\n};\n\nconst getAddessItems = (selectedAddress: Address, props: IAddressAddInputProps): IAddressAddItem[] => {\n const {\n addressFormat,\n addressType,\n dropdownDisplayData,\n defaultCountryRegionId,\n defaultAddressType,\n validationError = {},\n onInputChange,\n onDropdownChange,\n shouldAutoFocus\n } = props;\n\n return addressFormat.map((addressFormatItem, index) => {\n const elementId = `${addressType.toLowerCase()}_address${addressFormatItem.name.toLowerCase()}`;\n const errorMessage = get(validationError, addressFormatItem.name);\n const className = classname('msc-address-form__item', `msc-address-form__item-${addressFormatItem.name.toLowerCase()}`, {\n 'msc-address-form__item-newline': addressFormatItem.isNewLine,\n 'address-form__item-invalid': errorMessage\n });\n let input;\n\n if (addressFormatItem.displayType === AddressItemDisplayType.Input) {\n input = (\n \n );\n } else if (addressFormatItem.displayType === AddressItemDisplayType.Checkbox) {\n input = (\n \n );\n } else {\n const displayData = dropdownDisplayData[addressFormatItem.name];\n let selectedValue = selectedAddress[addressFormatItem.name];\n\n if (addressFormatItem.type === AddressItemType.ThreeLetterISORegionName) {\n selectedValue = selectedValue || defaultCountryRegionId;\n }\n\n if (addressFormatItem.type === AddressItemType.AddressTypeValue) {\n selectedValue = selectedValue || defaultAddressType;\n }\n\n input = (\n \n );\n }\n\n return {\n key: addressFormatItem.name,\n AddressItem: { className, id: `${elementId}_container` },\n label: ,\n alert: ,\n input\n };\n });\n};\n\nexport const AddressAddUpdate = (props: IAddressAddInputProps): IAddressAddUpdateProps => {\n const {\n editAddressHeading,\n addAddressHeading,\n selectedAddress = {},\n resources,\n hasError,\n onCancel,\n onSave,\n hasExternalSubmitGroup,\n isUpdating,\n addressActionResponse,\n telemetryContent\n } = props;\n const heading = selectedAddress.RecordId ? editAddressHeading : addAddressHeading;\n\n return {\n AddressForm: { className: 'msc-address-form' },\n heading: heading && ,\n items: getAddessItems(selectedAddress, props),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: onSave && (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: onCancel && (\n \n ),\n hasError: hasError || false,\n error: {\n AddressError: { className: 'msc-address-form__error' },\n title: addressActionResponse && addressActionResponse.errorTitle && (\n \n ),\n message: addressActionResponse && addressActionResponse.errorMessage && (\n \n )\n }\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressAlert {\n message?: string;\n}\n\n/**\n * Address alert.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressAlertFunctionComponent: React.FC = (props: IAdressAlert) => {\n const message = props.message;\n return (\n \n {message && <>{message}}\n \n );\n};\n\nexport default AddressAlertFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAddressButton {\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n role?: string;\n onClick(event: React.MouseEvent): void;\n}\n\n/**\n * Address button.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressButtonFunctionComponent: React.FC = (props: IAddressButton) => {\n const { className, text, ariaLabel, disabled: isDisabled, telemetryContent, onClick, role } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressButtonFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classname from 'classnames';\nimport * as React from 'react';\n\nexport interface IAddressDetailItem {\n isNewLine: boolean;\n isShowLabel: boolean;\n labelText: string;\n name: string;\n value: string;\n}\n\n/**\n * Address details item.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDetailItemFunctionComponent: React.FC = (props: IAddressDetailItem) => {\n const { isNewLine, isShowLabel, labelText, name, value } = props;\n\n const className = `msc-address-detail__item msc-address-detail__item-${name.toLowerCase()}`;\n const isEmpty = !(value && value.length > 0);\n const mainClass = isShowLabel\n ? `msc-address-detail__item msc-address-detail__item-address-detail_${labelText}`\n : classname(className, { 'msc-address-detail__item-empty': isEmpty, 'msc-address-detail__item-newline': isNewLine });\n return (\n \n {isShowLabel && (\n <>\n {labelText}\n \n \n )}\n {value}\n \n );\n};\n\nexport default AddressDetailItemFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressDropdown {\n id: string;\n name: string;\n className: string;\n value: string | number;\n additionalAddributes?: object;\n recordId?: string;\n displayData: { key?: string | number; value?: string }[];\n onChange(event: React.ChangeEvent): void;\n}\n\nconst getDropdownItem = (key?: string | number, value?: string, selectedValue?: string | number): React.ReactNode => {\n let isSelected: boolean;\n if (typeof key === 'number') {\n isSelected = key === selectedValue;\n } else {\n isSelected = typeof selectedValue === 'string' && (key || '').toLowerCase() === (selectedValue || '').toLowerCase();\n }\n\n return (\n \n );\n};\n\n/**\n * Address dropdown.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDropdownFunctionComponent: React.FC = (props: IAdressDropdown) => {\n const { id: itemId, name, className, value, additionalAddributes, displayData, onChange, recordId } = props;\n\n return (\n \n {displayData && displayData.map(item => getDropdownItem(item.key, item.value, value))}\n \n );\n};\n\nexport default AddressDropdownFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressErrorMessage {\n message: string;\n}\n\n/**\n * Address error message.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressErrorMessageFunctionComponent: React.FC = (props: IAdressErrorMessage) => {\n const { message } = props;\n\n return

{message}

;\n};\n\nexport default AddressErrorMessageFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressErrorTitle {\n title: string;\n}\n\n/**\n * Address error title.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressErrorTitleFunctionComponent: React.FC = (props: IAdressErrorTitle) => {\n const { title } = props;\n\n return

{title}

;\n};\n\nexport default AddressErrorTitleFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAdressInput {\n id?: string;\n name?: string;\n className: string;\n type: string;\n value: string;\n maxLength?: number;\n autoFocus?: boolean;\n additionalAddributes?: object;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Address input.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressInputFunctionComponent: React.FC = (props: IAdressInput) => {\n const {\n id: itemId,\n name,\n className,\n type,\n value,\n maxLength,\n additionalAddributes,\n autoFocus: shouldUseAutoFocus,\n telemetryContent,\n onChange\n } = props;\n\n const payLoad = getPayloadObject('click', telemetryContent!, name!);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressInputFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressLabel {\n id: string;\n text: string;\n}\n\n/**\n * Address label.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressLabelFunctionComponent: React.FC = (props: IAdressLabel) => {\n const { id: itemId, text } = props;\n\n return (\n \n );\n};\n\nexport default AddressLabelFunctionComponent;\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 { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Heading as HeadingData } from '@msdyn365-commerce-modules/data-types';\nimport { Heading, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource, IAddressResponse } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressErrorMessageComponent from './address-error-message';\nimport AddressErrorTitleComponent from './address-error-title';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressListError {\n Error: INodeProps;\n isShowError: boolean;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAddressListItem {\n Item: INodeProps;\n key: number;\n error: IAddressListError;\n showItems: IAddressShowProps;\n isShowPrimaryButton: boolean;\n primaryButton: React.ReactNode;\n editButton: React.ReactNode;\n removeButton: React.ReactNode;\n}\n\nexport interface IAddressList {\n List: INodeProps;\n isShowList: boolean;\n heading: React.ReactNode;\n items: IAddressListItem[];\n}\n\nexport interface IAddressListProps {\n ListAddress: INodeProps;\n heading: React.ReactNode;\n isShowEmptyListMessage: boolean;\n emptyListMessage: React.ReactNode;\n addButton: React.ReactNode;\n primaryAddressList: IAddressList;\n otherAddressList: IAddressList;\n}\n\nexport interface IAddressListInputProps {\n isUpdating?: boolean;\n selectedAddress?: Address;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n heading?: HeadingData;\n primaryAddressSectionHeading?: HeadingData;\n otherAddressSectionHeading?: HeadingData;\n addressActionResponse?: IAddressResponse;\n resources: IAddressResource;\n contextRequest: Msdyn365.IRequestContext;\n telemetryContent?: ITelemetryContent;\n handleLineItemHeadingChange?(event: Msdyn365.ContentEditableEvent): void;\n onAddAddress(): void;\n onEditAddress(address?: Address): void;\n onRemoveAddress(address?: Address): void;\n onUpdatePrimaryAddress(address: Address): void;\n canRenderAsyncCustomerDataAsUnmodifiable?: boolean;\n isAsyncCustomer?: boolean;\n isAsyncCustomerAddressCreationFeatureEnabled?: boolean;\n isEditAsyncCustomerFeatureEnabled?: boolean;\n}\n\nconst getButtonAriaLabel = (ariaLabel: string, addressName?: string): string => {\n return ariaLabel.replace('{addressName}', addressName || '');\n};\n\nconst getAddressList = (\n className: string,\n addresses: Address[],\n showPrimaryButton: boolean,\n props: IAddressListInputProps,\n heading?: HeadingData\n): IAddressList => {\n const {\n resources,\n isUpdating,\n addressActionResponse,\n selectedAddress,\n addressFormat,\n onEditAddress,\n onRemoveAddress,\n onUpdatePrimaryAddress,\n addressPurposes,\n telemetryContent\n } = props;\n const { errorTitle = null, errorMessage = null } = addressActionResponse || {};\n\n return {\n List: { className },\n isShowList: addresses.length > 0,\n heading: heading && ,\n items: addresses.map(\n (address: Address): IAddressListItem => {\n const isSelectedAddress = selectedAddress && selectedAddress.RecordId === address.RecordId;\n const isShowError = isSelectedAddress && errorTitle && errorMessage;\n\n // Disable 'primary', 'edit', and 'remove' buttons if the customer IS EITHER async OR async address creation feature is enabled and edit async customer feature is disabled.\n // Conversely, these buttons can only be enabled when the customer is NOT async AND the address creation feature is disabled.\n const isInvalidAsyncState: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false || props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n Item: { className: `${className}-list` },\n key: address.RecordId || 0,\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n }),\n error: {\n Error: { className: `${className}-error` },\n isShowError: !!isShowError,\n title: ,\n message: \n },\n isShowPrimaryButton: showPrimaryButton,\n\n primaryButton: (\n {\n onUpdatePrimaryAddress(address);\n }\n }}\n />\n ),\n editButton: (\n {\n onEditAddress(address);\n },\n role: 'link'\n }}\n />\n ),\n removeButton: (\n {\n onRemoveAddress(address);\n },\n role: 'link'\n }}\n />\n )\n };\n }\n )\n };\n};\n\nconst getPrimaryAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, primaryAddressSectionHeading } = props;\n const primaryAddresses = addresses.filter((address: Address) => address.IsPrimary);\n return getAddressList('msc-address-list__primary', primaryAddresses, false, props, primaryAddressSectionHeading);\n};\n\nconst getOtherAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, otherAddressSectionHeading } = props;\n const otherAddresses = addresses.filter((address: Address) => !address.IsPrimary);\n return getAddressList('msc-address-list__primary', otherAddresses, true, props, otherAddressSectionHeading);\n};\n\nexport const AddressList = (props: IAddressListInputProps): IAddressListProps => {\n const { addresses, heading, resources, onAddAddress, telemetryContent, handleLineItemHeadingChange } = props;\n const headingComponent = heading?.text && (\n {\n // Required\n },\n requestContext: props.contextRequest\n }}\n />\n );\n\n // IF the 'Edit async customer' feature is enabled. we won't be disabling the button in this scenario.\n // ELSE disable the 'Add' button only when the customer is async AND the 'Async Address Creation' feature is disabled.\n const disableAddButton: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false) &&\n !(props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n ListAddress: { className: 'ms-address-list' },\n heading: headingComponent,\n isShowEmptyListMessage: addresses.length === 0,\n emptyListMessage:

{resources.addressEmptyListAddressMessage}

,\n addButton: (\n \n ),\n primaryAddressList: getPrimaryAddressList(props),\n otherAddressList: getOtherAddressList(props)\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddressItemType, IAddressItem } from '../address-format.data';\nimport AddressDetailItemComponent from './address-detail-item';\n\nexport interface IAddressShowItem {\n key: string;\n description: React.ReactNode;\n}\n\nexport interface IAddressShowProps {\n AddressDetail: INodeProps;\n items: IAddressShowItem[];\n}\n\nexport interface IAddressShowInputProps {\n addressFormat: IAddressItem[];\n address: Address;\n addressPurposes: AddressPurpose[];\n}\n\nexport const AddressShow = (props: IAddressShowInputProps): IAddressShowProps => {\n const { addressFormat, addressPurposes, address } = props;\n\n return {\n AddressDetail: { className: 'msc-address-detail' },\n items: addressFormat.map(item => {\n if (item.name === AddressItemType[AddressItemType.AddressTypeValue]) {\n const addressType = addressPurposes.find(\n addressTypeValue => addressTypeValue.AddressType.toString() === (address[item.name] || '').toString()\n );\n if (addressType) {\n const addressTypeDescription = addressType.Description || '';\n return {\n key: item.name,\n description: (\n \n )\n };\n }\n }\n return {\n key: item.name,\n description: (\n \n )\n };\n })\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { format as formatNotification, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressList, IAddressListProps } from '../../common/components/address-list';\nimport { IAccountManagementAddressData } from './account-management-address.data';\nimport { IAccountManagementAddressProps } from './account-management-address.props.autogenerated';\n\n/**\n * Account management address view state interface.\n */\nexport interface IAccountManagementAddressViewState {\n isShowAddresList: boolean;\n isShowAddOrUpdateAddress: boolean;\n}\n\n/**\n * Account management address view state interface.\n */\nexport interface IAccountManagementAddressViewProps extends React.Component> {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: IAccountManagementAddressViewState;\n AccountAddressManagement: IModuleProps;\n isUpdating: boolean;\n showAddressList: IAddressListProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n screenReaderNotification: React.ReactNode;\n infoMessageBar?: React.ReactNode;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component>}\n */\n@observer\nclass AccountManagementAddress extends React.Component> {\n @observable private currentOperation: AddressOperation;\n @observable private selectedAddress?: Address;\n @observable private countryRegionId: string = 'USA';\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n @observable private customerAddresses: Address[];\n @observable private addUpdateAddress: Address;\n @observable private validationError: object;\n @observable private addressActionResponse?: IAddressResponse;\n @observable private isUpdating?: boolean;\n @observable private hasError?: boolean;\n @observable private removeAddressData?: Address;\n\n private readonly addressCommon: AddressCommon;\n private addressFormat: AddressFormat;\n private countryRegions: CountryRegionInfo[] = [];\n private addressPurposes: AddressPurpose[] = [];\n private readonly resources: IAddressResource;\n private readonly defaultAddressType: number = 6; // Default to Home\n private readonly telemetryContent: ITelemetryContent;\n private autoSuggest?: AutoSuggest;\n\n private readonly asyncCustAddressCreationFeatureName: string = 'Dynamics.AX.Application.RetailAsyncAddressCreationFeature';\n private readonly editAsyncCustomerFeatureName: string = 'Dynamics.AX.Application.RetailEnableAsyncCustomerEditFeature';\n\n private asyncCustomerAddressCreationFeatureIsEnabled?: boolean = false;\n private isEditAsyncCustomerFeatureEnabled: boolean = false;\n\n public constructor(props: IAccountManagementAddressProps) {\n super(props);\n const { context, data, resources, telemetry } = this.props;\n\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.customerAddresses = data.address.result || [];\n this.addUpdateAddress = {};\n this.validationError = {};\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions }\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n if (this.props.data.countryRegions.result !== undefined) {\n this._setDefaultCountryRegionId();\n }\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n if (autoSuggestionEnabled) {\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi !== undefined &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => {\n this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n },\n async () => {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n await this._attachMapAutoSuggest();\n }\n }\n );\n }\n }\n\n /**\n * Component did mount function.\n */\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n /**\n * Should component update function.\n * @param nextProps - Account management address props.\n * @param nextState - Next state.\n * @returns - True if component should update, false otherwise.\n */\n public shouldComponentUpdate(\n nextProps: IAccountManagementAddressProps,\n nextState: IAccountManagementAddressViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { renderView, config, resources, data } = this.props;\n const customerInformation = data.customerInformation.result;\n\n // Set the feature state value for 'Async Customer Address Creation'.\n this.asyncCustomerAddressCreationFeatureIsEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.asyncCustAddressCreationFeatureName)?.IsEnabled || false;\n\n this.isEditAsyncCustomerFeatureEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.editAsyncCustomerFeatureName)?.IsEnabled || false;\n\n const viewProps = {\n ...this.props,\n infoMessageBar: (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n !this.isEditAsyncCustomerFeatureEnabled &&\n (customerInformation?.IsAsyncCustomer || false) && (\n \n ),\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n customerAddresses: this.customerAddresses,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n isUpdating: this.isUpdating,\n hasError: this.hasError,\n className: config.className,\n viewState: {\n isShowAddresList: this.currentOperation === AddressOperation.List,\n isShowAddOrUpdateAddress: this.currentOperation !== AddressOperation.List\n },\n AccountAddressManagement: {\n moduleProps: this.props,\n className: classnames('ms-account-management-address', config.className)\n },\n showAddressList: this._renderListAddress(),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\n screenReaderNotification: this.removeAddressData ? this._renderScreenReaderRemoveText(this.removeAddressData) : null\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * On Suggestion Selected Function.\n * @param result - Microsoft.Maps.ISuggestionResult.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, 0);\n };\n\n /**\n * Clear Address Fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n addressFormatItem.forEach(format => {\n if (this.addUpdateAddress[format.name] !== undefined && !this.autoSuggest?.excludedAddressFields.includes(format.name)) {\n this.addressFormat[format.name] = '';\n }\n });\n this._clearValidation();\n };\n\n /**\n * Clear Validation Function.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n /**\n * Method data initialization.\n * @param props -The account management props.\n */\n private readonly _dataInitialize = (props: IAccountManagementAddressProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.address.result,\n () => {\n this.customerAddresses = data.address.result ?? [];\n }\n );\n };\n\n /**\n * Render Add Or Update Address Function.\n * @returns - AddressAddUpdate.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Shipping,\n addressFormat: this.addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n telemetryContent: this.telemetryContent,\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n onSave: this._onAddressAddUpdateSubmit,\n onCancel: this._resetView\n });\n };\n\n /**\n * Render List Address Function.\n * @returns - AddressList.\n */\n private readonly _renderListAddress = (): IAddressListProps => {\n const { config } = this.props;\n\n /**\n * Render Address title.\n * @param event - Msdyn365.ContentEditableEvent.\n */\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n config.heading!.text = event.target.value;\n };\n const heading = config.heading && {\n text: config.heading.text,\n headingTag: config.heading.tag\n };\n\n return AddressList({\n isUpdating: this.isUpdating,\n selectedAddress: this.selectedAddress,\n addressFormat: this.addressFormat,\n addresses: this.customerAddresses,\n addressPurposes: this.addressPurposes,\n resources: this.resources,\n heading,\n primaryAddressSectionHeading: config.primaryAddressSectionHeading,\n otherAddressSectionHeading: config.otherAddressSectionHeading,\n contextRequest: this.props.context.request,\n telemetryContent: this.telemetryContent,\n handleLineItemHeadingChange,\n onEditAddress: this._goToEditAddress,\n onRemoveAddress: this._onRemoveAddress,\n onAddAddress: this._goToAddAddress,\n onUpdatePrimaryAddress: this._onSubmitUpdatePrimaryAddress,\n isAsyncCustomerAddressCreationFeatureEnabled: this.asyncCustomerAddressCreationFeatureIsEnabled || false,\n isAsyncCustomer: this.props.data.customerInformation.result?.IsAsyncCustomer || false,\n canRenderAsyncCustomerDataAsUnmodifiable: this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false,\n isEditAsyncCustomerFeatureEnabled: this.isEditAsyncCustomerFeatureEnabled\n });\n };\n\n /**\n * Attach Map Auto Suggest Function.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * On Address Add Update Function.\n * @param name - String.\n * @param value - String | Boolean | Number.\n */\n private readonly onAddressAddUpdate = (name: string, value: string | boolean | number) => {\n const formattedValue = name === 'Phone' ? value.toString().trim() : value;\n set(this.addUpdateAddress, { [name]: formattedValue });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * On Address Add Update Input Change.\n * @param event - Input Change Event.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n if (event.target.type === 'checkbox') {\n this.onAddressAddUpdate(event.target.name, event.target.checked);\n } else {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n }\n };\n\n /**\n * On Address Add Update Dropdown Change.\n * @param event - Dropdown Change Event.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n if (event.target.name === AddressItemType[AddressItemType.AddressTypeValue]) {\n this.onAddressAddUpdate(event.target.name, +event.target.value);\n } else {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n }\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * On Address Update Function.\n * @param response - Promise.\n * @param onSuccess - IAddressResponse.\n */\n private readonly _onAddressUpdate = (response: Promise, onSuccess: (response: IAddressResponse) => void): void => {\n this.isUpdating = true;\n response.then(\n (result: IAddressResponse) => {\n if (result.address) {\n this.hasError = false;\n onSuccess(result);\n } else {\n this.hasError = true;\n this.addressActionResponse = result;\n }\n this.isUpdating = false;\n },\n () => {\n this.hasError = true;\n this.isUpdating = false;\n }\n );\n };\n\n /**\n * On Address Add Update Submit Function.\n */\n private readonly _onAddressAddUpdateSubmit = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n return;\n }\n let response: Promise;\n if (this.addressCommon.isAuthenticatedFlow()) {\n response =\n this.currentOperation === AddressOperation.Update\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\n } else {\n response = Promise.resolve({ address: this.addUpdateAddress });\n }\n\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\n };\n\n /**\n * On Country Change Function.\n * @param countryRegionId - String.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterISORegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterISORegionName);\n this._clearAddressFields();\n };\n\n /**\n * Get Address Format Exclude List Function.\n * @returns - Address Format Exclude List.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Get State Provinces Function.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n this.stateProvinceInfo = result;\n });\n };\n\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request && request.channel && request.channel.ChannelCountryRegionISOCode;\n\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * Update CurrentOperation Function.\n * @param operation - AddressOperation.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation) => {\n this.currentOperation = operation;\n this._clearAddressFields();\n };\n\n /**\n * On Submit Update Primary Address Function.\n * @param address - Address.\n */\n private readonly _onSubmitUpdatePrimaryAddress = (address: Address): void => {\n this.selectedAddress = address;\n const response = this.addressCommon.updateCustomerPrimaryAddress(address);\n this._onAddressUpdate(response, this._onUpdatePrimaryAddressSuccess);\n };\n\n /**\n * Go To Edit Address Function.\n * @param address - Address.\n */\n private readonly _goToEditAddress = (address: Address): void => {\n this.addUpdateAddress = { ...address };\n this.countryRegionId = this.addUpdateAddress.ThreeLetterISORegionName || 'USA';\n this._updateCurrentOperation(AddressOperation.Update);\n };\n\n /**\n * On Remove Address Function.\n * @param address - Address.\n */\n private readonly _onRemoveAddress = (address: Address): void => {\n address.Deactivate = true;\n this.removeAddressData = address;\n const response = this.addressCommon.updateCustomerAddress(address);\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\n };\n\n /**\n * Renders Notification screen reader text for removed address.\n * @param address - Address input.\n * @returns Notification for removed address.\n */\n private readonly _renderScreenReaderRemoveText = (address: Address): React.ReactNode => {\n const notification = formatNotification(this.resources.removeAddressNotification!, `${address.Name!}`);\n return (\n
\n {notification}\n
\n );\n };\n\n /**\n * Go To Add Address Function.\n */\n private readonly _goToAddAddress = (): void => {\n this.addUpdateAddress = {};\n this._setDefaultCountryRegionId();\n set(this.addUpdateAddress, { ThreeLetterISORegionName: this.countryRegionId });\n set(this.addUpdateAddress, { AddressTypeValue: this.defaultAddressType });\n this._setDefaultCountryRegionId();\n this._updateCurrentOperation(AddressOperation.Add);\n };\n\n /**\n * On Add Or Update Success Function.\n * @param response - IAddressResponse.\n */\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse): void => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n this._resetView();\n };\n\n /**\n * On Update Primary Address Success Function.\n * @param response - IAddressResponse.\n */\n private readonly _onUpdatePrimaryAddressSuccess = (response: IAddressResponse): void => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n };\n\n /**\n * Reset view function.\n */\n private readonly _resetView = (): void => {\n this.selectedAddress = undefined;\n this._updateCurrentOperation(AddressOperation.List);\n };\n}\n\nexport default AccountManagementAddress;\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 { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressList, IAddressListItem, IAddressListProps } from '../../common/components/address-list';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { IAccountManagementAddressViewProps } from './account-management-address';\n\n/**\n * Address show component.\n * @param param0 - Root param.\n * @param param0.AddressDetail - Address detail.\n * @param param0.items - IAddressShowItem[].\n * @returns - Address Node.\n */\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\n return (\n \n {items.map((item: IAddressShowItem) => {\n return <>{item.description};\n })}\n \n );\n};\n\n/**\n * Address List Component.\n * @param param0 - Root param.\n * @param param0.List - Address list.\n * @param param0.isShowList - Boolean.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressListItem[].\n * @returns - AddressListComponent Node.\n */\nconst AddressList: React.FC = ({ List, isShowList, heading, items }) => {\n if (!isShowList) {\n return null;\n }\n\n return (\n \n {heading}\n {items.map((item: IAddressListItem) => {\n const { Item, key, error, showItems, isShowPrimaryButton, primaryButton, editButton, removeButton } = item;\n const { Error, isShowError, title, message } = error;\n return (\n \n \n {isShowError && (\n \n {title}\n {message}\n \n )}\n {isShowPrimaryButton && primaryButton}\n {editButton}\n {removeButton}\n \n );\n })}\n \n );\n};\n\n/**\n * Address Lists Component.\n * @param param0 - Root param.\n * @param param0.ListAddress - List address.\n * @param param0.heading - List heading.\n * @param param0.isShowEmptyListMessage - Boolean.\n * @param param0.emptyListMessage - Empty list message.\n * @param param0.addButton - Add button.\n * @param param0.primaryAddressList - Primary address.\n * @param param0.otherAddressList - Other address.\n * @returns Address Lists Component Node.\n */\nconst AddressLists: React.FC = ({\n ListAddress,\n heading,\n isShowEmptyListMessage,\n emptyListMessage,\n addButton,\n primaryAddressList,\n otherAddressList\n}) => {\n return (\n \n {heading}\n {isShowEmptyListMessage && emptyListMessage}\n {addButton}\n \n \n \n );\n};\n\n/**\n * AddressAddUpdateComponent.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - Error message.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns Address add update component node.\n */\nconst AddressAddUpdate: React.FC = ({\n AddressForm,\n heading,\n items,\n hasError,\n error,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Account Management Address View Component.\n * @param props - Props.\n * @returns - AccountAddressManagement Module.\n */\nconst AccountManagementAddressView: React.FC = props => {\n const {\n AccountAddressManagement,\n infoMessageBar,\n viewState,\n showAddressList,\n showAddOrUpdateAddress,\n screenReaderNotification\n } = props;\n\n return (\n \n {infoMessageBar}\n {viewState.isShowAddresList && }\n {viewState.isShowAddOrUpdateAddress && }\n {screenReaderNotification}\n \n );\n};\n\nexport default AccountManagementAddressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction, set } from 'mobx';\nimport * as React from 'react';\n\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemDisplayType, AddressItemType, AddressValidationRuleType, IAddressItem } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IBusinessAccountAddressData } from './business-account-address.data';\nimport { IBusinessAccountAddressProps } from './business-account-address.props.autogenerated';\n\n/**\n * Interface for IBusinessAccountAddressExtendedProps.\n */\nexport interface IBusinessAccountAddressExtendedProps extends IBusinessAccountAddressProps {\n hasError: boolean;\n isRequired: boolean;\n resetAddress: boolean;\n updateForm(errors: boolean, currentAddress?: Address): void;\n}\n\n/**\n * Interface for IBusinessAccountAddressState.\n */\nexport interface IBusinessAccountAddressState {\n countryId?: string;\n states?: StateProvinceInfo[];\n}\n\n/**\n * Interface for IBusinessAccountAddressViewProps.\n */\nexport interface IBusinessAccountAddressViewProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n addressListSelectedAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n BusinessAccountAddress: IModuleProps;\n isUpdating: boolean;\n hasError: boolean;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component, IBusinessAccountAddressState>}\n */\nclass BusinessAccountAddress extends React.Component {\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private readonly validationError: object;\n\n private readonly addressActionResponse?: IAddressResponse;\n\n private readonly isUpdating?: boolean;\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 0; // Default to None (This value set in HQ as Business)\n\n private readonly shouldAutoFocus?: boolean = false;\n\n private readonly excludedList: AddressItemType[] = [AddressItemType.Name, AddressItemType.AddressTypeValue, AddressItemType.IsPrimary]; // Default to hiding Name and AddressType inputs\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: IBusinessAccountAddressExtendedProps) {\n super(props);\n\n const { context, data, resources, telemetry } = this.props;\n this.addUpdateAddress = {};\n this.resources = resources;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, props.isRequired ? undefined : []),\n this.addressPurposes\n );\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.validationError = {};\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n // Initializing data props\n this._dataInitialize(this.props);\n\n this._setDefaultCountryRegionId();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessAccountAddressExtendedProps, nextState: IBusinessAccountAddressState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { renderView, config, hasError, resetAddress } = this.props;\n\n // Business-sign-up will pass this flag when cancel button is clicked\n if (resetAddress) {\n this._resetAddressFields();\n }\n\n const viewProps = {\n ...this.props,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n hasError,\n className: config.className,\n BusinessAccountAddress: {\n moduleProps: this.props,\n className: classnames('ms-business-account-address', config.className)\n },\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Reset Address.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _resetAddressFields = () => {\n const addressFormat = this.addressFormat.getAddressFormat(this.countryRegionId);\n\n addressFormat.map(addressFormatItem => {\n switch (addressFormatItem.displayType) {\n case AddressItemDisplayType.Input:\n this.addUpdateAddress[addressFormatItem.name] = '';\n break;\n case AddressItemDisplayType.Checkbox:\n this.addUpdateAddress[addressFormatItem.name] = false;\n break;\n default:\n switch (addressFormatItem.type) {\n case AddressItemType.ThreeLetterISORegionName:\n this.addUpdateAddress[addressFormatItem.name] = this.countryRegionId;\n break;\n case AddressItemType.AddressTypeValue:\n this.addUpdateAddress[addressFormatItem.name] = this.defaultAddressType;\n break;\n case AddressItemType.State:\n this.addUpdateAddress[addressFormatItem.name] = '';\n break;\n default:\n this.addUpdateAddress[addressFormatItem.name] = undefined;\n }\n }\n });\n };\n\n /**\n * Method data initialization.\n * @param props -The account management props.\n */\n private readonly _dataInitialize = (props: IBusinessAccountAddressExtendedProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n };\n\n // Set validationError and hasError to hide error messages since in the B2B\n // request form, no errors would visually show since user wont be able to submit\n // until form is filled and correct\n /**\n * Render Add Or Update Address Function.\n * @returns - AddressAddUpdate.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Company,\n addressFormat: this.addressFormat.getAddressFormat(this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n shouldAutoFocus: this.shouldAutoFocus,\n validationError: this.validationError,\n hasError: this.props.hasError,\n addressActionResponse: this.addressActionResponse,\n telemetryContent: this.telemetryContent,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange\n });\n };\n\n /**\n * On Address Add Update Input Change Function.\n * @param event - Input event change function.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n this._updateAddress(event.target.name, event.target.value);\n };\n\n /**\n * On Address Add Update Dropdown Change Function.\n * @param event - Change dropdown event.\n */\n private readonly _onAddressAddUpdateDropdownChange = async (event: React.ChangeEvent): Promise => {\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n await this._updateCountryRegionId(event.target.value);\n } else {\n this._updateAddress(event.target.name, event.target.value);\n }\n };\n\n /**\n * Update Address Function.\n * @param name - String.\n * @param value - String.\n */\n private readonly _updateAddress = (name: string, value: string | number) => {\n const { updateForm, isRequired, resources } = this.props;\n let cleanValue = value;\n if (typeof value === 'string') {\n cleanValue = (value || '').replace(new RegExp('[<>]', 'gi'), '');\n }\n set(this.addUpdateAddress, { [name]: cleanValue });\n\n if (this._isEmpty()) {\n if (isRequired) {\n updateForm(true, undefined);\n } else {\n // Reset addressFormat as if address was NOT a required field\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, []),\n this.addressPurposes\n );\n updateForm(false, this.addUpdateAddress);\n }\n } else {\n // Get new addressFormat if address was a required field\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, this.props.isRequired ? undefined : []),\n this.addressPurposes\n );\n\n // Verify with new rules\n if (this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n updateForm(false, this.addUpdateAddress);\n } else {\n updateForm(true, undefined);\n }\n }\n };\n\n /**\n * Is empty Function.\n * @returns - Boolean.\n */\n // Walk through array and check if valued is defined or value is not an empty string\n private readonly _isEmpty = () => {\n const addressFormat = this.addressFormat.getAddressFormat(this.countryRegionId);\n for (const addressFormatItem of addressFormat) {\n if (addressFormatItem.type !== AddressItemType.ThreeLetterISORegionName || this._isInputRequired(addressFormatItem)) {\n const addressItemValue = this.addUpdateAddress[addressFormatItem.name];\n\n // Check each input field, if value is defined and not an empty string --> address is not empty\n if (addressItemValue || (addressItemValue && addressItemValue !== '')) {\n return false;\n }\n }\n }\n\n return true;\n };\n\n /**\n * Is Input Required Function.\n * @param addressFormatItem - IAddressItem.\n * @returns - Boolean.\n */\n private readonly _isInputRequired = (addressFormatItem: IAddressItem): boolean => {\n if (\n ObjectExtensions.isNullOrUndefined(addressFormatItem) ||\n !addressFormatItem.validationRules ||\n addressFormatItem.validationRules.length === 0\n ) {\n return false;\n }\n\n for (const validationRule of addressFormatItem.validationRules) {\n if (validationRule.type === AddressValidationRuleType.Required) {\n return false;\n }\n }\n\n return true;\n };\n\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n\n this._updateCountryRegionId(this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market));\n\n // Set default AddressType\n set(this.addUpdateAddress, { AddressTypeValue: this.defaultAddressType });\n }\n\n /**\n * Update Country Region Id Function.\n * @param value - String.\n */\n private readonly _updateCountryRegionId = async (value: string) => {\n this.countryRegionId = value;\n\n await this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n this._updateAddress('State', '');\n }\n\n this.stateProvinceInfo = result;\n });\n\n this._updateAddress('ThreeLetterISORegionName', this.countryRegionId);\n };\n}\n\nexport default BusinessAccountAddress;\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 { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IBusinessAccountAddressViewProps } from './business-account-address';\n\n/**\n * Address Add Update Component.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address Heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - IAddressError.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - AddressForm Node.\n */\nconst AddressAddUpdate: React.FC = ({\n AddressForm,\n heading,\n items,\n hasError,\n error,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {hasError && alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Business Account Address View Component.\n * @param props - Props.\n * @returns - BusinessAccountAddress Module.\n */\nconst BusinessAccountAddressView: React.FC = props => {\n const { BusinessAccountAddress, showAddOrUpdateAddress } = props;\n\n return (\n \n \n \n );\n};\n\nexport default BusinessAccountAddressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpButtonProps {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n link?: string;\n telemetryContent: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nexport const SignUpButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n telemetryContent,\n disabled,\n link,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent, text);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignUpButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nexport const SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n

{message}

\n
\n );\n};\n\nexport default SignUpError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InputType } from '../business-sign-up';\n\nexport interface IBusinessSignUpInputProps {\n id?: string;\n type: InputType;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n isRequired: boolean;\n fieldReference?: React.RefObject;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IBusinessSignUpInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nexport const SignUpInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n isRequired,\n onChange,\n fieldReference\n}) => {\n if (type === InputType.TextArea) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n\nexport default SignUpInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessSignUpLabelProps {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nexport const SignUpLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignUpLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessSignUpRadioButtonProps {\n id: string;\n isRequired: boolean;\n options: IBusinessSignUpRadioButtonOptionProps[];\n}\n\nexport interface IBusinessSignUpRadioButtonOptionProps {\n id: string;\n name: string;\n value: string;\n label: string;\n className: string;\n onChange(event: React.ChangeEvent): void;\n}\n\nexport const BusinessSignUpRadioButtonOption: React.FC = props => {\n const { id, name, value, label, className, onChange } = props;\n return (\n
\n \n \n
\n );\n};\n\nexport default BusinessSignUpRadioButtonOption;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ContentEditableEvent, getUrlSync, RichTextComponent, Text } from '@msdyn365-commerce/core';\nimport { Address, BusinessPartnerProspect } from '@msdyn365-commerce/retail-proxy';\nimport { createProspectAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBusinessSignUpConfig, IBusinessSignUpProps } from './business-sign-up.props.autogenerated';\nimport { SignUpButton, SignUpError, SignUpInput, SignUpLabel } from './components';\nimport { IBusinessSignUpRadioButtonOptionProps, BusinessSignUpRadioButtonOption } from './components/sign-up-radio-button';\n\nexport interface IBusinessSignUpExtendedProps extends IBusinessSignUpProps {\n formItems?: IFormItem[];\n}\n\nexport interface IBusinessSignUpItem {\n wrapper: INodeProps;\n isAddressInput?: boolean;\n id: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input?: React.ReactNode;\n}\n\nexport interface IBusinessState {\n isReady: boolean;\n formItems: IFormItem[];\n addressHasErrors: boolean;\n showAddressErrors: boolean;\n hasSubmitErrors: boolean;\n}\n\nexport interface IBusinessSignUpLocalAccount {\n FormWrapper: INodeProps;\n items: IBusinessSignUpItem[];\n buttons: React.ReactNode[];\n errorMessage: React.ReactNode[];\n disclaimer: React.ReactNode;\n}\n\nexport interface IBusinessSignUpViewProps {\n className: string;\n businessSignUp: IModuleProps;\n ContainerWrapper: INodeProps;\n heading: React.ReactNode;\n businessSignUpForm: IBusinessSignUpLocalAccount;\n formItems: IFormItem[];\n}\n\nexport interface IFormItem {\n id: string;\n type: InputType;\n label: string;\n value: string;\n maxChars?: string;\n isRequired: boolean;\n pattern?: string;\n address?: Address;\n customClass?: string;\n fieldReference?: React.RefObject;\n radioButtonOptions?: IBusinessSignUpRadioButtonOptionProps[];\n radioButtonGroupClass?: string;\n}\n\nexport enum InputType {\n // eslint-disable-next-line @typescript-eslint/no-shadow -- Text enum doesn't override the imported Text\n Text = 'text',\n Address = 'address',\n Email = 'email',\n TextArea = 'textarea',\n RadioButton = 'radiobutton'\n}\n\nexport enum InputID {\n FirstName = 'FirstName',\n LastName = 'LastName',\n Email = 'CompanyEmail',\n CompanyName = 'CompanyName',\n Address = 'CompanyAddress',\n JobTitle = 'JobTitle',\n Size = 'CompanySize',\n Department = 'Department',\n Comment = 'Comment',\n ProspectType = 'ProspectType'\n}\n\nexport const renderInputSection = (\n inputs: IFormItem[],\n className: string,\n needToReset: boolean,\n onInputChange: (event: React.ChangeEvent) => void,\n showErrors: boolean,\n addressForm?: React.ReactNode,\n updateAddress?: (errors: boolean, currAddress?: Address) => void\n): IBusinessSignUpItem[] => {\n return inputs.map((element, index) => {\n const {\n id,\n type,\n label,\n maxChars,\n isRequired,\n pattern,\n customClass,\n value,\n fieldReference,\n radioButtonOptions,\n radioButtonGroupClass\n } = element;\n\n const baseSignUpItem: IBusinessSignUpItem = {\n wrapper: {\n className: classnames(className, `${className}-${id}`, customClass)\n },\n id,\n label: ,\n errorMessage: \n };\n\n if (type === InputType.Address) {\n if (addressForm) {\n baseSignUpItem.isAddressInput = true;\n baseSignUpItem.input = (\n <>\n {React.cloneElement(addressForm as React.ReactElement, {\n updateForm: updateAddress,\n hasError: showErrors,\n isRequired: isRequired === undefined ? false : isRequired,\n resetAddress: needToReset\n })}\n \n );\n } else {\n // If the address slot is not filled, remove this input from the form\n inputs.splice(index, 1);\n }\n } else if (type === InputType.RadioButton) {\n baseSignUpItem.input = (\n
\n {radioButtonOptions &&\n radioButtonOptions.map((element, index) => {\n return ;\n })}\n
\n );\n } else {\n baseSignUpItem.input = (\n \n );\n }\n\n return baseSignUpItem;\n });\n};\n\n/**\n *\n * Business Request Form Modules\n * Form that a business can use to submit a request to become a partner with Microsoft.\n * @extends {React.Component>}\n */\nclass BusinessSignUp extends React.Component {\n private readonly moduleClassName: string = 'ms-business-sign-up';\n private readonly prospectRadioButtonName: string = 'business-sign-up-radio-button';\n\n // Used as default data\n // eslint-disable-next-line @typescript-eslint/member-ordering\n public BusinessSignUpDefaultInputs: IFormItem[] = [\n {\n id: InputID.ProspectType,\n type: InputType.RadioButton,\n label: this.props.resources.prospectTypeLabel,\n value: '',\n isRequired: true,\n customClass: 'width-100',\n radioButtonGroupClass: 'radio-option-container',\n radioButtonOptions: [\n {\n id: `${InputID.ProspectType}-buyer`,\n name: this.prospectRadioButtonName,\n value: '1', // Buyer\n label: this.props.resources.prospectTypeBuyerLabel,\n className: `${this.moduleClassName}__form-item-radio-button-option`,\n onChange: this._onInputChange.bind(this)\n },\n {\n id: `${InputID.ProspectType}-seller`,\n name: this.prospectRadioButtonName,\n value: '2', // Seller\n className: `${this.moduleClassName}__form-item-radio-button-option`,\n label: this.props.resources.prospectTypeSellerLabel,\n onChange: this._onInputChange.bind(this)\n }\n ]\n },\n {\n id: InputID.FirstName,\n type: InputType.Text,\n label: this.props.resources.firstNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.LastName,\n type: InputType.Text,\n label: this.props.resources.lastNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.Email,\n type: InputType.Email,\n label: this.props.resources.emailAddressLabel,\n value: '',\n isRequired: true,\n pattern: EmailRegex.defaultRegex.source,\n customClass: 'width-50'\n },\n {\n id: InputID.CompanyName,\n type: InputType.Text,\n label: this.props.resources.companyLabel,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.Department,\n type: InputType.Text,\n label: this.props.resources.departmentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.JobTitle,\n type: InputType.Text,\n label: this.props.resources.jobTitleLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Size,\n type: InputType.Text,\n label: this.props.resources.companySizeLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Address,\n type: InputType.Address,\n label: this.props.resources.companyAddressLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n },\n {\n id: InputID.Comment,\n type: InputType.TextArea,\n label: this.props.resources.commentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n }\n ];\n\n private readonly formChildReference: React.RefObject = React.createRef();\n\n private needsToReset: boolean = false;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IBusinessSignUpExtendedProps) {\n super(props);\n\n this.state = {\n isReady: false,\n formItems: this.props.formItems || this._addedReference(),\n addressHasErrors: false,\n showAddressErrors: false,\n hasSubmitErrors: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this.formChildReference.current?.focus();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessSignUpExtendedProps, nextState: IBusinessState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { formItems } = this.state;\n const { className, heading } = config;\n\n const viewProps = {\n ...this.props,\n businessSignUp: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n ContainerWrapper: {\n className: `${this.moduleClassName}__container`\n },\n heading: (\n \n ),\n businessSignUpForm: this._renderForm(),\n formItems\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle the heading change event.\n * @param event - Content Editable Event.\n */\n public handleHeadingChange = (event: ContentEditableEvent): void => {\n this.props.config.heading.text = event.target.value;\n };\n\n private _renderForm(): IBusinessSignUpLocalAccount {\n const { config, resources, slots } = this.props;\n const { showAddressErrors, hasSubmitErrors, isReady, formItems } = this.state;\n const {\n signUpButtonArialabel,\n signUpButtonText,\n cancelButtonArialabel,\n cancelButtonText,\n errorMessage,\n partialAddressErrorMessage\n } = resources;\n const addressForm = (slots && slots.addressSlot && slots.addressSlot.length > 0 && slots.addressSlot[0]) || undefined;\n\n const form = {\n FormWrapper: {\n className: `${this.moduleClassName}__form `\n },\n items: renderInputSection(\n formItems,\n `${this.moduleClassName}__form-item`,\n this.needsToReset,\n this._onInputChange.bind(this),\n showAddressErrors,\n addressForm,\n this._onAddressChange\n ),\n buttons: [\n ,\n \n ],\n errorMessage: [\n hasSubmitErrors && ,\n showAddressErrors && (\n \n )\n ],\n disclaimer: config.disclaimer && (\n \n )\n };\n\n if (this.needsToReset) {\n this.needsToReset = false;\n }\n\n return form;\n }\n\n private _onInputChange(event: React.ChangeEvent): void {\n const newForm = this.state.formItems;\n newForm.forEach(item => {\n if (item.type === InputType.RadioButton && event.target.name === this.prospectRadioButtonName) {\n item.value = event.target.value;\n } else if (item.id === event.target.id) {\n item.value = event.target.value;\n }\n });\n\n // Check if form is ready, update state object with latest values, values have changed so reset hasSubmitErrros\n this.setState({\n isReady: this._isFormReady(),\n formItems: newForm,\n hasSubmitErrors: false\n });\n }\n\n private _addedReference(): IFormItem[] {\n const newFormFields = this.BusinessSignUpDefaultInputs;\n newFormFields[0].fieldReference = this.formChildReference;\n return newFormFields;\n }\n\n private readonly _onAddressChange = (errors: boolean, currentAddress?: Address): void => {\n // Find address item\n const newForm = this.state.formItems;\n const addressItem = newForm.find(item => {\n return item.type === InputType.Address;\n });\n\n // If found --> set to currentAddress\n if (addressItem) {\n addressItem.address = currentAddress;\n\n // Update state with new values and set errors to false if address is not required field\n this.setState(\n {\n formItems: newForm,\n addressHasErrors: errors,\n showAddressErrors: false\n },\n () => {\n this.setState({ isReady: this._isFormReady() });\n }\n );\n }\n };\n\n private readonly _isFormReady = (): boolean => {\n const { formItems } = this.state;\n\n for (const currentInput of formItems) {\n // Will return FALSE if:\n // - input field is required\n // IF is address AND addressHasErrors === true\n // ELSE value is undefined OR empty\n // OR\n // - pattern provided and value does not match pattern\n\n if (currentInput.isRequired) {\n if (currentInput.type === InputType.Address) {\n if (this.state.addressHasErrors) {\n return false;\n }\n } else if (currentInput.value === undefined || currentInput.value === '') {\n return false;\n }\n }\n if (currentInput.pattern !== undefined && currentInput.value.match(currentInput.pattern) === null) {\n return false;\n }\n }\n\n return true;\n };\n\n private readonly _onSubmit = (event: React.MouseEvent) => {\n if (this.state.addressHasErrors) {\n this.setState({\n showAddressErrors: true\n });\n\n event.preventDefault();\n return;\n }\n\n const { config, context } = this.props;\n\n // Check for matching id and if not empty\n const firstName = this._getItem(InputID.FirstName);\n const lastName = this._getItem(InputID.LastName);\n const companyName = this._getItem(InputID.CompanyName);\n const companyEmail = this._getItem(InputID.Email);\n const companyAddress = this._getItem(InputID.Address, true);\n const jobTitle = this._getItem(InputID.JobTitle);\n const department = this._getItem(InputID.Department);\n const companySize = this._getItem(InputID.Size);\n const comments = this._getItem(InputID.Comment);\n const prospectType = this._getItem(InputID.ProspectType);\n\n // API gets email as part of the address object, but I do not use the email input from the address component, thus we need to copy it over\n if (companyEmail && companyEmail.value && companyAddress && companyAddress.address) {\n companyAddress.address.Email = companyEmail.value;\n }\n\n const newPartner: BusinessPartnerProspect = {\n FirstName: firstName && firstName.value,\n LastName: lastName && lastName.value,\n CompanyName: companyName && companyName.value,\n Address: companyAddress && companyAddress.address && companyAddress.address,\n JobTitle: jobTitle && jobTitle.value,\n Department: department && department.value,\n CompanySize: (companySize && Number.parseInt(companySize.value, 10)) || 0,\n Comments: comments && comments.value,\n ProspectTypeValue: (prospectType && Number.parseInt(prospectType.value, 10)) || 0\n };\n\n this.setState({\n isReady: false\n });\n\n // Create business partner request\n createProspectAsync({ callerContext: context.actionContext }, newPartner)\n .then(() => {\n const successPageURL =\n (config.confirmationLink && config.confirmationLink.linkUrl && config.confirmationLink.linkUrl.destinationUrl) ||\n getUrlSync('home', this.props.context.actionContext) ||\n '';\n window.location.href = successPageURL;\n })\n .catch(() => {\n this.setState({\n hasSubmitErrors: true\n });\n });\n };\n\n private readonly _onCancel = () => {\n // Reset values of the form\n const cleanForm = this.state.formItems;\n cleanForm.forEach(input => {\n input.value = '';\n });\n\n // Set reset flag so address input will get reset on next renderInputSection() call\n this.needsToReset = true;\n\n this.setState({\n isReady: false,\n formItems: cleanForm,\n addressHasErrors: true,\n showAddressErrors: false,\n hasSubmitErrors: false\n });\n };\n\n private readonly _getItem = (id: string, isAddress: boolean = false) => {\n if (isAddress) {\n return this.state.formItems.find(item => {\n return item.id === id && item.address;\n });\n }\n return this.state.formItems.find(item => {\n return item.id === id && item.value !== '';\n });\n };\n}\n\nexport default BusinessSignUp;\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 { IBusinessSignUpItem, IBusinessSignUpViewProps } from './business-sign-up';\n\nconst BusinessSignUpItem: React.FC = ({ wrapper, label, errorMessage, input, isAddressInput }) => {\n // Hide label and error message if rendering address section\n return (\n \n {!isAddressInput && label}\n {!isAddressInput && errorMessage}\n {input}\n \n );\n};\n\nconst BusinesSignUpView: React.FC = props => {\n const { businessSignUp, ContainerWrapper, heading, businessSignUpForm } = props;\n\n const { FormWrapper, buttons, items, errorMessage, disclaimer } = businessSignUpForm;\n\n return (\n \n \n {heading}\n \n {items &&\n items.map((item: IBusinessSignUpItem) => {\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n {disclaimer}\n \n \n \n );\n};\n\nexport default BusinesSignUpView;\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 { KeyCodes } from '@msdyn365-commerce-modules/utilities';\n\nexport interface ISearchBarProps {\n className: string;\n searchPlaceholderLabel: string;\n onSearch(searchText: string): void;\n}\n\nexport interface ISearchBarState {\n searchText: string;\n}\n\nexport class SearchBar extends React.Component {\n constructor(props: ISearchBarProps) {\n super(props);\n this.state = {\n searchText: ''\n };\n }\n\n public render(): JSX.Element {\n const { className, searchPlaceholderLabel } = this.props;\n return (\n
\n \n
\n );\n }\n\n private readonly onSearchTextChange = (ev: React.ChangeEvent): void => {\n this.setState({\n searchText: ev.target.value\n });\n };\n\n private readonly onSearch = (): void => {\n this.props.onSearch(this.state.searchText);\n };\n\n private readonly handleKeyUp = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter) {\n this.onSearch();\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 { IComponentProps } from '@msdyn365-commerce/core';\nimport { CommerceException } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { moduleClassName } from '../business-partners';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { SearchBar } from './search-bar';\n\n/**\n * Props of DataGrid component.\n */\nexport interface IDataGridProps extends IComponentProps {\n className: string;\n pageSize?: number;\n searchPlaceholderLabel: string;\n defaultSorting?: ISortingInfo;\n resources: IBusinessPartnersResources;\n columns: IDataGridColumn[];\n loadData(): Promise;\n}\n\n/**\n * State of DataGrid component.\n */\nexport interface IDataGridState {\n data: Tdata[];\n paging: IPagingInfo;\n filter: IFilterInfo;\n sorting?: ISortingInfo;\n isLoading: boolean;\n errorMessage: string;\n}\n\nexport interface IPagingInfo {\n index: number;\n}\n\nexport interface IFilterInfo {\n searchText: string;\n}\n\nexport interface ISortingInfo {\n fieldName: string;\n ascending: boolean;\n}\n\n/**\n * Column definition of DataGrid component.\n */\nexport interface IDataGridColumn {\n /**\n * A unique key for identifying the column.\n */\n reactKey: string;\n\n /**\n * Name to render on the column header.\n */\n name: string;\n\n /**\n * Class name added to table cell.\n */\n className?: string;\n\n /**\n * The field to pull the text value from for the column.Can be unset if a custom `onRender` method is provided.\n */\n fieldName?: string;\n\n /**\n * Whether the user can search this column by text.\n */\n isSearchable?: boolean;\n\n /**\n * Custom renderer for cell content, instead of the default text rendering.\n */\n onRender?(item: Tdata): JSX.Element;\n\n /**\n * Event when the table cell is clicked.\n */\n onClick?(item: Tdata): void;\n}\n\nconst defaultPageSize = 10;\n\n/**\n * DataGrid component encapsulates common table functionalities.\n */\nexport class DataGrid extends React.Component, IDataGridState> {\n constructor(props: IDataGridProps) {\n super(props);\n this.state = {\n data: [],\n sorting: props.defaultSorting,\n paging: { index: 0 },\n filter: { searchText: '' },\n isLoading: true,\n errorMessage: ''\n };\n }\n\n public componentDidMount(): void {\n this.loadDataInternal();\n }\n\n public shouldComponentUpdate(nextProps: Readonly>, nextState: Readonly>): boolean {\n return (\n this.props.id !== nextProps.id ||\n this.props.columns !== nextProps.columns ||\n this.state.data !== nextState.data ||\n this.state.paging !== nextState.paging ||\n this.state.filter !== nextState.filter ||\n this.state.isLoading !== nextState.isLoading ||\n this.state.errorMessage !== nextState.errorMessage\n );\n }\n\n public render(): JSX.Element | null {\n const data = this.getDataToDisplay();\n const hasMore = this.hasMore();\n if (this.state.errorMessage) {\n return {this.state.errorMessage};\n }\n if (this.state.isLoading) {\n return {this.props.resources.loadingLabel};\n }\n if (!ArrayExtensions.hasElements(data)) {\n return (\n <>\n \n

{this.props.resources.noDataMessage}

\n \n );\n }\n return (\n <>\n \n \n {this.renderGridHeader()}\n {data.map((item, index) => this.renderGridRow(item, index))}\n
\n {hasMore && (\n
\n \n
\n )}\n \n );\n }\n\n /**\n * Renders the TH header in the table.\n * @returns - Header react node.\n */\n private readonly renderGridHeader = () => {\n const className = `${this.props.className}__header`;\n const rowClassName = `${className}__row`;\n return (\n \n \n {this.props.columns.map(column => (\n \n {column.name}\n \n ))}\n \n \n );\n };\n\n /**\n * Renders table row.\n * @param item - Data item for this row.\n * @param index - Index of the row.\n * @returns - Row react node.\n */\n private readonly renderGridRow = (item: Tdata, index: number) => {\n const rowClassName = `${this.props.className}__row`;\n return (\n \n {this.props.columns.map(column => {\n let cell: JSX.Element = <>;\n if (column.onRender) {\n cell = column.onRender(item);\n } else if (column.fieldName) {\n cell = {((item as unknown) as { [key: string]: string })[column.fieldName]};\n }\n return (\n column.onClick?.(item)}>\n {cell}\n \n );\n })}\n \n );\n };\n\n /**\n * Load data for the table.\n * @returns Promise.\n */\n private readonly loadDataInternal = async () => {\n if (!this.props.context.actionContext.requestContext.user.isAuthenticated) {\n this.setState({\n isLoading: false\n });\n return;\n }\n try {\n const result = await this.props.loadData();\n this.setState({\n isLoading: false,\n data: result\n });\n } catch (e) {\n this.setState({\n isLoading: false,\n errorMessage: (e as { data: CommerceException })?.data?.LocalizedMessage || this.props.resources.genericErrorMessage\n });\n }\n };\n\n private readonly onSearch = (searchText: string): void => {\n this.setState({\n paging: { index: 0 },\n filter: { searchText }\n });\n };\n\n private readonly loadMore = (): void => {\n this.setState({\n paging: { index: this.state.paging.index + 1 }\n });\n };\n\n private readonly sortData = (): Tdata[] => {\n const sorting = this.state.sorting;\n if (!sorting) {\n return this.state.data;\n }\n const { fieldName, ascending } = sorting;\n return this.state.data.sort((item1: Tdata, item2: Tdata) => {\n let value1 = ((item1 as unknown) as { [key: string]: string })[fieldName];\n let value2 = ((item2 as unknown) as { [key: string]: string })[fieldName];\n if (typeof value1 === 'string' && typeof value2 === 'string') {\n value1 = value1.toLowerCase();\n value2 = value2.toLowerCase();\n }\n const compareResult = value1 > value2 ? 1 : value1 < value2 ? -1 : 0;\n return ascending ? compareResult : compareResult * -1;\n });\n };\n\n private readonly filterData = (): Tdata[] => {\n const column = this.props.columns.find(c => c.isSearchable);\n const searchText = this.state.filter.searchText;\n return this.sortData().filter(item => {\n if (!column?.fieldName || !searchText) {\n return true;\n }\n const columnValue = ((item as unknown) as { [key: string]: string })[column.fieldName];\n return columnValue && columnValue.toLowerCase().indexOf(searchText.trim().toLowerCase()) >= 0;\n });\n };\n\n private readonly getDataToDisplay = (): Tdata[] => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.slice(0, itemsCount);\n };\n\n private readonly hasMore = (): boolean => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.length > itemsCount;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { ReactNode } from 'react';\nimport { isMobile, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\n\nimport { BusinessPartner, BusinessPartnerUser, BusinessPartnersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { DataGrid, IDataGridColumn } from './data-grid';\n\n/**\n * View model of business partner user, used to display.\n */\nexport interface IBusinessPartnerUserViewModel extends BusinessPartnerUser {\n name: string;\n spendingLimit: ReactNode;\n}\n\n/**\n * Props of BusinessPartnerUsersTable.\n */\nexport interface IBusinessPartnerUsersTableProps extends IComponentProps {\n className: string;\n pageSize?: number;\n businessPartner: BusinessPartner;\n resources: IBusinessPartnersResources;\n onSelect(businessPartnerUser: BusinessPartnerUser): void;\n}\n\n/**\n * BusinessPartnerUsersTable component.\n */\nexport class BusinessPartnerUsersTable extends React.Component {\n public shouldComponentUpdate(nextProps: Readonly): boolean {\n return this.props.id !== nextProps.id;\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Get column definition of the table.\n * @returns - Columns.\n */\n private readonly getColumns = (): IDataGridColumn[] => {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return [\n {\n reactKey: 'name',\n name: this.props.resources.businessUserTableNameHeadingText,\n isSearchable: true,\n fieldName: 'name',\n onClick: this.props.onSelect,\n onRender: (data: IBusinessPartnerUserViewModel) => {data.name}\n },\n {\n reactKey: 'email',\n name: this.props.resources.businessUserTableEmailHeadingText,\n fieldName: 'Email',\n onClick: this.props.onSelect\n },\n {\n reactKey: 'spendingLimit',\n name: this.props.resources.businessUserTableSpendingLimitHeadingText,\n className: `${this.props.className}__row__column-with-number`,\n fieldName: 'spendingLimit',\n onClick: !isMobileDevice ? this.props.onSelect : undefined\n }\n ];\n };\n\n /**\n * Call retail proxy to get business partner users.\n * @returns - Business partner users view model.\n */\n private readonly getBusinessPartnerUsers = async (): Promise => {\n const businessPartners = await BusinessPartnersDataActions.getUsersAsync(\n {\n callerContext: this.props.context.actionContext,\n bypassCache: 'get',\n queryResultSettings: {}\n },\n this.props.businessPartner.BusinessPartnerId\n );\n return businessPartners\n .filter(user => user.StatusValue === 1)\n .map(user => {\n return {\n ...user,\n name: `${user.FirstName} ${user.LastName}`,\n spendingLimit: (\n \n {!ObjectExtensions.isNullOrUndefined(user.SpendingLimit)\n ? this.props.context.cultureFormatter.formatCurrency(user.SpendingLimit.toString())\n : ''}\n {!ObjectExtensions.isNullOrUndefined(user.SpendingLimit) && user.SpendingLimit === 0 ? (\n \n