{"version":3,"sources":["webpack:///src/modules/invoices-list/index.ts?0857","webpack:///./src/modules/contracts-account-page/contracts-account-page.view.tsx?650e","webpack:///src/modules/country-picker/country-picker.tsx?051f","webpack:///src/modules/invoices-list/components/request-invoice-button.tsx?b5d9","webpack:///src/modules/breadcrumb/breadcrumb.view.tsx?58b4","webpack:///./src/themes/gardner-theme-b2c/views/checkout-delivery-options.view.tsx?7066","webpack:///src/modules/image-list/image-list.tsx?18cb","webpack:///src/modules/fabrikam/views/buybox.view.tsx?68a7","webpack:///./src/modules/contracts-account-page/components/contracts-account-page-links.tsx?67c8","webpack:///./src/modules/contracts-account-page/contracts-account-page.tsx?5b4a","webpack:///./src/themes/gardner-theme/views/checkout-delivery-options.view.tsx?2dc8","webpack:///src/modules/invoice-details/invoice-details.view.tsx?5ebe","webpack:///src/modules/b2b-requests-tile/components/account-b2b-requests-tile-links.tsx?4f55","webpack:///src/modules/b2b-requests-tile/b2b-requests-tile.tsx?ce42","webpack:///src/modules/image-list/image-list.view.tsx?cab9","webpack:///src/modules/invoices-list/components/pay-invoice-component.tsx?41f4","webpack:///src/modules/breadcrumb/components/link.tsx?b7b8","webpack:///src/modules/breadcrumb/components/separator.tsx?7c35","webpack:///src/modules/breadcrumb/breadcrumb.tsx?3387","webpack:///src/index.ts?c6ae","webpack:///src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9105","webpack:///src/modules/aad-generic/aad-generic.view.tsx?ecad","webpack:///src/modules/invoices-list/invoices-list.view.tsx?0243","webpack:///src/modules/invoices-list/components/make-payment-component.tsx?c79a","webpack:///src/modules/aad-generic/aad-generic.tsx?d537","webpack:///src/modules/invoices-list/components/invoice-error-component.tsx?2e12","webpack:///./src/themes/gardner-theme/views/components/invoice-details-products.component.tsx?1184","webpack:///./src/themes/gardner-theme/views/sign-in.view.tsx?1369","webpack:///./src/themes/gardner-theme-b2c/views/sign-in.view.tsx?1764","webpack:///src/modules/invoices-list/helpers/pay-invoices.ts?f98a","webpack:///./src/modules/payment-container/context/payment-context.tsx?efaa","webpack:///./src/themes/gardner-theme/views/checkout-payment-instrument.view.tsx?6b89","webpack:///src/modules/invoice-details/components/invoice-details-header.tsx?d1cb","webpack:///src/modules/invoice-details/components/invoice-details-payment-summary.tsx?a7ab","webpack:///src/modules/invoice-details/components/invoice-details-products.tsx?d808","webpack:///src/modules/invoice-details/helpers/invoice-data.ts?1fa7","webpack:///src/modules/invoice-details/invoice-details.tsx?b5c9","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?6874","webpack:///src/modules/country-picker/country-picker.view.tsx?825b","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?ba14","webpack:///./src/themes/gardner-theme/views/checkout-customer-account-payment.view.tsx?a50a","webpack:///./src/themes/gardner-theme/views/invoice-details.view.tsx?aa0d","webpack:///src/modules/account-welcome-tile/account-welcome-tile.tsx?abcf","webpack:///src/modules/invoices-list/helpers/invoice-data.ts?6271","webpack:///src/modules/invoices-list/helpers/invoice-status.ts?442a","webpack:///src/modules/invoices-list/helpers/index.ts?7d24","webpack:///src/modules/b2b-requests-tile/b2b-requests-tile.view.tsx?949e","webpack:///src/modules/invoices-list/components/invoices-filter-component.tsx?759c","webpack:///src/modules/account-welcome-tile/account-welcome-tile.view.tsx?a13c","webpack:///src/modules/invoices-list/components/request-invoice-modal.tsx?f430","webpack:///src/modules/invoices-list/invoices-list.tsx?ba10","webpack:///src/modules/adventureworks/views/order-template-list.view.tsx?86a3"],"names":["props","contractsHeading","contractsWrapper","contractsTable","contractsLinks","React","Module","Object","assign","CountryPicker","constructor","super","_telemetryContent","getTelemetryObject","this","context","request","telemetryPageName","friendlyName","telemetry","_preferredSiteStorageKey","_cookieExpirationTime","closeModal","setState","isModalOpen","_handleStayOnSiteButtonClick","_this$props$context$r","currentBaseUrl","marketSettings","urlToStore","_appendProtocolToUrl","_writeToCookie","_handleClick","storageKey","storageValue","cookieOptions","secure","sameSite","maxAge","cookies","set","baseUrl","includes","isCookieValueSet","get","value","state","undefined","render","_heading$tag","heading","subheading","countryList","actionLink","config","isConsentGiven","countryPickerHeading","MsDyn365","className","tag","text","editProps","onEdit","handleTextChange","requestContext","countryPickerSubHeading","handleParagraphChange","countryPickerActionLink","createLink","currentSiteButton","Button","onClick","tabIndex","resources","stayOnCurrentSiteButtonText","viewprops","_objectSpread","modalContainer","moduleProps","Modal","isOpen","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","modalHeaderContainer","ModalHeader","closeButtonTabIndex","modalFooterContainer","ModalFooter","modalBodyContainer","ModalBody","link","renderCountryList","stayOnCurrentSiteButton","renderView","event","target","handleLinkTextChange","_this$props$config$ac","linkText","StringExtensions","isNullOrEmpty","linkUrl","destinationUrl","_link$linkText","payLoad","getPayloadObject","attributes","getTelemetryAttributes","editableLink","ariaLabel","openInNewTab","role","additionalProperties","onTelemetryClick","onTextChange","localeItems","map","renderCountry","localeItem","_image$imageSettings","_image$src","localeBaseUrl","matchedCountryItem","find","item","url","imageSize","q","w","h","defaultImageSettings","viewports","xs","lg","xl","lazyload","image","imageProps","gridSettings","imageSettings","key","displayString","href","src","altText","loadFailureBehavior","shouldSkipToMainImage","displaySubString","RequestInvoiceButton","_ref","onClicked","requestInvoiceButtonLabel","innerReference","innerRef","BreadCrumbView","root","links","backButton","BreadcrumbContainer","BreadcrumbList","BreadcrumbListItem","separator","Node","index","classnames","length","error","DeliveryOptionList","DeliveryOptionsList","list","deliveryOption","DeliveryOption","code","radioButton","description","DeliveryOptionSelected","_ref2","price","CheckoutDeliveryOptionsView","CheckoutDeliveryOptions","viewState","deliveryOptions","deliveryOptionSelected","alert","waiting","saveButton","editButton","cancelButton","isLoading","isError","isShowList","isShowSelected","isShowSaveButton","isShowEditButton","isShowCancelButton","ImageList","images","paragraph","_renderImageListItems","imageList","disableLazyLoad","imageLink","imageLinkText","imageLinkAriaLabel","Msdyn365","linkAltText","linkAriaLabel","imageListTitle","viewProps","imageListHeading","imageListContainer","imageListItem","imageListItemAnchorTag","imageListItems","_renderTextBlock","textBlocks","_renderSocialShare","socialShare","_renderCartAndActions","addToCart","addToOrderTemplate","addToWishlist","errorBlock","button","_renderConfigure","configure","ContainerProps","dropdowns","_renderConfigureDropdown","dropdown","LabelContainerProps","errors","select","_renderFindInStore","findInStore","storeSelector","modal","productPickupOptionList","onChangeHandler","callbacks","newValue","updateQuantity","_renderQuantity","quantityComponent","extentionResources","quantityLimitsMessages","max","telemetryContent","quantity","IncrementalQuantity","id","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderKeyInPrice","keyInPrice","input","_renderShopSimilarItem","shopSimilarItem","BuyboxView","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","title","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","mediaGallery","bulkPurchaseLink","slots","_mapEditableLinks","linkdata","editableLinks","forEach","contentAction","etext","push","ContractsAccountPageLinks","ContractsAccountPage","_handleHeadingChange","_handleLinkTextChange","linkIndex","_renderHeading","bind","_getContractsRowData","_renderTable","_generateRow","data","contractList","result","manufacturerCodeLabel","contractNumberLabel","laborRateLabel","contractDescLabel","noContractsFoundText","headingRow","contractsRowData","i","_renderMfrCodeHeading","contract","ContractCode","_generateEmptyRow","colNum","manufacturerCodeShortFormLabel","contractData","ManufacturerCode","Description","ContractLaborRate","ContractNotes","toFixed","_renderLink","LinksComponent","classNames","dlvDescription","_get","window","sessionStorage","setItem","InvoiceDetailsView","header","products","paymentDetails","payInvoiceError","B2bRequestsTileLinks","ArrayExtensions","hasElements","B2bRequestsTile","handleHeadingChange","isChannelTypeB2B","actionContext","b2bRequestsTile","imageListView","indexKey","PayInvoiceComponentActions","async","_event","setDisabled","payInvoices","invoice","errorState","onError","reference","onClickHandler","PayInvoiceComponent","msdyn365Commerce","createComponent","component","disabled","useState","createElement","payInvoiceButtonAriaLabel","canBePaid","payInvoiceButtonText","Link","noclick","attribute","itemProp","content","Separator","Breadcrumb","_pageType","urlTokens","pageType","_getRootLink","_getCustomBreadcrumbLinks","itemPosition","keyIndex","toString","_getCategoryHierarchy","categoryHierarchy","_getFriendlyName","locale","NameTranslations","Url","nameTranslations","_nameTranslation","nameTranslation","Language","toLowerCase","Text","_getPDPLinks","categoryPaths","product","requestUrl","Name","hideProductName","_goBack","history","back","_getPDPBackButton","query","isBrowser","document","referrer","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","app","breadcrumbType","linkSeparator","breadcrumbViewProps","isMobileView","viewport","_window","device","Type","innerWidth","sm","md","getViewport","onSelectAllHandler","isSelected","invoices","InvoicesTableComponent","isMobile","setIsMobile","updateViewport","addEventListener","rowClassName","headerClassName","InvoicesTableHeaderComponent","typeName","isSelectedAll","all","isAdmin","customer","IsB2bAdmin","onSelectAll","InvoicesTableRowComponent","invoiceReferences","invoiceButtonReferences","Number","payInvoiceReferences","payInvoiceButtonReferences","onRequestInvoice","aadGeneric","aadConainer","aadAPIConainer","InvoiceListView","filter","invoiceRequestModal","pagination","MakePaymentComponentActions","buttonReferences","MakePaymentComponent","hasInvoices","makePaymentButtonAriaLabel","makePaymentButtonText","AadGeneric","moduleClassName","componentDidMount","$i2e","$element","insertServiceContent","getElementContent","initialize","shouldComponentUpdate","nextProps","InvoiceErrorComponent","messageHeader","errorMessage","otherError","showError","payInvoiceErrorModalOpen","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","cartUrl","setPayInvoiceErrorModalClose","errorMessages","Fragment","Alert","color","assertive","message","InvoiceDetailsModel","invoiceDetails","Id","invoiceDate","InvoiceDate","Date","customerName","CustomerName","dueDate","InvoiceDueDate","amountDue","AmountBalance","status","InvoicePaidStatusValue","lines","SalesInvoiceLine","line","_products$find","primaryImageUrl","RecordId","PrimaryImageUrl","totalDiscount","TotalDiscount","subtotal","InvoiceSubtotal","totalCharges","TotalCharges","totalTax","TotalTaxAmount","totalAmount","TotalAmount","currencyCode","CurrencyCode","InvoicePaidStatus","Paid","formatAmount","amount","cultureFormatter","formatCurrency","InvoiceDetailsProductsComponent","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","Quantity","productUrl","ObjectExtensions","isNullOrUndefined","ProductName","getProductPageUrlSync","_renderProductImage","cropFocalRegion","fallbackImage","getFallbackImageUrl","ItemId","apiSettings","Image","fallBackSrc","_renderProductDimensions","isNullOrWhitespace","ColorName","invoiceProductColor","replace","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","Price","invoiceQuantity","NetAmount","SignInLoading","modalBody","icon","SignInView","signIn","loading","defaultAADConainer","signInSection","signInSectionHeading","signInLocalAccount","isShowLoading","localAccount","items","forgetPassword","disclaimer","signInButton","wrapper","label","LocalAccount","signUpDescription","signUpLink","signUpSection","signUpSectionHeading","invoicesToAdd","errorReason","failureReason","cartState","getCartState","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","getUrlSync","location","_errorMsg","PaymentContext","createContext","paymentModules","selectedPayment","registerPaymentMethod","elementId","tenderTypeList","Error","setSelectedPaymentState","paymentTenderType","Consumer","PaymentConsumer","Provider","PaymentProvider","OverlayModal","CheckoutPaymentInstrumentView","checkoutPaymentInstrument","paymentInformation","addPaymentForm","overlayModal","tenderType","_objectWithoutProperties","_excluded","paymentContext","paymentTenderTypes","tt","tenderTypeId","tenderId","tenderName","InvoiceDetailsHeaderComponent","invoiceNumberText","invoiceIdLabel","invoiceOrderItemsText","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","formatShortDate","date","formatDate","year","month","day","formatLongDate","dueDateText","invoicePaymentDueDateText","isOnBehalfOfRequest","isOboRequest","invoicePlacedByLabel","invoiceAmountDueText","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","invoicePaymentDiscounts","invoicePaymentSubtotal","invoicePaymentCharges","invoicePaymentTax","invoicePaymentInvoiceTotal","ProductId","_context$request$app","OmniChannelMedia","InvoiceDetails","_onAddToCartFailed","_setPayInvoiceErrorModalClose","_getProducts","ChannelId","invoiceDetailsModel","_renderHeader","_renderProducts","_renderPaymentDetails","_renderInvoiceErrors","_className","channelId","arguments","productInputs","ProductInput","getSimpleProductsAction","newErrorState","errorHost","_this$state$errorStat","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","errorClassName","switchCheckedState","headerCells","getMobileHeaderCells","type","invoiceListSelectAllRadioAriaLabelText","checked","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","countryPickerView","country","onRequestSpecificInvoice","requestInvoiceButtonReference","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","extraActionsPopup","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","invoiceActionsButtonIsOnBehalfOfTextAriaLabel","showActions","getInvoiceDetailsPageUrlSync","actionsContainerClassName","payInvoiceClassName","invoiceRequestButtonLabel","onSelectLine","rowCells","getMobileRowCells","invoiceRowArialabel","format","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","isCurrentUser","AccountNumber","customerAccountNumber","invoiceCurrentUser","SummaryForm","formProps","paymentAmount","addPaymentButton","appliedLine","bottomBorder","EditForm","inputLabel","inputAmount","customerSince","accountCredit","accountDetails","getInputLabel","customInputLabel","CheckoutCustomerAccountView","checkoutCustomerAccount","summaryView","editView","moduleState","_document$querySelect","removeItem","processedOnAccountText","querySelector","getItem","checkoutState","checkout","cartTotal","checkoutCart","cart","updateCustomerAccountAmount","newAmount","information","addPayment","isReady","setInvoiceDetails","setProducts","getProducts","invDetails","getInvoiceDetails","simpleProductsRes","renderProducts","AccountWelcomeTile","accountInfo","accountInformation","FirstName","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","Unpaid","invoiceStatusUnpaid","PartiallyPaid","invoiceStatusPartiallyPaid","invoiceStatusPaid","B2bRequestsTileView","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","onStateClick","InvoicesFilterComponent","popoverRef","createRef","popoverState","setPopoverState","togglePopover","useCallback","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","Popover","placement","EnumExtensions","getEnumValues","renderFilterStateItem","stateStringRepresentation","AccountWelcomeTileView","onSubmitRequestClick","onClosing","filteredInvoices","onSubmitRequest","checkboxRef","closingFlag","_inputInvoice$current","current","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","_invoice","_checkboxRef$current$","onInvoiceSelect","onInvoiceSelectHandler","checkboxId","checkboxName","name","ref","htmlFor","RequestInvoiceModal","email","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","setTimeout","_focusElement$current","focus","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","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","nextState","_customerBalance$resu","_customerBalance$resu2","_heading$text","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","Heading","_renderInvoiceRequestModal","_renderInvoicesFilter","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","reaction","_this$props$data$b2bU","callerContext","b2bUserId","b2bUserInformation","B2BUserId","invoiceId","BusinessPartnerUsersDataActions","requestInvoiceCopyAsync","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","OrderTemplateListViewComponent","OrderTemplateList","OrderTemplates","OrderTemplate","statusMessage","orderTemplates","createOrderTemplateButton","templateHeaderStatusMessage","headingForEmptyOrderTemplateList","textForEmptyOrderTemplateList","orderTemplate","renderOrderTemplate","orderTemplateNodeProps","addToCartButton","orderTemplateImage","orderTemplateStatusMessage","removeButton","orderTemplateName","orderTemplateImageElement","currentImageListLength","children"],"mappings":";8FAAA,iL,iFCSgBA,cACZ,MAAM,iBAAEC,EAAgB,iBAAEC,EAAgB,eAAEC,EAAc,eAAEC,GAAmBJ,EAC/E,OACIK,gBAACC,SAAMC,OAAAC,OAAA,GAAKN,GACPD,EACAE,EACAC,K,wvBCyCN,MAAMK,UAAsBJ,gBAW/BK,YAAmBV,GACfW,MAAMX,GAXO,KAAAY,kBAAuCC,6BACpDC,KAAKd,MAAMe,QAAQC,QAAQC,kBAC3BH,KAAKd,MAAMkB,aACXJ,KAAKd,MAAMmB,WAGE,KAAAC,yBAAmC,oBAEnC,KAAAC,sBAAwB,OAuFzB,KAAAC,WAAa,KACzBR,KAAKS,SAAS,CACVC,aAAa,KA+GJ,KAAAC,6BAA+B,KAAW,IAAAC,EACvD,MAAMC,EAA0D,QAA5CD,EAAGZ,KAAKd,MAAMe,QAAQC,QAAQY,sBAAc,IAAAF,OAAA,EAAzCA,EAA2CC,eAClE,GAAIA,EAAgB,CAChB,MAAME,EAAaf,KAAKgB,qBAAqBH,GAC7Cb,KAAKiB,eAAejB,KAAKM,yBAA0BS,GAEvDf,KAAKQ,cASQ,KAAAU,aAAe,CAACC,EAAqBC,IAA0B,KAC5EpB,KAAKiB,eAAeE,EAAYC,IAQnB,KAAAH,eAAiB,CAACE,EAAqBC,KACpD,IAAKD,IAAeC,EAChB,OAEJ,MAAMC,EAAmC,CAAEC,QAAQ,EAAMC,SAAU,QACnEF,EAAcG,OAASxB,KAAKO,sBAC5BP,KAAKd,MAAMe,Q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served. See LICENSE in the project root for license information.\n */\n\nexport * from './components';\nexport * from './helpers';\nexport * from './invoices-list';\nexport * from './invoices-list.data';\nexport * from './invoices-list.props.autogenerated';\nexport * from './invoices-list.view';\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","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICookieSetOptions, IImageDimension, ILocaleItems } from '@msdyn365-commerce/core-internal';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerData } from './country-picker.data';\nimport { IActionLinkData, ICountryPickerProps } from './country-picker.props.autogenerated';\n\n/**\n * CountryPicker view props interface.\n */\nexport interface ICountryPickerViewProps extends ICountryPickerProps {\n modalContainer: IModuleProps;\n modalHeaderContainer: INodeProps;\n modalFooterContainer: INodeProps;\n modalBodyContainer: INodeProps;\n heading?: React.ReactNode;\n subheading?: React.ReactNode;\n link?: React.ReactNode;\n countryList?: React.ReactNode[];\n isModalOpen?: boolean;\n state?: ICountryPickerState;\n stayOnCurrentSiteButton?: React.ReactNode;\n}\n\n/**\n * ICountryPickerState: Interface for Country picker State.\n */\nexport interface ICountryPickerState {\n isModalOpen: boolean;\n}\n\n/**\n *\n * CountryPicker component.\n * @extends {React.PureComponent>}\n */\nexport class CountryPicker extends React.PureComponent, ICountryPickerState> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly _preferredSiteStorageKey: string = '_msdyn365___site_';\n\n private readonly _cookieExpirationTime = 5_184_000;\n\n public constructor(props: ICountryPickerProps) {\n super(props);\n let isCookieValueSet: boolean = false;\n if (props.context.request.cookies.get(this._preferredSiteStorageKey).value) {\n isCookieValueSet = true;\n }\n this.state = {\n isModalOpen: !isCookieValueSet && this.props.context.request.marketSettings !== undefined\n };\n }\n\n public render(): JSX.Element | null {\n const { heading, subheading, countryList, actionLink } = this.props.config;\n\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const countryPickerHeading = heading && (\n \n );\n\n const countryPickerSubHeading = subheading && (\n \n );\n\n const countryPickerActionLink = actionLink && this.createLink(actionLink);\n const currentSiteButton = (\n \n );\n\n const viewprops: ICountryPickerViewProps = {\n ...this.props,\n state: this.state,\n isModalOpen: this.state.isModalOpen,\n modalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-country-picker__dialog',\n isOpen: true,\n 'aria-label': 'country-picker',\n toggle: this.closeModal,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: true\n },\n modalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-country-picker__modal-header',\n toggle: this.closeModal,\n closeButtonTabIndex: 1\n },\n modalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-countryPicker__modal-footer'\n },\n modalBodyContainer: {\n tag: ModalBody,\n className: 'ms-counrtyPicker__modal-body'\n },\n heading: countryPickerHeading,\n subheading: countryPickerSubHeading,\n link: countryPickerActionLink,\n countryList: countryList && this.renderCountryList(),\n stayOnCurrentSiteButton: currentSiteButton\n };\n\n return this.props.renderView(viewprops);\n }\n\n /**\n * Initiate close modal.\n */\n public readonly closeModal = (): void => {\n this.setState({\n isModalOpen: false\n });\n };\n\n public handleParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.subheading = event.target.value;\n }\n\n public handleTextChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.heading!.text = event.target.value;\n }\n\n public handleLinkTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.actionLink?.linkText) {\n this.props.config.actionLink.linkText = event.target.value;\n }\n }\n\n public createLink(link?: IActionLinkData): React.ReactNode | null {\n if (!StringExtensions.isNullOrEmpty(link?.linkUrl.destinationUrl)) {\n const linkText = link?.linkText ?? '';\n const payLoad = getPayloadObject('click', this._telemetryContent, '', '');\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: link?.ariaLabel,\n className: 'ms-countryPicker__link',\n linkText,\n linkUrl: link?.linkUrl.destinationUrl,\n openInNewTab: link?.openInNewTab,\n role: 'link',\n additionalProperties: attributes!,\n onClick: onTelemetryClick(this._telemetryContent, payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n public renderCountryList(): React.ReactNode[] | undefined {\n const marketSettings = this.props.context.request.marketSettings;\n if (!marketSettings) {\n return undefined;\n }\n const localeItems = marketSettings.localeItems;\n const countryLinks = localeItems.map((value: ILocaleItems) => {\n return this.renderCountry(value);\n });\n\n return countryLinks;\n }\n\n public renderCountry(localeItem: ILocaleItems): React.ReactNode | null {\n const countryList = this.props.config.countryList;\n let baseUrl = localeItem.localeBaseUrl;\n baseUrl = this._appendProtocolToUrl(baseUrl);\n const matchedCountryItem = countryList?.find(item => item.url === baseUrl);\n if (!matchedCountryItem) {\n return null;\n }\n const imageSize: IImageDimension = { q: 'w=48&h=48&m=6', w: 0, h: 0 };\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: imageSize,\n lg: imageSize,\n xl: imageSize\n },\n lazyload: true\n };\n const image = matchedCountryItem.image;\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: image?.imageSettings ?? defaultImageSettings\n };\n return (\n \n {image && (\n \n )}\n
\n {matchedCountryItem.displayString}\n {matchedCountryItem.displaySubString}\n
\n \n );\n }\n\n /**\n * Writes the current site base url to cookie and closes the country picker modal dialog.\n */\n private readonly _handleStayOnSiteButtonClick = (): void => {\n const currentBaseUrl = this.props.context.request.marketSettings?.currentBaseUrl;\n if (currentBaseUrl) {\n const urlToStore = this._appendProtocolToUrl(currentBaseUrl);\n this._writeToCookie(this._preferredSiteStorageKey, urlToStore);\n }\n this.closeModal();\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n * @returns - This method just writes the cookie to the browser.\n */\n private readonly _handleClick = (storageKey?: string, storageValue?: string) => () => {\n this._writeToCookie(storageKey, storageValue);\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n */\n private readonly _writeToCookie = (storageKey?: string, storageValue?: string): void => {\n if (!storageKey || !storageValue) {\n return;\n }\n const cookieOptions: ICookieSetOptions = { secure: true, sameSite: 'none' };\n cookieOptions.maxAge = this._cookieExpirationTime;\n this.props.context.request.cookies.set(storageKey, storageValue, cookieOptions);\n };\n\n /**\n * Appends protocol to an url.\n * @param baseUrl - Url to be formatted.\n * @returns - URL after appending protocol.\n */\n private readonly _appendProtocolToUrl = (baseUrl: string): string => {\n return !baseUrl.includes('https://') ? `https://${baseUrl}` : baseUrl;\n };\n}\n\nexport default CountryPicker;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 { 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","/*--------------------------------------------------------------\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","/*!\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, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IImageListConfig, IImageListProps, IImagesData } from './image-list.props.autogenerated';\n\n/**\n * The interface for IImageListViewProps.\n */\nexport interface IImageListViewProps extends IImageListProps {\n imageList: IModuleProps;\n imageListHeading?: React.ReactNode;\n imageListContainer: INodeProps;\n imageListItem: INodeProps;\n imageListItemAnchorTag: INodeProps;\n imageListItems: IImageListItem[] | undefined;\n}\n\n/**\n * The interface for IImageListItem.\n */\nexport interface IImageListItem {\n image: JSX.Element | undefined;\n text: JSX.Element | undefined;\n link: string | undefined;\n linkAltText: string | undefined;\n linkAriaLabel: string | undefined;\n}\n\n/**\n *\n * ImageList component.\n * @extends {React.PureComponent>}\n */\nclass ImageList extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { heading } = this.props.config;\n const imageListTitle = heading && ;\n const viewProps: IImageListViewProps = {\n ...this.props,\n imageList: {\n moduleProps: this.props,\n className: classnames('ms-image-list', this.props.config.className),\n tag: 'div'\n },\n imageListHeading: imageListTitle,\n imageListContainer: {\n className: 'ms-image-list__list',\n role: 'list',\n tag: 'ul'\n },\n imageListItem: {\n className: 'ms-image-list__list-item',\n role: 'listitem',\n tag: 'li'\n },\n imageListItemAnchorTag: {\n tag: 'a',\n className: 'ms-image-list__link',\n role: 'link'\n },\n imageListItems: this._renderImageListItems()\n };\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handle paragraph change.\n * @param index - Index of image item in array of image items.\n * @returns Void.\n */\n public handleParagraphChange = (index: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.images![index]) {\n this.props.config.images![index].paragraph = event.target.value;\n }\n };\n\n /**\n * Render list of images.\n * @returns List of images with text and redirection link.\n */\n private readonly _renderImageListItems = (): IImageListItem[] | undefined => {\n const imageList: IImagesData[] | undefined = this.props.config.images;\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n lg: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n xl: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 }\n },\n lazyload: false,\n disableLazyLoad: true\n };\n return imageList?.map((item, index) => {\n const { image, link, paragraph } = item;\n\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: (image?.imageSettings ?? defaultImageSettings) as Msdyn365.IImageSettings | undefined\n };\n\n const imageLink: string | undefined = link?.linkUrl.destinationUrl;\n const imageLinkText: string | undefined = link?.linkText ?? link?.ariaLabel;\n const imageLinkAriaLabel: string | undefined = link?.ariaLabel;\n\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n const imageImage = (\n \n );\n\n const imageText = paragraph && (\n \n );\n const imageListItem: IImageListItem = {\n image: imageImage,\n text: imageText,\n link: imageLink,\n linkAltText: imageLinkText,\n linkAriaLabel: imageLinkAriaLabel\n };\n return imageListItem;\n });\n };\n}\n\nexport default ImageList;\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 max,\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 && _renderQuantity(quantity, callbacks, props, state, resources, quantityLimitsMessages, max, telemetryContent)}\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 max: number | undefined,\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","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. 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","/*!\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 * 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 * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IImageListViewProps } from './image-list';\n\n/**\n * Render the thumbnail item images.\n * @param props - The image list view props.\n * @returns Return HTML having IImageListViewProps props with image List.\n */\nexport const imageListView = (props: IImageListViewProps): JSX.Element => {\n const { imageList, imageListContainer, imageListHeading, imageListItem, imageListItems, imageListItemAnchorTag } = props;\n return (\n \n {imageListHeading}\n \n {imageListItems?.map(item => {\n let indexKey: string;\n\n if (item.image) {\n const image = (item.image as unknown) as Msdyn365.Image;\n indexKey = image.props.src as string;\n } else {\n const text = (item.text as unknown) as Msdyn365.RichTextComponent;\n indexKey = text.props.text as string;\n }\n return (\n \n {item.image && (\n \n {item.image}\n \n )}\n {item.text}\n \n );\n })}\n \n \n );\n};\n\nexport default imageListView;\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 { 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\nexport * from './modules/invoices-list';\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAadGenericViewProps } from './aad-generic';\n\nexport default (props: IAadGenericViewProps) => {\n const { aadGeneric, aadConainer, aadAPIConainer, heading } = props;\n\n return (\n \n \n {heading}\n {aadAPIConainer}\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 { 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\nimport { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\ninterface IMakePaymentData {\n invoices: InvoiceModel[];\n}\n\nexport interface IMakePaymentResources {\n makePaymentButtonText: string;\n makePaymentButtonAriaLabel: string;\n}\n\nexport interface IMakePaymentProps extends IComponentProps {\n context: ICoreContext;\n itemKey?: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n telemetryContent?: ITelemetryContent;\n navigationUrl?: string;\n buttonReferences?: React.RefObject;\n resources: IMakePaymentResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IMakePaymentProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.buttonReferences);\n }\n setDisabled(false);\n };\n\n await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\n};\n\nconst MakePaymentComponentActions = {\n onClick\n};\n\n/**\n * On Click function.\n * @param input -Make payment props.\n * @param setDisabled -Set Disabled.\n * @returns Make payment component on click.\n */\nconst onClickHandler = (input: IMakePaymentProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const {\n data: { invoices }\n } = input;\n const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {input.resources.makePaymentButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'MakePayment',\n { component: MakePayment }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAadGenericData } from './aad-generic.data';\nimport { IAadGenericProps } from './aad-generic.props.autogenerated';\n\nexport interface IAadGenericViewProps extends IAadGenericProps {\n aadGeneric: IModuleProps;\n aadConainer: INodeProps;\n aadAPIConainer: React.ReactNode;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AadGeneric component.\n * @extends {React.Component>}\n */\nclass AadGeneric extends React.Component> {\n private readonly moduleClassName: string = 'ms-aad-generic';\n\n public componentDidMount(): void {\n // @ts-expect-error\n const { $i2e, $element } = window || {};\n\n if ($i2e && $element) {\n $i2e.insertServiceContent($element.getElementContent());\n $element.initialize();\n }\n }\n\n public shouldComponentUpdate(nextProps: IAadGenericViewProps): boolean {\n if (nextProps.config.heading !== this.props.config.heading) {\n return true;\n }\n return false;\n }\n\n public render(): JSX.Element | null {\n const { className, heading } = this.props.config;\n\n const viewProps = {\n ...this.props,\n aadGeneric: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n aadConainer: {\n className: `${this.moduleClassName}__container`\n },\n aadAPIConainer:
,\n heading: heading && (\n \n )\n };\n\n return this.props.renderView(viewProps);\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.heading) {\n this.props.config.heading.text = event.target.value;\n }\n };\n}\n\nexport default AadGeneric;\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","/*--------------------------------------------------------------\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","/*--------------------------------------------------------------\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 {\r\n ISignInItem, ISignInLoading, ISignInLocalAccount,\r\n ISignInViewProps\r\n} from '@msdyn365-commerce-modules/account-management/src/modules/sign-in/./sign-in';\r\n\r\nconst LocalAccount: React.FC = ({\r\n localAccount,\r\n items,\r\n forgetPassword,\r\n disclaimer,\r\n error,\r\n signInButton\r\n}) => {\r\n\r\n return (\r\n \r\n {items && items.map((item: ISignInItem) => {\r\n return (\r\n \r\n {item.label}\r\n {item.error}\r\n {item.input}\r\n \r\n );\r\n })}\r\n {forgetPassword}\r\n {disclaimer}\r\n {error}\r\n {signInButton}\r\n \r\n );\r\n};\r\n//\r\n// const SocialAccount: React.FC = ({\r\n// socialAccounts,\r\n// items\r\n// }) => {\r\n//\r\n// return (\r\n// \r\n// {items && items.map((item: ISignInSocialItem) => {\r\n// return (\r\n// \r\n// {item.image}\r\n// {item.text}\r\n// \r\n// );\r\n// })}\r\n// \r\n// );\r\n// };\r\n\r\nconst SignInLoading: React.FC = ({\r\n modal,\r\n modalBody,\r\n icon,\r\n message\r\n}) => {\r\n return (\r\n \r\n \r\n {icon}\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nconst SignInView: React.FC = props => {\r\n\r\n const {\r\n signIn,\r\n viewState,\r\n loading,\r\n defaultAADConainer,\r\n aadConainer,\r\n signInSection,\r\n signInSectionHeading,\r\n signInLocalAccount,\r\n } = props;\r\n\r\n return (\r\n \r\n {viewState.isShowLoading && }\r\n {viewState.isShowLoading && }\r\n \r\n \r\n {signInSectionHeading}\r\n {LocalAccount(signInLocalAccount)}\r\n {/*{SocialAccount(signInSocialAccount)}*/}\r\n \r\n {/**/}\r\n {/* {signUpSectionHeading}*/}\r\n {/* {signUpDescription}*/}\r\n {/* {signUpLink}*/}\r\n {/**/}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default SignInView;\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 {\r\n ISignInItem, ISignInLoading, ISignInLocalAccount,\r\n ISignInViewProps\r\n} from '@msdyn365-commerce-modules/account-management/src/modules/sign-in/./sign-in';\r\n\r\nconst LocalAccount: React.FC = ({\r\n localAccount,\r\n items,\r\n forgetPassword,\r\n disclaimer,\r\n error,\r\n signInButton\r\n}) => {\r\n\r\n return (\r\n \r\n {items && items.map((item: ISignInItem) => {\r\n return (\r\n \r\n {item.label}\r\n {item.error}\r\n {item.input}\r\n \r\n );\r\n })}\r\n {forgetPassword}\r\n {disclaimer}\r\n {error}\r\n {signInButton}\r\n \r\n );\r\n};\r\n//\r\n// const SocialAccount: React.FC = ({\r\n// socialAccounts,\r\n// items\r\n// }) => {\r\n//\r\n// return (\r\n// \r\n// {items && items.map((item: ISignInSocialItem) => {\r\n// return (\r\n// \r\n// {item.image}\r\n// {item.text}\r\n// \r\n// );\r\n// })}\r\n// \r\n// );\r\n// };\r\n\r\nconst SignInLoading: React.FC = ({\r\n modal,\r\n modalBody,\r\n icon,\r\n message\r\n}) => {\r\n return (\r\n \r\n \r\n {icon}\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nconst SignInView: React.FC = props => {\r\n\r\n const {\r\n signIn,\r\n viewState,\r\n loading,\r\n defaultAADConainer,\r\n aadConainer,\r\n signInSection,\r\n signInSectionHeading,\r\n signInLocalAccount,\r\n signUpDescription,\r\n signUpLink,\r\n signUpSection,\r\n signUpSectionHeading\r\n } = props;\r\n\r\n return (\r\n \r\n {viewState.isShowLoading && }\r\n {viewState.isShowLoading && }\r\n \r\n \r\n {signInSectionHeading}\r\n {LocalAccount(signInLocalAccount)}\r\n {/*{SocialAccount(signInSocialAccount)}*/}\r\n \r\n \r\n {signUpSectionHeading}\r\n {signUpDescription}\r\n {signUpLink}\r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SignInView;\r\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","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 { 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","/*!\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 { 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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerViewProps } from './country-picker';\n\n/**\n * Functional component which renders country picker module.\n * @param props - Configuration for the country picker component.\n * @returns React.FC - Functional component of the country picker module.\n */\nexport const countryPickerView: React.FC = (props: ICountryPickerViewProps) => {\n const {\n isModalOpen,\n modalContainer,\n modalHeaderContainer,\n modalBodyContainer,\n heading,\n modalFooterContainer,\n subheading,\n link,\n countryList,\n stayOnCurrentSiteButton\n } = props;\n return isModalOpen && countryList ? (\n \n \n {heading}\n {subheading}\n \n \n {countryList.map(country => (\n <>{country}\n ))}\n \n \n {stayOnCurrentSiteButton}\n {link}\n \n \n ) : null;\n};\n\nexport default countryPickerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, {\n IComponent,\n IComponentProps,\n ICoreContext,\n IDateFormatOptions,\n isOboRequest,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { getInvoiceDetailsPageUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../../helpers/invoice-data';\nimport { getInvoiceStatusText, IInvoiceStatusResources } from '../../../helpers/invoice-status';\nimport { IInvoiceErrorState } from '../../../invoices-list';\nimport { IPayInvoiceResources, PayInvoiceComponent } from '../../pay-invoice-component';\nimport { RequestInvoiceButton } from '../../request-invoice-button';\n\ninterface IInvoicesTableRowData {\n invoice: InvoiceModel;\n index: number;\n customer: Customer;\n}\n\nexport interface IInvoicesTableRowResources extends IInvoiceStatusResources, IPayInvoiceResources {\n invoiceCurrentUser: string;\n invoiceViewDetailsButtonText: string;\n invoiceViewDetailsButtonAriaLabel: string;\n invoiceActionsButtonTextAriaLabel?: string;\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel?: string;\n invoiceRequestButtonLabel: string;\n invoiceListSelectRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n isMobile: boolean;\n invoiceReferences?: React.RefObject;\n payInvoiceReferences?: React.RefObject;\n resources: IInvoicesTableRowResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice?(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableRowComponent extends IComponent {}\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\n/**\n * Request specific invoice function.\n * @param props -Invoice table row props.\n * @param requestInvoiceButtonReference -Reference button.\n * @returns Call Request Invoice.\n */\nconst onRequestSpecificInvoice = (\n props: IInvoicesTableRowProps,\n requestInvoiceButtonReference: React.RefObject\n) => () => {\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice, customer }\n } = props;\n\n const isCurrentUser =\n !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n \n \n {formatDate(props.context, invoice.invoiceDate)}\n \n \n {invoice.customerName}\n {isCurrentUser ? {props.resources.invoiceCurrentUser} : null}\n \n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\n \n {formatDate(props.context, invoice.dueDate)}\n \n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nlet setShowPreviousActions: React.Dispatch> | undefined;\n\n/**\n * On Click view details function.\n * @param linkToInvoiceDetails -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst onClickViewDetails = (linkToInvoiceDetails: string) => () => {\n if (MsDyn365.isBrowser) {\n window.location.href = linkToInvoiceDetails;\n }\n return;\n};\n\n/**\n * Toggle function.\n * @param isShowActions -Link to invoice details.\n * @param setShowActions -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst toggle = (isShowActions: boolean, setShowActions: React.Dispatch>) => () => {\n const shouldShowActions = !isShowActions;\n if (shouldShowActions) {\n if (setShowPreviousActions) {\n setShowPreviousActions(false);\n }\n setShowActions(shouldShowActions);\n setShowPreviousActions = setShowActions;\n } else {\n setShowPreviousActions = undefined;\n setShowActions(shouldShowActions);\n }\n};\n\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\n const {\n resources: {\n invoiceViewDetailsButtonAriaLabel,\n invoiceViewDetailsButtonText,\n invoiceActionsButtonTextAriaLabel,\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel\n },\n data: { index }\n } = props;\n\n const [showActions, setShowActions] = useState(false);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\n return (\n
\n \n {showActions && !isOnBehalfOfRequest && (\n
\n \n {invoiceViewDetailsButtonText}\n \n \n \n
\n )}\n
\n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice }\n } = props;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n
\n {invoice.customerName}\n \n \n {formatDate(props.context, invoice.dueDate)}\n
\n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const {\n data: { invoice }\n } = props;\n\n const onSelectLine = () => {\n invoice.isSelected = !invoice.isSelected;\n props.onChange();\n };\n\n let rowCells: JSX.Element;\n if (props.isMobile) {\n rowCells = getMobileRowCells(props, onSelectLine);\n } else {\n rowCells = getDesktopRowCells(props, onSelectLine);\n }\n\n return {rowCells};\n};\n\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableRowComponent\n>('InvoicesTableRowComponent', { component: InvoicesTableRow });\n","/*--------------------------------------------------------------\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 } 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 { 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\nexport * from './invoice-data';\nexport * from './invoice-status';\nexport * from './pay-invoices';\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 { 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 { 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 { 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 { 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"],"sourceRoot":""}