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KF,MAAMqG,KAAKstC,0BAAkB,IAAAyI,OAAA,EAAlCA,EAAoC71C,QAAQmR,MAChHqhC,GAAYuD,EAAAA,EAAAA,IAAap8C,KAAKF,MAAMoC,QAAQC,SAElD,OADoF,QAA5Dg6C,EAAG3kC,MAAAA,OAAK,EAALA,EAAOhD,QAAOyH,GAAWA,EAAQ48B,YAAcA,WAAU,IAAAsD,EAAAA,EAAI,IAsBhG,uJC1NO,MAAME,EAA8Fv8C,IACvG,MAAM,wBAAEw7C,EAAuB,yBAAElB,GAA6Bt6C,EAE9D,OACIF,EAAAA,cAACkU,EAAAA,OAAM/R,OAAAC,OAAA,GAAKlC,EAAMyS,aACb+oC,EACAlB,IAKb","sources":["webpack://msdyn365.commerce.online/./src/modules/all-purpose-tasting-tours/all-purpose-tasting-tours.tsx?1372","webpack://msdyn365.commerce.online/./src/modules/family-and-friends/components/family-and-friends-code-item.tsx?8137","webpack://msdyn365.commerce.online/./src/modules/family-and-friends/family-and-friends.tsx?c028","webpack://msdyn365.commerce.online/./src/modules/family-and-friends/family-and-friends.view.tsx?3d55","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/smwe-checkout-gift-card.props.autogenerated.ts?21ed","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/components/get-form.tsx?0222","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/components/get-item.tsx?125f","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/components/get-list.tsx?8a3a","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/components/title.tsx?101f","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/smwe-checkout-gift-card.tsx?4c4f","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-gift-card/smwe-checkout-gift-card.view.tsx?d786","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-section-container/components/loading.tsx?e6c0","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-section-container/smwe-checkout-section-container.tsx?369e","webpack://msdyn365.commerce.online/./src/modules/smwe-checkout-section-container/smwe-checkout-section-container.view.tsx?c80c","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-api-token.ts?6bc1","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-filterable-class.ts?9a15","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-mapper-class.ts?276f","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-international-location.ts?e976","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-location.ts?b897","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-products.ts?c9b9","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-dropdown-menu.tsx?3af1","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-query-location.tsx?ae33","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/actions/get-wine-countries.ts?b8a0","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-query-location-international.tsx?c193","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-form.props.autogenerated.ts?8249","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-wine-display.tsx?b4ad","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-display-item.tsx?e9ae","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-scrollable.tsx?3a21","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-pager.tsx?5207","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-wine-results.tsx?4f98","webpack://msdyn365.commerce.online/./src/modules/wine-finder-form/wine-finder-form.tsx?0afa","webpack://msdyn365.commerce.online/./src/modules/account-customer-balance-tile/account-customer-balance-tile.tsx?8281","webpack://msdyn365.commerce.online/./src/modules/account-customer-balance-tile/account-customer-balance-tile.view.tsx?95a8","webpack://msdyn365.commerce.online/./src/modules/account-customer-balance-tile/components/account-customer-balance-tile-info.tsx?44e9","webpack://msdyn365.commerce.online/./src/modules/account-customer-balance-tile/components/account-customer-balance-tile-links.tsx?95ac","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-button.tsx?8d59","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-description.tsx?54a5","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-error.tsx?a75a","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-input.tsx?d840","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-label.tsx?4560","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-link.tsx?2078","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-loading-icon.tsx?1d7f","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-loading-message.tsx?84ee","webpack://msdyn365.commerce.online/./src/modules/sign-in/components/sign-in-text.tsx?76b9","webpack://msdyn365.commerce.online/./src/modules/sign-in/sign-in.tsx?259c","webpack://msdyn365.commerce.online/./src/modules/sign-in/sign-in.view.tsx?2b3e","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-partner-promotion/components/terms-paragraph.tsx?1a9a","webpack://msdyn365.commerce.online/./src/modules/business-partner-promotion/business-partner-promotion.tsx?df24","webpack://msdyn365.commerce.online/./src/modules/business-partner-promotion/business-partner-promotion.view.tsx?1ff2","webpack://msdyn365.commerce.online/../../src/checkout-utilities.data.ts?b2cc","webpack://msdyn365.commerce.online/../../../src/module-state-manager/module-state.ts?7579","webpack://msdyn365.commerce.online/../../../src/module-state-manager/with-module-state.tsx?61ca","webpack://msdyn365.commerce.online/./src/common/waiting.tsx?8095","webpack://msdyn365.commerce.online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.tsx?1d63","webpack://msdyn365.commerce.online/./src/modules/checkout-express-payment-container/checkout-express-payment-container.view.tsx?4299","webpack://msdyn365.commerce.online/./src/modules/checkout-section-container/components/loading.tsx?2e57","webpack://msdyn365.commerce.online/./src/modules/checkout-section-container/checkout-section-container.tsx?c853","webpack://msdyn365.commerce.online/./src/modules/checkout-section-container/checkout-section-container.view.tsx?b4ab","webpack://msdyn365.commerce.online/./src/modules/fabrikam/views/header.view.tsx?6d84","webpack://msdyn365.commerce.online/./src/modules/fabrikam/views/search-result-container.view.tsx?89df","webpack://msdyn365.commerce.online/./src/modules/product-comparison-button/product-comparison-button.tsx?9384","webpack://msdyn365.commerce.online/./src/modules/product-comparison-button/product-comparison-button.view.tsx?94a7"],"sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport { getRichTextHtml, IImageSettings, Image, RichTextComponent } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { ITastingToursData } from './all-purpose-tasting-tours.data';\r\nimport { IAllPurposeTastingToursProps } from './all-purpose-tasting-tours.props.autogenerated';\r\n\r\n// =============================================================================\r\n// INTERFACES\r\n// =============================================================================\r\n\r\ndeclare module 'react' {\r\n // tslint:disable-next-line:interface-name\r\n interface HTMLAttributes extends DOMAttributes {\r\n token?: string;\r\n }\r\n}\r\n\r\n// tslint:disable-next-line: no-any\r\ndeclare var appInsights: any;\r\n\r\n/**\r\n *\r\n * TastingTours component: Shows information about tasting flights and tours\r\n * offered and loads third-party application for making reservations\r\n * @extends {React.Component>}\r\n */\r\nclass TastingTours extends React.Component> {\r\n\r\n constructor(props: IAllPurposeTastingToursProps) {\r\n super(props);\r\n this._showWidget = this._showWidget.bind(this);\r\n }\r\n\r\n // ========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n // ------------------------------------------------------\r\n // HACK: Disable logging to reservecloud domain\r\n // Without this, we're getting a CORS error because\r\n // appInsights is injecting resource-id into the header\r\n // of all AJAX calls.\r\n // ------------------------------------------------------\r\n public componentDidMount(): void {\r\n const domain = '*.reservecloud.com';\r\n\r\n // There are at least three paths, based on timing and async operations:\r\n // One: everything is initialized and we just need to add the target domain\r\n try {\r\n appInsights.config.correlationHeaderExcludedDomains.push(domain);\r\n } catch (e) {\r\n // Two: appInsights.config exists, but correlationHeaderExcludedDomains doesn't exist yet\r\n // tslint:disable-next-line: no-typeof-undefined\r\n if ((typeof appInsights !== 'undefined') && appInsights.config && !appInsights.config.correlationHeaderExcludedDomains) {\r\n appInsights.config.correlationHeaderExcludedDomains = [domain];\r\n } else {\r\n // THREE: appInsights is defined, but not appInsights.config. In this case we can either wait around,\r\n // or close our eyes and hope for the best.\r\n console.warn('AppInsights Domain Exclusion Failed');\r\n }\r\n }\r\n\r\n // Load the ReserveCloud script and inject it -- we can't do it via JSX\r\n // Pick a default target in case it's missing (even though it's required)\r\n this._injectScript(this.props.config.rcTarget || 'guestLists');\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n public render(): JSX.Element {\r\n\r\n return (\r\n <>\r\n
\r\n
\r\n {this._image}\r\n\r\n
\r\n {this._content}\r\n {this._consentGate}\r\n {this._integration}\r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n // ==========================================================================\r\n // JSX CONSTRUCTORS\r\n // ==========================================================================\r\n\r\n // ------------------------------------------------------\r\n // Displays an optional image next to the content\r\n // ------------------------------------------------------\r\n private get _image(): JSX.Element | null {\r\n const { image } = this.props.config;\r\n\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=24&h=24&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=24&h=24&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: true\r\n };\r\n\r\n if (image) {\r\n return (\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // ------------------------------------------------------\r\n // Display the reservation content\r\n // ------------------------------------------------------\r\n private get _content(): JSX.Element | null {\r\n\r\n return (\r\n \r\n {this._header}\r\n {this._body}\r\n \r\n );\r\n }\r\n\r\n // ------------------------------------------------------\r\n // Optional Header above body text\r\n // ------------------------------------------------------\r\n private get _header(): JSX.Element | null {\r\n const { header } = this.props.config;\r\n\r\n if (header && header.text) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n // No header specified\r\n return null;\r\n }\r\n\r\n // ------------------------------------------------------\r\n // Main body text\r\n // ------------------------------------------------------\r\n private get _body(): JSX.Element | null {\r\n const { content } = this.props.config;\r\n\r\n return (\r\n
\r\n {content && // tslint:disable-next-line:react-no-dangerous-html\r\n
}\r\n
\r\n\r\n );\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private get _consentGate(): JSX.Element | null {\r\n const { consentCTA, consentText, requireConsent, consentFooter, consentFooterClass } = this.props.config;\r\n if (requireConsent) {\r\n return (\r\n \r\n );\r\n } else {\r\n return null;\r\n }\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ReserveCloud-specific JSX\r\n // ------------------------------------------------------\r\n private get _integration(): JSX.Element {\r\n const { token, requireConsent } = this.props.config;\r\n\r\n return (\r\n
\r\n
\r\n Loading\r\n
\r\n
\r\n );\r\n }\r\n\r\n // ==========================================================================\r\n // PRIVATE METHODS\r\n // ==========================================================================\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private get _reservationClassName(): string {\r\n // if there is an image available, then use sm-8 instead to match the\r\n // images sm-4\r\n return (this.props.config.image) ? 'col-sm-8' : 'col';\r\n }\r\n\r\n // ------------------------------------------------------\r\n // Load the ReserveCloud script and inject it -- we can't do it via JSX\r\n // ------------------------------------------------------\r\n private _injectScript(target: string): void {\r\n // tslint:disable-next-line: no-typeof-undefined\r\n if (typeof document !== 'undefined') {\r\n const script = document.createElement('script');\r\n script.defer = true;\r\n script.setAttribute('id', 'rc-script');\r\n script.setAttribute('rc-target', target);\r\n script.src = 'https://www.reservecloud.com/scripts/portals/rcPortal.js';\r\n document.getElementsByTagName('head')[0].appendChild(script);\r\n }\r\n }\r\n\r\n // ------------------------------------------------------\r\n // ------------------------------------------------------\r\n private _showWidget(): void {\r\n const widget = document.getElementById('rc-portal') as HTMLInputElement;\r\n const consentGate = document.getElementById('tasting-tours-consent') as HTMLInputElement;\r\n if (widget && consentGate) {\r\n widget.className = '';\r\n consentGate.className = 'tasting-tours-hidden';\r\n }\r\n }\r\n}\r\n\r\nexport default TastingTours;\r\n","import { ICoreContext, RichText } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IrsmFriendsAndFamilyCode } from '../../../dataActions/DataServiceEntities.g';\r\nimport { IFamilyAndFriendsConfig, IFamilyAndFriendsResources } from '../family-and-friends.props.autogenerated';\r\ninterface IFamilyAndFriendsCodeComponentProps {\r\n code: IrsmFriendsAndFamilyCode;\r\n config: IFamilyAndFriendsConfig;\r\n resources: IFamilyAndFriendsResources;\r\n // tslint:disable-next-line: no-any\r\n context: ICoreContext<{ [x: string]: any }>;\r\n}\r\n\r\n/**\r\n * renders a single row (code) for the family and friends table\r\n */\r\nexport class FamilyAndFriendsCodeComponent extends React.Component {\r\n constructor(props: IFamilyAndFriendsCodeComponentProps) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
\r\n
{this.props.resources.familyFriends_codeLabel}
\r\n
{this.props.code.Code}
\r\n
\r\n
\r\n
{this.props.resources.familyFriends_recipientLabel}
\r\n
{this._recipientColumnAction}
\r\n
\r\n
\r\n
{this.props.resources.familyFriends_activationDateLabel}
\r\n
{this.props.code.ActivationDate}
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private get _recipientColumnAction(): JSX.Element {\r\n if (this._hasBeenRecieved) {\r\n return
{this.props.code.RecipientEmailAddress}
;\r\n }\r\n return (\r\n \r\n );\r\n }\r\n\r\n private get mailToLink(): string {\r\n const { mailSubject, mailBody } = this.props.config;\r\n return `mailto:?subject=${this._sanitizeMailTo(mailSubject, true)}&body=${this._sanitizeMailTo(mailBody)}${this.props.code.Code}`;\r\n }\r\n\r\n //-------------------------------------------------------\r\n // mailto doesn't support HTML tags, and is fairly picky\r\n // and limited.\r\n // The CMS places all text in

blocks, randomly converts\r\n // some spaces to   and sanitizes certain characters\r\n // like single quotes (used as apostrophes!)\r\n // We need to convert all of that wackiness into something\r\n // that CMS authors would expect.\r\n //\r\n // stripOnly:\r\n // The Mail Subject was created in the definition file\r\n // as RichText, which was a bad idea. It's always a\r\n // short, unformatted string. RichText is surrounded in\r\n // a

tag, so for the mail subject we want to strip\r\n // it instead of replacing with CRLF.\r\n //-------------------------------------------------------\r\n private _sanitizeMailTo(value: RichText | undefined, stripOnly?: boolean): string {\r\n if (!value) { return ''; }\r\n\r\n return value\r\n .replace(/

/g, '') // Remove opening

tags\r\n .replace(/<\\/p>/g, stripOnly ? '' : '%0D%0A%0D%0A') // Remove or convert closing

