{"version":3,"sources":["webpack:///src/modules/store-selector/store-selector.view.tsx?b873","webpack:///src/modules/business-sign-up/components/sign-up-button.tsx?37a3","webpack:///src/modules/business-sign-up/components/sign-up-error.tsx?fbb9","webpack:///src/modules/business-sign-up/components/sign-up-input.tsx?4011","webpack:///src/modules/business-sign-up/components/sign-up-label.tsx?2025","webpack:///src/modules/business-sign-up/business-sign-up.tsx?df21","webpack:///src/modules/fabrikam/views/reviews-list.view.tsx?39a2","webpack:///src/modules/tab-item/tab-item.view.tsx?76f0","webpack:///src/modules/account-address-tile/account-address-tile.view.tsx?0b73","webpack:///src/modules/back-top-footer/back-top-footer.tsx?0e13","webpack:///src/modules/breadcrumb/components/link.tsx?b7b8","webpack:///src/modules/breadcrumb/components/separator.tsx?7c35","webpack:///src/modules/breadcrumb/breadcrumb.tsx?3387","webpack:///src/modules/accordion-item/accordion-item.view.tsx?b04f","webpack:///src/modules/store-selector/components/pickup-option-list.tsx?9a9c","webpack:///src/modules/store-selector/components/store-selector-location-line-item/date-time-helpers.ts?89f3","webpack:///src/modules/store-selector/components/store-selector-location-line-item/store-selector-location-line-item.components.tsx?5a50","webpack:///src/modules/store-selector/components/store-selector-location-lines.tsx?0668","webpack:///src/modules/store-selector/components/store-selector-search-form.tsx?1a99","webpack:///src/modules/store-selector/components/store-selector-small-components.tsx?c26d","webpack:///src/modules/store-selector/store-selector.tsx?ce13","webpack:///src/modules/accordion/accordion.view.tsx?8c70","webpack:///src/modules/tab/tab.tsx?d713","webpack:///src/modules/business-organization-list/business-organization-list.view.tsx?8701","webpack:///src/modules/business-organization-list/components/small-components.tsx?104e","webpack:///src/modules/business-organization-list/business-organization-list.tsx?b6f5","webpack:///src/modules/cart/cart.view.tsx?394b","webpack:///src/modules/buybox/buybox.view.tsx?7b02","webpack:///src/modules/account-customer-balance-tile/components/account-customer-balance-tile-info.tsx?a91f","webpack:///src/modules/account-customer-balance-tile/components/account-customer-balance-tile-links.tsx?5f47","webpack:///src/modules/account-customer-balance-tile/account-customer-balance-tile.tsx?9383","webpack:///src/modules/account-order-templates-tile/account-order-templates-tile.view.tsx?90af","webpack:///src/modules/checkout-loyalty/checkout-loyalty.view.tsx?876d","webpack:///src/modules/tab-item/tab-item.tsx?d2c1","webpack:///src/modules/order-details/order-details.view.tsx?018c","webpack:///src/modules/password-reset-verification/components/password-reset-verification-button.tsx?d3bb","webpack:///src/modules/password-reset-verification/components/password-reset-verification-error.tsx?5cfd","webpack:///src/modules/password-reset-verification/components/password-reset-verification-input.tsx?6596","webpack:///src/modules/password-reset-verification/components/password-reset-verification-label.tsx?70a3","webpack:///src/modules/password-reset-verification/components/password-reset-verification-loading-icon.tsx?7944","webpack:///src/modules/password-reset-verification/components/password-reset-verification-loading-message.tsx?97ae","webpack:///src/modules/password-reset-verification/components/password-reset-verification-success.tsx?8c35","webpack:///src/modules/password-reset-verification/password-reset-verification.tsx?9795","webpack:///src/modules/account-wishlist-tile/account-wishlist-tile.view.tsx?58da","webpack:///src/modules/organization-users-tile/organization-users-tile.view.tsx?d92a","webpack:///src/modules/loyalty-terms/components/loyalty-terms-modal.tsx?c84d","webpack:///src/modules/loyalty-terms/loyalty-terms.tsx?0629","webpack:///src/modules/reviews-list/reviews-list.view.tsx?6dd9","webpack:///src/modules/account-loyalty/components/account-loyalty-small-components.tsx?9694","webpack:///src/modules/account-loyalty/account-loyalty.tsx?82db","webpack:///src/modules/account-loyalty-tile/account-loyalty-tile.view.tsx?c661","webpack:///src/modules/order-confirmation/order-confirmation.view.tsx?8166","webpack:///src/modules/checkout-billing-address/checkout-billing-address.view.tsx?d08e","webpack:///src/modules/carousel/carousel.tsx?bfbb","webpack:///src/modules/account-invoice-tile/account-invoice-tile.view.tsx?4620","webpack:///src/modules/loyalty-terms/loyalty-terms.view.tsx?5155","webpack:///src/modules/fabrikam/views/order-details.view.tsx?2a61","webpack:///src/modules/gift-card-balance-check/gift-card-balance-check.view.tsx?ce1c","webpack:///src/modules/checkout-order-confirmation/checkout-order-confirmation.view.tsx?504a","webpack:///src/modules/checkout-delivery-options/checkout-delivery-options.view.tsx?d64d","webpack:///src/modules/invoices-list/components/invoice-error-component.tsx?2e12","webpack:///src/modules/invoices-list/components/invoices-filter-component.tsx?759c","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-header-component.tsx?6874","webpack:///src/modules/invoices-list/helpers/invoice-status.ts?442a","webpack:///src/modules/invoices-list/helpers/pay-invoices.ts?f98a","webpack:///src/modules/invoices-list/components/pay-invoice-component.tsx?41f4","webpack:///src/modules/invoices-list/components/invoices-table/components/invoices-table-row-component.tsx?ba14","webpack:///src/modules/invoices-list/components/invoices-table/invoices-table-component.tsx?9105","webpack:///src/modules/invoices-list/components/make-payment-component.tsx?c79a","webpack:///src/modules/invoices-list/helpers/invoice-data.ts?6271","webpack:///src/modules/invoices-list/invoices-list.tsx?ba10"],"names":["props","BodyContainerProps","FooterContainerProps","HeaderContainerProps","HeaderProps","ModuleProps","locationsMessage","search","state","spinner","locationsList","noLocationsMessage","terms","isSearchInProgress","SignUpButton","id","className","text","ariaLabel","telemetryContent","disabled","link","onClick","payLoad","attributes","href","SignUpError","type","message","errorClassName","role","GetMaxLength","maxLength","parsedMaxLength","parseInt","isNaN","SignUpInput","value","pattern","isRequired","onChange","InputType","TextArea","name","required","undefined","SignUpLabel","forId","htmlFor","InputID","renderInputSection","inputs","needToReset","onInputChange","showErrors","addressForm","updateAddress","map","element","index","label","maxChars","customClass","baseSignUpItem","wrapper","errorMessage","Address","isAddressInput","input","updateForm","hasError","resetAddress","splice","super","BusinessSignUpDefaultInputs","FirstName","Text","this","resources","firstNameLabel","LastName","lastNameLabel","Email","emailAddressLabel","CompanyName","companyLabel","Department","departmentLabel","JobTitle","jobTitleLabel","Size","companySizeLabel","companyAddressLabel","Comment","commentLabel","moduleClassName","needsToReset","_onInputChange","event","newForm","formItems","forEach","item","target","setState","isReady","_isFormReady","hasSubmitErrors","_onAddressChange","errors","currentAddress","addressItem","find","address","addressHasErrors","showAddressErrors","i","length","currentInput","match","_onSubmit","preventDefault","context","firstName","_getItem","lastName","companyName","companyEmail","companyAddress","jobTitle","department","companySize","comments","newPartner","CompanySize","Comments","callerContext","actionContext","catch","_onCancel","cleanForm","isAddress","request","telemetryPageName","friendlyName","telemetry","config","heading","viewProps","businessSignUp","moduleProps","ContainerWrapper","businessSignUpForm","_renderForm","renderView","slots","signUpButtonArialabel","signUpButtonText","cancelButtonArialabel","cancelButtonText","partialAddressErrorMessage","addressSlot","successPageURL","confirmationLink","linkUrl","destinationUrl","form","FormWrapper","items","buttons","key","disclaimer","buildReviewCard","cardProps","headerProps","rating","date","cardBodyProps","reviewProps","reviewTitle","reviewText","responseProps","responseName","responseDate","responseText","controlsProps","ratingHelpfulLabel","like","dislike","edit","report","createReviewModal","modal","modalHeader","modalBody","inputRow","ratingLabel","titleLabel","titleInput","textLabel","textInput","privacyPolicyUrl","error","modalFooter","submitButton","cancelButton","createReportModal","reported","headerSubmitted","header","reportSubmittedMessage","reportMessage","radioButtons","succesfulButton","averageRating","filterByDropdown","noReviewsMessage","noReviewsWithFilterMessage","pageControls","refineReviewsProps","reportReviewModal","reviewsListProps","reviewCards","reviewCount","reviewModal","sortByDropdown","userReview","isFilterApplied","review","_renderTabItemContent","tabItemType","tabSlots","TabContentContainer","TabHeaderContainer","TabItemContent","tabHeader","TabContent","tabItemContent","TabHeader","AccountAddressTile","description","links","BackTopFooter","editProps","requestContext","onEdit","backtoTopText","destination","title","Link","noclick","linkText","contentAction","etext","attribute","itemProp","content","Separator","separator","_pageType","urlTokens","pageType","_getRootLink","root","_getCustomBreadcrumbLinks","itemPosition","toString","_getCategoryHierarchy","data","categoryHierarchy","result","Name","Url","_getPDPLinks","categoryPaths","product","url","requestUrl","push","hideProductName","_goBack","window","history","back","_getPDPBackButton","query","isBrowser","document","referrer","backToResultsText","rootLink","breadcrumbLinks","backButtonComponent","breaCrumbType","app","breadcrumbType","linkSeparator","breadcrumbViewProps","BreadcrumbContainer","tag","BreadcrumbList","BreadcrumbListItem","backButton","_renderAccordionItemContent","drawer","accordionSlots","AccordionItemContainer","AccordionItemContent","accordionItemContent","_onSelect","async","e","deliveryCode","currentTarget","getAttribute","_rendeDeliveryOptions","bind","_pickupListOptionMenu","expandSiteOptions","pickupListOptionMenuText","pickupmodeList","ref","delivery","Code","tabIndex","Description","expandSiteOptionsState","secondsToTime","seconds","hours","Math","floor","ampm","divisorForMinutes","getShortTimeString","day","days","monday","tuesday","wednesday","thursday","friday","saturday","sunday","getFullTimeString","mondayFull","tuesdayFull","wednesdayFull","thursdayFull","fridayFull","saturdayFull","sundayFull","buildHoursDisplayInfo","startDay","endDay","hoursInfo","startDayShort","startDayFull","endDayShort","endDayFull","timeRange","shouldMergeLines","firstLine","secondLine","isClosed","openTime","closeTime","getStoreHoursData","storeHours","dateForLookup","buildStoreHoursString","closedText","StoreSelectorLocationLineItemComponentActions","deliveryMode","handlers","onSelected","location","onSetAsPreferredStore","OrgUnitNumber","onRemovePreferredStore","renderStoreHours","RegularStoreHours","storeHoursList","mondayHours","tuesdayHours","wednesdayHours","thursdayHours","fridayHours","saturdayHours","sundayHours","periodStart","periodEnd","buildStoreHours","displayTime","storeOpenFrom","OpenFrom","storeOpenTo","OpenTo","matchDeliveryOptions","productdeliveryOptions","storePickUpOptionList","deliveryOption","pickup","_delivery","StoreSelectorLocationLineItemComponent","hideStockStatus","isCurrentLocation","isInStock","stockStatusLabel","storeLocatorView","preferredStoreLocationId","isPreferredStoreEnabled","isLocationDisabled","productPickUpOptionList","storeName","OrgUnitName","distanceAsString","distance","preferredDistanceUnit","buildDistanceString","Distance","storeAddress","phoneNumber","contacts","allPhoneContacts","filter","contact","ContactTypeValue","IsPrivate","primaryPhoneContact","IsPrimary","Locator","extractPhoneNumber","Contacts","resourceLabel","inStock","outOfStock","stockLabel","stockText","canSelectLocation","pickupInStoreButtonText","selectLocation","pickupInStoreAriaLabel","selectLocationAriaLabelFormat","replace","isPreferredStore","PickupInStore","PreferredStore","preferredStoreAttr","RemovePreferredStore","RemovePreferredStoreAttr","deliveryOptionList","contactInfoHeader","storeHoursHeader","availabilityInfoHeader","currentLocation","onLocationSelected","preferredStoreAriaLabel","preferredStoreText","setAsPreferredStoreTextAriaLabel","setAsPreferredStoreText","_scrollIntoView","selectedLocationDiv","selectedLocationRef","current","parent","parentElement","scrollTop","offsetTop","clientHeight","_isCurrentLocation","alreadySelectedLocation","_isProductInStock","ItemAvailabilities","enableOutOfStockCheck","AvailableQuantity","_stockInventoryLabel","availabilityWithHours","ProductInventoryInformation","OrgUnitAvailability","OrgUnitLocation","InventoryLocationId","InventLocationId","StockLevelLabel","_mapResources","contactText","timeText","availabilityText","storeHoursClosedText","outOfStockText","inStockText","selectedStoreLocationText","selectStoreText","selectStoreAriaFormatText","storeHoursMondayText","storeHoursTuesdayText","storeHoursWednesdayText","storeHoursThursdayText","storeHoursFridayText","storeHoursSaturdayText","storeHoursSundayText","storeHoursMondayFullText","storeHoursTuesdayFullText","storeHoursWednesdayFullText","storeHoursThursdayFullText","storeHoursFridayFullText","storeHoursSaturdayFullText","storeHoursSundayFullText","prevProps","selectedStoreLocationId","locations","_stores","_sortStores","show","displayList","store","_renderStoreLocation","orgUnitLocation","deliveryOptions","OrgUnitPickUpDeliveryModes","selected","StoreHours","DeliveryOptions","productPickUpDeliveryOptions","stores","searchBoxRef","_searchTextChanged","inputValue","searchTermChanged","blur","performSearch","SearchStore","storeSearchAttributes","ShowAllStore","showAllStoreAttributes","ToggleMapView","toggleMapViewAttributes","searchButtonAriaLabel","searchPlaceholderText","seeAllStoresText","viewListText","viewMapText","isMapDisabled","showAllStores","locatorView","onShowAllStores","onToggleListMapViewState","toggleButtonText","autoComplete","onSubmit","searchInputAriaLabel","placeholder","color","StoreSelectorEmptyMessage","emptyLocationsText","StoreSelectorWaiting","StoreSelectorTermsOfService","onTextChange","editableLink","openInNewTab","StoreSelectorFoundLocationsMessage","searchRadius","isSeeAllStore","storeCountMessage","milesShortText","storeCountMessageInKm","storeAllCountMessage","handleLinkTextChange","termsOfServiceLink","handleHeadingChange","_attachMapAutoSuggest","autoSuggestOptions","channel","storeSelectorStateManager","isMapApiLoaded","autoSuggestManager","Microsoft","Maps","loadModule","callback","options","countryCode","ChannelCountryRegionISOCode","AutosuggestManager","attachAutosuggest","_onSuggestionSelected","errorCallback","debug","credentials","BingMapsApiKey","_searchTermChanged","formattedSuggestion","_performSearch","_setPreferredStore","storeId","cookies","mode","storeLocations","availabilitiesWithHours","preferedStore","setPreferredStoreLocation","isConsentGiven","Latitude","Longitude","_removePreferredStore","clearPreferredStore","_setSelectedStore","setSelectedStoreLocationId","searchTerm","isSeeAllStoreValue","geoLocate","trim","_updateLocations","latitude","longitude","_getAndUpdateStoreLocation","style","isDialogOpen","navigator","geolocation","getCurrentPosition","position","coords","PERMISSION_DENIED","timeout","_closeDialog","closeDialog","_setOrgUnitStoreInformation","styleDefault","setOrgUnitStoreInformation","showMapViewLink","isDialog","orgUnitStoreInformation","Promise","resolve","radius","lookupRadius","calRadius","distanceUnitValue","searchRadiusUnit","modeDefault","preferredStore","lat","long","lastInlineStoreLocation","lastInlineShownStoreInfo","setLastInlineStoreInfo","orgUnitLocationsInput","orgUnitLocations","RecordId","warning","_onOrgUnitLocationSelected","autoSuggestionEnabled","setTimeout","BingMapsEnabled","loadMapApi","lang","market","DefaultLanguageId","then","isSameContext","nextProps","setAsPreferredStore","appConfig","inlineView","hideInventory","listMapViewState","showLocationView","isMapModuleLoaded","StoreSelectorActions","toggleListMapViewState","configHeading","storeLocatorHeaderText","storeSelectorHeaderText","kilometersShortText","autoFocus","fade","isOpen","onClosed","horizontalPosition","verticalPosition","toggle","outOfStockThreshold","enableStockCheck","StoreId","headerText","callbacks","selectedLocation","getAndUpdateUserLocation","attachMapAutoSuggest","onSuggestionSelected","setPreferredStore","removePreferredStore","setSelectedStore","AccordionContainer","accordionItems","accordionButtons","HeaderSection","HeadingWrapper","accordianButtonsContainer","accordionItemContainer","Tab","tabIndexQuery","_onClick","activeTabState","activeContentIndex","tabId","update","currentTabIndex","newUrl","_setGetParameter","String","pushState","path","_onKeyDown","keyCode","slotLength","tabItems","defaultTabIndex","initialIndex","queryString","activeTab","queryTabIndex","indexOf","arr","split","_getTabHeader","_getTabContent","activeLink","headingComponent","tabViewProps","TabContainer","headerSection","tabsSection","tabItemContainer","tabContents","tabHeaders","dataActionTabId","focus","contentID","onKeyDown","isSelected","itemIndex","paramName","paramValue","URL","params","URLSearchParams","set","decodeURIComponent","BusinessFormItem","BusinessUserForm","modalClassName","modalHeading","modalDescription","button","_renderModal","BusinessUserDetails","selectedUser","userFullName","Object","keys","isModalOpen","headingSection","bodySection","footerSection","toggleModal","wrapClassName","applicationNode","OrganizationUserList","moduleContainer","noUsersText","addUserButton","organizationListTable","formType","formProps","_getForm","FormInput","isDisabled","FormLabel","FormButton","FormFieldError","FormType","BusinessFormDefaultInputs","businessUserFirstNameLabelText","businessUserLastNameLabelText","businessUserEmailAddressLabelText","SpendingLimit","businessUserSpendingLimitLabelText","_handleAddUserButtonClicked","newUser","B2BUserId","Guid","generateGuid","isFormActive","Add","hasFormError","hasActionError","selectedUserData","_handleAddEditFormSaveButton","updatedUser","_createBusinessPartner","Edit","reload","trace","parseFloat","_handleFormCancelButton","None","_handleEditIcon","userData","possibleName","cell","fullName","lastSpaceIndex","lastIndexOf","substring","possibleCell","dataCell","user","_handleDeleteIcon","displayedUserData","Price","cultureFormatter","formatCurrency","Remove","_handleViewDetails","View","_handleRemoveUserButton","deleteUserData","prev","refresh","_formatPrice","price","_getCurrentUrl","reqContext","_getViewport","device","Type","innerWidth","gridSettings","xs","w","sm","md","lg","_toggleModal","mobileExcludedColumns","Status","_viewport","_updateViewport","addEventListener","removeEventListener","users","businessUserAddUserButtonText","businessUserLoadingMessage","businessUserEmptyListMessage","businessUserErrorGettingUsersMessage","hasUsers","AddUser","addUserAttributes","status","errorProps","headingTag","modalState","_createTableProps","_renderUserForm","_renderUserDetails","tableSort","showPagination","paginationItemPerPage","businessUserPaginationNextButtonText","businessUserPaginationPreviousButtonText","businessUserEditButtonText","businessUserDeleteButtonText","businessUserActionButtonText","businessUserPaginationAriaLabel","tableData","_createTableItems","headings","row","isMobile","includes","sortable","rows","editLinkText","deleteLinkText","viewLinkText","enableToModify","actionLinkText","showCheckBoxes","isSortable","minifyActions","excludedColumns","paginationProperty","skipCount","skip","itemPerPage","prevText","nextText","paginationText","actions","onDelete","onView","formatPrice","businessUserActiveStatusText","businessUserPendingStatusText","businessUserRemovedStatusText","usersList","statusString","StatusValue","FullName","businessUserRemoveModalHeaderText","businessUserRemoveModalDescription","businessUserViewModalHeaderText","businessUserCancelButtonText","businessUserCancelRemoveUserButtonText","businessUserRemoveUserButtonText","businessUserErrorUpdatingUsersMessage","formClassName","typeClassName","businessUserEditUserFormHeadingText","businessUserAddUserFormHeadingText","businessUserSaveButtonArialabel","businessUserSaveButtonText","businessUserCancelButtonArialabel","businessUserFieldIncorrectErrorText","businessUserActionErrorText","businessUserAllFieldsRequiredMessage","renderModuleAttributes","promotionOptions","promotions","promotionMessageWrapper","promotionMessage","promotionSeeAllLink","promotionDialog","CartlinesWrapper","cartLines","cartlines","cartEmptyText","emptyCartText","storeSelector","backToShoppingButton","waitingComponent","cartLoadingStatus","cartDataResult","cartLine","cartline","pickUpInStore","ContainerProps","defaultComponent","addToOrderTemplate","remove","addToWishlist","orderSummaryHeading","OrderSummaryWrapper","orderSummaryLines","OrderSummaryItems","promoCode","subtotal","shipping","otherCharge","tax","totalDiscounts","orderTotal","_renderOrderSummarylines","orderSummaryLineitems","errorData","OrderSummaryErrors","Wrapper","checkoutAsSignInUserButton","checkoutAsGuestButton","createTemplateFromCartButton","_renderAddToCart","addToCart","errorBlock","_renderAddToOrderTemplate","_renderAddToWishlist","_renderConfigure","configure","dropdowns","_renderConfigureDropdown","_renderSocialShare","socialShare","dropdown","LabelContainerProps","select","_renderFindInStore","findInStore","productPickupOptionList","_renderQuantity","quantity","_renderKeyInPrice","keyInPrice","_renderShopSimilarItem","shopSimilarItem","MediaGalleryContainerProps","ProductInfoContainerProps","inventoryLabel","shopSimilarLook","mediaGallery","ErrorComponent","CreditComponent","verbagePrefix","verbagePostfix","_mapEditableLinks","linkdata","editableLinks","additionalProperties","_initState","apiGenericErrorMessage","customerResult","allowOnAccountPayment","AllowOnAccountPayment","isB2BCustomer","IsB2B","enableCustomerAccountPayment","isCustomerAccountPaymentEnabled","AccountCustomerBalanceTile","isDetailsLinkDisplayed","account","Balance","CreditLimit","noCreditErrorMessage","accountCreditVerbagePrefix","accountCreditVerbagePostfix","currencyCode","customerBalanceFormatted","toFixed","AccountOrderTemplatesTile","AddCheckoutLoyalty","cardNumber","rewardPoints","loyaltyAmountContainer","appliedLoyaltyAmountContainer","loyaltyAmountLabel","loyaltyAmountInput","loyaltyAmountApplyButton","showAppliedAmount","loyaltyAmountAppliedText","loyaltyAmountAppliedPrice","loyaltyAmountRemoveButton","rewardPoint","checkoutLoyaltyRewardPoint","availablePointsText","activePoints","expiringPointsText","expiringPoints","ShowCheckoutLoyalty","coveredAmountText","amount","checkoutLoyalty","viewState","showLoyalty","addLoyalty","isShowLoyalty","isShowAddLoyalty","TabItemType","TabItem","moduleContentClassName","moduleHeaderClassName","_renderTabHeader","getContentID","activeContentIDResult","shown","tabItemTitle","OrderDetailsOrderInfomation","orderInformationProps","salesId","receiptId","createdDate","count","channelReferenceId","channelName","channelAddress","OrderDetailsSalesLine","salesLineProps","salesLine","buyAgainButton","OrderDetailsGroupDelivery","deliveryProps","trackingInfo","shippedStatusCheck","OrderDetailsGroup","groupProps","salesLinesProps","salesLines","LineId","deliveryType","shipment","salesStatus","showTimeslot","pickupProps","pickupDateTimeslot","OrderDetailsGroups","groupsProps","groups","group","OrderDetailsOrderSummary","orderSummaryProps","totalAmount","earnedPoints","OrderDetailsPayment","paymentMethodsProps","methods","OrderDetailsHelp","helpProps","needHelpLabel","helpLineNumberLabel","contactNumber","alert","loading","orderInfomation","orderSummary","payment","help","successClassName","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","clearInterval","isInitialized","getValue","v1Value","v2Value","templateVersion","emailRegex","isShowLoading","passwordResetVerification","icon","loadingMessage","defaultAADConainer","display","aadConainer","passwordResetVerificationLocalAccount","_renderLocalAccount","obj","ID","toLowerCase","PAT","verifying_blurb","assign","localAccount","verificationControlWrapper","_renderInput","emailAddressLabelText","verificationCodeLabelText","successMessage","verificationCodeSendSuccess","emailAddressVerifiedSuccess","retryError","retryNotAllowedError","throttledError","codeExpiredError","serverError","invalidEmailError","verificationButtonsWrapper","verificationButtons","sendCodeButtonAriaLabel","sendCodeButtonText","verifyCodeButtonAriaLabel","verifyCodeButtonText","resendCodeButtonAriaLabel","resendCodeButtonText","changeEmailButtonAriaLabel","changeEmailButtonText","buttonsWrapper","continueButtonAriaLabel","continueButtonText","cancelButtonAriaLabel","verificationSuccessModal","verificationSuccessModalMessage","labelText","cssClassName","AccountWishlistTile","OrganizationUsersTile","LoyaltyTermsModal","LoyaltyTermsCancel","loyaltyTermCancelAttributes","LoyaltyTermsSubmit","loyaltyTermSubmitAttributes","LoyaltyTermsAgree","loyaltyTermCheckboxAttributes","onToggle","returnFocusRef","returnRef","cancelLoyaltyTermsText","checked","joinLoyaltyTermsText","loyaltyTermsHeading","agreeSection","checkbox","onCheck","agreeText","loyaltyAgreeToTerms","_toggle","_submit","_checkboxChecked","toggleRef","isJoining","qsps","splitQsp","clicked","hideToggle","serviceTerms","loyaltyCard","isAuthenticated","completeClass","LoyaltyTerms","modalToggle","innerRef","joinLoyaltytermsToggleText","CardNumber","apiSettings","card","redirectToLoyalty","fullCard","AccountLoyaltyLabel","AccountLoyaltyModalLabel","labelFor","_populateModalData","focusRef","currentLoyaltyPoints","expiring","RewardPointId","currentModalData","isModalExpiring","modalID","currentFocus","queryResultSettings","points","pointsActivity","exception","_closeModal","_buttonAvailableRef","_buttonExpireRef","BackToShopping","loyaltyCardLabel","totalAvailablePointsLabel","backToShoppingText","backToShopAttributes","loyaltyCardData","RewardPoints","homeLink","AccountLoyalty","totalPoints","_getTotalPoints","_renderRewardPoints","pointsModal","Info","Points","Breakdown","PointsBreakdown","Button","infoLabel","joinDate","_formatJoinDate","_parseDate","LoyaltyEnrollmentDateLocal","pointsLabel","homeButton","joinDateFormatted","Intl","DateTimeFormat","locale","month","year","format","Date","loyaltyPoints","availableId","expiringId","availablePointsLabel","expiringPointsFormatLabel","AvailablePoints","availablePointsAttributes","ExpiringPoints","expiringPointsAttributes","availableModalLabel","ActivePoints","availableModalTrigger","expiringModalLabel","PointsExpiringSoon","expiringModalTrigger","loyaltyActivityDateLabel","loyaltyActivityBalanceLabel","modalHeaderClassName","modalBodyClassName","ModalBodyTop","ModalBodyHeaders","rewardPointsActivity","_renderPointsActivity","pointsDescription","_getPoints","balanceLabel","onClose","total","activity","Activity","activityType","_getTimelineType","activityDate","formatDate","ActivityDate","activityPoints","LoyaltyPoints","dateString","getUTCFullYear","getUTCMonth","getUTCDate","pointActivity","LoyaltyRewardPointTimelineEntryType","earnedPointsLabel","redeemedPointsLabel","adjustedPointsLabel","refundedPointsLabel","ExtensibleLoyaltyRewardPointActivityEntryTypeValue","AccountLoyaltyTile","OrderConfirmationOrderInfomation","receiptEmail","OrderConfirmationSalesLine","OrderConfirmationGroupDelivery","processing","OrderConfirmationGroup","shippingItemsToYou","OrderConfirmationGroups","OrderConfirmationOrderSummary","OrderConfirmationPayment","OrderConfirmationHelp","backToShoppingLink","AddressShow","AddressDetail","AddressAddUpdate","AddressForm","isShowSaveButton","saveButton","isShowCancelButton","AddressItem","AddressError","CheckoutBillingAddress","sameAsShippingCheckbox","showAddress","showAddOrUpdateAddress","isShowSameAsShippingCheckbox","isShowAddress","isShowAddOrUpdateAddress","CarouselModule","_handleDismissCarousel","dismissCarousel","_next","nextIndex","activeIndex","animating","closeNow","_previous","_onExiting","_onExited","_goToIndex","newIndex","get","carouselContainer","closeAnimation","next","previous","onIndicatorsClickHandler","handleDismissCarousel","handleOnExited","handleOnExiting","AccountInvoiceTile","OrderInfomation","SalesLine","GroupDelivery","Group","Groups","OrderSummary","Payment","Help","Form","inputPinLabel","inputExpLabel","inputProps","inputNumProps","inputPinProps","inputExpProps","inputNumber","inputPin","inputExp","applyButton","supportExternalGiftCard","showGiftCardPinInput","showGiftCardExpInput","alertFieldLabel","Item","itemProps","selectedGiftCard","giftCardBalanceCheckProps","DeliveryOptionList","DeliveryOptionsList","list","DeliveryOption","code","radioButton","DeliveryOptionSelected","ErrorMessage","Error","CheckoutDeliveryOptions","deliveryOptionSelected","waiting","editButton","isLoading","isError","isShowList","isShowSelected","isShowEditButton","InvoiceErrorComponent","createComponent","component","messageHeader","otherError","showError","errorMessages","assertive","InvoicesFilterState","getInvoicesFilterStateResources","filterState","ShowAll","invoicesFilterShowAll","Paid","invoiceStatusPaid","PartiallyPaid","invoiceStatusPartiallyPaid","Unpaid","invoiceStatusUnpaid","InvoicesFilterComponent","popoverRef","createRef","popoverState","setPopoverState","useState","togglePopover","setFilterState","currentState","onFilterStateClick","clickedState","onFilterStateChanged","placement","getEnumValues","onStateClick","stateStringRepresentation","renderFilterStateItem","InvoicesTableHeaderComponent","rowClassName","switchCheckedState","onSelectAll","isSelectedAll","headerCells","invoicesText","invoiceDateMobileText","getMobileHeaderCells","invoiceNumberText","invoiceDateText","isAdmin","invoiceUsersText","invoiceAmountText","invoiceDueDateText","invoiceAmountDueText","invoiceStatusText","invoiceActionsText","getDesktopHeaderCells","getInvoiceStatusText","invoiceStatus","invoiceStatusNone","payInvoices","invoices","onError","invoicesToAdd","invoice","canBePaid","hasElements","errorReason","failureReason","cartState","addInvoicesToCart","invoiceIds","errorDetails","LocalizedMessage","cartUrl","PayInvoiceComponentActions","_event","setDisabled","errorState","PayInvoiceComponent","payInvoiceButtonAriaLabel","payInvoiceButtonText","formatAmount","getMobileRowCells","onSelectLine","customerName","dueDate","invoiceViewDetailsButtonAriaLabel","invoiceViewDetailsButtonText","showActions","setShowActions","actionsContainerClassName","payInvoiceClassName","typeName","extraActionsPopup","InvoicesTableRowComponent","rowCells","customer","isCurrentUser","isNullOrWhitespace","AccountNumber","customerAccountNumber","invoiceDate","IsB2bAdmin","invoiceCurrentUser","amountDue","getDesktopRowCells","isMobileView","viewport","getViewport","InvoicesTableComponent","setIsMobile","updateViewport","headerClassName","all","MakePaymentComponentActions","MakePaymentComponent","hasInvoices","makePaymentButtonAriaLabel","makePaymentButtonText","InvoiceModel","Id","InvoiceDate","CustomerAccountNumber","CustomerName","TotalAmount","InvoiceDueDate","AmountBalance","InvoicePaidStatusValue","CurrencyCode","_updateInvoicesState","_onAddToCartFailed","_handleFilterStateChange","invoicesFilterState","invoicesListTitle","_renderInvoicesFilter","_renderListContainer","_renderEmptyInvoiceLinesPageContent","invoicesData","_initializeWithInvoices","containerClass","actionsContainerClass","invoiceEmptyInvoiceLinesTitle","invoiceEmptyInvoiceLinesDescription","invoiceEmptyInvoiceLinesContinueShoppingButtonAriaLabel","invoiceEmptyInvoiceLinesContinueShoppingButtonText","containerHeaderClass","containerContentClass","_renderMakePayment","_renderInvoiceErrors","_renderInvoicesList","searchCriteria","InvoiceTypeValues","InvoicePaidStatusValues","filterClassName","tableClassName","newErrorState","errorHost","invoiceErrorInvoiceIdNotExist","invoiceErrorFailedAddInvoiceToCart","makePaymentResources","selectedInvoices","moduleId","moduleTypeName","navigationUrl","invoiceErrorMessageHeader"],"mappings":"oJA+Ce,UAtC8CA,IACzD,MAAM,mBACFC,EADE,qBAEFC,EAFE,qBAGFC,EAHE,YAIFC,EAJE,YAKFC,EALE,iBAOFC,EAPE,OAQFC,EARE,MASFC,EATE,QAUFC,EAVE,cAWFC,EAXE,mBAYFC,EAZE,MAaFC,GAAUZ,EAEd,OACI,gBAAC,SAAM,iBAAKK,GACR,gBAAC,OAAI,iBAAKF,GACLC,GAEL,gBAAC,OAAI,iBAAKH,GACLK,EACAC,EACAC,EAAMK,mBACHJ,EACA,gCACKC,GAAgCC,IAI7C,gBAAC,OAAI,iBAAKT,GACLU,M,qSCv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,CACjB3+C,GAAIA,EACJo9C,SAAUt5C,KAAK7E,MAAMm+C,SACrBzzC,IAAK3J,EACL6P,KAAM,CAACurC,SAAUoG,GACjB76C,QAAS7C,KAAK7E,MAAM0H,QACpBuB,UAAWpE,KAAK7E,MAAMiJ,UACtBu5C,SAAU39C,KAAK7E,MAAMe,GACrB0hD,eAAgB59C,KAAK7E,MAAMm+C,SAC3BuE,cAAe,qBAAW,OAAQ79C,KAAK7E,MAAM0H,QAAQe,eACrD3D,UAAWw9C,EACXlG,QAASv3C,KAAK47C,qBAKlB,uBACJ,MAAM5+C,EAAoBgD,KAAK7D,UAAR,WACvB,OACI,gBAACw3C,EAAqB,CAClBz3C,GAAIc,EACJs8C,SAAUt5C,KAAK7E,MAAMm+C,SACrBvtC,KAAM,GACN+nC,cAAe9zC,KAAK7E,MAAM8E,UAAU69C,0BACpCj7C,QAAS7C,KAAK7E,MAAM0H,QACpBzD,aAAcY,KAAKrE,MAAM48C,WAAWn5C,aACpC20C,WAAY/zC,KAAKrE,MAAM48C,WAAWxE,WAClCC,UAA+C,qBAApCh0C,KAAKrE,MAAM48C,WAAW+E,aAMlC","file":"static/js/3.5687eddbd1e643ae.chunk.js","sourcesContent":["/*---------------------------------------------------------------------------------------------\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 * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { IStoreSelectorViewProps } from './store-selector';\n\nconst StoreSelectorView: React.FC = props => {\n const {\n BodyContainerProps,\n FooterContainerProps,\n HeaderContainerProps,\n HeaderProps,\n ModuleProps,\n // headerText,\n locationsMessage,\n search,\n state,\n spinner,\n locationsList,\n noLocationsMessage,\n terms } = props;\n\n return (\n \n \n {HeaderProps}\n \n \n {locationsMessage}\n {search}\n {state.isSearchInProgress ?\n spinner :\n <>\n {locationsList ? locationsList : noLocationsMessage}\n \n }\n \n \n {terms}\n \n \n );\n};\n\nexport default StoreSelectorView;\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 { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IBusinessSignUpButtonProps {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n link?: string;\n telemetryContent: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nexport const SignUpButton: React.FC = ({ id, className, text, ariaLabel, telemetryContent, disabled, link, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent, text);\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\n return (\n \n {text}\n \n );\n};\n\nexport default SignUpButton;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. 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\nexport interface IBusinessSignUpErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nexport const SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n\n};\n\nexport default SignUpError;\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 * as React from 'react';\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport { InputType } from '../business-sign-up';\n\nexport interface IBusinessSignUpInputProps {\n id?: string;\n type: InputType;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n isRequired: boolean;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IBusinessSignUpInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nexport const SignUpInput: React.FC = ({ id, type, value, pattern, className, maxLength, isRequired, onChange }) => {\n if (type === InputType.TextArea) {\n return (\n \n );\n }\n\n return (\n \n );\n};\n\nexport default SignUpInput;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\nexport interface IBusinessSignUpLabelProps {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nexport const SignUpLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default SignUpLabel;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport * as React from 'react';\n\nimport { getTelemetryObject, Heading, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { getUrlSync, RichTextComponent } from '@msdyn365-commerce/core';\nimport { Address, BusinessPartnerProspect } from '@msdyn365-commerce/retail-proxy';\nimport { createProspectAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\nimport classnames from 'classnames';\nimport { IBusinessSignUpConfig, IBusinessSignUpProps } from './business-sign-up.props.autogenerated';\nimport { SignUpButton, SignUpError, SignUpInput, SignUpLabel } from './components';\n\nexport interface IBusinessSignUpExtendedProps extends IBusinessSignUpProps {\n formItems?: IFormItem[];\n}\n\nexport interface IBusinessSignUpItem {\n wrapper: INodeProps;\n isAddressInput?: boolean;\n id: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input?: React.ReactNode;\n}\n\nexport interface IBusinessState {\n isReady: boolean;\n formItems: IFormItem[];\n addressHasErrors: boolean;\n showAddressErrors: boolean;\n hasSubmitErrors: boolean;\n}\n\nexport interface IBusinessSignUpLocalAccount {\n FormWrapper: INodeProps;\n items: IBusinessSignUpItem[];\n buttons: React.ReactNode[];\n errorMessage: React.ReactNode[];\n disclaimer: React.ReactNode;\n}\n\nexport interface IBusinessSignUpViewProps {\n className: string;\n businessSignUp: IModuleProps;\n ContainerWrapper: INodeProps;\n heading: React.ReactNode;\n businessSignUpForm: IBusinessSignUpLocalAccount;\n formItems: IFormItem[];\n}\n\nexport interface IFormItem {\n id: string;\n type: InputType;\n label: string;\n value: string;\n maxChars?: string;\n isRequired: boolean;\n pattern?: string;\n address?: Address;\n customClass?: string;\n}\n\nexport enum InputType {\n Text = 'text',\n Address = 'address',\n Email = 'email',\n TextArea = 'textarea'\n}\n\nexport enum InputID {\n FirstName = 'FirstName',\n LastName = 'LastName',\n Email = 'CompanyEmail',\n CompanyName = 'CompanyName',\n Address = 'CompanyAddress',\n JobTitle = 'JobTitle',\n Size = 'CompanySize',\n Department = 'Department',\n Comment = 'Comment'\n}\n\nexport const renderInputSection = (inputs: IFormItem[], className: string, needToReset: boolean, onInputChange: (event: React.ChangeEvent) => void,\n showErrors: boolean, addressForm?: React.ReactNode, updateAddress?: (errors: boolean, currAddress?: Address) => void): IBusinessSignUpItem[] => {\n return inputs.map((element, index) => {\n const { id, type, label, maxChars, isRequired, pattern, customClass, value } = element;\n\n const baseSignUpItem: IBusinessSignUpItem = {\n wrapper: {\n className: classnames(className, `${className}-${id}`, customClass)\n },\n id: id,\n label: ,\n errorMessage: ,\n };\n\n if (type === InputType.Address) {\n if (addressForm) {\n baseSignUpItem.isAddressInput = true;\n baseSignUpItem.input = (\n \n {React.cloneElement(addressForm as React.ReactElement, { updateForm: updateAddress, hasError: showErrors, isRequired: isRequired === undefined ? false : isRequired, resetAddress: needToReset })}\n \n );\n } else {\n // if the address slot is not filled, remove this input from the form\n inputs.splice(index, 1);\n }\n } else {\n baseSignUpItem.input = (\n \n );\n }\n\n return baseSignUpItem;\n });\n};\n\n/**\n *\n * Business Request Form Modules\n * Form that a business can use to submit a request to become a partner with Microsoft.\n * @extends {React.Component>}\n */\nclass BusinessSignUp extends React.Component {\n // used as default data\n public BusinessSignUpDefaultInputs: IFormItem[] = [\n {\n id: InputID.FirstName,\n type: InputType.Text,\n label: this.props.resources.firstNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.LastName,\n type: InputType.Text,\n label: this.props.resources.lastNameLabel,\n value: '',\n isRequired: true,\n customClass: 'width-25'\n },\n {\n id: InputID.Email,\n type: InputType.Email,\n label: this.props.resources.emailAddressLabel,\n value: '',\n isRequired: true,\n pattern: '^[a-zA-Z0-9.!#$%&\\'^_`{}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*$',\n customClass: 'width-50'\n },\n {\n id: InputID.CompanyName,\n type: InputType.Text,\n label: this.props.resources.companyLabel,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.Department,\n type: InputType.Text,\n label: this.props.resources.departmentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.JobTitle,\n type: InputType.Text,\n label: this.props.resources.jobTitleLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Size,\n type: InputType.Text,\n label: this.props.resources.companySizeLabel,\n value: '',\n isRequired: false,\n customClass: 'width-50'\n },\n {\n id: InputID.Address,\n type: InputType.Address,\n label: this.props.resources.companyAddressLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n },\n {\n id: InputID.Comment,\n type: InputType.TextArea,\n label: this.props.resources.commentLabel,\n value: '',\n isRequired: false,\n customClass: 'width-100'\n }\n ];\n\n private moduleClassName: string = 'ms-business-sign-up';\n private needsToReset: boolean = false;\n private telemetryContent: ITelemetryContent;\n\n constructor(props: IBusinessSignUpExtendedProps) {\n super(props);\n\n this.state = {\n isReady: false,\n formItems: this.props.formItems || this.BusinessSignUpDefaultInputs,\n addressHasErrors: false,\n showAddressErrors: false,\n hasSubmitErrors: false\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { formItems } = this.state;\n const { className, heading } = config;\n\n const viewProps = {\n ...this.props,\n businessSignUp: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n ContainerWrapper: {\n className: `${this.moduleClassName}__container`\n },\n heading: ,\n businessSignUpForm: this._renderForm(),\n formItems: formItems\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _renderForm(): IBusinessSignUpLocalAccount {\n const { config, resources, slots } = this.props;\n const { showAddressErrors, hasSubmitErrors, isReady, formItems } = this.state;\n const { signUpButtonArialabel, signUpButtonText, cancelButtonArialabel, cancelButtonText, errorMessage, partialAddressErrorMessage } = resources;\n const addressForm = slots && slots.addressSlot && slots.addressSlot.length > 0 && slots.addressSlot[0] || undefined;\n const successPageURL = config.confirmationLink && config.confirmationLink.linkUrl && config.confirmationLink.linkUrl.destinationUrl || getUrlSync('home', this.props.context.actionContext);\n\n const form = {\n FormWrapper: {\n className: `${this.moduleClassName}__form `\n },\n items: renderInputSection(formItems, `${this.moduleClassName}__form-item`, this.needsToReset, this._onInputChange, showAddressErrors, addressForm, this._onAddressChange),\n buttons: [\n // tslint:disable-next-line:max-line-length\n ,\n \n ],\n errorMessage: [\n hasSubmitErrors && ,\n showAddressErrors && \n ],\n disclaimer: config.disclaimer && ,\n };\n\n if (this.needsToReset) {\n this.needsToReset = false;\n }\n\n return form;\n }\n\n private _onInputChange = (event: React.ChangeEvent): void => {\n const newForm = this.state.formItems;\n newForm.forEach(item => {\n if (item.id === event.target.id) {\n item.value = event.target.value;\n }\n });\n\n // check if form is ready, update state object with latest values, values have changed so reset hasSubmitErrros\n this.setState({\n isReady: this._isFormReady(),\n formItems: newForm,\n hasSubmitErrors: false\n });\n }\n\n private _onAddressChange = (errors: boolean, currentAddress?: Address): void => {\n // find address item\n const newForm = this.state.formItems;\n const addressItem = newForm.find((item) => {\n return item.type === InputType.Address;\n });\n\n // if found --> set to currentAddress\n if (addressItem) {\n addressItem.address = currentAddress;\n\n // update state with new values and set errors to false if address is not required field\n this.setState({\n isReady: this._isFormReady(),\n formItems: newForm,\n addressHasErrors: errors,\n showAddressErrors: false\n });\n }\n }\n\n private _isFormReady = (): boolean => {\n const { formItems } = this.state;\n\n for (let i = 0; i < formItems.length; i++) {\n // will return FALSE if:\n // - input field is required\n // IF is address AND addressHasErrors === true\n // ELSE value is undefined OR empty\n // OR\n // - pattern provided and value does not match pattern\n const currentInput = formItems[i];\n\n if (currentInput.isRequired) {\n if (currentInput.type === InputType.Address) {\n if (this.state.addressHasErrors) {\n return false;\n }\n } else {\n if (currentInput.value === undefined || currentInput.value === '') {\n return false;\n }\n }\n }\n if (currentInput.pattern !== undefined && currentInput.value.match(formItems[i].pattern as string) === null) {\n return false;\n }\n }\n\n return true;\n }\n\n private _onSubmit = (event: React.MouseEvent) => {\n if (this.state.addressHasErrors) {\n this.setState({\n showAddressErrors: true\n });\n\n event.preventDefault();\n return;\n }\n\n const { context } = this.props;\n\n // check for matching id and if not empty\n const firstName = this._getItem(InputID.FirstName);\n const lastName = this._getItem(InputID.LastName);\n const companyName = this._getItem(InputID.CompanyName);\n const companyEmail = this._getItem(InputID.Email);\n const companyAddress = this._getItem(InputID.Address, true);\n const jobTitle = this._getItem(InputID.JobTitle);\n const department = this._getItem(InputID.Department);\n const companySize = this._getItem(InputID.Size);\n const comments = this._getItem(InputID.Comment);\n\n // API gets email as part of the address object, but I do not use the email input from the address component, thus we need to copy it over\n if (companyEmail && companyEmail.value && companyAddress && companyAddress.address) {\n companyAddress.address.Email = companyEmail.value;\n }\n\n const newPartner: BusinessPartnerProspect = {\n FirstName: firstName && firstName.value,\n LastName: lastName && lastName.value,\n CompanyName: companyName && companyName.value,\n Address: companyAddress && companyAddress.address && companyAddress.address,\n JobTitle: jobTitle && jobTitle.value,\n Department: department && department.value,\n CompanySize: companySize && parseInt(companySize.value, 10) || 0,\n Comments: comments && comments.value,\n };\n\n // create business partner request\n createProspectAsync({ callerContext: context.actionContext }, newPartner)\n .catch(() => {\n this.setState({\n hasSubmitErrors: true,\n isReady: false\n });\n });\n }\n\n private _onCancel = () => {\n // reset values of the form\n const cleanForm = this.state.formItems;\n cleanForm.forEach(input => {input.value = '';});\n\n // set reset flag so address input will get reset on next renderInputSection() call\n this.needsToReset = true;\n\n this.setState({\n isReady: false,\n formItems: cleanForm,\n addressHasErrors: true,\n showAddressErrors: false,\n hasSubmitErrors: false\n });\n }\n\n private _getItem = (id: string, isAddress: boolean = false) => {\n if (isAddress) {\n return this.state.formItems.find((item) => { return item.id === id && item.address;});\n }\n return this.state.formItems.find((item) => { return item.id === id && item.value !== '';});\n }\n}\n\nexport default BusinessSignUp;\n","import { IReviewModalViewProps } from '@msdyn365-commerce-modules/ratings-reviews';\nimport { IReportReviewModalViewProps, IReviewCardViewProps, IReviewsListState, IReviewsListViewProps } from '@msdyn365-commerce-modules/ratings-reviews/src/modules/reviews-list';\nimport { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n reviewCount,\n reviewModal,\n sortByDropdown,\n state,\n userReview\n } = props;\n\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\n return {noReviewsMessage};\n }\n\n return (\n \n {averageRating}\n {reviewCount}\n { reviewCards.length === 0 ?\n null : \n {sortByDropdown}\n {filterByDropdown}\n \n }\n \n {userReview && buildReviewCard(userReview)}\n {reviewCards.map(review => {\n return buildReviewCard(review);\n })}\n \n { reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(reviewModal, moduleProps)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nconst buildReviewCard = (props: IReviewCardViewProps) => {\n return (\n \n \n {props.rating}\n {props.name}\n {props.date}\n \n \n \n {props.reviewTitle}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {props.ratingHelpfulLabel}\n {props.like}\n {props.dislike}\n {props.edit}\n {props.report}\n \n \n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\n return (\n \n \n {state.reported ? props.headerSubmitted : props.header}\n \n \n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\n \n \n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\n \n \n );\n};\n\nexport default ReviewsListview;","/*---------------------------------------------------------------------------------------------\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ITabItemViewProps, TabItemType } from './tab-item';\n\nconst TabItemView: React.FC = props => {\n const { tabItemType, tabSlots, TabContentContainer, TabHeaderContainer, TabItemContent, tabHeader } = props;\n\n switch (tabItemType) {\n case TabItemType.TabContent:\n return (\n \n \n {tabSlots && tabSlots.tabItemContent && tabSlots.tabItemContent.length && (_renderTabItemContent(tabSlots.tabItemContent))}\n \n \n );\n case TabItemType.TabHeader:\n return (\n \n {tabHeader}\n \n );\n default:\n return null;\n }\n};\n\nconst _renderTabItemContent = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {items && items.length ? (\n items.map((item: React.ReactNode, index: number) => {\n return (\n \n {item}\n \n );\n })\n ) : null}\n \n );\n};\nexport default TabItemView;","/*---------------------------------------------------------------------------------------------\n * 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 { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccountAddressTileViewProps } from './account-address-tile';\n\nconst AccountAddressTileView: React.FC = props => {\n const { AccountAddressTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountAddressTileView;\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 *--------------------------------------------------------------------------------------------*/\n\nimport { BackToTop, getTelemetryObject, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\nimport { IBackTopFooterProps } from './back-top-footer.props.autogenerated';\n\n/**\n *\n * BackTopFooter component\n * @extends {React.PureComponent>}\n */\nclass BackTopFooter extends React.PureComponent> {\n private editProps: Msdyn365.ITextEditProps = {\n requestContext: this.props.context.request,\n onEdit: (event: Msdyn365.ContentEditableEvent) => this.props.config.backtoTopText = event.target.value\n };\n private telemetryContent?: ITelemetryContent;\n constructor(props: IBackTopFooterProps<{}>) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element | null {\n if (!this.props.config.destination) {\n this.props.telemetry.error('BackToTop.destination has not been provided, module wont render.');\n return null;\n }\n\n return (\n \n );\n }\n}\n\nexport default BackTopFooter;\n","import { 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\n const payLoad = getPayloadObject('click', telemetryContent, '', '');\n\n const linkText = text !== undefined ? text : '';\n payLoad.contentAction.etext = linkText;\n // Construct telemetry attribute to render\n const attribute = getTelemetryAttributes(telemetryContent, payLoad);\n\n return (\n \n \n {linkText}\n \n \n \n );\n};","import * as React from 'react';\ninterface ISeparator {\n separator: string;\n}\n\nexport const Separator: React.FC = ({ separator }) => ( {separator} );","/*---------------------------------------------------------------------------------------------\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 *--------------------------------------------------------------------------------------------*/\n\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, NodeTag } from '@msdyn365-commerce-modules/utilities';\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 classnames from 'classnames';\nimport * as React from 'react';\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 _pageType: string | undefined = this.props.context.request.urlTokens.pageType;\n private telemetryContent: ITelemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n public render(): JSX.Element | null {\n\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\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 private _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 _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 return (\n links.map((value: ILinksData, index: number) => {\n itemPosition++;\n return (\n \n );\n }));\n }\n\n private _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 (\n categoryHierarchy.map((value: CategoryHierarchy, index: number) => {\n itemPosition++;\n return (\n \n );\n }));\n\n }\n\n private _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\n private _goBack = (): void => {\n window.history.back();\n }\n\n private _getPDPBackButton = (): JSX.Element | null => {\n const isBackAllowed = 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}\n\nexport default Breadcrumb;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccordionItemViewProps } from './accordion-item';\n\nconst AccordionItemView: React.FC = props => {\n const { drawer, accordionSlots, AccordionItemContainer, AccordionItemContent } = props;\n return (\n \n \n \n {accordionSlots && accordionSlots.accordionItemContent && accordionSlots.accordionItemContent.length && (_renderAccordionItemContent(accordionSlots.accordionItemContent))}\n \n \n \n );\n };\n\nconst _renderAccordionItemContent = (items: React.ReactNode[]): JSX.Element | null => {\n return (\n <>\n {items && items.length ? (\n items.map((item: React.ReactNode, index: number) => {\n return (\n \n {item}\n \n );\n })\n ) : null}\n \n );\n};\nexport default AccordionItemView;","/*---------------------------------------------------------------------------------------------\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 *--------------------------------------------------------------------------------------------*/\n\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport interface IPickUpOptionListProps {\n pickupListOptionMenuText: string;\n pickupmodeList?: DeliveryOption[];\n onChange(deliveryCode: string): Promise;\n}\n\nexport interface IPickOptionListState {\n expandSiteOptions: boolean;\n}\n\n/**\n * Simple Pickup option dropdown with Button to get menu option\n */\nexport class PickUpOptionList extends React.PureComponent {\n private _pickupListOptionMenu: React.RefObject;\n\n constructor(props: IPickUpOptionListProps) {\n super(props);\n this._rendeDeliveryOptions = this._rendeDeliveryOptions.bind(this);\n this._pickupListOptionMenu = React.createRef();\n this.state= {\n expandSiteOptions:false\n };\n }\n\n public render(): JSX.Element {\n const {\n pickupListOptionMenuText,\n pickupmodeList\n } = this.props;\n\n return (\n
\n \n {this.state.expandSiteOptions? : null}\n
\n );\n }\n\n private _rendeDeliveryOptions():void {\n const expandSiteOptionsState = this.state.expandSiteOptions;\n this.setState({\n expandSiteOptions: !expandSiteOptionsState\n });\n }\n\n private _onSelect = async (e: React.MouseEvent): Promise => {\n e.preventDefault();\n const deliveryCode = e.currentTarget.getAttribute('data-value');\n if(deliveryCode && deliveryCode.length > 0) {\n await this.props.onChange(deliveryCode);\n }\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 *--------------------------------------------------------------------------------------------*/\n\nimport { RegularStoreHours } from '@msdyn365-commerce/retail-proxy';\nimport get from 'lodash/get';\nimport { IStoreSelectorLocationLineItemResources } from '.';\n\nexport interface IHoursDisplayInfo {\n startDayShort: string;\n startDayFull: string;\n endDayShort?: string;\n endDayFull?: string;\n timeRange: string;\n}\n\ninterface IHoursInfo {\n isClosed: boolean;\n openTime?: number;\n closeTime?: number;\n}\n\ntype DayType = 'MON' | 'TUE' | 'WED' | 'THU' | 'FRI' | 'SAT' | 'SUN';\n\nexport const secondsToTime = (seconds: number | undefined): string | undefined => {\n if (seconds === undefined) {\n return undefined;\n } else {\n let hours = Math.floor(seconds / (60 * 60));\n const ampm = hours >= 12 ? 'pm' : 'am';\n hours = hours % 12;\n hours = hours ? hours : 12;\n const divisorForMinutes = seconds % (60 * 60);\n const minutes =\n Math.floor(divisorForMinutes / 60) < 10 ? `0${Math.floor(divisorForMinutes / 60)}` : Math.floor(divisorForMinutes / 60);\n return `${hours}:${minutes} ${ampm}`;\n }\n};\n\nconst getShortTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.monday;\n case 'TUE':\n return resources.days.tuesday;\n case 'WED':\n return resources.days.wednesday;\n case 'THU':\n return resources.days.thursday;\n case 'FRI':\n return resources.days.friday;\n case 'SAT':\n return resources.days.saturday;\n default: // case 'SUN':\n return resources.days.sunday;\n }\n};\n\nconst getFullTimeString = (day: DayType, resources: IStoreSelectorLocationLineItemResources): string => {\n switch (day) {\n case 'MON':\n return resources.days.mondayFull;\n case 'TUE':\n return resources.days.tuesdayFull;\n case 'WED':\n return resources.days.wednesdayFull;\n case 'THU':\n return resources.days.thursdayFull;\n case 'FRI':\n return resources.days.fridayFull;\n case 'SAT':\n return resources.days.saturdayFull;\n default: // case 'SUN':\n return resources.days.sundayFull;\n }\n};\n\nconst buildHoursDisplayInfo = (startDay: DayType, endDay: DayType, hoursInfo: string, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo => {\n return {\n startDayShort: getShortTimeString(startDay, resources),\n startDayFull: getFullTimeString(startDay, resources),\n endDayShort: startDay !== endDay ? getShortTimeString(endDay, resources) : undefined,\n endDayFull: startDay !== endDay ? getFullTimeString(endDay, resources) : undefined,\n timeRange: hoursInfo\n };\n};\n\nconst shouldMergeLines = (firstLine: IHoursInfo, secondLine: IHoursInfo): boolean => {\n if (firstLine.isClosed && secondLine.isClosed) {\n return true;\n }\n\n if (!firstLine.isClosed && !secondLine.isClosed) {\n return firstLine.openTime === secondLine.openTime && firstLine.closeTime === secondLine.closeTime;\n }\n\n return false;\n};\n\nconst getStoreHoursData = (storeHours: RegularStoreHours, dateForLookup: string): IHoursInfo => {\n return {\n isClosed: get(storeHours, `IsClosedOn${dateForLookup}`, false),\n openTime: get(storeHours, `${dateForLookup}OpenTime`, undefined),\n closeTime: get(storeHours, `${dateForLookup}CloseTime`, undefined)\n };\n};\n\nconst buildStoreHoursString = (hoursInfo: IHoursInfo, resources: IStoreSelectorLocationLineItemResources): string => {\n if (hoursInfo.isClosed) {\n return resources.closedText;\n } else {\n const openFrom: string | undefined = secondsToTime(hoursInfo.openTime);\n const openTo: string | undefined = secondsToTime(hoursInfo.closeTime);\n\n return `${openFrom}–${openTo}`;\n }\n};\n\nexport const buildStoreHours = (storeHours: RegularStoreHours, resources: IStoreSelectorLocationLineItemResources): IHoursDisplayInfo[] => {\n const storeHoursList: IHoursDisplayInfo[] = [];\n\n const mondayHours = getStoreHoursData(storeHours, 'Monday');\n const tuesdayHours = getStoreHoursData(storeHours, 'Tuesday');\n const wednesdayHours = getStoreHoursData(storeHours, 'Wednesday');\n const thursdayHours = getStoreHoursData(storeHours, 'Thursday');\n const fridayHours = getStoreHoursData(storeHours, 'Friday');\n const saturdayHours = getStoreHoursData(storeHours, 'Saturday');\n const sundayHours = getStoreHoursData(storeHours, 'Sunday');\n\n let periodStart: DayType = 'MON';\n let periodEnd: DayType = 'MON';\n\n if (!shouldMergeLines(mondayHours, tuesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(mondayHours, resources), resources));\n\n periodStart = 'TUE';\n }\n periodEnd = 'TUE';\n\n if (!shouldMergeLines(tuesdayHours, wednesdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(tuesdayHours, resources), resources));\n\n periodStart = 'WED';\n }\n periodEnd = 'WED';\n\n if (!shouldMergeLines(wednesdayHours, thursdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(wednesdayHours, resources), resources));\n\n periodStart = 'THU';\n }\n periodEnd = 'THU';\n\n if (!shouldMergeLines(thursdayHours, fridayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(thursdayHours, resources), resources));\n\n periodStart = 'FRI';\n }\n periodEnd = 'FRI';\n\n if (!shouldMergeLines(fridayHours, saturdayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(fridayHours, resources), resources));\n\n periodStart = 'SAT';\n }\n periodEnd = 'SAT';\n\n if (!shouldMergeLines(saturdayHours, sundayHours)) {\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(saturdayHours, resources), resources));\n\n periodStart = 'SUN';\n }\n periodEnd = 'SUN';\n\n storeHoursList.push(buildHoursDisplayInfo(periodStart, periodEnd, buildStoreHoursString(sundayHours, resources), resources));\n\n return storeHoursList;\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 *--------------------------------------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport {\n DeliveryOption,\n OrgUnitContact,\n OrgUnitLocation,\n StoreHours\n} from '@msdyn365-commerce/retail-proxy';\nimport {PickUpOptionList} from '../pickup-option-list';\nimport { buildStoreHours, IHoursDisplayInfo, secondsToTime } from './date-time-helpers';\n\nexport interface IStoreSelectorLocationLineItemResources {\n contactInfoHeader: string;\n storeHoursHeader: string;\n availabilityInfoHeader: string;\n\n closedText: string;\n\n outOfStock: string;\n inStock: string;\n\n currentLocation: string;\n selectLocation: string;\n selectLocationAriaLabelFormat: string;\n setAsPreferredStoreText: string;\n setAsPreferredStoreTextAriaLabel: string;\n preferredStoreText: string;\n preferredStoreAriaLabel: string;\n\n days: {\n monday: string;\n tuesday: string;\n wednesday: string;\n thursday: string;\n friday: string;\n saturday: string;\n sunday: string;\n mondayFull: string;\n tuesdayFull: string;\n wednesdayFull: string;\n thursdayFull: string;\n fridayFull: string;\n saturdayFull: string;\n sundayFull: string;\n };\n}\n\nexport interface IStoreSelectorLocationLineItemProps {\n location: OrgUnitLocation;\n storeHours?: StoreHours;\n\n hideStockStatus?: boolean;\n isInStock?: boolean;\n isCurrentLocation?: boolean;\n\n resources: IStoreSelectorLocationLineItemResources;\n stockStatusLabel?: string;\n storeLocatorView?: boolean;\n isPreferredStoreEnabled?: boolean;\n index: string;\n preferredStoreLocationId: string | null;\n storePickUpOptionList?: DeliveryOption[];\n productPickUpOptionList?: DeliveryOption[];\n /** The telemetry content */\n telemetryContent?: ITelemetryContent;\n preferredDistanceUnit: string;\n isLocationDisabled?: boolean;\n handlers: {\n onSelected(location: OrgUnitLocation, deliveryMode?: string): void;\n onSetAsPreferredStore(locationId: string | undefined): void;\n onRemovePreferredStore(): void;\n };\n}\n\nconst StoreSelectorLocationLineItemComponentActions = {\n onLocationSelected(props: IStoreSelectorLocationLineItemProps, deliveryMode?: string): void {\n props.handlers.onSelected(props.location, deliveryMode);\n },\n onSetAsPreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onSetAsPreferredStore(props.location.OrgUnitNumber);\n },\n onRemovePreferredStore(props: IStoreSelectorLocationLineItemProps): void {\n props.handlers.onRemovePreferredStore();\n }\n};\n\nconst renderStoreHours = (storeHours: StoreHours | undefined, location: OrgUnitLocation, resources: IStoreSelectorLocationLineItemResources): JSX.Element | null => {\n // First, use the store hours. This will allow listing day by day houts\n if (storeHours && storeHours.RegularStoreHours) {\n const storeHoursList: IHoursDisplayInfo[] = buildStoreHours(storeHours.RegularStoreHours, resources);\n\n return (\n
\n {storeHoursList.map(displayTime => (\n
\n {displayTime.endDayShort ? (\n
\n {displayTime.startDayShort}–\n {displayTime.endDayShort}\n
\n ) : (\n
\n {displayTime.startDayShort}\n
\n )}\n
{displayTime.timeRange}
\n
\n ))}\n
\n );\n } else {\n // If that fails, fall back to using the OpenFrom and OpenTo properties on the location\n const storeOpenFrom: string | undefined = secondsToTime(location.OpenFrom);\n const storeOpenTo: string | undefined = secondsToTime(location.OpenTo);\n\n return (\n
\n {storeOpenFrom}-{storeOpenTo}\n
\n );\n }\n};\n\nconst buildDistanceString = (distance: number | undefined, preferredDistanceUnit: string, isLocationDisabled?: boolean): string | undefined => {\n if (distance === undefined || isLocationDisabled) {\n return undefined;\n } else if (distance < 1) {\n return `(<1 ${preferredDistanceUnit})`;\n } else {\n return `(${Math.floor(distance)} ${preferredDistanceUnit})`;\n }\n};\n\nconst extractPhoneNumber = (contacts: OrgUnitContact[] | undefined): string | undefined => {\n if (!contacts) {\n return undefined;\n }\n\n const allPhoneContacts = contacts.filter(contact => contact.ContactTypeValue === 1 && !contact.IsPrivate);\n\n if (allPhoneContacts && allPhoneContacts.length > 0) {\n const primaryPhoneContact = allPhoneContacts.find(contact => contact.IsPrimary);\n\n if (primaryPhoneContact) {\n return primaryPhoneContact.Locator;\n }\n\n return allPhoneContacts[0].Locator;\n }\n\n return undefined;\n};\n\n// tslint:disable-next-line: max-func-body-length\nconst StoreSelectorLocationLineItem: React.FC = (props: IStoreSelectorLocationLineItemProps) => {\n const onClick = () => StoreSelectorLocationLineItemComponentActions.onLocationSelected(props);\n\n const onChange = async (deliveryCode: string): Promise => {\n StoreSelectorLocationLineItemComponentActions.onLocationSelected(props, deliveryCode);\n };\n\n const {\n hideStockStatus,\n isCurrentLocation,\n isInStock,\n location,\n resources,\n storeHours,\n stockStatusLabel,\n storeLocatorView,\n index,\n preferredStoreLocationId,\n isPreferredStoreEnabled,\n isLocationDisabled,\n telemetryContent,\n storePickUpOptionList,\n productPickUpOptionList\n } = props;\n\n const storeName: string | undefined = location.OrgUnitName;\n const distanceAsString: string | undefined = buildDistanceString(location.Distance, props.preferredDistanceUnit, isLocationDisabled);\n const storeAddress: string | undefined = location.Address;\n const phoneNumber: string | undefined = extractPhoneNumber(location.Contacts);\n\n const resourceLabel = isInStock ? resources.inStock : resources.outOfStock;\n const stockLabel = stockStatusLabel ? stockStatusLabel : undefined;\n const stockText: string | undefined = (hideStockStatus) ? undefined : (stockLabel ? stockLabel : resourceLabel);\n const canSelectLocation = hideStockStatus || isInStock;\n const pickupInStoreButtonText: string = resources.selectLocation;\n const pickupInStoreAriaLabel: string = resources.selectLocationAriaLabelFormat.replace('{StoreName}', storeName || '');\n const isPreferredStore = preferredStoreLocationId === location.OrgUnitNumber;\n const payLoad: IPayLoad = getPayloadObject('click', telemetryContent!, TelemetryConstant.PickupInStore);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.PreferredStore;\n const preferredStoreAttr = getTelemetryAttributes(telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.RemovePreferredStore;\n const RemovePreferredStoreAttr = getTelemetryAttributes(telemetryContent!, payLoad);\n const deliveryOptionList = matchDeliveryOptions(productPickUpOptionList, storePickUpOptionList);\n\n const setAsPreferredStore = () => StoreSelectorLocationLineItemComponentActions.onSetAsPreferredStore(props);\n const removePreferredStore = () => StoreSelectorLocationLineItemComponentActions.onRemovePreferredStore(props);\n\n return (\n
\n
\n {storeLocatorView && {index}}\n {storeName}\n {distanceAsString ? {distanceAsString} : false}\n
\n
\n
\n

