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,EAAeP,MAIjD,EAIjB","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/contracts-account-page/components/contracts-account-page-links.tsx?f0b4","webpack://Msdyn365.Commerce.Online/./src/modules/contracts-account-page/contracts-account-page.tsx?2421","webpack://Msdyn365.Commerce.Online/./src/modules/contracts-account-page/contracts-account-page.view.tsx?8b02","webpack://Msdyn365.Commerce.Online/./src/modules/payment-container/context/payment-context.tsx?fc33","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme-b2c/views/checkout-delivery-options.view.tsx?ba31","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/account-welcome-tile.view.tsx?d739","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/checkout-customer-account-payment.view.tsx?3b4c","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/checkout-delivery-options.view.tsx?27bd","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/checkout-payment-instrument.view.tsx?cbbb","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/invoice-details-products.component.tsx?bb1a","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/components/order-details.no-shipment-tracking.component.tsx?5523","webpack://Msdyn365.Commerce.Online/./src/themes/gardner-theme/views/invoice-details.view.tsx?dfe1","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.tsx?2115","webpack://Msdyn365.Commerce.Online/./src/modules/account-welcome-tile/account-welcome-tile.view.tsx?e5e3","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/components/account-b2b-requests-tile-links.tsx?d6f5","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/b2b-requests-tile.tsx?9498","webpack://Msdyn365.Commerce.Online/./src/modules/b2b-requests-tile/b2b-requests-tile.view.tsx?3f4e","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/fabrikam/views/buybox.view.tsx?aec4","webpack://Msdyn365.Commerce.Online/./src/modules/fabrikam/views/ratings-histogram.view.tsx?6e01","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/./src/modules/adventureworks/views/order-template-list.view.tsx?46b6"],"sourcesContent":["import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { ILinkData } from '@msdyn365-commerce/core';\r\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface ILinksData {\r\n linkText?: string;\r\n linkUrl: ILinkData;\r\n ariaLabel?: string;\r\n openInNewTab?: boolean;\r\n}\r\n\r\nexport interface IContractsAccountPageLinks {\r\n links: ILinksData[];\r\n requestContext: Msdyn365.IRequestContext;\r\n\r\n /**\r\n * The telemetry content\r\n */\r\n telemetryContent?: ITelemetryContent;\r\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\r\n}\r\n\r\nconst ContractsAccountPageLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\r\n if (links.length === 0) {\r\n return null;\r\n }\r\n const editableLinks = _mapEditableLinks(links, telemetryContent);\r\n return (\r\n
\r\n {editableLinks && editableLinks.length > 0 ? (\r\n \r\n ) : null}\r\n
\r\n );\r\n};\r\n\r\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\r\n if (!linkdata || linkdata.length === 0) {\r\n return null;\r\n }\r\n const editableLinks: Msdyn365.ILinksData[] = [];\r\n const payLoad = getPayloadObject('click', telemetryContent!, '');\r\n linkdata.forEach((link, index) => {\r\n payLoad.contentAction.etext = link.linkText;\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n const editableLink: Msdyn365.ILinksData = {\r\n ariaLabel: link.ariaLabel,\r\n className: 'eve-contracts-tile__links',\r\n linkText: link.linkText,\r\n linkUrl: link.linkUrl.destinationUrl,\r\n openInNewTab: link.openInNewTab,\r\n role: 'link',\r\n additionalProperties: attributes\r\n };\r\n editableLinks.push(editableLink);\r\n });\r\n\r\n return editableLinks;\r\n};\r\n\r\nexport default ContractsAccountPageLinks;\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 * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IModuleProps, getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classNames from 'classnames';\r\n\r\nimport { IContractsAccountPageData } from './contracts-account-page.data';\r\nimport { IContractsAccountPageProps } from './contracts-account-page.props.autogenerated';\r\nimport LinksComponent from './components/contracts-account-page-links';\r\nimport { IContractListEntity } from '../../actions/DataServiceEntities.g';\r\n\r\nexport interface IContractsAccountPageViewProps extends IContractsAccountPageProps {\r\n contractsHeading: React.ReactElement;\r\n contractsWrapper: IModuleProps;\r\n contractsTable: React.ReactElement;\r\n contractsLinks: React.ReactElement;\r\n}\r\n\r\n/**\r\n *\r\n * ContractsAccountPage component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass ContractsAccountPage extends React.PureComponent> {\r\n private readonly telemetryContent: ITelemetryContent;\r\n constructor(props: IContractsAccountPageProps) {\r\n super(props);\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n\r\n this._renderHeading = this._renderHeading.bind(this);\r\n this._getContractsRowData = this._getContractsRowData.bind(this);\r\n this._handleHeadingChange = this._handleHeadingChange.bind(this);\r\n this._renderTable = this._renderTable.bind(this);\r\n this._generateRow = this._generateRow.bind(this);\r\n }\r\n\r\n private _renderHeading(): React.ReactElement {\r\n const {\r\n config: { heading },\r\n context: { request }\r\n } = this.props;\r\n\r\n if (!heading || !heading.text) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _getContractsRowData(): IContractListEntity[] {\r\n if (!this.props.data.contractList.result) {\r\n return [];\r\n }\r\n // @ts-expect-error\r\n if (this.props.data.contractList.result.contractList && this.props.data.contractList.result.contractList.length > 0) {\r\n // @ts-expect-error\r\n return this.props.data.contractList.result.contractList;\r\n }\r\n return [];\r\n }\r\n\r\n private _handleHeadingChange = (event: Msdyn365.ContentEditableEvent): string => (this.props.config.heading.text = event.target.value);\r\n\r\n private _renderTable(): React.ReactElement {\r\n const {\r\n resources: { manufacturerCodeLabel, contractNumberLabel, laborRateLabel, contractDescLabel, noContractsFoundText }\r\n } = this.props;\r\n\r\n const headingRow = [manufacturerCodeLabel, contractNumberLabel, laborRateLabel, contractDescLabel];\r\n const contractsRowData = this._getContractsRowData();\r\n return (\r\n
\r\n
    \r\n
  • \r\n {headingRow.map((heading, i) => (\r\n
    \r\n {heading === manufacturerCodeLabel ? this._renderMfrCodeHeading(i + 1) : heading}\r\n
    \r\n ))}\r\n
  • \r\n {contractsRowData.length > 0 ? (\r\n contractsRowData.map((contract, i) => (\r\n
  • \r\n {this._generateRow(contract)}\r\n
  • \r\n ))\r\n ) : (\r\n
  • \r\n {this._generateEmptyRow(noContractsFoundText)}\r\n
  • \r\n )}\r\n
\r\n
\r\n );\r\n }\r\n\r\n private _renderMfrCodeHeading(colNum: number): React.ReactElement {\r\n const {\r\n resources: { manufacturerCodeLabel, manufacturerCodeShortFormLabel }\r\n } = this.props;\r\n\r\n return (\r\n <>\r\n {manufacturerCodeShortFormLabel}\r\n {manufacturerCodeLabel}\r\n \r\n );\r\n }\r\n\r\n private _generateRow(contractData: IContractListEntity) {\r\n const { ManufacturerCode, Description, ContractLaborRate, ContractNotes } = contractData;\r\n return (\r\n <>\r\n
\r\n

{ManufacturerCode}

\r\n
\r\n
\r\n

{Description}

\r\n
\r\n
\r\n

{`$${ContractLaborRate.toFixed(2)}`}

\r\n
\r\n
\r\n

{ContractNotes}

\r\n
\r\n \r\n );\r\n }\r\n\r\n private _generateEmptyRow(noContractsFoundText: string) {\r\n return (\r\n <>\r\n
\r\n

{noContractsFoundText}

\r\n
\r\n
\r\n

\r\n
\r\n
\r\n

\r\n
\r\n
\r\n

\r\n
\r\n \r\n );\r\n }\r\n\r\n private _renderLink(): React.ReactElement {\r\n const {\r\n config: { links },\r\n context: { request }\r\n } = this.props;\r\n\r\n if (!links || links.length < 1) {\r\n return <>;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\r\n const { links } = this.props.config;\r\n if (links && links[linkIndex]) {\r\n links[linkIndex].linkText = event.target.value;\r\n }\r\n };\r\n\r\n public render(): JSX.Element | null {\r\n const viewProps = {\r\n ...this.props,\r\n contractsHeading: this._renderHeading(),\r\n contractsWrapper: {\r\n className: classNames('eve-contracts-tile', 'contracts-container'),\r\n tag: 'div',\r\n moduleProps: this.props\r\n },\r\n contractsTable: this._renderTable(),\r\n contractsLinks: this._renderLink()\r\n };\r\n\r\n return this.props.renderView(viewProps);\r\n }\r\n}\r\n\r\nexport default ContractsAccountPage;\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 * as React from 'react';\r\nimport { IContractsAccountPageViewProps } from './contracts-account-page';\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport default (props: IContractsAccountPageViewProps) => {\r\n const { contractsHeading, contractsWrapper, contractsTable, contractsLinks } = props;\r\n return (\r\n \r\n {contractsHeading}\r\n {contractsTable}\r\n {contractsLinks}\r\n \r\n );\r\n};\r\n","import { createContext } from 'react';\r\n\r\n// each payment type will have an ID and a name, both will be strings\r\nexport interface IPaymentTenderType {\r\n tenderName: string;\r\n tenderTypeId: string;\r\n}\r\n\r\n// stores the payment modules element ID as a key and an array of Payment Tender Types for each tender type ID and name the module is associated with\r\ninterface IPaymentContextState {\r\n paymentModules: Record;\r\n selectedPayment: IPaymentTenderType;\r\n}\r\n\r\ninterface IPaymentContext extends IPaymentContextState {\r\n registerPaymentMethod: (elementId: string, tenderTypeList: IPaymentTenderType[]) => void;\r\n setSelectedPaymentState: (paymentTenderType: IPaymentTenderType) => void;\r\n}\r\n\r\nconst _errorMsg = 'Must be used within a provider';\r\n\r\nconst paymentModules: Record = {};\r\nconst selectedPayment: IPaymentTenderType = {} as IPaymentTenderType;\r\nconst registerPaymentMethod = (elementId: string, tenderTypeList: IPaymentTenderType[]) => {\r\n throw Error(_errorMsg);\r\n};\r\nconst setSelectedPaymentState = (paymentTenderType: IPaymentTenderType) => {\r\n throw Error(_errorMsg);\r\n};\r\n\r\nexport const PaymentContext = createContext({\r\n paymentModules,\r\n selectedPayment,\r\n registerPaymentMethod,\r\n setSelectedPaymentState\r\n});\r\n\r\nconst { Consumer: PaymentConsumer, Provider: PaymentProvider } = PaymentContext;\r\nexport { PaymentConsumer, PaymentProvider };\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-delivery-options/./checkout-delivery-options';\r\n\r\nconst DeliveryOptionList: React.FC = ({\r\n DeliveryOptionsList,\r\n list\r\n}) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n {deliveryOption.radioButton}\r\n {deliveryOption.description}\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 CheckoutDeliveryOptionsView: React.FC = props => {\r\n const { CheckoutDeliveryOptions,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionSelected,\r\n alert,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton } = props;\r\n\r\n return (\r\n\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 && alert}\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","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAccountWelcomeTileViewProps } from '@msdyn365-commerce-modules/account-management';\r\n\r\nconst AccountWelcomeTileView: React.FC = props => {\r\n const { AccountWelcomeTile, heading } = props;\r\n\r\n return (\r\n \r\n {heading}\r\n {props.data.accountInformation?.result?.AccountNumber && (\r\n \r\n {' '} - {props.data.accountInformation.result.AccountNumber}\r\n \r\n )}\r\n \r\n );\r\n \r\n};\r\n\r\nexport default AccountWelcomeTileView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutCustomerAccountPaymentViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/./checkout-customer-account-payment';\r\nimport { IAccountPaymentEditViewForm } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/./components/get-account-payment-form-edit-mode';\r\nimport { IAccountPaymentSummaryViewForm } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-customer-account-payment/./components/get-account-payment-form-summary-mode';\r\nimport { ICheckoutCustomerAccountPaymentProps as ICheckoutCustomerAccountPaymentExtensionProps } from '../definition-extensions/checkout-customer-account-payment.ext.props.autogenerated';\r\n\r\nimport { PaymentContext, IPaymentTenderType } from '../../../modules/payment-container/context/payment-context';\r\n// import { CustomerBalances } from '@msdyn365-commerce/retail-proxy';\r\nimport MsDyn365 from \"@msdyn365-commerce/core\";\r\n\r\nexport const SummaryForm: React.FC = ({ formProps, label, paymentAmount, addPaymentButton, appliedLine, bottomBorder }) => (\r\n \r\n <>\r\n {label}\r\n {appliedLine}\r\n {bottomBorder}\r\n \r\n \r\n);\r\n\r\nexport const EditForm: React.FC = ({ formProps, inputLabel, inputAmount, customerName, customerAccountNumber, addPaymentButton, customerSince, accountCredit, alert, accountDetails, appliedLine, bottomBorder }, props) => {\r\n return (\r\n \r\n <>\r\n\r\n {customerName}\r\n {customerAccountNumber}\r\n {customerSince}\r\n {/* {accountCredit} */}\r\n {/* {accountDetails} */}\r\n {/* {inputLabel} */}\r\n {getInputLabel()}\r\n {/* {alert} */}\r\n {appliedLine}\r\n {bottomBorder}\r\n \r\n \r\n)};\r\n\r\nlet customInputLabel = '';\r\n\r\nconst getInputLabel = () => {\r\n return (\r\n \r\n {customInputLabel}\r\n \r\n );\r\n}\r\n\r\n// const getAvailableCredit = (creditBalances: CustomerBalances | undefined) => {\r\n// let availableCredit = 0;\r\n\r\n// if (!creditBalances) {\r\n// return 0;\r\n// }\r\n\r\n// if (creditBalances.InvoiceAccountCreditLimit === 0) {\r\n// availableCredit = creditBalances.CreditLimit - creditBalances.Balance - creditBalances.PendingBalance;\r\n// } else {\r\n// availableCredit = creditBalances.InvoiceAccountCreditLimit - creditBalances.InvoiceAccountBalance - creditBalances.InvoiceAccountPendingBalance;\r\n// }\r\n\r\n// return availableCredit;\r\n// };\r\n\r\nconst addPayment = async (props: ICheckoutCustomerAccountPaymentViewProps): Promise => {\r\n const checkoutState = props.data.checkout.result;\r\n\r\n if (!checkoutState) {\r\n props.context.telemetry.error('checkout state not found');\r\n return;\r\n }\r\n\r\n // const availableCredit = getAvailableCredit(props.data.creditBalances?.result);\r\n const cartTotal = (await props.data.checkout).checkoutCart.cart.TotalAmount;\r\n\r\n // console.log(availableCredit);\r\n // console.log(cartTotal);\r\n // if (cartTotal && availableCredit >= cartTotal) {\r\n if (cartTotal) {\r\n await checkoutState.updateCustomerAccountAmount({ newAmount: cartTotal });\r\n props.context.telemetry.information('customer account payment amount updated');\r\n }\r\n};\r\n\r\nconst CheckoutCustomerAccountView: React.FC> = props => {\r\n const { checkoutCustomerAccount, summaryView, editView, moduleState, id, config: { tenderType } } = props;\r\n \r\n const paymentContext = React.useContext(PaymentContext);\r\n const paymentTenderTypes: IPaymentTenderType[] = [];\r\n // console.log(props);\r\n\r\n React.useEffect(() => {\r\n tenderType?.map(tt => {\r\n paymentTenderTypes.push({ tenderTypeId: tt.tenderId, tenderName: tt.tenderName });\r\n });\r\n paymentContext.registerPaymentMethod(id, paymentTenderTypes);\r\n sessionStorage.removeItem('ON_ACCOUNT_APPLIED');\r\n customInputLabel = props.config.processedOnAccountText || '';\r\n }, []);\r\n\r\n if (MsDyn365.isBrowser) {\r\n document.querySelector('.payment-selector__button-container--on-account')?.addEventListener('click', () => {\r\n if (sessionStorage.getItem('ON_ACCOUNT_APPLIED') === '1') {\r\n return;\r\n }\r\n sessionStorage.setItem('ON_ACCOUNT_APPLIED', '1');\r\n addPayment(props);\r\n });\r\n }\r\n\r\n return (\r\n \r\n {moduleState.isReady && summaryView && }\r\n {!moduleState.isReady && editView && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutCustomerAccountView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport { get } from 'lodash';\r\n\r\nimport { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-delivery-options/./checkout-delivery-options';\r\nconst DLV_MODE_KEY = 'dlv-mode'\r\nconst DeliveryOptionList: React.FC = ({\r\n DeliveryOptionsList,\r\n list\r\n}) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n {deliveryOption.radioButton}\r\n {deliveryOption.description}\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 CheckoutDeliveryOptionsView: React.FC = props => {\r\n const { CheckoutDeliveryOptions,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionSelected,\r\n alert,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton } = props;\r\n\r\n React.useEffect(() => {\r\n const dlvDescription = get(deliveryOptionSelected, 'description.props.description') || ''\r\n window.sessionStorage.setItem(DLV_MODE_KEY, dlvDescription)\r\n }, [deliveryOptionSelected])\r\n\r\n return (\r\n\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 && alert}\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","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { ICheckoutPaymentInstrumentViewProps, ICheckoutPaymentOverlayModal } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-payment-instrument/./checkout-payment-instrument';\r\nimport { ICheckoutPaymentInstrumentProps as ICheckoutPaymentInstrumentExtensionProps } from '../definition-extensions/checkout-payment-instrument.ext.props.autogenerated';\r\n\r\nimport { PaymentContext, IPaymentTenderType } from '../../../modules/payment-container/context/payment-context';\r\n\r\nconst OverlayModal: React.FC = ({\r\n modal\r\n}) => {\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst CheckoutPaymentInstrumentView: React.FC> = ({\r\n checkoutPaymentInstrument,\r\n className,\r\n id,\r\n waiting,\r\n alert,\r\n paymentInformation,\r\n addPaymentForm,\r\n overlayModal,\r\n config: { tenderType },\r\n ...restProps\r\n}) => {\r\n\r\n const paymentContext = React.useContext(PaymentContext);\r\n const paymentTenderTypes: IPaymentTenderType[] = [];\r\n\r\n React.useEffect(() => {\r\n tenderType?.map(tt => {\r\n paymentTenderTypes.push({ tenderTypeId: tt.tenderId, tenderName: tt.tenderName });\r\n });\r\n paymentContext.registerPaymentMethod(id, paymentTenderTypes);\r\n }, []);\r\n\r\n return (\r\n \r\n {waiting}\r\n {alert}\r\n {paymentInformation}\r\n {addPaymentForm}\r\n {overlayModal && }\r\n \r\n );\r\n}\r\n\r\nexport default CheckoutPaymentInstrumentView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IComponent, IComponentProps, ICoreContext, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\r\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\r\nimport React from 'react';\r\n\r\nimport { InvoicePaidStatus, OrderInvoice, SalesInvoice, SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { IPayableInvoice } from '@msdyn365-commerce-modules/invoice';\r\n\r\n// import { IInvoiceProductLine, InvoiceDetailsModel } from '../helpers/invoice-data';\r\n\r\nexport interface IInvoicePaymentDetails {\r\n totalDiscount?: number;\r\n subtotal?: number;\r\n totalCharges?: number;\r\n totalTax?: number;\r\n totalAmount?: number;\r\n currencyCode?: string;\r\n}\r\n\r\nexport interface IInvoiceProductLine extends SalesInvoiceLine {\r\n primaryImageUrl?: string;\r\n}\r\n\r\n/**\r\n * Represents invoice details data model.\r\n */\r\nexport class InvoiceDetailsModel implements IPayableInvoice, IInvoicePaymentDetails {\r\n public id: string;\r\n\r\n public invoiceDate?: Date;\r\n\r\n public customerAccountNumber?: string;\r\n\r\n public customerName?: string;\r\n\r\n public dueDate?: Date;\r\n\r\n public amountDue?: number;\r\n\r\n public status?: InvoicePaidStatus;\r\n\r\n public lines: IInvoiceProductLine[];\r\n\r\n public totalDiscount?: number;\r\n\r\n public subtotal?: number;\r\n\r\n public totalCharges?: number;\r\n\r\n public totalTax?: number;\r\n\r\n public totalAmount?: number;\r\n\r\n public currencyCode?: string;\r\n\r\n public constructor(invoice: OrderInvoice, invoiceDetails: SalesInvoice, products: SimpleProduct[]) {\r\n this.id = invoice.Id || '';\r\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\r\n this.customerName = invoice.CustomerName;\r\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\r\n this.amountDue = invoice.AmountBalance;\r\n this.status = invoice.InvoicePaidStatusValue;\r\n this.lines = (invoiceDetails.SalesInvoiceLine || []).map(line => {\r\n const productLine: IInvoiceProductLine = {\r\n ...line,\r\n primaryImageUrl: products.find(product => product.RecordId === line.RecordId)?.PrimaryImageUrl\r\n };\r\n return productLine;\r\n });\r\n\r\n this.totalDiscount = invoiceDetails.TotalDiscount;\r\n this.subtotal = invoiceDetails.InvoiceSubtotal;\r\n this.totalCharges = invoiceDetails.TotalCharges;\r\n this.totalTax = invoiceDetails.TotalTaxAmount;\r\n this.totalAmount = invoice.TotalAmount;\r\n this.currencyCode = invoice.CurrencyCode;\r\n }\r\n\r\n public get canBePaid(): boolean {\r\n return this.status !== InvoicePaidStatus.Paid;\r\n }\r\n}\r\n\r\n\r\nexport interface IInvoiceDetailsProductsData {\r\n invoiceDetails: InvoiceDetailsModel;\r\n}\r\n\r\nexport interface IInvoiceDetailsProductsResources {\r\n invoiceProductColor: string;\r\n invoiceProductSize: string;\r\n invoiceProductStyle: string;\r\n invoiceQuantity: string;\r\n}\r\n\r\nexport interface IInvoiceDetailsProductsProps extends IComponentProps {\r\n context: ICoreContext;\r\n className: string;\r\n imageSettings?: IImageSettings;\r\n resources: IInvoiceDetailsProductsResources;\r\n}\r\n\r\nexport interface IInvoiceDetailsProductsComponent extends IComponent {\r\n}\r\n\r\nconst _renderProductDimensions = (className: string, resources: IInvoiceDetailsProductsResources, product: SalesInvoiceLine): JSX.Element => {\r\n return (\r\n
\r\n {StringExtensions.isNullOrWhitespace(product.ColorName) ? null :
\r\n {resources.invoiceProductColor.replace('{0}', product.ColorName!)}\r\n
}\r\n {StringExtensions.isNullOrWhitespace(product.SizeName) ? null :
\r\n {resources.invoiceProductSize.replace('{0}', product.SizeName!)}\r\n
}\r\n {StringExtensions.isNullOrWhitespace(product.StyleName) ? null :
\r\n {resources.invoiceProductStyle.replace('{0}', product.StyleName!)}\r\n
}\r\n
\r\n );\r\n};\r\n\r\nconst _renderProductImage = (className: string, context: ICoreContext, product: IInvoiceProductLine, imageSettings?: IImageSettings): JSX.Element | null => {\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\r\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\r\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\r\n },\r\n lazyload: true,\r\n cropFocalRegion: true\r\n };\r\n\r\n if (imageSettings) {\r\n imageSettings.cropFocalRegion = true;\r\n }\r\n\r\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\r\n return (\r\n \r\n );\r\n};\r\n\r\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\r\n if (amount === undefined) {\r\n return '';\r\n }\r\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\r\n};\r\n\r\nconst InvoiceDetailsProducts: React.FC = (props: IInvoiceDetailsProductsProps): JSX.Element => {\r\n const { className, data: { invoiceDetails }, resources } = props;\r\n\r\n const productLineClass = `${className}__product-line`;\r\n const productLineInfoContainerClass = `${productLineClass}__product-info-container`;\r\n const productLineDetailsClass = `${productLineInfoContainerClass}__product-details`;\r\n const productLineSmallDetailsClass = `${productLineDetailsClass}__small-details`;\r\n\r\n return (\r\n
\r\n {\r\n invoiceDetails.lines.map(product => {\r\n const quantity = product.Quantity || 1;\r\n\r\n let productUrl = '';\r\n if (!ObjectExtensions.isNullOrUndefined(product.ProductName) &&\r\n !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\r\n productUrl = getProductPageUrlSync(product.ProductName, product.RecordId, props.context.actionContext);\r\n }\r\n\r\n return (\r\n
\r\n
\r\n {_renderProductImage(`${productLineInfoContainerClass}__product-image`, props.context, product)}\r\n
\r\n \r\n {`${product.ItemId} - ${product.ProductName}`}\r\n \r\n
\r\n {_renderProductDimensions(`${productLineSmallDetailsClass}__dimensions`, resources, product)}\r\n
\r\n {formatAmount(props.context, product.Price, invoiceDetails.currencyCode)}\r\n
\r\n
\r\n {resources.invoiceQuantity.replace('{0}', quantity.toString())}\r\n
\r\n
\r\n
\r\n
\r\n
\r\n {formatAmount(props.context, product.NetAmount, invoiceDetails.currencyCode)}\r\n
\r\n
\r\n );\r\n })\r\n }\r\n
\r\n );\r\n};\r\n\r\n// @ts-expect-error\r\nexport const InvoiceDetailsProductsComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n 'InvoiceDetailsProductsComponent',\r\n { component: InvoiceDetailsProducts }\r\n);\r\n","import * as React from 'react';\r\nimport { INodeProps, Node } from \"@msdyn365-commerce-modules/utilities\";\r\n\r\nexport interface INoShipmentTrackingProps {\r\n noShipmentTrackingNodeProps: INodeProps;\r\n noShipmentTrackingResources: INoShipmentTrackingResources;\r\n}\r\n\r\nexport interface INoShipmentTrackingResources {\r\n noShippingFoundText: string;\r\n}\r\n\r\nexport const NoShipmentTrackingComponent: React.FC = (props: INoShipmentTrackingProps) => {\r\n const {\r\n noShipmentTrackingNodeProps,\r\n noShipmentTrackingResources: {\r\n noShippingFoundText = ''\r\n }\r\n } = props;\r\n\r\n const baseClassName = noShipmentTrackingNodeProps.className\r\n\r\n return (\r\n \r\n
{noShippingFoundText}
\r\n
\r\n );\r\n}","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport { SalesInvoice, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { getSimpleProductsAction, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\r\nimport * as React from 'react';\r\n\r\nimport { IInvoiceDetailsViewProps } from '@msdyn365-commerce-modules/invoice-details/src/modules/invoice-details/./invoice-details';\r\nimport { InvoiceDetailsProductsComponent, InvoiceDetailsModel } from './components/invoice-details-products.component';\r\n\r\n\r\n\r\nexport const InvoiceDetailsView: React.FC = props => {\r\n const {\r\n config,\r\n header,\r\n /*products,*/\r\n paymentDetails,\r\n payInvoiceError,\r\n context,\r\n resources,\r\n typeName\r\n } = props;\r\n const baseClassName: string = 'msc-invoice-details';\r\n const [invoiceDetails, setInvoiceDetails] = React.useState();\r\n const [products, setProducts] = React.useState([]);\r\n\r\n const getInvoiceDetails = async (): Promise => {\r\n const invoice = await props.data.invoice;\r\n const invDetails = await props.data.invoiceDetails;\r\n const invoiceDetailsModel = new InvoiceDetailsModel(invoice, invDetails, products);\r\n setInvoiceDetails(invoiceDetailsModel);\r\n return invDetails;\r\n };\r\n\r\n const getProducts = async (channelId?: number): Promise => {\r\n const invDetails = await getInvoiceDetails();\r\n const invoiceLines = invDetails.SalesInvoiceLine || [];\r\n const productInputs = invoiceLines.filter(product => product.RecordId).map(product => new ProductInput(\r\n product.RecordId!, context.request.apiSettings, channelId, undefined, context.actionContext.requestContext));\r\n const simpleProductsRes = await getSimpleProductsAction(productInputs, context.actionContext);\r\n setProducts(simpleProductsRes);\r\n return getSimpleProductsAction(productInputs, context.actionContext);\r\n }\r\n\r\n const renderProducts = (): JSX.Element | null => {\r\n const { imageSettings } = config;\r\n\r\n if (!invoiceDetails) {\r\n return null;\r\n }\r\n\r\n return (\r\n \r\n );\r\n }\r\n\r\n React.useEffect(() => {\r\n void getProducts();\r\n }, []);\r\n \r\n return (\r\n \r\n {header}\r\n {/* {products} */}\r\n {renderProducts()}\r\n {paymentDetails}\r\n {payInvoiceError}\r\n \r\n );\r\n};\r\n\r\nexport default InvoiceDetailsView;\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 { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileData } from './account-welcome-tile.data';\nimport { IAccountWelcomeTileProps } from './account-welcome-tile.props.autogenerated';\n\nexport interface IAccountWelcomeTileViewProps extends IAccountWelcomeTileProps {\n AccountWelcomeTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AccountWelcome component.\n * @extends {React.PureComponent>}\n */\nclass AccountWelcomeTile extends React.PureComponent> {\n public render(): JSX.Element {\n const { config, data } = this.props;\n const { className } = config;\n\n const accountInfo = data.accountInformation.result;\n const heading = {\n ...config.heading,\n ...{\n text: `${config.heading.text ? config.heading.text : ''} ${\n accountInfo && accountInfo.FirstName ? accountInfo.FirstName : ''\n }`\n }\n };\n\n const viewProps = {\n ...this.props,\n className,\n AccountWelcomeTile: {\n moduleProps: this.props,\n className: classnames('ms-account-welcome-tile', config.className)\n },\n heading: heading && heading.text && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n}\n\nexport default AccountWelcomeTile;\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 { IAccountWelcomeTileViewProps } from './account-welcome-tile';\n\nconst AccountWelcomeTileView: React.FC = props => {\n const { AccountWelcomeTile, heading } = props;\n\n return {heading};\n};\n\nexport default AccountWelcomeTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../../..';\n\nexport interface IB2bRequestsTileLinksProps {\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 defaultClassName = 'ms-account-b2b-requests-tile';\n\nexport const B2bRequestsTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (!ArrayExtensions.hasElements(links)) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n return linkdata.map(link => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return {\n ariaLabel: link.ariaLabel,\n className: `${defaultClassName}__link`,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n } as Msdyn365.ILinksData;\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 { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IB2bRequestsTileData } from './b2b-requests-tile.data';\nimport { IB2bRequestsTileProps } from './b2b-requests-tile.props.autogenerated';\nimport { B2bRequestsTileLinks } from './components/account-b2b-requests-tile-links';\n\nexport interface IB2bRequestsTileViewProps extends IB2bRequestsTileProps {\n b2bRequestsTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n}\n\n/**\n *\n * B2bRequestsTile component.\n * @extends {React.PureComponent>}\n */\nclass B2bRequestsTile extends React.PureComponent> {\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IB2bRequestsTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element | null {\n const { config } = this.props;\n const { className, heading, links } = config;\n\n const defaultClassName = 'ms-account-b2b-requests-tile';\n\n if (!isChannelTypeB2B(this.props.context.actionContext.requestContext)) {\n return null;\n }\n\n const viewProps = {\n ...this.props,\n className,\n b2bRequestsTile: {\n moduleProps: this.props,\n className: classnames(defaultClassName, config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: ArrayExtensions.hasElements(links) && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default B2bRequestsTile;\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 { IB2bRequestsTileViewProps } from './b2b-requests-tile';\n\nconst B2bRequestsTileView: React.FC = props => {\n const { b2bRequestsTile, heading, links } = props;\n\n return (\n \n {heading}\n {links}\n \n );\n};\n\nexport default B2bRequestsTileView;\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 {\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 { IHistogramItemViewProps, IRatingsHistogramViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst RatingsHistogramView: React.FC = props => {\n const { heading, histogramItems, histogramProps, moduleProps } = props;\n return (\n \n {heading}\n \n {histogramItems.map(item => {\n return histogramItem(item);\n })}\n \n \n );\n};\n\nconst histogramItem = (props: IHistogramItemViewProps) => {\n return (\n \n {props.starLabel}\n {props.bar}\n {props.percentage}\n \n );\n};\n\nexport default RatingsHistogramView;\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 setShowActions: React.Dispatch>\n) => () => {\n setShowActions(false);\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\nfunction useOutsideClick(refinerRefernce: React.RefObject, toggle: (event: Event | MouseEvent) => void) {\n function handleClickOutside(event: Event | MouseEvent) {\n if (refinerRefernce.current && !refinerRefernce.current.contains(event.target as Node)) {\n toggle(event);\n }\n }\n\n React.useEffect(() => {\n if (MsDyn365.isBrowser) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n return () => {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('mousedown', handleClickOutside);\n }\n };\n }, [refinerRefernce, toggle]);\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 const wrapperRefiner = React.useRef(null);\n useOutsideClick(wrapperRefiner, toggle(showActions && !isOnBehalfOfRequest, setShowActions));\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 // Added condition to enable MakePayment button only if can be paid invoice is selected\n const hasInvoices =\n ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid)) &&\n ArrayExtensions.hasElements(invoices.filter(invoice => invoice.isSelected));\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IOrderTemplateListViewProps, ISingleOrderTemplateViewProps } from '@msdyn365-commerce-modules/order-template';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { INodeProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IOrderTemplateListProps, IOrderTemplateListResources } from '../definition-extensions/order-template-list.ext.props.autogenerated';\n\n/**\n * Interface for OrderTemplateImage.\n */\ninterface IOrderTemplateImage {\n props: {\n children: React.ReactElement[];\n };\n}\n\n/**\n * To render order template.\n * @param orderTemplate - The order template view props.\n * @param orderTemplateNodeProps - The order template node props.\n * @returns The JSX Element.\n */\nconst renderOrderTemplate = (orderTemplate: ISingleOrderTemplateViewProps, orderTemplateNodeProps?: INodeProps): JSX.Element | null => {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file\n const { key, addToCartButton, orderTemplateImage, orderTemplateStatusMessage, removeButton, orderTemplateName } = orderTemplate;\n\n const orderTemplateImageElement: IOrderTemplateImage = orderTemplateImage as React.ReactElement;\n const currentImageListLength = orderTemplateImageElement.props.children.length;\n const defaultNumberImagesInTile = 4;\n\n if (currentImageListLength < defaultNumberImagesInTile) {\n for (let index = 0; index < defaultNumberImagesInTile - currentImageListLength; index++) {\n orderTemplateImageElement.props.children.push();\n }\n }\n\n return (\n \n {orderTemplateName}\n {orderTemplateImage}\n {addToCartButton}\n {removeButton}\n {orderTemplateStatusMessage}\n \n );\n};\n\n/**\n * Order Template List View.\n * @param props - The view props.\n * @returns The JSX Element.\n */\nexport const OrderTemplateListViewComponent: React.FC> = props => {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention -- Dependency from module file\n OrderTemplateList,\n OrderTemplates,\n OrderTemplate,\n status,\n statusMessage,\n heading,\n orderTemplates,\n createOrderTemplateButton,\n templateHeaderStatusMessage\n } = props;\n\n return (\n \n {heading}\n \n {status === 'SUCCESS' && (!OrderTemplates || !orderTemplates || !ArrayExtensions.hasElements(orderTemplates)) ? (\n
\n

{props.resources.headingForEmptyOrderTemplateList}

\n

{props.resources.textForEmptyOrderTemplateList}

\n {createOrderTemplateButton}\n
\n ) : (\n createOrderTemplateButton\n )}\n {templateHeaderStatusMessage}\n
\n {status !== 'SUCCESS' && statusMessage}\n {OrderTemplates && orderTemplates && ArrayExtensions.hasElements(orderTemplates) && (\n \n {orderTemplates.map(orderTemplate => {\n return renderOrderTemplate(orderTemplate, OrderTemplate);\n })}\n \n )}\n
\n );\n};\n\nexport default OrderTemplateListViewComponent;\n"],"names":["_mapEditableLinks","linkdata","telemetryContent","length","editableLinks","payLoad","getPayloadObject","forEach","link","index","contentAction","etext","linkText","attributes","getTelemetryAttributes","editableLink","ariaLabel","className","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","_ref","links","requestContext","onTextChange","React","Msdyn365","editProps","ContractsAccountPage","constructor","props","super","_handleHeadingChange","event","this","config","heading","text","target","value","_handleLinkTextChange","linkIndex","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","_renderHeading","bind","_getContractsRowData","_renderTable","_generateRow","tag","onEdit","data","contractList","result","resources","manufacturerCodeLabel","contractNumberLabel","laborRateLabel","contractDescLabel","noContractsFoundText","headingRow","contractsRowData","map","i","key","_renderMfrCodeHeading","contract","ContractCode","_generateEmptyRow","colNum","manufacturerCodeShortFormLabel","contractData","ManufacturerCode","Description","ContractLaborRate","ContractNotes","toFixed","_renderLink","LinksComponent","Object","assign","render","viewProps","_objectSpread","contractsHeading","contractsWrapper","classNames","moduleProps","contractsTable","contractsLinks","renderView","Module","_errorMsg","PaymentContext","createContext","paymentModules","selectedPayment","registerPaymentMethod","elementId","tenderTypeList","Error","setSelectedPaymentState","paymentTenderType","Consumer","PaymentConsumer","Provider","PaymentProvider","DeliveryOptionList","DeliveryOptionsList","list","Node","deliveryOption","DeliveryOption","code","radioButton","description","DeliveryOptionSelected","_ref2","price","CheckoutDeliveryOptions","viewState","deliveryOptions","deliveryOptionSelected","alert","waiting","saveButton","editButton","cancelButton","isLoading","isError","isShowList","isShowSelected","isShowSaveButton","isShowEditButton","isShowCancelButton","_props$data$accountIn","AccountWelcomeTile","accountInformation","AccountNumber","SummaryForm","formProps","label","paymentAmount","addPaymentButton","appliedLine","bottomBorder","EditForm","inputLabel","inputAmount","customerName","customerAccountNumber","customerSince","accountCredit","accountDetails","getInputLabel","customInputLabel","id","checkoutCustomerAccount","summaryView","editView","moduleState","tenderType","paymentContext","paymentTenderTypes","_document$querySelect","tt","tenderTypeId","tenderId","tenderName","sessionStorage","removeItem","processedOnAccountText","MsDyn365","isBrowser","document","querySelector","addEventListener","getItem","setItem","async","checkoutState","checkout","error","cartTotal","checkoutCart","cart","TotalAmount","updateCustomerAccountAmount","newAmount","information","addPayment","isReady","dlvDescription","_get","window","OverlayModal","modal","checkoutPaymentInstrument","paymentInformation","addPaymentForm","overlayModal","_objectWithoutProperties","_excluded","InvoiceDetailsModel","invoice","invoiceDetails","products","Id","invoiceDate","InvoiceDate","Date","undefined","CustomerName","dueDate","InvoiceDueDate","amountDue","AmountBalance","status","InvoicePaidStatusValue","lines","SalesInvoiceLine","line","_products$find","primaryImageUrl","find","product","RecordId","PrimaryImageUrl","totalDiscount","TotalDiscount","subtotal","InvoiceSubtotal","totalCharges","TotalCharges","totalTax","TotalTaxAmount","totalAmount","currencyCode","CurrencyCode","canBePaid","InvoicePaidStatus","Paid","formatAmount","amount","cultureFormatter","formatCurrency","InvoiceDetailsProductsComponent","msdyn365Commerce","createComponent","component","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","quantity","Quantity","productUrl","ObjectExtensions","isNullOrUndefined","ProductName","getProductPageUrlSync","actionContext","_renderProductImage","imageSettings","cropFocalRegion","fallbackImage","getFallbackImageUrl","ItemId","apiSettings","Image","altText","title","src","fallBackSrc","gridSettings","viewports","xs","q","w","h","lg","xl","lazyload","loadFailureBehavior","href","_renderProductDimensions","StringExtensions","isNullOrWhitespace","ColorName","invoiceProductColor","replace","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","Price","invoiceQuantity","toString","NetAmount","NoShipmentTrackingComponent","noShipmentTrackingNodeProps","noShipmentTrackingResources","noShippingFoundText","baseClassName","InvoiceDetailsView","header","paymentDetails","payInvoiceError","typeName","setInvoiceDetails","setProducts","getProducts","productInputs","invDetails","invoiceDetailsModel","getInvoiceDetails","filter","ProductInput","channelId","simpleProductsRes","getSimpleProductsAction","renderProducts","handleHeadingChange","accountInfo","FirstName","classnames","defaultClassName","B2bRequestsTileLinks","ArrayExtensions","hasElements","B2bRequestsTile","handleLinkTextChange","isChannelTypeB2B","b2bRequestsTile","Link","noclick","attribute","onClick","onTelemetryClick","itemProp","content","Separator","separator","Breadcrumb","_pageType","urlTokens","pageType","_getRootLink","root","_getCustomBreadcrumbLinks","itemPosition","keyIndex","_getCategoryHierarchy","categoryHierarchy","_getFriendlyName","locale","NameTranslations","Url","nameTranslations","_nameTranslation","nameTranslation","item","Language","toLowerCase","Text","_getPDPLinks","categoryPaths","url","requestUrl","Name","hideProductName","_goBack","history","back","_getPDPBackButton","query","referrer","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","app","breadcrumbType","linkSeparator","breadcrumbViewProps","BreadcrumbContainer","BreadcrumbList","BreadcrumbListItem","backButton","_renderTextBlock","textBlocks","_renderSocialShare","socialShare","_renderCartAndActions","addToCart","addToOrderTemplate","addToWishlist","errorBlock","button","_renderConfigure","configure","ContainerProps","dropdowns","_renderConfigureDropdown","dropdown","LabelContainerProps","errors","select","_renderFindInStore","findInStore","storeSelector","productPickupOptionList","onChangeHandler","callbacks","newValue","updateQuantity","_renderQuantity","quantityComponent","state","extentionResources","quantityLimitsMessages","min","max","applyDefaultOrderSettings","IncrementalQuantity","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderKeyInPrice","keyInPrice","input","_renderShopSimilarItem","shopSimilarItem","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","mediaGallery","bulkPurchaseLink","slots","histogramItem","buttonProps","starLabel","bar","percentage","histogramItems","histogramProps","InvoiceDetailsHeaderComponent","onError","invoiceNumberText","invoiceIdLabel","invoiceOrderItemsText","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","date","formatDate","year","month","day","formatShortDate","formatLongDate","dueDateText","invoicePaymentDueDateText","isOnBehalfOfRequest","isOboRequest","invoicePlacedByLabel","invoiceAmountDueText","PayInvoiceComponent","disabled","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","invoicePaymentDiscounts","invoicePaymentSubtotal","invoicePaymentCharges","invoicePaymentTax","invoicePaymentInvoiceTotal","ProductId","_context$request$app","OmniChannelMedia","InvoiceDetails","errorState","errorMessage","otherError","_onAddToCartFailed","_setPayInvoiceErrorModalClose","_getProducts","ChannelId","setState","payInvoiceErrorModalOpen","_renderHeader","_renderProducts","_renderPaymentDetails","_renderInvoiceErrors","_className","arguments","newErrorState","errorHost","errorCode","_this$state$errorStat","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","cartUrl","getUrlSync","errorClassName","InvoiceErrorComponent","showError","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","setPayInvoiceErrorModalClose","messageHeader","errorMessages","Alert","isOpen","color","assertive","message","Modal","toggle","ModalHeader","ModalBody","ModalFooter","Button","InvoicesFilterState","getInvoicesFilterStateResources","filterState","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","type","invoiceListSelectAllRadioAriaLabelText","checked","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","onRequestSpecificInvoice","requestInvoiceButtonReference","setShowActions","onRequestInvoice","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","location","isShowActions","shouldShowActions","extraActionsPopup","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","invoiceActionsButtonIsOnBehalfOfTextAriaLabel","showActions","useState","getInvoiceDetailsPageUrlSync","actionsContainerClassName","payInvoiceClassName","wrapperRefiner","refinerRefernce","handleClickOutside","current","contains","removeEventListener","useOutsideClick","ref","reference","payInvoiceReferences","RequestInvoiceButton","innerReference","invoiceReferences","requestInvoiceButtonLabel","invoiceRequestButtonLabel","onClicked","InvoicesTableRowComponent","onSelectLine","isSelected","rowCells","getMobileRowCells","invoiceRowArialabel","format","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","customer","isCurrentUser","invoiceCurrentUser","isMobileView","viewport","_window","device","Type","innerWidth","sm","md","getViewport","onSelectAllHandler","invoices","InvoicesTableComponent","setIsMobile","updateViewport","headerClassName","all","isAdmin","IsB2bAdmin","invoiceButtonReferences","Number","payInvoiceButtonReferences","MakePaymentComponentActions","_event","setDisabled","payInvoices","buttonReferences","MakePaymentComponent","hasInvoices","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","name","htmlFor","RequestInvoiceModal","email","isModalOpen","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","setTimeout","_focusElement$current","focus","searchEntered","searchEnteredHandler","updatedInvoices","isNullOrEmpty","toLocaleUpperCase","includes","searchResultString","invoicesFoundReplaceIndex","indexOf","horizontalPosition","verticalPosition","autoFocus","fade","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","substring","placeholder","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onDismiss","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isPageLoaded","isInvoiceRequestModalOpen","shouldComponentUpdate","nextProps","nextState","_customerBalance$resu","_customerBalance$resu2","_heading$text","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","Heading","invoiceRequestModal","_renderInvoiceRequestModal","_renderInvoicesFilter","pagination","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","reaction","_this$props$data$b2bU","callerContext","b2bUserId","b2bUserInformation","B2BUserId","invoiceId","BusinessPartnerUsersDataActions","BusinessPartnerOperationDeliveryType","Email","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","BusinessPartnerId","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","hasInvoiceLine","invoiceInCartPaymentMessage","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","_this$state$selectedB2","specificInvoice","__decorate","observer","InvoiceListView","Map","timeout","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","distributor","OrgUnit","distributorInfo","entries","orgUnit","Latitude","Longitude","isLocationSelected","options","_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","componentDidMount","_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","observable","MapHeader","OrderTemplateListViewComponent","OrderTemplateList","OrderTemplates","OrderTemplate","statusMessage","orderTemplates","createOrderTemplateButton","templateHeaderStatusMessage","headingForEmptyOrderTemplateList","textForEmptyOrderTemplateList","orderTemplate","renderOrderTemplate","orderTemplateNodeProps","addToCartButton","orderTemplateImage","orderTemplateStatusMessage","removeButton","orderTemplateName","orderTemplateImageElement","currentImageListLength","children"],"sourceRoot":""}