{"version":3,"sources":["webpack:///src/modules/invoices-list/index.ts?0857","webpack:///src/modules/business-sign-up/components/sign-up-button.tsx?37a3","webpack:///src/modules/business-sign-up/components/sign-up-error.tsx?fbb9","webpack:///src/modules/business-sign-up/components/sign-up-input.tsx?4011","webpack:///src/modules/business-sign-up/components/sign-up-label.tsx?2025","webpack:///src/modules/business-sign-up/business-sign-up.tsx?df21","webpack:///src/modules/country-picker/country-picker.tsx?051f","webpack:///src/modules/invoices-list/components/request-invoice-button.tsx?b5d9","webpack:///./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/rng.js?7d39","webpack:///./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/regex.js?255d","webpack:///./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/stringify.js?688d","webpack:///./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/validate.js?f4cd","webpack:///./node_modules/@msdyn365-commerce-modules/chat/node_modules/uuid/dist/esm-browser/v4.js?0bec","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/proactive-chat-trigger.ts?53ff","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-amount-trigger.ts?f249","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-number-of-items-trigger.ts?6e2a","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/cart-specific-product-trigger.ts?f770","webpack:///src/modules/msdyn365-pva-chat-connector/helpers/consts.ts?29a6","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/date-range-trigger.ts?7473","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/from-specific-page-trigger.ts?c7f8","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/page-visits-trigger.ts?f742","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-CountryRegion-trigger.ts?53fd","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/specific-page-trigger.ts?4028","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/triggers/wait-on-time-trigger.ts?3c0b","webpack:///src/modules/msdyn365-pva-chat-connector/proactive/index.ts?dd07","webpack:///src/modules/msdyn365-pva-chat-connector/helpers/ContextProvider.ts?3993","webpack:///src/modules/msdyn365-pva-chat-connector/helpers/StyleComposers.ts?47f6","webpack:///src/modules/msdyn365-pva-chat-connector/helpers/CommerceChatStore.ts?a21c","webpack:///src/modules/msdyn365-pva-chat-connector/components/ChatCore.tsx?8272","webpack:///src/modules/msdyn365-pva-chat-connector/components/Chat.tsx?d24f","webpack:///src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.view.tsx?1da7","webpack:///src/modules/breadcrumb/breadcrumb.view.tsx?58b4","webpack:///src/modules/image-list/image-list.tsx?18cb","webpack:///src/modules/fabrikam/views/buybox.view.tsx?68a7","webpack:///src/modules/interactive-feature-item/interactive-feature-item.view.tsx?d4e3","webpack:///src/modules/back-top-footer/back-top-footer.tsx?0e13","webpack:///src/modules/invoice-details/invoice-details.view.tsx?5ebe","webpack:///src/modules/b2b-requests-tile/components/account-b2b-requests-tile-links.tsx?4f55","webpack:///src/modules/b2b-requests-tile/b2b-requests-tile.tsx?ce42","webpack:///src/modules/cookie-compliance/components/accept-button.tsx?1709","webpack:///src/modules/cookie-compliance/components/links.tsx?807e","webpack:///src/modules/cookie-compliance/cookie-compliance.tsx?5f7e","webpack:///src/modules/image-list/image-list.view.tsx?cab9","webpack:///src/modules/footer-category/footer-category.tsx?b7b8","webpack:///src/modules/invoices-list/components/pay-invoice-component.tsx?41f4","webpack:///src/modules/breadcrumb/components/link.tsx?b7b8","webpack:///src/modules/breadcrumb/components/separator.tsx?7c35","webpack:///src/modules/breadcrumb/breadcrumb.tsx?3387","webpack:///./src/modules/faq-page/faq-page.tsx?6004","webpack:///src/index.ts?c6ae","webpack:///src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9105","webpack:///src/modules/loyalty-sign-up/components/loyalty-sign-up-small-components.tsx?d781","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.tsx?f29d","webpack:///src/modules/invoices-list/invoices-list.view.tsx?0243","webpack:///src/modules/invoices-list/components/make-payment-component.tsx?c79a","webpack:///src/modules/invoices-list/components/invoice-error-component.tsx?2e12","webpack:///./src/themes/mands/views/components/addtocart.component.tsx?f951","webpack:///src/modules/business-sign-up/business-sign-up.view.tsx?578b","webpack:///./src/themes/mands/views/account-welcome-tile.view.tsx?34fe","webpack:///src/modules/footer-category/footer-category.view.tsx?26a5","webpack:///src/modules/loyalty-sign-up/loyalty-sign-up.view.tsx?ed3f","webpack:///./src/themes/mands/views/sign-in.view.tsx?9849","webpack:///src/modules/invoices-list/helpers/pay-invoices.ts?f98a","webpack:///src/modules/invoice-details/components/invoice-details-header.tsx?d1cb","webpack:///src/modules/invoice-details/components/invoice-details-payment-summary.tsx?a7ab","webpack:///src/modules/invoice-details/components/invoice-details-products.tsx?d808","webpack:///src/modules/invoice-details/helpers/invoice-data.ts?1fa7","webpack:///src/modules/invoice-details/invoice-details.tsx?b5c9","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?6874","webpack:///src/modules/country-picker/country-picker.view.tsx?825b","webpack:///src/modules/interactive-feature-item/components/links.tsx?8ab2","webpack:///src/modules/interactive-feature-item/interactive-feature-item.tsx?340f","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?ba14","webpack:///src/modules/loyalty-terms/components/loyalty-terms-modal.tsx?c84d","webpack:///src/modules/loyalty-terms/loyalty-terms.tsx?0629","webpack:///src/modules/account-welcome-tile/account-welcome-tile.tsx?abcf","webpack:///src/modules/invoices-list/helpers/invoice-data.ts?6271","webpack:///src/modules/invoices-list/helpers/invoice-status.ts?442a","webpack:///src/modules/cookie-compliance/cookie-compliance.view.tsx?b30b","webpack:///src/modules/product-comparison-button/product-comparison-button.tsx?934c","webpack:///src/modules/invoices-list/helpers/index.ts?7d24","webpack:///./src/themes/mands/views/custom-components/mands-modal.tsx?175f","webpack:///src/modules/b2b-requests-tile/b2b-requests-tile.view.tsx?949e","webpack:///src/modules/invoices-list/components/invoices-filter-component.tsx?759c","webpack:///src/modules/msdyn365-pva-chat-connector/msdyn365-pva-chat-connector.tsx?df0e","webpack:///src/modules/account-welcome-tile/account-welcome-tile.view.tsx?a13c","webpack:///src/modules/loyalty-terms/loyalty-terms.view.tsx?5155","webpack:///src/modules/product-comparison-button/product-comparison-button.view.tsx?68cc","webpack:///./src/themes/mands/views/navigation-menu.view.tsx?73e3","webpack:///./src/themes/mands/views/components/addtowishlist.component.tsx?3510","webpack:///src/modules/invoices-list/components/request-invoice-modal.tsx?f430","webpack:///src/modules/invoices-list/invoices-list.tsx?ba10"],"names":["SignUpButton","_ref","id","className","text","ariaLabel","telemetryContent","disabled","link","onClick","payLoad","getPayloadObject","attributes","getTelemetryAttributes","React","Button","Object","assign","role","href","SignUpError","type","message","errorClassName","classnames","GetMaxLength","maxLength","parsedMaxLength","Number","parseInt","isNaN","SignUpInput","value","pattern","isRequired","onChange","fieldReference","InputType","TextArea","name","undefined","ref","SignUpLabel","forId","htmlFor","InputID","renderInputSection","inputs","needToReset","onInputChange","showErrors","addressForm","updateAddress","map","element","index","label","maxChars","customClass","baseSignUpItem","wrapper","errorMessage","Address","isAddressInput","input","updateForm","hasError","resetAddress","splice","BusinessSignUp","constructor","props","_this","super","this","BusinessSignUpDefaultInputs","FirstName","Text","resources","firstNameLabel","LastName","lastNameLabel","Email","emailAddressLabel","EmailRegex","defaultRegex","source","CompanyName","companyLabel","Department","departmentLabel","JobTitle","jobTitleLabel","Size","companySizeLabel","companyAddressLabel","Comment","commentLabel","formChildReference","moduleClassName","needsToReset","handleHeadingChange","event","config","heading","target","_onInputChange","newForm","state","formItems","forEach","item","setState","isReady","_isFormReady","hasSubmitErrors","_onAddressChange","errors","currentAddress","addressItem","find","address","addressHasErrors","showAddressErrors","currentInput","match","_onSubmit","preventDefault","context","firstName","_getItem","lastName","companyName","companyEmail","companyAddress","jobTitle","department","companySize","comments","newPartner","CompanySize","Comments","createProspectAsync","callerContext","actionContext","then","successPageURL","confirmationLink","linkUrl","destinationUrl","getUrlSync","window","location","catch","_onCancel","cleanForm","isAddress","arguments","length","_addedReference","getTelemetryObject","request","telemetryPageName","friendlyName","telemetry","componentDidMount","_this$formChildRefere","current","focus","shouldComponentUpdate","nextProps","nextState","data","render","viewProps","_objectSpread","businessSignUp","moduleProps","ContainerWrapper","editProps","onEdit","requestContext","businessSignUpForm","_renderForm","renderView","slots","signUpButtonArialabel","signUpButtonText","cancelButtonArialabel","cancelButtonText","partialAddressErrorMessage","addressSlot","form","FormWrapper","items","buttons","key","disclaimer","RichTextComponent","newFormFields","CountryPicker","_telemetryContent","_preferredSiteStorageKey","_cookieExpirationTime","closeModal","isModalOpen","_handleStayOnSiteButtonClick","_this$props$context$r","currentBaseUrl","marketSettings","urlToStore","_appendProtocolToUrl","_writeToCookie","_handleClick","storageKey","storageValue","cookieOptions","secure","sameSite","maxAge","cookies","set","baseUrl","includes","isCookieValueSet","get","_heading$tag","subheading","countryList","actionLink","isConsentGiven","countryPickerHeading","MsDyn365","tag","handleTextChange","countryPickerSubHeading","handleParagraphChange","countryPickerActionLink","createLink","currentSiteButton","tabIndex","stayOnCurrentSiteButtonText","viewprops","modalContainer","Modal","isOpen","toggle","modalTransition","timeout","shouldUpdateFocusToFirstElement","modalHeaderContainer","ModalHeader","closeButtonTabIndex","modalFooterContainer","ModalFooter","modalBodyContainer","ModalBody","renderCountryList","stayOnCurrentSiteButton","handleLinkTextChange","_this$props$config$ac","linkText","StringExtensions","isNullOrEmpty","_link$linkText","editableLink","openInNewTab","additionalProperties","onTelemetryClick","onTextChange","localeItems","renderCountry","localeItem","_image$imageSettings","_image$src","localeBaseUrl","matchedCountryItem","url","imageSize","q","w","h","defaultImageSettings","viewports","xs","lg","xl","lazyload","image","imageProps","gridSettings","imageSettings","displayString","src","altText","loadFailureBehavior","shouldSkipToMainImage","displaySubString","RequestInvoiceButton","onClicked","requestInvoiceButtonLabel","innerReference","innerRef","getRandomValues","rnds8","Uint8Array","rng","crypto","bind","msCrypto","Error","validate","uuid","REGEX","test","byteToHex","i","push","toString","substr","stringify","arr","offset","toLowerCase","TypeError","v4","options","buf","rnds","random","ProactiveChatTrigger","CartAmountTrigger","totalInCart","min","proactiveOnCartAmountMin","max","proactiveOnCartAmountMax","debug","cart","_getCart","isEmpty","TotalAmount","retVal","getContextProvider","eCommerceCustIsProactiveChat","eCommerceCustProactiveType","eCommerceCustProactiveShoppingCartAmount","getMessage","proactiveOnCartAmountMessage","proactiveDefaultMessage","getCartState","CartNumberOfItemsTrigger","numberOfItems","proactiveOnCartNoOfItemsMin","proactiveOnCartNoOfItemsMax","TotalItems","eCommerceCustProactiveShoppingCartNumberOfItems","proactiveOnCartNoOfItemsMessage","CartSpecificProductTrigger","product","isValid","CartLines","_cart$cart$CartLines","_cart$cart$CartLines2","proactiveOnCartSpecificProductList","_this$props$config$pr","j","_this$props$config$pr2","ItemId","eCommerceCustProactiveShoppingCartSpecificProduct","proactiveOnCartSpecificProductMessage","ProactiveChatNames","DateRangeTrigger","start","_toDate","proactiveOnDateRangeStart","end","proactiveOnDateRangeEnd","now","Date","setHours","getTime","DateRange","eCommerceCustProactiveFromDate","toUTCString","eCommerceCustProactiveToDate","proactiveOnDateRangeMessage","date","dateParts","split","FromSpecificPageTrigger","proactiveOnFromSpecificPageList","fromSpecificPageTrimmed","trim","document","referrer","indexOf","FromSpecificPage","eCommerceCustProactiveCameFromPage","proactiveOnFromSpecificPageMessage","PageVisitTrigger","visits","cookieName","expdate","setTime","setConsentCookie","_updateVisitCounter","proactiveOnPageVisitNumber","clear","domain","hostname","path","pathname","expires","PageVisits","eCommerceCustProactiveNumberOfVisits","proactiveOnPageVisitMessage","SpecificCountryRegionTrigger","customerCountryCode","suggestedMarket","proactiveOnSpecificLocation","eCommerceCustProactiveCountryCode","SpecificLocation","proactiveOnSpecificCountryRegionMessage","SpecificPageTrigger","proactiveOnSpecificPageList","specificPageTrimmed","SpecificPage","proactiveOnSpecificPageMessage","WaitOnTimeTrigger","proactiveOnWaitTimeSeconds","waitTimeInMilliseconds","triggerTime","WaitOnTime","eCommerceCustProactiveTimeOnPage","proactiveOnWaitTimeMessage","ProactiveTriggers","ContextProvider","user","userId","uuidv4","_getContext","enabled","_proactiveCheck","e","exception","provider","_getProvider","eCommerceOperatingUnitNumber","apiSettings","oun","eCommerceBaseUrl","eCommerceDataAreaId","channel","InventLocationDataAreaId","UserId","AccountNumber","customerAccountNumber","emailAddress","anonymousUserName","Name","eCommerceCustPageURL","eCommerceCustChatType","proactiveChatEnabled","proactive","_isProactive","getChatWrapperStyle","position","top","right","bottom","left","zIndex","display","justifyContent","getMaximizedChatWrapperStyle","isMobileDevice","height","width","padding","chatHeight","chatWidth","getChatButtonStyle","alignItems","backgroundColor","startChatButtonBackgroundColor","color","startChatButtonTextColor","borderColor","startChatButtonBorderColor","borderRadius","startChatButtonBorderRadius","borderStyle","startChatButtonBorderStyle","borderWidth","startChatButtonBorderWidth","storeLogoURL","cursor","outlineStyle","alignSelf","boxShadow","WebkitBoxShadow","MozBoxShadow","getButtonStoreLogoStyle","headerBackgroundColor","headerTextColor","marginRight","boxSizing","getChatStoreLogoStyle","margin","getChatMessagesStyle","minimized","getChatMessageHeader","chatHeaderHeight","backgroundImage","headerBackgroundImageURL","backgroundRepeat","flexDirection","chatBorderStyle","chatBorderWidth","getMinimizeButtonStyle","borderTop","borderLeft","borderRight","borderBottom","marginTop","getCloseButtonStyle","border","getChatMessageContent","chatBorderColor","getProactiveWrapperStyle","getProactiveMessageHeader","getProactiveMessageContent","getProactiveButtonStyle","outline","fontFormat","font","join","CommerceChatStore","setNewMessage","setNewMessageAction","powervaDirectlineTokenURL","botID","tenantID","fetch","method","r","json","token","app","pvaChatConnectorPowervaDirectlineTokenURL","pvaChatConnectorBotID","pvaChatConnectorTenantID","dispatch","next","action","payload","language","navigator","_activity$from","activity","from","triggerQuery","ChatCore","ReactWebChat","WebChat","setUserId","useState","useMemo","ctx","directLine","createDirectLine","directLineToken","commerceChatStore","store","createStore","actionHandler","styleOptions","bubbleStyling","bubbleBackground","bubbleTextColor","bubbleBorderColor","bubbleBorderRadius","bubbleBorderStyle","bubbleBorderWidth","bubbleFromUserBackground","bubbleFromUserTextColor","bubbleFromUserBorderColor","bubbleFromUserBorderRadius","bubbleFromUserBorderStyle","bubbleFromUserBorderWidth","getBubbleStyling","avatarStyling","avatarBorderRadius","avatarSize","botAvatarBackgroundColor","botAvatarImage","botAvatarInitials","userAvatarBackgroundColor","userAvatarImage","userAvatarInitials","showAvatarInGroup","getAvatarStyling","suggestedActionStyling","suggestedActionLayout","suggestedActionBackground","suggestedActionTextColor","suggestedActionBorderColor","suggestedActionBorderRadius","suggestedActionBorderStyle","suggestedActionBorderWidth","suggestedActionDisabledBorderStyle","suggestedActionDisabledBorderWidth","suggestedActionDisabledTextColor","suggestedActionHeight","suggestedActionImageHeight","suggestedActionsCarouselFlipperCursor","suggestedActionsCarouselFlipperBoxWidth","suggestedActionsCarouselFlipperSize","suggestedActionsFlowMaxHeight","suggestedActionsStackedHeight","suggestedActionsStackedOverflow","suggestedActionsStackedLayoutButtonMaxHeight","suggestedActionsStackedLayoutButtonTextWrap","getSuggestedActionStyling","otherStyling","groupTimestamp","sendTimeout","sendTimeoutForAttachments","timestampColor","timestampFormat","notificationDebounceTimeout","hideToaster","toasterHeight","toasterMaxHeight","toasterSingularMaxHeight","toastFontSize","toastIconWidth","toastSeparatorColor","toastTextPadding","toastErrorBackgroundColor","toastErrorColor","toastInfoBackgroundColor","toastInfoColor","toastSuccessBackgroundColor","toastSuccessColor","toastWarnBackgroundColor","toastWarnColor","typingAnimationBackgroundImage","typingAnimationDuration","typingAnimationHeight","typingAnimationWidth","videoHeight","markdownExternalLinkIconImage","markdownRespectCRLF","internalLiveRegionFadeAfter","accent","subtle","getOtherStyling","hideUploadButton","primaryFont","getChatStyleOptions","createElement","userID","Chat","loaded","setLoaded","setMinimized","newMessage","setToken","isProactive","setIsProactive","proactiveMessage","setProactiveMessage","closed","setClosed","setProvider","isMobile","variant","VariantType","Browser","Viewport","chatStyle","getChatStyling","ChatWrapperStyle","MaximizedChatWrapperStyle","ChatButtonStyle","ButtonStoreLogoStyle","ChatStoreLogoStyle","ChatMessagesStyle","ChatMessageHeader","MinimizeButtonStyle","CloseButtonStyle","ChatMessageContent","ProactiveWrapperStyle","ProactiveMessageHeader","ProactiveMessageContent","ProactiveButtonStyle","RedDotStyle","background","handleMaximizeButtonClick","useEffect","getDirectLineToken","contextProvider","prov","init","setTimeout","isValidToken","style","alt","fontWeight","fontSize","chatButtonHeader","chatButtonText","flexGrow","handleMinimizeButtonClick","handleCloseButtonClick","version","viewBox","xmlSpace","d","fill","unableToLoadChatMessage","p","interval","setInterval","clearInterval","BreadCrumbView","root","links","backButton","BreadcrumbContainer","BreadcrumbList","BreadcrumbListItem","separator","Module","Node","error","ImageList","images","paragraph","_renderImageListItems","imageList","disableLazyLoad","imageLink","imageLinkText","imageLinkAriaLabel","imageLinkOpenInNewTab","Msdyn365","linkAltText","linkAriaLabel","linkOpenInNewTab","imageListTitle","imageListHeading","imageListContainer","imageListItem","imageListItemAnchorTag","imageListItems","_renderTextBlock","textBlocks","_renderSocialShare","socialShare","_renderCartAndActions","addToCart","addToOrderTemplate","addToWishlist","errorBlock","button","_renderConfigure","configure","ContainerProps","dropdowns","_renderConfigureDropdown","dropdown","LabelContainerProps","select","_renderFindInStore","findInStore","storeSelector","description","modal","productPickupOptionList","onChangeHandler","callbacks","newValue","updateQuantity","_renderQuantity","quantityComponent","extentionResources","quantityLimitsMessages","quantity","IncrementalQuantity","currentCount","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderKeyInPrice","keyInPrice","_renderShopSimilarItem","shopSimilarItem","BuyboxView","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","price","title","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","mediaGallery","bulkPurchaseLink","MagicNumber","FeatureItemViewComponent","isMosaic","featureItem","indexItem","itemCounter","renderMosaic","thisProps","interactiveFeatureCollectionMosaicContainer","interactiveFeatureCollectionMosaicImage","interactiveFeatureCollectionMosaicDetails","indexAux","caseNumberOne","itemCounterAux","caseNumberZero","modularAux","modularDivisor","firstRow","caseNumberTwo","lastRow","onCornerRight","onCornerLeft","containerClasses","interactiveFeatureCollectionCarouselContainer","interactiveFeatureCollectionCarouselImage","interactiveFeatureCollectionCarouselContent","renderCarousel","BackTopFooter","backtoTopText","destination","BackToTop","InvoiceDetailsView","header","products","paymentDetails","payInvoiceError","B2bRequestsTileLinks","ArrayExtensions","hasElements","editableLinks","_mapEditableLinks","linkdata","contentAction","etext","B2bRequestsTile","linkIndex","isChannelTypeB2B","b2bRequestsTile","CookieComplianceAcceptButton","acceptCookiesButtonText","acceptCookiesButtonAriaLabel","onClose","CookieComplianceLinks","CookieCompliance","actionLinks","handleContentChange","content","visible","cookieRef","_onDismiss","acceptCookiesAriaLabel","moduleConfig","isBrowser","onDismiss","CookieComplianceBanner","AlertProps","fade","Content","acceptButton","reload","imageListView","indexKey","FooterCategory","categories","FooterList","FooterListItem","PayInvoiceComponentActions","async","_event","setDisabled","payInvoices","invoice","errorState","onError","reference","onClickHandler","PayInvoiceComponent","msdyn365Commerce","createComponent","component","payInvoiceButtonAriaLabel","canBePaid","payInvoiceButtonText","Link","noclick","attribute","itemProp","Separator","Breadcrumb","_pageType","urlTokens","pageType","_getRootLink","_getCustomBreadcrumbLinks","itemPosition","keyIndex","_getCategoryHierarchy","categoryHierarchy","result","_getFriendlyName","locale","NameTranslations","Url","nameTranslations","_nameTranslation","nameTranslation","Language","_getPDPLinks","categoryPaths","requestUrl","hideProductName","_goBack","history","back","_getPDPBackButton","query","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","breadcrumbType","linkSeparator","breadcrumbViewProps","FaqPage","resetTabLabel","getSelectedLabel","tabLabels","_selectedTabLabel","URLSearchParams","search","selectedTabLabel","tabLabel","selectedTab","onClickTab","activeTab","tabDescriptions","mobileView","device","Type","tabDescription","isMobileView","viewport","_window","innerWidth","sm","md","getViewport","onSelectAllHandler","isSelected","invoices","InvoicesTableComponent","setIsMobile","updateViewport","addEventListener","rowClassName","headerClassName","InvoicesTableHeaderComponent","typeName","isSelectedAll","all","isAdmin","customer","IsB2bAdmin","onSelectAll","InvoicesTableRowComponent","invoiceReferences","invoiceButtonReferences","payInvoiceReferences","payInvoiceButtonReferences","onRequestInvoice","SignUpText","LoyaltySignUp","handleMemberHeadingChange","memberHeading","_issueLoyalty","isAuthenticated","clicked","IssueLoyaltyInput","issueLoyalty","TelemetryConstant","SignIn","loyaltySignInAttributes","SignUp","loyaltySignUpAttributes","LoyaltyDetailLink","loyaltyDetailsLinkAttributes","LoyaltyTermsLink","loyaltyTermsLinkAttributes","_data$customerInforma","_this$props$context$a","signInUrl","termsUrl","loyaltyJoinUrl","origin","signInurl","completeClass","classname","loyaltyCard","hasLoyaltyAccount","CardTenderTypeValue","customerInformation","invalidAsyncCustomerState","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","infoMessageBar","accountProcessingPendingInfoMessage","loading","params","isEditor","status","signInLink","joinLoyaltyButtonText","signUpText","loyaltyProgramText","signUpButton","detailsLink","viewLoyaltyPageText","termsLink","loyaltyTermsLinkText","__decorate","observer","InvoiceListView","filter","invoiceRequestModal","pagination","MakePaymentComponentActions","buttonReferences","MakePaymentComponent","hasInvoices","makePaymentButtonAriaLabel","makePaymentButtonText","InvoiceErrorComponent","messageHeader","otherError","showError","payInvoiceErrorModalOpen","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","cartUrl","setPayInvoiceErrorModalClose","errorMessages","Fragment","Alert","assertive","AddToCartComponentActions","setAddtoCartModal","setProduct","setCheckoutUrl","setQuantity","_props$productAvailab","cartError","addToCartError","productToAdd","propogateError","getSelectedProduct","cartState","addProductToCart","count","availableQuantity","productAvailability","AvailableQuantity","enableStockCheck","navigationUrl","propogateResult","failureReason","cartActionResult","AddToCart","isAddToCartModalOpen","checkoutUrl","MandsModal","modalTitle","addToCartModalTitle","modalBody","addToCartModalBody","modalFooter","addToCartModalFooter","getLinkText","shouldShowOutOfStock","defaultProps","_dimensions$sizeDimen","productName","dimensions","Dimensions","sizeDimensionsIndex","findIndex","dim","DimensionTypeValue","Price","toFixed","productImage","PrimaryImageUrl","DimensionValue","Value","navigateToCart","outOfStockText","addToCartText","RecordId","missingDimensions","dimension","stockLeft","Math","outOfStockThreshold","includeCurrentQuantity","outOfStockThresholdLocal","currentQuantity","onAdd","BusinessSignUpItem","BusinesSignUpView","AccountWelcomeTileView","AccountWelcomeTile","signOutLinkText","signOutUrl","FooterCategoryView","category","LoyaltySignUpView","SignInLoading","icon","SignInView","signIn","viewState","defaultAADConainer","aadConainer","signInSection","signUpSection","signInSectionHeading","signInLocalAccount","signUpSectionHeading","signUpLink","guestURL","isShowLoading","LocalAccount","guesturl","localAccount","forgetPassword","signInButton","invoicesToAdd","errorReason","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","InvoiceDetailsHeaderComponent","invoiceDetails","invoiceNumberText","invoiceIdLabel","replace","invoiceOrderItemsText","lines","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","formatShortDate","cultureFormatter","formatDate","year","month","day","invoiceDate","dueDate","formatLongDate","dueDateText","invoicePaymentDueDateText","isOnBehalfOfRequest","isOboRequest","invoicePlacedByLabel","customerName","invoiceAmountDueText","amount","amountDue","currencyCode","formatCurrency","formatAmount","InvoiceDetailsPaymentDetailsComponent","invoicePaymentDetails","lineClassName","ObjectExtensions","isNullOrUndefined","totalDiscount","invoicePaymentDiscounts","subtotal","invoicePaymentSubtotal","totalCharges","invoicePaymentCharges","totalTax","invoicePaymentTax","totalAmount","invoicePaymentInvoiceTotal","line","InvoiceDetailsProductsComponent","productLineClass","productLineInfoContainerClass","productLineDetailsClass","productLineSmallDetailsClass","Quantity","productUrl","ProductName","ProductId","getProductPageUrlSync","_renderProductImage","_context$request$app","cropFocalRegion","fallbackImage","getFallbackImageUrl","OmniChannelMedia","Image","primaryImageUrl","fallBackSrc","_renderProductDimensions","isNullOrWhitespace","ColorName","invoiceProductColor","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","invoiceQuantity","NetAmount","InvoiceDetailsModel","Id","InvoiceDate","CustomerName","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","SalesInvoiceLine","_products$find","TotalDiscount","InvoiceSubtotal","TotalCharges","TotalTaxAmount","CurrencyCode","InvoicePaidStatus","Paid","InvoiceDetails","_onAddToCartFailed","_setPayInvoiceErrorModalClose","_getProducts","ChannelId","invoiceDetailsModel","_renderHeader","_renderProducts","_renderPaymentDetails","_renderInvoiceErrors","_className","channelId","productInputs","ProductInput","getSimpleProductsAction","newErrorState","errorHost","_this$state$errorStat","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","switchCheckedState","headerCells","getMobileHeaderCells","invoiceListSelectAllRadioAriaLabelText","checked","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","countryPickerView","country","InteractiveFeatureCollectionLinks","InteractiveFeatureItem","_this$props$config$li","featureItemLinks","_createHeading","_createParagraph","_renderImage","tabindex","isAriaHiddenAttribute","_item$imageSettings","_this$props$config$im","verifiedImageSettings","moduleType","imagePropertyName","onRequestSpecificInvoice","requestInvoiceButtonReference","setShowPreviousActions","onClickViewDetails","linkToInvoiceDetails","isShowActions","setShowActions","shouldShowActions","extraActionsPopup","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","invoiceActionsButtonTextAriaLabel","invoiceActionsButtonIsOnBehalfOfTextAriaLabel","showActions","getInvoiceDetailsPageUrlSync","actionsContainerClassName","payInvoiceClassName","invoiceRequestButtonLabel","onSelectLine","rowCells","getMobileRowCells","invoiceRowArialabel","format","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","isCurrentUser","invoiceCurrentUser","LoyaltyTermsModal","LoyaltyTermsCancel","loyaltyTermCancelAttributes","LoyaltyTermsSubmit","loyaltyTermSubmitAttributes","LoyaltyTermsAgree","loyaltyTermCheckboxAttributes","onToggle","applicationNode","returnFocusRef","returnRef","modalHeader","cancelButton","cancelLoyaltyTermsText","submitButton","onSubmit","joinLoyaltyTermsText","loyaltyTermsHeading","terms","agreeSection","checkbox","onCheck","agreeText","loyaltyAgreeToTerms","LoyaltyTerms","_toggle","_submit","_checkboxChecked","toggleRef","isJoining","substring","qsps","qsp","splitQsp","hideToggle","serviceTerms","modalToggle","joinLoyaltytermsToggleText","CardNumber","card","redirectToLoyalty","getLoyaltyCardAsync","fullCard","update","GetLoyaltyCardInput","accountInfo","accountInformation","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","Unpaid","invoiceStatusUnpaid","PartiallyPaid","invoiceStatusPartiallyPaid","invoiceStatusPaid","CookieComplianceView","ProductComparisonButton","PureComponent","_addToProductComparison","_this$props$data$acco","ProductComparisonItem","catalogId","ProductComparisonState","instance","addItem","_removeFromProductComparison","_this$props$data$acco2","removeItemById","comparisonItemId","_getNewState","_this$props$data$acco3","getItemId","_getProdutComparisonDataByCatalogId","canProductBeAddedToProductComparison","hasItemById","currentProductsCount","_instanceId","Random","Guid","generateGuid","_shouldUsePreview","_productComparisonPreview","_renderProductComparisonPreview","productComparisonPreview","buttonText","isDisabled","_this$props$data$acco4","listModifiedEvent","subscribe","instanceId","handler","getSnapshotBeforeUpdate","previousProps","componentWillUnmount","_this$props$data$acco5","unsubscribe","buttonClassName","shouldDisplayText","removeFromComparisonButtonText","productComparisonButton","_renderProductComparisonButton","productsLimit","_getProductsLimit","addToComparisonLimitReachedButtonText","addToComparisonButtonText","productComparisonMobileProductsLimit","productComparisonDesktopProductsLimit","_this$props$data$acco6","_items$filter","getCatalogId","autoFocus","B2bRequestsTileView","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","onStateClick","InvoicesFilterComponent","popoverRef","createRef","popoverState","setPopoverState","togglePopover","useCallback","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","Popover","placement","EnumExtensions","getEnumValues","renderFilterStateItem","stateStringRepresentation","PvaChatConnector","botFrameworkCDNURL","pvaChatConnectorBotFrameworkCDNURL","script","crossOrigin","body","appendChild","LoyaltyTermsView","ProductComparisonButtonViewFunctionalComponent","NavigationMenuView","_currentLevel","handleCollapse","collapseNumber","collapseItem","isMenuCollapseOpen","_renderDisplay","ListItem","menuItemData","activeMenu","menuItemList","menuItem","isBackTrack","parentMenu","mobileViewLabelText","_getFromSubMenu","_createMenuItemList","subMenus","subMenu","found","renderMenuItemMobileView","menuId","isCollapseOpen","_renderButtonMenuItem","Collapse","_renderSubMenu","renderSubMenuForUniformBySchoolCategory","filterNavlist","_menuItemData$subMenu","_menuItemData$subMenu2","menuLength","leftSideNavList","slice","rightSideNavList","shift","subMenusList","subItem","menuOptions","option","idx","linkURL","_renderLinkMenuItem","_renderSpanMenuItem","_renderMenu","onMouseEnter","_handleDropdownToggle","onFocus","_closeSubmenu","_getCategoryIdFromUrl","splitPath","categoryPathSplitted","formattedCatId","Span","level","currentItem","MenuList","currentLevel","parentId","_resetFocus","_handleGoBack","menuNode","_handleClickOutside","contains","removeEventListener","MobileBackButton","MobileDescriptionContainer","MobileDescriptionLabel","Navigation","uniformBySchoolLink","isUniformBySchool","mainMenu","hasSubs","mandsLink","categoryId","sitePath","canonicalDomain","_getDestURL","AddToWishlistComponentActions","waiting","setWaiting","doesProductExistInWishlist","removeFromWishlist","setContent","showAlert","wishlists","CommerceListLines","wishlistItem","propogateSuccess","onSuccess","cartline","canAddMasterProduct","AsyncResult","resolve","userAccountNumber","callAddWishlistLine","wishlistName","nameOfWishlist","listData","CustomerId","CommerceListTypeValue","createCommerceListAsync","commerceList","warning","wishlistId","productId","addLinesAsync","buildWishlistLine","createdCommerceList","createGetByCustomerInput","setCanRemove","wishlistTextMessage","addToWishlistMessage","addItemToWishlistError","removedFromWishlistMessage","removeItemFromWishlistError","accountNumber","wishlistLine","removeLinesAsync","AddToWishlist","canRemove","removeFromWishlistButtonText","addToWishlistButtonText","showStatusMessage","showRemoveButton","showButtonText","showButtonTooltip","tooltipPosition","addToWishlistRef","removeFromWishlistRef","showMessage","showTooltip","tooltipPos","UncontrolledTooltip","trigger","onDismissHandler","onSubmitRequestClick","onClosing","filteredInvoices","onSubmitRequest","checkboxRef","closingFlag","_inputInvoice$current","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","_invoice","_checkboxRef$current$","onInvoiceSelect","onInvoiceSelectHandler","checkboxId","checkboxName","RequestInvoiceModal","email","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","_focusElement$current","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","searchResultString","invoicesFoundReplaceIndex","horizontalPosition","verticalPosition","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","placeholder","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isLoading","isPageLoaded","isInvoiceRequestModalOpen","_customerBalance$resu","_customerBalance$resu2","_heading$text","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","Heading","_renderInvoiceRequestModal","_renderInvoicesFilter","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","reaction","_this$props$data$b2bU","b2bUserId","b2bUserInformation","B2BUserId","invoiceId","BusinessPartnerUsersDataActions","requestInvoiceCopyAsync","BusinessPartnerOperationDeliveryType","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","BusinessPartnerId","getCustomer","GetCustomerInput","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","_renderInvoiceInCartPaymentMessage","tableClassName","_newErrorState$errorR","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","_getSelectedInvoices","moduleId","moduleTypeName","_this$state$selectedB","invoiceErrorMessageHeader","_this$props$data$cart","hasInvoiceLine","invoiceInCartPaymentMessage","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","_this$state$selectedB2","specificInvoice"],"mappings":";6FAAA,iL,+UCmBO,MAAMA,EAAqDC,IAS7D,IAT8D,GAC/DC,EAAE,UACFC,EAAS,KACTC,EAAI,UACJC,EAAS,iBACTC,EAAgB,SAChBC,EAAQ,KACRC,EAAI,QACJC,GACHR,EACG,MAAMS,EAAUC,2BAAiB,QAASL,EAAkBF,GACtDQ,EAAaC,iCAAuBP,EAAkBI,GAC5D,OACII,gBAACC,SAAMC,OAAAC,OAAA,CACHf,GAAIA,EACJC,UAAWA,EAAS,aACRE,EACZE,SAAUA,EACVE,QAASA,EACTS,KAAK,SAAQ,gBACEX,EACfY,KAAMX,GACFI,GAEHR,IC5BN,MAAMgB,EAAmDnB,IAA8C,IAA7C,GAAEC,EAAE,UAAEC,EAAS,KAAEkB,EAAO,OAAM,QAAEC,GAASrB,EACtG,MAAMsB,EAAiB,GAAGpB,MAAckB,UAExC,OACIP,gBAAA,OACIZ,GAAIA,EACJC,UAAWqB,IAAWD,EAAgB,QAAYF,EAAH,SAC/CH,KAAK,QAAO,YACF,YAAW,aACV,oHAEXJ,gBAAA,KAAGX,UAAcoB,EAAH,SAA2BD,KCIrD,MAAMG,EAAgBC,IAClB,GAAIA,EAAW,CACX,MAAMC,EAAkBC,OAAOC,SAASH,EAAW,IACnD,IAAKI,MAAMH,GACP,OAAOA,IAONI,EAAmD9B,IAU3D,IAV4D,GAC7DC,EAAE,KACFmB,EAAI,MACJW,EAAK,QACLC,EAAO,UACP9B,EAAS,UACTuB,EAAS,WACTQ,EAAU,SACVC,EAAQ,eACRC,GACHnC,EACG,OAAIoB,IAASgB,EAAUC,SAEfxB,gBAAA,YACIZ,GAAIA,EACJqC,KAAMrC,EACN8B,MAAOA,EACP7B,UAAW,GAAGA,gBAAwBA,KAAaD,IAAI,gBACxCgC,EACfR,UAAWD,EAAaC,GACxBS,SAAUA,IAMlBrB,gBAAA,SACIZ,GAAIA,EACJm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rC,aAKpBma,gBAAgBiC,GACpB7nD,KAAKqkC,WAAWl1B,KAAK04C,GACrB7nD,KAAKmlD,+BAGDgF,uBACJ,IAAIzF,EAAmB1kD,KAAKkC,MAAMm2B,SAASyE,OAAOxJ,GAAWA,EAAQ8E,YAKrE,OAJK1H,kBAAgBC,YAAY+zB,KAC7BA,EAAmB1kD,KAAKkC,MAAMm2B,UAG3BqsB,EAGHmB,wBACJ0F,EACAld,GAEAruC,KAAKkC,MAAMm2B,SAASj2B,QAASkxB,IAErBA,EAAQ8E,WADR9E,IAAYi4B,IAMpBvrD,KAAKsC,SAAS,CACV2iD,sBAAuB5W,EAA8BxoC,UAEzD7F,KAAKmlD,iCA7hBPN,EAAYloB,YAAA,CADjBC,KACKioB,GAiiBSA","file":"static/js/8.821ff9ea343ad8c3960d.chunk.js","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './components';\nexport * from './helpers';\nexport * from './invoices-list';\nexport * from './invoices-list.data';\nexport * from './invoices-list.props.autogenerated';\nexport * from './invoices-list.view';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpButtonProps {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n link?: string;\n telemetryContent: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nexport const SignUpButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n telemetryContent,\n disabled,\n link,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent, text);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignUpButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nexport const SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n

{message}

\n \n );\n};\n\nexport default SignUpError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InputType } from '../business-sign-up';\n\nexport interface IBusinessSignUpInputProps {\n id?: string;\n type: InputType;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n isRequired: boolean;\n fieldReference?: React.RefObject;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IBusinessSignUpInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nexport const SignUpInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n isRequired,\n onChange,\n fieldReference\n}) => {\n if (type === InputType.TextArea) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n\nexport default SignUpInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IBusinessSignUpLabelProps {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nexport const SignUpLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignUpLabel;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ContentEditableEvent, getUrlSync, RichTextComponent, Text } from '@msdyn365-commerce/core';\nimport { Address, BusinessPartnerProspect } from '@msdyn365-commerce/retail-proxy';\nimport { createProspectAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBusinessSignUpConfig, IBusinessSignUpProps } from './business-sign-up.props.autogenerated';\nimport { SignUpButton, SignUpError, SignUpInput, SignUpLabel } from './components';\n\nexport interface IBusinessSignUpExtendedProps extends IBusinessSignUpProps {\n formItems?: IFormItem[];\n}\n\nexport interface IBusinessSignUpItem {\n wrapper: INodeProps;\n isAddressInput?: boolean;\n id: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input?: React.ReactNode;\n}\n\nexport interface IBusinessState {\n isReady: boolean;\n formItems: IFormItem[];\n addressHasErrors: boolean;\n showAddressErrors: boolean;\n hasSubmitErrors: boolean;\n}\n\nexport interface IBusinessSignUpLocalAccount {\n FormWrapper: INodeProps;\n items: IBusinessSignUpItem[];\n buttons: React.ReactNode[];\n errorMessage: React.ReactNode[];\n disclaimer: React.ReactNode;\n}\n\nexport interface IBusinessSignUpViewProps {\n className: string;\n businessSignUp: IModuleProps;\n ContainerWrapper: INodeProps;\n heading: React.ReactNode;\n businessSignUpForm: IBusinessSignUpLocalAccount;\n formItems: IFormItem[];\n}\n\nexport interface IFormItem {\n id: string;\n type: InputType;\n label: string;\n value: string;\n maxChars?: string;\n isRequired: boolean;\n pattern?: string;\n address?: Address;\n customClass?: string;\n fieldReference?: React.RefObject;\n}\n\nexport enum InputType {\n // eslint-disable-next-line @typescript-eslint/no-shadow -- Text enum doesn't override the imported Text\n Text = 'text',\n Address = 'address',\n Email = 'email',\n TextArea = 'textarea'\n}\n\nexport enum InputID {\n FirstName = 'FirstName',\n LastName = 'LastName',\n Email = 'CompanyEmail',\n CompanyName = 'CompanyName',\n Address = 'CompanyAddress',\n JobTitle = 'JobTitle',\n Size = 'CompanySize',\n Department = 'Department',\n Comment = 'Comment'\n}\n\nexport const renderInputSection = (\n inputs: IFormItem[],\n className: string,\n needToReset: boolean,\n onInputChange: (event: React.ChangeEvent) => void,\n showErrors: boolean,\n addressForm?: React.ReactNode,\n updateAddress?: (errors: boolean, currAddress?: Address) => void\n): IBusinessSignUpItem[] => {\n return inputs.map((element, index) => {\n const { id, type, label, maxChars, isRequired, pattern, customClass, value, fieldReference } = element;\n\n const baseSignUpItem: IBusinessSignUpItem = {\n wrapper: {\n className: classnames(className, `${className}-${id}`, customClass)\n },\n id,\n label: ,\n errorMessage: \n };\n\n if (type === InputType.Address) {\n if (addressForm) {\n baseSignUpItem.isAddressInput = true;\n baseSignUpItem.input = (\n <>\n {React.cloneElement(addressForm as React.ReactElement, {\n updateForm: updateAddress,\n hasError: showErrors,\n isRequired: isRequired === undefined ? false : isRequired,\n resetAddress: needToReset\n })}\n \n );\n } else {\n // If the address slot is not filled, remove this input from the form\n inputs.splice(index, 1);\n }\n } else {\n baseSignUpItem.input = (\n \n );\n }\n\n return baseSignUpItem;\n });\n};\n\n/**\n *\n * Business Request Form Modules\n * Form that a business can use to submit a request to become a partner with Microsoft.\n * @extends {React.Component>}\n */\nclass BusinessSignUp extends React.Component {\n // Used as default data\n public BusinessSignUpDefaultInputs: IFormItem[] = [\n {\n id: InputID.FirstName,\n type: InputType.Text,\n label: this.props.resources.firstNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.LastName,\n type: InputType.Text,\n label: this.props.resources.lastNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.Email,\n type: InputType.Email,\n label: this.props.resources.emailAddressLabel,\n value: '',\n isRequired: true,\n pattern: EmailRegex.defaultRegex.source,\n customClass: 'width-50'\n },\n {\n id: InputID.CompanyName,\n type: InputType.Text,\n label: this.props.resources.companyLabel,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.Department,\n type: InputType.Text,\n label: this.props.resources.departmentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.JobTitle,\n type: InputType.Text,\n label: this.props.resources.jobTitleLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Size,\n type: InputType.Text,\n label: this.props.resources.companySizeLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Address,\n type: InputType.Address,\n label: this.props.resources.companyAddressLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n },\n {\n id: InputID.Comment,\n type: InputType.TextArea,\n label: this.props.resources.commentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n }\n ];\n\n private readonly formChildReference: React.RefObject = React.createRef();\n\n private readonly moduleClassName: string = 'ms-business-sign-up';\n\n private needsToReset: boolean = false;\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IBusinessSignUpExtendedProps) {\n super(props);\n\n this.state = {\n isReady: false,\n formItems: this.props.formItems || this._addedReference(),\n addressHasErrors: false,\n showAddressErrors: false,\n hasSubmitErrors: false\n };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this.formChildReference.current?.focus();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessSignUpExtendedProps, nextState: IBusinessState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { formItems } = this.state;\n const { className, heading } = config;\n\n const viewProps = {\n ...this.props,\n businessSignUp: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n ContainerWrapper: {\n className: `${this.moduleClassName}__container`\n },\n heading: (\n \n ),\n businessSignUpForm: this._renderForm(),\n formItems\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handle the heading change event.\n * @param event - Content Editable Event.\n */\n public handleHeadingChange = (event: ContentEditableEvent): void => {\n this.props.config.heading.text = event.target.value;\n };\n\n private _renderForm(): IBusinessSignUpLocalAccount {\n const { config, resources, slots } = this.props;\n const { showAddressErrors, hasSubmitErrors, isReady, formItems } = this.state;\n const {\n signUpButtonArialabel,\n signUpButtonText,\n cancelButtonArialabel,\n cancelButtonText,\n errorMessage,\n partialAddressErrorMessage\n } = resources;\n const addressForm = (slots && slots.addressSlot && slots.addressSlot.length > 0 && slots.addressSlot[0]) || undefined;\n\n const form = {\n FormWrapper: {\n className: `${this.moduleClassName}__form `\n },\n items: renderInputSection(\n formItems,\n `${this.moduleClassName}__form-item`,\n this.needsToReset,\n this._onInputChange,\n showAddressErrors,\n addressForm,\n this._onAddressChange\n ),\n buttons: [\n ,\n \n ],\n errorMessage: [\n hasSubmitErrors && ,\n showAddressErrors && (\n \n )\n ],\n disclaimer: config.disclaimer && (\n \n )\n };\n\n if (this.needsToReset) {\n this.needsToReset = false;\n }\n\n return form;\n }\n\n private readonly _onInputChange = (event: React.ChangeEvent): void => {\n const newForm = this.state.formItems;\n newForm.forEach(item => {\n if (item.id === event.target.id) {\n item.value = event.target.value;\n }\n });\n\n // Check if form is ready, update state object with latest values, values have changed so reset hasSubmitErrros\n this.setState({\n isReady: this._isFormReady(),\n formItems: newForm,\n hasSubmitErrors: false\n });\n };\n\n private _addedReference(): IFormItem[] {\n const newFormFields = this.BusinessSignUpDefaultInputs;\n newFormFields[0].fieldReference = this.formChildReference;\n return newFormFields;\n }\n\n private readonly _onAddressChange = (errors: boolean, currentAddress?: Address): void => {\n // Find address item\n const newForm = this.state.formItems;\n const addressItem = newForm.find(item => {\n return item.type === InputType.Address;\n });\n\n // If found --> set to currentAddress\n if (addressItem) {\n addressItem.address = currentAddress;\n\n // Update state with new values and set errors to false if address is not required field\n this.setState(\n {\n formItems: newForm,\n addressHasErrors: errors,\n showAddressErrors: false\n },\n () => {\n this.setState({ isReady: this._isFormReady() });\n }\n );\n }\n };\n\n private readonly _isFormReady = (): boolean => {\n const { formItems } = this.state;\n\n for (const currentInput of formItems) {\n // Will return FALSE if:\n // - input field is required\n // IF is address AND addressHasErrors === true\n // ELSE value is undefined OR empty\n // OR\n // - pattern provided and value does not match pattern\n\n if (currentInput.isRequired) {\n if (currentInput.type === InputType.Address) {\n if (this.state.addressHasErrors) {\n return false;\n }\n } else if (currentInput.value === undefined || currentInput.value === '') {\n return false;\n }\n }\n if (currentInput.pattern !== undefined && currentInput.value.match(currentInput.pattern) === null) {\n return false;\n }\n }\n\n return true;\n };\n\n private readonly _onSubmit = (event: React.MouseEvent) => {\n if (this.state.addressHasErrors) {\n this.setState({\n showAddressErrors: true\n });\n\n event.preventDefault();\n return;\n }\n\n const { config, context } = this.props;\n\n // Check for matching id and if not empty\n const firstName = this._getItem(InputID.FirstName);\n const lastName = this._getItem(InputID.LastName);\n const companyName = this._getItem(InputID.CompanyName);\n const companyEmail = this._getItem(InputID.Email);\n const companyAddress = this._getItem(InputID.Address, true);\n const jobTitle = this._getItem(InputID.JobTitle);\n const department = this._getItem(InputID.Department);\n const companySize = this._getItem(InputID.Size);\n const comments = this._getItem(InputID.Comment);\n\n // API gets email as part of the address object, but I do not use the email input from the address component, thus we need to copy it over\n if (companyEmail && companyEmail.value && companyAddress && companyAddress.address) {\n companyAddress.address.Email = companyEmail.value;\n }\n\n const newPartner: BusinessPartnerProspect = {\n FirstName: firstName && firstName.value,\n LastName: lastName && lastName.value,\n CompanyName: companyName && companyName.value,\n Address: companyAddress && companyAddress.address && companyAddress.address,\n JobTitle: jobTitle && jobTitle.value,\n Department: department && department.value,\n CompanySize: (companySize && Number.parseInt(companySize.value, 10)) || 0,\n Comments: comments && comments.value\n };\n\n this.setState({\n isReady: false\n });\n\n // Create business partner request\n createProspectAsync({ callerContext: context.actionContext }, newPartner)\n .then(() => {\n const successPageURL =\n (config.confirmationLink && config.confirmationLink.linkUrl && config.confirmationLink.linkUrl.destinationUrl) ||\n getUrlSync('home', this.props.context.actionContext) ||\n '';\n window.location.href = successPageURL;\n })\n .catch(() => {\n this.setState({\n hasSubmitErrors: true\n });\n });\n };\n\n private readonly _onCancel = () => {\n // Reset values of the form\n const cleanForm = this.state.formItems;\n cleanForm.forEach(input => {\n input.value = '';\n });\n\n // Set reset flag so address input will get reset on next renderInputSection() call\n this.needsToReset = true;\n\n this.setState({\n isReady: false,\n formItems: cleanForm,\n addressHasErrors: true,\n showAddressErrors: false,\n hasSubmitErrors: false\n });\n };\n\n private readonly _getItem = (id: string, isAddress: boolean = false) => {\n if (isAddress) {\n return this.state.formItems.find(item => {\n return item.id === id && item.address;\n });\n }\n return this.state.formItems.find(item => {\n return item.id === id && item.value !== '';\n });\n };\n}\n\nexport default BusinessSignUp;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ICookieSetOptions, IImageDimension, ILocaleItems } from '@msdyn365-commerce/core-internal';\nimport { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n onTelemetryClick\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerData } from './country-picker.data';\nimport { IActionLinkData, ICountryPickerProps } from './country-picker.props.autogenerated';\n\n/**\n * CountryPicker view props interface.\n */\nexport interface ICountryPickerViewProps extends ICountryPickerProps {\n modalContainer: IModuleProps;\n modalHeaderContainer: INodeProps;\n modalFooterContainer: INodeProps;\n modalBodyContainer: INodeProps;\n heading?: React.ReactNode;\n subheading?: React.ReactNode;\n link?: React.ReactNode;\n countryList?: React.ReactNode[];\n isModalOpen?: boolean;\n state?: ICountryPickerState;\n stayOnCurrentSiteButton?: React.ReactNode;\n}\n\n/**\n * ICountryPickerState: Interface for Country picker State.\n */\nexport interface ICountryPickerState {\n isModalOpen: boolean;\n}\n\n/**\n *\n * CountryPicker component.\n * @extends {React.PureComponent>}\n */\nexport class CountryPicker extends React.PureComponent, ICountryPickerState> {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n private readonly _preferredSiteStorageKey: string = '_msdyn365___site_';\n\n private readonly _cookieExpirationTime = 5_184_000;\n\n public constructor(props: ICountryPickerProps) {\n super(props);\n let isCookieValueSet: boolean = false;\n if (props.context.request.cookies.get(this._preferredSiteStorageKey).value) {\n isCookieValueSet = true;\n }\n this.state = {\n isModalOpen: !isCookieValueSet && this.props.context.request.marketSettings !== undefined\n };\n }\n\n public render(): JSX.Element | null {\n const { heading, subheading, countryList, actionLink } = this.props.config;\n\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n\n if (!isConsentGiven) {\n return null;\n }\n\n const countryPickerHeading = heading && (\n \n );\n\n const countryPickerSubHeading = subheading && (\n \n );\n\n const countryPickerActionLink = actionLink && this.createLink(actionLink);\n const currentSiteButton = (\n \n );\n\n const viewprops: ICountryPickerViewProps = {\n ...this.props,\n state: this.state,\n isModalOpen: this.state.isModalOpen,\n modalContainer: {\n moduleProps: this.props,\n tag: Modal,\n className: 'ms-country-picker__dialog',\n isOpen: true,\n 'aria-label': 'country-picker',\n toggle: this.closeModal,\n modalTransition: { timeout: 0 },\n shouldUpdateFocusToFirstElement: true\n },\n modalHeaderContainer: {\n tag: ModalHeader,\n className: 'ms-country-picker__modal-header',\n toggle: this.closeModal,\n closeButtonTabIndex: 1\n },\n modalFooterContainer: {\n tag: ModalFooter,\n className: 'ms-countryPicker__modal-footer'\n },\n modalBodyContainer: {\n tag: ModalBody,\n className: 'ms-counrtyPicker__modal-body'\n },\n heading: countryPickerHeading,\n subheading: countryPickerSubHeading,\n link: countryPickerActionLink,\n countryList: countryList && this.renderCountryList(),\n stayOnCurrentSiteButton: currentSiteButton\n };\n\n return this.props.renderView(viewprops);\n }\n\n /**\n * Initiate close modal.\n */\n public readonly closeModal = (): void => {\n this.setState({\n isModalOpen: false\n });\n };\n\n public handleParagraphChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.subheading = event.target.value;\n }\n\n public handleTextChange(event: MsDyn365.ContentEditableEvent): void {\n this.props.config.heading!.text = event.target.value;\n }\n\n public handleLinkTextChange(event: MsDyn365.ContentEditableEvent): void {\n if (this.props.config.actionLink?.linkText) {\n this.props.config.actionLink.linkText = event.target.value;\n }\n }\n\n public createLink(link?: IActionLinkData): React.ReactNode | null {\n if (!StringExtensions.isNullOrEmpty(link?.linkUrl.destinationUrl)) {\n const linkText = link?.linkText ?? '';\n const payLoad = getPayloadObject('click', this._telemetryContent, '', '');\n const attributes = getTelemetryAttributes(this._telemetryContent, payLoad);\n const editableLink: MsDyn365.ILinksData = {\n ariaLabel: link?.ariaLabel,\n className: 'ms-countryPicker__link',\n linkText,\n linkUrl: link?.linkUrl.destinationUrl,\n openInNewTab: link?.openInNewTab,\n role: 'link',\n additionalProperties: attributes!,\n onClick: onTelemetryClick(this._telemetryContent, payLoad, linkText)\n };\n return (\n \n );\n }\n return null;\n }\n\n public renderCountryList(): React.ReactNode[] | undefined {\n const marketSettings = this.props.context.request.marketSettings;\n if (!marketSettings) {\n return undefined;\n }\n const localeItems = marketSettings.localeItems;\n const countryLinks = localeItems.map((value: ILocaleItems) => {\n return this.renderCountry(value);\n });\n\n return countryLinks;\n }\n\n public renderCountry(localeItem: ILocaleItems): React.ReactNode | null {\n const countryList = this.props.config.countryList;\n let baseUrl = localeItem.localeBaseUrl;\n baseUrl = this._appendProtocolToUrl(baseUrl);\n const matchedCountryItem = countryList?.find(item => item.url === baseUrl);\n if (!matchedCountryItem) {\n return null;\n }\n const imageSize: IImageDimension = { q: 'w=48&h=48&m=6', w: 0, h: 0 };\n const defaultImageSettings: MsDyn365.IImageSettings = {\n viewports: {\n xs: imageSize,\n lg: imageSize,\n xl: imageSize\n },\n lazyload: true\n };\n const image = matchedCountryItem.image;\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: image?.imageSettings ?? defaultImageSettings\n };\n return (\n \n {image && (\n \n )}\n
\n {matchedCountryItem.displayString}\n {matchedCountryItem.displaySubString}\n
\n \n );\n }\n\n /**\n * Writes the current site base url to cookie and closes the country picker modal dialog.\n */\n private readonly _handleStayOnSiteButtonClick = (): void => {\n const currentBaseUrl = this.props.context.request.marketSettings?.currentBaseUrl;\n if (currentBaseUrl) {\n const urlToStore = this._appendProtocolToUrl(currentBaseUrl);\n this._writeToCookie(this._preferredSiteStorageKey, urlToStore);\n }\n this.closeModal();\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n * @returns - This method just writes the cookie to the browser.\n */\n private readonly _handleClick = (storageKey?: string, storageValue?: string) => () => {\n this._writeToCookie(storageKey, storageValue);\n };\n\n /**\n * Handles click event of country selection.\n * @param storageKey - Cookie storage key.\n * @param storageValue - Preffered site url.\n */\n private readonly _writeToCookie = (storageKey?: string, storageValue?: string): void => {\n if (!storageKey || !storageValue) {\n return;\n }\n const cookieOptions: ICookieSetOptions = { secure: true, sameSite: 'none' };\n cookieOptions.maxAge = this._cookieExpirationTime;\n this.props.context.request.cookies.set(storageKey, storageValue, cookieOptions);\n };\n\n /**\n * Appends protocol to an url.\n * @param baseUrl - Url to be formatted.\n * @returns - URL after appending protocol.\n */\n private readonly _appendProtocolToUrl = (baseUrl: string): string => {\n return !baseUrl.includes('https://') ? `https://${baseUrl}` : baseUrl;\n };\n}\n\nexport default CountryPicker;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IRequestInvoiceButtonProps {\n innerReference?: React.RefObject;\n className: string;\n requestInvoiceButtonLabel: string;\n onClicked(): void;\n}\n\nexport const RequestInvoiceButton: React.FC = ({\n className,\n onClicked,\n requestInvoiceButtonLabel,\n innerReference\n}) => {\n return (\n \n );\n};\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IProactiveChatTrigger } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\n\n/**\n * ProactiveChatTrigger class - checks if Proactive Chat should be triggered, starts the chat and sets context\n */\nabstract class ProactiveChatTrigger implements IProactiveChatTrigger {\n public props: IPvaChatConnectorViewProps;\n public context: IChatContext;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n this.props = props;\n this.context = context;\n }\n\n /**\n * Generates Chat Context with included properties related to Proactive Chat\n * @returns TContextProvider - Chat Context\n */\n public abstract getContextProvider(): TContextProvider;\n\n /**\n * Generates chat welcome message to be used if Proactive Chat is triggered\n * @returns string - chat welcome message\n */\n public abstract getMessage(): string;\n\n /**\n * Validate specific trigger conditions if Proactive Chat should be initiated\n * @returns boolean (TRUE if Proactive Chat should be triggered)\n */\n public abstract validate(): Promise;\n}\n\nexport default ProactiveChatTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartAmountTrigger class - proactive chat is triggered if cArt amount is in preset boundaries (config.proactiveOnCartAmountMin, config.proactiveOnCartAmountMax)\n */\nclass CartAmountTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private totalInCart: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartAmountMin;\n this.max = this.props.config.proactiveOnCartAmountMax;\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Cart amount proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartAmountTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.totalInCart = cart.cart.TotalAmount || 0;\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.totalInCart && this.totalInCart <= this.max;\n } else {\n retVal = this.min <= this.totalInCart;\n }\n } else {\n if (this.max) {\n retVal = this.totalInCart <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[Chat][${CartAmountTrigger.name}] Validation result: '${retVal}'; Cart total: '${this.totalInCart}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Amount',\n eCommerceCustProactiveShoppingCartAmount: `${this.totalInCart}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartAmountMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartAmountTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartNumberOfItemsTrigger class - proactive chat is triggered if Cart Number of Items is in preset boundaries (config.proactiveOnCartNoOfItemsMin, config.proactiveOnCartNoOfItemsMax)\n */\nclass CartNumberOfItemsTrigger extends ProactiveChatTrigger {\n private min?: number;\n private max?: number;\n private numberOfItems: number = 0;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.min = this.props.config.proactiveOnCartNoOfItemsMin;\n this.max = this.props.config.proactiveOnCartNoOfItemsMax;\n\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Cart number of items proactive chat initialized with min: '${this.min}'; max: '${this.max}'.`\n );\n }\n\n public async validate(): Promise {\n const cart = await this._getCart();\n if (cart.isEmpty) {\n this.props.context.telemetry.debug(`[Chat][${CartNumberOfItemsTrigger.name}] Cart was empty. Validation returning 'false'.`);\n return false;\n }\n\n this.numberOfItems = cart.cart.TotalItems || 0;\n\n let retVal = false;\n if (this.min) {\n if (this.max) {\n retVal = this.min <= this.numberOfItems && this.numberOfItems <= this.max;\n } else {\n retVal = this.min <= this.numberOfItems;\n }\n } else {\n if (this.max) {\n retVal = this.numberOfItems <= this.max;\n } else {\n retVal = false;\n }\n }\n this.props.context.telemetry.debug(\n `[${CartNumberOfItemsTrigger.name}] Validation result: '${retVal}'; Number of items in cart: '${this.numberOfItems}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Number of Items',\n eCommerceCustProactiveShoppingCartNumberOfItems: `${this.numberOfItems}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartNoOfItemsMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartNumberOfItemsTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n// @ts-ignore\nimport { getCartState, ICartState } from '@msdyn365-commerce/global-state';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * CartSpecificProductTrigger class - proactive chat is triggered if a Product in the Cart is in preset list of products (config.proactiveOnCartSpecificProductList)\n */\nclass CartSpecificProductTrigger extends ProactiveChatTrigger {\n private product: string = '';\n\n public async validate(): Promise {\n let isValid = false;\n const cart = await this._getCart();\n if (!cart.isEmpty) {\n if (cart.cart.CartLines) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart line items was '${cart.cart.CartLines?.length}'`\n );\n for (let i = 0; i < cart.cart.CartLines?.length; i++) {\n if (cart.cart.CartLines[i]) {\n if (this.props.config.proactiveOnCartSpecificProductList) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Number of cart specific products was configured for proactive chat was '${this.props.config.proactiveOnCartSpecificProductList?.length}'`\n );\n // Find first item, from user-defined list of products, that matches the cart lines' itemId in the cart.\n for (let j = 0; j < (this.props.config.proactiveOnCartSpecificProductList?.length || 0); j++) {\n if (\n this.props.config.proactiveOnCartSpecificProductList &&\n cart.cart.CartLines[i].ItemId &&\n this.props.config.proactiveOnCartSpecificProductList[j] === cart.cart.CartLines[i].ItemId\n ) {\n this.props.context.telemetry.debug(\n `[${CartSpecificProductTrigger.name}] Matched cart line item ID '${cart.cart.CartLines[i].ItemId}' against user-defined list of specific products for proactive chat.`\n );\n isValid = true;\n break;\n }\n }\n }\n } else {\n // Rest of the CartLines are undefined\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart did not contain any cart lines.`);\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Cart was empty.`);\n }\n this.props.context.telemetry.debug(`[Chat][${CartSpecificProductTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: 'Cart Specific Product',\n eCommerceCustProactiveShoppingCartSpecificProduct: `${this.product}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnCartSpecificProductMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private async _getCart(): Promise {\n return getCartState(this.props.context.actionContext);\n }\n}\n\nexport default CartSpecificProductTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport enum ProactiveChatNames {\n DateRange = 'Date Range',\n FromSpecificPage = 'From Specific Page',\n PageVisits = 'Page Visits',\n SpecificLocation = 'Specific Location',\n SpecificPage = 'Specific Page',\n WaitOnTime = 'Wait On Time'\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * DateRangeTrigger class - proactive chat is triggered if current date is in preset date boundaries (config.proactiveOnDateRangeStart, config.proactiveOnDateRangeEnd)\n */\nclass DateRangeTrigger extends ProactiveChatTrigger {\n private start?: Date;\n private end?: Date;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.start = this._toDate(this.props.config.proactiveOnDateRangeStart);\n this.end = this._toDate(this.props.config.proactiveOnDateRangeEnd);\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Proactive chat initialized with startDate: '${this.start}'; max: '${this.end}'.`\n );\n }\n\n public async validate(): Promise {\n const now = new Date();\n now.setHours(0, 0, 0, 0);\n\n let retVal = false;\n if (this.start) {\n if (this.end) {\n retVal = this.start.getTime() <= now.getTime() && now.getTime() <= this.end.getTime();\n } else {\n retVal = this.start.getTime() <= now.getTime();\n }\n } else if (this.end) {\n retVal = now.getTime() <= this.end.getTime();\n }\n\n this.props.context.telemetry.debug(\n `[${DateRangeTrigger.name}] Validation result: '${retVal}'; Current date used to compare: '${now}'.`\n );\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.DateRange,\n eCommerceCustProactiveFromDate: this.start ? this.start.toUTCString() : '',\n eCommerceCustProactiveToDate: this.end ? this.end.toUTCString() : ''\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnDateRangeMessage || this.props.config.proactiveDefaultMessage;\n }\n\n /**\n * Converts string(us-en) to date\n * @param date string (mm/dd/yyyy)\n * @returns Date or undefined\n */\n private _toDate(date?: string): Date | undefined {\n if (date) {\n const dateParts = date.split('/');\n return new Date(+dateParts[2], +dateParts[1] - 1, +dateParts[0]);\n } else {\n return undefined;\n }\n }\n}\n\nexport default DateRangeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * FromSpecificPageTrigger class - proactive chat is triggered if user has come from specific page (the one listed in config.proactiveOnFromSpecificPageList)\n */\nclass FromSpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnFromSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Number of items in user-defined list of 'From Specific Page' was '${this.props.config.proactiveOnFromSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnFromSpecificPageList?.length || 0); i++) {\n const fromSpecificPageTrimmed: string = this.props.config.proactiveOnFromSpecificPageList[i].trim();\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] Current page URL: '${window.document.referrer}'.`\n );\n this.props.context.telemetry.debug(\n `[${FromSpecificPageTrigger.name}] Current item from user-defined list of 'From Specific Page': '${fromSpecificPageTrimmed}'.`\n );\n\n if (window.document.referrer.indexOf(fromSpecificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(\n `[Chat][${FromSpecificPageTrigger.name}] User-defined 'From Specific Page' list was undefined.`\n );\n }\n this.props.context.telemetry.debug(`[Chat][${FromSpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.FromSpecificPage,\n eCommerceCustProactiveCameFromPage: window.document.referrer\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnFromSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default FromSpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ICookieContext } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/ICookieContext';\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * PageVisitTrigger class - proactive chat is triggered if user has visited current page for (config.proactiveOnPageVisitNumber) or more times\n */\nclass PageVisitTrigger extends ProactiveChatTrigger {\n public visits: number = 0;\n private cookieName: string = 'TimesPageVisited';\n private expdate: Date;\n private cookies: ICookieContext;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.cookies = this.props.context.request.cookies;\n this.expdate = new Date();\n // Set expiry date to 365 days.\n this.expdate.setTime(this.expdate.getTime() + 24 * 60 * 60 * 1000 * 365);\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie expiry date set to: '${this.expdate}'.`);\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Cookie context is given: '${this.cookies.isConsentGiven()}'.`);\n if (this.cookies.isConsentGiven()) {\n this.cookies.setConsentCookie();\n }\n\n this._updateVisitCounter();\n }\n\n public async validate(): Promise {\n let retVal: boolean = false;\n\n if (this.props.config.proactiveOnPageVisitNumber) {\n retVal = this.visits >= this.props.config.proactiveOnPageVisitNumber;\n }\n\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Validation result: '${retVal}'.`);\n return retVal;\n }\n\n public clear(): void {\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Clearing cookie for page visit counter.`);\n this.cookies.set(this.cookieName, 0, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.PageVisits,\n eCommerceCustProactiveNumberOfVisits: `${this.visits}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnPageVisitMessage || this.props.config.proactiveDefaultMessage;\n }\n\n private _updateVisitCounter(): void {\n this.visits = this.cookies.get(this.cookieName).value || 0;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter BEFORE update: '${this.visits}.`);\n ++this.visits;\n this.props.context.telemetry.debug(`[Chat][${PageVisitTrigger.name}] Page visit counter AFTER update: '${this.visits}.`);\n\n this.cookies.set(this.cookieName, this.visits, {\n domain: window.location.hostname,\n path: window.location.pathname,\n expires: this.expdate\n });\n }\n}\n\nexport default PageVisitTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IExtendedRequest } from '../../interfaces';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if user geographically uses the website from specific country/regions(config.proactiveOnSpecificCountryRegionCountry)\n */\nclass SpecificCountryRegionTrigger extends ProactiveChatTrigger {\n private customerCountryCode: string;\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n this.customerCountryCode = (this.props.context.request).suggestedMarket || 'n/a';\n this.props.context.telemetry.debug(\n `[${SpecificCountryRegionTrigger.name}] Customer country code set to: '${this.customerCountryCode}.'`\n );\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.props.config.proactiveOnSpecificLocation\n ? this.props.config.proactiveOnSpecificLocation.toLowerCase().indexOf(this.customerCountryCode.toLowerCase()) > -1\n : false;\n this.props.context.telemetry.debug(`[Chat][${SpecificCountryRegionTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveCountryCode: this.props.config.proactiveOnSpecificLocation || '',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificLocation\n };\n };\n }\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificCountryRegionMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificCountryRegionTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { TContextProvider } from '../../../interfaces';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * SpecificPageTrigger class - proactive chat is triggered if current page is listed in config.proactiveOnSpecificPageList\n */\nclass SpecificPageTrigger extends ProactiveChatTrigger {\n public async validate(): Promise {\n let isValid = false;\n if (this.props.config.proactiveOnSpecificPageList) {\n this.props.context.telemetry.debug(\n `[${SpecificPageTrigger.name}] Number of items in user-defined list of 'Specific Pages' was '${this.props.config.proactiveOnSpecificPageList?.length}'.`\n );\n for (let i = 0; i < (this.props.config.proactiveOnSpecificPageList?.length || 0); i++) {\n const specificPageTrimmed: string = this.props.config.proactiveOnSpecificPageList[i].trim();\n this.props.context.telemetry.debug(`[] Current location URL: ${window.location.href}.`);\n this.props.context.telemetry.debug(`[] Current item from user-defined list of 'Specific Page': ${specificPageTrimmed}.`);\n if (window.location.href.indexOf(specificPageTrimmed) > -1) {\n isValid = true;\n break;\n }\n }\n } else {\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] User-defined 'Specific Page' list was undefined.`);\n }\n this.props.context.telemetry.debug(`[Chat][${SpecificPageTrigger.name}] Validation returning '${isValid}'.`);\n return isValid;\n }\n\n public getContextProvider(): TContextProvider {\n return () => {\n return {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.SpecificPage\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnSpecificPageMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default SpecificPageTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ProactiveChatNames } from '../../helpers/consts';\nimport { IChatContext, TContextProvider } from '../../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../../msdyn365-pva-chat-connector';\nimport ProactiveChatTrigger from './proactive-chat-trigger';\n\n/**\n * WaitOnTimeTrigger - proactive chat is triggered if user stays on current page for more than (config.proactiveOnWaitTimeSeconds) seconds\n */\nclass WaitOnTimeTrigger extends ProactiveChatTrigger {\n private waitTimeInMilliseconds: number | undefined;\n\n constructor(props: IPvaChatConnectorViewProps, context: IChatContext) {\n super(props, context);\n if (this.props.config.proactiveOnWaitTimeSeconds && !isNaN(this.props.config.proactiveOnWaitTimeSeconds)) {\n this.waitTimeInMilliseconds = Number(this.props.config.proactiveOnWaitTimeSeconds) * 1000;\n this.props.context.telemetry.debug(\n `[Chat][${WaitOnTimeTrigger.name}] Wait time (ms) set to: '${this.waitTimeInMilliseconds}'.`\n );\n }\n }\n\n public async validate(): Promise {\n const retVal: boolean = this.waitTimeInMilliseconds !== undefined;\n this.props.context.telemetry.debug(`[Chat][${WaitOnTimeTrigger.name}] Validation returning '${retVal}'.`);\n return retVal;\n }\n\n public getContextProvider(): TContextProvider {\n const triggerTime = Date.now() + (this.waitTimeInMilliseconds || 0);\n return () => {\n return triggerTime > Date.now()\n ? this.context\n : {\n ...this.context,\n eCommerceCustIsProactiveChat: 'True',\n eCommerceCustProactiveType: ProactiveChatNames.WaitOnTime,\n eCommerceCustProactiveTimeOnPage: `${this.waitTimeInMilliseconds ? this.waitTimeInMilliseconds : 0}`\n };\n };\n }\n\n public getMessage(): string {\n // @TODO: Add message processing if needed\n return this.props.config.proactiveOnWaitTimeMessage || this.props.config.proactiveDefaultMessage;\n }\n}\n\nexport default WaitOnTimeTrigger;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport CartAmountTrigger from './triggers/cart-amount-trigger';\nimport CartNumberOfItemsTrigger from './triggers/cart-number-of-items-trigger';\nimport CartSpecificProductTrigger from './triggers/cart-specific-product-trigger';\nimport DateRangeTrigger from './triggers/date-range-trigger';\nimport FromSpecificPageTrigger from './triggers/from-specific-page-trigger';\nimport PageVisitTrigger from './triggers/page-visits-trigger';\nimport SpecificCountryRegionTrigger from './triggers/specific-CountryRegion-trigger';\nimport SpecificPageTrigger from './triggers/specific-page-trigger';\nimport WaitOnTimeTrigger from './triggers/wait-on-time-trigger';\n\ntype ProactiveChat =\n | typeof DateRangeTrigger\n | typeof SpecificPageTrigger\n | typeof FromSpecificPageTrigger\n | typeof PageVisitTrigger\n | typeof SpecificCountryRegionTrigger\n | typeof CartAmountTrigger\n | typeof CartNumberOfItemsTrigger\n | typeof CartSpecificProductTrigger\n | typeof WaitOnTimeTrigger;\n\n/**\n * List of Proactive Chat Validators in order of validation (first proactive chat that pass validation is triggered, the rest are ommited)\n */\nexport const ProactiveTriggers: ProactiveChat[] = [\n DateRangeTrigger,\n SpecificPageTrigger,\n FromSpecificPageTrigger,\n PageVisitTrigger,\n SpecificCountryRegionTrigger,\n CartAmountTrigger,\n CartNumberOfItemsTrigger,\n CartSpecificProductTrigger,\n WaitOnTimeTrigger\n];\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IRequestContextUser } from '@msdyn365-commerce/core-internal/dist/types/interfaces/context/IRequestContext';\nimport { v4 as uuidv4 } from 'uuid';\nimport { ProactiveTriggers } from '../proactive';\nimport ProactiveChatTrigger from '../proactive/triggers/proactive-chat-trigger';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { IProactiveData } from './../interfaces';\nimport { IChatContext, TContextProvider } from '../../interfaces';\n\n/**\n *\n * ContextProvider class - generates chat context, and checks for proactive triggers\n */\nclass ContextProvider {\n public data: IProactiveData;\n public props: IPvaChatConnectorViewProps;\n private user: IRequestContextUser;\n private userId: string;\n private context: IChatContext;\n private provider: TContextProvider | undefined;\n\n constructor(props: IPvaChatConnectorViewProps) {\n this.props = props;\n this.user = this.props.context.request.user;\n this.userId = `dl_${uuidv4()}`;\n this.context = this._getContext();\n // Proactive Chat related data\n this.data = {\n enabled: false,\n timeout: this.props.config.proactiveOnWaitTimeSeconds || 0,\n message: this.props.config.proactiveDefaultMessage\n };\n }\n\n /**\n * Executes Proactive Chat validation\n * @returns TContextProvider - a function returning IChatContext object\n */\n public async init(): Promise {\n try {\n await this._proactiveCheck();\n } catch (e) {\n // Use ?debug=true to see telemetry\n // If previous block fails, chat will still be available (no need to display any errors to user)\n this.props.telemetry.exception(e);\n }\n return this.provider || this._getProvider();\n }\n\n /**\n * Returns TContextProvider - a function returning IChatContext object\n */\n private _getProvider(): TContextProvider {\n return () => {\n return {\n eCommerceOperatingUnitNumber: this.props.context.request.apiSettings.oun,\n eCommerceBaseUrl: this.props.context.request.apiSettings.baseUrl,\n eCommerceDataAreaId: this.props.context.request.channel?.InventLocationDataAreaId,\n UserId: this.userId,\n // eCommerceCust...\n AccountNumber: this.user.customerAccountNumber ? this.user.customerAccountNumber : 'N/A',\n Email: this.user.emailAddress ? this.user.emailAddress : 'N/A',\n FirstName: this.user.firstName ? this.user.firstName : this.props.config.anonymousUserName,\n LastName: this.user.lastName ? this.user.lastName : 'N/A',\n Name: this.user.name ? this.user.name : this.props.config.anonymousUserName,\n eCommerceCustPageURL: window.location.href,\n eCommerceCustChatType: 'pva',\n // Proactive chat\n eCommerceCustIsProactiveChat: 'False',\n eCommerceCustProactiveType: 'N/A',\n // Date Range\n eCommerceCustProactiveFromDate: 'N/A',\n eCommerceCustProactiveToDate: 'N/A',\n // From Specific Page\n eCommerceCustProactiveCameFromPage: 'N/A',\n // No. Page Visits\n eCommerceCustProactiveNumberOfVisits: 'N/A',\n // Specific CountryRegion\n eCommerceCustProactiveCountryCode: 'N/A',\n // Specific Page => eCommerceCustPageURL\n // eCommerceCustProactiveSpecificPage: 'N/A',\n // Wait On Time\n eCommerceCustProactiveTimeOnPage: 'N/A',\n // Shopping cart amount\n eCommerceCustProactiveShoppingCartAmount: 'N/A',\n // Shopping cart number of items\n eCommerceCustProactiveShoppingCartNumberOfItems: 'N/A',\n // Shopping cart specific product\n eCommerceCustProactiveShoppingCartSpecificProduct: 'N/A'\n };\n };\n }\n\n /**\n * Returns default IChatContext object\n */\n private _getContext(): IChatContext {\n return this._getProvider()();\n }\n\n /**\n * Validates proactive triggers to check if proactive chat should be initialized\n */\n private async _proactiveCheck(): Promise {\n if (this.props.config.proactiveChatEnabled) {\n for (let i = 0; i < ProactiveTriggers.length; i++) {\n const proactive = new ProactiveTriggers[i](this.props, this.context);\n // Only first detected proactive trigger gets executed\n if (await this._isProactive(proactive)) {\n this.props.context.telemetry.debug(`First detected proactive trigger to be executed: ${proactive}`);\n break;\n }\n }\n }\n }\n\n /**\n * Validates if proactive chat should be triggered for given ProactiveTrigger\n * @param proactive ProactiveChatTrigger\n * @returns boolean\n */\n private async _isProactive(proactive: ProactiveChatTrigger): Promise {\n this.data.enabled = await proactive.validate();\n if (this.data.enabled) {\n this.provider = proactive.getContextProvider();\n this.data.message = proactive.getMessage();\n }\n return this.data.enabled;\n }\n}\n\nexport default ContextProvider;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/**\n * Style generating functions\n */\nimport { IAvatarStyling, IBubbleStyling, IChatCustomStyle, IChatStyling, IOtherStyling, ISuggestedActionStyling } from '../interfaces';\nimport { IMsdyn365PvaChatConnectorConfig } from '../msdyn365-pva-chat-connector.props.autogenerated';\n\nconst getChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n position: config.position || 'inherit',\n top: config.top ? config.top : 'inherit',\n right: config.right ? config.right : 'inherit',\n bottom: config.bottom ? config.bottom : 'inherit',\n left: config.left ? config.left : 'inherit',\n zIndex: 1000,\n display: 'flex',\n justifyContent: 'flex-end'\n };\n};\n\nconst getMaximizedChatWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig, isMobileDevice: boolean): React.CSSProperties => {\n if (isMobileDevice) {\n return {\n height: '90%',\n width: '100%',\n bottom: '0.5em',\n right: '0',\n padding: '5px'\n };\n }\n return {\n height: config.chatHeight ? config.chatHeight : '80%',\n width: config.chatWidth ? config.chatWidth : 'inherit'\n };\n};\n\nconst getChatButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n display: 'flex',\n alignItems: 'center',\n backgroundColor: config.startChatButtonBackgroundColor || 'white',\n color: config.startChatButtonTextColor || 'inherit',\n borderColor: config.startChatButtonBorderColor || 'inherit',\n borderRadius: config.startChatButtonBorderRadius || '0px',\n borderStyle: config.startChatButtonBorderStyle || 'solid',\n borderWidth: config.startChatButtonBorderWidth ? config.startChatButtonBorderWidth : '0px',\n padding: config.storeLogoURL ? '2px 20px 2px 2px' : '10px 20px 10px 20px',\n cursor: 'pointer',\n outlineStyle: 'none',\n alignSelf: 'flex-end',\n boxShadow: '0 0 4px rgba(102,102,102,.5)',\n WebkitBoxShadow: '0 0 4px rgba(102,102,102,.5)',\n MozBoxShadow: '0 0 4px rgba(102,102,102,.5)'\n };\n};\n\nconst getButtonStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n marginRight: '12px',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatStoreLogoStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n color: config.headerTextColor || 'inherit',\n borderRadius: '50%',\n padding: '11px',\n width: '30px',\n height: '30px',\n margin: '5px 12px 5px 5px',\n alignSelf: 'center',\n borderStyle: 'solid',\n borderWidth: '1px',\n boxSizing: 'content-box'\n };\n};\n\nconst getChatMessagesStyle = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean): React.CSSProperties => {\n return {\n display: minimized ? 'none' : 'block',\n backgroundColor: config.backgroundColor || 'White',\n height: '100%',\n width: '100%',\n boxSizing: 'border-box',\n position: 'relative'\n };\n};\n\nconst getChatMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n width: '100%',\n position: 'absolute',\n top: config.chatHeaderHeight ? `-${config.chatHeaderHeight}` : '',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getMinimizeButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n borderTop: 'none',\n borderLeft: 'none',\n borderRight: 'none',\n borderBottom: `solid 2px ${config.headerTextColor || 'White'}`,\n backgroundColor: 'transparent',\n padding: '5px 10px 3px 10px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getCloseButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n border: 'none',\n color: config.headerTextColor || 'White',\n backgroundColor: 'transparent',\n padding: '0px 0px 0px 7px',\n cursor: 'pointer',\n outlineStyle: 'none',\n marginTop: '7px',\n marginRight: '7px'\n };\n};\n\nconst getChatMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n height: '100%',\n width: '100%',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveWrapperStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n flexDirection: 'column',\n display: 'flex',\n justifyContent: 'flex-end',\n backgroundColor: config.backgroundColor || 'White'\n };\n};\n\nconst getProactiveMessageHeader = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n backgroundColor: config.headerBackgroundColor || 'inherit',\n backgroundImage: `url(\"${config.headerBackgroundImageURL}\")` || 'none',\n color: config.headerTextColor || 'inherit',\n backgroundRepeat: 'no-repeat',\n display: 'flex',\n alignItems: 'flex-start',\n flexDirection: 'row',\n boxSizing: 'border-box',\n width: '100%',\n height: config.chatHeaderHeight,\n borderColor: config.headerBackgroundColor ? config.headerBackgroundColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveMessageContent = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n width: '100%',\n padding: '10px 20px',\n boxSizing: 'border-box',\n borderColor: config.chatBorderColor ? config.chatBorderColor : 'inherit',\n borderStyle: config.chatBorderStyle ? config.chatBorderStyle : 'none',\n borderWidth: config.chatBorderWidth ? config.chatBorderWidth : '0px'\n };\n};\n\nconst getProactiveButtonStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n config.chatHeaderHeight = config.chatHeaderHeight || '70px';\n return {\n color: config.headerTextColor || 'inherit',\n cursor: 'pointer',\n padding: '5px 10px',\n outline: 'none',\n border: 'none',\n backgroundColor: config.headerBackgroundColor || 'inherit',\n borderRadius: '25px'\n };\n};\n\nconst getRedDotStyle = (config: IMsdyn365PvaChatConnectorConfig): React.CSSProperties => {\n return {\n background: 'Red',\n borderRadius: '50%',\n height: '5px',\n width: '5px',\n position: 'absolute',\n right: '10px',\n bottom: '33px'\n };\n};\n\n/**\n * Generates styles for the chat wrapper, and proactive chat parts\n * @param config IMsdyn365PvaChatConnectorConfig\n * @param minimized boolean\n * @returns IChatCustomStyle\n */\nexport const getChatStyling = (config: IMsdyn365PvaChatConnectorConfig, minimized: boolean, isMobileDevice: boolean): IChatCustomStyle => {\n return {\n ChatWrapperStyle: getChatWrapperStyle(config),\n MaximizedChatWrapperStyle: getMaximizedChatWrapperStyle(config, isMobileDevice),\n ChatButtonStyle: getChatButtonStyle(config),\n ButtonStoreLogoStyle: getButtonStoreLogoStyle(config),\n ChatStoreLogoStyle: getChatStoreLogoStyle(config),\n ChatMessagesStyle: getChatMessagesStyle(config, minimized),\n ChatMessageHeader: getChatMessageHeader(config),\n MinimizeButtonStyle: getMinimizeButtonStyle(config),\n CloseButtonStyle: getCloseButtonStyle(config),\n ChatMessageContent: getChatMessageContent(config),\n ProactiveWrapperStyle: getProactiveWrapperStyle(config),\n ProactiveMessageHeader: getProactiveMessageHeader(config),\n ProactiveMessageContent: getProactiveMessageContent(config),\n ProactiveButtonStyle: getProactiveButtonStyle(config),\n RedDotStyle: getRedDotStyle(config)\n };\n};\n\nconst fontFormat = (font?: string): string | undefined => {\n if (font && font.length > 0) {\n const arr = font.split(',');\n for (let i = 0; i < arr.length; i++) {\n arr[i] = `'${arr[i].trim()}'`;\n }\n font = arr.join(', ');\n } else {\n font = \"'Calibri', 'Helvetica Neue', 'Arial', 'sans-serif'\";\n }\n\n return font;\n};\n\nconst getBubbleStyling = (config: IMsdyn365PvaChatConnectorConfig): IBubbleStyling => {\n return {\n bubbleBackground: config.bubbleBackground || 'White',\n bubbleTextColor: config.bubbleTextColor || 'Black',\n bubbleBorderColor: config.bubbleBorderColor || '#e6e6e6',\n bubbleBorderRadius: config.bubbleBorderRadius || '2',\n bubbleBorderStyle: config.bubbleBorderStyle || 'solid',\n bubbleBorderWidth: config.bubbleBorderWidth || '1',\n bubbleFromUserBackground: config.bubbleFromUserBackground || 'White',\n bubbleFromUserTextColor: config.bubbleFromUserTextColor || 'Black',\n bubbleFromUserBorderColor: config.bubbleFromUserBorderColor || '#e6e6e6',\n bubbleFromUserBorderRadius: config.bubbleFromUserBorderRadius || '2',\n bubbleFromUserBorderStyle: config.bubbleFromUserBorderStyle || 'solid',\n bubbleFromUserBorderWidth: config.bubbleFromUserBorderWidth || '1'\n };\n};\n\n// eslint-disable-next-line complexity\nconst getOtherStyling = (config: IMsdyn365PvaChatConnectorConfig): IOtherStyling => {\n return {\n groupTimestamp: config.groupTimestamp || true,\n sendTimeout: config.sendTimeout || '20000',\n sendTimeoutForAttachments: config.sendTimeoutForAttachments || '120000',\n timestampColor: config.timestampColor || 'undefined',\n timestampFormat: config.timestampFormat || 'undefined',\n notificationDebounceTimeout: config.notificationDebounceTimeout || '400',\n hideToaster: config.hideToaster || true,\n toasterHeight: config.toasterHeight || '32',\n toasterMaxHeight: config.toasterMaxHeight || '32 * 5',\n toasterSingularMaxHeight: config.toasterSingularMaxHeight || '50',\n toastFontSize: config.toastFontSize || '87.5%',\n toastIconWidth: config.toastIconWidth || '36',\n toastSeparatorColor: config.toastSeparatorColor || '#E8EAEC',\n toastTextPadding: config.toastTextPadding || '6',\n toastErrorBackgroundColor: config.toastErrorBackgroundColor || '#FDE7E9',\n toastErrorColor: config.toastErrorColor || '#A80000',\n toastInfoBackgroundColor: config.toastInfoBackgroundColor || '#CEF1FF',\n toastInfoColor: config.toastInfoColor || '#105E7D',\n toastSuccessBackgroundColor: config.toastSuccessBackgroundColor || '#DFF6DD',\n toastSuccessColor: config.toastSuccessColor || '#107C10',\n toastWarnBackgroundColor: config.toastWarnBackgroundColor || '#FFF4CE',\n toastWarnColor: config.toastWarnColor || '#3B3A39',\n typingAnimationBackgroundImage: config.typingAnimationBackgroundImage || 'undefined',\n typingAnimationDuration: config.typingAnimationDuration || '5000',\n typingAnimationHeight: config.typingAnimationHeight || '20',\n typingAnimationWidth: config.typingAnimationWidth || '64',\n videoHeight: config.videoHeight || '270',\n markdownExternalLinkIconImage:\n config.markdownExternalLinkIconImage ||\n 'url(data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIzIDMgMTggMTgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTcuMjUwMSA0LjUwMDE3SDEwLjc0OTVDMTEuMTYzNyA0LjUwMDE3IDExLjQ5OTUgNC44MzU5NiAxMS40OTk1IDUuMjUwMTdDMTEuNDk5NSA1LjYyOTg2IDExLjIxNzMgNS45NDM2NiAxMC44NTEzIDUuOTkzMzJMMTAuNzQ5NSA2LjAwMDE3SDcuMjQ5NzRDNi4wNzA3OSA1Ljk5OTYxIDUuMTAzNDkgNi45MDY1NiA1LjAwNzg2IDguMDYxMTJMNS4wMDAyOCA4LjIyMDAzTDUuMDAzMTIgMTYuNzUwN0M1LjAwMzQzIDE3Ljk0MTUgNS45Mjg4NSAxOC45MTYxIDcuMDk5NjYgMTguOTk0OUw3LjI1MzcxIDE5LjAwMDFMMTUuNzUxOCAxOC45ODg0QzE2Ljk0MTUgMTguOTg2OCAxNy45MTQ1IDE4LjA2MiAxNy45OTM1IDE2Ljg5MjNMMTcuOTk4NyAxNi43Mzg0VjEzLjIzMjFDMTcuOTk4NyAxMi44MTc5IDE4LjMzNDUgMTIuNDgyMSAxOC43NDg3IDEyLjQ4MjFDMTkuMTI4NCAxMi40ODIxIDE5LjQ0MjIgMTIuNzY0MyAxOS40OTE4I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jEwMjEgMTEuMTQ2MiAxMS44MDg0TDExLjIxODggMTEuNzI0M0wxOC40MzY5IDQuNTAxNDZIMTMuNzQ4MUMxMy4zNjg0IDQuNTAxNDYgMTMuMDU0NiA0LjIxOTMxIDEzLjAwNSAzLjg1MzI0TDEyLjk5ODEgMy43NTE0NkMxMi45OTgxIDMuMzcxNzcgMTMuMjgwMyAzLjA1Nzk3IDEzLjY0NjQgMy4wMDgzMUwxMy43NDgxIDMuMDAxNDZaIiBmaWxsPSIjMjEyMTIxIiAvPjwvc3ZnPg==)',\n markdownRespectCRLF: config.markdownRespectCRLF || 'true',\n internalLiveRegionFadeAfter: config.internalLiveRegionFadeAfter || '1000',\n accent: config.accent || '#0063B1',\n subtle: config.subtle || '#767676'\n };\n};\n\nconst getAvatarStyling = (config: IMsdyn365PvaChatConnectorConfig): IAvatarStyling => {\n return {\n avatarBorderRadius: config.avatarBorderRadius || '50%',\n avatarSize: config.avatarSize || '40',\n botAvatarBackgroundColor: config.botAvatarBackgroundColor || 'undefined',\n botAvatarImage: config.botAvatarImage || '',\n botAvatarInitials: config.botAvatarInitials || '',\n userAvatarBackgroundColor: config.userAvatarBackgroundColor || 'undefined',\n userAvatarImage: config.userAvatarImage || '',\n userAvatarInitials: config.userAvatarInitials || '',\n showAvatarInGroup: config.showAvatarInGroup || 'status'\n };\n};\n\nconst getSuggestedActionStyling = (config: IMsdyn365PvaChatConnectorConfig): ISuggestedActionStyling => {\n return {\n suggestedActionLayout: config.suggestedActionLayout || 'carousel',\n suggestedActionBackground: config.suggestedActionBackground || 'White',\n suggestedActionTextColor: config.suggestedActionTextColor || '',\n suggestedActionBorderColor: config.suggestedActionBorderColor || '',\n suggestedActionBorderRadius: config.suggestedActionBorderRadius || '0',\n suggestedActionBorderStyle: config.suggestedActionBorderStyle || 'solid',\n suggestedActionBorderWidth: config.suggestedActionBorderWidth || '2',\n suggestedActionDisabledBorderStyle: config.suggestedActionDisabledBorderStyle || 'solid',\n suggestedActionDisabledBorderWidth: config.suggestedActionDisabledBorderWidth || '2',\n suggestedActionDisabledTextColor: config.suggestedActionDisabledTextColor || '',\n suggestedActionHeight: config.suggestedActionHeight || '40',\n suggestedActionImageHeight: config.suggestedActionImageHeight || '20',\n suggestedActionsCarouselFlipperCursor: config.suggestedActionsCarouselFlipperCursor || '',\n suggestedActionsCarouselFlipperBoxWidth: config.suggestedActionsCarouselFlipperBoxWidth || '40',\n suggestedActionsCarouselFlipperSize: config.suggestedActionsCarouselFlipperSize || '20',\n suggestedActionsFlowMaxHeight: config.suggestedActionsFlowMaxHeight || '',\n suggestedActionsStackedHeight: config.suggestedActionsStackedHeight || '',\n suggestedActionsStackedOverflow: config.suggestedActionsStackedOverflow || '2',\n suggestedActionsStackedLayoutButtonMaxHeight: config.suggestedActionsStackedLayoutButtonMaxHeight || '',\n suggestedActionsStackedLayoutButtonTextWrap: config.suggestedActionsStackedLayoutButtonTextWrap || false\n };\n};\n\n/**\n * Generates style options for the Botframework-WebChat widget\n * @param config IMsdyn365PvaChatConnectorConfig\n * @returns IChatStyling\n */\nexport const getChatStyleOptions = (config: IMsdyn365PvaChatConnectorConfig): IChatStyling => {\n const bubbleStyling = getBubbleStyling(config);\n const avatarStyling = getAvatarStyling(config);\n const suggestedActionStyling = getSuggestedActionStyling(config);\n const otherStyling = getOtherStyling(config);\n return {\n hideUploadButton: true,\n primaryFont: fontFormat(config.primaryFont),\n backgroundColor: config.backgroundColor || 'White',\n ...bubbleStyling,\n ...avatarStyling,\n ...suggestedActionStyling,\n ...otherStyling\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { IAction, IDispatch, INext } from '../interfaces';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\n\nexport class CommerceChatStore {\n private props: IPvaChatConnectorViewProps;\n private setNewMessageAction: React.Dispatch>;\n private provider?: TContextProvider;\n\n /**\n * Gets conversation token\n * @param props IPvaChatConnectorViewProps\n */\n public static async getDirectLineToken(props: IPvaChatConnectorViewProps): Promise {\n if (props.config.powervaDirectlineTokenURL && props.config.botID && props.config.tenantID) {\n // use direct line token url, bot id and tenant id from module config to get conversation token\n const url = `${props.config.powervaDirectlineTokenURL}?botId=${props.config.botID}&tenantId=${props.config.tenantID}`;\n const options = { method: 'GET' };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n // use direct line token url, bot id and tenant id from app config to get conversation token\n const url = `${props.context.app.config.pvaChatConnectorPowervaDirectlineTokenURL}?botId=${props.context.app.config.pvaChatConnectorBotID}&tenantId=${props.context.app.config.pvaChatConnectorTenantID}`;\n const options = {\n method: 'GET'\n };\n return fetch(url, options)\n .then(r => r.json())\n .then(r => {\n if (r.token) {\n return r.token;\n } else {\n throw r;\n }\n });\n }\n\n /**\n * Creates a new instance of commerce store for WebChat\n * @param props IPvaChatConnectorViewProps\n * @param provider TContextProvider\n * @param setNewMessage React.Dispatch>\n */\n constructor(\n props: IPvaChatConnectorViewProps,\n provider: TContextProvider | undefined,\n setNewMessage: React.Dispatch>\n ) {\n this.props = props;\n this.provider = provider;\n this.setNewMessageAction = setNewMessage;\n }\n\n /**\n * Handles custom chat actions\n * @param param0 {\n * dispatch: IDispatch;\n * next: INext;\n * action: IAction;\n * }\n */\n public async actionHandler({ dispatch, next, action }: { dispatch: IDispatch; next: INext; action: IAction }): Promise {\n const atype = action.type;\n\n switch (atype) {\n case 'DIRECT_LINE/CONNECT_FULFILLED': {\n // sets language\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'webchat/join',\n value: { language: window.navigator.language }\n }\n });\n break;\n }\n case 'DIRECT_LINE/INCOMING_ACTIVITY': {\n const activity = action.payload.activity;\n if (activity?.from?.role === 'bot') {\n // Sets flag for new message (will be use to indicate new messages from bot when chat is minimized)\n this.setNewMessageAction(true);\n }\n break;\n }\n case 'DIRECT_LINE/POST_ACTIVITY_FULFILLED': {\n switch (action.payload.activity.name) {\n case 'webchat/join':\n {\n if (this.provider !== undefined) {\n // Sets Chat Context\n dispatch({\n type: 'WEB_CHAT/SEND_EVENT',\n payload: {\n name: 'pvaSetContext',\n value: this.provider()\n }\n });\n }\n }\n break;\n case 'pvaSetContext':\n {\n if (this.props.config.triggerQuery) {\n // Initialize chat after Chat Context is set\n dispatch({\n type: 'WEB_CHAT/SEND_MESSAGE_BACK',\n payload: {\n text: this.props.config.triggerQuery\n }\n });\n }\n }\n break;\n default: {\n // default nothing\n }\n }\n break;\n }\n default: {\n // default nothing\n }\n }\n\n return next(action);\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useMemo, useState } from 'react';\nimport { getChatStyleOptions } from '../helpers/StyleComposers';\nimport { IChatCoreProps, IAction, IDispatch } from '../interfaces';\nimport { CommerceChatStore } from '../helpers/CommerceChatStore';\n\n/**\n * Just a core Chat component\n * @param props\n */\n\nconst ChatCore: FunctionComponent = (props: IChatCoreProps) => {\n const { ReactWebChat } = window.WebChat;\n\n const [userId, setUserId] = useState('');\n useMemo(() => {\n if (props.provider) {\n const ctx = props.provider();\n if (ctx.UserId) {\n setUserId(typeof ctx.UserId === 'string' ? ctx.UserId : ctx.UserId.value.toString());\n }\n }\n }, [props.provider]);\n\n const directLine = useMemo(() => {\n return window.WebChat.createDirectLine({ token: props.directLineToken });\n }, [props.directLineToken]);\n\n const commerceChatStore = useMemo(() => {\n if (directLine && props.provider) {\n return new CommerceChatStore(props.config, props.provider, props.setNewMessage);\n }\n return undefined;\n }, [props.provider, directLine]);\n\n const store = useMemo(() => {\n return window.WebChat.createStore(\n {},\n ({ dispatch }: { dispatch: IDispatch }) => (next: (action: IAction) => IDispatch) => (action: IAction) => {\n commerceChatStore?.actionHandler({ dispatch, next, action });\n }\n );\n }, [commerceChatStore]);\n const styleOptions = getChatStyleOptions(props.config.config);\n\n return props.directLineToken !== '' ? (\n \n ) : (\n

Please wait while we are connecting.

\n );\n};\n\nexport default ChatCore;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React, { FunctionComponent, useEffect, useState } from 'react';\nimport { isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport ContextProvider from '../helpers/ContextProvider';\nimport { getChatStyling } from '../helpers/StyleComposers';\nimport { TContextProvider } from '../../interfaces';\nimport { IPvaChatConnectorViewProps } from '../msdyn365-pva-chat-connector';\nimport { CommerceChatStore } from '../helpers';\nimport ChatCore from './ChatCore';\n\nconst INVALID_TOKEN = 'INVALID_TOKEN';\nconst CLOSE_IMG_DATA =\n 'M443.6,387.1L312.4,255.4l131.5-130c5.4-5.4,5.4-14.2,0-19.6l-37.4-37.6c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4 L256,197.8L124.9,68.3c-2.6-2.6-6.1-4-9.8-4c-3.7,0-7.2,1.5-9.8,4L68,105.9c-5.4,5.4-5.4,14.2,0,19.6l131.5,130L68.4,387.1 c-2.6,2.6-4.1,6.1-4.1,9.8c0,3.7,1.4,7.2,4.1,9.8l37.4,37.6c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1L256,313.1l130.7,131.1 c2.7,2.7,6.2,4.1,9.8,4.1c3.5,0,7.1-1.3,9.8-4.1l37.4-37.6c2.6-2.6,4.1-6.1,4.1-9.8C447.7,393.2,446.2,389.7,443.6,387.1z';\n\n/**\n * Outer chat component, displays chat button, and proactive chat, and handles custom actions\n * @param props IPvaChatConnectorViewProps\n */\nconst Chat: FunctionComponent = (props: IPvaChatConnectorViewProps) => {\n const [loaded, setLoaded] = useState(false); // loaded & minimized are needed as ChatWidget should not be removed from DOM (it resets chat)\n const [minimized, setMinimized] = useState(true);\n const [newMessage, setNewMessage] = useState(false); // TODO: use this to indicate new message in minimized chat\n const [token, setToken] = useState(''); // holds conversation token for WebChat\n const [isProactive, setIsProactive] = useState(false); // if proactive chat is triggered\n const [proactiveMessage, setProactiveMessage] = useState(props.config.proactiveDefaultMessage);\n const [closed, setClosed] = useState(false);\n const [provider, setProvider] = useState();\n const isMobileDevice =\n isMobile({ variant: VariantType.Browser, context: props.context.request }) === 'xs' ||\n isMobile({ variant: VariantType.Viewport, context: props.context.request }) === 'xs';\n const chatStyle = getChatStyling(props.config, minimized, isMobileDevice); // generates chat style objects based on configuration\n const handleMaximizeButtonClick = () => {\n setLoaded(true);\n setMinimized(false);\n setNewMessage(false);\n };\n const handleMinimizeButtonClick = () => {\n setMinimized(true);\n setNewMessage(false);\n };\n const handleCloseButtonClick = () => {\n setClosed(true);\n setLoaded(false);\n setMinimized(true);\n setNewMessage(false);\n setIsProactive(false);\n };\n useEffect(() => {\n if (loaded) {\n CommerceChatStore.getDirectLineToken(props)\n .then(directLineToken => {\n setToken(directLineToken);\n })\n .catch(e => {\n setToken(INVALID_TOKEN);\n props.telemetry.exception(e);\n });\n }\n }, [loaded]);\n useEffect(() => {\n (async () => {\n const contextProvider = new ContextProvider(props); // Generates context (provider) and checks for proactive chat triggers\n const prov = await contextProvider.init();\n if (contextProvider.data.enabled) {\n props.context.telemetry.debug(`[Chat] Proactive chat was enabled: '${contextProvider.data.enabled}'.`);\n // if proactive chat is triggered\n const timeout = contextProvider.data.timeout * 1000; // timeout is there only for WaitOnTime trigger\n setTimeout(() => {\n if (!loaded) {\n props.context.telemetry.debug(`[Chat] Proactive chat was loaded: ${loaded}.`);\n setProactiveMessage(contextProvider.data.message);\n setIsProactive(true);\n }\n }, timeout);\n }\n setProvider(() => prov);\n })().catch(e => props.telemetry.exception(e));\n }, []);\n useEffect(() => {\n if (closed) {\n setClosed(false);\n }\n }, [token, provider]);\n const isValidToken = (): boolean => {\n return `${token}` !== INVALID_TOKEN;\n };\n return (\n \n {minimized && (!isProactive || (isProactive && loaded)) && (\n \n )}\n {minimized && isProactive && !loaded && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n
\n
\n

{proactiveMessage}

\n \n
\n
\n )}\n {loaded && isValidToken() && (\n
\n
\n {props.config.storeLogoURL && (\n logo\n )}\n
\n \n
\n
\n \n
\n
\n )}\n {!isValidToken() &&
{props.config.unableToLoadChatMessage}
}\n
\n );\n};\n\nexport default Chat;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport Chat from './components/Chat';\nimport { IPvaChatConnectorViewProps } from './msdyn365-pva-chat-connector';\n\nexport default (props: IPvaChatConnectorViewProps) => {\n // Only for CDN loading check, won't be needed with npm package of Botframework-WebChat\n const [loaded, setLoaded] = React.useState(false);\n const p = {\n ...props\n };\n\n // Just to verify that CDN Chat Widget js lib is loaded\n // Remove this block if moving to npm package of Botframework-WebChat\n const interval = setInterval(() => {\n const t = typeof window;\n if (t !== 'undefined' && window.WebChat) {\n setLoaded(true);\n clearInterval(interval);\n }\n }, 100);\n\n return
{loaded && }
;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBreadcrumbViewProps } from './breadcrumb';\n\nconst BreadCrumbView: React.FC = props => {\n const { root, links, backButton, BreadcrumbContainer, BreadcrumbList, BreadcrumbListItem, separator } = props;\n if (!root && !links && !backButton) {\n props.context.telemetry.error('BreadCrumb content is empty, module wont render');\n return null;\n }\n return (\n \n \n {root && (\n \n {root}\n {links && separator}\n \n )}\n {backButton && {backButton}}\n {links &&\n links.map((link, index) => (\n \n \n {link}\n {links[index + 1] && separator}\n \n \n ))}\n \n \n );\n};\n\nexport default BreadCrumbView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IImageListConfig, IImageListProps, IImagesData } from './image-list.props.autogenerated';\n\n/**\n * The interface for IImageListViewProps.\n */\nexport interface IImageListViewProps extends IImageListProps {\n imageList: IModuleProps;\n imageListHeading?: React.ReactNode;\n imageListContainer: INodeProps;\n imageListItem: INodeProps;\n imageListItemAnchorTag: INodeProps;\n imageListItems: IImageListItem[] | undefined;\n}\n\n/**\n * The interface for IImageListItem.\n */\nexport interface IImageListItem {\n image: JSX.Element | undefined;\n text: JSX.Element | undefined;\n link: string | undefined;\n linkAltText: string | undefined;\n linkAriaLabel: string | undefined;\n linkOpenInNewTab?: boolean;\n}\n\n/**\n *\n * ImageList component.\n * @extends {React.PureComponent>}\n */\nclass ImageList extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { heading } = this.props.config;\n const imageListTitle = heading && ;\n const viewProps: IImageListViewProps = {\n ...this.props,\n imageList: {\n moduleProps: this.props,\n className: classnames('ms-image-list', this.props.config.className),\n tag: 'div'\n },\n imageListHeading: imageListTitle,\n imageListContainer: {\n className: 'ms-image-list__list',\n role: 'list',\n tag: 'ul'\n },\n imageListItem: {\n className: 'ms-image-list__list-item',\n role: 'listitem',\n tag: 'li'\n },\n imageListItemAnchorTag: {\n tag: 'a',\n className: 'ms-image-list__link',\n role: 'link'\n },\n imageListItems: this._renderImageListItems()\n };\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handle paragraph change.\n * @param index - Index of image item in array of image items.\n * @returns Void.\n */\n public handleParagraphChange = (index: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.images![index]) {\n this.props.config.images![index].paragraph = event.target.value;\n }\n };\n\n /**\n * Render list of images.\n * @returns List of images with text and redirection link.\n */\n private readonly _renderImageListItems = (): IImageListItem[] | undefined => {\n const imageList: IImagesData[] | undefined = this.props.config.images;\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n lg: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n xl: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 }\n },\n lazyload: false,\n disableLazyLoad: true\n };\n return imageList?.map((item, index) => {\n const { image, link, paragraph } = item;\n\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: (image?.imageSettings ?? defaultImageSettings) as Msdyn365.IImageSettings | undefined\n };\n\n const imageLink: string | undefined = link?.linkUrl.destinationUrl;\n const imageLinkText: string | undefined = link?.linkText ?? link?.ariaLabel;\n const imageLinkAriaLabel: string | undefined = link?.ariaLabel;\n const imageLinkOpenInNewTab = link?.openInNewTab;\n\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n const imageImage = (\n \n );\n\n const imageText = paragraph && (\n \n );\n const imageListItem: IImageListItem = {\n image: imageImage,\n text: imageText,\n link: imageLink,\n linkAltText: imageLinkText,\n linkAriaLabel: imageLinkAriaLabel,\n linkOpenInNewTab: imageLinkOpenInNewTab\n };\n return imageListItem;\n });\n };\n}\n\nexport default ImageList;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxCallbacks,\n IBuyboxData,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxProps,\n IBuyboxShopSimilarLookViewProps,\n IBuyboxState,\n IBuyboxViewProps\n} from '@msdyn365-commerce-modules/buybox';\nimport { IncrementalQuantity, ITelemetryContent, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IBuyboxProps as IBuyboxExtentionProps,\n IBuyboxResources as IBuyboxExtentionResources\n} from '../definition-extensions/buybox.ext.props.autogenerated';\n\nconst BuyboxView: React.FC> = props => {\n const {\n ModuleProps,\n MediaGalleryContainerProps,\n ProductInfoContainerProps,\n addToCart,\n addToOrderTemplate,\n addToWishlist,\n telemetryContent,\n configure,\n description,\n findInStore,\n quantity,\n price,\n title,\n rating,\n callbacks,\n state,\n resources,\n inventoryLabel,\n shopSimilarLook,\n keyInPrice,\n quantityLimitsMessages,\n max,\n shopSimilarDescription,\n unitOfMeasure\n } = props;\n\n return (\n \n {props.mediaGallery}\n \n {title}\n {price}\n {unitOfMeasure}\n {props.bulkPurchaseLink}\n {description}\n {_renderTextBlock(props.slots.textBlocks)}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity, callbacks, props, state, resources, quantityLimitsMessages, max, telemetryContent)}\n {inventoryLabel}\n {_renderCartAndActions(addToCart, addToOrderTemplate, addToWishlist)}\n {findInStore && _renderFindInStore(findInStore)}\n {_renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n {shopSimilarDescription && _renderShopSimilarItem(shopSimilarDescription)}\n \n \n );\n};\n\nconst _renderTextBlock = (textBlocks: React.ReactNode[]): JSX.Element | undefined => {\n if (!textBlocks || textBlocks.length === 0) {\n return undefined;\n }\n\n return <>{textBlocks[0]};\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return <>{socialShare[0]};\n};\n\nconst _renderCartAndActions = (\n addToCart?: IBuyboxAddToCartViewProps,\n addToOrderTemplate?: IBuyboxAddToOrderTemplateViewProps,\n addToWishlist?: IBuyboxAddToWishlistViewProps\n): JSX.Element | undefined => {\n if (!addToCart && !addToWishlist) {\n return undefined;\n }\n\n return (\n
\n {addToCart && addToCart.errorBlock}\n {addToOrderTemplate && addToOrderTemplate.errorBlock}\n {addToWishlist && addToWishlist.errorBlock}\n
\n {addToCart && addToCart.button}\n {addToOrderTemplate && addToOrderTemplate.button}\n {addToWishlist && addToWishlist.button}\n
\n
\n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return {dropdowns.map(_renderConfigureDropdown)};\n};\n\nconst _renderConfigureDropdown = (dropdown: IBuyboxProductConfigureDropdownViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors, select } = dropdown;\n\n return (\n \n \n {heading}\n {errors}\n \n {select}\n \n );\n};\n\nconst _renderFindInStore = (findInStore: IBuyboxFindInStoreViewProps): JSX.Element => {\n const { ContainerProps, storeSelector, heading, description, errors, button, modal, productPickupOptionList } = findInStore;\n\n return (\n \n {storeSelector}\n {heading}\n {productPickupOptionList}\n {description}\n {errors}\n {button}\n {modal}\n \n );\n};\n\n/**\n * On Change function.\n * @param callbacks -Callbacks.\n * @returns Update quantity.\n */\nconst onChangeHandler = (callbacks: IBuyboxCallbacks) => (newValue: number): boolean => {\n if (callbacks.updateQuantity) {\n return callbacks.updateQuantity(newValue);\n }\n return true;\n};\n\nconst _renderQuantity = (\n quantityComponent: IBuyboxProductQuantityViewProps,\n callbacks: IBuyboxCallbacks,\n props: IBuyboxProps,\n state: IBuyboxState,\n extentionResources: IBuyboxExtentionResources,\n quantityLimitsMessages: React.ReactNode,\n max: number | undefined,\n telemetryContent?: ITelemetryContent\n): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, errors } = quantityComponent;\n\n const { resources } = props;\n\n const { quantity } = state;\n\n return (\n \n \n {heading}\n {errors}\n \n\n \n {quantityLimitsMessages}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return (\n \n {heading}\n {input}\n \n );\n};\n\nconst _renderShopSimilarItem = (shopSimilarItem: IBuyboxShopSimilarLookViewProps): JSX.Element => {\n const { ContainerProps, errors, input } = shopSimilarItem;\n\n return (\n \n {errors}\n {input}\n \n );\n};\n\nexport default BuyboxView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IInteractiveFeatureItemViewProps } from './interactive-feature-item';\n\n/**\n * Enumerator used to make some calculations to set the proper classnames\n * using modular calculations to see if they are in a right or left column or on first or last row.\n */\nenum MagicNumber {\n modularDivisor = 4,\n caseNumberZero = 0,\n caseNumberOne = 1,\n caseNumberTwo = 2\n}\n\n/**\n * Feature Item View.\n * @param thisProps - Feature Item view props.\n * @param indexItem - Feature Item view props.\n * @param itemCounter - Feature Item view props.\n * @returns Feature item View.\n * @extends {} InteractiveFeatureItem\n */\nconst renderMosaic = (thisProps: IInteractiveFeatureItemViewProps, indexItem?: number, itemCounter?: number): JSX.Element | null => {\n const {\n title,\n paragraph,\n image,\n links,\n interactiveFeatureCollectionMosaicContainer,\n interactiveFeatureCollectionMosaicImage,\n interactiveFeatureCollectionMosaicDetails\n } = thisProps;\n const indexAux = indexItem ? indexItem + MagicNumber.caseNumberOne : MagicNumber.caseNumberOne;\n const itemCounterAux = itemCounter ? itemCounter : MagicNumber.caseNumberZero;\n const modularAux = indexAux % MagicNumber.modularDivisor;\n const firstRow = indexAux <= MagicNumber.caseNumberTwo ? 'firstRow' : '';\n const lastRow =\n itemCounterAux && (indexAux === itemCounterAux || indexAux === itemCounterAux - MagicNumber.caseNumberOne) ? 'lastRow' : '';\n const onCornerRight = modularAux === MagicNumber.caseNumberZero ? 'item-corner-right' : '';\n const onCornerLeft = modularAux === MagicNumber.caseNumberOne ? 'item-corner-left' : '';\n const containerClasses = classnames('ms-interactive-feature-collection-mosaic', onCornerLeft, onCornerRight, firstRow, lastRow);\n\n return (\n \n {image}\n \n {title}\n {paragraph}\n {links}\n \n \n );\n};\n\n/**\n * Feature Item View.\n * @param thisProps - Feature Item view props.\n * @returns Feature item View.\n * @extends {} InteractiveFeatureItem\n */ const renderCarousel = (thisProps: IInteractiveFeatureItemViewProps): JSX.Element | null => {\n const {\n title,\n paragraph,\n image,\n links,\n interactiveFeatureCollectionCarouselContainer,\n interactiveFeatureCollectionCarouselImage,\n interactiveFeatureCollectionCarouselContent\n } = thisProps;\n return (\n \n {image}\n \n {title}\n {paragraph}\n {links}\n \n \n );\n};\n\n/**\n * Feature Item View.\n * @param props - Feature Item view props.\n * @returns Feature item View.\n * @extends {} InteractiveFeatureItem\n */\nexport const FeatureItemViewComponent: React.FC = props => {\n const { isMosaic, featureItem, indexItem, itemCounter } = props;\n if (isMosaic) {\n return <>{renderMosaic(props, indexItem, itemCounter)};\n }\n return {renderCarousel(props)};\n};\n\nexport default FeatureItemViewComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { BackToTop, getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBackTopFooterProps } from './back-top-footer.props.autogenerated';\n\n/**\n *\n * BackTopFooter component.\n * @extends {React.PureComponent>}\n */\nclass BackTopFooter extends React.PureComponent> {\n private readonly editProps: Msdyn365.ITextEditProps = {\n requestContext: this.props.context.request,\n onEdit: (event: Msdyn365.ContentEditableEvent) => (this.props.config.backtoTopText = event.target.value)\n };\n\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IBackTopFooterProps<{}>) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element | null {\n if (!this.props.config.destination) {\n this.props.telemetry.error('BackToTop.destination has not been provided, module wont render.');\n return null;\n }\n\n return (\n \n );\n }\n}\n\nexport default BackTopFooter;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IInvoiceDetailsViewProps } from './invoice-details';\n\nexport const InvoiceDetailsView: React.FC = props => {\n const { header, products, paymentDetails, payInvoiceError } = props;\n\n return (\n \n {header}\n {products}\n {paymentDetails}\n {payInvoiceError}\n \n );\n};\n\nexport default InvoiceDetailsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../../..';\n\nexport interface IB2bRequestsTileLinksProps {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst defaultClassName = 'ms-account-b2b-requests-tile';\n\nexport const B2bRequestsTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (!ArrayExtensions.hasElements(links)) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!ArrayExtensions.hasElements(linkdata)) {\n return null;\n }\n\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n return linkdata.map(link => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return {\n ariaLabel: link.ariaLabel,\n className: `${defaultClassName}__link`,\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n } as Msdyn365.ILinksData;\n });\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IB2bRequestsTileData } from './b2b-requests-tile.data';\nimport { IB2bRequestsTileProps } from './b2b-requests-tile.props.autogenerated';\nimport { B2bRequestsTileLinks } from './components/account-b2b-requests-tile-links';\n\nexport interface IB2bRequestsTileViewProps extends IB2bRequestsTileProps {\n b2bRequestsTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n}\n\n/**\n *\n * B2bRequestsTile component.\n * @extends {React.PureComponent>}\n */\nclass B2bRequestsTile extends React.PureComponent> {\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IB2bRequestsTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element | null {\n const { config } = this.props;\n const { className, heading, links } = config;\n\n const defaultClassName = 'ms-account-b2b-requests-tile';\n\n if (!isChannelTypeB2B(this.props.context.actionContext.requestContext)) {\n return null;\n }\n\n const viewProps = {\n ...this.props,\n className,\n b2bRequestsTile: {\n moduleProps: this.props,\n className: classnames(defaultClassName, config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: ArrayExtensions.hasElements(links) && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default B2bRequestsTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ICookieComplianceAcceptButton {\n acceptCookiesButtonText?: string;\n acceptCookiesButtonAriaLabel?: string;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onClose(): void;\n}\n\nexport const CookieComplianceAcceptButton: React.FC = ({\n acceptCookiesButtonText,\n acceptCookiesButtonAriaLabel,\n telemetryContent,\n onClose\n}) => {\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, 'accept cookies');\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n {acceptCookiesButtonText}\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IActionLinksData } from '../cookie-compliance.props.autogenerated';\n\nexport interface ICookieComplianceLinks {\n links: IActionLinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * ContentCardLinks component.\n * @extends {React.PureComponent}\n */\nexport class CookieComplianceLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n \n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n \n );\n }\n\n private readonly _mapEditableLinks = (linkdata: IActionLinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n linkdata.forEach((link, index) => {\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: 'link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes,\n onClick: onTelemetryClick(this.props.telemetryContent, payLoad, linkText)\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n };\n}\n\nexport default CookieComplianceLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IAlertProps, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { CookieComplianceAcceptButton, CookieComplianceLinks } from './components';\nimport { ICookieComplianceConfig, ICookieComplianceProps } from './cookie-compliance.props.autogenerated';\n\n/**\n * Alert state interface.\n */\nexport interface IAlertState {\n visible: boolean;\n}\n\n/**\n * Cookie compliance view props interface.\n */\nexport interface ICookieComplianceViewProps extends ICookieComplianceProps<{}> {\n CookieComplianceBanner: IModuleProps;\n AlertProps: IAlertProps;\n Content: INodeProps;\n text?: React.ReactNode;\n links?: React.ReactNode;\n acceptButton?: React.ReactNode;\n className: string;\n onDismiss(): void;\n}\n\n/**\n *\n * CookieCompliance component.\n * @extends {React.PureComponent>}\n */\nclass CookieCompliance extends React.PureComponent, IAlertState> {\n private readonly cookieRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public constructor(props: ICookieComplianceProps) {\n super(props);\n this.state = { visible: false };\n this.cookieRef = React.createRef();\n this._onDismiss = this._onDismiss.bind(this);\n }\n\n public componentDidMount(): void {\n const { context } = this.props;\n\n if (context && context.request && context.request.cookies && !context.request.cookies.isConsentGiven()) {\n this.setState({ visible: true });\n }\n }\n\n public render(): JSX.Element | null {\n const { config, context, resources, telemetry } = this.props;\n const { acceptCookiesButtonText, acceptCookiesAriaLabel } = resources;\n const { visible } = this.state;\n\n const isConsentGiven = context && context.request && context.request.cookies && context.request.cookies.isConsentGiven();\n let moduleConfig: ICookieComplianceConfig;\n\n try {\n moduleConfig = config;\n } catch (error) {\n telemetry.error(`Something went wrong while rendering the alert module ------${error}`);\n return
{error}
;\n }\n\n if (isConsentGiven && !visible) {\n this.props.context.telemetry.error('Cookie Compliance content is empty, module wont render.');\n return null;\n }\n\n if (!MsDyn365.msdyn365Commerce.isBrowser) {\n return <>;\n }\n\n const viewProps = {\n ...this.props,\n onDismiss: this._onDismiss,\n CookieComplianceBanner: {\n moduleProps: this.props,\n className: classnames('ms-cookie-compliance', moduleConfig.className),\n ref: this.cookieRef\n },\n AlertProps: {\n className: 'ms-cookie-compliance__container',\n color: 'white',\n fade: false\n },\n Content: {\n className: 'ms-cookie-compliance__content'\n },\n text: moduleConfig.content && (\n \n ),\n links: ArrayExtensions.hasElements(moduleConfig.actionLinks) && (\n \n ),\n acceptButton: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Handles Link 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.actionLinks?.[linkIndex]) {\n this.props.config.actionLinks[linkIndex].linkText = event.target.value;\n }\n };\n\n /**\n * Handles content change event.\n * @param event - Event.\n */\n public handleContentChange = (event: MsDyn365.ContentEditableEvent): void => {\n this.props.config.content = event.target.value;\n };\n\n private _onDismiss(): void {\n const { context } = this.props;\n\n if (context && context.request && context.request.cookies) {\n context.request.cookies.setConsentCookie();\n location.reload();\n }\n this.setState({ visible: false });\n }\n}\n\nexport default CookieCompliance;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IImageListViewProps } from './image-list';\n\n/**\n * Render the thumbnail item images.\n * @param props - The image list view props.\n * @returns Return HTML having IImageListViewProps props with image List.\n */\nexport const imageListView = (props: IImageListViewProps): JSX.Element => {\n const { imageList, imageListContainer, imageListHeading, imageListItem, imageListItems, imageListItemAnchorTag } = props;\n return (\n \n {imageListHeading}\n \n {imageListItems?.map(item => {\n let indexKey: string;\n\n if (item.image) {\n const image = (item.image as unknown) as Msdyn365.Image;\n indexKey = image.props.src as string;\n } else {\n const text = (item.text as unknown) as Msdyn365.RichTextComponent;\n indexKey = text.props.text as string;\n }\n return (\n \n {item.image && (\n \n {item.image}\n \n )}\n {item.text}\n \n );\n })}\n \n \n );\n};\n\nexport default imageListView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { IPayableInvoice } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\nexport interface IPayInvoiceData {\n invoice: IPayableInvoice;\n}\n\nexport interface IPayInvoiceResources {\n payInvoiceButtonText: string;\n payInvoiceButtonAriaLabel: string;\n}\n\nexport interface IPayInvoiceProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n reference?: React.RefObject;\n resources: IPayInvoiceResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\ninterface IPayInvoiceComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IPayInvoiceProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.reference);\n }\n setDisabled(false);\n };\n\n await payInvoices([props.data.invoice], props.context.actionContext, propagateError);\n};\n\nconst PayInvoiceComponentActions = {\n onClick\n};\n\n/**\n * On click handler function.\n * @param props -Invoice props.\n * @param setDisabled -Set disabled.\n * @returns Pay invoice component action.\n */\nconst onClickHandler = (props: IPayInvoiceProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await PayInvoiceComponentActions.onClick(event, props, setDisabled);\n};\n\nconst PayInvoice: React.FC = (props: IPayInvoiceProps): JSX.Element => {\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {props.resources.payInvoiceButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const PayInvoiceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'PayInvoiceComponent',\n { component: PayInvoice, ...PayInvoiceComponentActions }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent, onTelemetryClick } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface ILink {\n className?: string;\n text?: string;\n href?: string;\n ariaLabel?: string;\n index: string;\n noclick?: boolean;\n telemetryContent: ITelemetryContent;\n}\n\nexport const Link: React.FC = ({ text, className, href, ariaLabel, index, noclick, telemetryContent }) => {\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\n\n const linkText = text !== undefined ? text : '';\n payLoad.contentAction.etext = linkText;\n\n // Construct telemetry attribute to render\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n\n return (\n \n {linkText}\n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => (\n \n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CategoryHierarchy } from '@msdyn365-commerce/commerce-entities';\nimport MsDyn365 from '@msdyn365-commerce/core';\nimport { ICategoryUrl } from '@msdyn365-commerce/core-internal/dist/types/interfaces/ICategoryPathInterfaces';\nimport { TextValueTranslation } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBreadcrumbData } from './breadcrumb.data';\nimport { IBreadcrumbProps, ILinksData } from './breadcrumb.props.autogenerated';\nimport { Link } from './components/link';\nimport { Separator } from './components/separator';\n\nexport interface IBreadcrumbViewProps extends IBreadcrumbProps {\n root?: React.ReactNode;\n links?: React.ReactNode[];\n backButton?: React.ReactNode;\n separator?: React.ReactNode;\n BreadcrumbContainer: IModuleProps;\n BreadcrumbList: INodeProps;\n BreadcrumbListItem: INodeProps;\n}\n\n/**\n *\n * Breadcrumb component.\n * @extends {React.PureComponent>}\n */\nclass Breadcrumb extends React.PureComponent> {\n private readonly _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n\n private readonly telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public render(): JSX.Element | null {\n const { className } = this.props.config;\n let rootLink = null;\n let breadcrumbLinks = null;\n let backButtonComponent = null;\n rootLink = this._getRootLink();\n const itemPosition = rootLink ? 1 : 0;\n if (this._pageType === 'Category') {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n if (!breadcrumbLinks) {\n breadcrumbLinks = this._getCategoryHierarchy(itemPosition);\n }\n } else if (this._pageType === 'Product') {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n if (!breadcrumbLinks) {\n const breaCrumbType = this.props.context.app.config.breadcrumbType;\n if (breaCrumbType === 'category') {\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n if (breaCrumbType === 'categoryAndBack') {\n backButtonComponent = this._getPDPBackButton();\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n if (breaCrumbType === 'back') {\n backButtonComponent = this._getPDPBackButton();\n if (backButtonComponent === null) {\n breadcrumbLinks = this._getPDPLinks(itemPosition);\n }\n }\n }\n } else {\n breadcrumbLinks = this._getCustomBreadcrumbLinks(itemPosition);\n }\n const linkSeparator = ;\n\n const breadcrumbViewProps = {\n ...this.props,\n BreadcrumbContainer: {\n moduleProps: this.props,\n className: classnames('ms-breadcrumb', className),\n tag: 'nav',\n role: 'navigation'\n },\n BreadcrumbList: {\n tag: 'ol' as NodeTag,\n className: 'ms-breadcrumb_list'\n },\n BreadcrumbListItem: {\n tag: 'li',\n className: 'ms-breadcrumb_item'\n },\n root: rootLink,\n links: breadcrumbLinks,\n backButton: backButtonComponent,\n separator: linkSeparator\n };\n return this.props.renderView(breadcrumbViewProps) as React.ReactElement;\n }\n\n private readonly _getRootLink = (): JSX.Element | null => {\n const { root } = this.props.config;\n if (!root || !root.linkUrl || !root.linkUrl.destinationUrl) {\n this.props.context.telemetry.error('BreadCrumb link url content is empty, link wont render');\n return null;\n }\n return (\n \n );\n };\n\n private readonly _getCustomBreadcrumbLinks = (itemPosition: number): JSX.Element[] | null => {\n const { links } = this.props.config;\n\n if (!links || links.length === 0) {\n this.props.context.telemetry.error('BreadCrumb links content is empty, links wont render');\n return null;\n }\n const defaultValueToSubtract = 1;\n return links.map((value: ILinksData, index: number) => {\n itemPosition++;\n const keyIndex = index;\n return index !== links.length - defaultValueToSubtract ? (\n \n ) : (\n
\n {value.linkText}\n
\n );\n });\n };\n\n private readonly _getCategoryHierarchy = (itemPosition: number): JSX.Element[] | null => {\n const { data } = this.props;\n const categoryHierarchy = data.categoryHierarchy.result;\n if (!categoryHierarchy) {\n this.props.context.telemetry.error('Category Hierarchy content is empty, module wont render');\n return null;\n }\n return categoryHierarchy.map((value: CategoryHierarchy, index: number) => {\n itemPosition++;\n\n const friendlyName = this._getFriendlyName(this.props.context.request.locale, value.NameTranslations);\n\n return (\n \n );\n });\n };\n\n /**\n * The function to get translation name for the locale.\n * @param locale - The locale information.\n * @param nameTranslations - The name translations names.\n * @returns - The translation name for the locale.\n */\n private readonly _getFriendlyName = (locale: string, nameTranslations?: TextValueTranslation[]): string | undefined => {\n let nameTranslation: TextValueTranslation | undefined;\n if (locale && nameTranslations && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations.find(item => item.Language!.toLowerCase() === locale.toLowerCase());\n }\n\n // If friendly name for current locale is null, should use default locale.\n if (nameTranslation === undefined && ArrayExtensions.hasElements(nameTranslations)) {\n nameTranslation = nameTranslations[0];\n }\n\n return nameTranslation?.Text;\n };\n\n private readonly _getPDPLinks = (itemPosition: number): JSX.Element[] | null => {\n const { data, config } = this.props;\n const categoryHierarchy = data.categoryPaths.result;\n const product = data.product.result;\n const url = this.props.context.request.url.requestUrl.href;\n if (!categoryHierarchy) {\n this.props.context.telemetry.error('Category path content is empty for the product');\n return null;\n }\n const links: JSX.Element[] = [];\n\n categoryHierarchy.map((value: ICategoryUrl, index: number) => {\n itemPosition++;\n links.push(\n \n );\n });\n if (product && !config.hideProductName) {\n itemPosition++;\n links.push(\n \n );\n }\n return links;\n };\n\n private readonly _goBack = (): void => {\n window.history.back();\n };\n\n private readonly _getPDPBackButton = (): JSX.Element | null => {\n const isBackAllowed =\n this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.back;\n if (!isBackAllowed) {\n return null;\n }\n if (MsDyn365.isBrowser && (document.referrer === '' || window.history.length < 2)) {\n return null;\n }\n return (\n \n {this.props.resources.backToResultsText}\n \n );\n };\n}\n\nexport default Breadcrumb;\n","import * as React from 'react';\r\nimport { Button } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport { IFaqPageData } from './faq-page.data';\r\nimport { IFaqPageProps } from './faq-page.props.autogenerated';\r\nimport { RichTextComponent, RichText } from '@msdyn365-commerce/core';\r\n\r\nexport interface ITabsState {\r\n activeTab: number;\r\n selectedTab: number;\r\n}\r\n/**\r\n *\r\n * tabs component\r\n * @extends {React.PureComponent, ITabsState>}\r\n */\r\nclass FaqPage extends React.PureComponent, ITabsState> {\r\n constructor(props: IFaqPageProps) {\r\n super(props);\r\n this.state = {\r\n activeTab: -1,\r\n selectedTab: -1\r\n };\r\n }\r\n public resetTabLabel = (label: string | null): string | undefined => {\r\n if (label !== null) {\r\n if (label.toLowerCase().includes('delivery')) {\r\n return 'About Delivery';\r\n } else if (label.toLowerCase().includes('returns') || label.toLowerCase().includes('refunds')) {\r\n return 'Returns and Refunds';\r\n } else if (label.toLowerCase().includes('payment')) {\r\n return 'Payment';\r\n } else if (label.toLowerCase().includes('service')) {\r\n return 'About the Service';\r\n } else if (label.toLowerCase().includes('contact')) {\r\n return 'Contact Us';\r\n } else if (label.toLowerCase().includes('returning')) {\r\n return 'Returning Customers';\r\n } else if (label.toLowerCase().includes('other')) {\r\n return `FAQ's`;\r\n } else {\r\n return '';\r\n }\r\n }\r\n return undefined;\r\n };\r\n public getSelectedLabel = () => {\r\n const {\r\n props: {\r\n config: { tabLabels }\r\n }\r\n } = this;\r\n const urlParams = new URLSearchParams(window.location.search);\r\n const _selectedTabLabel: string | null = urlParams.get('tab');\r\n if (_selectedTabLabel !== '' || _selectedTabLabel !== null || _selectedTabLabel !== undefined) {\r\n const selectedTabLabel = this.resetTabLabel(_selectedTabLabel);\r\n tabLabels &&\r\n tabLabels.map((tabLabel: React.ReactNode, index: number) => {\r\n if (selectedTabLabel === tabLabel && selectedTabLabel !== undefined) {\r\n this.setState({ selectedTab: index });\r\n return;\r\n }\r\n });\r\n }\r\n };\r\n public render() {\r\n const {\r\n props: {\r\n config: { heading, tabLabels, tabDescriptions }\r\n },\r\n state: { activeTab, selectedTab }\r\n } = this;\r\n const mobileView =\r\n this.props.context.request && this.props.context.request.device && this.props.context.request.device.Type === 'Mobile'\r\n ? true\r\n : false;\r\n if (selectedTab !== -2) {\r\n this.getSelectedLabel();\r\n }\r\n return (\r\n
\r\n {selectedTab === -1 && (\r\n
\r\n

\r\n {heading}\r\n

\r\n
\r\n )}\r\n
\r\n
\r\n
    \r\n {tabLabels &&\r\n tabLabels.map((tabLabel: React.ReactNode, index: number) => {\r\n return (\r\n
  • \r\n = 0 && selectedTab === index)\r\n ? 'tab-list-active'\r\n : ''\r\n }`}\r\n onClick={this.onClickTab(index)}\r\n role='tab'\r\n key={index}\r\n >\r\n {tabLabel}\r\n \r\n
  • \r\n );\r\n })}\r\n
\r\n
\r\n
\r\n
\r\n {activeTab === -1 && selectedTab === -1 && !mobileView ? (\r\n
\r\n

\r\n {heading}\r\n

\r\n
\r\n ) : activeTab === -1 && selectedTab !== -1 ? (\r\n
\r\n {tabDescriptions && tabDescriptions[selectedTab] && }\r\n
\r\n ) : (\r\n
\r\n {tabDescriptions &&\r\n tabDescriptions.map((tabDescription: RichText | undefined, i: number) => {\r\n if (activeTab !== i) {\r\n return undefined;\r\n }\r\n return tabDescription && ;\r\n })}\r\n
\r\n )}\r\n
\r\n
\r\n );\r\n }\r\n private onClickTab = (index: number) => {\r\n return () => this.setState({ activeTab: index, selectedTab: -2 });\r\n };\r\n}\r\n\r\nexport default FaqPage;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './modules/invoices-list';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../helpers/invoice-data';\nimport { IInvoiceErrorState } from '../../invoices-list';\nimport { IInvoicesTableHeaderResources, InvoicesTableHeaderComponent } from './components/invoices-table-header-component';\nimport { IInvoicesTableRowResources, InvoicesTableRowComponent } from './components/invoices-table-row-component';\n\ninterface IInvoicesTableData {\n invoices: InvoiceModel[];\n customer: Customer;\n}\n\nexport interface IInvoicesTableResources extends IInvoicesTableHeaderResources, IInvoicesTableRowResources {}\n\nexport interface IInvoicesTableProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n invoiceButtonReferences?: React.RefObject[];\n payInvoiceButtonReferences?: React.RefObject[];\n resources: IInvoicesTableResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableComponent extends IComponent {}\n\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nconst getViewport = (context: ICoreContext): GridSize => {\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (window?.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n }\n return 'xl';\n }\n }\n\n return 'xs';\n};\n\nconst isMobileView = (context: ICoreContext) => {\n const viewport = getViewport(context);\n return viewport === 'xs' || viewport === 'sm';\n};\n\n/**\n * On select all function.\n * @param props -Invoice table props.\n * @returns On change.\n */\nconst onSelectAllHandler = (props: IInvoicesTableProps) => (isSelected: boolean) => {\n props.data.invoices.forEach(invoice => {\n invoice.isSelected = isSelected;\n });\n props.onChange();\n};\n\nconst InvoicesTable: React.FC = (props: IInvoicesTableProps): JSX.Element => {\n const [isMobile, setIsMobile] = useState(isMobileView(props.context));\n\n const updateViewport = () => {\n setIsMobile(isMobileView(props.context));\n };\n\n if (typeof window !== undefined && window.addEventListener) {\n window.addEventListener('resize', updateViewport);\n }\n const rowClassName = `${props.className}__row`;\n const headerClassName = `${props.className}__header`;\n\n return (\n \n invoice.isSelected)}\n isMobile={isMobile}\n isAdmin={props.data.customer.IsB2bAdmin || false}\n onSelectAll={onSelectAllHandler(props)}\n resources={props.resources}\n data={{}}\n />\n {props.data.invoices.map((invoice, index: number) => {\n return (\n \n );\n })}\n
\n );\n};\n\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableComponent\n>('InvoicesTableComponent', { component: InvoicesTable });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\n\nexport const SignUpText: React.FC<{ text: string }> = (props: { text: string }) => {\n return

{props.text}

;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, * as Msdyn365 from '@msdyn365-commerce/core';\nimport { issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n ITelemetryContent,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { SignUpText } from './components/loyalty-sign-up-small-components';\nimport { ILoyaltySignUpData } from './loyalty-sign-up.data';\nimport { ILoyaltySignUpProps } from './loyalty-sign-up.props.autogenerated';\n\nexport interface IAccountLoyaltyJoinState {\n clicked: boolean;\n}\nexport interface ILoyaltySignUpViewProps extends ILoyaltySignUpProps {\n LoyaltySignUp: IModuleProps;\n heading: React.ReactNode;\n memberHeading: React.ReactNode;\n signInLink: React.ReactElement;\n signUpText: React.ReactElement;\n signUpButton: React.ReactElement;\n detailsLink: React.ReactElement;\n termsLink: React.ReactElement;\n loading: boolean;\n infoMessageBar?: React.ReactNode;\n}\n\n/**\n *\n * LoyaltySignUp component.\n * @extends {React.Component>}\n */\n@observer\nclass LoyaltySignUp extends React.Component, IAccountLoyaltyJoinState> {\n private readonly telemetryContent?: ITelemetryContent;\n private readonly loyaltySignInAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltySignUpAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyDetailsLinkAttributes: Msdyn365.IDictionary | undefined;\n private readonly loyaltyTermsLinkAttributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: ILoyaltySignUpProps) {\n super(props);\n this.state = { clicked: false };\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n const payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.SignIn);\n this.loyaltySignInAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.SignUp;\n this.loyaltySignUpAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyDetailLink;\n this.loyaltyDetailsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsLink;\n this.loyaltyTermsLinkAttributes = getTelemetryAttributes(this.telemetryContent, payLoad);\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltySignUpProps, nextState: IAccountLoyaltyJoinState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, heading, memberHeading },\n resources,\n context: {\n actionContext,\n request: {\n user: { signInUrl, isAuthenticated }\n }\n },\n data\n } = this.props;\n\n const termsUrl = Msdyn365.getUrlSync('loyaltyTerms', actionContext);\n let loyaltyJoinUrl = `${Msdyn365.getUrlSync('loyaltyJoin', actionContext)}?joiningLoyalty=true`;\n if (MsDyn365.isBrowser) {\n loyaltyJoinUrl = `${window.location.origin}${loyaltyJoinUrl}`;\n }\n const signInurl = `${signInUrl}?ru=${loyaltyJoinUrl}`;\n const completeClass = classname('ms-loyalty-signup', className);\n const loyaltyCard = data.loyaltyCard;\n const hasLoyaltyAccount = loyaltyCard.result && loyaltyCard.result.CardTenderTypeValue !== undefined;\n const customerInformation = data.customerInformation?.result;\n\n const invalidAsyncCustomerState: boolean =\n (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false);\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltySignUp: {\n moduleProps: this.props,\n className: completeClass\n },\n infoMessageBar: invalidAsyncCustomerState && (\n \n ),\n loading: !this.props.context.request.params.isEditor && loyaltyCard?.status === 'LOADING',\n heading: !hasLoyaltyAccount && heading && heading.text && (\n \n ),\n memberHeading: hasLoyaltyAccount && memberHeading && memberHeading.text && (\n \n ),\n signInLink: !isAuthenticated && (\n \n ),\n signUpText: !hasLoyaltyAccount && ,\n signUpButton: !hasLoyaltyAccount && isAuthenticated && (\n \n {this.props.resources.joinLoyaltyButtonText}\n \n ),\n detailsLink: hasLoyaltyAccount && (\n \n {this.props.resources.viewLoyaltyPageText}\n \n ),\n termsLink: !hasLoyaltyAccount && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleMemberHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.memberHeading!.text = event.target.value);\n\n private readonly _issueLoyalty = () => {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(() => {\n if (MsDyn365.isBrowser) {\n window.location.assign(Msdyn365.getUrlSync('loyalty', this.props.context.actionContext) || '');\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n };\n}\n\nexport default LoyaltySignUp;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IInvoicesListViewProps } from './invoices-list';\n\nexport const InvoiceListView: React.FC = props => {\n const { header, filter, content, invoiceRequestModal, pagination } = props;\n\n return (\n \n {header}\n {invoiceRequestModal}\n {filter}\n {content}\n {pagination}\n \n );\n};\n\nexport default InvoiceListView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\ninterface IMakePaymentData {\n invoices: InvoiceModel[];\n}\n\nexport interface IMakePaymentResources {\n makePaymentButtonText: string;\n makePaymentButtonAriaLabel: string;\n}\n\nexport interface IMakePaymentProps extends IComponentProps {\n context: ICoreContext;\n itemKey?: string;\n telemetry: ITelemetry;\n moduleId: string;\n moduleTypeName: string;\n telemetryContent?: ITelemetryContent;\n navigationUrl?: string;\n buttonReferences?: React.RefObject;\n resources: IMakePaymentResources;\n disabled?: boolean;\n\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {}\n\nconst onClick = async (\n _event: React.MouseEvent,\n props: IMakePaymentProps,\n setDisabled: (disabled: boolean) => void\n): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState, props.buttonReferences);\n }\n setDisabled(false);\n };\n\n await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\n};\n\nconst MakePaymentComponentActions = {\n onClick\n};\n\n/**\n * On Click function.\n * @param input -Make payment props.\n * @param setDisabled -Set Disabled.\n * @returns Make payment component on click.\n */\nconst onClickHandler = (input: IMakePaymentProps, setDisabled: React.Dispatch>) => async (\n event: React.MouseEvent\n) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const {\n data: { invoices }\n } = input;\n const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\n const [disabled, setDisabled] = useState(false);\n\n return (\n \n {input.resources.makePaymentButtonText}\n \n );\n};\n\n// @ts-expect-error\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'MakePayment',\n { component: MakePayment }\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IInvoiceErrorProps extends IComponentProps {\n messageHeader?: string;\n errorMessage?: string;\n otherError?: string;\n showError: boolean;\n payInvoiceErrorModalOpen: boolean;\n\n errorDialogHeader: string;\n errorDialogBodyErrorTitle: string;\n errorDialogBodyErrorDescription: string;\n errorDialogFooterGoToCartButtonText: string;\n errorDialogFooterCancelButtonText: string;\n cartUrl: string;\n\n setPayInvoiceErrorModalClose(): void;\n}\n\nexport interface IInvoiceErrorComponent extends IComponent {}\n\nexport const InvoiceError: React.FC = ({\n messageHeader,\n errorMessage,\n otherError,\n showError,\n payInvoiceErrorModalOpen,\n errorDialogHeader,\n errorDialogBodyErrorTitle,\n errorDialogBodyErrorDescription,\n errorDialogFooterGoToCartButtonText,\n errorDialogFooterCancelButtonText,\n cartUrl,\n setPayInvoiceErrorModalClose\n}) => {\n const errorMessages: (string | undefined)[] = [];\n\n if (otherError) {\n errorMessages.push(otherError);\n } else {\n errorMessages.push(errorMessage);\n }\n\n const className = 'msc-pay-invoice-error-dialog';\n\n return (\n <>\n 0} color='danger' assertive aria-label={messageHeader}>\n \n {errorMessages.map((message, index) => {\n return (\n
\n {message}\n
\n );\n })}\n
\n \n \n {errorDialogHeader}\n \n \n
\n
{errorDialogBodyErrorTitle}
\n
{errorDialogBodyErrorDescription}
\n
\n
\n \n \n {errorDialogFooterGoToCartButtonText}\n \n \n {errorDialogFooterCancelButtonText}\n \n \n
\n \n );\n};\n\n// @ts-expect-error\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);\n","import classnames from 'classnames';\r\nimport React, { useState } from 'react';\r\n\r\nimport { IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { getCartState, ICartActionResult } from '@msdyn365-commerce/global-state';\r\nimport { ProductAvailableQuantity, ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport { MandsModal } from '../custom-components/mands-modal';\r\nexport interface IAddToCartComponentProps extends IComponentProps<{ product: SimpleProduct }> {\r\n className?: string;\r\n addToCartText: string;\r\n outOfStockText: string;\r\n disabled?: boolean;\r\n quantity?: number;\r\n navigationUrl?: string;\r\n productAvailability?: ProductAvailableQuantity;\r\n getSelectedProduct?: Promise;\r\n onAdd?(result: ICartActionResult): void;\r\n onError?(result: IAddToCartFailureResult): void;\r\n}\r\n\r\nexport declare type ICartActionFailureReason = 'EMPTYINPUT' | 'MISSINGDIMENSION' | 'OUTOFSTOCK' | 'CARTACTIONFAILED';\r\nexport interface IAddToCartFailureResult {\r\n failureReason: ICartActionFailureReason;\r\n\r\n stockLeft?: number;\r\n cartActionResult?: ICartActionResult;\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\nexport interface IAddtoCartComponent extends IComponent {\r\n onClick(): (event: React.MouseEvent, props: IAddToCartComponentProps) => void;\r\n}\r\n\r\nconst onClick = async (\r\n _event: React.MouseEvent,\r\n props: IAddToCartComponentProps,\r\n setDisabled: (disabled: boolean) => void,\r\n setAddtoCartModal: (disabled: boolean) => void,\r\n setProduct: (product: SimpleProduct) => void,\r\n setCheckoutUrl: (checkoutUrl: string) => void,\r\n setQuantity: (quantity: number) => void\r\n): Promise => {\r\n const cartError = addToCartError(props);\r\n let productToAdd = props.data.product;\r\n\r\n if (cartError) {\r\n propogateError(props, cartError);\r\n return;\r\n }\r\n\r\n setDisabled(true);\r\n\r\n if (!(props.getSelectedProduct === undefined)) {\r\n productToAdd = (await props.getSelectedProduct) || props.data.product;\r\n }\r\n\r\n const cartState = await getCartState(props.context.actionContext);\r\n await cartState\r\n .addProductToCart({\r\n product: productToAdd,\r\n count: props.quantity,\r\n availableQuantity: props.productAvailability?.AvailableQuantity,\r\n enableStockCheck: props.context.app.config.enableStockCheck\r\n })\r\n .then(result => {\r\n if (result.status === 'SUCCESS') {\r\n if (props.navigationUrl) {\r\n const quantity = props.quantity ? props.quantity : 0;\r\n setCheckoutUrl(props.navigationUrl);\r\n setProduct(productToAdd);\r\n setQuantity(quantity);\r\n setAddtoCartModal(true);\r\n setDisabled(false);\r\n // window.location.assign(props.navigationUrl);\r\n }\r\n propogateResult(props, result);\r\n } else {\r\n propogateError(props, { failureReason: 'CARTACTIONFAILED', cartActionResult: result });\r\n setDisabled(false);\r\n }\r\n });\r\n};\r\n\r\nconst AddToCartComponentActions = {\r\n onClick: onClick\r\n};\r\n\r\nconst AddToCart: React.FC = (props: IAddToCartComponentProps) => {\r\n const [disabled, setDisabled] = useState(false);\r\n const [isAddToCartModalOpen, setAddtoCartModal] = useState(false);\r\n const [product, setProduct] = useState();\r\n const [checkoutUrl, setCheckoutUrl] = useState('');\r\n const [quantity, setQuantity] = useState(0);\r\n const onClickHandler = (event: React.MouseEvent) => {\r\n return AddToCartComponentActions.onClick(event, props, setDisabled, setAddtoCartModal, setProduct, setCheckoutUrl, setQuantity);\r\n };\r\n return (\r\n <>\r\n \r\n \r\n {getLinkText(props)}\r\n \r\n \r\n );\r\n};\r\n\r\n// Set default props\r\nAddToCart.defaultProps = {\r\n quantity: 1\r\n};\r\n\r\nconst addToCartModalTitle = (quantity: number, setAddtoCartModal: (disabled: boolean) => void): JSX.Element => {\r\n const closeModal = () => {\r\n setAddtoCartModal(false);\r\n };\r\n\r\n return (\r\n
\r\n Great Choice! {quantity} successfully added to bag\r\n
\r\n \r\n
\r\n );\r\n};\r\n\r\nconst addToCartModalBody = (product: SimpleProduct | undefined, quantity: number): JSX.Element => {\r\n const productName = product && product.Name ? product.Name : '';\r\n const dimensions = product && product.Dimensions ? product.Dimensions : undefined;\r\n // Dimension type value 3 is for Size\r\n const sizeDimensionsIndex = product && product.Dimensions ? product.Dimensions.findIndex(dim => dim.DimensionTypeValue === 3) : -1;\r\n const price = product && product.Price ? product.Price.toFixed(2) : undefined;\r\n const productImage = product && product.PrimaryImageUrl ? product.PrimaryImageUrl : '';\r\n return (\r\n
\r\n {productImage && product-image}\r\n
\r\n {productName && {productName}}\r\n
\r\n {price && £{price}}\r\n / \r\n {sizeDimensionsIndex !== -1 && dimensions && (\r\n {dimensions[sizeDimensionsIndex].DimensionValue?.Value}\r\n )}\r\n
\r\n
\r\n
\r\n );\r\n};\r\n\r\nconst addToCartModalFooter = (checkoutUrl: string, setAddtoCartModal: (disabled: boolean) => void): JSX.Element => {\r\n const closeModal = () => {\r\n setAddtoCartModal(false);\r\n };\r\n\r\n const navigateToCart = () => {\r\n window.location.assign(checkoutUrl);\r\n };\r\n return (\r\n
\r\n \r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nconst getLinkText = (props: IAddToCartComponentProps): string => {\r\n if (!shouldShowOutOfStock(props, false)) {\r\n return props.addToCartText;\r\n }\r\n\r\n return props.outOfStockText;\r\n};\r\n\r\nconst addToCartError = (props: IAddToCartComponentProps): IAddToCartFailureResult | undefined => {\r\n if (!props.data || !props.data.product.RecordId) {\r\n // No product exists, won't be able to add to cart\r\n return { failureReason: 'EMPTYINPUT' };\r\n }\r\n\r\n if (props.data.product.Dimensions) {\r\n const missingDimensions = props.data.product.Dimensions.filter(\r\n dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value)\r\n );\r\n\r\n if (missingDimensions.length > 0) {\r\n // At least one dimension with no value exists on the product, won't be able to add to cart\r\n return { failureReason: 'MISSINGDIMENSION', missingDimensions: missingDimensions };\r\n }\r\n }\r\n\r\n if (shouldShowOutOfStock(props, true)) {\r\n const availableQuantity = (props.productAvailability && props.productAvailability.AvailableQuantity) || 0;\r\n const stockLeft = Math.max(availableQuantity - props.context.app.config.outOfStockThreshold, 0);\r\n\r\n return { failureReason: 'OUTOFSTOCK', stockLeft: stockLeft };\r\n }\r\n\r\n // Only allow adding to cart if not showing out of stock\r\n return undefined;\r\n};\r\n\r\nconst shouldShowOutOfStock = (props: IAddToCartComponentProps, includeCurrentQuantity: boolean): boolean => {\r\n if (props.context.app.config.enableStockCheck === false) {\r\n // Out of stock turn off, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (!props.data || !props.data.product.RecordId) {\r\n // No product exists, don't bother showing out of stock\r\n return false;\r\n }\r\n\r\n if (props.data.product.Dimensions) {\r\n if (props.data.product.Dimensions.find(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value))) {\r\n // At least one dimension with no value exists on the product, so also don't show out of stock\r\n return false;\r\n }\r\n }\r\n\r\n // if (props.productAvailability && props.productAvailability.AvailableQuantity !== undefined && props.productAvailability.AvailableQuantity >= parseInt(props.context.app.config.outOfStockThreshold, 10) + (includeCurrentQuantity && props.quantity ? props.quantity : 1)) {\r\n // return false;\r\n // } else {\r\n // // Out of stock\r\n // return true;\r\n // }\r\n\r\n const outOfStockThresholdLocal: number = props.context.app.config.outOfStockThreshold\r\n ? props.context.app.config.outOfStockThreshold\r\n : 0;\r\n\r\n const currentQuantity: number = includeCurrentQuantity && props.quantity ? props.quantity : 1;\r\n\r\n if (\r\n props.productAvailability &&\r\n props.productAvailability.AvailableQuantity !== undefined &&\r\n props.productAvailability.AvailableQuantity >= outOfStockThresholdLocal + currentQuantity\r\n ) {\r\n return false;\r\n } else {\r\n // Out of stock\r\n return true;\r\n }\r\n};\r\n\r\nconst propogateResult = (props: IAddToCartComponentProps, result: ICartActionResult): void => {\r\n if (props.onAdd) {\r\n props.onAdd(result);\r\n }\r\n};\r\n\r\nconst propogateError = (props: IAddToCartComponentProps, result: IAddToCartFailureResult): void => {\r\n if (props.onError) {\r\n props.onError(result);\r\n }\r\n};\r\n\r\nexport default AddToCart;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBusinessSignUpItem, IBusinessSignUpViewProps } from './business-sign-up';\n\nconst BusinessSignUpItem: React.FC = ({ wrapper, label, errorMessage, input, isAddressInput }) => {\n // Hide label and error message if rendering address section\n return (\n \n {!isAddressInput && label}\n {!isAddressInput && errorMessage}\n {input}\n \n );\n};\n\nconst BusinesSignUpView: React.FC = props => {\n const { businessSignUp, ContainerWrapper, heading, businessSignUpForm } = props;\n\n const { FormWrapper, buttons, items, errorMessage, disclaimer } = businessSignUpForm;\n\n return (\n \n \n {heading}\n \n {items &&\n items.map((item: IBusinessSignUpItem) => {\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n {disclaimer}\n \n \n \n );\n};\n\nexport default BusinesSignUpView;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n// import { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\n\r\nimport * as React from 'react';\r\nimport { IAccountWelcomeTileViewProps } from '@msdyn365-commerce-modules/account-management/dist/types/modules/account-welcome-tile/account-welcome-tile';\r\nimport { IAccountWelcomeTileProps as IAccountWelcomeTileExtendedProps } from '../definition-extensions/account-welcome-tile.ext.props.autogenerated';\r\nconst AccountWelcomeTileView: React.FC> = props => {\r\n const {\r\n AccountWelcomeTile,\r\n heading,\r\n context: {\r\n request: { user }\r\n },\r\n config: { signOutLinkText }\r\n } = props;\r\n\r\n return (\r\n \r\n
{heading}
\r\n
\r\n {signOutLinkText && {signOutLinkText}}\r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default AccountWelcomeTileView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n {categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltySignUpViewProps } from './loyalty-sign-up';\n\nconst LoyaltySignUpView: React.FC = props => {\n const {\n LoyaltySignUp,\n heading,\n memberHeading,\n signInLink,\n signUpText,\n signUpButton,\n detailsLink,\n termsLink,\n loading,\n infoMessageBar\n } = props;\n\n if (loading) {\n props.context.telemetry.error('LoyaltySignUp data is empty, module wont render');\n return null;\n }\n\n return (\n \n {infoMessageBar}\n {memberHeading}\n {heading}\n {detailsLink}\n {signUpText}\n {termsLink}\n {signUpButton}\n {signInLink}\n \n );\n};\n\nexport default LoyaltySignUpView;\n","import * as React from 'react';\r\n\r\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n ISignInItem,\r\n ISignInLocalAccount,\r\n ISignInLoading,\r\n ISignInViewProps\r\n} from '@msdyn365-commerce-modules/account-management/dist/types/modules/sign-in/sign-in';\r\nimport { ISignInConfig, ISignInProps, IGuestURLData } from '../definition-extensions/sign-in.ext.props.autogenerated';\r\n\r\nconst LocalAccount = (props: ISignInLocalAccount, guesturl: IGuestURLData | undefined): JSX.Element | null => {\r\n const { localAccount, items, forgetPassword, disclaimer, error, signInButton } = props;\r\n return (\r\n \r\n {items &&\r\n items.map((item: ISignInItem) => {\r\n return (\r\n \r\n {item.label}\r\n \r\n {item.input}\r\n {item.error}\r\n \r\n );\r\n })}\r\n {forgetPassword}\r\n {disclaimer}\r\n {error}\r\n {signInButton}\r\n
\r\n
\r\n {/* */}\r\n
\r\n );\r\n};\r\n\r\nconst SignInLoading: React.FC = ({ modal, modalBody, icon, message }) => {\r\n return (\r\n \r\n \r\n {icon}\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nconst SignInView: React.FC> = props => {\r\n const {\r\n signIn,\r\n viewState,\r\n loading,\r\n defaultAADConainer,\r\n aadConainer,\r\n signInSection,\r\n signUpSection,\r\n signInSectionHeading,\r\n signInLocalAccount,\r\n signUpSectionHeading,\r\n signUpLink,\r\n config\r\n } = props;\r\n const { guestURL } = config;\r\n return (\r\n \r\n {viewState.isShowLoading && }\r\n {viewState.isShowLoading && }\r\n \r\n \r\n {signInSectionHeading}\r\n {LocalAccount(signInLocalAccount, guestURL)}\r\n \r\n {signUpSectionHeading}\r\n {signUpLink}\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nexport default SignInView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IInvoiceErrorState } from '../invoices-list';\nimport { IPayableInvoice } from './invoice-data';\n\nexport type ICartActionFailureReason = 'EMPTYINPUT' | 'CARTACTIONFAILED';\nexport interface IAddInvoicesToCartFailureResult {\n failureReason: ICartActionFailureReason;\n}\n\nexport const payInvoices = async (\n invoices: IPayableInvoice[],\n actionContext: IActionContext,\n onError: (errorState: IInvoiceErrorState) => void\n) => {\n const invoicesToAdd: string[] = invoices.filter(invoice => invoice.canBePaid).map(invoice => invoice.id);\n\n if (!ArrayExtensions.hasElements(invoicesToAdd)) {\n onError({ errorMessage: '', errorReason: { failureReason: 'EMPTYINPUT' } });\n return;\n }\n\n const cartState = await getCartState(actionContext);\n const result = await cartState.addInvoicesToCart({ invoiceIds: invoicesToAdd });\n\n if (result.status !== 'SUCCESS') {\n onError({\n errorMessage: '',\n errorReason: { failureReason: 'CARTACTIONFAILED' },\n otherError: result.errorDetails?.LocalizedMessage,\n errorCode: result.errorDetails?.ErrorResourceId\n });\n return;\n }\n\n const cartUrl = getUrlSync('cart', actionContext);\n if (cartUrl) {\n window?.location.assign(cartUrl);\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, isOboRequest, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { IInvoiceErrorState, IPayInvoiceResources, PayInvoiceComponent } from '@msdyn365-commerce-modules/invoice';\nimport React from 'react';\n\nimport { InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsHeaderData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsHeaderResources extends IPayInvoiceResources {\n invoiceOrderItem: string;\n invoiceOrderItems: string;\n invoiceIdLabel: string;\n invoicePlacedByLabel: string;\n invoiceAmountDueText: string;\n invoicePaymentDueDateText: string;\n}\n\nexport interface IInvoiceDetailsHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsHeaderResources;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n}\n\nexport interface IInvoiceDetailsHeaderComponent extends IComponent {}\n\nconst formatShortDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'numeric', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatLongDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsHeader: React.FC = (props: IInvoiceDetailsHeaderProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources,\n onError\n } = props;\n\n const invoiceNumberText = resources.invoiceIdLabel.replace('{0}', invoiceDetails.id);\n\n const invoiceOrderItemsText =\n invoiceDetails.lines.length === 1\n ? resources.invoiceOrderItem\n : resources.invoiceOrderItems.replace('{0}', invoiceDetails.lines.length.toString());\n\n const invoiceInfoContainerClassName = `${className}__invoice-info-container`;\n const orderInfoContainerClassName = `${invoiceInfoContainerClassName}__order-info-container`;\n const orderInfoClassName = `${orderInfoContainerClassName}__order-info`;\n const orderMainInfoClassName = `${orderInfoClassName}__main-info`;\n const orderDetailsClassName = `${orderInfoClassName}__details`;\n `${className}__actions`;\n const actionsClassName = `${className}__actions`;\n const amountSummaryClassName = `${invoiceInfoContainerClassName}__amount-summary`;\n const orderDate = formatShortDate(props.context, invoiceDetails.invoiceDate);\n\n const dueDate = formatLongDate(props.context, invoiceDetails.dueDate);\n const dueDateText = resources.invoicePaymentDueDateText.replace('{0}', dueDate);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n return (\n
\n
{invoiceNumberText}
\n
\n
\n
\n
\n
\n {resources.invoicePlacedByLabel}\n {invoiceDetails.customerName}\n
\n
\n
\n
{orderDate}
\n
{invoiceOrderItemsText}
\n
\n
\n
\n
\n
{resources.invoiceAmountDueText}
\n
\n {formatAmount(props.context, invoiceDetails.amountDue, invoiceDetails.currencyCode)}\n
\n
{dueDateText}
\n
\n
\n
\n \n
\n
\n );\n};\n\nexport const InvoiceDetailsHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsHeaderComponent\n>('InvoiceDetailsHeaderComponent', { component: InvoiceDetailsHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ArrayExtensions, ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { IInvoicePaymentDetails } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsPaymentDetailsData {\n invoicePaymentDetails: IInvoicePaymentDetails;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsResources {\n invoicePaymentDiscounts: string;\n invoicePaymentSubtotal: string;\n invoicePaymentCharges: string;\n invoicePaymentTax: string;\n invoicePaymentInvoiceTotal: string;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n resources: IInvoiceDetailsPaymentDetailsResources;\n}\n\nexport interface IInvoiceDetailsPaymentDetailsComponent extends IComponent {}\n\ninterface IInvoicePaymentLineProps {\n label: string;\n value: number;\n className: string;\n}\n\nconst InvoiceDetailsPaymentDetails: React.FC = (\n props: IInvoiceDetailsPaymentDetailsProps\n): JSX.Element | null => {\n const {\n className,\n data: { invoicePaymentDetails },\n resources\n } = props;\n\n const lineClassName = `${className}__line`;\n\n const lines: IInvoicePaymentLineProps[] = [];\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalDiscount)) {\n lines.push({\n label: resources.invoicePaymentDiscounts,\n value: invoicePaymentDetails.totalDiscount,\n className: `${lineClassName}-total-discount`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.subtotal)) {\n lines.push({\n label: resources.invoicePaymentSubtotal,\n value: invoicePaymentDetails.subtotal,\n className: `${lineClassName}-subtotal`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalCharges)) {\n lines.push({\n label: resources.invoicePaymentCharges,\n value: invoicePaymentDetails.totalCharges,\n className: `${lineClassName}-total-charges`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalTax)) {\n lines.push({\n label: resources.invoicePaymentTax,\n value: invoicePaymentDetails.totalTax,\n className: `${lineClassName}-total-tax`\n });\n }\n if (!ObjectExtensions.isNullOrUndefined(invoicePaymentDetails.totalAmount)) {\n lines.push({\n label: resources.invoicePaymentInvoiceTotal,\n value: invoicePaymentDetails.totalAmount,\n className: `${lineClassName}-total-amount`\n });\n }\n\n if (!ArrayExtensions.hasElements(lines)) {\n return null;\n }\n\n return (\n
\n {lines.map(line => {\n return (\n
\n
{line.label}
\n
\n {props.context.cultureFormatter.formatCurrency(line.value, invoicePaymentDetails.currencyCode)}\n
\n
\n );\n })}\n
\n );\n};\n\nexport const InvoiceDetailsPaymentDetailsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsPaymentDetailsComponent\n>('InvoiceDetailsPaymentDetailsComponent', { component: InvoiceDetailsPaymentDetails });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, IImageSettings, Image, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine } from '@msdyn365-commerce/retail-proxy';\nimport { getFallbackImageUrl, getProductPageUrlSync, ObjectExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React from 'react';\n\nimport { IInvoiceProductLine, InvoiceDetailsModel } from '../helpers/invoice-data';\n\nexport interface IInvoiceDetailsProductsData {\n invoiceDetails: InvoiceDetailsModel;\n}\n\nexport interface IInvoiceDetailsProductsResources {\n invoiceProductColor: string;\n invoiceProductSize: string;\n invoiceProductStyle: string;\n invoiceQuantity: string;\n}\n\nexport interface IInvoiceDetailsProductsProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n imageSettings?: IImageSettings;\n resources: IInvoiceDetailsProductsResources;\n}\n\nexport interface IInvoiceDetailsProductsComponent extends IComponent {}\n\nconst _renderProductDimensions = (\n className: string,\n resources: IInvoiceDetailsProductsResources,\n product: SalesInvoiceLine\n): JSX.Element => {\n return (\n
\n {StringExtensions.isNullOrWhitespace(product.ColorName) ? null : (\n
{resources.invoiceProductColor.replace('{0}', product.ColorName!)}
\n )}\n {StringExtensions.isNullOrWhitespace(product.SizeName) ? null : (\n
{resources.invoiceProductSize.replace('{0}', product.SizeName!)}
\n )}\n {StringExtensions.isNullOrWhitespace(product.StyleName) ? null : (\n
{resources.invoiceProductStyle.replace('{0}', product.StyleName!)}
\n )}\n
\n );\n};\n\nconst _renderProductImage = (\n className: string,\n context: ICoreContext,\n product: IInvoiceProductLine,\n imageSettings?: IImageSettings\n): JSX.Element | null => {\n const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=80&h=94&m=6', w: 0, h: 0 },\n lg: { q: 'w=148&h=174&m=6', w: 0, h: 0 },\n xl: { q: 'w=148&h=174&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n const fallbackImage = getFallbackImageUrl(\n product.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n );\n return (\n \n );\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsProducts: React.FC = (props: IInvoiceDetailsProductsProps): JSX.Element => {\n const {\n className,\n data: { invoiceDetails },\n resources\n } = props;\n\n const productLineClass = `${className}__product-line`;\n const productLineInfoContainerClass = `${productLineClass}__product-info-container`;\n const productLineDetailsClass = `${productLineInfoContainerClass}__product-details`;\n const productLineSmallDetailsClass = `${productLineDetailsClass}__small-details`;\n\n return (\n
\n {invoiceDetails.lines.map(product => {\n const quantity = product.Quantity || 1;\n\n let productUrl = '';\n if (!ObjectExtensions.isNullOrUndefined(product.ProductName) && !ObjectExtensions.isNullOrUndefined(product.ProductId)) {\n productUrl = getProductPageUrlSync(product.ProductName, product.ProductId, props.context.actionContext);\n }\n\n return (\n
\n
\n {_renderProductImage(`${productLineInfoContainerClass}__product-image`, props.context, product)}\n
\n \n {product.ProductName}\n \n
\n {_renderProductDimensions(`${productLineSmallDetailsClass}__dimensions`, resources, product)}\n
\n {formatAmount(props.context, product.Price, invoiceDetails.currencyCode)}\n
\n
\n {resources.invoiceQuantity.replace('{0}', quantity.toString())}\n
\n
\n
\n
\n
\n {formatAmount(props.context, product.NetAmount, invoiceDetails.currencyCode)}\n
\n
\n );\n })}\n
\n );\n};\n\nexport const InvoiceDetailsProductsComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoiceDetailsProductsComponent\n>('InvoiceDetailsProductsComponent', { component: InvoiceDetailsProducts });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus, OrderInvoice, SalesInvoice, SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IPayableInvoice } from '@msdyn365-commerce-modules/invoice';\n\nexport interface IInvoicePaymentDetails {\n totalDiscount?: number;\n subtotal?: number;\n totalCharges?: number;\n totalTax?: number;\n totalAmount?: number;\n currencyCode?: string;\n}\n\nexport interface IInvoiceProductLine extends SalesInvoiceLine {\n primaryImageUrl?: string;\n}\n\n/**\n * Represents invoice details data model.\n */\nexport class InvoiceDetailsModel implements IPayableInvoice, IInvoicePaymentDetails {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public lines: IInvoiceProductLine[];\n\n public totalDiscount?: number;\n\n public subtotal?: number;\n\n public totalCharges?: number;\n\n public totalTax?: number;\n\n public totalAmount?: number;\n\n public currencyCode?: string;\n\n public constructor(invoice: OrderInvoice, invoiceDetails: SalesInvoice, products: SimpleProduct[]) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerName = invoice.CustomerName;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.lines = (invoiceDetails.SalesInvoiceLine || []).map(line => {\n const productLine: IInvoiceProductLine = {\n ...line,\n primaryImageUrl: products.find(product => product.RecordId === line.ProductId)?.PrimaryImageUrl\n };\n return productLine;\n });\n\n this.totalDiscount = invoiceDetails.TotalDiscount;\n this.subtotal = invoiceDetails.InvoiceSubtotal;\n this.totalCharges = invoiceDetails.TotalCharges;\n this.totalTax = invoiceDetails.TotalTaxAmount;\n this.totalAmount = invoice.TotalAmount;\n this.currencyCode = invoice.CurrencyCode;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { SalesInvoiceLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { IInvoiceErrorState, InvoiceErrorComponent } from '@msdyn365-commerce-modules/invoice';\nimport { getSimpleProductsAction, ProductInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { InvoiceDetailsHeaderComponent } from './components/invoice-details-header';\nimport { InvoiceDetailsPaymentDetailsComponent } from './components/invoice-details-payment-summary';\nimport { InvoiceDetailsProductsComponent } from './components/invoice-details-products';\nimport { InvoiceDetailsModel } from './helpers/invoice-data';\nimport { IInvoiceDetailsData } from './invoice-details.data';\nimport { IInvoiceDetailsProps } from './invoice-details.props.autogenerated';\n\nexport interface IInvoiceDetailsViewState {\n invoiceDetails?: InvoiceDetailsModel;\n payInvoiceErrorModalOpen?: boolean;\n errorState?: IInvoiceErrorState;\n}\n\nexport interface IInvoiceDetailsViewProps extends IInvoiceDetailsProps {\n moduleProps: IModuleProps;\n header: JSX.Element;\n products: JSX.Element;\n paymentDetails: JSX.Element;\n payInvoiceError?: JSX.Element;\n}\n\n/**\n * InvoiceDetails component.\n * @extends {React.PureComponent>}\n */\nclass InvoiceDetails extends React.PureComponent, IInvoiceDetailsViewState> {\n private static readonly _className: string = 'msc-invoice-details';\n\n public constructor(props: IInvoiceDetailsProps) {\n super(props);\n\n this.state = { errorState: { errorMessage: '', otherError: '' } };\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n }\n\n public async componentDidMount(): Promise {\n const invoice = await this.props.data.invoice;\n const invoiceDetails = await this.props.data.invoiceDetails;\n\n const products = await this._getProducts(invoiceDetails.SalesInvoiceLine, invoiceDetails.ChannelId);\n\n const invoiceDetailsModel = new InvoiceDetailsModel(invoice, invoiceDetails, products);\n\n this.setState({\n invoiceDetails: invoiceDetailsModel,\n payInvoiceErrorModalOpen: false,\n errorState: { errorMessage: '', otherError: '' }\n });\n }\n\n public render(): JSX.Element | null {\n if (!this.state.invoiceDetails) {\n return null;\n }\n\n const header = this._renderHeader();\n const products = this._renderProducts();\n const paymentDetails = this._renderPaymentDetails();\n const payInvoiceError = this._renderInvoiceErrors();\n\n const props: IInvoiceDetailsViewProps = {\n ...(this.props as IInvoiceDetailsProps),\n moduleProps: {\n moduleProps: this.props,\n className: InvoiceDetails._className\n },\n header,\n products,\n paymentDetails,\n payInvoiceError\n };\n\n return this.props.renderView(props);\n }\n\n private async _getProducts(invoiceLines: SalesInvoiceLine[] = [], channelId?: number): Promise {\n const productInputs = invoiceLines\n .filter(product => product.ProductId)\n .map(\n product =>\n new ProductInput(\n product.ProductId!,\n this.props.context.request.apiSettings,\n channelId,\n undefined,\n this.props.context.actionContext.requestContext\n )\n );\n return getSimpleProductsAction(productInputs, this.props.context.actionContext);\n }\n\n private _renderHeader(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _renderProducts(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n const { imageSettings } = this.props.config;\n return (\n \n );\n }\n\n private _renderPaymentDetails(): JSX.Element {\n const invoiceDetails = this.state.invoiceDetails!;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n\n // check for errorcode and otherError which contains the LocalizedMessage from API\n if (\n errorState &&\n errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineAlreadyExistsInCart' &&\n errorState.otherError\n ) {\n this.setState({ errorState: errorState });\n }\n\n this.setState({ payInvoiceErrorModalOpen: true });\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({ payInvoiceErrorModalOpen: false });\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${InvoiceDetails._className}__errors`;\n\n return (\n \n );\n }\n}\n\nexport default InvoiceDetails;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport React from 'react';\n\nexport interface IInvoicesTableHeaderResources {\n invoicesText: string;\n invoiceNumberText: string;\n invoiceDateMobileText: string;\n invoiceDateText: string;\n invoiceUsersText: string;\n invoiceAmountText: string;\n invoiceDueDateText: string;\n invoiceAmountDueText: string;\n invoiceStatusText: string;\n invoiceActionsText: string;\n invoiceListSelectAllRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isSelectedAll: boolean;\n isMobile: boolean;\n isAdmin: boolean;\n\n resources: IInvoicesTableHeaderResources;\n\n onSelectAll(isSelected: boolean): void;\n}\n\nexport interface IInvoicesTableHeaderComponent extends IComponent {}\n\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoiceNumberText}\n {resources.invoiceDateText}\n {resources.invoiceUsersText}\n {resources.invoiceAmountText}\n {resources.invoiceDueDateText}\n {resources.invoiceAmountDueText}\n {resources.invoiceStatusText}\n {resources.invoiceActionsText}\n \n );\n};\n\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n {resources.invoicesText}\n {resources.invoiceDateMobileText}\n \n {` `}\n {/* Actions */}\n \n );\n};\n\nconst InvoicesTableHeader: React.FC = (props: IInvoicesTableHeaderProps): JSX.Element => {\n const rowClassName = `${props.className}__row`;\n\n const switchCheckedState = () => {\n props.onSelectAll(!props.isSelectedAll);\n };\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = getMobileHeaderCells(props, rowClassName, switchCheckedState);\n } else {\n headerCells = getDesktopHeaderCells(props, rowClassName, switchCheckedState);\n }\n\n return (\n \n {headerCells}\n \n );\n};\n\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableHeaderComponent\n>('InvoicesTableHeaderComponent', { component: InvoicesTableHeader });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICountryPickerViewProps } from './country-picker';\n\n/**\n * Functional component which renders country picker module.\n * @param props - Configuration for the country picker component.\n * @returns React.FC - Functional component of the country picker module.\n */\nexport const countryPickerView: React.FC = (props: ICountryPickerViewProps) => {\n const {\n isModalOpen,\n modalContainer,\n modalHeaderContainer,\n modalBodyContainer,\n heading,\n modalFooterContainer,\n subheading,\n link,\n countryList,\n stayOnCurrentSiteButton\n } = props;\n return isModalOpen && countryList ? (\n \n \n {heading}\n {subheading}\n \n \n {countryList.map(country => (\n <>{country}\n ))}\n \n \n {stayOnCurrentSiteButton}\n {link}\n \n \n ) : null;\n};\n\nexport default countryPickerView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * 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 '../interactive-feature-item.props.autogenerated';\n\n/**\n * Interactive Feature links.\n */\nexport interface IInteractiveFeatureLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n telemetryContent: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\n/**\n *\n * IInteractiveFeatureLinks component.\n * @extends {React.PureComponent}\n */\nexport class InteractiveFeatureCollectionLinks extends React.PureComponent {\n public render(): JSX.Element {\n const editableLinks = this._mapEditableLinks(this.props.links);\n return (\n
\n {editableLinks && ArrayExtensions.hasElements(editableLinks) ? (\n \n ) : null}\n
\n );\n }\n\n /**\n * IInteractiveFeatureLinks component.\n * @param linkdata - Link data.\n * @returns Editable links.\n */\n private readonly _mapEditableLinks = (linkdata?: ILinksData[]): Msdyn365.ILinksData[] | null => {\n if (!linkdata || !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-interactive-feature-collection__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 InteractiveFeatureCollectionLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ArrayExtensions, 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 { InteractiveFeatureCollectionLinks } from './components';\nimport { IHeadingData, IInteractiveFeatureItemProps } from './interactive-feature-item.props.autogenerated';\n\n/**\n * Interactive Feature Item view props.\n */\nexport interface IInteractiveFeatureItemViewProps extends IInteractiveFeatureItemProps<{}> {\n title: React.ReactNode;\n paragraph: React.ReactNode;\n image: React.ReactNode;\n links: React.ReactNode;\n featureItem: IModuleProps;\n isMosaic: boolean;\n indexItem?: number;\n itemCounter?: number;\n\n interactiveFeatureCollectionCarouselContainer: INodeProps;\n interactiveFeatureCollectionCarouselImage: INodeProps;\n interactiveFeatureCollectionCarouselContent: INodeProps;\n\n interactiveFeatureCollectionMosaicContainer: INodeProps;\n interactiveFeatureCollectionMosaicImage: INodeProps;\n interactiveFeatureCollectionMosaicDetails: INodeProps;\n}\n\n/**\n * Interactive Feature Item Extented props.\n */\nexport interface IInteractiveFeatureItemExtentedProps extends IInteractiveFeatureItemProps<{}> {\n isMosaic?: boolean;\n indexItem?: number;\n itemCounter?: number;\n}\n\n/**\n *\n * InteractiveFeatureItem component.\n * @extends {React.PureComponent}\n */\nexport class InteractiveFeatureItem extends React.PureComponent {\n private readonly _telemetryContent: ITelemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n public constructor(props: IInteractiveFeatureItemProps<{}>) {\n super(props);\n }\n\n public render(): JSX.Element | null {\n const { indexItem, itemCounter, isMosaic } = this.props;\n const { heading, paragraph, image, links } = this.props.config;\n const featureItemLinks = links && ArrayExtensions.hasElements(links) && (\n \n );\n\n const viewProps = {\n ...this.props,\n indexItem,\n itemCounter,\n isMosaic: isMosaic ? isMosaic : false,\n title: this._createHeading(heading),\n paragraph: this._createParagraph(paragraph),\n image: this._renderImage(image),\n links: featureItemLinks,\n featureItem: {\n moduleProps: this.props,\n className: ''\n },\n interactiveFeatureCollectionCarouselContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-carousel__container'\n },\n interactiveFeatureCollectionCarouselImage: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-carousel__image'\n },\n interactiveFeatureCollectionCarouselContent: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-carousel__heading'\n },\n interactiveFeatureCollectionMosaicContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-interactive-feature-collection-mosaic',\n 'aria-label': heading?.text,\n tabindex: '0',\n role: 'group'\n },\n interactiveFeatureCollectionMosaicImage: {\n className: 'ms-interactive-feature-collection-mosaic__image'\n },\n interactiveFeatureCollectionMosaicDetails: {\n className: 'ms-interactive-feature-collection-mosaic__details'\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 _renderImage(item?: Msdyn365.IImageData, isAriaHiddenAttribute?: boolean): React.ReactNode | null {\n // Even if image.src is null, we render the Image component to render the fallback SVG\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=328&h=459&m=6', w: 328, h: 459 },\n sm: { q: 'w=348&h=487&m=6', w: 348, h: 487 },\n md: { q: 'w=650&h=366&m=6', w: 650, h: 366 },\n lg: { q: 'w=650&h=366&m=6', w: 650, h: 366 },\n xl: { q: 'w=650&h=366&m=6', w: 650, h: 366 }\n },\n lazyload: true\n };\n const verifiedImageSettings = item?.imageSettings?.viewports ? item.imageSettings : defaultImageSettings;\n return (\n \n );\n }\n}\n\nexport default InteractiveFeatureItem;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, {\n IComponent,\n IComponentProps,\n ICoreContext,\n IDateFormatOptions,\n isOboRequest,\n msdyn365Commerce\n} from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { getInvoiceDetailsPageUrlSync, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\n\nimport { InvoiceModel } from '../../../helpers/invoice-data';\nimport { getInvoiceStatusText, IInvoiceStatusResources } from '../../../helpers/invoice-status';\nimport { IInvoiceErrorState } from '../../../invoices-list';\nimport { IPayInvoiceResources, PayInvoiceComponent } from '../../pay-invoice-component';\nimport { RequestInvoiceButton } from '../../request-invoice-button';\n\ninterface IInvoicesTableRowData {\n invoice: InvoiceModel;\n index: number;\n customer: Customer;\n}\n\nexport interface IInvoicesTableRowResources extends IInvoiceStatusResources, IPayInvoiceResources {\n invoiceCurrentUser: string;\n invoiceViewDetailsButtonText: string;\n invoiceViewDetailsButtonAriaLabel: string;\n invoiceActionsButtonTextAriaLabel?: string;\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel?: string;\n invoiceRequestButtonLabel: string;\n invoiceListSelectRadioAriaLabelText: string;\n}\n\nexport interface IInvoicesTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n isMobile: boolean;\n invoiceReferences?: React.RefObject;\n payInvoiceReferences?: React.RefObject;\n resources: IInvoicesTableRowResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState, reference?: React.RefObject): void;\n onRequestInvoice?(invoice: InvoiceModel, requestInvoiceButtonReference: React.RefObject): void;\n}\n\nexport interface IInvoicesTableRowComponent extends IComponent {}\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\n/**\n * Request specific invoice function.\n * @param props -Invoice table row props.\n * @param requestInvoiceButtonReference -Reference button.\n * @returns Call Request Invoice.\n */\nconst onRequestSpecificInvoice = (\n props: IInvoicesTableRowProps,\n requestInvoiceButtonReference: React.RefObject\n) => () => {\n props.onRequestInvoice!(props.data.invoice, requestInvoiceButtonReference);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice, customer }\n } = props;\n\n const isCurrentUser =\n !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n \n \n {formatDate(props.context, invoice.invoiceDate)}\n \n \n {invoice.customerName}\n {isCurrentUser ? {props.resources.invoiceCurrentUser} : null}\n \n {formatAmount(props.context, invoice.amount, invoice.currencyCode)}\n \n {formatDate(props.context, invoice.dueDate)}\n \n {formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}\n \n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nlet setShowPreviousActions: React.Dispatch> | undefined;\n\n/**\n * On Click view details function.\n * @param linkToInvoiceDetails -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst onClickViewDetails = (linkToInvoiceDetails: string) => () => {\n if (MsDyn365.isBrowser) {\n window.location.href = linkToInvoiceDetails;\n }\n return;\n};\n\n/**\n * Toggle function.\n * @param isShowActions -Link to invoice details.\n * @param setShowActions -Link to invoice details.\n * @returns Go to invoice details.\n */\nconst toggle = (isShowActions: boolean, setShowActions: React.Dispatch>) => () => {\n const shouldShowActions = !isShowActions;\n if (shouldShowActions) {\n if (setShowPreviousActions) {\n setShowPreviousActions(false);\n }\n setShowActions(shouldShowActions);\n setShowPreviousActions = setShowActions;\n } else {\n setShowPreviousActions = undefined;\n setShowActions(shouldShowActions);\n }\n};\n\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\n const {\n resources: {\n invoiceViewDetailsButtonAriaLabel,\n invoiceViewDetailsButtonText,\n invoiceActionsButtonTextAriaLabel,\n invoiceActionsButtonIsOnBehalfOfTextAriaLabel\n },\n data: { index }\n } = props;\n\n const [showActions, setShowActions] = useState(false);\n const isOnBehalfOfRequest = isOboRequest(props.context.request);\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\n return (\n
\n \n {showActions && !isOnBehalfOfRequest && (\n
\n \n {invoiceViewDetailsButtonText}\n \n \n \n
\n )}\n
\n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const {\n data: { invoice }\n } = props;\n\n const linkToInvoiceDetails = getInvoiceDetailsPageUrlSync(props.data.invoice.id, props.context.actionContext);\n const invoiceRowArialabel = format(props.resources.invoiceListSelectRadioAriaLabelText, invoice.id);\n\n return (\n <>\n \n \n \n \n \n {invoice.id}\n \n
\n {invoice.customerName}\n \n \n {formatDate(props.context, invoice.dueDate)}\n
\n {getInvoiceStatusText(props.resources, invoice.status)}\n \n {extraActionsPopup(props)}\n \n );\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const {\n data: { invoice }\n } = props;\n\n const onSelectLine = () => {\n invoice.isSelected = !invoice.isSelected;\n props.onChange();\n };\n\n let rowCells: JSX.Element;\n if (props.isMobile) {\n rowCells = getMobileRowCells(props, onSelectLine);\n } else {\n rowCells = getDesktopRowCells(props, onSelectLine);\n }\n\n return {rowCells};\n};\n\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesTableRowComponent\n>('InvoicesTableRowComponent', { component: InvoicesTableRow });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ILoyaltyTermsModalProps {\n resources: ILoyaltyTermsModalResources;\n returnRef: React.RefObject | undefined;\n checked: boolean;\n isOpen: boolean;\n terms: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n onToggle(): void;\n onSubmit(): void;\n onCheck(): void;\n}\n\nexport interface ILoyaltyTermsModalResources {\n loyaltyTermsHeading: string;\n loyaltyAgreeToTerms: string;\n joinLoyaltyTermsText: string;\n cancelLoyaltyTermsText: string;\n}\n\nexport interface ILoyaltyTermsModalViewProps {\n modal: INodeProps;\n modalHeader: INodeProps;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n heading: React.ReactElement;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n terms: React.ReactNode;\n checkbox: React.ReactElement;\n agreeText: React.ReactElement;\n agreeSection: INodeProps;\n}\n\nexport const LoyaltyTermsModal = (props: ILoyaltyTermsModalProps): ILoyaltyTermsModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.LoyaltyTermsCancel);\n const loyaltyTermCancelAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsSubmit;\n const loyaltyTermSubmitAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsAgree;\n const loyaltyTermCheckboxAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n return {\n modal: {\n tag: Modal,\n className: 'ms-loyalty-terms__modal',\n toggle: props.onToggle,\n applicationNode: 'renderPage',\n isOpen: props.isOpen,\n returnFocusRef: props.returnRef\n },\n modalHeader: { tag: ModalHeader, className: 'ms-loyalty-terms__modal-header', toggle: props.onToggle },\n modalFooter: { tag: ModalFooter, className: 'ms-loyalty-terms__modal-footer' },\n modalBody: { tag: ModalBody, className: 'ms-loyalty-terms__modal-body' },\n cancelButton: (\n \n ),\n submitButton: (\n \n {props.resources.joinLoyaltyTermsText}\n \n ),\n heading:

{props.resources.loyaltyTermsHeading}

,\n terms: props.terms,\n agreeSection: { className: 'ms-loyalty-terms__agree-section' },\n checkbox: (\n \n ),\n agreeText:

{props.resources.loyaltyAgreeToTerms}

\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { getLoyaltyCardAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport { GetLoyaltyCardInput, issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsModalViewProps, LoyaltyTermsModal } from './components/loyalty-terms-modal';\nimport { ILoyaltyTermsData } from './loyalty-terms.data';\nimport { ILoyaltyTermsProps } from './loyalty-terms.props.autogenerated';\n\nexport interface ILoyaltyTermsState {\n checked: boolean;\n clicked: boolean;\n isModalOpen: boolean;\n}\nexport interface ILoyaltyTermsViewProps extends ILoyaltyTermsProps {\n LoyaltyTerms: IModuleProps;\n modalToggle: React.ReactElement;\n modal: ILoyaltyTermsModalViewProps;\n loading: boolean;\n}\n\n/**\n *\n * LoyaltyTerms component.\n * @extends {React.Component>}\n */\nclass LoyaltyTerms extends React.Component, ILoyaltyTermsState> {\n private readonly toggleRef: React.RefObject;\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: ILoyaltyTermsProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this._submit = this._submit.bind(this);\n this._checkboxChecked = this._checkboxChecked.bind(this);\n this.toggleRef = React.createRef();\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n let search = this.props.context.request.url.requestUrl.search;\n let isJoining = false;\n if (search) {\n search = search.substring(1);\n const qsps = search.split('&');\n for (const qsp of qsps) {\n const splitQsp = qsp.split('=');\n isJoining = splitQsp[0] === 'joiningLoyalty' && splitQsp[1] === 'true';\n if (isJoining) {\n break;\n }\n }\n }\n\n this.state = {\n isModalOpen: isJoining,\n checked: false,\n clicked: false\n };\n }\n\n public shouldComponentUpdate(nextProps: ILoyaltyTermsProps, nextState: ILoyaltyTermsState): 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, hideToggle },\n resources,\n slots: { serviceTerms },\n data: { loyaltyCard },\n context: {\n request: {\n user: { isAuthenticated }\n }\n }\n } = this.props;\n const completeClass = classname('ms-loyalty-terms', className);\n\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltyTerms: {\n moduleProps: this.props,\n className: completeClass\n },\n loading: loyaltyCard.status === 'LOADING',\n modalToggle: hideToggle !== true && (\n \n ),\n modal:\n isAuthenticated &&\n loyaltyCard.result &&\n loyaltyCard.result.CardNumber === undefined &&\n LoyaltyTermsModal({\n resources: { ...resources },\n returnRef: this.toggleRef,\n checked: this.state.checked,\n isOpen: this.state.isModalOpen,\n terms: serviceTerms,\n telemetryContent: this.telemetryContent,\n onToggle: this._toggle,\n onSubmit: this._submit,\n onCheck: this._checkboxChecked\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _toggle(): void {\n this.setState({ isModalOpen: !this.state.isModalOpen, checked: false });\n }\n\n private _submit(): void {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then(card => {\n if (this.props.config.redirectToLoyalty) {\n window.location.assign(getUrlSync('loyalty', this.props.context.actionContext) || '');\n } else {\n getLoyaltyCardAsync({ callerContext: this.props.context.actionContext }, card.CardNumber || '')\n .then(fullCard => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n fullCard\n );\n })\n .catch((error: Error) => {\n this.props.context.actionContext.update(\n new GetLoyaltyCardInput(this.props.context.request.apiSettings),\n card\n );\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to fetch loyalty card');\n });\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n }\n\n private _checkboxChecked(): void {\n this.setState({ checked: !this.state.checked });\n }\n}\n\nexport default LoyaltyTerms;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileData } from './account-welcome-tile.data';\nimport { IAccountWelcomeTileProps } from './account-welcome-tile.props.autogenerated';\n\nexport interface IAccountWelcomeTileViewProps extends IAccountWelcomeTileProps {\n AccountWelcomeTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n}\n\n/**\n *\n * AccountWelcome component.\n * @extends {React.PureComponent>}\n */\nclass AccountWelcomeTile extends React.PureComponent> {\n public render(): JSX.Element {\n const { config, data } = this.props;\n const { className } = config;\n\n const accountInfo = data.accountInformation.result;\n const heading = {\n ...config.heading,\n ...{\n text: `${config.heading.text ? config.heading.text : ''} ${\n accountInfo && accountInfo.FirstName ? accountInfo.FirstName : ''\n }`\n }\n };\n\n const viewProps = {\n ...this.props,\n className,\n AccountWelcomeTile: {\n moduleProps: this.props,\n className: classnames('ms-account-welcome-tile', config.className)\n },\n heading: heading && heading.text && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n}\n\nexport default AccountWelcomeTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IPayableInvoice {\n readonly id: string;\n readonly canBePaid: boolean;\n}\n\n/**\n * Represents invoice data model.\n */\nexport class InvoiceModel implements IPayableInvoice {\n public id: string;\n\n public invoiceDate?: Date;\n\n public customerAccountNumber?: string;\n\n public customerName?: string;\n\n public amount?: number;\n\n public dueDate?: Date;\n\n public amountDue?: number;\n\n public status?: InvoicePaidStatus;\n\n public currencyCode?: string;\n\n public isSelected: boolean;\n\n public constructor(invoice: OrderInvoice) {\n this.id = invoice.Id || '';\n this.invoiceDate = invoice.InvoiceDate ? new Date(invoice.InvoiceDate) : undefined;\n this.customerAccountNumber = invoice.CustomerAccountNumber;\n this.customerName = invoice.CustomerName;\n this.amount = invoice.TotalAmount;\n this.dueDate = invoice.InvoiceDueDate ? new Date(invoice.InvoiceDueDate) : undefined;\n this.amountDue = invoice.AmountBalance;\n this.status = invoice.InvoicePaidStatusValue;\n this.currencyCode = invoice.CurrencyCode;\n\n this.isSelected = false;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { InvoicePaidStatus } from '@msdyn365-commerce/retail-proxy';\n\nexport interface IInvoiceStatusResources {\n invoiceStatusNone: string;\n invoiceStatusUnpaid: string;\n invoiceStatusPartiallyPaid: string;\n invoiceStatusPaid: string;\n}\n\nexport const getInvoiceStatusText = (resources: IInvoiceStatusResources, invoiceStatus: InvoicePaidStatus | undefined) => {\n switch (invoiceStatus) {\n case InvoicePaidStatus.None:\n return resources.invoiceStatusNone;\n\n case InvoicePaidStatus.Unpaid:\n return resources.invoiceStatusUnpaid;\n\n case InvoicePaidStatus.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n\n case InvoicePaidStatus.Paid:\n return resources.invoiceStatusPaid;\n default:\n return '';\n }\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Alert, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ICookieComplianceViewProps } from './cookie-compliance';\n\nconst CookieComplianceView: React.FC = props => {\n const { CookieComplianceBanner, AlertProps, Content, acceptButton, text, links } = props;\n\n return (\n \n \n \n {text}\n {links}\n \n {acceptButton}\n \n \n );\n};\nexport default CookieComplianceView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { AsyncResult, Customer, ProductSearchResult, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, ObjectExtensions, Random } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport React from 'react';\n\nimport { getCatalogId } from '@msdyn365-commerce/core';\nimport { ProductComparisonItem, ProductComparisonState } from '../product-comparison-state';\nimport { IProductComparisonButtonProps } from './product-comparison-button.props.autogenerated';\n\n/**\n * Represents product comparison view props.\n */\nexport interface IProductComparisonButtonViewProps extends IProductComparisonButtonProps<{}> {\n moduleProps: IModuleProps;\n productComparisonButton?: React.ReactNode;\n productComparisonPreview?: React.ReactNode;\n}\n\n/**\n * Represents the data which is required for the product comparison button to be rendered.\n */\nexport interface IProductComparisonButtonData {\n accountInformation?: AsyncResult;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonFullProps extends IProductComparisonButtonProps {\n product: ProductSearchResult | SimpleProduct;\n catalogId: number;\n}\n\n/**\n * Extended props for the module including info about the product.\n */\nexport interface IProductComparisonButtonState {\n canProductBeAddedToProductComparison: boolean;\n currentProductsCount: number;\n comparisonItemId: string;\n}\n\n/**\n * Represents the component which renders product comparison table.\n */\nexport class ProductComparisonButton extends React.PureComponent {\n private static _productComparisonPreview?: React.ReactNode;\n\n private readonly _className: string;\n\n private readonly _instanceId: string;\n\n private readonly _shouldUsePreview: boolean;\n\n private static _renderProductComparisonPreview(props: IProductComparisonButtonFullProps): React.ReactNode {\n if (!ProductComparisonButton._productComparisonPreview && ArrayExtensions.hasElements(props.slots.productComparisonPreview)) {\n ProductComparisonButton._productComparisonPreview = props.slots.productComparisonPreview[0];\n }\n\n return ProductComparisonButton._productComparisonPreview;\n }\n\n private static _renderProductComparisonButton(\n className: string,\n buttonText: string | undefined,\n title: string,\n onClickHandler?: () => void\n ): React.ReactNode {\n const isDisabled = ObjectExtensions.isNullOrUndefined(onClickHandler);\n let content: React.ReactNode;\n if (buttonText) {\n content = (\n <>\n
\n
{buttonText}
\n \n );\n }\n return (\n \n );\n }\n\n public constructor(props: IProductComparisonButtonFullProps) {\n super(props);\n\n this._className = 'ms-product-comparison-button';\n this._instanceId = `${this._className}-${this.props.id}-${Random.Guid.generateGuid()}`;\n\n this.state = this._getNewState();\n\n this._shouldUsePreview = !ProductComparisonButton._productComparisonPreview;\n ProductComparisonButton._renderProductComparisonPreview(this.props);\n }\n\n public componentDidMount(): void {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).listModifiedEvent.subscribe(\n {\n instanceId: this._instanceId,\n\n /**\n * Updates the state in case the state for the particular product was changed.\n */\n handler: () => {\n this.setState(this._getNewState());\n }\n }\n );\n }\n\n public getSnapshotBeforeUpdate(previousProps: Readonly): void {\n if (previousProps.product.RecordId !== this.props.product.RecordId || previousProps.catalogId !== this.props.catalogId) {\n this.setState(this._getNewState());\n }\n }\n\n public componentWillUnmount(): void {\n ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).listModifiedEvent.unsubscribe(this._instanceId);\n }\n\n public render(): React.ReactNode | null {\n const isConsentGiven = this.props.context.request.cookies.isConsentGiven();\n if (!isConsentGiven) {\n return null;\n }\n\n const viewProps: IProductComparisonButtonViewProps = {\n ...this.props,\n moduleProps: {\n moduleProps: this.props,\n className: this._className\n }\n };\n\n if (this._shouldUsePreview) {\n viewProps.productComparisonPreview = ProductComparisonButton._productComparisonPreview;\n }\n\n const buttonClassName = this.props.config.shouldDisplayText ? `${this._className}__button` : `${this._className}__icon`;\n\n if (!this.state.canProductBeAddedToProductComparison) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.removeFromComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n classnames(`${buttonClassName}__removing`, buttonClassName),\n buttonText,\n this.props.resources.removeFromComparisonButtonText,\n this._removeFromProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n const productsLimit = this._getProductsLimit();\n if (!ObjectExtensions.isNullOrUndefined(productsLimit) && productsLimit <= this.state.currentProductsCount) {\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonLimitReachedButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonLimitReachedButtonText\n );\n return this.props.renderView(viewProps);\n }\n\n const buttonText = this.props.config.shouldDisplayText ? this.props.resources.addToComparisonButtonText : undefined;\n viewProps.productComparisonButton = ProductComparisonButton._renderProductComparisonButton(\n buttonClassName,\n buttonText,\n this.props.resources.addToComparisonButtonText,\n this._addToProductComparison\n );\n return this.props.renderView(viewProps);\n }\n\n private _getProductsLimit(): number | undefined | null {\n const viewport = isMobile({ variant: VariantType.Browser, context: this.props.context.request });\n if (viewport === 'xs' || viewport === 'sm') {\n return this.props.context.app.config.productComparisonMobileProductsLimit;\n }\n return this.props.context.app.config.productComparisonDesktopProductsLimit;\n }\n\n /**\n * Adds current product to a product comparison list.\n */\n private readonly _addToProductComparison: () => void = () => {\n const item = new ProductComparisonItem(this.props.product.RecordId, this.props.catalogId);\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).addItem(item);\n };\n\n /**\n * Removes current product from the product comparison list where it was added earlier.\n */\n private readonly _removeFromProductComparison: () => void = () => {\n ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).removeItemById(\n this.state.comparisonItemId\n );\n };\n\n private _getProdutComparisonDataByCatalogId(): ProductComparisonItem[] {\n const items = ProductComparisonState.instance(this.props.context.request, this.props.data.accountInformation?.result).items;\n const catalogId = getCatalogId(this.props.context.request);\n const productByCatalogId = items?.filter(product => product.catalogId === catalogId) ?? [];\n return productByCatalogId;\n }\n\n /**\n * Retrieves the state of the component based on the comparison data.\n * @returns State object for the component.\n */\n private readonly _getNewState: () => IProductComparisonButtonState = () => {\n const comparisonItemId = ProductComparisonItem.getItemId(this.props.product.RecordId, this.props.catalogId);\n const products = this._getProdutComparisonDataByCatalogId();\n return {\n comparisonItemId,\n canProductBeAddedToProductComparison: !ProductComparisonState.instance(\n this.props.context.request,\n this.props.data.accountInformation?.result\n ).hasItemById(comparisonItemId),\n currentProductsCount: products.length\n };\n };\n}\n\nexport default ProductComparisonButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './invoice-data';\nexport * from './invoice-status';\nexport * from './pay-invoices';\n","import { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\r\nimport React from 'react';\r\n\r\nexport interface IMandsModalProps {\r\n isOpen: boolean;\r\n modalTitle?: JSX.Element | string;\r\n modalBody?: JSX.Element | string;\r\n modalFooter?: JSX.Element | string;\r\n className: string;\r\n}\r\n\r\nexport const MandsModal: React.FC = props => {\r\n return (\r\n
\r\n \r\n {props.modalTitle && {props.modalTitle}}\r\n {props.modalBody && {props.modalBody}}\r\n {props.modalFooter && {props.modalFooter}}\r\n
\r\n \r\n
\r\n );\r\n};\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IB2bRequestsTileViewProps } from './b2b-requests-tile';\n\nconst B2bRequestsTileView: React.FC = props => {\n const { b2bRequestsTile, heading, links } = props;\n\n return (\n \n {heading}\n {links}\n \n );\n};\n\nexport default B2bRequestsTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { IInvoiceStatusResources } from '../helpers/invoice-status';\n\nexport interface IInvoicesFilterResources extends IInvoiceStatusResources {\n invoicesFilterShowAll: string;\n}\n\nexport interface IInvoicesFilterProps extends IComponentProps {\n className: string;\n disabled: boolean;\n\n resources: IInvoicesFilterResources;\n\n currentState: InvoicesFilterState;\n onFilterStateChanged(state: InvoicesFilterState): void;\n}\n\nexport enum InvoicesFilterState {\n ShowAll,\n Paid,\n PartiallyPaid,\n Unpaid\n}\n\nconst getInvoicesFilterStateResources = (filterState: InvoicesFilterState, resources: IInvoicesFilterResources): string => {\n switch (filterState) {\n case InvoicesFilterState.ShowAll:\n return resources.invoicesFilterShowAll;\n case InvoicesFilterState.Paid:\n return resources.invoiceStatusPaid;\n case InvoicesFilterState.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n case InvoicesFilterState.Unpaid:\n return resources.invoiceStatusUnpaid;\n default:\n throw new Error('Failed to retrieve resource description for unknown invoices filter state.');\n }\n};\n\n/**\n * On Click function.\n * @param onStateClick -Invoice filter state function.\n * @param filterState -Invoice filter state.\n * @returns Set Invoice filter state.\n */\nconst onClickHandler = (onStateClick: (filterState: InvoicesFilterState) => void, filterState: InvoicesFilterState) => () => {\n onStateClick(filterState);\n};\n\nconst renderFilterStateItem = (\n filterState: InvoicesFilterState,\n resources: IInvoicesFilterResources,\n className: string,\n onStateClick: (filterState: InvoicesFilterState) => void\n): React.ReactNode => {\n const stateStringRepresentation = InvoicesFilterState[filterState];\n\n return (\n \n );\n};\n\nconst InvoicesFilter: React.FC = (props: IInvoicesFilterProps) => {\n const popoverRef = React.createRef();\n const [popoverState, setPopoverState] = React.useState(false);\n const togglePopover = React.useCallback(() => {\n setPopoverState(!popoverState);\n }, [popoverState]);\n\n const [filterState, setFilterState] = React.useState(props.currentState);\n\n const onFilterStateClick = (clickedState: InvoicesFilterState) => {\n setFilterState(clickedState);\n setPopoverState(false);\n props.onFilterStateChanged(clickedState);\n };\n\n return (\n
\n \n {getInvoicesFilterStateResources(filterState, props.resources)}\n \n \n {EnumExtensions.getEnumValues(InvoicesFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })}\n \n
\n );\n};\n\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent<\n // @ts-expect-error\n IInvoicesFilterProps\n>('InvoicesFilterComponent', { component: InvoicesFilter });\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { isOboRequest } from '@msdyn365-commerce/core-internal';\nimport { IMsdyn365PvaChatConnectorData } from './msdyn365-pva-chat-connector.data';\nimport { IMsdyn365PvaChatConnectorConfig, IMsdyn365PvaChatConnectorProps } from './msdyn365-pva-chat-connector.props.autogenerated';\n\nexport interface IPvaChatConnectorViewProps extends IMsdyn365PvaChatConnectorProps {\n config: IMsdyn365PvaChatConnectorConfig;\n}\n\n/**\n * PvaChatConnector component\n * @extends {React.PureComponent>}\n */\nclass PvaChatConnector extends React.PureComponent> {\n // Loads CDN version of Botframework-Webchat library\n public componentDidMount(): void {\n if (isOboRequest(this.props.context.request)) {\n return;\n }\n\n const url = this.props.config.botFrameworkCDNURL || this.props.context.app.config.pvaChatConnectorBotFrameworkCDNURL;\n const script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.crossOrigin = 'anonymous';\n document.body.appendChild(script);\n }\n\n public render(): JSX.Element | null {\n if (isOboRequest(this.props.context.request)) {\n return null;\n }\n\n return this.props.renderView(this.props);\n }\n}\n\nexport default PvaChatConnector;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountWelcomeTileViewProps } from './account-welcome-tile';\n\nconst AccountWelcomeTileView: React.FC = props => {\n const { AccountWelcomeTile, heading } = props;\n\n return {heading};\n};\n\nexport default AccountWelcomeTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILoyaltyTermsViewProps } from './loyalty-terms';\n\nconst LoyaltyTermsView: React.FC = props => {\n const { LoyaltyTerms, modalToggle, modal, loading } = props;\n\n return !loading && modal ? (\n \n {modalToggle}\n \n {modal.heading}\n \n {modal.terms}\n \n {modal.checkbox}\n {modal.agreeText}\n \n \n \n {modal.submitButton}\n {modal.cancelButton}\n \n \n \n ) : null;\n};\n\nexport default LoyaltyTermsView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IProductComparisonButtonViewProps } from './product-comparison-button';\n\n/**\n * Represents product comparison button view.\n * @param props - View props for product comparison button.\n * @returns Functional component of product comparison button.\n */\nexport const ProductComparisonButtonViewFunctionalComponent: React.FC = props => {\n const { productComparisonButton, productComparisonPreview } = props;\n\n return (\n \n {productComparisonButton}\n {productComparisonPreview}\n \n );\n};\n\nexport default ProductComparisonButtonViewFunctionalComponent;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Module, Node, Collapse } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IMenuItemData, INavigationMenuViewProps } from '@msdyn365-commerce-modules/navigation-menu/dist/types';\r\nimport { INavigationMenuProps as INavigationMenuExtensionProps } from '../definition-extensions/navigation-menu.ext.props.autogenerated';\r\ninterface ICollapseOpen {\r\n [name: number]: boolean;\r\n}\r\ninterface INavigationState {\r\n parentMenu?: number;\r\n activeMenu?: number;\r\n mobileViewLabelText?: string;\r\n isMenuCollapseOpen?: ICollapseOpen;\r\n}\r\n\r\n/**\r\n *\r\n * NavigationMenuView component\r\n * @extends {React.PureComponent>}\r\n */\r\nexport class NavigationMenuView extends React.PureComponent<\r\n INavigationMenuViewProps & INavigationMenuExtensionProps<{}>,\r\n INavigationState\r\n> {\r\n private static isBackTrack: boolean = false;\r\n private _currentLevel: number = 0;\r\n private menuNode: React.RefObject;\r\n constructor(props: INavigationMenuViewProps & INavigationMenuExtensionProps<{}>) {\r\n super(props);\r\n this.menuNode = React.createRef();\r\n this.state = {\r\n activeMenu: undefined,\r\n mobileViewLabelText: '',\r\n parentMenu: undefined\r\n };\r\n this._closeSubmenu = this._closeSubmenu.bind(this);\r\n }\r\n\r\n public get currentLevel(): number {\r\n return this._currentLevel;\r\n }\r\n public set currentLevel(value: number) {\r\n this._currentLevel = value;\r\n }\r\n public componentDidMount(): void {\r\n document.body && document.body.addEventListener('mousedown', this._handleClickOutside);\r\n }\r\n\r\n public componentWillUnmount(): void {\r\n document.body && document.body.removeEventListener('mousedown', this._handleClickOutside, false);\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n const { isMobileView, MenuList, MobileBackButton, MobileDescriptionContainer, MobileDescriptionLabel, Navigation } = this.props;\r\n\r\n this.currentLevel = 1;\r\n return (\r\n \r\n
\r\n
\r\n
\r\n \r\n {isMobileView && this.state.activeMenu !== undefined && (\r\n \r\n \r\n {this.state.mobileViewLabelText}\r\n \r\n )}\r\n {this._renderDisplay()}\r\n \r\n
\r\n
\r\n
\r\n \r\n );\r\n }\r\n\r\n private handleCollapse = (collapseNumber: number, collapseItem: boolean) => () => {\r\n this.setState({\r\n isMenuCollapseOpen: {\r\n ...this.state.isMenuCollapseOpen,\r\n [collapseNumber]: !collapseItem\r\n }\r\n });\r\n };\r\n\r\n private _renderDisplay = (): JSX.Element[] => {\r\n const { ListItem, menuItemData, isMobileView } = this.props;\r\n const { activeMenu } = this.state;\r\n const menuItemList: JSX.Element[] = [];\r\n\r\n if (isMobileView && activeMenu !== undefined && menuItemData.length > 0) {\r\n let menuItem: IMenuItemData = {};\r\n for (let i = 0; i < menuItemData.length; i++) {\r\n if (menuItemData[i] && menuItemData[i].id === activeMenu) {\r\n menuItem = menuItemData[i];\r\n !NavigationMenuView.isBackTrack\r\n ? this.setState({ parentMenu: undefined })\r\n : this.setState({\r\n parentMenu: undefined,\r\n mobileViewLabelText: menuItemData[i].linkText\r\n });\r\n break;\r\n }\r\n menuItem = this._getFromSubMenu(menuItemData[i]) as IMenuItemData;\r\n if (menuItem && menuItem.id === activeMenu) {\r\n break;\r\n }\r\n }\r\n\r\n menuItem &&\r\n menuItemList.push(\r\n \r\n {' '}\r\n {this._createMenuItemList(menuItem)}{' '}\r\n \r\n );\r\n } else {\r\n menuItemData.forEach((item: IMenuItemData, index: number) => {\r\n menuItemList.push(\r\n \r\n {this._createMenuItemList(item)}\r\n \r\n );\r\n });\r\n }\r\n\r\n return menuItemList;\r\n };\r\n\r\n private _getFromSubMenu = (item?: IMenuItemData): IMenuItemData | null => {\r\n const subMenus = item && item.subMenu;\r\n if (subMenus && subMenus.length > 0) {\r\n for (let i = 0; i <= subMenus.length - 1; i++) {\r\n if (subMenus[i].id === this.state.activeMenu) {\r\n !NavigationMenuView.isBackTrack\r\n ? this.setState({ parentMenu: item && item.id })\r\n : this.setState({\r\n parentMenu: item && item.id,\r\n mobileViewLabelText: subMenus[i].linkText\r\n });\r\n return subMenus[i];\r\n }\r\n const found = this._getFromSubMenu(subMenus[i]);\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n\r\n private renderMenuItemMobileView = (menuItemData: IMenuItemData) => {\r\n const menuId = menuItemData.id ? menuItemData.id : 0;\r\n const isCollapseOpen =\r\n this.state.isMenuCollapseOpen && this.state.isMenuCollapseOpen[menuId] ? this.state.isMenuCollapseOpen[menuId] : false;\r\n return (\r\n \r\n {this._renderButtonMenuItem(menuItemData)}\r\n \r\n {this._renderSubMenu(menuItemData.subMenu, menuItemData.id)}\r\n \r\n \r\n );\r\n };\r\n\r\n private renderSubMenuForUniformBySchoolCategory = (menuItemData: IMenuItemData) => {\r\n const filterNavlist = [];\r\n if (menuItemData.subMenu) {\r\n const menuLength = menuItemData.subMenu.length;\r\n const leftSideNavList = menuLength && menuItemData.subMenu?.slice(1, menuLength / 2 + 1);\r\n const rightSideNavList = menuLength && menuItemData.subMenu?.slice(menuLength / 2 + 1, menuLength);\r\n for (let i = 0; i < menuLength / 2 + 1; i++) {\r\n if (leftSideNavList && leftSideNavList.length > 0) {\r\n filterNavlist.push(leftSideNavList.shift());\r\n }\r\n if (rightSideNavList && rightSideNavList.length > 0) {\r\n filterNavlist.push(rightSideNavList.shift());\r\n }\r\n }\r\n return filterNavlist as IMenuItemData[];\r\n }\r\n return;\r\n };\r\n\r\n private _createMenuItemList(menuItemData: IMenuItemData): JSX.Element | null {\r\n const {\r\n config: { uniformBySchoolLink }\r\n } = this.props;\r\n const isUniformBySchool = menuItemData.linkText === 'Uniform by School' ? true : false;\r\n let subMenu = menuItemData.subMenu;\r\n if (isUniformBySchool) {\r\n menuItemData.linkURL = uniformBySchoolLink && uniformBySchoolLink.linkUrl.destinationUrl;\r\n if (!this.props.isMobileView) {\r\n subMenu = this.renderSubMenuForUniformBySchoolCategory(menuItemData);\r\n }\r\n }\r\n if (subMenu && subMenu.length > 0) {\r\n if (this.props.isMobileView && this.state.activeMenu !== undefined) {\r\n return this._renderSubMenu(subMenu, menuItemData.id);\r\n } else {\r\n if (this.props.isMobileView) {\r\n return this.renderMenuItemMobileView(menuItemData);\r\n } else {\r\n return (\r\n \r\n {isUniformBySchool\r\n ? this._renderLinkMenuItem(menuItemData, undefined, true)\r\n : this._renderButtonMenuItem(menuItemData)}\r\n {this._renderSubMenu(subMenu, menuItemData.id)}\r\n \r\n );\r\n }\r\n }\r\n } else if (menuItemData && menuItemData.linkText && menuItemData.linkURL && menuItemData.linkURL.length > 0) {\r\n return this._renderLinkMenuItem(menuItemData);\r\n } else if (menuItemData && menuItemData.linkText && !menuItemData.linkURL) {\r\n return this._renderSpanMenuItem(menuItemData);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n private _renderSubMenu = (subMenusList?: IMenuItemData[], activeMenu?: number): JSX.Element | null => {\r\n const { ListItem } = this.props;\r\n const subMenus =\r\n subMenusList &&\r\n subMenusList.filter(subItem => {\r\n // Hide all from all navigation menu\r\n return subItem.linkText && subItem.linkText.indexOf('All') === -1;\r\n });\r\n\r\n if (!subMenus || subMenus.length === 0) {\r\n return null;\r\n }\r\n\r\n const levelClassName: string = '';\r\n const menuOptions =\r\n subMenus &&\r\n subMenus.map((option: IMenuItemData, idx: number) => {\r\n let menuItem: JSX.Element | null;\r\n\r\n menuItem = option.linkURL ? this._renderLinkMenuItem(option, idx) : this._renderSpanMenuItem(option);\r\n return (\r\n \r\n {menuItem}\r\n \r\n );\r\n });\r\n\r\n return this._renderMenu(levelClassName, menuOptions, activeMenu);\r\n };\r\n\r\n private _renderButtonMenuItem = (option: IMenuItemData, activeMenu?: number, index?: number): JSX.Element | null => {\r\n const { Button, isMobileView } = this.props;\r\n if (isMobileView) {\r\n const collapseNumber = option.id ? option.id : 0;\r\n const collapseItem =\r\n this.state.isMenuCollapseOpen && this.state.isMenuCollapseOpen[collapseNumber]\r\n ? this.state.isMenuCollapseOpen[collapseNumber]\r\n : false;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n \r\n );\r\n } else {\r\n return (\r\n \r\n {option.linkText}\r\n \r\n \r\n );\r\n }\r\n };\r\n private _renderLinkMenuItem(option: IMenuItemData, index?: number, mainMenu?: boolean): JSX.Element | null {\r\n const { Link, context } = this.props;\r\n const hasSubs = option.subMenu && option.subMenu.length > 0;\r\n const mandsLink = option.linkURL ? option.linkURL.includes('www.marksandspencer.com') : '';\r\n let url = option.linkURL;\r\n let categoryId;\r\n const sitePath = context.request.sitePath !== null ? context.request.sitePath : '';\r\n if (hasSubs && !mainMenu) {\r\n categoryId = option.linkURL && this._getCategoryIdFromUrl(option.linkURL);\r\n\r\n // changes for sandbox/local\r\n // url = `${context.request.url.requestUrl.origin}${sitePath}/${this._getDestURL()}${categoryId}`;\r\n\r\n // changes for production\r\n url = `https://${context.request.canonicalDomain}${sitePath}/${this._getDestURL()}${categoryId}`;\r\n } else if (!hasSubs && !mandsLink && !mainMenu) {\r\n // changes for sandbox/local\r\n // url = `${context.request.url.requestUrl.origin}${option.linkURL}`;\r\n\r\n // changes for production\r\n url = `https://${context.request.canonicalDomain}${option.linkURL}`;\r\n }\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n }\r\n\r\n private _getDestURL(): string {\r\n return 'category-listing/?categoryId=';\r\n }\r\n\r\n private _getCategoryIdFromUrl = (url: string): string | null => {\r\n if (!url) {\r\n return null;\r\n }\r\n\r\n const splitPath = url.split('/');\r\n const categoryPath = splitPath[splitPath.length - 1];\r\n const categoryPathSplitted = categoryPath.split('?');\r\n const formattedCatId = categoryPathSplitted[0].substring(0, categoryPathSplitted[0].length - 2);\r\n if (categoryPathSplitted.length > 1) {\r\n return `${formattedCatId}&${categoryPathSplitted[1]}`;\r\n } else {\r\n return formattedCatId;\r\n }\r\n };\r\n\r\n private _renderSpanMenuItem = (option: IMenuItemData, index?: number): JSX.Element | null => {\r\n const { Span } = this.props;\r\n return (\r\n \r\n {option.linkText}\r\n \r\n );\r\n };\r\n\r\n private _renderMenu = (level: string, menuOptions: JSX.Element[], currentItem?: number): JSX.Element | null => {\r\n const { MenuList } = this.props;\r\n this.currentLevel = 1;\r\n return (\r\n \r\n {menuOptions}\r\n \r\n );\r\n };\r\n\r\n private _handleDropdownToggle = (data: IMenuItemData, parentId?: number) => () => {\r\n if (!this.props.isMobileView) {\r\n this.setState({\r\n activeMenu: this.state.activeMenu && this.state.activeMenu === data.id! ? undefined : data.id!,\r\n parentMenu: parentId\r\n });\r\n } else {\r\n NavigationMenuView.isBackTrack = false;\r\n this.setState({\r\n activeMenu: data.id,\r\n mobileViewLabelText: data.linkText!,\r\n parentMenu: parentId\r\n });\r\n }\r\n this._resetFocus();\r\n };\r\n\r\n private _handleGoBack = () => () => {\r\n NavigationMenuView.isBackTrack = true;\r\n this.setState({ activeMenu: this.state.parentMenu });\r\n\r\n this._resetFocus();\r\n };\r\n\r\n private _resetFocus = () => {\r\n if (this.props.isMobileView) {\r\n setTimeout(() => {\r\n this.menuNode && this.menuNode.current && this.menuNode.current.focus();\r\n }, 0);\r\n }\r\n };\r\n\r\n // tslint:disable-next-line:no-any\r\n private _handleClickOutside = (event: any) => {\r\n if (this.menuNode.current && !this.menuNode.current.contains(event.target)) {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '' });\r\n }\r\n };\r\n\r\n private _closeSubmenu = (): void => {\r\n if (!this.props.isMobileView) {\r\n this.setState({ activeMenu: undefined, mobileViewLabelText: '' });\r\n }\r\n };\r\n}\r\n\r\nexport default NavigationMenuView;\r\n","import classnames from 'classnames';\r\nimport * as Popper from 'popper.js';\r\nimport React, { useState } from 'react';\r\n\r\nimport { buildWishlistLine } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { Alert, UncontrolledTooltip } from '@msdyn365-commerce-modules/utilities';\r\nimport { IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { AsyncResult, CartLine, CommerceList, ProductDimension, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\r\nimport {\r\n addLinesAsync,\r\n createCommerceListAsync,\r\n createGetByCustomerInput,\r\n removeLinesAsync\r\n} from '@msdyn365-commerce/retail-proxy/dist/DataActions/CommerceListsDataActions.g';\r\n\r\nexport interface IAddToWishlistComponentProps extends IComponentProps {\r\n className?: string;\r\n addToWishlistButtonText: string;\r\n removeFromWishlistButtonText: string;\r\n nameOfWishlist: string;\r\n\r\n addToWishlistMessage?: string;\r\n removedFromWishlistMessage?: string;\r\n addItemToWishlistError?: string;\r\n removeItemFromWishlistError?: string;\r\n\r\n showButtonText?: boolean;\r\n showButtonTooltip?: boolean;\r\n tooltipPosition?: Popper.Placement;\r\n showStatusMessage?: boolean;\r\n showRemoveButton?: boolean;\r\n disabled?: boolean;\r\n cartline?: CartLine;\r\n canAddMasterProduct?: boolean;\r\n\r\n getSelectedProduct?: Promise;\r\n\r\n onSuccess?(result: IWishlistActionSuccessResult, cartline?: CartLine): void;\r\n onError?(result: IWishlistActionErrorResult): void;\r\n}\r\n\r\nexport interface IWishlistActionSuccessResult {\r\n status: 'ADDED' | 'REMOVED';\r\n}\r\n\r\nexport interface IWishlistActionErrorResult {\r\n status: 'FAILED' | 'MISSINGDIMENSION';\r\n\r\n missingDimensions?: ProductDimension[];\r\n}\r\n\r\ninterface IAddToWishlistStateManager {\r\n waiting: boolean;\r\n canRemove: boolean;\r\n content: IAddtoWishlistContentState;\r\n\r\n setWaiting(newWaiting: boolean): void;\r\n setContent(newContent: IAddtoWishlistContentState): void;\r\n setCanRemove(newCanRemove: boolean): void;\r\n}\r\n\r\ninterface IAddtoWishlistContentState {\r\n showAlert?: boolean;\r\n wishlistTextMessage?: string;\r\n color?: string;\r\n}\r\n\r\ninterface IAddtoWishlistData {\r\n wishlists?: CommerceList[];\r\n product: SimpleProduct;\r\n}\r\n\r\nexport interface IAddtoWishlistComponent extends IComponent {\r\n onClick(): (event: React.MouseEvent, props: IAddToWishlistComponentProps, state: IAddToWishlistStateManager) => void;\r\n}\r\n\r\nconst onClick = async (\r\n _event: React.MouseEvent,\r\n props: IAddToWishlistComponentProps,\r\n state: IAddToWishlistStateManager\r\n): Promise => {\r\n const { user } = props.context.request;\r\n let { product } = props.data;\r\n\r\n if (state.waiting) {\r\n return;\r\n }\r\n\r\n if (!user.isAuthenticated && user.signInUrl && window) {\r\n window.location.assign(user.signInUrl);\r\n\r\n return;\r\n }\r\n\r\n state.setWaiting(true);\r\n if (!(props.getSelectedProduct === undefined)) {\r\n product = (await props.getSelectedProduct) || props.data.product;\r\n }\r\n\r\n await (doesProductExistInWishlist(product, props) ? removeFromWishlist(product, props, state) : addToWishlist(product, props, state));\r\n state.setWaiting(false);\r\n};\r\n\r\nconst onDismiss = (state: IAddToWishlistStateManager): void => {\r\n state.setContent({ color: 'success', showAlert: false });\r\n};\r\n\r\nconst AddToWishlistComponentActions = {\r\n onClick: onClick,\r\n onDismiss: onDismiss\r\n};\r\n\r\nconst AddToWishlist: React.FC = (props: IAddToWishlistComponentProps) => {\r\n const [waiting, setWaiting] = useState(false);\r\n const [canRemove, setCanRemove] = useState(doesProductExistInWishlist(props.data.product, props));\r\n const [content, setContent] = useState({});\r\n const state: IAddToWishlistStateManager = {\r\n waiting,\r\n canRemove,\r\n content,\r\n\r\n setWaiting,\r\n setCanRemove,\r\n setContent\r\n };\r\n\r\n React.useEffect(() => {\r\n setCanRemove(doesProductExistInWishlist(props.data.product, props));\r\n }, [props]);\r\n\r\n const {\r\n removeFromWishlistButtonText,\r\n addToWishlistButtonText,\r\n showStatusMessage,\r\n showRemoveButton,\r\n showButtonText,\r\n className,\r\n disabled,\r\n showButtonTooltip,\r\n tooltipPosition\r\n } = props;\r\n\r\n const onClickHandler = (event: React.MouseEvent) => {\r\n return AddToWishlistComponentActions.onClick(event, props, state);\r\n };\r\n const onDismissHandler = () => {\r\n return AddToWishlistComponentActions.onDismiss(state);\r\n };\r\n const ariaLabel = state.canRemove ? removeFromWishlistButtonText : addToWishlistButtonText;\r\n const addToWishlistRef: React.RefObject = React.createRef();\r\n const removeFromWishlistRef: React.RefObject = React.createRef();\r\n const showMessage = showStatusMessage !== undefined ? showStatusMessage : true;\r\n const showButton = showRemoveButton !== undefined ? showRemoveButton : true;\r\n const showTooltip = showButtonTooltip !== undefined ? showButtonTooltip : true;\r\n const tooltipPos = showButtonTooltip !== undefined ? tooltipPosition : 'right';\r\n\r\n if (state.canRemove && !showButton) {\r\n return null;\r\n }\r\n return (\r\n \r\n {showButtonText ? (\r\n <>\r\n \r\n {ariaLabel}\r\n \r\n {showTooltip && (\r\n \r\n {ariaLabel}\r\n \r\n )}\r\n \r\n ) : (\r\n <>\r\n \r\n {showTooltip && (\r\n \r\n {ariaLabel}\r\n \r\n )}\r\n \r\n )}\r\n {state.content.showAlert && showMessage ? (\r\n
\r\n \r\n {state.content.wishlistTextMessage}\r\n \r\n
\r\n ) : (\r\n ''\r\n )}\r\n
\r\n );\r\n};\r\n\r\nconst doesProductExistInWishlist = (product: SimpleProduct, props: IAddToWishlistComponentProps): boolean => {\r\n const { wishlists } = props.data;\r\n\r\n if (!wishlists || !wishlists[0]) {\r\n return false;\r\n }\r\n\r\n const { CommerceListLines } = wishlists[0];\r\n\r\n if (!CommerceListLines || CommerceListLines.length === 0) {\r\n return false;\r\n }\r\n\r\n for (const wishlistItem of CommerceListLines) {\r\n if (wishlistItem.ProductId === product.RecordId) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nconst propogateSuccess = (props: IAddToWishlistComponentProps, result: IWishlistActionSuccessResult): void => {\r\n const { onSuccess, cartline } = props;\r\n\r\n if (onSuccess) {\r\n cartline ? onSuccess(result, props.cartline) : onSuccess(result);\r\n }\r\n};\r\n\r\nconst propogateError = (props: IAddToWishlistComponentProps, result: IWishlistActionErrorResult): void => {\r\n const { onError } = props;\r\n\r\n if (onError) {\r\n onError(result);\r\n }\r\n};\r\n\r\nconst addToWishlist = (\r\n product: SimpleProduct,\r\n props: IAddToWishlistComponentProps,\r\n state: IAddToWishlistStateManager\r\n): AsyncResult => {\r\n const { canAddMasterProduct, context } = props;\r\n\r\n if (product.Dimensions && !canAddMasterProduct) {\r\n const missingDimensions = product.Dimensions.filter(dimension => !(dimension.DimensionValue && dimension.DimensionValue.Value));\r\n\r\n if (missingDimensions.length > 0) {\r\n // At least one dimension with no value exists on the product, won't be able to add to cart\r\n propogateError(props, { status: 'MISSINGDIMENSION', missingDimensions: missingDimensions });\r\n\r\n return AsyncResult.resolve();\r\n }\r\n }\r\n\r\n const userAccountNumber = context.request.user.customerAccountNumber;\r\n\r\n if (userAccountNumber) {\r\n if (!props.data.wishlists || props.data.wishlists.length === 0) {\r\n const wishlistName = props.nameOfWishlist;\r\n\r\n const listData: CommerceList = {\r\n CustomerId: context.request.user.customerAccountNumber,\r\n Name: wishlistName,\r\n // This is the type value specifically for a wishlist\r\n CommerceListTypeValue: 1,\r\n Id: 0\r\n };\r\n\r\n return createCommerceListAsync({ callerContext: context.actionContext }, listData)\r\n .then(commerceList => {\r\n return callAddWishlistLine(props, state, userAccountNumber, commerceList.Id, product.RecordId);\r\n })\r\n .catch(error => {\r\n if (context.telemetry) {\r\n context.telemetry.warning(error);\r\n context.telemetry.debug('Unable to create a wishlist');\r\n }\r\n propogateError(props, { status: 'FAILED' });\r\n });\r\n } else {\r\n return callAddWishlistLine(props, state, userAccountNumber, props.data.wishlists[0].Id, product.RecordId);\r\n }\r\n }\r\n\r\n return AsyncResult.resolve();\r\n};\r\n\r\nconst callAddWishlistLine = (\r\n props: IAddToWishlistComponentProps,\r\n state: IAddToWishlistStateManager,\r\n userAccountNumber: string,\r\n wishlistId: number,\r\n productId: number\r\n): AsyncResult => {\r\n const { context } = props;\r\n\r\n return addLinesAsync({ callerContext: context.actionContext }, wishlistId, [\r\n buildWishlistLine(productId, userAccountNumber, wishlistId)\r\n ])\r\n .then(createdCommerceList => {\r\n context.actionContext.update(createGetByCustomerInput({}, userAccountNumber), [createdCommerceList]);\r\n if (context.telemetry) {\r\n context.telemetry.debug(`Added item to the wishlist ${createdCommerceList}`);\r\n }\r\n state.setCanRemove(true);\r\n state.setContent({\r\n color: 'success',\r\n showAlert: true,\r\n wishlistTextMessage: props.addToWishlistMessage ? props.addToWishlistMessage : 'Added to your wishlist'\r\n });\r\n propogateSuccess(props, { status: 'ADDED' });\r\n })\r\n .catch(error => {\r\n if (context.telemetry) {\r\n context.telemetry.warning(error);\r\n context.telemetry.debug(`Unable to add item to wishlist ${error}`);\r\n }\r\n\r\n state.setContent({ color: 'danger', showAlert: true, wishlistTextMessage: props.addItemToWishlistError });\r\n propogateError(props, { status: 'FAILED' });\r\n });\r\n};\r\n\r\nconst removeFromWishlist = (\r\n product: SimpleProduct,\r\n props: IAddToWishlistComponentProps,\r\n state: IAddToWishlistStateManager\r\n): AsyncResult => {\r\n const { context, data, removedFromWishlistMessage, removeItemFromWishlistError } = props;\r\n const { wishlists } = data;\r\n const { actionContext, request, telemetry } = context;\r\n const accountNumber = request.user.customerAccountNumber;\r\n\r\n if (wishlists && wishlists[0]) {\r\n const wishlistLine = wishlists[0].CommerceListLines!.find(line => line.ProductId === product.RecordId);\r\n\r\n if (wishlistLine) {\r\n return removeLinesAsync({ callerContext: actionContext }, wishlists[0].Id, [wishlistLine])\r\n .then(commerceList => {\r\n if (accountNumber) {\r\n context.actionContext.update(createGetByCustomerInput({}, accountNumber), [commerceList]);\r\n }\r\n\r\n if (telemetry) {\r\n telemetry.debug(`[WishlistButton] ${product.RecordId} removed from Wishlist ${commerceList.Id}`);\r\n }\r\n state.setCanRemove(false);\r\n state.setContent({\r\n color: 'success',\r\n showAlert: true,\r\n wishlistTextMessage: removedFromWishlistMessage ? removedFromWishlistMessage : `Removed item from the wishlist`\r\n });\r\n propogateSuccess(props, { status: 'REMOVED' });\r\n })\r\n .catch(error => {\r\n if (telemetry) {\r\n telemetry.warning(error);\r\n telemetry.debug('[WishlistButton] Error removing item from the wishlist');\r\n }\r\n\r\n state.setContent({ color: 'danger', wishlistTextMessage: removeItemFromWishlistError });\r\n propogateError(props, { status: 'FAILED' });\r\n });\r\n }\r\n } else {\r\n if (telemetry) {\r\n telemetry.debug(\"[WishlistButton] Can't remove from wishlist since no wishlist exisits OR there is no product data\");\r\n }\r\n }\r\n\r\n return AsyncResult.resolve();\r\n};\r\n\r\nexport default AddToWishlist;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\n\n/* ---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { IInvoicesListResources } from '../invoices-list.props.autogenerated';\n\ninterface IRequestInvoiceModalProps {\n className: string;\n email: string;\n isModalOpen: boolean;\n submitRequestLabel: string;\n modalHeaderLabel: string;\n sendToEmailLabel: string;\n cancelLabel: string;\n searchPlaceholderLabel: string;\n invoices: InvoiceModel[];\n invoicesFoundString: string;\n singleInvoiceFoundString: string;\n searchButtonAltText: string;\n resources: IInvoicesListResources;\n toggle(): void;\n onSubmitRequest(invoiceId: string): void;\n}\n\n/**\n * On submit request click function.\n * @param selectedInvoiceIndex -Check is busy.\n * @param onClosing -On closing function.\n * @param filteredInvoices -Invoice modal.\n * @param onSubmitRequest -On submit request function.\n * @returns Call on submit request.\n */\nconst onSubmitRequestClick = (\n onClosing: () => void,\n filteredInvoices: InvoiceModel[],\n onSubmitRequest: (invoiceId: string) => void,\n checkboxRef: React.MutableRefObject\n) => () => {\n const defaultIndex = 0;\n let closingFlag: number = 0;\n\n filteredInvoices.map((invoice, index) => {\n const inputInvoice = checkboxRef.current[Number(index)] as React.RefObject;\n if (inputInvoice.current?.checked === true && index >= defaultIndex) {\n onSubmitRequest(invoice.id);\n closingFlag = closingFlag + 1;\n }\n });\n if (closingFlag <= filteredInvoices.length) {\n onClosing();\n }\n};\n\n/**\n * On search input change function.\n * @param setSearchInput -Set search input.\n * @returns Set search input function.\n */\nconst searchInputChangedHandler = (setSearchInput: React.Dispatch>) => (\n event: React.ChangeEvent\n) => {\n setSearchInput(event.target.value);\n};\n\n/**\n * Search entered handler.\n * @param invoices -InvoiceModel.\n * @param searchInput -String.\n * @param setFilteredInvoices -InvoiceModel action.\n * @param filteredInvoices -Filtered Invoices.\n * @param setSelectedInvoiceIndex -Selected Invoice Index.\n * @param setShouldShowSearchResults -Show search result action.\n * @param setInvoiceOptions -Invoice options action.\n * @param selectedInvoiceIndex -Selected invoice index.\n * @param className -String.\n * @returns Set invoice options.\n */\nconst searchEnteredHandler = (\n invoices: InvoiceModel[],\n searchInput: string,\n setFilteredInvoices: React.Dispatch>,\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: React.Dispatch>,\n setShouldShowSearchResults: React.Dispatch>,\n setInvoiceOptions: React.Dispatch>,\n selectedInvoiceIndex: number,\n className: string,\n checkboxRef: React.MutableRefObject\n) => () => {\n let updatedInvoices = filteredInvoices;\n if (!StringExtensions.isNullOrEmpty(searchInput)) {\n updatedInvoices = invoices.filter(invoice => invoice.id.toLocaleUpperCase().includes(searchInput.toLocaleUpperCase()));\n } else {\n updatedInvoices = invoices;\n }\n\n if (ArrayExtensions.hasElements(updatedInvoices)) {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(0);\n } else {\n setFilteredInvoices(updatedInvoices);\n setSelectedInvoiceIndex(-1);\n }\n setShouldShowSearchResults(true);\n\n setInvoiceOptions(\n renderInvoiceOptions(\n StringExtensions.isNullOrEmpty(searchInput) ? invoices : updatedInvoices,\n setSelectedInvoiceIndex,\n className,\n checkboxRef\n )\n );\n};\n\n/**\n * On cancel function.\n * @param onClosing -Closing function.\n * @param toggle -Toggle Function.\n * @returns Toggle function.\n */\nconst onCancelHandler = (onClosing: () => void, toggle: () => void) => () => {\n onClosing();\n toggle();\n};\n\n/**\n * On invoice select.\n * @param setSelectedInvoiceIndex -Set Selected Invoice Index.\n * @param index -Number.\n * @returns Set Selected Invoice Index.\n */\nconst onInvoiceSelectHandler = (setSelectedInvoiceIndex: (newIndex: number) => void, index: number) => () => {\n setSelectedInvoiceIndex(index);\n};\n\nconst renderInvoiceOptions = (\n filteredInvoices: InvoiceModel[],\n setSelectedInvoiceIndex: (newIndex: number) => void,\n className: string,\n checkboxRef: React.MutableRefObject\n) => {\n checkboxRef.current = filteredInvoices.map((_invoice, i) => checkboxRef.current[Number(i)] ?? React.createRef());\n return (\n
\n {filteredInvoices.map((invoice, index) => {\n const onInvoiceSelect = onInvoiceSelectHandler(setSelectedInvoiceIndex, index);\n\n const checkboxId = `invoice__${invoice.id}`;\n const checkboxName = `invoiceSelect__${invoice.id}`;\n\n return (\n
\n \n \n
\n );\n })}\n
\n );\n};\n\nexport const RequestInvoiceModal: React.FC = ({\n className,\n email,\n isModalOpen,\n toggle,\n modalHeaderLabel,\n sendToEmailLabel,\n submitRequestLabel,\n cancelLabel,\n onSubmitRequest,\n invoices,\n searchPlaceholderLabel,\n invoicesFoundString,\n singleInvoiceFoundString,\n searchButtonAltText,\n resources\n}) => {\n const [selectedInvoiceIndex, setSelectedInvoiceIndex] = React.useState(-1);\n const [filteredInvoices, setFilteredInvoices] = React.useState(invoices);\n const [searchInput, setSearchInput] = React.useState('');\n const [shouldShowSearchResults, setShouldShowSearchResults] = React.useState(false);\n const focusDelay = 110;\n const checkboxRef = React.useRef([]);\n const invoiceOptionsData = renderInvoiceOptions(filteredInvoices, setSelectedInvoiceIndex, className, checkboxRef);\n const [invoiceOptions, setInvoiceOptions] = React.useState(invoiceOptionsData);\n const focusElement = React.useRef(null);\n React.useEffect(() => {\n if (isModalOpen && focusElement.current) {\n setTimeout(() => {\n focusElement.current?.focus();\n }, focusDelay);\n }\n }, [isModalOpen]);\n\n /**\n * Sets the filtered invoices to the ones that were selected on the main screen.\n */\n const setFilteredInvoicesToSelectedInvoices = () => {\n setSelectedInvoiceIndex(-1);\n const selectedInvoices = invoices.filter(invoice => invoice.isSelected);\n if (ArrayExtensions.hasElements(selectedInvoices)) {\n setFilteredInvoices(selectedInvoices);\n\n // If only one invoice selected, auto select it\n if (selectedInvoices.length === 1) {\n setSelectedInvoiceIndex(0);\n }\n\n setInvoiceOptions(renderInvoiceOptions(selectedInvoices, setSelectedInvoiceIndex, className, checkboxRef));\n } else {\n setFilteredInvoices(invoices);\n setInvoiceOptions(renderInvoiceOptions(invoices, setSelectedInvoiceIndex, className, checkboxRef));\n }\n };\n\n const searchEntered = searchEnteredHandler(\n invoices,\n searchInput,\n setFilteredInvoices,\n filteredInvoices,\n setSelectedInvoiceIndex,\n setShouldShowSearchResults,\n setInvoiceOptions,\n selectedInvoiceIndex,\n className,\n checkboxRef\n );\n\n const onClosing = () => {\n setSelectedInvoiceIndex(-1);\n setFilteredInvoices(invoices);\n setSearchInput('');\n setShouldShowSearchResults(false);\n };\n\n /**\n * Sets the invoices that are possible to select when the dialog is opened.\n */\n const onOpened = () => {\n setSearchInput('');\n setFilteredInvoicesToSelectedInvoices();\n };\n\n const searchResultString = filteredInvoices.length === 1 ? singleInvoiceFoundString : invoicesFoundString;\n const invoicesFoundReplaceIndex = searchResultString.indexOf('{0}');\n\n return (\n \n \n {modalHeaderLabel}\n \n \n
\n \n
\n {email}\n
\n
\n {shouldShowSearchResults && (\n
\n {searchResultString.substring(0, invoicesFoundReplaceIndex)}\n {filteredInvoices.length}\n {searchResultString.substring(invoicesFoundReplaceIndex + 3)}\n
\n )}\n
\n \n \n
\n {invoiceOptions}\n
\n
\n
\n \n \n {submitRequestLabel}\n \n \n \n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getUrlSync, isOboRequest } from '@msdyn365-commerce/core';\nimport {\n BusinessPartnerOperationDeliveryType,\n BusinessPartnerUsersDataActions,\n InvoicePaidStatus,\n InvoiceSearchCriteria,\n IQueryResultSettings,\n OrderInvoice\n} from '@msdyn365-commerce/retail-proxy';\nimport { getCurrentAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport {\n ArrayExtensions,\n getCustomer,\n GetCustomerInput,\n getInvoices,\n GetInvoicesInput,\n IQueryResultSettingsModuleConfig,\n QueryResultSettingsProxy,\n StringExtensions\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { reaction } from 'mobx';\nimport { observer } from 'mobx-react';\n\nimport { InvoiceErrorComponent } from './components/invoice-error-component';\nimport { InvoicesFilterComponent, InvoicesFilterState } from './components/invoices-filter-component';\nimport { InvoicesTableComponent } from './components/invoices-table/invoices-table-component';\nimport { IMakePaymentResources, MakePaymentComponent } from './components/make-payment-component';\nimport { RequestInvoiceButton } from './components/request-invoice-button';\nimport { RequestInvoiceModal } from './components/request-invoice-modal';\nimport { InvoiceModel } from './helpers/invoice-data';\nimport { IAddInvoicesToCartFailureResult } from './helpers/pay-invoices';\nimport { IInvoicesListData } from './invoices-list.data';\nimport { IInvoicesListProps } from './invoices-list.props.autogenerated';\n\nexport type InvoicesListStatus = 'LOADING' | 'SUCCESS' | 'FAILED' | 'EMPTY';\nexport type InvoiceErrorHost = 'ADDINVOICETOCART';\n\nexport interface IInvoicesListViewProps extends IInvoicesListProps {\n moduleProps: IModuleProps;\n\n header: JSX.Element;\n filter: JSX.Element;\n content?: JSX.Element;\n invoiceRequestModal?: JSX.Element;\n pagination?: JSX.Element;\n}\n\nexport interface IInvoiceErrorState {\n errorHost?: InvoiceErrorHost;\n errorReason?: IAddInvoicesToCartFailureResult;\n errorMessage: string;\n otherError?: string;\n errorCode?: string;\n}\n\nexport interface IInvoicesListState {\n invoices: InvoiceModel[];\n invoicesFilterState: InvoicesFilterState;\n errorState: IInvoiceErrorState;\n isInvoiceRequestModalOpen: boolean;\n isLoading: boolean;\n isOpen: boolean;\n isPageLoaded: boolean;\n payInvoiceErrorModalOpen: boolean;\n selectedButtonElement?: HTMLButtonElement | null;\n}\n\n/**\n * InvoicesList component.\n * @extends {React.Component, IInvoicesListState>}\n */\n@observer\nclass InvoicesList extends React.Component, IInvoicesListState> {\n private readonly _className: string = 'msc-invoices-list';\n\n private readonly payInvoiceRequestReference: React.RefObject;\n\n private readonly makePaymentReference: React.RefObject;\n\n private buttonChildReference: React.RefObject[] = [];\n\n private buttonChildPayButtonReference: React.RefObject[] = [];\n\n private readonly _queryResultSettings: IQueryResultSettings;\n\n private invoiceIds: string[] = [];\n\n constructor(props: IInvoicesListProps) {\n super(props);\n\n this._queryResultSettings = QueryResultSettingsProxy.fromModuleData(\n this.props.context.request,\n this.props.config as IQueryResultSettingsModuleConfig\n ).QueryResultSettings;\n this.payInvoiceRequestReference = React.createRef();\n this.makePaymentReference = React.createRef();\n this._updateInvoicesState = this._updateInvoicesState.bind(this);\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._onToggleInvoiceRequestModal = this._onToggleInvoiceRequestModal.bind(this);\n this._handleFilterStateChange = this._handleFilterStateChange.bind(this);\n this._loadMoreInvoices = this._loadMoreInvoices.bind(this);\n this._requestInvoice = this._requestInvoice.bind(this);\n this._requestSpecificInvoice = this._requestSpecificInvoice.bind(this);\n this._setPayInvoiceErrorModalClose = this._setPayInvoiceErrorModalClose.bind(this);\n this.state = {\n invoices: [],\n invoicesFilterState: InvoicesFilterState.ShowAll,\n isLoading: true,\n isOpen: true,\n isPageLoaded: false,\n errorState: { errorMessage: '' },\n isInvoiceRequestModalOpen: false,\n payInvoiceErrorModalOpen: false,\n selectedButtonElement: null\n };\n }\n\n public shouldComponentUpdate(nextProps: IInvoicesListProps, nextState: IInvoicesListState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className = '', heading },\n context: {\n request: { channel },\n cultureFormatter: {\n formatCurrency,\n\n // @ts-expect-error\n currencyCode\n }\n },\n data: { customerBalance },\n resources: { invoicesListTitle, invoicesListDescTitle, invoicesListDescCount }\n } = this.props;\n\n const totalAmount = customerBalance.result?.OpenInvoiceBalance || 0;\n const amountText = `${formatCurrency(totalAmount.toFixed(2), currencyCode)} ${channel?.Currency || 'USD'}`;\n\n const totalCount = customerBalance.result?.OpenInvoiceCount || 0;\n const countText = invoicesListDescCount.replace('{0}', totalCount.toString());\n const invoicesListTitleHeading = heading?.text ?? invoicesListTitle;\n\n const headerClassName = `${this._className}__header`;\n\n const header = (\n
\n \n
\n
{invoicesListDescTitle}
\n
{amountText}
\n
{countText}
\n
\n
\n );\n\n const viewProps: IInvoicesListViewProps = {\n ...(this.props as IInvoicesListProps),\n moduleProps: {\n moduleProps: this.props,\n className: classnames(this._className, className)\n },\n header,\n invoiceRequestModal: this._renderInvoiceRequestModal(),\n filter: this._renderInvoicesFilter(this._className),\n pagination: this._renderPagination()\n };\n\n if (!this.state.isPageLoaded) {\n return this.props.renderView(viewProps);\n }\n\n if (ArrayExtensions.hasElements(this.state.invoices)) {\n viewProps.content = this._renderListContainer();\n } else {\n viewProps.content = this._renderEmptyInvoiceLinesPageContent();\n }\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public async componentDidMount(): Promise {\n await this.props.data.customer;\n const invoicesData = await this.props.data.invoices;\n this._initializeWithInvoices(invoicesData);\n\n reaction(\n () => this.state.isInvoiceRequestModalOpen,\n async () => {\n if (this.invoiceIds && !this.state.isInvoiceRequestModalOpen) {\n const context = { callerContext: this.props.context.actionContext };\n const b2bUserId: string = this.props.data.b2bUserInformation?.result?.B2BUserId || '';\n for (const invoiceId of this.invoiceIds) {\n await BusinessPartnerUsersDataActions.requestInvoiceCopyAsync(\n context,\n b2bUserId,\n invoiceId,\n BusinessPartnerOperationDeliveryType.Email\n );\n }\n this.invoiceIds = [];\n }\n }\n );\n }\n\n private _initializeWithInvoices(invoicesData: OrderInvoice[]): void {\n const invoices = invoicesData.map((invoice, index) => {\n this.buttonChildReference[Number(index)] = React.createRef();\n this.buttonChildPayButtonReference[Number(index)] = React.createRef();\n return new InvoiceModel(invoice);\n });\n this.setState({\n invoices,\n isLoading: false,\n isPageLoaded: true\n });\n }\n\n private _addInvoices(invoicesData: OrderInvoice[]): void {\n const newInvoices = invoicesData.map(invoice => new InvoiceModel(invoice));\n const invoices = this.state.invoices.concat(newInvoices);\n this.setState({\n invoices,\n isLoading: false\n });\n }\n\n private _renderEmptyInvoiceLinesPageContent(): JSX.Element {\n const containerClass = `${this._className}__empty-lines__container`;\n const actionsContainerClass = `${containerClass}__actions`;\n return (\n
\n
{this.props.resources.invoiceEmptyInvoiceLinesTitle}
\n
{this.props.resources.invoiceEmptyInvoiceLinesDescription}
\n
\n \n {this.props.resources.invoiceEmptyInvoiceLinesContinueShoppingButtonText}\n \n
\n
\n );\n }\n\n private _renderListContainer(): JSX.Element {\n const containerClass = `${this._className}__container`;\n const containerHeaderClass = `${containerClass}__header`;\n const containerContentClass = `${containerClass}__content`;\n const isOnBehalfOfRequest = isOboRequest(this.props.context.request);\n\n return (\n
\n
\n {this._renderMakePayment(containerHeaderClass, isOnBehalfOfRequest)}\n {this._renderInvoiceRequestButton()}\n
\n
{this._renderInvoiceErrors()}
\n
{this._renderInvoicesList(containerContentClass)}
\n
\n );\n }\n\n private _updateInvoicesState(): void {\n this.setState({\n invoices: this.state.invoices\n });\n }\n\n private async _getInvoicesSearchCriteria(state: InvoicesFilterState): Promise {\n const searchCriteria: InvoiceSearchCriteria = {};\n\n const context = this.props.context.actionContext;\n\n const businessPartner = await getCurrentAsync({ callerContext: context });\n searchCriteria.BusinessPartnerId = businessPartner.BusinessPartnerId;\n\n const customer = await getCustomer(new GetCustomerInput(context.requestContext.apiSettings), context);\n searchCriteria.CustomerId = customer.AccountNumber;\n\n switch (state) {\n case InvoicesFilterState.ShowAll:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.None];\n break;\n case InvoicesFilterState.Paid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Paid];\n break;\n case InvoicesFilterState.PartiallyPaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.PartiallyPaid];\n break;\n case InvoicesFilterState.Unpaid:\n searchCriteria.InvoicePaidStatusValues = [InvoicePaidStatus.Unpaid];\n break;\n default:\n throw new Error('Failed to process unknown invoices filter state.');\n }\n\n return searchCriteria;\n }\n\n private async _handleFilterStateChange(state: InvoicesFilterState): Promise {\n this.setState({\n invoicesFilterState: state,\n isLoading: true\n });\n\n const searchCriteria = await this._getInvoicesSearchCriteria(state);\n\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip = 0;\n }\n\n const invoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._initializeWithInvoices(invoices);\n }\n\n private _renderInvoicesFilter(className: string): JSX.Element {\n const containerClass = `${this._className}__container`;\n const containerContentClass = `${containerClass}__content`;\n const filterClassName = `${className}__filter`;\n return (\n
\n
{this._renderInvoiceInCartPaymentMessage()}
\n \n
\n );\n }\n\n private _renderInvoicesList(className: string): JSX.Element {\n const tableClassName = `${className}__table`;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState, reference?: React.RefObject): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n errorState.errorMessage =\n newErrorState.errorReason?.failureReason === 'EMPTYINPUT'\n ? this.props.resources.invoiceErrorInvoiceIdNotExist\n : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\n\n const shouldShowAdditionalInfoInPopup =\n errorState.errorCode === 'Microsoft_Dynamics_Commerce_Runtime_InvoiceLineNotAllowedWithItemLines';\n this.setState({ errorState, payInvoiceErrorModalOpen: shouldShowAdditionalInfoInPopup, selectedButtonElement: reference?.current });\n }\n\n private _renderMakePayment(className: string, disabled: boolean): JSX.Element {\n const id = `${className}__make-payment`;\n const makePaymentResources: IMakePaymentResources = {\n makePaymentButtonText: this.props.resources.makePaymentButtonText,\n makePaymentButtonAriaLabel: this.props.resources.makePaymentButtonAriaLabel\n };\n\n const selectedInvoices = this._getSelectedInvoices();\n\n return (\n \n );\n }\n\n private _setPayInvoiceErrorModalClose(): void {\n this.setState({\n payInvoiceErrorModalOpen: false\n });\n this.state.selectedButtonElement?.focus();\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const {\n resources: {\n payInvoiceErrorDialogHeader,\n payInvoiceErrorDialogBodyErrorTitle,\n payInvoiceErrorDialogBodyErrorDescription,\n payInvoiceErrorDialogFooterGoToCartButtonText,\n payInvoiceErrorDialogFooterCancelButtonText\n }\n } = this.props;\n\n const cartUrl = getUrlSync('cart', this.props.context.actionContext) || '';\n\n const errorClassName = `${this._className}__errors`;\n\n return (\n \n );\n }\n\n private _renderInvoiceInCartPaymentMessage(): JSX.Element {\n const cart = this.props.data.cart?.result;\n\n if (!cart?.hasInvoiceLine) {\n return <>;\n }\n\n return (\n \n \n \n );\n }\n\n // Dismiss alert.\n private readonly _onDismiss = () => {\n this.setState({\n isOpen: false\n });\n };\n\n private _renderPagination(): JSX.Element | undefined {\n const { data, resources } = this.props;\n const invoices = data?.invoices?.result;\n if (!invoices || invoices.length < this._queryResultSettings.Paging!.Top!) {\n return undefined;\n }\n\n return (\n \n {resources.invoicesLoadMore}\n \n );\n }\n\n private async _loadMoreInvoices(): Promise {\n this.setState({ isLoading: true });\n const searchCriteria = await this._getInvoicesSearchCriteria(this.state.invoicesFilterState);\n if (this._queryResultSettings.Paging) {\n this._queryResultSettings.Paging.Skip! += this._queryResultSettings.Paging.Top!;\n }\n const newInvoices = await getInvoices(\n new GetInvoicesInput(searchCriteria, this._queryResultSettings),\n this.props.context.actionContext\n );\n this._addInvoices(newInvoices);\n }\n\n private _renderInvoiceRequestModal(): JSX.Element {\n const customer = this.props.data.customer.result;\n const {\n invoiceRequestModalCancelLabel,\n invoiceRequestModalSubmitLabel,\n invoiceRequestModalHeaderLabel,\n invoiceRequestModalSendToEmailLabel,\n invoiceRequestModalSearch,\n invoiceRequestModalInvoiceSearchDisplay,\n invoiceRequestModalSingleInvoiceSearchDisplay,\n invoiceRequestModalSearchButton\n } = this.props.resources;\n\n return (\n \n );\n }\n\n private _onToggleInvoiceRequestModal(): void {\n this.setState({\n isInvoiceRequestModalOpen: !this.state.isInvoiceRequestModalOpen\n });\n if (this.state.isInvoiceRequestModalOpen) {\n this.state.selectedButtonElement?.focus();\n }\n }\n\n /**\n * Request specific invoice function.\n */\n private readonly _onToggleInvoiceRequestParentModal = () => {\n this.setState(\n {\n selectedButtonElement: this.payInvoiceRequestReference.current\n },\n () => {\n this._onToggleInvoiceRequestModal();\n }\n );\n };\n\n private _renderInvoiceRequestButton(): JSX.Element | null {\n const { invoiceRequestButtonLabel } = this.props.resources;\n const customer = this.props.data.customer.result;\n\n if (StringExtensions.isNullOrWhitespace(customer?.Email)) {\n return null;\n }\n\n return (\n \n );\n }\n\n private _requestInvoice(invoiceId: string): void {\n this.invoiceIds.push(invoiceId);\n this._onToggleInvoiceRequestModal();\n }\n\n private _getSelectedInvoices(): InvoiceModel[] {\n let selectedInvoices = this.state.invoices.filter(invoice => invoice.isSelected);\n if (!ArrayExtensions.hasElements(selectedInvoices)) {\n selectedInvoices = this.state.invoices;\n }\n\n return selectedInvoices;\n }\n\n private _requestSpecificInvoice(\n specificInvoice: InvoiceModel,\n requestInvoiceButtonReference: React.RefObject\n ): void {\n this.state.invoices.forEach((invoice: InvoiceModel) => {\n if (invoice === specificInvoice) {\n invoice.isSelected = true;\n } else {\n invoice.isSelected = false;\n }\n });\n this.setState({\n selectedButtonElement: requestInvoiceButtonReference.current\n });\n this._onToggleInvoiceRequestModal();\n }\n}\n\nexport default InvoicesList;\n"],"sourceRoot":""}