tags\r\n .replace(/ /g, ' ') // Convert nbsp; to space\r\n .replace(/
/g, '%0D%0A') // Convert
to %0D%0A\r\n .replace(/&#(\\d\\d);/g, // Convert &#dd; values to %xx format (decimal --> hex)\r\n (match, p1) => {return `%${(+p1).toString(16)}`;});\r\n }\r\n\r\n private get _hasBeenRecieved(): boolean {\r\n return !!this.props.code.RecipientEmailAddress;\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport { FamilyAndFriendsCodeComponent } from './components/family-and-friends-code-item';\r\nimport { IFamilyAndFriendsData } from './family-and-friends.data';\r\nimport { IFamilyAndFriendsProps } from './family-and-friends.props.autogenerated';\r\n\r\nexport interface IFamilyAndFriendsViewProps extends IFamilyAndFriendsProps {\r\n header: React.ReactNode;\r\n codes: React.ReactNode[] | undefined;\r\n}\r\n\r\n/**\r\n *\r\n * FamilyAndFriends component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass FamilyAndFriends extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n this.props.context.actionContext;\r\n const viewProps: IFamilyAndFriendsViewProps = {\r\n ...this.props,\r\n header: this._headerJSX,\r\n codes: this.props.data.codeList.result?.Result.Codes?.map(\r\n (code) =>\r\n (\r\n \r\n )\r\n )\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private get _headerJSX(): JSX.Element {\r\n return (\r\n

\r\n
{this.props.resources.familyFriends_codeLabel}
\r\n
{this.props.resources.familyFriends_recipientLabel}
\r\n
{this.props.resources.familyFriends_activationDateLabel}
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default FamilyAndFriends;\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 { format, Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IFamilyAndFriendsViewProps } from './family-and-friends';\r\n\r\nexport default (props: IFamilyAndFriendsViewProps) => {\r\n if (props.data.codeList.result?.Result.Codes?.length === 0) { return
; } // don't show if no codes\r\n return (\r\n
\r\n {props.config.heading &&\r\n \r\n }\r\n
\r\n {\r\n format(\r\n props.resources.familyFriends_codesRemaining,\r\n props.data.codeList.result?.Result.QuantityAvailable || 0\r\n )\r\n }\r\n
\r\n
\r\n {props.header}\r\n {props.codes}\r\n
\r\n \r\n
\r\n );\r\n};\r\n","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * ISmweCheckoutGiftCard contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum showAdditionalFields {\r\n pin = 'pin',\r\n expirationDate = 'expirationDate',\r\n pinAndExpirationDate = 'pinAndExpirationDate'\r\n}\r\n\r\nexport interface ISmweCheckoutGiftCardConfig extends Msdyn365.IModuleConfig {\r\n className?: string;\r\n showAdditionalFields?: showAdditionalFields;\r\n}\r\n\r\nexport interface ISmweCheckoutGiftCardResources {\r\n emptyInputError: string;\r\n invalidCodeError: string;\r\n invalidCardInfoError: string;\r\n invalidCardTypeError: string;\r\n noCardPinError: string;\r\n noCardExpError: string;\r\n duplicatedCodeError: string;\r\n noBalanceError: string;\r\n giftCardFormLabel: string;\r\n giftCardNumberLabel: string;\r\n giftCardPinLabel: string;\r\n giftCardExpLabel: string;\r\n giftCardPinPlaceholderText: string;\r\n giftCardExpPlaceholderText: string;\r\n giftCardAlertLabel: string;\r\n applyGiftCardButton: string;\r\n removeGiftCardButton: string;\r\n enteredGiftCardLabel: string;\r\n giftCardAvailableBalanceLabel: string;\r\n}\r\n\r\nexport interface ISmweCheckoutGiftCardProps extends Msdyn365.IModule {\r\n resources: ISmweCheckoutGiftCardResources;\r\n config: ISmweCheckoutGiftCardConfig;\r\n}\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Alert, Button, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { showAdditionalFields } from '../smwe-checkout-gift-card.props.autogenerated';\r\n\r\nexport interface IGetFormInput {\r\n errorMessage: string;\r\n giftCardNumber: string;\r\n giftCardPin: string;\r\n giftCardExp: string;\r\n inputRef?: React.RefObject;\r\n inputPinRef?: React.RefObject;\r\n inputExpRef?: React.RefObject;\r\n supportExternalGiftCard?: boolean;\r\n additionalFields?: showAdditionalFields;\r\n resources: {\r\n applyGiftCardButton: string;\r\n giftCardFormLabel: string;\r\n giftCardNumberLabel: string;\r\n giftCardPinLabel: string;\r\n giftCardExpLabel: string;\r\n giftCardAlertLabel: string;\r\n giftCardPinPlaceholderText: string;\r\n giftCardExpPlaceholderText: string;\r\n };\r\n onEnterGiftCardNumber(giftCardNumber: string): void;\r\n onEnterGiftCardPin(giftCardPin: string): void;\r\n onEnterGiftCardExp(giftCardExp: string): void;\r\n onApplyGiftCard(): Promise;\r\n}\r\n\r\nexport interface IForm {\r\n formProps: INodeProps;\r\n label: React.ReactNode;\r\n inputPinLabel: React.ReactNode;\r\n inputExpLabel: React.ReactNode;\r\n alert: React.ReactNode;\r\n inputProps: INodeProps;\r\n inputNumProps: INodeProps;\r\n inputPinProps: INodeProps;\r\n inputExpProps: INodeProps;\r\n inputNumber: React.ReactNode;\r\n inputPin: React.ReactNode;\r\n inputExp: React.ReactNode;\r\n applyButton: React.ReactNode;\r\n supportExternalGiftCard: boolean | undefined;\r\n showGiftCardPinInput: boolean | undefined;\r\n showGiftCardExpInput: boolean | undefined;\r\n alertFieldLabel: React.ReactNode;\r\n}\r\n\r\n// tslint:disable-next-line:max-func-body-length\r\nexport const getForm = (options: IGetFormInput): IForm => {\r\n const {\r\n errorMessage,\r\n inputRef,\r\n inputPinRef,\r\n inputExpRef,\r\n giftCardNumber,\r\n giftCardPin,\r\n giftCardExp,\r\n onEnterGiftCardNumber,\r\n onEnterGiftCardPin,\r\n onEnterGiftCardExp,\r\n onApplyGiftCard,\r\n supportExternalGiftCard,\r\n additionalFields,\r\n resources: { applyGiftCardButton, giftCardFormLabel, giftCardNumberLabel, giftCardPinLabel, giftCardExpLabel,\r\n giftCardAlertLabel, giftCardPinPlaceholderText, giftCardExpPlaceholderText }\r\n } = options;\r\n\r\n const onApply = async (e: React.SyntheticEvent): Promise => {\r\n e.preventDefault();\r\n await onApplyGiftCard();\r\n };\r\n\r\n const onChangeNumber = (e: React.ChangeEvent) => {\r\n const value = (e.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\r\n onEnterGiftCardNumber(value);\r\n };\r\n\r\n const onChangePin = (e: React.ChangeEvent) => {\r\n const value = (e.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\r\n onEnterGiftCardPin(value);\r\n };\r\n\r\n // need to filter out the month and year\r\n const onChangeExp = (e: React.ChangeEvent) => {\r\n const value = (e.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\r\n onEnterGiftCardExp(value);\r\n };\r\n\r\n const formProps = {\r\n className: classnames('ms-checkout-gift-card__form', { 'is-invalid': !!errorMessage }),\r\n onSubmit: onApply,\r\n tag: 'form' as NodeTag\r\n };\r\n\r\n const label = (\r\n \r\n );\r\n\r\n const inputPinLabel = (\r\n \r\n );\r\n\r\n const inputExpLabel = (\r\n \r\n );\r\n\r\n const alertFieldLabel = (\r\n \r\n );\r\n\r\n const alert = (\r\n \r\n {errorMessage}\r\n \r\n );\r\n\r\n const inputProps = {\r\n className: 'ms-checkout-gift-card__input-fields'\r\n };\r\n\r\n const inputNumProps = {\r\n className: 'ms-checkout-gift-card__input-num-fields'\r\n };\r\n\r\n const inputPinProps = {\r\n className: 'ms-checkout-gift-card__input-pin-fields'\r\n };\r\n\r\n const inputExpProps = {\r\n className: 'ms-checkout-gift-card__input-exp-fields'\r\n };\r\n\r\n const inputNumber = (\r\n \r\n );\r\n\r\n const inputPin = (\r\n \r\n );\r\n\r\n const inputExp = (\r\n \r\n );\r\n\r\n const applyButton = (\r\n \r\n {applyGiftCardButton}\r\n \r\n );\r\n\r\n let showGiftCardPinInput = false;\r\n let showGiftCardExpInput = false;\r\n\r\n switch(additionalFields) {\r\n case showAdditionalFields.pin:\r\n showGiftCardPinInput = true;\r\n break;\r\n case showAdditionalFields.expirationDate:\r\n showGiftCardExpInput = true;\r\n break;\r\n case showAdditionalFields.pinAndExpirationDate:\r\n showGiftCardPinInput = true;\r\n showGiftCardExpInput = true;\r\n break;\r\n default:\r\n }\r\n\r\n return {\r\n formProps,\r\n label,\r\n inputPinLabel,\r\n inputExpLabel,\r\n alert,\r\n inputProps,\r\n inputNumProps,\r\n inputPinProps,\r\n inputExpProps,\r\n inputNumber,\r\n inputPin,\r\n inputExp,\r\n applyButton,\r\n supportExternalGiftCard,\r\n showGiftCardPinInput,\r\n showGiftCardExpInput,\r\n alertFieldLabel\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Button, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport * as React from 'react';\r\n\r\nexport interface IGetItemInput {\r\n giftCard: IGiftCardExtend;\r\n canRemove: boolean;\r\n resources: {\r\n enteredGiftCardLabel: string;\r\n giftCardAvailableBalanceLabel: string;\r\n removeGiftCardButton: string;\r\n };\r\n getFormattedPrice(price?: number, currencyCode?: string): string;\r\n onRemoveGiftCard(giftCardNumber: string): void;\r\n}\r\n\r\nexport interface IItem {\r\n itemProps: INodeProps;\r\n id?: string;\r\n selectedGiftCard: React.ReactNode;\r\n removeButton?: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * GiftCardItem component\r\n * @extends {React.PureComponent}\r\n */\r\nexport const getItem = ({\r\n giftCard,\r\n getFormattedPrice,\r\n canRemove,\r\n onRemoveGiftCard,\r\n resources: { enteredGiftCardLabel, giftCardAvailableBalanceLabel, removeGiftCardButton }\r\n}: IGetItemInput): IItem => {\r\n const balance = getFormattedPrice(giftCard.Balance, giftCard.CardCurrencyCode);\r\n const giftCardLast4Digit = (giftCard.Id || '').substr(-4);\r\n const onRemove = (): void => onRemoveGiftCard(giftCard.Id || '');\r\n\r\n const itemProps = {\r\n className: 'ms-checkout-gift-card__item'\r\n };\r\n\r\n const selectedGiftCard = (\r\n \r\n {enteredGiftCardLabel} {giftCardLast4Digit} ({giftCardAvailableBalanceLabel}{' '}\r\n {balance})\r\n \r\n );\r\n\r\n const removeButton = canRemove && (\r\n \r\n );\r\n\r\n return {\r\n itemProps,\r\n id: giftCard.Id,\r\n selectedGiftCard,\r\n removeButton\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport { getItem, IItem } from './get-item';\r\n\r\ninterface IGetListInput {\r\n giftCards?: IGiftCardExtend[];\r\n canRemove: boolean;\r\n resources: {\r\n enteredGiftCardLabel: string;\r\n giftCardAvailableBalanceLabel: string;\r\n removeGiftCardButton: string;\r\n };\r\n getFormattedPrice(price?: number, currencyCode?: string): string;\r\n onRemoveGiftCard(giftCardNumber: string): void;\r\n}\r\n\r\nexport interface IList {\r\n listProps: INodeProps;\r\n list: IItem[];\r\n}\r\n\r\nexport const getList = ({ giftCards, canRemove, resources, getFormattedPrice, onRemoveGiftCard }: IGetListInput): IList | undefined => {\r\n if (!giftCards || !giftCards.length) {\r\n return undefined;\r\n }\r\n\r\n const listProps = {\r\n className: 'ms-checkout-gift-card__list'\r\n };\r\n\r\n const list = giftCards.map(giftCard =>\r\n getItem({\r\n canRemove,\r\n getFormattedPrice,\r\n giftCard,\r\n onRemoveGiftCard,\r\n resources\r\n })\r\n );\r\n\r\n return {\r\n listProps,\r\n list\r\n };\r\n};\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport * as React from 'react';\r\n\r\ninterface IGiftCardTitleProps {\r\n title: string;\r\n}\r\n\r\nconst GiftCardTitle: React.FC = ({ title }) => ;\r\n\r\nexport default GiftCardTitle;\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 { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport { getGiftCardAsync, resolveCardTypesAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\r\nimport { CardTypeInfo, GiftCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\r\nimport classname from 'classnames';\r\nimport { computed, when } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { getForm, IForm } from './components/get-form';\r\nimport { getList, IList } from './components/get-list';\r\nimport TitleCompoent from './components/title';\r\nimport { ISmweCheckoutGiftCardData } from './smwe-checkout-gift-card.data';\r\nimport { ISmweCheckoutGiftCardProps } from './smwe-checkout-gift-card.props.autogenerated';\r\n\r\nexport * from './components/get-form';\r\nexport * from './components/get-item';\r\nexport * from './components/get-list';\r\n\r\ninterface ICheckoutGiftCardState {\r\n isFetchingGiftCard: boolean;\r\n errorMessage: string;\r\n giftCardNumber: string;\r\n giftCardPin: string;\r\n giftCardExp: string;\r\n}\r\n\r\nexport interface ICheckoutGiftCardModuleProps extends ISmweCheckoutGiftCardProps, IModuleStateProps {}\r\n\r\nexport interface IShowResource {\r\n title: React.ReactNode;\r\n list?: IList;\r\n}\r\n\r\nexport interface IAddResource {\r\n form: IForm;\r\n list?: IList;\r\n}\r\n\r\nexport interface ICheckoutGiftCardViewProps extends ISmweCheckoutGiftCardProps<{}>, ICheckoutGiftCardState {\r\n className?: string;\r\n\r\n showGiftCard?: IShowResource;\r\n addGiftCard?: IAddResource;\r\n\r\n checkoutGiftCardProps: IModuleProps;\r\n couldPaidByGiftCard?: boolean;\r\n isEnabled?: boolean;\r\n onEdit?(): void;\r\n onCancel?(): void;\r\n onSubmit?(): void;\r\n enterGiftCardNumber?(giftCardNumber: string): void;\r\n enterGiftCardPin?(giftCardNumber: string): void;\r\n enterGiftCardExp?(giftCardNumber: string): void;\r\n removeGiftCard?(giftCardNumber: string): void;\r\n applyGiftCard?(): void;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutGiftCard component\r\n * @extends {React.Component, ICheckoutGiftCardState>}\r\n */\r\n@observer\r\nexport class CheckoutGiftCard extends React.Component {\r\n public state: ICheckoutGiftCardState = {\r\n isFetchingGiftCard: false,\r\n errorMessage: '',\r\n giftCardNumber: '',\r\n giftCardPin: '',\r\n giftCardExp: ''\r\n };\r\n\r\n private inputRef: React.RefObject = React.createRef();\r\n\r\n private inputPinRef: React.RefObject = React.createRef();\r\n\r\n private inputExpRef: React.RefObject = React.createRef();\r\n\r\n @computed get isDataReady(): boolean {\r\n return (this.props.data.checkout.result && this.props.data.checkout.status) === 'SUCCESS';\r\n }\r\n\r\n @computed get getLoyaltyAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState || !checkoutState.loyaltyAmount) {\r\n return 0;\r\n }\r\n return checkoutState.loyaltyAmount;\r\n }\r\n\r\n @computed get shouldPayGiftCard(): boolean {\r\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\r\n if (!cart) {\r\n return false;\r\n }\r\n // Use gift card card when loyalty points do not cover the total amount\r\n const amountDue = (cart.TotalAmount || 0) - this.getLoyaltyAmount;\r\n return amountDue > 0;\r\n }\r\n\r\n @computed get hasSelectedItem(): boolean {\r\n const {\r\n data: { checkout }\r\n } = this.props;\r\n const giftCards = checkout.result && checkout.result.giftCardExtends;\r\n return !!giftCards && giftCards.length > 0;\r\n }\r\n\r\n public componentDidMount(): void {\r\n // @ts-ignore: Compiler not reconizing condition check for function params\r\n when(\r\n () => this.isDataReady,\r\n () => {\r\n this.init();\r\n }\r\n );\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n moduleState: { isReady },\r\n data: { checkout },\r\n config: { className, showAdditionalFields },\r\n resources\r\n } = this.props;\r\n const { errorMessage, giftCardNumber, giftCardPin, giftCardExp } = this.state;\r\n const giftCards = checkout.result && checkout.result.giftCardExtends;\r\n const additionalFields = showAdditionalFields;\r\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\r\n\r\n if (!this.isEnabled() || (!this.shouldPayGiftCard && !isReady)) {\r\n return null;\r\n }\r\n\r\n const supportExternalGiftCard = supportedGiftCardType === 'internal' ? false : true;\r\n\r\n const moduleClassName = classname('ms-checkout-gift-card', className, isReady ? 'show' : 'add');\r\n\r\n const viewProps: ICheckoutGiftCardViewProps = {\r\n ...this.props,\r\n ...this.state,\r\n className: moduleClassName,\r\n\r\n checkoutGiftCardProps: { moduleProps: this.props, className: moduleClassName },\r\n couldPaidByGiftCard: this.couldPaidByGiftCard(),\r\n isEnabled: this.isEnabled(),\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onSubmit: this.onSubmit,\r\n enterGiftCardNumber: this.enterGiftCardNumber,\r\n enterGiftCardPin: this.enterGiftCardPin,\r\n enterGiftCardExp: this.enterGiftCardExp,\r\n removeGiftCard: this.removeGiftCard,\r\n applyGiftCard: this.applyGiftCard,\r\n showGiftCard: isReady\r\n ? {\r\n title: ,\r\n list: getList({\r\n canRemove: false,\r\n getFormattedPrice: this.getFormattedPrice,\r\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\r\n onRemoveGiftCard: this.removeGiftCard,\r\n resources\r\n })\r\n }\r\n : undefined,\r\n addGiftCard: !isReady\r\n ? {\r\n form: getForm({\r\n errorMessage,\r\n giftCardNumber,\r\n giftCardPin,\r\n giftCardExp,\r\n inputRef: this.inputRef,\r\n inputPinRef: this.inputPinRef,\r\n inputExpRef: this.inputExpRef,\r\n resources,\r\n onEnterGiftCardNumber: this.enterGiftCardNumber,\r\n onEnterGiftCardPin: this.enterGiftCardPin,\r\n onEnterGiftCardExp: this.enterGiftCardExp,\r\n onApplyGiftCard: this.applyGiftCard,\r\n supportExternalGiftCard,\r\n additionalFields\r\n }),\r\n list: getList({\r\n canRemove: true,\r\n getFormattedPrice: this.getFormattedPrice,\r\n giftCards: giftCards && [...giftCards], // Note: ReadOnly Checkout State GiftCard[] is not assignable to GiftCard[] type\r\n onRemoveGiftCard: this.removeGiftCard,\r\n resources\r\n })\r\n }\r\n : undefined\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private init = (): void => {\r\n this.props.moduleState.init({\r\n onEdit: this.onEdit,\r\n onCancel: this.onCancel,\r\n onSubmit: this.onSubmit,\r\n isRequired: false,\r\n ...(!this.isEnabled() && { status: 'disabled' })\r\n });\r\n };\r\n\r\n private couldPaidByGiftCard = (): boolean => {\r\n const cart = this.props.data.checkout.result ? this.props.data.checkout.result.checkoutCart.cart : undefined;\r\n if (!cart) {\r\n return false;\r\n }\r\n // Use gift card when it is not free\r\n return (cart.TotalAmount || 0) > 0;\r\n };\r\n\r\n private isEnabled = (): boolean => {\r\n if (!this.props.context.request.user.isAuthenticated && this.props.context.app.config.giftCardSupported !== 'external') {\r\n return false;\r\n }\r\n return this.couldPaidByGiftCard();\r\n };\r\n\r\n private onEdit = (): void => {\r\n // Show add gift card form\r\n this.props.moduleState.onUpdating();\r\n };\r\n\r\n private onCancel = (): void => {\r\n this.handleCancelOrSubmit();\r\n };\r\n\r\n private onSubmit = (): void => {\r\n this.handleCancelOrSubmit();\r\n };\r\n\r\n private handleCancelOrSubmit = () => {\r\n if (this.hasSelectedItem) {\r\n // Show summary screen\r\n this.props.moduleState.onReady();\r\n } else {\r\n // Skip the module\r\n this.props.moduleState.onSkip();\r\n }\r\n };\r\n\r\n private getFormattedPrice = (price: number = 0, currencyCode: string = 'USD'): string => {\r\n return this.props.context.cultureFormatter.formatCurrency(price, currencyCode);\r\n };\r\n\r\n private enterGiftCardNumber = (giftCardNumber: string): void => {\r\n this.setState({\r\n giftCardNumber\r\n });\r\n this.clearError();\r\n };\r\n\r\n private enterGiftCardPin = (giftCardPin: string): void => {\r\n this.setState({\r\n giftCardPin\r\n });\r\n this.clearError();\r\n };\r\n\r\n private enterGiftCardExp = (giftCardExp: string): void => {\r\n this.setState({\r\n giftCardExp\r\n });\r\n this.clearError();\r\n };\r\n\r\n private setError = (errorMessage: string): void => {\r\n this.props.telemetry.error('Error', errorMessage);\r\n this.props.moduleState.setHasError(true);\r\n this.setState({\r\n errorMessage\r\n });\r\n };\r\n\r\n private clearError = (): void => {\r\n this.props.moduleState.setHasError(false);\r\n this.setState({\r\n errorMessage: ''\r\n });\r\n };\r\n\r\n private removeGiftCard = async (giftCardNumber: string): Promise => {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState) {\r\n return;\r\n }\r\n\r\n await checkoutState.removeGiftCardExtend({ giftCardNumber });\r\n };\r\n\r\n private applyGiftCard = async (): Promise => {\r\n if (this.state.isFetchingGiftCard) {\r\n return;\r\n }\r\n this.setState({\r\n isFetchingGiftCard: true\r\n });\r\n\r\n const checkoutState = this.props.data.checkout.result;\r\n const giftCardNumber = this.state.giftCardNumber.trim();\r\n const giftCardPin = this.state.giftCardPin.trim();\r\n const giftCardExp = this.state.giftCardExp.trim();\r\n\r\n const giftCardTypes = await this.getGiftCardTypes(giftCardNumber);\r\n const giftCardType = giftCardTypes && giftCardTypes[0];\r\n const isPinRequired = giftCardType && giftCardType.IsPinRequired;\r\n const isExpRequired = giftCardType && giftCardType.IsExpirationDateRequired;\r\n const tenderTypeId = giftCardType && giftCardType.PaymentMethodId;\r\n const giftCard = await this.getGiftCard(giftCardNumber, giftCardPin, giftCardExp, isPinRequired, isExpRequired, tenderTypeId);\r\n\r\n const giftCardExtend: IGiftCardExtend = { Pin: giftCardPin, ExpirationDate: giftCardExp, TenderTypeId: tenderTypeId, ...giftCard};\r\n if (checkoutState && giftCard) {\r\n await checkoutState.addGiftCardExtend({ giftCard: giftCardExtend });\r\n this.clearError();\r\n this.setState({\r\n giftCardNumber: '',\r\n giftCardPin: '',\r\n giftCardExp: '',\r\n isFetchingGiftCard: false\r\n });\r\n return Promise.resolve();\r\n } else {\r\n const input =\r\n this.inputRef && this.inputRef.current && this.inputRef.current.focus && (this.inputRef.current as HTMLElement);\r\n input && input.focus();\r\n this.setState({\r\n isFetchingGiftCard: false\r\n });\r\n }\r\n };\r\n\r\n private getGiftCard = async (giftCardNumber: string, giftCardPin: string, giftCardExp: string, isPinRequired: boolean | undefined, isExpRequired: boolean | undefined, tenderTypeId: string | undefined): Promise => {\r\n const {\r\n resources: { invalidCardInfoError, invalidCardTypeError, noCardPinError, noCardExpError }\r\n } = this.props;\r\n\r\n const supportedGiftCardType = this.props.context.app.config.giftCardSupported;\r\n\r\n if (!tenderTypeId) {\r\n return undefined;\r\n }\r\n\r\n switch (supportedGiftCardType) {\r\n case undefined:\r\n case 'internal':\r\n if (tenderTypeId !== '13' && tenderTypeId !== '4') {\r\n this.setError(invalidCardTypeError);\r\n return undefined;\r\n }\r\n break;\r\n case 'external':\r\n if (tenderTypeId !== '12') {\r\n this.setError(invalidCardTypeError);\r\n return undefined;\r\n }\r\n break;\r\n case 'both':\r\n if (tenderTypeId !== '12' && tenderTypeId !== '13' && tenderTypeId !== '4') {\r\n this.setError(invalidCardTypeError);\r\n return undefined;\r\n }\r\n break;\r\n default:\r\n }\r\n\r\n if (isPinRequired && giftCardPin === '') {\r\n this.setError(noCardPinError);\r\n return undefined;\r\n }\r\n\r\n if (isExpRequired && giftCardExp === '') {\r\n this.setError(noCardExpError);\r\n return undefined;\r\n }\r\n\r\n const month = parseInt(giftCardExp.split('/')[0], 10);\r\n const year = parseInt(giftCardExp.split('/')[1], 10);\r\n\r\n return getGiftCardAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, tenderTypeId, giftCardPin, month, year)\r\n .then(activeGiftCard => {\r\n // if (!activeGiftCard.Balance || activeGiftCard.Balance === 0) {\r\n // this.setError(noBalanceError);\r\n // return;\r\n // }\r\n return activeGiftCard;\r\n })\r\n .catch(error => {\r\n this.setError(invalidCardInfoError);\r\n return undefined;\r\n });\r\n };\r\n\r\n private getGiftCardTypes = async (giftCardNumber: string): Promise => {\r\n const {\r\n resources: { emptyInputError, duplicatedCodeError, invalidCodeError },\r\n data: { checkout }\r\n } = this.props;\r\n\r\n if (!giftCardNumber) {\r\n this.setError(emptyInputError);\r\n return undefined;\r\n }\r\n\r\n const isDuplicated = checkout.result && checkout.result.giftCardExtends.some((card: GiftCard) => card.Id === giftCardNumber);\r\n if (isDuplicated) {\r\n this.setError(duplicatedCodeError);\r\n return undefined;\r\n }\r\n\r\n const GIFTCARDTYPE = 7;\r\n return resolveCardTypesAsync({ callerContext: this.props.context.actionContext }, giftCardNumber, GIFTCARDTYPE)\r\n .then(giftCardTypes => {\r\n if (!giftCardTypes || giftCardTypes.length === 0 || giftCardTypes[0] === undefined) {\r\n this.setError(invalidCodeError);\r\n return ;\r\n }\r\n return giftCardTypes;\r\n })\r\n .catch(error => {\r\n this.setError(invalidCodeError);\r\n return undefined;\r\n });\r\n };\r\n}\r\n\r\nexport default withModuleState(CheckoutGiftCard);\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IAddResource, ICheckoutGiftCardViewProps, IForm, IItem, IList, IShowResource } from './smwe-checkout-gift-card';\r\n\r\nexport const From: React.FC = ({ formProps, label, inputPinLabel, inputExpLabel, alert, inputProps, inputNumProps,\r\n inputPinProps, inputExpProps, inputNumber, inputPin, inputExp, applyButton, supportExternalGiftCard, showGiftCardPinInput, showGiftCardExpInput, alertFieldLabel }) => (\r\n \r\n {alert}\r\n {supportExternalGiftCard ?\r\n \r\n \r\n {label}\r\n {inputNumber}\r\n \r\n {showGiftCardPinInput &&\r\n \r\n {inputPinLabel}\r\n {inputPin}\r\n \r\n }\r\n {showGiftCardExpInput &&\r\n \r\n {inputExpLabel}\r\n {inputExp}\r\n \r\n }\r\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\r\n \r\n : <>{label}{inputNumber}\r\n }\r\n {applyButton}\r\n \r\n);\r\n\r\nexport const SelectedGiftCard: React.FC = ({ itemProps, selectedGiftCard, removeButton }) => (\r\n \r\n {selectedGiftCard}\r\n {removeButton}\r\n \r\n);\r\n\r\nexport const GiftCardList: React.FC = ({ listProps, list }) => (\r\n \r\n {list.map(({ id, ...item }) => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nexport const AddResource: React.FC = ({ form, list }) => (\r\n <>\r\n {form && }\r\n {list && }\r\n \r\n);\r\n\r\nexport const ShowResource: React.FC = ({ title, list }) => (\r\n <>\r\n {title}\r\n {list && }\r\n \r\n);\r\n\r\nconst CheckoutGiftCardView: React.FC = props => {\r\n const { checkoutGiftCardProps, showGiftCard, addGiftCard } = props;\r\n return (\r\n \r\n {showGiftCard && }\r\n {addGiftCard && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutGiftCardView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as React from 'react';\r\n\r\nconst Loading: React.FC = () =>
;\r\n\r\nexport default Loading;\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 { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classname from 'classnames';\r\nimport get from 'lodash/get';\r\nimport { computed, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { ISmweCheckoutSectionContainerData } from './smwe-checkout-section-container.data';\r\nimport { ISmweCheckoutSectionContainerProps } from './smwe-checkout-section-container.props.autogenerated';\r\nimport LoadingComponent from './components/loading';\r\n\r\n/**\r\n * ICheckoutSectionContainerModuleProps interface.\r\n */\r\nexport interface ICheckoutSectionContainerModuleProps\r\n extends ISmweCheckoutSectionContainerProps,\r\n IModuleStateProps {\r\n enableControl: boolean;\r\n}\r\n\r\ninterface ICheckoutSectionContainerState {\r\n isCollapse?: boolean;\r\n}\r\n\r\nexport interface ICheckoutSectionContainerItem {\r\n id: string;\r\n loading?: React.ReactNode;\r\n itemProps: INodeProps;\r\n item: React.ReactNode;\r\n}\r\n\r\nexport interface ICheckoutSectionContainerViewProps extends ISmweCheckoutSectionContainerProps<{}> {\r\n className: string;\r\n checkoutPlainContainerProps: IModuleProps;\r\n items: ICheckoutSectionContainerItem[];\r\n}\r\n\r\nconst paymentInstrumentModuleId = 'payment-instrument';\r\n\r\nconst zeroAmount = 0;\r\n\r\n/**\r\n *\r\n * CheckoutPlainContainer component.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nexport class CheckoutPlainContainer extends React.Component {\r\n @computed public get amountDue(): number {\r\n const {\r\n data: { checkout }\r\n } = this.props;\r\n if (!checkout?.result) {\r\n return 0;\r\n }\r\n\r\n const checkoutResult = checkout.result;\r\n const cart = checkoutResult.checkoutCart?.cart;\r\n if (!cart || !cart.CartLines || !ArrayExtensions.hasElements(cart.CartLines)) {\r\n return 0;\r\n }\r\n\r\n return cart.TotalAmount ?? zeroAmount;\r\n }\r\n\r\n public constructor(props: ICheckoutSectionContainerModuleProps) {\r\n super(props);\r\n this.state = { isCollapse: false };\r\n }\r\n\r\n public componentDidMount(): void {\r\n const items = this.getItems();\r\n const childIds = items.map((item: React.ReactNode) => get(item, 'props.id'));\r\n const shouldEnableSinglePaymentAuthorizationCheckout: boolean =\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\r\n\r\n this.props.moduleState.init({\r\n onEdit: this.onEdit,\r\n onCancel: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onCancel,\r\n onSubmit: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onSubmit,\r\n childIds\r\n });\r\n\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n () => {\r\n this.onContainerReady();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.moduleState.shouldSubmitContainer,\r\n () => {\r\n this.onSubmit();\r\n }\r\n );\r\n\r\n // Reaction to collapse the payment section for new checkout flow.\r\n reaction(\r\n () => this.props.data.checkout.result?.shouldCollapsePaymentSection,\r\n shouldCollapsePaymentSection => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\r\n this.setState({ isCollapse: shouldCollapsePaymentSection });\r\n }\r\n }\r\n );\r\n\r\n // Reaction to submit section container for new checkout flow\r\n reaction(\r\n () => this.props.data.checkout.result?.shouldTriggerPaymentWithPlaceOrder,\r\n () => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\r\n this.onSubmit();\r\n }\r\n }\r\n );\r\n\r\n // Reaction to set isPaymentSectionContainerReady for new checkout flow.\r\n reaction(\r\n () => this.props.moduleState.isReady,\r\n async isReady => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer && this.amountDue > zeroAmount) {\r\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\r\n newIsPaymentSectionContainerReady: isReady\r\n });\r\n }\r\n }\r\n );\r\n\r\n // Reaction to set isPaymentSectionContainerHasError for new checkout flow.\r\n reaction(\r\n () => this.props.moduleState.hasError,\r\n async hasError => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\r\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerHasError({\r\n newIsPaymentSectionContainerHasError: hasError\r\n });\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result?.isCheckoutCallFailed,\r\n async () => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n if (isPaymentSectionContainer && this.props.data.checkout.result?.isCheckoutCallFailed) {\r\n this.onEdit();\r\n await this.props.data.checkout.result.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\r\n }\r\n }\r\n );\r\n }\r\n\r\n public componentDidUpdate(): void {\r\n if (!this.props.moduleState.hasExternalSubmitGroup) {\r\n return;\r\n }\r\n\r\n /**\r\n * Review all modules to updating status if one of the modules has error.\r\n */\r\n const { childIds, hasError, getModule } = this.props.moduleState;\r\n const hasReadyOrSkippedItems = childIds.some((childId: string) => {\r\n const state = getModule(childId);\r\n return !!state && (state.isReady || state.isSkipped);\r\n });\r\n if (hasReadyOrSkippedItems && hasError) {\r\n this.onEdit();\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: ICheckoutSectionContainerModuleProps, nextState: ICheckoutSectionContainerState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const {\r\n enableControl,\r\n moduleState,\r\n config: { width }\r\n } = this.props;\r\n\r\n const items = this.getItems();\r\n if (items.length === 0) {\r\n this.props.context.telemetry.error('Checkout section content is empty, module wont render');\r\n return null;\r\n }\r\n\r\n const moduleClassName = classname(\r\n 'ms-checkout-section-container',\r\n {\r\n 'has-initialized': moduleState.hasInitialized,\r\n 'is-ready': moduleState.isReady,\r\n 'is-updating': !moduleState.isReady,\r\n container: width === 'container',\r\n 'col-12 fullwidth': width === 'fluid'\r\n },\r\n this.props.config.className\r\n );\r\n\r\n const viewProps: ICheckoutSectionContainerViewProps = {\r\n ...this.props,\r\n\r\n className: moduleClassName,\r\n checkoutPlainContainerProps: {\r\n moduleProps: this.props,\r\n className: moduleClassName\r\n },\r\n items: items.map((item: React.ReactNode) => {\r\n const childId = get(item, 'props.id');\r\n const state = moduleState.getModule(childId);\r\n\r\n // Modules has not completed initializing or it's disable\r\n const hidden =\r\n this.state.isCollapse || (state.hasModuleState && (!state.hasInitialized || state.isDisabled || state.isSkipped));\r\n return {\r\n id: childId,\r\n loading: state.hasModuleState && !state.hasInitialized && ,\r\n itemProps: {\r\n 'data-type-name': state.typeName,\r\n className: classname('ms-checkout-section-container__item', {\r\n hidden,\r\n initialized: state.hasInitialized,\r\n disabled: state.isDisabled,\r\n skipped: state.isSkipped,\r\n ready: state.isReady,\r\n updating: state.isUpdating,\r\n pending: state.isPending\r\n })\r\n },\r\n item: React.cloneElement(item as React.ReactElement, { enableControl })\r\n };\r\n })\r\n };\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private readonly getItems = (): React.ReactNode[] => {\r\n const { slots } = this.props;\r\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\r\n };\r\n\r\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\r\n const { childIds, getModule } = this.props.moduleState;\r\n return childIds\r\n .map(getModule)\r\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\r\n };\r\n\r\n private readonly clearError = (): void => {\r\n // Clear error before action, otherwise it will rise conflict;\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.hasError && state.setHasError(false);\r\n });\r\n };\r\n\r\n private readonly onSubmit = (): void => {\r\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\r\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\r\n );\r\n\r\n this.props.telemetry.information('Section container onSubmit is called.');\r\n\r\n this.clearError();\r\n this.getActiveChildModuleStates().forEach(state => {\r\n !state.isReady && state.onSubmit && state.onSubmit();\r\n });\r\n\r\n // Handle when the amount due is zero\r\n if (\r\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\r\n isPaymentSectionContainer &&\r\n this.amountDue === zeroAmount\r\n ) {\r\n this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\r\n newIsPaymentSectionContainerReady: true\r\n });\r\n }\r\n };\r\n\r\n private readonly onCancel = (): void => {\r\n this.props.telemetry.information('Section container onCancel is called.');\r\n\r\n this.clearError();\r\n this.getActiveChildModuleStates().forEach(state => {\r\n !state.isReady && state.onCancel && state.onCancel();\r\n });\r\n };\r\n\r\n private readonly onEdit = (): void => {\r\n this.props.telemetry.information('Section container onEdit is called.');\r\n\r\n this.getActiveChildModuleStates().forEach(state => {\r\n (state.isReady || state.isSkipped) && state.onEdit && state.onEdit();\r\n });\r\n };\r\n\r\n private readonly onContainerReady = (): void => {\r\n this.props.telemetry.information('Section container onContainerReady is called.');\r\n\r\n this.getActiveChildModuleStates().forEach(state => {\r\n state.isReady && state.onContainerReady && state.onContainerReady();\r\n });\r\n };\r\n}\r\n\r\nexport default withModuleState(CheckoutPlainContainer);\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutSectionContainerItem, ICheckoutSectionContainerViewProps } from './smwe-checkout-section-container';\r\n\r\nconst ItemComponent: React.FC = ({ loading, itemProps, item }) => (\r\n <>\r\n {loading}\r\n {item}\r\n \r\n);\r\n\r\nconst CheckoutSectionContainerView: React.FC = ({ checkoutPlainContainerProps, items }) => (\r\n \r\n {items.map(item => (\r\n \r\n ))}\r\n \r\n);\r\n\r\nexport default CheckoutSectionContainerView;\r\n","export const apiToken: string = 'cd6dd0b2c43c360ae4d59b5147d52fd3';","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { apiToken } from './get-wine-api-token';\r\n\r\n/**\r\n * Class Definition for constructing the wine location query\r\n */\r\nexport class GetWineFilterable extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n public queryFilters: Filters;\r\n\r\n private readonly _token: string = apiToken;\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n constructor(filters: Filters) {\r\n super({\r\n dataCacheType: 'request',\r\n cacheObjectType: 'IGetWineLocationData',\r\n cacheKey: JSON.stringify(filters)\r\n });\r\n this.queryFilters = filters;\r\n return this;\r\n }\r\n\r\n get token(): string {\r\n return this._token;\r\n }\r\n\r\n /**\r\n * generates an http styled query string to append to the end of a url\r\n *\r\n * @returns http query string\r\n */\r\n public filtersToHTTPQueryString(): string {\r\n let queryString = '';\r\n Object.keys(this.queryFilters).forEach(queryKey => {\r\n const queryValue = this.queryFilters[queryKey];\r\n queryString += `${queryKey}=${queryValue}&`;\r\n });\r\n queryString = queryString.substr(0, queryString.length - 1);\r\n return (queryString.length > 0) ? `?${queryString}` : '';\r\n }\r\n}","/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nexport class WineMapper {\r\n protected _input: Input;\r\n constructor(input: Input) {\r\n this._input = input;\r\n }\r\n\r\n protected _applyMap(\r\n inputData: data,\r\n inputMap: map\r\n ): T {\r\n const mappedOutput = {};\r\n Object.keys(inputMap).forEach(key => {\r\n mappedOutput[key] = inputData[inputMap[key]];\r\n });\r\n return mappedOutput;\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n/**\r\n * GetWineInternationalLocation Input Action\r\n */\r\n\r\nexport class GetWineInternationalLocationInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com';\r\n\r\n public get url(): string {\r\n const { brand_code, country } = this.queryFilters;\r\n\r\n const fullUrl = `${this._url}/v1/${brand_code}/distributors?country=${country}`;\r\n if (!brand_code) {\r\n console.error('Brand Code is not declared. This is required for the module to do calls');\r\n }\r\n return fullUrl;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// MAPPER\r\n// =============================================================================\r\n\r\nenum GetWineInternationalLocationMap {\r\n totalResults = 'total_results',\r\n totalPages = 'total_pages',\r\n page = 'page'\r\n}\r\n\r\nenum GetWineInternationalLocationDistributorMap {\r\n jdeDistributorNumber = 'jde_distributor_number',\r\n brandCode = 'brand_code',\r\n name = 'name',\r\n city = 'city',\r\n state = 'state',\r\n zip = 'zip',\r\n phone = 'phone',\r\n url = 'url'\r\n}\r\n\r\nenum GetWineInternationalLocationCountryMap {\r\n iso = 'iso',\r\n name = 'name',\r\n printableName = 'printable_name',\r\n iso3 = 'iso3',\r\n numCode = 'numcode'\r\n}\r\n\r\n/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nclass GetWineLocationInternationalMapper extends WineMapper {\r\n public get output(): IGetWineInternationalLocationOutput {\r\n const output: IGetWineInternationalLocationOutput = {\r\n data: [],\r\n totalPages: this._input[GetWineInternationalLocationMap.totalPages],\r\n totalResults: this._input[GetWineInternationalLocationMap.totalResults],\r\n page: this._input[GetWineInternationalLocationMap.page]\r\n };\r\n\r\n this._input.distributors.forEach(distributor => {\r\n const distributorOutput =\r\n this._applyMap(distributor, GetWineInternationalLocationDistributorMap);\r\n distributorOutput.country =\r\n this._applyMap(distributor.country, GetWineInternationalLocationCountryMap);\r\n output.data.push(distributorOutput);\r\n });\r\n return output;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// INTERFACES\r\n// =============================================================================\r\n\r\nexport interface IGetWineInternationalQueryFilters {\r\n brand_code?: string;\r\n country: string;\r\n pagination?: boolean;\r\n page?: number;\r\n per_page?: number;\r\n}\r\n\r\n// =============================================================================\r\n// OUTPUT INTERFACES\r\n// =============================================================================\r\n\r\nexport interface IGetWineInternationalLocationOutput {\r\n totalResults: number;\r\n totalPages: number;\r\n page: number;\r\n data: IGetWineInternationalDistributorOuput[];\r\n}\r\n\r\nexport interface IGetWineInternationalDistributorOuput {\r\n jdeDistributorNumber: number;\r\n brandCode: string;\r\n name: string;\r\n city: string;\r\n state: string;\r\n country: IGetWineInternationalDistributorCountryOutput;\r\n zip: string;\r\n phone: string;\r\n url: string;\r\n}\r\n\r\ninterface IGetWineInternationalDistributorCountryOutput {\r\n iso: string;\r\n name: string;\r\n printableName: string;\r\n iso3: string;\r\n numCode: number;\r\n}\r\n\r\n// =============================================================================\r\n// INPUT INTERFACES\r\n// =============================================================================\r\n\r\ninterface IGetWineInternationalLocationInput {\r\n total_results: number;\r\n total_pages: number;\r\n distributors: IGetWineInternationalDistributorInput[];\r\n}\r\n\r\ninterface IGetWineInternationalDistributorInput {\r\n jde_distributor_number: number;\r\n brand_code: string;\r\n name: string;\r\n city: string;\r\n state: string;\r\n country: IGetWineInternationalDistributorCountryInput;\r\n zip: string;\r\n phone: string;\r\n url: string;\r\n}\r\n\r\ninterface IGetWineInternationalDistributorCountryInput {\r\n iso: string;\r\n name: string;\r\n printable_name: string;\r\n iso3: string;\r\n numcode: number;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the API call\r\n */\r\nconst createWineInternationalLocationInput =\r\n (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) {\r\n throw new Error(`[createWineInternationalLocationInput] configuration was invalid: ${args.config}`);\r\n }\r\n return new GetWineInternationalLocationInput(args.config);\r\n };\r\n\r\n/**\r\n * TODO: Use this function to call your API and process the results as needed\r\n */\r\nasync function action(input: GetWineInternationalLocationInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineLocationInternationalMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createWineInternationalLocationInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n// =============================================================================\r\n// API CONSTRUCTION\r\n// =============================================================================\r\n/**\r\n * Class Definition for constructing the wine location query\r\n */\r\nexport class GetWineLocationInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com/v1/XXX/retailers';\r\n\r\n get url(): string {\r\n return this._url;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// API MAPPER\r\n// =============================================================================\r\n\r\nenum GetWineLocationMap {\r\n totalResults = 'total_results',\r\n totalPages = 'total_pages',\r\n page = 'page'\r\n}\r\n\r\nenum GetWineLocationRetailerMap {\r\n code = 'code',\r\n name = 'name',\r\n address = 'address',\r\n city = 'city',\r\n state = 'state',\r\n zip = 'zip',\r\n lon = 'lon',\r\n lat = 'lat',\r\n onPremise = 'on_premise',\r\n distance = 'distance'\r\n}\r\n\r\nenum GetWineLocationProductMap {\r\n productKey = 'product_key',\r\n brandCode = 'brand_code',\r\n productCode = 'product_code',\r\n description = 'description',\r\n}\r\n\r\n/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nclass GetWineLocationMapper extends WineMapper {\r\n public get output(): IGetWineLocationDataOutput {\r\n const output: IGetWineLocationDataOutput = {\r\n data: [],\r\n totalPages: this._input[GetWineLocationMap.totalPages],\r\n totalResults: this._input[GetWineLocationMap.totalResults],\r\n page: this._input[GetWineLocationMap.page]\r\n };\r\n\r\n this._input.retailers.forEach(retailer => {\r\n const retailerProducts: IGetWineLocationProductOutput[] = [];\r\n const mappedRetailer =\r\n this._applyMap(retailer, GetWineLocationRetailerMap);\r\n mappedRetailer.products = retailerProducts;\r\n output.data.push(mappedRetailer);\r\n\r\n retailer.products.forEach(product => {\r\n retailerProducts.push(\r\n this._applyMap(product, GetWineLocationProductMap)\r\n );\r\n });\r\n });\r\n\r\n return output;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// WINE LOCATION INTERFACE OUTPUT\r\n// =============================================================================\r\n\r\nexport interface IGetWineLocationDataOutput {\r\n 'totalResults': number;\r\n 'totalPages': number;\r\n 'page': number;\r\n 'data': IGetWineLocationRetailerOutput[];\r\n}\r\n\r\nexport interface IGetWineLocationRetailerOutput {\r\n 'code': number;\r\n 'name': string;\r\n 'address': string;\r\n 'city': string;\r\n 'state': string;\r\n 'zip': string;\r\n 'lon': number;\r\n 'lat': number;\r\n 'onPremise': boolean;\r\n 'distance': number;\r\n 'products': IGetWineLocationProductOutput[];\r\n}\r\n\r\nexport interface IGetWineLocationProductOutput {\r\n 'productKey': string;\r\n 'brandCode': string;\r\n 'productCode': string;\r\n 'description': string;\r\n}\r\n\r\n// =============================================================================\r\n// WINE LOCATION INTERFACE INPUT\r\n// =============================================================================\r\n\r\ninterface IGetWineLocationDataInput {\r\n 'total_results': number;\r\n 'total_pages': number;\r\n 'page': number;\r\n 'retailers': IGetWineLocationRetailerInput[];\r\n}\r\n\r\ninterface IGetWineLocationRetailerInput {\r\n 'code': number;\r\n 'name': string;\r\n 'address': string;\r\n 'city': string;\r\n 'state': string;\r\n 'zip': string;\r\n 'lon': number;\r\n 'lat': number;\r\n 'on_premise': boolean;\r\n 'distance': number;\r\n 'products': IGetWineLocationProductInput[];\r\n}\r\n\r\ninterface IGetWineLocationProductInput {\r\n 'product_key': string;\r\n 'brand_code': string;\r\n 'product_code': string;\r\n 'description': string;\r\n}\r\n\r\n/**\r\n * query filter definition\r\n */\r\nexport interface IGetWineLocationQueryFilters {\r\n product?: string;\r\n brand?: string;\r\n radius?: number;\r\n pagination?: boolean;\r\n page?: number;\r\n per_page?: number;\r\n on_premise?: boolean;\r\n location: string;\r\n}\r\n\r\n// =============================================================================\r\n// CREATE INPUT\r\n// =============================================================================\r\n/**\r\n * constructs a wine location query and returns it to the action\r\n */\r\nconst createWineLocationInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) { throw new Error(`[createWineLocationInput] configuration was invalid: ${args.config}`); }\r\n return new GetWineLocationInput(args.config);\r\n};\r\n\r\n// =============================================================================\r\n// RUN INPUT / ACTION\r\n// =============================================================================\r\n/**\r\n * api runner\r\n * @returns the location data\r\n */\r\nasync function getWineLocationAction(input: GetWineLocationInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // query request and return response full of locations to purchase wine\r\n const response = await Msdyn365.sendRequest(`${input.url}${input.filtersToHTTPQueryString()}`, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineLocationMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >getWineLocationAction,\r\n input: createWineLocationInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\n\r\n/**\r\n * query filter definition\r\n */\r\nexport interface IGetWineProductQueryFilters {\r\n brand?: string;\r\n}\r\n\r\n/**\r\n * GetWineProducts Input Action\r\n */\r\n\r\nexport class GetWineProductsInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com';\r\n\r\n public get url(): string {\r\n const { brand } = this.queryFilters;\r\n\r\n const fullUrl = `${this._url}/v1/${brand}/products`;\r\n if (!brand) {\r\n console.error('Brand Code is not declared. This is required for the module to do calls');\r\n }\r\n return fullUrl;\r\n }\r\n}\r\n\r\nexport interface IGetWineProductsData {\r\n product_key: string;\r\n brand_code: string;\r\n product_code: string;\r\n description: string;\r\n}\r\n\r\nexport interface IGetWineCountriesDataOutput {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printableName: string;\r\n numCode: number;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) { throw new Error(`[createWineProductsInput] configuration was invalid: ${args.config}`); }\r\n return new GetWineProductsInput(args.config);\r\n};\r\n\r\n/**\r\n * action that retrieves the list of wine products\r\n */\r\nasync function action(input: GetWineProductsInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return response.data;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport type FindWineDropdownItem = { label: string | number; value: string | number };\r\n\r\ninterface IFindWineDropdownMenuProps {\r\n itemList: FindWineDropdownItem[];\r\n defaultValue?: string;\r\n id?: string;\r\n onChange(newItem: FindWineDropdownItem | undefined): unknown;\r\n}\r\n\r\n/**\r\n * class definition for creating a dropdown menu for the wine page\r\n */\r\n@observer\r\nexport class FindWineDropdownMenu extends React.Component {\r\n\r\n /**\r\n * field representation on the current value of what is selected\r\n */\r\n @observable private _value: string = this.props.defaultValue || '';\r\n public constructor(props: IFindWineDropdownMenuProps) {\r\n super(props);\r\n\r\n this._handleOnChange = this._handleOnChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n let items = this._constructItems();\r\n if (!this._value) {\r\n items = [\r\n (\r\n \r\n {'Select Country'}\r\n \r\n )\r\n , ...items];\r\n }\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * handles for changing selection\r\n *\r\n * @param event change event\r\n */\r\n private _handleOnChange(event: React.ChangeEvent): void {\r\n const newItem = this.props.itemList.find(item => event.target.value === item.value.toString());\r\n this._value = event.target.value;\r\n this.props.onChange(newItem);\r\n }\r\n\r\n /**\r\n * constructs a list of JSX elements representing options for a select tag\r\n */\r\n private _constructItems(): JSX.Element[] {\r\n return this.props.itemList.map(\r\n (item, index) => {\r\n const isAriaSelected = item.value === this._value;\r\n return (\r\n \r\n {item.label}\r\n \r\n );\r\n }\r\n );\r\n }\r\n}","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IGetWineLocationQueryFilters } from './actions/get-wine-location';\r\nimport { IGetWineProductsData } from './actions/get-wine-products';\r\nimport { FindWineDropdownItem, FindWineDropdownMenu } from './wine-finder-dropdown-menu';\r\nimport { IPlaceholdersData, IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderQueryLocationProps {\r\n defaultRadius: number;\r\n resources: IWineFinderFormResources;\r\n displayFilters: boolean;\r\n placeholders?: IPlaceholdersData;\r\n config: IWineFinderFormConfig;\r\n products: IGetWineProductsData[] | undefined;\r\n active?: boolean;\r\n onQuerySearch(filters: IGetWineLocationQueryFilters): unknown;\r\n}\r\n\r\ninterface IWineFinderState{\r\n loading?:boolean;\r\n}\r\n\r\n/**\r\n * Class definition responsible for generating valid queries for getting wine\r\n */\r\n@observer\r\nclass WineFinderQueryLocation extends React.Component {\r\n\r\n // =========================================================================\r\n // OBSERVABLES AND FIELDS\r\n // =========================================================================\r\n\r\n /**\r\n * field representing the location being typed in by the user\r\n */\r\n @observable private _queryLocation: string = '';\r\n\r\n /**\r\n * field represneting the radius or furthest distance from the location\r\n * typed in by the user\r\n */\r\n @observable private _queryRadius: number = 5;\r\n\r\n @observable private _allowRetail: boolean = false;\r\n @observable private _allowRestaurant: boolean = false;\r\n\r\n /**\r\n * keeps the selected product in the wine product dropdownlist\r\n */\r\n @observable private _product: string = '';\r\n\r\n /**\r\n * list of choosable radii to select in dropdown menu\r\n */\r\n private _queryRadii: number[] = [5, 10, 20, 50];\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderQueryLocationProps) {\r\n super(props);\r\n this._handleQueryLocationChange = this._handleQueryLocationChange.bind(this);\r\n this._handleSearchRadiusChange = this._handleSearchRadiusChange.bind(this);\r\n this._toggleRetail = this._toggleRetail.bind(this);\r\n this._toggleRestaurant = this._toggleRestaurant.bind(this);\r\n this._doQuery = this._doQuery.bind(this);\r\n this._handleOnChange = this._handleOnChange.bind(this);\r\n\r\n this._allowRetail = !!props.config.defaultFilters?.retail;\r\n this._allowRestaurant = !!props.config.defaultFilters?.restaurant;\r\n this.state={\r\n loading: false\r\n };\r\n }\r\n\r\n public render(): JSX.Element {\r\n const itemList = this._queryRadii.map(radii => { return { label: radii, value: radii }; });\r\n const allowRadiiDisplay = this.props.defaultRadius === 0;\r\n const {\r\n resources: {\r\n wineFinder__domesticTitle,\r\n wineFinder__domesticSearchRadiusLabel,\r\n wineFinder__retailFilterText,\r\n wineFinder__restaurantFilterText\r\n }\r\n } = this.props;\r\n const { domesticSearch, enablePlaceholders } = this.props.placeholders || {};\r\n const isActive = this.props.active || false;\r\n\r\n const cssClass = isActive?'find-wine-query active':'find-wine-query';\r\n\r\n const onFormSubmit=(e: { preventDefault: any; })=>{\r\n e.preventDefault();\r\n this._doQuery();\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {wineFinder__domesticTitle &&

{wineFinder__domesticTitle}

}\r\n \r\n {enablePlaceholders ? domesticSearch : ''}\r\n \r\n \r\n {allowRadiiDisplay &&\r\n
\r\n \r\n {wineFinder__domesticSearchRadiusLabel}\r\n\r\n \r\n \r\n
\r\n }\r\n {this.props.config.showChooseWineInput && this._renderProductsDropdownList()}\r\n {\r\n (this.props.displayFilters && this._hasFilterActive) &&\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n \r\n
\r\n {(this._isInvalid() && this._queryLocation.length >= 5) &&
{'Zip Code is invalid'}
}\r\n {this.state.loading ?
Loading Results...
: ''}\r\n
\r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n /**\r\n * process to send the query with appropriate fields to the parent component\r\n */\r\n private _doQuery(): undefined {\r\n this.setState({loading: true});\r\n let queryRadius = this.props.defaultRadius;\r\n if (queryRadius === 0) {\r\n queryRadius = this._queryRadius;\r\n }\r\n\r\n const filters: IGetWineLocationQueryFilters = {\r\n location: this._queryLocation,\r\n radius: queryRadius,\r\n on_premise: this._allowRestaurant\r\n };\r\n\r\n // if both are checked or both are unchecked search for everything\r\n if (this._allowRestaurant === this._allowRetail) {\r\n delete filters.on_premise;\r\n }\r\n\r\n if (!this._hasFilterActive) {\r\n const { filterState } = this.props.config;\r\n\r\n // idea here is essentially the author has forced the premise type boolean\r\n // through the configuration state by disabling all adjustable filters. thats\r\n // why logic looks small\r\n filters.on_premise = !!filterState?.restaurantActive;\r\n\r\n // just to make sure that it returns everything if both are unchecked\r\n if (!filterState?.restaurantActive && !filterState?.retailActive) {\r\n delete filters.on_premise;\r\n }\r\n }\r\n\r\n if (this.props.config.showChooseWineInput && this._product) {\r\n filters.product = this._product;\r\n }\r\n\r\n this.props.onQuerySearch(filters);\r\n return undefined;\r\n }\r\n\r\n private get _hasFilterActive(): boolean {\r\n const { filterState } = this.props.config;\r\n return !!(filterState?.restaurantActive && filterState?.retailActive);\r\n }\r\n\r\n /**\r\n * handles changes for the radius\r\n */\r\n private _handleSearchRadiusChange(item: FindWineDropdownItem | undefined): void {\r\n if (item) {\r\n this._queryRadius = Number(item.value);\r\n }\r\n }\r\n\r\n private _toggleRetail(): void {\r\n this._allowRetail = !this._allowRetail;\r\n }\r\n\r\n private _toggleRestaurant(): void {\r\n this._allowRestaurant = !this._allowRestaurant;\r\n }\r\n\r\n /**\r\n * handles changes for the location entered\r\n */\r\n private _handleQueryLocationChange(event: React.ChangeEvent): void {\r\n this._queryLocation = event.target.value;\r\n return undefined;\r\n }\r\n\r\n private _isInvalid(): boolean {\r\n const regex = /^\\d{5}$/;\r\n return (!regex.test(this._queryLocation));\r\n }\r\n\r\n /**\r\n * Display a Wine products dropdownlist\r\n */\r\n private _renderProductsDropdownList(): JSX.Element {\r\n return(\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n /**\r\n * handles for changing selection on the wine products dropdownlist\r\n *\r\n * @param event change event\r\n */\r\n private _handleOnChange(event: React.ChangeEvent): void {\r\n this._product = event.target.value;\r\n }\r\n\r\n // Render dropdown options from array.\r\n private _renderProductOptions(): JSX.Element[] {\r\n const options: IGetWineProductsData[] | undefined = this.props.products ? this.props.products : [];\r\n return options.map((option, index) => {\r\n return (\r\n \r\n {option.description}\r\n \r\n );\r\n });\r\n }\r\n}\r\n\r\nexport default WineFinderQueryLocation;\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\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { apiToken } from './get-wine-api-token';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n/**\r\n * GetWineCountries Input Action\r\n */\r\n\r\nexport class GetWineCountriesInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n private readonly _url: string = 'https://api.smwe.com/v1/SLR/countries';\r\n\r\n private readonly _token: string = apiToken;\r\n\r\n constructor() {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'IGetWineCountriesData', cacheKey: 'SINGLE' });\r\n }\r\n\r\n public get url(): string { return this._url; }\r\n public get token(): string { return this._token; }\r\n}\r\n\r\nenum IGetWineCountriesMap {\r\n iso = 'iso',\r\n iso3 = 'iso3',\r\n name = 'name',\r\n printableName = 'printable_name',\r\n numCode = 'numcode'\r\n}\r\n\r\n/**\r\n * class definition for the output controller of the API\r\n */\r\nclass GetWineCountriesMapper extends WineMapper {\r\n public get output(): IGetWineCountriesDataOutput[] {\r\n return this._input.map(country => {\r\n return this._applyMap<\r\n IGetWineCountriesDataOutput,\r\n IGetWineCountriesData,\r\n typeof IGetWineCountriesMap\r\n >(country, IGetWineCountriesMap);\r\n });\r\n }\r\n}\r\n\r\nexport interface IGetWineCountriesData {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printable_name: string;\r\n numcode: number;\r\n}\r\n\r\nexport interface IGetWineCountriesDataOutput {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printableName: string;\r\n numCode: number;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetWineCountriesInput();\r\n};\r\n\r\n/**\r\n * action that retrieves the list of countries\r\n */\r\nasync function action(input: GetWineCountriesInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineCountriesMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport WineCountries, { GetWineCountriesInput, IGetWineCountriesDataOutput } from './actions/get-wine-countries';\r\nimport { IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport { FindWineDropdownItem, FindWineDropdownMenu } from './wine-finder-dropdown-menu';\r\nimport { IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderQueryLocationInternational {\r\n actionContext: IActionContext;\r\n resources: IWineFinderFormResources;\r\n submitText: string | undefined;\r\n active?: boolean;\r\n onQuerySearch(filters: IGetWineInternationalQueryFilters): unknown;\r\n}\r\n/**\r\n * class definition for the component responsible for querying internationally\r\n */\r\n@observer\r\nclass WineFinderQueryLocationInternational extends React.Component {\r\n\r\n /**\r\n * field representing the country key currently selected by the selector\r\n */\r\n @observable private _selectedCountry: string | undefined;\r\n\r\n @observable private _countries: IGetWineCountriesDataOutput[] = [];\r\n\r\n constructor(props: IWineFinderQueryLocationInternational) {\r\n super(props);\r\n\r\n this._handleCountrySelectionChange = this._handleCountrySelectionChange.bind(this);\r\n this._doQuery = this._doQuery.bind(this);\r\n\r\n }\r\n\r\n public componentDidMount(): void {\r\n this._queryCountries().catch(err => console.warn(err));\r\n }\r\n\r\n public render(): JSX.Element {\r\n const itemList = this._countries.map(country => {\r\n return {\r\n label: country.name,\r\n value: country.iso\r\n } as FindWineDropdownItem;\r\n });\r\n\r\n const {\r\n wineFinder__internationalTitle,\r\n wineFinder__internationalCountryLabel\r\n } = this.props.resources;\r\n const isActive = this.props.active || false;\r\n\r\n const cssClass = isActive?'find-wine-query-int active':'find-wine-query-int';\r\n\r\n return (\r\n
\r\n

{wineFinder__internationalTitle}

\r\n \r\n {wineFinder__internationalCountryLabel}\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n /**\r\n * triggers the api call for country\r\n */\r\n private _doQuery(): void {\r\n if (!this._isInvalid) {\r\n this.props.onQuerySearch({\r\n country: this._selectedCountry as string\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * sets the selected country to a new country code\r\n *\r\n * @param newCountry new country to switch to\r\n */\r\n private _handleCountrySelectionChange(newCountry: FindWineDropdownItem | undefined): void {\r\n if (newCountry) {\r\n this._selectedCountry = newCountry.value as string;\r\n }\r\n }\r\n\r\n private get _isInvalid(): boolean {\r\n return !this._selectedCountry;\r\n }\r\n\r\n private async _queryCountries(): Promise {\r\n const input = new GetWineCountriesInput();\r\n const countries = await WineCountries(input, this.props.actionContext);\r\n this._countries = countries;\r\n }\r\n}\r\n\r\nexport default WineFinderQueryLocationInternational;","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IWineFinderForm contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum resultsDisplay {\r\n paginate = 'paginate',\r\n append = 'append'\r\n}\r\n\r\nexport const enum showProductsConfiguration {\r\n showButton = 'showButton',\r\n hideProductsHideButton = 'hideProductsHideButton',\r\n showProductsHideButton = 'showProductsHideButton'\r\n}\r\n\r\nexport interface IWineFinderFormConfig extends Msdyn365.IModuleConfig {\r\n perPage?: number;\r\n resultsDisplay?: resultsDisplay;\r\n singlePage?: boolean;\r\n brand?: string;\r\n title?: ITitleData;\r\n searchText?: Msdyn365.RichText;\r\n hideInternational?: boolean;\r\n searchRadius: number;\r\n showFilterButtons: boolean;\r\n showProductsConfiguration?: showProductsConfiguration;\r\n showChooseWineInput?: boolean;\r\n showAllProductsToggle?: boolean;\r\n showAllProductsLabel?: IShowAllProductsLabelData;\r\n showProductsLabel?: IShowProductsLabelData;\r\n placeholders?: IPlaceholdersData;\r\n defaultFilters?: IDefaultFiltersData;\r\n filterState?: IFilterStateData;\r\n wineFinderSubmit?: string;\r\n mapText?: string;\r\n hideNumbers?: boolean;\r\n USLabelText?: string;\r\n internationalLabelText?: string;\r\n}\r\n\r\nexport interface IWineFinderFormResources {\r\n wineFinder__internationalTitle: string;\r\n wineFinder__internationalCountryLabel: string;\r\n wineFinder__domesticTitle: string;\r\n wineFinder__domesticSearchRadiusLabel: string;\r\n wineFinder__backToFind: string;\r\n wineFinder__noResults: string;\r\n wineFinder__searchAgain: string;\r\n wineFinder__showMoreButton: string;\r\n wineFinder__showProducts: string;\r\n wineFinder__hideProducts: string;\r\n wineFinder__internationalWebsiteLabel: string;\r\n wineFinder__retailFilterText: string;\r\n wineFinder__restaurantFilterText: string;\r\n}\r\n\r\nexport const enum TitleTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface ITitleData {\r\n text: string;\r\n tag?: TitleTag;\r\n}\r\n\r\nexport interface IShowAllProductsLabelData {\r\n hideAllProducts?: string;\r\n showAllProducts?: string;\r\n}\r\n\r\nexport interface IShowProductsLabelData {\r\n hideProducts?: string;\r\n showProducts?: string;\r\n}\r\n\r\nexport interface IPlaceholdersData {\r\n enablePlaceholders?: boolean;\r\n domesticSearch?: string;\r\n}\r\n\r\nexport interface IDefaultFiltersData {\r\n retail?: boolean;\r\n restaurant?: boolean;\r\n}\r\n\r\nexport interface IFilterStateData {\r\n retailActive?: boolean;\r\n restaurantActive?: boolean;\r\n}\r\n\r\nexport interface IWineFinderFormProps extends Msdyn365.IModule {\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n}\r\n","import { observable, reaction, toJS } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IExpandedState } from './wine-finder-form';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources, showProductsConfiguration } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderWineDisplayProps {\r\n wines?: string[];\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n allOpen: boolean;\r\n}\r\n\r\n/**\r\n * displays a list of wines\r\n */\r\n@observer\r\nclass WineFinderWineDisplay extends React.Component {\r\n @observable private _isOpen: boolean = false;\r\n\r\n private _wines?: string[];\r\n\r\n constructor(props: IWineFinderWineDisplayProps) {\r\n super(props);\r\n this._wines = props.wines;\r\n reaction(\r\n () => this.props.allOpen,\r\n (open) => {\r\n this._isOpen = open;\r\n }\r\n );\r\n\r\n this.state={\r\n expandedState:false\r\n };\r\n\r\n this._closeToggle = this._closeToggle.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n hideProducts,\r\n showProducts\r\n } = this.props.config.showProductsLabel || {hideProducts:'Hide Products', showProducts:'Show Products'};\r\n return (\r\n
\r\n {\r\n this._showButton && \r\n {(this._isOpen) ? hideProducts : showProducts}\r\n \r\n }\r\n {this._renderWineList()}\r\n
\r\n );\r\n }\r\n\r\n private get _showButton(): boolean {\r\n return this.props.config.showProductsConfiguration === showProductsConfiguration.showButton;\r\n }\r\n\r\n private get _showProducts(): boolean {\r\n return this.props.config.showProductsConfiguration === showProductsConfiguration.showProductsHideButton;\r\n }\r\n\r\n private _closeToggle(): void {\r\n this._isOpen = !this._isOpen;\r\n this.setState({\r\n expandedState: !this.state.expandedState\r\n });\r\n }\r\n\r\n private _renderWineList(): JSX.Element | undefined {\r\n\r\n const list: string[] = toJS(this._wines) as string[];\r\n list.sort();\r\n\r\n const wineList = (\r\n
    \r\n {list.map((wine, index) => (
  • {wine}
  • ))}\r\n
\r\n );\r\n\r\n if (this._showProducts && this._wines) { return wineList; }\r\n\r\n if (!this._isOpen || !this._wines) {\r\n return;\r\n }\r\n\r\n return wineList;\r\n }\r\n}\r\n\r\nexport default WineFinderWineDisplay;\r\n","import * as React from 'react';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderWineDisplay from './wine-finder-wine-display';\r\n\r\ninterface IFindWineItemProps {\r\n distance?: number;\r\n website?: string;\r\n phoneNumber?: string;\r\n location: string;\r\n name: string;\r\n numberInList?: number;\r\n type: 'international' | 'US';\r\n mapData?: {\r\n address: string;\r\n zip: string;\r\n };\r\n wines?: string[];\r\n config: IWineFinderFormConfig;\r\n resources: IWineFinderFormResources;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n}\r\n\r\n/**\r\n * creates tsx for a single retailer, READ ONLY\r\n *\r\n * @param props data on retailers\r\n */\r\nexport const FindWineItem = (props: IFindWineItemProps): JSX.Element => {\r\n const hideNumbers = props.hideNumbers || false;\r\n if (props.type === 'US') {\r\n return (\r\n
\r\n

\r\n {!hideNumbers && `${props.numberInList}.`} {props.name}\r\n

\r\n
\r\n
{props.location}
\r\n
\r\n
{props.distance} miles
\r\n {props.config.mapText || 'Show Map'}\r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n

{!hideNumbers && `${props.numberInList}.`} {props.name}

\r\n
\r\n
{props.location}
\r\n
{props.phoneNumber}
\r\n {\r\n // hack for getting the '↵' symbol when no website is here\r\n (props.website && props.website.length > 2) ? (\r\n \r\n {props.resources.wineFinder__internationalWebsiteLabel}\r\n \r\n ) : (
)\r\n }\r\n
\r\n
\r\n );\r\n }\r\n};","import React from 'react';\r\nimport {\r\n IGetWineInternationalDistributorOuput,\r\n IGetWineInternationalLocationOutput,\r\n IGetWineInternationalQueryFilters\r\n} from './actions/get-wine-international-location';\r\nimport {\r\n IGetWineLocationDataOutput,\r\n IGetWineLocationProductOutput,\r\n IGetWineLocationQueryFilters,\r\n IGetWineLocationRetailerOutput\r\n} from './actions/get-wine-location';\r\nimport { FindWineItem } from './wine-finder-display-item';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ntype wineResultContent = (IGetWineLocationRetailerOutput | IGetWineInternationalDistributorOuput)[];\r\n\r\ninterface IWineFinderScrollableProps {\r\n showMoreText: string;\r\n resultType: 'retailer' | 'distributor';\r\n queryFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters;\r\n wineLocationData: IGetWineLocationDataOutput | IGetWineInternationalLocationOutput;\r\n wineResults: wineResultContent;\r\n config: IWineFinderFormConfig;\r\n resources: IWineFinderFormResources;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n onGetMoreContent(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise;\r\n}\r\n\r\n/**\r\n * uses a \"show more\" feature to add to the current wine results instead of\r\n * pagination\r\n */\r\nexport class WineFinderScrollable extends React.Component {\r\n\r\n constructor(props: IWineFinderScrollableProps) {\r\n super(props);\r\n\r\n this._onAddMore = this._onAddMore.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const pageCount = this.props.wineLocationData.totalPages;\r\n const page = this.props.queryFilters.page || 1;\r\n return (\r\n
\r\n
\r\n {this._renderWineResults()}\r\n
\r\n {\r\n page < pageCount &&\r\n \r\n {this.props.showMoreText}\r\n \r\n }\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * renders a list of wine locations\r\n *\r\n * @returns array of JSX Elements to render\r\n */\r\n private _renderWineResults(): JSX.Element[] {\r\n const hideNumbers = this.props.hideNumbers || false;\r\n\r\n if (!this.props.wineResults.length) {\r\n return [(
{this.props.resources.wineFinder__noResults}
)];\r\n }\r\n\r\n if (this.props.resultType === 'retailer') {\r\n return (this.props.wineResults as IGetWineLocationRetailerOutput[]).\r\n map((retailer, key) =>\r\n (\r\n \r\n )\r\n );\r\n } else {\r\n // mapping function that returns an array of jsx retailers\r\n return (this.props.wineResults as IGetWineInternationalDistributorOuput[])\r\n .map((distributor) =>\r\n (\r\n \r\n )\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * returns the name of products, if it exists\r\n *\r\n * @param productArray array of wines\r\n */\r\n private _getProducts(productArray: IGetWineLocationProductOutput[]): string[] {\r\n return productArray.map(product => product.description);\r\n }\r\n\r\n private async _onAddMore(): Promise {\r\n await this.props.onGetMoreContent(this.props.queryFilters);\r\n }\r\n}","import * as React from 'react';\r\n\r\ninterface IWineFinderPagerProps {\r\n totalPages: number;\r\n currentPage: number;\r\n onPageChange(pageChange: number): undefined;\r\n}\r\n\r\n/**\r\n * Component responsible for rendering the pagination aspect of the get wine\r\n * page\r\n */\r\nclass WineFinderPager extends React.Component {\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public render(): JSX.Element {\r\n\r\n const goAsMin = () => {\r\n this._goToMinMaxPage('min');\r\n };\r\n\r\n const goAsMax = () => {\r\n this._goToMinMaxPage('max');\r\n };\r\n\r\n return (\r\n
\r\n {/* tslint:disable-next-line: react-this-binding-issue */}\r\n \r\n {this._renderPages()}\r\n {/* tslint:disable-next-line: react-this-binding-issue */}\r\n \r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n private get _isFirstPagination(): boolean {\r\n return this.range.lower === 0;\r\n }\r\n\r\n private get _isLastPagination(): boolean {\r\n return this.range.higher === this.props.totalPages;\r\n }\r\n /**\r\n * jump to the lowest or highest page\r\n */\r\n private _goToMinMaxPage(minOrMax: 'min' | 'max'): void {\r\n if (minOrMax === 'min') {\r\n this.props.onPageChange(1);\r\n } else {\r\n this.props.onPageChange(this.props.totalPages);\r\n }\r\n }\r\n\r\n /**\r\n * get the range (in bounds) of what indexes are to be rendered\r\n *\r\n * @returns bounds\r\n */\r\n private get range(): { lower: number; higher: number } {\r\n const currentPage = Number(this.props.currentPage);\r\n const lowerBound = Math.max(0, currentPage - 3);\r\n const higherBound = Math.min(this.props.totalPages, lowerBound + 5);\r\n return { lower: lowerBound, higher: higherBound };\r\n }\r\n\r\n /**\r\n * returns JSX elements representing a list of pages clickable and to go to\r\n */\r\n private _renderPages(): JSX.Element[] {\r\n const range = this.range;\r\n return Array(range.higher - range.lower).fill(0).map((value, index) => {\r\n const pageValue = range.lower + index + 1;\r\n if (pageValue === Number(this.props.currentPage)) {\r\n return (\r\n // tslint:disable-next-line: jsx-no-lambda react-this-binding-issue\r\n \r\n );\r\n } else {\r\n return (\r\n // tslint:disable-next-line: jsx-no-lambda react-this-binding-issue\r\n \r\n );\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default WineFinderPager;","//import { observable, toJS } from 'mobx';\r\n//import { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IGetWineInternationalLocationOutput, IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport { IGetWineLocationDataOutput, IGetWineLocationProductOutput, IGetWineLocationQueryFilters } from './actions/get-wine-location';\r\nimport { FindWineItem } from './wine-finder-display-item';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderPager from './wine-finder-pager';\r\n\r\ninterface IWineFinderResultsProps {\r\n resultType: 'retailer' | 'distributor';\r\n queryFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters;\r\n wineLocation: IGetWineLocationDataOutput | IGetWineInternationalLocationOutput;\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n onPageChange(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): void;\r\n}\r\n\r\n/**\r\n * displays results from a get wine location query\r\n */\r\nclass WineFinderResults extends React.Component {\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderResultsProps) {\r\n super(props);\r\n\r\n this._handlePageChange = this._handlePageChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
\r\n {this._renderWineLocations()}\r\n
\r\n
\r\n {\r\n this.props.wineLocation.data.length &&\r\n
Displaying {this.props.wineLocation.page} of {this.props.wineLocation.totalPages} pages
\r\n\r\n }\r\n {\r\n this.props.wineLocation.data.length &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n /**\r\n * handler for changing page\r\n *\r\n * @param pageChange the number that the page will change to\r\n */\r\n private _handlePageChange(pageChange: number): undefined {\r\n const newQuery = this.props.queryFilters;\r\n newQuery.page = pageChange;\r\n this.props.onPageChange(newQuery);\r\n return undefined;\r\n }\r\n\r\n /**\r\n * renders a list of wine locations\r\n *\r\n * @returns array of JSX Elements to render\r\n */\r\n private _renderWineLocations(): JSX.Element[] {\r\n const hideNumbers = this.props.hideNumbers || false;\r\n if (!this.props.wineLocation.data.length) {\r\n return [(
{this.props.resources.wineFinder__noResults}
)];\r\n }\r\n switch (this.props.resultType) {\r\n case 'retailer':\r\n return (this.props.wineLocation as IGetWineLocationDataOutput).data.\r\n map((retailer, key) =>\r\n (\r\n \r\n )\r\n );\r\n default:\r\n // mapping function that returns an array of jsx retailers\r\n return (this.props.wineLocation as IGetWineInternationalLocationOutput).data\r\n .map((distributor) =>\r\n (\r\n \r\n )\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * returns the name of products, if it exists\r\n *\r\n * @param productArray array of wines\r\n */\r\n private _getProducts(productArray: IGetWineLocationProductOutput[]): string[] {\r\n return productArray.map(product => product.description);\r\n }\r\n}\r\n\r\nexport default WineFinderResults;","/*---------------------------------------------------------------------------------------------\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\n\r\nimport * as React from 'react';\r\n\r\nimport { Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { observable, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport GetInternationalWineLocation, { GetWineInternationalLocationInput, IGetWineInternationalDistributorOuput, IGetWineInternationalLocationOutput, IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport GetWineLocation, { GetWineLocationInput, IGetWineLocationDataOutput, IGetWineLocationQueryFilters, IGetWineLocationRetailerOutput } from './actions/get-wine-location';\r\nimport getWineProducts, { GetWineProductsInput, IGetWineProductQueryFilters, IGetWineProductsData } from './actions/get-wine-products';\r\nimport { IWineFinderFormConfig, IWineFinderFormProps } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderQueryLocation from './wine-finder-query-location';\r\nimport WineFinderQueryLocationInternational from './wine-finder-query-location-international';\r\nimport { WineFinderScrollable } from './wine-finder-scrollable';\r\nimport WineFinderResults from './wine-finder-wine-results';\r\n\r\n// =============================================================================\r\n// INTERFACES AND CONSTANTS\r\n// =============================================================================\r\nconst enum selectedTab {\r\n us = 'us',\r\n international = 'international'\r\n}\r\nexport interface IExpandedState{\r\n expandedState:boolean;\r\n}\r\n\r\n/**\r\n * GetWine component: Component responsible for displaying local wineries based\r\n * on the query input\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass FindWine extends React.Component, IExpandedState> {\r\n\r\n\r\n // =========================================================================\r\n // OBSERVABLES AND FIELDS\r\n // =========================================================================\r\n\r\n /**\r\n * manages which type of page is supposed to be currently rendered\r\n *\r\n * - query: when _pageState is query the search page, will be rendered\r\n * - results: when _pageState is results a list of results will be rendered\r\n */\r\n @observable private _pageState: 'query' | 'results' = 'query';\r\n\r\n /**\r\n * keep the state of the 'Show All Products' toggle\r\n */\r\n @observable private _allOpen: boolean = false;\r\n\r\n /**\r\n * List of wine products\r\n */\r\n @observable private _products: IGetWineProductsData[] | undefined;\r\n\r\n /**\r\n * contains data on the previous domestic wine locations api request\r\n */\r\n @observable private wineLocation: IGetWineLocationDataOutput | undefined;\r\n\r\n /**\r\n * Indicates which is the current selected tab\r\n */\r\n @observable private _selectedTab: string = 'us';\r\n\r\n private _wineLocationDataSet: (IGetWineInternationalDistributorOuput | IGetWineLocationRetailerOutput)[] = [];\r\n\r\n /**\r\n * contains data on the previous international wine locations api request\r\n */\r\n @observable private internationalWineLocation: IGetWineInternationalLocationOutput | undefined;\r\n\r\n /**\r\n * the filters previously used for the last api request\r\n */\r\n private _querySearchFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters = {\r\n country: 'all',\r\n location: '',\r\n brand: this.props.config.brand\r\n };\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderFormProps) {\r\n super(props);\r\n\r\n // bindings for all functions used within the render\r\n this._setWineLocation = this._setWineLocation.bind(this);\r\n this._setWineProducts = this._setWineProducts.bind(this);\r\n this._handleBackToFind = this._handleBackToFind.bind(this);\r\n this._setInternationalWineLocation = this._setInternationalWineLocation.bind(this);\r\n this._handlePageChange = this._handlePageChange.bind(this);\r\n this._getMoreWineLocations = this._getMoreWineLocations.bind(this);\r\n this._closeToggle = this._closeToggle.bind(this);\r\n this._selectUSTab = this._selectUSTab.bind(this);\r\n this._selectInternationalTab = this._selectInternationalTab.bind(this);\r\n\r\n // safeguard product list\r\n reaction(\r\n () => { return this._products; },\r\n () => { this.setState({}); }\r\n );\r\n this.state={\r\n expandedState:false\r\n };\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.showChooseWineInput) {\r\n void this._setWineProducts();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n if (this.props.config.singlePage) {\r\n return (\r\n
\r\n {this._renderQuery()}\r\n {this._pageState === 'results' && this._renderResults()}\r\n
\r\n );\r\n }\r\n\r\n if (this._pageState === 'query') {\r\n return this._renderQuery();\r\n } else {\r\n return this._renderJSXResult();\r\n }\r\n }\r\n\r\n // ==========================================================================\r\n // JSX CONSTRUCTORS\r\n // ==========================================================================\r\n\r\n private _renderJSXResult(): JSX.Element {\r\n // if we are rendering retailer and the search returned nothing,\r\n // display a special error page stating no results were found\r\n const wineType = (this.wineLocation) ? 'retailer' : 'distributor';\r\n if (wineType === 'retailer' && this.wineLocation && this.wineLocation.data.length === 0) {\r\n return this._renderNoResults();\r\n }\r\n return this._renderResults();\r\n }\r\n\r\n // Select US tab with US search form\r\n private _selectUSTab(): void {\r\n this._selectedTab = 'us';\r\n }\r\n\r\n // Select International tab with International search form\r\n private _selectInternationalTab(): void {\r\n this._selectedTab = 'international';\r\n }\r\n\r\n private _renderQuery(): JSX.Element {\r\n const {\r\n hideInternational,\r\n searchRadius,\r\n showFilterButtons,\r\n placeholders,\r\n USLabelText,\r\n internationalLabelText\r\n } = this.props.config;\r\n const USCssClass = this._selectedTab === selectedTab.us?'find-wine-tab-us active':'find-wine-tab-us';\r\n const internationalCssClass = this._selectedTab === selectedTab.international?'find-wine-tab-international active':'find-wine-tab-international';\r\n return (\r\n
\r\n
\r\n
\r\n {this._title}\r\n {this._searchText}\r\n
\r\n\r\n {\r\n !hideInternational &&\r\n
\r\n \r\n \r\n
\r\n }\r\n\r\n \r\n {\r\n !hideInternational &&\r\n \r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * JSX for the result page\r\n */\r\n private _renderResults(): JSX.Element {\r\n const { wineFinder__backToFind, wineFinder__showMoreButton } = this.props.resources;\r\n const wineType = (this.wineLocation) ? 'retailer' : 'distributor';\r\n const wineLocation = (this.wineLocation) ? this.wineLocation : this.internationalWineLocation;\r\n const resultDisplay = (this.props.config.resultsDisplay === 'paginate') ?\r\n (\r\n \r\n ) :\r\n (\r\n \r\n );\r\n return (\r\n
\r\n
\r\n {\r\n !this.props.config.singlePage &&\r\n {wineFinder__backToFind}\r\n }\r\n {this.props.config.showAllProductsToggle && this._renderAllProductsToggle()}\r\n {resultDisplay}\r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * JSX for the 'Show All Products' toggle\r\n */\r\n private _renderAllProductsToggle(): JSX.Element {\r\n const {\r\n hideAllProducts,\r\n showAllProducts\r\n } = this.props.config.showAllProductsLabel || {hideAllProducts:'Hide All Products', showAllProducts:'Show All Products'};\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _closeToggle(): void {\r\n this._allOpen = !this._allOpen;\r\n this.setState({\r\n expandedState: !this.state.expandedState\r\n });\r\n }\r\n\r\n /**\r\n * JSX for results failed page\r\n *\r\n * this is only for retailer / domestic search\r\n */\r\n private _renderNoResults(): JSX.Element {\r\n const {\r\n wineFinder__backToFind,\r\n wineFinder__noResults,\r\n wineFinder__searchAgain\r\n } = this.props.resources;\r\n return (\r\n
\r\n
\r\n {wineFinder__backToFind}\r\n
\r\n {this._title}\r\n

{wineFinder__noResults}

\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private get _title(): JSX.Element | null {\r\n const title = this.props.config.title;\r\n if (title && title.text) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private get _searchText(): JSX.Element | null {\r\n const { searchText } = this.props.config;\r\n if (searchText) {\r\n return (\r\n // tslint:disable-next-line:react-no-dangerous-html\r\n \r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * return back to query page\r\n */\r\n private _handleBackToFind(): undefined {\r\n this._pageState = 'query';\r\n return undefined;\r\n }\r\n\r\n /**\r\n * handles a re-request to change pages\r\n *\r\n * @param filters query filter for either domestic or international searching\r\n */\r\n private async _handlePageChange(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise {\r\n if (this.wineLocation) {\r\n await this._setWineLocation(filters as IGetWineLocationQueryFilters);\r\n } else {\r\n await this._setInternationalWineLocation(filters as IGetWineInternationalQueryFilters);\r\n }\r\n return undefined;\r\n }\r\n\r\n private async _getMoreWineLocations(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise {\r\n if (!filters.page) {\r\n filters.page = 2;\r\n } else {\r\n filters.page++;\r\n }\r\n if (this.wineLocation) {\r\n (filters as IGetWineLocationQueryFilters).brand = this.props.config.brand;\r\n const wineLocationInput = new GetWineLocationInput(filters as IGetWineLocationQueryFilters);\r\n const moreData = await GetWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = [...this._wineLocationDataSet, ...moreData.data];\r\n } else {\r\n (filters as IGetWineInternationalQueryFilters).brand_code = this.props.config.brand;\r\n const wineLocationInput = new GetWineInternationalLocationInput(filters as IGetWineInternationalQueryFilters);\r\n const moreData = await GetInternationalWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = [...this._wineLocationDataSet, ...moreData.data];\r\n }\r\n this.setState({});\r\n }\r\n\r\n // =========================================================================\r\n // DATA ACTIONS AND QUERIES\r\n // =========================================================================\r\n\r\n /**\r\n * runs the users data query and applies the new results to the component\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setWineLocation(filters: IGetWineLocationQueryFilters): Promise {\r\n this._allOpen = false;\r\n filters.brand = this.props.config.brand;\r\n filters.per_page = this.props.config.perPage || 5;\r\n const wineLocationInput = new GetWineLocationInput(filters);\r\n this._querySearchFilters = filters;\r\n const newLocation = await GetWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = newLocation.data;\r\n this.wineLocation = newLocation;\r\n // must be set to undefined to keep which was previous call consistent\r\n this.internationalWineLocation = undefined;\r\n this._pageState = 'results';\r\n return this.wineLocation;\r\n }\r\n\r\n /**\r\n * runs the users data query and applies the new results to the component\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setInternationalWineLocation(filters: IGetWineInternationalQueryFilters): Promise {\r\n filters.brand_code = this.props.config.brand;\r\n filters.per_page = this.props.config.perPage || 5;\r\n const wineLocationInput = new GetWineInternationalLocationInput(filters);\r\n const newLocation = await GetInternationalWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = newLocation.data;\r\n this.internationalWineLocation = newLocation;\r\n this._querySearchFilters = filters;\r\n // must be set to undefined to keep which was previous call consistent\r\n this.wineLocation = undefined;\r\n this._pageState = 'results';\r\n return this.internationalWineLocation;\r\n }\r\n\r\n /**\r\n * get a list of products\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setWineProducts(): Promise {\r\n const filter: IGetWineProductQueryFilters = {brand: this.props.config.brand};\r\n const wineLocationInput = new GetWineProductsInput(filter);\r\n const products = await getWineProducts(wineLocationInput, this.props.context.actionContext);\r\n this._products = products;\r\n }\r\n}\r\n\r\nexport default FindWine;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\nimport { getTelemetryObject, Heading, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceTileData } from './account-customer-balance-tile.data';\nimport { IAccountCustomerBalanceTileProps } from './account-customer-balance-tile.props.autogenerated';\nimport { CreditComponent, ErrorComponent } from './components/account-customer-balance-tile-info';\nimport LinksComponent from './components/account-customer-balance-tile-links';\n\nexport interface IAccountCustomerBalanceTileViewProps extends IAccountCustomerBalanceTileProps {\n AccountCustomerBalanceTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n content: React.ReactNode;\n links: React.ReactNode;\n}\n\nexport interface IAccountCustomerBalanceTileViewState {\n isDetailsLinkDisplayed: boolean;\n content: React.ReactNode;\n}\n\n/**\n *\n * AccountCustomerBalanceTile component.\n * @extends {React.Component>}\n */\nclass AccountCustomerBalanceTile extends React.Component<\n IAccountCustomerBalanceTileProps,\n IAccountCustomerBalanceTileViewState\n> {\n @computed get hasError(): boolean {\n return get(this.props, 'data.balance.status') !== 'SUCCESS';\n }\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountCustomerBalanceTileProps) {\n super(props);\n\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this.state = { ...this._initState() };\n\n reaction(\n () => this.hasError,\n () => {\n this.props.context.telemetry.error('Error retrieving customer account balance');\n this.setState({\n content: \n });\n }\n );\n }\n\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerResult = get(this.props, 'data.customerInformation.result');\n\n const allowOnAccountPayment = customerResult ? customerResult.AllowOnAccountPayment : false;\n const isB2BSite = isChannelTypeB2B(this.props.context.request);\n const enableCustomerAccountPayment = get(this.props, 'context.request.app.platform.enableCustomerAccountPayment');\n\n return (\n allowOnAccountPayment &&\n (enableCustomerAccountPayment === 'all' ||\n (enableCustomerAccountPayment === 'b2b' && isB2BSite) ||\n (enableCustomerAccountPayment === 'b2c' && !isB2BSite))\n );\n }\n\n public shouldComponentUpdate(\n nextProps: IAccountCustomerBalanceTileProps,\n nextState: IAccountCustomerBalanceTileViewState\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 if (!this.isCustomerAccountPaymentEnabled) {\n return <>;\n }\n\n const { className, heading, links } = this.props.config;\n const viewProps = {\n ...this.props,\n AccountCustomerBalanceTile: {\n moduleProps: this.props,\n className: classnames('ms-account-customer-balance-tile', className)\n },\n heading: heading && (\n \n ),\n content: this.state.content,\n links: this.state.isDetailsLinkDisplayed && (\n (event: Msdyn365.ContentEditableEvent) => void 0,\n requestContext: this.props.context.request,\n telemetryContent: this.telemetryContent\n }}\n />\n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initState(): IAccountCustomerBalanceTileViewState {\n const account: CustomerBalances = get(this.props, 'data.balance.result');\n\n let content: React.ReactNode;\n let isDetailsLinkDisplayed = false;\n\n if (this.hasError) {\n this.props.telemetry.error('Error retrieving customer account balance');\n content = ;\n } else if (\n account.Balance === 0 &&\n account.CreditLimit === 0 &&\n account.InvoiceAccountBalance === 0 &&\n account.InvoiceAccountCreditLimit === 0\n ) {\n // Non-established credit\n content = ;\n } else {\n // Successfully retrieved balance\n const { accountCreditVerbagePrefix, accountCreditVerbagePostfix } = this.props.resources;\n const currencyCode = get(this.props, 'context.request.channel.Currency');\n const formatCurrency = get(this.props, 'context.cultureFormatter.formatCurrency');\n let customerCredit = 0;\n\n if (account.InvoiceAccountCreditLimit === 0) {\n customerCredit = account.CreditLimit - account.Balance;\n } else {\n customerCredit = account.InvoiceAccountCreditLimit - account.InvoiceAccountBalance;\n }\n\n const customerCreditFormatted = `${formatCurrency(customerCredit.toFixed(2), currencyCode)}`;\n\n isDetailsLinkDisplayed = true;\n content = (\n \n );\n }\n\n return { content, isDetailsLinkDisplayed };\n }\n}\n\nexport default AccountCustomerBalanceTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountCustomerBalanceTileViewProps } from './account-customer-balance-tile';\n\nconst AccountCustomerBalanceTileView: React.FC = props => {\n const { AccountCustomerBalanceTile, heading, content, links } = props;\n\n return (\n \n {heading}\n {content}\n {links}\n \n );\n};\n\nexport default AccountCustomerBalanceTileView;\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\ninterface IAccountCustomerBalanceTileInfo {\n label?: string;\n value?: string;\n verbagePrefix?: string;\n verbagePostfix?: string;\n className?: string;\n error?: string;\n}\n\nexport const ErrorComponent: React.FC = ({ error }) => (\n {error}\n);\n\nexport const CreditComponent: React.FC = ({ verbagePrefix, verbagePostfix, value, className }) => {\n return (\n
\n {verbagePrefix}\n {value}\n {verbagePostfix}\n
\n );\n};\n\nexport const InfoComponent: React.FC = ({ label, value, className }) => (\n
\n {label}\n {value}\n
\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface ILinksData {\n linkText?: string;\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountCustomerBalanceTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountCustomerBalanceTileLinks: React.FC = ({\n links,\n telemetryContent,\n onTextChange,\n requestContext\n}) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-customer-balance-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountCustomerBalanceTileLinks;\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 ISignInButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst SignInButton: React.FC = ({ id, className, text, ariaLabel, telemetryContent, disabled, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default SignInButton;\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 ISignInDescription {\n className: string;\n description: string;\n}\n\nconst SignInDescription: React.FC = ({ className, description }) =>

{description}

;\n\nexport default SignInDescription;\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 ISignInErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst SignInError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default SignInError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n ariaLabel?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface ISignInInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst SignInInput: React.FC = ({ id, type, value, pattern, className, maxLength, ariaLabel, onChange }) => (\n \n);\n\nexport default SignInInput;\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 ISignInLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst SignInLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignInLabel;\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 ISignInLink {\n id?: string;\n className: string;\n href: string;\n ariaLabel: string;\n text: string;\n telemetryContent?: ITelemetryContent;\n}\n\nconst SignInLink: React.FC = ({ id, className, href, telemetryContent, ariaLabel, text }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignInLink;\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 ISignInLoadingIcon {\n className: string;\n}\n\nconst SignInLoadingIcon: React.FC = ({ className }) =>
;\n\nexport default SignInLoadingIcon;\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 ISignInLoadingMessage {\n className: string;\n message: string;\n}\n\nconst SignInLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default SignInLoadingMessage;\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 ISignInText {\n className: string;\n text: string;\n}\n\nconst SignInText: React.FC = ({ className, text }) => {text};\n\nexport default SignInText;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport SignInButtonComponent from './components/sign-in-button';\nimport SignInDescriptionComponent from './components/sign-in-description';\nimport SignInErrorComponent from './components/sign-in-error';\nimport SignInInputComponent from './components/sign-in-input';\nimport SignInLabelComponent from './components/sign-in-label';\nimport SignInLinkComponent from './components/sign-in-link';\nimport SignInLoadingIconComponent from './components/sign-in-loading-icon';\nimport SignInLoadingMessageComponent from './components/sign-in-loading-message';\nimport SignInTextComponent from './components/sign-in-text';\nimport { ISignInConfig, ISignInProps, ISignInResources } from './sign-in.props.autogenerated';\n\nexport interface ISignInViewState {\n isShowLoading: boolean;\n}\n\nexport interface ISignInItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n error: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface ISignInSocialItem {\n key: string;\n button: INodeProps;\n image: React.ReactNode;\n text: React.ReactNode;\n}\n\nexport interface ISignInB2BItem {\n key: string;\n button: INodeProps;\n text: React.ReactNode;\n}\n\nexport interface ISignInSocialAccount {\n socialAccounts: INodeProps;\n items: ISignInSocialItem[];\n}\n\nexport interface ISignInB2BAccount {\n socialAccounts: INodeProps;\n items: ISignInB2BItem[];\n}\nexport interface ISignInLocalAccount {\n localAccount: INodeProps;\n items: ISignInItem[];\n forgetPassword: React.ReactNode;\n disclaimer: React.ReactNode;\n error: React.ReactNode;\n signInButton: React.ReactNode;\n}\n\nexport interface ISignInLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ISignInViewProps {\n className: string;\n viewState: ISignInViewState;\n signIn: IModuleProps;\n loading: ISignInLoading;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n signInSection: INodeProps;\n signInSectionHeading: React.ReactNode;\n signInLocalAccount: ISignInLocalAccount;\n signInSocialAccount: ISignInSocialAccount;\n signInB2BAccount: ISignInB2BAccount;\n signUpSection: INodeProps;\n signUpSectionHeading: React.ReactNode;\n signUpDescription: React.ReactNode;\n signUpLink: React.ReactNode;\n}\n\n/**\n * SignIn component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass SignIn extends React.Component> {\n private readonly moduleClassName: string = 'ms-sign-in';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable private emailId: string;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: ISignInProps) {\n super(props);\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.emailId = 'logonIdentifier';\n }\n\n public componentDidMount(): void {\n this._prePopulateData();\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(nextProps: ISignInProps, nextState: ISignInViewState): 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: ISignInConfig = this.props.config || {};\n const resources: ISignInResources = this.props.resources || {};\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n signIn: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n signInSection: {\n className: `${this.moduleClassName}__sign-in-section`\n },\n signInSectionHeading: (\n \n ),\n signInLocalAccount: {\n localAccount: {\n className: `${this.moduleClassName}__account-items localAccount`\n },\n items: [\n this._renderInput(\n this.emailId,\n 'email',\n resources.emailAddressLabelText,\n resources.emailAddressAriaLabel,\n this.emailRegex\n ),\n this._renderInput('password', 'password', resources.passwordLabelText)\n ],\n forgetPassword: (\n \n ),\n disclaimer: config.signInDisclaimer && (\n \n ),\n error: ,\n signInButton: (\n \n )\n },\n signInSocialAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__social-accounts`\n },\n items: [\n this._renderSocialAccount(\n 'FacebookExchange',\n resources.facebookButtonText,\n resources.facebookButtonAriaLabel,\n config.facebookIcon\n ),\n this._renderSocialAccount(\n 'MicrosoftAccountExchange',\n resources.microsoftButtonText,\n resources.microsoftButtonAriaLabel,\n config.microsoftIcon\n )\n ]\n },\n signInB2BAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__b2b-social-accounts`\n },\n items: [\n this._renderB2BSocialAccount(\n 'StoreManagerB2BSignin',\n resources.b2bButtonText,\n resources.b2bButtonAriaLabel,\n config.displayB2bAccountManagerSignin\n )\n ]\n },\n signUpSection: {\n className: `${this.moduleClassName}__sign-up-section`\n },\n signUpSectionHeading: (\n \n ),\n signUpDescription: (\n \n ),\n signUpLink: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.signInDisclaimer = event.target.value);\n\n public handleSignInHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signInHeading.text = event.target.value);\n\n public handleSignUpHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signUpHeading.text = event.target.value);\n\n private readonly _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['CONTENT'] && window['CONTENT']['email_pattern']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n this.emailRegex = window['CONTENT']['email_pattern'];\n }\n\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // @ts-expect-error\n this.emailId = (window.SA_FIELDS.AttributeFields || [])[0].ID || this.emailId;\n }\n };\n\n private readonly _updateErrorMessage = () => {\n const resources: ISignInResources = this.props.resources || {};\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const errorMessages = {\n requiredField_email: resources.requriedEmailError,\n requiredField_password: resources.requriedPasswordError,\n invalid_email: resources.invalidEmailError,\n invalid_password: resources.invalidPasswordError,\n unknown_error: resources.unknownError\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], errorMessages);\n }\n };\n\n private _renderInput(id: string, type: string, labelText: string, ariaLabel?: string, pattern?: string): ISignInItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n error: (\n \n ),\n input: (\n \n )\n };\n }\n\n private _renderSocialAccount(id: string, text: string, ariaLabel: string, iconImage?: Msdyn365.IImageData): ISignInSocialItem {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n image: this._createImageMarkup(iconImage),\n text: \n };\n }\n\n private _renderB2BSocialAccount(\n id: string,\n text: string,\n ariaLabel: string,\n _displayB2bAccountManagerSignin: boolean | undefined\n ): ISignInB2BItem | null {\n if (_displayB2bAccountManagerSignin) {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n text: \n };\n }\n return null;\n }\n\n private _createImageMarkup(iconImage?: Msdyn365.IImageData): React.ReactNode | null {\n if (iconImage) {\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings || {},\n imageSettings: iconImage && iconImage.imageSettings\n };\n const pictureClassName = `${this.moduleClassName}__social-account-picture`;\n return (\n
\n \n
\n );\n }\n return null;\n }\n}\n\nexport default SignIn;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n ISignInItem,\n ISignInLoading,\n ISignInLocalAccount,\n ISignInSocialAccount,\n ISignInSocialItem,\n ISignInB2BAccount,\n ISignInB2BItem,\n ISignInViewProps\n} from './sign-in';\n\nconst LocalAccount: React.FC = ({ localAccount, items, forgetPassword, disclaimer, error, signInButton }) => {\n return (\n \n {items &&\n items.map((item: ISignInItem) => {\n return (\n \n {item.label}\n {item.error}\n {item.input}\n \n );\n })}\n {forgetPassword}\n {disclaimer}\n {error}\n {signInButton}\n \n );\n};\n\nconst SocialAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInSocialItem) => {\n return (\n \n {item.image}\n {item.text}\n \n );\n })}\n \n );\n};\n\nconst B2BAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInB2BItem) => {\n return (\n item && (\n \n {item.text}\n \n )\n );\n })}\n \n );\n};\n\nconst SignInLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst SignInView: React.FC = props => {\n const {\n signIn,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n signInSection,\n signUpSection,\n signInSectionHeading,\n signInLocalAccount,\n signInSocialAccount,\n signUpSectionHeading,\n signInB2BAccount,\n signUpDescription,\n signUpLink\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n \n {signInSectionHeading}\n {LocalAccount(signInLocalAccount)}\n {SocialAccount(signInSocialAccount)}\n {B2BAccount(signInB2BAccount)}\n \n \n {signUpSectionHeading}\n {signUpDescription}\n {signUpLink}\n \n \n \n );\n};\n\nexport default SignInView;\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 * as React from 'react';\n\nexport interface IBusinessPartnerPromotionTermsParagraphProp {\n description: string;\n className: string;\n title?: string;\n titleClassName?: string;\n}\n\nexport const BusinessPartnerPromotionTermsParagraph: React.FC = ({\n title,\n description,\n className,\n titleClassName\n}) => {\n return (\n
  • \n {title &&

    {title}

    }\n

    {description}

    \n
  • \n );\n};\n\nexport default BusinessPartnerPromotionTermsParagraph;\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\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { Button, Alert, IModuleProps, Modal, ModalBody, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport { promoteToSellerAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { BusinessPartnerUser } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Text } from '@msdyn365-commerce/core';\nimport { IBusinessPartnerPromotionData } from './business-partner-promotion.data';\nimport { IBusinessPartnerPromotionProps } from './business-partner-promotion.props.autogenerated';\nimport { BusinessPartnerPromotionTermsParagraph } from './components';\n\nexport interface IBusinessPartnerPromotionViewProps extends IBusinessPartnerPromotionProps {\n businessPartnerPromotionProps: IModuleProps;\n heading: React.ReactNode;\n notificationMessage?: React.ReactNode;\n sellerDescriptions: React.ReactNode[];\n termsOfServiceCheckbox: React.ReactNode;\n termsOfServiceModal: React.ReactNode;\n submitButton: React.ReactNode;\n}\n\nexport interface IBusinessPartnerPromotionState {\n showTermsOfService: boolean;\n showSubmitButton: boolean;\n termsOfServiceChecked: boolean;\n termsOfServiceModalOpened: boolean;\n errorMessage?: string;\n notificationMessage?: string;\n}\n\n/**\n * The class name root for the module.\n */\nexport const moduleClassName: string = 'ms-business-partner-promotion';\n\n/**\n *\n * BusinessPartnerPromotion component\n * @extends {React.PureComponent>}\n */\nclass BusinessPartnerPromotion extends React.Component<\n IBusinessPartnerPromotionProps,\n IBusinessPartnerPromotionState\n> {\n constructor(props: IBusinessPartnerPromotionProps) {\n super(props);\n this.state = {\n showTermsOfService: true,\n showSubmitButton: true,\n termsOfServiceChecked: false,\n termsOfServiceModalOpened: false,\n errorMessage: undefined,\n notificationMessage: undefined\n };\n }\n\n public render(): JSX.Element | null {\n const {\n showSubmitButton,\n showTermsOfService,\n termsOfServiceChecked,\n termsOfServiceModalOpened,\n errorMessage,\n notificationMessage\n } = this.state;\n const { resources, data, config } = this.props;\n const { heading, termsOfService } = config;\n const { authorizationErrorMessage } = resources;\n const { b2bUserInformation } = data;\n const canSubmit = this.isAdminUser(b2bUserInformation.result);\n let error: string | undefined = errorMessage;\n\n // do not show error message when the API is still in loading.\n if (!canSubmit && b2bUserInformation.status !== 'LOADING') {\n error = authorizationErrorMessage;\n }\n const btnEnabled = canSubmit && termsOfServiceChecked;\n\n const viewProps: IBusinessPartnerPromotionViewProps = {\n ...this.props,\n businessPartnerPromotionProps: {\n moduleProps: this.props,\n className: classnames(moduleClassName, moduleClassName)\n },\n heading: ,\n notificationMessage: this.renderNotificationBar(error, notificationMessage),\n sellerDescriptions: this.renderSellerDescriptions(),\n termsOfServiceCheckbox: showTermsOfService && (\n
    \n \n {resources.termsOfServiceAgreementText}\n \n {resources.termsOfServiceLinkText}\n \n
    \n ),\n termsOfServiceModal: (\n \n {resources.termsOfServiceModalHeading}\n \n \n \n \n ),\n submitButton: showSubmitButton && (\n
    \n \n {resources.submitRequestLabel}\n \n
    \n )\n };\n\n return this.props.renderView(viewProps);\n }\n\n private renderNotificationBar(errorMessage: string | undefined, notificationMessage: string | undefined): React.ReactNode {\n let notificationBar: React.ReactNode = null;\n if (errorMessage) {\n notificationBar = {errorMessage};\n } else if (notificationMessage) {\n notificationBar = {notificationMessage};\n }\n return notificationBar;\n }\n\n private renderSellerDescriptions(): React.ReactNode[] {\n const { config } = this.props;\n const results: React.ReactNode[] = [];\n const sellerDescriptions = config.sellerDescriptions;\n\n if (!sellerDescriptions) {\n return results;\n }\n\n return sellerDescriptions.map((description, idx1) => {\n return (\n
    \n \n
      \n {description.bulletPoints?.map((bulletPoint, idx2) => {\n return (\n \n );\n })}\n
    \n
    \n );\n });\n }\n\n private isAdminUser(user: BusinessPartnerUser | undefined): boolean {\n return (\n !ObjectExtensions.isNullOrUndefined(user) && !StringExtensions.isNullOrEmpty(user.BusinessPartnerId) && user.IsAdmin === true\n );\n }\n\n private readonly onCheckBoxChange = (event: React.ChangeEvent) => {\n this.setState({\n termsOfServiceChecked: event.target.checked\n });\n };\n\n private readonly onToggleTermOfServiceModal = () => {\n this.setState({\n termsOfServiceModalOpened: !this.state.termsOfServiceModalOpened\n });\n };\n\n private readonly onSubmit = async (event: React.MouseEvent) => {\n const { context, data, resources } = this.props;\n const { errorMessageText, promoteToSellerSubmitSuccessMessage } = resources;\n const businessPartnerId = data.b2bUserInformation.result?.BusinessPartnerId ?? '';\n\n try {\n await promoteToSellerAsync({ callerContext: context.actionContext }, businessPartnerId);\n this.setState({\n showSubmitButton: false,\n showTermsOfService: false,\n errorMessage: undefined,\n notificationMessage: promoteToSellerSubmitSuccessMessage\n });\n } catch {\n this.setState({\n showTermsOfService: true,\n showSubmitButton: true,\n errorMessage: errorMessageText,\n notificationMessage: undefined\n });\n }\n };\n}\n\nexport default BusinessPartnerPromotion;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBusinessPartnerPromotionViewProps } from './business-partner-promotion';\n\n/**\n * View layout of business partner promotion module.\n * @param props - React props of the component.\n * @returns Functional component.\n */\nconst businessPartnersView: React.FC = props => {\n const {\n businessPartnerPromotionProps,\n heading,\n notificationMessage,\n sellerDescriptions,\n termsOfServiceCheckbox,\n termsOfServiceModal,\n submitButton\n } = props;\n return (\n \n {heading}\n {notificationMessage}\n {sellerDescriptions}\n {termsOfServiceCheckbox}\n {termsOfServiceModal}\n {submitButton}\n \n );\n};\n\nexport default businessPartnersView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\n/**\n * EnabledPaymentsForOBO enum.\n */\n export enum EnabledPaymentsForOBO {\n OnCustomerAccount = 1,\n ExpressPayment = 0,\n Loyalty = 0,\n GiftCard = 0,\n PaymentInstrument = 0,\n ApplePay = 0\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

    (WrappedComponent: React.ComponentType

    ): React.ComponentType

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

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

    {\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Waiting } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * Payment waiting props.\n */\nexport interface IPaymentWaitingProps {\n message: string;\n className?: string;\n}\n\n/**\n * Payment waiting.\n * @param param0 - First in param.\n * @param param0.message - Message.\n * @param param0.className - ClassName.\n * @returns React node.\n */\nexport const WaitingComponent: React.FC = ({ message, className = 'ms-checkout-payment-instrument' }) => (\n

    \n \n {message}\n
    \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleStateProps, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport classname from 'classnames';\n\nimport { reaction } from 'mobx';\nimport { ICheckoutExpressPaymentContainerData } from './checkout-express-payment-container.data';\nimport {\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerHeadingData\n} from './checkout-express-payment-container.props.autogenerated';\nimport { WaitingComponent } from '../../common/waiting';\n\n/**\n * ICheckoutExpressPaymentContainerModuleProps interface.\n */\nexport interface ICheckoutExpressPaymentContainerModuleProps\n extends ICheckoutExpressPaymentContainerProps,\n IModuleStateProps {}\n\nexport interface ICheckoutExpressPaymentContainerViewProps\n extends ICheckoutExpressPaymentContainerProps<{}>,\n ICheckoutExpressPaymentContainerState {\n checkoutPlainContainerProps: IModuleProps;\n items: React.ReactNode[];\n isReady?: boolean;\n waiting?: React.ReactNode;\n title?: React.ReactNode;\n headerProps: INodeProps;\n}\n\n/**\n * Checkout Express Payment Container State.\n */\nexport interface ICheckoutExpressPaymentContainerState {\n isReady?: boolean;\n shouldHideExpressPaymentContainer?: boolean;\n}\n\n/**\n *\n * CheckoutExpressPaymentContainer component\n * @extends {React.PureComponent>}\n */\n@observer\nexport class CheckoutExpressPaymentContainer extends React.PureComponent<\n ICheckoutExpressPaymentContainerProps,\n ICheckoutExpressPaymentContainerState\n> {\n private readonly moduleClassName: string = 'ms-checkout-express-section-container';\n\n public constructor(props: ICheckoutExpressPaymentContainerModuleProps) {\n super(props);\n this.state = {\n isReady: false,\n shouldHideExpressPaymentContainer: this.props.data.checkout.result?.shippingAddressFromExpressCheckout ? true : false\n };\n }\n\n public componentDidMount(): void {\n reaction(\n () => this.props.data.checkout.result?.isExpressPaymentModulesReady,\n () => {\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n } else {\n let isReady = true;\n\n for (const item of items) {\n // @ts-ignore\n if (item.key.includes('checkout-express')) {\n // @ts-ignore\n const extensionPropertyKey = `is${item.props.config.paymentTenderType}ExpressModuleReady`;\n\n const isModuleReady =\n this.props.data.checkout.result?.isExpressPaymentModulesReady?.find(\n property => property.Key === extensionPropertyKey\n )?.Value?.BooleanValue ?? false;\n isReady = isReady && isModuleReady;\n }\n }\n this.setState({ isReady });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isExpressCheckoutApplied,\n isExpressCheckoutApplied => {\n this.setState({ shouldHideExpressPaymentContainer: isExpressCheckoutApplied });\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { checkoutExpressPaymentContainerHeading },\n resources: { checkoutExpressPaymentSectionLoadingMessage },\n data: { checkout }\n } = this.props;\n\n if (!checkout.result || checkout.result?.isExpressCheckoutApplied || checkout.result?.isPaymentVerificationRedirection) {\n this.props.context.telemetry.information('Other payment is applied, checkout express payment container module wont render');\n return null;\n }\n\n if (this.props.context.request.user.isOBORequest && EnabledPaymentsForOBO.ExpressPayment === 0) {\n this.props.context.telemetry.information('isOBORequest is enabled, Checkout express payment container module wont render');\n return null;\n }\n\n const items = this._getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout express payment container content is empty, module wont render');\n return null;\n }\n\n const shouldHideExpressPaymentContainerClassName: string = this.state.shouldHideExpressPaymentContainer ? 'hide' : '';\n\n const moduleClassName = classname(\n 'ms-checkout-express-payment-container',\n this.props.config.className,\n shouldHideExpressPaymentContainerClassName\n );\n\n const viewProps: ICheckoutExpressPaymentContainerViewProps = {\n ...this.props,\n\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items,\n isReady: this.state.isReady,\n waiting: ,\n title: checkoutExpressPaymentContainerHeading && this._renderMsdyn365Text(checkoutExpressPaymentContainerHeading),\n headerProps: { className: 'ms-checkout-express-payment-container__head' }\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly _getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n /**\n * Renders heading.\n * @param checkoutExpressPaymentContainerHeading - The checkout express container heading.\n * @returns React node.\n */\n private _renderMsdyn365Text(checkoutExpressPaymentContainerHeading: ICheckoutExpressPaymentContainerHeadingData): React.ReactNode {\n return (\n \n );\n }\n\n /**\n * Event handler for heading change event.\n * @param event - The content change event in heading element.\n * @returns The new heading value.\n */\n private _handleCheckoutExpressContainerHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.checkoutExpressPaymentContainerHeading!.text = event.target.value);\n}\n\nexport default CheckoutExpressPaymentContainer;\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 { ICheckoutExpressPaymentContainerViewProps } from './checkout-express-payment-container';\n\ninterface IContainerItemsComponent {\n isLoadingClassName: string;\n items: React.ReactNode[];\n}\n\nconst ContainerItemsComponent: React.FC = ({ isLoadingClassName, items }) => (\n
    {items}
    \n);\n\nconst CheckoutExpressPaymentContainerView: React.FC = ({\n checkoutPlainContainerProps,\n items,\n isReady,\n waiting,\n title,\n headerProps\n}) => {\n const isLoadingClassName: string = isReady ? 'showContainer' : 'notShowContainer';\n return (\n \n {title}\n {!isReady && waiting}\n \n \n );\n};\n\nexport default CheckoutExpressPaymentContainerView;\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\nconst Loading: React.FC = () =>
    ;\n\nexport default Loading;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleStateManager, IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ICheckoutSectionContainerData } from './checkout-section-container.data';\nimport { ICheckoutSectionContainerProps } from './checkout-section-container.props.autogenerated';\nimport LoadingComponent from './components/loading';\n\n/**\n * ICheckoutSectionContainerModuleProps interface.\n */\nexport interface ICheckoutSectionContainerModuleProps\n extends ICheckoutSectionContainerProps,\n IModuleStateProps {\n enableControl: boolean;\n}\n\ninterface ICheckoutSectionContainerState {\n isCollapse?: boolean;\n}\n\nexport interface ICheckoutSectionContainerItem {\n id: string;\n loading?: React.ReactNode;\n itemProps: INodeProps;\n item: React.ReactNode;\n}\n\nexport interface ICheckoutSectionContainerViewProps extends ICheckoutSectionContainerProps<{}> {\n className: string;\n checkoutPlainContainerProps: IModuleProps;\n items: ICheckoutSectionContainerItem[];\n}\n\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst zeroAmount = 0;\n\n/**\n *\n * CheckoutPlainContainer component.\n * @extends {React.Component>}\n */\n@observer\nexport class CheckoutPlainContainer extends React.Component {\n @computed public get amountDue(): number {\n const {\n data: { checkout }\n } = this.props;\n if (!checkout?.result) {\n return 0;\n }\n\n const checkoutResult = checkout.result;\n const cart = checkoutResult.checkoutCart?.cart;\n if (!cart || !cart.CartLines || !ArrayExtensions.hasElements(cart.CartLines)) {\n return 0;\n }\n\n return cart.TotalAmount ?? zeroAmount;\n }\n\n public constructor(props: ICheckoutSectionContainerModuleProps) {\n super(props);\n this.state = { isCollapse: false };\n }\n\n public componentDidMount(): void {\n const items = this.getItems();\n const childIds = items.map((item: React.ReactNode) => get(item, 'props.id'));\n const shouldEnableSinglePaymentAuthorizationCheckout: boolean =\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout ?? false;\n\n this.props.moduleState.init({\n onEdit: this.onEdit,\n onCancel: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onCancel,\n onSubmit: shouldEnableSinglePaymentAuthorizationCheckout ? undefined : this.onSubmit,\n childIds\n });\n\n reaction(\n () => this.props.moduleState.isReady,\n () => {\n this.onContainerReady();\n }\n );\n\n reaction(\n () => this.props.moduleState.shouldSubmitContainer,\n () => {\n this.onSubmit();\n }\n );\n\n // Reaction to collapse the payment section for new checkout flow.\n reaction(\n () => this.props.data.checkout.result?.shouldCollapsePaymentSection,\n shouldCollapsePaymentSection => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.setState({ isCollapse: shouldCollapsePaymentSection });\n }\n }\n );\n\n // Reaction to submit section container for new checkout flow\n reaction(\n () => this.props.data.checkout.result?.shouldTriggerPaymentWithPlaceOrder,\n () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n this.onSubmit();\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerReady for new checkout flow.\n reaction(\n () => this.props.moduleState.isReady,\n async isReady => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer && this.amountDue > zeroAmount) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: isReady\n });\n }\n }\n );\n\n // Reaction to set isPaymentSectionContainerHasError for new checkout flow.\n reaction(\n () => this.props.moduleState.hasError,\n async hasError => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (shouldEnableSinglePaymentAuthorizationCheckout && isPaymentSectionContainer) {\n await this.props.data.checkout.result?.updateIsPaymentSectionContainerHasError({\n newIsPaymentSectionContainerHasError: hasError\n });\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.isCheckoutCallFailed,\n async () => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n if (isPaymentSectionContainer && this.props.data.checkout.result?.isCheckoutCallFailed) {\n this.onEdit();\n await this.props.data.checkout.result.updateIsCheckoutCallFailed({ newIsCheckoutCallFailed: true });\n }\n }\n );\n }\n\n public componentDidUpdate(): void {\n if (!this.props.moduleState.hasExternalSubmitGroup) {\n return;\n }\n\n /**\n * Review all modules to updating status if one of the modules has error.\n */\n const { childIds, hasError, getModule } = this.props.moduleState;\n const hasReadyOrSkippedItems = childIds.some((childId: string) => {\n const state = getModule(childId);\n return !!state && (state.isReady || state.isSkipped);\n });\n if (hasReadyOrSkippedItems && hasError) {\n this.onEdit();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutSectionContainerModuleProps, nextState: ICheckoutSectionContainerState): 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 {\n enableControl,\n moduleState,\n config: { width }\n } = this.props;\n\n const items = this.getItems();\n if (items.length === 0) {\n this.props.context.telemetry.error('Checkout section content is empty, module wont render');\n return null;\n }\n\n const moduleClassName = classname(\n 'ms-checkout-section-container',\n {\n 'has-initialized': moduleState.hasInitialized,\n 'is-ready': moduleState.isReady,\n 'is-updating': !moduleState.isReady,\n container: width === 'container',\n 'col-12 fullwidth': width === 'fluid'\n },\n this.props.config.className\n );\n\n const viewProps: ICheckoutSectionContainerViewProps = {\n ...this.props,\n\n className: moduleClassName,\n checkoutPlainContainerProps: {\n moduleProps: this.props,\n className: moduleClassName\n },\n items: items.map((item: React.ReactNode) => {\n const childId = get(item, 'props.id');\n const state = moduleState.getModule(childId);\n\n // Modules has not completed initializing or it's disable\n const hidden =\n this.state.isCollapse || (state.hasModuleState && (!state.hasInitialized || state.isDisabled || state.isSkipped));\n return {\n id: childId,\n loading: state.hasModuleState && !state.hasInitialized && ,\n itemProps: {\n 'data-type-name': state.typeName,\n className: classname('ms-checkout-section-container__item', {\n hidden,\n initialized: state.hasInitialized,\n disabled: state.isDisabled,\n skipped: state.isSkipped,\n ready: state.isReady,\n updating: state.isUpdating,\n pending: state.isPending\n })\n },\n item: React.cloneElement(item as React.ReactElement, { enableControl })\n };\n })\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly getItems = (): React.ReactNode[] => {\n const { slots } = this.props;\n return (slots && slots.primary && slots.primary.length && slots.primary) || [];\n };\n\n private readonly getActiveChildModuleStates = (): IModuleStateManager[] => {\n const { childIds, getModule } = this.props.moduleState;\n return childIds\n .map(getModule)\n .filter((state): state is IModuleStateManager => !!state && !state.isDisabled && state.hasModuleState);\n };\n\n private readonly clearError = (): void => {\n // Clear error before action, otherwise it will rise conflict;\n this.getActiveChildModuleStates().forEach(state => {\n state.hasError && state.setHasError(false);\n });\n };\n\n private readonly onSubmit = (): void => {\n const isPaymentSectionContainer = ArrayExtensions.hasElements(\n this.props.moduleState.childIds.filter(childId => childId.includes(paymentInstrumentModuleId))\n );\n\n this.props.telemetry.information('Section container onSubmit is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onSubmit && state.onSubmit();\n });\n\n // Handle when the amount due is zero\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n isPaymentSectionContainer &&\n this.amountDue === zeroAmount\n ) {\n this.props.data.checkout.result?.updateIsPaymentSectionContainerReady({\n newIsPaymentSectionContainerReady: true\n });\n }\n };\n\n private readonly onCancel = (): void => {\n this.props.telemetry.information('Section container onCancel is called.');\n\n this.clearError();\n this.getActiveChildModuleStates().forEach(state => {\n !state.isReady && state.onCancel && state.onCancel();\n });\n };\n\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Section container onEdit is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n (state.isReady || state.isSkipped) && state.onEdit && state.onEdit();\n });\n };\n\n private readonly onContainerReady = (): void => {\n this.props.telemetry.information('Section container onContainerReady is called.');\n\n this.getActiveChildModuleStates().forEach(state => {\n state.isReady && state.onContainerReady && state.onContainerReady();\n });\n };\n}\n\nexport default withModuleState(CheckoutPlainContainer);\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 { ICheckoutSectionContainerItem, ICheckoutSectionContainerViewProps } from './checkout-section-container';\n\nconst ItemComponent: React.FC = ({ loading, itemProps, item }) => (\n <>\n {loading}\n {item}\n \n);\n\nconst CheckoutSectionContainerView: React.FC = ({ checkoutPlainContainerProps, items }) => (\n \n {items.map(item => (\n \n ))}\n \n);\n\nexport default CheckoutSectionContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
    \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
    \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n {similarLookProduct}\n \n {errorMessage}\n {products}\n \n {pagination}\n \n );\n }\n return (\n \n {categoryHierarchy && {renderCategoryHierarchy(categoryHierarchy)}}\n \n {refineMenu && renderRefiner(refineMenu)}\n \n {similarLookProduct}\n
    \n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n
    \n
    \n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
    \n \n {errorMessage}\n {products}\n \n {pagination}\n
    \n
    \n
    \n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return {sortByDropDown};\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n \n {categoryHierarchyList.map((category, index) => (\n \n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n \n ))}\n \n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n \n

    \n {title.titlePrefix}\n {title.titleText}({title.titleCount})\n

    \n
    \n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, Customer, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCatalogId } from '@msdyn365-commerce/core';\nimport { ProductComparisonItem, ProductComparisonState } from '../product-comparison-state';\nimport { IProductComparisonButtonProps } from './product-comparison-button.props.autogenerated';\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonButtonViewProps extends IProductComparisonButtonProps<{}> {\n moduleProps: IModuleProps;\n productComparisonButton?: React.ReactNode;\n productComparisonPreview?: React.ReactNode;\n}\n\n/**\n * Represents the data which is required for the product comparison button to be rendered.\n */\nexport interface IProductComparisonButtonData {\n accountInformation?: AsyncResult;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonFullProps extends IProductComparisonButtonProps {\n product: ProductSearchResult | SimpleProduct;\n catalogId: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonState {\n canProductBeAddedToProductComparison: boolean;\n currentProductsCount: number;\n comparisonItemId: string;\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonButton extends React.PureComponent {\n private static _productComparisonPreview?: React.ReactNode;\n\n private readonly _className: string;\n\n private readonly _instanceId: string;\n\n private readonly _shouldUsePreview: boolean;\n\n private static _renderProductComparisonPreview(props: IProductComparisonButtonFullProps): React.ReactNode {\n if (!ProductComparisonButton._productComparisonPreview && ArrayExtensions.hasElements(props.slots.productComparisonPreview)) {\n ProductComparisonButton._productComparisonPreview = props.slots.productComparisonPreview[0];\n }\n\n return ProductComparisonButton._productComparisonPreview;\n }\n\n private static _renderProductComparisonButton(\n className: string,\n buttonText: string | undefined,\n title: string,\n onClickHandler?: () => void\n ): React.ReactNode {\n const isDisabled = ObjectExtensions.isNullOrUndefined(onClickHandler);\n let content: React.ReactNode;\n if (buttonText) {\n content = (\n <>\n
    \n
    {buttonText}
    \n \n );\n }\n return (\n \n );\n }\n\n public constructor(props: IProductComparisonButtonFullProps) {\n super(props);\n\n this._className = 'ms-product-comparison-button';\n this._instanceId = `${this._className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n\n this.state = this._getNewState();\n\n this._shouldUsePreview = !ProductComparisonButton._productComparisonPreview;\n ProductComparisonButton._renderProductComparisonPreview(this.props);\n }\n\n public componentDidMount(): void {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).listModifiedEvent.subscribe(\n {\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this.setState(this._getNewState());\n }\n }\n );\n }\n\n public getSnapshotBeforeUpdate(previousProps: Readonly): void {\n if (previousProps.product.RecordId !== this.props.product.RecordId || previousProps.catalogId !== this.props.catalogId) {\n this.setState(this._getNewState());\n }\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode | null {\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n if (!isConsentGiven) {\n return null;\n }\n\n const viewProps: IProductComparisonButtonViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: this._className\n }\n };\n\n if (this._shouldUsePreview) {\n viewProps.productComparisonPreview = ProductComparisonButton._productComparisonPreview;\n }\n\n const buttonClassName = this.props.config.shouldDisplayText ? `${this._className}__button` : `${this._className}__icon`;\n\n if (!this.state.canProductBeAddedToProductComparison) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.removeFromComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n classnames(`${buttonClassName}__removing`, buttonClassName),\n buttonText,\n this.props.resources.removeFromComparisonButtonText,\n this._removeFromProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit) && productsLimit <= this.state.currentProductsCount) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonLimitReachedButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonLimitReachedButtonText\n );\n return this.props.renderView(viewProps);\n }\n\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonButtonText,\n this._addToProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n private _getProductsLimit(): number | undefined | null {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Adds current product to a product comparison list.\n */\n private readonly _addToProductComparison: () => void = () => {\n const item = new ProductComparisonItem(this.props.product.RecordId, this.props.catalogId);\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).addItem(item);\n };\n\n /**\n * Removes current product from the product comparison list where it was added earlier.\n */\n private readonly _removeFromProductComparison: () => void = () => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).removeItemById(\n this.state.comparisonItemId\n );\n };\n\n private _getProdutComparisonDataByCatalogId(): ProductComparisonItem[] {\n const items = ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).items;\n const catalogId = getCatalogId(this.props.context.request);\n const productByCatalogId = items?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n\n /**\n * Retrieves the state of the component based on the comparison data.\n * @returns State object for the component.\n */\n private readonly _getNewState: () => IProductComparisonButtonState = () => {\n const comparisonItemId = ProductComparisonItem.getItemId(this.props.product.RecordId, this.props.catalogId);\n const products = this._getProdutComparisonDataByCatalogId();\n return {\n comparisonItemId,\n canProductBeAddedToProductComparison: !ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).hasItemById(comparisonItemId),\n currentProductsCount: products.length\n };\n };\n}\n\nexport default ProductComparisonButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductComparisonButtonViewProps } from './product-comparison-button';\n\n/**\n * Represents product comparison button view.\n * @param props - View props for product comparison button.\n * @returns Functional component of product comparison button.\n */\nexport const ProductComparisonButtonViewFunctionalComponent: React.FC = props => {\n const { productComparisonButton, productComparisonPreview } = props;\n\n return (\n \n {productComparisonButton}\n {productComparisonPreview}\n \n );\n};\n\nexport default ProductComparisonButtonViewFunctionalComponent;\n"],"names":["TastingTours","React","constructor","props","super","this","_showWidget","bind","componentDidMount","domain","appInsights","config","correlationHeaderExcludedDomains","push","e","console","warn","_injectScript","rcTarget","render","className","_image","_reservationClassName","_content","_consentGate","_integration","image","defaultImageSettings","viewports","xs","q","w","h","lg","lazyload","Image","Object","assign","gridSettings","context","request","imageSettings","_header","_body","header","text","Heading","headingTag","tag","content","dangerouslySetInnerHTML","getRichTextHtml","consentCTA","consentText","requireConsent","consentFooter","consentFooterClass","id","RichTextComponent","onClick","token","src","alt","target","document","script","createElement","defer","setAttribute","getElementsByTagName","appendChild","widget","getElementById","consentGate","FamilyAndFriendsCodeComponent","resources","familyFriends_codeLabel","code","Code","familyFriends_recipientLabel","_recipientColumnAction","familyFriends_activationDateLabel","ActivationDate","_hasBeenRecieved","RecipientEmailAddress","href","mailToLink","familyFriends_sendToAFriendBtn","mailSubject","mailBody","_sanitizeMailTo","value","stripOnly","replace","match","p1","toString","FamilyAndFriends","_this$props$data$code","actionContext","viewProps","_objectSpread","_headerJSX","codes","data","codeList","result","Result","Codes","map","key","renderView","_props$data$codeList$","_props$data$codeList$2","length","classnames","heading","format","familyFriends_codesRemaining","QuantityAvailable","helpText","showAdditionalFields","getForm","options","errorMessage","inputRef","inputPinRef","inputExpRef","giftCardNumber","giftCardPin","giftCardExp","onEnterGiftCardNumber","onEnterGiftCardPin","onEnterGiftCardExp","onApplyGiftCard","supportExternalGiftCard","additionalFields","applyGiftCardButton","giftCardFormLabel","giftCardNumberLabel","giftCardPinLabel","giftCardExpLabel","giftCardAlertLabel","giftCardPinPlaceholderText","giftCardExpPlaceholderText","onApply","async","preventDefault","formProps","onSubmit","label","inputPinLabel","inputExpLabel","alertFieldLabel","alert","Alert","role","assertive","fade","includeAlertClass","isOpen","inputNumber","ref","type","onChange","RegExp","inputPin","placeholder","inputExp","applyButton","Button","disabled","showGiftCardPinInput","showGiftCardExpInput","pin","expirationDate","pinAndExpirationDate","inputProps","inputNumProps","inputPinProps","inputExpProps","getItem","_ref","giftCard","getFormattedPrice","canRemove","onRemoveGiftCard","enteredGiftCardLabel","giftCardAvailableBalanceLabel","removeGiftCardButton","balance","Balance","CardCurrencyCode","giftCardLast4Digit","Id","substr","selectedGiftCard","removeButton","onRemove","itemProps","getList","giftCards","listProps","list","title","CheckoutGiftCard","_this","state","isFetchingGiftCard","init","moduleState","onEdit","onCancel","isRequired","isEnabled","status","couldPaidByGiftCard","cart","checkout","checkoutCart","undefined","TotalAmount","user","isAuthenticated","app","giftCardSupported","onUpdating","handleCancelOrSubmit","hasSelectedItem","onReady","onSkip","price","arguments","currencyCode","cultureFormatter","formatCurrency","enterGiftCardNumber","setState","clearError","enterGiftCardPin","enterGiftCardExp","setError","telemetry","error","setHasError","removeGiftCard","checkoutState","removeGiftCardExtend","applyGiftCard","trim","giftCardTypes","getGiftCardTypes","giftCardType","isPinRequired","IsPinRequired","isExpRequired","IsExpirationDateRequired","tenderTypeId","PaymentMethodId","getGiftCard","giftCardExtend","Pin","ExpirationDate","TenderTypeId","addGiftCardExtend","Promise","resolve","input","current","focus","invalidCardInfoError","invalidCardTypeError","noCardPinError","noCardExpError","supportedGiftCardType","month","parseInt","split","year","getGiftCardAsync","callerContext","then","activeGiftCard","catch","emptyInputError","duplicatedCodeError","invalidCodeError","giftCardExtends","some","card","resolveCardTypesAsync","loyaltyAmount","getLoyaltyAmount","when","isDataReady","isReady","shouldPayGiftCard","moduleClassName","classname","checkoutGiftCardProps","moduleProps","showGiftCard","TitleCompoent","addGiftCard","form","__decorate","computed","observer","withModuleState","From","Node","SelectedGiftCard","_ref2","GiftCardList","_ref3","_ref4","item","_objectWithoutProperties","_excluded","AddResource","_ref5","ShowResource","_ref6","Module","Loading","paymentInstrumentModuleId","CheckoutPlainContainer","getItems","slots","primary","getActiveChildModuleStates","childIds","getModule","filter","isDisabled","hasModuleState","forEach","hasError","_this$props$data$chec","isPaymentSectionContainer","ArrayExtensions","hasElements","childId","includes","_this$props$data$chec2","information","shouldEnableSinglePaymentAuthorizationCheckout","amountDue","updateIsPaymentSectionContainerReady","newIsPaymentSectionContainerReady","isSkipped","onContainerReady","isCollapse","_checkoutResult$check","_cart$TotalAmount","CartLines","_this$props$data$chec3","_this$props$data$chec4","get","reaction","shouldSubmitContainer","_this$props$data$chec5","shouldCollapsePaymentSection","_this$props$data$chec6","shouldTriggerPaymentWithPlaceOrder","_this$props$data$chec7","_this$props$data$chec8","updateIsPaymentSectionContainerHasError","newIsPaymentSectionContainerHasError","_this$props$data$chec9","isCheckoutCallFailed","_this$props$data$chec10","updateIsCheckoutCallFailed","newIsCheckoutCallFailed","componentDidUpdate","hasExternalSubmitGroup","shouldComponentUpdate","nextProps","nextState","enableControl","width","items","hasInitialized","container","checkoutPlainContainerProps","hidden","loading","LoadingComponent","typeName","initialized","skipped","ready","updating","isUpdating","pending","isPending","ItemComponent","apiToken","GetWineFilterable","Msdyn365","filters","dataCacheType","cacheObjectType","cacheKey","JSON","stringify","_token","queryFilters","filtersToHTTPQueryString","queryString","keys","queryKey","queryValue","WineMapper","_input","_applyMap","inputData","inputMap","mappedOutput","GetWineInternationalLocationInput","_url","brand_code","country","fullUrl","GetWineInternationalLocationMap","GetWineInternationalLocationDistributorMap","GetWineInternationalLocationCountryMap","GetWineLocationInternationalMapper","output","totalPages","totalResults","page","distributors","distributor","distributorOutput","action","ctx","apiSettings","response","url","headers","Authorization","args","Error","GetWineLocationMap","GetWineLocationRetailerMap","GetWineLocationProductMap","GetWineLocationInput","GetWineLocationMapper","retailers","retailer","retailerProducts","mappedRetailer","products","product","GetWineProductsInput","brand","FindWineDropdownMenu","_value","defaultValue","_handleOnChange","_constructItems","event","newItem","itemList","find","index","isAriaSelected","observable","WineFinderQueryLocation","_props$config$default","_props$config$default2","_queryLocation","_queryRadius","_allowRetail","_allowRestaurant","_product","_queryRadii","_handleQueryLocationChange","_handleSearchRadiusChange","_toggleRetail","_toggleRestaurant","_doQuery","defaultFilters","retail","restaurant","radii","allowRadiiDisplay","defaultRadius","wineFinder__domesticTitle","wineFinder__domesticSearchRadiusLabel","wineFinder__retailFilterText","wineFinder__restaurantFilterText","domesticSearch","enablePlaceholders","placeholders","cssClass","active","htmlFor","required","showChooseWineInput","_renderProductsDropdownList","displayFilters","_hasFilterActive","checked","_isInvalid","onKeyPress","wineFinderSubmit","queryRadius","location","radius","on_premise","filterState","restaurantActive","retailActive","onQuerySearch","Number","test","_renderProductOptions","option","product_key","description","GetWineCountriesInput","shouldCacheOutput","IGetWineCountriesMap","GetWineCountriesMapper","WineFinderQueryLocationInternational","_countries","_handleCountrySelectionChange","_queryCountries","err","name","iso","wineFinder__internationalTitle","wineFinder__internationalCountryLabel","submitText","_selectedCountry","newCountry","countries","WineCountries","resultsDisplay","showProductsConfiguration","TitleTag","WineFinderWineDisplay","_isOpen","_wines","wines","allOpen","open","expandedState","_closeToggle","hideProducts","showProducts","showProductsLabel","_showButton","_renderWineList","showButton","showProductsHideButton","toJS","sort","wineList","wine","_showProducts","FindWineItem","hideNumbers","numberInList","distance","mapData","address","zip","rel","mapText","phoneNumber","website","wineFinder__internationalWebsiteLabel","WineFinderScrollable","_onAddMore","pageCount","wineLocationData","_renderWineResults","showMoreText","wineResults","resultType","city","perPage","_getProducts","phone","jdeDistributorNumber","wineFinder__noResults","productArray","onGetMoreContent","WineFinderPager","_isFirstPagination","goAsMin","_goToMinMaxPage","_renderPages","_isLastPagination","goAsMax","range","lower","higher","minOrMax","onPageChange","currentPage","lowerBound","Math","max","min","Array","fill","pageValue","WineFinderResults","_handlePageChange","_renderWineLocations","wineLocation","pageChange","newQuery","selectedTab","FindWine","_pageState","_allOpen","_selectedTab","_wineLocationDataSet","_querySearchFilters","_setWineLocation","_setWineProducts","_handleBackToFind","_setInternationalWineLocation","_getMoreWineLocations","_selectUSTab","_selectInternationalTab","_products","singlePage","_renderQuery","_renderResults","_renderJSXResult","_renderNoResults","hideInternational","searchRadius","showFilterButtons","USLabelText","internationalLabelText","USCssClass","us","internationalCssClass","international","_title","_searchText","wineFinder__backToFind","wineFinder__showMoreButton","wineType","internationalWineLocation","resultDisplay","tabIndex","showAllProductsToggle","_renderAllProductsToggle","hideAllProducts","showAllProducts","showAllProductsLabel","wineFinder__searchAgain","searchText","wineLocationInput","moreData","GetWineLocation","GetInternationalWineLocation","per_page","newLocation","getWineProducts","AccountCustomerBalanceTile","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","_initState","ErrorComponent","apiGenericErrorMessage","customerResult","allowOnAccountPayment","AllowOnAccountPayment","isB2BSite","isChannelTypeB2B","enableCustomerAccountPayment","isCustomerAccountPaymentEnabled","links","isDetailsLinkDisplayed","LinksComponent","onTextChange","requestContext","account","CreditLimit","InvoiceAccountBalance","InvoiceAccountCreditLimit","noCreditErrorMessage","accountCreditVerbagePrefix","accountCreditVerbagePostfix","customerCredit","customerCreditFormatted","toFixed","CreditComponent","verbagePrefix","verbagePostfix","_mapEditableLinks","linkdata","editableLinks","payLoad","getPayloadObject","link","contentAction","etext","linkText","attributes","getTelemetryAttributes","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","additionalProperties","editProps","message","errorClassName","GetMaxLength","maxLength","parsedMaxLength","isNaN","pattern","forId","SignIn","handleParagraphChange","signInDisclaimer","handleSignInHeadingChange","signInHeading","handleSignUpHeadingChange","signUpHeading","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","window","isInitialized","emailRegex","emailId","SA_FIELDS","AttributeFields","ID","errorMessages","requiredField_email","requriedEmailError","requiredField_password","requriedPasswordError","invalid_email","invalidEmailError","invalid_password","invalidPasswordError","unknown_error","unknownError","EmailRegex","defaultRegex","source","viewState","isShowLoading","signIn","modal","Modal","modalBody","ModalBody","icon","SignInLoadingIconComponent","SignInLoadingMessageComponent","loadingMessage","defaultAADConainer","style","display","aadConainer","signInSection","signInSectionHeading","signInLocalAccount","localAccount","_renderInput","emailAddressLabelText","emailAddressAriaLabel","passwordLabelText","forgetPassword","SignInLinkComponent","forgotPasswordButtonAriaLabel","forgotPasswordButtonText","disclaimer","SignInErrorComponent","signInButton","SignInButtonComponent","loginButtonAriaLabel","loginButtonText","signInSocialAccount","socialAccounts","_renderSocialAccount","facebookButtonText","facebookButtonAriaLabel","facebookIcon","microsoftButtonText","microsoftButtonAriaLabel","microsoftIcon","signInB2BAccount","_renderB2BSocialAccount","b2bButtonText","b2bButtonAriaLabel","displayB2bAccountManagerSignin","signUpSection","signUpSectionHeading","signUpDescription","SignInDescriptionComponent","signUpDescriptionText","signUpLink","signUpButtonAriaLabel","signUpButtonText","labelText","wrapper","SignInLabelComponent","SignInInputComponent","iconImage","button","_createImageMarkup","SignInTextComponent","_displayB2bAccountManagerSignin","imageProps","pictureClassName","shouldSkipToMainImage","SignInLoading","LocalAccount","SocialAccount","B2BAccount","AutoSuggest","autoSuggestOptions","BingMapsApiKey","countryCode","defaultLanguageId","excludedAddressFields","attachAutoSuggest","inputId","containerId","selectedSuggestionCallback","autoSuggestManager","Microsoft","Maps","loadModule","callback","_document$querySelect","AutosuggestManager","attachAutosuggest","querySelector","_document$querySelect2","errorCallback","debug","credentials","bingMapsApiKey","changeAutoSuggestionCountryCode","setOptions","disposeAutoSuggest","_this$autoSuggestMana","_this$autoSuggestMana2","detachAutosuggest","dispose","_loadMapAPI","storeSelectorStateManager","loadMapApi","lang","market","AddressCommon","getDefaultCountryRegionId","countryRegionId","countryRegions","marketISOCode","currentCountryRegion","countryRegion","ISOCode","CountryRegionId","parseRetailException","errorTitle","addressErrorMessageTitle","addressGenericErrorMessage","isAuthenticatedFlow","getStateProvinces","GetStateProvincesInput","getStateProvinceAction","isEmpty","ThreeLetterISORegionName","State","City","addCustomerAddress","updateLogisticsLocationRoleRecordId","submitCustomerAddress","addAddress","updateCustomerAddress","updateAddress","updateCustomerPrimaryAddress","updatePrimaryAddress","addressAction","AddressTypeValue","AddressManagementInput","execAddressAction","addresses","RecordId","customerAddresses","addressPurposes","GetAddressPurposesInput","getAddressPurposesAction","addressPurpose","purpose","AddressType","LogisticsLocationRoleRecordId","AddressItemDisplayType","AddressValidationRuleType","AddressItemType","AddressFormat","countryRegionsInfo","addressMetaData","getPrefilledAddressDropdownData","stateDefaultSelectionText","stateProvinceInfo","defaultStateText","dropdownData","getCountryFormat","getStateFormat","unshift","getAddressTypeFormat","getTwoLetterISORegionName","_getCountryRegionInfo","validateAddressFormat","validationError","propertyName","validationtor","isValid","getAddressFormat","addressFormatItem","_inputValidation","getTranformedAddress","postalCode","ZipCode","selectedState","StateName","adminDistrict","StateId","addressLine","Street","locality","district","DistrictName","CountyName","FullAddress","formattedAddress","_validateRegEx","validationRule","regEx","countryRegionInfo","_getAddressDisplayFormat","ShortName","Description","set","validationRules","toLowerCase","addressDisplayItem","AddressFormatLines","AddressTypeItem","_extendAddressDisplayFormat","nameDisplayItem","Name","formatLine","AddressComponentNameValue","addressItem","getItemFormat","isNewLine","NewLine","phoneDisplayItem","Phone","isPrimaryDisplayItem","IsPrimary","AddressMetaData","excluded","metaData","requiredFieldRegEx","maxLengthRegEx","resourcesPrefix","excludedTypes","requiredFields","_init","_addItem","Input","PhoneRegex","County","Dropdown","StreetNumber","BuildingCompliment","Postbox","House_RU","Flat_RU","CountryOKSMCode_RU","Checkbox","displayType","nameKey","_validationRules","rule","Required","optionalString","ruleType","itemType","_validationRule","Format","MaxLength","AddressOperation","itemId","isChecked","additionalAddributes","autoFocus","shouldBeAutoFocused","getRequriedAttribute","getAddessItems","selectedAddress","addressFormat","addressType","dropdownDisplayData","defaultCountryRegionId","defaultAddressType","onInputChange","onDropdownChange","shouldAutoFocus","elementId","AddressInputComponent","AdressCheckboxComponent","displayData","selectedValue","AdressDropdownComponent","AddressItem","AddressLabelComponent","AddressAlertComponent","AddressAddUpdate","editAddressHeading","addAddressHeading","onSave","addressActionResponse","AddressForm","isShowSaveButton","saveButton","AddressButtonComponent","addressSaveButtonText","addressSaveButtonAriaLabel","isShowCancelButton","cancelButton","addressCancelButtonText","addressCancelButtonAriaLabel","AddressError","AddressErrorTitleComponent","AddressErrorMessageComponent","isShowLabel","mainClass","recordId","getDropdownItem","isSelected","shouldUseAutoFocus","getButtonAriaLabel","addressName","getAddressList","showPrimaryButton","onEditAddress","onRemoveAddress","onUpdatePrimaryAddress","List","isShowList","isSelectedAddress","isShowError","isInvalidAsyncState","isEditAsyncCustomerFeatureEnabled","canRenderAsyncCustomerDataAsUnmodifiable","isAsyncCustomer","isAsyncCustomerAddressCreationFeatureEnabled","Item","showItems","AddressShow","isShowPrimaryButton","primaryButton","addressPrimaryButtonText","addressPrimaryButtonAriaLabel","editButton","addressEditButtonText","addressEditButtonAriaLabel","addressRemoveButtonText","addressRemoveButtonAriaLabel","getPrimaryAddressList","primaryAddressSectionHeading","primaryAddresses","getOtherAddressList","otherAddressSectionHeading","otherAddresses","AddressList","_heading$headingTag","onAddAddress","handleLineItemHeadingChange","headingComponent","contextRequest","disableAddButton","ListAddress","isShowEmptyListMessage","emptyListMessage","addressEmptyListAddressMessage","addButton","addressAddButtonText","addressAddButtonAriaLabel","primaryAddressList","otherAddressList","AddressDetail","addressTypeValue","addressTypeDescription","AddressDetailItemComponent","AccountManagementAddress","asyncCustAddressCreationFeatureName","editAsyncCustomerFeatureName","asyncCustomerAddressCreationFeatureIsEnabled","_onSuggestionSelected","_clearAddressFields","addUpdateAddress","_this$autoSuggest","autoSuggest","_clearValidation","_dataInitialize","_data$countryRegions$","_data$addressPurposes","_data$address$result","_renderAddOrUpdateAddress","Shipping","addressStateDefaultSelectionText","_onAddressAddUpdateInputChange","_onAddressAddUpdateDropdownChange","_onAddressAddUpdateSubmit","_resetView","_renderListAddress","_this$props$data$cust","_this$props$context$a","_goToEditAddress","_onRemoveAddress","_goToAddAddress","_onSubmitUpdatePrimaryAddress","customerInformation","IsAsyncCustomer","_attachMapAutoSuggest","_this$autoSuggest2","isMapApiLoaded","onAddressAddUpdate","formattedValue","_onCountryChange","_onAddressUpdate","onSuccess","addressCommon","currentOperation","Update","_onAddOrUpdateSuccess","_this$autoSuggest3","twoLetterISORegionName","TwoLetterISORegionName","_getAddressFormatExcludeList","addressFormatExcludeList","showAddressType","_getStateProvinces","Add","_updateCurrentOperation","operation","_onUpdatePrimaryAddressSuccess","Deactivate","removeAddressData","_renderScreenReaderRemoveText","notification","formatNotification","removeAddressNotification","_setDefaultCountryRegionId","channel","autoSuggestionEnabled","BingMapsEnabled","ChannelCountryRegionISOCode","DefaultLanguageId","_this$props$data$stor","_this$autoSuggest4","_this$props$data$stor2","_this$props$data$stor3","_this$autoSuggest5","_data$featureState","_data$featureState2","_this$props$context$a2","featureState","feature","IsEnabled","infoMessageBar","accountProcessingPendingInfoMessageCanAddAddress","accountProcessingPendingInfoMessage","isShowAddresList","isShowAddOrUpdateAddress","AccountAddressManagement","showAddressList","showAddOrUpdateAddress","screenReaderNotification","AddressLists","BusinessAccountAddress","excludedList","_resetAddressFields","countryStates","_data$countryStates$r","Company","_updateAddress","_updateCountryRegionId","updateForm","cleanValue","_isEmpty","_isInputRequired","addressItemValue","ObjectExtensions","isNullOrUndefined","resetAddress","_request$channel","BusinessPartnerPromotionTermsParagraph","titleClassName","BusinessPartnerPromotion","onCheckBoxChange","termsOfServiceChecked","onToggleTermOfServiceModal","termsOfServiceModalOpened","_data$b2bUserInformat","_data$b2bUserInformat2","errorMessageText","promoteToSellerSubmitSuccessMessage","businessPartnerId","b2bUserInformation","BusinessPartnerId","promoteToSellerAsync","showSubmitButton","showTermsOfService","notificationMessage","_unused","termsOfService","authorizationErrorMessage","canSubmit","isAdminUser","btnEnabled","businessPartnerPromotionProps","Text","renderNotificationBar","sellerDescriptions","renderSellerDescriptions","termsOfServiceCheckbox","termsOfServiceLinkText","termsOfServiceAgreementText","termsOfServiceModal","horizontalPosition","verticalPosition","toggle","ModalHeader","termsOfServiceModalHeading","MsDyn365","submitButton","submitRequestLabel","notificationBar","color","results","idx1","_description$bulletPo","bulletPoints","bulletPoint","idx2","StringExtensions","isNullOrEmpty","IsAdmin","EnabledPaymentsForOBO","ModuleStatesCacheKey","getCacheKey","getCacheObjectType","getModuleStates","moduleStates","update","updateModuleStates","WrappedComponent","_super","ModuleState","call","initializeState","_b","states","__assign","_a","isCancellable","isSubmitContainer","getModuleStateManager","validate","isCancelAllowed","setIsRequired","setIsCancellable","setIsSubmitContainer","onPending","onDisable","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","values","_moduleState","modules","_validateLeaf","module","isMatch","_validateContainer","allMatched","skipSkippableItem","_isPaymentSectionContainer","__extends","prototype","WaitingComponent","Waiting","CheckoutExpressPaymentContainer","_getItems","_handleCheckoutExpressContainerHeadingChange","checkoutExpressPaymentContainerHeading","shouldHideExpressPaymentContainer","shippingAddressFromExpressCheckout","isExpressPaymentModulesReady","extensionPropertyKey","paymentTenderType","isModuleReady","property","Key","Value","BooleanValue","isExpressCheckoutApplied","_checkout$result","_checkout$result2","checkoutExpressPaymentSectionLoadingMessage","isPaymentVerificationRedirection","isOBORequest","ExpressPayment","shouldHideExpressPaymentContainerClassName","waiting","_renderMsdyn365Text","headerProps","ContainerItemsComponent","isLoadingClassName","renderCustomerName","accountInformation","customer","FirstName","_renderReactFragment","slot","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","navIcon","logo","search","preferredStore","renderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","_renderAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuLinksContainer","mobileMenuCollapsed","Collapse","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","wishListIconMobile","menuBar","_renderCollapseMenu","createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","modalHeader","createModalBody","modalFooter","renderSort","renderRefiner","refiners","RefineMenuContainer","RefinerSectionContainer","submenu","SortingContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","category","renderTitle","TitleContainer","titlePrefix","titleText","titleCount","_props$context$action","SearchResultContainer","pagination","ProductsContainer","ProductSectionContainer","choiceSummary","isMobile","modalToggle","searchResultModal","TitleViewProps","categoryHierarchy","sortByOptions","CategoryNavContainer","RefineAndProductSectionContainer","FeatureSearchContainer","similarLookProduct","query","recommendation","ProductComparisonButton","_addToProductComparison","_this$props$data$acco","ProductComparisonItem","catalogId","ProductComparisonState","instance","addItem","_removeFromProductComparison","_this$props$data$acco2","removeItemById","comparisonItemId","_getNewState","_this$props$data$acco3","getItemId","_getProdutComparisonDataByCatalogId","canProductBeAddedToProductComparison","hasItemById","currentProductsCount","_className","_instanceId","Random","Guid","generateGuid","_shouldUsePreview","_productComparisonPreview","_renderProductComparisonPreview","productComparisonPreview","buttonText","onClickHandler","_this$props$data$acco4","listModifiedEvent","subscribe","instanceId","handler","getSnapshotBeforeUpdate","previousProps","componentWillUnmount","_this$props$data$acco5","unsubscribe","cookies","isConsentGiven","buttonClassName","shouldDisplayText","removeFromComparisonButtonText","productComparisonButton","_renderProductComparisonButton","productsLimit","_getProductsLimit","addToComparisonLimitReachedButtonText","addToComparisonButtonText","viewport","variant","VariantType","Browser","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","_this$props$data$acco6","_items$filter","getCatalogId","ProductComparisonButtonViewFunctionalComponent"],"sourceRoot":""}