{"version":3,"sources":["webpack:///src/modules/invoices-list/index.ts?0857","webpack:///src/modules/tab-item/tab-item.view.tsx?76f0","webpack:///src/modules/invoices-list/components/request-invoice-button.tsx?b5d9","webpack:///src/modules/iframe/iframe.tsx?d14a","webpack:///src/index.ts?c6ae","webpack:///src/modules/invoice-details/invoice-details.view.tsx?5ebe","webpack:///src/modules/footer-category/footer-category.tsx?b7b8","webpack:///src/modules/invoices-list/components/pay-invoice-component.tsx?41f4","webpack:///src/modules/adventureworks/views/components/promocode.component.tsx?6e07","webpack:///src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9105","webpack:///src/modules/fabrikam/views/navigation-menu.view.tsx?5991","webpack:///src/modules/subscribe/subscribe.view.tsx?c40a","webpack:///src/modules/adventureworks/views/components/navigation-menu-utilities.tsx?9734","webpack:///src/modules/adventureworks/views/components/navigation-menu-root-disabled.tsx?8952","webpack:///src/modules/adventureworks/views/components/navigation-menu-root-enabled.tsx?083d","webpack:///src/modules/adventureworks/views/navigation-menu.view.tsx?c096","webpack:///src/modules/fabrikam/views/search-result-container.view.tsx?f8ea","webpack:///src/modules/iframe/iframe.view.tsx?dd86","webpack:///src/modules/invoices-list/invoices-list.view.tsx?0243","webpack:///src/modules/tab/tab.tsx?d713","webpack:///src/modules/invoices-list/components/make-payment-component.tsx?c79a","webpack:///src/modules/invoices-list/components/invoice-error-component.tsx?2e12","webpack:///src/modules/footer-category/footer-category.view.tsx?26a5","webpack:///src/modules/subscribe/subscribe.tsx?0278","webpack:///src/modules/invoices-list/helpers/pay-invoices.ts?f98a","webpack:///src/modules/tab-item/tab-item.tsx?d2c1","webpack:///src/modules/navigation-menu/navigation-menu.data.ts?a9f0","webpack:///src/modules/navigation-menu/navigation-menu.tsx?390c","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/tab/tab.view.tsx?701e","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?ba14","webpack:///src/modules/invoices-list/helpers/invoice-data.ts?6271","webpack:///src/modules/invoices-list/helpers/invoice-status.ts?442a","webpack:///src/modules/tile-list-item/tile-list-item.view.tsx?0144","webpack:///src/modules/invoices-list/helpers/index.ts?7d24","webpack:///src/modules/invoices-list/components/invoices-filter-component.tsx?759c","webpack:///src/modules/navigation-menu/navigation-menu.view.tsx?df40","webpack:///src/modules/tile-list-item/components/links.tsx?e54f","webpack:///src/modules/tile-list-item/tile-list-item.tsx?99bb","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":["_renderTabItemContent","items","React","length","map","item","index","key","TabItemView","props","tabItemType","tabSlots","TabContentContainer","TabHeaderContainer","TabItemContent","tabHeader","TabItemType","TabContent","Module","Object","Node","tabItemContent","TabHeader","RequestInvoiceButton","className","onClicked","requestInvoiceButtonLabel","innerReference","Button","onClick","innerRef","Iframe","constructor","super","this","iframeRef","render","config","resources","isConsentGiven","context","request","cookies","target","destinationUrl","srcURL","URL","error","telemetry","exception","protocol","toLocaleLowerCase","iframeClassName","classnames","viewProps","Heading","_createHeading","heading","IframeContainer","moduleProps","IFrame","_createIframe","cookieConsentAccepted","alert","_renderAlert","cookieConsentRequiredMessage","renderView","text","message","role","targetURL","src","height","iframeAriaLabel","ref","InvoiceDetailsView","header","products","paymentDetails","payInvoiceError","FooterCategory","slots","content","viewprops","categories","FooterList","tag","FooterListItem","PayInvoiceComponentActions","async","_event","setDisabled","payInvoices","data","invoice","actionContext","errorState","onError","reference","onClickHandler","event","PayInvoiceComponent","msdyn365Commerce","createComponent","component","disabled","useState","payInvoiceButtonAriaLabel","canBePaid","payInvoiceButtonText","PromoCode","_onInputChangeHandler","value","state","setState","promoCodeInputValue","canApply","_applyPromotion","cartState","appliedPromo","addPromoCode","promoCode","then","result","status","substatus","duplicatePromoCodeErrorText","invalidPromoCodeErrorText","catch","failedToAddPromoCodeErrorText","_onSubmitHandler","preventDefault","applyPromotionHandler","_renderForm","promoPlaceholderText","promoCodeApplyButtonText","attributes","getTelemetryAttributes","telemetryContent","payLoad","onSubmit","onChange","placeholder","title","_removePromotion","code","currentTarget","getAttribute","removePromoCodes","promoCodes","failedToRemovePromoCodeErrorText","_renderAppliedPromoCode","cart","Coupons","ArrayExtensions","hasElements","removePromotionHandler","coupon","ariaLabel","removePromoAriaLabelFormat","format","removePromoText","Code","getPayloadObject","TelemetryConstant","ApplyPromoCode","promoCodeHeadingText","isMobileView","viewport","device","Type","window","innerWidth","gridSettings","xs","w","sm","md","lg","getViewport","onSelectAllHandler","isSelected","invoices","forEach","InvoicesTableComponent","isMobile","setIsMobile","updateViewport","undefined","addEventListener","rowClassName","headerClassName","InvoicesTableHeaderComponent","typeName","id","isSelectedAll","all","isAdmin","customer","IsB2bAdmin","onSelectAll","InvoicesTableRowComponent","invoiceReferences","invoiceButtonReferences","Number","payInvoiceReferences","payInvoiceButtonReferences","onRequestInvoice","NavigationMenuView","currentLevel","_positionInSetOffset","escapeKey","_updateCategoryImage","categoryImageSrc","option","linkText","promotionalImage","altText","promotionalContent","image","imageSrc","promotionalItemImageSettings","imageSettings","push","additionalProperties","linkUrl","categoryImage","categoryImageAltText","_handleDropdownToggle","parentId","activeMenu","parentMenu","showCategoryImage","imageSource","_resetFocus","setTimeout","menuNode","current","focus","_handleClickOutside","contains","_handleFocusOutside","relatedTarget","_closeSubmenu","_escFunction","keyCode","navDrawerList","Array","from","childNodes","navDrawerButton","firstChild","_getCategoryImage","categoryImageUrl","generateImageUrl","requestContext","apiSettings","defaultImageSettings","viewports","q","h","lazyload","ImageData","Image","categoryImageSettings","loadFailureBehavior","_onDrawerChange","drawerState","drawerKeyValue","newPair","buttonText","isOpen","bind","getTelemetryObject","telemetryPageName","friendlyName","componentDidMount","MsDyn365","isBrowser","document","body","componentWillUnmount","removeEventListener","_renderMobileMenu","_renderDesktopMenu","menuItemData","Navigation","menuItem","posinset","_renderDrawerMenu","MenuList","tabIndex","_renderDisplay","setSize","subMenu","_renderDrawer","_renderLinkMenuItem","toggleButtonText","keyValue","keys","isDrawerOpen","colProps","Drawer","toggleButtonProps","openGlyph","onToggle","collapseProps","closeGlyph","glyphPlacement","_renderLinkText","menuSubItem","currentPos","_renderDrawerLink","linkURL","_renderSpanMenuItem","ListItem","menuItemList","menuItemDatum","_getFromSubMenu","_createMenuItemList","subMenus","i","found","_renderSubMenu","_renderButtonMenuItem","IsSubMenu","enableMultiSupportMenu","enableMultilevelMenu","multiLevelSupportedMenu","menuLevelSupport","levelClassName","menuOptions","idx","hasOptions","haveSubmenu","Math","round","toString","_renderMenu","onFocus","hoverEffect","isParent","Link","imagesource","contentAction","etext","shouldOpenNewTab","onMouseOver","href","onTelemetryClick","_renderPromotionalLink","Span","level","currentItem","submenu","DivContainer","ImageDivContainer","showPromotionalContent","categoryImageDisplay","promotionalContentDisplay","DivContainerClass","subscribeView","subscribe","subscribeContainer","subscribeForm","emailInput","submitButton","submitButtonLabelText","NavMenuConstants","getCategoryImage","alttext","navProps","imageData","Msdyn365","NavigationMenuRootDisabled","supportedLevel","four","zero","_toggleNavBar","previousState","isNavOpen","_bindDesktopCategoryClick","menuId","categoryImageSource","isOnlyMobile","isBackTrack","mobileViewLabelText","_handleGoBack","_shouldAddFocusMenuRef","optionLinkText","_closeNavMenu","_customUpdateViewport","menuItemRef","variant","VariantType","Browser","customResizeThrottledEventHandler","addThrottledEvent","componentDidUpdate","children","hamburgerAriaLabel","_renderCollapseMenu","Collapse","MobileBackButton","MobileDescriptionContainer","MobileDescriptionLabel","StringExtensions","isNullOrWhitespace","entries","parentMenuId","menu","one","subMenuArray","isSubMenu","rootMenu","filter","subMenuItem","MenuTypeIndexId","Retail","isEnableMultiSupportMenu","three","getMenuItem","isHavingSubmenu","two","_renderSubMenuDrawer","_renderLinkMenuItemLevelOne","timeout","isHoverEffect","isSubmenu","isCategoryImageDisplay","isPromotionalContentDisplay","divContainerClass","menuLevelSupportClassName","categoryImages","imagesContainerKey","join","__decorate","computed","NavigationMenuRootEnabled","_addShopAllLink","shopAllObject","assign","allCategoryMenuText","menuSource","MenuSource","unshift","cmsMenuData","retailMenuItemData","retailMenuData","JSON","parse","stringify","navigationMenuView","enabletopMenu","createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","modal","modalHeader","createModalBody","modalFooter","modalBody","renderSort","renderRefiner","refiners","RefineMenuContainer","RefinerSectionContainer","SortingContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","category","renderTitle","TitleContainer","titlePrefix","titleText","titleCount","SearchResultContainerView","SearchResultContainer","pagination","ProductsContainer","ProductSectionContainer","choiceSummary","modalToggle","searchResultModal","TitleViewProps","categoryHierarchy","sortByOptions","CategoryNavContainer","RefineAndProductSectionContainer","errorMessage","FeatureSearchContainer","similarLookProduct","query","recommendation","IFrameView","InvoiceListView","invoiceRequestModal","Tab","tabIndexQuery","handleHeadingChange","_refHandler","link","activeLink","_onClick","e","activeTabState","activeContentIndex","tabId","update","createTabStateInput","currentTabIndex","newUrl","_setGetParameter","String","history","pushState","path","_onKeyDown","slotLength","tabItems","defaultTabIndex","initialIndex","queryString","activeTab","queryTabIndex","indexOf","arr","split","parseInt","_getTabHeader","_getTabContent","shouldComponentUpdate","nextProps","nextState","headingComponent","editProps","onEdit","tabViewProps","TabContainer","headerSection","tabsSection","tabItemContainer","tabContents","tabHeaders","dataActionTabId","selected","contentID","getContentID","onKeyDown","itemIndex","paramName","paramValue","url","location","requestUrl","params","URLSearchParams","search","set","decodeURIComponent","observer","MakePaymentComponentActions","buttonReferences","input","MakePaymentComponent","hasInvoices","makePaymentButtonAriaLabel","makePaymentButtonText","InvoiceErrorComponent","messageHeader","otherError","showError","payInvoiceErrorModalOpen","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","cartUrl","setPayInvoiceErrorModalClose","errorMessages","Alert","color","assertive","Modal","toggle","ModalHeader","ModalBody","ModalFooter","FooterCategoryView","Subscribe","handleTextChange","handleParagraphChange","paragraph","_emailAddressInputRef","subscribeParagraph","subscribeHeading","handleText","subscribeFormAriaLabel","name","autoComplete","type","subscribeFormEmailAriaLabel","subscribeEmailPlaceholderText","subscribeFormSubmitAriaLabel","subscribeButtonLabel","invoicesToAdd","errorReason","failureReason","getCartState","addInvoicesToCart","invoiceIds","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","getUrlSync","TabItem","moduleContentClassName","moduleHeaderClassName","_renderTabHeader","activeContentIDResult","shown","tabItemTitle","NavigationMenu","isRetail","isCMS","_setNavigationSource","sourceType","_updateViewport","navigationMenuSource","locale","nameTranslations","nameTranslation","find","Language","toLowerCase","Text","resizeThrottledEventHandler","_mapData","isEmptyOrNullObject","xl","displayCategoryImage","displayPromotionalImage","ImageContainer","backButtonAriaLabel","mergedData","_constructMenuItemData","cmsNavItems","_constructTopMenuItemData","mergedRootMenuData","topMenu","rootMenuNavigation","retailItem","cmsItem","addedAllMenu","categoryPromotionalContent","cmsItemText","menuAriaLabel","promotionalData","promoItem","categoryName","Name","Images","Uri","RSItemIdInit","getFriendlyName","NameTranslations","Url","_getNestedChildren","CMSItemIdInit","imageDestinationURL","imageLink","_getCMSNestedChildren","Cms","openInNewTab","imageSourceUrl","nestedChildren","Children","getCategoryUrl","_getViewport","observable","InvoiceDetailsHeaderComponent","invoiceDetails","invoiceNumberText","invoiceIdLabel","replace","invoiceOrderItemsText","lines","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","date","cultureFormatter","formatDate","year","month","day","formatShortDate","invoiceDate","dueDate","formatLongDate","dueDateText","invoicePaymentDueDateText","invoicePlacedByLabel","customerName","invoiceAmountDueText","amount","amountDue","currencyCode","formatCurrency","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","ObjectExtensions","isNullOrUndefined","totalDiscount","label","invoicePaymentDiscounts","subtotal","invoicePaymentSubtotal","totalCharges","invoicePaymentCharges","totalTax","invoicePaymentTax","totalAmount","invoicePaymentInvoiceTotal","line","formatAmount","InvoiceDetailsProductsComponent","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","product","quantity","Quantity","productUrl","ProductName","RecordId","getProductPageUrlSync","cropFocalRegion","fallbackImage","getFallbackImageUrl","ItemId","primaryImageUrl","fallBackSrc","_renderProductImage","ColorName","invoiceProductColor","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","_renderProductDimensions","Price","invoiceQuantity","NetAmount","InvoiceDetailsModel","Id","InvoiceDate","Date","CustomerName","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","SalesInvoiceLine","PrimaryImageUrl","TotalDiscount","InvoiceSubtotal","TotalCharges","TotalTaxAmount","TotalAmount","CurrencyCode","InvoicePaidStatus","Paid","InvoiceDetails","_onAddToCartFailed","_setPayInvoiceErrorModalClose","_getProducts","ChannelId","invoiceDetailsModel","_renderHeader","_renderProducts","_renderPaymentDetails","_renderInvoiceErrors","_className","channelId","productInputs","ProductInput","getSimpleProductsAction","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","errorClassName","switchCheckedState","headerCells","invoiceListSelectAllRadioAriaLabelText","checked","invoicesText","invoiceDateMobileText","getMobileHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","getDesktopHeaderCells","tabView","onRequestSpecificInvoice","requestInvoiceButtonReference","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","getMobileRowCells","onSelectLine","getInvoiceDetailsPageUrlSync","invoiceRowArialabel","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","showActions","actionsContainerClassName","payInvoiceClassName","invoiceRequestButtonLabel","extraActionsPopup","rowCells","isCurrentUser","AccountNumber","customerAccountNumber","createRef","payInvoiceButtonReference","invoiceCurrentUser","getDesktopRowCells","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","Unpaid","invoiceStatusUnpaid","PartiallyPaid","invoiceStatusPartiallyPaid","invoiceStatusPaid","TileListItemViewComponent","tileListItem","backgroundImage","links","thumbnailImage","tileListContainer","tileListImageContainer","tileListThumbnailImageContainer","tileListHeadingContainer","renderTileListItemContent","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","Error","onStateClick","InvoicesFilterComponent","popoverRef","popoverState","setPopoverState","togglePopover","useCallback","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","Popover","placement","EnumExtensions","getEnumValues","stateStringRepresentation","renderFilterStateItem","TileListLinks","_mapEditableLinks","linkdata","editableLinks","editableLink","onTextChange","TileListItem","_telemetryContent","handleLinkTextChange","linkIndex","redirectionUrl","tileListLinks","tileListLinkContainer","_createParagraph","_renderBackgroundImage","_renderThumbnailImage","isAriaHiddenAttribute","verifiedImageSettings","moduleType","imagePropertyName","itemImageSettings","layout","msdyn365__moduleLayout","onSubmitRequestClick","selectedInvoiceIndex","onClosing","filteredInvoices","onSubmitRequest","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","onInvoiceSelect","onInvoiceSelectHandler","radioButtonId","htmlFor","RequestInvoiceModal","email","isModalOpen","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","searchEntered","updatedInvoices","isNullOrEmpty","includes","searchEnteredHandler","searchResultString","invoicesFoundReplaceIndex","horizontalPosition","verticalPosition","autoFocus","fade","onOpened","selectedInvoices","setFilteredInvoicesToSelectedInvoices","requestInvoiceDialogAriaLabel","substring","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isLoading","isPageLoaded","isInvoiceRequestModalOpen","channel","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","OpenInvoiceBalance","amountText","toFixed","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","_renderInvoiceRequestModal","_renderInvoicesFilter","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","callerContext","BusinessPartnerId","getCustomer","GetCustomerInput","CustomerId","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","tableClassName","newErrorState","errorHost","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","_getSelectedInvoices","moduleId","moduleTypeName","navigationUrl","invoiceErrorMessageHeader","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","Email","invoiceId","b2bUserId","b2bUserInformation","B2BUserId","BusinessPartnerUsersDataActions","requestInvoiceCopyAsync","BusinessPartnerOperationDeliveryType","specificInvoice","OrderTemplateListViewComponent","OrderTemplateList","OrderTemplates","OrderTemplate","statusMessage","orderTemplates","createOrderTemplateButton","templateHeaderStatusMessage","headingForEmptyOrderTemplateList","textForEmptyOrderTemplateList","orderTemplate","orderTemplateNodeProps","addToCartButton","orderTemplateImage","orderTemplateStatusMessage","removeButton","orderTemplateName","orderTemplateImageElement","currentImageListLength","renderOrderTemplate"],"mappings":"6FAKA,iL,6FCKA,MAuBMA,EAAyBC,GAEvBC,gCACKD,GAASA,EAAME,OAAS,EACrBF,EAAMG,IAAI,CAACC,EAAuBC,IAE1BJ,gBAACA,WAAc,CAACK,IAAKD,GAChBD,IAIb,MAIDG,UAtCkCC,IAC7C,MAAM,YAAEC,EAAF,SAAeC,EAAf,oBAAyBC,EAAzB,mBAA8CC,EAA9C,eAAkEC,EAAlE,UAAkFC,GAAcN,EAEtG,OAAQC,GACJ,KAAKM,cAAYC,WACb,OACIf,gBAACgB,SAAMC,iBAAKP,GACRV,gBAACkB,OAAID,iBAAKL,GACLH,GAAYA,EAASU,gBAAkBV,EAASU,eAAelB,QAAWH,EAAsBW,EAASU,kBAI1H,KAAKL,cAAYM,UACb,OACIpB,gBAACgB,SAAMC,iBAAKN,GACPE,GAGb,QACI,OAAO,Q,oCCxBnB,8DAWO,MAAMQ,EAA6D,IAAwE,IAAvE,UAAEC,EAAF,UAAaC,EA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,EAA5C,aAAwEC,EAAxE,kBAAsFC,GAAsBN,EAE5GO,EAAiDJ,EACjDK,EAAyBD,EAA0BtjC,MAAMsY,SAAS5Y,OAGxE,GAAI6jC,EAF8B,EAG9B,IAAK,IAAI1jC,EAAQ,EAAGA,EAHU,EAG0B0jC,EAAwB1jC,IAC5EyjC,EAA0BtjC,MAAMsY,SAAShL,KAAK7N,iCAItD,OACIA,gBAACkB,OAAID,eAACZ,IAAKA,EAAKiB,UAAWiiC,EAAwBjiC,WAAeiiC,GAC7DK,EACAH,EACAD,EACAG,EACAD,IA6CkBK,CAAoBT,EAAeP,OAOnDH","file":"static/js/7.4b5b2df725a8109f03e6.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITabItemViewProps, TabItemType } from './tab-item';\n\nconst TabItemView: React.FC = props => {\n const { tabItemType, tabSlots, TabContentContainer, TabHeaderContainer, TabItemContent, tabHeader } = props;\n\n switch (tabItemType) {\n case TabItemType.TabContent:\n return (\n \n \n {tabSlots && tabSlots.tabItemContent && tabSlots.tabItemContent.length && (_renderTabItemContent(tabSlots.tabItemContent))}\n \n \n );\n case TabItemType.TabHeader:\n return (\n \n {tabHeader}\n \n );\n default:\n return null;\n }\n};\n\nconst _renderTabItemContent = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {items && items.length > 0 ? (\n items.map((item: React.ReactNode, index: number) => {\n return (\n \n {item}\n \n );\n })\n ) : null}\n \n );\n};\nexport default TabItemView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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}\n\nexport const RequestInvoiceButton: React.FC = ({ className, onClicked, requestInvoiceButtonLabel, innerReference }) => {\n return (\n \n );\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IHeadingData, IIframeConfig, IIframeProps } from './iframe.props.autogenerated';\n\nexport interface IIframeViewProps extends IIframeProps {\n Heading: React.ReactNode;\n IframeContainer: IModuleProps;\n IFrame: React.ReactNode;\n alert?: React.ReactNode;\n cookieConsentAccepted?: boolean;\n}\n\n/**\n *\n * Iframe component.\n * @extends {React.PureComponent}\n */\nclass Iframe extends React.PureComponent> {\n private readonly iframeRef: React.RefObject;\n\n constructor(props: IIframeProps) {\n super(props);\n this.iframeRef = React.createRef();\n }\n\n public render(): JSX.Element | null {\n const { config, resources } = this.props;\n const isConsentGiven =\n this.props.context.request &&\n this.props.context.request.cookies &&\n this.props.context.request.cookies.isConsentGiven &&\n this.props.context.request.cookies.isConsentGiven();\n\n if (!(config && config.target && config.target.destinationUrl)) {\n return null;\n }\n\n let srcURL;\n try {\n srcURL = new URL(config.target.destinationUrl);\n } catch (error) {\n this.props.telemetry.exception(error);\n return null;\n }\n\n if (srcURL && srcURL.protocol && srcURL.protocol.toLocaleLowerCase() !== 'https:') {\n return null;\n }\n const iframeClassName = classnames('ms-iframe', config.className);\n\n let viewProps: IIframeViewProps = {\n ...(this.props as IIframeProps),\n Heading: this._createHeading(config.heading!),\n IframeContainer: {\n moduleProps: this.props,\n className: iframeClassName\n },\n IFrame: this._createIframe()\n };\n\n if (!isConsentGiven) {\n viewProps = {\n ...viewProps,\n alert: this._renderAlert(resources.cookieConsentRequiredMessage)\n };\n } else {\n viewProps = {\n ...viewProps,\n cookieConsentAccepted: true\n };\n }\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _createHeading(heading: IHeadingData): React.ReactNode | null {\n if (!heading || !heading.text || heading.text.length === 0) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _renderAlert(message: string): React.ReactNode | null {\n return (\n

\n {message}\n

);\n }\n\n private _createIframe(): React.ReactNode | null {\n const { config } = this.props;\n const targetURL = config.target.destinationUrl;\n\n return (\n\n \n );\n }\n\n}\n\nexport default Iframe;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IActiveTabState } from './data-actions/tab-state';\nimport { createTabStateInput } from './data-actions/tab-state-data-action';\nimport tab from './modules/tab/tab';\nimport tabView from './modules/tab/tab.view';\nimport { getContentID, TabItemType } from './modules/tab-item/tab-item';\n\nexport * from './modules/tab/tab';\nexport * from './modules/tab/tab.view';\nexport {\n createTabStateInput,\n getContentID,\n IActiveTabState,\n tab,\n TabItemType,\n tabView };\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\ninterface IPayInvoiceComponent extends IComponent {\n}\n\nconst onClick = async (_event: React.MouseEvent, props: IPayInvoiceProps, setDisabled: (disabled: boolean) => void): 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,\n setDisabled: React.Dispatch>) => async (event: React.MouseEvent) => {\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IComponent, IComponentProps } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { Coupon } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format, getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\n/**\n * IPromoCodeProps: Interface for promo code component.\n */\nexport interface IPromoCodeProps extends IComponentProps<{}> {\n cart: ICartState | undefined;\n promoCodeHeadingText: string;\n appliedPromoCodeHeadingText: string;\n removePromoAriaLabelFormat: string;\n promoPlaceholderText: string;\n promoCodeApplyButtonText: string;\n collapseTimeOut: number;\n removePromoText: string;\n invalidPromoCodeErrorText: string;\n failedToAddPromoCodeErrorText: string;\n duplicatePromoCodeErrorText: string;\n failedToRemovePromoCodeErrorText: string;\n\n /** The telemetry content. */\n telemetryContent?: ITelemetryContent;\n promoCodeApplyCallback?(): void;\n}\n\n/**\n * IPromoCodeProps: Interface for promo code component.\n */\nexport interface IPromoCodeComponent extends IComponent { }\n\n/**\n * IPromoCodeProps: Interface for promo code state.\n */\ninterface IPromoCodeState {\n promoCodeInputValue: string;\n error: string;\n canApply: boolean;\n}\n\n/**\n *\n * The PromoCode component renders the promocode section.\n * @extends {React.PureComponent}\n */\nclass PromoCode extends React.PureComponent {\n\n private readonly payLoad: IPayLoad;\n\n public constructor(props: IPromoCodeProps) {\n super(props);\n this.payLoad = getPayloadObject('click', this.props.telemetryContent!, TelemetryConstant.ApplyPromoCode);\n this.state = {\n promoCodeInputValue: '',\n error: '',\n canApply: false\n };\n }\n\n public render(): JSX.Element {\n return (\n
\n
\n {this.props.promoCodeHeadingText}\n
\n {this._renderForm(this.props.promoPlaceholderText, this.props.promoCodeApplyButtonText, this.props.cart)}\n

\n {this.state.error}\n

\n {this._renderAppliedPromoCode(this.props)}\n
\n );\n }\n\n /**\n * On input change method.\n * @param event - Change event.\n */\n private readonly _onInputChangeHandler = (event: React.ChangeEvent) => {\n const error = event.target.value === '' ? '' : this.state.error;\n this.setState({\n promoCodeInputValue: event.target.value, error,\n canApply: !!event.target.value\n });\n };\n\n /**\n * Apply promo code method.\n * @param cartState - Cart state interface.\n */\n private readonly _applyPromotion = (cartState: ICartState | undefined) => {\n if (!cartState) {\n return;\n }\n const appliedPromo = this.state.promoCodeInputValue;\n\n cartState.addPromoCode({ promoCode: appliedPromo })\n .then(result => {\n if (result.status === 'SUCCESS') {\n // Show success text\n this.setState({ promoCodeInputValue: '', error: '', canApply: false });\n } else if (result.substatus === 'ALREADYADDED') {\n this.setState({ error: this.props.duplicatePromoCodeErrorText });\n } else {\n this.setState({ error: this.props.invalidPromoCodeErrorText });\n }\n })\n .catch(() => {\n this.setState({ error: this.props.failedToAddPromoCodeErrorText });\n });\n };\n\n /**\n * On submit action.\n * @param cartState - Cart state.\n * @returns Apply promotion.\n */\n private readonly _onSubmitHandler = (cartState: ICartState | undefined) => (event: React.FormEvent) => {\n event.preventDefault();\n this._applyPromotion(cartState);\n };\n\n /**\n * On apply promotion.\n * @param cartState - Cart state.\n * @returns Apply promotion.\n */\n private readonly applyPromotionHandler = (cartState: ICartState | undefined) => () => {\n this._applyPromotion(cartState);\n };\n\n /**\n * Renders promo code form.\n * @param promoPlaceholderText - Promo code input box placeholder string.\n * @param promoCodeApplyButtonText - Promo code button text string.\n * @param cartState - Cart state interface.\n * @returns Promo code form.\n */\n private readonly _renderForm = (promoPlaceholderText: string, promoCodeApplyButtonText: string, cartState: ICartState | undefined) => {\n\n const attributes = getTelemetryAttributes(this.props.telemetryContent!, this.payLoad);\n\n return (\n
\n
\n \n \n
\n
\n );\n };\n\n /**\n * Remove promo code method.\n * @param cartState - Cart state interface.\n * @param event - Mouse event.\n */\n private readonly _removePromotion = (cartState: ICartState | undefined, event: React.MouseEvent) => {\n if (!cartState) {\n return;\n }\n const code = event.currentTarget.getAttribute('data-value') ?? '';\n cartState.removePromoCodes({\n promoCodes: [code]\n })\n .then(result => {\n if (result.status === 'SUCCESS') {\n this.setState({ error: '' });\n }\n })\n .catch(() => {\n this.setState({ error: this.props.failedToRemovePromoCodeErrorText });\n });\n\n };\n\n /**\n * Renders applied promo code form.\n * @param props - Promo code component props.\n * @returns Applied promo code.\n */\n private readonly _renderAppliedPromoCode = (props: IPromoCodeProps) => {\n if (!props.cart || !props.cart.cart.Coupons || !ArrayExtensions.hasElements(props.cart.cart.Coupons)) {\n return;\n }\n\n /**\n * On remove promotion action.\n * @param event - Mouse event.\n */\n const removePromotionHandler = (event: React.MouseEvent) => {\n this._removePromotion(props.cart, event);\n };\n\n return (\n <>\n {\n props.cart.cart.Coupons.map((coupon: Coupon) => {\n const ariaLabel = props.removePromoAriaLabelFormat ? format(props.removePromoAriaLabelFormat, props.removePromoText, coupon.Code) : '';\n\n return (\n
\n
\n {'Code '}\n \n {coupon.Code}\n \n {'Applied '}\n\n
\n \n
\n );\n })\n }\n \n );\n };\n}\n\nexport default PromoCode;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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}\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}\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\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 {\n props.data.invoices.map((invoice, index: number) => {\n return (\n \n );\n })\n }\n
\n );\n};\n\n// @ts-expect-error\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableComponent',\n { component: InvoicesTable }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IDictionary, IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { IMenuItemData, INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Drawer,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IDrawerState,\n IPayLoad,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\ninterface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: IImageData[] | null;\n categoryImageAltText: string;\n drawerKeyValue: IDictionary;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuView extends React.PureComponent {\n private currentLevel: number = 0;\n\n private readonly _positionInSetOffset: number = 1;\n\n private readonly escapeKey: number = 27;\n\n private readonly menuNode: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: INavigationMenuViewProps) {\n super(props);\n this.menuNode = React.createRef();\n this.state = { activeMenu: undefined, parentMenu: undefined, categoryImageAltText: '', drawerKeyValue: {} };\n this._closeSubmenu = this._closeSubmenu.bind(this);\n this._escFunction = this._escFunction.bind(this);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n document.body.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n document.body.addEventListener('mousedown', this._handleClickOutside);\n document.body.addEventListener('focusout', this._handleFocusOutside);\n }\n\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n document.removeEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\n }\n }\n\n public render(): JSX.Element | null {\n const { isMobileView } = this.props;\n\n this.currentLevel = 1;\n return (\n <>\n {isMobileView ? this._renderMobileMenu() : this._renderDesktopMenu()}\n \n );\n }\n\n /**\n * Method to render mobile menu.\n * @returns Jsx element.\n */\n private _renderMobileMenu(): JSX.Element {\n const { isMobileView, menuItemData, Navigation } = this.props;\n return (\n \n {menuItemData.map((menuItem: IMenuItemData, posinset: number) => {\n return this._renderDrawerMenu(menuItem, menuItemData.length, posinset + this._positionInSetOffset);\n })}\n \n );\n }\n\n /**\n * Method to render desktop menu.\n * @returns Jsx element.\n */\n private _renderDesktopMenu(): JSX.Element {\n const { MenuList, Navigation } = this.props;\n return (\n \n \n {this._renderDisplay()}\n \n \n );\n }\n\n /**\n * Method to render drawer menu.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerMenu(menuItem: IMenuItemData, setSize: number, posinset: number): JSX.Element | null {\n if (menuItem && menuItem.subMenu && ArrayExtensions.hasElements(menuItem.subMenu)) {\n return (this._renderDrawer(menuItem, setSize, posinset));\n }\n return (this._renderLinkMenuItem(menuItem, undefined, true, false, setSize, posinset));\n\n }\n\n /**\n * Method to render drawer component.\n * @param menuItem -Menuitem data.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawer(menuItem: IMenuItemData, setSize?: number, posinset?: number): JSX.Element | null {\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue !== undefined ? keyValue : {};\n const { isMobileView } = this.props;\n\n let isDrawerOpen = false;\n if (keys[buttonText]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { isOpen: isDrawerOpen };\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData, currentPos: number) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n return (this._renderDrawer(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset));\n }\n return this._renderDrawerLink(menuSubItem, menuItem.subMenu?.length, currentPos + this._positionInSetOffset);\n })}\n
\n \n );\n }\n\n /**\n * Method to render link.\n * @param linkText -Text on Menu link.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkText(linkText: string | undefined, setSize: number | undefined, posinset: number | undefined): JSX.Element {\n return (\n \n {linkText}\n \n );\n }\n\n /**\n * Method to render drawer link.\n * @param item -Single Menuitem.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderDrawerLink(item: IMenuItemData, setSize: number | undefined, posinset: number): JSX.Element | null {\n if (item && item.linkText && item.linkURL && item.linkURL.length > 0) {\n return (\n this._renderLinkMenuItem(item, undefined, true, false, setSize, posinset)\n );\n } else if (item && item.linkText && !item.linkURL) {\n return (\n this._renderSpanMenuItem(item)\n );\n }\n return null;\n }\n\n /**\n * Method to generate menu.\n * @returns Jsx element.\n */\n private _renderDisplay(): JSX.Element[] {\n const { ListItem, menuItemData, isMobileView } = this.props;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\n let menuItem: IMenuItemData = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n this.setState({ parentMenu: undefined });\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n menuItem && menuItemList.push(\n \n {' '}\n {this._createMenuItemList(menuItem)}\n {' '}\n \n );\n } else {\n menuItemData.forEach((item: IMenuItemData, index: number) => {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n });\n }\n\n return menuItemList;\n }\n\n /**\n * Method to get data for submenu.\n * @param item -Single Menuitem.\n * @returns IMenuItemData.\n */\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item && item.subMenu;\n if (subMenus && subMenus.length > 0) {\n for (let i = 0; i <= subMenus.length - 1; i++) {\n if (subMenus[i].id === this.state.activeMenu) {\n this.setState({ parentMenu: item?.id });\n return subMenus[i];\n }\n const found = this._getFromSubMenu(subMenus[i]);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n /**\n * Method to create item list.\n * @param menuItemData -Single Menuitem.\n * @returns Jsx element.\n */\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id));\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true));\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\n return (this._renderSpanMenuItem(menuItemData, menuItemData.id, true));\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\n const { isMobileView, ListItem } = this.props;\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\n const subMenuLevel = 3;\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || subMenuLevel;\n\n // Const isParentMenu:boolean= false;\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || subMenus.length === 0) {\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus && subMenus.map((option: IMenuItemData, idx: number) => {\n const hasOptions = (option.subMenu && option.subMenu.length > 0);\n let menuItem: JSX.Element | null;\n if (hasOptions && isMobileView) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\n } else {\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option)\n );\n }\n let subMenu;\n const haveSubmenu = hasOptions && enableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1);\n if (haveSubmenu) {\n this.currentLevel++;\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\n }\n return (\n \n { menuItem }\n { subMenu }\n \n );\n });\n return (this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu));\n }\n\n /**\n * Method to render button menu item.\n * @param option -Single Menuitem.\n * @param activeMenu -Active menu number.\n * @param index -Active menu index.\n * @returns Jsx element.\n */\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n const { Button } = this.props;\n return (\n \n { option.linkText }\n \n );\n }\n\n /**\n * Method to render link menu item.\n * @param option -Single Menuitem.\n * @param index -Active menu index.\n * @param hoverEffect -Active menu effect.\n * @param isParent -Is parent menu.\n * @param setSize -Setsize data.\n * @param posinset -Current position.\n * @returns Jsx element.\n */\n private _renderLinkMenuItem(option: IMenuItemData, index?: number, hoverEffect: boolean = true, isParent: boolean = false,\n setSize?: number, posinset?: number): JSX.Element | null {\n const { Link, isMobileView } = this.props;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText }\n \n );\n }\n\n /**\n * Method to render promotional link.\n * @param linkText -Link text.\n * @param linkUrl -Link url.\n * @returns Jsx element.\n */\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n { linkText }\n \n );\n }\n return null;\n\n }\n\n /**\n * Method to render span menu item.\n * @param option -Single Menu Item.\n * @param index -Index.\n * @param isParent -Is parent menu.\n * @returns Jsx element.\n */\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\n const { Span } = this.props;\n return (\n \n { option.linkText }\n \n );\n }\n\n /**\n * Method to render menu.\n * @param level -Menu level.\n * @param menuOptions -Menu lists.\n * @param currentItem -Menu current.\n * @param submenu -Mneu has submenu or not.\n * @returns Jsx element.\n */\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, isMobileView, showPromotionalContent } = this.props;\n const categoryImageDisplay = !isMobileView && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !submenu;\n const promotionalContentDisplay = !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = 1;\n return (\n \n 2 && 'navmenu-multi-level')}>\n { menuOptions }\n \n
\n {\n categoryImageDisplay && this.state.categoryImage && this.state.categoryImage.map(item => (\n \n { this.state.categoryImage && this._getCategoryImage(item) }\n { promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n ))\n }\n
\n
\n );\n }\n\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\n const linkText = option && option.linkText ? option.linkText : '';\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n option.promotionalContent.map(item => {\n if (item && item.image) {\n const imageSrc = item.image.src;\n const promotionalItemImageSettings = item.image.imageSettings;\n promotionalImage.push({ src: imageSrc, altText: item.text, imageSettings: promotionalItemImageSettings,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n }\n });\n }\n this.setState({\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\n categoryImageAltText: linkText\n });\n };\n\n /**\n * Method to handle dropdwon change.\n * @param data -Menuitem data.\n * @param parentId -Menu parent.\n * @returns Jsx element.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.props.isMobileView) {\n this.setState({\n activeMenu: (this.state.activeMenu && this.state.activeMenu === data.id!) ? undefined : data.id!,\n parentMenu: parentId\n });\n if (this.props.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n }\n\n this._resetFocus();\n };\n\n /**\n * Method to call when focus lost from menu.\n */\n private readonly _resetFocus = () => {\n if (this.props.isMobileView) {\n setTimeout(() => {\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\n }, 0);\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n this.setState(\n {\n activeMenu: undefined,\n categoryImage: null\n }\n );\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleFocusOutside = (event: FocusEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\n this._closeSubmenu();\n }\n };\n\n /**\n * Method to handle close submenu event.\n */\n private _closeSubmenu(): void {\n if (!this.props.isMobileView) {\n this.setState({ activeMenu: undefined });\n }\n }\n\n /**\n * Method to handle escape key event.\n * @param event -HTML event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n\n if (event.keyCode === this.escapeKey) {\n if (!this.props.isMobileView) {\n const navDrawerList = Array.from(this.menuNode.current!.childNodes);\n for (const item of navDrawerList) {\n const navDrawerButton = item.firstChild as HTMLButtonElement;\n if (navDrawerButton.getAttribute('aria-expanded') === 'true') {\n navDrawerButton.focus();\n }\n }\n }\n this._closeSubmenu();\n }\n };\n\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\n\n if (!categoryImage || !categoryImage.src) {\n return null;\n }\n\n const categoryImageUrl = generateImageUrl(categoryImage.src, this.props.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n const ImageData: IImageData = { src: categoryImageUrl };\n return (\n \n );\n }\n return null;\n };\n\n /**\n * Method to handle escape key event.\n * @param drawerState -HTML event.\n */\n private readonly _onDrawerChange = (drawerState: IDrawerState) => {\n const { drawerKeyValue } = this.state;\n const drawerText: string = drawerState.buttonText !== undefined ? drawerState.buttonText : '';\n const newPair = { [drawerText]: drawerState.isOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n}\n\nexport default NavigationMenuView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISubscribeViewProps } from './subscribe';\n\n/**\n * Override form action and button action below.\n * @param event - The form event.\n */\nconst onSubmit = (event: React.FormEvent): void => {\n event.preventDefault();\n};\n\n/**\n * View component.\n * @param props - The view properties.\n * @returns - Returns nothing.\n */\nexport const subscribeView: React.FC = props => {\n const { subscribe, subscribeContainer, heading, text, subscribeForm, emailInput, submitButton } = props;\n return (\n \n \n {heading}\n {text}\n \n \n \n {props.submitButtonLabelText}\n \n \n \n \n );\n};\n\nexport default subscribeView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport { generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../../definition-extensions/navigation-menu.ext.props.autogenerated';\n\n/**\n * INavigationMenuViewRootProps.\n */\nexport interface INavigationMenuViewRootProps {\n navProps: INavigationMenuViewProps & INavigationMenuProps<{}>;\n}\n\n/**\n * Represent navigation menu state interface.\n */\nexport interface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: Msdyn365.IImageData[] | null;\n mobileViewLabelText?: string;\n drawerKeyValue: Msdyn365.IDictionary;\n isOnlyMobile: boolean;\n isNavOpen: boolean;\n}\n\n/**\n * NavMenuConstants enum.\n */\nexport enum NavMenuConstants {\n zero = 0,\n one = 1,\n two = 2,\n three = 3,\n four = 4,\n escapeKey = 27,\n rootMenu = 1\n}\n\n/**\n * GridSizes.\n */\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\n/**\n * Get category image.\n * @param props - Navigation menu props.\n * @param categoryImage - Category Image.\n * @param alttext - AltText String.\n * @returns Returns Node.\n */\nexport const getCategoryImage = (props: INavigationMenuViewRootProps, categoryImage: string, alttext: string): React.ReactNode | null => {\n\n const categoryImageUrl = generateImageUrl(`${categoryImage}`, props.navProps.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n sm: { q: 'w=162&h=162&m=8', w: 0, h: 0 },\n md: { q: 'w=203&h=203&m=8', w: 0, h: 0 },\n lg: { q: 'w=203&h=203&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n const imageData: Msdyn365.IImageData = { src: categoryImageUrl };\n return (\n \n );\n }\n return null;\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IMenuItemData, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n addThrottledEvent,\n Button,\n Collapse, Drawer, getPayloadObject, getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IPayLoad,\n isMobile,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootDisabled component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuRootDisabled extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private readonly supportedLevel: number = NavMenuConstants.four;\n\n private currentLevel: number = NavMenuConstants.zero;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n private readonly payLoad: IPayLoad;\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n private customResizeThrottledEventHandler?: (event: Event) => void;\n\n public constructor(props: INavigationMenuViewRootProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n const { menuItemData } = this.props.navProps;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\n const imageSource = item.image.src;\n this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n return null;\n });\n }\n }\n\n this.state = {\n activeMenu: 1,\n mobileViewLabelText: '',\n parentMenu: undefined,\n drawerKeyValue: {},\n isOnlyMobile: this.isOnlyMobile,\n categoryImage: this.promotionalImage,\n isNavOpen: false\n };\n this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\n this.props.navProps.friendlyName,\n this.props.navProps.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n }\n\n @computed public get isOnlyMobile(): boolean {\n return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\n }\n\n public componentDidMount(): void {\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n this._customUpdateViewport();\n document.body.addEventListener('mousedown', this._handleClickOutside);\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n }\n\n public render(): JSX.Element | null {\n this.currentLevel = 1;\n const navbarKey = 'header-nav-mobile';\n return (\n \n {\n this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\n \n {this._renderCollapseMenu()}\n )\n }\n \n );\n }\n\n /**\n * Function to handle nav bar toggle.\n */\n private readonly _toggleNavBar = (): void => {\n this.setState(previousState => ({\n activeMenu: 1,\n isNavOpen: !previousState.isNavOpen\n }));\n };\n\n private _renderCollapseMenu(): JSX.Element | null {\n return (\n \n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n \n );\n }\n\n private _renderMobileMenu(): JSX.Element {\n const { MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n this.currentLevel = 1;\n return (\n \n \n {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\n \n \n \n {this.state.mobileViewLabelText}\n \n }\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDesktopMenu(): JSX.Element {\n const { MenuList, Navigation } = this.props.navProps;\n\n return (\n \n \n {this._renderDisplay()}\n
\n
\n
\n
\n );\n }\n\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n return (\n this._renderLinkMenuItem(item)\n );\n } else if (!item.linkURL) {\n return (\n this._renderSpanMenuItem(item)\n );\n }\n return null;\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem } = this.props.navProps;\n const menuItemData: IMenuItemData[] = this.props.navProps.menuItemData;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (ArrayExtensions.hasElements(menuItemData)) {\n menuItemData[0].id = 1;\n }\n\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n const menuItem = this._getFromSubMenu(undefined, menuItemData);\n\n if (menuItem) {\n menuItemList.push(\n \n {' '}\n {this._createMenuItemList(menuItem)}\n {' '}\n \n );\n }\n } else {\n\n for (const [index, item] of menuItemData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n
\n );\n }\n\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(parentMenuId?: number, menu?: IMenuItemData[]): IMenuItemData | null {\n if (!menu) {\n return null;\n }\n\n for (let index = 0; index <= menu.length - NavMenuConstants.one; index++) {\n const item: IMenuItemData = menu[Number(index)];\n\n if (item.id === this.state.activeMenu) {\n if (!NavigationMenuRootDisabled.isBackTrack) {\n this.setState({ parentMenu: parentMenuId });\n } else {\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: item.linkText });\n }\n return item;\n }\n const found = this._getFromSubMenu(item.id, item.subMenu);\n if (found) {\n return found;\n }\n }\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\n }\n\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\n } else if (!menuItemData.linkURL && !(this.state.isOnlyMobile && this.state.activeMenu !== undefined)) {\n return (this._renderSpanMenuItem(menuItemData));\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\n if (activeMenu === NavMenuConstants.rootMenu) {\n subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\n }\n\n const { ListItem } = this.props.navProps;\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\n let menuItem: JSX.Element | null;\n if (hasOptions && this.state.isOnlyMobile) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n menuItem = this.getMenuItem(option, index);\n } else {\n menuItem = null;\n }\n let subMenu;\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\n\n if (hasOptions && !this.state.isOnlyMobile) {\n\n if (this.currentLevel >= NavMenuConstants.two) {\n subMenu = this._renderSubMenuDrawer(option);\n } else if (this.currentLevel <= this.supportedLevel) {\n this.currentLevel++;\n levelClassName = `level-${this.currentLevel.toString()}`;\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n }\n }\n\n if (isHavingSubmenu && this.state.isOnlyMobile) {\n this.currentLevel++;\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n }\n const imagesource = option.imageSource ? option.imageSource : '';\n return (\n \n { menuItem}\n { subMenu}\n \n );\n });\n return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\n }\n\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n let menuItem: JSX.Element | null;\n if (this.currentLevel === NavMenuConstants.one) {\n menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\n } else {\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\n }\n return menuItem;\n }\n\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n const levelClassName = `level-${this.currentLevel.toString()}`;\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n let isDrawerOpen = false;\n if (keys[menuItem.id!]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n this.currentLevel++;\n if (this.currentLevel < multiLevelSupportedMenu) {\n return this._renderSubMenuDrawer(menuSubItem);\n }\n }\n return this._renderDrawerLink(menuSubItem);\n })}\n
\n \n );\n }\n\n /**\n * Method to handle escape key event.\n * @param menuId -Number.\n * @param isDrawerOpen -Boolean.\n * @returns Void.\n */\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n const { drawerKeyValue } = this.state;\n const newPair = { [menuId!]: !isDrawerOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props.navProps;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n { linkText}\n \n );\n }\n return null;\n\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Span } = this.props.navProps;\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n const isCategoryImageDisplay =\n !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\n const isPromotionalContentDisplay =\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = NavMenuConstants.one;\n const menuLevelSupportClassName = isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\n\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n return (\n \n \n {menuOptions}\n \n
\n {\n isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\n \n { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n ))\n }\n
\n
\n );\n }\n\n /**\n * Handle Category image update.\n * @param categoryImageSource - Image source.\n * @param option - Menu Item data.\n * @returns Returns empty.\n */\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n const linkText = option.linkText ? option.linkText : '';\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n for (const item of option.promotionalContent) {\n const imageSource = item.image.src;\n promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n }\n }\n this.setState({\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n });\n };\n\n /**\n * Handle dropdown toggle.\n * @param data - Menu Item data.\n * @param parentId - Number.\n * @returns Returns empty.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.state.isOnlyMobile) {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n if (this.props.navProps.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuRootDisabled.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n\n };\n\n /**\n * Handle back navigation for menu items for mobile view.\n * @returns Returns empty.\n */\n private readonly _handleGoBack = () => () => {\n NavigationMenuRootDisabled.isBackTrack = true;\n this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\n };\n\n /**\n * Function to close the nav menu on click on body.\n * @param event - MouseEvent.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current &&\n !this.menuNode.current.contains(event.target as Node)) {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Mobile view label text.\n * @param optionLinkText -Sub menu item link text.\n * @returns Boolean.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n const firstIndex: number = 0;\n if (!NavigationMenuRootDisabled.isBackTrack && index === firstIndex) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n /**\n * Function to handle nav menu close.\n */\n private readonly _closeNavMenu = (): void => {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Function to close the nav menu on esc key.\n * @param event - Event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n this.setState({ activeMenu: 1, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Custom update viewport.\n */\n private readonly _customUpdateViewport = (): void => {\n this.setState({ isOnlyMobile: this.isOnlyMobile });\n };\n}\n\nexport default NavigationMenuRootDisabled;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IMenuItemData, MenuSource, MenuTypeIndexId } from '@msdyn365-commerce-modules/navigation-menu';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n addThrottledEvent,\n Button,\n Collapse, Drawer, getPayloadObject, getTelemetryAttributes,\n getTelemetryObject,\n ICollapseProps,\n IPayLoad,\n isMobile,\n ITelemetryContent,\n Module,\n Node,\n onTelemetryClick,\n VariantType\n} from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed } from 'mobx';\nimport * as React from 'react';\n\nimport { getCategoryImage, INavigationMenuViewRootProps, INavigationState, NavMenuConstants } from './navigation-menu-utilities';\n\n/**\n *\n * NavigationMenuRootEnabled component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuRootEnabled extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private readonly supportedLevel: number = NavMenuConstants.four;\n\n private currentLevel: number = NavMenuConstants.zero;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly escapeKey: number = NavMenuConstants.escapeKey;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly promotionalImage: Msdyn365.IImageData[] = [];\n\n private menuItemData: IMenuItemData[] = [];\n\n private readonly payLoad: IPayLoad;\n\n private readonly attributes?: Msdyn365.IDictionary;\n\n private customResizeThrottledEventHandler?: (event: Event) => void;\n\n public constructor(props: INavigationMenuViewRootProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n const { menuItemData } = this.props.navProps;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n const imagesource = menuItemData[0].subMenu[0].imageSource ? menuItemData[0].subMenu[0].imageSource : '';\n const linkText = menuItemData[0].subMenu[0].linkText ? menuItemData[0].subMenu[0].linkText : '';\n this.promotionalImage = [{ src: imagesource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(menuItemData[0].subMenu[0].promotionalContent)) {\n menuItemData[0].subMenu[0].promotionalContent.map(item => {\n const imageSource = item.image.src;\n this.promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n return null;\n });\n }\n }\n this.state = {\n activeMenu: NavMenuConstants.rootMenu,\n mobileViewLabelText: '',\n parentMenu: undefined,\n drawerKeyValue: {},\n isOnlyMobile: this.isOnlyMobile,\n categoryImage: this.promotionalImage,\n isNavOpen: false\n };\n\n this.telemetryContent = getTelemetryObject(this.props.navProps.context.request.telemetryPageName!,\n this.props.navProps.friendlyName,\n this.props.navProps.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n this.attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n }\n\n @computed public get isOnlyMobile(): boolean {\n return (isMobile({ variant: VariantType.Browser, context: this.props.navProps.context.request }) === 'xs');\n }\n\n public componentDidMount(): void {\n this.customResizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._customUpdateViewport as EventListener);\n document.addEventListener('keydown', (this._escFunction as unknown) as EventListener, false);\n this._customUpdateViewport();\n document.body.addEventListener('mousedown', this._handleClickOutside);\n this._addShopAllLink();\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.navProps.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n window.removeEventListener('resize', this.customResizeThrottledEventHandler!, false);\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n }\n\n public render(): JSX.Element | null {\n this.currentLevel = NavMenuConstants.one;\n const navbarKey = 'header-nav-mobile';\n return (\n \n {\n this.state.isOnlyMobile ? this._renderMobileMenu() : (<>\n \n {this._renderCollapseMenu()}\n )\n }\n \n );\n }\n\n /**\n * Function to handle nav bar toggle.\n */\n private readonly _toggleNavBar = (): void => {\n this.setState(previousState => ({\n activeMenu: NavMenuConstants.rootMenu,\n isNavOpen: !previousState.isNavOpen\n }));\n };\n\n private _renderCollapseMenu(): JSX.Element | null {\n return (\n \n {this.state.isOnlyMobile ? this._renderMobileMenu() : this._renderDesktopMenu()}\n \n );\n }\n\n private _renderMobileMenu(): JSX.Element {\n const { MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props.navProps;\n\n this.currentLevel = NavMenuConstants.one;\n return (\n \n \n {this.state.isOnlyMobile && this.state.activeMenu !== undefined &&\n \n \n \n {this.state.mobileViewLabelText}\n \n }\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDesktopMenu(): JSX.Element {\n const { Navigation } = this.props.navProps;\n return (\n \n \n {this._renderDisplay()}\n
\n
\n
\n
\n );\n }\n\n private _renderDrawerLink(item: IMenuItemData): JSX.Element | null {\n if (item.linkURL && !StringExtensions.isNullOrWhitespace(item.linkURL)) {\n return (\n this._renderLinkMenuItem(item)\n );\n } else if (!item.linkURL) {\n return (\n this._renderSpanMenuItem(item)\n );\n }\n return null;\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem } = this.props.navProps;\n let menuItemData: IMenuItemData[] = [];\n if (this.state.isOnlyMobile) {\n menuItemData = this.menuItemData;\n } else {\n menuItemData = this.props.navProps.menuItemData;\n }\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n let cmsMenuData: IMenuItemData[] | undefined = [];\n let retailMenuItemData: IMenuItemData[] | undefined = [];\n const retailMenuData = JSON.parse(JSON.stringify(menuItemData)) as IMenuItemData[];\n\n for (const item of retailMenuData) {\n retailMenuItemData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\n item.subMenu = retailMenuItemData;\n }\n\n for (const item of menuItemData) {\n cmsMenuData = item.subMenu!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id < MenuTypeIndexId.Retail));\n }\n\n if (this.state.isOnlyMobile && activeMenu !== undefined && ArrayExtensions.hasElements(menuItemData)) {\n let menuItem: IMenuItemData | null = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n if (!NavigationMenuRootEnabled.isBackTrack) {\n this.setState({\n parentMenu: undefined\n });\n } else {\n this.setState({\n parentMenu: undefined,\n mobileViewLabelText: menuItemDatum.linkText\n });\n }\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum);\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n if (menuItem) {\n menuItemList.push(\n \n {' '}\n {this._createMenuItemList(menuItem)}\n {' '}\n \n );\n }\n\n } else {\n for (const [index, item] of retailMenuData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n
\n );\n }\n\n for (const [index, item] of cmsMenuData.entries()) {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n }\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item?.subMenu;\n if (subMenus && ArrayExtensions.hasElements(subMenus)) {\n for (let index = 0; index <= subMenus.length - NavMenuConstants.one; index++) {\n const subMenu: IMenuItemData = subMenus[Number(index)];\n let parentMenuId = item?.id;\n\n if (subMenu.id === this.state.activeMenu) {\n if (parentMenuId === NavMenuConstants.rootMenu && subMenu.id! < MenuTypeIndexId.Retail) {\n parentMenuId = undefined;\n }\n\n if (!NavigationMenuRootEnabled.isBackTrack) {\n this.setState({ parentMenu: parentMenuId });\n } else {\n this.setState({ parentMenu: parentMenuId, mobileViewLabelText: subMenu.linkText });\n }\n return subMenu;\n }\n const found = this._getFromSubMenu(subMenu);\n if (found) {\n return found;\n }\n }\n }\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (ArrayExtensions.hasElements(menuItemData.subMenu)) {\n if (this.state.isOnlyMobile && this.state.activeMenu !== undefined) {\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\n \n );\n\n } else if (menuItemData.linkURL && !StringExtensions.isNullOrWhitespace(menuItemData.linkURL)) {\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id));\n } else if (!menuItemData.linkURL) {\n return (this._renderSpanMenuItem(menuItemData));\n }\n\n return null;\n }\n\n private _renderSubMenu(subMenuArray?: IMenuItemData[], activeMenu?: number, isSubMenu?: boolean): JSX.Element | null {\n\n let subMenus: IMenuItemData[] | undefined = subMenuArray;\n if (activeMenu === NavMenuConstants.rootMenu) {\n subMenus = subMenuArray!.filter(subMenuItem => (subMenuItem.id && subMenuItem.id >= MenuTypeIndexId.Retail));\n }\n\n const { ListItem } = this.props.navProps;\n const isEnableMultiSupportMenu = this.props.navProps.config.enableMultilevelMenu ?? false;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.navProps.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || !ArrayExtensions.hasElements(subMenus)) {\n this.props.navProps.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus.map((option: IMenuItemData, index: number) => {\n const hasOptions = (option.subMenu && ArrayExtensions.hasElements(option.subMenu));\n let menuItem: JSX.Element | null;\n if (hasOptions && this.state.isOnlyMobile) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, index);\n } else if (this.currentLevel === NavMenuConstants.one || !hasOptions) {\n menuItem = this.getMenuItem(option, index);\n } else {\n menuItem = null;\n }\n let subMenu;\n const isHavingSubmenu = hasOptions && isEnableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - NavMenuConstants.one);\n\n if (hasOptions && !this.state.isOnlyMobile) {\n if (this.currentLevel >= NavMenuConstants.two) {\n subMenu = this._renderSubMenuDrawer(option);\n } else if (this.currentLevel <= this.supportedLevel - NavMenuConstants.one) {\n this.currentLevel++;\n levelClassName = `level-${this.currentLevel.toString()}`;\n subMenu = this._renderSubMenu(option.subMenu, undefined, true);\n }\n }\n if (isHavingSubmenu && this.state.isOnlyMobile) {\n this.currentLevel++;\n levelClassName = isEnableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, option.id, true);\n }\n const imagesource = option.imageSource ? option.imageSource : '';\n return (\n \n { menuItem}\n { subMenu}\n \n );\n });\n return (this._renderMenu(levelClassName, menuOptions, isSubMenu));\n }\n\n private getMenuItem(option: IMenuItemData, index: number): JSX.Element | null {\n let menuItem: JSX.Element | null;\n if (this.currentLevel === NavMenuConstants.one) {\n menuItem = (option.linkURL ? this._renderLinkMenuItemLevelOne(option, index) : this._renderSpanMenuItem(option));\n } else {\n menuItem = (option.linkURL ? this._renderLinkMenuItem(option, index) : this._renderSpanMenuItem(option));\n }\n return menuItem;\n }\n\n private _renderSubMenuDrawer(menuItem: IMenuItemData): JSX.Element | null {\n const levelClassName = `level-${this.currentLevel.toString()}`;\n const toggleButtonText = menuItem.linkText;\n const keyValue = this.state.drawerKeyValue;\n const buttonText = toggleButtonText !== undefined ? toggleButtonText : '';\n const keys = keyValue;\n const multiLevelSupportedMenu = this.props.navProps.config.menuLevelSupport ?? NavMenuConstants.three;\n\n let isDrawerOpen = false;\n if (keys[menuItem.id!]) {\n isDrawerOpen = true;\n }\n const colProps: ICollapseProps = { timeout: 0, isOpen: isDrawerOpen };\n return (\n \n
\n {menuItem.subMenu!.map((menuSubItem: IMenuItemData) => {\n if (ArrayExtensions.hasElements(menuSubItem.subMenu)) {\n this.currentLevel++;\n if (this.currentLevel < multiLevelSupportedMenu) {\n return this._renderSubMenuDrawer(menuSubItem);\n }\n }\n return this._renderDrawerLink(menuSubItem);\n })}\n
\n \n );\n }\n\n /**\n * Method to handle escape key event.\n * @param menuId -Number.\n * @param isDrawerOpen -Boolean.\n * @returns Void.\n */\n private readonly _bindDesktopCategoryClick = (menuId: number | undefined, isDrawerOpen: boolean) => (): void => {\n const { drawerKeyValue } = this.state;\n const newPair = { [menuId!]: !isDrawerOpen };\n this.setState({ drawerKeyValue: { ...drawerKeyValue, ...newPair } });\n };\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderLinkMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderLinkMenuItemLevelOne(option: IMenuItemData, index?: number, isHoverEffect: boolean = true): JSX.Element | null {\n const { Link } = this.props.navProps;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props.navProps;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n { linkText}\n \n );\n }\n return null;\n\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number): JSX.Element | null {\n const { Span } = this.props.navProps;\n return (\n \n { option.linkText}\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], isSubmenu?: boolean): JSX.Element | null {\n const { DivContainer, ImageDivContainer, showCategoryImage, showPromotionalContent } = this.props.navProps;\n const isCategoryImageDisplay =\n !this.state.isOnlyMobile && showCategoryImage && this.state.categoryImage !== null && this.state.categoryImage !== undefined && !isSubmenu;\n const isPromotionalContentDisplay =\n !this.state.isOnlyMobile && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !isSubmenu;\n const divContainerClass = this.currentLevel > NavMenuConstants.two || isCategoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = NavMenuConstants.one;\n const menuLevelSupportClassName =\n isCategoryImageDisplay && this.props.navProps.config.menuLevelSupport &&\n this.props.navProps.config.menuLevelSupport > NavMenuConstants.two && 'navmenu-multi-level';\n\n const categoryImages = this.state.categoryImage?.filter(image => !StringExtensions.isNullOrWhitespace(image.src));\n const imagesContainerKey = categoryImages?.map(item => item.src).join('-');\n return (\n \n \n {menuOptions}\n \n
\n {\n isCategoryImageDisplay && ArrayExtensions.hasElements(categoryImages) && categoryImages.map(item => (\n \n { getCategoryImage(this.props, item.src ?? '', item.altText!.toString())}\n { isPromotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n ))\n }\n
\n \n );\n }\n\n /**\n * Handle Category image update.\n * @param categoryImageSource - Image source.\n * @param option - Menu Item data.\n * @returns Returns empty.\n */\n private readonly _updateCategoryImage = (categoryImageSource: string, option: IMenuItemData) => () => {\n const linkText = option.linkText ? option.linkText : '';\n const promotionalImage: Msdyn365.IImageData[] = [{ src: categoryImageSource, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n for (const item of option.promotionalContent) {\n const imageSource = item.image.src;\n promotionalImage.push({ src: imageSource, altText: item.text, additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n }\n }\n this.setState({\n categoryImage: ArrayExtensions.hasElements(promotionalImage) ? promotionalImage : [{ src: 'empty' }]\n });\n };\n\n /**\n * Handle dropdown toggle.\n * @param data - Menu Item data.\n * @param parentId - Number.\n * @returns Returns empty.\n */\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.state.isOnlyMobile) {\n this.setState({\n activeMenu: data.id,\n parentMenu: parentId\n });\n if (this.props.navProps.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuRootEnabled.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n\n };\n\n /**\n * Handle back navigation for menu items for mobile view.\n * @returns Returns empty.\n */\n private readonly _handleGoBack = () => () => {\n NavigationMenuRootEnabled.isBackTrack = true;\n this.setState((previousState) => ({ activeMenu: previousState.parentMenu }));\n };\n\n /**\n * Function to close the nav menu on click on body.\n * @param event - MouseEvent.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current &&\n !this.menuNode.current.contains(event.target as Node)) {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n }\n };\n\n /**\n * Add shop all link for Mobile submenu.\n */\n private readonly _addShopAllLink = (): void => {\n const { menuItemData } = this.props.navProps;\n this.menuItemData = menuItemData;\n if (ArrayExtensions.hasElements(menuItemData) && ArrayExtensions.hasElements(menuItemData[0].subMenu)) {\n this.menuItemData[0].subMenu?.map(item => {\n const shopAllObject = {};\n Object.assign(shopAllObject, { imageSource: item.imageSource });\n Object.assign(shopAllObject, { linkText: this.props.navProps.resources.allCategoryMenuText });\n Object.assign(shopAllObject, { linkURL: item.linkURL });\n if (ArrayExtensions.hasElements(item.subMenu) && item.menuSource === MenuSource.Retail) {\n item.subMenu.unshift(shopAllObject);\n }\n return item;\n });\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Mobile view label text.\n * @param optionLinkText -Sub menu item link text.\n * @returns Boolean.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n const firstIndex: number = 0;\n if (!NavigationMenuRootEnabled.isBackTrack && index === firstIndex) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n /**\n * Function to handle nav menu close.\n */\n private readonly _closeNavMenu = (): void => {\n if (!this.state.isOnlyMobile) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n } else {\n this.setState({ activeMenu: undefined, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Function to close the nav menu on esc key.\n * @param event - Event.\n */\n private readonly _escFunction = (event: React.KeyboardEvent) => {\n if (event.keyCode === this.escapeKey && !this.state.isOnlyMobile && this.state.isNavOpen) {\n this.setState({ activeMenu: NavMenuConstants.rootMenu, mobileViewLabelText: '', isNavOpen: false });\n }\n };\n\n /**\n * Custom update viewport.\n */\n private readonly _customUpdateViewport = (): void => {\n this.setState({ isOnlyMobile: this.isOnlyMobile });\n };\n\n}\n\nexport default NavigationMenuRootEnabled;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu';\nimport * as React from 'react';\n\nimport { INavigationMenuProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\nimport NavigationMenuRootDisabled from './components/navigation-menu-root-disabled';\nimport NavigationMenuRootEnabled from './components/navigation-menu-root-enabled';\n\n/**\n * Render the Navigation menu.\n * @param props - The navigation menu view props.\n * @returns Return HTML having INavigationMenuViewProps props with navigation menu.\n */\nconst navigationMenuView = (props: INavigationMenuViewProps & INavigationMenuProps<{}>): JSX.Element => {\n\n if (props.config.enabletopMenu) {\n return ;\n }\n\n return ;\n\n};\n\nexport default navigationMenuView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { ICategoryHierarchyViewProps, IRefineMenuViewProps, ISearchResultContainerViewProps, ISearchResultModalViewProps, ISortByViewProps, ITitleViewProps } from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC = props => {\n const { SearchResultContainer, products, pagination, ProductsContainer, ProductSectionContainer, choiceSummary, isMobile, modalToggle, searchResultModal, TitleViewProps,\n refineMenu, categoryHierarchy, sortByOptions, CategoryNavContainer, RefineAndProductSectionContainer, errorMessage, FeatureSearchContainer, similarLookProduct } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n \n {similarLookProduct}\n \n \n {errorMessage}\n {products}\n \n {pagination}\n \n );\n }\n return (\n \n {categoryHierarchy &&\n \n {renderCategoryHierarchy(categoryHierarchy)}\n }\n \n {refineMenu && renderRefiner(refineMenu)}\n \n \n {similarLookProduct}\n \n
\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n
\n
\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
\n \n {errorMessage}\n {products}\n \n {pagination}\n
\n
\n
\n );\n\n};\n\nconst createSearchResultModal = (modalProps: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps, sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string): JSX.Element => {\n return React.cloneElement(modalProps.modal, {}, modalProps.modalHeader, createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter);\n};\n\nconst createModalBody = (props: ISearchResultModalViewProps, refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n \n {submenu}\n \n ))}\n \n \n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return (\n \n {sortByDropDown}\n \n );\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n \n {categoryHierarchyList.map((category, index) => (\n \n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n \n ))}\n \n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n \n

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

\n
\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IIframeViewProps } from './iframe';\n\n/**\n *\n * IFrameView component.\n * @extends {React.PureComponent}\n */\nexport class IFrameView extends React.PureComponent {\n\n public render(): JSX.Element | null {\n const { Heading, IframeContainer, IFrame, alert, cookieConsentAccepted } = this.props;\n\n return (\n \n {alert}\n {cookieConsentAccepted && cookieConsentAccepted ? (\n <>\n {Heading}\n {IFrame}\n ) : null}\n \n );\n }\n}\nexport default IFrameView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { createTabStateInput, getContentID, TabItemType } from '../..';\nimport { ITabData } from './tab.data';\nimport { ITabProps } from './tab.props.autogenerated';\n\n/**\n *\n * Tab component.\n * @extends {React.PureComponent>}\n */\n\nexport interface ICallToActionProps {\n link: INodeProps[];\n}\n\nexport interface ITabViewProps extends ITabProps<{}> {\n heading?: React.ReactNode;\n TabContainer: IModuleProps;\n headerSection: INodeProps;\n tabHeaderSection: INodeProps;\n tabsSection: INodeProps;\n tabItemContainer: INodeProps;\n tabHeaders: React.ReactNode;\n tabContents: React.ReactNode;\n}\n\nexport interface ITabViewStates {\n currentTabIndex: number;\n}\n\n/**\n *\n * Tab component.\n * @extends {React.Component>}\n */\n@observer\nclass Tab extends React.Component, ITabViewStates> {\n public readonly tabIndexQuery: string = 'activeTab';\n\n private activeLink: HTMLLIElement | null;\n\n constructor(props: ITabProps) {\n super(props);\n const { defaultTabIndex } = this.props.config;\n const { slots } = this.props;\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n let initialIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n const queryString: string = this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.activeTab || '';\n let queryTabIndex: number = 0;\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n queryTabIndex = Number.parseInt(arr[1], 10);\n }\n }\n initialIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : initialIndex;\n this.state = { currentTabIndex: initialIndex };\n\n this._getTabHeader = this._getTabHeader.bind(this);\n this._getTabContent = this._getTabContent.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._setGetParameter = this._setGetParameter.bind(this);\n this.activeLink = null;\n }\n\n public shouldComponentUpdate(nextProps: ITabProps,\n nextState: ITabViewStates): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { slots } = this.props;\n const { heading, className } = this.props.config;\n\n const headingComponent = heading && (\n \n );\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n\n // Const queryTabIndex = this.props.context && this.props.context.request && this.props.context.request.query && +this.props.context.request.query.activeTabIndex || 0;\n // let activeIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n // activeIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : activeIndex;\n\n const tabViewProps = {\n ...this.props,\n TabContainer: {\n moduleProps: this.props,\n className: classnames('ms-tab', className)\n },\n headerSection: { className: 'ms-tab-header-section' },\n tabsSection: { className: 'ms-tab-tabs-section', tag: 'ul' as NodeTag, role: 'tablist' },\n heading: headingComponent,\n config: this.props && this.props.config,\n tabItemContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-tab-content-section'\n },\n tabContents: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabContent(item, index)),\n tabHeaders: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabHeader(item, index))\n };\n return this.props.renderView(tabViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n public componentDidUpdate(): void {\n const { data } = this.props;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n if (dataActionTabId) {\n if (this.props.id === dataActionTabId) {\n this.activeLink && this.activeLink.focus();\n }\n } else {\n const queryString: string = this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.activeTab || '';\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n this.activeLink && this.activeLink.focus();\n }\n }\n }\n }\n\n /**\n *Set the activate link value on tab click.\n * @param link -Ref link value.\n */\n private readonly _refHandler = (link: HTMLLIElement | null) => {\n this.activeLink = link;\n };\n\n private _getTabHeader(item: React.ReactNode, index: number): React.ReactNode {\n const { data } = this.props;\n const activeContentIndex = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.activeContentIndex;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n const selected = activeContentIndex !== undefined && dataActionTabId === this.props.id ? activeContentIndex === index : this.state.currentTabIndex === index;\n const contentID = getContentID(index, this.props.id);\n\n return (\n \n \n {React.cloneElement(item as React.ReactElement, { tabItemType: TabItemType.TabHeader, isSelected: index === this.state.currentTabIndex, itemIndex: index, tabId: this.props.id })}\n \n \n );\n }\n\n private readonly _onClick = (index: number, id: string) => (e: React.MouseEvent) => {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n };\n\n private readonly _onKeyDown = (index: number, id: string) => (e: React.KeyboardEvent) => {\n if (e.keyCode === 13) {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n\n if (e.keyCode === 39 || e.keyCode === 37) {\n const { slots } = this.props;\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n\n if (e.keyCode === 39) {\n\n // If we're at the end, go to the start\n if (index + 1 === slotLength) {\n index = -1;\n }\n const activeTabState = { activeContentIndex: index + 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index + 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 2)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n\n // Move left\n } else if (e.keyCode === 37) {\n // If we're at the start, move to the end\n if (index === 0) {\n index = slotLength;\n }\n const activeTabState = { activeContentIndex: index - 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index - 1 });\n\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n }\n };\n\n private _getTabContent(item: React.ReactNode, index: number): React.ReactNode {\n return (\n \n {React.cloneElement(item as React.ReactElement, { tabItemType: TabItemType.TabContent, isSelected: index === this.state.currentTabIndex, itemIndex: index, tabId: this.props.id })}\n \n );\n }\n\n private _setGetParameter(requestContext: MsDyn365.IRequestContext, paramName: string, paramValue: string): string {\n let url;\n\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n url = new URL(window.location.href);\n } else {\n url = new URL(requestContext.url.requestUrl.href);\n }\n\n const params = new window.URLSearchParams(url.search);\n params.set(paramName, paramValue);\n url.search = decodeURIComponent(params.toString());\n return url.toString();\n }\n}\n\nexport default Tab;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {\n}\n\nconst onClick = async (_event: React.MouseEvent, props: IMakePaymentProps, setDisabled: (disabled: boolean) => void): 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,\n setDisabled: React.Dispatch>) => async (event: React.MouseEvent) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const { data: { invoices } } = 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. All rights reserved.\n * See License.txt 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}\n\nexport const InvoiceError: React.FC = ({ messageHeader, errorMessage, otherError, showError, payInvoiceErrorModalOpen, errorDialogHeader, errorDialogBodyErrorTitle, errorDialogBodyErrorDescription,\n errorDialogFooterGoToCartButtonText, errorDialogFooterCancelButtonText, cartUrl, setPayInvoiceErrorModalClose }) => {\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\n aria-label={messageHeader} >\n \n {errorMessages.map((message, index) => {\n return (\n
\n {message}\n
\n );\n })}\n \n \n \n \n {errorDialogHeader}\n \n \n \n
\n
\n {errorDialogBodyErrorTitle}\n
\n
\n {errorDialogBodyErrorDescription}\n
\n
\n
\n \n \n {errorDialogFooterGoToCartButtonText}\n \n \n {errorDialogFooterCancelButtonText}\n \n \n
\n \n );\n};\n\n// @ts-expect-error\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n { categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Button, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ISubscribeConfig, ISubscribeProps } from './subscribe.props.autogenerated';\n\n/**\n * Subscribe view props.\n */\nexport interface ISubscribeViewProps extends ISubscribeProps {\n subscribe: IModuleProps;\n subscribeContainer: INodeProps;\n heading: React.ReactNode;\n text: React.ReactNode;\n submitButton?: INodeProps;\n submitButtonLabelText?: string;\n subscribeForm?: INodeProps;\n emailInput?: INodeProps;\n handleText(): void;\n}\n\n/**\n * Subscribe component.\n * @extends {React.PureComponent>}\n */\nexport class Subscribe extends React.PureComponent> {\n private readonly _emailAddressInputRef: React.RefObject;\n\n public constructor(props: ISubscribeViewProps) {\n super(props);\n this._emailAddressInputRef = React.createRef();\n }\n\n public render(): JSX.Element | null {\n const {\n heading,\n paragraph\n } = this.props.config;\n\n const moduleClassName = 'ms-subscribe';\n\n const subscribeParagraph = paragraph && (\n \n );\n\n const subscribeHeading = heading && (\n \n );\n const viewProps = {\n ...this.props,\n handleText: this.handleTextChange,\n subscribe: {\n moduleProps: this.props,\n className: moduleClassName\n },\n subscribeContainer: {\n className: 'ms-subscribe__details'\n },\n heading: subscribeHeading,\n text: subscribeParagraph,\n subscribeForm: {\n className: 'ms-subscribe__details__form',\n tag: 'form',\n 'aria-label': this.props.resources.subscribeFormAriaLabel,\n name: 'subscribeForm',\n role: 'form',\n autoComplete: 'off'\n },\n emailInput: {\n className: 'ms-subscribe__details__form__email',\n tag: 'input',\n ref: this._emailAddressInputRef,\n type: 'email',\n 'aria-label': this.props.resources.subscribeFormEmailAriaLabel,\n placeholder: this.props.resources.subscribeEmailPlaceholderText\n },\n submitButton: {\n className: 'ms-subscribe__details__form__submit',\n tag: Button,\n 'aria-label': this.props.resources.subscribeFormSubmitAriaLabel,\n type: 'submit',\n title: this.props.resources.subscribeButtonLabel\n },\n submitButtonLabelText: this.props.resources.subscribeButtonLabel\n };\n\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handle text change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleTextChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handle paragraph change.\n * @param event - The dialog that is allowed to remain open.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n}\n\nexport default Subscribe;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 (invoices: IPayableInvoice[], actionContext: IActionContext, onError: (errorState: IInvoiceErrorState) => void) => {\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' } }); 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 }); return;\n }\n\n const cartUrl = getUrlSync('cart', actionContext);\n if (cartUrl) {\n window?.location.assign(cartUrl);\n }\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { ITabItemData } from './tab-item.data';\nimport { ITabItemProps } from './tab-item.props.autogenerated';\n\nexport interface ITabItemViewProps {\n TabContentContainer: IModuleProps;\n TabHeaderContainer: IModuleProps;\n tabSlots: INodeProps;\n TabItemContent: INodeProps;\n tabItemType?: TabItemType;\n tabHeader: React.ReactNode;\n}\n\nexport interface ITabItemExtentedProps extends ITabItemProps {\n tabItemType?: TabItemType;\n isSelected?: boolean;\n itemIndex?: number;\n tabId?: string;\n}\n\nexport enum TabItemType {\n TabHeader,\n TabContent\n}\n\n/**\n *\n * TabItem component.\n * @extends {React.Component}\n */\n@observer\nclass TabItem extends React.PureComponent {\n private readonly moduleContentClassName: string = 'ms-tab-item-content';\n\n private readonly moduleHeaderClassName: string = 'ms-tab-item-header';\n\n constructor(props: ITabItemProps) {\n super(props);\n this._renderTabHeader = this._renderTabHeader.bind(this);\n }\n\n public render(): JSX.Element {\n const { slots, renderView, config, data, isSelected, itemIndex } = this.props;\n const index = itemIndex || 0;\n const contentID = getContentID(index, this.props.tabId || '');\n const activeContentIDResult = data && data.activeTabState && data.activeTabState.result;\n const shown = activeContentIDResult && activeContentIDResult.tabId === this.props.tabId && activeContentIDResult.activeContentIndex !== undefined ? activeContentIDResult.activeContentIndex === index : isSelected || false;\n const viewProps = {\n ...this.props,\n TabContentContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleContentClassName, config.className)\n },\n TabHeaderContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleHeaderClassName, config.className)\n },\n TabItemContent: {\n className: 'ms-tab-item-content__content',\n tag: 'section' as NodeTag,\n 'aria-hidden': !shown,\n role: 'tabpanel',\n tabIndex: shown ? 0 : -1,\n id: contentID\n },\n tabHeader: this._renderTabHeader(),\n tabSlots: slots\n };\n return renderView(viewProps) as React.ReactElement;\n\n }\n\n private _renderTabHeader(): React.ReactNode {\n return (\n <>\n {this.props.config.tabItemTitle}\n \n );\n }\n\n}\n\nexport const getContentID = (index: number, id: string) => {\n return `tab-item-content-${id}-${index}`;\n};\n\nexport default TabItem;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport { AsyncResult } from '@msdyn365-commerce/retail-proxy';\n\nimport { ICategoryPromotionalContentData } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuData {\n categories: AsyncResult;\n}\n\nexport interface IMenuItemData {\n id?: number;\n linkText?: string;\n linkURL?: string;\n imageSource?: string;\n imageDestinationURL?: string;\n subMenu?: IMenuItemData[];\n promotionalContent?: ICategoryPromotionalContentData[];\n menuSource?: string;\n shouldOpenNewTab?: boolean;\n ariaLabel?: string;\n}\n\n/**\n *\n * Menu type index id.\n */\nexport enum MenuTypeIndexId {\n Cms = 1000,\n Retail = 5000\n}\n\n/**\n *\n * Menu type source.\n */\nexport enum MenuSource {\n Cms = 'Cms',\n Retail = 'Retail'\n}\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365, { IActionContext, IGridSettings, IImageSettings, isEmptyOrNullObject } from '@msdyn365-commerce/core';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, getCategoryUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { addThrottledEvent, IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { computed, observable } from 'mobx';\nimport * as React from 'react';\n\nimport { IMenuItemData, INavigationMenuData, MenuSource, MenuTypeIndexId } from './navigation-menu.data';\nimport { ICmsNavItemsData, INavigationMenuProps, ISubMenusData, navigationMenuSource } from './navigation-menu.props.autogenerated';\n\nexport interface INavigationMenuViewProps extends INavigationMenuProps {\n className: string;\n menuItemData: IMenuItemData[];\n Navigation: IModuleProps;\n MenuList: INodeProps;\n ListItem: INodeProps;\n Link: INodeProps;\n Button: INodeProps;\n Span: INodeProps;\n ImageContainer: INodeProps;\n MobileDescriptionContainer: INodeProps;\n MobileBackButton: INodeProps;\n MobileDescriptionLabel: INodeProps;\n imageSettings: IImageSettings;\n gridSettings: IGridSettings;\n isMobileView: boolean;\n DivContainer?: INodeProps;\n ImageDivContainer?: INodeProps;\n showCategoryImage?: boolean;\n showPromotionalContent?: boolean;\n}\n\nexport type GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface INavigationMenuState {\n isMobile: boolean;\n}\n\n/**\n *\n * NavigationMenu component.\n * @extends {React.PureComponent>}\n */\nclass NavigationMenu extends React.PureComponent, INavigationMenuState> {\n private static CMSItemIdInit: number = MenuTypeIndexId.Cms;\n\n private static RSItemIdInit: number = MenuTypeIndexId.Retail;\n\n private resizeThrottledEventHandler?: (event: Event) => void;\n\n private menuItemList: IMenuItemData[];\n\n private isRetail: boolean = true;\n\n private isCMS: boolean = true;\n\n @observable\n private viewport: GridSize;\n\n public static getFriendlyName(locale: string, nameTranslations?: TextValueTranslation[]): string | undefined {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && nameTranslations.length > 0) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n return nameTranslation && nameTranslation.Text;\n }\n\n constructor(props: INavigationMenuProps) {\n super(props);\n this._updateViewport = this._updateViewport.bind(this);\n this.viewport = props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._setNavigationSource(this.props.config && this.props.config.navigationMenuSource);\n this.state = { isMobile: this.isMobile };\n this.menuItemList = [];\n }\n\n @computed get isMobile(): boolean {\n return (this.viewport === 'xs' || this.viewport === 'sm');\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n this.resizeThrottledEventHandler = addThrottledEvent(window, 'resize', this._updateViewport as EventListener);\n }\n this._updateViewport();\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n window.removeEventListener('resize', this.resizeThrottledEventHandler!, false);\n }\n }\n\n public render(): JSX.Element | null {\n this.menuItemList = this._mapData();\n if (isEmptyOrNullObject(this.props.data)) {\n this.props.telemetry.error('Navigatiomenu returned null');\n return null;\n }\n\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=224&h=300&m=6', w: 0, h: 0 },\n xl: { q: 'w=224&h=300&m=6', w: 0, h: 0 }\n },\n lazyload: true\n };\n\n const viewProps = {\n ...this.props,\n ...this.state,\n imageSettings: defaultImageSettings,\n gridSettings: this.props.context.request.gridSettings,\n Navigation: {\n moduleProps: this.props,\n className: classnames('ms-nav', this.props.config.className, this.state.isMobile ? 'mobile-vp' : 'desktop-vp'),\n tag: 'nav',\n role: this.isMobile ? 'listbox' : 'navigation'\n },\n MenuList: {\n className: 'ms-nav__list',\n tag: 'ul',\n role: 'menu'\n },\n ListItem: {\n className: 'ms-nav__list__item',\n role: 'presentation',\n tag: 'li'\n },\n showCategoryImage: this.props.config.displayCategoryImage ?? false,\n showPromotionalContent: this.props.config.displayPromotionalImage ?? false,\n Link: {\n tag: 'a',\n className: 'ms-nav__list__item__link',\n role: this.isMobile ? 'option' : 'menuitem'\n },\n DivContainer:\n {\n tag: 'div',\n className: 'ms-nav__feature'\n },\n ImageDivContainer:\n {\n tag: 'div',\n className: 'category-image',\n role: 'tabpanel'\n },\n Button: {\n className: 'ms-nav__list__item__button',\n tag: 'button',\n role: this.isMobile ? 'option' : 'menuitem',\n onClick: this.props\n },\n ImageContainer: {\n className: 'ms-nav__list__item__image'\n },\n Span: {\n className: 'ms-nav__list__item__span',\n tag: 'span'\n },\n MobileDescriptionContainer: {\n className: 'ms-nav__list__mobile__container'\n },\n MobileBackButton: {\n className: 'ms-nav__list__mobile__container__button',\n tag: 'button',\n 'aria-label': this.props.resources.backButtonAriaLabel,\n onClick: this.props\n },\n MobileDescriptionLabel: {\n className: 'ms-nav__list__mobile__container__span',\n tag: 'span'\n },\n isMobileView: this.state.isMobile,\n menuItemData: this.menuItemList,\n className: classnames('ms-nav', this.props.config.className)\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _mapData(): IMenuItemData[] {\n const { data, config } = this.props;\n const mergedData: IMenuItemData[] = [];\n if (this.isRetail && data && data.categories && data.categories.result && data.categories.result.length > 0) {\n data.categories.result.map((item: CategoryHierarchy, index) => (\n mergedData.push(this._constructMenuItemData(item, undefined, true, index, true))\n ));\n }\n\n if (this.isCMS && config.cmsNavItems && config.cmsNavItems.length > 0) {\n config.cmsNavItems.map((item: ICmsNavItemsData, idx: number) => (\n mergedData.push(this._constructMenuItemData(undefined, item, false, idx + 1))\n ));\n }\n return this._constructTopMenuItemData(mergedData);\n }\n\n private _constructTopMenuItemData(mergedData: IMenuItemData[]): IMenuItemData[] {\n const enableTopLevelMenu = this.props.config.enabletopMenu ?? false;\n if (!enableTopLevelMenu) {\n return mergedData;\n }\n const mergedRootMenuData: IMenuItemData[] = [];\n const topMenu = {\n id: 1,\n linkText: this.props.config.rootMenuNavigation ?? '...',\n linkURL: '#',\n imageSource: undefined,\n subMenu: mergedData\n } as IMenuItemData;\n mergedRootMenuData.push(topMenu);\n\n return mergedRootMenuData;\n }\n\n private _constructMenuItemData(retailItem?: CategoryHierarchy, cmsItem?: ICmsNavItemsData, isRetail?: boolean, idx?: number, addedAllMenu?: boolean): IMenuItemData {\n const locale = this.props.context && this.props.context.request && this.props.context.request.locale ? this.props.context.request.locale : 'en-us';\n const { categoryPromotionalContent } = this.props.config;\n const cmsItemText = cmsItem && cmsItem.linkText || '';\n const { menuAriaLabel } = this.props.resources;\n\n // Filter category promotional data based on category name\n const promotionalData = retailItem && categoryPromotionalContent?.filter(\n promoItem => promoItem.categoryName?.toLowerCase() === retailItem?.Name?.toLowerCase());\n\n // First check if image is available from promotional data else read from retail server\n let imageSource: string = 'empty';\n if (ArrayExtensions.hasElements(retailItem?.Images) && retailItem!.Images[0].Uri) {\n imageSource = retailItem!.Images[0].Uri;\n }\n if (isRetail) {\n return {\n id: NavigationMenu.RSItemIdInit++,\n linkText: NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? '',\n linkURL: retailItem?.Url,\n imageSource,\n subMenu: this._getNestedChildren(retailItem, imageSource, addedAllMenu),\n promotionalContent: this.props.config.displayPromotionalImage && promotionalData,\n menuSource: MenuSource.Retail,\n ariaLabel: `${NavigationMenu.getFriendlyName(locale, retailItem?.NameTranslations) ?? ''} ${menuAriaLabel}`\n } as IMenuItemData;\n }\n return {\n id: NavigationMenu.CMSItemIdInit++,\n linkText: cmsItemText,\n linkURL: cmsItem && cmsItem.linkUrl && cmsItem.linkUrl.destinationUrl || '',\n imageDestinationURL: cmsItem && cmsItem.imageLink && cmsItem.imageLink.destinationUrl || '',\n imageSource: cmsItem && cmsItem.image && cmsItem.image.src || '',\n subMenu: this._getCMSNestedChildren(cmsItem),\n menuSource: MenuSource.Cms,\n shouldOpenNewTab: cmsItem?.openInNewTab,\n ariaLabel: `${cmsItemText} ${menuAriaLabel}`\n } as IMenuItemData;\n\n }\n\n private _getNestedChildren(category?: CategoryHierarchy, imageSourceUrl?: string, addedAllMenu: boolean = false): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n if (!category || !category.Children || category.Children.length === 0) {\n return [];\n }\n if (!this.props.config.enabletopMenu && addedAllMenu) {\n nestedChildren.push({ linkText: this.props.resources.allCategoryMenuText, imageSource: imageSourceUrl, linkURL: getCategoryUrl(category, this.props.context as unknown as IActionContext, {}) });\n }\n category.Children.map((item: CategoryHierarchy, index) => {\n nestedChildren.push(this._constructMenuItemData(item, undefined, true, index, false));\n });\n return nestedChildren;\n }\n\n private _getCMSNestedChildren(category?: ICmsNavItemsData): IMenuItemData[] {\n const nestedChildren: IMenuItemData[] = [];\n\n if (!category || !category.subMenus || category.subMenus.length === 0) {\n return [];\n }\n\n category.subMenus.map((item: ISubMenusData, idx: number) => {\n nestedChildren.push(this._constructMenuItemData(undefined, item, false, idx));\n });\n return nestedChildren;\n }\n\n private readonly _setNavigationSource = (sourceType?: navigationMenuSource): void => {\n switch (sourceType) {\n case navigationMenuSource.retailServerOnly:\n this.isRetail = true;\n this.isCMS = false;\n break;\n case navigationMenuSource.cmsOnly:\n this.isRetail = false;\n this.isCMS = true;\n break;\n case navigationMenuSource.all:\n this.isRetail = true;\n this.isCMS = true;\n break;\n default:\n }\n };\n\n private _updateViewport(): void {\n this.viewport = this._getViewport();\n this.setState({ isMobile: this.isMobile });\n }\n\n private _getViewport(): GridSize {\n const { context } = this.props;\n\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 (MsDyn365.isBrowser && 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\n return 'xs';\n }\n}\n\nexport default NavigationMenu;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { 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?(): void;\n}\n\nexport interface IInvoiceDetailsHeaderComponent extends IComponent {\n}\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 { className, data: { invoiceDetails }, resources, onError } = props;\n\n const invoiceNumberText = resources.invoiceIdLabel.replace('{0}', invoiceDetails.id);\n\n const invoiceOrderItemsText = invoiceDetails.lines.length === 1 ? resources.invoiceOrderItem : 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`; `${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\n return (\n
\n
\n {invoiceNumberText}\n
\n
\n
\n
\n
\n
\n {resources.invoicePlacedByLabel}\n \n {invoiceDetails.customerName}\n \n
\n
\n
\n
\n {orderDate}\n
\n
\n {invoiceOrderItemsText}\n
\n
\n
\n
\n
\n
\n {resources.invoiceAmountDueText}\n
\n
\n {formatAmount(props.context, invoiceDetails.amountDue, invoiceDetails.currencyCode)}\n
\n
\n {dueDateText}\n
\n
\n
\n
\n \n
\n
\n );\n};\n\n// @ts-expect-error\nexport const InvoiceDetailsHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceDetailsHeaderComponent',\n { component: InvoiceDetailsHeader }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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}\n\ninterface IInvoicePaymentLineProps {\n label: string;\n value: number;\n className: string;\n}\n\nconst InvoiceDetailsPaymentDetails: React.FC = (props: IInvoiceDetailsPaymentDetailsProps): JSX.Element | null => {\n const { className, data: { invoicePaymentDetails }, resources } = 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 {\n lines.map(line => {\n return (\n
\n
\n {line.label}\n
\n
\n {props.context.cultureFormatter.formatCurrency(line.value, invoicePaymentDetails.currencyCode)}\n
\n
\n );\n })\n }\n
\n );\n};\n\n// @ts-expect-error\nexport const InvoiceDetailsPaymentDetailsComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceDetailsPaymentDetailsComponent',\n { component: InvoiceDetailsPaymentDetails }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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}\n\nconst _renderProductDimensions = (className: string, resources: IInvoiceDetailsProductsResources, product: SalesInvoiceLine): 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 = (className: string, context: ICoreContext, product: IInvoiceProductLine, imageSettings?: IImageSettings): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n xl: { q: 'w=315&h=315&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(product.ItemId, context.actionContext.requestContext.apiSettings);\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 { className, data: { invoiceDetails }, resources } = 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 {\n invoiceDetails.lines.map(product => {\n const quantity = product.Quantity || 1;\n\n let productUrl = '';\n if (!ObjectExtensions.isNullOrUndefined(product.ProductName) &&\n !ObjectExtensions.isNullOrUndefined(product.RecordId)) {\n productUrl = getProductPageUrlSync(product.ProductName, product.RecordId, 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};\n\n// @ts-expect-error\nexport const InvoiceDetailsProductsComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceDetailsProductsComponent',\n { component: InvoiceDetailsProducts }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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.RecordId)?.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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { 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}\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 = {};\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 });\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.filter(product => product.RecordId).map(product => new ProductInput(\n product.RecordId!, this.props.context.request.apiSettings, channelId, undefined, this.props.context.actionContext.requestContext));\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(): void {\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: { payInvoiceErrorDialogHeader, payInvoiceErrorDialogBodyErrorTitle, payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText, payInvoiceErrorDialogFooterCancelButtonText }\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. All rights reserved.\n * See License.txt 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}\n\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n \n {resources.invoiceNumberText}\n \n \n {resources.invoiceDateText}\n \n { props.isAdmin ? \n {resources.invoiceUsersText}\n : null }\n \n {resources.invoiceAmountText}\n \n \n {resources.invoiceDueDateText}\n \n \n {resources.invoiceAmountDueText}\n \n \n {resources.invoiceStatusText}\n \n \n {resources.invoiceActionsText}\n \n \n );\n};\n\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n \n {resources.invoicesText}\n \n \n {resources.invoiceDateMobileText}\n \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 \n {headerCells}\n \n \n );\n};\n\n// @ts-expect-error\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableHeaderComponent',\n { component: InvoicesTableHeader }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITabViewProps } from './tab';\n\nconst tabView: React.FC = props => {\n const { heading, TabContainer, tabHeaders, tabContents } = props;\n if (!props.heading && !props.tabHeaders && !props.tabContents) {\n props.context.telemetry.error('Tab content is empty, module wont render');\n return null;\n }\n return (\n \n \n {heading}\n \n \n {tabHeaders}\n \n \n {tabContents}\n \n \n );\n};\n\nexport default tabView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, msdyn365Commerce } 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 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\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 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 = (props: IInvoicesTableRowProps, requestInvoiceButtonReference: React.RefObject) => () => {\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const { data: { invoice, index, customer } } = props;\n\n const isCurrentUser = !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n const payInvoiceClassName = `${props.className}__pay-invoice`;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n const requestInvoiceButtonReference: React.RefObject = React.createRef();\n const payInvoiceButtonReference: React.RefObject = React.createRef();\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n \n \n \n {formatDate(props.context, invoice.invoiceDate)}\n \n \n { customer.IsB2bAdmin ? \n {invoice.customerName}\n { isCurrentUser ? \n {props.resources.invoiceCurrentUser}\n : null}\n : null }\n \n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\n \n \n \n {formatDate(props.context, invoice.dueDate)}\n \n \n \n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\n \n \n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n \n \n \n \n \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 { resources: { invoiceViewDetailsButtonAriaLabel, invoiceViewDetailsButtonText, invoiceActionsButtonTextAriaLabel }, data: { index } } = props;\n\n const [showActions, setShowActions] = useState(false);\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 \n \n
\n }\n \n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const { data: { invoice } } = 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 \n {invoice.customerName}\n \n \n \n \n {formatDate(props.context, invoice.dueDate)}\n \n
\n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n \n \n {extraActionsPopup(props)}\n \n \n );\n\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const { data: { invoice } } = 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 (\n \n {rowCells}\n \n );\n};\n\n// @ts-expect-error\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableRowComponent',\n { component: InvoicesTableRow }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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. All rights reserved.\n * See License.txt 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\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ITileListItemViewProps } from './tile-list-item';\n\n/**\n *\n * ITileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nconst renderTileListItemContent = (props: ITileListItemViewProps): JSX.Element => {\n const { heading, paragraph, backgroundImage, links, thumbnailImage,\n tileListContainer, tileListImageContainer, tileListThumbnailImageContainer, tileListHeadingContainer } = props;\n\n return (\n \n \n {backgroundImage}\n \n \n {heading}\n {paragraph}\n {links}\n \n \n {thumbnailImage}\n \n \n );\n};\n\n/**\n *\n * TileListItemViewProps component.\n * @param props - Component props.\n * @returns TileListView.\n */\nexport const TileListItemViewComponent: React.FC = props => {\n const { tileListItem } = props;\n return (\n \n {renderTileListItemContent(props)}\n \n );\n};\n\nexport default TileListItemViewComponent;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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. All rights reserved.\n * See License.txt 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): React.ReactNode => {\n\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 {\n EnumExtensions.getEnumValues(InvoicesFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })\n }\n \n
\n );\n};\n\n// @ts-expect-error\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesFilterComponent',\n { component: InvoicesFilter }\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IImageData, IImageSettings, Image } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, generateImageUrl } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, getTelemetryObject, IPayLoad, ITelemetryContent, Module, Node, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { INavigationMenuViewProps } from './navigation-menu';\nimport { IMenuItemData } from './navigation-menu.data';\n\ninterface INavigationState {\n parentMenu?: number;\n activeMenu?: number;\n categoryImage?: IImageData[] | null;\n mobileViewLabelText?: string;\n categoryImageAltText: string;\n}\n\n/**\n *\n * NavigationMenuView component.\n * @extends {React.PureComponent}\n */\nexport class NavigationMenuView extends React.PureComponent {\n private static isBackTrack: boolean = false;\n\n private currentLevel: number = 0;\n\n private readonly menuNode: React.RefObject;\n\n private readonly menuItemRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: INavigationMenuViewProps) {\n super(props);\n this.menuNode = React.createRef();\n this.menuItemRef = React.createRef();\n this.state = { activeMenu: undefined, mobileViewLabelText: '', parentMenu: undefined, categoryImageAltText: '' };\n this._closeSubmenu = this._closeSubmenu.bind(this);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '', '');\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser) {\n document.body.addEventListener('mousedown', this._handleClickOutside);\n document.body.addEventListener('focusout', this._handleFocusOutside);\n }\n }\n\n public componentDidUpdate(): void {\n if (this.menuItemRef.current?.children[0] && this.props.isMobileView) {\n (this.menuItemRef.current.children[0] as HTMLElement).focus();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser) {\n document.body.removeEventListener('mousedown', this._handleClickOutside, false);\n document.body.removeEventListener('focusout', this._handleFocusOutside, false);\n }\n\n }\n\n public render(): JSX.Element | null {\n const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props;\n\n this.currentLevel = 1;\n return (\n \n \n {isMobileView && this.state.activeMenu !== undefined &&\n \n \n \n {this.state.mobileViewLabelText}\n \n }\n {this._renderDisplay()}\n \n \n );\n }\n\n private _renderDisplay(): JSX.Element[] {\n const { ListItem, menuItemData, isMobileView } = this.props;\n const { activeMenu } = this.state;\n const menuItemList: JSX.Element[] = [];\n\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\n let menuItem: IMenuItemData = {};\n for (const menuItemDatum of menuItemData) {\n if (menuItemDatum && menuItemDatum.id === activeMenu) {\n menuItem = menuItemDatum;\n !NavigationMenuView.isBackTrack ? this.setState({ parentMenu: undefined }) : this.setState({ parentMenu: undefined, mobileViewLabelText: menuItemDatum.linkText });\n break;\n }\n menuItem = this._getFromSubMenu(menuItemDatum) as IMenuItemData;\n if (menuItem && menuItem.id === activeMenu) {\n break;\n }\n }\n\n menuItem && menuItemList.push(\n \n {' '}\n {this._createMenuItemList(menuItem)}\n {' '}\n \n );\n } else {\n menuItemData.forEach((item: IMenuItemData, index: number) => {\n menuItemList.push(\n \n {this._createMenuItemList(item)}\n \n );\n });\n }\n\n return menuItemList;\n }\n\n private _getFromSubMenu(item?: IMenuItemData): IMenuItemData | null {\n const subMenus = item && item.subMenu;\n if (subMenus && subMenus.length > 0) {\n for (let i = 0; i <= subMenus.length - 1; i++) {\n if (subMenus[i].id === this.state.activeMenu) {\n !NavigationMenuView.isBackTrack ? this.setState(\n { parentMenu: item?.id }\n ) : this.setState(\n { parentMenu: item && item.id, mobileViewLabelText: subMenus[i].linkText }\n );\n return subMenus[i];\n }\n const found = this._getFromSubMenu(subMenus[i]);\n if (found) {\n return found;\n }\n }\n }\n this.props.context.telemetry.error('Submenu content is empty, module wont render.');\n return null;\n }\n\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\n if (menuItemData && menuItemData.subMenu && menuItemData.subMenu.length > 0) {\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\n return (this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false));\n }\n return (\n <>\n {this._renderButtonMenuItem(menuItemData)}\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id, false)}\n \n );\n\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\n return (this._renderLinkMenuItem(menuItemData, menuItemData.id, false, true));\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\n return (this._renderSpanMenuItem(menuItemData, menuItemData.id, true));\n }\n this.props.context.telemetry.error('Navigation menu content is empty, module wont render.');\n return null;\n }\n\n private _renderSubMenu(subMenus?: IMenuItemData[], activeMenu?: number, IsSubMenu?: boolean): JSX.Element | null {\n const { isMobileView, ListItem } = this.props;\n const enableMultiSupportMenu = this.props.config.enableMultilevelMenu || false;\n const multiLevelSupportedMenu = this.props.config.menuLevelSupport || 3;\n\n // Const isParentMenu:boolean= false;\n if (activeMenu && this.state.activeMenu !== activeMenu) {\n this.props.context.telemetry.error('Navigation Active menu content is empty, module wont render.');\n return null;\n }\n\n if (!subMenus || subMenus.length === 0) {\n this.props.context.telemetry.error('Navigation Submenu content is empty, module wont render.');\n return null;\n }\n\n let levelClassName: string = '';\n const menuOptions = subMenus && subMenus.map((option: IMenuItemData, idx: number) => {\n const hasOptions = (option.subMenu && option.subMenu.length > 0);\n let menuItem: JSX.Element | null;\n if (hasOptions && isMobileView) {\n menuItem = this._renderButtonMenuItem(option, activeMenu, idx);\n } else {\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\n }\n\n let subMenu;\n const haveSubmenu = hasOptions && enableMultiSupportMenu && (this.currentLevel <= Math.round(multiLevelSupportedMenu) - 1);\n if (haveSubmenu) {\n this.currentLevel++;\n levelClassName = enableMultiSupportMenu ? `level-${this.currentLevel.toString()}` : '';\n subMenu = this._renderSubMenu(option.subMenu, isMobileView ? option.id : undefined, true);\n }\n return (\n \n { menuItem }\n { subMenu }\n \n );\n });\n return (this._renderMenu(levelClassName, menuOptions, activeMenu, IsSubMenu));\n }\n\n private _renderButtonMenuItem(option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null {\n const { Button } = this.props;\n return (\n \n { option.linkText }\n \n );\n }\n\n private _renderLinkMenuItem(option: IMenuItemData, index?: number, hoverEffect: boolean = true, isParent: boolean = false): JSX.Element | null {\n const { Link } = this.props;\n const linkText = option.linkText ? option.linkText : '';\n const imagesource = option.imageSource ? option.imageSource : '';\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n return (\n \n { option.linkText }\n \n );\n }\n\n private _renderPromotionalLink(linkText?: string, linkUrl?: string): JSX.Element | null {\n const { Link } = this.props;\n this.payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.telemetryContent, this.payLoad);\n if (linkText && linkUrl) {\n return (\n \n { linkText }\n \n );\n }\n return null;\n\n }\n\n private _renderSpanMenuItem(option: IMenuItemData, index?: number, isParent: boolean = false): JSX.Element | null {\n const { Span } = this.props;\n return (\n \n { option.linkText }\n \n );\n }\n\n private _renderMenu(level: string, menuOptions: JSX.Element[], currentItem?: number, submenu?: boolean): JSX.Element | null {\n\n const { DivContainer, MenuList, ImageDivContainer, showCategoryImage, showPromotionalContent, isMobileView } = this.props;\n const categoryImageDisplay = !isMobileView && (showCategoryImage || showPromotionalContent) && !ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n const promotionalContentDisplay = !isMobileView && showPromotionalContent && ArrayExtensions.hasElements(this.state.categoryImage) && !submenu;\n const DivContainerClass = this.currentLevel > 2 || categoryImageDisplay ? DivContainer!.className : 'ms-nav__deafult';\n this.currentLevel = 1;\n return (\n \n 2 && 'navmenu-multi-level')}>\n { menuOptions }\n \n {\n categoryImageDisplay && this.state.categoryImage && this.state.categoryImage.map(item => (\n \n { this.state.categoryImage && this._getCategoryImage(item) }\n { promotionalContentDisplay && this._renderPromotionalLink(item.altText, item.additionalProperties?.linkUrl)}\n ))\n }\n \n );\n }\n\n private readonly _updateCategoryImage = (categoryImageSrc: string, option: IMenuItemData) => () => {\n const linkText = option && option.linkText ? option.linkText : '';\n const promotionalImage: IImageData[] = [{ src: categoryImageSrc, altText: linkText }];\n\n // Read category and promotional image in one array\n if (ArrayExtensions.hasElements(option.promotionalContent)) {\n option.promotionalContent.map(item => {\n if (item && item.image) {\n const imageSrc = item.image.src;\n const promotionalItemImageSettings = item.image.imageSettings;\n promotionalImage.push({ src: imageSrc, altText: item.text, imageSettings: promotionalItemImageSettings,\n additionalProperties: { linkUrl: item.linkUrl.destinationUrl } });\n }\n });\n }\n this.setState({\n categoryImage: promotionalImage.length > 0 ? promotionalImage : [{ src: 'empty' }],\n categoryImageAltText: linkText\n });\n };\n\n private readonly _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\n if (!this.props.isMobileView) {\n this.setState({\n activeMenu: (this.state.activeMenu && this.state.activeMenu === data.id!) ? undefined : data.id!,\n parentMenu: parentId\n });\n if (this.props.showCategoryImage) {\n this._updateCategoryImage(data.imageSource!, data)();\n }\n } else {\n NavigationMenuView.isBackTrack = false;\n this.setState({\n activeMenu: data.id,\n mobileViewLabelText: data.linkText!,\n parentMenu: parentId\n });\n }\n };\n\n private readonly _handleGoBack = () => () => {\n NavigationMenuView.isBackTrack = true;\n this.setState({ activeMenu: this.state.parentMenu });\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleClickOutside = (event: MouseEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.target as Node)) {\n this.setState(\n {\n activeMenu: undefined,\n mobileViewLabelText: '',\n categoryImage: null\n }\n );\n }\n };\n\n /**\n * Method to handle click outside of menu.\n * @param event -HTML event.\n */\n private readonly _handleFocusOutside = (event: FocusEvent) => {\n if (this.menuNode.current && !this.menuNode.current.contains(event.relatedTarget as Node)) {\n this._closeSubmenu();\n }\n };\n\n /**\n * Checks to assign a ref for focus.\n * @param index -Sub menu list index.\n * @param mobileViewLabelText -Parent user clicked Sub menu list.\n * @param optionLinkText -Sub menu list.\n * @returns Ref.\n */\n private readonly _shouldAddFocusMenuRef = (index: number, mobileViewLabelText?: string, optionLinkText?: string) => {\n if (!NavigationMenuView.isBackTrack && index === 0) {\n return true;\n }\n if (!optionLinkText || !mobileViewLabelText) {\n return false;\n }\n return mobileViewLabelText === optionLinkText;\n };\n\n private _closeSubmenu(): void {\n if (!this.props.isMobileView) {\n this.setState({ activeMenu: undefined, categoryImage: null, mobileViewLabelText: '' });\n }\n }\n\n private readonly _getCategoryImage = (categoryImage?: IImageData): React.ReactNode | null => {\n\n if (!categoryImage || !categoryImage.src) {\n return null;\n }\n\n const categoryImageUrl = generateImageUrl(`${categoryImage.src}`, this.props.context.actionContext.requestContext.apiSettings);\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n sm: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n md: { q: 'w=300&h=250&m=8', w: 0, h: 0 },\n lg: { q: 'w=300&h=250&m=8', w: 0, h: 0 }\n },\n lazyload: true\n };\n if (categoryImageUrl !== undefined) {\n return (\n \n );\n }\n return null;\n };\n}\n\nexport default NavigationMenuView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../tile-list-item.props.autogenerated';\n\n/**\n * Tile List links.\n */\nexport interface ITileListLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ITileListLinks component.\n * @extends {React.PureComponent}\n */\nexport class TileListLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n { editableLinks && ArrayExtensions.hasElements(editableLinks) ? : null}\n
\n );\n }\n\n /**\n * ITileListLinks component.\n * @param linkdata - Link data.\n * @returns Editable links.\n */\n private readonly _mapEditableLinks = (linkdata: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n for (const link of linkdata) {\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', this.props.telemetryContent, '', '');\n const linkText = link.linkText ? link.linkText : '';\n payLoad.contentAction.etext = linkText;\n const attributes = getTelemetryAttributes(this.props.telemetryContent, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-tile-list__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'button',\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n }\n\n return editableLinks;\n };\n}\nexport default TileListLinks;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { TileListLinks } from './components';\nimport { IHeadingData, ITileListItemProps } from './tile-list-item.props.autogenerated';\n\n/**\n * Tile-list-item view props.\n */\nexport interface ITileListItemViewProps extends ITileListItemProps<{}> {\n heading?: React.ReactNode;\n paragraph?: React.ReactNode;\n links?: React.ReactNode;\n backgroundImage?: React.ReactNode;\n thumbnailImage?: React.ReactNode;\n tileListItem: IModuleProps;\n tileListContainer: INodeProps;\n tileListImageContainer: INodeProps;\n tileListThumbnailImageContainer: INodeProps;\n tileListHeadingContainer: INodeProps;\n}\n\n/**\n *\n * TileListItem component.\n * @extends {React.PureComponent>}\n */\nexport class TileListItem extends React.PureComponent> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n\n public constructor(props: ITileListItemProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element {\n const { heading,\n paragraph,\n backgroundImage,\n thumbnailImage,\n redirectionUrl,\n links } = this.props.config;\n const tileListLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n const tileListLinkContainer = {\n tag: 'a' as NodeTag,\n className: 'ms-tile-list-container',\n role: 'link',\n href: redirectionUrl?.linkUrl.destinationUrl,\n 'aria-label': redirectionUrl?.ariaLabel\n };\n\n const tileListButtonContainer = {\n tag: 'button' as NodeTag,\n className: 'ms-tile-list-container'\n };\n const viewProps: ITileListItemViewProps = {\n ...this.props,\n heading: this._createHeading(heading),\n paragraph: this._createParagraph(paragraph),\n backgroundImage: this._renderBackgroundImage(backgroundImage),\n thumbnailImage: this._renderThumbnailImage(thumbnailImage),\n links: tileListLinks,\n tileListItem: {\n moduleProps: this.props,\n className: ''\n },\n tileListContainer: redirectionUrl ? tileListLinkContainer : tileListButtonContainer,\n tileListImageContainer: {\n className: 'ms-tile-list__image'\n },\n tileListThumbnailImageContainer: {\n className: 'ms-tile-list__thumbnail_image',\n 'aria-hidden': 'true'\n },\n tileListHeadingContainer: {\n className: 'ms-tile-list__heading'\n }\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles heading content change event.\n * @param event - Content editable event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param event - Content editable event.\n */\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.paragraph = event.target.value;\n };\n\n /**\n * Handles paragraph content change event.\n * @param linkIndex - Index of link in linkarray.\n * @returns Void.\n */\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.links?.[Number(linkIndex)]) {\n this.props.config.links[Number(linkIndex)].linkText = event.target.value;\n }\n };\n\n private _createParagraph(text?: Msdyn365.RichText): React.ReactNode | null {\n if (!text) {\n return null;\n }\n return (\n \n );\n }\n\n private _createHeading(heading?: IHeadingData): React.ReactNode | null {\n if (!heading) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(heading.text)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _renderBackgroundImage(item?: Msdyn365.IImageData,\n isAriaHiddenAttribute?: boolean): React.ReactNode | null {\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n sm: { q: 'w=328&h=412&m=6', w: 328, h: 412 },\n md: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n lg: { q: 'w=315&h=412&m=6', w: 315, h: 412 },\n xl: { q: 'w=315&h=412&m=6', w: 315, h: 412 }\n },\n lazyload: true\n };\n const verifiedImageSettings = (item?.imageSettings?.viewports) ? item.imageSettings : defaultImageSettings;\n\n return (\n \n );\n }\n\n private _renderThumbnailImage(item?: Msdyn365.IImageData,\n itemImageSettings?: Msdyn365.IImageSettings,\n isAriaHiddenAttribute?: boolean): React.ReactNode | null {\n if (!item) {\n return null;\n }\n if (StringExtensions.isNullOrWhitespace(item.src)) {\n return null;\n }\n\n return (\n \n );\n }\n}\n\nexport default TileListItem;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt 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 = (selectedInvoiceIndex: number, onClosing: () => void,\n filteredInvoices: InvoiceModel[], onSubmitRequest: (invoiceId: string) => void) => () => {\n const defaultIndex = 0;\n if (selectedInvoiceIndex >= defaultIndex) {\n onClosing();\n onSubmitRequest(filteredInvoices[selectedInvoiceIndex].id);\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>) => (event: React.ChangeEvent) => {\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 = (invoices: InvoiceModel[], 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 let updatedInvoices = filteredInvoices;\n if (!StringExtensions.isNullOrEmpty(searchInput)) {\n updatedInvoices = invoices.filter((invoice) => invoice.id.includes(searchInput));\n }\n\n setFilteredInvoices(updatedInvoices);\n\n if (ArrayExtensions.hasElements(updatedInvoices)) {\n setSelectedInvoiceIndex(0);\n } else {\n setSelectedInvoiceIndex(-1);\n }\n setShouldShowSearchResults(true);\n\n setInvoiceOptions(renderInvoiceOptions(updatedInvoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex));\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 = (filteredInvoices: InvoiceModel[], setSelectedInvoiceIndex: (newIndex: number) => void, className: string, selectedInvoiceIndex: number) => {\n return (\n
\n {filteredInvoices.map((invoice, index) => {\n const onInvoiceSelect = onInvoiceSelectHandler(setSelectedInvoiceIndex, index);\n\n const radioButtonId = `invoice__${invoice.id}`;\n\n return (\n
\n \n \n
\n );\n })}\n
\n );\n};\n\nexport const RequestInvoiceModal: React.FC = ({ className, email, isModalOpen, toggle, modalHeaderLabel, sendToEmailLabel, submitRequestLabel, cancelLabel, onSubmitRequest, invoices, searchPlaceholderLabel,\n invoicesFoundString, singleInvoiceFoundString, searchButtonAltText, resources }) => {\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 invoiceOptionsData = renderInvoiceOptions(filteredInvoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex);\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, 0));\n } else {\n setFilteredInvoices(invoices);\n setInvoiceOptions(renderInvoiceOptions(invoices, setSelectedInvoiceIndex, className, selectedInvoiceIndex));\n }\n };\n\n const searchEntered = searchEnteredHandler(invoices,\n searchInput, setFilteredInvoices, filteredInvoices,\n setSelectedInvoiceIndex, setShouldShowSearchResults,\n setInvoiceOptions, selectedInvoiceIndex, className);\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 function 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 \n {searchResultString.substring(0, invoicesFoundReplaceIndex)}\n \n \n {filteredInvoices.length}\n \n \n {searchResultString.substring(invoicesFoundReplaceIndex + 3)}\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. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { BusinessPartnerOperationDeliveryType, BusinessPartnerUsersDataActions, InvoicePaidStatus, InvoiceSearchCriteria, IQueryResultSettings, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\nimport { getCurrentAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { ArrayExtensions, getCustomer, GetCustomerInput, getInvoices, GetInvoicesInput, IQueryResultSettingsModuleConfig, QueryResultSettingsProxy, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from '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 isPageLoaded: boolean;\n payInvoiceErrorModalOpen: boolean;\n selectedButtonElement?: HTMLButtonElement | null;\n}\n\n/**\n * InvoicesList component.\n * @extends {React.Component, IInvoicesListState>}\n */\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 constructor(props: IInvoicesListProps) {\n super(props);\n\n this._queryResultSettings = QueryResultSettingsProxy.fromModuleData(\n this.props.context.request, this.props.config as IQueryResultSettingsModuleConfig).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 isPageLoaded: false,\n errorState: { errorMessage: '' },\n isInvoiceRequestModalOpen: false,\n payInvoiceErrorModalOpen: false,\n selectedButtonElement: null\n };\n }\n\n public shouldComponentUpdate(nextProps: IInvoicesListProps,\n 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 = '',\n heading\n },\n context: {\n request: {\n channel\n },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n data: {\n customerBalance\n },\n resources: {\n invoicesListTitle,\n invoicesListDescTitle,\n invoicesListDescCount\n }\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
\n {invoicesListDescTitle}\n
\n
\n {amountText}\n
\n
\n {countText}\n
\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\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 });\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
\n {this.props.resources.invoiceEmptyInvoiceLinesTitle}\n
\n
\n {this.props.resources.invoiceEmptyInvoiceLinesDescription}\n
\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\n return (\n
\n
\n {this._renderMakePayment(containerHeaderClass)}\n {this._renderInvoiceRequestButton()}\n
\n
\n {this._renderInvoiceErrors()}\n
\n
\n {this._renderInvoicesList(containerContentClass)}\n
\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(new GetInvoicesInput(searchCriteria, this._queryResultSettings), this.props.context.actionContext);\n this._initializeWithInvoices(invoices);\n }\n\n private _renderInvoicesFilter(className: string): JSX.Element {\n const filterClassName = `${className}__filter`;\n return (\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 = newErrorState.errorReason?.failureReason === 'EMPTYINPUT' ? this.props.resources.invoiceErrorInvoiceIdNotExist : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\n\n const shouldShowAdditionalInfoInPopup = errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineNotAllowedWithItemLines';\n this.setState({ errorState, payInvoiceErrorModalOpen: shouldShowAdditionalInfoInPopup, selectedButtonElement: reference?.current });\n }\n\n private _renderMakePayment(className: string): 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: { payInvoiceErrorDialogHeader, payInvoiceErrorDialogBodyErrorTitle, payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText, payInvoiceErrorDialogFooterCancelButtonText }\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 _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(new GetInvoicesInput(searchCriteria, this._queryResultSettings), this.props.context.actionContext);\n this._addInvoices(newInvoices);\n }\n\n private _renderInvoiceRequestModal(): JSX.Element {\n const customer = this.props.data.customer.result;\n const { invoiceRequestModalCancelLabel, invoiceRequestModalSubmitLabel, invoiceRequestModalHeaderLabel, invoiceRequestModalSendToEmailLabel, invoiceRequestModalSearch,\n invoiceRequestModalInvoiceSearchDisplay, invoiceRequestModalSingleInvoiceSearchDisplay, invoiceRequestModalSearchButton } = this.props.resources;\n\n return (\n \n );\n }\n\n private _onToggleInvoiceRequestModal(): void {\n\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 selectedButtonElement: this.payInvoiceRequestReference.current\n }, () => {\n this._onToggleInvoiceRequestModal();\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 private _requestInvoice(invoiceId: string): void {\n const context = { callerContext: this.props.context.actionContext };\n const b2bUserId: string = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\n\n BusinessPartnerUsersDataActions.requestInvoiceCopyAsync(context, b2bUserId, invoiceId, BusinessPartnerOperationDeliveryType.Email);\n\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(specificInvoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): 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. All rights reserved.\n * See License.txt 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\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, OrderTemplates, OrderTemplate,\n status,\n statusMessage,\n heading,\n orderTemplates,\n createOrderTemplateButton,\n templateHeaderStatusMessage\n } = props;\n\n return (\n \n {heading}\n {status !== 'SUCCESS' && statusMessage}\n \n {status === 'SUCCESS' &&\n (!OrderTemplates || !orderTemplates ||\n !ArrayExtensions.hasElements(orderTemplates)) ? (\n
\n

\n {props.resources.headingForEmptyOrderTemplateList}\n

\n

\n {props.resources.textForEmptyOrderTemplateList}\n

\n {createOrderTemplateButton}\n
\n ) : createOrderTemplateButton}\n {templateHeaderStatusMessage}\n
\n { OrderTemplates && orderTemplates && ArrayExtensions.hasElements(orderTemplates) &&\n \n {orderTemplates.map((orderTemplate) => {\n return renderOrderTemplate(orderTemplate, OrderTemplate);\n })}\n }\n
\n );\n};\n\nexport default OrderTemplateListViewComponent;\n"],"sourceRoot":""}