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I,EAEgC,QAAhCrgD,EAASm/C,EAAWS,EAAIC,KAAc,CAC5C,IAAIS,EAAWhhD,EAASU,EAAO,IAC/BogD,EAAEC,GAAKC,EACU,KAAbA,IAAiBV,EAAGO,UAAYjB,EAAmBW,EAAGd,EAASa,EAAGO,WAAYF,IAClFI,IAEF,OAAa,IAANA,EAAU,KAAOD","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/shipping-service/shipping-service.tsx?7648","webpack://msdyn365.commerce.online/./src/modules/smwe-iframe/smwe-iframe.tsx?648b","webpack://msdyn365.commerce.online/./src/modules/smwe-iframe/smwe-iframe.view.tsx?773b","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/themes/blend/views/checkout-apple-pay.view.tsx?3ceb","webpack://msdyn365.commerce.online/./src/themes/colsolare/views/checkout-apple-pay.view.tsx?a15c","webpack://msdyn365.commerce.online/./src/themes/columbiacrest/views/checkout-apple-pay.view.tsx?98f1","webpack://msdyn365.commerce.online/./src/themes/conn-creek/views/checkout-apple-pay.view.tsx?24d7","webpack://msdyn365.commerce.online/./src/themes/emp/views/checkout-apple-pay.view.tsx?26de","webpack://msdyn365.commerce.online/./src/themes/emp/views/checkout-delivery-options.view.tsx?2b29","webpack://msdyn365.commerce.online/./src/themes/erath/views/checkout-apple-pay.view.tsx?f1b6","webpack://msdyn365.commerce.online/./src/themes/fth/views/checkout-apple-pay.view.tsx?733f","webpack://msdyn365.commerce.online/./src/themes/generazioni/views/checkout-apple-pay.view.tsx?449b","webpack://msdyn365.commerce.online/./src/themes/north-star/views/checkout-apple-pay.view.tsx?5070","webpack://msdyn365.commerce.online/./src/themes/patzhall/views/checkout-apple-pay.view.tsx?1b9c","webpack://msdyn365.commerce.online/./src/themes/spring-valley-vineyard/views/checkout-apple-pay.view.tsx?033f","webpack://msdyn365.commerce.online/./src/themes/stagsleap/views/checkout-apple-pay.view.tsx?ffc1","webpack://msdyn365.commerce.online/./src/themes/stemichelle/views/checkout-apple-pay.view.tsx?1571","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/breadcrumb/components/link.tsx?d232","webpack://msdyn365.commerce.online/./src/modules/breadcrumb/components/separator.tsx?92bb","webpack://msdyn365.commerce.online/./src/modules/breadcrumb/breadcrumb.tsx?efcc","webpack://msdyn365.commerce.online/./src/modules/breadcrumb/breadcrumb.view.tsx?4b3d","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/components/sign-up-button.tsx?e1d9","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/components/sign-up-error.tsx?7f8a","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/components/sign-up-input.tsx?5bbe","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/components/sign-up-label.tsx?4988","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/components/sign-up-radio-button.tsx?f8c1","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/business-sign-up.tsx?13a2","webpack://msdyn365.commerce.online/./src/modules/business-sign-up/business-sign-up.view.tsx?e2f8","webpack://msdyn365.commerce.online/./src/modules/business-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/modules/country-picker/country-picker.tsx?4fcb","webpack://msdyn365.commerce.online/./src/modules/country-picker/country-picker.view.tsx?0036","webpack://msdyn365.commerce.online/./src/modules/fabrikam/views/buybox.view.tsx?aec4","webpack://msdyn365.commerce.online/./src/modules/fabrikam/views/navigation-menu.view.tsx?bc23","webpack://msdyn365.commerce.online/./src/modules/footer-category/footer-category.tsx?e0bd","webpack://msdyn365.commerce.online/./src/modules/footer-category/footer-category.view.tsx?fdce","webpack://msdyn365.commerce.online/./src/modules/invoice-details/components/invoice-details-header.tsx?a6c6","webpack://msdyn365.commerce.online/./src/modules/invoice-details/components/invoice-details-payment-summary.tsx?3434","webpack://msdyn365.commerce.online/./src/modules/invoice-details/components/invoice-details-products.tsx?8f29","webpack://msdyn365.commerce.online/./src/modules/invoice-details/helpers/invoice-data.ts?608f","webpack://msdyn365.commerce.online/./src/modules/invoice-details/invoice-details.tsx?b51a","webpack://msdyn365.commerce.online/./src/modules/invoice-details/invoice-details.view.tsx?3784","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/invoice-error-component.tsx?2ff9","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/invoices-filter-component.tsx?5fd4","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?f5e1","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?48db","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9790","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/make-payment-component.tsx?1427","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/pay-invoice-component.tsx?6f61","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/request-invoice-button.tsx?9eb0","webpack://msdyn365.commerce.online/./src/modules/invoices-list/helpers/invoice-data.ts?00b1","webpack://msdyn365.commerce.online/./src/modules/invoices-list/helpers/invoice-status.ts?5841","webpack://msdyn365.commerce.online/./src/modules/invoices-list/helpers/pay-invoices.ts?30c0","webpack://msdyn365.commerce.online/./src/modules/invoices-list/components/request-invoice-modal.tsx?f9b5","webpack://msdyn365.commerce.online/./src/modules/invoices-list/invoices-list.tsx?2d55","webpack://msdyn365.commerce.online/./src/modules/invoices-list/invoices-list.view.tsx?8b51","webpack://msdyn365.commerce.online/./src/modules/map/map.tsx?6111","webpack://msdyn365.commerce.online/./src/modules/map/map.view.tsx?5db9","webpack://msdyn365.commerce.online/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?f0c8"],"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. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n getRichTextHtml,\r\n IImageSettings,\r\n Image\r\n} from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport {\r\n ILinksData,\r\n IShippingServiceConfig,\r\n IShippingServiceProps\r\n} from './shipping-service.props.autogenerated';\r\n\r\n/**\r\n *\r\n * ShippingService component\r\n * @extends {React.PureComponent}\r\n */\r\nclass ShippingService extends React.PureComponent<\r\n IShippingServiceProps\r\n> {\r\n public render(): JSX.Element | null {\r\n if (!(this.props && this.props.config)) {\r\n return null;\r\n }\r\n\r\n const content = this.props.config;\r\n const lazyloadConfig: boolean | undefined =\r\n (content && content.lazyload) || false;\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=148&h=174&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=148&h=174&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: lazyloadConfig\r\n };\r\n return (\r\n
\r\n {content.heading && (\r\n \r\n )}\r\n {content.image && (\r\n \r\n )}\r\n {content.paragraph && (// tslint:disable-next-line:react-no-dangerous-html\r\n
\r\n )}\r\n {content.links && content.links.length\r\n ? content.links.map((cta: ILinksData, index: number) => (\r\n \r\n {cta.linkText}\r\n \r\n ))\r\n : false}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default ShippingService;\r\n","import { Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IHeadingData, ISmweIframeConfig, ISmweIframeProps } from './smwe-iframe.props.autogenerated';\r\n\r\nexport interface IIframeViewProps extends ISmweIframeProps {\r\n Heading: React.ReactNode;\r\n IframeContainer: IModuleProps;\r\n IFrame: React.ReactNode;\r\n alert?: React.ReactNode;\r\n cookieConsentAccepted?: boolean;\r\n}\r\n\r\n/**\r\n *\r\n * Iframe component\r\n * @extends {React.PureComponent}\r\n */\r\nclass Iframe extends React.PureComponent> {\r\n private iframeRef: React.RefObject;\r\n constructor(props: ISmweIframeProps) {\r\n super(props);\r\n this.iframeRef = React.createRef();\r\n }\r\n public render(): JSX.Element | null {\r\n const { config, resources } = this.props;\r\n const isConsentGiven =\r\n this.props.context.request &&\r\n this.props.context.request.cookies &&\r\n this.props.context.request.cookies.isConsentGiven &&\r\n this.props.context.request.cookies.isConsentGiven();\r\n\r\n if (!(config && config.target && config.target.destinationUrl)) {\r\n return null;\r\n }\r\n\r\n let srcURL;\r\n try {\r\n srcURL = new URL(config.target.destinationUrl);\r\n } catch (error) {\r\n this.props.telemetry.exception(error);\r\n return null;\r\n }\r\n\r\n if (srcURL && srcURL.protocol && srcURL.protocol.toLocaleLowerCase() !== 'https:') {\r\n return null;\r\n }\r\n const iframeClassName = classnames('ms-iframe', config.className);\r\n\r\n let viewProps: IIframeViewProps = {\r\n ...(this.props as ISmweIframeProps),\r\n Heading: this._createHeading(config.heading!),\r\n IframeContainer: {\r\n moduleProps: this.props,\r\n className: iframeClassName\r\n },\r\n IFrame: this._createIframe()\r\n };\r\n\r\n if (isConsentGiven === false) {\r\n viewProps = {\r\n ...viewProps,\r\n alert: this._renderAlert(resources.cookieConsentRequiredMessage)\r\n };\r\n } else {\r\n viewProps = {\r\n ...viewProps,\r\n cookieConsentAccepted : true\r\n };\r\n }\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n private _createHeading(heading: IHeadingData): React.ReactNode | null {\r\n if (!heading || !heading.text || !heading.text.length) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _renderAlert(message: string): React.ReactNode | null {\r\n return (\r\n

\r\n {message}\r\n

);\r\n }\r\n\r\n private _createIframe(): React.ReactNode | null {\r\n const { config } = this.props;\r\n const targetURL = config.target.destinationUrl;\r\n const style: React.CSSProperties = {height: '100%', width: '100%'};\r\n\r\n return (\r\n // tslint:disable-next-line: react-iframe-missing-sandbox\r\n \r\n );\r\n }\r\n\r\n}\r\n\r\nexport default Iframe;\r\n","import { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { IIframeViewProps } from './smwe-iframe';\r\n\r\n/**\r\n *\r\n * IFrameView component\r\n * @extends {React.PureComponent}\r\n */\r\nexport class IFrameView extends React.PureComponent {\r\n\r\n public render(): JSX.Element | null {\r\n const { Heading, IframeContainer, IFrame, alert, cookieConsentAccepted } = this.props;\r\n\r\n return (\r\n \r\n {alert}\r\n {cookieConsentAccepted && cookieConsentAccepted === true ? (\r\n <>\r\n {Heading}\r\n {IFrame}\r\n ) : null}\r\n \r\n );\r\n }\r\n}\r\nexport default IFrameView;","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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\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 { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsError, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-delivery-options';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { DeliveryOption as DeliveryOptionData } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\ninterface ICheckoutDeliveryOptionsListFiltered extends ICheckoutDeliveryOptionsList {\r\n globalConfig?: {\r\n [x: string]: unknown;\r\n };\r\n options?: DeliveryOptionData[];\r\n}\r\n\r\ntype ModShipping = {\r\n id: number;\r\n amount: number;\r\n}[];\r\n\r\nconst DeliveryOptionList: React.FC = ({\r\n DeliveryOptionsList,\r\n list,\r\n globalConfig,\r\n options\r\n}) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n const pennyShippingMethodIds = globalConfig?.pennyShippingIds as number[] || [];\r\n const modShippingMethodIds = globalConfig?.modShippingIds as ModShipping || [];\r\n let localList: ICheckoutDeliveryOptionEdit[] = [];\r\n if (options) {\r\n // maps options with list for sorting\r\n const combinedList: {option: DeliveryOptionData; list: ICheckoutDeliveryOptionEdit}[] = [];\r\n options.map((option, index) => combinedList.push({option: option, list: list[index]}));\r\n // sort list by lowest to highest price\r\n const combinedListSorted = combinedList.sort((a, b) => (a.option.ShippingChargeAmount! > b.option.ShippingChargeAmount!) ? 1 : ((b.option.ShippingChargeAmount! > a.option.ShippingChargeAmount!) ? -1 : 0));\r\n combinedListSorted.forEach((deliveryData) => {\r\n if (deliveryData.list) {\r\n // search to find out if it is a mod shipping method\r\n const isModShippingMethod = modShippingMethodIds.find(modShipping => Number(modShipping.id) === deliveryData.option.RecordId);\r\n // backwards compatibility for penny shipping\r\n const isPennyShippingMethod = pennyShippingMethodIds.find(pennyShipping => Number(pennyShipping) === deliveryData.option.RecordId);\r\n\r\n // Filter out mod shipping methods that are declared\r\n // in the global config, only show shipping methods\r\n // that have a matching mod price for the customer at this current time\r\n // of checkout. If it's not a mod shipping method, always display\r\n // it.\r\n if (isModShippingMethod && deliveryData.option.ShippingChargeAmount === isModShippingMethod.amount) {\r\n localList.push(deliveryData.list);\r\n } else if (isPennyShippingMethod && deliveryData.option.ShippingChargeAmount === 0.01) {\r\n localList.push(deliveryData.list);\r\n } else if (!isModShippingMethod && !isPennyShippingMethod) {\r\n localList.push(deliveryData.list);\r\n }\r\n }\r\n });\r\n }\r\n // just in case options doesn't load in, fail safely back to the original\r\n // list\r\n if (localList.length === 0) { localList = list; }\r\n return (\r\n \r\n {localList.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n \r\n {deliveryOption.price}\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst DeliveryOptionSelected: React.FC = ({\r\n DeliveryOption,\r\n description,\r\n price,\r\n}) => {\r\n\r\n return (\r\n \r\n {description}\r\n {price}\r\n \r\n );\r\n};\r\n\r\nconst ErrorMessage: React.FC = ({\r\n Error,\r\n title,\r\n message,\r\n}) => {\r\n\r\n return (\r\n \r\n {title}\r\n {message}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutDeliveryOptionsView: React.FC = props => {\r\n const { CheckoutDeliveryOptions,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionsData,\r\n deliveryOptionSelected,\r\n errorMessage,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton } = props;\r\n return (\r\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\r\n \r\n {viewState.isLoading && waiting}\r\n {viewState.isError && errorMessage && }\r\n {viewState.isShowList && deliveryOptions && }\r\n {viewState.isShowSelected && deliveryOptionSelected && }\r\n {viewState.isShowSaveButton && saveButton}\r\n {viewState.isShowEditButton && editButton}\r\n {viewState.isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsView;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface ILink {\n className?: string;\n text?: string;\n href?: string;\n ariaLabel?: string;\n index: string;\n noclick?: boolean;\n telemetryContent: ITelemetryContent;\n}\n\nexport const Link: React.FC = ({ text, className, href, ariaLabel, index, noclick, telemetryContent }) => {\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\n\n const linkText = text !== undefined ? text : '';\n payLoad.contentAction.etext = linkText;\n\n // Construct telemetry attribute to render\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n\n return (\n \n {linkText}\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\ninterface ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => (\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBreadcrumbData } from './breadcrumb.data';\nimport { IBreadcrumbProps, ILinksData } from './breadcrumb.props.autogenerated';\nimport { Link } from './components/link';\nimport { Separator } from './components/separator';\n\nexport interface IBreadcrumbViewProps extends IBreadcrumbProps {\n root?: React.ReactNode;\n links?: React.ReactNode[];\n backButton?: React.ReactNode;\n separator?: React.ReactNode;\n BreadcrumbContainer: IModuleProps;\n BreadcrumbList: INodeProps;\n BreadcrumbListItem: INodeProps;\n}\n\n/**\n *\n * Breadcrumb component.\n * @extends {React.PureComponent>}\n */\nclass Breadcrumb extends React.PureComponent> {\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public render(): JSX.Element | null {\n const { className } = this.props.config;\n let rootLink = null;\n let breadcrumbLinks = null;\n let backButtonComponent = null;\n rootLink = this._getRootLink();\n const itemPosition = rootLink ? 1 : 0;\n if (this._pageType === 'Category') {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n if (!breadcrumbLinks) {\n breadcrumbLinks = this._getCategoryHierarchy(itemPosition);\n }\n } else if (this._pageType === 'Product') {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n if (!breadcrumbLinks) {\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n if (breaCrumbType === 'category') {\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n if (breaCrumbType === 'categoryAndBack') {\n backButtonComponent = this._getPDPBackButton();\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n if (breaCrumbType === 'back') {\n backButtonComponent = this._getPDPBackButton();\n if (backButtonComponent === null) {\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n }\n }\n } else {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n }\n const linkSeparator = ;\n\n const breadcrumbViewProps = {\n ...this.props,\n BreadcrumbContainer: {\n moduleProps: this.props,\n className: classnames('ms-breadcrumb', className),\n tag: 'nav',\n role: 'navigation'\n },\n BreadcrumbList: {\n tag: 'ol' as NodeTag,\n className: 'ms-breadcrumb_list'\n },\n BreadcrumbListItem: {\n tag: 'li',\n className: 'ms-breadcrumb_item'\n },\n root: rootLink,\n links: breadcrumbLinks,\n backButton: backButtonComponent,\n separator: linkSeparator\n };\n return this.props.renderView(breadcrumbViewProps) as React.ReactElement;\n }\n\n private readonly _getRootLink = (): JSX.Element | null => {\n const { root } = this.props.config;\n if (!root || !root.linkUrl || !root.linkUrl.destinationUrl) {\n this.props.context.telemetry.error('BreadCrumb link url content is empty, link wont render');\n return null;\n }\n return (\n \n );\n };\n\n private readonly _getCustomBreadcrumbLinks = (itemPosition: number): JSX.Element[] | null => {\n const { links } = this.props.config;\n\n if (!links || links.length === 0) {\n this.props.context.telemetry.error('BreadCrumb links content is empty, links wont render');\n return null;\n }\n const defaultValueToSubtract = 1;\n return links.map((value: ILinksData, index: number) => {\n itemPosition++;\n const keyIndex = index;\n return index !== links.length - defaultValueToSubtract ? (\n \n ) : (\n
\n {value.linkText}\n
\n );\n });\n };\n\n private readonly _getCategoryHierarchy = (itemPosition: number): JSX.Element[] | null => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n if (!categoryHierarchy) {\n this.props.context.telemetry.error('Category Hierarchy content is empty, module wont render');\n return null;\n }\n return categoryHierarchy.map((value: CategoryHierarchy, index: number) => {\n itemPosition++;\n\n const friendlyName = this._getFriendlyName(this.props.context.request.locale, value.NameTranslations);\n\n return (\n \n );\n });\n };\n\n /**\n * The function to get translation name for the locale.\n * @param locale - The locale information.\n * @param nameTranslations - The name translations names.\n * @returns - The translation name for the locale.\n */\n private readonly _getFriendlyName = (locale: string, nameTranslations?: TextValueTranslation[]): string | undefined => {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n // If friendly name for current locale is null, should use default locale.\n if (nameTranslation === undefined && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations[0];\n }\n\n return nameTranslation?.Text;\n };\n\n private readonly _getPDPLinks = (itemPosition: number): JSX.Element[] | null => {\n const { data, config } = this.props;\n const categoryHierarchy = data.categoryPaths.result;\n const product = data.product.result;\n const url = this.props.context.request.url.requestUrl.href;\n if (!categoryHierarchy) {\n this.props.context.telemetry.error('Category path content is empty for the product');\n return null;\n }\n const links: JSX.Element[] = [];\n\n categoryHierarchy.map((value: ICategoryUrl, index: number) => {\n itemPosition++;\n links.push(\n \n );\n });\n if (product && !config.hideProductName) {\n itemPosition++;\n links.push(\n \n );\n }\n return links;\n };\n\n private readonly _goBack = (): void => {\n window.history.back();\n };\n\n private readonly _getPDPBackButton = (): JSX.Element | null => {\n const isBackAllowed =\n this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.back;\n if (!isBackAllowed) {\n return null;\n }\n if (MsDyn365.isBrowser && (document.referrer === '' || window.history.length < 2)) {\n return null;\n }\n return (\n \n {this.props.resources.backToResultsText}\n \n );\n };\n}\n\nexport default Breadcrumb;\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 classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBreadcrumbViewProps } from './breadcrumb';\n\nconst BreadCrumbView: React.FC = props => {\n const { root, links, backButton, BreadcrumbContainer, BreadcrumbList, BreadcrumbListItem, separator } = props;\n if (!root && !links && !backButton) {\n props.context.telemetry.error('BreadCrumb content is empty, module wont render');\n return null;\n }\n return (\n \n \n {root && (\n \n {root}\n {links && separator}\n \n )}\n {backButton && {backButton}}\n {links &&\n links.map((link, index) => (\n \n \n {link}\n {links[index + 1] && separator}\n \n \n ))}\n \n \n );\n};\n\nexport default BreadCrumbView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpButtonProps {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n link?: string;\n telemetryContent: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nexport const SignUpButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n telemetryContent,\n disabled,\n link,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent, text);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignUpButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nexport const SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n

{message}

\n
\n );\n};\n\nexport default SignUpError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InputType } from '../business-sign-up';\n\nexport interface IBusinessSignUpInputProps {\n id?: string;\n type: InputType;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n isRequired: boolean;\n fieldReference?: React.RefObject;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IBusinessSignUpInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nexport const SignUpInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n isRequired,\n onChange,\n fieldReference\n}) => {\n if (type === InputType.TextArea) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n\nexport default SignUpInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessSignUpLabelProps {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nexport const SignUpLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignUpLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessSignUpRadioButtonProps {\n id: string;\n isRequired: boolean;\n options: IBusinessSignUpRadioButtonOptionProps[];\n}\n\nexport interface IBusinessSignUpRadioButtonOptionProps {\n id: string;\n name: string;\n value: string;\n label: string;\n className: string;\n onChange(event: React.ChangeEvent): void;\n}\n\nexport const BusinessSignUpRadioButtonOption: React.FC = props => {\n const { id, name, value, label, className, onChange } = props;\n return (\n
\n \n \n
\n );\n};\n\nexport default BusinessSignUpRadioButtonOption;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ContentEditableEvent, getUrlSync, RichTextComponent, Text } from '@msdyn365-commerce/core';\nimport { Address, BusinessPartnerProspect } from '@msdyn365-commerce/retail-proxy';\nimport { createProspectAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBusinessSignUpConfig, IBusinessSignUpProps } from './business-sign-up.props.autogenerated';\nimport { SignUpButton, SignUpError, SignUpInput, SignUpLabel } from './components';\nimport { IBusinessSignUpRadioButtonOptionProps, BusinessSignUpRadioButtonOption } from './components/sign-up-radio-button';\n\nexport interface IBusinessSignUpExtendedProps extends IBusinessSignUpProps {\n formItems?: IFormItem[];\n}\n\nexport interface IBusinessSignUpItem {\n wrapper: INodeProps;\n isAddressInput?: boolean;\n id: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input?: React.ReactNode;\n}\n\nexport interface IBusinessState {\n isReady: boolean;\n formItems: IFormItem[];\n addressHasErrors: boolean;\n showAddressErrors: boolean;\n hasSubmitErrors: boolean;\n}\n\nexport interface IBusinessSignUpLocalAccount {\n FormWrapper: INodeProps;\n items: IBusinessSignUpItem[];\n buttons: React.ReactNode[];\n errorMessage: React.ReactNode[];\n disclaimer: React.ReactNode;\n}\n\nexport interface IBusinessSignUpViewProps {\n className: string;\n businessSignUp: IModuleProps;\n ContainerWrapper: INodeProps;\n heading: React.ReactNode;\n businessSignUpForm: IBusinessSignUpLocalAccount;\n formItems: IFormItem[];\n}\n\nexport interface IFormItem {\n id: string;\n type: InputType;\n label: string;\n value: string;\n maxChars?: string;\n isRequired: boolean;\n pattern?: string;\n address?: Address;\n customClass?: string;\n fieldReference?: React.RefObject;\n radioButtonOptions?: IBusinessSignUpRadioButtonOptionProps[];\n radioButtonGroupClass?: string;\n}\n\nexport enum InputType {\n // eslint-disable-next-line @typescript-eslint/no-shadow -- Text enum doesn't override the imported Text\n Text = 'text',\n Address = 'address',\n Email = 'email',\n TextArea = 'textarea',\n RadioButton = 'radiobutton'\n}\n\nexport enum InputID {\n FirstName = 'FirstName',\n LastName = 'LastName',\n Email = 'CompanyEmail',\n CompanyName = 'CompanyName',\n Address = 'CompanyAddress',\n JobTitle = 'JobTitle',\n Size = 'CompanySize',\n Department = 'Department',\n Comment = 'Comment',\n ProspectType = 'ProspectType'\n}\n\nexport const renderInputSection = (\n inputs: IFormItem[],\n className: string,\n needToReset: boolean,\n onInputChange: (event: React.ChangeEvent) => void,\n showErrors: boolean,\n addressForm?: React.ReactNode,\n updateAddress?: (errors: boolean, currAddress?: Address) => void\n): IBusinessSignUpItem[] => {\n return inputs.map((element, index) => {\n const {\n id,\n type,\n label,\n maxChars,\n isRequired,\n pattern,\n customClass,\n value,\n fieldReference,\n radioButtonOptions,\n radioButtonGroupClass\n } = element;\n\n const baseSignUpItem: IBusinessSignUpItem = {\n wrapper: {\n className: classnames(className, `${className}-${id}`, customClass)\n },\n id,\n label: ,\n errorMessage: \n };\n\n if (type === InputType.Address) {\n if (addressForm) {\n baseSignUpItem.isAddressInput = true;\n baseSignUpItem.input = (\n <>\n {React.cloneElement(addressForm as React.ReactElement, {\n updateForm: updateAddress,\n hasError: showErrors,\n isRequired: isRequired === undefined ? false : isRequired,\n resetAddress: needToReset\n })}\n \n );\n } else {\n // If the address slot is not filled, remove this input from the form\n inputs.splice(index, 1);\n }\n } else if (type === InputType.RadioButton) {\n baseSignUpItem.input = (\n
\n {radioButtonOptions &&\n radioButtonOptions.map((element, index) => {\n return ;\n })}\n
\n );\n } else {\n baseSignUpItem.input = (\n \n );\n }\n\n return baseSignUpItem;\n });\n};\n\n/**\n *\n * Business Request Form Modules\n * Form that a business can use to submit a request to become a partner with Microsoft.\n * @extends {React.Component>}\n */\nclass BusinessSignUp extends React.Component {\n private readonly moduleClassName: string = 'ms-business-sign-up';\n private readonly prospectRadioButtonName: string = 'business-sign-up-radio-button';\n\n // Used as default data\n // eslint-disable-next-line @typescript-eslint/member-ordering\n public BusinessSignUpDefaultInputs: IFormItem[] = [\n {\n id: InputID.ProspectType,\n type: InputType.RadioButton,\n label: this.props.resources.prospectTypeLabel,\n value: '',\n isRequired: true,\n customClass: 'width-100',\n radioButtonGroupClass: 'radio-option-container',\n radioButtonOptions: [\n {\n id: `${InputID.ProspectType}-buyer`,\n name: this.prospectRadioButtonName,\n value: '1', // Buyer\n label: this.props.resources.prospectTypeBuyerLabel,\n className: `${this.moduleClassName}__form-item-radio-button-option`,\n onChange: this._onInputChange.bind(this)\n },\n {\n id: `${InputID.ProspectType}-seller`,\n name: this.prospectRadioButtonName,\n value: '2', // Seller\n className: `${this.moduleClassName}__form-item-radio-button-option`,\n label: this.props.resources.prospectTypeSellerLabel,\n onChange: this._onInputChange.bind(this)\n }\n ]\n },\n {\n id: InputID.FirstName,\n type: InputType.Text,\n label: this.props.resources.firstNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.LastName,\n type: InputType.Text,\n label: this.props.resources.lastNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.Email,\n type: InputType.Email,\n label: this.props.resources.emailAddressLabel,\n value: '',\n isRequired: true,\n pattern: EmailRegex.defaultRegex.source,\n customClass: 'width-50'\n },\n {\n id: InputID.CompanyName,\n type: InputType.Text,\n label: this.props.resources.companyLabel,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.Department,\n type: InputType.Text,\n label: this.props.resources.departmentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.JobTitle,\n type: InputType.Text,\n label: this.props.resources.jobTitleLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Size,\n type: InputType.Text,\n label: this.props.resources.companySizeLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Address,\n type: InputType.Address,\n label: this.props.resources.companyAddressLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n },\n {\n id: InputID.Comment,\n type: InputType.TextArea,\n label: this.props.resources.commentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n }\n ];\n\n private readonly formChildReference: React.RefObject = React.createRef();\n\n private needsToReset: boolean = false;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IBusinessSignUpExtendedProps) {\n super(props);\n\n this.state = {\n isReady: false,\n formItems: this.props.formItems || this._addedReference(),\n addressHasErrors: false,\n showAddressErrors: false,\n hasSubmitErrors: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this.formChildReference.current?.focus();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessSignUpExtendedProps, nextState: IBusinessState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { formItems } = this.state;\n const { className, heading } = config;\n\n const viewProps = {\n ...this.props,\n businessSignUp: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n ContainerWrapper: {\n className: `${this.moduleClassName}__container`\n },\n heading: (\n \n ),\n businessSignUpForm: this._renderForm(),\n formItems\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle the heading change event.\n * @param event - Content Editable Event.\n */\n public handleHeadingChange = (event: ContentEditableEvent): void => {\n this.props.config.heading.text = event.target.value;\n };\n\n private _renderForm(): IBusinessSignUpLocalAccount {\n const { config, resources, slots } = this.props;\n const { showAddressErrors, hasSubmitErrors, isReady, formItems } = this.state;\n const {\n signUpButtonArialabel,\n signUpButtonText,\n cancelButtonArialabel,\n cancelButtonText,\n errorMessage,\n partialAddressErrorMessage\n } = resources;\n const addressForm = (slots && slots.addressSlot && slots.addressSlot.length > 0 && slots.addressSlot[0]) || undefined;\n\n const form = {\n FormWrapper: {\n className: `${this.moduleClassName}__form `\n },\n items: renderInputSection(\n formItems,\n `${this.moduleClassName}__form-item`,\n this.needsToReset,\n this._onInputChange.bind(this),\n showAddressErrors,\n addressForm,\n this._onAddressChange\n ),\n buttons: [\n ,\n \n ],\n errorMessage: [\n hasSubmitErrors && ,\n showAddressErrors && (\n \n )\n ],\n disclaimer: config.disclaimer && (\n \n )\n };\n\n if (this.needsToReset) {\n this.needsToReset = false;\n }\n\n return form;\n }\n\n private _onInputChange(event: React.ChangeEvent): void {\n const newForm = this.state.formItems;\n newForm.forEach(item => {\n if (item.type === InputType.RadioButton && event.target.name === this.prospectRadioButtonName) {\n item.value = event.target.value;\n } else if (item.id === event.target.id) {\n item.value = event.target.value;\n }\n });\n\n // Check if form is ready, update state object with latest values, values have changed so reset hasSubmitErrros\n this.setState({\n isReady: this._isFormReady(),\n formItems: newForm,\n hasSubmitErrors: false\n });\n }\n\n private _addedReference(): IFormItem[] {\n const newFormFields = this.BusinessSignUpDefaultInputs;\n newFormFields[0].fieldReference = this.formChildReference;\n return newFormFields;\n }\n\n private readonly _onAddressChange = (errors: boolean, currentAddress?: Address): void => {\n // Find address item\n const newForm = this.state.formItems;\n const addressItem = newForm.find(item => {\n return item.type === InputType.Address;\n });\n\n // If found --> set to currentAddress\n if (addressItem) {\n addressItem.address = currentAddress;\n\n // Update state with new values and set errors to false if address is not required field\n this.setState(\n {\n formItems: newForm,\n addressHasErrors: errors,\n showAddressErrors: false\n },\n () => {\n this.setState({ isReady: this._isFormReady() });\n }\n );\n }\n };\n\n private readonly _isFormReady = (): boolean => {\n const { formItems } = this.state;\n\n for (const currentInput of formItems) {\n // Will return FALSE if:\n // - input field is required\n // IF is address AND addressHasErrors === true\n // ELSE value is undefined OR empty\n // OR\n // - pattern provided and value does not match pattern\n\n if (currentInput.isRequired) {\n if (currentInput.type === InputType.Address) {\n if (this.state.addressHasErrors) {\n return false;\n }\n } else if (currentInput.value === undefined || currentInput.value === '') {\n return false;\n }\n }\n if (currentInput.pattern !== undefined && currentInput.value.match(currentInput.pattern) === null) {\n return false;\n }\n }\n\n return true;\n };\n\n private readonly _onSubmit = (event: React.MouseEvent) => {\n if (this.state.addressHasErrors) {\n this.setState({\n showAddressErrors: true\n });\n\n event.preventDefault();\n return;\n }\n\n const { config, context } = this.props;\n\n // Check for matching id and if not empty\n const firstName = this._getItem(InputID.FirstName);\n const lastName = this._getItem(InputID.LastName);\n const companyName = this._getItem(InputID.CompanyName);\n const companyEmail = this._getItem(InputID.Email);\n const companyAddress = this._getItem(InputID.Address, true);\n const jobTitle = this._getItem(InputID.JobTitle);\n const department = this._getItem(InputID.Department);\n const companySize = this._getItem(InputID.Size);\n const comments = this._getItem(InputID.Comment);\n const prospectType = this._getItem(InputID.ProspectType);\n\n // API gets email as part of the address object, but I do not use the email input from the address component, thus we need to copy it over\n if (companyEmail && companyEmail.value && companyAddress && companyAddress.address) {\n companyAddress.address.Email = companyEmail.value;\n }\n\n const newPartner: BusinessPartnerProspect = {\n FirstName: firstName && firstName.value,\n LastName: lastName && lastName.value,\n CompanyName: companyName && companyName.value,\n Address: companyAddress && companyAddress.address && companyAddress.address,\n JobTitle: jobTitle && jobTitle.value,\n Department: department && department.value,\n CompanySize: (companySize && Number.parseInt(companySize.value, 10)) || 0,\n Comments: comments && comments.value,\n ProspectTypeValue: (prospectType && Number.parseInt(prospectType.value, 10)) || 0\n };\n\n this.setState({\n isReady: false\n });\n\n // Create business partner request\n createProspectAsync({ callerContext: context.actionContext }, newPartner)\n .then(() => {\n const successPageURL =\n (config.confirmationLink && config.confirmationLink.linkUrl && config.confirmationLink.linkUrl.destinationUrl) ||\n getUrlSync('home', this.props.context.actionContext) ||\n '';\n window.location.href = successPageURL;\n })\n .catch(() => {\n this.setState({\n hasSubmitErrors: true\n });\n });\n };\n\n private readonly _onCancel = () => {\n // Reset values of the form\n const cleanForm = this.state.formItems;\n cleanForm.forEach(input => {\n input.value = '';\n });\n\n // Set reset flag so address input will get reset on next renderInputSection() call\n this.needsToReset = true;\n\n this.setState({\n isReady: false,\n formItems: cleanForm,\n addressHasErrors: true,\n showAddressErrors: false,\n hasSubmitErrors: false\n });\n };\n\n private readonly _getItem = (id: string, isAddress: boolean = false) => {\n if (isAddress) {\n return this.state.formItems.find(item => {\n return item.id === id && item.address;\n });\n }\n return this.state.formItems.find(item => {\n return item.id === id && item.value !== '';\n });\n };\n}\n\nexport default BusinessSignUp;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBusinessSignUpItem, IBusinessSignUpViewProps } from './business-sign-up';\n\nconst BusinessSignUpItem: React.FC = ({ wrapper, label, errorMessage, input, isAddressInput }) => {\n // Hide label and error message if rendering address section\n return (\n \n {!isAddressInput && label}\n {!isAddressInput && errorMessage}\n {input}\n \n );\n};\n\nconst BusinesSignUpView: React.FC = props => {\n const { businessSignUp, ContainerWrapper, heading, businessSignUpForm } = props;\n\n const { FormWrapper, buttons, items, errorMessage, disclaimer } = businessSignUpForm;\n\n return (\n \n \n {heading}\n \n {items &&\n items.map((item: IBusinessSignUpItem) => {\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n {disclaimer}\n \n \n \n );\n};\n\nexport default BusinesSignUpView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * 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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICookieSetOptions, IImageDimension, ILocaleItems } from '@msdyn365-commerce/core-internal';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerData } from './country-picker.data';\nimport { IActionLinkData, ICountryPickerProps } from './country-picker.props.autogenerated';\n\n/**\n * CountryPicker view props interface.\n */\nexport interface ICountryPickerViewProps extends ICountryPickerProps {\n modalContainer: IModuleProps;\n modalHeaderContainer: INodeProps;\n modalFooterContainer: INodeProps;\n modalBodyContainer: INodeProps;\n heading?: React.ReactNode;\n subheading?: React.ReactNode;\n link?: React.ReactNode;\n countryList?: React.ReactNode[];\n isModalOpen?: boolean;\n state?: ICountryPickerState;\n stayOnCurrentSiteButton?: React.ReactNode;\n}\n\n/**\n * ICountryPickerState: Interface for Country picker State.\n */\nexport interface ICountryPickerState {\n isModalOpen: boolean;\n}\n\n/**\n *\n * CountryPicker component.\n * @extends {React.PureComponent>}\n */\nexport class CountryPicker extends React.PureComponent, ICountryPickerState> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly _preferredSiteStorageKey: string = '_msdyn365___site_';\n\n private readonly _cookieExpirationTime = 5_184_000;\n\n public constructor(props: ICountryPickerProps) {\n super(props);\n let isCookieValueSet: boolean = false;\n if (props.context.request.cookies.get(this._preferredSiteStorageKey).value) {\n isCookieValueSet = true;\n }\n this.state = {\n isModalOpen: !isCookieValueSet && this.props.context.request.marketSettings !== undefined\n };\n }\n\n public render(): JSX.Element | null {\n const { heading, subheading, countryList, actionLink } = this.props.config;\n\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const countryPickerHeading = heading && (\n \n );\n\n const countryPickerSubHeading = subheading && (\n \n );\n\n const countryPickerActionLink = actionLink && this.createLink(actionLink);\n const currentSiteButton = (\n \n );\n\n const viewprops: ICountryPickerViewProps = {\n ...this.props,\n state: this.state,\n isModalOpen: this.state.isModalOpen,\n modalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-country-picker__dialog',\n isOpen: true,\n 'aria-label': 'country-picker',\n toggle: this.closeModal,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: true\n },\n modalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-country-picker__modal-header',\n toggle: this.closeModal,\n closeButtonTabIndex: 1\n },\n modalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-countryPicker__modal-footer'\n },\n modalBodyContainer: {\n tag: ModalBody,\n className: 'ms-counrtyPicker__modal-body'\n },\n heading: countryPickerHeading,\n subheading: countryPickerSubHeading,\n link: countryPickerActionLink,\n countryList: countryList && this.renderCountryList(),\n stayOnCurrentSiteButton: currentSiteButton\n };\n\n return this.props.renderView(viewprops);\n }\n\n /**\n * Initiate close modal.\n */\n public readonly closeModal = (): void => {\n this.setState({\n isModalOpen: false\n });\n };\n\n public handleParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.subheading = event.target.value;\n }\n\n public handleTextChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.heading!.text = event.target.value;\n }\n\n public handleLinkTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.actionLink?.linkText) {\n this.props.config.actionLink.linkText = event.target.value;\n }\n }\n\n public createLink(link?: IActionLinkData): React.ReactNode | null {\n if (!StringExtensions.isNullOrEmpty(link?.linkUrl.destinationUrl)) {\n const linkText = link?.linkText ?? '';\n const payLoad = getPayloadObject('click', this._telemetryContent, '', '');\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: link?.ariaLabel,\n className: 'ms-countryPicker__link',\n linkText,\n linkUrl: link?.linkUrl.destinationUrl,\n openInNewTab: link?.openInNewTab,\n role: 'link',\n additionalProperties: attributes!,\n onClick: onTelemetryClick(this._telemetryContent, payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n public renderCountryList(): React.ReactNode[] | undefined {\n const marketSettings = this.props.context.request.marketSettings;\n if (!marketSettings) {\n return undefined;\n }\n const localeItems = marketSettings.localeItems;\n const countryLinks = localeItems.map((value: ILocaleItems) => {\n return this.renderCountry(value);\n });\n\n return countryLinks;\n }\n\n public renderCountry(localeItem: ILocaleItems): React.ReactNode | null {\n const countryList = this.props.config.countryList;\n let baseUrl = localeItem.localeBaseUrl;\n baseUrl = this._appendProtocolToUrl(baseUrl);\n const matchedCountryItem = countryList?.find(item => item.url === baseUrl);\n if (!matchedCountryItem) {\n return null;\n }\n const imageSize: IImageDimension = { q: 'w=48&h=48&m=6', w: 0, h: 0 };\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: imageSize,\n lg: imageSize,\n xl: imageSize\n },\n lazyload: true\n };\n const image = matchedCountryItem.image;\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: image?.imageSettings ?? defaultImageSettings\n };\n return (\n \n {image && (\n \n )}\n
    \n {matchedCountryItem.displayString}\n {matchedCountryItem.displaySubString}\n
    \n \n );\n }\n\n /**\n * Writes the current site base url to cookie and closes the country picker modal dialog.\n */\n private readonly _handleStayOnSiteButtonClick = (): void => {\n const currentBaseUrl = this.props.context.request.marketSettings?.currentBaseUrl;\n if (currentBaseUrl) {\n const urlToStore = this._appendProtocolToUrl(currentBaseUrl);\n this._writeToCookie(this._preferredSiteStorageKey, urlToStore);\n }\n this.closeModal();\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n * @returns - This method just writes the cookie to the browser.\n */\n private readonly _handleClick = (storageKey?: string, storageValue?: string) => () => {\n this._writeToCookie(storageKey, storageValue);\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n */\n private readonly _writeToCookie = (storageKey?: string, storageValue?: string): void => {\n if (!storageKey || !storageValue) {\n return;\n }\n const cookieOptions: ICookieSetOptions = { secure: true, sameSite: 'none' };\n cookieOptions.maxAge = this._cookieExpirationTime;\n this.props.context.request.cookies.set(storageKey, storageValue, cookieOptions);\n };\n\n /**\n * Appends protocol to an url.\n * @param baseUrl - Url to be formatted.\n * @returns - URL after appending protocol.\n */\n private readonly _appendProtocolToUrl = (baseUrl: string): string => {\n return !baseUrl.includes('https://') ? `https://${baseUrl}` : baseUrl;\n };\n}\n\nexport default CountryPicker;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerViewProps } from './index';\n\n/**\n * Functional component which renders country picker module.\n * @param props - Configuration for the country picker component.\n * @returns React.FC - Functional component of the country picker module.\n */\nexport const countryPickerView: React.FC = (props: ICountryPickerViewProps) => {\n const {\n isModalOpen,\n modalContainer,\n modalHeaderContainer,\n modalBodyContainer,\n heading,\n modalFooterContainer,\n subheading,\n link,\n countryList,\n stayOnCurrentSiteButton\n } = props;\n return isModalOpen && countryList ? (\n \n \n {heading}\n {subheading}\n \n \n {countryList.map(country => (\n <>{country}\n ))}\n \n \n {stayOnCurrentSiteButton}\n {link}\n \n \n ) : null;\n};\n\nexport default countryPickerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport { IncrementalQuantity, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxProps as IBuyboxExtentionProps,\n IBuyboxResources as IBuyboxExtentionResources\n} from '../definition-extensions/buybox.ext.props.autogenerated';\n\nconst BuyboxView: React.FC> = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n telemetryContent,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n callbacks,\n state,\n resources,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n quantityLimitsMessages,\n min,\n max,\n applyDefaultOrderSettings,\n shopSimilarDescription,\n unitOfMeasure\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {_renderTextBlock(props.slots.textBlocks)}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity &&\n _renderQuantity(\n quantity,\n callbacks,\n props,\n state,\n resources,\n quantityLimitsMessages,\n min,\n max,\n applyDefaultOrderSettings,\n telemetryContent\n )}\n {inventoryLabel}\n {_renderCartAndActions(addToCart, addToOrderTemplate, addToWishlist)}\n {findInStore && _renderFindInStore(findInStore)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\n if (!textBlocks || textBlocks.length === 0) {\n return undefined;\n }\n\n return <>{textBlocks[0]};\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\nconst _renderCartAndActions = (\n addToCart?: IBuyboxAddToCartViewProps,\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps,\n addToWishlist?: IBuyboxAddToWishlistViewProps\n): JSX.Element | undefined => {\n if (!addToCart && !addToWishlist) {\n return undefined;\n }\n\n return (\n
    \n {addToCart && addToCart.errorBlock}\n {addToOrderTemplate && addToOrderTemplate.errorBlock}\n {addToWishlist && addToWishlist.errorBlock}\n
    \n {addToCart && addToCart.button}\n {addToOrderTemplate && addToOrderTemplate.button}\n {addToWishlist && addToWishlist.button}\n
    \n
    \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\nconst _renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n min: number | undefined,\n max: number | undefined,\n applyDefaultOrderSettings?: boolean,\n telemetryContent?: ITelemetryContent\n): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\n\nexport default BuyboxView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { IDictionary, IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { IMenuItemData, INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Drawer,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IDrawerState,\n IPayLoad,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\ninterface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: IImageData[] | null;\n categoryImageAltText: string;\n drawerKeyValue: IDictionary;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuView extends React.PureComponent {\n private currentLevel: number = 0;\n\n private readonly _positionInSetOffset: number = 1;\n\n private readonly escapeKey: number = 27;\n\n private readonly menuNode: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: INavigationMenuViewProps) {\n super(props);\n this.menuNode = React.createRef();\n this.state = { activeMenu: undefined, parentMenu: undefined, categoryImageAltText: '', drawerKeyValue: {} };\n this._closeSubmenu = this._closeSubmenu.bind(this);\n this._escFunction = this._escFunction.bind(this);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n document.body.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n document.body.addEventListener('mousedown', this._handleClickOutside);\n document.body.addEventListener('focusout', this._handleFocusOutside);\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\n }\n }\n\n public render(): JSX.Element | null {\n const { isMobileView } = this.props;\n\n this.currentLevel = 1;\n return <>{isMobileView ? this._renderMobileMenu() : this._renderDesktopMenu()};\n }\n\n /**\n * Method to render mobile menu.\n * @returns Jsx element.\n */\n private _renderMobileMenu(): JSX.Element {\n const { isMobileView, menuItemData, Navigation } = this.props;\n return (\n \n {menuItemData.map((menuItem: IMenuItemData, posinset: number) => {\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\n })}\n \n );\n }\n\n /**\n * Method to render desktop menu.\n * @returns Jsx element.\n */\n private _renderDesktopMenu(): JSX.Element {\n const { MenuList, Navigation } = this.props;\n return (\n \n \n {this._renderDisplay()}\n \n \n );\n }\n\n /**\n * Method to render drawer menu.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerMenu(menuItem: IMenuItemData, setSize: number, posinset: number): JSX.Element | null {\n if (menuItem && menuItem.subMenu && ArrayExtensions.hasElements(menuItem.subMenu)) {\n return this._renderDrawer(menuItem, setSize, posinset);\n }\n return this._renderLinkMenuItem(menuItem, undefined, true, false, setSize, posinset);\n }\n\n /**\n * Method to render drawer component.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawer(menuItem: IMenuItemData, setSize?: number, posinset?: number): JSX.Element | null {\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue !== undefined ? keyValue : {};\n const { isMobileView } = this.props;\n\n let isDrawerOpen = false;\n if (keys[buttonText]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { isOpen: isDrawerOpen };\n return (\n \n
    \n {menuItem.subMenu!.map((menuSubItem: IMenuItemData, currentPos: number) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n return this._renderDrawer(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\n }\n return this._renderDrawerLink(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\n })}\n
    \n \n );\n }\n\n /**\n * Method to render link.\n * @param linkText -Text on Menu link.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkText(linkText: string | undefined, setSize: number | undefined, posinset: number | undefined): JSX.Element {\n return (\n \n {linkText}\n \n );\n }\n\n /**\n * Method to render drawer link.\n * @param item -Single Menuitem.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerLink(item: IMenuItemData, setSize: number | undefined, posinset: number): JSX.Element | null {\n if (item && item.linkText && item.linkURL && item.linkURL.length > 0) {\n return this._renderLinkMenuItem(item, undefined, true, false, setSize, posinset);\n } else if (item && item.linkText && !item.linkURL) {\n return this._renderSpanMenuItem(item);\n }\n return null;\n }\n\n /**\n * Method to generate menu.\n * @returns Jsx element.\n */\n private _renderDisplay(): JSX.Element[] {\n const { ListItem, menuItemData, isMobileView } = this.props;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\n let menuItem: IMenuItemData = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n this.setState({ parentMenu: undefined });\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n menuItem &&\n menuItemList.push(\n \n {` `}\n {this._createMenuItemList(menuItem)}\n {` `}\n \n );\n } else {\n menuItemData.forEach((item: IMenuItemData, index: number) => {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n });\n }\n\n return menuItemList;\n }\n\n /**\n * Method to get data for submenu.\n * @param item -Single Menuitem.\n * @returns IMenuItemData.\n */\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item && item.subMenu;\n if (subMenus && subMenus.length > 0) {\n for (let i = 0; i <= subMenus.length - 1; i++) {\n if (subMenus[i].id === this.state.activeMenu) {\n this.setState({ parentMenu: item?.id });\n return subMenus[i];\n }\n const found = this._getFromSubMenu(subMenus[i]);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n /**\n * Method to create item list.\n * @param menuItemData -Single Menuitem.\n * @returns Jsx element.\n */\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\n return this._renderSubMenu(menuItemData.subMenu, menuItemData.id);\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\n return this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true);\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\n return this._renderSpanMenuItem(menuItemData, menuItemData.id, true);\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\n const { isMobileView, ListItem } = this.props;\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\n const subMenuLevel = 3;\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || subMenuLevel;\n\n // Const isParentMenu:boolean= false;\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || subMenus.length === 0) {\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions =\n subMenus &&\n subMenus.map((option: IMenuItemData, idx: number) => {\n const hasOptions = option.subMenu && option.subMenu.length > 0;\n let menuItem: JSX.Element | null;\n if (hasOptions && isMobileView) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\n } else {\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\n }\n let subMenu;\n const haveSubmenu = hasOptions && enableMultiSupportMenu && this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1;\n if (haveSubmenu) {\n this.currentLevel++;\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\n }\n return (\n \n {menuItem}\n {subMenu}\n \n );\n });\n return this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu);\n }\n\n /**\n * Method to render button menu item.\n * @param option -Single Menuitem.\n * @param activeMenu -Active menu number.\n * @param index -Active menu index.\n * @returns Jsx element.\n */\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n const { Button } = this.props;\n return (\n \n {option.linkText}\n \n );\n }\n\n /**\n * Method to render link menu item.\n * @param option -Single Menuitem.\n * @param index -Active menu index.\n * @param hoverEffect -Active menu effect.\n * @param isParent -Is parent menu.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkMenuItem(\n option: IMenuItemData,\n index?: number,\n hoverEffect: boolean = true,\n isParent: boolean = false,\n setSize?: number,\n posinset?: number\n ): JSX.Element | null {\n const { Link, isMobileView } = this.props;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n {option.linkText}\n \n );\n }\n\n /**\n * Method to render promotional link.\n * @param linkText -Link text.\n * @param linkUrl -Link url.\n * @returns Jsx element.\n */\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n {linkText}\n \n );\n }\n return null;\n }\n\n /**\n * Method to render span menu item.\n * @param option -Single Menu Item.\n * @param index -Index.\n * @param isParent -Is parent menu.\n * @returns Jsx element.\n */\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\n const { Span } = this.props;\n return (\n \n {option.linkText}\n \n );\n }\n\n /**\n * Method to render menu.\n * @param level -Menu level.\n * @param menuOptions -Menu lists.\n * @param currentItem -Menu current.\n * @param submenu -Mneu has submenu or not.\n * @returns Jsx element.\n */\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, isMobileView, showPromotionalContent } = this.props;\n const categoryImageDisplay =\n !isMobileView && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !submenu;\n const promotionalContentDisplay =\n !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = 1;\n return (\n \n 2 &&\n 'navmenu-multi-level'\n )}\n >\n {menuOptions}\n \n
    \n {categoryImageDisplay &&\n this.state.categoryImage &&\n this.state.categoryImage.map(item => (\n \n {this.state.categoryImage && this._getCategoryImage(item)}\n {promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n \n ))}\n
    \n \n );\n }\n\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\n const linkText = option && option.linkText ? option.linkText : '';\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n option.promotionalContent.map(item => {\n if (item && item.image) {\n const imageSrc = item.image.src;\n const promotionalItemImageSettings = item.image.imageSettings;\n promotionalImage.push({\n src: imageSrc,\n altText: item.text,\n imageSettings: promotionalItemImageSettings,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl }\n });\n }\n });\n }\n this.setState({\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\n categoryImageAltText: linkText\n });\n };\n\n /**\n * Method to handle dropdwon change.\n * @param data -Menuitem data.\n * @param parentId -Menu parent.\n * @returns Jsx element.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.props.isMobileView) {\n this.setState({\n activeMenu: this.state.activeMenu && this.state.activeMenu === data.id! ? undefined : data.id!,\n parentMenu: parentId\n });\n if (this.props.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n }\n\n this._resetFocus();\n };\n\n /**\n * Method to call when focus lost from menu.\n */\n private readonly _resetFocus = () => {\n if (this.props.isMobileView) {\n setTimeout(() => {\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\n }, 0);\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n this.setState({\n activeMenu: undefined,\n categoryImage: null\n });\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleFocusOutside = (event: FocusEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\n this._closeSubmenu();\n }\n };\n\n /**\n * Method to handle close submenu event.\n */\n private _closeSubmenu(): void {\n if (!this.props.isMobileView) {\n this.setState({ activeMenu: undefined });\n }\n }\n\n /**\n * Method to handle escape key event.\n * @param event -HTML event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey) {\n if (!this.props.isMobileView) {\n const navDrawerList = Array.from(this.menuNode.current!.childNodes);\n for (const item of navDrawerList) {\n const navDrawerButton = item.firstChild as HTMLButtonElement;\n if (navDrawerButton.getAttribute('aria-expanded') === 'true') {\n navDrawerButton.focus();\n }\n }\n }\n this._closeSubmenu();\n }\n };\n\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\n if (!categoryImage || !categoryImage.src) {\n return null;\n }\n\n const categoryImageUrl = generateImageUrl(categoryImage.src, this.props.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n const ImageData: IImageData = { src: categoryImageUrl };\n return (\n \n );\n }\n return null;\n };\n\n /**\n * Method to handle escape key event.\n * @param drawerState -HTML event.\n */\n private readonly _onDrawerChange = (drawerState: IDrawerState) => {\n const { drawerKeyValue } = this.state;\n const drawerText: string = drawerState.buttonText !== undefined ? drawerState.buttonText : '';\n const newPair = { [drawerText]: drawerState.isOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n}\n\nexport default NavigationMenuView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\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 React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n {categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, isOboRequest, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { IInvoiceErrorState, IPayInvoiceResources, PayInvoiceComponent } from '@msdyn365-commerce-modules/invoice';\nimport React from 'react';\n\nimport { InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsHeaderData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsHeaderResources extends IPayInvoiceResources {\n invoiceOrderItem: string;\n invoiceOrderItems: string;\n invoiceIdLabel: string;\n invoicePlacedByLabel: string;\n invoiceAmountDueText: string;\n invoicePaymentDueDateText: string;\n}\n\nexport interface IInvoiceDetailsHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsHeaderResources;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IInvoiceDetailsHeaderComponent extends IComponent {}\n\nconst formatShortDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'numeric', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatLongDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsHeader: React.FC = (props: IInvoiceDetailsHeaderProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources,\n onError\n } = props;\n\n const invoiceNumberText = resources.invoiceIdLabel.replace('{0}', invoiceDetails.id);\n\n const invoiceOrderItemsText =\n invoiceDetails.lines.length === 1\n ? resources.invoiceOrderItem\n : resources.invoiceOrderItems.replace('{0}', invoiceDetails.lines.length.toString());\n\n const invoiceInfoContainerClassName = `${className}__invoice-info-container`;\n const orderInfoContainerClassName = `${invoiceInfoContainerClassName}__order-info-container`;\n const orderInfoClassName = `${orderInfoContainerClassName}__order-info`;\n const orderMainInfoClassName = `${orderInfoClassName}__main-info`;\n const orderDetailsClassName = `${orderInfoClassName}__details`;\n `${className}__actions`;\n const actionsClassName = `${className}__actions`;\n const amountSummaryClassName = `${invoiceInfoContainerClassName}__amount-summary`;\n const orderDate = formatShortDate(props.context, invoiceDetails.invoiceDate);\n\n const dueDate = formatLongDate(props.context, invoiceDetails.dueDate);\n const dueDateText = resources.invoicePaymentDueDateText.replace('{0}', dueDate);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n return (\n
    \n
    {invoiceNumberText}
    \n
    \n
    \n
    \n
    \n
    \n {resources.invoicePlacedByLabel}\n {invoiceDetails.customerName}\n
    \n
    \n
    \n
    {orderDate}
    \n
    {invoiceOrderItemsText}
    \n
    \n
    \n
    \n
    \n
    {resources.invoiceAmountDueText}
    \n
    \n {formatAmount(props.context, invoiceDetails.amountDue, invoiceDetails.currencyCode)}\n
    \n
    {dueDateText}
    \n
    \n
    \n
    \n \n
    \n
    \n );\n};\n\nexport const InvoiceDetailsHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsHeaderComponent\n>('InvoiceDetailsHeaderComponent', { component: InvoiceDetailsHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { IInvoicePaymentDetails } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsPaymentDetailsData {\n invoicePaymentDetails: IInvoicePaymentDetails;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsResources {\n invoicePaymentDiscounts: string;\n invoicePaymentSubtotal: string;\n invoicePaymentCharges: string;\n invoicePaymentTax: string;\n invoicePaymentInvoiceTotal: string;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsPaymentDetailsResources;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsComponent extends IComponent {}\n\ninterface IInvoicePaymentLineProps {\n label: string;\n value: number;\n className: string;\n}\n\nconst InvoiceDetailsPaymentDetails: React.FC = (\n props: IInvoiceDetailsPaymentDetailsProps\n): JSX.Element | null => {\n const {\n className,\n data: { invoicePaymentDetails },\n resources\n } = props;\n\n const lineClassName = `${className}__line`;\n\n const lines: IInvoicePaymentLineProps[] = [];\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalDiscount)) {\n lines.push({\n label: resources.invoicePaymentDiscounts,\n value: invoicePaymentDetails.totalDiscount,\n className: `${lineClassName}-total-discount`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.subtotal)) {\n lines.push({\n label: resources.invoicePaymentSubtotal,\n value: invoicePaymentDetails.subtotal,\n className: `${lineClassName}-subtotal`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalCharges)) {\n lines.push({\n label: resources.invoicePaymentCharges,\n value: invoicePaymentDetails.totalCharges,\n className: `${lineClassName}-total-charges`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalTax)) {\n lines.push({\n label: resources.invoicePaymentTax,\n value: invoicePaymentDetails.totalTax,\n className: `${lineClassName}-total-tax`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalAmount)) {\n lines.push({\n label: resources.invoicePaymentInvoiceTotal,\n value: invoicePaymentDetails.totalAmount,\n className: `${lineClassName}-total-amount`\n });\n }\n\n if (!ArrayExtensions.hasElements(lines)) {\n return null;\n }\n\n return (\n
    \n {lines.map(line => {\n return (\n
    \n
    {line.label}
    \n
    \n {props.context.cultureFormatter.formatCurrency(line.value, invoicePaymentDetails.currencyCode)}\n
    \n
    \n );\n })}\n
    \n );\n};\n\nexport const InvoiceDetailsPaymentDetailsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsPaymentDetailsComponent\n>('InvoiceDetailsPaymentDetailsComponent', { component: InvoiceDetailsPaymentDetails });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport { IInvoiceProductLine, InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsProductsData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsProductsResources {\n invoiceProductColor: string;\n invoiceProductSize: string;\n invoiceProductStyle: string;\n invoiceQuantity: string;\n}\n\nexport interface IInvoiceDetailsProductsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n imageSettings?: IImageSettings;\n resources: IInvoiceDetailsProductsResources;\n}\n\nexport interface IInvoiceDetailsProductsComponent extends IComponent {}\n\nconst _renderProductDimensions = (\n className: string,\n resources: IInvoiceDetailsProductsResources,\n product: SalesInvoiceLine\n): JSX.Element => {\n return (\n
    \n {StringExtensions.isNullOrWhitespace(product.ColorName) ? null : (\n
    {resources.invoiceProductColor.replace('{0}', product.ColorName!)}
    \n )}\n {StringExtensions.isNullOrWhitespace(product.SizeName) ? null : (\n
    {resources.invoiceProductSize.replace('{0}', product.SizeName!)}
    \n )}\n {StringExtensions.isNullOrWhitespace(product.StyleName) ? null : (\n
    {resources.invoiceProductStyle.replace('{0}', product.StyleName!)}
    \n )}\n
    \n );\n};\n\nconst _renderProductImage = (\n className: string,\n context: ICoreContext,\n product: IInvoiceProductLine,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n xl: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n return (\n \n );\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsProducts: React.FC = (props: IInvoiceDetailsProductsProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources\n } = props;\n\n const productLineClass = `${className}__product-line`;\n const productLineInfoContainerClass = `${productLineClass}__product-info-container`;\n const productLineDetailsClass = `${productLineInfoContainerClass}__product-details`;\n const productLineSmallDetailsClass = `${productLineDetailsClass}__small-details`;\n\n return (\n
    \n {invoiceDetails.lines.map(product => {\n const quantity = product.Quantity || 1;\n\n let productUrl = '';\n if (!ObjectExtensions.isNullOrUndefined(product.ProductName) && !ObjectExtensions.isNullOrUndefined(product.ProductId)) {\n productUrl = getProductPageUrlSync(product.ProductName, product.ProductId, props.context.actionContext);\n }\n\n return (\n
    \n
    \n {_renderProductImage(`${productLineInfoContainerClass}__product-image`, props.context, product)}\n
    \n \n {product.ProductName}\n \n
    \n {_renderProductDimensions(`${productLineSmallDetailsClass}__dimensions`, resources, product)}\n
    \n {formatAmount(props.context, product.Price, invoiceDetails.currencyCode)}\n
    \n
    \n {resources.invoiceQuantity.replace('{0}', quantity.toString())}\n
    \n
    \n
    \n
    \n
    \n {formatAmount(props.context, product.NetAmount, invoiceDetails.currencyCode)}\n
    \n
    \n );\n })}\n
    \n );\n};\n\nexport const InvoiceDetailsProductsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsProductsComponent\n>('InvoiceDetailsProductsComponent', { component: InvoiceDetailsProducts });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus, OrderInvoice, SalesInvoice, SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IPayableInvoice } from '@msdyn365-commerce-modules/invoice';\n\nexport interface IInvoicePaymentDetails {\n totalDiscount?: number;\n subtotal?: number;\n totalCharges?: number;\n totalTax?: number;\n totalAmount?: number;\n currencyCode?: string;\n}\n\nexport interface IInvoiceProductLine extends SalesInvoiceLine {\n primaryImageUrl?: string;\n}\n\n/**\n * Represents invoice details data model.\n */\nexport class InvoiceDetailsModel implements IPayableInvoice, IInvoicePaymentDetails {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public lines: IInvoiceProductLine[];\n\n public totalDiscount?: number;\n\n public subtotal?: number;\n\n public totalCharges?: number;\n\n public totalTax?: number;\n\n public totalAmount?: number;\n\n public currencyCode?: string;\n\n public constructor(invoice: OrderInvoice, invoiceDetails: SalesInvoice, products: SimpleProduct[]) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerName = invoice.CustomerName;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.lines = (invoiceDetails.SalesInvoiceLine || []).map(line => {\n const productLine: IInvoiceProductLine = {\n ...line,\n primaryImageUrl: products.find(product => product.RecordId === line.ProductId)?.PrimaryImageUrl\n };\n return productLine;\n });\n\n this.totalDiscount = invoiceDetails.TotalDiscount;\n this.subtotal = invoiceDetails.InvoiceSubtotal;\n this.totalCharges = invoiceDetails.TotalCharges;\n this.totalTax = invoiceDetails.TotalTaxAmount;\n this.totalAmount = invoice.TotalAmount;\n this.currencyCode = invoice.CurrencyCode;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IInvoiceErrorState, InvoiceErrorComponent } from '@msdyn365-commerce-modules/invoice';\nimport { getSimpleProductsAction, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InvoiceDetailsHeaderComponent } from './components/invoice-details-header';\nimport { InvoiceDetailsPaymentDetailsComponent } from './components/invoice-details-payment-summary';\nimport { InvoiceDetailsProductsComponent } from './components/invoice-details-products';\nimport { InvoiceDetailsModel } from './helpers/invoice-data';\nimport { IInvoiceDetailsData } from './invoice-details.data';\nimport { IInvoiceDetailsProps } from './invoice-details.props.autogenerated';\n\nexport interface IInvoiceDetailsViewState {\n invoiceDetails?: InvoiceDetailsModel;\n payInvoiceErrorModalOpen?: boolean;\n errorState?: IInvoiceErrorState;\n}\n\nexport interface IInvoiceDetailsViewProps extends IInvoiceDetailsProps {\n moduleProps: IModuleProps;\n header: JSX.Element;\n products: JSX.Element;\n paymentDetails: JSX.Element;\n payInvoiceError?: JSX.Element;\n}\n\n/**\n * InvoiceDetails component.\n * @extends {React.PureComponent>}\n */\nclass InvoiceDetails extends React.PureComponent, IInvoiceDetailsViewState> {\n private static readonly _className: string = 'msc-invoice-details';\n\n public constructor(props: IInvoiceDetailsProps) {\n super(props);\n\n this.state = { errorState: { errorMessage: '', otherError: '' } };\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n }\n\n public async componentDidMount(): Promise {\n const invoice = await this.props.data.invoice;\n const invoiceDetails = await this.props.data.invoiceDetails;\n\n const products = await this._getProducts(invoiceDetails.SalesInvoiceLine, invoiceDetails.ChannelId);\n\n const invoiceDetailsModel = new InvoiceDetailsModel(invoice, invoiceDetails, products);\n\n this.setState({\n invoiceDetails: invoiceDetailsModel,\n payInvoiceErrorModalOpen: false,\n errorState: { errorMessage: '', otherError: '' }\n });\n }\n\n public render(): JSX.Element | null {\n if (!this.state.invoiceDetails) {\n return null;\n }\n\n const header = this._renderHeader();\n const products = this._renderProducts();\n const paymentDetails = this._renderPaymentDetails();\n const payInvoiceError = this._renderInvoiceErrors();\n\n const props: IInvoiceDetailsViewProps = {\n ...(this.props as IInvoiceDetailsProps),\n moduleProps: {\n moduleProps: this.props,\n className: InvoiceDetails._className\n },\n header,\n products,\n paymentDetails,\n payInvoiceError\n };\n\n return this.props.renderView(props);\n }\n\n private async _getProducts(invoiceLines: SalesInvoiceLine[] = [], channelId?: number): Promise {\n const productInputs = invoiceLines\n .filter(product => product.ProductId)\n .map(\n product =>\n new ProductInput(\n product.ProductId!,\n this.props.context.request.apiSettings,\n channelId,\n undefined,\n this.props.context.actionContext.requestContext\n )\n );\n return getSimpleProductsAction(productInputs, this.props.context.actionContext);\n }\n\n private _renderHeader(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _renderProducts(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n const { imageSettings } = this.props.config;\n return (\n \n );\n }\n\n private _renderPaymentDetails(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n\n // check for errorcode and otherError which contains the LocalizedMessage from API\n if (\n errorState &&\n errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineAlreadyExistsInCart' &&\n errorState.otherError\n ) {\n this.setState({ errorState: errorState });\n }\n\n this.setState({ payInvoiceErrorModalOpen: true });\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({ payInvoiceErrorModalOpen: false });\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${InvoiceDetails._className}__errors`;\n\n return (\n \n );\n }\n}\n\nexport default InvoiceDetails;\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 { IInvoiceDetailsViewProps } from './invoice-details';\n\nexport const InvoiceDetailsView: React.FC = props => {\n const { header, products, paymentDetails, payInvoiceError } = props;\n\n return (\n \n {header}\n {products}\n {paymentDetails}\n {payInvoiceError}\n \n );\n};\n\nexport default InvoiceDetailsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IInvoiceErrorProps extends IComponentProps {\n messageHeader?: string;\n errorMessage?: string;\n otherError?: string;\n showError: boolean;\n payInvoiceErrorModalOpen: boolean;\n\n errorDialogHeader: string;\n errorDialogBodyErrorTitle: string;\n errorDialogBodyErrorDescription: string;\n errorDialogFooterGoToCartButtonText: string;\n errorDialogFooterCancelButtonText: string;\n cartUrl: string;\n\n setPayInvoiceErrorModalClose(): void;\n}\n\nexport interface IInvoiceErrorComponent extends IComponent {}\n\nexport const InvoiceError: React.FC = ({\n messageHeader,\n errorMessage,\n otherError,\n showError,\n payInvoiceErrorModalOpen,\n errorDialogHeader,\n errorDialogBodyErrorTitle,\n errorDialogBodyErrorDescription,\n errorDialogFooterGoToCartButtonText,\n errorDialogFooterCancelButtonText,\n cartUrl,\n setPayInvoiceErrorModalClose\n}) => {\n const errorMessages: (string | undefined)[] = [];\n\n if (otherError) {\n errorMessages.push(otherError);\n } else {\n errorMessages.push(errorMessage);\n }\n\n const className = 'msc-pay-invoice-error-dialog';\n\n return (\n <>\n 0} color='danger' assertive aria-label={messageHeader}>\n \n {errorMessages.map((message, index) => {\n return (\n
    \n {message}\n
    \n );\n })}\n
    \n \n \n {errorDialogHeader}\n \n \n
    \n
    {errorDialogBodyErrorTitle}
    \n
    {errorDialogBodyErrorDescription}
    \n
    \n
    \n \n \n {errorDialogFooterGoToCartButtonText}\n \n \n {errorDialogFooterCancelButtonText}\n \n \n
    \n \n );\n};\n\n// @ts-expect-error\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { IInvoiceStatusResources } from '../helpers/invoice-status';\n\nexport interface IInvoicesFilterResources extends IInvoiceStatusResources {\n invoicesFilterShowAll: string;\n}\n\nexport interface IInvoicesFilterProps extends IComponentProps {\n className: string;\n disabled: boolean;\n\n resources: IInvoicesFilterResources;\n\n currentState: InvoicesFilterState;\n onFilterStateChanged(state: InvoicesFilterState): void;\n}\n\nexport enum InvoicesFilterState {\n ShowAll,\n Paid,\n PartiallyPaid,\n Unpaid\n}\n\nconst getInvoicesFilterStateResources = (filterState: InvoicesFilterState, resources: IInvoicesFilterResources): string => {\n switch (filterState) {\n case InvoicesFilterState.ShowAll:\n return resources.invoicesFilterShowAll;\n case InvoicesFilterState.Paid:\n return resources.invoiceStatusPaid;\n case InvoicesFilterState.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n case InvoicesFilterState.Unpaid:\n return resources.invoiceStatusUnpaid;\n default:\n throw new Error('Failed to retrieve resource description for unknown invoices filter state.');\n }\n};\n\n/**\n * On Click function.\n * @param onStateClick -Invoice filter state function.\n * @param filterState -Invoice filter state.\n * @returns Set Invoice filter state.\n */\nconst onClickHandler = (onStateClick: (filterState: InvoicesFilterState) => void, filterState: InvoicesFilterState) => () => {\n onStateClick(filterState);\n};\n\nconst renderFilterStateItem = (\n filterState: InvoicesFilterState,\n resources: IInvoicesFilterResources,\n className: string,\n onStateClick: (filterState: InvoicesFilterState) => void\n): React.ReactNode => {\n const stateStringRepresentation = InvoicesFilterState[filterState];\n\n return (\n \n );\n};\n\nconst InvoicesFilter: React.FC = (props: IInvoicesFilterProps) => {\n const popoverRef = React.createRef();\n const [popoverState, setPopoverState] = React.useState(false);\n const togglePopover = React.useCallback(() => {\n setPopoverState(!popoverState);\n }, [popoverState]);\n\n const [filterState, setFilterState] = React.useState(props.currentState);\n\n const onFilterStateClick = (clickedState: InvoicesFilterState) => {\n setFilterState(clickedState);\n setPopoverState(false);\n props.onFilterStateChanged(clickedState);\n };\n\n return (\n
    \n \n {getInvoicesFilterStateResources(filterState, props.resources)}\n \n \n {EnumExtensions.getEnumValues(InvoicesFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })}\n \n
    \n );\n};\n\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesFilterProps\n>('InvoicesFilterComponent', { component: InvoicesFilter });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\nexport interface IInvoicesTableHeaderResources {\n invoicesText: string;\n invoiceNumberText: string;\n invoiceDateMobileText: string;\n invoiceDateText: string;\n invoiceUsersText: string;\n invoiceAmountText: string;\n invoiceDueDateText: string;\n invoiceAmountDueText: string;\n invoiceStatusText: string;\n invoiceActionsText: string;\n invoiceListSelectAllRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isSelectedAll: boolean;\n isMobile: boolean;\n isAdmin: boolean;\n\n resources: IInvoicesTableHeaderResources;\n\n onSelectAll(isSelected: boolean): void;\n}\n\nexport interface IInvoicesTableHeaderComponent extends IComponent {}\n\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoiceNumberText}\n {resources.invoiceDateText}\n {resources.invoiceUsersText}\n {resources.invoiceAmountText}\n {resources.invoiceDueDateText}\n {resources.invoiceAmountDueText}\n {resources.invoiceStatusText}\n {resources.invoiceActionsText}\n \n );\n};\n\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoicesText}\n {resources.invoiceDateMobileText}\n \n {` `}\n {/* Actions */}\n \n );\n};\n\nconst InvoicesTableHeader: React.FC = (props: IInvoicesTableHeaderProps): JSX.Element => {\n const rowClassName = `${props.className}__row`;\n\n const switchCheckedState = () => {\n props.onSelectAll(!props.isSelectedAll);\n };\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = getMobileHeaderCells(props, rowClassName, switchCheckedState);\n } else {\n headerCells = getDesktopHeaderCells(props, rowClassName, switchCheckedState);\n }\n\n return (\n \n {headerCells}\n \n );\n};\n\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableHeaderComponent\n>('InvoicesTableHeaderComponent', { component: InvoicesTableHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, {\n IComponent,\n IComponentProps,\n ICoreContext,\n IDateFormatOptions,\n isOboRequest,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { getInvoiceDetailsPageUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../../helpers/invoice-data';\nimport { getInvoiceStatusText, IInvoiceStatusResources } from '../../../helpers/invoice-status';\nimport { IInvoiceErrorState } from '../../../invoices-list';\nimport { IPayInvoiceResources, PayInvoiceComponent } from '../../pay-invoice-component';\nimport { RequestInvoiceButton } from '../../request-invoice-button';\n\ninterface IInvoicesTableRowData {\n invoice: InvoiceModel;\n index: number;\n customer: Customer;\n}\n\nexport interface IInvoicesTableRowResources extends IInvoiceStatusResources, IPayInvoiceResources {\n invoiceCurrentUser: string;\n invoiceViewDetailsButtonText: string;\n invoiceViewDetailsButtonAriaLabel: string;\n invoiceActionsButtonTextAriaLabel?: string;\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel?: string;\n invoiceRequestButtonLabel: string;\n invoiceListSelectRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n isMobile: boolean;\n invoiceReferences?: React.RefObject;\n payInvoiceReferences?: React.RefObject;\n resources: IInvoicesTableRowResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice?(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableRowComponent extends IComponent {}\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\n/**\n * Request specific invoice function.\n * @param props -Invoice table row props.\n * @param requestInvoiceButtonReference -Reference button.\n * @returns Call Request Invoice.\n */\nconst onRequestSpecificInvoice = (\n props: IInvoicesTableRowProps,\n requestInvoiceButtonReference: React.RefObject\n) => () => {\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice, customer }\n } = props;\n\n const isCurrentUser =\n !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n \n \n {formatDate(props.context, invoice.invoiceDate)}\n \n \n {invoice.customerName}\n {isCurrentUser ? {props.resources.invoiceCurrentUser} : null}\n \n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\n \n {formatDate(props.context, invoice.dueDate)}\n \n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nlet setShowPreviousActions: React.Dispatch> | undefined;\n\n/**\n * On Click view details function.\n * @param linkToInvoiceDetails -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst onClickViewDetails = (linkToInvoiceDetails: string) => () => {\n if (MsDyn365.isBrowser) {\n window.location.href = linkToInvoiceDetails;\n }\n return;\n};\n\n/**\n * Toggle function.\n * @param isShowActions -Link to invoice details.\n * @param setShowActions -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst toggle = (isShowActions: boolean, setShowActions: React.Dispatch>) => () => {\n const shouldShowActions = !isShowActions;\n if (shouldShowActions) {\n if (setShowPreviousActions) {\n setShowPreviousActions(false);\n }\n setShowActions(shouldShowActions);\n setShowPreviousActions = setShowActions;\n } else {\n setShowPreviousActions = undefined;\n setShowActions(shouldShowActions);\n }\n};\n\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\n const {\n resources: {\n invoiceViewDetailsButtonAriaLabel,\n invoiceViewDetailsButtonText,\n invoiceActionsButtonTextAriaLabel,\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel\n },\n data: { index }\n } = props;\n\n const [showActions, setShowActions] = useState(false);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\n return (\n
    \n \n {showActions && !isOnBehalfOfRequest && (\n
    \n \n {invoiceViewDetailsButtonText}\n \n \n \n
    \n )}\n
    \n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice }\n } = props;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n
    \n {invoice.customerName}\n \n \n {formatDate(props.context, invoice.dueDate)}\n
    \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const {\n data: { invoice }\n } = props;\n\n const onSelectLine = () => {\n invoice.isSelected = !invoice.isSelected;\n props.onChange();\n };\n\n let rowCells: JSX.Element;\n if (props.isMobile) {\n rowCells = getMobileRowCells(props, onSelectLine);\n } else {\n rowCells = getDesktopRowCells(props, onSelectLine);\n }\n\n return {rowCells};\n};\n\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableRowComponent\n>('InvoicesTableRowComponent', { component: InvoicesTableRow });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../helpers/invoice-data';\nimport { IInvoiceErrorState } from '../../invoices-list';\nimport { IInvoicesTableHeaderResources, InvoicesTableHeaderComponent } from './components/invoices-table-header-component';\nimport { IInvoicesTableRowResources, InvoicesTableRowComponent } from './components/invoices-table-row-component';\n\ninterface IInvoicesTableData {\n invoices: InvoiceModel[];\n customer: Customer;\n}\n\nexport interface IInvoicesTableResources extends IInvoicesTableHeaderResources, IInvoicesTableRowResources {}\n\nexport interface IInvoicesTableProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n invoiceButtonReferences?: React.RefObject[];\n payInvoiceButtonReferences?: React.RefObject[];\n resources: IInvoicesTableResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableComponent extends IComponent {}\n\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nconst getViewport = (context: ICoreContext): GridSize => {\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (window?.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n};\n\nconst isMobileView = (context: ICoreContext) => {\n const viewport = getViewport(context);\n return viewport === 'xs' || viewport === 'sm';\n};\n\n/**\n * On select all function.\n * @param props -Invoice table props.\n * @returns On change.\n */\nconst onSelectAllHandler = (props: IInvoicesTableProps) => (isSelected: boolean) => {\n props.data.invoices.forEach(invoice => {\n invoice.isSelected = isSelected;\n });\n props.onChange();\n};\n\nconst InvoicesTable: React.FC = (props: IInvoicesTableProps): JSX.Element => {\n const [isMobile, setIsMobile] = useState(isMobileView(props.context));\n\n const updateViewport = () => {\n setIsMobile(isMobileView(props.context));\n };\n\n if (typeof window !== undefined && window.addEventListener) {\n window.addEventListener('resize', updateViewport);\n }\n const rowClassName = `${props.className}__row`;\n const headerClassName = `${props.className}__header`;\n\n return (\n \n invoice.isSelected)}\n isMobile={isMobile}\n isAdmin={props.data.customer.IsB2bAdmin || false}\n onSelectAll={onSelectAllHandler(props)}\n resources={props.resources}\n data={{}}\n />\n {props.data.invoices.map((invoice, index: number) => {\n return (\n \n );\n })}\n
    \n );\n};\n\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableComponent\n>('InvoicesTableComponent', { component: InvoicesTable });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\ninterface IMakePaymentData {\n invoices: InvoiceModel[];\n}\n\nexport interface IMakePaymentResources {\n makePaymentButtonText: string;\n makePaymentButtonAriaLabel: string;\n}\n\nexport interface IMakePaymentProps extends IComponentProps {\n context: ICoreContext;\n itemKey?: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n telemetryContent?: ITelemetryContent;\n navigationUrl?: string;\n buttonReferences?: React.RefObject;\n resources: IMakePaymentResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IMakePaymentProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.buttonReferences);\n }\n setDisabled(false);\n };\n\n await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\n};\n\nconst MakePaymentComponentActions = {\n onClick\n};\n\n/**\n * On Click function.\n * @param input -Make payment props.\n * @param setDisabled -Set Disabled.\n * @returns Make payment component on click.\n */\nconst onClickHandler = (input: IMakePaymentProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const {\n data: { invoices }\n } = input;\n const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {input.resources.makePaymentButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'MakePayment',\n { component: MakePayment }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { IPayableInvoice } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\nexport interface IPayInvoiceData {\n invoice: IPayableInvoice;\n}\n\nexport interface IPayInvoiceResources {\n payInvoiceButtonText: string;\n payInvoiceButtonAriaLabel: string;\n}\n\nexport interface IPayInvoiceProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n reference?: React.RefObject;\n resources: IPayInvoiceResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\ninterface IPayInvoiceComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IPayInvoiceProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.reference);\n }\n setDisabled(false);\n };\n\n await payInvoices([props.data.invoice], props.context.actionContext, propagateError);\n};\n\nconst PayInvoiceComponentActions = {\n onClick\n};\n\n/**\n * On click handler function.\n * @param props -Invoice props.\n * @param setDisabled -Set disabled.\n * @returns Pay invoice component action.\n */\nconst onClickHandler = (props: IPayInvoiceProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await PayInvoiceComponentActions.onClick(event, props, setDisabled);\n};\n\nconst PayInvoice: React.FC = (props: IPayInvoiceProps): JSX.Element => {\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {props.resources.payInvoiceButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const PayInvoiceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'PayInvoiceComponent',\n { component: PayInvoice, ...PayInvoiceComponentActions }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IRequestInvoiceButtonProps {\n innerReference?: React.RefObject;\n className: string;\n requestInvoiceButtonLabel: string;\n onClicked(): void;\n}\n\nexport const RequestInvoiceButton: React.FC = ({\n className,\n onClicked,\n requestInvoiceButtonLabel,\n innerReference\n}) => {\n return (\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 { InvoicePaidStatus, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IPayableInvoice {\n readonly id: string;\n readonly canBePaid: boolean;\n}\n\n/**\n * Represents invoice data model.\n */\nexport class InvoiceModel implements IPayableInvoice {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public amount?: number;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public currencyCode?: string;\n\n public isSelected: boolean;\n\n public constructor(invoice: OrderInvoice) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerAccountNumber = invoice.CustomerAccountNumber;\n this.customerName = invoice.CustomerName;\n this.amount = invoice.TotalAmount;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.currencyCode = invoice.CurrencyCode;\n\n this.isSelected = false;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IInvoiceStatusResources {\n invoiceStatusNone: string;\n invoiceStatusUnpaid: string;\n invoiceStatusPartiallyPaid: string;\n invoiceStatusPaid: string;\n}\n\nexport const getInvoiceStatusText = (resources: IInvoiceStatusResources, invoiceStatus: InvoicePaidStatus | undefined) => {\n switch (invoiceStatus) {\n case InvoicePaidStatus.None:\n return resources.invoiceStatusNone;\n\n case InvoicePaidStatus.Unpaid:\n return resources.invoiceStatusUnpaid;\n\n case InvoicePaidStatus.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n\n case InvoicePaidStatus.Paid:\n return resources.invoiceStatusPaid;\n default:\n return '';\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IInvoiceErrorState } from '../invoices-list';\nimport { IPayableInvoice } from './invoice-data';\n\nexport type ICartActionFailureReason = 'EMPTYINPUT' | 'CARTACTIONFAILED';\nexport interface IAddInvoicesToCartFailureResult {\n failureReason: ICartActionFailureReason;\n}\n\nexport const payInvoices = async (\n invoices: IPayableInvoice[],\n actionContext: IActionContext,\n onError: (errorState: IInvoiceErrorState) => void\n) => {\n const invoicesToAdd: string[] = invoices.filter(invoice => invoice.canBePaid).map(invoice => invoice.id);\n\n if (!ArrayExtensions.hasElements(invoicesToAdd)) {\n onError({ errorMessage: '', errorReason: { failureReason: 'EMPTYINPUT' } });\n return;\n }\n\n const cartState = await getCartState(actionContext);\n const result = await cartState.addInvoicesToCart({ invoiceIds: invoicesToAdd });\n\n if (result.status !== 'SUCCESS') {\n onError({\n errorMessage: '',\n errorReason: { failureReason: 'CARTACTIONFAILED' },\n otherError: result.errorDetails?.LocalizedMessage,\n errorCode: result.errorDetails?.ErrorResourceId\n });\n return;\n }\n\n const cartUrl = getUrlSync('cart', actionContext);\n if (cartUrl) {\n window?.location.assign(cartUrl);\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\n\n/* ---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { IInvoicesListResources } from '../invoices-list.props.autogenerated';\n\ninterface IRequestInvoiceModalProps {\n className: string;\n email: string;\n isModalOpen: boolean;\n submitRequestLabel: string;\n modalHeaderLabel: string;\n sendToEmailLabel: string;\n cancelLabel: string;\n searchPlaceholderLabel: string;\n invoices: InvoiceModel[];\n invoicesFoundString: string;\n singleInvoiceFoundString: string;\n searchButtonAltText: string;\n resources: IInvoicesListResources;\n toggle(): void;\n onSubmitRequest(invoiceId: string): void;\n}\n\n/**\n * On submit request click function.\n * @param selectedInvoiceIndex -Check is busy.\n * @param onClosing -On closing function.\n * @param filteredInvoices -Invoice modal.\n * @param onSubmitRequest -On submit request function.\n * @returns Call on submit request.\n */\nconst onSubmitRequestClick = (\n onClosing: () => void,\n filteredInvoices: InvoiceModel[],\n onSubmitRequest: (invoiceId: string) => void,\n checkboxRef: React.MutableRefObject\n) => () => {\n const defaultIndex = 0;\n let closingFlag: number = 0;\n\n filteredInvoices.map((invoice, index) => {\n const inputInvoice = checkboxRef.current[Number(index)] as React.RefObject;\n if (inputInvoice.current?.checked === true && index >= defaultIndex) {\n onSubmitRequest(invoice.id);\n closingFlag = closingFlag + 1;\n }\n });\n if (closingFlag <= filteredInvoices.length) {\n onClosing();\n }\n};\n\n/**\n * On search input change function.\n * @param setSearchInput -Set search input.\n * @returns Set search input function.\n */\nconst searchInputChangedHandler = (setSearchInput: React.Dispatch>) => (\n event: React.ChangeEvent\n) => {\n setSearchInput(event.target.value);\n};\n\n/**\n * Search entered handler.\n * @param invoices -InvoiceModel.\n * @param searchInput -String.\n * @param setFilteredInvoices -InvoiceModel action.\n * @param filteredInvoices -Filtered Invoices.\n * @param setSelectedInvoiceIndex -Selected Invoice Index.\n * @param setShouldShowSearchResults -Show search result action.\n * @param setInvoiceOptions -Invoice options action.\n * @param selectedInvoiceIndex -Selected invoice index.\n * @param className -String.\n * @returns Set invoice options.\n */\nconst searchEnteredHandler = (\n invoices: InvoiceModel[],\n searchInput: string,\n setFilteredInvoices: React.Dispatch>,\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: React.Dispatch>,\n setShouldShowSearchResults: React.Dispatch>,\n setInvoiceOptions: React.Dispatch>,\n selectedInvoiceIndex: number,\n className: string,\n checkboxRef: React.MutableRefObject\n) => () => {\n let updatedInvoices = filteredInvoices;\n if (!StringExtensions.isNullOrEmpty(searchInput)) {\n updatedInvoices = invoices.filter(invoice => invoice.id.toLocaleUpperCase().includes(searchInput.toLocaleUpperCase()));\n } else {\n updatedInvoices = invoices;\n }\n\n if (ArrayExtensions.hasElements(updatedInvoices)) {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(0);\n } else {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(-1);\n }\n setShouldShowSearchResults(true);\n\n setInvoiceOptions(\n renderInvoiceOptions(\n StringExtensions.isNullOrEmpty(searchInput) ? invoices : updatedInvoices,\n setSelectedInvoiceIndex,\n className,\n checkboxRef\n )\n );\n};\n\n/**\n * On cancel function.\n * @param onClosing -Closing function.\n * @param toggle -Toggle Function.\n * @returns Toggle function.\n */\nconst onCancelHandler = (onClosing: () => void, toggle: () => void) => () => {\n onClosing();\n toggle();\n};\n\n/**\n * On invoice select.\n * @param setSelectedInvoiceIndex -Set Selected Invoice Index.\n * @param index -Number.\n * @returns Set Selected Invoice Index.\n */\nconst onInvoiceSelectHandler = (setSelectedInvoiceIndex: (newIndex: number) => void, index: number) => () => {\n setSelectedInvoiceIndex(index);\n};\n\nconst renderInvoiceOptions = (\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: (newIndex: number) => void,\n className: string,\n checkboxRef: React.MutableRefObject\n) => {\n checkboxRef.current = filteredInvoices.map((_invoice, i) => checkboxRef.current[Number(i)] ?? React.createRef());\n return (\n
    \n {filteredInvoices.map((invoice, index) => {\n const onInvoiceSelect = onInvoiceSelectHandler(setSelectedInvoiceIndex, index);\n\n const checkboxId = `invoice__${invoice.id}`;\n const checkboxName = `invoiceSelect__${invoice.id}`;\n\n return (\n
    \n \n \n
    \n );\n })}\n
    \n );\n};\n\nexport const RequestInvoiceModal: React.FC = ({\n className,\n email,\n isModalOpen,\n toggle,\n modalHeaderLabel,\n sendToEmailLabel,\n submitRequestLabel,\n cancelLabel,\n onSubmitRequest,\n invoices,\n searchPlaceholderLabel,\n invoicesFoundString,\n singleInvoiceFoundString,\n searchButtonAltText,\n resources\n}) => {\n const [selectedInvoiceIndex, setSelectedInvoiceIndex] = React.useState(-1);\n const [filteredInvoices, setFilteredInvoices] = React.useState(invoices);\n const [searchInput, setSearchInput] = React.useState('');\n const [shouldShowSearchResults, setShouldShowSearchResults] = React.useState(false);\n const focusDelay = 110;\n const checkboxRef = React.useRef([]);\n const invoiceOptionsData = renderInvoiceOptions(filteredInvoices, setSelectedInvoiceIndex, className, checkboxRef);\n const [invoiceOptions, setInvoiceOptions] = React.useState(invoiceOptionsData);\n const focusElement = React.useRef(null);\n React.useEffect(() => {\n if (isModalOpen && focusElement.current) {\n setTimeout(() => {\n focusElement.current?.focus();\n }, focusDelay);\n }\n }, [isModalOpen]);\n\n /**\n * Sets the filtered invoices to the ones that were selected on the main screen.\n */\n const setFilteredInvoicesToSelectedInvoices = () => {\n setSelectedInvoiceIndex(-1);\n const selectedInvoices = invoices.filter(invoice => invoice.isSelected);\n if (ArrayExtensions.hasElements(selectedInvoices)) {\n setFilteredInvoices(selectedInvoices);\n\n // If only one invoice selected, auto select it\n if (selectedInvoices.length === 1) {\n setSelectedInvoiceIndex(0);\n }\n\n setInvoiceOptions(renderInvoiceOptions(selectedInvoices, setSelectedInvoiceIndex, className, checkboxRef));\n } else {\n setFilteredInvoices(invoices);\n setInvoiceOptions(renderInvoiceOptions(invoices, setSelectedInvoiceIndex, className, checkboxRef));\n }\n };\n\n const searchEntered = searchEnteredHandler(\n invoices,\n searchInput,\n setFilteredInvoices,\n filteredInvoices,\n setSelectedInvoiceIndex,\n setShouldShowSearchResults,\n setInvoiceOptions,\n selectedInvoiceIndex,\n className,\n checkboxRef\n );\n\n const onClosing = () => {\n setSelectedInvoiceIndex(-1);\n setFilteredInvoices(invoices);\n setSearchInput('');\n setShouldShowSearchResults(false);\n };\n\n /**\n * Sets the invoices that are possible to select when the dialog is opened.\n */\n const onOpened = () => {\n setSearchInput('');\n setFilteredInvoicesToSelectedInvoices();\n };\n\n const searchResultString = filteredInvoices.length === 1 ? singleInvoiceFoundString : invoicesFoundString;\n const invoicesFoundReplaceIndex = searchResultString.indexOf('{0}');\n\n return (\n \n \n {modalHeaderLabel}\n \n \n
    \n \n
    \n {email}\n
    \n
    \n {shouldShowSearchResults && (\n
    \n {searchResultString.substring(0, invoicesFoundReplaceIndex)}\n {filteredInvoices.length}\n {searchResultString.substring(invoicesFoundReplaceIndex + 3)}\n
    \n )}\n
    \n \n \n
    \n {invoiceOptions}\n
    \n
    \n
    \n \n \n {submitRequestLabel}\n \n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, isOboRequest } from '@msdyn365-commerce/core';\nimport {\n BusinessPartnerOperationDeliveryType,\n BusinessPartnerUsersDataActions,\n InvoicePaidStatus,\n InvoiceSearchCriteria,\n IQueryResultSettings,\n OrderInvoice\n} from '@msdyn365-commerce/retail-proxy';\nimport { getCurrentAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport {\n ArrayExtensions,\n getCustomer,\n GetCustomerInput,\n getInvoices,\n GetInvoicesInput,\n IQueryResultSettingsModuleConfig,\n QueryResultSettingsProxy,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\n\nimport { InvoiceErrorComponent } from './components/invoice-error-component';\nimport { InvoicesFilterComponent, InvoicesFilterState } from './components/invoices-filter-component';\nimport { InvoicesTableComponent } from './components/invoices-table/invoices-table-component';\nimport { IMakePaymentResources, MakePaymentComponent } from './components/make-payment-component';\nimport { RequestInvoiceButton } from './components/request-invoice-button';\nimport { RequestInvoiceModal } from './components/request-invoice-modal';\nimport { InvoiceModel } from './helpers/invoice-data';\nimport { IAddInvoicesToCartFailureResult } from './helpers/pay-invoices';\nimport { IInvoicesListData } from './invoices-list.data';\nimport { IInvoicesListProps } from './invoices-list.props.autogenerated';\n\nexport type InvoicesListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\nexport type InvoiceErrorHost = 'ADDINVOICETOCART';\n\nexport interface IInvoicesListViewProps extends IInvoicesListProps {\n moduleProps: IModuleProps;\n\n header: JSX.Element;\n filter: JSX.Element;\n content?: JSX.Element;\n invoiceRequestModal?: JSX.Element;\n pagination?: JSX.Element;\n}\n\nexport interface IInvoiceErrorState {\n errorHost?: InvoiceErrorHost;\n errorReason?: IAddInvoicesToCartFailureResult;\n errorMessage: string;\n otherError?: string;\n errorCode?: string;\n}\n\nexport interface IInvoicesListState {\n invoices: InvoiceModel[];\n invoicesFilterState: InvoicesFilterState;\n errorState: IInvoiceErrorState;\n isInvoiceRequestModalOpen: boolean;\n isLoading: boolean;\n isOpen: boolean;\n isPageLoaded: boolean;\n payInvoiceErrorModalOpen: boolean;\n selectedButtonElement?: HTMLButtonElement | null;\n}\n\n/**\n * InvoicesList component.\n * @extends {React.Component, IInvoicesListState>}\n */\n@observer\nclass InvoicesList extends React.Component, IInvoicesListState> {\n private readonly _className: string = 'msc-invoices-list';\n\n private readonly payInvoiceRequestReference: React.RefObject;\n\n private readonly makePaymentReference: React.RefObject;\n\n private buttonChildReference: React.RefObject[] = [];\n\n private buttonChildPayButtonReference: React.RefObject[] = [];\n\n private readonly _queryResultSettings: IQueryResultSettings;\n\n private invoiceIds: string[] = [];\n\n constructor(props: IInvoicesListProps) {\n super(props);\n\n this._queryResultSettings = QueryResultSettingsProxy.fromModuleData(\n this.props.context.request,\n this.props.config as IQueryResultSettingsModuleConfig\n ).QueryResultSettings;\n this.payInvoiceRequestReference = React.createRef();\n this.makePaymentReference = React.createRef();\n this._updateInvoicesState = this._updateInvoicesState.bind(this);\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._onToggleInvoiceRequestModal = this._onToggleInvoiceRequestModal.bind(this);\n this._handleFilterStateChange = this._handleFilterStateChange.bind(this);\n this._loadMoreInvoices = this._loadMoreInvoices.bind(this);\n this._requestInvoice = this._requestInvoice.bind(this);\n this._requestSpecificInvoice = this._requestSpecificInvoice.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n this.state = {\n invoices: [],\n invoicesFilterState: InvoicesFilterState.ShowAll,\n isLoading: true,\n isOpen: true,\n isPageLoaded: false,\n errorState: { errorMessage: '' },\n isInvoiceRequestModalOpen: false,\n payInvoiceErrorModalOpen: false,\n selectedButtonElement: null\n };\n }\n\n public shouldComponentUpdate(nextProps: IInvoicesListProps, nextState: IInvoicesListState): 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 config: { className = '', heading },\n context: {\n request: { channel },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n data: { customerBalance },\n resources: { invoicesListTitle, invoicesListDescTitle, invoicesListDescCount }\n } = this.props;\n\n const totalAmount = customerBalance.result?.OpenInvoiceBalance || 0;\n const amountText = `${formatCurrency(totalAmount.toFixed(2), currencyCode)} ${channel?.Currency || 'USD'}`;\n\n const totalCount = customerBalance.result?.OpenInvoiceCount || 0;\n const countText = invoicesListDescCount.replace('{0}', totalCount.toString());\n const invoicesListTitleHeading = heading?.text ?? invoicesListTitle;\n\n const headerClassName = `${this._className}__header`;\n\n const header = (\n
    \n \n
    \n
    {invoicesListDescTitle}
    \n
    {amountText}
    \n
    {countText}
    \n
    \n
    \n );\n\n const viewProps: IInvoicesListViewProps = {\n ...(this.props as IInvoicesListProps),\n moduleProps: {\n moduleProps: this.props,\n className: classnames(this._className, className)\n },\n header,\n invoiceRequestModal: this._renderInvoiceRequestModal(),\n filter: this._renderInvoicesFilter(this._className),\n pagination: this._renderPagination()\n };\n\n if (!this.state.isPageLoaded) {\n return this.props.renderView(viewProps);\n }\n\n if (ArrayExtensions.hasElements(this.state.invoices)) {\n viewProps.content = this._renderListContainer();\n } else {\n viewProps.content = this._renderEmptyInvoiceLinesPageContent();\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public async componentDidMount(): Promise {\n await this.props.data.customer;\n const invoicesData = await this.props.data.invoices;\n this._initializeWithInvoices(invoicesData);\n\n reaction(\n () => this.state.isInvoiceRequestModalOpen,\n async () => {\n if (this.invoiceIds && !this.state.isInvoiceRequestModalOpen) {\n const context = { callerContext: this.props.context.actionContext };\n const b2bUserId: string = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\n for (const invoiceId of this.invoiceIds) {\n await BusinessPartnerUsersDataActions.requestInvoiceCopyAsync(\n context,\n b2bUserId,\n invoiceId,\n BusinessPartnerOperationDeliveryType.Email\n );\n }\n this.invoiceIds = [];\n }\n }\n );\n }\n\n private _initializeWithInvoices(invoicesData: OrderInvoice[]): void {\n const invoices = invoicesData.map((invoice, index) => {\n this.buttonChildReference[Number(index)] = React.createRef();\n this.buttonChildPayButtonReference[Number(index)] = React.createRef();\n return new InvoiceModel(invoice);\n });\n this.setState({\n invoices,\n isLoading: false,\n isPageLoaded: true\n });\n }\n\n private _addInvoices(invoicesData: OrderInvoice[]): void {\n const newInvoices = invoicesData.map(invoice => new InvoiceModel(invoice));\n const invoices = this.state.invoices.concat(newInvoices);\n this.setState({\n invoices,\n isLoading: false\n });\n }\n\n private _renderEmptyInvoiceLinesPageContent(): JSX.Element {\n const containerClass = `${this._className}__empty-lines__container`;\n const actionsContainerClass = `${containerClass}__actions`;\n return (\n
    \n
    {this.props.resources.invoiceEmptyInvoiceLinesTitle}
    \n
    {this.props.resources.invoiceEmptyInvoiceLinesDescription}
    \n
    \n \n {this.props.resources.invoiceEmptyInvoiceLinesContinueShoppingButtonText}\n \n
    \n
    \n );\n }\n\n private _renderListContainer(): JSX.Element {\n const containerClass = `${this._className}__container`;\n const containerHeaderClass = `${containerClass}__header`;\n const containerContentClass = `${containerClass}__content`;\n const isOnBehalfOfRequest = isOboRequest(this.props.context.request);\n\n return (\n
    \n
    \n {this._renderMakePayment(containerHeaderClass, isOnBehalfOfRequest)}\n {this._renderInvoiceRequestButton()}\n
    \n
    {this._renderInvoiceErrors()}
    \n
    {this._renderInvoicesList(containerContentClass)}
    \n
    \n );\n }\n\n private _updateInvoicesState(): void {\n this.setState({\n invoices: this.state.invoices\n });\n }\n\n private async _getInvoicesSearchCriteria(state: InvoicesFilterState): Promise {\n const searchCriteria: InvoiceSearchCriteria = {};\n\n const context = this.props.context.actionContext;\n\n const businessPartner = await getCurrentAsync({ callerContext: context });\n searchCriteria.BusinessPartnerId = businessPartner?.BusinessPartnerId;\n\n const customer = await getCustomer(new GetCustomerInput(context.requestContext.apiSettings), context);\n searchCriteria.CustomerId = customer?.AccountNumber;\n\n switch (state) {\n case InvoicesFilterState.ShowAll:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.None];\n break;\n case InvoicesFilterState.Paid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Paid];\n break;\n case InvoicesFilterState.PartiallyPaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.PartiallyPaid];\n break;\n case InvoicesFilterState.Unpaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Unpaid];\n break;\n default:\n throw new Error('Failed to process unknown invoices filter state.');\n }\n\n return searchCriteria;\n }\n\n private async _handleFilterStateChange(state: InvoicesFilterState): Promise {\n this.setState({\n invoicesFilterState: state,\n isLoading: true\n });\n\n const searchCriteria = await this._getInvoicesSearchCriteria(state);\n\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip = 0;\n }\n\n const invoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._initializeWithInvoices(invoices);\n }\n\n private _renderInvoicesFilter(className: string): JSX.Element {\n const containerClass = `${this._className}__container`;\n const containerContentClass = `${containerClass}__content`;\n const filterClassName = `${className}__filter`;\n return (\n
    \n
    {this._renderInvoiceInCartPaymentMessage()}
    \n \n
    \n );\n }\n\n private _renderInvoicesList(className: string): JSX.Element {\n const tableClassName = `${className}__table`;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState, reference?: React.RefObject): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n errorState.errorMessage =\n newErrorState.errorReason?.failureReason === 'EMPTYINPUT'\n ? this.props.resources.invoiceErrorInvoiceIdNotExist\n : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\n\n const shouldShowAdditionalInfoInPopup =\n errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineNotAllowedWithItemLines';\n this.setState({ errorState, payInvoiceErrorModalOpen: shouldShowAdditionalInfoInPopup, selectedButtonElement: reference?.current });\n }\n\n private _renderMakePayment(className: string, disabled: boolean): JSX.Element {\n const id = `${className}__make-payment`;\n const makePaymentResources: IMakePaymentResources = {\n makePaymentButtonText: this.props.resources.makePaymentButtonText,\n makePaymentButtonAriaLabel: this.props.resources.makePaymentButtonAriaLabel\n };\n\n const selectedInvoices = this._getSelectedInvoices();\n\n return (\n \n );\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({\n payInvoiceErrorModalOpen: false\n });\n this.state.selectedButtonElement?.focus();\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${this._className}__errors`;\n\n return (\n \n );\n }\n\n private _renderInvoiceInCartPaymentMessage(): JSX.Element {\n const cart = this.props.data.cart?.result;\n\n if (!cart?.hasInvoiceLine) {\n return <>;\n }\n\n return (\n \n \n \n );\n }\n\n // Dismiss alert.\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private _renderPagination(): JSX.Element | undefined {\n const { data, resources } = this.props;\n const invoices = data?.invoices?.result;\n if (!invoices || invoices.length < this._queryResultSettings.Paging!.Top!) {\n return undefined;\n }\n\n return (\n \n {resources.invoicesLoadMore}\n \n );\n }\n\n private async _loadMoreInvoices(): Promise {\n this.setState({ isLoading: true });\n const searchCriteria = await this._getInvoicesSearchCriteria(this.state.invoicesFilterState);\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip! += this._queryResultSettings.Paging.Top!;\n }\n const newInvoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._addInvoices(newInvoices);\n }\n\n private _renderInvoiceRequestModal(): JSX.Element {\n const customer = this.props.data.customer.result;\n const {\n invoiceRequestModalCancelLabel,\n invoiceRequestModalSubmitLabel,\n invoiceRequestModalHeaderLabel,\n invoiceRequestModalSendToEmailLabel,\n invoiceRequestModalSearch,\n invoiceRequestModalInvoiceSearchDisplay,\n invoiceRequestModalSingleInvoiceSearchDisplay,\n invoiceRequestModalSearchButton\n } = this.props.resources;\n\n return (\n \n );\n }\n\n private _onToggleInvoiceRequestModal(): void {\n this.setState({\n isInvoiceRequestModalOpen: !this.state.isInvoiceRequestModalOpen\n });\n if (this.state.isInvoiceRequestModalOpen) {\n this.state.selectedButtonElement?.focus();\n }\n }\n\n /**\n * Request specific invoice function.\n */\n private readonly _onToggleInvoiceRequestParentModal = () => {\n this.setState(\n {\n selectedButtonElement: this.payInvoiceRequestReference.current\n },\n () => {\n this._onToggleInvoiceRequestModal();\n }\n );\n };\n\n private _renderInvoiceRequestButton(): JSX.Element | null {\n const { invoiceRequestButtonLabel } = this.props.resources;\n const customer = this.props.data.customer.result;\n\n if (StringExtensions.isNullOrWhitespace(customer?.Email)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _requestInvoice(invoiceId: string): void {\n this.invoiceIds.push(invoiceId);\n this._onToggleInvoiceRequestModal();\n }\n\n private _getSelectedInvoices(): InvoiceModel[] {\n let selectedInvoices = this.state.invoices.filter(invoice => invoice.isSelected);\n if (!ArrayExtensions.hasElements(selectedInvoices)) {\n selectedInvoices = this.state.invoices;\n }\n\n return selectedInvoices;\n }\n\n private _requestSpecificInvoice(\n specificInvoice: InvoiceModel,\n requestInvoiceButtonReference: React.RefObject\n ): void {\n this.state.invoices.forEach((invoice: InvoiceModel) => {\n if (invoice === specificInvoice) {\n invoice.isSelected = true;\n } else {\n invoice.isSelected = false;\n }\n });\n this.setState({\n selectedButtonElement: requestInvoiceButtonReference.current\n });\n this._onToggleInvoiceRequestModal();\n }\n}\n\nexport default InvoicesList;\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 { IInvoicesListViewProps } from './invoices-list';\n\nexport const InvoiceListView: React.FC = props => {\n const { header, filter, content, invoiceRequestModal, pagination } = props;\n\n return (\n \n {header}\n {invoiceRequestModal}\n {filter}\n {content}\n {pagination}\n \n );\n};\n\nexport default InvoiceListView;\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 { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IMapData } from './map.data';\nimport { IMapProps, IPushpinOptionsData } from './map.props.autogenerated';\n\n/**\n * Header Interface.\n */\nexport interface IHeader {\n headerProps: INodeProps;\n heading: React.ReactNode;\n}\n\n/**\n * MapViewProps Interface.\n */\nexport interface IMapViewProps extends IMapProps {\n ModuleProps: IModuleProps;\n Header: IHeader;\n MapProps: INodeProps;\n Map: Microsoft.Maps.Map | undefined;\n}\n\n/**\n *\n * Map component.\n * @extends {React.Component>}\n */\n@observer\nclass Map extends React.Component> {\n @observable public map: Microsoft.Maps.Map | undefined;\n private timeout: number = 500;\n\n private readonly mapRef: React.RefObject = React.createRef();\n\n public constructor(props: IMapProps) {\n super(props);\n }\n\n public componentDidMount(): void {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n }\n } = this.props;\n\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 loadMapAPIInput = {\n key: channel?.BingMapsApiKey,\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n };\n\n if (\n this.props.data.storeSelectorStateManager?.result?.isMapApiLoaded ||\n this.props.data.distributorSelectorStateManager?.result?.isMapApiLoaded\n ) {\n this._initMap();\n if (this.props.data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen) {\n this._updateMapsForDistributor();\n } else {\n this._updateMap();\n }\n }\n\n when(\n () => !!this.props.data.storeSelectorStateManager?.result?.setMapModuleLoaded,\n () => {\n this.props.data.storeSelectorStateManager?.result?.setMapModuleLoaded(true);\n }\n );\n\n when(\n () => !!this.props.data.distributorSelectorStateManager?.result?.setMapModuleLoaded,\n () => {\n this.props.data.distributorSelectorStateManager?.result?.setMapModuleLoaded(true);\n }\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager?.result?.loadMapApi ||\n this.props.data.distributorSelectorStateManager?.result?.loadMapApi,\n () => {\n if (this.props.data.distributorSelectorStateManager?.result?.loadMapApi) {\n this.props.data.distributorSelectorStateManager?.result?.loadMapApi(loadMapAPIInput);\n } else {\n this.props.data.storeSelectorStateManager?.result?.loadMapApi(loadMapAPIInput);\n }\n }\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager?.result?.isMapApiLoaded ||\n this.props.data.distributorSelectorStateManager?.result?.isMapApiLoaded,\n () => {\n this._initMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.storeSelectorStateManager.result?.context?.orgUnitStoreInformation,\n this.props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n this.map\n ];\n },\n () => {\n this._updateMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.distributorSelectorStateManager?.result?.distributorList,\n this.props.data.distributorSelectorStateManager?.result?.selectedDistributorId,\n this.map\n ];\n },\n () => {\n this._updateMapsForDistributor();\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { heading, className },\n data\n } = this.props;\n\n const shouldDisplayMap = data.storeSelectorStateManager?.result?.isDialogOpen\n ? data.storeSelectorStateManager?.result?.listMapViewState.displayMap\n : data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen\n ? data.distributorSelectorStateManager?.result?.listMapViewState.displayMap\n : false;\n\n const viewProps: IMapViewProps = {\n ...this.props,\n ModuleProps: {\n tag: 'div',\n moduleProps: this.props,\n className: classname('ms-map', { show: shouldDisplayMap }, className)\n },\n Header: {\n headerProps: { className: 'ms-map__header' },\n heading: heading?.text && (\n \n )\n },\n MapProps: {\n tag: 'div',\n className: 'ms-map__body',\n ref: this.mapRef\n },\n Map: this.map\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Initialize the map.\n */\n private readonly _initMap = () => {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n data\n } = this.props;\n\n if (data.storeSelectorStateManager?.result?.isMapApiLoaded || data.distributorSelectorStateManager?.result?.isMapApiLoaded) {\n const mapLoadOptions = {\n credentials: channel?.BingMapsApiKey,\n pushpinAccessible: true\n };\n this.map = new Microsoft.Maps.Map(this.mapRef.current as HTMLElement, mapLoadOptions);\n Microsoft.Maps.Events.addHandler(this.map, 'click', async () => {\n if (data.distributorSelectorStateManager?.result?.isDistributorSelectorDialogOpen) {\n // Hide the distributor details that appear below the screen size of 768px.\n data.distributorSelectorStateManager?.result?.updateDistributorMapVisibility(false);\n await data.distributorSelectorStateManager?.result?.setSelectedDistributorId(undefined);\n } else {\n await data.storeSelectorStateManager?.result?.setSelectedStoreLocationId(undefined);\n }\n });\n }\n };\n\n private readonly _updateMapsForDistributor = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const distributorSelectorStateManager = this.props.data.distributorSelectorStateManager?.result;\n const distributorInfoList = distributorSelectorStateManager?.distributorList;\n const selectedDistributorId = distributorSelectorStateManager?.selectedDistributorId;\n\n if (this.map && ArrayExtensions.hasElements(distributorInfoList)) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const distributorList = distributorInfoList.filter(distributor => distributor.OrgUnit !== undefined);\n\n for (const [index, distributorInfo] of distributorList.entries()) {\n const orgUnit = distributorInfo.OrgUnit;\n\n if (orgUnit?.Latitude && orgUnit.Longitude) {\n const isLocationSelected = selectedDistributorId === orgUnit?.RecordId;\n const options = this._getPushpinOptions(isLocationSelected, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(orgUnit?.Latitude, orgUnit.Longitude), options);\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleDistributorPushpinClick(orgUnit.RecordId);\n });\n isLocationSelected ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isLocationSelected) {\n mapLocation = orgUnit;\n }\n }\n }\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect?.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true } as Microsoft.Maps.IMapOptions);\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Update the map.\n */\n private readonly _updateMap = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager?.result;\n const orgUnitStoreInformation = storeSelectorStateManager?.context?.orgUnitStoreInformation;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n\n if (this.map && orgUnitStoreInformation) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const storeLocationList = orgUnitStoreInformation.filter(store => store.OrgUnitAvailability !== undefined);\n\n for (const [index, unitStoreInfo] of storeLocationList.entries()) {\n const storeLocation = unitStoreInfo.OrgUnitAvailability?.OrgUnitLocation;\n\n if (storeLocation?.Latitude && storeLocation.Longitude) {\n const isSelectedLocation = selectedStoreLocationId === storeLocation.OrgUnitNumber;\n const options = this._getPushpinOptions(isSelectedLocation, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(\n new Microsoft.Maps.Location(storeLocation.Latitude, storeLocation.Longitude),\n options\n );\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleClickEvent(storeLocation.OrgUnitNumber);\n });\n isSelectedLocation ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isSelectedLocation) {\n mapLocation = storeLocation;\n }\n }\n }\n\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n // Create a LocationRect from array of pushpins and set the map view.\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect?.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true } as Microsoft.Maps.IMapOptions);\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Handle click event.\n * @param orgUnitNumber - Organization unit number.\n */\n private readonly handleClickEvent = (orgUnitNumber: string | undefined): void => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n if (orgUnitNumber) {\n setTimeout(() => {\n storeSelectorStateManager?.setSelectedStoreLocationId(orgUnitNumber);\n }, this.timeout);\n }\n };\n\n /**\n * Handle the click event of the pushpin for distributors on the maps.\n * @param recordId - RecordId.\n */\n private readonly handleDistributorPushpinClick = (recordId: number | undefined): void => {\n const distributorSelectorStateManager = this.props.data.distributorSelectorStateManager?.result;\n // Show the distributor details that appear below the screen size of 768px.\n distributorSelectorStateManager?.updateDistributorMapVisibility(true);\n distributorSelectorStateManager?.setSelectedDistributorId(undefined);\n if (recordId) {\n setTimeout(() => {\n distributorSelectorStateManager?.setSelectedDistributorId(recordId);\n }, this.timeout);\n }\n };\n\n /**\n * Get the pushpin option.\n * @param isSelectedLocation - Is selected location.\n * @param index - Index.\n * @param pushpinOptions - PushpinOptions.\n * @returns - The pushpin options.\n */\n private readonly _getPushpinOptions = (isSelectedLocation: boolean, index: number, pushpinOptions?: IPushpinOptionsData) => {\n const text = pushpinOptions?.showIndex ? (index + 1).toString() : undefined;\n\n const size = pushpinOptions?.size || 1;\n const color = isSelectedLocation ? pushpinOptions?.selectionColor || pushpinOptions?.color : pushpinOptions?.color;\n const icon = this._getSvgIcon(size, color, text);\n\n return {\n // Fallback if icon doesn't render properly\n color: isSelectedLocation ? pushpinOptions?.selectionColor : pushpinOptions?.color,\n icon\n };\n };\n\n private readonly _getSvgIcon = (size: number, color?: string, text?: string) => {\n const baseValue: number = 32;\n return `\n \n ${text ? `${text}` : ''}\n `;\n };\n}\n\nexport default Map;\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 { IHeader, IMapViewProps } from './map';\n\n/**\n * Render the heading.\n * @param param0 -- Heading props.\n * @param param0.headerProps -- Heading Props.\n * @param param0.heading -- Heading Node.\n * @returns -- Returns the node.\n */\nconst MapHeader: React.FC = ({ headerProps, heading }) => {heading};\n\n/**\n * Renders the map view props.\n * @param param0 -- Map view props.\n * @param param0.ModuleProps -- Module props.\n * @param param0.Header -- Header props.\n * @param param0.MapProps -- Map props.\n * @returns -- Returns the map module.\n */\nconst MapView: React.FC = ({ ModuleProps, Header, MapProps }) => (\n \n {Header && }\n \n \n);\n\nexport default MapView;\n","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\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","ShippingService","paragraph","links","cta","index","role","title","linkText","linkUrl","destinationUrl","ariaLabel","openInNewTab","undefined","Iframe","iframeRef","isConsentGiven","cookies","srcURL","URL","error","telemetry","exception","protocol","toLocaleLowerCase","iframeClassName","_createHeading","IframeContainer","moduleProps","IFrame","_createIframe","alert","_renderAlert","cookieConsentRequiredMessage","cookieConsentAccepted","message","targetURL","style","height","width","frameBorder","iframeAriaLabel","ref","IFrameView","Module","apiToken","GetWineFilterable","Msdyn365","filters","dataCacheType","cacheObjectType","cacheKey","JSON","stringify","_token","queryFilters","filtersToHTTPQueryString","queryString","keys","forEach","queryKey","queryValue","substr","WineMapper","input","_input","_applyMap","inputData","inputMap","mappedOutput","GetWineInternationalLocationInput","_url","brand_code","country","fullUrl","GetWineInternationalLocationMap","GetWineInternationalLocationDistributorMap","GetWineInternationalLocationCountryMap","GetWineLocationInternationalMapper","output","totalPages","totalResults","page","distributors","distributor","distributorOutput","action","async","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","items","_constructItems","onChange","event","newItem","itemList","find","item","isAriaSelected","label","__decorate","observable","observer","WineFinderQueryLocation","_props$config$default","_props$config$default2","_queryLocation","_queryRadius","_allowRetail","_allowRestaurant","_product","_queryRadii","_handleQueryLocationChange","_handleSearchRadiusChange","_toggleRetail","_toggleRestaurant","_doQuery","defaultFilters","retail","restaurant","state","loading","radii","allowRadiiDisplay","defaultRadius","wineFinder__domesticTitle","wineFinder__domesticSearchRadiusLabel","wineFinder__retailFilterText","wineFinder__restaurantFilterText","domesticSearch","enablePlaceholders","placeholders","cssClass","active","onSubmit","preventDefault","htmlFor","type","placeholder","required","showChooseWineInput","_renderProductsDropdownList","displayFilters","_hasFilterActive","checked","disabled","_isInvalid","onKeyPress","wineFinderSubmit","setState","queryRadius","location","radius","on_premise","filterState","restaurantActive","retailActive","onQuerySearch","Number","test","_renderProductOptions","option","product_key","description","GetWineCountriesInput","shouldCacheOutput","IGetWineCountriesMap","GetWineCountriesMapper","WineFinderQueryLocationInternational","_countries","_handleCountrySelectionChange","_queryCountries","catch","err","name","iso","wineFinder__internationalTitle","wineFinder__internationalCountryLabel","submitText","_selectedCountry","newCountry","countries","WineCountries","resultsDisplay","showProductsConfiguration","TitleTag","WineFinderWineDisplay","_isOpen","_wines","wines","reaction","allOpen","open","expandedState","_closeToggle","hideProducts","showProducts","showProductsLabel","_showButton","_renderWineList","showButton","showProductsHideButton","list","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","filter","getWineProducts","checkoutApplePay","applePayButton","applePayImage","setApplePayImage","msdyn365Commerce","isBrowser","documentElement","setProperty","DeliveryOptionList","_ref","DeliveryOptionsList","globalConfig","options","pennyShippingMethodIds","pennyShippingIds","modShippingMethodIds","modShippingIds","localList","combinedList","a","b","ShippingChargeAmount","deliveryData","isModShippingMethod","modShipping","RecordId","isPennyShippingMethod","pennyShipping","amount","Node","deliveryOption","DeliveryOption","radioButton","price","DeliveryOptionSelected","_ref2","ErrorMessage","_ref3","CheckoutDeliveryOptions","viewState","deliveryOptions","deliveryOptionsData","deliveryOptionSelected","errorMessage","waiting","saveButton","editButton","cancelButton","isLoading","isError","isShowList","app","isShowSelected","isShowSaveButton","isShowEditButton","isShowCancelButton","AccountCustomerBalanceTile","telemetryContent","getTelemetryObject","telemetryPageName","friendlyName","_initState","hasError","ErrorComponent","apiGenericErrorMessage","get","customerResult","allowOnAccountPayment","AllowOnAccountPayment","isB2BSite","isChannelTypeB2B","enableCustomerAccountPayment","shouldComponentUpdate","nextProps","nextState","isCustomerAccountPaymentEnabled","isDetailsLinkDisplayed","LinksComponent","onTextChange","requestContext","account","Balance","CreditLimit","InvoiceAccountBalance","InvoiceAccountCreditLimit","noCreditErrorMessage","accountCreditVerbagePrefix","accountCreditVerbagePostfix","currencyCode","formatCurrency","customerCredit","customerCreditFormatted","toFixed","CreditComponent","verbagePrefix","verbagePostfix","computed","_mapEditableLinks","linkdata","editableLinks","payLoad","getPayloadObject","link","contentAction","etext","attributes","getTelemetryAttributes","editableLink","additionalProperties","editProps","Link","noclick","attribute","onTelemetryClick","itemProp","Separator","separator","Breadcrumb","_pageType","urlTokens","pageType","_getRootLink","root","_getCustomBreadcrumbLinks","itemPosition","keyIndex","_getCategoryHierarchy","categoryHierarchy","_getFriendlyName","locale","NameTranslations","Url","nameTranslations","_nameTranslation","nameTranslation","ArrayExtensions","hasElements","Language","toLowerCase","Text","_getPDPLinks","categoryPaths","requestUrl","Name","hideProductName","_goBack","window","history","back","_getPDPBackButton","query","MsDyn365","referrer","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","breadcrumbType","linkSeparator","breadcrumbViewProps","BreadcrumbContainer","BreadcrumbList","BreadcrumbListItem","backButton","SignUpButton","Button","SignUpError","errorClassName","GetMaxLength","maxLength","parsedMaxLength","parseInt","isNaN","SignUpInput","pattern","isRequired","fieldReference","InputType","TextArea","SignUpLabel","forId","BusinessSignUpRadioButtonOption","InputID","renderInputSection","inputs","needToReset","onInputChange","showErrors","addressForm","updateAddress","element","maxChars","customClass","radioButtonOptions","radioButtonGroupClass","baseSignUpItem","wrapper","Address","isAddressInput","updateForm","resetAddress","splice","RadioButton","BusinessSignUp","_this","moduleClassName","prospectRadioButtonName","BusinessSignUpDefaultInputs","ProspectType","prospectTypeLabel","prospectTypeBuyerLabel","_onInputChange","prospectTypeSellerLabel","FirstName","firstNameLabel","LastName","lastNameLabel","Email","emailAddressLabel","EmailRegex","defaultRegex","source","CompanyName","companyLabel","Department","departmentLabel","JobTitle","jobTitleLabel","Size","companySizeLabel","companyAddressLabel","Comment","commentLabel","formChildReference","needsToReset","handleHeadingChange","_onAddressChange","errors","currentAddress","newForm","formItems","addressItem","addressHasErrors","showAddressErrors","isReady","_isFormReady","currentInput","_onSubmit","firstName","_getItem","lastName","companyName","companyEmail","companyAddress","jobTitle","department","companySize","comments","prospectType","newPartner","CompanySize","Comments","ProspectTypeValue","createProspectAsync","callerContext","then","successPageURL","confirmationLink","getUrlSync","hasSubmitErrors","_onCancel","cleanForm","isAddress","arguments","_addedReference","_this$formChildRefere","current","focus","businessSignUp","ContainerWrapper","onEdit","businessSignUpForm","_renderForm","slots","signUpButtonArialabel","signUpButtonText","cancelButtonArialabel","cancelButtonText","partialAddressErrorMessage","addressSlot","form","FormWrapper","buttons","disclaimer","newFormFields","BusinessSignUpItem","button","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","status","btnEnabled","businessPartnerPromotionProps","renderNotificationBar","sellerDescriptions","renderSellerDescriptions","termsOfServiceCheckbox","termsOfServiceLinkText","termsOfServiceAgreementText","termsOfServiceModal","Modal","isOpen","horizontalPosition","verticalPosition","autoFocus","fade","toggle","ModalHeader","termsOfServiceModalHeading","ModalBody","submitButton","submitRequestLabel","notificationBar","Alert","color","results","idx1","_description$bulletPo","bulletPoints","bulletPoint","idx2","user","ObjectExtensions","isNullOrUndefined","StringExtensions","isNullOrEmpty","IsAdmin","CountryPicker","_telemetryContent","_preferredSiteStorageKey","_cookieExpirationTime","closeModal","isModalOpen","_handleStayOnSiteButtonClick","_this$props$context$r","currentBaseUrl","marketSettings","urlToStore","_appendProtocolToUrl","_writeToCookie","_handleClick","storageKey","storageValue","cookieOptions","secure","sameSite","maxAge","set","baseUrl","includes","isCookieValueSet","_heading$tag","subheading","countryList","actionLink","countryPickerHeading","handleTextChange","countryPickerSubHeading","handleParagraphChange","countryPickerActionLink","createLink","currentSiteButton","stayOnCurrentSiteButtonText","viewprops","modalContainer","modalTransition","timeout","shouldUpdateFocusToFirstElement","modalHeaderContainer","closeButtonTabIndex","modalFooterContainer","ModalFooter","modalBodyContainer","renderCountryList","stayOnCurrentSiteButton","handleLinkTextChange","_this$props$config$ac","_link$linkText","localeItems","renderCountry","localeItem","_image$imageSettings","_image$src","localeBaseUrl","matchedCountryItem","imageSize","xl","imageProps","displayString","altText","loadFailureBehavior","shouldSkipToMainImage","displaySubString","countryPickerView","_renderTextBlock","textBlocks","_renderSocialShare","socialShare","_renderCartAndActions","addToCart","addToOrderTemplate","addToWishlist","errorBlock","_renderConfigure","configure","ContainerProps","dropdowns","_renderConfigureDropdown","dropdown","LabelContainerProps","select","_renderFindInStore","findInStore","storeSelector","modal","productPickupOptionList","onChangeHandler","callbacks","newValue","updateQuantity","_renderQuantity","quantityComponent","extentionResources","quantityLimitsMessages","applyDefaultOrderSettings","quantity","IncrementalQuantity","currentCount","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderKeyInPrice","keyInPrice","_renderShopSimilarItem","shopSimilarItem","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","mediaGallery","bulkPurchaseLink","NavigationMenuView","currentLevel","_positionInSetOffset","escapeKey","_updateCategoryImage","categoryImageSrc","promotionalImage","promotionalContent","imageSrc","promotionalItemImageSettings","categoryImage","categoryImageAltText","_handleDropdownToggle","parentId","isMobileView","activeMenu","parentMenu","showCategoryImage","imageSource","_resetFocus","setTimeout","menuNode","_handleClickOutside","contains","_handleFocusOutside","relatedTarget","_closeSubmenu","_escFunction","keyCode","navDrawerList","from","childNodes","navDrawerButton","firstChild","getAttribute","_getCategoryImage","categoryImageUrl","generateImageUrl","sm","md","_categoryImage$imageS","ImageData","categoryImageSettings","_onDrawerChange","drawerState","drawerKeyValue","newPair","buttonText","body","addEventListener","componentWillUnmount","removeEventListener","_renderMobileMenu","_renderDesktopMenu","menuItemData","Navigation","menuItem","posinset","_renderDrawerMenu","MenuList","_renderDisplay","setSize","subMenu","_renderDrawer","_renderLinkMenuItem","toggleButtonText","keyValue","isDrawerOpen","colProps","Drawer","toggleButtonProps","openGlyph","onToggle","collapseProps","closeGlyph","glyphPlacement","_renderLinkText","menuSubItem","currentPos","_menuItem$subMenu2","_menuItem$subMenu","_renderDrawerLink","linkURL","_renderSpanMenuItem","ListItem","menuItemList","menuItemDatum","_getFromSubMenu","_createMenuItemList","subMenus","i","found","_renderSubMenu","_renderButtonMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","idx","hasOptions","haveSubmenu","round","_renderMenu","onFocus","hoverEffect","isParent","imagesource","shouldOpenNewTab","onMouseOver","_renderPromotionalLink","Span","level","currentItem","submenu","DivContainer","ImageDivContainer","showPromotionalContent","categoryImageDisplay","promotionalContentDisplay","DivContainerClass","_item$additionalPrope","FooterCategory","categories","FooterList","FooterListItem","FooterCategoryView","category","InvoiceDetailsHeaderComponent","createComponent","component","invoiceDetails","onError","invoiceNumberText","invoiceIdLabel","invoiceOrderItemsText","lines","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","date","invoiceDate","cultureFormatter","formatDate","year","month","day","formatShortDate","dueDate","formatLongDate","dueDateText","invoicePaymentDueDateText","isOnBehalfOfRequest","isOboRequest","invoicePlacedByLabel","customerName","invoiceAmountDueText","formatAmount","amountDue","PayInvoiceComponent","typeName","invoice","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","totalDiscount","invoicePaymentDiscounts","subtotal","invoicePaymentSubtotal","totalCharges","invoicePaymentCharges","totalTax","invoicePaymentTax","totalAmount","invoicePaymentInvoiceTotal","line","InvoiceDetailsProductsComponent","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","Quantity","productUrl","ProductName","ProductId","getProductPageUrlSync","_renderProductImage","_context$request$app","cropFocalRegion","fallbackImage","getFallbackImageUrl","ItemId","OmniChannelMedia","primaryImageUrl","fallBackSrc","_renderProductDimensions","isNullOrWhitespace","ColorName","invoiceProductColor","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","Price","invoiceQuantity","NetAmount","InvoiceDetailsModel","Id","InvoiceDate","Date","CustomerName","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","SalesInvoiceLine","_products$find","PrimaryImageUrl","TotalDiscount","InvoiceSubtotal","TotalCharges","TotalTaxAmount","TotalAmount","CurrencyCode","InvoicePaidStatus","Paid","InvoiceDetails","errorState","otherError","_onAddToCartFailed","_setPayInvoiceErrorModalClose","ChannelId","invoiceDetailsModel","payInvoiceErrorModalOpen","_renderHeader","_renderProducts","paymentDetails","_renderPaymentDetails","payInvoiceError","_renderInvoiceErrors","_className","channelId","productInputs","ProductInput","getSimpleProductsAction","newErrorState","errorHost","errorCode","_this$state$errorStat","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","cartUrl","InvoiceErrorComponent","showError","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","setPayInvoiceErrorModalClose","InvoiceDetailsView","messageHeader","errorMessages","assertive","InvoicesFilterState","getInvoicesFilterStateResources","ShowAll","invoicesFilterShowAll","invoiceStatusPaid","PartiallyPaid","invoiceStatusPartiallyPaid","Unpaid","invoiceStatusUnpaid","onClickHandler","onStateClick","InvoicesFilterComponent","popoverRef","popoverState","setPopoverState","togglePopover","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","innerRef","Popover","placement","EnumExtensions","getEnumValues","renderFilterStateItem","stateStringRepresentation","InvoicesTableHeaderComponent","rowClassName","switchCheckedState","onSelectAll","isSelectedAll","headerCells","isMobile","getMobileHeaderCells","invoiceListSelectAllRadioAriaLabelText","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","onRequestSpecificInvoice","requestInvoiceButtonReference","onRequestInvoice","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","extraActionsPopup","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","invoiceActionsButtonIsOnBehalfOfTextAriaLabel","showActions","useState","getInvoiceDetailsPageUrlSync","actionsContainerClassName","payInvoiceClassName","reference","payInvoiceReferences","RequestInvoiceButton","innerReference","invoiceReferences","requestInvoiceButtonLabel","invoiceRequestButtonLabel","onClicked","InvoicesTableRowComponent","onSelectLine","isSelected","rowCells","getMobileRowCells","invoiceRowArialabel","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","customer","isCurrentUser","AccountNumber","customerAccountNumber","invoiceCurrentUser","viewport","_window","device","Type","innerWidth","getViewport","onSelectAllHandler","invoices","InvoicesTableComponent","setIsMobile","updateViewport","headerClassName","all","isAdmin","IsB2bAdmin","invoiceButtonReferences","payInvoiceButtonReferences","MakePaymentComponentActions","_event","setDisabled","payInvoices","buttonReferences","MakePaymentComponent","hasInvoices","canBePaid","makePaymentButtonAriaLabel","makePaymentButtonText","PayInvoiceComponentActions","payInvoiceButtonAriaLabel","payInvoiceButtonText","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","invoicesToAdd","errorReason","failureReason","cartState","getCartState","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","errorDetails","LocalizedMessage","ErrorResourceId","onSubmitRequestClick","onClosing","filteredInvoices","onSubmitRequest","checkboxRef","closingFlag","_inputInvoice$current","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","_invoice","_checkboxRef$current$","onInvoiceSelect","onInvoiceSelectHandler","checkboxId","checkboxName","RequestInvoiceModal","email","modalHeaderLabel","sendToEmailLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","_focusElement$current","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","searchResultString","invoicesFoundReplaceIndex","indexOf","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","substring","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onDismiss","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isPageLoaded","isInvoiceRequestModalOpen","_customerBalance$resu","_customerBalance$resu2","_heading$text","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","invoiceRequestModal","_renderInvoiceRequestModal","_renderInvoicesFilter","pagination","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","_this$props$data$b2bU","b2bUserId","B2BUserId","invoiceId","BusinessPartnerUsersDataActions","BusinessPartnerOperationDeliveryType","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","getCustomer","GetCustomerInput","CustomerId","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","_renderInvoiceInCartPaymentMessage","tableClassName","_newErrorState$errorR","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","_getSelectedInvoices","moduleId","moduleTypeName","navigationUrl","_this$state$selectedB","invoiceErrorMessageHeader","_this$props$data$cart","cart","hasInvoiceLine","invoiceInCartPaymentMessage","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","_this$state$selectedB2","specificInvoice","InvoiceListView","Map","mapRef","_initMap","_data$storeSelectorSt","_data$distributorSele","storeSelectorStateManager","isMapApiLoaded","distributorSelectorStateManager","mapLoadOptions","credentials","BingMapsApiKey","pushpinAccessible","Microsoft","Maps","Events","addHandler","_data$distributorSele2","_data$distributorSele3","_data$distributorSele4","_data$storeSelectorSt2","isDistributorSelectorDialogOpen","updateDistributorMapVisibility","setSelectedDistributorId","setSelectedStoreLocationId","_updateMapsForDistributor","_this$props$data$dist","pushpinOptions","distributorInfoList","distributorList","selectedDistributorId","mapLocation","entities","clear","pushpins","OrgUnit","distributorInfo","entries","orgUnit","Latitude","Longitude","isLocationSelected","_getPushpinOptions","pushpin","Pushpin","Location","handleDistributorPushpinClick","unshift","currentLocation","setView","center","_Microsoft$Maps$Locat","bounds","LocationRect","fromShapes","setOptions","_updateMap","_this$props$data$stor","_storeSelectorStateMa","orgUnitStoreInformation","selectedStoreLocationId","storeLocationList","store","OrgUnitAvailability","unitStoreInfo","_unitStoreInfo$OrgUni","storeLocation","OrgUnitLocation","isSelectedLocation","OrgUnitNumber","handleClickEvent","_Microsoft$Maps$Locat2","orgUnitNumber","recordId","_this$props$data$dist2","showIndex","size","selectionColor","icon","_getSvgIcon","_this$props$context","_this$props$data$stor2","_this$props$data$dist3","BingMapsEnabled","loadMapAPIInput","lang","market","ChannelCountryRegionISOCode","_this$props$data$dist4","when","_this$props$data$stor3","setMapModuleLoaded","_this$props$data$stor4","_this$props$data$dist5","_this$props$data$dist6","_this$props$data$stor5","_this$props$data$dist7","loadMapApi","_this$props$data$dist8","_this$props$data$dist9","_this$props$data$stor6","_this$props$data$stor7","_this$props$data$dist10","_this$props$data$stor8","_this$props$data$stor9","_this$props$data$dist11","_this$props$data$dist12","_data$storeSelectorSt3","_data$storeSelectorSt4","_data$distributorSele5","_data$distributorSele6","shouldDisplayMap","isDialogOpen","listMapViewState","displayMap","classname","show","Header","headerProps","MapProps","MapHeader","call","fixRegExpWellKnownSymbolLogic","anObject","toLength","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","RegExp","string","rx","S","res","done","global","fullUnicode","unicode","lastIndex","A","n","matchStr"],"sourceRoot":""}