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AKA,KAAK8/C,QAAQrgC,KAAKugC,IAC1B,MAAM1rB,EAAYp2B,EAAM+hD,4BAClB9vB,EAAAA,EAAAA,QAAOjyB,EAAM+hD,2BAA4B/hD,EAAMgiD,gBAAiBF,EAAOG,MACvE,GAEN,OACIriD,EAAAA,cAAA,OAAK4hB,IAAKsgC,EAAOG,KAAMnwC,UAAU,kCAC7BlS,EAAAA,cAAA,OAAKkS,UAAU,8BACV,QACDlS,EAAAA,cAAA,QAAMkS,UAAU,mCAAmCgwC,EAAOG,MACzD,YAELriD,EAAAA,cAAC8iC,EAAAA,OAAM,CACHjf,MAAOzjB,EAAMgiD,gBACblwC,UAAU,mCACV+J,QAASgmC,EAAsB,aACnBC,EAAOG,KAAI,aACX7rB,UA5KpCr2B,KAAK2zB,SAAUC,EAAAA,EAAAA,kBAAiB,QAAS5zB,KAAKC,MAAMszB,iBAAmBoiB,EAAAA,kBAAkBwM,gBACzFniD,KAAKmuB,MAAQ,CACTiyB,oBAAqB,GACrB51B,MAAO,GACP61B,UAAU,GAIXp/C,SACH,OACIpB,EAAAA,cAAA,WACIA,EAAAA,cAAA,OAAKkS,UAAU,0BAA0B/R,KAAKC,MAAMmiD,sBACnDpiD,KAAKypC,YAAYzpC,KAAKC,MAAMihD,qBAAsBlhD,KAAKC,MAAMkhD,yBAA0BnhD,KAAKC,MAAM8B,MACnGlC,EAAAA,cAAA,KAAGkS,UAAW/R,KAAKmuB,MAAM3D,MAAQ,mBAAqB,GAAE,YAAY,aAC/DxqB,KAAKmuB,MAAM3D,OAEfxqB,KAAK4hD,wBAAwB5hD,KAAKC,SAsKnD","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/pva-chat-connector.tsx?def7","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/proactive-chat-trigger.ts?734c","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/cart-amount-trigger.ts?742f","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/cart-number-of-items-trigger.ts?d5f8","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/cart-specific-product-trigger.ts?2cd6","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/helpers/consts.ts?02a5","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/date-range-trigger.ts?8bfc","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/from-specific-page-trigger.ts?fd6f","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/page-visits-trigger.ts?cce7","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/specific-CountryRegion-trigger.ts?e87a","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/specific-page-trigger.ts?6e03","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/triggers/wait-on-time-trigger.ts?d898","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/proactive/index.ts?36a2","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/helpers/ContextProvider.ts?4518","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/helpers/StyleComposers.ts?0192","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/helpers/CommerceChatStore.ts?5b45","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/components/ChatCore.tsx?a412","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/components/Chat.tsx?1581","webpack://Msdyn365.Commerce.Online/./src/modules/pva-chat-connector/pva-chat-connector.view.tsx?3d5c","webpack://Msdyn365.Commerce.Online/./src/themes/venchi/views/loyalty-terms.view.tsx?71d6","webpack://Msdyn365.Commerce.Online/./src/themes/venchi/views/order-details.view.tsx?d810","webpack://Msdyn365.Commerce.Online/./src/themes/venchi/views/ratings-histogram.view.tsx?62be","webpack://Msdyn365.Commerce.Online/./src/common/address-autosuggest.ts?f5a2","webpack://Msdyn365.Commerce.Online/./src/common/address-common.ts?cf4b","webpack://Msdyn365.Commerce.Online/./src/common/address-format.data.ts?6cbf","webpack://Msdyn365.Commerce.Online/./src/common/address-format.ts?4f04","webpack://Msdyn365.Commerce.Online/./src/common/address-meta-data.ts?c6e6","webpack://Msdyn365.Commerce.Online/./src/common/address-module.data.ts?697a","webpack://Msdyn365.Commerce.Online/./src/common/components/address-checkbox.tsx?eb1a","webpack://Msdyn365.Commerce.Online/./src/common/components/address-add.tsx?e6a6","webpack://Msdyn365.Commerce.Online/./src/common/components/address-alert.tsx?10d1","webpack://Msdyn365.Commerce.Online/./src/common/components/address-button.tsx?7f7b","webpack://Msdyn365.Commerce.Online/./src/common/components/address-detail-item.tsx?5209","webpack://Msdyn365.Commerce.Online/./src/common/components/address-dropdown.tsx?f24b","webpack://Msdyn365.Commerce.Online/./src/common/components/address-error-message.tsx?89ad","webpack://Msdyn365.Commerce.Online/./src/common/components/address-error-title.tsx?3926","webpack://Msdyn365.Commerce.Online/./src/common/components/address-input.tsx?8073","webpack://Msdyn365.Commerce.Online/./src/common/components/address-label.tsx?6864","webpack://Msdyn365.Commerce.Online/./src/common/components/address-list.tsx?a628","webpack://Msdyn365.Commerce.Online/./src/common/components/address-show.tsx?3f60","webpack://Msdyn365.Commerce.Online/./src/modules/account-management-address/account-management-address.tsx?27e7","webpack://Msdyn365.Commerce.Online/./src/modules/account-management-address/account-management-address.view.tsx?8c9f","webpack://Msdyn365.Commerce.Online/./src/modules/business-account-address/business-account-address.tsx?299e","webpack://Msdyn365.Commerce.Online/./src/modules/business-account-address/business-account-address.view.tsx?5078","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/components/sign-up-button.tsx?e1d9","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/components/sign-up-error.tsx?7f8a","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/components/sign-up-input.tsx?5bbe","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/components/sign-up-label.tsx?4988","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/components/sign-up-radio-button.tsx?f8c1","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/business-sign-up.tsx?13a2","webpack://Msdyn365.Commerce.Online/./src/modules/business-sign-up/business-sign-up.view.tsx?e2f8","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/search-bar.tsx?63c1","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/data-grid.tsx?ddec","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/business-partner-users-table.tsx?c677","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/components/business-partners-table.tsx?8b1d","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/business-partners.tsx?57a6","webpack://Msdyn365.Commerce.Online/./src/modules/business-partners/business-partners.view.tsx?b34e","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.tsx?e0bd","webpack://Msdyn365.Commerce.Online/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://Msdyn365.Commerce.Online/./src/modules/order-history-with-search-and-filters/components/order-history-with-search-and-filters-view-mode-selector.component.tsx?6452","webpack://Msdyn365.Commerce.Online/./src/modules/subscribe/subscribe.tsx?9fea","webpack://Msdyn365.Commerce.Online/./src/modules/subscribe/subscribe.view.tsx?19c8","webpack://Msdyn365.Commerce.Online/./src/modules/tab-item/tab-item.tsx?b1b8","webpack://Msdyn365.Commerce.Online/./src/modules/tab-item/tab-item.view.tsx?ee3b","webpack://Msdyn365.Commerce.Online/./src/modules/tab/tab.tsx?9ac6","webpack://Msdyn365.Commerce.Online/./src/modules/tab/tab.view.tsx?a99d","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/components/links.tsx?c969","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/tile-list-item.tsx?114a","webpack://Msdyn365.Commerce.Online/./src/modules/tile-list-item/tile-list-item.view.tsx?19a8","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/carticon.component.tsx?3c7c","webpack://Msdyn365.Commerce.Online/./src/modules/adventureworks/views/components/promocode.component.tsx?c06b"],"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,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHh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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.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ILoyaltyTermsViewProps } from '@msdyn365-commerce-modules/account-management';\r\nimport { ILoyaltyTermsProps } from '../definition-extensions/loyalty-terms.ext.props.autogenerated';\r\n\r\nconst LoyaltyTermsView: React.FC> = props => {\r\n // The user does NOT have a customer number yet, they still have a tmp_guid\r\n let tmp_account = false;\r\n if (props.context.request.user.customerAccountNumber?.length === 36) {\r\n tmp_account = true;\r\n }\r\n\r\n const auth = props.context.request.user.isAuthenticated;\r\n\r\n // const hostname = props?.context?.request?.url?.requestUrl?.hostname || ''; // Protip: this does NOT keep the /de or whatever, so make sure to fix it if used in the future\r\n\r\n const { LoyaltyTerms, modalToggle, modal, loading } = props;\r\n\r\n if (tmp_account && auth) {\r\n return (\r\n
\r\n {props.resources.joinedLoyaltyThankYouHeader && (\r\n

{props.resources.joinedLoyaltyThankYouHeader}

\r\n )}\r\n {props.resources.joinedLoyaltyParagraphContent && (\r\n
\r\n

{props.resources.joinedLoyaltyParagraphContent}

\r\n
\r\n )}\r\n {/* {props.resources.loyaltyBalanceCheckURL && props.resources.joinedLoyaltyBalanceCheckLinkText && ({props.resources.joinedLoyaltyBalanceCheckLinkText})} */}\r\n
\r\n );\r\n // User is NOT temp but IS auth --> old/synced user\r\n } else if (!loading && modal && !tmp_account && auth) {\r\n if (props.config.layout === 'wideLayout') {\r\n return (\r\n \r\n {props.config.showImages && props.config.marketingImage ? (\r\n
\r\n
\r\n {props.config.marketingImage.altText}\r\n
\r\n
\r\n {props.config.marketingText &&

{props.config.marketingText}

}\r\n {modalToggle}\r\n
\r\n
\r\n {props.config.marketingImage.altText}\r\n
\r\n
\r\n ) : (\r\n
\r\n {props.config.marketingText &&

{props.config.marketingText}

}\r\n {modalToggle}\r\n
\r\n )}\r\n \r\n {modal.heading}\r\n \r\n {modal.terms}\r\n \r\n {modal.checkbox}\r\n {modal.agreeText}\r\n \r\n \r\n \r\n {modal.submitButton}\r\n {modal.cancelButton}\r\n \r\n \r\n
\r\n );\r\n } else {\r\n return (\r\n \r\n
\r\n {props.config.showImages && props.config.marketingImage && (\r\n {props.config.marketingImage.altText}\r\n )}\r\n {props.config.marketingText &&

{props.config.marketingText}

}\r\n {modalToggle}\r\n
\r\n \r\n {modal.heading}\r\n \r\n {modal.terms}\r\n \r\n {modal.checkbox}\r\n {modal.agreeText}\r\n \r\n \r\n \r\n {modal.submitButton}\r\n {modal.cancelButton}\r\n \r\n \r\n
\r\n );\r\n }\r\n } else {\r\n return null;\r\n }\r\n};\r\n\r\nexport default LoyaltyTermsView;\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 {\r\n IGroup,\r\n IGroupDelivery,\r\n IGroups,\r\n IHelp,\r\n IOrderDetailsViewProps,\r\n IOrderInformation,\r\n IOrderSummary,\r\n IPaymentMethods,\r\n ISalesLine\r\n} from '@msdyn365-commerce-modules/order-management';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { SalesOrder } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\nimport { IOrderDetailsProps, IOrderDetailsResources } from '../definition-extensions/order-details.ext.props.autogenerated';\r\n\r\nexport const OrderInfomation: React.FC = ({\r\n orderInformationProps,\r\n salesId,\r\n receiptId,\r\n createdDate,\r\n count,\r\n amount,\r\n channelReferenceId,\r\n channelName,\r\n channelAddress,\r\n salesOrder,\r\n resources\r\n}) => {\r\n // @ts-ignore\r\n const customTrackingUrl = salesOrder?.ExtensionProperties?.filter((tracking: { Key: string }) => tracking.Key === 'tranckingURL_CAP')[0]?.Value.StringValue;\r\n // @ts-ignore\r\n const customTrackingCarrier = salesOrder?.ExtensionProperties?.filter((tracking: { Key: string }) => tracking.Key === 'tranckingCarrier_CAP')[0]?.Value.StringValue;\r\n\r\n return (\r\n \r\n \r\n {channelName}\r\n {channelAddress}\r\n {salesId}\r\n {receiptId}\r\n {createdDate}\r\n {count}\r\n {amount}\r\n {channelReferenceId}\r\n \r\n {customTrackingUrl && \r\n
{resources.shippingInformation}
\r\n
\r\n

{resources.shippedWith} {customTrackingCarrier}

\r\n \r\n
\r\n
}\r\n
\r\n )\r\n};\r\n\r\nexport const SalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\r\n \r\n {salesLine}\r\n {buyAgainButton}\r\n \r\n);\r\n\r\nexport const GroupDelivery: React.FC = ({ deliveryProps, heading, count, trackingInfo, shippedStatusCheck }) => (\r\n \r\n {heading}\r\n {count}\r\n {/* shippedStatusCheck === 'shipped' ? null : trackingInfo */}\r\n \r\n);\r\n\r\nexport const Group: React.FC = ({ groupProps, delivery, address, salesLinesProps, salesLines }) => (\r\n \r\n {delivery && }\r\n \r\n {salesLines && (\r\n \r\n {salesLines.map(salesLine => (\r\n \r\n {salesLine.data.deliveryType === 'ship' && salesLine.data.shipment ? salesLine.trackingInfo : null}\r\n \r\n {salesLine.salesStatus}\r\n \r\n ))}\r\n \r\n )}\r\n {!delivery.showTimeslot && address}\r\n {delivery.showTimeslot && (\r\n \r\n {address}\r\n {delivery.pickupDateTimeslot}\r\n \r\n )}\r\n \r\n \r\n);\r\n\r\nexport const Groups: React.FC = ({ groupsProps, groups }) => (\r\n \r\n {groups.map((group, index) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nconst _renderCustomTaxLine = (taxAmount: number): JSX.Element | null => {\r\n //const { estimatedTaxLabel, yetToBeCalculatedText} = props.resources;\r\n\r\n return (\r\n
\r\n

\r\n Tax\r\n \r\n {taxAmount}\r\n \r\n

\r\n
\r\n )\r\n}\r\n\r\nexport const OrderSummary: React.FC = ({\r\n orderSummaryProps,\r\n heading,\r\n subtotal,\r\n shipping,\r\n tax,\r\n totalAmount,\r\n earnedPoints,\r\n ...other\r\n}) => {\r\n // @ts-ignore\r\n const locale = other.locale;\r\n // @ts-ignore\r\n const taxAmount = other.taxAmount;\r\n \r\n return (\r\n \r\n {heading}\r\n {subtotal}\r\n {shipping}\r\n {locale.toLowerCase() == 'en-gb' && taxAmount > 0 ? _renderCustomTaxLine(taxAmount) : tax}\r\n {totalAmount}\r\n {earnedPoints}\r\n \r\n );\r\n};\r\n\r\nexport const Payment: React.FC = ({ paymentMethodsProps, title, methods }) => (\r\n \r\n {title}\r\n {methods}\r\n \r\n);\r\n\r\nexport const Help: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\r\n \r\n {needHelpLabel}\r\n {helpLineNumberLabel}\r\n {contactNumber}\r\n \r\n);\r\n\r\nconst OrderDetailsView: React.FC> = ({\r\n salesOrder,\r\n moduleProps,\r\n heading,\r\n alert,\r\n loading,\r\n orderInfomation,\r\n orderSummary,\r\n payment,\r\n help,\r\n groups,\r\n resources\r\n}) => {\r\n // prettier-ignore\r\n // @ts-ignore\r\n const customTrackingNumber = salesOrder?.ExtensionProperties?.filter((tracking: { Key: string }) => tracking.Key === 'trackingId_CAP')[0]?.Value.StringValue;\r\n // prettier-ignore\r\n // @ts-ignore\r\n const customTrackingStatus = salesOrder?.ExtensionProperties?.filter((tracking: { Key: string }) => tracking.Key === 'trakingStatus_CAP')[0]?.Value.StringValue;\r\n const locale = moduleProps.moduleProps.context.request.locale;\r\n // @ts-ignore\r\n const salesOrderData = moduleProps?.moduleProps?.data?.orderHydration?.result?.salesOrder;\r\n const taxAmount = salesOrderData?.TaxAmount;\r\n const extraOrdersSummaryEu = {\r\n locale: locale,\r\n taxAmount: taxAmount\r\n };\r\n\r\n return (\r\n \r\n {heading}\r\n {alert}\r\n {loading}\r\n {orderInfomation && }\r\n {groups && }\r\n \r\n {orderSummary && }\r\n {payment && }\r\n \r\n {help && }\r\n \r\n );\r\n};\r\n\r\nexport default OrderDetailsView;\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 { 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