{"version":3,"sources":["webpack:///./src/themes/spring-valley-vineyard/views/components/carticon.component.tsx?b397","webpack:///src/modules/invoices-list/index.ts?0857","webpack:///./src/modules/shipping-service/shipping-service.tsx?5d36","webpack:///./src/themes/conn-creek/views/checkout-apple-pay.view.tsx?950a","webpack:///src/modules/invoices-list/components/request-invoice-button.tsx?b5d9","webpack:///src/modules/breadcrumb/breadcrumb.view.tsx?58b4","webpack:///./src/themes/conn-creek/views/components/carticon.component.tsx?e575","webpack:///src/modules/image-list/image-list.tsx?18cb","webpack:///./src/modules/family-and-friends/components/family-and-friends-code-item.tsx?6c3c","webpack:///./src/modules/family-and-friends/family-and-friends.tsx?53c8","webpack:///src/modules/fabrikam/views/buybox.view.tsx?68a7","webpack:///src/modules/sign-in/sign-in.view.tsx?a753","webpack:///src/modules/sign-in/components/sign-in-loading-icon.tsx?3d5a","webpack:///src/modules/interactive-feature-item/interactive-feature-item.view.tsx?d4e3","webpack:///src/modules/invoice-details/invoice-details.view.tsx?5ebe","webpack:///./src/themes/stagsleap/views/components/carticon.component.tsx?bd39","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/themes/generazioni/views/checkout-apple-pay.view.tsx?170f","webpack:///src/index.ts?c6ae","webpack:///./src/themes/patzhall/views/components/carticon.component.tsx?296b","webpack:///./src/themes/emp/views/checkout-apple-pay.view.tsx?0d0d","webpack:///src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9105","webpack:///src/modules/sign-in/components/sign-in-text.tsx?92d7","webpack:///src/modules/sign-in/components/sign-in-button.tsx?a9cc","webpack:///src/modules/sign-in/components/sign-in-label.tsx?d42c","webpack:///./src/themes/erath/views/components/carticon.component.tsx?4421","webpack:///./src/modules/wine-finder-form/actions/get-wine-api-token.ts?9772","webpack:///./src/modules/wine-finder-form/actions/get-wine-filterable-class.ts?e00f","webpack:///./src/modules/wine-finder-form/actions/get-wine-mapper-class.ts?89dd","webpack:///./src/modules/wine-finder-form/actions/get-wine-international-location.ts?4a50","webpack:///./src/modules/wine-finder-form/actions/get-wine-location.ts?9374","webpack:///./src/modules/wine-finder-form/actions/get-wine-products.ts?bdfc","webpack:///./src/modules/wine-finder-form/wine-finder-dropdown-menu.tsx?9026","webpack:///./src/modules/wine-finder-form/wine-finder-query-location.tsx?e1b8","webpack:///./src/modules/wine-finder-form/actions/get-wine-countries.ts?0ce4","webpack:///./src/modules/wine-finder-form/wine-finder-query-location-international.tsx?9b3d","webpack:///./src/modules/wine-finder-form/wine-finder-form.props.autogenerated.ts?7bde","webpack:///./src/modules/wine-finder-form/wine-finder-wine-display.tsx?54ec","webpack:///./src/modules/wine-finder-form/wine-finder-display-item.tsx?995e","webpack:///./src/modules/wine-finder-form/wine-finder-scrollable.tsx?e714","webpack:///./src/modules/wine-finder-form/wine-finder-pager.tsx?cc64","webpack:///./src/modules/wine-finder-form/wine-finder-wine-results.tsx?909d","webpack:///./src/modules/wine-finder-form/wine-finder-form.tsx?9170","webpack:///src/modules/b2b-requests-status/b2b-requests-status.view.tsx?afa7","webpack:///src/modules/fabrikam/views/search-result-container.view.tsx?f8ea","webpack:///src/modules/invoices-list/invoices-list.view.tsx?0243","webpack:///src/modules/invoices-list/components/make-payment-component.tsx?c79a","webpack:///./src/themes/blend/views/checkout-apple-pay.view.tsx?f927","webpack:///src/modules/invoices-list/components/invoice-error-component.tsx?2e12","webpack:///./src/themes/patzhall/views/checkout-apple-pay.view.tsx?b37b","webpack:///src/modules/sign-in/sign-in.tsx?44ed","webpack:///./src/modules/family-and-friends/family-and-friends.view.tsx?df6a","webpack:///src/modules/footer-category/footer-category.view.tsx?26a5","webpack:///./src/themes/erath/views/checkout-apple-pay.view.tsx?6f0a","webpack:///./src/themes/generazioni/views/components/carticon.component.tsx?47df","webpack:///./src/modules/account-profile-edit/account-profile-edit.view.tsx?e286","webpack:///src/modules/invoices-list/helpers/pay-invoices.ts?f98a","webpack:///./src/themes/north-star/views/checkout-apple-pay.view.tsx?d0ad","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/fabrikam/views/header.view.tsx?1cde","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?6874","webpack:///./src/themes/stemichelle/views/checkout-apple-pay.view.tsx?0f07","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/themes/emp/views/checkout-delivery-options.view.tsx?c8fe","webpack:///./src/themes/enoteca/views/components/carticon.component.tsx?5a13","webpack:///src/modules/sign-in/components/sign-in-input.tsx?eb41","webpack:///src/modules/map/map.tsx?e2df","webpack:///src/modules/invoices-list/helpers/invoice-data.ts?6271","webpack:///src/modules/invoices-list/helpers/invoice-status.ts?442a","webpack:///./src/themes/north-star/views/components/carticon.component.tsx?ac2f","webpack:///src/modules/invoices-list/helpers/index.ts?7d24","webpack:///./src/themes/colsolare/views/checkout-apple-pay.view.tsx?c015","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-button.tsx?5d9e","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-error.tsx?0ce7","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-input.tsx?7a21","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-label.tsx?16cb","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-loading-icon.tsx?b942","webpack:///./src/modules/account-profile-edit/components/account-profile-edit-loading-message.tsx?d777","webpack:///./src/modules/account-profile-edit/account-profile-edit.tsx?eee7","webpack:///src/modules/invoices-list/components/invoices-filter-component.tsx?759c","webpack:///src/modules/sign-in/components/sign-in-link.tsx?fc9f","webpack:///./src/themes/stemichelle/views/components/carticon.component.tsx?e132","webpack:///./src/themes/columbiacrest/views/components/carticon.component.tsx?b177","webpack:///./src/themes/spring-valley-vineyard/views/checkout-apple-pay.view.tsx?4fbb","webpack:///src/modules/sign-in/components/sign-in-error.tsx?2f11","webpack:///./src/themes/stagsleap/views/checkout-apple-pay.view.tsx?f16d","webpack:///src/modules/map/map.view.tsx?cd35","webpack:///src/modules/sign-in/components/sign-in-description.tsx?196e","webpack:///./src/themes/columbiacrest/views/checkout-apple-pay.view.tsx?28fb","webpack:///./src/themes/fth/views/checkout-apple-pay.view.tsx?309b","webpack:///src/modules/b2b-requests-status/components/b2b-requests-table.tsx?6d33","webpack:///src/modules/b2b-requests-status/b2b-requests-status.tsx?692d","webpack:///./src/themes/intrinsic-wine-co/views/components/carticon.component.tsx?0522","webpack:///src/modules/sign-in/components/sign-in-loading-message.tsx?7f4d","webpack:///src/modules/invoices-list/components/request-invoice-modal.tsx?f430","webpack:///src/modules/invoices-list/invoices-list.tsx?ba10"],"names":["CartIcon","observer","props","data","cart","cartLink","getUrlSync","context","actionContext","cartItem","totalItemsInCart","label","React","title","className","href","ShippingService","render","this","config","content","defaultImageSettings","viewports","xs","q","w","h","lg","lazyload","heading","Heading","headingTag","tag","text","image","Image","Object","assign","gridSettings","request","imageSettings","paragraph","dangerouslySetInnerHTML","getRichTextHtml","links","length","map","cta","index","key","role","linkText","linkUrl","destinationUrl","ariaLabel","target","openInNewTab","undefined","CheckoutApplyPayView","checkoutApplePay","applePayButton","alert","applePayImage","setApplePayImage","msdyn365Commerce","isBrowser","document","documentElement","style","setProperty","Module","RequestInvoiceButton","_ref","onClicked","requestInvoiceButtonLabel","innerReference","Button","onClick","innerRef","BreadCrumbView","root","backButton","BreadcrumbContainer","BreadcrumbList","BreadcrumbListItem","separator","Node","link","classnames","telemetry","error","ImageList","constructor","handleParagraphChange","event","images","value","_renderImageListItems","imageList","xl","disableLazyLoad","item","_image$imageSettings","_link$linkText","imageProps","imageLink","imageLinkText","imageLinkAriaLabel","Msdyn365","loadFailureBehavior","requestContext","editProps","onEdit","linkAltText","linkAriaLabel","_heading$tag","imageListTitle","viewProps","_objectSpread","moduleProps","imageListHeading","imageListContainer","imageListItem","imageListItemAnchorTag","imageListItems","renderView","FamilyAndFriendsCodeComponent","super","resources","familyFriends_codeLabel","code","Code","familyFriends_recipientLabel","_recipientColumnAction","familyFriends_activationDateLabel","ActivationDate","_hasBeenRecieved","RecipientEmailAddress","mailToLink","familyFriends_sendToAFriendBtn","mailSubject","mailBody","_sanitizeMailTo","stripOnly","replace","match","p1","toString","FamilyAndFriends","_this$props$data$code","header","_headerJSX","codes","codeList","result","Result","Codes","_renderTextBlock","textBlocks","_renderSocialShare","socialShare","_renderCartAndActions","addToCart","addToOrderTemplate","addToWishlist","errorBlock","button","_renderConfigure","configure","ContainerProps","dropdowns","_renderConfigureDropdown","dropdown","LabelContainerProps","errors","select","_renderFindInStore","findInStore","storeSelector","description","modal","productPickupOptionList","onChangeHandler","callbacks","newValue","updateQuantity","_renderQuantity","quantityComponent","state","extentionResources","quantityLimitsMessages","max","telemetryContent","quantity","IncrementalQuantity","id","currentCount","onChange","inputQuantityAriaLabel","decrementButtonAriaLabel","incrementButtonAriaLabel","minQuantityText","maxQuantityText","_renderKeyInPrice","keyInPrice","input","_renderShopSimilarItem","shopSimilarItem","BuyboxView","ModuleProps","MediaGalleryContainerProps","ProductInfoContainerProps","price","rating","inventoryLabel","shopSimilarLook","shopSimilarDescription","unitOfMeasure","mediaGallery","bulkPurchaseLink","slots","SignInLoading","_ref4","modalBody","icon","message","SignInView","signIn","viewState","loading","defaultAADConainer","aadConainer","signInSection","signUpSection","signInSectionHeading","signInLocalAccount","signInSocialAccount","signUpSectionHeading","signInB2BAccount","signUpDescription","signUpLink","isShowLoading","localAccount","items","forgetPassword","disclaimer","signInButton","wrapper","LocalAccount","_ref2","socialAccounts","SocialAccount","_ref3","B2BAccount","SignInLoadingIcon","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","InvoiceDetailsView","products","paymentDetails","payInvoiceError","cartLabel","format","imageListView","indexKey","src","altText","FooterCategory","viewprops","categories","FooterList","FooterListItem","PayInvoiceComponentActions","async","_event","setDisabled","payInvoices","invoice","errorState","onError","reference","onClickHandler","PayInvoiceComponent","createComponent","component","disabled","useState","createElement","payInvoiceButtonAriaLabel","canBePaid","payInvoiceButtonText","Link","noclick","payLoad","getPayloadObject","contentAction","etext","attribute","getTelemetryAttributes","onTelemetryClick","itemProp","Separator","Breadcrumb","_pageType","urlTokens","pageType","getTelemetryObject","telemetryPageName","friendlyName","_getRootLink","_getCustomBreadcrumbLinks","itemPosition","keyIndex","_getCategoryHierarchy","categoryHierarchy","_getFriendlyName","locale","NameTranslations","Url","nameTranslations","_nameTranslation","nameTranslation","ArrayExtensions","hasElements","find","Language","toLowerCase","Text","_getPDPLinks","categoryPaths","product","url","requestUrl","push","Name","hideProductName","_goBack","window","history","back","_getPDPBackButton","query","MsDyn365","referrer","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","app","breadcrumbType","linkSeparator","breadcrumbViewProps","isMobileView","viewport","_window","device","Type","innerWidth","sm","md","getViewport","onSelectAllHandler","isSelected","invoices","forEach","InvoicesTableComponent","isMobile","setIsMobile","updateViewport","addEventListener","rowClassName","headerClassName","InvoicesTableHeaderComponent","typeName","isSelectedAll","all","isAdmin","customer","IsB2bAdmin","onSelectAll","InvoicesTableRowComponent","invoiceReferences","invoiceButtonReferences","Number","payInvoiceReferences","payInvoiceButtonReferences","onRequestInvoice","SignInText","SignInButton","attributes","SignInLabel","forId","htmlFor","apiToken","GetWineFilterable","filters","dataCacheType","cacheObjectType","cacheKey","JSON","stringify","_token","queryFilters","filtersToHTTPQueryString","queryString","keys","queryKey","queryValue","substr","WineMapper","_input","_applyMap","inputData","inputMap","mappedOutput","GetWineInternationalLocationInput","_url","brand_code","country","fullUrl","console","GetWineInternationalLocationMap","GetWineInternationalLocationDistributorMap","GetWineInternationalLocationCountryMap","GetWineLocationInternationalMapper","output","totalPages","totalResults","page","distributors","distributor","distributorOutput","GetWineLocationMap","GetWineLocationRetailerMap","GetWineLocationProductMap","action","ctx","apiSettings","response","headers","Authorization","token","args","Error","GetWineLocationInput","GetWineLocationMapper","retailers","retailer","retailerProducts","mappedRetailer","GetWineProductsInput","brand","FindWineDropdownMenu","_value","defaultValue","_handleOnChange","bind","_constructItems","newItem","itemList","isAriaSelected","__decorate","observable","WineFinderQueryLocation","_props$config$default","_props$config$default2","_queryLocation","_queryRadius","_allowRetail","_allowRestaurant","_product","_queryRadii","_handleQueryLocationChange","_handleSearchRadiusChange","_toggleRetail","_toggleRestaurant","_doQuery","defaultFilters","retail","restaurant","radii","allowRadiiDisplay","defaultRadius","wineFinder__domesticTitle","wineFinder__domesticSearchRadiusLabel","wineFinder__retailFilterText","wineFinder__restaurantFilterText","domesticSearch","enablePlaceholders","placeholders","cssClass","active","onSubmit","e","preventDefault","type","placeholder","required","showChooseWineInput","_renderProductsDropdownList","displayFilters","_hasFilterActive","checked","_isInvalid","onKeyPress","wineFinderSubmit","setState","queryRadius","location","radius","on_premise","filterState","restaurantActive","retailActive","onQuerySearch","test","_renderProductOptions","option","product_key","IGetWineCountriesMap","GetWineCountriesInput","shouldCacheOutput","GetWineCountriesMapper","WineFinderQueryLocationInternational","_countries","_handleCountrySelectionChange","componentDidMount","_queryCountries","catch","err","warn","name","iso","wineFinder__internationalTitle","wineFinder__internationalCountryLabel","submitText","_selectedCountry","newCountry","countries","WineCountries","resultsDisplay","showProductsConfiguration","TitleTag","WineFinderWineDisplay","_isOpen","_wines","wines","reaction","allOpen","open","expandedState","_closeToggle","hideProducts","showProducts","showProductsLabel","_showButton","_renderWineList","showButton","showProductsHideButton","list","toJS","sort","wineList","wine","_showProducts","FindWineItem","hideNumbers","numberInList","distance","mapData","address","zip","rel","mapText","phoneNumber","website","wineFinder__internationalWebsiteLabel","WineFinderScrollable","Component","_onAddMore","pageCount","wineLocationData","_renderWineResults","showMoreText","wineResults","resultType","city","perPage","_getProducts","phone","jdeDistributorNumber","wineFinder__noResults","productArray","onGetMoreContent","WineFinderPager","_isFirstPagination","goAsMin","_goToMinMaxPage","_renderPages","_isLastPagination","goAsMax","range","lower","higher","minOrMax","onPageChange","currentPage","lowerBound","Math","min","Array","fill","pageValue","WineFinderResults","_handlePageChange","_renderWineLocations","wineLocation","pageChange","newQuery","selectedTab","FindWine","_pageState","_allOpen","_selectedTab","_wineLocationDataSet","_querySearchFilters","_setWineLocation","_setWineProducts","_handleBackToFind","_setInternationalWineLocation","_getMoreWineLocations","_selectUSTab","_selectInternationalTab","_products","singlePage","_renderQuery","_renderResults","_renderJSXResult","_renderNoResults","hideInternational","searchRadius","showFilterButtons","USLabelText","internationalLabelText","USCssClass","us","internationalCssClass","international","_title","_searchText","wineFinder__backToFind","wineFinder__showMoreButton","wineType","internationalWineLocation","resultDisplay","tabIndex","showAllProductsToggle","_renderAllProductsToggle","hideAllProducts","showAllProducts","showAllProductsLabel","wineFinder__searchAgain","searchText","RichTextComponent","wineLocationInput","moreData","GetWineLocation","GetInternationalWineLocation","per_page","newLocation","filter","getWineProducts","B2bRequestsStatusView","b2bRequestsStatus","table","createSearchResultModal","modalProps","refineMenu","sortByDropDown","isRecoSearchPage","modalHeader","createModalBody","modalFooter","renderSort","renderRefiner","refiners","RefineMenuContainer","RefinerSectionContainer","submenu","SortingContainer","renderCategoryHierarchy","CategoryHierarchyContainer","categoryHierarchyList","categoryHierarchySeparator","category","renderTitle","TitleContainer","titlePrefix","titleText","titleCount","SearchResultContainerView","_props$context$action","SearchResultContainer","pagination","ProductsContainer","ProductSectionContainer","choiceSummary","modalToggle","searchResultModal","TitleViewProps","sortByOptions","CategoryNavContainer","RefineAndProductSectionContainer","errorMessage","FeatureSearchContainer","similarLookProduct","recommendation","InvoiceListView","invoiceRequestModal","MakePaymentComponentActions","buttonReferences","MakePaymentComponent","hasInvoices","makePaymentButtonAriaLabel","makePaymentButtonText","InvoiceErrorComponent","messageHeader","otherError","showError","payInvoiceErrorModalOpen","errorDialogHeader","errorDialogBodyErrorTitle","errorDialogBodyErrorDescription","errorDialogFooterGoToCartButtonText","errorDialogFooterCancelButtonText","cartUrl","setPayInvoiceErrorModalClose","errorMessages","Fragment","Alert","isOpen","color","assertive","Modal","toggle","ModalHeader","ModalBody","ModalFooter","SignIn","moduleClassName","signInDisclaimer","handleSignInHeadingChange","signInHeading","handleSignUpHeadingChange","signUpHeading","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","isInitialized","emailRegex","emailId","SA_FIELDS","AttributeFields","ID","requiredField_email","requriedEmailError","requiredField_password","requriedPasswordError","invalid_email","invalidEmailError","invalid_password","invalidPasswordError","unknown_error","unknownError","EmailRegex","defaultRegex","source","componentDidUpdate","shouldComponentUpdate","nextProps","nextState","SignInLoadingIconComponent","SignInLoadingMessageComponent","loadingMessage","display","_renderInput","emailAddressLabelText","emailAddressAriaLabel","passwordLabelText","SignInLinkComponent","forgotPasswordButtonAriaLabel","forgotPasswordButtonText","SignInErrorComponent","SignInButtonComponent","loginButtonAriaLabel","loginButtonText","_renderSocialAccount","facebookButtonText","facebookButtonAriaLabel","facebookIcon","microsoftButtonText","microsoftButtonAriaLabel","microsoftIcon","_renderB2BSocialAccount","b2bButtonText","b2bButtonAriaLabel","displayB2bAccountManagerSignin","SignInDescriptionComponent","signUpDescriptionText","signUpButtonAriaLabel","signUpButtonText","labelText","pattern","SignInLabelComponent","SignInInputComponent","iconImage","_createImageMarkup","SignInTextComponent","_displayB2bAccountManagerSignin","pictureClassName","shouldSkipToMainImage","_props$data$codeList$","_props$data$codeList$2","familyFriends_codesRemaining","QuantityAvailable","helpText","FooterCategoryView","AccountProfileEditItem","AccountProfileEditLoading","AccountProfileEditView","accountProfileEdit","accountProfileEditLocalAccount","buttonsWrapper","buttons","verificationSuccessModal","verificationSuccessModalMessage","invoicesToAdd","errorReason","failureReason","cartState","getCartState","addInvoicesToCart","invoiceIds","_result$errorDetails","_result$errorDetails2","status","errorDetails","LocalizedMessage","errorCode","ErrorResourceId","InvoiceDetailsHeaderComponent","invoiceDetails","invoiceNumberText","invoiceIdLabel","invoiceOrderItemsText","lines","invoiceOrderItem","invoiceOrderItems","invoiceInfoContainerClassName","orderInfoContainerClassName","orderInfoClassName","orderMainInfoClassName","orderDetailsClassName","actionsClassName","amountSummaryClassName","orderDate","formatShortDate","date","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","RecordId","_renderProductImage","cropFocalRegion","fallbackImage","getFallbackImageUrl","ItemId","primaryImageUrl","fallBackSrc","_renderProductDimensions","StringExtensions","isNullOrWhitespace","ColorName","invoiceProductColor","SizeName","invoiceProductSize","StyleName","invoiceProductStyle","Price","invoiceQuantity","NetAmount","InvoiceDetailsModel","Id","InvoiceDate","Date","CustomerName","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","SalesInvoiceLine","_products$find","PrimaryImageUrl","TotalDiscount","InvoiceSubtotal","TotalCharges","TotalTaxAmount","TotalAmount","CurrencyCode","InvoicePaidStatus","Paid","InvoiceDetails","_onAddToCartFailed","_setPayInvoiceErrorModalClose","ChannelId","invoiceDetailsModel","_renderHeader","_renderProducts","_renderPaymentDetails","_renderInvoiceErrors","_className","channelId","arguments","productInputs","ProductInput","getSimpleProductsAction","newErrorState","errorHost","_this$state$errorStat","payInvoiceErrorDialogHeader","payInvoiceErrorDialogBodyErrorTitle","payInvoiceErrorDialogBodyErrorDescription","payInvoiceErrorDialogFooterGoToCartButtonText","payInvoiceErrorDialogFooterCancelButtonText","errorClassName","renderCustomerName","accountInformation","FirstName","_renderReactFragment","slot","headerView","HeaderTag","HeaderContainer","HeaderTopBarContainer","Divider","navIcon","logo","search","preferredStore","renderForMobile","AccountInfoDropdownParentContainer","AccountInfoDropdownPopoverConentContainer","accountInfoDropdownButton","signOutLink","signInLink","accountLinks","accountClassName","_renderAccountBlock","wishListIconDesktop","cartIcon","siteOptions","MobileMenuLinksContainer","mobileMenuCollapsed","Collapse","Drawer","openGlyph","closeGlyph","glyphPlacement","toggleButtonText","_renderMobileAccountBlock","wishListIconMobile","menuBar","_renderCollapseMenu","switchCheckedState","headerCells","getMobileHeaderCells","invoiceListSelectAllRadioAriaLabelText","invoicesText","invoiceDateMobileText","getDesktopHeaderCells","invoiceDateText","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceStatusText","invoiceActionsText","InteractiveFeatureCollectionLinks","_mapEditableLinks","linkdata","editableLinks","editableLink","additionalProperties","onTextChange","InteractiveFeatureItem","_telemetryContent","handleHeadingChange","handleLinkTextChange","linkIndex","_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","invoiceListSelectRadioAriaLabelText","getInvoiceStatusText","getDesktopRowCells","isCurrentUser","AccountNumber","customerAccountNumber","invoiceCurrentUser","DeliveryOptionList","DeliveryOptionsList","globalConfig","options","pennyShippingMethodIds","pennyShippingIds","modShippingMethodIds","modShippingIds","localList","combinedList","a","b","ShippingChargeAmount","deliveryData","isModShippingMethod","modShipping","isPennyShippingMethod","pennyShipping","deliveryOption","DeliveryOption","radioButton","DeliveryOptionSelected","ErrorMessage","CheckoutDeliveryOptionsView","CheckoutDeliveryOptions","deliveryOptions","deliveryOptionsData","deliveryOptionSelected","waiting","saveButton","editButton","cancelButton","isLoading","isError","isShowList","isShowSelected","isShowSaveButton","isShowEditButton","isShowCancelButton","GetMaxLength","maxLength","parsedMaxLength","parseInt","isNaN","SignInInput","Map","mapRef","_initMap","channel","storeSelectorStateManager","isMapApiLoaded","Microsoft","Maps","current","credentials","BingMapsApiKey","pushpinAccessible","Events","addHandler","setSelectedStoreLocationId","_updateMap","_this$props$data$stor","_storeSelectorStateMa","pushpinOptions","orgUnitStoreInformation","selectedStoreLocationId","mapLocation","entities","clear","pushpins","storeLocationList","store","OrgUnitAvailability","unitStoreInfo","entries","_unitStoreInfo$OrgUni","storeLocation","OrgUnitLocation","Latitude","Longitude","isSelectedLocation","OrgUnitNumber","_getPushpinOptions","pushpin","Pushpin","Location","handleClickEvent","unshift","currentLocation","setView","center","bounds","LocationRect","fromShapes","setOptions","orgUnitNumber","showIndex","size","selectionColor","_getSvgIcon","_this$props$data$stor2","BingMapsEnabled","when","_this$props$data$stor3","setMapModuleLoaded","_this$props$data$stor4","_this$props$data$stor5","loadMapApi","_this$props$data$stor6","_this$props$context","lang","market","ChannelCountryRegionISOCode","_this$props$data$stor7","_this$props$data$stor8","_this$props$data$stor9","shouldDisplayMap","listMapViewState","displayMap","classname","show","Header","headerProps","MapProps","ref","InvoiceModel","CustomerAccountNumber","invoiceStatus","None","invoiceStatusNone","Unpaid","invoiceStatusUnpaid","PartiallyPaid","invoiceStatusPartiallyPaid","invoiceStatusPaid","AccountProfileEditButton","AccountProfileEditError","AccountProfileEditInput","AccountProfileEditLabel","AccountProfileEditLoadingIcon","AccountProfileEditLoadingMessage","AccountProfileEdit","onTextBoxChange","givenName","surname","invalidEmailAddressError","obj","PRE","_htmlDecode","email","PAT","PAT_DESC","required_field","requiredFieldMissingError","verifying_blurb","AccountProfileEditLoadingIconComponent","AccountProfileEditLoadingMessageComponent","_renderLocalAccount","str","innerHTML","childNodes","nodeValue","firstNameLabelText","firstNameMaxLength","lastNameLabelText","lastNameMaxLength","AccountProfileEditErrorComponent","requiredFieldMissingSummaryError","fieldIncorrectError","AccountProfileEditButtonComponent","saveButtonAriaLabel","saveButtonText","cancelButtonText","showEmail","AccountProfileEditLabelComponent","AccountProfileEditInputComponent","InvoicesFilterState","getInvoicesFilterStateResources","ShowAll","invoicesFilterShowAll","onStateClick","InvoicesFilterComponent","popoverRef","createRef","popoverState","setPopoverState","togglePopover","useCallback","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","Popover","placement","EnumExtensions","getEnumValues","renderFilterStateItem","stateStringRepresentation","SignInLink","SignInError","MapHeader","MapView","SignInDescription","RequestsTableColumnHeader","getUserName","isNullOrEmpty","UserFirstName","UserLastName","b2bRequestsNameDisplay","getDetails","_requestDetails$Invoi","Details","requestDetails","accountStatementStartDateTime","AccountStatementStartDateTime","accountStatementEndDateTime","AccountStatementEndDateTime","invoiceId","InvoiceId","TypeValue","b2bRequestsAccountStatementDetails","b2bRequestsInvoiceCopyDetails","getDisplayFriendlyTypeValue","typeValue","b2bRequestsTypeCreateProspect","b2bRequestsTypeAddUser","b2bRequestsTypeDeleteUser","b2bRequestsTypeEditUser","b2bRequestsTypeRequestAccountStatement","b2bRequestsTypeRequestInvoiceCopy","b2bRequestsTypeUnknown","getDisplayFriendlyStatusValue","statusValue","b2bRequestsStatusProcessed","b2bRequestsStatusError","b2bRequestsStatusRequested","createTableProps","tableProps","_context$request$quer","tableData","operationRequests","_request$TypeValue","_request$StatusValue","row","b2bRequestsTypeColumn","TableDataType","b2bRequestsRequestDateColumn","CreatedDateTime","b2bRequestsDescriptionColumn","b2bRequestsUserColumn","b2bRequestsStatusColumn","StatusValue","createTableItems","headings","mobileExcludedColumns","includes","sortable","columnSortAriaLabel","rows","editLinkText","deleteLinkText","viewLinkText","enableToModify","actionLinkText","showCheckBoxes","isSortable","showPagination","minifyActions","excludedColumns","paginationProperty","skipCount","skip","itemPerPage","prevText","b2bRequestsPreviousText","nextText","b2bRequestsNextText","paginationText","reqContext","URL","isSingleSelectOnly","actions","onDelete","onView","businessUserSelectCheckBoxAriaLabelText","sortByAscending","sortByDescending","B2bRequestsTable","Table","B2bRequestsStatus","renderHeader","headingData","_this$props$data$oper","_this$props$data$oper2","itemCount","getItemNumberDisplayString","_retrieveExcludedColumns","renderTable","b2bRequestsNumberOfItemsSingular","b2bRequestsNumberOfItems","variant","VariantType","Viewport","isChannelTypeB2B","computed","SignInLoadingMessage","onSubmitRequestClick","onClosing","filteredInvoices","onSubmitRequest","checkboxRef","closingFlag","_inputInvoice$current","searchInputChangedHandler","setSearchInput","onCancelHandler","renderInvoiceOptions","setSelectedInvoiceIndex","_invoice","i","_checkboxRef$current$","onInvoiceSelect","onInvoiceSelectHandler","checkboxId","checkboxName","RequestInvoiceModal","isModalOpen","modalHeaderLabel","sendToEmailLabel","submitRequestLabel","cancelLabel","searchPlaceholderLabel","invoicesFoundString","singleInvoiceFoundString","searchButtonAltText","selectedInvoiceIndex","setFilteredInvoices","searchInput","shouldShowSearchResults","setShouldShowSearchResults","invoiceOptionsData","invoiceOptions","setInvoiceOptions","focusElement","_focusElement$current","focus","searchEntered","searchEnteredHandler","updatedInvoices","toLocaleUpperCase","searchResultString","invoicesFoundReplaceIndex","indexOf","horizontalPosition","verticalPosition","autoFocus","fade","onOpened","setFilteredInvoicesToSelectedInvoices","selectedInvoices","requestInvoiceDialogAriaLabel","substring","InvoicesList","buttonChildReference","buttonChildPayButtonReference","_onToggleInvoiceRequestParentModal","selectedButtonElement","payInvoiceRequestReference","_onToggleInvoiceRequestModal","_queryResultSettings","QueryResultSettingsProxy","fromModuleData","QueryResultSettings","makePaymentReference","_updateInvoicesState","_handleFilterStateChange","_loadMoreInvoices","_requestInvoice","_requestSpecificInvoice","invoicesFilterState","isPageLoaded","isInvoiceRequestModalOpen","_customerBalance$resu","_customerBalance$resu2","_heading$text","customerBalance","invoicesListTitle","invoicesListDescTitle","invoicesListDescCount","amountText","OpenInvoiceBalance","toFixed","Currency","totalCount","OpenInvoiceCount","countText","invoicesListTitleHeading","_renderInvoiceRequestModal","_renderInvoicesFilter","_renderPagination","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","_this$props$data$b2bU","callerContext","b2bUserId","b2bUserInformation","B2BUserId","BusinessPartnerUsersDataActions","requestInvoiceCopyAsync","BusinessPartnerOperationDeliveryType","Email","_addInvoices","newInvoices","concat","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceRequestButton","_renderInvoicesList","searchCriteria","businessPartner","getCurrentAsync","BusinessPartnerId","getCustomer","GetCustomerInput","CustomerId","InvoicePaidStatusValues","_getInvoicesSearchCriteria","Paging","Skip","getInvoices","GetInvoicesInput","filterClassName","tableClassName","_newErrorState$errorR","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","shouldShowAdditionalInfoInPopup","makePaymentResources","_getSelectedInvoices","moduleId","moduleTypeName","navigationUrl","_this$state$selectedB","invoiceErrorMessageHeader","_data$invoices","Top","invoicesLoadMore","invoiceRequestModalCancelLabel","invoiceRequestModalSubmitLabel","invoiceRequestModalHeaderLabel","invoiceRequestModalSendToEmailLabel","invoiceRequestModalSearch","invoiceRequestModalInvoiceSearchDisplay","invoiceRequestModalSingleInvoiceSearchDisplay","invoiceRequestModalSearchButton","_this$state$selectedB2","specificInvoice"],"mappings":";8FAAA,+CA0BA,MAAMA,EAA8CC,YAAUC,IAC1D,MAAQC,MAAM,KAACC,IAAUF,EACnBG,EAAWC,YAAW,OAAQJ,EAAMK,QAAQC,eAC5CC,EAAWL,EAAO,IAAIA,EAAKM,oBAAsB,GACjDC,EAAQ,YAAYF,UAC1B,OACIG,gBAAA,KAAGC,MAAOF,EAAOG,UAAU,wBAAwBC,KAAMV,EAAQ,aAAcM,GAC3EC,gBAAA,OAAKE,UAAU,uBAAsB,eAAc,G,WACvCL,MAaTT,a,oCC/Cf,iL,6FCsBA,MAAMgB,UAAwBJ,gBAGrBK,SACL,IAAMC,KAAKhB,QAASgB,KAAKhB,MAAMiB,OAC7B,OAAO,KAGT,MAAMC,EAAUF,KAAKhB,MAAMiB,OAGrBE,EAAuC,CAC3CC,UAAW,CACTC,GAAI,CAAEC,EAAG,kBAAmBC,EAAG,EAAGC,EAAG,GACrCC,GAAI,CAAEH,EAAG,kBAAmBC,EAAG,EAAGC,EAAG,IAEvCE,SANCR,GAAWA,EAAQQ,WAAa,GAQnC,OACEhB,gBAAA,OAAKE,UAAU,oBACZM,EAAQS,SACPjB,gBAACkB,UAAO,CACN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,KAAK0K,MAAMyM,UAG3B2jC,EAGHmB,wBACJuF,EACA9e,GAEA1iC,KAAK0K,MAAMyM,SAASC,QAASxF,IAErBA,EAAQsF,WADRtF,IAAY4vC,IAMpBxhD,KAAKkgB,SAAS,CACVm7B,sBAAuB3Y,EAA8BiF,UAEzD3nC,KAAKu7C,iCA9fPN,EAAY59B,YAAA,CADjBte,KACKk8C,GAkgBSA","file":"static/js/10.503f9c527139838aed92.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\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","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport {\r\n getRichTextHtml,\r\n IImageSettings,\r\n Image\r\n} from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport {\r\n ILinksData,\r\n IShippingServiceConfig,\r\n IShippingServiceProps\r\n} from './shipping-service.props.autogenerated';\r\n\r\n/**\r\n *\r\n * ShippingService component\r\n * @extends {React.PureComponent}\r\n */\r\nclass ShippingService extends React.PureComponent<\r\n IShippingServiceProps\r\n> {\r\n public render(): JSX.Element | null {\r\n if (!(this.props && this.props.config)) {\r\n return null;\r\n }\r\n\r\n const content = this.props.config;\r\n const lazyloadConfig: boolean | undefined =\r\n (content && content.lazyload) || false;\r\n const defaultImageSettings: IImageSettings = {\r\n viewports: {\r\n xs: { q: `w=148&h=174&m=6`, w: 0, h: 0 },\r\n lg: { q: `w=148&h=174&m=6`, w: 0, h: 0 }\r\n },\r\n lazyload: lazyloadConfig\r\n };\r\n return (\r\n
\r\n {content.heading && (\r\n \r\n )}\r\n {content.image && (\r\n \r\n )}\r\n {content.paragraph && (// tslint:disable-next-line:react-no-dangerous-html\r\n
\r\n )}\r\n {content.links && content.links.length\r\n ? content.links.map((cta: ILinksData, index: number) => (\r\n \r\n {cta.linkText}\r\n \r\n ))\r\n : false}\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default ShippingService;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\ninterface IRequestInvoiceButtonProps {\n innerReference?: React.RefObject;\n className: string;\n requestInvoiceButtonLabel: string;\n onClicked(): void;\n}\n\nexport const RequestInvoiceButton: React.FC = ({\n className,\n onClicked,\n requestInvoiceButtonLabel,\n innerReference\n}) => {\n return (\n \n );\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IBreadcrumbViewProps } from './breadcrumb';\n\nconst BreadCrumbView: React.FC = props => {\n const { root, links, backButton, BreadcrumbContainer, BreadcrumbList, BreadcrumbListItem, separator } = props;\n if (!root && !links && !backButton) {\n props.context.telemetry.error('BreadCrumb content is empty, module wont render');\n return null;\n }\n return (\n \n \n {root && (\n \n {root}\n {links && separator}\n \n )}\n {backButton && {backButton}}\n {links &&\n links.map((link, index) => (\n \n \n {link}\n {links[index + 1] && separator}\n \n \n ))}\n \n \n );\n};\n\nexport default BreadCrumbView;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IImageListConfig, IImageListProps, IImagesData } from './image-list.props.autogenerated';\n\n/**\n * The interface for IImageListViewProps.\n */\nexport interface IImageListViewProps extends IImageListProps {\n imageList: IModuleProps;\n imageListHeading?: React.ReactNode;\n imageListContainer: INodeProps;\n imageListItem: INodeProps;\n imageListItemAnchorTag: INodeProps;\n imageListItems: IImageListItem[] | undefined;\n}\n\n/**\n * The interface for IImageListItem.\n */\nexport interface IImageListItem {\n image: JSX.Element | undefined;\n text: JSX.Element | undefined;\n link: string | undefined;\n linkAltText: string | undefined;\n linkAriaLabel: string | undefined;\n}\n\n/**\n *\n * ImageList component.\n * @extends {React.PureComponent>}\n */\nclass ImageList extends React.PureComponent> {\n public render(): JSX.Element | null {\n const { heading } = this.props.config;\n const imageListTitle = heading && ;\n const viewProps: IImageListViewProps = {\n ...this.props,\n imageList: {\n moduleProps: this.props,\n className: classnames('ms-image-list', this.props.config.className),\n tag: 'div'\n },\n imageListHeading: imageListTitle,\n imageListContainer: {\n className: 'ms-image-list__list',\n role: 'list',\n tag: 'ul'\n },\n imageListItem: {\n className: 'ms-image-list__list-item',\n role: 'listitem',\n tag: 'li'\n },\n imageListItemAnchorTag: {\n tag: 'a',\n className: 'ms-image-list__link',\n role: 'link'\n },\n imageListItems: this._renderImageListItems()\n };\n return this.props.renderView(viewProps);\n }\n\n /**\n * Handle paragraph change.\n * @param index - Index of image item in array of image items.\n * @returns Void.\n */\n public handleParagraphChange = (index: number) => (event: Msdyn365.ContentEditableEvent): void => {\n if (this.props.config.images![index]) {\n this.props.config.images![index].paragraph = event.target.value;\n }\n };\n\n /**\n * Render list of images.\n * @returns List of images with text and redirection link.\n */\n private readonly _renderImageListItems = (): IImageListItem[] | undefined => {\n const imageList: IImagesData[] | undefined = this.props.config.images;\n const defaultImageSettings: Msdyn365.IImageSettings = {\n viewports: {\n xs: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n lg: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 },\n xl: { q: 'w=65&h=65&q=80&m=6', w: 65, h: 65 }\n },\n lazyload: false,\n disableLazyLoad: true\n };\n return imageList?.map((item, index) => {\n const { image, link, paragraph } = item;\n\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings!,\n imageSettings: (image?.imageSettings ?? defaultImageSettings) as Msdyn365.IImageSettings | undefined\n };\n\n const imageLink: string | undefined = link?.linkUrl.destinationUrl;\n const imageLinkText: string | undefined = link?.linkText ?? link?.ariaLabel;\n const imageLinkAriaLabel: string | undefined = link?.ariaLabel;\n\n // If image is null, we want to render the placeholder SVG - by passing image data with empty src\n const imageImage = (\n \n );\n\n const imageText = paragraph && (\n \n );\n const imageListItem: IImageListItem = {\n image: imageImage,\n text: imageText,\n link: imageLink,\n linkAltText: imageLinkText,\n linkAriaLabel: imageLinkAriaLabel\n };\n return imageListItem;\n });\n };\n}\n\nexport default ImageList;\n","import { ICoreContext, RichText } from '@msdyn365-commerce/core';\r\nimport * as React from 'react';\r\nimport { IrsmFriendsAndFamilyCode } from '../../../dataActions/DataServiceEntities.g';\r\nimport { IFamilyAndFriendsConfig, IFamilyAndFriendsResources } from '../family-and-friends.props.autogenerated';\r\ninterface IFamilyAndFriendsCodeComponentProps {\r\n code: IrsmFriendsAndFamilyCode;\r\n config: IFamilyAndFriendsConfig;\r\n resources: IFamilyAndFriendsResources;\r\n // tslint:disable-next-line: no-any\r\n context: ICoreContext<{ [x: string]: any }>;\r\n}\r\n\r\n/**\r\n * renders a single row (code) for the family and friends table\r\n */\r\nexport class FamilyAndFriendsCodeComponent extends React.Component {\r\n constructor(props: IFamilyAndFriendsCodeComponentProps) {\r\n super(props);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
\r\n
{this.props.resources.familyFriends_codeLabel}
\r\n
{this.props.code.Code}
\r\n
\r\n
\r\n
{this.props.resources.familyFriends_recipientLabel}
\r\n
{this._recipientColumnAction}
\r\n
\r\n
\r\n
{this.props.resources.familyFriends_activationDateLabel}
\r\n
{this.props.code.ActivationDate}
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private get _recipientColumnAction(): JSX.Element {\r\n if (this._hasBeenRecieved) {\r\n return
{this.props.code.RecipientEmailAddress}
;\r\n }\r\n return (\r\n \r\n );\r\n }\r\n\r\n private get mailToLink(): string {\r\n const { mailSubject, mailBody } = this.props.config;\r\n return `mailto:?subject=${this._sanitizeMailTo(mailSubject, true)}&body=${this._sanitizeMailTo(mailBody)}${this.props.code.Code}`;\r\n }\r\n\r\n //-------------------------------------------------------\r\n // mailto doesn't support HTML tags, and is fairly picky\r\n // and limited.\r\n // The CMS places all text in

blocks, randomly converts\r\n // some spaces to   and sanitizes certain characters\r\n // like single quotes (used as apostrophes!)\r\n // We need to convert all of that wackiness into something\r\n // that CMS authors would expect.\r\n //\r\n // stripOnly:\r\n // The Mail Subject was created in the definition file\r\n // as RichText, which was a bad idea. It's always a\r\n // short, unformatted string. RichText is surrounded in\r\n // a

tag, so for the mail subject we want to strip\r\n // it instead of replacing with CRLF.\r\n //-------------------------------------------------------\r\n private _sanitizeMailTo(value: RichText | undefined, stripOnly?: boolean): string {\r\n if (!value) { return ''; }\r\n\r\n return value\r\n .replace(/

/g, '') // Remove opening

tags\r\n .replace(/<\\/p>/g, stripOnly ? '' : '%0D%0A%0D%0A') // Remove or convert closing

tags\r\n .replace(/ /g, ' ') // Convert nbsp; to space\r\n .replace(/
/g, '%0D%0A') // Convert
to %0D%0A\r\n .replace(/&#(\\d\\d);/g, // Convert &#dd; values to %xx format (decimal --> hex)\r\n (match, p1) => {return `%${(+p1).toString(16)}`;});\r\n }\r\n\r\n private get _hasBeenRecieved(): boolean {\r\n return !!this.props.code.RecipientEmailAddress;\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport { FamilyAndFriendsCodeComponent } from './components/family-and-friends-code-item';\r\nimport { IFamilyAndFriendsData } from './family-and-friends.data';\r\nimport { IFamilyAndFriendsProps } from './family-and-friends.props.autogenerated';\r\n\r\nexport interface IFamilyAndFriendsViewProps extends IFamilyAndFriendsProps {\r\n header: React.ReactNode;\r\n codes: React.ReactNode[] | undefined;\r\n}\r\n\r\n/**\r\n *\r\n * FamilyAndFriends component\r\n * @extends {React.PureComponent>}\r\n */\r\nclass FamilyAndFriends extends React.PureComponent> {\r\n public render(): JSX.Element | null {\r\n this.props.context.actionContext;\r\n const viewProps: IFamilyAndFriendsViewProps = {\r\n ...this.props,\r\n header: this._headerJSX,\r\n codes: this.props.data.codeList.result?.Result.Codes?.map(\r\n (code) =>\r\n (\r\n \r\n )\r\n )\r\n };\r\n return this.props.renderView(viewProps);\r\n }\r\n\r\n private get _headerJSX(): JSX.Element {\r\n return (\r\n

\r\n
{this.props.resources.familyFriends_codeLabel}
\r\n
{this.props.resources.familyFriends_recipientLabel}
\r\n
{this.props.resources.familyFriends_activationDateLabel}
\r\n
\r\n );\r\n }\r\n}\r\n\r\nexport default FamilyAndFriends;\r\n","/*!\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 * as React from 'react';\n\nimport {\n ISignInItem,\n ISignInLoading,\n ISignInLocalAccount,\n ISignInSocialAccount,\n ISignInSocialItem,\n ISignInB2BAccount,\n ISignInB2BItem,\n ISignInViewProps\n} from './sign-in';\n\nconst LocalAccount: React.FC = ({ localAccount, items, forgetPassword, disclaimer, error, signInButton }) => {\n return (\n \n {items &&\n items.map((item: ISignInItem) => {\n return (\n \n {item.label}\n {item.error}\n {item.input}\n \n );\n })}\n {forgetPassword}\n {disclaimer}\n {error}\n {signInButton}\n \n );\n};\n\nconst SocialAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInSocialItem) => {\n return (\n \n {item.image}\n {item.text}\n \n );\n })}\n \n );\n};\n\nconst B2BAccount: React.FC = ({ socialAccounts, items }) => {\n return (\n \n {items &&\n items.map((item: ISignInB2BItem) => {\n return (\n item && (\n \n {item.text}\n \n )\n );\n })}\n \n );\n};\n\nconst SignInLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst SignInView: React.FC = props => {\n const {\n signIn,\n viewState,\n loading,\n defaultAADConainer,\n aadConainer,\n signInSection,\n signUpSection,\n signInSectionHeading,\n signInLocalAccount,\n signInSocialAccount,\n signUpSectionHeading,\n signInB2BAccount,\n signUpDescription,\n signUpLink\n } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n \n {signInSectionHeading}\n {LocalAccount(signInLocalAccount)}\n {SocialAccount(signInSocialAccount)}\n {B2BAccount(signInB2BAccount)}\n \n \n {signUpSectionHeading}\n {signUpDescription}\n {signUpLink}\n \n \n \n );\n};\n\nexport default SignInView;\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 ISignInLoadingIcon {\n className: string;\n}\n\nconst SignInLoadingIcon: React.FC = ({ className }) =>
;\n\nexport default SignInLoadingIcon;\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 { 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","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './modules/invoices-list';\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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 * as React from 'react';\n\nexport interface ISignInText {\n className: string;\n text: string;\n}\n\nconst SignInText: React.FC = ({ className, text }) => {text};\n\nexport default SignInText;\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 ISignInButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst SignInButton: React.FC = ({ id, className, text, ariaLabel, telemetryContent, disabled, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default SignInButton;\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 ISignInLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst SignInLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignInLabel;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","export const apiToken: string = 'cd6dd0b2c43c360ae4d59b5147d52fd3';","import * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { apiToken } from './get-wine-api-token';\r\n\r\n/**\r\n * Class Definition for constructing the wine location query\r\n */\r\nexport class GetWineFilterable extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n public queryFilters: Filters;\r\n\r\n private readonly _token: string = apiToken;\r\n\r\n // TODO: Determine if the results of this get action should cache the results and if so provide\r\n // a cache object type and an appropriate cache key\r\n constructor(filters: Filters) {\r\n super({\r\n dataCacheType: 'request',\r\n cacheObjectType: 'IGetWineLocationData',\r\n cacheKey: JSON.stringify(filters)\r\n });\r\n this.queryFilters = filters;\r\n return this;\r\n }\r\n\r\n get token(): string {\r\n return this._token;\r\n }\r\n\r\n /**\r\n * generates an http styled query string to append to the end of a url\r\n *\r\n * @returns http query string\r\n */\r\n public filtersToHTTPQueryString(): string {\r\n let queryString = '';\r\n Object.keys(this.queryFilters).forEach(queryKey => {\r\n const queryValue = this.queryFilters[queryKey];\r\n queryString += `${queryKey}=${queryValue}&`;\r\n });\r\n queryString = queryString.substr(0, queryString.length - 1);\r\n return (queryString.length > 0) ? `?${queryString}` : '';\r\n }\r\n}","/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nexport class WineMapper {\r\n protected _input: Input;\r\n constructor(input: Input) {\r\n this._input = input;\r\n }\r\n\r\n protected _applyMap(\r\n inputData: data,\r\n inputMap: map\r\n ): T {\r\n const mappedOutput = {};\r\n Object.keys(inputMap).forEach(key => {\r\n mappedOutput[key] = inputData[inputMap[key]];\r\n });\r\n return mappedOutput;\r\n }\r\n}","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n/**\r\n * GetWineInternationalLocation Input Action\r\n */\r\n\r\nexport class GetWineInternationalLocationInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com';\r\n\r\n public get url(): string {\r\n const { brand_code, country } = this.queryFilters;\r\n\r\n const fullUrl = `${this._url}/v1/${brand_code}/distributors?country=${country}`;\r\n if (!brand_code) {\r\n console.error('Brand Code is not declared. This is required for the module to do calls');\r\n }\r\n return fullUrl;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// MAPPER\r\n// =============================================================================\r\n\r\nenum GetWineInternationalLocationMap {\r\n totalResults = 'total_results',\r\n totalPages = 'total_pages',\r\n page = 'page'\r\n}\r\n\r\nenum GetWineInternationalLocationDistributorMap {\r\n jdeDistributorNumber = 'jde_distributor_number',\r\n brandCode = 'brand_code',\r\n name = 'name',\r\n city = 'city',\r\n state = 'state',\r\n zip = 'zip',\r\n phone = 'phone',\r\n url = 'url'\r\n}\r\n\r\nenum GetWineInternationalLocationCountryMap {\r\n iso = 'iso',\r\n name = 'name',\r\n printableName = 'printable_name',\r\n iso3 = 'iso3',\r\n numCode = 'numcode'\r\n}\r\n\r\n/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nclass GetWineLocationInternationalMapper extends WineMapper {\r\n public get output(): IGetWineInternationalLocationOutput {\r\n const output: IGetWineInternationalLocationOutput = {\r\n data: [],\r\n totalPages: this._input[GetWineInternationalLocationMap.totalPages],\r\n totalResults: this._input[GetWineInternationalLocationMap.totalResults],\r\n page: this._input[GetWineInternationalLocationMap.page]\r\n };\r\n\r\n this._input.distributors.forEach(distributor => {\r\n const distributorOutput =\r\n this._applyMap(distributor, GetWineInternationalLocationDistributorMap);\r\n distributorOutput.country =\r\n this._applyMap(distributor.country, GetWineInternationalLocationCountryMap);\r\n output.data.push(distributorOutput);\r\n });\r\n return output;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// INTERFACES\r\n// =============================================================================\r\n\r\nexport interface IGetWineInternationalQueryFilters {\r\n brand_code?: string;\r\n country: string;\r\n pagination?: boolean;\r\n page?: number;\r\n per_page?: number;\r\n}\r\n\r\n// =============================================================================\r\n// OUTPUT INTERFACES\r\n// =============================================================================\r\n\r\nexport interface IGetWineInternationalLocationOutput {\r\n totalResults: number;\r\n totalPages: number;\r\n page: number;\r\n data: IGetWineInternationalDistributorOuput[];\r\n}\r\n\r\nexport interface IGetWineInternationalDistributorOuput {\r\n jdeDistributorNumber: number;\r\n brandCode: string;\r\n name: string;\r\n city: string;\r\n state: string;\r\n country: IGetWineInternationalDistributorCountryOutput;\r\n zip: string;\r\n phone: string;\r\n url: string;\r\n}\r\n\r\ninterface IGetWineInternationalDistributorCountryOutput {\r\n iso: string;\r\n name: string;\r\n printableName: string;\r\n iso3: string;\r\n numCode: number;\r\n}\r\n\r\n// =============================================================================\r\n// INPUT INTERFACES\r\n// =============================================================================\r\n\r\ninterface IGetWineInternationalLocationInput {\r\n total_results: number;\r\n total_pages: number;\r\n distributors: IGetWineInternationalDistributorInput[];\r\n}\r\n\r\ninterface IGetWineInternationalDistributorInput {\r\n jde_distributor_number: number;\r\n brand_code: string;\r\n name: string;\r\n city: string;\r\n state: string;\r\n country: IGetWineInternationalDistributorCountryInput;\r\n zip: string;\r\n phone: string;\r\n url: string;\r\n}\r\n\r\ninterface IGetWineInternationalDistributorCountryInput {\r\n iso: string;\r\n name: string;\r\n printable_name: string;\r\n iso3: string;\r\n numcode: number;\r\n}\r\n\r\n/**\r\n * TODO: Use this function to create the input required to make the API call\r\n */\r\nconst createWineInternationalLocationInput =\r\n (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) {\r\n throw new Error(`[createWineInternationalLocationInput] configuration was invalid: ${args.config}`);\r\n }\r\n return new GetWineInternationalLocationInput(args.config);\r\n };\r\n\r\n/**\r\n * TODO: Use this function to call your API and process the results as needed\r\n */\r\nasync function action(input: GetWineInternationalLocationInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineLocationInternationalMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createWineInternationalLocationInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n// =============================================================================\r\n// API CONSTRUCTION\r\n// =============================================================================\r\n/**\r\n * Class Definition for constructing the wine location query\r\n */\r\nexport class GetWineLocationInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com/v1/XXX/retailers';\r\n\r\n get url(): string {\r\n return this._url;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// API MAPPER\r\n// =============================================================================\r\n\r\nenum GetWineLocationMap {\r\n totalResults = 'total_results',\r\n totalPages = 'total_pages',\r\n page = 'page'\r\n}\r\n\r\nenum GetWineLocationRetailerMap {\r\n code = 'code',\r\n name = 'name',\r\n address = 'address',\r\n city = 'city',\r\n state = 'state',\r\n zip = 'zip',\r\n lon = 'lon',\r\n lat = 'lat',\r\n onPremise = 'on_premise',\r\n distance = 'distance'\r\n}\r\n\r\nenum GetWineLocationProductMap {\r\n productKey = 'product_key',\r\n brandCode = 'brand_code',\r\n productCode = 'product_code',\r\n description = 'description',\r\n}\r\n\r\n/**\r\n * Class definition for the output controller of the API. Acts as a middle layer\r\n * and ensures that the data stays consistent internally\r\n */\r\nclass GetWineLocationMapper extends WineMapper {\r\n public get output(): IGetWineLocationDataOutput {\r\n const output: IGetWineLocationDataOutput = {\r\n data: [],\r\n totalPages: this._input[GetWineLocationMap.totalPages],\r\n totalResults: this._input[GetWineLocationMap.totalResults],\r\n page: this._input[GetWineLocationMap.page]\r\n };\r\n\r\n this._input.retailers.forEach(retailer => {\r\n const retailerProducts: IGetWineLocationProductOutput[] = [];\r\n const mappedRetailer =\r\n this._applyMap(retailer, GetWineLocationRetailerMap);\r\n mappedRetailer.products = retailerProducts;\r\n output.data.push(mappedRetailer);\r\n\r\n retailer.products.forEach(product => {\r\n retailerProducts.push(\r\n this._applyMap(product, GetWineLocationProductMap)\r\n );\r\n });\r\n });\r\n\r\n return output;\r\n }\r\n}\r\n\r\n// =============================================================================\r\n// WINE LOCATION INTERFACE OUTPUT\r\n// =============================================================================\r\n\r\nexport interface IGetWineLocationDataOutput {\r\n 'totalResults': number;\r\n 'totalPages': number;\r\n 'page': number;\r\n 'data': IGetWineLocationRetailerOutput[];\r\n}\r\n\r\nexport interface IGetWineLocationRetailerOutput {\r\n 'code': number;\r\n 'name': string;\r\n 'address': string;\r\n 'city': string;\r\n 'state': string;\r\n 'zip': string;\r\n 'lon': number;\r\n 'lat': number;\r\n 'onPremise': boolean;\r\n 'distance': number;\r\n 'products': IGetWineLocationProductOutput[];\r\n}\r\n\r\nexport interface IGetWineLocationProductOutput {\r\n 'productKey': string;\r\n 'brandCode': string;\r\n 'productCode': string;\r\n 'description': string;\r\n}\r\n\r\n// =============================================================================\r\n// WINE LOCATION INTERFACE INPUT\r\n// =============================================================================\r\n\r\ninterface IGetWineLocationDataInput {\r\n 'total_results': number;\r\n 'total_pages': number;\r\n 'page': number;\r\n 'retailers': IGetWineLocationRetailerInput[];\r\n}\r\n\r\ninterface IGetWineLocationRetailerInput {\r\n 'code': number;\r\n 'name': string;\r\n 'address': string;\r\n 'city': string;\r\n 'state': string;\r\n 'zip': string;\r\n 'lon': number;\r\n 'lat': number;\r\n 'on_premise': boolean;\r\n 'distance': number;\r\n 'products': IGetWineLocationProductInput[];\r\n}\r\n\r\ninterface IGetWineLocationProductInput {\r\n 'product_key': string;\r\n 'brand_code': string;\r\n 'product_code': string;\r\n 'description': string;\r\n}\r\n\r\n/**\r\n * query filter definition\r\n */\r\nexport interface IGetWineLocationQueryFilters {\r\n product?: string;\r\n brand?: string;\r\n radius?: number;\r\n pagination?: boolean;\r\n page?: number;\r\n per_page?: number;\r\n on_premise?: boolean;\r\n location: string;\r\n}\r\n\r\n// =============================================================================\r\n// CREATE INPUT\r\n// =============================================================================\r\n/**\r\n * constructs a wine location query and returns it to the action\r\n */\r\nconst createWineLocationInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) { throw new Error(`[createWineLocationInput] configuration was invalid: ${args.config}`); }\r\n return new GetWineLocationInput(args.config);\r\n};\r\n\r\n// =============================================================================\r\n// RUN INPUT / ACTION\r\n// =============================================================================\r\n/**\r\n * api runner\r\n * @returns the location data\r\n */\r\nasync function getWineLocationAction(input: GetWineLocationInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n // query request and return response full of locations to purchase wine\r\n const response = await Msdyn365.sendRequest(`${input.url}${input.filtersToHTTPQueryString()}`, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineLocationMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >getWineLocationAction,\r\n input: createWineLocationInput\r\n});\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { GetWineFilterable } from './get-wine-filterable-class';\r\n\r\n/**\r\n * query filter definition\r\n */\r\nexport interface IGetWineProductQueryFilters {\r\n brand?: string;\r\n}\r\n\r\n/**\r\n * GetWineProducts Input Action\r\n */\r\n\r\nexport class GetWineProductsInput extends GetWineFilterable {\r\n\r\n private readonly _url: string = 'https://api.smwe.com';\r\n\r\n public get url(): string {\r\n const { brand } = this.queryFilters;\r\n\r\n const fullUrl = `${this._url}/v1/${brand}/products`;\r\n if (!brand) {\r\n console.error('Brand Code is not declared. This is required for the module to do calls');\r\n }\r\n return fullUrl;\r\n }\r\n}\r\n\r\nexport interface IGetWineProductsData {\r\n product_key: string;\r\n brand_code: string;\r\n product_code: string;\r\n description: string;\r\n}\r\n\r\nexport interface IGetWineCountriesDataOutput {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printableName: string;\r\n numCode: number;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n if (!args.config) { throw new Error(`[createWineProductsInput] configuration was invalid: ${args.config}`); }\r\n return new GetWineProductsInput(args.config);\r\n};\r\n\r\n/**\r\n * action that retrieves the list of wine products\r\n */\r\nasync function action(input: GetWineProductsInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return response.data;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport type FindWineDropdownItem = { label: string | number; value: string | number };\r\n\r\ninterface IFindWineDropdownMenuProps {\r\n itemList: FindWineDropdownItem[];\r\n defaultValue?: string;\r\n id?: string;\r\n onChange(newItem: FindWineDropdownItem | undefined): unknown;\r\n}\r\n\r\n/**\r\n * class definition for creating a dropdown menu for the wine page\r\n */\r\n@observer\r\nexport class FindWineDropdownMenu extends React.Component {\r\n\r\n /**\r\n * field representation on the current value of what is selected\r\n */\r\n @observable private _value: string = this.props.defaultValue || '';\r\n public constructor(props: IFindWineDropdownMenuProps) {\r\n super(props);\r\n\r\n this._handleOnChange = this._handleOnChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n let items = this._constructItems();\r\n if (!this._value) {\r\n items = [\r\n (\r\n \r\n {'Select Country'}\r\n \r\n )\r\n , ...items];\r\n }\r\n return (\r\n \r\n );\r\n }\r\n\r\n /**\r\n * handles for changing selection\r\n *\r\n * @param event change event\r\n */\r\n private _handleOnChange(event: React.ChangeEvent): void {\r\n const newItem = this.props.itemList.find(item => event.target.value === item.value.toString());\r\n this._value = event.target.value;\r\n this.props.onChange(newItem);\r\n }\r\n\r\n /**\r\n * constructs a list of JSX elements representing options for a select tag\r\n */\r\n private _constructItems(): JSX.Element[] {\r\n return this.props.itemList.map(\r\n (item, index) => {\r\n const isAriaSelected = item.value === this._value;\r\n return (\r\n \r\n {item.label}\r\n \r\n );\r\n }\r\n );\r\n }\r\n}","import { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IGetWineLocationQueryFilters } from './actions/get-wine-location';\r\nimport { IGetWineProductsData } from './actions/get-wine-products';\r\nimport { FindWineDropdownItem, FindWineDropdownMenu } from './wine-finder-dropdown-menu';\r\nimport { IPlaceholdersData, IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderQueryLocationProps {\r\n defaultRadius: number;\r\n resources: IWineFinderFormResources;\r\n displayFilters: boolean;\r\n placeholders?: IPlaceholdersData;\r\n config: IWineFinderFormConfig;\r\n products: IGetWineProductsData[] | undefined;\r\n active?: boolean;\r\n onQuerySearch(filters: IGetWineLocationQueryFilters): unknown;\r\n}\r\n\r\ninterface IWineFinderState{\r\n loading?:boolean;\r\n}\r\n\r\n/**\r\n * Class definition responsible for generating valid queries for getting wine\r\n */\r\n@observer\r\nclass WineFinderQueryLocation extends React.Component {\r\n\r\n // =========================================================================\r\n // OBSERVABLES AND FIELDS\r\n // =========================================================================\r\n\r\n /**\r\n * field representing the location being typed in by the user\r\n */\r\n @observable private _queryLocation: string = '';\r\n\r\n /**\r\n * field represneting the radius or furthest distance from the location\r\n * typed in by the user\r\n */\r\n @observable private _queryRadius: number = 5;\r\n\r\n @observable private _allowRetail: boolean = false;\r\n @observable private _allowRestaurant: boolean = false;\r\n\r\n /**\r\n * keeps the selected product in the wine product dropdownlist\r\n */\r\n @observable private _product: string = '';\r\n\r\n /**\r\n * list of choosable radii to select in dropdown menu\r\n */\r\n private _queryRadii: number[] = [5, 10, 20, 50];\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderQueryLocationProps) {\r\n super(props);\r\n this._handleQueryLocationChange = this._handleQueryLocationChange.bind(this);\r\n this._handleSearchRadiusChange = this._handleSearchRadiusChange.bind(this);\r\n this._toggleRetail = this._toggleRetail.bind(this);\r\n this._toggleRestaurant = this._toggleRestaurant.bind(this);\r\n this._doQuery = this._doQuery.bind(this);\r\n this._handleOnChange = this._handleOnChange.bind(this);\r\n\r\n this._allowRetail = !!props.config.defaultFilters?.retail;\r\n this._allowRestaurant = !!props.config.defaultFilters?.restaurant;\r\n this.state={\r\n loading: false\r\n };\r\n }\r\n\r\n public render(): JSX.Element {\r\n const itemList = this._queryRadii.map(radii => { return { label: radii, value: radii }; });\r\n const allowRadiiDisplay = this.props.defaultRadius === 0;\r\n const {\r\n resources: {\r\n wineFinder__domesticTitle,\r\n wineFinder__domesticSearchRadiusLabel,\r\n wineFinder__retailFilterText,\r\n wineFinder__restaurantFilterText\r\n }\r\n } = this.props;\r\n const { domesticSearch, enablePlaceholders } = this.props.placeholders || {};\r\n const isActive = this.props.active || false;\r\n\r\n const cssClass = isActive?'find-wine-query active':'find-wine-query';\r\n\r\n const onFormSubmit=(e: { preventDefault: any; })=>{\r\n e.preventDefault();\r\n this._doQuery();\r\n };\r\n\r\n return (\r\n
\r\n
\r\n
\r\n {wineFinder__domesticTitle &&

{wineFinder__domesticTitle}

}\r\n \r\n {enablePlaceholders ? domesticSearch : ''}\r\n \r\n \r\n {allowRadiiDisplay &&\r\n
\r\n \r\n {wineFinder__domesticSearchRadiusLabel}\r\n\r\n \r\n \r\n
\r\n }\r\n {this.props.config.showChooseWineInput && this._renderProductsDropdownList()}\r\n {\r\n (this.props.displayFilters && this._hasFilterActive) &&\r\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\r\n }\r\n \r\n
\r\n {(this._isInvalid() && this._queryLocation.length >= 5) &&
{'Zip Code is invalid'}
}\r\n {this.state.loading ?
Loading Results...
: ''}\r\n
\r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n /**\r\n * process to send the query with appropriate fields to the parent component\r\n */\r\n private _doQuery(): undefined {\r\n this.setState({loading: true});\r\n let queryRadius = this.props.defaultRadius;\r\n if (queryRadius === 0) {\r\n queryRadius = this._queryRadius;\r\n }\r\n\r\n const filters: IGetWineLocationQueryFilters = {\r\n location: this._queryLocation,\r\n radius: queryRadius,\r\n on_premise: this._allowRestaurant\r\n };\r\n\r\n // if both are checked or both are unchecked search for everything\r\n if (this._allowRestaurant === this._allowRetail) {\r\n delete filters.on_premise;\r\n }\r\n\r\n if (!this._hasFilterActive) {\r\n const { filterState } = this.props.config;\r\n\r\n // idea here is essentially the author has forced the premise type boolean\r\n // through the configuration state by disabling all adjustable filters. thats\r\n // why logic looks small\r\n filters.on_premise = !!filterState?.restaurantActive;\r\n\r\n // just to make sure that it returns everything if both are unchecked\r\n if (!filterState?.restaurantActive && !filterState?.retailActive) {\r\n delete filters.on_premise;\r\n }\r\n }\r\n\r\n if (this.props.config.showChooseWineInput && this._product) {\r\n filters.product = this._product;\r\n }\r\n\r\n this.props.onQuerySearch(filters);\r\n return undefined;\r\n }\r\n\r\n private get _hasFilterActive(): boolean {\r\n const { filterState } = this.props.config;\r\n return !!(filterState?.restaurantActive && filterState?.retailActive);\r\n }\r\n\r\n /**\r\n * handles changes for the radius\r\n */\r\n private _handleSearchRadiusChange(item: FindWineDropdownItem | undefined): void {\r\n if (item) {\r\n this._queryRadius = Number(item.value);\r\n }\r\n }\r\n\r\n private _toggleRetail(): void {\r\n this._allowRetail = !this._allowRetail;\r\n }\r\n\r\n private _toggleRestaurant(): void {\r\n this._allowRestaurant = !this._allowRestaurant;\r\n }\r\n\r\n /**\r\n * handles changes for the location entered\r\n */\r\n private _handleQueryLocationChange(event: React.ChangeEvent): void {\r\n this._queryLocation = event.target.value;\r\n return undefined;\r\n }\r\n\r\n private _isInvalid(): boolean {\r\n const regex = /^\\d{5}$/;\r\n return (!regex.test(this._queryLocation));\r\n }\r\n\r\n /**\r\n * Display a Wine products dropdownlist\r\n */\r\n private _renderProductsDropdownList(): JSX.Element {\r\n return(\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n /**\r\n * handles for changing selection on the wine products dropdownlist\r\n *\r\n * @param event change event\r\n */\r\n private _handleOnChange(event: React.ChangeEvent): void {\r\n this._product = event.target.value;\r\n }\r\n\r\n // Render dropdown options from array.\r\n private _renderProductOptions(): JSX.Element[] {\r\n const options: IGetWineProductsData[] | undefined = this.props.products ? this.props.products : [];\r\n return options.map((option, index) => {\r\n return (\r\n \r\n {option.description}\r\n \r\n );\r\n });\r\n }\r\n}\r\n\r\nexport default WineFinderQueryLocation;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { apiToken } from './get-wine-api-token';\r\nimport { WineMapper } from './get-wine-mapper-class';\r\n\r\n/**\r\n * GetWineCountries Input Action\r\n */\r\n\r\nexport class GetWineCountriesInput extends Msdyn365.CommerceEntityInput implements Msdyn365.IActionInput {\r\n\r\n private readonly _url: string = 'https://api.smwe.com/v1/SLR/countries';\r\n\r\n private readonly _token: string = apiToken;\r\n\r\n constructor() {\r\n super({ shouldCacheOutput: true, cacheObjectType: 'IGetWineCountriesData', cacheKey: 'SINGLE' });\r\n }\r\n\r\n public get url(): string { return this._url; }\r\n public get token(): string { return this._token; }\r\n}\r\n\r\nenum IGetWineCountriesMap {\r\n iso = 'iso',\r\n iso3 = 'iso3',\r\n name = 'name',\r\n printableName = 'printable_name',\r\n numCode = 'numcode'\r\n}\r\n\r\n/**\r\n * class definition for the output controller of the API\r\n */\r\nclass GetWineCountriesMapper extends WineMapper {\r\n public get output(): IGetWineCountriesDataOutput[] {\r\n return this._input.map(country => {\r\n return this._applyMap<\r\n IGetWineCountriesDataOutput,\r\n IGetWineCountriesData,\r\n typeof IGetWineCountriesMap\r\n >(country, IGetWineCountriesMap);\r\n });\r\n }\r\n}\r\n\r\nexport interface IGetWineCountriesData {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printable_name: string;\r\n numcode: number;\r\n}\r\n\r\nexport interface IGetWineCountriesDataOutput {\r\n iso: string;\r\n iso3: string;\r\n name: string;\r\n printableName: string;\r\n numCode: number;\r\n}\r\n\r\nconst createInput = (args: Msdyn365.ICreateActionContext): Msdyn365.IActionInput => {\r\n return new GetWineCountriesInput();\r\n};\r\n\r\n/**\r\n * action that retrieves the list of countries\r\n */\r\nasync function action(input: GetWineCountriesInput, ctx: Msdyn365.IActionContext): Promise {\r\n const apiSettings = Msdyn365.msdyn365Commerce.apiSettings;\r\n\r\n const response = await Msdyn365.sendRequest(input.url, 'get', apiSettings, {\r\n headers: {\r\n Authorization: `Token token=\"${input.token}\"`\r\n }\r\n });\r\n return new GetWineCountriesMapper(response.data).output;\r\n}\r\n\r\nexport default Msdyn365.createDataAction({\r\n action: >action,\r\n input: createInput\r\n});\r\n","import { IActionContext } from '@msdyn365-commerce/core';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport WineCountries, { GetWineCountriesInput, IGetWineCountriesDataOutput } from './actions/get-wine-countries';\r\nimport { IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport { FindWineDropdownItem, FindWineDropdownMenu } from './wine-finder-dropdown-menu';\r\nimport { IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderQueryLocationInternational {\r\n actionContext: IActionContext;\r\n resources: IWineFinderFormResources;\r\n submitText: string | undefined;\r\n active?: boolean;\r\n onQuerySearch(filters: IGetWineInternationalQueryFilters): unknown;\r\n}\r\n/**\r\n * class definition for the component responsible for querying internationally\r\n */\r\n@observer\r\nclass WineFinderQueryLocationInternational extends React.Component {\r\n\r\n /**\r\n * field representing the country key currently selected by the selector\r\n */\r\n @observable private _selectedCountry: string | undefined;\r\n\r\n @observable private _countries: IGetWineCountriesDataOutput[] = [];\r\n\r\n constructor(props: IWineFinderQueryLocationInternational) {\r\n super(props);\r\n\r\n this._handleCountrySelectionChange = this._handleCountrySelectionChange.bind(this);\r\n this._doQuery = this._doQuery.bind(this);\r\n\r\n }\r\n\r\n public componentDidMount(): void {\r\n this._queryCountries().catch(err => console.warn(err));\r\n }\r\n\r\n public render(): JSX.Element {\r\n const itemList = this._countries.map(country => {\r\n return {\r\n label: country.name,\r\n value: country.iso\r\n } as FindWineDropdownItem;\r\n });\r\n\r\n const {\r\n wineFinder__internationalTitle,\r\n wineFinder__internationalCountryLabel\r\n } = this.props.resources;\r\n const isActive = this.props.active || false;\r\n\r\n const cssClass = isActive?'find-wine-query-int active':'find-wine-query-int';\r\n\r\n return (\r\n
\r\n

{wineFinder__internationalTitle}

\r\n \r\n {wineFinder__internationalCountryLabel}\r\n \r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n /**\r\n * triggers the api call for country\r\n */\r\n private _doQuery(): void {\r\n if (!this._isInvalid) {\r\n this.props.onQuerySearch({\r\n country: this._selectedCountry as string\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * sets the selected country to a new country code\r\n *\r\n * @param newCountry new country to switch to\r\n */\r\n private _handleCountrySelectionChange(newCountry: FindWineDropdownItem | undefined): void {\r\n if (newCountry) {\r\n this._selectedCountry = newCountry.value as string;\r\n }\r\n }\r\n\r\n private get _isInvalid(): boolean {\r\n return !this._selectedCountry;\r\n }\r\n\r\n private async _queryCountries(): Promise {\r\n const input = new GetWineCountriesInput();\r\n const countries = await WineCountries(input, this.props.actionContext);\r\n this._countries = countries;\r\n }\r\n}\r\n\r\nexport default WineFinderQueryLocationInternational;","/**\r\n * Copyright (c) Microsoft Corporation\r\n * All rights reserved. See License.txt in the project root for license information.\r\n * IWineFinderForm contentModule Interface Properties\r\n * THIS FILE IS AUTO-GENERATED - MANUAL MODIFICATIONS WILL BE LOST\r\n */\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\n\r\nexport const enum resultsDisplay {\r\n paginate = 'paginate',\r\n append = 'append'\r\n}\r\n\r\nexport const enum showProductsConfiguration {\r\n showButton = 'showButton',\r\n hideProductsHideButton = 'hideProductsHideButton',\r\n showProductsHideButton = 'showProductsHideButton'\r\n}\r\n\r\nexport interface IWineFinderFormConfig extends Msdyn365.IModuleConfig {\r\n perPage?: number;\r\n resultsDisplay?: resultsDisplay;\r\n singlePage?: boolean;\r\n brand?: string;\r\n title?: ITitleData;\r\n searchText?: Msdyn365.RichText;\r\n hideInternational?: boolean;\r\n searchRadius: number;\r\n showFilterButtons: boolean;\r\n showProductsConfiguration?: showProductsConfiguration;\r\n showChooseWineInput?: boolean;\r\n showAllProductsToggle?: boolean;\r\n showAllProductsLabel?: IShowAllProductsLabelData;\r\n showProductsLabel?: IShowProductsLabelData;\r\n placeholders?: IPlaceholdersData;\r\n defaultFilters?: IDefaultFiltersData;\r\n filterState?: IFilterStateData;\r\n wineFinderSubmit?: string;\r\n mapText?: string;\r\n hideNumbers?: boolean;\r\n USLabelText?: string;\r\n internationalLabelText?: string;\r\n}\r\n\r\nexport interface IWineFinderFormResources {\r\n wineFinder__internationalTitle: string;\r\n wineFinder__internationalCountryLabel: string;\r\n wineFinder__domesticTitle: string;\r\n wineFinder__domesticSearchRadiusLabel: string;\r\n wineFinder__backToFind: string;\r\n wineFinder__noResults: string;\r\n wineFinder__searchAgain: string;\r\n wineFinder__showMoreButton: string;\r\n wineFinder__showProducts: string;\r\n wineFinder__hideProducts: string;\r\n wineFinder__internationalWebsiteLabel: string;\r\n wineFinder__retailFilterText: string;\r\n wineFinder__restaurantFilterText: string;\r\n}\r\n\r\nexport const enum TitleTag {\r\n h1 = 'h1',\r\n h2 = 'h2',\r\n h3 = 'h3',\r\n h4 = 'h4',\r\n h5 = 'h5',\r\n h6 = 'h6'\r\n}\r\n\r\nexport interface ITitleData {\r\n text: string;\r\n tag?: TitleTag;\r\n}\r\n\r\nexport interface IShowAllProductsLabelData {\r\n hideAllProducts?: string;\r\n showAllProducts?: string;\r\n}\r\n\r\nexport interface IShowProductsLabelData {\r\n hideProducts?: string;\r\n showProducts?: string;\r\n}\r\n\r\nexport interface IPlaceholdersData {\r\n enablePlaceholders?: boolean;\r\n domesticSearch?: string;\r\n}\r\n\r\nexport interface IDefaultFiltersData {\r\n retail?: boolean;\r\n restaurant?: boolean;\r\n}\r\n\r\nexport interface IFilterStateData {\r\n retailActive?: boolean;\r\n restaurantActive?: boolean;\r\n}\r\n\r\nexport interface IWineFinderFormProps extends Msdyn365.IModule {\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n}\r\n","import { observable, reaction, toJS } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IExpandedState } from './wine-finder-form';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources, showProductsConfiguration } from './wine-finder-form.props.autogenerated';\r\n\r\ninterface IWineFinderWineDisplayProps {\r\n wines?: string[];\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n allOpen: boolean;\r\n}\r\n\r\n/**\r\n * displays a list of wines\r\n */\r\n@observer\r\nclass WineFinderWineDisplay extends React.Component {\r\n @observable private _isOpen: boolean = false;\r\n\r\n private _wines?: string[];\r\n\r\n constructor(props: IWineFinderWineDisplayProps) {\r\n super(props);\r\n this._wines = props.wines;\r\n reaction(\r\n () => this.props.allOpen,\r\n (open) => {\r\n this._isOpen = open;\r\n }\r\n );\r\n\r\n this.state={\r\n expandedState:false\r\n };\r\n\r\n this._closeToggle = this._closeToggle.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const {\r\n hideProducts,\r\n showProducts\r\n } = this.props.config.showProductsLabel || {hideProducts:'Hide Products', showProducts:'Show Products'};\r\n return (\r\n
\r\n {\r\n this._showButton && \r\n {(this._isOpen) ? hideProducts : showProducts}\r\n \r\n }\r\n {this._renderWineList()}\r\n
\r\n );\r\n }\r\n\r\n private get _showButton(): boolean {\r\n return this.props.config.showProductsConfiguration === showProductsConfiguration.showButton;\r\n }\r\n\r\n private get _showProducts(): boolean {\r\n return this.props.config.showProductsConfiguration === showProductsConfiguration.showProductsHideButton;\r\n }\r\n\r\n private _closeToggle(): void {\r\n this._isOpen = !this._isOpen;\r\n this.setState({\r\n expandedState: !this.state.expandedState\r\n });\r\n }\r\n\r\n private _renderWineList(): JSX.Element | undefined {\r\n\r\n const list: string[] = toJS(this._wines) as string[];\r\n list.sort();\r\n\r\n const wineList = (\r\n
    \r\n {list.map((wine, index) => (
  • {wine}
  • ))}\r\n
\r\n );\r\n\r\n if (this._showProducts && this._wines) { return wineList; }\r\n\r\n if (!this._isOpen || !this._wines) {\r\n return;\r\n }\r\n\r\n return wineList;\r\n }\r\n}\r\n\r\nexport default WineFinderWineDisplay;\r\n","import * as React from 'react';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderWineDisplay from './wine-finder-wine-display';\r\n\r\ninterface IFindWineItemProps {\r\n distance?: number;\r\n website?: string;\r\n phoneNumber?: string;\r\n location: string;\r\n name: string;\r\n numberInList?: number;\r\n type: 'international' | 'US';\r\n mapData?: {\r\n address: string;\r\n zip: string;\r\n };\r\n wines?: string[];\r\n config: IWineFinderFormConfig;\r\n resources: IWineFinderFormResources;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n}\r\n\r\n/**\r\n * creates tsx for a single retailer, READ ONLY\r\n *\r\n * @param props data on retailers\r\n */\r\nexport const FindWineItem = (props: IFindWineItemProps): JSX.Element => {\r\n const hideNumbers = props.hideNumbers || false;\r\n if (props.type === 'US') {\r\n return (\r\n
\r\n

\r\n {!hideNumbers && `${props.numberInList}.`} {props.name}\r\n

\r\n
\r\n
{props.location}
\r\n
\r\n
{props.distance} miles
\r\n {props.config.mapText || 'Show Map'}\r\n \r\n
\r\n
\r\n \r\n
\r\n );\r\n } else {\r\n return (\r\n
\r\n

{!hideNumbers && `${props.numberInList}.`} {props.name}

\r\n
\r\n
{props.location}
\r\n
{props.phoneNumber}
\r\n {\r\n // hack for getting the '↵' symbol when no website is here\r\n (props.website && props.website.length > 2) ? (\r\n \r\n {props.resources.wineFinder__internationalWebsiteLabel}\r\n \r\n ) : (
)\r\n }\r\n
\r\n
\r\n );\r\n }\r\n};","import React from 'react';\r\nimport {\r\n IGetWineInternationalDistributorOuput,\r\n IGetWineInternationalLocationOutput,\r\n IGetWineInternationalQueryFilters\r\n} from './actions/get-wine-international-location';\r\nimport {\r\n IGetWineLocationDataOutput,\r\n IGetWineLocationProductOutput,\r\n IGetWineLocationQueryFilters,\r\n IGetWineLocationRetailerOutput\r\n} from './actions/get-wine-location';\r\nimport { FindWineItem } from './wine-finder-display-item';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\n\r\ntype wineResultContent = (IGetWineLocationRetailerOutput | IGetWineInternationalDistributorOuput)[];\r\n\r\ninterface IWineFinderScrollableProps {\r\n showMoreText: string;\r\n resultType: 'retailer' | 'distributor';\r\n queryFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters;\r\n wineLocationData: IGetWineLocationDataOutput | IGetWineInternationalLocationOutput;\r\n wineResults: wineResultContent;\r\n config: IWineFinderFormConfig;\r\n resources: IWineFinderFormResources;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n onGetMoreContent(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise;\r\n}\r\n\r\n/**\r\n * uses a \"show more\" feature to add to the current wine results instead of\r\n * pagination\r\n */\r\nexport class WineFinderScrollable extends React.Component {\r\n\r\n constructor(props: IWineFinderScrollableProps) {\r\n super(props);\r\n\r\n this._onAddMore = this._onAddMore.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n const pageCount = this.props.wineLocationData.totalPages;\r\n const page = this.props.queryFilters.page || 1;\r\n return (\r\n
\r\n
\r\n {this._renderWineResults()}\r\n
\r\n {\r\n page < pageCount &&\r\n \r\n {this.props.showMoreText}\r\n \r\n }\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * renders a list of wine locations\r\n *\r\n * @returns array of JSX Elements to render\r\n */\r\n private _renderWineResults(): JSX.Element[] {\r\n const hideNumbers = this.props.hideNumbers || false;\r\n\r\n if (!this.props.wineResults.length) {\r\n return [(
{this.props.resources.wineFinder__noResults}
)];\r\n }\r\n\r\n if (this.props.resultType === 'retailer') {\r\n return (this.props.wineResults as IGetWineLocationRetailerOutput[]).\r\n map((retailer, key) =>\r\n (\r\n \r\n )\r\n );\r\n } else {\r\n // mapping function that returns an array of jsx retailers\r\n return (this.props.wineResults as IGetWineInternationalDistributorOuput[])\r\n .map((distributor) =>\r\n (\r\n \r\n )\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * returns the name of products, if it exists\r\n *\r\n * @param productArray array of wines\r\n */\r\n private _getProducts(productArray: IGetWineLocationProductOutput[]): string[] {\r\n return productArray.map(product => product.description);\r\n }\r\n\r\n private async _onAddMore(): Promise {\r\n await this.props.onGetMoreContent(this.props.queryFilters);\r\n }\r\n}","import * as React from 'react';\r\n\r\ninterface IWineFinderPagerProps {\r\n totalPages: number;\r\n currentPage: number;\r\n onPageChange(pageChange: number): undefined;\r\n}\r\n\r\n/**\r\n * Component responsible for rendering the pagination aspect of the get wine\r\n * page\r\n */\r\nclass WineFinderPager extends React.Component {\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public render(): JSX.Element {\r\n\r\n const goAsMin = () => {\r\n this._goToMinMaxPage('min');\r\n };\r\n\r\n const goAsMax = () => {\r\n this._goToMinMaxPage('max');\r\n };\r\n\r\n return (\r\n
\r\n {/* tslint:disable-next-line: react-this-binding-issue */}\r\n \r\n {this._renderPages()}\r\n {/* tslint:disable-next-line: react-this-binding-issue */}\r\n \r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n private get _isFirstPagination(): boolean {\r\n return this.range.lower === 0;\r\n }\r\n\r\n private get _isLastPagination(): boolean {\r\n return this.range.higher === this.props.totalPages;\r\n }\r\n /**\r\n * jump to the lowest or highest page\r\n */\r\n private _goToMinMaxPage(minOrMax: 'min' | 'max'): void {\r\n if (minOrMax === 'min') {\r\n this.props.onPageChange(1);\r\n } else {\r\n this.props.onPageChange(this.props.totalPages);\r\n }\r\n }\r\n\r\n /**\r\n * get the range (in bounds) of what indexes are to be rendered\r\n *\r\n * @returns bounds\r\n */\r\n private get range(): { lower: number; higher: number } {\r\n const currentPage = Number(this.props.currentPage);\r\n const lowerBound = Math.max(0, currentPage - 3);\r\n const higherBound = Math.min(this.props.totalPages, lowerBound + 5);\r\n return { lower: lowerBound, higher: higherBound };\r\n }\r\n\r\n /**\r\n * returns JSX elements representing a list of pages clickable and to go to\r\n */\r\n private _renderPages(): JSX.Element[] {\r\n const range = this.range;\r\n return Array(range.higher - range.lower).fill(0).map((value, index) => {\r\n const pageValue = range.lower + index + 1;\r\n if (pageValue === Number(this.props.currentPage)) {\r\n return (\r\n // tslint:disable-next-line: jsx-no-lambda react-this-binding-issue\r\n \r\n );\r\n } else {\r\n return (\r\n // tslint:disable-next-line: jsx-no-lambda react-this-binding-issue\r\n \r\n );\r\n }\r\n });\r\n }\r\n}\r\n\r\nexport default WineFinderPager;","//import { observable, toJS } from 'mobx';\r\n//import { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\nimport { IGetWineInternationalLocationOutput, IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport { IGetWineLocationDataOutput, IGetWineLocationProductOutput, IGetWineLocationQueryFilters } from './actions/get-wine-location';\r\nimport { FindWineItem } from './wine-finder-display-item';\r\nimport { IWineFinderFormConfig, IWineFinderFormResources } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderPager from './wine-finder-pager';\r\n\r\ninterface IWineFinderResultsProps {\r\n resultType: 'retailer' | 'distributor';\r\n queryFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters;\r\n wineLocation: IGetWineLocationDataOutput | IGetWineInternationalLocationOutput;\r\n resources: IWineFinderFormResources;\r\n config: IWineFinderFormConfig;\r\n allOpen: boolean;\r\n hideNumbers?: boolean;\r\n onPageChange(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): void;\r\n}\r\n\r\n/**\r\n * displays results from a get wine location query\r\n */\r\nclass WineFinderResults extends React.Component {\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderResultsProps) {\r\n super(props);\r\n\r\n this._handlePageChange = this._handlePageChange.bind(this);\r\n }\r\n\r\n public render(): JSX.Element {\r\n return (\r\n
\r\n
\r\n {this._renderWineLocations()}\r\n
\r\n
\r\n {\r\n this.props.wineLocation.data.length &&\r\n
Displaying {this.props.wineLocation.page} of {this.props.wineLocation.totalPages} pages
\r\n\r\n }\r\n {\r\n this.props.wineLocation.data.length &&\r\n \r\n }\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n // =========================================================================\r\n // PRIVATE METHODS\r\n // =========================================================================\r\n\r\n /**\r\n * handler for changing page\r\n *\r\n * @param pageChange the number that the page will change to\r\n */\r\n private _handlePageChange(pageChange: number): undefined {\r\n const newQuery = this.props.queryFilters;\r\n newQuery.page = pageChange;\r\n this.props.onPageChange(newQuery);\r\n return undefined;\r\n }\r\n\r\n /**\r\n * renders a list of wine locations\r\n *\r\n * @returns array of JSX Elements to render\r\n */\r\n private _renderWineLocations(): JSX.Element[] {\r\n const hideNumbers = this.props.hideNumbers || false;\r\n if (!this.props.wineLocation.data.length) {\r\n return [(
{this.props.resources.wineFinder__noResults}
)];\r\n }\r\n switch (this.props.resultType) {\r\n case 'retailer':\r\n return (this.props.wineLocation as IGetWineLocationDataOutput).data.\r\n map((retailer, key) =>\r\n (\r\n \r\n )\r\n );\r\n default:\r\n // mapping function that returns an array of jsx retailers\r\n return (this.props.wineLocation as IGetWineInternationalLocationOutput).data\r\n .map((distributor) =>\r\n (\r\n \r\n )\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * returns the name of products, if it exists\r\n *\r\n * @param productArray array of wines\r\n */\r\n private _getProducts(productArray: IGetWineLocationProductOutput[]): string[] {\r\n return productArray.map(product => product.description);\r\n }\r\n}\r\n\r\nexport default WineFinderResults;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nimport { Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport { observable, reaction } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport GetInternationalWineLocation, { GetWineInternationalLocationInput, IGetWineInternationalDistributorOuput, IGetWineInternationalLocationOutput, IGetWineInternationalQueryFilters } from './actions/get-wine-international-location';\r\nimport GetWineLocation, { GetWineLocationInput, IGetWineLocationDataOutput, IGetWineLocationQueryFilters, IGetWineLocationRetailerOutput } from './actions/get-wine-location';\r\nimport getWineProducts, { GetWineProductsInput, IGetWineProductQueryFilters, IGetWineProductsData } from './actions/get-wine-products';\r\nimport { IWineFinderFormConfig, IWineFinderFormProps } from './wine-finder-form.props.autogenerated';\r\nimport WineFinderQueryLocation from './wine-finder-query-location';\r\nimport WineFinderQueryLocationInternational from './wine-finder-query-location-international';\r\nimport { WineFinderScrollable } from './wine-finder-scrollable';\r\nimport WineFinderResults from './wine-finder-wine-results';\r\n\r\n// =============================================================================\r\n// INTERFACES AND CONSTANTS\r\n// =============================================================================\r\nconst enum selectedTab {\r\n us = 'us',\r\n international = 'international'\r\n}\r\nexport interface IExpandedState{\r\n expandedState:boolean;\r\n}\r\n\r\n/**\r\n * GetWine component: Component responsible for displaying local wineries based\r\n * on the query input\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass FindWine extends React.Component, IExpandedState> {\r\n\r\n\r\n // =========================================================================\r\n // OBSERVABLES AND FIELDS\r\n // =========================================================================\r\n\r\n /**\r\n * manages which type of page is supposed to be currently rendered\r\n *\r\n * - query: when _pageState is query the search page, will be rendered\r\n * - results: when _pageState is results a list of results will be rendered\r\n */\r\n @observable private _pageState: 'query' | 'results' = 'query';\r\n\r\n /**\r\n * keep the state of the 'Show All Products' toggle\r\n */\r\n @observable private _allOpen: boolean = false;\r\n\r\n /**\r\n * List of wine products\r\n */\r\n @observable private _products: IGetWineProductsData[] | undefined;\r\n\r\n /**\r\n * contains data on the previous domestic wine locations api request\r\n */\r\n @observable private wineLocation: IGetWineLocationDataOutput | undefined;\r\n\r\n /**\r\n * Indicates which is the current selected tab\r\n */\r\n @observable private _selectedTab: string = 'us';\r\n\r\n private _wineLocationDataSet: (IGetWineInternationalDistributorOuput | IGetWineLocationRetailerOutput)[] = [];\r\n\r\n /**\r\n * contains data on the previous international wine locations api request\r\n */\r\n @observable private internationalWineLocation: IGetWineInternationalLocationOutput | undefined;\r\n\r\n /**\r\n * the filters previously used for the last api request\r\n */\r\n private _querySearchFilters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters = {\r\n country: 'all',\r\n location: '',\r\n brand: this.props.config.brand\r\n };\r\n\r\n // =========================================================================\r\n // PUBLIC METHODS\r\n // =========================================================================\r\n\r\n public constructor(props: IWineFinderFormProps) {\r\n super(props);\r\n\r\n // bindings for all functions used within the render\r\n this._setWineLocation = this._setWineLocation.bind(this);\r\n this._setWineProducts = this._setWineProducts.bind(this);\r\n this._handleBackToFind = this._handleBackToFind.bind(this);\r\n this._setInternationalWineLocation = this._setInternationalWineLocation.bind(this);\r\n this._handlePageChange = this._handlePageChange.bind(this);\r\n this._getMoreWineLocations = this._getMoreWineLocations.bind(this);\r\n this._closeToggle = this._closeToggle.bind(this);\r\n this._selectUSTab = this._selectUSTab.bind(this);\r\n this._selectInternationalTab = this._selectInternationalTab.bind(this);\r\n\r\n // safeguard product list\r\n reaction(\r\n () => { return this._products; },\r\n () => { this.setState({}); }\r\n );\r\n this.state={\r\n expandedState:false\r\n };\r\n }\r\n\r\n public componentDidMount(): void {\r\n if (this.props.config.showChooseWineInput) {\r\n void this._setWineProducts();\r\n }\r\n }\r\n\r\n public render(): JSX.Element {\r\n if (this.props.config.singlePage) {\r\n return (\r\n
\r\n {this._renderQuery()}\r\n {this._pageState === 'results' && this._renderResults()}\r\n
\r\n );\r\n }\r\n\r\n if (this._pageState === 'query') {\r\n return this._renderQuery();\r\n } else {\r\n return this._renderJSXResult();\r\n }\r\n }\r\n\r\n // ==========================================================================\r\n // JSX CONSTRUCTORS\r\n // ==========================================================================\r\n\r\n private _renderJSXResult(): JSX.Element {\r\n // if we are rendering retailer and the search returned nothing,\r\n // display a special error page stating no results were found\r\n const wineType = (this.wineLocation) ? 'retailer' : 'distributor';\r\n if (wineType === 'retailer' && this.wineLocation && this.wineLocation.data.length === 0) {\r\n return this._renderNoResults();\r\n }\r\n return this._renderResults();\r\n }\r\n\r\n // Select US tab with US search form\r\n private _selectUSTab(): void {\r\n this._selectedTab = 'us';\r\n }\r\n\r\n // Select International tab with International search form\r\n private _selectInternationalTab(): void {\r\n this._selectedTab = 'international';\r\n }\r\n\r\n private _renderQuery(): JSX.Element {\r\n const {\r\n hideInternational,\r\n searchRadius,\r\n showFilterButtons,\r\n placeholders,\r\n USLabelText,\r\n internationalLabelText\r\n } = this.props.config;\r\n const USCssClass = this._selectedTab === selectedTab.us?'find-wine-tab-us active':'find-wine-tab-us';\r\n const internationalCssClass = this._selectedTab === selectedTab.international?'find-wine-tab-international active':'find-wine-tab-international';\r\n return (\r\n
\r\n
\r\n
\r\n {this._title}\r\n {this._searchText}\r\n
\r\n\r\n {\r\n !hideInternational &&\r\n
\r\n \r\n \r\n
\r\n }\r\n\r\n \r\n {\r\n !hideInternational &&\r\n \r\n }\r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * JSX for the result page\r\n */\r\n private _renderResults(): JSX.Element {\r\n const { wineFinder__backToFind, wineFinder__showMoreButton } = this.props.resources;\r\n const wineType = (this.wineLocation) ? 'retailer' : 'distributor';\r\n const wineLocation = (this.wineLocation) ? this.wineLocation : this.internationalWineLocation;\r\n const resultDisplay = (this.props.config.resultsDisplay === 'paginate') ?\r\n (\r\n \r\n ) :\r\n (\r\n \r\n );\r\n return (\r\n
\r\n
\r\n {\r\n !this.props.config.singlePage &&\r\n {wineFinder__backToFind}\r\n }\r\n {this.props.config.showAllProductsToggle && this._renderAllProductsToggle()}\r\n {resultDisplay}\r\n
\r\n
\r\n );\r\n }\r\n\r\n /**\r\n * JSX for the 'Show All Products' toggle\r\n */\r\n private _renderAllProductsToggle(): JSX.Element {\r\n const {\r\n hideAllProducts,\r\n showAllProducts\r\n } = this.props.config.showAllProductsLabel || {hideAllProducts:'Hide All Products', showAllProducts:'Show All Products'};\r\n return (\r\n \r\n );\r\n }\r\n\r\n private _closeToggle(): void {\r\n this._allOpen = !this._allOpen;\r\n this.setState({\r\n expandedState: !this.state.expandedState\r\n });\r\n }\r\n\r\n /**\r\n * JSX for results failed page\r\n *\r\n * this is only for retailer / domestic search\r\n */\r\n private _renderNoResults(): JSX.Element {\r\n const {\r\n wineFinder__backToFind,\r\n wineFinder__noResults,\r\n wineFinder__searchAgain\r\n } = this.props.resources;\r\n return (\r\n
\r\n
\r\n {wineFinder__backToFind}\r\n
\r\n {this._title}\r\n

{wineFinder__noResults}

\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n\r\n private get _title(): JSX.Element | null {\r\n const title = this.props.config.title;\r\n if (title && title.text) {\r\n return (\r\n \r\n );\r\n }\r\n return null;\r\n }\r\n\r\n private get _searchText(): JSX.Element | null {\r\n const { searchText } = this.props.config;\r\n if (searchText) {\r\n return (\r\n // tslint:disable-next-line:react-no-dangerous-html\r\n \r\n );\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * return back to query page\r\n */\r\n private _handleBackToFind(): undefined {\r\n this._pageState = 'query';\r\n return undefined;\r\n }\r\n\r\n /**\r\n * handles a re-request to change pages\r\n *\r\n * @param filters query filter for either domestic or international searching\r\n */\r\n private async _handlePageChange(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise {\r\n if (this.wineLocation) {\r\n await this._setWineLocation(filters as IGetWineLocationQueryFilters);\r\n } else {\r\n await this._setInternationalWineLocation(filters as IGetWineInternationalQueryFilters);\r\n }\r\n return undefined;\r\n }\r\n\r\n private async _getMoreWineLocations(filters: IGetWineLocationQueryFilters | IGetWineInternationalQueryFilters): Promise {\r\n if (!filters.page) {\r\n filters.page = 2;\r\n } else {\r\n filters.page++;\r\n }\r\n if (this.wineLocation) {\r\n (filters as IGetWineLocationQueryFilters).brand = this.props.config.brand;\r\n const wineLocationInput = new GetWineLocationInput(filters as IGetWineLocationQueryFilters);\r\n const moreData = await GetWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = [...this._wineLocationDataSet, ...moreData.data];\r\n } else {\r\n (filters as IGetWineInternationalQueryFilters).brand_code = this.props.config.brand;\r\n const wineLocationInput = new GetWineInternationalLocationInput(filters as IGetWineInternationalQueryFilters);\r\n const moreData = await GetInternationalWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = [...this._wineLocationDataSet, ...moreData.data];\r\n }\r\n this.setState({});\r\n }\r\n\r\n // =========================================================================\r\n // DATA ACTIONS AND QUERIES\r\n // =========================================================================\r\n\r\n /**\r\n * runs the users data query and applies the new results to the component\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setWineLocation(filters: IGetWineLocationQueryFilters): Promise {\r\n this._allOpen = false;\r\n filters.brand = this.props.config.brand;\r\n filters.per_page = this.props.config.perPage || 5;\r\n const wineLocationInput = new GetWineLocationInput(filters);\r\n this._querySearchFilters = filters;\r\n const newLocation = await GetWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = newLocation.data;\r\n this.wineLocation = newLocation;\r\n // must be set to undefined to keep which was previous call consistent\r\n this.internationalWineLocation = undefined;\r\n this._pageState = 'results';\r\n return this.wineLocation;\r\n }\r\n\r\n /**\r\n * runs the users data query and applies the new results to the component\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setInternationalWineLocation(filters: IGetWineInternationalQueryFilters): Promise {\r\n filters.brand_code = this.props.config.brand;\r\n filters.per_page = this.props.config.perPage || 5;\r\n const wineLocationInput = new GetWineInternationalLocationInput(filters);\r\n const newLocation = await GetInternationalWineLocation(wineLocationInput, this.props.context.actionContext);\r\n this._wineLocationDataSet = newLocation.data;\r\n this.internationalWineLocation = newLocation;\r\n this._querySearchFilters = filters;\r\n // must be set to undefined to keep which was previous call consistent\r\n this.wineLocation = undefined;\r\n this._pageState = 'results';\r\n return this.internationalWineLocation;\r\n }\r\n\r\n /**\r\n * get a list of products\r\n *\r\n * @param filters query filters for the call\r\n */\r\n private async _setWineProducts(): Promise {\r\n const filter: IGetWineProductQueryFilters = {brand: this.props.config.brand};\r\n const wineLocationInput = new GetWineProductsInput(filter);\r\n const products = await getWineProducts(wineLocationInput, this.props.context.actionContext);\r\n this._products = products;\r\n }\r\n}\r\n\r\nexport default FindWine;\r\n","/*!\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 React from 'react';\n\nimport { IB2bRequestsStatusViewProps } from './b2b-requests-status';\n\nconst B2bRequestsStatusView: React.FC = props => {\n const { b2bRequestsStatus, heading, table } = props;\n return (\n \n {heading}\n {table}\n \n );\n};\n\nexport default B2bRequestsStatusView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n ICategoryHierarchyViewProps,\n IRefineMenuViewProps,\n ISearchResultContainerViewProps,\n ISearchResultModalViewProps,\n ISortByViewProps,\n ITitleViewProps\n} from '@msdyn365-commerce-modules/search-result-container';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst SearchResultContainerView: React.FC = props => {\n const {\n SearchResultContainer,\n products,\n pagination,\n ProductsContainer,\n ProductSectionContainer,\n choiceSummary,\n isMobile,\n modalToggle,\n searchResultModal,\n TitleViewProps,\n refineMenu,\n categoryHierarchy,\n sortByOptions,\n CategoryNavContainer,\n RefineAndProductSectionContainer,\n errorMessage,\n FeatureSearchContainer,\n similarLookProduct\n } = props;\n const isRecoSearchPage = props.context.actionContext.requestContext.query?.recommendation;\n if (isMobile) {\n return (\n \n {categoryHierarchy && renderCategoryHierarchy(categoryHierarchy)}\n {renderTitle(TitleViewProps)}\n {choiceSummary}\n {modalToggle}\n {createSearchResultModal(searchResultModal, refineMenu, sortByOptions, isRecoSearchPage)}\n {similarLookProduct}\n \n {errorMessage}\n {products}\n \n {pagination}\n \n );\n }\n return (\n \n {categoryHierarchy && {renderCategoryHierarchy(categoryHierarchy)}}\n \n {refineMenu && renderRefiner(refineMenu)}\n \n {similarLookProduct}\n
\n {TitleViewProps && renderTitle(TitleViewProps)}\n {choiceSummary}\n
\n
\n {sortByOptions && !isRecoSearchPage && renderSort(sortByOptions)}\n
\n \n {errorMessage}\n {products}\n \n {pagination}\n
\n
\n
\n );\n};\n\nconst createSearchResultModal = (\n modalProps: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element => {\n return React.cloneElement(\n modalProps.modal,\n {},\n modalProps.modalHeader,\n createModalBody(modalProps, refineMenu, sortByDropDown, isRecoSearchPage),\n modalProps.modalFooter\n );\n};\n\nconst createModalBody = (\n props: ISearchResultModalViewProps,\n refineMenu: IRefineMenuViewProps,\n sortByDropDown: ISortByViewProps,\n isRecoSearchPage?: string\n): JSX.Element | null => {\n if (sortByDropDown) {\n return React.cloneElement(props.modalBody, {}, renderSort(sortByDropDown, isRecoSearchPage), renderRefiner(refineMenu));\n }\n return null;\n};\n\nconst renderRefiner = (props: IRefineMenuViewProps): JSX.Element | null => {\n const { refiners, RefineMenuContainer, RefinerSectionContainer } = props;\n if (refiners) {\n return (\n \n \n {refiners.map((submenu, index) => (\n {submenu}\n ))}\n \n \n );\n }\n return null;\n};\n\nconst renderSort = (props: ISortByViewProps, isRecoSearchPage?: string): JSX.Element | null => {\n const { SortingContainer, sortByDropDown } = props;\n if (sortByDropDown && !isRecoSearchPage) {\n return {sortByDropDown};\n }\n return null;\n};\n\nconst renderCategoryHierarchy = (props: ICategoryHierarchyViewProps): JSX.Element | null => {\n const { CategoryHierarchyContainer, categoryHierarchyList, categoryHierarchySeparator } = props;\n if (categoryHierarchyList) {\n return (\n \n {categoryHierarchyList.map((category, index) => (\n \n {category}\n {categoryHierarchyList && categoryHierarchyList[index + 1] && categoryHierarchySeparator}\n \n ))}\n \n );\n }\n\n return null;\n};\n\nconst renderTitle = (props: ITitleViewProps): JSX.Element | null => {\n const { title, TitleContainer } = props;\n if (title) {\n return (\n \n

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

\n
\n );\n }\n return null;\n};\n\nexport default SearchResultContainerView;\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Alert, Button, Modal, ModalBody, ModalFooter, ModalHeader } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface IInvoiceErrorProps extends IComponentProps {\n messageHeader?: string;\n errorMessage?: string;\n otherError?: string;\n showError: boolean;\n payInvoiceErrorModalOpen: boolean;\n\n errorDialogHeader: string;\n errorDialogBodyErrorTitle: string;\n errorDialogBodyErrorDescription: string;\n errorDialogFooterGoToCartButtonText: string;\n errorDialogFooterCancelButtonText: string;\n cartUrl: string;\n\n setPayInvoiceErrorModalClose(): void;\n}\n\nexport interface IInvoiceErrorComponent extends IComponent {}\n\nexport const InvoiceError: React.FC = ({\n messageHeader,\n errorMessage,\n otherError,\n showError,\n payInvoiceErrorModalOpen,\n errorDialogHeader,\n errorDialogBodyErrorTitle,\n errorDialogBodyErrorDescription,\n errorDialogFooterGoToCartButtonText,\n errorDialogFooterCancelButtonText,\n cartUrl,\n setPayInvoiceErrorModalClose\n}) => {\n const errorMessages: (string | undefined)[] = [];\n\n if (otherError) {\n errorMessages.push(otherError);\n } else {\n errorMessages.push(errorMessage);\n }\n\n const className = 'msc-pay-invoice-error-dialog';\n\n return (\n <>\n 0} color='danger' assertive aria-label={messageHeader}>\n \n {errorMessages.map((message, index) => {\n return (\n
\n {message}\n
\n );\n })}\n
\n \n \n {errorDialogHeader}\n \n \n
\n
{errorDialogBodyErrorTitle}
\n
{errorDialogBodyErrorDescription}
\n
\n
\n \n \n {errorDialogFooterGoToCartButtonText}\n \n \n {errorDialogFooterCancelButtonText}\n \n \n
\n \n );\n};\n\n// @ts-expect-error\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport SignInButtonComponent from './components/sign-in-button';\nimport SignInDescriptionComponent from './components/sign-in-description';\nimport SignInErrorComponent from './components/sign-in-error';\nimport SignInInputComponent from './components/sign-in-input';\nimport SignInLabelComponent from './components/sign-in-label';\nimport SignInLinkComponent from './components/sign-in-link';\nimport SignInLoadingIconComponent from './components/sign-in-loading-icon';\nimport SignInLoadingMessageComponent from './components/sign-in-loading-message';\nimport SignInTextComponent from './components/sign-in-text';\nimport { ISignInConfig, ISignInProps, ISignInResources } from './sign-in.props.autogenerated';\n\nexport interface ISignInViewState {\n isShowLoading: boolean;\n}\n\nexport interface ISignInItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n error: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface ISignInSocialItem {\n key: string;\n button: INodeProps;\n image: React.ReactNode;\n text: React.ReactNode;\n}\n\nexport interface ISignInB2BItem {\n key: string;\n button: INodeProps;\n text: React.ReactNode;\n}\n\nexport interface ISignInSocialAccount {\n socialAccounts: INodeProps;\n items: ISignInSocialItem[];\n}\n\nexport interface ISignInB2BAccount {\n socialAccounts: INodeProps;\n items: ISignInB2BItem[];\n}\nexport interface ISignInLocalAccount {\n localAccount: INodeProps;\n items: ISignInItem[];\n forgetPassword: React.ReactNode;\n disclaimer: React.ReactNode;\n error: React.ReactNode;\n signInButton: React.ReactNode;\n}\n\nexport interface ISignInLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface ISignInViewProps {\n className: string;\n viewState: ISignInViewState;\n signIn: IModuleProps;\n loading: ISignInLoading;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n signInSection: INodeProps;\n signInSectionHeading: React.ReactNode;\n signInLocalAccount: ISignInLocalAccount;\n signInSocialAccount: ISignInSocialAccount;\n signInB2BAccount: ISignInB2BAccount;\n signUpSection: INodeProps;\n signUpSectionHeading: React.ReactNode;\n signUpDescription: React.ReactNode;\n signUpLink: React.ReactNode;\n}\n\n/**\n * SignIn component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass SignIn extends React.Component> {\n private readonly moduleClassName: string = 'ms-sign-in';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable private emailId: string;\n\n @observable private emailRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: ISignInProps) {\n super(props);\n this.emailRegex = EmailRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n this.emailId = 'logonIdentifier';\n }\n\n public componentDidMount(): void {\n this._prePopulateData();\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(nextProps: ISignInProps, nextState: ISignInViewState): 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: ISignInConfig = this.props.config || {};\n const resources: ISignInResources = this.props.resources || {};\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n signIn: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n signInSection: {\n className: `${this.moduleClassName}__sign-in-section`\n },\n signInSectionHeading: (\n \n ),\n signInLocalAccount: {\n localAccount: {\n className: `${this.moduleClassName}__account-items localAccount`\n },\n items: [\n this._renderInput(\n this.emailId,\n 'email',\n resources.emailAddressLabelText,\n resources.emailAddressAriaLabel,\n this.emailRegex\n ),\n this._renderInput('password', 'password', resources.passwordLabelText)\n ],\n forgetPassword: (\n \n ),\n disclaimer: config.signInDisclaimer && (\n \n ),\n error: ,\n signInButton: (\n \n )\n },\n signInSocialAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__social-accounts`\n },\n items: [\n this._renderSocialAccount(\n 'FacebookExchange',\n resources.facebookButtonText,\n resources.facebookButtonAriaLabel,\n config.facebookIcon\n ),\n this._renderSocialAccount(\n 'MicrosoftAccountExchange',\n resources.microsoftButtonText,\n resources.microsoftButtonAriaLabel,\n config.microsoftIcon\n )\n ]\n },\n signInB2BAccount: {\n socialAccounts: {\n className: `${this.moduleClassName}__b2b-social-accounts`\n },\n items: [\n this._renderB2BSocialAccount(\n 'StoreManagerB2BSignin',\n resources.b2bButtonText,\n resources.b2bButtonAriaLabel,\n config.displayB2bAccountManagerSignin\n )\n ]\n },\n signUpSection: {\n className: `${this.moduleClassName}__sign-up-section`\n },\n signUpSectionHeading: (\n \n ),\n signUpDescription: (\n \n ),\n signUpLink: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleParagraphChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.signInDisclaimer = event.target.value);\n\n public handleSignInHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signInHeading.text = event.target.value);\n\n public handleSignUpHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (this.props.config.signUpHeading.text = event.target.value);\n\n private readonly _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['CONTENT'] && window['CONTENT']['email_pattern']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n this.emailRegex = window['CONTENT']['email_pattern'];\n }\n\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // @ts-expect-error\n this.emailId = (window.SA_FIELDS.AttributeFields || [])[0].ID || this.emailId;\n }\n };\n\n private readonly _updateErrorMessage = () => {\n const resources: ISignInResources = this.props.resources || {};\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const errorMessages = {\n requiredField_email: resources.requriedEmailError,\n requiredField_password: resources.requriedPasswordError,\n invalid_email: resources.invalidEmailError,\n invalid_password: resources.invalidPasswordError,\n unknown_error: resources.unknownError\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], errorMessages);\n }\n };\n\n private _renderInput(id: string, type: string, labelText: string, ariaLabel?: string, pattern?: string): ISignInItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n error: (\n \n ),\n input: (\n \n )\n };\n }\n\n private _renderSocialAccount(id: string, text: string, ariaLabel: string, iconImage?: Msdyn365.IImageData): ISignInSocialItem {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n image: this._createImageMarkup(iconImage),\n text: \n };\n }\n\n private _renderB2BSocialAccount(\n id: string,\n text: string,\n ariaLabel: string,\n _displayB2bAccountManagerSignin: boolean | undefined\n ): ISignInB2BItem | null {\n if (_displayB2bAccountManagerSignin) {\n return {\n key: id,\n button: {\n id,\n tag: 'button',\n className: classnames(\n `${this.moduleClassName}__social-account`,\n `${this.moduleClassName}__social-account-${id}`,\n 'accountButton',\n 'msc-btn'\n ),\n 'aria-label': ariaLabel\n },\n text: \n };\n }\n return null;\n }\n\n private _createImageMarkup(iconImage?: Msdyn365.IImageData): React.ReactNode | null {\n if (iconImage) {\n const imageProps = {\n gridSettings: this.props.context.request.gridSettings || {},\n imageSettings: iconImage && iconImage.imageSettings\n };\n const pictureClassName = `${this.moduleClassName}__social-account-picture`;\n return (\n
\n \n
\n );\n }\n return null;\n }\n}\n\nexport default SignIn;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { format, Heading } from '@msdyn365-commerce-modules/utilities';\r\nimport { RichTextComponent } from '@msdyn365-commerce/core';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\nimport { IFamilyAndFriendsViewProps } from './family-and-friends';\r\n\r\nexport default (props: IFamilyAndFriendsViewProps) => {\r\n if (props.data.codeList.result?.Result.Codes?.length === 0) { return
; } // don't show if no codes\r\n return (\r\n
\r\n {props.config.heading &&\r\n \r\n }\r\n
\r\n {\r\n format(\r\n props.resources.familyFriends_codesRemaining,\r\n props.data.codeList.result?.Result.QuantityAvailable || 0\r\n )\r\n }\r\n
\r\n
\r\n {props.header}\r\n {props.codes}\r\n
\r\n \r\n
\r\n );\r\n};\r\n","/*!\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IAccountProfileEditItem, IAccountProfileEditLoading, IAccountProfileEditLocalAccount,\r\n IAccountProfileEditViewProps\r\n} from './account-profile-edit';\r\n\r\nconst AccountProfileEditItem: React.FC = ({\r\n wrapper,\r\n label,\r\n errorMessage,\r\n input\r\n}) => {\r\n\r\n return (\r\n \r\n {/* Added * symbol with aria-hidden set to true */}\r\n {label}\r\n {errorMessage}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst LocalAccount: React.FC = ({\r\n localAccount,\r\n items,\r\n errorMessage,\r\n buttonsWrapper,\r\n buttons,\r\n verificationSuccessModal,\r\n verificationSuccessModalMessage\r\n}) => {\r\n\r\n return (\r\n \r\n {items && items.map((item: IAccountProfileEditItem) => {\r\n return (\r\n\r\n \r\n );\r\n })}\r\n {errorMessage && errorMessage.map((error: React.ReactNode, index: number) => {\r\n return (\r\n \r\n {error}\r\n \r\n );\r\n })}\r\n \r\n {buttons && buttons.map((button: React.ReactNode, index: number) => {\r\n return (\r\n \r\n {button}\r\n \r\n );\r\n })}\r\n \r\n\r\n \r\n \r\n \r\n \r\n );\r\n};\r\n\r\nconst AccountProfileEditLoading: React.FC = ({\r\n modal,\r\n modalBody,\r\n icon,\r\n message\r\n}) => {\r\n return (\r\n \r\n \r\n {icon}\r\n {message}\r\n \r\n \r\n );\r\n};\r\n\r\nconst AccountProfileEditView: React.FC = props => {\r\n\r\n const {\r\n accountProfileEdit,\r\n viewState,\r\n loading,\r\n defaultAADConainer,\r\n aadConainer,\r\n heading,\r\n accountProfileEditLocalAccount\r\n } = props;\r\n\r\n return (\r\n \r\n {viewState.isShowLoading && }\r\n {viewState.isShowLoading && }\r\n \r\n {heading}\r\n {LocalAccount(accountProfileEditLocalAccount)}\r\n \r\n \r\n );\r\n};\r\n\r\nexport default AccountProfileEditView;\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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=315&h=315&m=6', w: 0, h: 0 },\n lg: { q: 'w=315&h=315&m=6', w: 0, h: 0 },\n xl: { q: 'w=315&h=315&m=6', w: 0, h: 0 }\n },\n lazyload: true,\n cropFocalRegion: true\n };\n\n if (imageSettings) {\n imageSettings.cropFocalRegion = true;\n }\n\n const fallbackImage = getFallbackImageUrl(product.ItemId, context.actionContext.requestContext.apiSettings);\n return (\n \n );\n};\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst InvoiceDetailsProducts: React.FC = (props: IInvoiceDetailsProductsProps): JSX.Element => {\n const {\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.RecordId)?.PrimaryImageUrl\n };\n return productLine;\n });\n\n this.totalDiscount = invoiceDetails.TotalDiscount;\n this.subtotal = invoiceDetails.InvoiceSubtotal;\n this.totalCharges = invoiceDetails.TotalCharges;\n this.totalTax = invoiceDetails.TotalTaxAmount;\n this.totalAmount = invoice.TotalAmount;\n this.currencyCode = invoice.CurrencyCode;\n }\n\n public get canBePaid(): boolean {\n return this.status !== InvoicePaidStatus.Paid;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\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.RecordId)\n .map(\n product =>\n new ProductInput(\n product.RecordId!,\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 { AsyncResult } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport { IHeaderViewProps } from '@msdyn365-commerce-modules/header';\nimport { Collapse, Drawer, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nconst headerView: React.FC = props => {\n const { HeaderTag, HeaderContainer, HeaderTopBarContainer, Divider } = props;\n return (\n \n \n \n {props.navIcon}\n {props.logo}\n {_renderReactFragment(props.search)}\n {props.preferredStore}\n {_renderAccountBlock(props, false)}\n {props.wishListIconDesktop}\n \n {props.cartIcon}\n {_renderReactFragment(props.siteOptions)}\n \n {_renderCollapseMenu(props)}\n {_renderReactFragment(props.menuBar)}\n \n \n );\n};\n\nfunction _renderCollapseMenu(props: IHeaderViewProps): JSX.Element | null {\n const { Divider, MobileMenuLinksContainer, mobileMenuCollapsed } = props;\n return (\n \n \n {_renderReactFragment(props.search)}\n {_renderMobileAccountBlock(props, true)}\n {props.wishListIconMobile}\n {props.siteOptions}\n \n \n {_renderReactFragment(props.menuBar)}\n \n );\n}\n\nconst renderCustomerName = (accountInformation: AsyncResult): React.ReactChild => {\n const customer = accountInformation && accountInformation.result;\n return <>{customer ? customer.FirstName || customer.Name : ''};\n};\n\nfunction _renderMobileAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const { AccountInfoDropdownParentContainer, signOutLink, signInLink, data, accountLinks } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n 'ms-header__drawer',\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n\n if (accountLinks) {\n return (\n \n
\n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n
\n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n return null;\n}\n\nfunction _renderAccountBlock(props: IHeaderViewProps, renderForMobile: boolean): JSX.Element | null {\n const {\n AccountInfoDropdownParentContainer,\n AccountInfoDropdownPopoverConentContainer,\n accountInfoDropdownButton,\n signOutLink,\n signInLink,\n accountLinks\n } = props;\n\n if (AccountInfoDropdownParentContainer) {\n const accountClassName = classnames(\n AccountInfoDropdownParentContainer.className,\n renderForMobile ? 'account-mobile' : 'account-desktop'\n );\n if (AccountInfoDropdownPopoverConentContainer) {\n return (\n \n {accountInfoDropdownButton}\n \n {accountLinks ? accountLinks.map((link: React.ReactNode) => link) : false}\n {signOutLink}\n \n \n );\n } else if (signInLink) {\n return (\n \n {signInLink}\n \n );\n }\n }\n\n return null;\n}\n\nfunction _renderReactFragment(items: React.ReactNode[]): JSX.Element | null {\n return (\n <>\n {items && items.length > 0\n ? items.map((slot: React.ReactNode, index: number) => {\n return {slot};\n })\n : null}\n \n );\n}\n\nexport default headerView;\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { 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","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nimport { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsError, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-delivery-options';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { DeliveryOption as DeliveryOptionData } from '@msdyn365-commerce/retail-proxy';\r\nimport * as React from 'react';\r\ninterface ICheckoutDeliveryOptionsListFiltered extends ICheckoutDeliveryOptionsList {\r\n globalConfig?: {\r\n [x: string]: unknown;\r\n };\r\n options?: DeliveryOptionData[];\r\n}\r\n\r\ntype ModShipping = {\r\n id: number;\r\n amount: number;\r\n}[];\r\n\r\nconst DeliveryOptionList: React.FC = ({\r\n DeliveryOptionsList,\r\n list,\r\n globalConfig,\r\n options\r\n}) => {\r\n if (!list || list.length === 0) {\r\n return null;\r\n }\r\n\r\n const pennyShippingMethodIds = globalConfig?.pennyShippingIds as number[] || [];\r\n const modShippingMethodIds = globalConfig?.modShippingIds as ModShipping || [];\r\n let localList: ICheckoutDeliveryOptionEdit[] = [];\r\n if (options) {\r\n // maps options with list for sorting\r\n const combinedList: {option: DeliveryOptionData; list: ICheckoutDeliveryOptionEdit}[] = [];\r\n options.map((option, index) => combinedList.push({option: option, list: list[index]}));\r\n // sort list by lowest to highest price\r\n const combinedListSorted = combinedList.sort((a, b) => (a.option.ShippingChargeAmount! > b.option.ShippingChargeAmount!) ? 1 : ((b.option.ShippingChargeAmount! > a.option.ShippingChargeAmount!) ? -1 : 0));\r\n combinedListSorted.forEach((deliveryData) => {\r\n if (deliveryData.list) {\r\n // search to find out if it is a mod shipping method\r\n const isModShippingMethod = modShippingMethodIds.find(modShipping => Number(modShipping.id) === deliveryData.option.RecordId);\r\n // backwards compatibility for penny shipping\r\n const isPennyShippingMethod = pennyShippingMethodIds.find(pennyShipping => Number(pennyShipping) === deliveryData.option.RecordId);\r\n\r\n // Filter out mod shipping methods that are declared\r\n // in the global config, only show shipping methods\r\n // that have a matching mod price for the customer at this current time\r\n // of checkout. If it's not a mod shipping method, always display\r\n // it.\r\n if (isModShippingMethod && deliveryData.option.ShippingChargeAmount === isModShippingMethod.amount) {\r\n localList.push(deliveryData.list);\r\n } else if (isPennyShippingMethod && deliveryData.option.ShippingChargeAmount === 0.01) {\r\n localList.push(deliveryData.list);\r\n } else if (!isModShippingMethod && !isPennyShippingMethod) {\r\n localList.push(deliveryData.list);\r\n }\r\n }\r\n });\r\n }\r\n // just in case options doesn't load in, fail safely back to the original\r\n // list\r\n if (localList.length === 0) { localList = list; }\r\n return (\r\n \r\n {localList.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\r\n return (\r\n \r\n {deliveryOption.price}\r\n );\r\n })}\r\n \r\n );\r\n};\r\n\r\nconst DeliveryOptionSelected: React.FC = ({\r\n DeliveryOption,\r\n description,\r\n price,\r\n}) => {\r\n\r\n return (\r\n \r\n {description}\r\n {price}\r\n \r\n );\r\n};\r\n\r\nconst ErrorMessage: React.FC = ({\r\n Error,\r\n title,\r\n message,\r\n}) => {\r\n\r\n return (\r\n \r\n {title}\r\n {message}\r\n \r\n );\r\n};\r\n\r\nconst CheckoutDeliveryOptionsView: React.FC = props => {\r\n const { CheckoutDeliveryOptions,\r\n viewState,\r\n deliveryOptions,\r\n deliveryOptionsData,\r\n deliveryOptionSelected,\r\n errorMessage,\r\n waiting,\r\n saveButton,\r\n editButton,\r\n cancelButton } = props;\r\n return (\r\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\r\n \r\n {viewState.isLoading && waiting}\r\n {viewState.isError && errorMessage && }\r\n {viewState.isShowList && deliveryOptions && }\r\n {viewState.isShowSelected && deliveryOptionSelected && }\r\n {viewState.isShowSaveButton && saveButton}\r\n {viewState.isShowEditButton && editButton}\r\n {viewState.isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutDeliveryOptionsView;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\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\nexport interface ISignInInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n ariaLabel?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface ISignInInput {\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\nconst SignInInput: React.FC = ({ id, type, value, pattern, className, maxLength, ariaLabel, onChange }) => (\n \n);\n\nexport default SignInInput;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classname from 'classnames';\nimport { observable, reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IMapData } from './map.data';\nimport { IMapProps, IPushpinOptionsData } from './map.props.autogenerated';\n\n/**\n * Header Interface.\n */\nexport interface IHeader {\n headerProps: INodeProps;\n heading: React.ReactNode;\n}\n\n/**\n * MapViewProps Interface.\n */\nexport interface IMapViewProps extends IMapProps {\n ModuleProps: IModuleProps;\n Header: IHeader;\n MapProps: INodeProps;\n Map: Microsoft.Maps.Map | undefined;\n}\n\n/**\n *\n * Map component.\n * @extends {React.Component>}\n */\n@observer\nclass Map extends React.PureComponent> {\n @observable public map: Microsoft.Maps.Map | undefined;\n\n private readonly mapRef: React.RefObject = React.createRef();\n\n public constructor(props: IMapProps) {\n super(props);\n }\n\n public componentDidMount(): void {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n }\n } = this.props;\n\n if (channel && !channel.BingMapsApiKey) {\n telemetry.error('BingMapsApiKey is missing.');\n return;\n }\n\n if (channel && !channel.BingMapsEnabled) {\n telemetry.error('Map is disabled from HQ.');\n return;\n }\n\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n this._initMap();\n this._updateMap();\n }\n\n when(\n () => !!this.props.data.storeSelectorStateManager.result?.setMapModuleLoaded,\n () => {\n this.props.data.storeSelectorStateManager.result?.setMapModuleLoaded(true);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.loadMapApi,\n () => {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsApiKey,\n lang: this.props.context.actionContext.requestContext.locale,\n market: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode\n });\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n () => {\n this._initMap();\n }\n );\n\n reaction(\n () => {\n return [\n this.props.data.storeSelectorStateManager.result?.context?.orgUnitStoreInformation,\n this.props.data.storeSelectorStateManager.result?.selectedStoreLocationId,\n this.map\n ];\n },\n () => {\n this._updateMap();\n }\n );\n }\n\n public render(): JSX.Element | null {\n const {\n config: { heading, className },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const shouldDisplayMap = storeSelectorStateManager?.listMapViewState.displayMap;\n\n const viewProps: IMapViewProps = {\n ...this.props,\n ModuleProps: {\n tag: 'div',\n moduleProps: this.props,\n className: classname('ms-map', { show: shouldDisplayMap }, className)\n },\n Header: {\n headerProps: { className: 'ms-map__header' },\n heading: heading?.text && (\n \n )\n },\n MapProps: {\n tag: 'div',\n className: 'ms-map__body',\n ref: this.mapRef\n },\n Map: this.map\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Method to be called on heading change.\n * @param event -Content Edit Event.\n */\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent): void => {\n this.props.config.heading!.text = event.target.value;\n };\n\n /**\n * Initialize the map.\n */\n private readonly _initMap = () => {\n const {\n context: {\n actionContext: {\n requestContext: { channel }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.map = new Microsoft.Maps.Map(this.mapRef.current as HTMLElement, {\n credentials: channel?.BingMapsApiKey,\n pushpinAccessible: true\n });\n Microsoft.Maps.Events.addHandler(this.map, 'click', async () => {\n await storeSelectorStateManager.setSelectedStoreLocationId(undefined);\n });\n }\n };\n\n /**\n * Update the map.\n */\n private readonly _updateMap = () => {\n const pushpinOptions = this.props.config.pushpinOptions;\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager?.result;\n const orgUnitStoreInformation = storeSelectorStateManager?.context?.orgUnitStoreInformation;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n\n if (this.map && orgUnitStoreInformation) {\n let mapLocation: OrgUnitLocation | undefined;\n this.map.entities.clear();\n const pushpins: Microsoft.Maps.IPrimitive[] = [];\n\n const storeLocationList = orgUnitStoreInformation.filter(store => store.OrgUnitAvailability !== undefined);\n\n for (const [index, unitStoreInfo] of storeLocationList.entries()) {\n const storeLocation = unitStoreInfo.OrgUnitAvailability?.OrgUnitLocation;\n\n if (storeLocation?.Latitude && storeLocation.Longitude) {\n const isSelectedLocation = selectedStoreLocationId === storeLocation.OrgUnitNumber;\n const options = this._getPushpinOptions(isSelectedLocation, index, pushpinOptions);\n const pushpin = new Microsoft.Maps.Pushpin(\n new Microsoft.Maps.Location(storeLocation.Latitude, storeLocation.Longitude),\n options\n );\n\n Microsoft.Maps.Events.addHandler(pushpin, 'click', () => {\n this.handleClickEvent(storeLocation.OrgUnitNumber);\n });\n isSelectedLocation ? pushpins.unshift(pushpin) : pushpins.push(pushpin);\n\n if (isSelectedLocation) {\n mapLocation = storeLocation;\n }\n }\n }\n\n if (mapLocation) {\n const currentLocation = new Microsoft.Maps.Location(mapLocation.Latitude, mapLocation.Longitude);\n this.map.setView({ center: currentLocation });\n } else {\n // Create a LocationRect from array of pushpins and set the map view.\n this.map.setView({\n bounds: Microsoft.Maps.LocationRect.fromShapes(pushpins)\n });\n }\n\n this.map.setOptions({ pushpinAccessible: true });\n this.map.entities.push(pushpins);\n }\n };\n\n /**\n * Handle click event.\n * @param orgUnitNumber - Organization unit number.\n */\n private readonly handleClickEvent = (orgUnitNumber: string | undefined): void => {\n const storeSelectorStateManager = this.props.data.storeSelectorStateManager.result;\n storeSelectorStateManager?.setSelectedStoreLocationId(undefined);\n if (orgUnitNumber) {\n setTimeout(() => {\n storeSelectorStateManager?.setSelectedStoreLocationId(orgUnitNumber);\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- Time out.\n }, 500);\n }\n };\n\n /**\n * Get the pushpin option.\n * @param isSelectedLocation - Is selected location.\n * @param index - Index.\n * @param pushpinOptions - PushpinOptions.\n * @returns - The pushpin options.\n */\n private readonly _getPushpinOptions = (isSelectedLocation: boolean, index: number, pushpinOptions?: IPushpinOptionsData) => {\n const text = pushpinOptions?.showIndex ? (index + 1).toString() : undefined;\n\n const size = pushpinOptions?.size || 1;\n const color = isSelectedLocation ? pushpinOptions?.selectionColor || pushpinOptions?.color : pushpinOptions?.color;\n const icon = this._getSvgIcon(size, color, text);\n\n return {\n // Fallback if icon doesn't render properly\n color: isSelectedLocation ? pushpinOptions?.selectionColor : pushpinOptions?.color,\n icon\n };\n };\n\n private readonly _getSvgIcon = (size: number, color?: string, text?: string) => {\n const baseValue: number = 32;\n return `\n \n ${text ? `${text}` : ''}\n `;\n };\n}\n\nexport default Map;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { 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","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\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","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditButton {\r\n id?: string;\r\n className: string;\r\n text: string;\r\n ariaLabel: string;\r\n disabled?: boolean;\r\n telemetryContent?: ITelemetryContent;\r\n onClick?(event: React.MouseEvent): void;\r\n}\r\n\r\nconst AccountProfileEditButton: React.FC = ({ id, className, text, ariaLabel, disabled, telemetryContent, onClick }) => {\r\n const payLoad = getPayloadObject('click', telemetryContent!, text);\r\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\r\n\r\n return (\r\n \r\n {text}\r\n );\r\n};\r\n\r\nexport default AccountProfileEditButton;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditErrorProps {\r\n id?: string;\r\n className: string;\r\n type?: string;\r\n message?: string;\r\n}\r\n\r\nconst AccountProfileEditError: React.FC = ({ id, className, type = 'page', message }) => {\r\n const errorClassName = `${className}__${type}-error`;\r\n\r\n return (\r\n
\r\n );\r\n\r\n};\r\n\r\nexport default AccountProfileEditError;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditInputProps {\r\n id?: string;\r\n\r\n type: any;\r\n value?: string;\r\n pattern?: string;\r\n className: string;\r\n maxLength?: string;\r\n onChange?(event: React.ChangeEvent): void;\r\n}\r\n\r\nexport interface IAccountProfileEditInput {\r\n key: string;\r\n AddressItem: INodeProps;\r\n label: React.ReactNode;\r\n alert: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nconst GetMaxLength = (maxLength?: string): number | undefined => {\r\n if (maxLength) {\r\n const parsedMaxLength = Number.parseInt(maxLength, 10);\r\n if (!isNaN(parsedMaxLength)) {\r\n return parsedMaxLength;\r\n }\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nconst AccountProfileEditInput: React.FC = ({\r\n id,\r\n type,\r\n value,\r\n pattern,\r\n className,\r\n maxLength,\r\n onChange\r\n}) => (\r\n \r\n);\r\n\r\nexport default AccountProfileEditInput;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditLabel {\r\n id: string;\r\n forId: string;\r\n className: string;\r\n text: string;\r\n}\r\n\r\nconst AccountProfileEditLabel: React.FC = ({ id, forId, className, text }) => (\r\n \r\n);\r\n\r\nexport default AccountProfileEditLabel;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditLoadingIcon {\r\n className: string;\r\n}\r\n\r\nconst AccountProfileEditLoadingIcon: React.FC = ({ className }) => (\r\n
\r\n);\r\n\r\nexport default AccountProfileEditLoadingIcon;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as React from 'react';\r\n\r\nexport interface IAccountProfileEditLoadingMessage {\r\n className: string;\r\n message: string;\r\n}\r\n\r\nconst AccountProfileEditLoadingMessage: React.FC = ({ className, message }) => (\r\n
\r\n {message}\r\n
\r\n);\r\n\r\nexport default AccountProfileEditLoadingMessage;\r\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { EmailRegex } from '@msdyn365-commerce-modules/retail-actions';\r\nimport {\r\n getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody\r\n} from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { observable } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IAccountProfileEditConfig, IAccountProfileEditProps\r\n} from './account-profile-edit.props.autogenerated';\r\nimport AccountProfileEditButtonComponent from './components/account-profile-edit-button';\r\nimport AccountProfileEditErrorComponent from './components/account-profile-edit-error';\r\nimport AccountProfileEditInputComponent from './components/account-profile-edit-input';\r\nimport AccountProfileEditLabelComponent from './components/account-profile-edit-label';\r\nimport AccountProfileEditLoadingIconComponent from './components/account-profile-edit-loading-icon';\r\nimport AccountProfileEditLoadingMessageComponent from './components/account-profile-edit-loading-message';\r\n\r\nexport interface IAccountProfileEditViewState {\r\n isShowLoading: boolean;\r\n}\r\n\r\nexport interface IAccountProfileEditItem {\r\n wrapper: INodeProps;\r\n key: string;\r\n label: React.ReactNode;\r\n errorMessage: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nexport interface IAccountProfileEditLocalAccount {\r\n localAccount: INodeProps;\r\n items: IAccountProfileEditItem[];\r\n errorMessage: React.ReactNode[];\r\n buttonsWrapper: INodeProps;\r\n buttons: React.ReactNode[];\r\n verificationSuccessModal: INodeProps;\r\n verificationSuccessModalMessage: INodeProps;\r\n}\r\n\r\nexport interface IAccountProfileEditLoading {\r\n modal: INodeProps;\r\n modalBody: INodeProps;\r\n icon: React.ReactNode;\r\n message: React.ReactNode;\r\n}\r\n\r\nexport interface IAccountProfileEditViewProps {\r\n className: string;\r\n viewState: IAccountProfileEditViewState;\r\n loading: IAccountProfileEditLoading;\r\n accountProfileEdit: IModuleProps;\r\n defaultAADConainer: INodeProps;\r\n aadConainer: INodeProps;\r\n heading: React.ReactNode;\r\n accountProfileEditLocalAccount: IAccountProfileEditLocalAccount;\r\n}\r\n\r\n/**\r\n *\r\n * AccountProfileEdit component\r\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\r\n * Please ensure any change in module don't break contract with AAD.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass AccountProfileEdit extends React.Component> {\r\n\r\n private readonly moduleClassName: string = 'ms-account-profile-edit';\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n @observable private givenName: string;\r\n\r\n @observable private surname: string;\r\n\r\n @observable private email: string;\r\n\r\n @observable private emailRegex: string;\r\n\r\n @observable private isInitialized: boolean;\r\n\r\n private initializationTimer: any;\r\n\r\n constructor(props: IAccountProfileEditProps) {\r\n super(props);\r\n this.givenName = '';\r\n this.surname = '';\r\n this.email = '';\r\n this.emailRegex = EmailRegex.defaultRegex.source;\r\n this.isInitialized = false;\r\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\r\n }\r\n\r\n public componentDidMount(): void {\r\n this._onInit();\r\n }\r\n\r\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\r\n public componentDidUpdate(): void {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n window['$element']['initialize']();\r\n }\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IAccountProfileEditProps,\r\n nextState: IAccountProfileEditViewState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { config, resources } = this.props;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n viewState: {\r\n isShowLoading: !this.isInitialized\r\n },\r\n accountProfileEdit: {\r\n moduleProps: this.props,\r\n className: classnames(this.moduleClassName, config.className)\r\n },\r\n loading: {\r\n modal: {\r\n tag: Modal,\r\n isOpen: true\r\n },\r\n modalBody: {\r\n tag: ModalBody\r\n },\r\n icon: ,\r\n message: \r\n },\r\n defaultAADConainer: {\r\n id: 'api',\r\n style: { display: 'none' }\r\n },\r\n aadConainer: {\r\n id: this.isInitialized ? 'api' : null,\r\n className: `${this.moduleClassName}__container`\r\n },\r\n heading: config.heading && config.heading.text && (\r\n \r\n ),\r\n accountProfileEditLocalAccount: this._renderLocalAccount()\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n\r\n }\r\n\r\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading.text = event.target.value;\r\n\r\n public onTextBoxChange = (event: React.ChangeEvent) => {\r\n const id = event.target.id;\r\n const value = event.target.value;\r\n\r\n switch (id.toLowerCase()) {\r\n case 'givenname': {\r\n this.givenName = value;\r\n break;\r\n }\r\n case 'surname': {\r\n this.surname = value;\r\n break;\r\n }\r\n case 'email': {\r\n this.emailRegex = value;\r\n break;\r\n }\r\n default:\r\n }\r\n };\r\n\r\n public _onInit = () => {\r\n this._prePopulateData();\r\n this._updateErrorMessage();\r\n\r\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\r\n this.initializationTimer = setInterval(() => {\r\n this._isInitializationSuccessful();\r\n }, 100);\r\n setTimeout(() => {\r\n clearInterval(this.initializationTimer);\r\n }, 10_000);\r\n };\r\n\r\n // After successful AAD initialization, remove waiting and preload any data, if needed.\r\n private readonly _isInitializationSuccessful = () => {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\r\n clearInterval(this.initializationTimer);\r\n this.isInitialized = true;\r\n }\r\n };\r\n\r\n private readonly _prePopulateData = () => {\r\n const { resources } = this.props;\r\n const invalidEmailAddressError = resources.invalidEmailAddressError || 'Please enter a valid email address.';\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\r\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\r\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PRE: string; PAT: string; UX_INPUT_TYPE: string; PAT_DESC: string }) => {\r\n const value = obj.PRE ? this._htmlDecode(obj.PRE) : '';\r\n switch (obj.ID.toLowerCase()) {\r\n case 'givenname': {\r\n this.givenName = value;\r\n break;\r\n }\r\n case 'surname': {\r\n this.surname = value;\r\n break;\r\n }\r\n case 'email': {\r\n this.email = value;\r\n this.emailRegex = obj.PAT;\r\n obj.PAT_DESC = invalidEmailAddressError;\r\n break;\r\n }\r\n default:\r\n }\r\n\r\n });\r\n }\r\n };\r\n\r\n private _htmlDecode(str: string): string {\r\n const e = document.createElement('div');\r\n\r\n e.innerHTML = str;\r\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue || '';\r\n }\r\n\r\n private readonly _updateErrorMessage = () => {\r\n const { resources } = this.props;\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\r\n if (window && window['CONTENT']) {\r\n\r\n const message = {\r\n required_field: resources.requiredFieldMissingError,\r\n verifying_blurb: resources.loadingMessage\r\n };\r\n\r\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\r\n Object.assign(window['CONTENT'], message);\r\n }\r\n };\r\n\r\n private _renderLocalAccount(): IAccountProfileEditLocalAccount {\r\n const { config, resources } = this.props;\r\n const localAccount = {\r\n localAccount: {\r\n id: 'attributeList',\r\n className: `${this.moduleClassName}__account-items attr`\r\n },\r\n items: [\r\n this._renderInput('givenName', 'text', this.givenName, resources.firstNameLabelText, resources.firstNameMaxLength),\r\n this._renderInput('surname', 'text', this.surname, resources.lastNameLabelText, resources.lastNameMaxLength)\r\n ],\r\n errorMessage: [\r\n ,\r\n ,\r\n \r\n ],\r\n buttonsWrapper: {\r\n className: `${this.moduleClassName}__buttons`\r\n },\r\n buttons: [\r\n ,\r\n \r\n ],\r\n verificationSuccessModal: {\r\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\r\n },\r\n verificationSuccessModalMessage: {\r\n id: 'verifying_blurb',\r\n className: `${this.moduleClassName}__verifying-modal-message`\r\n }\r\n };\r\n\r\n if (config.showEmail && this.email !== '') {\r\n localAccount.items.push(this._renderInput('email', 'email', this.email, resources.emailAddressLabelText, undefined, this.emailRegex));\r\n }\r\n\r\n return localAccount;\r\n }\r\n\r\n private _renderInput(id: string, type: string, value: string, labelText: string, maxLength?: string, pattern?: string): IAccountProfileEditItem {\r\n const className = `${this.moduleClassName}__account-item`;\r\n return (\r\n {\r\n wrapper: {\r\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\r\n },\r\n key: id,\r\n label: (\r\n \r\n ),\r\n errorMessage: (\r\n \r\n ),\r\n input: (\r\n \r\n )\r\n\r\n }\r\n );\r\n }\r\n\r\n}\r\n\r\nexport default AccountProfileEdit;\r\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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ISignInLink {\n id?: string;\n className: string;\n href: string;\n ariaLabel: string;\n text: string;\n telemetryContent?: ITelemetryContent;\n}\n\nconst SignInLink: React.FC = ({ id, className, href, telemetryContent, ariaLabel, text }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignInLink;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = `My Cart, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface ISignInErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst SignInError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default SignInError;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IHeader, IMapViewProps } from './map';\n\n/**\n * Render the heading.\n * @param param0 -- Heading props.\n * @param param0.headerProps -- Heading Props.\n * @param param0.heading -- Heading Node.\n * @returns -- Returns the node.\n */\nconst MapHeader: React.FC = ({ headerProps, heading }) => {heading};\n\n/**\n * Renders the map view props.\n * @param param0 -- Map view props.\n * @param param0.ModuleProps -- Module props.\n * @param param0.Header -- Header props.\n * @param param0.MapProps -- Map props.\n * @returns -- Returns the map module.\n */\nconst MapView: React.FC = ({ ModuleProps, Header, MapProps }) => (\n \n {Header && }\n \n \n);\n\nexport default MapView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface ISignInDescription {\n className: string;\n description: string;\n}\n\nconst SignInDescription: React.FC = ({ className, description }) =>

{description}

;\n\nexport default SignInDescription;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Module } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\nimport msdyn365Commerce from '@msdyn365-commerce/core-internal';\r\nimport { ICheckoutApplePayViewProps } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay';\r\nimport { ICheckoutApplePayData } from '@msdyn365-commerce-modules/checkout/src/modules/checkout-apple-pay/checkout-apple-pay.data';\r\nimport { ICheckoutApplePayProps } from '../definition-extensions/checkout-apple-pay.ext.props.autogenerated';\r\n\r\nconst CheckoutApplyPayView: React.FC> = (props) => {\r\n const { checkoutApplePay, applePayButton, alert } = props;\r\n const [applePayImage, setApplePayImage] = React.useState('');\r\n\r\n React.useEffect(() => {\r\n if (props.config.applePayImage) {\r\n setApplePayImage(`url('${props.config.applePayImage}')`);\r\n }\r\n }, [props.config.applePayImage]);\r\n\r\n if (msdyn365Commerce.isBrowser) {\r\n if (props.config.applePayImage) {\r\n document.documentElement.style.setProperty('--applePayImage', `${applePayImage}`);\r\n document.documentElement.style.setProperty('--applePayWebkit', `none`);\r\n } else {\r\n document.documentElement.style.setProperty('--applePayWebkit', `-apple-pay-button`);\r\n }\r\n }\r\n return (\r\n \r\n {alert}\r\n {applePayButton}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutApplyPayView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport MsDyn365, { ICoreContext, IDateFormatOptions, IRequestContext } from '@msdyn365-commerce/core';\nimport { BusinessPartnerOperationRequest, BusinessPartnerOperationRequestDetails } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions, StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport {\n IDataTableProps,\n IHeadingsProperty,\n ITableItemProps,\n ITableRowProps,\n Table,\n TableDataType\n} from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IB2bRequestsStatusData } from '../b2b-requests-status.data';\nimport { IB2bRequestsStatusProps } from '../b2b-requests-status.props.autogenerated';\n\nexport interface IB2bRequestsTableProps {\n moduleProps: IB2bRequestsStatusProps;\n isMobile: boolean;\n mobileExcludedColumns: string[];\n}\n\nexport interface IB2bRequestsTableResources {\n b2bRequestsTypeCreateProspect: string;\n b2bRequestsTypeAddUser: string;\n b2bRequestsTypeEditUser: string;\n b2bRequestsTypeDeleteUser: string;\n b2bRequestsTypeRequestAccountStatement: string;\n b2bRequestsTypeRequestInvoiceCopy: string;\n b2bRequestsTypeUnknown: string;\n b2bRequestsStatusRequested: string;\n b2bRequestsStatusProcessed: string;\n b2bRequestsStatusError: string;\n b2bRequestsNumberOfItems: string;\n b2bRequestsNumberOfItemsSingular: string;\n b2bRequestsNameDisplay: string;\n b2bRequestsPreviousText: string;\n b2bRequestsNextText: string;\n b2bRequestsUserColumn: string;\n b2bRequestsStatusColumn: string;\n b2bRequestsRequestDateColumn: string;\n b2bRequestsTypeColumn: string;\n b2bRequestsDescriptionColumn: string;\n b2bRequestsAccountStatementDetails: string;\n b2bRequestsInvoiceCopyDetails: string;\n businessUserSelectCheckBoxAriaLabelText?: string;\n sortByAscending?: string;\n sortByDescending?: string;\n}\n\nexport enum RequestsTableColumnHeader {\n Name = 'User',\n Status = 'Status',\n RequestDate = 'Request date',\n Type = 'Request type',\n Description = 'Request detail'\n}\n\nconst getCurrentUrl = (reqContext: IRequestContext): URL => {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n }\n\n // NOTE: Typing on requestURL is incorrect\n if (reqContext.url.requestUrl.href) {\n return new URL(reqContext.url.requestUrl.href);\n }\n return new URL(reqContext.url.requestUrl.href);\n};\n\nconst getUserName = (request: BusinessPartnerOperationRequest, resources: IB2bRequestsTableResources) => {\n if (StringExtensions.isNullOrEmpty(request.UserFirstName)) {\n if (StringExtensions.isNullOrEmpty(request.UserLastName)) {\n return '';\n }\n\n return request.UserLastName;\n } else if (StringExtensions.isNullOrEmpty(request.UserLastName)) {\n return request.UserFirstName;\n }\n\n return resources.b2bRequestsNameDisplay.replace('{0}', request.UserFirstName!).replace('{1}', request.UserLastName!);\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 * Gets the value to display for the request details.\n * @param request - The request to parse for the details.\n * @param resources - The resources.\n * @param context - The context.\n * @returns The string to display.\n */\nconst getDetails = (request: BusinessPartnerOperationRequest, resources: IB2bRequestsTableResources, context: ICoreContext) => {\n if (!request.Details) {\n return '';\n }\n\n const requestDetails: BusinessPartnerOperationRequestDetails = request.Details;\n\n const accountStatementStartDateTime = formatDate(context, requestDetails.AccountStatementStartDateTime) || '';\n const accountStatementEndDateTime = formatDate(context, requestDetails.AccountStatementEndDateTime) || '';\n const invoiceId = requestDetails.InvoiceId ?? '';\n\n switch (request.TypeValue) {\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- workaround for not being able to use enum value\n case 5:\n if (\n !StringExtensions.isNullOrEmpty(accountStatementStartDateTime) &&\n !StringExtensions.isNullOrEmpty(accountStatementEndDateTime)\n ) {\n return resources.b2bRequestsAccountStatementDetails\n .replace('{0}', accountStatementStartDateTime)\n .replace('{1}', accountStatementEndDateTime);\n }\n\n return '';\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers -- workaround for not being able to use enum value\n case 6:\n if (!StringExtensions.isNullOrEmpty(invoiceId)) {\n return resources.b2bRequestsInvoiceCopyDetails.replace('{0}', invoiceId);\n }\n\n return '';\n default:\n return '';\n }\n};\n\nconst createTableItems = (\n operationRequests: BusinessPartnerOperationRequest[] | undefined,\n props: IB2bRequestsStatusProps\n): ITableRowProps[] => {\n if (!ArrayExtensions.hasElements(operationRequests)) {\n return [];\n }\n\n return operationRequests.map(request => {\n return {\n row: [\n {\n id: props.resources.b2bRequestsTypeColumn,\n type: TableDataType.Text,\n value: getDisplayFriendlyTypeValue(request.TypeValue ?? 0, props.resources)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsRequestDateColumn,\n type: TableDataType.Text,\n value: formatDate(props.context, request.CreatedDateTime)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsDescriptionColumn,\n type: TableDataType.Text,\n value: getDetails(request, props.resources, props.context)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsUserColumn,\n type: TableDataType.Text,\n value: getUserName(request, props.resources)\n } as ITableItemProps,\n {\n id: props.resources.b2bRequestsStatusColumn,\n type: TableDataType.Text,\n value: getDisplayFriendlyStatusValue(request.StatusValue ?? 0, props.resources)\n } as ITableItemProps\n ],\n isSelected: false,\n className: props.config.className\n };\n });\n};\n\nconst getDisplayFriendlyTypeValue = (typeValue: number, resources: IB2bRequestsTableResources): string => {\n switch (typeValue) {\n case 1:\n return resources.b2bRequestsTypeCreateProspect;\n case 2:\n return resources.b2bRequestsTypeAddUser;\n case 3:\n return resources.b2bRequestsTypeDeleteUser;\n case 4:\n return resources.b2bRequestsTypeEditUser;\n case 5:\n return resources.b2bRequestsTypeRequestAccountStatement;\n case 6:\n return resources.b2bRequestsTypeRequestInvoiceCopy;\n default:\n return resources.b2bRequestsTypeUnknown;\n }\n};\n\nconst getDisplayFriendlyStatusValue = (statusValue: number, resources: IB2bRequestsTableResources): string => {\n switch (statusValue) {\n case 1:\n return resources.b2bRequestsStatusProcessed;\n case 2:\n return resources.b2bRequestsStatusError;\n default:\n return resources.b2bRequestsStatusRequested;\n }\n};\n\nconst createTableProps = (tableProps: IB2bRequestsTableProps) => {\n const { context, data, resources } = tableProps.moduleProps;\n\n const tableData = createTableItems(data.operationRequests.result, tableProps.moduleProps);\n const tableHeading =\n (ArrayExtensions.hasElements(tableData) &&\n tableData[0].row\n .filter(item => {\n // Check that this is either not mobile or the column should be displayed when mobile.\n return !tableProps.isMobile || !tableProps.mobileExcludedColumns.includes(item.id);\n })\n .map(item => {\n return {\n name: item.id,\n sortable: true,\n ariaLabel: resources.columnSortAriaLabel\n } as IHeadingsProperty;\n })) ||\n [];\n\n return {\n resources: {},\n headings: tableHeading,\n rows: tableData,\n className: `${tableProps.moduleProps.config.className}__table`,\n editLinkText: '',\n deleteLinkText: '',\n viewLinkText: '',\n enableToModify: false,\n actionLinkText: '',\n showCheckBoxes: false,\n isSortable: true,\n showPagination: true,\n minifyActions: tableProps.isMobile,\n excludedColumns: tableProps.isMobile ? tableProps.mobileExcludedColumns : [],\n paginationProperty: {\n skipCount:\n context.request.query?.skip && !isNaN(Number.parseInt(context.request.query.skip, 10))\n ? Number.parseInt(context.request.query.skip, 10)\n : 0,\n itemPerPage: 10,\n prevText: resources.b2bRequestsPreviousText,\n nextText: resources.b2bRequestsNextText,\n paginationText: '',\n url: (context && getCurrentUrl(context.request).href) || ''\n },\n isSingleSelectOnly: true,\n actions: {\n onDelete: undefined,\n onEdit: undefined,\n onView: undefined\n },\n businessUserSelectCheckBoxAriaLabelText: tableProps.moduleProps.resources.businessUserSelectCheckBoxAriaLabelText,\n sortByAscending: tableProps.moduleProps.resources.sortByAscending,\n sortByDescending: tableProps.moduleProps.resources.sortByDescending\n } as IDataTableProps;\n};\n\nexport const B2bRequestsTable: React.FC = (tableProps: IB2bRequestsTableProps) => {\n return ;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { format, Heading, IModuleProps, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport { computed } from 'mobx';\nimport * as React from 'react';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\n\nimport { IB2bRequestsStatusData } from './b2b-requests-status.data';\nimport { IB2bRequestsStatusProps, IHeadingData } from './b2b-requests-status.props.autogenerated';\nimport { B2bRequestsTable } from './components/b2b-requests-table';\n\nexport interface IB2bRequestsStatusViewProps extends IB2bRequestsStatusProps {\n b2bRequestsStatus: IModuleProps;\n heading?: React.ReactNode;\n table: React.ReactNode;\n}\n\n/**\n *\n * B2bRequestsStatus component.\n * @extends {React.PureComponent>}\n */\nclass B2bRequestsStatus extends React.PureComponent> {\n @computed get isMobile(): boolean {\n const size = isMobile({ variant: VariantType.Viewport, context: this.props.context.request });\n return size === 'xs';\n }\n\n public render(): JSX.Element | null {\n const { config } = this.props;\n\n if (!isChannelTypeB2B(this.props.context.actionContext.requestContext)) {\n return null;\n }\n\n const className = config.className || '';\n\n const viewProps = {\n ...this.props,\n b2bRequestsStatus: {\n moduleProps: this.props,\n className\n },\n heading: this.renderHeader(className, config.heading),\n table: this.renderTable()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private readonly renderHeader = (className: string, headingData: IHeadingData): React.ReactNode => {\n const itemCount = this.props.data.operationRequests.result?.length ?? 0;\n\n return (\n
\n \n {this.getItemNumberDisplayString(itemCount)}\n
\n );\n };\n\n /**\n * Returns columns that needs to be excluded for mobile view.\n * @returns Array of column names.\n */\n private readonly _retrieveExcludedColumns = (): string[] => {\n const { resources } = this.props;\n return [resources.b2bRequestsRequestDateColumn, resources.b2bRequestsDescriptionColumn, resources.b2bRequestsUserColumn];\n };\n\n private readonly renderTable = (): React.ReactNode => {\n return (\n \n );\n };\n\n private readonly getItemNumberDisplayString = (itemCount: number): string => {\n switch (itemCount) {\n case 0:\n return '';\n case 1:\n return format(this.props.resources.b2bRequestsNumberOfItemsSingular, itemCount);\n default:\n return format(this.props.resources.b2bRequestsNumberOfItems, itemCount);\n }\n };\n}\n\nexport default B2bRequestsStatus;\n","/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nimport { format } from '@msdyn365-commerce-modules/utilities';\r\nimport { getUrlSync, IComponent, IComponentProps } from '@msdyn365-commerce/core';\r\nimport { ICartState } from '@msdyn365-commerce/global-state';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nexport interface ICartIconData {\r\n cart: ICartState;\r\n}\r\n\r\nexport interface ICartIconComponentProps extends IComponentProps {\r\n className?: string;\r\n cartLabel: string;\r\n}\r\n\r\nexport interface ICartIconComponent extends IComponent {\r\n}\r\n\r\n/**\r\n *\r\n * CartIcon component\r\n * @extends {React.FC}\r\n */\r\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\r\n const { cartLabel, data: {cart} } = props;\r\n const cartLink = getUrlSync('cart', props.context.actionContext);\r\n const cartItem = cart ? `(${cart.totalItemsInCart})` : '';\r\n const label = format(cartLabel, cartItem) || `Shopping bag, ${cartItem} items`;\r\n return (\r\n \r\n
\r\n My Cart {cartItem}\r\n
\r\n
\r\n );\r\n});\r\n\r\n// Following code is been replaced with 'CartIcon' in last line and might be used on later\r\n// @ts-ignore\r\n// export const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\r\n// 'CartIcon',\r\n// { component: CartIcon, ...CartIconComponentActions }\r\n// );\r\n\r\nexport default CartIcon;","/*!\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 ISignInLoadingMessage {\n className: string;\n message: string;\n}\n\nconst SignInLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default SignInLoadingMessage;\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 { 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 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 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 filterClassName = `${className}__filter`;\n return (\n \n );\n }\n\n private _renderInvoicesList(className: string): JSX.Element {\n const tableClassName = `${className}__table`;\n return (\n \n );\n }\n\n private _onAddToCartFailed(newErrorState: IInvoiceErrorState, reference?: React.RefObject): void {\n const errorState = { ...newErrorState };\n errorState.errorHost = 'ADDINVOICETOCART';\n errorState.errorMessage =\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 _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":""}