{resources.contactInfoHeader}

\n {storeAddress && (\n
\n \n {storeAddress}\n
\n )}\n {phoneNumber && (\n
\n \n {phoneNumber}\n
\n )}\n
\n
\n

{resources.storeHoursHeader}

\n {renderStoreHours(storeHours, location, resources)}\n
\n {\n !storeLocatorView &&\n
\n

{resources.availabilityInfoHeader}

\n {stockText &&

{stockText}

}\n {isCurrentLocation ?\n (\n

{resources.currentLocation}

\n ) : canSelectLocation ?\n deliveryOptionList.length === 0 ? (\n \n {pickupInStoreButtonText}\n \n ): \n : (\n false\n )\n }\n
\n }\n {\n isPreferredStoreEnabled ?\n isPreferredStore ?\n \n : \n : null\n }\n
\n
\n );\n};\n\nconst matchDeliveryOptions = (productdeliveryOptions: DeliveryOption[] | undefined,storePickUpOptionList: DeliveryOption[] | undefined): DeliveryOption[] => {\n const deliveryOption: DeliveryOption[] = [];\n productdeliveryOptions?.map(delivery => {\n const pickup =(storePickUpOptionList?.find(_delivery => _delivery.Code === delivery.Code));\n if(pickup) {\n deliveryOption.push(pickup);\n }\n });\n\n return deliveryOption;\n };\n\nexport const StoreSelectorLocationLineItemComponent = StoreSelectorLocationLineItem as (props: IStoreSelectorLocationLineItemProps) => JSX.Element;","/*---------------------------------------------------------------------------------------------\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 { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { DeliveryOption, ItemAvailability, OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { IStoreSelectorResources } from '../store-selector.props.autogenerated';\nimport { IStoreSelectorLocationLineItemResources, StoreSelectorLocationLineItemComponent } from './store-selector-location-line-item';\n\nexport interface IStoreSelectorLocationLinesProps {\n locations?: IFullOrgUnitAvailability[];\n resources: IStoreSelectorResources;\n preferredDistanceUnit?: string;\n\n alreadySelectedLocation?: OrgUnitLocation;\n outOfStockThreshold: number;\n enableOutOfStockCheck: boolean;\n storeLocatorView?: boolean;\n selectedStoreLocationId?: string;\n isPreferredStoreEnabled?: boolean;\n displayList?: boolean;\n isLocationDisabled?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n onClick: ((locationId: string | undefined) => void);\n preferredStoreLocationId: string | null;\n onSetAsPreferredStore: ((locationId: string | undefined) => void);\n onRemovePreferredStore: (() => void);\n /** The telemetry content */\n telemetryContent?: ITelemetryContent;\n onLocationSelected(location: OrgUnitLocation | undefined): void;\n}\n\n/**\n * Displays all the location line items, or null if none exists\n */\n@observer\nexport class StoreSelectorLocationLines extends React.PureComponent {\n private selectedLocationRef: React.RefObject;\n\n @observable private _stores: IFullOrgUnitAvailability[] | undefined;\n\n constructor(props: IStoreSelectorLocationLinesProps) {\n super(props);\n this.selectedLocationRef = React.createRef();\n }\n\n public componentDidUpdate(prevProps: IStoreSelectorLocationLinesProps): void {\n if (this.props.selectedStoreLocationId !== prevProps.selectedStoreLocationId) {\n this._scrollIntoView();\n }\n }\n\n public componentDidMount(): void {\n if (this.props.locations) {\n this._stores = this._sortStores(this.props.locations);\n }\n }\n\n public render(): JSX.Element | null {\n if (!this._stores || this._stores.length === 0) {\n return null;\n }\n\n return (\n
\n {\n this._stores.map((store, index) => {\n return this._renderStoreLocation(store, index);\n })\n }\n
\n );\n }\n\n private _renderStoreLocation(store: IFullOrgUnitAvailability, index: number): JSX.Element | undefined {\n const orgUnitLocation = store?.OrgUnitAvailability?.OrgUnitLocation;\n const selectedStoreLocationId = this.props.selectedStoreLocationId;\n const deliveryOptions = store?.OrgUnitPickUpDeliveryModes;\n return orgUnitLocation && (\n this.props.onClick(orgUnitLocation.OrgUnitNumber)}\n ref={selectedStoreLocationId === orgUnitLocation.OrgUnitNumber ? this.selectedLocationRef : undefined}\n >\n \n \n );\n }\n\n private _sortStores(stores: IFullOrgUnitAvailability[]): IFullOrgUnitAvailability[] {\n const isPreferredStore = (value: IFullOrgUnitAvailability) => this.props.isPreferredStoreEnabled && this.props.preferredStoreLocationId &&\n value?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === this.props.preferredStoreLocationId;\n\n return [\n ...stores.filter(isPreferredStore),\n ...stores.filter(store => !isPreferredStore(store))\n ];\n }\n\n private _scrollIntoView = () => {\n const selectedLocationDiv = this.selectedLocationRef.current;\n const parent = selectedLocationDiv?.parentElement;\n if (selectedLocationDiv && parent) {\n if (parent.scrollTop > selectedLocationDiv.offsetTop) {\n parent.scrollTop = selectedLocationDiv.offsetTop;\n } else if (selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight > parent.scrollTop + parent.clientHeight) {\n parent.scrollTop = selectedLocationDiv.offsetTop + selectedLocationDiv.clientHeight - parent.clientHeight;\n }\n }\n }\n\n private _isCurrentLocation = (location: OrgUnitLocation | undefined): boolean =>\n (this.props.alreadySelectedLocation && location && this.props.alreadySelectedLocation.OrgUnitNumber === location.OrgUnitNumber) || false;\n\n private _isProductInStock = (ItemAvailabilities: ItemAvailability[] | undefined): boolean => {\n if (!this.props.enableOutOfStockCheck) {\n return true;\n }\n\n if (ItemAvailabilities && ItemAvailabilities.length > 0) {\n return ItemAvailabilities[0].AvailableQuantity ? ItemAvailabilities[0].AvailableQuantity > 0 : false;\n }\n\n return false;\n };\n\n private _stockInventoryLabel = (availabilityWithHours: IFullOrgUnitAvailability | undefined): string | undefined => {\n if (availabilityWithHours?.ProductInventoryInformation\n && availabilityWithHours?.ProductInventoryInformation.length > 0) {\n for(let i=0; i {\n return {\n contactInfoHeader: resources.contactText,\n storeHoursHeader: resources.timeText,\n availabilityInfoHeader: resources.availabilityText,\n\n closedText: resources.storeHoursClosedText,\n outOfStock: resources.outOfStockText,\n inStock: resources.inStockText,\n\n currentLocation: resources.selectedStoreLocationText,\n selectLocation: resources.selectStoreText,\n selectLocationAriaLabelFormat: resources.selectStoreAriaFormatText,\n setAsPreferredStoreText: resources.setAsPreferredStoreText,\n setAsPreferredStoreTextAriaLabel: resources.setAsPreferredStoreTextAriaLabel,\n preferredStoreText: resources.preferredStoreText,\n preferredStoreAriaLabel: resources.preferredStoreAriaLabel,\n\n days: {\n monday: resources.storeHoursMondayText,\n tuesday: resources.storeHoursTuesdayText,\n wednesday: resources.storeHoursWednesdayText,\n thursday: resources.storeHoursThursdayText,\n friday: resources.storeHoursFridayText,\n saturday: resources.storeHoursSaturdayText,\n sunday: resources.storeHoursSundayText,\n mondayFull: resources.storeHoursMondayFullText,\n tuesdayFull: resources.storeHoursTuesdayFullText,\n wednesdayFull: resources.storeHoursWednesdayFullText,\n thursdayFull: resources.storeHoursThursdayFullText,\n fridayFull: resources.storeHoursFridayFullText,\n saturdayFull: resources.storeHoursSaturdayFullText,\n sundayFull: resources.storeHoursSundayFullText\n }\n };\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 *--------------------------------------------------------------------------------------------*/\n\nimport { getPayloadObject, getTelemetryAttributes, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { DeliveryOption } from '@msdyn365-commerce/retail-proxy';\nimport * as React from 'react';\n\nexport interface IStoreSelectorSearchFormProps {\n resources: {\n searchInputAriaLabel: string;\n searchButtonAriaLabel: string;\n searchPlaceholderText: string;\n seeAllStoresText: string;\n viewListText: string;\n viewMapText: string;\n };\n\n id: string;\n value: string;\n isMapDisabled?: boolean;\n showAllStores?: boolean;\n displayList?: boolean;\n locatorView?: boolean;\n productPickUpDeliveryOptions?: DeliveryOption[];\n /** The telemetry content */\n telemetryContent?: ITelemetryContent;\n onShowAllStores(): void;\n onToggleListMapViewState(): void;\n performSearch(searchTerm: string): Promise;\n searchTermChanged(searchTerm: string): Promise;\n}\n\n/**\n * Simple search form consisting of search text and a search button\n */\nexport class StoreSelectorSearchForm extends React.PureComponent {\n private searchBoxRef: React.RefObject = React.createRef();\n private storeSearchAttributes: Msdyn365.IDictionary | undefined;\n private showAllStoreAttributes: Msdyn365.IDictionary | undefined;\n private toggleMapViewAttributes: Msdyn365.IDictionary | undefined;\n\n constructor(props: IStoreSelectorSearchFormProps) {\n super(props);\n this.state = { value: '' };\n const payLoad: IPayLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.SearchStore);\n this.storeSearchAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ShowAllStore;\n this.showAllStoreAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.ToggleMapView;\n this.toggleMapViewAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n }\n\n public render(): JSX.Element {\n const {\n resources: { searchButtonAriaLabel, searchPlaceholderText, seeAllStoresText, viewListText, viewMapText },\n id,\n value,\n isMapDisabled,\n showAllStores,\n displayList,\n locatorView,\n onShowAllStores,\n onToggleListMapViewState,\n } = this.props;\n\n const toggleButtonText = displayList ? viewMapText : viewListText;\n\n return (\n
\n \n
\n );\n }\n\n private _searchTextChanged = async (e: React.ChangeEvent): Promise => {\n const inputValue: string = e.target.value;\n\n await this.props.searchTermChanged(inputValue);\n };\n\n private _onSubmit = async (e: React.SyntheticEvent): Promise => {\n e.preventDefault(); // Prevents form submission\n this.searchBoxRef.current?.blur();\n await this.props.performSearch(this.props.value);\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 *--------------------------------------------------------------------------------------------*/\n\nimport { IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { IStoreSelectorResources, ITermsOfServiceLinkData } from '../store-selector.props.autogenerated';\n\nexport interface IStoreSelectorEmptyMessageProps {\n resources: IStoreSelectorResources;\n}\nexport const StoreSelectorEmptyMessage: React.FC = ({ resources }) => (\n
\n

{resources.emptyLocationsText}

\n
\n);\n\nexport const StoreSelectorWaiting: React.FC = () => (\n
\n);\n\nexport interface IStoreSelectorTermsOfServiceProps {\n link?: ITermsOfServiceLinkData;\n requestContext: Msdyn365.IRequestContext;\n onTextChange?(event: Msdyn365.ContentEditableEvent): void;\n}\n\nexport const StoreSelectorTermsOfService: React.FC = ({ link, requestContext, onTextChange }) => {\n if(link) {\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-store-select__terms-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'button'\n };\n\n return(\n
\n \n
\n );\n\n }\n return null;\n};\n\nexport interface IStoreSelectorFoundLocationsMessage {\n resources: IStoreSelectorResources;\n locations?: IFullOrgUnitAvailability[];\n searchRadius: number;\n preferredDistanceUnit: string;\n isSeeAllStore: boolean;\n}\nexport const StoreSelectorFoundLocationsMessage: React.FC = ({ locations, searchRadius, resources, isSeeAllStore, preferredDistanceUnit }) => {\n if (locations) {\n const storeCountMessage = preferredDistanceUnit === resources.milesShortText ? resources.storeCountMessage : resources.storeCountMessageInKm;\n return (\n
\n { isSeeAllStore ? resources.storeAllCountMessage\n .replace('{count}', locations.length.toString()) : storeCountMessage\n .replace('{count}', locations.length.toString())\n .replace('{radius}', searchRadius.toString())\n }\n
\n );\n }\n\n return null;\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 *--------------------------------------------------------------------------------------------*/\n\n// tslint:disable:no-reference\n/// \n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { reaction, when } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { IStoreSelectorData } from './store-selector.data';\nimport { IStoreSelectorProps, mode as modeEnum, searchRadiusUnit, style as styleEnum } from './store-selector.props.autogenerated';\n\nimport {\n StoreSelectorEmptyMessage,\n StoreSelectorFoundLocationsMessage,\n StoreSelectorLocationLines,\n StoreSelectorSearchForm,\n StoreSelectorTermsOfService,\n StoreSelectorWaiting\n} from './components';\n\nimport { getFullAvailableInventoryNearby, GetFullAvailableInventoryNearbyInput, getOrgUnitLocationsByArea, GetOrgUnitLocationsByAreaInput, IFullOrgUnitAvailability } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { IStoreInfo } from '@msdyn365-commerce-modules/bopis-utilities';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody, ModalFooter, ModalHeader, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport { OrgUnitLocation } from '@msdyn365-commerce/retail-proxy';\nimport classname from 'classnames';\nexport interface IStoreSelectorState {\n isSearchInProgress: boolean;\n searchTerm?: string;\n isSeeAllStoreValue: boolean;\n isLocationDisabled?: boolean;\n}\n\nexport interface IStoreSelectorViewProps extends IStoreSelectorProps {\n state: IStoreSelectorState;\n\n // Containers:\n ModuleProps: IModuleProps;\n BodyContainerProps: INodeProps;\n FooterContainerProps: INodeProps;\n HeaderContainerProps: INodeProps;\n HeaderProps?: React.ReactNode;\n\n // Components\n locationsMessage?: React.ReactNode;\n search?: React.ReactNode;\n spinner?: React.ReactNode;\n locationsList?: React.ReactNode;\n noLocationsMessage?: React.ReactNode;\n terms?: React.ReactNode;\n headerText?: React.ReactNode;\n\n callbacks: {\n closeDialog(): Promise;\n searchTermChanged(searchTerm: string): Promise;\n performSearch(searchTerm: string): Promise;\n selectedLocation(location: OrgUnitLocation | undefined): Promise;\n getAndUpdateUserLocation(): Promise;\n attachMapAutoSuggest(): Promise;\n onSuggestionSelected(result: Microsoft.Maps.ISuggestionResult): Promise;\n setPreferredStore(storeId: string | undefined): Promise;\n removePreferredStore(): Promise;\n setSelectedStore(storeId: string | undefined): Promise;\n setOrgUnitStoreInformation(location: OrgUnitLocation | undefined): Promise;\n };\n}\n\n/**\n *\n * Pick Up In Store module\n * @extends React.Component>}\n */\n@observer\nclass StoreSelector extends React.Component, IStoreSelectorState> {\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n private telemetryContent: ITelemetryContent;\n\n constructor(props: IStoreSelectorProps) {\n super(props);\n this.state = { isSearchInProgress: true, searchTerm: '',isSeeAllStoreValue:false};\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n // tslint:disable-next-line: max-func-body-length\n public componentDidMount(): void {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: {\n channel\n }\n }\n },\n config: {\n autoSuggestionEnabled\n }\n } = this.props;\n\n // Adding Timeout to make sure it loads the data based upon the preferred store.\n setTimeout(() => {\n this._getAndUpdateStoreLocation();\n }, 0);\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result && this.props.data.storeSelectorStateManager.result.isDialogOpen,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (context?.id === this.props.id) {\n this._getAndUpdateStoreLocation();\n }\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result && this.props.data.storeSelectorStateManager.result.context && this.props.data.storeSelectorStateManager.result.context.id,\n async () => {\n const context = this.props.data.storeSelectorStateManager.result?.context;\n if (!context || (context?.id === this.props.id)) {\n await this._searchTermChanged('');\n this._getAndUpdateStoreLocation();\n }\n }\n );\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?.loadMapApi) {\n this.props.data.storeSelectorStateManager.result?.loadMapApi({\n key: channel?.BingMapsApiKey,\n lang: this.props.context?.actionContext?.requestContext?.channel?.ChannelCountryRegionISOCode,\n market: this.props.context?.actionContext?.requestContext?.channel?.DefaultLanguageId\n }).then().catch();\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?.channel?.ChannelCountryRegionISOCode,\n market: this.props.context?.actionContext?.requestContext?.channel?.DefaultLanguageId\n });\n }\n );\n\n if (autoSuggestionEnabled) {\n when(\n () => {\n const isMapApiLoaded = !!this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n const isDialogOpen = !!this.props.data.storeSelectorStateManager.result?.isDialogOpen;\n const isSameContext = this.props.data.storeSelectorStateManager.result?.context?.id === this.props.id;\n return isMapApiLoaded && isDialogOpen && isSameContext;\n },\n async () => {\n setTimeout(async () => {\n await this._attachMapAutoSuggest();\n }, 0);\n }\n );\n }\n }\n\n public shouldComponentUpdate(nextProps: IStoreSelectorProps): boolean {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n }\n } = this.props;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n if (context && context.id === this.props.id) {\n return true;\n }\n return false;\n }\n\n // tslint:disable-next-line:max-func-body-length cyclomatic-complexity\n public render(): JSX.Element {\n const {\n config: {\n termsOfServiceLink,\n className,\n heading,\n mode,\n style,\n setAsPreferredStore,\n showAllStores,\n lookupRadius\n },\n context: {\n telemetry,\n app: {\n config: appConfig\n },\n actionContext: {\n requestContext: {\n channel,\n cookies\n }\n }\n },\n resources,\n data: {\n availabilitiesWithHours: { result: availabilitiesWithHours },\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: { result: storeLocations }\n }\n } = this.props;\n\n const isMapDisabled = (channel && channel.BingMapsApiKey && channel.BingMapsEnabled) ? false : true;\n const context = storeSelectorStateManager ? storeSelectorStateManager.context : undefined;\n const isDialogOpen: boolean = storeSelectorStateManager ? storeSelectorStateManager.isDialogOpen && (context?.id === this.props.id) : false;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const inlineView = styleDefault === styleEnum.inline;\n const locatorView = modeDefault === modeEnum.findStores;\n const hideInventory = locatorView;\n const selectedStoreLocationId = storeSelectorStateManager?.selectedStoreLocationId;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n const displayList = storeSelectorStateManager?.listMapViewState?.displayList;\n const isPreferredStoreEnabled = setAsPreferredStore && cookies?.isConsentGiven();\n const showLocationView = (context && (context.showMapViewLink === undefined || context.showMapViewLink)) && locatorView && storeSelectorStateManager?.isMapModuleLoaded;\n\n const StoreSelectorActions = {\n toggleListMapViewState(): void {\n storeSelectorStateManager?.toggleListMapViewState();\n }\n };\n\n if (!(channel && channel.BingMapsApiKey)) {\n telemetry.error('BingMapsApiKey is missing.');\n }\n\n const configHeading = heading ? heading : locatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText;\n const preferredDistanceUnit = this.props.config.searchRadiusUnit === searchRadiusUnit.kilometers ? resources.kilometersShortText : resources.milesShortText ;\n\n const viewProps = {\n ...(this.props as IStoreSelectorProps),\n state: this.state,\n\n ModuleProps: {\n tag: inlineView ? 'div' as NodeTag : Modal,\n moduleProps: this.props,\n className: classname(`ms-store-${inlineView ? 'locate' : 'select'}`, className, inlineView ? '': 'msc-modal-input-required'),\n autoFocus: true,\n fade: true,\n isOpen: isDialogOpen,\n onClosed: this._closeDialog,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n toggle: this._closeDialog\n },\n HeaderContainerProps: {\n tag: inlineView ? 'div' as NodeTag : ModalHeader,\n className: `ms-store-select__${inlineView ? 'header' : 'modal-header'}`,\n toggle: this._closeDialog\n },\n HeaderProps: configHeading && (\n \n ),\n FooterContainerProps: {\n tag: inlineView ? 'div' as NodeTag : ModalFooter,\n className: `ms-store-select__${inlineView ? 'footer' : 'modal-footer'} ${!displayList ? 'map-only-view' : ''}`\n },\n BodyContainerProps: {\n tag: inlineView ? 'div' as NodeTag : ModalBody,\n className: `ms-store-select__${inlineView ? 'body' : 'modal-body'}`\n },\n locationsMessage: !this.state.isLocationDisabled && (\n \n ),\n search: (\n this._getAndUpdateStoreLocation(true)}\n onToggleListMapViewState={StoreSelectorActions.toggleListMapViewState}\n displayList={displayList}\n locatorView={showLocationView}\n productPickUpDeliveryOptions={storeSelectorStateManager?.context?.deliveryOptions?.DeliveryOptions}\n telemetryContent={this.telemetryContent}\n />\n ),\n spinner: ,\n locationsList: ((availabilitiesWithHours && availabilitiesWithHours.length) || (storeLocations && storeLocations.length)) && (\n \n ),\n noLocationsMessage: ,\n terms: ,\n // Not being used in current context, we can use it here to pass more props.\n headerText: {heading ? heading : locatorView ? resources.storeLocatorHeaderText : resources.storeSelectorHeaderText},\n\n callbacks: {\n searchTermChanged: this._searchTermChanged,\n performSearch: this._performSearch,\n closeDialog: this._closeDialog,\n selectedLocation: this._onOrgUnitLocationSelected,\n getAndUpdateUserLocation: () => { this._getAndUpdateStoreLocation(); return Promise.resolve(); },\n attachMapAutoSuggest: this._attachMapAutoSuggest,\n onSuggestionSelected: this._onOrgUnitLocationSelected,\n setPreferredStore: this._setPreferredStore,\n removePreferredStore: this._removePreferredStore,\n setSelectedStore: this._setSelectedStore,\n setOrgUnitStoreInformation: this._setOrgUnitStoreInformation\n }\n } as IStoreSelectorViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleLinkTextChange = (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.termsOfServiceLink) {\n this.props.config.termsOfServiceLink.linkText = event.target.value;\n }\n };\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading = event.target.value;\n\n private _attachMapAutoSuggest = async (): Promise => {\n const {\n config: {\n autoSuggestOptions\n },\n context: {\n telemetry,\n actionContext: {\n requestContext: {\n channel\n }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded && !this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n callback: () => {\n const options = { ...autoSuggestOptions, countryCode: channel?.ChannelCountryRegionISOCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(`#ms-store-select__search-box_${this.props.id}`, `#ms-store-select__search-box-container_${this.props.id}`, this._onSuggestionSelected);\n },\n errorCallback: () => {\n if (telemetry) {\n telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: channel?.BingMapsApiKey\n });\n }\n }\n\n private _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n const context = this.props.data.storeSelectorStateManager && this.props.data.storeSelectorStateManager.result &&\n this.props.data.storeSelectorStateManager.result?.context;\n if (context && (context?.id === this.props.id)) {\n await this._searchTermChanged(result.formattedSuggestion);\n await this._performSearch(result.formattedSuggestion);\n }\n }\n\n private _setPreferredStore = async (storeId: string | undefined): Promise => {\n if (!storeId) {\n return;\n }\n\n const {\n context: {\n actionContext: {\n requestContext: {\n cookies\n }\n }\n },\n config: {\n mode,\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager },\n storeLocations: {result: storeLocations},\n availabilitiesWithHours: { result: availabilitiesWithHours }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) { return; }\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n\n let stores: IFullOrgUnitAvailability[];\n if (modeDefault === modeEnum.findStores && storeLocations) {\n stores = storeLocations;\n } else {\n stores = availabilitiesWithHours!;\n }\n\n const preferedStore = stores.find(store => store.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitNumber === storeId);\n\n await storeSelectorStateManager.setPreferredStoreLocation(storeId, preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.OrgUnitName, cookies?.isConsentGiven(),\n preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.Latitude, preferedStore?.OrgUnitAvailability?.OrgUnitLocation?.Longitude);\n }\n\n private _removePreferredStore = async (): Promise => {\n const {\n context: {\n actionContext: {\n requestContext: {\n cookies\n }\n }\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) { return; }\n\n await storeSelectorStateManager.clearPreferredStore(cookies?.isConsentGiven());\n }\n\n private _setSelectedStore = async (storeId: string | undefined): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!storeSelectorStateManager) { return; }\n\n await storeSelectorStateManager.setSelectedStoreLocationId(storeId);\n }\n\n private _performSearch = async (searchTerm: string): Promise => {\n const {\n context: {\n actionContext\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (!searchTerm || !storeSelectorStateManager) {\n return;\n }\n\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n const location = await storeSelectorStateManager.geoLocate(searchTerm.trim() !== '' ? searchTerm : '0', actionContext);\n\n if (location) {\n await this._updateLocations(location.latitude, location.longitude);\n } else {\n await this._updateLocations();\n }\n\n this.setState({ isSearchInProgress: false });\n }\n\n private _searchTermChanged = async (searchTerm: string): Promise => {\n this.setState({ searchTerm: searchTerm });\n }\n\n private _getAndUpdateStoreLocation = (showAllStores?: boolean): void => {\n const {\n config: {\n style\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n\n if (styleDefault !== styleEnum.inline && (!storeSelectorStateManager || !storeSelectorStateManager.isDialogOpen)) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n this.setState({ isSearchInProgress: true, isSeeAllStoreValue: false });\n\n if (navigator && navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n async position => {\n if (showAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(position.coords.latitude, position.coords.longitude, 0);\n } else {\n await this._updateLocations(position.coords.latitude, position.coords.longitude);\n }\n\n this.setState({ isSearchInProgress: false });\n },\n async error => {\n // If the location setting is turned off\n if (error.PERMISSION_DENIED) {\n this.setState({ isLocationDisabled: true });\n if (showAllStores) {\n this.setState({ isSeeAllStoreValue: true });\n await this._searchTermChanged('');\n await this._updateLocations(void 0, void 0, 0);\n } else {\n await this._updateLocations();\n }\n }\n\n this.setState({ isSearchInProgress: false });\n },\n { timeout: 2000 }\n );\n } else {\n this.setState({ isSearchInProgress: false });\n }\n }\n\n private _closeDialog = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n this.setState({ searchTerm: '' });\n\n if (storeSelectorStateManager) {\n return storeSelectorStateManager.closeDialog();\n }\n }\n\n private _setOrgUnitStoreInformation = async (orgUnitStoreInformation: IFullOrgUnitAvailability[]): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n },\n config: {\n style\n },\n telemetry\n } = this.props;\n\n if (!storeSelectorStateManager) { return; }\n\n const context = storeSelectorStateManager.context;\n const id: string = context && context.id ? context.id : this.props.id;\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n await storeSelectorStateManager.setOrgUnitStoreInformation({\n id,\n showMapViewLink: context && context.showMapViewLink,\n isDialog: styleDefault === styleEnum.dialog,\n orgUnitStoreInformation,\n onLocationSelected: orgUnitLocation => {\n // TO-DO handle event for when location in selected\n return Promise.resolve();\n }\n })\n .catch((error: Error) => {\n if (telemetry) {\n telemetry.error(error.message);\n telemetry.debug('Unable to Update store location state');\n }\n return;\n });\n return;\n }\n\n // tslint:disable-next-line: cyclomatic-complexity\n private _updateLocations = async (latitude?: number, longitude?: number, radius?: number): Promise => {\n const {\n telemetry,\n config: {\n mode,\n lookupRadius,\n style\n },\n context: {\n actionContext\n },\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n const styleDefault = style !== undefined ? style : styleEnum.dialog;\n const calRadius = (radius || radius === 0) ? radius : (lookupRadius || 50);\n const distanceUnitValue = this.props.config.searchRadiusUnit === searchRadiusUnit.kilometers ? 1 : 0;\n const modeDefault = mode !== undefined ? mode : modeEnum.pickupInStore;\n const preferredStore: IStoreInfo | undefined = storeSelectorStateManager?.preferredStore;\n let lat = this.state.searchTerm || !(preferredStore?.Latitude) ? latitude : preferredStore.Latitude;\n let long = this.state.searchTerm || !(preferredStore?.Longitude) ? longitude : preferredStore.Longitude;\n if (styleDefault === styleEnum.inline) {\n const lastInlineStoreLocation = storeSelectorStateManager?.lastInlineShownStoreInfo;\n if (lastInlineStoreLocation && !this.state.searchTerm) {\n lat = lastInlineStoreLocation.Latitude ? lastInlineStoreLocation.Latitude : lat;\n long = lastInlineStoreLocation.Longitude ? lastInlineStoreLocation.Longitude : long;\n }\n await storeSelectorStateManager?.setLastInlineStoreInfo(lat, long);\n }\n\n if (modeDefault === modeEnum.findStores) {\n const orgUnitLocationsInput = new GetOrgUnitLocationsByAreaInput(\n lat,\n long,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n const orgUnitLocations = await getOrgUnitLocationsByArea(orgUnitLocationsInput, actionContext);\n if (orgUnitLocations) {\n await this._setOrgUnitStoreInformation(orgUnitLocations);\n await this._setSelectedStore(undefined);\n }\n return;\n }\n\n if (!storeSelectorStateManager || !storeSelectorStateManager.context) {\n // Store selector dialog isn't open yet, so don't try and update anything\n return;\n }\n\n if (!storeSelectorStateManager.context.product) {\n // TODO: Use alternative search method here to not make inventory check\n return;\n }\n\n const input = new GetFullAvailableInventoryNearbyInput(\n storeSelectorStateManager.context.product.RecordId,\n lat || 0,\n long || 0,\n calRadius,\n distanceUnitValue,\n this.state.isLocationDisabled\n );\n\n await getFullAvailableInventoryNearby(input, actionContext).catch((error) => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug(`Unable to get full available inventory near by`);\n });\n }\n\n private _onOrgUnitLocationSelected = async (location: OrgUnitLocation | undefined, deliveryMode?: string): Promise => {\n const {\n telemetry,\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager) {\n if (location && storeSelectorStateManager.context) {\n // Want to eat exceptions here so that the dialog still closes even if the onLocationSelected call goes wrong\n await storeSelectorStateManager.context.onLocationSelected(location, deliveryMode).catch(error => {\n telemetry.warning(error);\n telemetry.error(error.message);\n telemetry.debug(`Unable to get on org unit location selected`);\n });\n }\n\n await storeSelectorStateManager.closeDialog();\n }\n };\n}\n\nexport default StoreSelector;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccordionViewProps } from './accordion';\n\nconst accordionView: React.FC = props => {\n const { heading, AccordionContainer, accordionItems} = props;\n if(!props.heading && !props.accordionButtons && !props.accordionItems) {\n props.context.telemetry.error('Accordion content is empty, module wont render');\n return null;\n }\n return (\n \n \n \n {heading}\n \n {props.accordionButtons && (\n {props.accordionButtons}\n )}\n \n \n {accordionItems}\n \n \n );\n};\n\nexport default accordionView;","/*---------------------------------------------------------------------------------------------\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 { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport * as MsDyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { createTabStateInput } from '../../data-actions/tab-state-data-action';\nimport { getContentID, TabItemType } from '../tab-item/tab-item';\nimport { ITabData } from './tab.data';\nimport { ITabProps } from './tab.props.autogenerated';\n\n/**\n *\n * Tab component\n * @extends {React.PureComponent>}\n */\n\nexport interface ICallToActionProps {\n link: INodeProps[];\n}\n\nexport interface ITabViewProps extends ITabProps<{}> {\n heading?: React.ReactNode;\n TabContainer: IModuleProps;\n headerSection: INodeProps;\n tabHeaderSection: INodeProps;\n tabsSection: INodeProps;\n tabItemContainer: INodeProps;\n tabHeaders: React.ReactNode;\n tabContents: React.ReactNode;\n}\n\nexport interface ITabViewStates {\n currentTabIndex: number;\n}\n/**\n *\n * Tab component\n * @extends {React.Component>}\n */\n@observer\nclass Tab extends React.Component, ITabViewStates> {\n public readonly tabIndexQuery: string = 'activeTab';\n private activeLink: HTMLLIElement | null;\n\n constructor(props: ITabProps) {\n super(props);\n const { defaultTabIndex } = this.props.config;\n const { slots } = this.props;\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n let initialIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n const queryString: string = this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.activeTab || '';\n let queryTabIndex: number = 0;\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n queryTabIndex = parseInt(arr[1], 10);\n }\n }\n initialIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : initialIndex;\n this.state = { currentTabIndex: initialIndex };\n\n this._getTabHeader = this._getTabHeader.bind(this);\n this._getTabContent = this._getTabContent.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._setGetParameter = this._setGetParameter.bind(this);\n this.activeLink = null;\n }\n public render(): JSX.Element {\n const { slots } = this.props;\n const { heading, className } = this.props.config;\n\n const headingComponent = heading && (\n \n );\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n // const queryTabIndex = this.props.context && this.props.context.request && this.props.context.request.query && +this.props.context.request.query.activeTabIndex || 0;\n // let activeIndex = defaultTabIndex && defaultTabIndex <= slotLength && defaultTabIndex > 0 ? defaultTabIndex - 1 : 0;\n // activeIndex = queryTabIndex > 0 && queryTabIndex <= slotLength ? queryTabIndex - 1 : activeIndex;\n\n const tabViewProps = {\n ...this.props,\n TabContainer: {\n moduleProps: this.props,\n className: classnames('ms-tab', className)\n },\n headerSection: { className: 'ms-tab-header-section' },\n tabsSection: { className: 'ms-tab-tabs-section', tag: 'ul' as NodeTag, role: 'tablist' },\n heading: headingComponent,\n config: this.props && this.props.config,\n tabItemContainer: {\n tag: 'div' as NodeTag,\n className: 'ms-tab-content-section',\n },\n tabContents: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabContent(item, index)),\n tabHeaders: slotLength > 0 && slots.tabItems.map((item: React.ReactNode, index: number) => this._getTabHeader(item, index)),\n };\n return this.props.renderView(tabViewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: MsDyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n public componentDidUpdate(): void {\n const { data } = this.props;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n if (dataActionTabId) {\n if (this.props.id === dataActionTabId) {\n this.activeLink && this.activeLink.focus();\n }\n } else {\n const queryString: string = this.props.context && this.props.context.request && this.props.context.request.query && this.props.context.request.query.activeTab || '';\n if (queryString.indexOf(':') > 0) {\n const arr = queryString.split(':');\n const moduleId = arr[0];\n if (moduleId === this.props.id) {\n this.activeLink && this.activeLink.focus();\n }\n }\n }\n }\n\n private _getTabHeader(item: React.ReactNode, index: number): React.ReactNode {\n const { data } = this.props;\n const activeContentIndex = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.activeContentIndex;\n const dataActionTabId = data && data.activeTabState && data.activeTabState.result && data.activeTabState.result.tabId;\n const selected = activeContentIndex !== undefined && dataActionTabId === this.props.id ? activeContentIndex === index : this.state.currentTabIndex === index;\n const contentID = getContentID(index, this.props.id);\n\n return (\n { if (index === this.state.currentTabIndex) { this.activeLink = link; } }}\n aria-controls={contentID}\n aria-selected={selected}\n role='tab'\n >\n \n {React.cloneElement(item as React.ReactElement, { tabItemType: TabItemType.TabHeader, isSelected: index === this.state.currentTabIndex, itemIndex: index, tabId: this.props.id })}\n \n \n );\n }\n\n private _onClick = (index: number, id: string) => (e: React.MouseEvent) => {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n\n private _onKeyDown = (index: number, id: string) => (e: React.KeyboardEvent) => {\n debugger;\n if (e.keyCode === 13) {\n const activeTabState = { activeContentIndex: index, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index });\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 1)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n\n if (e.keyCode === 39 || e.keyCode === 37) {\n const { slots } = this.props;\n const slotLength = slots && slots.tabItems && slots.tabItems.length || 0;\n\n if (e.keyCode === 39) {\n\n // If we're at the end, go to the start\n if (index + 1 === slotLength) {\n index = -1;\n }\n const activeTabState = { activeContentIndex: index + 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index + 1 });\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index + 2)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n\n // Move left\n } else if (e.keyCode === 37) {\n // If we're at the start, move to the end\n if (index === 0) {\n index = slotLength;\n }\n const activeTabState = { activeContentIndex: index - 1, tabId: id };\n this.props.context.actionContext.update(createTabStateInput(activeTabState), activeTabState);\n this.setState({ currentTabIndex: index - 1 });\n // Update query paramter\n const requestContext = this.props.context.request;\n const newUrl = this._setGetParameter(requestContext, this.tabIndexQuery, `${this.props.id}:${String(index)}`);\n requestContext && window.history.pushState({ path: newUrl }, '', newUrl);\n }\n }\n }\n\n private _getTabContent(item: React.ReactNode, index: number): React.ReactNode {\n return (\n \n {React.cloneElement(item as React.ReactElement, { tabItemType: TabItemType.TabContent, isSelected: index === this.state.currentTabIndex, itemIndex: index, tabId: this.props.id })}\n \n );\n }\n\n private _setGetParameter(requestContext: MsDyn365.IRequestContext, paramName: string, paramValue: string): string {\n let url;\n\n if (MsDyn365.msdyn365Commerce.isBrowser) {\n url = new URL(window.location.href);\n } else {\n url = new URL(requestContext.url.requestUrl.href);\n }\n\n const params = new window.URLSearchParams(url.search);\n params.set(paramName, paramValue);\n url.search = decodeURIComponent(params.toString());\n return url.toString();\n }\n}\n\nexport default Tab;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\nimport * as React from 'react';\n\nimport { Modal, ModalBody, ModalFooter, ModalHeader, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { IBusinessOrganizationListViewProps, IFormViewProps, InputID } from './business-organization-list';\nimport { IBusinessFormItem} from './components/small-components';\n\nconst BusinessFormItem: React.FC = ({\n wrapper,\n label,\n errorMessage,\n input\n}) => {\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst BusinessUserForm: React.FC = (props: IFormViewProps) => {\n const { modalClassName, FormWrapper, modalHeading, modalDescription, inputs, buttons, errorMessage, toggle } = props;\n\n const modalBody = (\n <>\n {modalDescription}\n \n {inputs && inputs.map((item: IBusinessFormItem) => {\n return (\n \n );\n })}\n {errorMessage && errorMessage.map((error: React.ReactNode, index: number) => {\n return (\n \n {error}\n \n );\n })}\n \n \n\n );\n\n const modalFooter = buttons && buttons.map((button: React.ReactNode, index: number) => {\n return (\n \n {button}\n \n );\n });\n\n return _renderModal(modalClassName, true, modalHeading, modalBody, modalFooter, toggle);\n};\n\nconst BusinessUserDetails: React.FC = (props: IFormViewProps) => {\n const { modalClassName, FormWrapper, modalHeading, modalDescription, selectedUser, buttons, errorMessage, resources, toggle } = props;\n let modalBody = null;\n\n if (!selectedUser) {\n modalBody = errorMessage;\n } else {\n const { FirstName, LastName } = selectedUser;\n const userFullName = `${FirstName} ${LastName}`;\n\n modalBody = (\n <>\n { modalDescription }\n
    \n
  • {userFullName}
  • \n { Object.keys(selectedUser).map((data)=> {\n if (data === InputID.FirstName || data === InputID.LastName) {\n return null;\n } else {\n const label = resources[`table${data}HeadingText`] || data;\n return
  • {label}: {selectedUser[data]}
  • ;\n }\n })}\n
\n \n );\n }\n\n const modalFooter = buttons && buttons.map((button: React.ReactNode, index: number) => {\n return (\n \n {button}\n \n );\n });\n\n return _renderModal(modalClassName, true, modalHeading, modalBody, modalFooter, toggle);\n};\n\nconst _getForm = (type: string, formProps: IFormViewProps, toggleModal?: () => void) => {\n switch(type) {\n case 'ADD':\n case 'EDIT':\n return ;\n case 'VIEW':\n case 'REMOVE':\n return ;\n default:\n return null;\n }\n};\n\nconst _renderModal = (className: string, isModalOpen: boolean, headingSection: React.ReactNode, bodySection: React.ReactNode, footerSection: React.ReactNode, toggleModal?: () => void) => {\n return (\n \n \n {headingSection}\n \n \n {bodySection}\n \n \n {footerSection}\n \n \n );\n};\n\nconst BusinessOrganizationList: React.FC = props => {\n const { OrganizationUserList, moduleContainer, heading, noUsersText, addUserButton, organizationListTable, form, formType, toggleModal } = props;\n\n if (noUsersText) {\n return (\n \n \n {heading}\n {addUserButton}\n {noUsersText}\n \n \n );\n }\n\n return (\n \n \n {heading}\n {addUserButton}\n {organizationListTable}\n \n { form && _getForm(formType, form, toggleModal) }\n \n );\n};\n\nexport default BusinessOrganizationList;","import * as React from 'react';\n\nimport { Button, getPayloadObject, getTelemetryAttributes, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { InputType } from '../business-organization-list';\n\nexport interface IBusinessForm {\n FormWrapper: INodeProps;\n message?: React.ReactNode;\n items: IBusinessFormItem[];\n buttons: React.ReactNode[];\n errorMessage: React.ReactNode[];\n}\n\nexport interface IBusinessFormItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IBusinessFormInput {\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IUserFormItem {\n id: string;\n type: InputType;\n label: string;\n value: string;\n maxChars?: string;\n isRequired: boolean;\n pattern?: string;\n isDisabled?: boolean;\n customClass?: string;\n}\n\nexport interface IBusinessFormInputProps {\n id?: string;\n type: string;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n isRequired: boolean;\n isDisabled?: boolean;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport const FormInput: React.FC = ({ id, type, value, pattern, className, maxLength, isRequired, isDisabled, onChange }) =>\n (\n \n );\n\nexport interface IBusinessFormLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nexport const FormLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport interface IBusinessFormButton {\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\nexport const FormButton: 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 {text}\n \n );\n};\n\nexport interface IBusinessFormErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nexport const FormFieldError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n\n};\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\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 *--------------------------------------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nimport { Random } from '@msdyn365-commerce-modules/retail-actions';\n// tslint:disable-next-line:no-duplicate-imports\nimport { addOrganizationUser, AddOrganizationUserInput, deleteOrganizationUser, DeleteOrganizationUserInput, editOrganizationUser, EditOrganizationUserInput } from '@msdyn365-commerce-modules/retail-actions';\n\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, Heading, IDataTableProps, IHeadingsProperty, IModuleProps, INodeProps, IPayLoad,\n ITableItemProps, ITableRowProps, ITelemetryContent, Table, TableDataType, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport MsDyn365, { IRequestContext } from '@msdyn365-commerce/core';\nimport { BusinessPartnerUser } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport { computed, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport { IBusinessOrganizationListData } from './business-organization-list.data';\nimport { IBusinessOrganizationListProps, IBusinessOrganizationListResources } from './business-organization-list.props.autogenerated';\nimport { FormButton, FormFieldError, FormInput, FormLabel, IBusinessFormItem, IUserFormItem } from './components';\n\nexport interface IBusinessOrganizationListViewProps extends IBusinessOrganizationListProps {\n OrganizationUserList: IModuleProps;\n moduleContainer: INodeProps;\n heading: React.ReactNode;\n noUsersText?: string;\n addUserButton?: React.ReactNode;\n search?: React.ReactNode;\n organizationListTable: React.ReactNode;\n form?: IFormViewProps;\n formItems?: IUserFormItem[];\n formType: FormType;\n deleteUserForm?: React.ReactNode;\n viewUserDetails?: React.ReactNode;\n modalHeading?: React.ReactNode;\n modalState?: boolean;\n toggleModal?(): void;\n}\n\nexport interface IBusinessOrganizationListState {\n isReady: boolean;\n formItems: IUserFormItem[];\n isFormActive: boolean;\n formType: FormType;\n selectedUserData?: BusinessPartnerUser;\n // tslint:disable-next-line:no-any\n displayedUserData?: any;\n refresh: boolean;\n isModalOpen: boolean;\n hasFormError: boolean;\n hasActionError: boolean;\n}\n\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nexport enum FormType {\n None = 'NONE',\n Edit = 'EDIT',\n Remove = 'REMOVE',\n View = 'VIEW',\n Add = 'ADD'\n}\n\nexport enum InputType {\n Text = 'text',\n Email = 'email'\n}\n\nexport enum InputID {\n FirstName = 'FirstName',\n LastName = 'LastName',\n B2BUserId = 'B2BUserId',\n Email = 'Email',\n SpendingLimit = 'SpendingLimit',\n Status = 'Status',\n FullName = 'Name'\n}\n\nexport interface IFormViewProps {\n modalClassName: string;\n FormWrapper: INodeProps;\n modalHeading?: string;\n modalDescription?: React.ReactNode;\n inputs?: IBusinessFormItem[];\n // tslint:disable-next-line:no-any\n selectedUser?: any;\n buttons?: React.ReactNode[];\n errorMessage?: React.ReactNode[];\n resources: IBusinessOrganizationListResources;\n toggle?(): void;\n}\n\nexport const renderInputSection = (inputs: IUserFormItem[], className: string, onInputChange: (event: React.ChangeEvent) => void): IBusinessFormItem[] => {\n return inputs.map((element) => {\n const { customClass, id, type, label, maxChars, isRequired, pattern, value, isDisabled } = element;\n\n return {\n wrapper: {\n className: classnames(className, id, customClass)\n },\n key: id,\n label: ,\n errorMessage: ,\n input: (\n \n )\n };\n });\n};\n\ninterface IUserTableItemProps extends ITableItemProps {\n user: BusinessPartnerUser;\n}\n\n/**\n *\n * BusinessOrganizationList component\n * @extends {React.PureComponent>}\n */\n@observer\nclass BusinessOrganizationList extends React.Component,IBusinessOrganizationListState> {\n public BusinessFormDefaultInputs: IUserFormItem[] = [\n {\n id: InputID.FirstName,\n type: InputType.Text,\n label: this.props.resources.businessUserFirstNameLabelText,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.LastName,\n type: InputType.Text,\n label: this.props.resources.businessUserLastNameLabelText,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n {\n id: InputID.Email,\n type: InputType.Email,\n label: this.props.resources.businessUserEmailAddressLabelText,\n value: '',\n isRequired: true,\n pattern: '^[a-zA-Z0-9.!#$%&\\'^_`{}~-]+@[a-zA-Z0-9-]+(?:\\\\.[a-zA-Z0-9-]+)*$',\n customClass: 'width-100'\n },\n {\n id: InputID.SpendingLimit,\n type: InputType.Text,\n label: this.props.resources.businessUserSpendingLimitLabelText,\n value: '',\n isRequired: true,\n customClass: 'width-50'\n },\n ];\n\n private moduleClassName: string = 'ms-business-organization-list';\n private mobileExcludedColumns: string[];\n\n @observable\n private _viewport: GridSize;\n @computed get isMobile(): boolean {\n return (this._viewport === 'xs' || this._viewport === 'sm');\n }\n private telemetryContent?: ITelemetryContent;\n private payLoad: IPayLoad;\n\n constructor(props: IBusinessOrganizationListProps) {\n super(props);\n this._toggleModal = this._toggleModal.bind(this);\n this._onInputChange = this._onInputChange.bind(this);\n this._handleRemoveUserButton = this._handleRemoveUserButton.bind(this);\n\n this.mobileExcludedColumns = [InputID.Email, InputID.Status, InputID.SpendingLimit];\n this._viewport = props.context.request && props.context.request.device && props.context.request.device.Type === 'Mobile' ? 'xs' : 'lg';\n this._updateViewport = this._updateViewport.bind(this);\n\n this.state = {\n isReady: false,\n formItems: this.BusinessFormDefaultInputs,\n isFormActive: false,\n formType: FormType.None,\n refresh: true,\n isModalOpen: false,\n hasFormError: false,\n hasActionError: false\n };\n\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this._updateViewport();\n }\n\n public componentDidMount(): void {\n if (MsDyn365.isBrowser && window.addEventListener) {\n window.addEventListener('resize', this._updateViewport);\n this._updateViewport();\n }\n }\n\n public componentWillUnmount(): void {\n if (MsDyn365.isBrowser && window.removeEventListener) {\n window.removeEventListener('resize', this._updateViewport);\n }\n }\n\n public render(): JSX.Element | null {\n const { config, resources, data: { users } } = this.props;\n const { className, heading } = config;\n const { businessUserAddUserButtonText, businessUserLoadingMessage, businessUserEmptyListMessage, businessUserErrorGettingUsersMessage } = resources;\n const { formItems, isFormActive, formType, isModalOpen } = this.state;\n\n const hasUsers = users && users.result && users.result.length > 0;\n this.payLoad.contentAction.etext = TelemetryConstant.AddUser;\n const addUserAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n\n if (!hasUsers) {\n let errorMessage = '';\n if (users.status === 'LOADING') {\n errorMessage = businessUserLoadingMessage;\n } else if (users.status === 'FAILED') {\n errorMessage = businessUserErrorGettingUsersMessage;\n } else if (users.result && users.result.length === 0) {\n errorMessage = businessUserEmptyListMessage;\n }\n\n const errorProps = {\n ...this.props,\n className: className,\n OrganizationUserList: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n moduleContainer: {\n className: `${this.moduleClassName}__container`\n },\n heading: heading && ,\n addUserButton: ,\n noUsersText:

{errorMessage}

\n };\n\n return this.props.renderView(errorProps) as React.ReactElement;\n }\n\n const viewProps = {\n ...this.props,\n className: className,\n OrganizationUserList: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, className)\n },\n moduleContainer: {\n className: `${this.moduleClassName}__container`\n },\n heading: heading && ,\n modalState: isModalOpen,\n addUserButton: ,\n organizationListTable: ,\n toggleModal: this._toggleModal,\n formType: formType,\n form: isFormActive && isModalOpen && (formType === FormType.Add || formType === FormType.Edit) ? this._renderUserForm() : this._renderUserDetails(),\n formItems: formItems\n } as IBusinessOrganizationListViewProps;\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n // _createTableProps: creates the props for the organization list table\n private _createTableProps(): IDataTableProps {\n const { config, resources, context } = this.props;\n const { tableSort, showPagination, paginationItemPerPage } = config;\n const { businessUserPaginationNextButtonText, businessUserPaginationPreviousButtonText, businessUserEditButtonText, businessUserDeleteButtonText, businessUserActionButtonText, businessUserPaginationAriaLabel } = resources;\n\n const tableData = this._createTableItems();\n const tableHeading = tableData.length > 0 && tableData[0].row.map((item) => {\n if (this.isMobile && this.mobileExcludedColumns.includes(item.id)) {\n return;\n } else {\n return {\n name: item.id,\n sortable: tableSort && tableSort || false\n } as IHeadingsProperty;\n }\n }) || [];\n\n return {\n resources: resources,\n headings: tableHeading,\n rows: tableData,\n className: `${this.moduleClassName}__table`,\n editLinkText: this.isMobile ? businessUserEditButtonText : '', // '' === showing just icon\n deleteLinkText: this.isMobile ? businessUserDeleteButtonText : '', // '' === showing just icon\n viewLinkText: 'View details',\n enableToModify: true,\n actionLinkText: businessUserActionButtonText,\n showCheckBoxes: false,\n isSortable: tableSort,\n showPagination: showPagination,\n minifyActions: this.isMobile,\n excludedColumns: this.isMobile ? this.mobileExcludedColumns : [],\n paginationProperty: {\n skipCount: context && context.request && context.request.query && context.request.query.skip && !isNaN(parseInt(context.request.query.skip, 10)) ? parseInt(context.request.query.skip, 10) : 0,\n itemPerPage: paginationItemPerPage || 10,\n prevText: businessUserPaginationPreviousButtonText,\n nextText: businessUserPaginationNextButtonText,\n paginationText: businessUserPaginationAriaLabel,\n url: context && this._getCurrentUrl(context.request).href || ''\n },\n actions: {\n onDelete: this._handleDeleteIcon,\n onEdit: this._handleEditIcon,\n onView: this.isMobile && this._handleViewDetails || undefined\n },\n formatPrice: this._formatPrice\n };\n }\n\n // _createTableItems: converts users recieved from the data-action(IBusinessParterUser[]) to tableRows(ITableItemProps[])\n private _createTableItems(): ITableRowProps[] {\n const { resources, data: { users } } = this.props;\n const { businessUserActiveStatusText, businessUserPendingStatusText, businessUserRemovedStatusText } = resources;\n const usersList = users && users.result;\n\n if (!usersList || usersList.length === 0) {\n return [];\n }\n\n return usersList.map((user) => {\n let statusString = '';\n\n switch(user.StatusValue) {\n case 0:\n statusString = businessUserPendingStatusText;\n break;\n case 1:\n statusString = businessUserActiveStatusText;\n break;\n case 2:\n default:\n statusString = businessUserRemovedStatusText;\n }\n\n return {\n row: [\n {\n id: InputID.FullName,\n type: TableDataType.Text,\n value: `${user.FirstName} ${user.LastName}`,\n user\n } as IUserTableItemProps,\n {\n id: InputID.Email,\n type: TableDataType.Text,\n value: user.Email || ''\n } as IUserTableItemProps,\n {\n id: InputID.Status,\n type: TableDataType.Text,\n value: statusString\n } as IUserTableItemProps,\n {\n id: InputID.SpendingLimit,\n type: TableDataType.Price,\n value: user.SpendingLimit || 0\n } as IUserTableItemProps\n ]\n };\n });\n }\n\n // _toggleModal: closes the modal and resets the form states\n private _toggleModal():void {\n this.setState({\n isModalOpen: false,\n isFormActive: false,\n formType: FormType.None\n });\n }\n\n // _handleAddUserButtonClicked: resets input fields, opens the modal, and sets the form states\n private _handleAddUserButtonClicked = () => {\n // reset form\n const newForm = this.state.formItems;\n newForm.forEach((input) => {\n if (input.id === InputID.Email) {\n // make sure email input is re enabled (it gets disabled when admin is editing user)\n input.isDisabled = false;\n }\n\n input.value = '';\n });\n\n const newUser = { B2BUserId: Random.Guid.generateGuid() } as BusinessPartnerUser;\n\n this.setState({\n formItems: newForm,\n isFormActive: true,\n formType: FormType.Add,\n isModalOpen: true,\n hasFormError: false,\n hasActionError: false,\n selectedUserData: newUser\n });\n }\n\n // _handleAddEditFormSaveButton: triggered on the save button for both add/edit forms. Calls the appropriate data-action and reloads the page when successful\n private _handleAddEditFormSaveButton = async () => {\n const { context } = this.props;\n const { formType, formItems } = this.state;\n\n const updatedUser = this._createBusinessPartner(formItems);\n\n if (formType === FormType.Edit) {\n editOrganizationUser(new EditOrganizationUserInput(updatedUser), context.actionContext)\n .then(() => {\n window.location.reload(false);\n })\n .catch(error => {\n context.telemetry.trace(error);\n this.setState({\n hasActionError: true\n });\n });\n } else {\n addOrganizationUser(new AddOrganizationUserInput(updatedUser), context.actionContext)\n .then(() => {\n window.location.reload(false);\n })\n .catch(error => {\n context.telemetry.trace(error);\n this.setState({\n hasActionError: true\n });\n });\n }\n }\n\n // _createBusinessPartner: attempts to convert input values(IUserFormItem) to a new user(BusinessPartnerUser)\n private _createBusinessPartner = (inputs: IUserFormItem[]): BusinessPartnerUser => {\n const newUser: BusinessPartnerUser = {...this.state.selectedUserData!};\n\n inputs.forEach((input) => {\n // deals with input values need need to be converted into numbers\n if (input.id === InputID.SpendingLimit) {\n newUser[input.id] = parseFloat(input.value) || 0;\n } else {\n newUser[input.id] = input.value;\n }\n });\n\n return newUser;\n }\n\n // _handleFormCancelButton: closes the modal when clicking the Cancel button\n private _handleFormCancelButton = () => {\n this.setState({\n isFormActive: false,\n isModalOpen: false,\n formType: FormType.None\n });\n }\n\n // _handleEditIcon: converts the table row data(ITableItemProps[]) to input fields(IUserFormItem) and opens the edit form\n private _handleEditIcon = (userData: ITableItemProps[]) => {\n // split full name into first and last\n const possibleName = userData.find(cell => {return cell.id === 'Name';});\n const fullName = possibleName && possibleName.value as string || '';\n const lastSpaceIndex = fullName.lastIndexOf(' ');\n const firstName = fullName.substring(0, lastSpaceIndex);\n // tslint:disable-next-line:restrict-plus-operands\n const lastName = fullName.substring(lastSpaceIndex + 1);\n\n // create clone of formItems, map users information, update state\n const { formItems } = this.state;\n const newForm = formItems;\n\n newForm.forEach(input => {\n switch (input.id) {\n case InputID.FirstName:\n input.value = firstName;\n break;\n case InputID.LastName:\n input.value = lastName;\n break;\n case InputID.Email: // email can never be null/undefined as it is a required field\n input.isDisabled = true;\n const possibleCell = userData.find(cell => {return input.id === cell.id;});\n input.value = possibleCell && possibleCell.value as string || '';\n break;\n default:\n const dataCell = userData.find(cell => {return input.id === cell.id;});\n input.value = dataCell && dataCell.value as string || '';\n }\n });\n\n this.setState({\n formItems: newForm,\n isFormActive: true,\n formType: FormType.Edit,\n isModalOpen: true,\n hasFormError: false,\n hasActionError: false,\n selectedUserData: (userData[0] as IUserTableItemProps).user\n });\n }\n\n // _handleDeleteIcon: opens removeUser confirmation window\n private _handleDeleteIcon = (userData: ITableItemProps[]) => {\n const newUser: BusinessPartnerUser = {...(userData[0] as IUserTableItemProps).user};\n // tslint:disable-next-line:no-any\n const displayedUserData: any = {};\n\n userData.forEach((cell: ITableItemProps) => {\n if (cell.id === 'Name') {\n // split full name into first and last\n const fullName = cell.value as string;\n const lastSpaceIndex = fullName.lastIndexOf(' ');\n displayedUserData.FirstName = fullName.substring(0, lastSpaceIndex);\n // tslint:disable-next-line\n displayedUserData.LastName = fullName.substring(lastSpaceIndex + 1);\n } else if (cell.type === TableDataType.Price) {\n displayedUserData[cell.id] = this.props.context.cultureFormatter.formatCurrency(cell.value as string);\n } else {\n displayedUserData[cell.id] = cell.value;\n }\n });\n\n this.setState({\n displayedUserData: displayedUserData,\n selectedUserData: newUser,\n formType: FormType.Remove,\n isModalOpen: true,\n isFormActive: false\n });\n }\n\n // _handleViewDetails: opens user details window\n private _handleViewDetails = (userData: ITableItemProps[]) => {\n const newUser: BusinessPartnerUser = {...(userData[0] as IUserTableItemProps).user};\n // tslint:disable-next-line:no-any\n const displayedUserData: any = {};\n\n userData.forEach((cell: ITableItemProps) => {\n if (cell.id === 'Name') {\n // split full name into first and last\n const fullName = cell.value as string;\n const lastSpaceIndex = fullName.lastIndexOf(' ');\n displayedUserData.FirstName = fullName.substring(0, lastSpaceIndex);\n // tslint:disable-next-line\n displayedUserData.LastName = fullName.substring(lastSpaceIndex + 1);\n } else if (cell.type === TableDataType.Price) {\n displayedUserData[cell.id] = this.props.context.cultureFormatter.formatCurrency(cell.value as string);\n } else {\n displayedUserData[cell.id] = cell.value;\n }\n });\n\n this.setState({\n displayedUserData: displayedUserData,\n selectedUserData: newUser,\n formType: FormType.View,\n isModalOpen: true,\n isFormActive: false\n });\n }\n\n // _handleRemoveUserButton: triggered on confirmation of removing a user.\n private _handleRemoveUserButton = () => {\n // TODO\n const { context } = this.props;\n const { selectedUserData: deleteUserData } = this.state;\n\n if (deleteUserData) {\n deleteOrganizationUser(new DeleteOrganizationUserInput(deleteUserData), context.actionContext)\n .then(() => {\n window.location.reload(false);\n })\n .catch((error) => {\n context.telemetry.trace(error);\n });\n }\n this.setState({\n formType: FormType.None,\n isModalOpen: false\n });\n }\n\n // _renderUserDetails: creates the remove/view form props\n private _renderUserDetails(): IFormViewProps {\n const { resources } = this.props;\n const { formType, displayedUserData } = this.state;\n const { businessUserRemoveModalHeaderText, businessUserRemoveModalDescription, businessUserViewModalHeaderText,\n businessUserCancelButtonText, businessUserCancelRemoveUserButtonText, businessUserRemoveUserButtonText, businessUserErrorUpdatingUsersMessage } = resources;\n\n const formClassName = `${this.moduleClassName}__form`;\n const typeClassName = formType === FormType.Remove ? 'type-remove' : 'type-view';\n const handleRemoveButton = (event: React.MouseEvent) => { this._handleRemoveUserButton(); };\n\n return {\n modalClassName: classnames(`${this.moduleClassName}__modal`, typeClassName),\n FormWrapper: {\n className: formClassName\n },\n modalHeading: formType === FormType.Remove ? businessUserRemoveModalHeaderText : businessUserViewModalHeaderText,\n modalDescription: formType === FormType.Remove &&

{businessUserRemoveModalDescription}

,\n selectedUser: displayedUserData,\n buttons: [\n // tslint:disable-next-line:react-this-binding-issue\n formType === FormType.Remove && ,\n \n ],\n errorMessage: [\n ,\n ],\n resources: resources\n };\n }\n\n // _renderUserForm: creates the add/edit form props\n private _renderUserForm(): IFormViewProps {\n const { resources } = this.props;\n const { formType, formItems, hasFormError, hasActionError, isReady } = this.state;\n const { businessUserEditUserFormHeadingText, businessUserAddUserFormHeadingText, businessUserSaveButtonArialabel,\n businessUserSaveButtonText, businessUserCancelButtonArialabel, businessUserCancelButtonText, businessUserFieldIncorrectErrorText, businessUserActionErrorText, businessUserAllFieldsRequiredMessage } = resources;\n\n const formClassName = `${this.moduleClassName}__form`;\n const typeClassName = formType === FormType.Add ? 'type-add' : 'type-edit';\n\n return {\n modalClassName: classnames(`${this.moduleClassName}__modal`, typeClassName),\n FormWrapper: {\n className: formClassName\n },\n modalHeading: formType === FormType.Add ? businessUserAddUserFormHeadingText : businessUserEditUserFormHeadingText,\n modalDescription: formType === FormType.Add &&

{businessUserAllFieldsRequiredMessage}

,\n inputs: renderInputSection(formItems, `${formClassName}-item`, this._onInputChange),\n buttons: [\n (\n ),\n (\n )\n ],\n errorMessage: [\n hasFormError && ,\n hasActionError && \n ],\n resources: resources\n };\n }\n\n // _onInputChange: updates the fomrItems state on every input change\n private _onInputChange = (event: React.ChangeEvent): void => {\n const newForm = this.state.formItems;\n\n newForm.forEach(item => {\n if (item.id === event.target.id) {\n item.value = event.target.value;\n }\n });\n\n // update state object with latest values and check if form is ready\n // TODO: remove !refresh\n this.setState((prev) => ({\n refresh: !prev.refresh,\n isReady: this._isFormReady(),\n formItems: newForm,\n hasFormError: false,\n hasActionError: false\n }));\n }\n\n // _isFormReady: checks whether the current values in the input fields are valid for submission, this will also disable/enable the submit button.\n private _isFormReady = (): boolean => {\n const { formItems } = this.state;\n\n for (let i = 0; i < formItems.length; i++) {\n // will return TRUE if:\n // - input field is required and EMPTY\n // OR\n // - pattern provided and value does not match pattern\n // OR\n // - if spendingLimit input --> make sure value can be parsed into an NUMBER\n if ((formItems[i].isRequired && formItems[i].value.length < 1)) {\n return false;\n } else if (formItems[i].pattern !== undefined && formItems[i].value.match(formItems[i].pattern as string) === null) {\n return false;\n } else if (formItems[i].id === InputID.SpendingLimit && isNaN(parseFloat(formItems[i].value))) {\n this.setState({\n hasFormError: true\n });\n return false;\n }\n }\n\n return true;\n }\n\n private _formatPrice = (price: number): string => {\n return this.props.context.cultureFormatter ? this.props.context.cultureFormatter.formatCurrency(price) : price.toString();\n }\n\n private _getCurrentUrl = (reqContext: IRequestContext): URL=> {\n if (MsDyn365.isBrowser) {\n return new URL(window.location.href);\n } else {\n // NOTE: Typing on requestURL is incorrect\n if (reqContext.url.requestUrl.href) {\n return new URL(reqContext.url.requestUrl.href);\n } else {\n return new URL(reqContext.url.requestUrl.href);\n }\n }\n }\n\n private _updateViewport(): void {\n this._viewport = this._getViewport();\n }\n\n private _getViewport = (): GridSize => {\n const { context } = this.props;\n\n // always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (typeof window !== undefined && 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 } else {\n return 'xl';\n }\n }\n }\n\n return 'xs';\n }\n}\n\nexport default BusinessOrganizationList;\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 { IOrderSummaryLines } from '@msdyn365-commerce-modules/order-summary-utilities';\nimport { INodeProps, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICartViewProps, IOrderSummaryErrors } from './cart';\nimport { ICartlinesViewProps } from './components/cart-line-items';\nimport { ICartLineItemViewProps } from './components/cart-line-items-promotion';\n\nconst _renderCartlines = (cartLines: ICartlinesViewProps[] | undefined, cartEmptyText: string, CartlinesWrapper: INodeProps, storeSelector: React.ReactNode | undefined,\n backToShoppingButton: React.ReactNode, waitingComponent: React.ReactNode, cartLoadingStatus: string, cartDataResult: boolean): JSX.Element[] | JSX.Element => {\n\n if (cartLoadingStatus) {\n return <>{cartLoadingStatus};\n }\n if (cartLines) {\n return cartLines.map((cartLine, index) => {\n return (\n
\n {cartLine.cartline}\n {\n storeSelector && cartLine.pickUpInStore ?\n \n {cartLine.pickUpInStore.defaultComponent}\n :\n null\n }\n {\n cartLine.addToOrderTemplate ? (\n \n {cartLine.remove}\n {cartLine.addToWishlist}\n {cartLine.addToOrderTemplate}\n \n ) : (\n <>\n {cartLine.remove}\n {cartLine.addToWishlist}\n \n )\n }\n
\n );\n });\n } else {\n return (cartDataResult ?\n (\n
\n

{cartEmptyText}

\n {backToShoppingButton}\n
\n ) : <>{waitingComponent}\n );\n }\n};\n\nconst _renderErrorBlock = (errorData: IOrderSummaryErrors | undefined): JSX.Element | null => {\n if (!errorData || errorData.errors.length === 0) {\n return null;\n }\n return (\n \n {errorData.header}\n {errorData.errors}\n \n );\n};\n\nconst _renderOrderSummarylines = (orderSummaryLines: IOrderSummaryLines | undefined, OrderSummaryItems: INodeProps, props: ICartViewProps): JSX.Element | null => {\n if (!orderSummaryLines) {\n props.context.telemetry.error('OrderSummary content is empty, module wont render');\n return null;\n }\n return (\n \n {props.promoCode}\n {orderSummaryLines.subtotal}\n {orderSummaryLines.shipping}\n {orderSummaryLines.otherCharge}\n {orderSummaryLines.tax}\n {orderSummaryLines.totalDiscounts ? orderSummaryLines.totalDiscounts : null}\n {orderSummaryLines.orderTotal}\n \n );\n};\n\nconst _renderPromotions = (promotions: ICartLineItemViewProps): JSX.Element | undefined => {\n return (\n \n \n {promotions.promotionMessage}\n {promotions.promotionSeeAllLink}\n {promotions.promotionDialog}\n \n\n \n );\n\n};\n\nconst CartView: React.FC = (props: ICartViewProps) => (\n
\n {props.title}\n {props.promotionOptions && _renderPromotions(props.promotionOptions)}\n \n {_renderCartlines(props.cartlines, props.resources.emptyCartText, props.CartlinesWrapper, props.storeSelector, props.backToShoppingButton, props.waitingComponent, props.cartLoadingStatus, props.cartDataResult)}\n \n {props.orderSummaryHeading &&\n < Node {...props.OrderSummaryWrapper}>\n {props.orderSummaryHeading}\n {_renderOrderSummarylines(props.orderSummaryLineitems, props.OrderSummaryItems, props)}\n {_renderErrorBlock(props.OrderSummaryErrors)}\n {props.checkoutAsSignInUserButton}\n {props.checkoutAsGuestButton}\n {props.backToShoppingButton}\n {props.createTemplateFromCartButton}\n \n }\n {props.storeSelector}\n
\n);\n\nexport default CartView;","/*---------------------------------------------------------------------------------------------\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 * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport { IBuyboxViewProps } from '../..';\nimport {\n IBuyboxAddToCartViewProps,\n IBuyboxAddToOrderTemplateViewProps,\n IBuyboxAddToWishlistViewProps,\n IBuyboxFindInStoreViewProps,\n IBuyboxKeyInPriceViewProps,\n IBuyboxProductConfigureDropdownViewProps,\n IBuyboxProductConfigureViewProps,\n IBuyboxProductQuantityViewProps,\n IBuyboxShopSimilarLookViewProps\n } from './components';\n\nconst BuyboxView: React.FC = props => {\n const { ModuleProps, MediaGalleryContainerProps, ProductInfoContainerProps, addToCart, addToOrderTemplate, addToWishlist, configure, description, findInStore, quantity, price, title, rating, inventoryLabel, shopSimilarLook, keyInPrice } = props;\n\n return (\n \n \n {props.mediaGallery}\n \n \n {title}\n {price}\n {description}\n {rating}\n {configure && _renderConfigure(configure)}\n {keyInPrice && _renderKeyInPrice(keyInPrice)}\n {quantity && _renderQuantity(quantity)}\n {inventoryLabel}\n {addToCart && _renderAddToCart(addToCart)}\n {findInStore && _renderFindInStore(findInStore)}\n {addToOrderTemplate && _renderAddToOrderTemplate(addToOrderTemplate)}\n {addToWishlist && _renderAddToWishlist(addToWishlist)}\n { _renderSocialShare(props.slots && props.slots.socialShare)}\n {shopSimilarLook && _renderShopSimilarItem(shopSimilarLook)}\n \n \n );\n};\n\nconst _renderAddToCart = (addToCart: IBuyboxAddToCartViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToCart;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToOrderTemplate = (addToOrderTemplate: IBuyboxAddToOrderTemplateViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToOrderTemplate;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderAddToWishlist = (addToWishlist: IBuyboxAddToWishlistViewProps): JSX.Element => {\n const { ContainerProps, errorBlock, button } = addToWishlist;\n\n return (\n \n {errorBlock}\n {button}\n \n );\n};\n\nconst _renderConfigure = (configure: IBuyboxProductConfigureViewProps): JSX.Element => {\n const { ContainerProps, dropdowns } = configure;\n\n return (\n \n {dropdowns.map(_renderConfigureDropdown)}\n \n );\n};\n\nconst _renderSocialShare = (socialShare: React.ReactNode[]): JSX.Element | undefined => {\n if (!socialShare || socialShare.length === 0) {\n return undefined;\n }\n\n return (\n <>\n {socialShare[0]}\n \n );\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\nconst _renderQuantity = (quantity: IBuyboxProductQuantityViewProps): JSX.Element => {\n const { ContainerProps, LabelContainerProps, heading, input, errors } = quantity;\n\n return (\n \n \n {heading}\n {errors}\n \n {input}\n \n );\n};\n\nconst _renderKeyInPrice = (keyInPrice: IBuyboxKeyInPriceViewProps): JSX.Element => {\n const {ContainerProps, LabelContainerProps, heading, input } = keyInPrice;\n\n return(\n \n \n {heading}\n \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};\nexport default BuyboxView;\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 * as React from 'react';\n\ninterface IAccountCustomerBalanceTileInfo {\n label?: string;\n value?: string;\n verbagePrefix?: string;\n verbagePostfix?: string;\n className?: string;\n error?: string;\n}\n\nexport const ErrorComponent: React.FC = ({ error }) => (\n \n {error}\n \n);\n\nexport const CreditComponent: React.FC = ({ verbagePrefix, verbagePostfix, value, className }) => {\n return (\n
\n {verbagePrefix}\n \n {value}\n \n {verbagePostfix}\n
\n );\n};\n\nexport const InfoComponent: React.FC = ({ label, value, className }) => (\n
\n \n {label}\n \n \n {value}\n \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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport * as React from 'react';\n\ninterface ILinksData {\n linkText?: string;\n linkUrl: Msdyn365.ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountCustomerBalanceTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n /** The telemetry content */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountCustomerBalanceTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n { editableLinks && editableLinks.length ?\n \n : null\n }\n
\n );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if(!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n\n linkdata.forEach((link,index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-customer-balance-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'button',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountCustomerBalanceTileLinks;","/*---------------------------------------------------------------------------------------------\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 { getTelemetryObject, Heading, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { computed, reaction } from 'mobx';\nimport * as React from 'react';\nimport { IAccountCustomerBalanceTileData } from './account-customer-balance-tile.data';\nimport { IAccountCustomerBalanceTileProps } from './account-customer-balance-tile.props.autogenerated';\nimport { CreditComponent, ErrorComponent } from './components/account-customer-balance-tile-info';\nimport LinksComponent from './components/account-customer-balance-tile-links';\n\nexport interface IAccountCustomerBalanceTileViewProps extends IAccountCustomerBalanceTileProps {\n AccountCustomerBalanceTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n content: React.ReactNode;\n links: React.ReactNode;\n}\n\nexport interface IAccountCustomerBalanceTileViewState {\n isDetailsLinkDisplayed: boolean;\n content: React.ReactNode;\n}\n\n/**\n *\n * AccountCustomerBalanceTile component\n * @extends {React.Component>}\n */\nclass AccountCustomerBalanceTile extends React.Component<\n IAccountCustomerBalanceTileProps,\n IAccountCustomerBalanceTileViewState\n> {\n @computed get hasError(): boolean {\n return get(this.props, 'data.balance.status') !== 'SUCCESS';\n }\n\n private telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountCustomerBalanceTileProps) {\n super(props);\n\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n\n // @ts-ignore\n this.state = { ...this._initState() };\n\n reaction(\n () => this.hasError,\n () => {\n this.props.context.telemetry.error('Error retrieving customer account balance');\n this.setState({\n content: \n });\n }\n );\n }\n\n @computed get isCustomerAccountPaymentEnabled(): boolean {\n const customerResult = get(this.props, 'data.customerInformation.result');\n\n const allowOnAccountPayment = customerResult ? customerResult.AllowOnAccountPayment : false;\n const isB2BCustomer = customerResult ? customerResult.IsB2B : false;\n const enableCustomerAccountPayment = get(this.props, 'context.request.app.platform.enableCustomerAccountPayment');\n\n return (\n allowOnAccountPayment &&\n (enableCustomerAccountPayment === 'all' ||\n (enableCustomerAccountPayment === 'b2b' && isB2BCustomer) ||\n (enableCustomerAccountPayment === 'b2c' && !isB2BCustomer))\n );\n }\n\n public render(): JSX.Element {\n if (!this.isCustomerAccountPaymentEnabled) {\n return ;\n }\n\n const { className, heading, links } = this.props.config;\n const viewProps = {\n ...this.props,\n AccountCustomerBalanceTile: {\n moduleProps: this.props,\n className: classnames('ms-account-customer-balance-tile', className)\n },\n heading: heading && (\n \n ),\n content: this.state.content,\n links: this.state.isDetailsLinkDisplayed && (\n (event: Msdyn365.ContentEditableEvent) => void 0,\n requestContext: this.props.context.request,\n telemetryContent: this.telemetryContent\n }}\n />\n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _initState(): IAccountCustomerBalanceTileViewState {\n const account = get(this.props, 'data.balance.result');\n\n let content: React.ReactNode;\n let isDetailsLinkDisplayed = false;\n\n if (this.hasError) {\n this.props.telemetry.error('Error retrieving customer account balance');\n content = ;\n } else if (account.Balance === 0 && account.CreditLimit === 0) {\n // non-established credit\n content = ;\n } else {\n // successfully retrieved balance\n const { accountCreditVerbagePrefix, accountCreditVerbagePostfix } = this.props.resources;\n const currencyCode = get(this.props, 'context.request.channel.Currency');\n const formatCurrency = get(this.props, 'context.cultureFormatter.formatCurrency');\n const customerBalanceFormatted = `${formatCurrency(account.Balance.toFixed(2), currencyCode)}`;\n\n isDetailsLinkDisplayed = true;\n content = (\n \n );\n }\n\n return { content, isDetailsLinkDisplayed };\n }\n}\n\nexport default AccountCustomerBalanceTile;\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 { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccountOrderTemplatesTileViewProps } from './account-order-templates-tile';\n\nconst AccountOrderTemplatesTileView: React.FC = props => {\n const { AccountOrderTemplatesTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountOrderTemplatesTileView;\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 * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\n\nimport {\n ICheckoutLoyaltyAdd, ICheckoutLoyaltyRewardPoint, ICheckoutLoyaltyShow,\n ICheckoutLoyaltyViewProps\n} from './checkout-loyalty';\n\nconst AddCheckoutLoyalty: React.FC = ({\n heading,\n cardNumber,\n drawer,\n rewardPoints,\n loyaltyAmountContainer,\n appliedLoyaltyAmountContainer,\n loyaltyAmountLabel,\n loyaltyAmountInput,\n loyaltyAmountApplyButton,\n showAppliedAmount,\n loyaltyAmountAppliedText,\n loyaltyAmountAppliedPrice,\n loyaltyAmountRemoveButton,\n}) => {\n\n return (\n <>\n {heading}\n {cardNumber}\n \n {rewardPoints.map((rewardPoint: ICheckoutLoyaltyRewardPoint) => {\n return (\n \n {rewardPoint.title}\n {rewardPoint.availablePointsText}\n {rewardPoint.activePoints}\n {rewardPoint.expiringPointsText}\n {rewardPoint.expiringPoints}\n \n );\n })}\n \n \n {loyaltyAmountLabel}\n {loyaltyAmountInput}\n {loyaltyAmountApplyButton}\n {\n showAppliedAmount &&\n \n {loyaltyAmountAppliedText}\n {loyaltyAmountAppliedPrice}\n {loyaltyAmountRemoveButton}\n \n }\n \n \n );\n};\n\nconst ShowCheckoutLoyalty: React.FC = ({\n heading,\n coveredAmountText,\n amount,\n}) => {\n\n return (\n <>\n {heading}\n {coveredAmountText}\n {amount}\n \n );\n};\n\nconst CheckoutLoyaltyView: React.FC = props => {\n const { checkoutLoyalty,\n viewState,\n showLoyalty,\n addLoyalty } = props;\n\n return (\n \n {viewState.isShowLoyalty && }\n {viewState.isShowAddLoyalty && }\n \n );\n};\n\nexport default CheckoutLoyaltyView;","/*---------------------------------------------------------------------------------------------\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 *--------------------------------------------------------------------------------------------*/\n\nimport { IModuleProps, INodeProps, NodeTag } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { ITabItemData } from './tab-item.data';\nimport { ITabItemProps } from './tab-item.props.autogenerated';\n\nexport interface ITabItemViewProps {\n TabContentContainer: IModuleProps;\n TabHeaderContainer: IModuleProps;\n tabSlots: INodeProps;\n TabItemContent: INodeProps;\n tabItemType?: TabItemType;\n tabHeader: React.ReactNode;\n}\n\nexport interface ITabItemExtentedProps extends ITabItemProps {\n tabItemType?: TabItemType;\n isSelected?: boolean;\n itemIndex?: number;\n tabId?: string;\n}\n\nexport enum TabItemType {\n TabHeader,\n TabContent\n}\n/**\n *\n * TabItem component\n * @extends {React.Component}\n */\n@observer\nclass TabItem extends React.Component {\n private moduleContentClassName: string = 'ms-tab-item-content';\n private moduleHeaderClassName: string = 'ms-tab-item-header';\n\n constructor(props: ITabItemProps) {\n super(props);\n this._renderTabHeader = this._renderTabHeader.bind(this);\n }\n\n public render(): JSX.Element {\n const { slots, renderView, config, data, isSelected, itemIndex } = this.props;\n const index = itemIndex || 0;\n const contentID = getContentID(index, this.props.tabId || '');\n const activeContentIDResult = data && data.activeTabState && data.activeTabState.result;\n const shown = activeContentIDResult && activeContentIDResult.tabId === this.props.tabId && activeContentIDResult.activeContentIndex !== undefined ?\n activeContentIDResult.activeContentIndex === index : isSelected || false;\n const viewProps = {\n ... this.props,\n TabContentContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleContentClassName, config.className)\n },\n TabHeaderContainer: {\n moduleProps: this.props,\n className: classnames(this.moduleHeaderClassName, config.className),\n },\n TabItemContent: {\n className: 'ms-tab-item-content__content',\n tag: 'section' as NodeTag,\n 'aria-hidden': !shown,\n role: 'tabpanel',\n tabIndex: shown ? 0 : -1,\n id: contentID\n },\n tabHeader: this._renderTabHeader(),\n tabSlots: slots,\n };\n return renderView(viewProps) as React.ReactElement;\n\n }\n\n private _renderTabHeader(): React.ReactNode {\n return (\n <>\n {this.props.config.tabItemTitle}\n \n );\n }\n\n}\n\nexport const getContentID = (index: number, id: string) => {\n return `tab-item-content-${id}-${index}`;\n};\n\nexport default TabItem;","/*---------------------------------------------------------------------------------------------\n * 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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IHelp,\n IOrderDetailsViewProps,\n IOrderInformation,\n IOrderSummary,\n IPaymentMethods,\n ISalesLine\n} from './../..';\n\nexport const OrderDetailsOrderInfomation: React.FC = ({\n orderInformationProps,\n salesId,\n receiptId,\n createdDate,\n count,\n amount,\n channelReferenceId,\n channelName,\n channelAddress\n}) => (\n \n {channelName}\n {channelAddress}\n {channelReferenceId}\n {salesId}\n {receiptId}\n {createdDate}\n {count}\n {amount}\n \n );\n\nexport const OrderDetailsSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n {buyAgainButton}\n \n);\n\nexport const OrderDetailsGroupDelivery: React.FC = ({ deliveryProps, heading, count, trackingInfo, shippedStatusCheck }) => (\n \n {heading}\n {count}\n {shippedStatusCheck === 'shipped' ? null : trackingInfo}\n \n);\n\nexport const OrderDetailsGroup: React.FC = ({ groupProps, delivery, address, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n {salesLine.data.deliveryType === 'ship' && salesLine.data.shipment ? salesLine.trackingInfo : null}\n \n {salesLine.salesStatus}\n \n ))}\n \n )}\n {!delivery.showTimeslot && address}\n {delivery.showTimeslot && (\n \n {address}\n {delivery.pickupDateTimeslot}\n \n )}\n \n);\n\nexport const OrderDetailsGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderDetailsOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderDetailsPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderDetailsHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderDetailsView: React.FC = ({\n moduleProps,\n heading,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {groups && }\n {orderSummary && }\n {payment && }\n {help && }\n \n );\n};\n\nexport default OrderDetailsView;\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 { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetVerificationButton {\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 PasswordResetVerificationButton: 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 {text}\n );\n};\n\nexport default PasswordResetVerificationButton;\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\nexport interface IPasswordResetVerificationErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n\n};\n\nexport default PasswordResetVerificationError;\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 * as React from 'react';\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\n\nexport interface IPasswordResetVerificationInputProps {\n id?: string;\n // tslint:disable-next-line:no-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IPasswordResetVerificationInput {\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 = parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst PasswordResetVerificationInput: React.FC = ({\n id,\n type,\n value,\n pattern,\n className,\n maxLength,\n onChange }) => (\n \n );\n\nexport default PasswordResetVerificationInput;\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 * as React from 'react';\n\nexport interface IPasswordResetVerificationLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst PasswordResetVerificationLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default PasswordResetVerificationLabel;\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 * as React from 'react';\n\nexport interface IPasswordResetVerificationLoadingIcon {\n className: string;\n}\n\nconst PasswordResetVerificationLoadingIcon: React.FC = ({ className }) => (\n
\n);\n\nexport default PasswordResetVerificationLoadingIcon;\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 * as React from 'react';\n\nexport interface IPasswordResetVerificationLoadingMessage {\n className: string;\n message: string;\n}\n\nconst PasswordResetVerificationLoadingMessage: React.FC = ({ className, message }) => (\n
\n {message}\n
\n);\n\nexport default PasswordResetVerificationLoadingMessage;\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\nexport interface IPasswordResetVerificationSuccess {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetVerificationSuccess: React.FC = ({ id, className, type = 'page', message }) => {\n const successClassName = `${className}__${type}-success`;\n\n return (\n \n );\n};\n\nexport default PasswordResetVerificationSuccess;\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 { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport {\n getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody\n} from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\n\nimport PasswordResetVerificationButtonComponent from './components/password-reset-verification-button';\nimport PasswordResetVerificationErrorComponent from './components/password-reset-verification-error';\nimport PasswordResetVerificationInputComponent from './components/password-reset-verification-input';\nimport PasswordResetVerificationLabelComponent from './components/password-reset-verification-label';\nimport PasswordResetVerificationLoadingIconComponent from './components/password-reset-verification-loading-icon';\nimport PasswordResetVerificationLoadingMessageComponent from './components/password-reset-verification-loading-message';\nimport PasswordResetVerificationSuccessComponent from './components/password-reset-verification-success';\nimport {\n IPasswordResetVerificationConfig, IPasswordResetVerificationProps\n} from './password-reset-verification.props.autogenerated';\n\nexport interface IPasswordResetVerificationViewState {\n isShowLoading: boolean;\n}\n\nexport interface IPasswordResetVerificationItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationLocalAccount {\n localAccount: INodeProps;\n verificationControlWrapper: INodeProps;\n items: IPasswordResetVerificationItem[];\n successMessage: React.ReactNode[];\n errorMessage: React.ReactNode[];\n verificationButtonsWrapper: INodeProps;\n verificationButtons: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IPasswordResetVerificationLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IPasswordResetVerificationViewProps {\n className: string;\n viewState: IPasswordResetVerificationViewState;\n loading: IPasswordResetVerificationLoading;\n passwordResetVerification: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n passwordResetVerificationLocalAccount: IPasswordResetVerificationLocalAccount;\n}\n\n/**\n *\n * PasswordResetVerification component\n * @extends {React.Component>}\n */\n@observer\nclass PasswordResetVerification extends React.Component> {\n private moduleClassName: string = 'ms-password-reset-verification';\n private telemetryContent: ITelemetryContent;\n @observable private emailRegex: string;\n @observable private isInitialized: boolean;\n @observable private templateVersion: string;\n\n // tslint:disable-next-line:no-any\n private initializationTimer: any;\n\n constructor(props: IPasswordResetVerificationProps) {\n super(props);\n this.emailRegex = '^[a-zA-Z0-9!#$%&\\'+^_\\`{}~-]+(?:\\.[a-zA-Z0-9!#$%&\\'+^_\\`{}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$';\n this.isInitialized = false;\n this.templateVersion = '';\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public componentDidMount(): void {\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // tslint:disable-next-line:no-string-literal\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // tslint:disable-next-line:no-string-literal\n window['$element']['initialize']();\n }\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n passwordResetVerification: {\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 heading: config.heading &&\n ,\n passwordResetVerificationLocalAccount: this._renderLocalAccount()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text = event.target.value;\n\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\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(() => { this._isInitializationSuccessful(); }, 100);\n setTimeout(() => { clearInterval(this.initializationTimer); }, 10000);\n }\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private _isInitializationSuccessful = () => {\n // tslint:disable-next-line:no-string-literal\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n }\n\n private _prePopulateData(): void {\n // tslint:disable-next-line:no-string-literal\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // tslint:disable-next-line:no-string-literal\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PAT: string }) => {\n if (obj.ID.toLowerCase() === 'email') {\n this.emailRegex = obj.PAT;\n } else if (obj.ID.toLowerCase() === 'emailverificationcontrol') {\n this.templateVersion = 'v2';\n }\n });\n if (!this.templateVersion) {\n this.templateVersion = 'v1';\n }\n }\n }\n\n private _updateErrorMessage(): void {\n // tslint:disable-next-line:no-string-literal\n if (window && window['CONTENT']) {\n\n const message = {\n verifying_blurb: this.props.resources.loadingMessage\n };\n\n // tslint:disable-next-line:no-string-literal\n Object.assign(window['CONTENT'], message);\n }\n }\n\n // tslint:disable-next-line: max-func-body-length\n private _renderLocalAccount(): IPasswordResetVerificationLocalAccount {\n const { resources } = this.props;\n return {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n verificationControlWrapper: {\n id: 'emailVerificationControl',\n className: `${this.moduleClassName}__verification-control-content verificationControlContent`\n },\n items: [\n this._renderInput('email', 'email', resources.emailAddressLabelText, undefined, this.emailRegex),\n this._renderInput(this.getValue('email_ver_input', 'emailVerificationCode'), 'text', resources.verificationCodeLabelText, undefined, undefined, 'VerificationCode'),\n ],\n successMessage: [\n ,\n // tslint:disable-next-line:max-line-length\n \n ],\n errorMessage: [\n ,\n ,\n ,\n ,\n ,\n ,\n ,\n \n ],\n verificationButtonsWrapper: {\n className: `${this.moduleClassName}__email-verification-buttons ${this.getValue('verify', '')}`,\n 'data-claim_id': 'email'\n },\n verificationButtons: [\n\n (\n \n ),\n\n (\n \n ),\n (\n \n ),\n (\n \n )\n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n (\n \n ),\n (\n \n )\n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n }\n\n private _renderInput(id: string, type: string, labelText: string, maxLength?: string, pattern?: string, cssClassName?: string): IPasswordResetVerificationItem {\n const className = `${this.moduleClassName}__account-item`;\n return (\n {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry', cssClassName)\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n\n }\n );\n\n }\n\n private getValue = (v1Value: string, v2Value: string): string => {\n if (this.templateVersion) {\n return this.templateVersion === 'v1' ? v1Value : v2Value;\n }\n return '';\n }\n\n}\n\nexport default PasswordResetVerification;","/*---------------------------------------------------------------------------------------------\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 { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccountWishlistTileViewProps } from './account-wishlist-tile';\n\nconst AccountWishlistTileView: React.FC = props => {\n const { AccountWishlistTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountWishlistTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IOrganizationUsersTileViewProps } from './organization-users-tile';\n\nconst OrganizationUsersTileView: React.FC = props => {\n const { OrganizationUsersTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default OrganizationUsersTileView;\n","import {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n INodeProps,\n ITelemetryContent,\n Modal,\n ModalBody,\n ModalFooter,\n ModalHeader,\n TelemetryConstant\n} from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nexport interface ILoyaltyTermsModalProps {\n resources: ILoyaltyTermsModalResources;\n returnRef: React.RefObject | undefined;\n checked: boolean;\n isOpen: boolean;\n terms: React.ReactNode;\n telemetryContent?: ITelemetryContent;\n onToggle(): void;\n onSubmit(): void;\n onCheck(): void;\n}\n\nexport interface ILoyaltyTermsModalResources {\n loyaltyTermsHeading: string;\n loyaltyAgreeToTerms: string;\n joinLoyaltyTermsText: string;\n cancelLoyaltyTermsText: string;\n}\n\nexport interface ILoyaltyTermsModalViewProps {\n modal: INodeProps;\n modalHeader: INodeProps;\n modalFooter: INodeProps;\n modalBody: INodeProps;\n heading: React.ReactElement;\n cancelButton: React.ReactElement;\n submitButton: React.ReactElement;\n terms: React.ReactNode;\n checkbox: React.ReactElement;\n agreeText: React.ReactElement;\n agreeSection: INodeProps;\n}\n\nexport const LoyaltyTermsModal = (props: ILoyaltyTermsModalProps):ILoyaltyTermsModalViewProps => {\n const payLoad = getPayloadObject('click', props.telemetryContent!, TelemetryConstant.LoyaltyTermsCancel);\n const loyaltyTermCancelAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsSubmit;\n const loyaltyTermSubmitAttributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n payLoad.contentAction.etext = TelemetryConstant.LoyaltyTermsAgree;\n const loyaltyTermCheckboxAttributes = getTelemetryAttributes(props.telemetryContent!,payLoad);\n return {\n modal: {tag: Modal, className: 'ms-loyalty-terms__modal', toggle: props.onToggle, applicationNode: 'renderPage', isOpen: props.isOpen, returnFocusRef: props.returnRef},\n modalHeader: {tag: ModalHeader, className: 'ms-loyalty-terms__modal-header', toggle: props.onToggle},\n modalFooter: {tag: ModalFooter, className: 'ms-loyalty-terms__modal-footer'},\n modalBody: {tag: ModalBody, className: 'ms-loyalty-terms__modal-body'},\n cancelButton: ,\n submitButton: ,\n heading:

{props.resources.loyaltyTermsHeading}

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

{props.resources.loyaltyAgreeToTerms}

\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 { GetLoyaltyCardInput, issueLoyalty, IssueLoyaltyInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { getLoyaltyCardAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\n\nimport {\n Button,\n getTelemetryObject,\n IModuleProps,\n ITelemetryContent\n} from '@msdyn365-commerce-modules/utilities';\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport classname from 'classnames';\nimport * as React from 'react';\nimport {ILoyaltyTermsModalViewProps, LoyaltyTermsModal} from './components/loyalty-terms-modal';\nimport { ILoyaltyTermsData } from './loyalty-terms.data';\nimport { ILoyaltyTermsProps } from './loyalty-terms.props.autogenerated';\n\nexport interface ILoyaltyTermsState {\n checked: boolean;\n clicked: boolean;\n isModalOpen: boolean;\n}\nexport interface ILoyaltyTermsViewProps extends ILoyaltyTermsProps {\n LoyaltyTerms: IModuleProps;\n modalToggle: React.ReactElement;\n modal: ILoyaltyTermsModalViewProps;\n loading: boolean;\n}\n\n/**\n *\n * LoyaltyTerms component\n * @extends {React.Component>}\n */\nclass LoyaltyTerms extends React.Component, ILoyaltyTermsState> {\n private toggleRef: React.RefObject;\n private telemetryContent: ITelemetryContent;\n\n public constructor(props: ILoyaltyTermsProps) {\n super(props);\n this._toggle = this._toggle.bind(this);\n this._submit = this._submit.bind(this);\n this._checkboxChecked = this._checkboxChecked.bind(this);\n this.toggleRef = React.createRef();\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n let search = this.props.context.request.url.requestUrl.search;\n let isJoining = false;\n if (search) {\n search = search.substring(1);\n const qsps = search.split('&');\n for (let i = 0; i < qsps.length; i++) {\n const splitQsp = qsps[i].split('=');\n isJoining = splitQsp[0] === 'joiningLoyalty' && splitQsp[1] === 'true';\n if(isJoining) {\n break;\n }\n }\n }\n\n this.state = {\n isModalOpen: isJoining,\n checked: false,\n clicked: false\n };\n }\n\n public render(): JSX.Element | null {\n const {\n config: { className, hideToggle },\n resources,\n slots: { serviceTerms },\n data: { loyaltyCard },\n context: {\n request: {\n user: {\n isAuthenticated\n }\n }\n }\n } = this.props;\n const completeClass = classname('ms-loyalty-terms', className);\n\n const viewProps = {\n ...this.props,\n className: completeClass,\n LoyaltyTerms: {\n moduleProps: this.props,\n className: completeClass\n },\n loading: loyaltyCard.status === 'LOADING',\n modalToggle: (hideToggle !== true) && ,\n modal: isAuthenticated && loyaltyCard.result && loyaltyCard.result.CardNumber === undefined && LoyaltyTermsModal({\n resources: {...resources},\n returnRef: this.toggleRef,\n checked: this.state.checked,\n isOpen: this.state.isModalOpen,\n terms: serviceTerms,\n telemetryContent: this.telemetryContent,\n onToggle: this._toggle,\n onSubmit: this._submit,\n onCheck: this._checkboxChecked\n })\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n private _toggle(): void {\n this.setState({isModalOpen: !this.state.isModalOpen, checked: false});\n }\n\n private _submit(): void {\n if (this.props.context.request.user.isAuthenticated && !this.state.clicked) {\n this.setState({ clicked: true });\n const input = new IssueLoyaltyInput(this.props.context.request.apiSettings);\n\n issueLoyalty(input, this.props.context.actionContext)\n .then((card) => {\n if (this.props.config.redirectToLoyalty) {\n window.location.assign(getUrlSync('loyalty', this.props.context.actionContext) || '');\n } else {\n getLoyaltyCardAsync({ callerContext: this.props.context.actionContext }, card.CardNumber || '')\n .then((fullCard) => {\n this.props.context.actionContext.update(new GetLoyaltyCardInput(this.props.context.request.apiSettings), fullCard);\n })\n .catch((error: Error) => {\n this.props.context.actionContext.update(new GetLoyaltyCardInput(this.props.context.request.apiSettings), card);\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to fetch loyalty card');\n });\n }\n })\n .catch((error: Error) => {\n this.setState({ clicked: false });\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Unable to issue loyalty card');\n });\n }\n }\n\n private _checkboxChecked(): void {\n this.setState({checked: !this.state.checked});\n }\n}\n\nexport default LoyaltyTerms;","import { IModuleProps, Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {IReviewModalViewProps} from '../../common/review-modal';\nimport {IReportReviewModalViewProps} from './components/report-review-modal';\nimport {IReviewCardViewProps} from './components/review-card';\nimport { IReviewsListState, IReviewsListViewProps } from './reviews-list';\n\nconst ReviewsListview: React.FC = props => {\n const {\n averageRating,\n filterByDropdown,\n heading,\n moduleProps,\n noReviewsMessage,\n noReviewsWithFilterMessage,\n pageControls,\n refineReviewsProps,\n reportReviewModal,\n reviewsListProps,\n reviewCards,\n reviewCount,\n reviewModal,\n sortByDropdown,\n state,\n userReview\n } = props;\n\n if (!userReview && reviewCards.length === 0 && !state.isFilterApplied) {\n return {noReviewsMessage};\n }\n\n return (\n \n {heading}\n {averageRating}\n {reviewCount}\n { reviewCards.length === 0 ?\n null : \n {sortByDropdown}\n {filterByDropdown}\n \n }\n \n {userReview && buildReviewCard(userReview)}\n {reviewCards.map(review => {\n return buildReviewCard(review);\n })}\n \n { reviewCards.length === 0 && state.isFilterApplied && noReviewsWithFilterMessage}\n {pageControls}\n {createReviewModal(reviewModal, moduleProps)}\n {createReportModal(reportReviewModal, state)}\n \n );\n};\n\nconst buildReviewCard = (props: IReviewCardViewProps) => {\n return (\n \n \n {props.rating}\n {props.name}\n \n \n \n {props.reviewTitle}\n {props.date}\n {props.reviewText}\n \n \n {props.responseName}\n {props.responseDate}\n {props.responseText}\n \n \n {props.ratingHelpfulLabel}\n {props.like}\n {props.dislike}\n {props.edit}\n {props.report}\n \n \n \n );\n};\n\nconst createReviewModal = (props: IReviewModalViewProps, moduleProps: IModuleProps): JSX.Element => {\n return (\n \n {props.modalHeader}\n \n \n \n {props.rating}\n {props.ratingLabel}\n \n \n {props.titleLabel}\n {props.titleInput}\n \n \n {props.textLabel}\n {props.textInput}\n \n {props.privacyPolicyUrl}\n {props.error}\n \n \n \n {props.submitButton}\n {props.cancelButton}\n \n \n );\n};\n\nconst createReportModal = (props: IReportReviewModalViewProps, state: IReviewsListState): JSX.Element => {\n return (\n \n \n {state.reported ? props.headerSubmitted : props.header}\n \n \n {state.reported ? props.reportSubmittedMessage : [props.reportMessage, props.radioButtons, props.error]}\n \n \n {state.reported ? props.succesfulButton : [props.submitButton, props.cancelButton]}\n \n \n );\n};\n\nexport default ReviewsListview;","/*---------------------------------------------------------------------------------------------\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 * as React from 'react';\n\nexport interface IAccountLoyaltyLabel {\n className?: string;\n text?: string | number;\n}\n\nexport const AccountLoyaltyLabel: React.FC = ({ className, text }) => (\n

{ text }

\n);\n\nexport interface IAccountLoyaltyModalLabel {\n className?: string;\n text?: string | number;\n labelFor?: string;\n}\n\nexport const AccountLoyaltyModalLabel: React.FC = ({ className, text, labelFor }) => (\n \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 { Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, IPayLoad, ITelemetryContent, TelemetryConstant } from '@msdyn365-commerce-modules/utilities';\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { LoyaltyCard, LoyaltyRewardPoint, LoyaltyRewardPointActivity } from '@msdyn365-commerce/retail-proxy';\nimport { getLoyaltyRewardPointActivityTimelineAsync, getLoyaltyRewardPointsExpiringSoonAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/StoreOperationsDataActions.g';\nimport classnames from 'classnames';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\nimport { IAccountLoyaltyData } from './account-loyalty.data';\nimport { IAccountLoyaltyProps } from './account-loyalty.props.autogenerated';\nimport { AccountLoyaltyLabel, AccountLoyaltyModalLabel } from './components';\n\nexport interface IAccountLoyaltyViewProps extends IAccountLoyaltyProps<{}> {\n AccountLoyalty: IModuleProps;\n className: string;\n totalPoints: number;\n heading?: React.ReactNode;\n Info: INodeProps;\n infoLabel: React.ReactNode;\n cardNumber: React.ReactNode;\n joinDate: React.ReactNode;\n Points: INodeProps;\n pointsLabel: React.ReactNode;\n points: React.ReactNode;\n Breakdown: INodeProps;\n RewardPoints: INodeProps;\n PointsBreakdown: INodeProps;\n rewardPoints?: IAccountLoyaltyRewardPointProps[];\n Button: INodeProps;\n homeButton: React.ReactNode;\n pointsModal: IAccountLoyaltyModalProps;\n}\n\nexport interface IAccountLoyaltyState {\n isModalOpen: boolean;\n currentModalData?: LoyaltyRewardPoint;\n isModalExpiring: boolean;\n modalID: string;\n currentFocus?: React.RefObject;\n pointsActivity: LoyaltyRewardPointActivity[] | undefined;\n}\n\nexport interface IAccountLoyaltyRewardPointProps {\n label: React.ReactNode;\n availableModalLabel: React.ReactNode;\n availableModalTrigger: React.ReactNode;\n expiringModalLabel: React.ReactNode;\n expiringModalTrigger: React.ReactNode;\n}\n\nexport type horizontalModalPosition = 'left' | 'center' | 'right';\nexport type verticalModalPosition = 'top' | 'center' | 'bottom';\n\nexport interface IAccountLoyaltyModalProps {\n isOpen: boolean;\n horizontalPosition?: horizontalModalPosition;\n verticalPosition?: verticalModalPosition;\n modalClassName?: string;\n modalHeaderClassName?: string;\n modalHeader?: string;\n modalBodyClassName?: string;\n ModalBodyTop: INodeProps;\n pointsDescription?: React.ReactNode;\n totalPoints?: React.ReactNode;\n ModalBodyHeaders: INodeProps;\n date?: React.ReactNode;\n balanceLabel?: React.ReactNode;\n rewardPointsActivity?: IAccountLoyaltyActivityProps[];\n returnFocusRef?: React.RefObject;\n onClose(): void;\n}\n\nexport interface IAccountLoyaltyActivityProps {\n Activity: INodeProps;\n activityType: React.ReactNode;\n activityDate: React.ReactNode;\n activityPoints: React.ReactNode;\n}\n\nexport interface IProps extends IAccountLoyaltyProps { }\n\n/**\n *\n * AccountLoyalty component\n * @extends {React.Component>}\n */\n@observer\nclass AccountLoyalty extends React.PureComponent {\n private _buttonAvailableRef: React.RefObject;\n private _buttonExpireRef: React.RefObject;\n private telemetryContent?: ITelemetryContent;\n private payLoad: IPayLoad;\n\n constructor(props: IAccountLoyaltyProps) {\n super(props);\n this._buttonAvailableRef = React.createRef();\n this._buttonExpireRef = React.createRef();\n this.state = {\n isModalOpen: false,\n currentModalData: undefined,\n isModalExpiring: false,\n modalID: '',\n pointsActivity: undefined\n };\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, TelemetryConstant.BackToShopping);\n }\n\n public render(): JSX.Element | null {\n const { className, heading } = this.props.config;\n const { loyaltyCard } = this.props.data;\n const { loyaltyCardLabel, totalAvailablePointsLabel, backToShoppingText } = this.props.resources;\n const { actionContext } = this.props.context;\n const { isModalOpen } = this.state;\n const backToShopAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n\n if (!loyaltyCard || !loyaltyCard.result || !loyaltyCard.result.CardNumber) {\n this.props.context.telemetry.error('Loyalty card content is empty, module wont render');\n return null;\n }\n\n const loyaltyCardData = loyaltyCard.result;\n const rewardPoints = loyaltyCard && loyaltyCardData.RewardPoints;\n const homeLink = Msdyn365.getUrlSync('home', actionContext) || '';\n\n const viewProps = {\n ...this.props,\n AccountLoyalty: {\n moduleProps: this.props,\n className: classnames('ms-account-loyalty', className),\n },\n totalPoints: rewardPoints && this._getTotalPoints(),\n className: classnames('msc-account-loyalty', className),\n rewardPoints: loyaltyCardData.RewardPoints && loyaltyCardData.RewardPoints.length > 0 && this._renderRewardPoints(loyaltyCardData),\n pointsModal: isModalOpen && this._renderModal() || { isOpen: false, returnFocusRef: this.state.currentFocus },\n Info: { className: 'ms-account-loyalty__info' },\n Points: { className: 'ms-account-loyalty__points' },\n Breakdown: { className: 'ms-account-loyalty__breakdown' },\n RewardPoints: { className: 'ms-account-loyalty__reward-points' },\n PointsBreakdown: { className: 'ms-account-loyalty__point-breakdown' },\n Button: { className: 'ms-account-loyalty__link' },\n heading: heading &&\n (\n \n ),\n\n // account info\n infoLabel:\n (\n \n ),\n cardNumber:\n (\n \n ),\n joinDate:\n (\n \n ),\n\n // points\n pointsLabel:\n (\n \n ),\n points: rewardPoints &&\n (\n \n ),\n\n homeButton: rewardPoints &&\n (\n \n { backToShoppingText }\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading!.text= event.target.value;\n\n private _formatJoinDate(date: Date): string {\n return format(this.props.resources.joinDateFormatted,\n new Intl.DateTimeFormat(this.props.context.actionContext.requestContext.locale, { month: 'long', day: 'numeric', year: 'numeric' }).format(new Date(date)));\n }\n\n private _renderRewardPoints(loyaltyCard: LoyaltyCard): IAccountLoyaltyRewardPointProps[] {\n return loyaltyCard.RewardPoints!.map((loyaltyPoints, index) => {\n const availableId = loyaltyPoints.RewardPointId && `${ loyaltyPoints.RewardPointId }-available-${ index }` || 'available-points';\n const expiringId = loyaltyPoints.RewardPointId && `${ loyaltyPoints.RewardPointId }-expiring-${ index }` || 'expiring-points';\n const { availablePointsLabel, expiringPointsFormatLabel } = this.props.resources;\n this.payLoad.contentAction.etext = TelemetryConstant.AvailablePoints;\n const availablePointsAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = TelemetryConstant.ExpiringPoints;\n const expiringPointsAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n\n return ({\n label:\n (\n \n ),\n availableModalLabel: loyaltyPoints.ActivePoints !== undefined &&\n (\n \n ),\n availableModalTrigger: loyaltyPoints.ActivePoints !== undefined &&\n (\n \n {loyaltyPoints.ActivePoints.toString()}\n \n ),\n expiringModalLabel: loyaltyPoints.PointsExpiringSoon !== undefined &&\n (\n \n ),\n expiringModalTrigger: loyaltyPoints.PointsExpiringSoon !== undefined &&\n (\n \n {loyaltyPoints.PointsExpiringSoon.toString()}\n \n )\n });\n });\n }\n\n private _renderModal(): IAccountLoyaltyModalProps | null {\n const { totalAvailablePointsLabel, loyaltyActivityDateLabel, loyaltyActivityBalanceLabel } = this.props.resources;\n const { isModalOpen, currentModalData } = this.state;\n\n if (!isModalOpen || !currentModalData) {\n // return empty modal\n this.props.context.telemetry.error('Account loyalty modal content is empty, module wont render');\n return null;\n }\n\n return {\n isOpen: isModalOpen,\n returnFocusRef: this.state.currentFocus,\n horizontalPosition: 'center',\n verticalPosition: 'center',\n modalClassName: 'ms-account-loyalty__points-modal',\n modalHeaderClassName: 'ms-account-loyalty__points-modal-header',\n modalHeader: currentModalData.Description || '',\n modalBodyClassName: 'ms-account-loyalty__points-modal-body',\n ModalBodyTop: { className: 'ms-account-loyalty__points-modal-body-top' },\n ModalBodyHeaders: { className: 'ms-account-loyalty__points-modal-body-header' },\n rewardPointsActivity: this._renderPointsActivity(),\n pointsDescription:\n (\n \n ),\n totalPoints:\n (\n \n ),\n date:\n (\n \n ),\n balanceLabel:\n (\n \n ),\n onClose: this._closeModal\n };\n }\n\n private _getTotalPoints(): number {\n const rewardPoints = this.props.data.loyaltyCard.result && this.props.data.loyaltyCard.result.RewardPoints;\n\n let total = 0;\n rewardPoints!.forEach(loyaltyPoints => {\n total += loyaltyPoints.ActivePoints || 0;\n });\n\n return total;\n }\n\n private _getPoints(): string {\n const { currentModalData, isModalExpiring } = this.state;\n\n return `${(isModalExpiring ? currentModalData!.PointsExpiringSoon : currentModalData!.ActivePoints) || 0}`;\n }\n\n private _renderPointsActivity(): IAccountLoyaltyActivityProps[] | undefined {\n const { pointsActivity } = this.state;\n\n if (!pointsActivity) {\n this.props.context.telemetry.error('Points activity content is empty, module wont render');\n return undefined;\n }\n\n return pointsActivity.map((activity) => {\n return ({\n Activity: { className: 'ms-account-loyalty__points-modal-activity' },\n activityType:\n (\n \n ),\n activityDate:\n (\n \n ),\n activityPoints:\n (\n \n )\n });\n });\n }\n\n private _parseDate(date: Date | string): Date {\n /* Dates for loyalty are coming as formatted strings yyyy-mm-ddT:00:00.000z\n Javascript was interpreting this as an iso format, thus causing the wrong date to be rendered */\n if (typeof date === 'string') {\n let dateString = date.toString();\n dateString = dateString.replace(/-/g, '/');\n dateString = dateString.substring(0, 10);\n return new Date(dateString);\n } else {\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());\n }\n }\n\n private _getTimelineType(pointActivity: LoyaltyRewardPointActivity): string {\n if (pointActivity.LoyaltyRewardPointTimelineEntryType) {\n return pointActivity.LoyaltyRewardPointTimelineEntryType;\n }\n\n const { earnedPointsLabel, redeemedPointsLabel, adjustedPointsLabel, refundedPointsLabel } = this.props.resources;\n switch (pointActivity.ExtensibleLoyaltyRewardPointActivityEntryTypeValue) {\n case 1:\n return earnedPointsLabel;\n case 2:\n return refundedPointsLabel;\n case 3:\n return redeemedPointsLabel;\n case 5:\n return adjustedPointsLabel;\n default:\n return '';\n }\n }\n\n private _populateModalData = (focusRef: React.RefObject, loyaltyCard: LoyaltyCard, currentLoyaltyPoints: LoyaltyRewardPoint, expiring: boolean) => () => {\n if (!loyaltyCard || !loyaltyCard.CardNumber || !currentLoyaltyPoints.RewardPointId) {\n this.props.context.telemetry.error('Modal data is empty, module wont render');\n return null;\n }\n\n const { actionContext } = this.props.context;\n // open modal\n this.setState({\n isModalOpen: true,\n currentModalData: currentLoyaltyPoints,\n isModalExpiring: expiring,\n modalID: '',\n currentFocus: focusRef,\n });\n\n if (expiring) {\n getLoyaltyRewardPointsExpiringSoonAsync({ callerContext: actionContext, queryResultSettings: {} }, loyaltyCard.CardNumber, currentLoyaltyPoints.RewardPointId, 30)\n .then((points: LoyaltyRewardPointActivity[]) => {\n this.setState({pointsActivity: points});\n })\n .catch((error: Error) => {\n this.props.telemetry.exception(error);\n this.props.telemetry.debug('Failed to get reward point activity');\n });\n } else {\n getLoyaltyRewardPointActivityTimelineAsync({ callerContext: actionContext, queryResultSettings: {} }, loyaltyCard.CardNumber, currentLoyaltyPoints.RewardPointId)\n .then((points: LoyaltyRewardPointActivity[]) => {\n this.setState({pointsActivity: points});\n })\n .catch((error: Error) => {\n this.props.telemetry.error(error.message);\n this.props.telemetry.debug('Failed to get reward point activity');\n });\n }\n\n return;\n }\n\n private _closeModal = () => {\n this.setState({\n isModalOpen: false,\n currentModalData: undefined,\n pointsActivity: undefined\n });\n }\n}\n\nexport default AccountLoyalty;\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 { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { IAccountLoyaltyTileViewProps } from './account-loyalty-tile';\n\nconst AccountLoyaltyTileView: React.FC = props => {\n const { AccountLoyaltyTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountLoyaltyTileView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IOrderConfirmationViewProps,\n IOrderInformation,\n ISalesLine\n} from './order-confirmation';\n\nimport {\n IHelp,\n IOrderSummary,\n IPaymentMethods,\n\n} from '../../common';\n\nexport const OrderConfirmationOrderInfomation: React.FC = ({\n orderInformationProps,\n receiptEmail,\n createdDate,\n channelReferenceId\n}) => (\n \n {createdDate}\n {channelReferenceId}\n {receiptEmail}\n \n );\n\nexport const OrderConfirmationSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n \n);\n\nexport const OrderConfirmationGroupDelivery: React.FC = ({ deliveryProps, heading, count, processing, address, trackingInfo, pickupDateTimeslot }) => (\n \n {heading}\n {address}\n {pickupDateTimeslot}\n \n);\n\nexport const OrderConfirmationGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {delivery && delivery.shippingItemsToYou}\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n ))}\n \n )}\n \n);\n\nexport const OrderConfirmationGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderConfirmationOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderConfirmationHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderConfirmationView: React.FC = ({\n moduleProps,\n heading,\n backToShoppingLink,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {backToShoppingLink}\n {groups && }\n {payment && }\n {orderSummary && }\n {help && }\n \n );\n};\n\nexport default OrderConfirmationView;\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 * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\n\nimport { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutBillingAddressViewProps } from './checkout-billing-address';\n\nconst AddressShow: React.FC = ({\n AddressDetail,\n items\n}) => {\n\n return (\n \n {items && items.map((item: IAddressShowItem) => {\n return (\n <>\n {item.description}\n \n );\n })}\n \n );\n};\n\nconst AddressAddUpdate: React.FC = ({\n AddressForm,\n heading,\n items,\n hasError,\n error,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton,\n}) => {\n\n return (\n \n {heading}\n {items && items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n {label}\n {alert}\n {input}\n );\n })}\n {hasError && \n {error.title}\n {error.message}\n }\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\nconst CheckoutBillingAddressView: React.FC = props => {\n const { CheckoutBillingAddress, viewState, heading, sameAsShippingCheckbox, showAddress, showAddOrUpdateAddress } = props;\n\n return (\n \n {heading}\n {viewState.isShowSameAsShippingCheckbox && sameAsShippingCheckbox}\n {viewState.isShowAddress && }\n {viewState.isShowAddOrUpdateAddress && }\n \n );\n};\n\nexport default CheckoutBillingAddressView;\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 { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\nimport { ICarouselData } from './carousel.data';\nimport { ICarouselProps } from './carousel.props.autogenerated';\nimport { ICarouselState } from './carousel.state';\n\nexport interface ICarouselViewProps extends ICarouselProps<{}>, ICarouselState {\n closeAnimation: string;\n carouselContainer: IModuleProps;\n telemetryContent: ITelemetryContent;\n next(): void;\n previous(): void;\n onIndicatorsClickHandler():void;\n handleDismissCarousel(): void;\n handleOnExited(): void;\n handleOnExiting(): void;\n}\n\n/**\n *\n * CarouselModule component\n * @extends {React.PureComponent>}\n */\nclass CarouselModule extends React.PureComponent, ICarouselState> {\n private animating: boolean;\n private telemetryContent: ITelemetryContent;\n\n constructor(props: ICarouselProps, state: ICarouselState) {\n super(props);\n this.state = { activeIndex: 0, closeNow: false, dismissCarousel: false };\n this.animating = false;\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry);\n }\n\n public componentDidMount(): void {\n if(this.props.context && this.props.context.request && this.props.context.request.cookies) {\n if (this.props.context.request.cookies.get(`CarouselDismiss_${this.props.id}`) === undefined) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'false');\n this.setState({ dismissCarousel: false });\n }\n }\n }\n\n public render(): JSX.Element | null {\n if (this.state.dismissCarousel) {\n return null;\n }\n\n const { className } = this.props.config;\n\n const viewProps = {\n // Context for telemetry and raw data for C1 to do customization\n // Including computed data, state data and methods\n ...this.props,\n ...this.state,\n telemetryContent: this.telemetryContent,\n carouselContainer: {\n moduleProps: this.props,\n className: classnames('ms-carousel', className)\n },\n closeAnimation: this.state.closeNow ? 'close-now' : '',\n next: this._next,\n previous: this._previous,\n onIndicatorsClickHandler: this._goToIndex,\n handleDismissCarousel: this._handleDismissCarousel,\n handleOnExited: this._onExited,\n handleOnExiting: this._onExiting};\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * function implementation to dismiss the Carousel\n */\n private _handleDismissCarousel = (): void => {\n if(this.props.context && this.props.context.request && this.props.context.request.cookies) {\n this.props.context.request.cookies.set(`CarouselDismiss_${this.props.id}`, 'true');\n this.setState({ dismissCarousel: true });\n }\n }\n\n /**\n * function implementation to move to next slide\n */\n private _next = (): void => {\n const { slots } = this.props;\n const nextIndex = this.state.activeIndex === (slots && slots.content && slots.content.length - 1) ? 0 : this.state.activeIndex + 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n }\n\n /**\n * function implementation to move to previous slide\n */\n private _previous = (): void => {\n const slots = this.props.slots && this.props.slots.content;\n const nextIndex = this.state.activeIndex === 0 ? (slots ? slots.length - 1 : 0) : this.state.activeIndex - 1;\n\n if (this.animating) {\n this.setState({ closeNow: true, activeIndex: nextIndex });\n } else {\n this.setState({ activeIndex: nextIndex });\n }\n }\n\n private _onExiting = (): void => {\n this.animating = true;\n }\n\n private _onExited = (): void => {\n this.animating = false;\n this.setState({ closeNow: false });\n }\n\n /**\n * function implementation to move to a given slide\n */\n private _goToIndex = (newIndex: number): void => {\n if (this.animating) { return; }\n this.setState({ activeIndex: newIndex });\n }\n}\n\nexport default CarouselModule;\n","import { Module } from '@msdyn365-commerce-modules/utilities';\n/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\nimport { IAccountInvoiceTileViewProps } from './account-invoice-tile';\n\nexport default (props: IAccountInvoiceTileViewProps) => {\n const { AccountInvoiceTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n","import * as React from 'react';\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\n\nimport { ILoyaltyTermsViewProps } from './loyalty-terms';\n\nconst LoyaltyTermsView: React.FC = props => {\n const {LoyaltyTerms, modalToggle, modal, loading } = props;\n\n return !loading && modal ? (\n \n {modalToggle}\n \n \n {modal.heading}\n \n \n {modal.terms}\n \n {modal.checkbox}\n {modal.agreeText}\n \n \n \n {modal.submitButton}\n {modal.cancelButton}\n \n \n \n ) : null;\n};\n\nexport default LoyaltyTermsView;\n","/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nimport {\n IGroup,\n IGroupDelivery,\n IGroups,\n IHelp,\n IOrderDetailsViewProps,\n IOrderInformation,\n IOrderSummary,\n IPaymentMethods,\n ISalesLine\n} from '@msdyn365-commerce-modules/order-management';\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport const OrderInfomation: React.FC = ({\n orderInformationProps,\n salesId,\n receiptId,\n createdDate,\n count,\n amount,\n channelReferenceId,\n channelName,\n channelAddress\n}) => (\n \n {channelName}\n {channelAddress}\n {salesId}\n {receiptId}\n {createdDate}\n {count}\n {amount}\n {channelReferenceId}\n \n );\n\nexport const SalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n {buyAgainButton}\n \n);\n\nexport const GroupDelivery: React.FC = ({ deliveryProps, heading, count, trackingInfo, shippedStatusCheck }) => (\n \n {heading}\n {count}\n {shippedStatusCheck === 'shipped' ? null : trackingInfo}\n \n);\n\nexport const Group: React.FC = ({ groupProps, delivery, address, salesLinesProps, salesLines }) => (\n \n {delivery && }\n \n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n {salesLine.data.deliveryType === 'ship' && salesLine.data.shipment ? salesLine.trackingInfo : null}\n \n {salesLine.salesStatus}\n \n ))}\n \n )}\n {!delivery.showTimeslot && address}\n {delivery.showTimeslot && (\n \n {address}\n {delivery.pickupDateTimeslot}\n \n )}\n \n \n);\n\nexport const Groups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const Payment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const Help: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderDetailsView: React.FC = ({\n moduleProps,\n heading,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {groups && }\n \n {orderSummary && }\n {payment && }\n \n {help && }\n \n );\n};\n\nexport default OrderDetailsView;\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';\nimport { IForm, IItem } from './components';\nimport { IGiftCardBalanceCheckViewProps } from './gift-card-balance-check';\n\nexport const Form: React.FC = ({ formProps, label, inputPinLabel, inputExpLabel, alert, inputProps, inputNumProps,\n inputPinProps, inputExpProps, inputNumber, inputPin, inputExp, applyButton, supportExternalGiftCard, showGiftCardPinInput, showGiftCardExpInput, alertFieldLabel }) => (\n \n {alert}\n {supportExternalGiftCard ?\n \n \n {label}\n {inputNumber}\n \n {showGiftCardPinInput &&\n \n {inputPinLabel}\n {inputPin}\n \n }\n {showGiftCardExpInput &&\n \n {inputExpLabel}\n {inputExp}\n \n }\n {(showGiftCardPinInput || showGiftCardExpInput) && alertFieldLabel}\n \n : <>{label}{inputNumber}\n }\n {applyButton}\n \n);\n\nexport const Item: React.FC = ({ itemProps, selectedGiftCard }) => (\n \n {selectedGiftCard}\n \n);\n\nconst GiftCardBalanceCheckView: React.FC = props => {\n const { giftCardBalanceCheckProps, form, item } = props;\n return (\n \n {form &&
}\n {item && }\n
\n );\n};\n\nexport default GiftCardBalanceCheckView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport {\n ICheckoutOrderConfirmationViewProps,\n IGroup,\n IGroupDelivery,\n IGroups,\n IOrderInformation,\n ISalesLine\n} from './checkout-order-confirmation';\n\nimport {\n IHelp,\n IOrderSummary,\n IPaymentMethods,\n\n} from '../../common';\n\nexport const OrderConfirmationOrderInfomation: React.FC = ({\n orderInformationProps,\n receiptEmail,\n createdDate,\n channelReferenceId\n}) => (\n \n {channelReferenceId}\n {receiptEmail}\n \n );\n\nexport const OrderConfirmationSalesLine: React.FC = ({ salesLineProps, salesLine, buyAgainButton }) => (\n \n {salesLine}\n \n);\n\nexport const OrderConfirmationGroupDelivery: React.FC = ({ deliveryProps, heading, count, processing, address, pickupDateTimeslot, trackingInfo }) => (\n \n {heading}\n {count}\n {address}\n {pickupDateTimeslot}\n \n);\n\nexport const OrderConfirmationGroup: React.FC = ({ groupProps, delivery, salesLinesProps, salesLines }) => (\n \n {delivery && }\n {salesLines && (\n \n {salesLines.map(salesLine => (\n \n ))}\n \n )}\n \n);\n\nexport const OrderConfirmationGroups: React.FC = ({ groupsProps, groups }) => (\n \n {groups.map((group, index) => (\n \n ))}\n \n);\n\nexport const OrderConfirmationOrderSummary: React.FC = ({ orderSummaryProps, heading, subtotal, shipping, tax, totalAmount, earnedPoints }) => (\n \n {heading}\n {subtotal}\n {shipping}\n {tax}\n {totalAmount}\n {earnedPoints}\n \n);\n\nexport const OrderConfirmationPayment: React.FC = ({ paymentMethodsProps, title, methods }) => (\n \n {title}\n {methods}\n \n);\n\nexport const OrderConfirmationHelp: React.FC = ({ helpProps, needHelpLabel, helpLineNumberLabel, contactNumber }) => (\n \n {needHelpLabel}\n {helpLineNumberLabel}\n {contactNumber}\n \n);\n\nconst OrderConfirmationView: React.FC = ({\n moduleProps,\n heading,\n backToShoppingLink,\n alert,\n loading,\n orderInfomation,\n orderSummary,\n payment,\n help,\n groups\n}) => {\n return (\n \n {heading}\n {alert}\n {loading}\n {orderInfomation && }\n {backToShoppingLink}\n {groups && }\n {orderSummary && }\n {payment && }\n {help && }\n \n );\n};\n\nexport default OrderConfirmationView;\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 { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\nimport { ICheckoutDeliveryOption, ICheckoutDeliveryOptionEdit, ICheckoutDeliveryOptionsError, ICheckoutDeliveryOptionsList, ICheckoutDeliveryOptionsViewProps } from './checkout-delivery-options';\n\nconst DeliveryOptionList: React.FC = ({\n DeliveryOptionsList,\n list\n}) => {\n if (!list || list.length === 0) {\n return null;\n }\n\n return (\n \n {list.map((deliveryOption: ICheckoutDeliveryOptionEdit) => {\n return (\n {deliveryOption.radioButton}\n {deliveryOption.description}\n {deliveryOption.price}\n );\n })}\n \n );\n};\n\nconst DeliveryOptionSelected: React.FC = ({\n DeliveryOption,\n description,\n price,\n}) => {\n\n return (\n \n {description}\n {price}\n \n );\n};\n\nconst ErrorMessage: React.FC = ({\n Error,\n title,\n message,\n}) => {\n\n return (\n \n {title}\n {message}\n \n );\n};\n\nconst CheckoutDeliveryOptionsView: React.FC = props => {\n const { CheckoutDeliveryOptions,\n viewState,\n deliveryOptions,\n deliveryOptionSelected,\n errorMessage,\n waiting,\n saveButton,\n editButton,\n cancelButton } = props;\n\n return (\n // TODO: All wrapper div should be provided by viewProps. Once SDK provide the sln, update markup.\n \n {viewState.isLoading && waiting}\n {viewState.isError && errorMessage && }\n {viewState.isShowList && deliveryOptions && }\n {viewState.isShowSelected && deliveryOptionSelected && }\n {viewState.isShowSaveButton && saveButton}\n {viewState.isShowEditButton && editButton}\n {viewState.isShowCancelButton && cancelButton}\n \n );\n};\n\nexport default CheckoutDeliveryOptionsView;","import {Alert} from '@msdyn365-commerce-modules/utilities';\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport React from 'react';\n\nexport interface IInvoiceErrorProps extends IComponentProps {\n messageHeader: string;\n errorMessage: string;\n otherError?: string;\n showError: boolean;\n}\n\nexport interface IInvoiceErrorComponent extends IComponent {\n}\n\nexport const InvoiceError: React.FC = ({ messageHeader, errorMessage, otherError, showError }) => {\n const errorMessages: (string | undefined)[] = [];\n errorMessages.push(errorMessage);\n\n if (otherError) {\n errorMessages.push(otherError);\n }\n\n return (\n 0} color='danger' assertive={true} aria-label={messageHeader} >\n \n {errorMessages.map((message, index) => {\n return (\n
{message}
\n );\n })}\n
\n );\n};\n\n// @ts-ignore\nexport const InvoiceErrorComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoiceError',\n { component: InvoiceError }\n);","import React from 'react';\n\nimport { EnumExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Popover } from '@msdyn365-commerce-modules/utilities';\nimport { IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\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\nconst renderFilterStateItem = (\n filterState: InvoicesFilterState,\n resources: IInvoicesFilterResources,\n className: string,\n onStateClick: (filterState: InvoicesFilterState) => void): React.ReactNode => {\n\n const stateStringRepresentation = InvoicesFilterState[filterState];\n\n const onClick = () => {\n return onStateClick(filterState);\n };\n\n return (\n \n {getInvoicesFilterStateResources(filterState, resources)}\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 = () => {\n setPopoverState(!popoverState);\n };\n\n const [filterState, setFilterState] = React.useState(props.currentState);\n\n const onFilterStateClick = (clickedState: InvoicesFilterState) => {\n setFilterState(clickedState);\n setPopoverState(false);\n props.onFilterStateChanged(clickedState);\n };\n\n return (\n
\n \n {getInvoicesFilterStateResources(filterState, props.resources)}\n \n \n {\n EnumExtensions.getEnumValues(InvoicesFilterState).map(state => {\n return renderFilterStateItem(state, props.resources, props.className, onFilterStateClick);\n })\n }\n \n
\n );\n};\n\n// @ts-ignore\nexport const InvoicesFilterComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesFilterComponent',\n { component: InvoicesFilter }\n);","import { 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}\n\nexport interface IInvoicesTableHeaderProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n isSelectedAll: boolean;\n isMobile: boolean;\n isAdmin: boolean;\n\n resources: IInvoicesTableHeaderResources;\n\n onSelectAll(isSelected: boolean): void;\n}\n\nexport interface IInvoicesTableHeaderComponent extends IComponent {\n}\n\nconst getDesktopHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n
\n \n \n { props.isAdmin ? : null }\n \n \n \n \n \n \n );\n};\n\nconst getMobileHeaderCells = (props: IInvoicesTableHeaderProps, rowClassName: string, switchCheckedState: () => void) => {\n const { resources } = props;\n return (\n <>\n \n \n \n \n \n {headerCells}\n \n \n );\n};\n\n// @ts-ignore\nexport const InvoicesTableHeaderComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableHeaderComponent',\n { component: InvoicesTableHeader }\n);","import { 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 case InvoicePaidStatus.Unpaid:\n return resources.invoiceStatusUnpaid;\n case InvoicePaidStatus.PartiallyPaid:\n return resources.invoiceStatusPartiallyPaid;\n case InvoicePaidStatus.Paid:\n return resources.invoiceStatusPaid;\n default:\n return '';\n }\n};","import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getUrlSync, IActionContext } from '@msdyn365-commerce/core';\nimport { getCartState } from '@msdyn365-commerce/global-state';\nimport { IInvoiceErrorState } from '../invoices-list';\nimport { InvoiceModel } from './invoice-data';\n\nexport type ICartActionFailureReason = 'EMPTYINPUT' | 'CARTACTIONFAILED';\nexport interface IAddInvoicesToCartFailureResult {\n failureReason: ICartActionFailureReason;\n}\n\nexport const payInvoices = async (invoices: InvoiceModel[], actionContext: IActionContext, onError: (errorState: IInvoiceErrorState) => void) => {\n const invoicesToAdd: string[] = invoices.filter(invoice => invoice.canBePaid).map(invoice => invoice.id!);\n\n if (!ArrayExtensions.hasElements(invoicesToAdd)) {\n return onError({ errorMessage: '', errorReason: { failureReason: 'EMPTYINPUT' } });\n }\n\n const cartState = await getCartState(actionContext);\n const result = await cartState.addInvoicesToCart({invoiceIds: invoicesToAdd});\n\n if (result.status !== 'SUCCESS') {\n return onError({\n errorMessage: '',\n errorReason: { failureReason: 'CARTACTIONFAILED'},\n otherError: result.errorDetails?.LocalizedMessage\n });\n }\n\n const cartUrl = getUrlSync('cart', actionContext);\n if (cartUrl) {\n window?.location.assign(cartUrl);\n }\n};","import { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport React, { useState } from 'react';\nimport { InvoiceModel } from '../helpers/invoice-data';\nimport { payInvoices } from '../helpers/pay-invoices';\nimport { IInvoiceErrorState } from '../invoices-list';\n\ninterface IPayInvoiceData {\n invoice: InvoiceModel;\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\n resources: IPayInvoiceResources;\n\n onError?(errorState: IInvoiceErrorState): void;\n}\n\ninterface IPayInvoiceComponent extends IComponent {\n}\n\nconst onClick = async (_event: React.MouseEvent, props: IPayInvoiceProps, setDisabled: (disabled: boolean) => void): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState);\n }\n setDisabled(false);\n };\n\n await payInvoices([props.data.invoice], props.context.actionContext, propagateError);\n};\n\nconst PayInvoiceComponentActions = {\n onClick: onClick\n};\n\nconst PayInvoice: React.FC = (props: IPayInvoiceProps): JSX.Element => {\n const [disabled, setDisabled] = useState(false);\n\n const onClickHandler = async (event: React.MouseEvent) => {\n await PayInvoiceComponentActions.onClick(event, props, setDisabled);\n };\n\n return (\n \n {props.resources.payInvoiceButtonText}\n \n );\n};\n\n// @ts-ignore\nexport const PayInvoiceComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'PayInvoiceComponent',\n { component: PayInvoice, ...PayInvoiceComponentActions }\n);","import { StringExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button } from '@msdyn365-commerce-modules/utilities';\nimport { IComponent, IComponentProps, ICoreContext, IDateFormatOptions, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport React, { useState } from 'react';\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';\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}\n\nexport interface IInvoicesTableRowProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n isMobile: boolean;\n\n resources: IInvoicesTableRowResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState): void;\n}\n\nexport interface IInvoicesTableRowComponent extends IComponent {\n\n}\n\nconst formatAmount = (context: ICoreContext, amount: number | undefined, currencyCode: string | undefined) => {\n if (amount === undefined) {\n return '';\n }\n return context.cultureFormatter.formatCurrency(amount, currencyCode);\n};\n\nconst formatDate = (context: ICoreContext, date: Date | undefined) => {\n if (date === undefined) {\n return '';\n }\n const dateOptions: IDateFormatOptions = { year: 'numeric', month: 'long', day: 'numeric'};\n return context.cultureFormatter.formatDate(date, dateOptions);\n};\n\nconst getDesktopRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const { data: { invoice, index, customer } } = props;\n\n const isCurrentUser = !StringExtensions.isNullOrWhitespace(customer.AccountNumber) && customer.AccountNumber === invoice.customerAccountNumber;\n const payInvoiceClassName = `${props.className}__pay-invoice`;\n\n return (\n <>\n \n {/* TODO: Add redirection to the invoice details page. */}\n \n { customer.IsB2bAdmin ? : null }\n \n \n \n \n \n \n );\n};\n\nconst extraActionsPopup = (props: IInvoicesTableRowProps): JSX.Element | null => {\n const { resources: { invoiceViewDetailsButtonAriaLabel, invoiceViewDetailsButtonText }, data: { index } } = props;\n\n const [showActions, setShowActions ] = useState(false);\n\n const onClickViewDetails = () => {\n // TODO: Add redirection to the invoice details page.\n return;\n };\n\n const toggle = (event: React.MouseEvent) => {\n setShowActions(!showActions);\n };\n\n const className = `${props.className}__extra-actions-cell`;\n const actionsContainerClassName = `${className}__actions-container`;\n const payInvoiceClassName = `${actionsContainerClassName}__pay-invoice`;\n\n return (\n
\n {\n \n
\n }\n \n );\n};\n\nconst getMobileRowCells = (props: IInvoicesTableRowProps, onSelectLine: () => void) => {\n const { data: { invoice } } = props;\n\n return (\n <>\n \n \n \n \n \n );\n};\n\nconst InvoicesTableRow: React.FC = (props: IInvoicesTableRowProps): JSX.Element => {\n const { data: { invoice } } = props;\n\n const onSelectLine = () => {\n invoice.isSelected = !invoice.isSelected;\n props.onChange();\n };\n\n let rowCells: JSX.Element;\n if (props.isMobile) {\n rowCells = getMobileRowCells(props, onSelectLine);\n } else {\n rowCells = getDesktopRowCells(props, onSelectLine);\n }\n\n return (\n \n {rowCells}\n \n );\n};\n\n// @ts-ignore\nexport const InvoicesTableRowComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableRowComponent',\n { component: InvoicesTableRow }\n);","import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { IComponent, IComponentProps, ICoreContext, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy';\nimport React, { useState } from 'react';\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\n// tslint:disable-next-line:no-empty-interface\nexport interface IInvoicesTableResources extends IInvoicesTableHeaderResources, IInvoicesTableRowResources {\n}\n\nexport interface IInvoicesTableProps extends IComponentProps {\n context: ICoreContext;\n className: string;\n\n resources: IInvoicesTableResources;\n\n onChange(): void;\n onError?(errorState: IInvoiceErrorState): void;\n}\n\nexport interface IInvoicesTableComponent extends IComponent {\n}\n\ntype GridSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';\n\nconst getViewport = (context: ICoreContext): GridSize => {\n // Always render in mobile viewport on a mobile device\n if (context.request && context.request.device && context.request.device.Type === 'Mobile') {\n return 'xs';\n }\n\n if (window?.innerWidth) {\n const gridSettings = context.request.gridSettings;\n if (gridSettings) {\n if (gridSettings.xs && window.innerWidth <= gridSettings.xs.w) {\n return 'xs';\n } else if (gridSettings.sm && window.innerWidth <= gridSettings.sm.w) {\n return 'sm';\n } else if (gridSettings.md && window.innerWidth <= gridSettings.md.w) {\n return 'md';\n } else if (gridSettings.lg && window.innerWidth <= gridSettings.lg.w) {\n return 'lg';\n } else {\n return 'xl';\n }\n }\n }\n\n return 'xs';\n};\n\nconst isMobileView = (context: ICoreContext) => {\n const viewport = getViewport(context);\n return viewport === 'xs' || viewport === 'sm';\n};\n\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 const onSelectAll = (isSelected: boolean) => {\n props.data.invoices.forEach((invoice) => {\n invoice.isSelected = isSelected;\n });\n props.onChange();\n };\n\n return (\n
\n \n {resources.invoiceNumberText}{resources.invoiceDateText}{resources.invoiceUsersText}{resources.invoiceAmountText}{resources.invoiceDueDateText}{resources.invoiceAmountDueText}{resources.invoiceStatusText}{resources.invoiceActionsText}\n \n {resources.invoicesText}{resources.invoiceDateMobileText} {/* Actions */}\n \n );\n};\n\nconst InvoicesTableHeader: React.FC = (props: IInvoicesTableHeaderProps): JSX.Element => {\n const rowClassName = `${props.className}__row`;\n\n const switchCheckedState = () => {\n props.onSelectAll(!props.isSelectedAll);\n };\n\n let headerCells: JSX.Element;\n if (props.isMobile) {\n headerCells = getMobileHeaderCells(props, rowClassName, switchCheckedState);\n } else {\n headerCells = getDesktopHeaderCells(props, rowClassName, switchCheckedState);\n }\n\n return (\n
\n \n {invoice.id}{formatDate(props.context, invoice.invoiceDate)}{invoice.customerName}{ isCurrentUser ? {props.resources.invoiceCurrentUser} : null}{formatAmount(props.context, invoice.amount, invoice.currencyCode)}{formatDate(props.context, invoice.dueDate)}{formatAmount(props.context, invoice.amountDue, invoice.currencyCode)}{getInvoiceStatusText(props.resources, invoice.status)}\n \n \n \n \n {invoice.id} {/* TODO: Add redirection to the invoice details page. */}\n
\n {invoice.customerName}\n
\n {formatDate(props.context, invoice.dueDate)}\n
\n {getInvoiceStatusText(props.resources, invoice.status)}\n
\n {extraActionsPopup(props)}\n
\n invoice.isSelected)}\n isMobile={isMobile}\n isAdmin={props.data.customer.IsB2bAdmin || false}\n onSelectAll={onSelectAll}\n resources={props.resources}\n data={{}}\n />\n {\n props.data.invoices.map((invoice, index) => {\n return (\n \n );\n })\n }\n
\n );\n};\n\n// @ts-ignore\nexport const InvoicesTableComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'InvoicesTableComponent',\n { component: InvoicesTable }\n);","import { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { IComponent, IComponentProps, ICoreContext, ITelemetry, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport React, { useState } from 'react';\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\n resources: IMakePaymentResources;\n\n onError?(errorState: IInvoiceErrorState): void;\n}\n\nexport interface IMakePaymentComponent extends IComponent {\n}\n\nconst onClick = async (_event: React.MouseEvent, props: IMakePaymentProps, setDisabled: (disabled: boolean) => void): Promise => {\n setDisabled(true);\n\n const propagateError = (errorState: IInvoiceErrorState): void => {\n if (props.onError) {\n props.onError(errorState);\n }\n setDisabled(false);\n };\n\n await payInvoices(props.data.invoices, props.context.actionContext, propagateError);\n};\n\nconst MakePaymentComponentActions = {\n onClick: onClick\n};\n\nconst MakePayment: React.FC = (input: IMakePaymentProps): JSX.Element => {\n const { data: { invoices } } = input;\n const hasInvoices = ArrayExtensions.hasElements(invoices.filter(invoice => invoice.canBePaid));\n const [disabled, setDisabled] = useState(false);\n\n const onClickHandler = async (event: React.MouseEvent) => {\n await MakePaymentComponentActions.onClick(event, input, setDisabled);\n };\n\n return (\n \n {input.resources.makePaymentButtonText}\n \n );\n};\n\n// @ts-ignore\nexport const MakePaymentComponent: React.FunctionComponent = msdyn365Commerce.createComponent(\n 'MakePayment',\n { component: MakePayment }\n);","import { InvoicePaidStatus, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\n\n/**\n * Represents invoice data model.\n */\nexport class InvoiceModel {\n public id?: string;\n public invoiceDate?: Date;\n public customerAccountNumber?: string;\n public customerName?: string;\n public amount?: number;\n public dueDate?: Date;\n public amountDue?: number;\n public status?: InvoicePaidStatus;\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;\n this.customerAccountNumber = invoice.CustomerAccountNumber;\n this.customerName = invoice.CustomerName;\n this.amount = invoice.TotalAmount;\n this.dueDate = invoice.InvoiceDueDate;\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 * 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 { ArrayExtensions, getInvoices, GetInvoicesInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, Heading, IModuleProps } from '@msdyn365-commerce-modules/utilities';\nimport { getUrlSync } from '@msdyn365-commerce/core';\nimport { InvoicePaidStatus, InvoiceSearchCriteria, InvoiceType, OrderInvoice } from '@msdyn365-commerce/retail-proxy';\nimport classnames from 'classnames';\nimport * as React from 'react';\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 { 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}\n\nexport interface IInvoiceErrorState {\n errorHost?: InvoiceErrorHost;\n errorReason?: IAddInvoicesToCartFailureResult;\n errorMessage: string;\n otherError?: string;\n}\n\nexport interface IInvoicesListState {\n invoices: InvoiceModel[];\n invoicesFilterState: InvoicesFilterState;\n errorState: IInvoiceErrorState;\n isLoading: boolean;\n}\n\n/**\n * InvoicesList component\n * @extends {React.PureComponent, IInvoicesListState>}\n */\nclass InvoicesList extends React.Component, IInvoicesListState> {\n private readonly className: string = 'msc-invoices-list';\n\n constructor(props: IInvoicesListProps) {\n super(props);\n\n this._updateInvoicesState = this._updateInvoicesState.bind(this);\n this._onAddToCartFailed = this._onAddToCartFailed.bind(this);\n this._handleFilterStateChange = this._handleFilterStateChange.bind(this);\n\n this.state = {\n invoices: [],\n invoicesFilterState: InvoicesFilterState.ShowAll,\n isLoading: true,\n errorState: { errorMessage: '' }\n };\n }\n\n public render(): JSX.Element | null {\n const {\n data: { invoices, customer },\n config: { className = '' }\n } = this.props;\n\n const header = (\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: header,\n filter: this._renderInvoicesFilter(this.className)\n };\n\n if (!invoices || !invoices.result || invoices?.status === 'LOADING' ||\n !customer || !customer.result || customer?.status === 'LOADING') {\n return this.props.renderView(viewProps);\n }\n\n if (ArrayExtensions.hasElements(invoices.result)) {\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 const invoicesData = await this.props.data.invoices;\n this._initializeWithInvoices(invoicesData);\n }\n\n private _initializeWithInvoices(invoicesData: OrderInvoice[]): void {\n const invoices = invoicesData.map(invoice => new InvoiceModel(invoice));\n this.setState({\n invoices: invoices,\n isLoading: false\n });\n }\n\n private _renderEmptyInvoiceLinesPageContent(): JSX.Element {\n const containerClass = `${this.className}__empty-lines__container`;\n const actionsContainerClass = `${containerClass}__actions`;\n return (\n
\n
\n {this.props.resources.invoiceEmptyInvoiceLinesTitle}\n
\n
\n {this.props.resources.invoiceEmptyInvoiceLinesDescription}\n
\n
\n \n {this.props.resources.invoiceEmptyInvoiceLinesContinueShoppingButtonText}\n \n
\n
\n );\n }\n\n private _renderListContainer(): JSX.Element {\n const containerClass = `${this.className}__container`;\n const containerHeaderClass = `${containerClass}__header`;\n const containerContentClass = `${containerClass}__content`;\n return (\n
\n
\n {this._renderMakePayment(containerHeaderClass)}\n
\n
\n {this._renderInvoiceErrors()}\n
\n
\n {this._renderInvoicesList(containerContentClass)}\n
\n
\n );\n }\n\n private _updateInvoicesState(): void {\n this.setState({\n invoices: this.state.invoices\n });\n }\n\n private _handleFilterStateChange(state: InvoicesFilterState): void {\n this.setState({\n invoicesFilterState: state,\n isLoading: true\n });\n\n const searchCriteria: InvoiceSearchCriteria = {\n InvoiceTypeValues: [InvoiceType.SalesOrderInvoice]\n };\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 getInvoices(new GetInvoicesInput(searchCriteria), this.props.context.actionContext).then(result => {\n this._initializeWithInvoices(result);\n });\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): void {\n const errorState = {...newErrorState};\n errorState.errorHost = 'ADDINVOICETOCART';\n errorState.errorMessage = newErrorState.errorReason?.failureReason === 'EMPTYINPUT' ?\n this.props.resources.invoiceErrorInvoiceIdNotExist : this.props.resources.invoiceErrorFailedAddInvoiceToCart;\n\n this.setState({errorState: errorState});\n }\n\n private _renderMakePayment(className: string): JSX.Element {\n const id = `${className}__make-payment`;\n const makePaymentResources: IMakePaymentResources = {\n makePaymentButtonText: this.props.resources.makePaymentButtonText,\n makePaymentButtonAriaLabel: this.props.resources.makePaymentButtonAriaLabel\n };\n\n let selectedInvoices = this.state.invoices.filter(invoice => invoice.isSelected);\n if (!ArrayExtensions.hasElements(selectedInvoices)) {\n selectedInvoices = this.state.invoices;\n }\n\n return (\n \n );\n }\n\n private _renderInvoiceErrors(): JSX.Element {\n const errorClassName = `${this.className}__errors`;\n return (\n \n );\n }\n}\n\nexport default InvoicesList;"],"sourceRoot":""}