{"version":3,"sources":["webpack:///src/modules/account-management-address/account-management-address.tsx?2c3f","webpack:///src/modules/checkout-shipping-address/checkout-shipping-address.view.tsx?e155","webpack:///src/common/components/address-select.tsx?e342","webpack:///./src/modules/b2b-account-management-address/b2b-account-management-address.tsx?f1bb","webpack:///src/checkout-errors/index.ts?ceec","webpack:///src/common/address-autosuggest.ts?520f","webpack:///src/common/components/address-button.tsx?e3b2","webpack:///./src/modules/b2b-checkout-billing-address/b2b-checkout-billing-address.view.tsx?4313","webpack:///src/modules/footer-category/footer-category.tsx?b7b8","webpack:///src/modules/adventureworks/views/components/carticon.component.tsx?3d75","webpack:///src/modules/business-account-address/index.ts?0f93","webpack:///src/common/components/address-error-title.tsx?a723","webpack:///./src/themes/gardner-theme/views/checkout.view.tsx?8fc7","webpack:///src/modules/business-account-address/business-account-address.tsx?d57d","webpack:///src/common/components/address-label.tsx?9ddc","webpack:///src/common/components/address-show.tsx?376c","webpack:///src/common/address-meta-data.ts?d29d","webpack:///../../src/index.ts?0e3e","webpack:///src/modules/account-management-address/account-management-address.view.tsx?739e","webpack:///src/common/address-format.data.ts?da4c","webpack:///src/modules/checkout-billing-address/index.ts?56c1","webpack:///./src/modules/eve-checkout-shipping-address/eve-checkout-shipping-address.view.tsx?2b0c","webpack:///src/modules/account-generic-tile/account-generic-tile.tsx?4504","webpack:///../../../src/module-state-manager/with-module-state.tsx?61ca","webpack:///src/common/components/address-billing-checkbox.tsx?1b2a","webpack:///src/common/components/address-alert.tsx?0da8","webpack:///src/modules/checkout-shipping-address/components/checkout-shipping-cartlines-images.tsx?7802","webpack:///src/modules/checkout-shipping-address/checkout-shipping-address.tsx?bd44","webpack:///src/modules/checkout-shipping-address/index.ts?8a8c","webpack:///src/modules/business-partners/business-partners.view.tsx?677a","webpack:///../../src/checkout-state.ts?acd8","webpack:///src/modules/footer-category/footer-category.view.tsx?26a5","webpack:///src/modules/business-account-address/business-account-address.view.tsx?dcd1","webpack:///src/common/components/address-dropdown.tsx?3e73","webpack:///src/modules/account-generic-tile/account-generic-tile.view.tsx?bca1","webpack:///src/common/components/address-billing-heading.tsx?4a5c","webpack:///src/modules/checkout-billing-address/checkout-billing-address.tsx?83e6","webpack:///../../../src/module-state-manager/module-state.ts?7579","webpack:///./src/themes/gardner-theme/views/components/line-pagination.tsx?b2dd","webpack:///./src/modules/b2b-checkout-billing-address/b2b-checkout-billing-address.tsx?6a6b","webpack:///src/common/components/address-list.tsx?8cb2","webpack:///src/common/address-format.ts?400b","webpack:///src/common/address-common.ts?0583","webpack:///src/modules/account-generic-tile/components/account-generic-tile-links.tsx?e4df","webpack:///./src/modules/order-level-comment/order-level-comment.view.tsx?50e4","webpack:///src/modules/business-partners/components/search-bar.tsx?cefc","webpack:///src/modules/business-partners/components/data-grid.tsx?933a","webpack:///src/modules/business-partners/components/business-partner-users-table.tsx?5b50","webpack:///src/modules/business-partners/components/business-partners-table.tsx?108c","webpack:///src/modules/business-partners/business-partners.tsx?9aa8","webpack:///src/modules/account-management-address/index.ts?5d50","webpack:///src/modules/checkout-billing-address/checkout-billing-address.view.tsx?d08e","webpack:///../../../src/module-state-manager/index.ts?8e3a","webpack:///src/common/components/address-checkbox.tsx?a46e","webpack:///src/common/components/address-add.tsx?0cbd","webpack:///src/index.ts?c6ae","webpack:///./src/modules/eve-checkout-shipping-address/components/checkout-shipping-cartlines-images.tsx?d761","webpack:///./src/modules/eve-checkout-shipping-address/eve-checkout-shipping-address.tsx?887e","webpack:///src/common/components/address-error-message.tsx?c7bd","webpack:///./src/modules/b2b-account-management-address/b2b-account-management-address.view.tsx?6b81","webpack:///src/checkout-errors/checkout-errors.ts?687e","webpack:///src/common/components/address-error-alert.tsx?b25e","webpack:///./src/modules/order-level-comment/order-level-comment.tsx?3e3e","webpack:///../../src/checkout-utilities.data.ts?b2cc","webpack:///./src/themes/gardner-theme-b2c/views/checkout.view.tsx?6760","webpack:///src/common/components/address-input.tsx?ed8f","webpack:///../../src/checkout-state-data-action.ts?8344","webpack:///src/common/components/address-detail-item.tsx?c5b6","webpack:///src/common/address-module.data.ts?1a63"],"names":["AccountManagementAddress","React","constructor","props","super","countryRegionId","countryRegions","addressPurposes","defaultAddressType","asyncCustAddressCreationFeatureName","editAsyncCustomerFeatureName","asyncCustomerAddressCreationFeatureIsEnabled","isEditAsyncCustomerFeatureEnabled","_onSuggestionSelected","async","this","_clearAddressFields","address","addressFormat","getTranformedAddress","result","stateProvinceInfo","set","addUpdateAddress","Street","ZipCode","CountyName","City","State","DistrictName","FullAddress","setTimeout","getAddressFormat","ThreeLetterISORegionName","forEach","format","_this$autoSuggest","undefined","name","autoSuggest","excludedAddressFields","includes","_clearValidation","validationError","_dataInitialize","data","reaction","_data$countryRegions$","_data$addressPurposes","_data$address$result","customerAddresses","_renderAddOrUpdateAddress","AddressAddUpdate","isUpdating","resources","addressType","AddressType","Shipping","defaultCountryRegionId","selectedAddress","addressActionResponse","dropdownDisplayData","getPrefilledAddressDropdownData","addressStateDefaultSelectionText","telemetryContent","onInputChange","_onAddressAddUpdateInputChange","onDropdownChange","_onAddressAddUpdateDropdownChange","onSave","_onAddressAddUpdateSubmit","onCancel","_resetView","_renderListAddress","_this$props$data$cust","_this$props$context$a","config","heading","text","headingTag","tag","AddressList","addresses","primaryAddressSectionHeading","otherAddressSectionHeading","contextRequest","context","request","handleLineItemHeadingChange","event","target","value","onEditAddress","_goToEditAddress","onRemoveAddress","_onRemoveAddress","onAddAddress","_goToAddAddress","onUpdatePrimaryAddress","_onSubmitUpdatePrimaryAddress","isAsyncCustomerAddressCreationFeatureEnabled","isAsyncCustomer","customerInformation","IsAsyncCustomer","canRenderAsyncCustomerDataAsUnmodifiable","app","_attachMapAutoSuggest","storeSelectorStateManager","_this$autoSuggest2","isMapApiLoaded","attachAutoSuggest","onAddressAddUpdate","validateAddressFormat","type","checked","replace","RegExp","AddressItemType","AddressTypeValue","_onCountryChange","_onAddressUpdate","response","onSuccess","then","hasError","addressCommon","isAuthenticatedFlow","currentOperation","AddressOperation","Update","updateCustomerAddress","addCustomerAddress","Promise","resolve","_onAddOrUpdateSuccess","_this$autoSuggest3","twoLetterISORegionName","getTwoLetterISORegionName","TwoLetterISORegionName","changeAutoSuggestionCountryCode","_getAddressFormatExcludeList","addressFormatExcludeList","showAddressType","push","IsPrimary","_getStateProvinces","Add","getStateProvinces","some","state","StateId","_updateCurrentOperation","operation","updateCustomerPrimaryAddress","_onUpdatePrimaryAddressSuccess","_objectSpread","Deactivate","removeAddressData","_renderScreenReaderRemoveText","notification","formatNotification","removeAddressNotification","Name","className","_setDefaultCountryRegionId","List","telemetry","AddressCommon","AddressFormat","AddressMetaData","getTelemetryObject","telemetryPageName","friendlyName","actionContext","requestContext","channel","autoSuggestionEnabled","autoSuggestOptions","BingMapsApiKey","error","BingMapsEnabled","options","AutoSuggest","ChannelCountryRegionISOCode","DefaultLanguageId","_this$props$data$stor","loadMapApi","_this$autoSuggest4","_loadMapAPI","_this$props$data$stor2","_this$props$data$stor3","_this$autoSuggest5","disposeAutoSuggest","shouldComponentUpdate","nextProps","nextState","render","_data$featureState","_data$featureState2","_this$props$context$a2","renderView","featureState","find","feature","IsEnabled","infoMessageBar","Msdyn365","accountProcessingPendingInfoMessageCanAddAddress","accountProcessingPendingInfoMessage","viewState","isShowAddresList","isShowAddOrUpdateAddress","AccountAddressManagement","moduleProps","classnames","showAddressList","showAddOrUpdateAddress","screenReaderNotification","market","getDefaultCountryRegionId","__decorate","observable","action","observer","AddressShow","_ref","AddressDetail","items","Node","Object","assign","map","item","description","AddressSelect","_ref2","SelectAddress","addButton","isShowSaveButton","saveButton","isShowCancelButton","cancelButton","SelectItem","key","input","showItems","_ref3","AddressForm","AddressItem","label","alert","AddressError","title","message","CheckoutShippingAddressView","CheckoutShippingAddress","checkoutErrorRef","showAddress","showAddressSelect","cartLineImages","Module","ref","isShowAddress","getInput","index","_addressPurposes$find","onAddressOptionChange","addressTypeDescription","purpose","Description","ichecked","RecordId","additionalAttributes","length","addressChangeCheckboxAriaLabel","AddressInputComponent","toString","onChange","additionalAddributes","getAddressSelectItems","hasExternalSubmitGroup","AddressButtonComponent","addressAddButtonText","ariaLabel","addressAddButtonAriaLabel","onClick","addressSaveButtonText","addressSaveButtonAriaLabel","addressCancelButtonText","addressCancelButtonAriaLabel","filter","countryCode","defaultLanguageId","inputId","containerId","selectedSuggestionCallback","autoSuggestManager","Microsoft","Maps","loadModule","callback","_document$querySelect","AutosuggestManager","attachAutosuggest","document","querySelector","setAttribute","_document$querySelect2","errorCallback","debug","credentials","bingMapsApiKey","setOptions","_this$autoSuggestMana","_this$autoSuggestMana2","detachAutosuggest","dispose","lang","AddressButtonFunctionComponent","disabled","isDisabled","role","payLoad","getPayloadObject","attributes","getTelemetryAttributes","CheckoutBillingAddressView","CheckoutBillingAddress","isError","FooterCategory","slots","content","viewprops","categories","FooterList","FooterListItem","CartIcon","cartLabel","cartQtyLabel","cart","cartItem","totalItemsInCart","qtyLabel","style","visibility","CartIconComponent","msdyn365Commerce","createComponentOverride","component","AddressErrorTitleFunctionComponent","PickUpAtStoreComponent","PickUpAtStore","location","EmailDeliveryComponent","EmailDelivery","LineItemComponent","LineItem","pickUpAtStore","emailDelivery","LineItemGroupComponent","_ref4","LineItemDeliveryGroup","LineItemList","lineItems","numItems","prev","next","pageLength","paginatedView","setPaginatedView","slice","paginationPage","setPaginationPage","nextPage","changePage","prevPage","page","skip","lineItem","LineId","LinePagination","currentPage","numPages","Math","ceil","LineItemGroupComponentWithMultiplePickUp","_ref5","lineItemWraper","lineItemWraperIcon","LineItemComponentWithMultiplePickUp","_ref6","PickUpAtStoreComponentWithMultiplePickUp","_ref7","LineItemsComponent","_ref8","LineItems","Header","editLink","itemsForPickup","itemsForShip","itemsForEmail","itemsGroupWithMulitplePickupMode","lineItemGroupComponentExt","OrderSummaryComponent","_ref9","lines","otherChargesLines","subtotal","shipping","otherCharge","tax","loyalty","giftCard","orderTotal","PaymentSummaryComponent","_ref10","invoices","CheckoutView","_props$data$checkout$","_props$data$checkout$5","_props$data$customerI","attributeArr","checkout","checkoutCart","AttributeValues","getShipCompleteIndex","_props$data$checkout$2","findIndex","attribute","getShipCompleteValue","shipCompleteIndex","attr","Value","saveShipCompleteToCart","checkoutState","updateCart","newCartObject","setShipCompleteOnCheckout","shipCompleteOnCheckout","shipCompleteOnCheckoutToggle","_renderShipOnCheckout","handleShipCompleteOnCheckoutChange","shipCompleteOnCheckoutLabel","_props$data$checkout$4","shipComplete","idx","splice","canShow","checkoutProps","headerProps","hasSalesOrder","hasInvoiceLine","bodyProps","mainProps","mainControlProps","sideProps","sideControlFirstProps","sideControlSecondProps","termsAndConditionsProps","orderConfirmation","loading","guidedForm","orderSummary","invoicePaymentSummary","placeOrderButton","termsAndConditions","keepShoppingButton","chargelines","chargeCodes","currencyFormatter","ChargeLines","linesNode","c","node","line","ChargeCode","chargeCode","r","_r$CalculatedAmount$t","_r$CalculatedAmount","chargeLineLabel","CalculatedAmount","chargeLinesBreakdown","cultureFormatter","formatCurrency","orderSummaryExtended","isAccountBlocked","Blocked","lineItemsExt","paginationPrev","paginationNext","accountLockedMessage","_renderOrderComment","commentHeading","commentString","emptyStringClassName","commentHeadingText","_props$data$checkout$3","Comment","getCommentText","BusinessAccountAddress","shouldAutoFocus","excludedList","_resetAddressFields","addressFormatItem","displayType","AddressItemDisplayType","Input","Checkbox","countryStates","_data$countryStates$r","Company","_updateAddress","_updateCountryRegionId","updateForm","isRequired","cleanValue","_isEmpty","_isInputRequired","addressItemValue","ObjectExtensions","isNullOrUndefined","validationRules","validationRule","AddressValidationRuleType","Required","componentDidMount","resetAddress","_request$channel","AddressLabelFunctionComponent","id","itemId","htmlFor","addressTypeValue","AddressDetailItemComponent","isNewLine","isShowLabel","Phone","labelText","excluded","required","metaData","requiredFieldRegEx","resourcesPrefix","maxLength","excludedTypes","requiredFields","_init","getItemFormat","_addItem","PhoneRegex","defaultRegex","County","Dropdown","StreetNumber","BuildingCompliment","Postbox","House_RU","Flat_RU","CountryOKSMCode_RU","nameKey","_validationRules","rule","optionalString","ruleType","keys","itemType","_validationRule","Format","regEx","isShowList","Item","isShowPrimaryButton","primaryButton","editButton","removeButton","Error","isShowError","AddressLists","ListAddress","isShowEmptyListMessage","emptyListMessage","primaryAddressList","otherAddressList","AccountManagementAddressView","AccountGenericTile","handleHeadingChange","handleLinkTextChange","linkIndex","links","linkText","viewProps","editProps","onEdit","LinksComponent","onTextChange","withModuleState","WrappedComponent","_super","ModuleState","_this","call","initializeState","_b","typeName","states","getModuleStates","updateModuleStates","__assign","_a","hasInitialized","isCancellable","isSubmitContainer","status","childIds","getModuleStateManager","moduleState","get","validate","isReady","isPending","isSkipped","isCancelAllowed","shouldSubmitContainer","hasModuleState","setIsRequired","update","setIsCancellable","setIsSubmitContainer","setHasError","onReady","onUpdating","onPending","onSkip","onDisable","getModule","moduleId","getModuleByTypeName","getModuleStateManagerByTypeName","init","moduleStates","values","_moduleState","modules","_validateLeaf","source","module","isMatch","_validateContainer","allMatched","skipSkippableItem","shouldEnableSinglePaymentAuthorizationCheckout","childId","_isPaymentSectionContainer","ArrayExtensions","hasElements","enableControl","__extends","prototype","AddressBillingCheckbox","isChecked","AddressAlertFunctionComponent","CheckoutPickupCartLines","moduleClassName","cartLines","itemTitle","isMobileCheck","isMobile","variant","VariantType","Browser","gridSettings","xs","w","sm","md","lg","xl","isMobileView","cartLine","isShowQty","quantity","lineId","Image","imageProps","productQuantityInfo","altText","defaultImageSettings","viewports","q","h","lazyload","quality","_data$featureState$re2","addressListSelectedAddress","multiplePickupStoreSwitchName","retailMultiplePickUpOptionEnabled","_initPickupGroup","pickupCartLines","_getCartLinesforDelivery","_this$props$data$chec","products","_getProductsByCartLines","ChannelId","product","x","ProductId","setState","shippingGroups","formatAddress","_data$featureState$re","_this$props$data$chec2","_this$props$data$chec3","CartLines","_isDelivery","_isNotPickupMode","DeliveryMode","FulfillmentStoreId","deliveryMode","_this$props$context$r","_featureState$result","pickupDeliveryModeCode","PickupDeliveryModeCode","channelDeliveryOptionConfig","_channelDeliveryOptio","pickupDeliveryMode","PickupDeliveryModeCodes","pickupMode","channelId","productInputs","ProductInput","apiSettings","CatalogId","getSimpleProducts","onSaveHandler","onCancelHandler","onSubmit","onCancelButtonHandler","_renderSelectAddress","onAddAddressHandler","_onAddressOptionChange","_onSelectAddress","addressRecordId","currentTarget","_isNewAddress","_updateModuleState","_clearError","twoLetterIsoRegionName","_getDefaultAddress","_getAddressFromCartExpressPaymentDetails","expressPaymentDetailsFromCartPage","tokenizedPaymentCard","isExpressAddressAppliedInCartPage","addressFromCartExpress","getExpressAddress","getAddressFromTokenizedPaymentCard","Country","threeLetterIsoRegionName","getThreeLetterIsoRegionName","NameOnCard","Address1","Address2","Zip","expressAddress","countryRegion","country","_country$ISOCode","ISOCode","toLowerCase","CountryRegionId","_initModuleState","_canShip","defaultAddress","shippingCartLines","ShippingAddress","isExpressCheckoutApplied","shippingAddressFromExpressCheckout","isEmpty","Show","_setShippingAddress","updateHasShippingAddress","newHasShippingAddress","information","shippingAddress","_checkout$result$chec","_checkout$result$chec2","emailDeliveryModeCode","EmailDeliveryModeCode","_channelDeliveryOptio2","newShippingAddress","updateShippingAddress","catch","existingAddress","_address$Name","_address$Street","_address$StreetNumber","_address$City","_address$State","_address$ZipCode","_address$Phone","_address$ThreeLetterI","_address$AddressTypeV","_setErrorMessage","errorMessage","_countItems","cartlines","reduce","count","_this$props$data$chec6","_this$props$data$chec4","_this$props$data$chec5","_address","shouldEnableCheckoutErrorDisplayMessaging","_this$props$data$chec7","checkoutError","errorLocation","ErrorLocation","_this$props$data$chec8","checkoutErrorFocus","CheckoutModule","focusOnCheckoutError","_featureState$result2","headingImages","itemsText","singleItemText","errorMessageTitle","imageSettings","_line$cartLine$LineId","_line$product","_line$product$Primary","_line$product2","_line$product3","_context$request$app","_line$cartLine$Quanti","src","PrimaryImageUrl","fallBackSrc","getFallbackImageUrl","ItemId","OmniChannelMedia","loadFailureBehavior","Quantity","numberOfCartLines","itemText","lineImageProps","isRetailMultiplePickUpOptionEnabled","_renderShowAddress","ErrorComponent","showAddressSelectHandler","showAddOrUpdateAddressHandler","_this$props$data$cart","_this$props$data$cart2","properties","ExtensionProperties","property","Key","StringValue","JSON","parse","_this$props$data$chec9","computed","businessPartnersView","selectedBusinessPartnerUser","businessPartnersProps","businessPartnersHeading","catalogLoadingIndicator","catalogLoadingErrorMessage","cookieConsentNotGivenErrorMessage","backToBusinessPartnersLink","businessPartnersTable","businessPartnerUsersTable","CheckoutState","_giftCards","_giftCardExtends","_loyaltyAmount","_guestCheckoutEmail","_isTermsAndConditionAccepted","_customerAccountAmount","defineProperty","_tokenizedPaymentCard","_tenderLine","_billingAddress","_shippingAddress","_cardPrefix","_loyaltyCardNumber","updateTokenizedPaymentCard","newTokenizedPaymentCard","updateTenderLine","newTenderLine","updateBillingAddress","newBillingAddress","updateCardPrefix","newCardPrefix","removeGiftCard","giftCardNumber","Id","removeGiftCardExtend","addGiftCard","__spreadArrays","addGiftCardExtend","updateLoyaltyCardNumber","newLoyaltyCardNumber","updateLoyaltyAmount","newAmount","updateGuestCheckoutEmail","newGuestCheckoutEmail","updateTermsAndConditionsAcceptance","newIsTermsAndConditionAccepted","updateCustomerAccountAmount","FooterCategoryView","createElement","category","BusinessAccountAddressView","AddressDropdownFunctionComponent","displayData","getDropdownItem","selectedValue","isSelected","AccountGenericTileView","AddressBillingHeading","_this$addUpdateAddres","Billing","_onSubmitAddress","isBillingAddressRequried","billingAddress","isBillingAddressSameAsShippingAddress","isBillingAddressSameAsShipping","isCartContainsItemsForShipping","_onBillingAddressSameAsShippingChange","isPaymentSectionContainerHasError","updateIsBillingAddressHasError","newIsBillingAddressHasError","_setBillingAddress","additionalProperties","isShowSameAsShippingCheckbox","removeBillingAddress","_shouldHideBillingAddressForOBO","addressBillingAddressHeading","sameAsShippingCheckbox","addressSameAsShippingAddressAriaLabel","addressSameAsShippingAddressText","_this$selectedAddress","_request$channel2","_request$channel3","_this$props$data$chec10","loyaltyAmount","giftCardExtends","Balance","_checkoutState$custom","customerAccountAmount","checkoutResult","paymentTenderType","isPaidByOtherPaymentSource","paymenTenderType","TotalAmount","getGiftCardTotalAmount","getLoyaltyAmount","getCustomerAccountAmount","_this$props$data$chec11","_this$props$data$chec12","shouldPaidByCard","isPaymentVerificationRedirection","isCheckoutCallFailed","EnabledPaymentsForOBO","PaymentInstrument","ModuleStatesCacheKey","getCacheKey","getCacheObjectType","dataCacheType","ctx","cacheKey","Fragment","noBillingErrorMessage","setError","renderErrorMessage","addressTypeId","addressCount","multipleBillingErrorMessage","getButtonAriaLabel","addressName","getAddressList","showPrimaryButton","errorTitle","Heading","isSelectedAddress","isInvalidAsyncState","AddressErrorTitleComponent","AddressErrorMessageComponent","addressPrimaryButtonText","addressPrimaryButtonAriaLabel","addressEditButtonText","addressEditButtonAriaLabel","addressRemoveButtonText","addressRemoveButtonAriaLabel","getPrimaryAddressList","primaryAddresses","getOtherAddressList","otherAddresses","_heading$headingTag","headingComponent","disableAddButton","addressEmptyListAddressMessage","countryRegionsInfo","addressMetaData","stateDefaultSelectionText","defaultStateText","dropdownData","getCountryFormat","getStateFormat","unshift","getAddressTypeFormat","_getCountryRegionInfo","propertyName","validationtor","isValid","_inputValidation","postalCode","selectedState","StateName","adminDistrict","addressLine","locality","district","formattedAddress","_validateRegEx","test","countryRegionInfo","_getAddressDisplayFormat","ShortName","addressPurpose","addressDisplayItem","AddressFormatLines","AddressTypeItem","_extendAddressDisplayFormat","nameDisplayItem","formatLine","AddressComponentNameValue","addressItem","NewLine","phoneDisplayItem","isPrimaryDisplayItem","marketISOCode","currentCountryRegion","parseRetailException","addressErrorMessageTitle","addressGenericErrorMessage","user","isAuthenticated","GetStateProvincesInput","getStateProvinceAction","updateLogisticsLocationRoleRecordId","submitCustomerAddress","addAddress","updateAddress","updatePrimaryAddress","addressAction","AddressManagementInput","execAddressAction","GetAddressPurposesInput","getAddressPurposesAction","LogisticsLocationRoleRecordId","_mapEditableLinks","linkdata","editableLinks","link","contentAction","etext","editableLink","linkUrl","destinationUrl","openInNewTab","AccountGenericTileLinks","staticDisplay","orderLevelCommentModuleProps","modal","SearchBar","Component","onSearchTextChange","ev","searchText","onSearch","handleKeyUp","keyCode","KeyCodes","Enter","searchPlaceholderLabel","placeholder","onKeyUp","DataGrid","renderGridHeader","rowClassName","columns","column","reactKey","renderGridRow","_column$onRender","_column$onClick","fieldName","onRender","loadDataInternal","loadData","isLoading","e","_e$data","LocalizedMessage","genericErrorMessage","paging","loadMore","sortData","sorting","ascending","sort","item1","item2","value1","value2","compareResult","filterData","isSearchable","columnValue","indexOf","trim","getDataToDisplay","itemsCount","pageSize","hasMore","defaultSorting","Alert","color","loadingLabel","Button","businessPartnerLoadMore","noDataMessage","BusinessPartnerUsersTable","getColumns","isMobileDevice","Viewport","businessUserTableNameHeadingText","onSelect","businessUserTableEmailHeadingText","businessUserTableSpendingLimitHeadingText","getBusinessPartnerUsers","BusinessPartnersDataActions","getUsersAsync","callerContext","bypassCache","queryResultSettings","businessPartner","BusinessPartnerId","StatusValue","FirstName","LastName","spendingLimit","SpendingLimit","businessUserTableSpendingLimitZeroHoverText","businessPartnerSearchCustomer","BusinessPartnersTable","businessPartnerName","getBusinessPartners","getManagedBusinessPartnersAsync","businessPartnerSearchCompany","BusinessPartners","onSelectBusinessPartner","selectedBusinessPartner","onSelectBusinessPartnerUser","businessPartnerUser","AccountNumber","cookies","setAccountSelectionCookie","catalogId","getCustomerDefaultCatalogId","validateCatalogId","homeUrl","isBrowser","fullUrl","URL","window","href","searchParams","removeAccountSelectionCookie","isLoadingCatalog","Number","_productCatalogs$","productCatalogs","CatalogsDataActions","getCatalogsAsync","loadCatalogErrorMessage","classname","isConsentGiven","cookieConsentRequiredMessage","AddressCheckboxFunctionComponent","autoFocus","shouldBeAutoFocused","getRequriedAttribute","getAddessItems","elementId","AdressCheckboxComponent","AdressDropdownComponent","AddressLabelComponent","AddressAlertComponent","editAddressHeading","addAddressHeading","newAddress","add","AddressErrorMessageFunctionComponent","_props$customerAddres","addressId","invoiceAddress","getCheckoutState","exception","current","scrollIntoView","updateCheckoutErrorFocus","newCheckoutErrorFocus","None","OrderLevelComment","_props$data$cart$resu","_className","_maxCommentLength","_updateOrderLevelComment","cartState","dummyCart","comment","isCommentAreaActive","_updateCommentState","_resetCommentToProps","_toggleCommentAreaActive","prevState","_renderStaticCommentDisplay","commentLinkText","editLinkText","disclaimer","_getCommentPreview","_renderCommentLink","substring","_renderSaveButton","saveButtonText","_renderCancelButton","cancelButtonText","_renderTextArea","textAreaLabel","charactersRemaining","_getFieldId","_renderButtonArea","_renderModal","Modal","isOpen","toggle","ModalHeader","_getModalTitle","ModalFooter","commentModalTitle","children","totalDiscounts","AddressInputFunctionComponent","shouldUseAutoFocus","CheckoutStateInput","buildCacheKey","createObservableDataAction","inputData","AddressDetailItemFunctionComponent","mainClass"],"mappings":";09BA6DA,IAAMA,EAAN,cAAuCC,YA4BnCC,YAAmBC,GACfC,MAAMD,GA1BU,KAAAE,gBAA0B,MAYtC,KAAAC,eAAsC,GACtC,KAAAC,gBAAoC,GAE3B,KAAAC,mBAA6B,EAI7B,KAAAC,oCAA8C,4DAC9C,KAAAC,6BAAuC,+DAEhD,KAAAC,8CAAyD,EACzD,KAAAC,mCAA6C,EA4LpC,KAAAC,sBAAwBC,UACrCC,KAAKC,sBACL,MAAMC,EAAUF,KAAKG,cAAcC,qBAAqBC,EAAQL,KAAKM,mBACrEC,YAAIP,KAAKQ,iBAAkB,CAAEC,OAAQ,KACrCF,YAAIP,KAAKQ,iBAAkB,CAAEE,QAASR,EAAQQ,UAC9CH,YAAIP,KAAKQ,iBAAkB,CAAEG,WAAYT,EAAQS,aACjDJ,YAAIP,KAAKQ,iBAAkB,CAAEI,KAAMV,EAAQU,OAC3CL,YAAIP,KAAKQ,iBAAkB,CAAEK,MAAOX,EAAQW,QAC5CN,YAAIP,KAAKQ,iBAAkB,CAAEM,aAAcZ,EAAQY,eACnDP,YAAIP,KAAKQ,iBAAkB,CAAEO,YAAab,EAAQa,cA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lG,YAgBXnnB,MATgB,SAACu/B,GACjB,OAAO,IAAIH,EAAmBG,EAAU7jC,eAAe6iB,iB,kCCnD3D,qCAgDeihB,IA3BkEzuC,IAC7E,MAAM,UAAEohB,EAAS,YAAEC,EAAW,UAAEE,EAAS,KAAEpf,EAAI,MAAEqD,GAAUxF,EAErDgK,EAAY,qDAAqD7H,EAAK0tB,cACtES,IAAY9qB,GAASA,EAAMsL,OAAS,GACpC49B,EAAYrtB,EACZ,oEAAoEE,EACpEyoB,IAAUhgC,EAAW,CAAE,iCAAkCsmB,EAAS,mCAAoClP,IAC5G,OACIthB,gBAAA,QAAMkK,UAAWggC,IAAU0E,EAAW,CAAE,sCAAuCpe,KAC1EjP,GACGvhB,2BAAA,KACIA,gBAAA,QAAMkK,UAAcA,EAAH,UAAuBuX,GACxCzhB,gBAAA,QACIkK,UAAWggC,IAAUhgC,EAAW,CAC5B,iCAAkCsmB,EAClC,mCAAoClP,IACtC,oBAKb5b,K,kCCnCN,IAAKqC,EAOAxE,EAPZ,6EAAYwE,GACRA,EAAA,UACAA,EAAA,YACAA,EAAA,gBACAA,EAAA,YAJJ,CAAYA,MAAgB,KAO5B,SAAYxE,GACRA,EAAA,oBACAA,EAAA,kBACAA,EAAA,kBACAA,EAAA,kBAJJ,CAAYA,MAAW","file":"static/js/13.0a8a38933544539c6379.chunk.js","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { format as formatNotification, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressList, IAddressListProps } from '../../common/components/address-list';\nimport { IAccountManagementAddressData } from './account-management-address.data';\nimport { IAccountManagementAddressProps } from './account-management-address.props.autogenerated';\n\n/**\n * Account management address view state interface.\n */\nexport interface IAccountManagementAddressViewState {\n isShowAddresList: boolean;\n isShowAddOrUpdateAddress: boolean;\n}\n\n/**\n * Account management address view state interface.\n */\nexport interface IAccountManagementAddressViewProps extends React.Component> {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: IAccountManagementAddressViewState;\n AccountAddressManagement: IModuleProps;\n isUpdating: boolean;\n showAddressList: IAddressListProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n screenReaderNotification: React.ReactNode;\n infoMessageBar?: React.ReactNode;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component>}\n */\n@observer\nclass AccountManagementAddress extends React.Component> {\n @observable private currentOperation: AddressOperation;\n @observable private selectedAddress?: Address;\n @observable private countryRegionId: string = 'USA';\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n @observable private customerAddresses: Address[];\n @observable private addUpdateAddress: Address;\n @observable private validationError: object;\n @observable private addressActionResponse?: IAddressResponse;\n @observable private isUpdating?: boolean;\n @observable private hasError?: boolean;\n @observable private removeAddressData?: Address;\n\n private readonly addressCommon: AddressCommon;\n private addressFormat: AddressFormat;\n private countryRegions: CountryRegionInfo[] = [];\n private addressPurposes: AddressPurpose[] = [];\n private readonly resources: IAddressResource;\n private readonly defaultAddressType: number = 6; // Default to Home\n private readonly telemetryContent: ITelemetryContent;\n private autoSuggest?: AutoSuggest;\n\n private readonly asyncCustAddressCreationFeatureName: string = 'Dynamics.AX.Application.RetailAsyncAddressCreationFeature';\n private readonly editAsyncCustomerFeatureName: string = 'Dynamics.AX.Application.RetailEnableAsyncCustomerEditFeature';\n\n private asyncCustomerAddressCreationFeatureIsEnabled?: boolean = false;\n private isEditAsyncCustomerFeatureEnabled: boolean = false;\n\n public constructor(props: IAccountManagementAddressProps) {\n super(props);\n const { context, data, resources, telemetry } = this.props;\n\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.customerAddresses = data.address.result || [];\n this.addUpdateAddress = {};\n this.validationError = {};\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions }\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n if (this.props.data.countryRegions.result !== undefined) {\n this._setDefaultCountryRegionId();\n }\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n if (autoSuggestionEnabled) {\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 const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi !== undefined &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => {\n this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\n },\n async () => {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n await this._attachMapAutoSuggest();\n }\n }\n );\n }\n }\n\n /**\n * Component did mount function.\n */\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n /**\n * Should component update function.\n * @param nextProps - Account management address props.\n * @param nextState - Next state.\n * @returns - True if component should update, false otherwise.\n */\n public shouldComponentUpdate(\n nextProps: IAccountManagementAddressProps,\n nextState: IAccountManagementAddressViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { renderView, config, resources, data } = this.props;\n const customerInformation = data.customerInformation.result;\n\n // Set the feature state value for 'Async Customer Address Creation'.\n this.asyncCustomerAddressCreationFeatureIsEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.asyncCustAddressCreationFeatureName)?.IsEnabled || false;\n\n this.isEditAsyncCustomerFeatureEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.editAsyncCustomerFeatureName)?.IsEnabled || false;\n\n const viewProps = {\n ...this.props,\n infoMessageBar: (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n !this.isEditAsyncCustomerFeatureEnabled &&\n (customerInformation?.IsAsyncCustomer || false) && (\n \n ),\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n customerAddresses: this.customerAddresses,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n isUpdating: this.isUpdating,\n hasError: this.hasError,\n className: config.className,\n viewState: {\n isShowAddresList: this.currentOperation === AddressOperation.List,\n isShowAddOrUpdateAddress: this.currentOperation !== AddressOperation.List\n },\n AccountAddressManagement: {\n moduleProps: this.props,\n className: classnames('ms-account-management-address', config.className)\n },\n showAddressList: this._renderListAddress(),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\n screenReaderNotification: this.removeAddressData ? this._renderScreenReaderRemoveText(this.removeAddressData) : null\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * On Suggestion Selected Function.\n * @param result - Microsoft.Maps.ISuggestionResult.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, 0);\n };\n\n /**\n * Clear Address Fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n addressFormatItem.forEach(format => {\n if (this.addUpdateAddress[format.name] !== undefined && !this.autoSuggest?.excludedAddressFields.includes(format.name)) {\n this.addressFormat[format.name] = '';\n }\n });\n this._clearValidation();\n };\n\n /**\n * Clear Validation Function.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n /**\n * Method data initialization.\n * @param props -The account management props.\n */\n private readonly _dataInitialize = (props: IAccountManagementAddressProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.address.result,\n () => {\n this.customerAddresses = data.address.result ?? [];\n }\n );\n };\n\n /**\n * Render Add Or Update Address Function.\n * @returns - AddressAddUpdate.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Shipping,\n addressFormat: this.addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n telemetryContent: this.telemetryContent,\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n onSave: this._onAddressAddUpdateSubmit,\n onCancel: this._resetView\n });\n };\n\n /**\n * Render List Address Function.\n * @returns - AddressList.\n */\n private readonly _renderListAddress = (): IAddressListProps => {\n const { config } = this.props;\n\n /**\n * Render Address title.\n * @param event - Msdyn365.ContentEditableEvent.\n */\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n config.heading!.text = event.target.value;\n };\n const heading = config.heading && {\n text: config.heading.text,\n headingTag: config.heading.tag\n };\n\n return AddressList({\n isUpdating: this.isUpdating,\n selectedAddress: this.selectedAddress,\n addressFormat: this.addressFormat,\n addresses: this.customerAddresses,\n addressPurposes: this.addressPurposes,\n resources: this.resources,\n heading,\n primaryAddressSectionHeading: config.primaryAddressSectionHeading,\n otherAddressSectionHeading: config.otherAddressSectionHeading,\n contextRequest: this.props.context.request,\n telemetryContent: this.telemetryContent,\n handleLineItemHeadingChange,\n onEditAddress: this._goToEditAddress,\n onRemoveAddress: this._onRemoveAddress,\n onAddAddress: this._goToAddAddress,\n onUpdatePrimaryAddress: this._onSubmitUpdatePrimaryAddress,\n isAsyncCustomerAddressCreationFeatureEnabled: this.asyncCustomerAddressCreationFeatureIsEnabled || false,\n isAsyncCustomer: this.props.data.customerInformation.result?.IsAsyncCustomer || false,\n canRenderAsyncCustomerDataAsUnmodifiable: this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false,\n isEditAsyncCustomerFeatureEnabled: this.isEditAsyncCustomerFeatureEnabled\n });\n };\n\n /**\n * Attach Map Auto Suggest Function.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * On Address Add Update Function.\n * @param name - String.\n * @param value - String | Boolean | Number.\n */\n private readonly onAddressAddUpdate = (name: string, value: string | boolean | number) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * On Address Add Update Input Change.\n * @param event - Input Change Event.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n if (event.target.type === 'checkbox') {\n this.onAddressAddUpdate(event.target.name, event.target.checked);\n } else {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n }\n };\n\n /**\n * On Address Add Update Dropdown Change.\n * @param event - Dropdown Change Event.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n if (event.target.name === AddressItemType[AddressItemType.AddressTypeValue]) {\n this.onAddressAddUpdate(event.target.name, +event.target.value);\n } else {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n }\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * On Address Update Function.\n * @param response - Promise.\n * @param onSuccess - IAddressResponse.\n */\n private readonly _onAddressUpdate = (response: Promise, onSuccess: (response: IAddressResponse) => void): void => {\n this.isUpdating = true;\n response.then(\n (result: IAddressResponse) => {\n if (result.address) {\n this.hasError = false;\n onSuccess(result);\n } else {\n this.hasError = true;\n this.addressActionResponse = result;\n }\n this.isUpdating = false;\n },\n () => {\n this.hasError = true;\n this.isUpdating = false;\n }\n );\n };\n\n /**\n * On Address Add Update Submit Function.\n */\n private readonly _onAddressAddUpdateSubmit = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n return;\n }\n let response: Promise;\n if (this.addressCommon.isAuthenticatedFlow()) {\n response =\n this.currentOperation === AddressOperation.Update\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\n } else {\n response = Promise.resolve({ address: this.addUpdateAddress });\n }\n\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\n };\n\n /**\n * On Country Change Function.\n * @param countryRegionId - String.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterISORegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterISORegionName);\n this._clearAddressFields();\n };\n\n /**\n * Get Address Format Exclude List Function.\n * @returns - Address Format Exclude List.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Get State Provinces Function.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n this.stateProvinceInfo = result;\n });\n };\n\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request && request.channel && request.channel.ChannelCountryRegionISOCode;\n\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * Update CurrentOperation Function.\n * @param operation - AddressOperation.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation) => {\n this.currentOperation = operation;\n this._clearAddressFields();\n };\n\n /**\n * On Submit Update Primary Address Function.\n * @param address - Address.\n */\n private readonly _onSubmitUpdatePrimaryAddress = (address: Address): void => {\n this.selectedAddress = address;\n const response = this.addressCommon.updateCustomerPrimaryAddress(address);\n this._onAddressUpdate(response, this._onUpdatePrimaryAddressSuccess);\n };\n\n /**\n * Go To Edit Address Function.\n * @param address - Address.\n */\n private readonly _goToEditAddress = (address: Address): void => {\n this.addUpdateAddress = { ...address };\n this.countryRegionId = this.addUpdateAddress.ThreeLetterISORegionName || 'USA';\n this._updateCurrentOperation(AddressOperation.Update);\n };\n\n /**\n * On Remove Address Function.\n * @param address - Address.\n */\n private readonly _onRemoveAddress = (address: Address): void => {\n address.Deactivate = true;\n this.removeAddressData = address;\n const response = this.addressCommon.updateCustomerAddress(address);\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\n };\n\n /**\n * Renders Notification screen reader text for removed address.\n * @param address - Address input.\n * @returns Notification for removed address.\n */\n private readonly _renderScreenReaderRemoveText = (address: Address): React.ReactNode => {\n const notification = formatNotification(this.resources.removeAddressNotification!, `${address.Name!}`);\n return (\n
\n {notification}\n
\n );\n };\n\n /**\n * Go To Add Address Function.\n */\n private readonly _goToAddAddress = (): void => {\n this.addUpdateAddress = {};\n this._setDefaultCountryRegionId();\n set(this.addUpdateAddress, { ThreeLetterISORegionName: this.countryRegionId });\n set(this.addUpdateAddress, { AddressTypeValue: this.defaultAddressType });\n this._setDefaultCountryRegionId();\n this._updateCurrentOperation(AddressOperation.Add);\n };\n\n /**\n * On Add Or Update Success Function.\n * @param response - IAddressResponse.\n */\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse): void => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n this._resetView();\n };\n\n /**\n * On Update Primary Address Success Function.\n * @param response - IAddressResponse.\n */\n private readonly _onUpdatePrimaryAddressSuccess = (response: IAddressResponse): void => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n };\n\n /**\n * Reset view function.\n */\n private readonly _resetView = (): void => {\n this.selectedAddress = undefined;\n this._updateCurrentOperation(AddressOperation.List);\n };\n}\n\nexport default AccountManagementAddress;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressSelectItem, IAddressSelectProps } from '../../common/components/address-select';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressViewProps } from './checkout-shipping-address';\n\n/**\n * Address show component.\n * @param param0 - Root param.\n * @param param0.AddressDetail - Address detail.\n * @param param0.items - IAddressShowItem[].\n * @returns - Address Node.\n */\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\n return (\n \n {items.map((item: IAddressShowItem) => {\n return <>{item.description};\n })}\n \n );\n};\n\n/**\n * Address Select Component.\n * @param param0 - Root param.\n * @param param0.SelectAddress - Select address.\n * @param param0.addButton - Add button.\n * @param param0.items - IAddressSelectItem[].\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - SelectAddress Node.\n */\nconst AddressSelect: React.FC = ({\n SelectAddress,\n addButton,\n items,\n isShowSaveButton,\n saveButton,\n isShowCancelButton,\n cancelButton\n}) => {\n return (\n \n {addButton}\n {items.map((item: IAddressSelectItem) => {\n const SelectItem = item.SelectItem;\n return (\n \n {item.input}\n \n \n );\n })}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Address Add Update Component.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - Error message.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns Address add update component node.\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 return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Checkout Shipping Address View Component.\n * @param props - Props.\n * @returns - CheckoutShippingAddress Module.\n */\nconst CheckoutShippingAddressView: React.FC = props => {\n const {\n CheckoutShippingAddress,\n checkoutErrorRef,\n alert,\n viewState,\n showAddress,\n showAddressSelect,\n showAddOrUpdateAddress,\n cartLineImages\n } = props;\n\n return (\n \n {alert}\n {cartLineImages}\n {viewState.isShowAddress && }\n {viewState.isShowAddresList && }\n {viewState.isShowAddOrUpdateAddress && }\n \n );\n};\n\nexport default CheckoutShippingAddressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { format, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressInputComponent from './address-input';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressSelectInputProps {\n hasExternalSubmitGroup?: boolean;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n resources: IAddressResource;\n selectedAddress: Address;\n telemetryContent?: ITelemetryContent;\n onAddressOptionChange(event: React.ChangeEvent): void;\n onAddAddress(): void;\n onSave(): void;\n onCancel(): void;\n}\n\nexport interface IAddressSelectItem {\n key: number;\n SelectItem: INodeProps;\n input: React.ReactNode;\n showItems: IAddressShowProps;\n}\n\nexport interface IAddressSelectProps {\n SelectAddress: INodeProps;\n addButton: React.ReactNode;\n items: IAddressSelectItem[];\n isShowSaveButton: boolean;\n saveButton: React.ReactNode;\n isShowCancelButton: boolean;\n cancelButton: React.ReactNode;\n}\n\nconst getInput = (index: number, address: Address, props: IAddressSelectInputProps): React.ReactNode => {\n const { addresses, onAddressOptionChange, selectedAddress, resources, addressPurposes } = props;\n const addressTypeDescription = address.AddressTypeValue\n ? addressPurposes.find(purpose => purpose.AddressType === address.AddressTypeValue)?.Description || ''\n : '';\n const ichecked = address.RecordId === selectedAddress.RecordId;\n const additionalAttributes = {\n checked: ichecked,\n 'aria-checked': ichecked,\n 'aria-setsize': addresses.length,\n 'aria-posinset': index + 1,\n 'aria-label': format(resources.addressChangeCheckboxAriaLabel, addressTypeDescription)\n };\n\n return (\n \n );\n};\n\nconst getAddressSelectItems = (props: IAddressSelectInputProps): IAddressSelectItem[] => {\n const { addresses, addressFormat, addressPurposes } = props;\n\n return addresses.map((address, index) => {\n return {\n key: address.RecordId || 0,\n SelectItem: { className: 'msc-address-select__item' },\n input: getInput(index, address, props),\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n })\n };\n });\n};\n\nexport const AddressSelect = (props: IAddressSelectInputProps): IAddressSelectProps => {\n const { resources, onCancel, onSave, onAddAddress, hasExternalSubmitGroup } = props;\n\n return {\n SelectAddress: { className: 'msc-address-select' },\n addButton: (\n \n ),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: (\n \n ),\n items: getAddressSelectItems(props)\n };\n};\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport * as Msdyn365 from '@msdyn365-commerce/core';\r\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\r\nimport { format as formatNotification, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { action, observable, reaction, set } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport { AutoSuggest } from '@msdyn365-commerce-modules/address';\r\nimport { IAutoSuggestOptions } from '@msdyn365-commerce-modules/address';\r\nimport { AddressCommon } from '@msdyn365-commerce-modules/address';\r\nimport { AddressFormat } from '@msdyn365-commerce-modules/address';\r\nimport { AddressItemType } from '@msdyn365-commerce-modules/address';\r\nimport { AddressMetaData } from '@msdyn365-commerce-modules/address';\r\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '@msdyn365-commerce-modules/address';\r\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address';\r\nimport { AddressList, IAddressListProps } from '@msdyn365-commerce-modules/address';\r\nimport { IB2bAccountManagementAddressData } from './b2b-account-management-address.data';\r\nimport { IB2bAccountManagementAddressProps } from './b2b-account-management-address.props.autogenerated';\r\n\r\n/**\r\n * Account management address view state interface.\r\n */\r\nexport interface IAccountManagementAddressViewState {\r\n isShowAddresList: boolean;\r\n isShowAddOrUpdateAddress: boolean;\r\n}\r\n\r\n/**\r\n * Account management address view state interface.\r\n */\r\nexport interface IAccountManagementAddressViewProps\r\n extends React.Component> {\r\n className: string;\r\n currentOperation: AddressOperation;\r\n selectedAddress?: Address;\r\n addUpdateAddress: Address;\r\n countryRegionId: string;\r\n stateProvinceInfo?: StateProvinceInfo[];\r\n customerAddresses: Address[];\r\n validationError: object;\r\n addressActionResponse?: IAddressResponse;\r\n viewState: IAccountManagementAddressViewState;\r\n AccountAddressManagement: IModuleProps;\r\n isUpdating: boolean;\r\n showAddressList: IAddressListProps;\r\n showAddOrUpdateAddress: IAddressAddUpdateProps;\r\n screenReaderNotification: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * Address component.\r\n * @extends {React.Component>}\r\n */\r\n@observer\r\nclass AccountManagementAddress extends React.Component> {\r\n @observable private currentOperation: AddressOperation;\r\n\r\n @observable private selectedAddress?: Address;\r\n\r\n @observable private countryRegionId: string = 'USA';\r\n\r\n @observable private stateProvinceInfo?: StateProvinceInfo[];\r\n\r\n @observable private customerAddresses: Address[];\r\n\r\n @observable private addUpdateAddress: Address;\r\n\r\n @observable private validationError: object;\r\n\r\n @observable private addressActionResponse?: IAddressResponse;\r\n\r\n @observable private isUpdating?: boolean;\r\n\r\n @observable private hasError?: boolean;\r\n\r\n @observable private removeAddressData?: Address;\r\n\r\n private readonly addressCommon: AddressCommon;\r\n\r\n private addressFormat: AddressFormat;\r\n\r\n private countryRegions: CountryRegionInfo[] = [];\r\n\r\n private addressPurposes: AddressPurpose[] = [];\r\n\r\n private readonly resources: IAddressResource;\r\n\r\n private readonly defaultAddressType: number = 6; // Default to Home\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n private autoSuggest?: AutoSuggest;\r\n\r\n public constructor(props: IB2bAccountManagementAddressProps) {\r\n super(props);\r\n const { context, data, resources, telemetry } = this.props;\r\n\r\n this.resources = resources;\r\n this.currentOperation = AddressOperation.List;\r\n this.countryRegions = data.countryRegions.result || [];\r\n this.addressPurposes = data.addressPurposes.result || [];\r\n this.customerAddresses = data.address.result || [];\r\n this.addUpdateAddress = {};\r\n this.validationError = {};\r\n this.addressCommon = new AddressCommon(context, resources, telemetry);\r\n this.addressFormat = new AddressFormat(\r\n this.countryRegions,\r\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\r\n // Filter out the Invoice address for the add/update form\r\n this.addressPurposes.filter((address: AddressPurpose) => address.AddressType !== 1)\r\n );\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n /**\r\n * On Suggestion Selected Function.\r\n * @param result - Microsoft.Maps.ISuggestionResult.\r\n */\r\n @action\r\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\r\n this._clearAddressFields();\r\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\r\n set(this.addUpdateAddress, { Street: '' });\r\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\r\n set(this.addUpdateAddress, { CountyName: address.CountyName });\r\n set(this.addUpdateAddress, { City: address.City });\r\n set(this.addUpdateAddress, { State: address.State });\r\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\r\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\r\n\r\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\r\n setTimeout(() => {\r\n set(this.addUpdateAddress, { Street: address.Street });\r\n }, 0);\r\n };\r\n\r\n /**\r\n * Clear Address Fields.\r\n */\r\n @action\r\n private readonly _clearAddressFields = (): void => {\r\n const addressFormatItem = this.addressFormat.getAddressFormat(\r\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\r\n );\r\n addressFormatItem.forEach(format => {\r\n if (this.addUpdateAddress[format.name] !== undefined && !this.autoSuggest?.excludedAddressFields.includes(format.name)) {\r\n this.addressFormat[format.name] = '';\r\n }\r\n });\r\n this._clearValidation();\r\n };\r\n\r\n /**\r\n * Clear Validation Function.\r\n */\r\n @action\r\n private readonly _clearValidation = (): void => {\r\n this.validationError = {};\r\n };\r\n\r\n public async componentDidMount(): Promise {\r\n const {\r\n context: {\r\n telemetry,\r\n actionContext: {\r\n requestContext: { channel }\r\n }\r\n },\r\n config: { autoSuggestionEnabled, autoSuggestOptions }\r\n } = this.props;\r\n\r\n // Initializing data props\r\n this._dataInitialize(this.props);\r\n\r\n void this.props.data.countryRegions.then(() => {\r\n this._setDefaultCountryRegionId();\r\n });\r\n\r\n reaction(\r\n () => this.countryRegionId,\r\n () => {\r\n this._getStateProvinces();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.currentOperation,\r\n () => {\r\n this._getStateProvinces();\r\n }\r\n );\r\n\r\n if (autoSuggestionEnabled) {\r\n if (channel && !channel.BingMapsApiKey) {\r\n telemetry.error('BingMapsApiKey is missing.');\r\n return;\r\n }\r\n\r\n if (channel && !channel.BingMapsEnabled) {\r\n telemetry.error('Map is disabled from HQ.');\r\n return;\r\n }\r\n\r\n const options: IAutoSuggestOptions = { ...autoSuggestOptions };\r\n this.autoSuggest = new AutoSuggest(\r\n telemetry,\r\n options,\r\n channel?.BingMapsApiKey,\r\n channel?.ChannelCountryRegionISOCode,\r\n channel?.DefaultLanguageId\r\n );\r\n\r\n reaction(\r\n () =>\r\n this.props.data.storeSelectorStateManager.result?.loadMapApi !== undefined &&\r\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\r\n async () => {\r\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\r\n }\r\n );\r\n\r\n reaction(\r\n () => {\r\n this.props.data.storeSelectorStateManager.result?.isMapApiLoaded;\r\n },\r\n async () => {\r\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\r\n await this._attachMapAutoSuggest();\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Component did mount function.\r\n */\r\n public async componentDidUpdate(): Promise {\r\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\r\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\r\n await this._attachMapAutoSuggest();\r\n }\r\n } else {\r\n this.autoSuggest?.disposeAutoSuggest();\r\n }\r\n }\r\n\r\n /**\r\n * Should component update function.\r\n * @param nextProps - Account management address props.\r\n * @param nextState - Next state.\r\n * @returns - True if component should update, false otherwise.\r\n */\r\n public shouldComponentUpdate(\r\n nextProps: IB2bAccountManagementAddressProps,\r\n nextState: IAccountManagementAddressViewState\r\n ): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { renderView, config } = this.props;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n currentOperation: this.currentOperation,\r\n selectedAddress: this.selectedAddress,\r\n addUpdateAddress: this.addUpdateAddress,\r\n countryRegionId: this.countryRegionId,\r\n stateProvinceInfo: this.stateProvinceInfo,\r\n customerAddresses: this.customerAddresses,\r\n validationError: this.validationError,\r\n addressActionResponse: this.addressActionResponse,\r\n isUpdating: this.isUpdating,\r\n hasError: this.hasError,\r\n className: config.className,\r\n viewState: {\r\n isShowAddresList: this.currentOperation === AddressOperation.List,\r\n isShowAddOrUpdateAddress: this.currentOperation !== AddressOperation.List\r\n },\r\n AccountAddressManagement: {\r\n moduleProps: this.props,\r\n className: classnames('ms-account-management-address', config.className)\r\n },\r\n showAddressList: this._renderListAddress(),\r\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\r\n screenReaderNotification: this.removeAddressData ? this._renderScreenReaderRemoveText(this.removeAddressData) : null\r\n };\r\n\r\n return renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Method data initialization.\r\n * @param props -The account management props.\r\n */\r\n private readonly _dataInitialize = (props: IB2bAccountManagementAddressProps): void => {\r\n const { data } = props;\r\n\r\n reaction(\r\n () => data.countryRegions.result,\r\n () => {\r\n this.countryRegions = data.countryRegions.result ?? [];\r\n }\r\n );\r\n\r\n reaction(\r\n () => data.addressPurposes.result,\r\n () => {\r\n this.addressPurposes = data.addressPurposes.result ?? [];\r\n }\r\n );\r\n\r\n reaction(\r\n () => data.address.result,\r\n () => {\r\n this.customerAddresses = data.address.result ?? [];\r\n }\r\n );\r\n };\r\n\r\n /**\r\n * Render Add Or Update Address Function.\r\n * @returns - AddressAddUpdate.\r\n */\r\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\r\n return AddressAddUpdate({\r\n isUpdating: this.isUpdating,\r\n resources: this.resources,\r\n addressType: AddressType.Shipping,\r\n addressFormat: this.addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\r\n defaultCountryRegionId: this.countryRegionId,\r\n defaultAddressType: this.defaultAddressType,\r\n selectedAddress: this.addUpdateAddress,\r\n validationError: this.validationError,\r\n addressActionResponse: this.addressActionResponse,\r\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\r\n this.resources.addressStateDefaultSelectionText,\r\n this.stateProvinceInfo\r\n ),\r\n telemetryContent: this.telemetryContent,\r\n onInputChange: this._onAddressAddUpdateInputChange,\r\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\r\n onSave: this._onAddressAddUpdateSubmit,\r\n onCancel: this._resetView\r\n });\r\n };\r\n\r\n /**\r\n * Render List Address Function.\r\n * @returns - AddressList.\r\n */\r\n private readonly _renderListAddress = (): IAddressListProps => {\r\n const { config } = this.props;\r\n\r\n /**\r\n * Render Address ttitle.\r\n * @param event - Msdyn365.ContentEditableEvent.\r\n */\r\n const handleLineItemHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\r\n config.heading!.text = event.target.value;\r\n };\r\n const heading = config.heading && {\r\n text: config.heading.text,\r\n headingTag: config.heading.tag\r\n };\r\n\r\n return AddressList({\r\n isUpdating: this.isUpdating,\r\n selectedAddress: this.selectedAddress,\r\n addressFormat: this.addressFormat,\r\n addresses: this.customerAddresses,\r\n addressPurposes: this.addressPurposes,\r\n resources: this.resources,\r\n heading,\r\n primaryAddressSectionHeading: config.primaryAddressSectionHeading,\r\n otherAddressSectionHeading: config.otherAddressSectionHeading,\r\n contextRequest: this.props.context.request,\r\n telemetryContent: this.telemetryContent,\r\n handleLineItemHeadingChange,\r\n onEditAddress: this._goToEditAddress,\r\n onRemoveAddress: this._onRemoveAddress,\r\n onAddAddress: this._goToAddAddress,\r\n onUpdatePrimaryAddress: this._onSubmitUpdatePrimaryAddress\r\n });\r\n };\r\n\r\n /**\r\n * Attach Map Auto Suggest Function.\r\n */\r\n private readonly _attachMapAutoSuggest = async (): Promise => {\r\n const {\r\n data: {\r\n storeSelectorStateManager: { result: storeSelectorStateManager }\r\n }\r\n } = this.props;\r\n\r\n if (storeSelectorStateManager?.isMapApiLoaded) {\r\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\r\n }\r\n };\r\n\r\n /**\r\n * On Address Add Update Function.\r\n * @param name - String.\r\n * @param value - String | Boolean | Number.\r\n */\r\n private readonly onAddressAddUpdate = (name: string, value: string | boolean | number) => {\r\n set(this.addUpdateAddress, { [name]: value });\r\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\r\n };\r\n\r\n /**\r\n * On Address Add Update Input Change.\r\n * @param event - Input Change Event.\r\n */\r\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\r\n if (event.target.type === 'checkbox') {\r\n this.onAddressAddUpdate(event.target.name, event.target.checked);\r\n } else {\r\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\r\n this.onAddressAddUpdate(event.target.name, value);\r\n }\r\n };\r\n\r\n /**\r\n * On Address Add Update Dropdown Change.\r\n * @param event - Dropdown Change Event.\r\n */\r\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\r\n if (event.target.name === AddressItemType[AddressItemType.AddressTypeValue]) {\r\n this.onAddressAddUpdate(event.target.name, +event.target.value);\r\n } else {\r\n this.onAddressAddUpdate(event.target.name, event.target.value);\r\n }\r\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\r\n this._onCountryChange(event.target.value);\r\n }\r\n };\r\n\r\n /**\r\n * On Address Update Function.\r\n * @param response - Promise.\r\n * @param onSuccess - IAddressResponse.\r\n */\r\n private readonly _onAddressUpdate = (response: Promise, onSuccess: (response: IAddressResponse) => void): void => {\r\n this.isUpdating = true;\r\n response.then(\r\n (result: IAddressResponse) => {\r\n if (result.address) {\r\n this.hasError = false;\r\n onSuccess(result);\r\n } else {\r\n this.hasError = true;\r\n this.addressActionResponse = result;\r\n }\r\n this.isUpdating = false;\r\n },\r\n () => {\r\n this.hasError = true;\r\n this.isUpdating = false;\r\n }\r\n );\r\n };\r\n\r\n /**\r\n * On Address Add Update Submit Function.\r\n */\r\n private readonly _onAddressAddUpdateSubmit = (): void => {\r\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\r\n return;\r\n }\r\n let response: Promise;\r\n if (this.addressCommon.isAuthenticatedFlow()) {\r\n response =\r\n this.currentOperation === AddressOperation.Update\r\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\r\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\r\n } else {\r\n response = Promise.resolve({ address: this.addUpdateAddress });\r\n }\r\n\r\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\r\n };\r\n\r\n /**\r\n * On Country Change Function.\r\n * @param countryRegionId - String.\r\n */\r\n private readonly _onCountryChange = (countryRegionId: string) => {\r\n this.countryRegionId = countryRegionId;\r\n const twoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\r\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\r\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterISORegionName });\r\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterISORegionName);\r\n this._clearAddressFields();\r\n };\r\n\r\n /**\r\n * Get Address Format Exclude List Function.\r\n * @returns - Address Format Exclude List.\r\n */\r\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\r\n const { config } = this.props;\r\n const addressFormatExcludeList: AddressItemType[] = [];\r\n\r\n if (!config.showAddressType) {\r\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\r\n }\r\n\r\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\r\n\r\n return addressFormatExcludeList;\r\n };\r\n\r\n /**\r\n * Get State Provinces Function.\r\n */\r\n private readonly _getStateProvinces = (): void => {\r\n if (\r\n !this.countryRegionId ||\r\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\r\n ) {\r\n return;\r\n }\r\n\r\n void this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\r\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\r\n\r\n // Reset state if selected state not found in the list.\r\n if (!stateInfo) {\r\n set(this.addUpdateAddress, { State: '' });\r\n }\r\n this.stateProvinceInfo = result;\r\n });\r\n };\r\n\r\n private _setDefaultCountryRegionId(): void {\r\n const { request } = this.props.context;\r\n const market = request && request.channel && request.channel.ChannelCountryRegionISOCode;\r\n\r\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\r\n }\r\n\r\n /**\r\n * Update CurrentOperation Function.\r\n * @param operation - AddressOperation.\r\n */\r\n private readonly _updateCurrentOperation = (operation: AddressOperation) => {\r\n this.currentOperation = operation;\r\n this._clearAddressFields();\r\n };\r\n\r\n /**\r\n * On Submit Update Primary Address Function.\r\n * @param address - Address.\r\n */\r\n private readonly _onSubmitUpdatePrimaryAddress = (address: Address): void => {\r\n this.selectedAddress = address;\r\n const response = this.addressCommon.updateCustomerPrimaryAddress(address);\r\n this._onAddressUpdate(response, this._onUpdatePrimaryAddressSuccess);\r\n };\r\n\r\n /**\r\n * Go To Edit Address Function.\r\n * @param address - Address.\r\n */\r\n private readonly _goToEditAddress = (address: Address): void => {\r\n this.addUpdateAddress = { ...address };\r\n this.countryRegionId = this.addUpdateAddress.ThreeLetterISORegionName || 'USA';\r\n this._updateCurrentOperation(AddressOperation.Update);\r\n };\r\n\r\n /**\r\n * On Remove Address Function.\r\n * @param address - Address.\r\n */\r\n private readonly _onRemoveAddress = (address: Address): void => {\r\n address.Deactivate = true;\r\n this.removeAddressData = address;\r\n const response = this.addressCommon.updateCustomerAddress(address);\r\n this._onAddressUpdate(response, this._onAddOrUpdateSuccess);\r\n };\r\n\r\n /**\r\n * Renders Notification screen reader text for removed address.\r\n * @param address - Address input.\r\n * @returns Notification for removed address.\r\n */\r\n private readonly _renderScreenReaderRemoveText = (address: Address): React.ReactNode => {\r\n const notification = formatNotification(this.resources.removeAddressNotification!, `${address.Name!}`);\r\n return (\r\n
\r\n {notification}\r\n
\r\n );\r\n };\r\n\r\n /**\r\n * Go To Add Address Function.\r\n */\r\n private readonly _goToAddAddress = (): void => {\r\n this.addUpdateAddress = {};\r\n this._setDefaultCountryRegionId();\r\n set(this.addUpdateAddress, { ThreeLetterISORegionName: this.countryRegionId });\r\n set(this.addUpdateAddress, { AddressTypeValue: this.defaultAddressType });\r\n this._setDefaultCountryRegionId();\r\n this._updateCurrentOperation(AddressOperation.Add);\r\n };\r\n\r\n /**\r\n * On Add Or Update Success Function.\r\n * @param response - IAddressResponse.\r\n */\r\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse): void => {\r\n if (response.customerAddresses) {\r\n this.customerAddresses = response.customerAddresses;\r\n }\r\n this._resetView();\r\n };\r\n\r\n /**\r\n * On Update Primary Address Success Function.\r\n * @param response - IAddressResponse.\r\n */\r\n private readonly _onUpdatePrimaryAddressSuccess = (response: IAddressResponse): void => {\r\n if (response.customerAddresses) {\r\n this.customerAddresses = response.customerAddresses;\r\n }\r\n };\r\n\r\n /**\r\n * Reset view function.\r\n */\r\n private readonly _resetView = (): void => {\r\n this.selectedAddress = undefined;\r\n this._updateCurrentOperation(AddressOperation.List);\r\n };\r\n}\r\n\r\nexport default AccountManagementAddress;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nexport * from './checkout-errors';\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetry } from '@msdyn365-commerce/core';\nimport { IStoreSelectorStateManager } from '@msdyn365-commerce-modules/bopis-utilities';\n\nimport { IAutoSuggestOptions } from './address-autosuggest.data';\n\n/**\n *\n * Auto Suggest.\n */\nexport class AutoSuggest {\n public readonly excludedAddressFields: string[] = ['ThreeLetterISORegionName', 'Name', 'AddressTypeValue', 'Phone'];\n\n private readonly telemetry: ITelemetry;\n\n private readonly countryCode?: string;\n\n private readonly bingMapsApiKey?: string;\n\n private readonly defaultLanguageId?: string;\n\n private autoSuggestManager: Microsoft.Maps.AutosuggestManager | undefined;\n\n private autoSuggestOptions: IAutoSuggestOptions;\n\n constructor(\n telemetry: ITelemetry,\n autoSuggestOptions: IAutoSuggestOptions,\n BingMapsApiKey?: string,\n countryCode?: string,\n defaultLanguageId?: string\n ) {\n this.telemetry = telemetry;\n this.autoSuggestOptions = autoSuggestOptions;\n this.bingMapsApiKey = BingMapsApiKey;\n this.countryCode = countryCode;\n this.defaultLanguageId = defaultLanguageId;\n }\n\n public attachAutoSuggest = (\n inputId: string,\n containerId: string,\n selectedSuggestionCallback: (result: Microsoft.Maps.ISuggestionResult) => void\n ): void => {\n if (!this.autoSuggestManager) {\n Microsoft.Maps.loadModule('Microsoft.Maps.AutoSuggest', {\n callback: () => {\n const options = { ...this.autoSuggestOptions, countryCode: this.countryCode };\n this.autoSuggestManager = new Microsoft.Maps.AutosuggestManager(options);\n this.autoSuggestManager.attachAutosuggest(inputId, containerId, selectedSuggestionCallback);\n document.querySelector(inputId)?.setAttribute('role', 'combobox');\n setTimeout(() => {\n document.querySelector(inputId)?.setAttribute('type', 'text');\n }, 0);\n },\n errorCallback: () => {\n if (this.telemetry) {\n this.telemetry.debug('Unable to attach map auto suggest.');\n }\n },\n credentials: this.bingMapsApiKey\n });\n }\n };\n\n public changeAutoSuggestionCountryCode = (countryCode?: string): void => {\n if (this.autoSuggestManager) {\n this.autoSuggestOptions.countryCode = countryCode;\n this.autoSuggestManager.setOptions(this.autoSuggestOptions);\n }\n };\n\n public disposeAutoSuggest = (): void => {\n this.autoSuggestManager?.detachAutosuggest();\n this.autoSuggestManager?.dispose();\n this.autoSuggestManager = undefined;\n };\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _loadMapAPI = async (storeSelectorStateManager: IStoreSelectorStateManager): Promise => {\n await storeSelectorStateManager.loadMapApi({\n key: this.bingMapsApiKey,\n lang: this.defaultLanguageId,\n market: this.countryCode\n });\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAddressButton {\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n role?: string;\n onClick(event: React.MouseEvent): void;\n}\n\n/**\n * Address button.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressButtonFunctionComponent: React.FC = (props: IAddressButton) => {\n const { className, text, ariaLabel, disabled: isDisabled, telemetryContent, onClick, role } = props;\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressButtonFunctionComponent;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n IAddressShowItem,\r\n IAddressShowProps\r\n} from '@msdyn365-commerce-modules/address/src/modules/checkout-billing-address/../../common/components/address-show';\r\nimport { ICheckoutBillingAddressViewProps } from './b2b-checkout-billing-address';\r\n\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return <>{item.description};\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Checkout Billing Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutBillingAddress Module.\r\n */\r\nconst CheckoutBillingAddressView: React.FC = props => {\r\n const { CheckoutBillingAddress, viewState, showAddress, error } = props;\r\n\r\n return (\r\n \r\n {viewState.isShowAddress && }\r\n {viewState.isError && error}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutBillingAddressView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModuleProps, INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IFooterCategoryConfig, IFooterCategoryProps } from './footer-category.props.autogenerated';\n\nexport interface IFooterCategoryViewProps extends IFooterCategoryProps {\n categories: React.ReactNode[];\n FooterList: IModuleProps;\n FooterListItem: INodeProps;\n}\n\n/**\n *\n * FooterCategory component.\n * @extends {React.PureComponent>}\n */\nclass FooterCategory extends React.PureComponent> {\n public render(): JSX.Element | null {\n if (!this.props.slots || !this.props.slots.content || this.props.slots.content.length === 0) {\n this.props.context.telemetry.error('footer slots content is empty, module wont render');\n return null;\n }\n const viewprops = {\n ...this.props,\n categories: this.props.slots.content,\n FooterList: {\n moduleProps: this.props,\n className: classnames('ms-footer__list', this.props.config.className),\n tag: 'ul'\n },\n FooterListItem: {\n className: classnames('ms-footer__list-item', this.props.config.className),\n tag: 'li'\n }\n };\n\n return this.props.renderView(viewprops) as React.ReactElement;\n }\n}\n\nexport default FooterCategory;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponent, IComponentProps, msdyn365Commerce } from '@msdyn365-commerce/core';\nimport { ICartState } from '@msdyn365-commerce/global-state';\nimport { format, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\n/**\n * ICartIconData: Interface for Cart Icon Data.\n */\nexport interface ICartIconData {\n cart?: ICartState;\n}\n\n/**\n * ICartIconComponentProps: Interface for Cart Icon component props.\n */\nexport interface ICartIconComponentProps extends IComponentProps {\n className?: string;\n cartLabel: string;\n cartQtyLabel: string;\n telemetryContent?: ITelemetryContent;\n salesAgreementPricePrompt?: string;\n}\n\n/**\n * ICartIconComponent: Interface for Cart Icon component.\n */\nexport interface ICartIconComponent extends IComponent {}\n\nconst CartIconComponentActions = {};\n\n/**\n *\n * CartIcon component.\n * @extends {React.FC}\n */\nconst CartIcon: React.FC = observer((props: ICartIconComponentProps) => {\n const {\n cartLabel,\n cartQtyLabel,\n data: { cart }\n } = props;\n const defaultCartItemCount: number = 0;\n\n const cartItem = cart ? cart.totalItemsInCart : defaultCartItemCount;\n let qtyLabel: string = '';\n const cartMaxQuantity: number = 99;\n const maxQuantityLabel: string = '99+';\n if (cartItem > cartMaxQuantity) {\n qtyLabel = maxQuantityLabel;\n } else {\n qtyLabel = format(cartQtyLabel, cartItem);\n }\n const label = format(cartLabel, cartItem);\n\n // Construct telemetry attribute to render\n const payLoad = getPayloadObject('click', props.telemetryContent!, 'cart-icon', '');\n const attributes = getTelemetryAttributes(props.telemetryContent!, payLoad);\n const style: React.CSSProperties = {\n visibility: cart ? 'visible' : 'hidden'\n };\n return (\n
\n
\n {qtyLabel}\n
\n
\n );\n});\n\nexport const CartIconComponent: React.FunctionComponent = msdyn365Commerce.createComponentOverride<\n // @ts-expect-error -- Compatible issue with the component override.\n ICartIconComponent\n>('CartIcon', { component: CartIcon, ...CartIconComponentActions });\n\nexport default CartIconComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport BusinessAccountAddress from './business-account-address';\nimport BusinessAccountAddressView from './business-account-address.view';\n\nexport * from './business-account-address';\nexport * from './business-account-address.data';\nexport {\n IBusinessAccountAddressConfig,\n IBusinessAccountAddressProps,\n IBusinessAccountAddressResources\n} from './business-account-address.props.autogenerated';\nexport * from './business-account-address.view';\n\nexport { BusinessAccountAddress, BusinessAccountAddressView };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressErrorTitle {\n title: string;\n}\n\n/**\n * Address error title.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressErrorTitleFunctionComponent: React.FC = (props: IAdressErrorTitle) => {\n const { title } = props;\n\n return

{title}

;\n};\n\nexport default AddressErrorTitleFunctionComponent;\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { Module, Node } from \"@msdyn365-commerce-modules/utilities\";\r\nimport * as React from \"react\";\r\n\r\nimport {\r\n ICheckoutViewProps,\r\n ILineItem,\r\n ILineItemDeliveryGroup,\r\n ILineItems,\r\n IOrderSummary,\r\n IPickUpAtStore\r\n} from \"@msdyn365-commerce-modules/checkout/src/modules/checkout/./checkout\";\r\nimport { IEmailDelivery } from \"@msdyn365-commerce-modules/checkout/src/modules/checkout/./components\";\r\nimport {\r\n IInvoicePaymentSummary\r\n} from \"@msdyn365-commerce-modules/checkout/src/modules/checkout/./components/get-invoice-payment-summary\";\r\nimport {\r\n IChargeLinesBreakdownData,\r\n ICheckoutProps as ICheckoutExtensionProps\r\n} from \"../definition-extensions/checkout.ext.props.autogenerated\";\r\nimport { AttributeBooleanValue, Cart } from \"@msdyn365-commerce/retail-proxy\";\r\nimport { LinePagination } from \"./components/line-pagination\";\r\n\r\n\r\nexport interface IOrderSummaryExtended extends IOrderSummary {\r\n otherChargesLines: React.ReactNode[];\r\n}\r\n\r\nexport interface ILineItemsExtended extends ILineItems {\r\n numItems: number;\r\n prev: string;\r\n next: string;\r\n}\r\n\r\nexport interface ILineItemDeliveryGroupExtended extends ILineItemDeliveryGroup {\r\n numItems: number;\r\n prev: string;\r\n next: string;\r\n}\r\n\r\nexport const PickUpAtStoreComponent: React.FC = ({ PickUpAtStore, label, location }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const EmailDeliveryComponent: React.FC = ({ EmailDelivery, label }) =>\r\n {label};\r\n\r\nexport const LineItemComponent: React.FC = ({ LineItem, item, pickUpAtStore, emailDelivery }) => (\r\n \r\n {item}\r\n {pickUpAtStore && }\r\n {emailDelivery && }\r\n \r\n);\r\n//\r\nexport const LineItemGroupComponent: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n numItems,\r\n prev,\r\n next\r\n }) => {\r\n if (lineItems && lineItems.length > 0 && !lineItems[0].item) {\r\n return null;\r\n }\r\n\r\n const defaultPageLength: number = 5;\r\n const pageLength = numItems || defaultPageLength;\r\n const [paginatedView, setPaginatedView] = React.useState((lineItems && lineItems.length >= pageLength) ? lineItems.slice(0, pageLength) : lineItems);\r\n const [paginationPage, setPaginationPage] = React.useState(0);\r\n\r\n const nextPage = () => {\r\n changePage(paginationPage + 1);\r\n };\r\n\r\n const prevPage = () => {\r\n changePage(paginationPage - 1);\r\n };\r\n\r\n const changePage = (page: number) => {\r\n if (page < 0) {\r\n return;\r\n }\r\n\r\n if (lineItems && (page > lineItems.length / pageLength)) {\r\n return;\r\n }\r\n\r\n let skip = (page * pageLength);\r\n if (lineItems && lineItems.length >= skip) {\r\n setPaginationPage(page);\r\n let slice = lineItems?.slice(skip);\r\n setPaginatedView(slice.length >= pageLength ? slice.slice(0, pageLength) : slice);\r\n }\r\n };\r\n\r\n const pagination = () => {\r\n return (\r\n \r\n );\r\n };\r\n\r\n if (paginatedView.length === 0 || !paginatedView[0].item) {\r\n return null;\r\n }\r\n return (\r\n \r\n {heading}\r\n \r\n {/* {lineItems.map(lineItem => ( */}\r\n {paginatedView.map(lineItem => {\r\n return ;\r\n })}\r\n \r\n {pagination()}\r\n \r\n );\r\n};\r\n\r\nexport const LineItemGroupComponentWithMultiplePickUp: React.FC = ({\r\n LineItemDeliveryGroup,\r\n LineItemList,\r\n heading,\r\n lineItems,\r\n lineItemWraper,\r\n lineItemWraperIcon\r\n }) => (\r\n \r\n {lineItemWraperIcon}\r\n {lineItemWraper}\r\n {heading}\r\n \r\n {lineItems.map(lineItem => (\r\n \r\n ))}\r\n \r\n \r\n);\r\n\r\nexport const LineItemComponentWithMultiplePickUp: React.FC = ({\r\n LineItem,\r\n item,\r\n pickUpAtStore,\r\n emailDelivery\r\n }) => (\r\n \r\n {item}\r\n {emailDelivery && }\r\n \r\n);\r\n\r\nexport const PickUpAtStoreComponentWithMultiplePickUp: React.FC = ({\r\n PickUpAtStore,\r\n label,\r\n location\r\n }) => (\r\n \r\n {label}\r\n {location}\r\n \r\n);\r\n\r\nexport const LineItemsComponent: React.FC = ({\r\n LineItems,\r\n Header,\r\n heading,\r\n editLink,\r\n itemsForPickup,\r\n itemsForShip,\r\n itemsForEmail,\r\n itemsGroupWithMulitplePickupMode,\r\n numItems,\r\n prev,\r\n next\r\n }) => {\r\n const items = itemsForPickup ? itemsForPickup : itemsForEmail ? itemsForEmail : itemsForShip;\r\n if (!items) {\r\n return null;\r\n }\r\n const lineItemGroupComponentExt: ILineItemDeliveryGroupExtended = { ...items!, numItems, prev, next };\r\n\r\n return (\r\n \r\n \r\n {heading}\r\n {editLink}\r\n \r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForPickup &&\r\n }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForEmail &&\r\n }\r\n {itemsGroupWithMulitplePickupMode === undefined && itemsForShip &&\r\n }\r\n {itemsGroupWithMulitplePickupMode !== undefined\r\n ? itemsGroupWithMulitplePickupMode.map((item, index) => {\r\n return ;\r\n })\r\n : null}\r\n \r\n );\r\n};\r\n\r\n\r\nconst OrderSummaryComponent: React.FC = ({ heading, lines, otherChargesLines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.subtotal}\r\n {lines.shipping}\r\n {lines.otherCharge}\r\n {otherChargesLines &&

{otherChargesLines}

}\r\n {lines.tax}\r\n {/* {lines.totalDiscounts} */}\r\n {lines.loyalty}\r\n {lines.giftCard}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst PaymentSummaryComponent: React.FC = ({ heading, lines }) => (\r\n
\r\n {heading}\r\n
\r\n {lines && (\r\n <>\r\n {lines.invoices}\r\n {lines.giftCard}\r\n {lines.loyalty}\r\n {lines.orderTotal}\r\n \r\n )}\r\n
\r\n
\r\n);\r\n\r\nconst _renderShipOnCheckout = (\r\n shipCompleteOnCheckout: boolean,\r\n handleShipCompleteOnCheckoutChange: (e: React.MouseEvent) => void,\r\n shipCompleteOnCheckoutLabel: string\r\n): React.ReactNode => (\r\n
\r\n \r\n
\r\n);\r\n\r\nconst _renderOrderComment = (commentHeading: string, commentString: string): React.ReactNode => {\r\n const emptyStringClassName = commentString == \"\";\r\n return (\r\n \r\n

\r\n {commentHeading}\r\n

\r\n

\r\n {commentString}\r\n

\r\n \r\n );\r\n};\r\n\r\n\r\nconst otherChargesLines = (cart: Cart, chargeCodes: IChargeLinesBreakdownData[] | undefined, currencyFormatter: (price: string | number, currencyCode?: string | undefined) => string): React.ReactNode[] => {\r\n\r\n let lines = cart.ChargeLines;\r\n let linesNode: React.ReactNode[] = [];\r\n chargeCodes?.map(c => {\r\n const node = lines?.filter(\r\n line => line.ChargeCode === c.chargeCode).map(\r\n r =>

{c.chargeLineLabel} {currencyFormatter(r.CalculatedAmount?.toString() ?? \"\")}

\r\n );\r\n linesNode.push(node);\r\n });\r\n return linesNode;\r\n};\r\n\r\nconst CheckoutView: React.FC> = props => {\r\n const attributeArr = props.data.checkout.result?.checkoutCart.cart.AttributeValues || [];\r\n const getShipCompleteIndex = (): number => {\r\n return props.data.checkout.result?.checkoutCart.cart.AttributeValues?.findIndex(attribute => attribute.Name === \"ShipComplete\") || -1;\r\n };\r\n // Get the text in the order level comment, if it doesn't exist, assign an empty string\r\n const getCommentText = (): string => {\r\n return props.data.checkout.result?.checkoutCart.cart.Comment || \"\";\r\n };\r\n // Get the comment heading text from the resources\r\n const getCommentHeadingText = (): string => {\r\n return props.resources.commentHeadingText;\r\n };\r\n const getShipCompleteValue = (): boolean => {\r\n const shipCompleteIndex = getShipCompleteIndex();\r\n if (shipCompleteIndex === -1) {\r\n return false;\r\n } else {\r\n const attr = attributeArr[shipCompleteIndex] as AttributeBooleanValue;\r\n return !!attr?.Value;\r\n }\r\n };\r\n const handleShipCompleteOnCheckoutChange = () => {\r\n const shipComplete = {\r\n \"@odata.type\": \"#Microsoft.Dynamics.Commerce.Runtime.DataModel.AttributeBooleanValue\",\r\n Name: \"ShipComplete\",\r\n Value: !getShipCompleteValue()\r\n };\r\n const idx = getShipCompleteIndex();\r\n idx === -1 ? attributeArr.push(shipComplete) : attributeArr.splice(idx, 1, shipComplete);\r\n const cart: Cart = Object.assign({}, props.data.checkout.result?.checkoutCart.cart);\r\n if (cart) {\r\n cart.AttributeValues = attributeArr;\r\n saveShipCompleteToCart(cart);\r\n }\r\n };\r\n const saveShipCompleteToCart = async (cart: Cart) => {\r\n if (cart) {\r\n const checkoutState = props.data.checkout.result;\r\n if (!checkoutState) {\r\n return;\r\n }\r\n\r\n await checkoutState.checkoutCart.updateCart({ newCartObject: cart }).then(() => {\r\n setShipCompleteOnCheckout(getShipCompleteValue());\r\n });\r\n }\r\n };\r\n const [shipCompleteOnCheckout, setShipCompleteOnCheckout] = React.useState(getShipCompleteValue());\r\n const shipCompleteOnCheckoutToggle = _renderShipOnCheckout(\r\n shipCompleteOnCheckout,\r\n handleShipCompleteOnCheckoutChange,\r\n props.resources.shipCompleteOnCheckoutLabel\r\n );\r\n\r\n // const getProductEligibility = async (addressId: number): Promise => {\r\n // // get items ids after removing duplicates\r\n // const checkoutState = props.data.checkout.result;\r\n // let productToRemove: any[] = [];\r\n // let list: EligibleItems = [];\r\n //\r\n // if (!checkoutState) {\r\n // return;\r\n // }\r\n //\r\n // const itemIds = [...new Set(cart.CartLines?.map(p => p.ItemId!) || [])];\r\n //\r\n // if (itemIds.length) {\r\n //\r\n // await getProductEligibilityAsync({ callerContext: props.context.actionContext }, itemIds, addressId, checkoutState.checkoutCart.cart.Id || '')\r\n // .then((result: any) => {\r\n // result.forEach((i: any) => {\r\n // const id = getExtensionPropertyValueByKey(i.ExtensionProperties, \"ItemId\", CommercePropertyValueEnum.string);\r\n // list.push({\r\n // ItemId: String(id),\r\n // IsEligible: i.IsEligible\r\n // });\r\n // });\r\n // });\r\n //\r\n // cart.CartLines?.forEach(c => {\r\n // list.forEach(i => {\r\n // if (i.ItemId === c.ItemId && !i.IsEligible) {\r\n // productToRemove.push(\r\n // {\r\n // LineId: c.LineId || '',\r\n // ItemId: c.ItemId\r\n // }\r\n // );\r\n // }\r\n // });\r\n // });\r\n // if (productToRemove.length) {\r\n // await checkoutState.checkoutCart.removeCartLines({ cartLineIds: productToRemove.map(p => p.LineId) });\r\n // }\r\n // return productToRemove;\r\n // }\r\n // }\r\n\r\n const _renderAccountLockedMessage = (): React.ReactNode => (\r\n
{props.config.accountLockedMessage}
\r\n );\r\n\r\n const {\r\n canShow,\r\n checkoutProps,\r\n headerProps,\r\n hasSalesOrder,\r\n hasInvoiceLine,\r\n bodyProps,\r\n mainProps,\r\n mainControlProps,\r\n sideProps,\r\n sideControlFirstProps,\r\n sideControlSecondProps,\r\n termsAndConditionsProps,\r\n orderConfirmation,\r\n loading,\r\n alert,\r\n title,\r\n guidedForm,\r\n orderSummary,\r\n invoicePaymentSummary,\r\n lineItems,\r\n placeOrderButton,\r\n termsAndConditions,\r\n keepShoppingButton\r\n } = props;\r\n const defaultPageLength: number = 5;\r\n const pageLength = props.config.pageLength || defaultPageLength;\r\n const cart: Cart = Object.assign({}, props.data.checkout.result?.checkoutCart.cart);\r\n let chargelines = otherChargesLines(cart, props.config.chargeLinesBreakdown, props.context.cultureFormatter.formatCurrency);\r\n const orderSummaryExtended: IOrderSummaryExtended = { ...orderSummary!, otherChargesLines: chargelines };\r\n // const [productsRemoved, setProductsRemoved] = React.useState(null);\r\n\r\n // if (MsDyn365.isBrowser && cart.CartLines) {\r\n // const shippingId = (window as any).ShippingId;\r\n // const recId = cart.ShippingAddress?.RecordId;\r\n //\r\n // // if (recId && shippingId !== recId) {\r\n // // (window as any).ShippingId = recId;\r\n // // getProductEligibility(recId).then(result => {\r\n // // if (result.length) {\r\n // // setProductsRemoved(result);\r\n // // document.dispatchEvent(new CustomEvent(\"UPDATE_CART\", { detail: { Products: result } }));\r\n // // }\r\n // // });\r\n // // }\r\n // }\r\n\r\n const isAccountBlocked: boolean | undefined = props.data.customerInformation.result?.Blocked;\r\n const lineItemsExt: ILineItemsExtended = {\r\n ...lineItems!,\r\n numItems: pageLength,\r\n prev: props.resources.paginationPrev || \"\",\r\n next: props.resources.paginationNext || \"\"\r\n };\r\n return (\r\n \r\n {/*{productsRemoved && productsRemoved.length ? generateProductsRemovedMessage(productsRemoved, productEligibilityText) : null}*/}\r\n {!hasSalesOrder && {title}}\r\n {!hasSalesOrder && (\r\n \r\n {loading}\r\n {isAccountBlocked ? _renderAccountLockedMessage() : null}\r\n {alert}\r\n {canShow && (\r\n <>\r\n \r\n {guidedForm}\r\n {termsAndConditions}\r\n {props.config.shipCompleteOnCheckout && shipCompleteOnCheckoutToggle}\r\n \r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n {!hasInvoiceLine\r\n ? orderSummary && \r\n : invoicePaymentSummary && }\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n {lineItems && }\r\n {_renderOrderComment(getCommentHeadingText(), getCommentText())}\r\n \r\n {termsAndConditions}\r\n {placeOrderButton}\r\n {keepShoppingButton}\r\n \r\n \r\n \r\n )}\r\n \r\n )}\r\n {hasSalesOrder && orderConfirmation}\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction, set } from 'mobx';\nimport * as React from 'react';\n\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemDisplayType, AddressItemType, AddressValidationRuleType, IAddressItem } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IBusinessAccountAddressData } from './business-account-address.data';\nimport { IBusinessAccountAddressProps } from './business-account-address.props.autogenerated';\n\n/**\n * Interface for IBusinessAccountAddressExtendedProps.\n */\nexport interface IBusinessAccountAddressExtendedProps extends IBusinessAccountAddressProps {\n hasError: boolean;\n isRequired: boolean;\n resetAddress: boolean;\n updateForm(errors: boolean, currentAddress?: Address): void;\n}\n\n/**\n * Interface for IBusinessAccountAddressState.\n */\nexport interface IBusinessAccountAddressState {\n countryId?: string;\n states?: StateProvinceInfo[];\n}\n\n/**\n * Interface for IBusinessAccountAddressViewProps.\n */\nexport interface IBusinessAccountAddressViewProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n addressListSelectedAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n BusinessAccountAddress: IModuleProps;\n isUpdating: boolean;\n hasError: boolean;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component, IBusinessAccountAddressState>}\n */\nclass BusinessAccountAddress extends React.Component {\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private readonly validationError: object;\n\n private readonly addressActionResponse?: IAddressResponse;\n\n private readonly isUpdating?: boolean;\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 0; // Default to None (This value set in HQ as Business)\n\n private readonly shouldAutoFocus?: boolean = false;\n\n private readonly excludedList: AddressItemType[] = [AddressItemType.Name, AddressItemType.AddressTypeValue, AddressItemType.IsPrimary]; // Default to hiding Name and AddressType inputs\n\n private readonly telemetryContent: ITelemetryContent;\n\n public constructor(props: IBusinessAccountAddressExtendedProps) {\n super(props);\n\n const { context, data, resources, telemetry } = this.props;\n this.addUpdateAddress = {};\n this.resources = resources;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, props.isRequired ? undefined : []),\n this.addressPurposes\n );\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.validationError = {};\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n // Initializing data props\n this._dataInitialize(this.props);\n\n this._setDefaultCountryRegionId();\n }\n\n public shouldComponentUpdate(nextProps: IBusinessAccountAddressExtendedProps, nextState: IBusinessAccountAddressState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { renderView, config, hasError, resetAddress } = this.props;\n\n // Business-sign-up will pass this flag when cancel button is clicked\n if (resetAddress) {\n this._resetAddressFields();\n }\n\n const viewProps = {\n ...this.props,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n hasError,\n className: config.className,\n BusinessAccountAddress: {\n moduleProps: this.props,\n className: classnames('ms-business-account-address', config.className)\n },\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Reset Address.\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _resetAddressFields = () => {\n const addressFormat = this.addressFormat.getAddressFormat(this.countryRegionId);\n\n addressFormat.map(addressFormatItem => {\n switch (addressFormatItem.displayType) {\n case AddressItemDisplayType.Input:\n this.addUpdateAddress[addressFormatItem.name] = '';\n break;\n case AddressItemDisplayType.Checkbox:\n this.addUpdateAddress[addressFormatItem.name] = false;\n break;\n default:\n switch (addressFormatItem.type) {\n case AddressItemType.ThreeLetterISORegionName:\n this.addUpdateAddress[addressFormatItem.name] = this.countryRegionId;\n break;\n case AddressItemType.AddressTypeValue:\n this.addUpdateAddress[addressFormatItem.name] = this.defaultAddressType;\n break;\n case AddressItemType.State:\n this.addUpdateAddress[addressFormatItem.name] = '';\n break;\n default:\n this.addUpdateAddress[addressFormatItem.name] = undefined;\n }\n }\n });\n };\n\n /**\n * Method data initialization.\n * @param props -The account management props.\n */\n private readonly _dataInitialize = (props: IBusinessAccountAddressExtendedProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n };\n\n // Set validationError and hasError to hide error messages since in the B2B\n // request form, no errors would visually show since user wont be able to submit\n // until form is filled and correct\n /**\n * Render Add Or Update Address Function.\n * @returns - AddressAddUpdate.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Company,\n addressFormat: this.addressFormat.getAddressFormat(this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n shouldAutoFocus: this.shouldAutoFocus,\n validationError: this.validationError,\n hasError: this.props.hasError,\n addressActionResponse: this.addressActionResponse,\n telemetryContent: this.telemetryContent,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange\n });\n };\n\n /**\n * On Address Add Update Input Change Function.\n * @param event - Input event change function.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n this._updateAddress(event.target.name, event.target.value);\n };\n\n /**\n * On Address Add Update Dropdown Change Function.\n * @param event - Change dropdown event.\n */\n private readonly _onAddressAddUpdateDropdownChange = async (event: React.ChangeEvent): Promise => {\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n await this._updateCountryRegionId(event.target.value);\n } else {\n this._updateAddress(event.target.name, event.target.value);\n }\n };\n\n /**\n * Update Address Function.\n * @param name - String.\n * @param value - String.\n */\n private readonly _updateAddress = (name: string, value: string | number) => {\n const { updateForm, isRequired, resources } = this.props;\n let cleanValue = value;\n if (typeof value === 'string') {\n cleanValue = (value || '').replace(new RegExp('[<>]', 'gi'), '');\n }\n set(this.addUpdateAddress, { [name]: cleanValue });\n\n if (this._isEmpty()) {\n if (isRequired) {\n updateForm(true, undefined);\n } else {\n // Reset addressFormat as if address was NOT a required field\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, []),\n this.addressPurposes\n );\n updateForm(false, this.addUpdateAddress);\n }\n } else {\n // Get new addressFormat if address was a required field\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this.excludedList, this.props.isRequired ? undefined : []),\n this.addressPurposes\n );\n\n // Verify with new rules\n if (this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n updateForm(false, this.addUpdateAddress);\n } else {\n updateForm(true, undefined);\n }\n }\n };\n\n /**\n * Is empty Function.\n * @returns - Boolean.\n */\n // Walk through array and check if valued is defined or value is not an empty string\n private readonly _isEmpty = () => {\n const addressFormat = this.addressFormat.getAddressFormat(this.countryRegionId);\n for (const addressFormatItem of addressFormat) {\n if (addressFormatItem.type !== AddressItemType.ThreeLetterISORegionName || this._isInputRequired(addressFormatItem)) {\n const addressItemValue = this.addUpdateAddress[addressFormatItem.name];\n\n // Check each input field, if value is defined and not an empty string --> address is not empty\n if (addressItemValue || (addressItemValue && addressItemValue !== '')) {\n return false;\n }\n }\n }\n\n return true;\n };\n\n /**\n * Is Input Required Function.\n * @param addressFormatItem - IAddressItem.\n * @returns - Boolean.\n */\n private readonly _isInputRequired = (addressFormatItem: IAddressItem): boolean => {\n if (\n ObjectExtensions.isNullOrUndefined(addressFormatItem) ||\n !addressFormatItem.validationRules ||\n addressFormatItem.validationRules.length === 0\n ) {\n return false;\n }\n\n for (const validationRule of addressFormatItem.validationRules) {\n if (validationRule.type === AddressValidationRuleType.Required) {\n return false;\n }\n }\n\n return true;\n };\n\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n\n this._updateCountryRegionId(this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market));\n\n // Set default AddressType\n set(this.addUpdateAddress, { AddressTypeValue: this.defaultAddressType });\n }\n\n /**\n * Update Country Region Id Function.\n * @param value - String.\n */\n private readonly _updateCountryRegionId = async (value: string) => {\n this.countryRegionId = value;\n\n await this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n this._updateAddress('State', '');\n }\n\n this.stateProvinceInfo = result;\n });\n\n this._updateAddress('ThreeLetterISORegionName', this.countryRegionId);\n };\n}\n\nexport default BusinessAccountAddress;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressLabel {\n id: string;\n text: string;\n}\n\n/**\n * Address label.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressLabelFunctionComponent: React.FC = (props: IAdressLabel) => {\n const { id: itemId, text } = props;\n\n return (\n \n );\n};\n\nexport default AddressLabelFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { AddressItemType, IAddressItem } from '../address-format.data';\nimport AddressDetailItemComponent from './address-detail-item';\n\nexport interface IAddressShowItem {\n key: string;\n description: React.ReactNode;\n}\n\nexport interface IAddressShowProps {\n AddressDetail: INodeProps;\n items: IAddressShowItem[];\n}\n\nexport interface IAddressShowInputProps {\n addressFormat: IAddressItem[];\n address: Address;\n addressPurposes: AddressPurpose[];\n}\n\nexport const AddressShow = (props: IAddressShowInputProps): IAddressShowProps => {\n const { addressFormat, addressPurposes, address } = props;\n\n return {\n AddressDetail: { className: 'msc-address-detail' },\n items: addressFormat.map(item => {\n if (item.name === AddressItemType[AddressItemType.AddressTypeValue]) {\n const addressType = addressPurposes.find(\n addressTypeValue => addressTypeValue.AddressType.toString() === (address[item.name] || '').toString()\n );\n if (addressType) {\n const addressTypeDescription = addressType.Description || '';\n return {\n key: item.name,\n description: (\n \n )\n };\n }\n }\n return {\n key: item.name,\n description: (\n \n )\n };\n })\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { PhoneRegex } from '@msdyn365-commerce-modules/retail-actions';\n\nimport {\n AddressItemDisplayType,\n AddressItemType,\n AddressValidationRuleType,\n IAddressItem,\n IAddressValidationRule\n} from './address-format.data';\nimport { IAddressResource } from './address-module.data';\n\n/**\n * Address meta data.\n */\nexport class AddressMetaData {\n private readonly metaData: IAddressItem[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly requiredFieldRegEx: string = '\\\\S';\n\n private readonly resourcesPrefix: string = 'address';\n\n private readonly maxLength: number = 64;\n\n private readonly requiredFields: AddressItemType[];\n\n private readonly excludedTypes: AddressItemType[];\n\n constructor(resources: IAddressResource, excluded?: AddressItemType[], required?: AddressItemType[]) {\n this.resources = resources || {};\n this.excludedTypes = excluded || [];\n this.requiredFields =\n required !== undefined\n ? required\n : [\n AddressItemType.AddressTypeValue,\n AddressItemType.Name,\n AddressItemType.ZipCode,\n AddressItemType.City,\n AddressItemType.State,\n AddressItemType.ThreeLetterISORegionName,\n AddressItemType.Street\n ];\n this._init();\n }\n\n public getItemFormat(id: number): IAddressItem | undefined {\n return this.metaData.find(item => {\n return item.type === id;\n });\n }\n\n private _init(): void {\n this._addItem(AddressItemType.Name, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Phone, AddressItemDisplayType.Input, PhoneRegex.defaultRegex);\n this._addItem(AddressItemType.ZipCode, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.City, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.County, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.State, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.ThreeLetterISORegionName, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.Street, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.DistrictName, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.StreetNumber, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.BuildingCompliment, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Postbox, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.House_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.Flat_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.CountryOKSMCode_RU, AddressItemDisplayType.Input);\n this._addItem(AddressItemType.AddressTypeValue, AddressItemDisplayType.Dropdown);\n this._addItem(AddressItemType.IsPrimary, AddressItemDisplayType.Checkbox);\n }\n\n private _addItem(type: AddressItemType, displayType: AddressItemDisplayType, format?: string): void {\n if (this.excludedTypes.includes(type)) {\n return;\n }\n\n const nameKey = AddressItemType[type].replace('_', '');\n\n // Find out if currentItem is required field\n const validationRules = this._validationRules(type, nameKey, format);\n const isRequired = validationRules.some(rule => rule.type === AddressValidationRuleType.Required);\n\n // If no optional string is provided in resource file, use the original label text\n const optionalString =\n this.resources[`${this.resourcesPrefix}${nameKey}LabelOptional`] || this.resources[`${this.resourcesPrefix}${nameKey}Label`];\n const item: IAddressItem = {\n type,\n displayType,\n name: AddressItemType[type],\n label: isRequired ? this.resources[`${this.resourcesPrefix}${nameKey}Label`] : optionalString,\n maxLength: this.maxLength,\n validationRules,\n isNewLine: true\n };\n\n this.metaData.push(item);\n }\n\n private _validationRules(type: AddressItemType, name: string, format?: string): IAddressValidationRule[] {\n const validationRules: IAddressValidationRule[] = [];\n\n for (const ruleType of Object.keys(AddressValidationRuleType)) {\n const key = `${this.resourcesPrefix}${name}${ruleType}`;\n const message: string = this.resources[`${key}ErrorMessage`];\n switch (ruleType) {\n case AddressValidationRuleType.Required: {\n if (this.requiredFields.find((itemType: AddressItemType) => itemType === type)) {\n validationRules.push(this._validationRule(ruleType, this.requiredFieldRegEx, message));\n }\n break;\n }\n case AddressValidationRuleType.Format: {\n validationRules.push(this._validationRule(ruleType, format!, message));\n break;\n }\n default:\n }\n }\n return validationRules;\n }\n\n private _validationRule(type: AddressValidationRuleType, regEx: string, message: string): IAddressValidationRule {\n return {\n type,\n regEx,\n message\n };\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport checkoutStateDataAction from './checkout-state-data-action';\n\nexport * from './checkout-state';\nexport * from './checkout-state-data-action';\nexport * from './module-state-manager';\nexport * from './checkout-utilities.data';\n\nexport { checkoutStateDataAction };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IAddressList, IAddressListItem, IAddressListProps } from '../../common/components/address-list';\nimport { IAddressShowItem, IAddressShowProps } from '../../common/components/address-show';\nimport { IAccountManagementAddressViewProps } from './account-management-address';\n\n/**\n * Address show component.\n * @param param0 - Root param.\n * @param param0.AddressDetail - Address detail.\n * @param param0.items - IAddressShowItem[].\n * @returns - Address Node.\n */\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\n return (\n \n {items.map((item: IAddressShowItem) => {\n return <>{item.description};\n })}\n \n );\n};\n\n/**\n * Address List Component.\n * @param param0 - Root param.\n * @param param0.List - Address list.\n * @param param0.isShowList - Boolean.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressListItem[].\n * @returns - AddressListComponent Node.\n */\nconst AddressList: React.FC = ({ List, isShowList, heading, items }) => {\n if (!isShowList) {\n return null;\n }\n\n return (\n \n {heading}\n {items.map((item: IAddressListItem) => {\n const { Item, key, error, showItems, isShowPrimaryButton, primaryButton, editButton, removeButton } = item;\n const { Error, isShowError, title, message } = error;\n return (\n \n \n {isShowError && (\n \n {title}\n {message}\n \n )}\n {isShowPrimaryButton && primaryButton}\n {editButton}\n {removeButton}\n \n );\n })}\n \n );\n};\n\n/**\n * Address Lists Component.\n * @param param0 - Root param.\n * @param param0.ListAddress - List address.\n * @param param0.heading - List heading.\n * @param param0.isShowEmptyListMessage - Boolean.\n * @param param0.emptyListMessage - Empty list message.\n * @param param0.addButton - Add button.\n * @param param0.primaryAddressList - Primary address.\n * @param param0.otherAddressList - Other address.\n * @returns Address Lists Component Node.\n */\nconst AddressLists: React.FC = ({\n ListAddress,\n heading,\n isShowEmptyListMessage,\n emptyListMessage,\n addButton,\n primaryAddressList,\n otherAddressList\n}) => {\n return (\n \n {heading}\n {isShowEmptyListMessage && emptyListMessage}\n {addButton}\n \n \n \n );\n};\n\n/**\n * AddressAddUpdateComponent.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - Error message.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns Address add update component node.\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 return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Account Management Address View Component.\n * @param props - Props.\n * @returns - AccountAddressManagement Module.\n */\nconst AccountManagementAddressView: React.FC = props => {\n const {\n AccountAddressManagement,\n infoMessageBar,\n viewState,\n showAddressList,\n showAddOrUpdateAddress,\n screenReaderNotification\n } = props;\n\n return (\n \n {infoMessageBar}\n {viewState.isShowAddresList && }\n {viewState.isShowAddOrUpdateAddress && }\n {screenReaderNotification}\n \n );\n};\n\nexport default AccountManagementAddressView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nexport enum AddressItemDisplayType {\n Input = 'Input',\n Dropdown = 'Dropdown',\n Checkbox = 'Checkbox'\n}\n\nexport enum AddressValidationRuleType {\n Required = 'Required',\n Format = 'Format'\n}\n\nexport enum AddressItemType {\n Name = 1001,\n Phone = 1002,\n IsPrimary = 1003,\n AddressTypeValue = 1004,\n ZipCode = 1,\n City = 2,\n County = 3,\n State = 4,\n ThreeLetterISORegionName = 5,\n Street = 6,\n DistrictName = 7,\n StreetNumber = 8,\n BuildingCompliment = 9,\n Postbox = 10,\n House_RU = 21,\n Flat_RU = 22,\n CountryOKSMCode_RU = 23\n}\n\nexport interface IAddressItem {\n name: string;\n type: AddressItemType;\n label: string;\n maxLength: number;\n displayType: AddressItemDisplayType;\n validationRules?: IAddressValidationRule[];\n isNewLine: boolean;\n}\n\nexport interface IAddressValidationRule {\n type: AddressValidationRuleType;\n regEx: string;\n message: string;\n}\n\nexport interface IAddressDropdownsData {\n [index: string]: { key?: string | number; value?: string }[];\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport CheckoutBillingAddress from './checkout-billing-address';\nimport CheckoutBillingAddressView from './checkout-billing-address.view';\n\nexport * from './checkout-billing-address';\nexport * from './checkout-billing-address.data';\nexport {\n ICheckoutBillingAddressConfig,\n ICheckoutBillingAddressProps,\n ICheckoutBillingAddressResources\n} from './checkout-billing-address.props.autogenerated';\nexport * from './checkout-billing-address.view';\n\nexport { CheckoutBillingAddress, CheckoutBillingAddressView };\n","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { IAddressAddItem, IAddressAddUpdateProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressSelectItem, IAddressSelectProps } from '@msdyn365-commerce-modules/address';\r\nimport { IAddressShowItem, IAddressShowProps } from '@msdyn365-commerce-modules/address';\r\nimport { ICheckoutShippingAddressViewProps } from './eve-checkout-shipping-address';\r\n\r\n/**\r\n * Address show component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressDetail - Address detail.\r\n * @param param0.items - IAddressShowItem[].\r\n * @returns - Address Node.\r\n */\r\nconst AddressShow: React.FC = ({ AddressDetail, items }) => {\r\n return (\r\n \r\n {items.map((item: IAddressShowItem) => {\r\n return <>{item.description};\r\n })}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Select Component.\r\n * @param param0 - Root param.\r\n * @param param0.SelectAddress - Select address.\r\n * @param param0.addButton - Add button.\r\n * @param param0.items - IAddressSelectItem[].\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns - SelectAddress Node.\r\n */\r\nconst AddressSelect: React.FC = ({\r\n SelectAddress,\r\n addButton,\r\n items,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n return (\r\n \r\n {addButton}\r\n {items.map((item: IAddressSelectItem) => {\r\n const SelectItem = item.SelectItem;\r\n return (\r\n \r\n {item.input}\r\n \r\n \r\n );\r\n })}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Address Add Update Component.\r\n * @param param0 - Root param.\r\n * @param param0.AddressForm - Address form.\r\n * @param param0.heading - Address heading.\r\n * @param param0.items - IAddressAddItem[].\r\n * @param param0.hasError - Boolean.\r\n * @param param0.error - Error message.\r\n * @param param0.isShowSaveButton - Boolean.\r\n * @param param0.saveButton - Save button.\r\n * @param param0.isShowCancelButton - Boolean.\r\n * @param param0.cancelButton - Cancel button.\r\n * @returns Address add update component node.\r\n */\r\nconst AddressAddUpdate: React.FC = ({\r\n AddressForm,\r\n heading,\r\n items,\r\n hasError,\r\n error,\r\n isShowSaveButton,\r\n saveButton,\r\n isShowCancelButton,\r\n cancelButton\r\n}) => {\r\n return (\r\n \r\n {heading}\r\n {items.map((item: IAddressAddItem) => {\r\n const { AddressItem, key, label, alert, input } = item;\r\n return (\r\n \r\n {label}\r\n {alert}\r\n {input}\r\n \r\n );\r\n })}\r\n {hasError && (\r\n \r\n {error.title}\r\n {error.message}\r\n \r\n )}\r\n {isShowSaveButton && saveButton}\r\n {isShowCancelButton && cancelButton}\r\n \r\n );\r\n};\r\n\r\n/**\r\n * Checkout Shipping Address View Component.\r\n * @param props - Props.\r\n * @returns - CheckoutShippingAddress Module.\r\n */\r\nconst CheckoutShippingAddressView: React.FC = props => {\r\n const { CheckoutShippingAddress, viewState, showAddress, showAddressSelect, showAddOrUpdateAddress, cartLineImages } = props;\r\n\r\n return (\r\n \r\n {cartLineImages}\r\n {viewState.isShowAddress && }\r\n {viewState.isShowAddresList && }\r\n {viewState.isShowAddOrUpdateAddress && }\r\n \r\n );\r\n};\r\n\r\nexport default CheckoutShippingAddressView;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountGenericTileConfig, IAccountGenericTileProps } from './account-generic-tile.props.autogenerated';\nimport LinksComponent from './components/account-generic-tile-links';\n\nexport interface IAccountGenericTileViewProps extends IAccountGenericTileProps {\n AccountGenericTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n}\n\n/**\n *\n * AccountGeneric component.\n * @extends {React.PureComponent>}\n */\nclass AccountGenericTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountGenericTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { config } = this.props;\n const { className, heading, links } = config;\n\n const viewProps = {\n ...this.props,\n className,\n AccountGenericTile: {\n moduleProps: this.props,\n className: classnames('ms-account-generic-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountGenericTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IModule } from '@msdyn365-commerce/core';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport isMatch from 'lodash/isMatch';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { getModuleStates, updateModuleStates } from './module-state';\nimport { IModuleState, IModuleStateManager, IModuleStateProps, IModuleStates } from './module-state.data';\n\nexport interface IProps extends IModule, IModuleStateProps {\n enableControl?: boolean;\n}\n\nconst sectionContainerModuleId = 'section-container';\nconst paymentInstrumentModuleId = 'payment-instrument';\n\nconst withModuleState =

(WrappedComponent: React.ComponentType

): React.ComponentType

=> {\n /**\n *\n * ModuleState component.\n * @extends {React.Component

}\n */\n @observer\n class ModuleState extends React.Component

{\n constructor(props: P) {\n super(props);\n this.initializeState();\n }\n\n public shouldComponentUpdate(nextProps: IModuleStateProps): boolean {\n if (this.props === nextProps) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n const { id } = this.props;\n return ;\n }\n\n private readonly initializeState = (): void => {\n const { id, typeName, context } = this.props;\n const states = getModuleStates(context.actionContext);\n if (!states) {\n this.props.telemetry.error('withModuleState initializeState() - states not found');\n return;\n }\n\n if (states[id]) {\n // State has been initialized\n return;\n }\n\n updateModuleStates(\n {\n ...states,\n [id]: {\n id,\n typeName,\n hasInitialized: false,\n hasError: false,\n isRequired: true,\n isCancellable: true,\n isSubmitContainer: false,\n status: undefined,\n childIds: []\n }\n },\n context.actionContext\n );\n };\n\n /**\n * GetModuleStateManager\n * Get module state manager by id.\n * @param id\n */\n private readonly getModuleStateManager = (id: string): IModuleStateManager => {\n const moduleState = this.get()[id];\n return {\n ...moduleState!,\n hasInitialized: this.validate(id, { hasInitialized: true }, true), // All has initialized is initialized\n hasError: this.validate(id, { hasError: true }), // Partial has error is error\n isReady: this.validate(id, { status: 'ready' }, true, true), // All ready is ready (exclued disabled and skipped)\n isUpdating: this.validate(id, { status: 'updating' }), // Partial updating is updating\n isPending: this.validate(id, { status: 'pending' }), // Partial pending is pending\n isSkipped: this.validate(id, { status: 'skipped' }, true, true), // All skipped is skipped (exclued disabled)\n isDisabled: this.validate(id, { status: 'disabled' }, true), // All disabled is disabled\n isCancelAllowed: this.validate(id, { isCancellable: true }, true, true), // Partial not allowed is not allowed\n shouldSubmitContainer: this.validate(id, { isSubmitContainer: true }), // Partial submit is submit.\n hasExternalSubmitGroup: this.hasExternalSubmitGroup(),\n hasModuleState: this.hasModuleState(id),\n setIsRequired: (value: boolean): void => {\n this.update(id, { isRequired: value });\n },\n setIsCancellable: (value: boolean): void => {\n this.update(id, { isCancellable: value });\n },\n setIsSubmitContainer: (value: boolean): void => {\n this.update(id, { isSubmitContainer: value });\n },\n setHasError: (value: boolean): void => {\n this.update(id, { hasError: value });\n },\n onReady: (): void => {\n this.update(id, { status: 'ready' });\n },\n onUpdating: (): void => {\n this.update(id, { status: 'updating' });\n },\n onPending: (): void => {\n this.update(id, { status: 'pending' });\n },\n onSkip: (): void => {\n this.update(id, { status: 'skipped' });\n },\n onDisable: (): void => {\n this.update(id, { status: 'disabled' });\n },\n getModule: (moduleId: string): IModuleStateManager => this.getModuleStateManager(moduleId),\n getModuleByTypeName: (typeName: string): IModuleStateManager => this.getModuleStateManagerByTypeName(typeName),\n init: (options?: Partial): void => {\n if (moduleState?.hasInitialized) {\n // State has been initialized\n return;\n }\n this.update(id, {\n hasInitialized: true,\n ...options\n });\n }\n };\n };\n\n /**\n * GetModuleStateManagerByTypeName\n * Get module state manager by type name.\n * @param typeName\n */\n private readonly getModuleStateManagerByTypeName = (typeName: string): IModuleStateManager => {\n const moduleStates = getModuleStates(this.props.context.actionContext);\n const moduleState = Object.values(moduleStates).find(_moduleState => _moduleState?.typeName === typeName);\n return this.getModuleStateManager((moduleState && moduleState.id) || '');\n };\n\n /**\n * Get\n * Get all module states.\n */\n private readonly get = (): IModuleStates => {\n return getModuleStates(this.props.context.actionContext);\n };\n\n /**\n * Update\n * Update module state.\n * @param id\n * @param value\n */\n private readonly update = (id: string, value: Partial): void => {\n // Console.log('withModuleState - update', id, value);\n const modules = this.get();\n if (!modules[id]) {\n this.props.telemetry.error(`withModuleState update() - Module state with id ${id} is not found.`);\n return;\n }\n modules[id] = {\n ...modules[id]!,\n ...value\n };\n };\n\n private readonly _validateLeaf = (id: string, source: Partial): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n return isMatch(module, source);\n };\n\n private readonly _validateContainer = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n // Module doesn't has module state\n return !!allMatched;\n }\n\n if (skipSkippableItem && (module.status === 'disabled' || module.status === 'skipped')) {\n // Skip disabled or skipped modules\n return !!allMatched;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n let childIds = module.childIds;\n\n if (this.props.context.app.config.shouldEnableSinglePaymentAuthorizationCheckout) {\n // For new checkout flow, we bypass the isReady check for payment section container to enable the place order button.\n childIds = childIds.filter(childId => !this._isPaymentSectionContainer(childId));\n }\n\n // It is container module\n const method = allMatched ? 'every' : 'some';\n return childIds[method](childId => this._validateContainer(childId, source, allMatched, skipSkippableItem));\n };\n\n /**\n * Check if it is a section container with payment module.\n * @param moduleId -- The id of the module.\n * @returns If it is a section container with payment module.\n */\n private readonly _isPaymentSectionContainer = (moduleId: string): boolean => {\n if (!moduleId.includes(sectionContainerModuleId)) {\n return false;\n }\n\n const modules = this.get();\n const module = modules[moduleId];\n\n if (module && ArrayExtensions.hasElements(module.childIds.filter(childId => childId.includes(paymentInstrumentModuleId)))) {\n return true;\n }\n\n return false;\n };\n\n /**\n * Validate\n * Validate current module and all its child module match the provided condition.\n * @param id\n * @param source\n * @param allMatched\n * @param skipSkippableItem\n */\n private readonly validate = (\n id: string,\n source: Partial,\n allMatched?: boolean,\n skipSkippableItem?: boolean\n ): boolean => {\n const modules = this.get();\n const module = modules[id];\n if (!module) {\n return false;\n }\n\n // It is leaf module\n if (!module.childIds || module.childIds.length === 0) {\n return this._validateLeaf(id, source);\n }\n\n // It is container module\n return this._validateContainer(id, source, allMatched, skipSkippableItem);\n };\n\n /**\n * HasExternalSubmitGroup\n * Module will use external submit group.\n */\n private readonly hasExternalSubmitGroup = (): boolean => {\n return !!this.props.enableControl;\n };\n\n /**\n * HasModuleState\n * Module is using module state manager.\n * @param id\n */\n private readonly hasModuleState = (id: string): boolean => {\n const modules = this.get();\n const module = modules[id];\n return !!module;\n };\n }\n\n return ModuleState;\n};\n\nexport default withModuleState;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport AddressInputComponent from './address-input';\n\nexport interface IAddressBillingCheckbox {\n isChecked: boolean;\n value: string;\n ariaLabel: string;\n text: string;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\nexport const AddressBillingCheckbox: React.FC = ({\n isChecked,\n value,\n ariaLabel,\n text,\n telemetryContent,\n onChange\n}) => {\n const additionalAttributes = {\n checked: isChecked,\n 'aria-checked': isChecked\n };\n\n return (\n \n );\n};\nexport default AddressBillingCheckbox;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressAlert {\n message?: string;\n}\n\n/**\n * Address alert.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressAlertFunctionComponent: React.FC = (props: IAdressAlert) => {\n const message = props.message;\n return (\n \n {message && <>{message}}\n \n );\n};\n\nexport default AddressAlertFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IImageProps, IImageSettings, Image, IRequestContext } from '@msdyn365-commerce/core';\nimport { CartLine, SimpleProduct } from '@msdyn365-commerce/retail-proxy';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { format, isMobile, VariantType } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { ICheckoutShippingAddressResources } from '../checkout-shipping-address.props.autogenerated';\n\n/**\n * The cartline product interface.\n */\nexport interface ICartLineWithProduct {\n cartLine: CartLine;\n product?: SimpleProduct;\n}\n\n/**\n * The checkout shipping cartline interface.\n */\nexport interface ICheckoutShippingCartLineInfo {\n lineId: string;\n imageProps: IImageProps;\n quantity: number;\n}\n\n/**\n * The checkout shipping cartline props.\n */\nexport interface ICheckoutShippingCartLinesProps {\n moduleClassName: string;\n cartLines: ICheckoutShippingCartLineInfo[];\n title: string;\n itemTitle: string;\n resources: ICheckoutShippingAddressResources;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Following as per module\nexport const CheckoutPickupCartLines: React.FC = ({\n moduleClassName,\n cartLines,\n title,\n itemTitle,\n resources\n}) => {\n const context = ({\n gridSettings: {\n xs: { w: 767 },\n sm: { w: 991 },\n md: { w: 1199 },\n lg: { w: 1599 },\n xl: { w: 1600 }\n }\n } as unknown) as IRequestContext;\n const isMobileCheck = isMobile({ variant: VariantType.Browser, context });\n const isMobileView = isMobileCheck === 'xs' || isMobileCheck === 'sm';\n\n if (!ArrayExtensions.hasElements(cartLines)) {\n return null;\n }\n const quantity = 1;\n return (\n

\n
\n
{title}
\n
{itemTitle}
\n
\n
\n {cartLines.map((cartLine: ICheckoutShippingCartLineInfo) => {\n const isShowQty = cartLine.quantity > quantity;\n let className = `${moduleClassName}__group-images-lines-product`;\n const role = 'text';\n if (isShowQty) {\n className = classnames(className, ' product-image-wide');\n }\n return (\n
\n \n {isMobileView\n ? isShowQty && (\n \n {cartLine.quantity}\n
\n )\n : isShowQty && (\n
\n )}\n {!isMobileView && isShowQty && (\n \n {format(resources.productQuantityInfo, cartLine.quantity, cartLine.imageProps.altText)}\n \n )}\n
\n );\n })}\n \n \n );\n};\n\n/**\n * The checkout shipping cartline image settings.\n */\nexport const defaultImageSettings: IImageSettings = {\n viewports: {\n xs: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n lg: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 },\n xl: { q: 'w=108&h=108&q=80&m=6&f=jpg', w: 108, h: 108 }\n },\n lazyload: true,\n quality: 80\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Address,\n AddressPurpose,\n CartLine,\n CountryRegionInfo,\n SimpleProduct,\n StateProvinceInfo,\n TenderLine,\n TokenizedPaymentCard\n} from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\nimport {\n ArrayExtensions,\n getFallbackImageUrl,\n getSimpleProducts,\n ObjectExtensions,\n ProductInput\n} from '@msdyn365-commerce-modules/retail-actions';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressSelect, IAddressSelectProps } from '../../common/components/address-select';\nimport { AddressShow, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutShippingAddressData } from './checkout-shipping-address.data';\nimport { ICheckoutShippingAddressProps } from './checkout-shipping-address.props.autogenerated';\nimport {\n CheckoutPickupCartLines,\n defaultImageSettings,\n ICartLineWithProduct,\n ICheckoutShippingCartLineInfo,\n ICheckoutShippingCartLinesProps\n} from './components/checkout-shipping-cartlines-images';\nimport { CheckoutModule, ErrorLocation } from '@msdyn365-commerce/global-state';\nimport { ErrorComponent } from '../../common/components/address-error-alert';\nimport { focusOnCheckoutError } from '../../checkout-errors/checkout-errors';\n\n/**\n * The checkout address props interface.\n */\nexport interface ICheckoutAddressProps extends ICheckoutShippingAddressProps, IModuleStateProps {}\n\n/**\n * The checkout shipping address view state.\n */\nexport interface ICheckoutShippingAddressViewState {\n isShowAddress: boolean;\n isShowAddresList: boolean;\n isShowAddOrUpdateAddress: boolean;\n}\n\n/**\n * The checkout shipping address state.\n */\nexport interface ICheckoutAddresState {\n shippingGroups: ICartLineWithProduct[];\n errorMessage?: string;\n}\n\n/**\n * The checkout shipping address view props.\n */\nexport interface ICheckoutShippingAddressViewProps extends ICheckoutAddressProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n addressListSelectedAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n customerAddresses: Address[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: ICheckoutShippingAddressViewState;\n CheckoutShippingAddress: IModuleProps;\n isUpdating: boolean;\n hasError: boolean;\n showAddress: IAddressShowProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n cartLineImages?: React.ReactNode;\n showAddressSelect: IAddressSelectProps;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n showAddOrUpdateAddressHandler?(onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps;\n showAddressSelectHandler?(\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps;\n}\n\n/**\n * IExpressPaymentDetail interface.\n */\ninterface IExpressPaymentDetails {\n email?: string;\n tenderLine?: TenderLine;\n tokenizedPaymentCard?: TokenizedPaymentCard;\n paymentTenderType?: string;\n address?: Address;\n isExpressCheckoutAppliedInCartPage: boolean;\n isExpressAddressAppliedInCartPage?: boolean;\n}\n\n/**\n *\n * Address component.\n * @extends {React.Component>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutShippingAddress extends React.Component {\n @observable private currentOperation: AddressOperation;\n\n @observable private selectedAddress?: Address;\n\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private customerAddresses: Address[] = [];\n\n @observable private validationError: object;\n\n @observable private addressActionResponse?: IAddressResponse;\n\n @observable private isUpdating?: boolean;\n\n @observable private hasError?: boolean;\n\n @observable private addressListSelectedAddress: Address = {};\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat!: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 6; // Default to Home\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private autoSuggest?: AutoSuggest;\n\n private readonly multiplePickupStoreSwitchName: string = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n\n private retailMultiplePickUpOptionEnabled?: boolean = false;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: ICheckoutAddressProps) {\n super(props);\n this.state = { shippingGroups: [] };\n const { context, data, resources, telemetry } = this.props;\n\n this.addUpdateAddress = {};\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.countryRegions = data.countryRegions.result || [];\n this.addressPurposes = data.addressPurposes.result || [];\n this.customerAddresses = data.address.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.validationError = {};\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions },\n resources\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n\n this.props.data.checkout.then(() => {\n this._setDefaultCountryRegionId();\n this._initModuleState();\n });\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.shippingAddressFromExpressCheckout,\n () => {\n if (!this.expressPaymentDetailsFromCartPage && this._canShip()) {\n let address = this.props.data.checkout.result?.shippingAddressFromExpressCheckout;\n\n if (address?.TwoLetterISORegionName) {\n const threeLetterIsoRegionName = this.getThreeLetterIsoRegionName(address.TwoLetterISORegionName);\n\n address = { ...address, ThreeLetterISORegionName: threeLetterIsoRegionName };\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n }\n\n this._updateCurrentOperation(AddressOperation.Add, address);\n this._onAddressAddUpdateSubmit();\n }\n }\n );\n\n if (autoSuggestionEnabled) {\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 const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n // Customer doesn't have any address. Then add view will be loaded directly. Code for the same to handle that\n if (\n this.props.data.storeSelectorStateManager.result &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n await this.autoSuggest._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n async () => {\n await this._attachMapAutoSuggest();\n }\n );\n }\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutShippingAddress &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutShippingAddress) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n\n await this._initPickupGroup();\n }\n\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n public shouldComponentUpdate(nextProps: ICheckoutAddressProps, nextState: ICheckoutAddresState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this._canShip()) {\n return null;\n }\n\n const {\n config,\n context,\n renderView,\n resources,\n moduleState: { hasError }\n } = this.props;\n const { headingImages, itemsText, singleItemText, errorMessageTitle } = resources;\n const { imageSettings } = config;\n\n // Line images\n const cartlines: ICheckoutShippingCartLineInfo[] = this.state.shippingGroups\n .filter(x => !ObjectExtensions.isNullOrUndefined(x.product))\n .map(line => ({\n lineId: line.cartLine.LineId ?? '',\n imageProps: {\n requestContext: context.actionContext.requestContext,\n className: 'ms-checkout-shipping-address__group-images-lines-line-image',\n altText: line.product?.Name,\n src: line.product?.PrimaryImageUrl ?? '',\n fallBackSrc: getFallbackImageUrl(\n line.product?.ItemId,\n context.actionContext.requestContext.apiSettings,\n context.request.app?.config?.OmniChannelMedia\n ),\n gridSettings: context.request.gridSettings!,\n imageSettings: imageSettings ?? defaultImageSettings,\n loadFailureBehavior: 'empty'\n },\n quantity: line.cartLine.Quantity ?? 0\n }));\n\n const numberOfCartLines = this._countItems(cartlines);\n const itemText = numberOfCartLines > 1 ? itemsText : singleItemText;\n const itemTitle = `(${format(itemText, numberOfCartLines)})`;\n\n const lineImageProps: ICheckoutShippingCartLinesProps = {\n moduleClassName: 'ms-checkout-shipping-address',\n cartLines: cartlines.filter(x => !ObjectExtensions.isNullOrUndefined(x)),\n itemTitle: itemTitle,\n title: headingImages,\n resources: this.props.resources\n };\n\n const cartLineImages: React.ReactNode = ;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { featureState } = this.props.data;\n const isRetailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const errorMessage = this.state.errorMessage;\n\n const viewProps = {\n ...this.props,\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n addressListSelectedAddress: this.addressListSelectedAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n customerAddresses: this.customerAddresses,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n isUpdating: this.isUpdating,\n hasError: this.hasError,\n className: config.className,\n viewState: {\n isShowAddress: this.currentOperation === AddressOperation.Show && this.selectedAddress,\n isShowAddresList: this.currentOperation === AddressOperation.List && this.customerAddresses.length > 0,\n isShowAddOrUpdateAddress:\n this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update\n },\n CheckoutShippingAddress: {\n moduleProps: this.props,\n className: classnames('ms-checkout-shipping-address', config.className)\n },\n showAddress: this._renderShowAddress(),\n alert: hasError && errorMessage && ,\n checkoutErrorRef: this.checkoutErrorRef,\n\n /**\n * Show address select.\n * @param onAddAddressHandler - On add address click function.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddressSelectHandler: (onAddAddressHandler?: () => void, onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderSelectAddress(onAddAddressHandler, onSaveHandler, onCancelHandler),\n\n /**\n * Show add/update address.\n * @param onSaveHandler - On save click function.\n * @param onCancelHandler - On cancel click function.\n * @returns - Renders select address.\n */\n showAddOrUpdateAddressHandler: (onSaveHandler?: () => void, onCancelHandler?: () => void) =>\n this._renderAddOrUpdateAddress(onSaveHandler, onCancelHandler),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress(),\n cartLineImages: isRetailMultiplePickUpOptionEnabled ? cartLineImages : undefined,\n showAddressSelect: this._renderSelectAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * Initialize pickup group.\n */\n @action\n private readonly _initPickupGroup = async (): Promise => {\n const pickupCartLines: CartLine[] = this._getCartLinesforDelivery();\n const cartLines: ICartLineWithProduct[] = [];\n\n try {\n const products = await this._getProductsByCartLines(\n this.props.data.checkout.result?.checkoutCart.cart.ChannelId || 0,\n pickupCartLines\n );\n for (const line of pickupCartLines) {\n const product: SimpleProduct | undefined = products.find(x => x.RecordId === line.ProductId);\n cartLines.push({ cartLine: line, product });\n }\n this.setState({ shippingGroups: cartLines });\n } catch (error) {\n this.props.telemetry.error(error);\n this.setState({ shippingGroups: [] });\n }\n };\n\n /**\n * On suggestion selected.\n * @param result - Suggestion result interface.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n const timeout = 0;\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, timeout);\n };\n\n /**\n * Method to clear address fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n for (const formatAddress of addressFormatItem) {\n if (\n this.addUpdateAddress[formatAddress.name] !== undefined &&\n !this.autoSuggest?.excludedAddressFields.includes(formatAddress.name)\n ) {\n this.addressFormat[formatAddress.name] = '';\n }\n }\n this._clearValidation();\n };\n\n /**\n * Method to clear validation.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n public get expressPaymentDetailsFromCartPage(): IExpressPaymentDetails | null {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Explicitly check for null/undefined.\n const properties =\n this.props.data.cart?.result?.cart?.ExtensionProperties?.find(property => property.Key === 'expressPaymentDetails')?.Value\n ?.StringValue ?? '';\n\n return properties ? (JSON.parse(properties) as IExpressPaymentDetails) : null;\n }\n\n /**\n * Method data initialization.\n * @param props -The checkout address properties.\n */\n private readonly _dataInitialize = (props: ICheckoutAddressProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.address.result,\n () => {\n this.customerAddresses = data.address.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n\n reaction(\n () => data.featureState.result,\n () => {\n this.retailMultiplePickUpOptionEnabled = data.featureState.result?.find(\n feature => feature.Name === this.multiplePickupStoreSwitchName\n )?.IsEnabled;\n }\n );\n };\n\n /**\n * Method to get cart lines for delivery.\n * @returns The cart line collection.\n */\n private readonly _getCartLinesforDelivery = (): CartLine[] => {\n return this.props.data.checkout.result?.checkoutCart.cart.CartLines?.filter(line => this._isDelivery(line)) ?? [];\n };\n\n /**\n * Method to check cart line for delivery.\n * @param line -The cart line.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isDelivery = (line: CartLine): boolean => {\n return this._isNotPickupMode(line.DeliveryMode) && (line.FulfillmentStoreId === undefined || line.FulfillmentStoreId === '');\n };\n\n /**\n * Method to check cart line for delivery.\n * @param deliveryMode -The delivery mode.\n * @returns True/false as per cart line delivery mode.\n */\n private readonly _isNotPickupMode = (deliveryMode: string | undefined): boolean => {\n const pickupDeliveryModeCode = this.props.context.request.channel?.PickupDeliveryModeCode;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props.data;\n const retailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n if (retailMultiplePickUpOptionEnabled && deliveryMode !== undefined) {\n const pickupDeliveryMode = channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.some(\n pickupMode => pickupMode !== deliveryMode\n );\n return pickupDeliveryMode !== undefined ? pickupDeliveryMode : false;\n }\n return deliveryMode !== undefined && pickupDeliveryModeCode !== undefined && deliveryMode !== pickupDeliveryModeCode;\n };\n\n /**\n * Method to check cart line for delivery.\n * @param channelId - The channelId.\n * @param cartLines - Cart line collections.\n * @returns Collection of SimpleProduct.\n */\n private readonly _getProductsByCartLines = async (channelId: number, cartLines: CartLine[]): Promise => {\n const actionContext = this.props.context.actionContext;\n const productInputs = cartLines\n .filter(line => !ObjectExtensions.isNullOrUndefined(line.ProductId))\n .map(\n line =>\n new ProductInput(\n line.ProductId || 0,\n actionContext.requestContext.apiSettings,\n channelId,\n undefined,\n actionContext.requestContext,\n line.CatalogId || 0\n )\n );\n return getSimpleProducts(productInputs, actionContext);\n };\n\n /**\n * Method to render add/update address.\n * @param onSaveHandler -- Handles onsave functionality.\n * @param onCancelHandler -- Handles oncancel functionality.\n * @returns Address app/update props.\n */\n private readonly _renderAddOrUpdateAddress = (onSaveHandler?: () => void, onCancelHandler?: () => void): IAddressAddUpdateProps => {\n const addressFormat =\n this.currentOperation === AddressOperation.Add && this.addressCommon.isAuthenticatedFlow()\n ? this.addressFormat\n : this.addressFormat;\n\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressAddUpdate({\n isUpdating: this.isUpdating,\n resources: this.resources,\n addressType: AddressType.Shipping,\n addressFormat: addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n hasError: this.hasError,\n addressActionResponse: this.addressActionResponse,\n telemetryContent: this.telemetryContent,\n dropdownDisplayData: addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this.onSubmit();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress && !this.addressCommon.isAuthenticatedFlow() ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render select address.\n * @param onAddAddressHandler - To handle add address button click.\n * @param onSaveHandler - To handle save button click.\n * @param onCancelHandler - To handle cancel button click.\n * @returns Select address props.\n */\n private readonly _renderSelectAddress = (\n onAddAddressHandler?: () => void,\n onSaveHandler?: () => void,\n onCancelHandler?: () => void\n ): IAddressSelectProps => {\n /**\n * On Cancel Button Function.\n */\n const onCancelButtonHandler = () => {\n this._resetView();\n onCancelHandler?.();\n };\n return AddressSelect({\n addressFormat: this.addressFormat,\n addresses: this.customerAddresses,\n resources: this.resources,\n addressPurposes: this.addressPurposes,\n selectedAddress: this.addressListSelectedAddress,\n onAddressOptionChange: this._onAddressOptionChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n telemetryContent: this.telemetryContent,\n\n /**\n * On Add Address Function.\n */\n onAddAddress: () => {\n this._goToAddAddress();\n onAddAddressHandler?.();\n },\n\n /**\n * On Save Function.\n */\n onSave: () => {\n this._onSelectAddress();\n onSaveHandler?.();\n },\n\n onCancel: !this.selectedAddress ? () => {} : onCancelButtonHandler\n });\n };\n\n /**\n * Method to render show address.\n * @returns Show address props.\n */\n private _renderShowAddress(): IAddressShowProps | null {\n if (this.selectedAddress) {\n return AddressShow({\n address: this.selectedAddress,\n addressFormat: this.addressFormat.getAddressFormat(this.selectedAddress.ThreeLetterISORegionName || ''),\n addressPurposes: this.addressPurposes\n });\n }\n\n return null;\n }\n\n /**\n * Method to render map auto suggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#shipping_addressstreet', '#shipping_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * Method gets called on address option change.\n * @param event - To get current option.\n */\n private readonly _onAddressOptionChange = (event: React.ChangeEvent) => {\n const addressRecordId = event.currentTarget.value;\n const selectedAddress = this.customerAddresses.find(address => (address.RecordId || '').toString() === addressRecordId);\n if (selectedAddress) {\n this.addressListSelectedAddress = selectedAddress;\n }\n };\n\n /**\n * Method to render map auto suggest.\n * @param name - Address name field.\n * @param value - Address name value field.\n */\n private readonly onAddressAddUpdate = (name: string, value: string | boolean) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * Method to get called on address update change.\n * @param event - Input element.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n if (event.target.type === 'checkbox') {\n this.onAddressAddUpdate(event.target.name, event.target.checked);\n } else {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n }\n };\n\n /**\n * Method to get called on address update dropdown change.\n * @param event - Select element.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * Method to get called on address update submit.\n */\n private readonly _onAddressAddUpdateSubmit = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n return;\n }\n\n let response: Promise;\n if (this.addressCommon.isAuthenticatedFlow() && this._isNewAddress(this.addUpdateAddress)) {\n response =\n this.currentOperation === AddressOperation.Update\n ? this.addressCommon.updateCustomerAddress(this.addUpdateAddress)\n : this.addressCommon.addCustomerAddress(this.addUpdateAddress);\n } else {\n response = Promise.resolve({ address: this.addUpdateAddress });\n }\n\n this.isUpdating = true;\n this._updateModuleState();\n\n response.then(\n (result: IAddressResponse) => {\n this.isUpdating = false;\n\n if (result.address) {\n this.hasError = false;\n this._clearError();\n if (result.customerAddresses) {\n this._onAddOrUpdateSuccess({ customerAddresses: result.customerAddresses, address: result.address });\n } else {\n this._onAddOrUpdateSuccess({ address: result.address });\n }\n } else {\n this.hasError = true;\n this.addressActionResponse = result;\n this._updateModuleState();\n }\n },\n () => {\n this.hasError = true;\n this.isUpdating = false;\n this._updateModuleState();\n }\n );\n };\n\n /**\n * Method to get called on country change.\n * @param countryRegionId - Country region id.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterIsoRegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterIsoRegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterIsoRegionName);\n this._clearAddressFields();\n };\n\n /**\n * Method to get all address format exclude list.\n * @returns Collection of address items.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Method to get all state/provinces.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n\n this.stateProvinceInfo = result;\n });\n };\n\n /**\n * Method to set default country region id.\n */\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * Method to get default address region id.\n * @returns - Address object from existing addresses.\n */\n private readonly _getDefaultAddress = (): Address | undefined => {\n if (this.customerAddresses) {\n const primaryAddress = this.customerAddresses.find((address: Address) => address.IsPrimary);\n return primaryAddress || (this.customerAddresses.length > 0 ? this.customerAddresses[0] : undefined);\n }\n return undefined;\n };\n\n /**\n * Method to get address from express payment details from cart page.\n * @returns - Address.\n */\n private readonly _getAddressFromCartExpressPaymentDetails = (): Address | undefined => {\n if (this.expressPaymentDetailsFromCartPage) {\n const { tokenizedPaymentCard, address, isExpressAddressAppliedInCartPage } = this.expressPaymentDetailsFromCartPage;\n\n let addressFromCartExpress: Address | undefined;\n\n if (isExpressAddressAppliedInCartPage) {\n addressFromCartExpress = address ? this.getExpressAddress(address) : undefined;\n } else {\n addressFromCartExpress = tokenizedPaymentCard ? this.getAddressFromTokenizedPaymentCard(tokenizedPaymentCard) : undefined;\n }\n\n return addressFromCartExpress;\n }\n return undefined;\n };\n\n /**\n * Get address from tokenizedPaymentCard.\n * @param tokenizedPaymentCard -- The tokenizedPaymentCard from the payment.\n * @returns The address.\n */\n private readonly getAddressFromTokenizedPaymentCard = (tokenizedPaymentCard: TokenizedPaymentCard): Address => {\n const twoLetterIsoRegionName = tokenizedPaymentCard.Country;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n TwoLetterISORegionName: twoLetterIsoRegionName,\n Name: tokenizedPaymentCard.NameOnCard,\n Street: tokenizedPaymentCard.Address1,\n StreetNumber: tokenizedPaymentCard.Address2,\n City: tokenizedPaymentCard.City,\n State: tokenizedPaymentCard.State,\n ZipCode: tokenizedPaymentCard.Zip,\n Phone: tokenizedPaymentCard.Phone,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get address from expressAddress.\n * @param expressAddress -- The expressAddress.\n * @returns The address.\n */\n private readonly getExpressAddress = (expressAddress: Address): Address => {\n const twoLetterIsoRegionName = expressAddress.TwoLetterISORegionName;\n\n const threeLetterIsoRegionName = twoLetterIsoRegionName ? this.getThreeLetterIsoRegionName(twoLetterIsoRegionName) : undefined;\n\n if (threeLetterIsoRegionName && threeLetterIsoRegionName !== this.countryRegionId) {\n this._onCountryChange(threeLetterIsoRegionName);\n }\n\n const address: Address = {\n ...expressAddress,\n ThreeLetterISORegionName: threeLetterIsoRegionName,\n AddressTypeValue: this.defaultAddressType\n };\n\n return address;\n };\n\n /**\n * Get three letter ISO region name from two letter ISO region name.\n * @param twoLetterIsoRegionName -- The three letter ISO region name.\n * @returns The three letter ISO region name.\n */\n private readonly getThreeLetterIsoRegionName = (twoLetterIsoRegionName: string): string | undefined => {\n const countryRegion = this.countryRegions.find(country => {\n return country.ISOCode?.toLowerCase() === twoLetterIsoRegionName.toLowerCase();\n });\n\n return countryRegion?.CountryRegionId;\n };\n\n /**\n * Method to initialize all module state.\n */\n private readonly _initModuleState = (): void => {\n this.props.moduleState.init({\n status: this._canShip() ? 'updating' : 'disabled',\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit\n });\n\n const checkoutState = this.props.data.checkout.result;\n\n if (this._canShip()) {\n let defaultAddress;\n const shippingCartLines: CartLine[] = this._getCartLinesforDelivery();\n\n if (checkoutState?.checkoutCart.cart.ShippingAddress) {\n defaultAddress = checkoutState.checkoutCart.cart.ShippingAddress;\n } else if (\n ArrayExtensions.hasElements(shippingCartLines) &&\n shippingCartLines[0].ShippingAddress !== undefined &&\n shippingCartLines[0].ShippingAddress.FullAddress !== ''\n ) {\n defaultAddress = shippingCartLines[0].ShippingAddress;\n } else if (this._getAddressFromCartExpressPaymentDetails()) {\n defaultAddress = this._getAddressFromCartExpressPaymentDetails();\n } else if (this._getDefaultAddress()) {\n defaultAddress = this._getDefaultAddress();\n } else {\n defaultAddress = checkoutState?.isExpressCheckoutApplied ? checkoutState.shippingAddressFromExpressCheckout : undefined;\n }\n\n if (defaultAddress && !this.addressCommon.isEmpty(defaultAddress)) {\n this._updateCurrentOperation(AddressOperation.Show, defaultAddress);\n this._setShippingAddress(defaultAddress);\n this._updateModuleState();\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: true });\n } else {\n this._updateCurrentOperation(AddressOperation.Add);\n checkoutState?.updateHasShippingAddress({ newHasShippingAddress: false });\n }\n }\n };\n\n /**\n * Method get called on submit address.\n */\n private readonly onSubmit = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address submit for Add or Update operation.');\n this._onAddressAddUpdateSubmit();\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address submit for List operation.');\n this._onSelectAddress();\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on cancel.\n */\n private readonly onCancel = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Shipping address cancel for Add or Update operation.');\n this._clearAddressFields();\n if (!(!this.selectedAddress && !this.addressCommon.isAuthenticatedFlow())) {\n this._resetView();\n }\n\n break;\n case AddressOperation.List:\n this.props.telemetry.information('Shipping address cancel for List operation.');\n if (this.selectedAddress) {\n this._resetView();\n }\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * Method get called on edit address.\n */\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Shipping address onEdit is called.');\n\n if (this.addressCommon.isAuthenticatedFlow() && this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.List, this.shippingAddress);\n } else if (this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.Update, this.shippingAddress);\n }\n\n this._updateModuleState();\n };\n\n /**\n * Method to check if checkout cartlines are available fro shipping.\n * @returns - True/false as per the delivery mode.\n */\n private readonly _canShip = (): boolean => {\n const { checkout, channelDeliveryOptionConfig } = this.props.data;\n const { request } = this.props.context;\n const pickupDeliveryModeCode = request && request.channel && request.channel.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request && request.channel && request.channel.EmailDeliveryModeCode;\n if (!checkout.result || !request.channel || checkout.result.checkoutCart.isEmpty || checkout.result.checkoutCart.hasInvoiceLine) {\n return false;\n }\n\n // @ts-expect-error: Type-checker not realizing above request.channel check\n return this.retailMultiplePickUpOptionEnabled\n ? checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : checkout.result.checkoutCart.cart.CartLines?.some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n };\n\n /**\n * Method get called on select address.\n */\n private readonly _onSelectAddress = () => {\n this._updateCurrentOperation(AddressOperation.Show, this.addressListSelectedAddress);\n this._setShippingAddress(this.addressListSelectedAddress);\n this._updateModuleState();\n };\n\n /**\n * Method get called on goto add address.\n */\n private readonly _goToAddAddress = () => {\n this._setDefaultCountryRegionId();\n this._updateCurrentOperation(AddressOperation.Add);\n };\n\n /**\n * Method get called on add/update success.\n * @param response - Retail api response.\n */\n private readonly _onAddOrUpdateSuccess = (response: IAddressResponse) => {\n if (response.customerAddresses) {\n this.customerAddresses = response.customerAddresses;\n }\n\n if (response.address) {\n this._updateCurrentOperation(AddressOperation.Show, response.address);\n this._setShippingAddress(response.address);\n this._updateModuleState();\n }\n };\n\n /**\n * Method get called on set Shipping Address.\n * @param address - Retail Api address result.\n */\n private readonly _setShippingAddress = (address: Address): void => {\n if (this.props.data.checkout.result) {\n const newShippingAddress = { ...address };\n\n if (address.ThreeLetterISORegionName && !newShippingAddress.TwoLetterISORegionName) {\n newShippingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(address.ThreeLetterISORegionName);\n }\n\n this.props.data.checkout.result.updateShippingAddress({ newShippingAddress });\n this.props.data.checkout.result.checkoutCart.updateShippingAddress({ newShippingAddress }).catch(error => {\n this.props.telemetry.error(error);\n });\n }\n };\n\n @computed private get shippingAddress(): Address | undefined {\n return this.props.data.checkout.result?.shippingAddress;\n }\n\n /**\n * Method get called on reset view.\n */\n private readonly _resetView = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this._updateCurrentOperation(\n this.addressCommon.isAuthenticatedFlow() ? AddressOperation.List : AddressOperation.Show,\n this.shippingAddress\n );\n break;\n default:\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n }\n this._updateModuleState();\n };\n\n /**\n * Update current operation.\n * @param operation - The address operation.\n * @param selectedAddress - The selected address.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation, selectedAddress?: Address) => {\n this.currentOperation = operation;\n this.selectedAddress = selectedAddress;\n\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n this.addUpdateAddress = { ...this.selectedAddress } || {};\n set(this.addUpdateAddress, {\n ThreeLetterISORegionName: this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n });\n set(this.addUpdateAddress, {\n AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType\n });\n } else if (this.currentOperation === AddressOperation.List) {\n this.addressListSelectedAddress = { ...this.selectedAddress } || {};\n }\n };\n\n /**\n * Update module state.\n */\n private readonly _updateModuleState = () => {\n if (this.currentOperation === AddressOperation.Show) {\n this.props.moduleState.onReady();\n } else if (this.isUpdating) {\n this.props.moduleState.onPending();\n } else {\n this.props.moduleState.onUpdating();\n }\n };\n\n /**\n * Method to check if the customer already has the address.\n * @param address - The address.\n */\n private readonly _isNewAddress = (address: Address): boolean => {\n for (const existingAddress of this.customerAddresses) {\n if (\n (address.Name ?? '') === existingAddress.Name &&\n (address.Street ?? '') === existingAddress.Street &&\n (address.StreetNumber ?? '') === existingAddress.StreetNumber &&\n (address.City ?? '') === existingAddress.City &&\n (address.State ?? '') === existingAddress.State &&\n (address.ZipCode ?? '') === existingAddress.ZipCode &&\n (address.Phone ?? '') === existingAddress.Phone &&\n (address.ThreeLetterISORegionName ?? '') === existingAddress.ThreeLetterISORegionName &&\n (address.AddressTypeValue ?? '') === existingAddress.AddressTypeValue\n ) {\n return false;\n }\n }\n\n return true;\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n\n private readonly _clearError = (): void => {\n this.props.moduleState.setHasError(false);\n this.setState({\n errorMessage: ''\n });\n };\n\n /**\n * Returns count of products.\n * @param cartLine - The checkout shipping cart line info props.\n * @returns Number of products.\n */\n private readonly _countItems = (cartlines: ICheckoutShippingCartLineInfo[]): number => {\n return cartlines.reduce((count, line) => {\n return count + (line.quantity || 0);\n }, 0);\n };\n}\n\nexport default CheckoutShippingAddress;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport CheckoutShippingAddress from './checkout-shipping-address';\nimport CheckoutShippingAddressView from './checkout-shipping-address.view';\n\nexport * from './checkout-shipping-address';\nexport * from './checkout-shipping-address.data';\nexport {\n ICheckoutShippingAddressConfig,\n ICheckoutShippingAddressProps,\n ICheckoutShippingAddressResources\n} from './checkout-shipping-address.props.autogenerated';\nexport * from './checkout-shipping-address.view';\n\nexport { CheckoutShippingAddress, CheckoutShippingAddressView };\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IBusinessPartnersViewProps } from './business-partners';\n\n/**\n * View layout of business partner module.\n * @param props - React props of the component.\n * @returns Functional component.\n */\nconst businessPartnersView: React.FC = props => {\n if (props.selectedBusinessPartnerUser) {\n return (\n \n {props.businessPartnersHeading}\n {props.catalogLoadingIndicator}\n {props.catalogLoadingErrorMessage}\n \n );\n }\n\n if (props.cookieConsentNotGivenErrorMessage) {\n return (\n \n {props.businessPartnersHeading}\n {props.cookieConsentNotGivenErrorMessage}\n \n );\n }\n\n return (\n \n {props.backToBusinessPartnersLink}\n {props.businessPartnersHeading}\n {props.businessPartnersTable}\n {props.businessPartnerUsersTable}\n \n );\n};\n\nexport default businessPartnersView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, GiftCard, TenderLine, TokenizedPaymentCard } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { action, computed, observable } from 'mobx';\n\n/**\n * State information related to what is needed to succesfully perform a checkout.\n */\nexport class CheckoutState {\n @observable private _tokenizedPaymentCard: TokenizedPaymentCard | undefined;\n\n @computed public get tokenizedPaymentCard(): Readonly | undefined {\n return this._tokenizedPaymentCard;\n }\n\n @observable private _tenderLine: TenderLine | undefined;\n\n @computed public get tenderLine(): Readonly | undefined {\n return this._tenderLine;\n }\n\n @observable private _billingAddress: Address | undefined;\n\n @computed public get billingAddress(): Readonly
| undefined {\n return this._billingAddress;\n }\n\n @observable private _shippingAddress: Address | undefined;\n\n @computed public get shippingAddress(): Readonly
| undefined {\n return this._shippingAddress;\n }\n\n @observable private _cardPrefix: string | undefined;\n\n @computed public get cardPrefix(): Readonly | undefined {\n return this._cardPrefix;\n }\n\n @observable private _giftCards: GiftCard[] = [];\n\n @computed public get giftCards(): readonly GiftCard[] {\n return this._giftCards;\n }\n\n @observable private _giftCardExtends: IGiftCardExtend[] = [];\n\n @computed public get giftCardExtends(): readonly IGiftCardExtend[] {\n return this._giftCardExtends;\n }\n\n @observable private _loyaltyCardNumber?: string;\n\n @computed public get loyaltyCardNumber(): Readonly | undefined {\n return this._loyaltyCardNumber;\n }\n\n @observable private _loyaltyAmount: number = 0;\n\n @computed public get loyaltyAmount(): Readonly | number {\n return this._loyaltyAmount;\n }\n\n @observable private _guestCheckoutEmail: string = '';\n\n @computed public get guestCheckoutEmail(): Readonly | string {\n return this._guestCheckoutEmail;\n }\n\n @observable private _isTermsAndConditionAccepted: boolean = false;\n\n @computed public get isTermsAndConditionAccepted(): Readonly | boolean {\n return this._isTermsAndConditionAccepted;\n }\n\n @observable private _customerAccountAmount: number = 0;\n\n @computed public get customerAccountAmount(): Readonly | number {\n return this._customerAccountAmount;\n }\n\n @action\n public updateTokenizedPaymentCard(newTokenizedPaymentCard: TokenizedPaymentCard): void {\n this._tokenizedPaymentCard = newTokenizedPaymentCard;\n }\n\n @action\n public updateTenderLine(newTenderLine: TenderLine | undefined): void {\n this._tenderLine = newTenderLine;\n }\n\n @action\n public updateShippingAddress(newShippingAddress: Address): void {\n this._shippingAddress = newShippingAddress;\n }\n\n @action\n public updateBillingAddress(newBillingAddress: Address): void {\n this._billingAddress = newBillingAddress;\n }\n\n @action\n public updateCardPrefix(newCardPrefix: string): void {\n this._cardPrefix = newCardPrefix;\n }\n\n @action\n public removeGiftCard(giftCardNumber: string): void {\n this._giftCards = this._giftCards.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public removeGiftCardExtend(giftCardNumber: string): void {\n this._giftCardExtends = this._giftCardExtends.filter(giftCard => giftCard.Id !== giftCardNumber);\n }\n\n @action\n public addGiftCard(giftCard: GiftCard): void {\n this._giftCards = [giftCard, ...this._giftCards];\n }\n\n @action\n public addGiftCardExtend(giftCard: IGiftCardExtend): void {\n this._giftCardExtends = [giftCard, ...this._giftCards];\n }\n\n @action\n public updateLoyaltyCardNumber(newLoyaltyCardNumber: string): void {\n this._loyaltyCardNumber = newLoyaltyCardNumber;\n }\n\n @action\n public updateLoyaltyAmount(newAmount: number): void {\n this._loyaltyAmount = newAmount;\n }\n\n @action\n public updateGuestCheckoutEmail(newGuestCheckoutEmail: string): void {\n this._guestCheckoutEmail = newGuestCheckoutEmail;\n }\n\n @action\n public updateTermsAndConditionsAcceptance(newIsTermsAndConditionAccepted: boolean): void {\n this._isTermsAndConditionAccepted = newIsTermsAndConditionAccepted;\n }\n\n @action\n public updateCustomerAccountAmount(newAmount: number): void {\n this._customerAccountAmount = newAmount;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport React, { ReactNode } from 'react';\n\nimport { IFooterCategoryViewProps } from './footer-category';\n\nexport const FooterCategoryView: React.FC = props => {\n const { categories, FooterList, FooterListItem } = props;\n if (!categories || categories.length === 0) {\n props.context.telemetry.error('Footer content is empty, module wont render');\n return null;\n }\n return (\n \n {categories.map((category: ReactNode, index: number) => {\n return (\n \n {category}\n \n );\n })}\n \n );\n};\n\nexport default FooterCategoryView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAddressAddItem, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { IBusinessAccountAddressViewProps } from './business-account-address';\n\n/**\n * Address Add Update Component.\n * @param param0 - Root param.\n * @param param0.AddressForm - Address form.\n * @param param0.heading - Address Heading.\n * @param param0.items - IAddressAddItem[].\n * @param param0.hasError - Boolean.\n * @param param0.error - IAddressError.\n * @param param0.isShowSaveButton - Boolean.\n * @param param0.saveButton - Save button.\n * @param param0.isShowCancelButton - Boolean.\n * @param param0.cancelButton - Cancel button.\n * @returns - AddressForm Node.\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 return (\n \n {heading}\n {items.map((item: IAddressAddItem) => {\n const { AddressItem, key, label, alert, input } = item;\n return (\n \n {label}\n {hasError && alert}\n {input}\n \n );\n })}\n {hasError && (\n \n {error.title}\n {error.message}\n \n )}\n {isShowSaveButton && saveButton}\n {isShowCancelButton && cancelButton}\n \n );\n};\n\n/**\n * Business Account Address View Component.\n * @param props - Props.\n * @returns - BusinessAccountAddress Module.\n */\nconst BusinessAccountAddressView: React.FC = props => {\n const { BusinessAccountAddress, showAddOrUpdateAddress } = props;\n\n return (\n \n \n \n );\n};\n\nexport default BusinessAccountAddressView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAdressDropdown {\n id: string;\n name: string;\n className: string;\n value: string | number;\n additionalAddributes?: object;\n displayData: { key?: string | number; value?: string }[];\n onChange(event: React.ChangeEvent): void;\n}\n\nconst getDropdownItem = (key?: string | number, value?: string, selectedValue?: string | number): React.ReactNode => {\n let isSelected: boolean;\n if (typeof key === 'number') {\n isSelected = key === selectedValue;\n } else {\n isSelected = typeof selectedValue === 'string' && (key || '').toLowerCase() === (selectedValue || '').toLowerCase();\n }\n\n return (\n \n );\n};\n\n/**\n * Address dropdown.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDropdownFunctionComponent: React.FC = (props: IAdressDropdown) => {\n const { id: itemId, name, className, value, additionalAddributes, displayData, onChange } = props;\n\n return (\n \n {displayData && displayData.map(item => getDropdownItem(item.key, item.value, value))}\n \n );\n};\n\nexport default AddressDropdownFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountGenericTileViewProps } from './account-generic-tile';\n\nconst AccountGenericTileView: React.FC = props => {\n const { AccountGenericTile, heading, links } = props;\n\n return (\n \n {heading}\n {links}\n \n );\n};\n\nexport default AccountGenericTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAddressBillingHeading {\n text: string;\n}\n\nexport const AddressBillingHeading: React.FC = ({ text }) => (\n

{text}

\n);\n\nexport default IAddressBillingHeading;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { CheckoutModule, ErrorLocation, IGiftCardExtend } from '@msdyn365-commerce/global-state';\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\nimport { IModuleStateProps, withModuleState, EnabledPaymentsForOBO } from '@msdyn365-commerce-modules/checkout-utilities';\nimport { getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { action, computed, observable, reaction, set } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { AutoSuggest } from '../../common/address-autosuggest';\nimport { IAutoSuggestOptions } from '../../common/address-autosuggest.data';\nimport { AddressCommon } from '../../common/address-common';\nimport { AddressFormat } from '../../common/address-format';\nimport { AddressItemType } from '../../common/address-format.data';\nimport { AddressMetaData } from '../../common/address-meta-data';\nimport { AddressOperation, AddressType, IAddressResource, IAddressResponse } from '../../common/address-module.data';\nimport { AddressAddUpdate, IAddressAddUpdateProps } from '../../common/components/address-add';\nimport { AddressBillingCheckbox } from '../../common/components/address-billing-checkbox';\nimport { AddressBillingHeading } from '../../common/components/address-billing-heading';\nimport { AddressShow, IAddressShowProps } from '../../common/components/address-show';\nimport { ICheckoutBillingAddressData } from './checkout-billing-address.data';\nimport { ICheckoutBillingAddressProps } from './checkout-billing-address.props.autogenerated';\nimport { ErrorComponent } from '../../common';\nimport { focusOnCheckoutError } from '../../checkout-errors/checkout-errors';\n\n/**\n * Props interface.\n */\nexport interface IProps extends ICheckoutBillingAddressProps, IModuleStateProps {}\n\n/**\n * Checkout billing address view state interface.\n */\nexport interface ICheckoutBillingAddressViewState {\n isShowAddress: boolean;\n isShowAddOrUpdateAddress: boolean;\n isShowSameAsShippingCheckbox: boolean;\n errorMessage?: string;\n}\n\n/**\n * Checkout billing address view props interface.\n */\nexport interface ICheckoutBillingAddressViewProps extends IProps {\n className: string;\n currentOperation: AddressOperation;\n selectedAddress?: Address;\n addUpdateAddress: Address;\n countryRegionId: string;\n stateProvinceInfo?: StateProvinceInfo[];\n validationError: object;\n addressActionResponse?: IAddressResponse;\n viewState: ICheckoutBillingAddressViewState;\n CheckoutBillingAddress: IModuleProps;\n sameAsShippingCheckbox: React.ReactNode;\n heading: React.ReactNode;\n showAddress: IAddressShowProps;\n showAddOrUpdateAddress: IAddressAddUpdateProps;\n alert?: React.ReactNode;\n checkoutErrorRef?: React.RefObject;\n}\n\n/**\n *\n * CheckoutBillingAddress component.\n * @extends {React.PureComponent>}\n */\n// @ts-expect-error\n@withModuleState\n@observer\nclass CheckoutBillingAddress extends React.Component {\n @observable private currentOperation: AddressOperation;\n\n @observable private isBillingAddressSameAsShipping: boolean;\n\n @observable private selectedAddress?: Address;\n\n @observable private addUpdateAddress: Address;\n\n @observable private countryRegionId: string = 'USA';\n\n @observable private stateProvinceInfo?: StateProvinceInfo[];\n\n @observable private validationError: object;\n\n @observable private readonly addressActionResponse?: IAddressResponse;\n\n private readonly addressCommon: AddressCommon;\n\n private addressFormat: AddressFormat;\n\n private countryRegions: CountryRegionInfo[] = [];\n\n private addressPurposes: AddressPurpose[] = [];\n\n private readonly resources: IAddressResource;\n\n private readonly defaultAddressType: number = 6; // Default to Home\n\n // private addRenderRef: React.RefObject;\n private readonly telemetryContent?: ITelemetryContent;\n\n private autoSuggest?: AutoSuggest;\n\n private readonly checkoutErrorRef: React.RefObject = React.createRef();\n\n public constructor(props: IProps) {\n super(props);\n const { context, data, resources, telemetry } = this.props;\n\n this.addUpdateAddress = {};\n this.validationError = {};\n this.isBillingAddressSameAsShipping = false;\n this.resources = resources;\n this.currentOperation = AddressOperation.List;\n this.addressPurposes = data.addressPurposes.result || [];\n this.countryRegions = data.countryRegions.result || [];\n this.stateProvinceInfo = data.countryStates.result || [];\n this.addressCommon = new AddressCommon(context, resources, telemetry);\n this.addressFormat = new AddressFormat(\n this.countryRegions,\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\n this.addressPurposes\n );\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n\n this.state = {\n isShowAddress: false,\n isShowAddOrUpdateAddress: false,\n isShowSameAsShippingCheckbox: false,\n errorMessage: ''\n };\n\n // This.addRenderRef = React.createRef();\n }\n\n public async componentDidMount(): Promise {\n const {\n context: {\n telemetry,\n actionContext: {\n requestContext: { channel }\n }\n },\n config: { autoSuggestionEnabled, autoSuggestOptions }\n } = this.props;\n\n // Initializing data props\n this._dataInitialize(this.props);\n\n this.props.data.checkout.then(() => {\n this._setDefaultCountryRegionId();\n this._initModuleState();\n });\n\n reaction(\n () => this.countryRegionId,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.currentOperation,\n () => {\n this._getStateProvinces();\n }\n );\n\n reaction(\n () => this.props.data.checkout.result && this.props.data.checkout.result.shippingAddress,\n shippingAddress => {\n if (this.props.moduleState.isUpdating) {\n if (shippingAddress && this.isBillingAddressSameAsShipping) {\n this.isBillingAddressSameAsShipping = true;\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\n } else if (shippingAddress && this.isBillingAddressSameAsShipping) {\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\n }\n }\n }\n );\n\n reaction(\n () => this.isBillingAddressRequried,\n isBillingAddressRequried => {\n if (isBillingAddressRequried) {\n if (this.props.moduleState.isDisabled) {\n this.onEdit();\n }\n } else {\n this.props.data.checkout.result?.removeBillingAddress({});\n this.props.moduleState.onDisable();\n }\n }\n );\n\n if (autoSuggestionEnabled) {\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 const options: IAutoSuggestOptions = { ...autoSuggestOptions };\n this.autoSuggest = new AutoSuggest(\n telemetry,\n options,\n channel?.BingMapsApiKey,\n channel?.ChannelCountryRegionISOCode,\n channel?.DefaultLanguageId\n );\n\n // Customer doesn't have any address. Then add view will be loaded directly. Code for the same to handle that\n if (\n this.props.data.storeSelectorStateManager.result &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n await this.autoSuggest._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n\n reaction(\n () =>\n this.props.data.storeSelectorStateManager.result?.loadMapApi &&\n (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update),\n async () => {\n await this.autoSuggest?._loadMapAPI(await this.props.data.storeSelectorStateManager);\n }\n );\n\n reaction(\n () => this.props.data.storeSelectorStateManager.result?.isMapApiLoaded,\n async () => {\n await this._attachMapAutoSuggest();\n }\n );\n }\n\n if (this.props.data.checkout.result?.shouldEnableCheckoutErrorDisplayMessaging) {\n reaction(\n () => this.props.data.checkout.result?.checkoutError,\n checkoutError => {\n if (\n checkoutError &&\n checkoutError.errorLocation === ErrorLocation.CheckoutBillingAddress &&\n checkoutError.errorMessage\n ) {\n this._setErrorMessage(checkoutError.errorMessage);\n }\n }\n );\n\n reaction(\n () => this.props.data.checkout.result?.checkoutErrorFocus,\n checkoutErrorFocus => {\n if (checkoutErrorFocus === CheckoutModule.CheckoutBillingAddress) {\n focusOnCheckoutError(this.checkoutErrorRef, this.props.context.actionContext);\n }\n }\n );\n }\n }\n\n public async componentDidUpdate(): Promise {\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n if (this.props.data.storeSelectorStateManager.result?.isMapApiLoaded) {\n await this._attachMapAutoSuggest();\n }\n } else {\n this.autoSuggest?.disposeAutoSuggest();\n }\n }\n\n public shouldComponentUpdate(\n nextProps: ICheckoutBillingAddressProps,\n nextState: ICheckoutBillingAddressViewState\n ): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n if (!this.isBillingAddressRequried || this._shouldHideBillingAddressForOBO) {\n return null;\n }\n\n const {\n resources,\n moduleState: { hasError }\n } = this.props;\n\n const { renderView, config } = this.props;\n\n const errorMessage = this.state.errorMessage;\n\n const viewProps = {\n ...this.props,\n currentOperation: this.currentOperation,\n selectedAddress: this.selectedAddress,\n addUpdateAddress: this.addUpdateAddress,\n countryRegionId: this.countryRegionId,\n stateProvinceInfo: this.stateProvinceInfo,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n className: config.className,\n viewState: {\n isShowAddress: this.selectedAddress && this.currentOperation === AddressOperation.Show,\n isShowAddOrUpdateAddress: this.currentOperation !== AddressOperation.Show,\n isShowSameAsShippingCheckbox: this.isCartContainsItemsForShipping && this.props.moduleState.isUpdating\n },\n CheckoutBillingAddress: {\n moduleProps: this.props,\n className: classnames('ms-checkout-billing-address', config.className)\n },\n heading: ,\n alert: hasError && errorMessage && ,\n checkoutErrorRef: this.checkoutErrorRef,\n\n sameAsShippingCheckbox: (\n \n ),\n showAddress: this._renderShowAddress(),\n showAddOrUpdateAddress: this._renderAddOrUpdateAddress()\n };\n\n return renderView(viewProps) as React.ReactElement;\n }\n\n /**\n * On suggestion selected.\n * @param result - The suggestion result.\n */\n @action\n private readonly _onSuggestionSelected = async (result: Microsoft.Maps.ISuggestionResult): Promise => {\n this._clearAddressFields();\n const address = this.addressFormat.getTranformedAddress(result, this.stateProvinceInfo);\n set(this.addUpdateAddress, { Street: '' });\n set(this.addUpdateAddress, { ZipCode: address.ZipCode });\n set(this.addUpdateAddress, { CountyName: address.CountyName });\n set(this.addUpdateAddress, { City: address.City });\n set(this.addUpdateAddress, { State: address.State });\n set(this.addUpdateAddress, { DistrictName: address.DistrictName });\n set(this.addUpdateAddress, { FullAddress: address.FullAddress });\n\n // Bing autosuggest put the complete address in the Street input box. Updating the street input box to show only street address.\n setTimeout(() => {\n set(this.addUpdateAddress, { Street: address.Street });\n }, 0);\n };\n\n /**\n * Clear address fields.\n */\n @action\n private readonly _clearAddressFields = (): void => {\n const addressFormatItem = this.addressFormat.getAddressFormat(\n this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n );\n addressFormatItem.forEach(format => {\n if (this.addUpdateAddress[format.name] !== undefined && !this.autoSuggest?.excludedAddressFields.includes(format.name)) {\n this.addressFormat[format.name] = '';\n }\n });\n this._clearValidation();\n };\n\n /**\n * Clear validation.\n */\n @action\n private readonly _clearValidation = (): void => {\n this.validationError = {};\n };\n\n /**\n * On address update.\n * @param name - Name.\n * @param value - Value.\n */\n private readonly onAddressAddUpdate = (name: string, value: string) => {\n set(this.addUpdateAddress, { [name]: value });\n this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId, name);\n };\n\n /**\n * Method data initialization.\n * @param props -The checkout address properties.\n */\n private readonly _dataInitialize = (props: IProps): void => {\n const { data } = props;\n\n reaction(\n () => data.countryRegions.result,\n () => {\n this.countryRegions = data.countryRegions.result ?? [];\n }\n );\n\n reaction(\n () => data.addressPurposes.result,\n () => {\n this.addressPurposes = data.addressPurposes.result ?? [];\n }\n );\n\n reaction(\n () => data.countryStates.result,\n () => {\n this.stateProvinceInfo = data.countryStates.result ?? [];\n }\n );\n };\n\n /**\n * Render add or update address function.\n * @returns - Address add update props.\n */\n private readonly _renderAddOrUpdateAddress = (): IAddressAddUpdateProps => {\n return AddressAddUpdate({\n resources: this.resources,\n addressType: AddressType.Billing,\n addressFormat: this.addressFormat.getAddressFormat(this.addUpdateAddress.ThreeLetterISORegionName ?? this.countryRegionId),\n defaultCountryRegionId: this.countryRegionId,\n defaultAddressType: this.defaultAddressType,\n selectedAddress: this.addUpdateAddress,\n validationError: this.validationError,\n addressActionResponse: this.addressActionResponse,\n dropdownDisplayData: this.addressFormat.getPrefilledAddressDropdownData(\n this.resources.addressStateDefaultSelectionText,\n this.stateProvinceInfo\n ),\n telemetryContent: this.telemetryContent,\n onInputChange: this._onAddressAddUpdateInputChange,\n onDropdownChange: this._onAddressAddUpdateDropdownChange,\n hasExternalSubmitGroup: this.props.moduleState.hasExternalSubmitGroup,\n onSave: this._onSubmitAddress,\n onCancel: this._resetView\n });\n };\n\n private _renderShowAddress(): IAddressShowProps | null {\n if (this.selectedAddress) {\n return AddressShow({\n address: this.selectedAddress,\n addressFormat: this.addressFormat.getAddressFormat(this.selectedAddress.ThreeLetterISORegionName ?? ''),\n addressPurposes: this.addressPurposes\n });\n }\n\n return null;\n }\n\n /**\n * On country region change function.\n * @param countryRegionId - Country region Id.\n */\n private readonly _onCountryChange = (countryRegionId: string) => {\n this.countryRegionId = countryRegionId;\n const twoLetterIsoRegionName = this.addressFormat.getTwoLetterISORegionName(countryRegionId);\n set(this.addUpdateAddress, { ThreeLetterISORegionName: countryRegionId });\n set(this.addUpdateAddress, { TwoLetterISORegionName: twoLetterIsoRegionName });\n this.autoSuggest?.changeAutoSuggestionCountryCode(twoLetterIsoRegionName);\n this._clearAddressFields();\n };\n\n /**\n * Gets address format for exclude list.\n * @returns - Address item type.\n */\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\n const { config } = this.props;\n const addressFormatExcludeList: AddressItemType[] = [];\n\n if (!config.showAddressType) {\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\n }\n\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\n\n return addressFormatExcludeList;\n };\n\n /**\n * Attach map auto suggest.\n */\n private readonly _attachMapAutoSuggest = async (): Promise => {\n const {\n data: {\n storeSelectorStateManager: { result: storeSelectorStateManager }\n }\n } = this.props;\n\n if (storeSelectorStateManager?.isMapApiLoaded) {\n this.autoSuggest?.attachAutoSuggest('#billing_addressstreet', '#billing_addressstreet_container', this._onSuggestionSelected);\n }\n };\n\n /**\n * On address add update input change.\n * @param event - The event.\n */\n private readonly _onAddressAddUpdateInputChange = (event: React.ChangeEvent): void => {\n const value = (event.target.value || '').replace(new RegExp('[<>]', 'gi'), '');\n this.onAddressAddUpdate(event.target.name, value);\n };\n\n /**\n * On address add update dropdown change.\n * @param event - The event.\n */\n private readonly _onAddressAddUpdateDropdownChange = (event: React.ChangeEvent): void => {\n this.onAddressAddUpdate(event.target.name, event.target.value);\n\n if (event.target.name === AddressItemType[AddressItemType.ThreeLetterISORegionName]) {\n this._onCountryChange(event.target.value);\n }\n };\n\n /**\n * Gets state provinces.\n */\n private readonly _getStateProvinces = (): void => {\n if (\n !this.countryRegionId ||\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\n ) {\n return;\n }\n\n this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\n\n // Reset state if selected state not found in the list.\n if (!stateInfo) {\n set(this.addUpdateAddress, { State: '' });\n }\n this.stateProvinceInfo = result;\n });\n };\n\n /**\n * Initialize module state.\n */\n private readonly _initModuleState = (): void => {\n this.props.moduleState.init({\n status: this.isBillingAddressRequried ? 'updating' : 'disabled',\n onEdit: this.onEdit,\n onCancel: this.onCancel,\n onSubmit: this.onSubmit\n });\n\n const { billingAddress, isBillingAddressSameAsShippingAddress } = this.props.data.checkout.result ?? {};\n\n if (this.isBillingAddressRequried) {\n if (billingAddress) {\n this.isBillingAddressSameAsShipping = isBillingAddressSameAsShippingAddress ?? false;\n this._updateCurrentOperation(AddressOperation.Show, billingAddress);\n this._updateModuleState();\n } else if (this.isCartContainsItemsForShipping) {\n this.isBillingAddressSameAsShipping = true;\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this.isBillingAddressSameAsShipping = false;\n this._updateCurrentOperation(AddressOperation.Add);\n }\n }\n };\n\n /**\n * Sets default country region Id.\n */\n private _setDefaultCountryRegionId(): void {\n const { request } = this.props.context;\n const market = request.channel?.ChannelCountryRegionISOCode;\n\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\n }\n\n /**\n * On change - Billing address same as shipping.\n * @param event - The event.\n */\n private readonly _onBillingAddressSameAsShippingChange = (event: React.ChangeEvent) => {\n this.isBillingAddressSameAsShipping = event.currentTarget.checked;\n\n if (this.isBillingAddressSameAsShipping && this.shippingAddress) {\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this._updateCurrentOperation(AddressOperation.Add, this.billingAddress);\n }\n };\n\n @computed private get isCartContainsItemsForShipping(): boolean {\n const { request } = this.props.context;\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\n const { channelDeliveryOptionConfig, featureState } = this.props.data;\n const retailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\n ?.IsEnabled;\n\n const pickupDeliveryModeCode = request.channel?.PickupDeliveryModeCode;\n const emailDeliveryModeCode = request.channel?.EmailDeliveryModeCode;\n\n // If hasInvoiceLine is true, there are only invoices no items in cart and return false here\n return this.props.data.checkout.result?.checkoutCart.hasInvoiceLine\n ? false\n : retailMultiplePickUpOptionEnabled\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !==\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\n deliveryMode => deliveryMode === cartLine.DeliveryMode\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n )\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).some(cartLine =>\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\n : cartLine\n );\n }\n\n @computed private get billingAddress(): Address | undefined {\n return this.props.data.checkout.result?.billingAddress;\n }\n\n @computed private get shippingAddress(): Address | undefined {\n return this.props.data.checkout.result?.shippingAddress;\n }\n\n @computed private get getLoyaltyAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n return checkoutState?.loyaltyAmount ? checkoutState.loyaltyAmount : 0;\n }\n\n @computed private get getGiftCardTotalAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n if (!checkoutState || !checkoutState.giftCardExtends) {\n return 0;\n }\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\n return count + (giftCard.Balance || 0);\n }, 0);\n }\n\n @computed private get getCustomerAccountAmount(): number {\n const checkoutState = this.props.data.checkout.result;\n const defaultAmount = 0;\n\n return checkoutState?.customerAccountAmount ?? defaultAmount;\n }\n\n @computed private get shouldPaidByCard(): boolean {\n const {\n data: { checkout },\n config\n } = this.props;\n if (!checkout.result) {\n return false;\n }\n\n const checkoutResult = checkout.result;\n const cart = checkoutResult.checkoutCart.cart;\n if (!cart || !cart.CartLines || cart.CartLines.length === 0) {\n return false;\n }\n\n const { paymentTenderType, tokenizedPaymentCard } = checkoutResult;\n const isPaidByOtherPaymentSource = config.paymenTenderType !== paymentTenderType && tokenizedPaymentCard;\n\n // Use payment card when it is not free or gift card balance + Loyalty amount can not cover the total amount\n const amountDue = (cart.TotalAmount || 0) - this.getGiftCardTotalAmount - this.getLoyaltyAmount - this.getCustomerAccountAmount;\n\n return amountDue > 0 && !isPaidByOtherPaymentSource;\n }\n\n @computed private get isBillingAddressRequried(): boolean {\n return (\n this.shouldPaidByCard &&\n (!this.props.data.checkout?.result?.isPaymentVerificationRedirection ||\n !!this.props.data.checkout?.result?.isCheckoutCallFailed)\n );\n }\n\n @computed private get _shouldHideBillingAddressForOBO(): boolean {\n return Msdyn365.isOboRequest(this.props.context.request) && EnabledPaymentsForOBO.PaymentInstrument === 0;\n }\n\n /**\n * On submit address.\n */\n private readonly _onSubmitAddress = (): void => {\n if (!this.addressFormat.validateAddressFormat(this.addUpdateAddress, this.validationError, this.countryRegionId)) {\n this.props.moduleState.setHasError(true);\n\n if (\n this.props.data.checkout.result?.shouldEnableSinglePaymentAuthorizationCheckout &&\n this.props.data.checkout.result?.isPaymentSectionContainerHasError\n ) {\n this.props.data.checkout.result.updateIsBillingAddressHasError({ newIsBillingAddressHasError: true });\n }\n\n return;\n }\n\n this._setBillingAddress(this.addUpdateAddress);\n this._updateCurrentOperation(AddressOperation.Show, this.addUpdateAddress);\n this._updateModuleState();\n };\n\n /**\n * On submit.\n */\n private readonly onSubmit = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Billing address submit for Add or Update operation.');\n this._onSubmitAddress();\n break;\n case AddressOperation.Show:\n this.props.telemetry.information('Billing address submit for Show operation.');\n if (this.selectedAddress) {\n this._setBillingAddress(this.selectedAddress);\n this._updateCurrentOperation(AddressOperation.Show, this.selectedAddress);\n this._updateModuleState();\n }\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * On cancel.\n */\n private readonly onCancel = (): void => {\n switch (this.currentOperation) {\n case AddressOperation.Add:\n case AddressOperation.Update:\n this.props.telemetry.information('Billing address cancel for Add or Update operation.');\n this._resetView();\n this._clearAddressFields();\n break;\n case AddressOperation.Show:\n this.props.telemetry.information('Billing address cancel for Show operation.');\n this._resetView();\n break;\n default:\n this.props.telemetry.error('Invalid operation');\n }\n };\n\n /**\n * On edit.\n */\n private readonly onEdit = (): void => {\n this.props.telemetry.information('Billing address onEdit is called.');\n\n if (this.isBillingAddressSameAsShipping && this.shippingAddress && this.isCartContainsItemsForShipping) {\n this._updateCurrentOperation(AddressOperation.Show, this.shippingAddress);\n } else {\n this._updateCurrentOperation(AddressOperation.Add, this.billingAddress);\n }\n this.props.moduleState.onUpdating();\n };\n\n /**\n * Sets billing address.\n * @param address - The address.\n */\n private readonly _setBillingAddress = (address: Address): void => {\n if (this.props.data.checkout.result) {\n const newBillingAddress = { ...address };\n\n if (address.ThreeLetterISORegionName && !newBillingAddress.TwoLetterISORegionName) {\n newBillingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(address.ThreeLetterISORegionName);\n }\n\n this.props.data.checkout.result.updateBillingAddress({\n newBillingAddress,\n additionalProperties: {\n isBillingAddressSameAsShippingAddress: this.isBillingAddressSameAsShipping\n }\n });\n }\n };\n\n /**\n * Reset view.\n */\n private readonly _resetView = () => {\n this._updateCurrentOperation(AddressOperation.Show, this.billingAddress);\n this._updateModuleState();\n };\n\n /**\n * Update current operation.\n * @param operation - Address operation\n * @param selectedAddress - The selected address.\n */\n private readonly _updateCurrentOperation = (operation: AddressOperation, selectedAddress?: Address) => {\n this.currentOperation = operation;\n this.selectedAddress = selectedAddress;\n\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\n this.addUpdateAddress = { ...this.selectedAddress } || {};\n set(this.addUpdateAddress, {\n ThreeLetterISORegionName: this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\n });\n set(this.addUpdateAddress, { AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType });\n }\n };\n\n /**\n * Updates the module state.\n */\n private readonly _updateModuleState = () => {\n if (this.currentOperation === AddressOperation.Show) {\n this.props.moduleState.onReady();\n } else {\n this.props.moduleState.onUpdating();\n }\n };\n\n @action\n private readonly _setErrorMessage = (errorMessage: string): void => {\n this.props.telemetry.error(errorMessage);\n this.props.moduleState.setHasError(true);\n this.props.moduleState.onUpdating();\n this.setState({\n errorMessage\n });\n };\n}\n\nexport default CheckoutBillingAddress;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { CacheType, IActionContext, IActionInput } from '@msdyn365-commerce/core';\n\nimport { IModuleStates } from './module-state.data';\n\n/**\n * GetModulesInput.\n */\nexport class ModuleStatesCacheKey implements IActionInput {\n public getCacheKey = () => 'ModuleState';\n\n public getCacheObjectType = () => 'ModuleState';\n\n public dataCacheType = (): CacheType => 'none';\n}\n\nexport function getModuleStates(ctx: IActionContext): IModuleStates {\n const cacheKey = new ModuleStatesCacheKey();\n\n let moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n if (moduleStates) {\n return moduleStates;\n }\n ctx.update(cacheKey, {});\n moduleStates = ctx.get(cacheKey.getCacheObjectType(), cacheKey.getCacheKey());\n return moduleStates;\n}\n\nexport function updateModuleStates(value: IModuleStates, ctx: IActionContext): void {\n const cacheKey = new ModuleStatesCacheKey();\n ctx.update(cacheKey, value);\n}\n","import React from 'react';\r\n// import { ICartResources } from '../../definition-extensions/cart.ext.props.autogenerated';\r\n// import { ICheckoutResources } from '../../definition-extensions/checkout.ext.props.autogenerated';\r\n\r\n\r\ninterface ILinePaginationProps {\r\n nextPage: (e: React.MouseEvent) => void,\r\n prevPage: (e: React.MouseEvent) => void,\r\n changePage: (page: number) => void,\r\n currentPage: number,\r\n numPages: number,\r\n prev: string,\r\n next: string\r\n}\r\n\r\n/**\r\n * Renders pagination navigation on the page, which displays 4 buttons that allow\r\n * user to navigate to the first, last, next or previous pages. Also displays \r\n * the current page out of the total number of pages. ( ie. 5/7 )\r\n *\r\n * @param {(e: React.MouseEvent) => void} nextPage\r\n * @param {(e: React.MouseEvent) => void} prevPage\r\n * @param {(page: number) => void} changePage\r\n * @param {number} currentPage\r\n * @param {number} numPages\r\n * @param {ICartResources} resources\r\n * @return {*} {React.ReactNode}\r\n */\r\nexport const LinePagination : React.FC = ({\r\n nextPage,\r\n prevPage,\r\n changePage,\r\n currentPage,\r\n numPages,\r\n prev,\r\n next}) => {\r\n const firstPage: number = 1;\r\n \r\n return (\r\n \r\n
\r\n {numPages > 0 &&\r\n <>\r\n {/* {currentPage !== 0 && */}\r\n <>\r\n \r\n \r\n \r\n {/* } */}\r\n
\r\n \r\n {currentPage + 1} / {numPages}\r\n \r\n
\r\n {/* {currentPage !== numPages && */}\r\n <>\r\n \r\n \r\n \r\n {/* } */}\r\n \r\n }\r\n
\r\n )};\r\n \r\n ","/*--------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * See License.txt in the project root for license information.\r\n *--------------------------------------------------------------*/\r\n\r\nimport { IGiftCardExtend } from '@msdyn365-commerce/global-state';\r\nimport { Address, AddressPurpose, CountryRegionInfo, StateProvinceInfo } from '@msdyn365-commerce/retail-proxy';\r\nimport { IModuleStateProps, withModuleState } from '@msdyn365-commerce-modules/checkout-utilities';\r\nimport { IModuleProps } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport { computed, observable, reaction, set } from 'mobx';\r\nimport { observer } from 'mobx-react';\r\nimport * as React from 'react';\r\n\r\nimport {\r\n AddressBillingHeading,\r\n AddressCommon,\r\n AddressFormat,\r\n AddressItemType,\r\n AddressMetaData,\r\n AddressOperation,\r\n AddressShow,\r\n IAddressAddUpdateProps,\r\n IAddressResponse,\r\n IAddressShowProps\r\n} from '@msdyn365-commerce-modules/address';\r\nimport { IB2bCheckoutBillingAddressData } from './b2b-checkout-billing-address.data';\r\nimport { IB2bCheckoutBillingAddressProps } from './b2b-checkout-billing-address.props.autogenerated';\r\n\r\n/**\r\n * Props interface.\r\n */\r\nexport interface IProps extends IB2bCheckoutBillingAddressProps, IModuleStateProps {}\r\n\r\nexport interface ICheckoutState {\r\n errorMessage: string | undefined;\r\n}\r\n\r\n/**\r\n * Checkout billing address view state interface.\r\n */\r\nexport interface ICheckoutBillingAddressViewState {\r\n isShowAddress: boolean;\r\n isError: boolean;\r\n}\r\n\r\n/**\r\n * Checkout billing address view props interface.\r\n */\r\nexport interface ICheckoutBillingAddressViewProps extends IProps {\r\n className: string;\r\n currentOperation: AddressOperation;\r\n selectedAddress?: Address;\r\n addUpdateAddress: Address;\r\n countryRegionId: string;\r\n stateProvinceInfo?: StateProvinceInfo[];\r\n validationError: object;\r\n addressActionResponse?: IAddressResponse;\r\n viewState: ICheckoutBillingAddressViewState;\r\n CheckoutBillingAddress: IModuleProps;\r\n sameAsShippingCheckbox: React.ReactNode;\r\n heading: React.ReactNode;\r\n showAddress: IAddressShowProps;\r\n showAddOrUpdateAddress: IAddressAddUpdateProps;\r\n error: React.ReactNode;\r\n}\r\n\r\n/**\r\n *\r\n * CheckoutBillingAddress component.\r\n * @extends {React.PureComponent>}\r\n */\r\n// @ts-expect-error\r\n@withModuleState\r\n@observer\r\nclass CheckoutBillingAddress extends React.Component {\r\n @observable private currentOperation: AddressOperation;\r\n\r\n @observable private isBillingAddressSameAsShipping: boolean;\r\n\r\n @observable private selectedAddress?: Address;\r\n\r\n @observable private addUpdateAddress: Address;\r\n\r\n @observable private countryRegionId: string = 'USA';\r\n\r\n @observable private stateProvinceInfo?: StateProvinceInfo[];\r\n\r\n @observable private validationError: object;\r\n\r\n @observable private readonly addressActionResponse?: IAddressResponse;\r\n\r\n private readonly addressCommon: AddressCommon;\r\n\r\n private addressFormat: AddressFormat;\r\n\r\n private countryRegions: CountryRegionInfo[] = [];\r\n\r\n private addressPurposes: AddressPurpose[] = [];\r\n\r\n private addresses: Address[];\r\n\r\n private readonly defaultAddressType: number = 6; // Default to Home\r\n\r\n public constructor(props: IProps) {\r\n super(props);\r\n this.state = { errorMessage: undefined };\r\n const { context, data, resources, telemetry } = this.props;\r\n\r\n this.addUpdateAddress = {};\r\n this.validationError = {};\r\n this.isBillingAddressSameAsShipping = false;\r\n this.currentOperation = AddressOperation.List;\r\n this.addressPurposes = data.addressPurposes.result || [];\r\n this.addresses = data.address.result || [];\r\n this.countryRegions = data.countryRegions.result || [];\r\n this.stateProvinceInfo = data.countryStates.result || [];\r\n this.addressCommon = new AddressCommon(context, resources, telemetry);\r\n this.addressFormat = new AddressFormat(\r\n this.countryRegions,\r\n new AddressMetaData({ ...resources }, this._getAddressFormatExcludeList()),\r\n this.addressPurposes\r\n );\r\n }\r\n\r\n public async componentDidMount(): Promise {\r\n // Initializing data props\r\n\r\n this._dataInitialize(this.props);\r\n\r\n void this.props.data.checkout.then(() => {\r\n this._setDefaultCountryRegionId();\r\n this._initModuleState();\r\n });\r\n\r\n reaction(\r\n () => this.countryRegionId,\r\n () => {\r\n this._getStateProvinces();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.currentOperation,\r\n () => {\r\n this._getStateProvinces();\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.props.data.checkout.result && this.props.data.checkout.result.shippingAddress,\r\n shippingAddress => {\r\n if (this.props.moduleState.isUpdating) {\r\n if (shippingAddress && this.isBillingAddressSameAsShipping) {\r\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\r\n } else if (shippingAddress && this.isBillingAddressSameAsShipping) {\r\n this._updateCurrentOperation(AddressOperation.Show, shippingAddress);\r\n }\r\n }\r\n }\r\n );\r\n\r\n reaction(\r\n () => this.isBillingAddressRequried,\r\n isBillingAddressRequried => {\r\n if (!isBillingAddressRequried) {\r\n this.props.data.checkout.result?.removeBillingAddress({});\r\n this.props.moduleState.onDisable();\r\n }\r\n }\r\n );\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IProps, nextState: ICheckoutState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element | null {\r\n if (!this.isBillingAddressRequried) {\r\n return null;\r\n }\r\n\r\n const { resources } = this.props;\r\n const { renderView, config } = this.props;\r\n\r\n const viewProps = {\r\n ...this.props,\r\n currentOperation: this.currentOperation,\r\n selectedAddress: this.props.moduleState.hasError ? undefined : this.selectedAddress,\r\n addUpdateAddress: this.props.moduleState.hasError ? undefined : this.addUpdateAddress,\r\n countryRegionId: this.countryRegionId,\r\n stateProvinceInfo: this.stateProvinceInfo,\r\n validationError: this.validationError,\r\n addressActionResponse: this.addressActionResponse,\r\n className: config.className,\r\n viewState: {\r\n isShowAddress: this.selectedAddress && this.currentOperation === AddressOperation.Show && !this.props.moduleState.hasError,\r\n isError: this.props.moduleState.hasError\r\n },\r\n CheckoutBillingAddress: {\r\n moduleProps: this.props,\r\n className: classnames('ms-checkout-billing-address', config.className)\r\n },\r\n heading: ,\r\n showAddress: this._renderShowAddress(),\r\n error: this.renderErrorMessage()\r\n };\r\n\r\n return renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n /**\r\n * Method data initialization.\r\n * @param props -The checkout address properties.\r\n */\r\n private readonly _dataInitialize = (props: IProps): void => {\r\n const { data } = props;\r\n\r\n reaction(\r\n () => data.countryRegions.result,\r\n () => {\r\n this.countryRegions = data.countryRegions.result ?? [];\r\n }\r\n );\r\n\r\n reaction(\r\n () => data.addressPurposes.result,\r\n () => {\r\n this.addressPurposes = data.addressPurposes.result ?? [];\r\n }\r\n );\r\n\r\n reaction(\r\n () => data.countryStates.result,\r\n () => {\r\n this.stateProvinceInfo = data.countryStates.result ?? [];\r\n }\r\n );\r\n\r\n reaction(\r\n () => data.address.result,\r\n () => {\r\n this.addresses = data.address.result ?? [];\r\n }\r\n );\r\n\r\n this._setBillingAddress();\r\n };\r\n\r\n private _renderShowAddress(): IAddressShowProps | null {\r\n if (this.selectedAddress) {\r\n return AddressShow({\r\n address: this.selectedAddress,\r\n addressFormat: this.addressFormat.getAddressFormat(this.selectedAddress.ThreeLetterISORegionName ?? ''),\r\n addressPurposes: this.addressPurposes\r\n });\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets address format for exclude list.\r\n * @returns - Address item type.\r\n */\r\n private readonly _getAddressFormatExcludeList = (): AddressItemType[] => {\r\n const { config } = this.props;\r\n const addressFormatExcludeList: AddressItemType[] = [];\r\n\r\n if (!config.showAddressType) {\r\n addressFormatExcludeList.push(AddressItemType.AddressTypeValue);\r\n }\r\n\r\n addressFormatExcludeList.push(AddressItemType.IsPrimary);\r\n\r\n return addressFormatExcludeList;\r\n };\r\n\r\n /**\r\n * Gets state provinces.\r\n */\r\n private readonly _getStateProvinces = (): void => {\r\n if (\r\n !this.countryRegionId ||\r\n !(this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update)\r\n ) {\r\n return;\r\n }\r\n\r\n void this.addressCommon.getStateProvinces(this.countryRegionId).then((result: StateProvinceInfo[]) => {\r\n const stateInfo = result.some(state => state.StateId === this.addUpdateAddress.State);\r\n\r\n // Reset state if selected state not found in the list.\r\n if (!stateInfo) {\r\n set(this.addUpdateAddress, { State: '' });\r\n }\r\n this.stateProvinceInfo = result;\r\n });\r\n };\r\n\r\n /**\r\n * Initialize module state.\r\n */\r\n private readonly _initModuleState = (): void => {\r\n this.props.moduleState.init({\r\n status: this.isBillingAddressRequried ? 'updating' : 'disabled'\r\n });\r\n\r\n const { billingAddress, isBillingAddressSameAsShippingAddress } = this.props.data.checkout.result ?? {};\r\n\r\n if (this.isBillingAddressRequried) {\r\n if (billingAddress) {\r\n this.isBillingAddressSameAsShipping = isBillingAddressSameAsShippingAddress ?? false;\r\n this._updateCurrentOperation(AddressOperation.Show, billingAddress);\r\n this._updateModuleState();\r\n } else if (this.isCartContainsItemsForShipping) {\r\n this.isBillingAddressSameAsShipping = false;\r\n this._updateCurrentOperation(AddressOperation.Show, undefined);\r\n\r\n const {\r\n resources: { noBillingErrorMessage }\r\n } = this.props;\r\n\r\n this.setError(noBillingErrorMessage, true);\r\n } else {\r\n this.isBillingAddressSameAsShipping = false;\r\n this._updateCurrentOperation(AddressOperation.Add);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets default country region Id.\r\n */\r\n private _setDefaultCountryRegionId(): void {\r\n const { request } = this.props.context;\r\n const market = request.channel?.ChannelCountryRegionISOCode;\r\n\r\n this.countryRegionId = this.addressCommon.getDefaultCountryRegionId(this.countryRegionId, this.countryRegions, market);\r\n }\r\n\r\n @computed private get isCartContainsItemsForShipping(): boolean {\r\n const { request } = this.props.context;\r\n const multiplePickupStoreSwitchName = 'Dynamics.AX.Application.RetailMultiplePickupDeliveryModeFeature';\r\n const { channelDeliveryOptionConfig, featureState } = this.props.data;\r\n const retailMultiplePickUpOptionEnabled = featureState.result?.find(feature => feature.Name === multiplePickupStoreSwitchName)\r\n ?.IsEnabled;\r\n\r\n const pickupDeliveryModeCode = request.channel?.PickupDeliveryModeCode;\r\n const emailDeliveryModeCode = request.channel?.EmailDeliveryModeCode;\r\n\r\n // If hasInvoiceLine is true, there are only invoices no items in cart and return false here\r\n return this.props.data.checkout.result?.checkoutCart.hasInvoiceLine\r\n ? false\r\n : retailMultiplePickUpOptionEnabled\r\n ? ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).some(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !==\r\n channelDeliveryOptionConfig.result?.PickupDeliveryModeCodes?.find(\r\n deliveryMode => deliveryMode === cartLine.DeliveryMode\r\n ) && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n )\r\n : ((this.props.data.checkout.result && this.props.data.checkout.result.checkoutCart.cart.CartLines) || []).some(cartLine =>\r\n cartLine.DeliveryMode && cartLine.DeliveryMode !== ''\r\n ? cartLine.DeliveryMode !== pickupDeliveryModeCode && cartLine.DeliveryMode !== emailDeliveryModeCode\r\n : cartLine\r\n );\r\n }\r\n\r\n @computed private get getLoyaltyAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n return checkoutState?.loyaltyAmount ? checkoutState.loyaltyAmount : 0;\r\n }\r\n\r\n @computed private get getGiftCardTotalAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n if (!checkoutState || !checkoutState.giftCardExtends) {\r\n return 0;\r\n }\r\n return checkoutState.giftCardExtends.reduce((count: number, giftCard: IGiftCardExtend) => {\r\n return count + (giftCard.Balance || 0);\r\n }, 0);\r\n }\r\n\r\n @computed private get getCustomerAccountAmount(): number {\r\n const checkoutState = this.props.data.checkout.result;\r\n const defaultAmount = 0;\r\n\r\n return checkoutState?.customerAccountAmount ?? defaultAmount;\r\n }\r\n\r\n @computed private get shouldPaidByCard(): boolean {\r\n const {\r\n data: { checkout },\r\n config\r\n } = this.props;\r\n if (!checkout.result) {\r\n return false;\r\n }\r\n\r\n const checkoutResult = checkout.result;\r\n const cart = checkoutResult.checkoutCart.cart;\r\n if (!cart || !cart.CartLines || cart.CartLines.length === 0) {\r\n return false;\r\n }\r\n\r\n const { paymentTenderType, tokenizedPaymentCard } = checkoutResult;\r\n const isPaidByOtherPaymentSource = config.paymenTenderType !== paymentTenderType && tokenizedPaymentCard;\r\n\r\n // Use payment card when it is not free or gift card balance + Loyalty amount can not cover the total amount\r\n const amountDue = (cart.TotalAmount || 0) - this.getGiftCardTotalAmount - this.getLoyaltyAmount - this.getCustomerAccountAmount;\r\n\r\n return amountDue > 0 && !isPaidByOtherPaymentSource;\r\n }\r\n\r\n @computed private get isBillingAddressRequried(): boolean {\r\n return this.shouldPaidByCard;\r\n }\r\n\r\n private readonly setError = (errorMessage: string | undefined, hasError: boolean): void => {\r\n this.props.moduleState.setHasError(hasError);\r\n this.setState({ errorMessage });\r\n };\r\n\r\n private renderErrorMessage = (): React.ReactNode => (\r\n
\r\n

{this.state.errorMessage}

\r\n
\r\n );\r\n\r\n /**\r\n * Sets billing address.\r\n * @param address - The address.\r\n */\r\n private readonly _setBillingAddress = (): void => {\r\n if (this.props.data.checkout.result) {\r\n const addressTypeId = 1;\r\n const addressCount = this.addresses.filter((address: Address) => address.AddressTypeValue === addressTypeId).length;\r\n\r\n // Only set billing address if there is one Invoice address\r\n if (addressCount === 1) {\r\n const address = this.addresses.find(address => address.AddressTypeValue === addressTypeId);\r\n this.selectedAddress = address ? address : this.selectedAddress;\r\n\r\n const newBillingAddress: Address = { ...address };\r\n\r\n if (address?.ThreeLetterISORegionName && !newBillingAddress.TwoLetterISORegionName) {\r\n newBillingAddress.TwoLetterISORegionName = this.addressFormat.getTwoLetterISORegionName(\r\n address?.ThreeLetterISORegionName\r\n );\r\n }\r\n\r\n void this.props.data.checkout.result.updateBillingAddress({\r\n newBillingAddress,\r\n additionalProperties: {\r\n isBillingAddressSameAsShippingAddress: this.isBillingAddressSameAsShipping\r\n }\r\n });\r\n\r\n this.setError(undefined, false);\r\n } else {\r\n // Remove the billing address and set appropriate error message\r\n this.selectedAddress = undefined;\r\n void this.props.data.checkout.result.removeBillingAddress({\r\n additionalProperties: {\r\n isBillingAddressSameAsShippingAddress: false\r\n }\r\n });\r\n\r\n const {\r\n resources: { noBillingErrorMessage, multipleBillingErrorMessage }\r\n } = this.props;\r\n\r\n this.setError(addressCount === 0 ? noBillingErrorMessage : multipleBillingErrorMessage, true);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Update current operation.\r\n * @param operation - Address operation\r\n * @param selectedAddress - The selected address.\r\n */\r\n private readonly _updateCurrentOperation = (operation: AddressOperation, selectedAddress?: Address) => {\r\n this.currentOperation = operation;\r\n this.selectedAddress = selectedAddress;\r\n\r\n if (this.currentOperation === AddressOperation.Add || this.currentOperation === AddressOperation.Update) {\r\n this.addUpdateAddress = { ...this.selectedAddress } || {};\r\n set(this.addUpdateAddress, {\r\n ThreeLetterISORegionName: this.addUpdateAddress.ThreeLetterISORegionName || this.countryRegionId\r\n });\r\n set(this.addUpdateAddress, { AddressTypeValue: this.addUpdateAddress.AddressTypeValue || this.defaultAddressType });\r\n }\r\n };\r\n\r\n /**\r\n * Updates the module state.\r\n */\r\n private readonly _updateModuleState = () => {\r\n if (this.currentOperation === AddressOperation.Show) {\r\n this.props.moduleState.onReady();\r\n } else {\r\n this.props.moduleState.onUpdating();\r\n }\r\n };\r\n}\r\n\r\nexport default CheckoutBillingAddress;\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Address, AddressPurpose } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { Heading as HeadingData } from '@msdyn365-commerce-modules/data-types';\nimport { Heading, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { AddressFormat } from '../address-format';\nimport { IAddressResource, IAddressResponse } from '../address-module.data';\nimport AddressButtonComponent from './address-button';\nimport AddressErrorMessageComponent from './address-error-message';\nimport AddressErrorTitleComponent from './address-error-title';\nimport { AddressShow, IAddressShowProps } from './address-show';\n\nexport interface IAddressListError {\n Error: INodeProps;\n isShowError: boolean;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAddressListItem {\n Item: INodeProps;\n key: number;\n error: IAddressListError;\n showItems: IAddressShowProps;\n isShowPrimaryButton: boolean;\n primaryButton: React.ReactNode;\n editButton: React.ReactNode;\n removeButton: React.ReactNode;\n}\n\nexport interface IAddressList {\n List: INodeProps;\n isShowList: boolean;\n heading: React.ReactNode;\n items: IAddressListItem[];\n}\n\nexport interface IAddressListProps {\n ListAddress: INodeProps;\n heading: React.ReactNode;\n isShowEmptyListMessage: boolean;\n emptyListMessage: React.ReactNode;\n addButton: React.ReactNode;\n primaryAddressList: IAddressList;\n otherAddressList: IAddressList;\n}\n\nexport interface IAddressListInputProps {\n isUpdating?: boolean;\n selectedAddress?: Address;\n addressFormat: AddressFormat;\n addresses: Address[];\n addressPurposes: AddressPurpose[];\n heading?: HeadingData;\n primaryAddressSectionHeading?: HeadingData;\n otherAddressSectionHeading?: HeadingData;\n addressActionResponse?: IAddressResponse;\n resources: IAddressResource;\n contextRequest: Msdyn365.IRequestContext;\n telemetryContent?: ITelemetryContent;\n handleLineItemHeadingChange?(event: Msdyn365.ContentEditableEvent): void;\n onAddAddress(): void;\n onEditAddress(address?: Address): void;\n onRemoveAddress(address?: Address): void;\n onUpdatePrimaryAddress(address: Address): void;\n canRenderAsyncCustomerDataAsUnmodifiable?: boolean;\n isAsyncCustomer?: boolean;\n isAsyncCustomerAddressCreationFeatureEnabled?: boolean;\n isEditAsyncCustomerFeatureEnabled?: boolean;\n}\n\nconst getButtonAriaLabel = (ariaLabel: string, addressName?: string): string => {\n return ariaLabel.replace('{addressName}', addressName || '');\n};\n\nconst getAddressList = (\n className: string,\n addresses: Address[],\n showPrimaryButton: boolean,\n props: IAddressListInputProps,\n heading?: HeadingData\n): IAddressList => {\n const {\n resources,\n isUpdating,\n addressActionResponse,\n selectedAddress,\n addressFormat,\n onEditAddress,\n onRemoveAddress,\n onUpdatePrimaryAddress,\n addressPurposes,\n telemetryContent\n } = props;\n const { errorTitle = null, errorMessage = null } = addressActionResponse || {};\n\n return {\n List: { className },\n isShowList: addresses.length > 0,\n heading: heading && ,\n items: addresses.map(\n (address: Address): IAddressListItem => {\n const isSelectedAddress = selectedAddress && selectedAddress.RecordId === address.RecordId;\n const isShowError = isSelectedAddress && errorTitle && errorMessage;\n\n // Disable 'primary', 'edit', and 'remove' buttons if the customer IS EITHER async OR async address creation feature is enabled and edit async customer feature is disabled.\n // Conversely, these buttons can only be enabled when the customer is NOT async AND the address creation feature is disabled.\n const isInvalidAsyncState: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false || props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n Item: { className: `${className}-list` },\n key: address.RecordId || 0,\n showItems: AddressShow({\n addressFormat: addressFormat.getAddressFormat(address.ThreeLetterISORegionName || ''),\n address,\n addressPurposes\n }),\n error: {\n Error: { className: `${className}-error` },\n isShowError: !!isShowError,\n title: ,\n message: \n },\n isShowPrimaryButton: showPrimaryButton,\n\n primaryButton: (\n {\n onUpdatePrimaryAddress(address);\n }\n }}\n />\n ),\n editButton: (\n {\n onEditAddress(address);\n },\n role: 'link'\n }}\n />\n ),\n removeButton: (\n {\n onRemoveAddress(address);\n },\n role: 'link'\n }}\n />\n )\n };\n }\n )\n };\n};\n\nconst getPrimaryAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, primaryAddressSectionHeading } = props;\n const primaryAddresses = addresses.filter((address: Address) => address.IsPrimary);\n return getAddressList('msc-address-list__primary', primaryAddresses, false, props, primaryAddressSectionHeading);\n};\n\nconst getOtherAddressList = (props: IAddressListInputProps): IAddressList => {\n const { addresses, otherAddressSectionHeading } = props;\n const otherAddresses = addresses.filter((address: Address) => !address.IsPrimary);\n return getAddressList('msc-address-list__primary', otherAddresses, true, props, otherAddressSectionHeading);\n};\n\nexport const AddressList = (props: IAddressListInputProps): IAddressListProps => {\n const { addresses, heading, resources, onAddAddress, telemetryContent, handleLineItemHeadingChange } = props;\n const headingComponent = heading?.text && (\n {\n // Required\n },\n requestContext: props.contextRequest\n }}\n />\n );\n\n // IF the 'Edit async customer' feature is enabled. we won't be disabling the button in this scenario.\n // ELSE disable the 'Add' button only when the customer is async AND the 'Async Address Creation' feature is disabled.\n const disableAddButton: boolean =\n props.isEditAsyncCustomerFeatureEnabled || false\n ? false\n : (props.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (props.isAsyncCustomer || false) &&\n !(props.isAsyncCustomerAddressCreationFeatureEnabled || false);\n\n return {\n ListAddress: { className: 'ms-address-list' },\n heading: headingComponent,\n isShowEmptyListMessage: addresses.length === 0,\n emptyListMessage:

{resources.addressEmptyListAddressMessage}

,\n addButton: (\n \n ),\n primaryAddressList: getPrimaryAddressList(props),\n otherAddressList: getOtherAddressList(props)\n };\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport {\n Address,\n AddressPurpose,\n CountryRegionInfo,\n StateProvinceInfo\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { get, set } from 'mobx';\n\nimport { AddressItemType, IAddressDropdownsData, IAddressItem, IAddressValidationRule } from './address-format.data';\nimport { AddressMetaData } from './address-meta-data';\n\n/**\n *\n * Retail Service Address format parser.\n */\nexport class AddressFormat {\n private readonly countryRegionsInfo?: CountryRegionInfo[];\n\n private readonly addressPurposes?: AddressPurpose[];\n\n private readonly addressMetaData: AddressMetaData;\n\n constructor(countryRegionsInfo: CountryRegionInfo[], addressMetaData: AddressMetaData, addressPurposes: AddressPurpose[]) {\n this.countryRegionsInfo = countryRegionsInfo;\n this.addressMetaData = addressMetaData;\n this.addressPurposes = addressPurposes;\n }\n\n public getAddressFormat(countryRegionId: string): IAddressItem[] {\n const countryRegionInfo = this._getCountryRegionInfo(countryRegionId);\n if (countryRegionInfo) {\n return this._getAddressDisplayFormat(countryRegionInfo);\n }\n return [];\n }\n\n public getCountryFormat(): { key?: string; value?: string }[] {\n return (this.countryRegionsInfo || []).map(countryRegion => {\n return {\n key: countryRegion.CountryRegionId,\n value: countryRegion.ShortName\n };\n });\n }\n\n public getStateFormat(stateProvinceInfo?: StateProvinceInfo[]): { key?: string; value?: string }[] {\n return (stateProvinceInfo || []).map(state => {\n return {\n key: state.StateId,\n value: state.StateName\n };\n });\n }\n\n public getAddressTypeFormat(): { key?: number; value?: string }[] {\n return (this.addressPurposes || []).map(addressPurpose => {\n return {\n key: addressPurpose.AddressType,\n value: addressPurpose.Description\n };\n });\n }\n\n public getPrefilledAddressDropdownData = (\n stateDefaultSelectionText: string,\n stateProvinceInfo?: StateProvinceInfo[]\n ): IAddressDropdownsData => {\n const defaultStateText = {\n key: '',\n value: stateDefaultSelectionText\n };\n const dropdownData: IAddressDropdownsData = {};\n\n dropdownData[AddressItemType[AddressItemType.ThreeLetterISORegionName]] = this.getCountryFormat();\n dropdownData[AddressItemType[AddressItemType.State]] = this.getStateFormat(stateProvinceInfo);\n dropdownData[AddressItemType[AddressItemType.State]].unshift(defaultStateText);\n dropdownData[AddressItemType[AddressItemType.AddressTypeValue]] = this.getAddressTypeFormat();\n\n return dropdownData;\n };\n\n public getTwoLetterISORegionName = (countryRegionId: string): string | undefined => {\n const countryRegionInfo = this._getCountryRegionInfo(countryRegionId);\n\n return countryRegionInfo!.ISOCode;\n };\n\n public validateAddressFormat = (\n address: Address,\n validationError: Address,\n countryRegionId: string,\n propertyName?: string\n ): boolean => {\n let isValid: boolean = true;\n let validationtor;\n const addressFormat = this.getAddressFormat(address.ThreeLetterISORegionName || countryRegionId);\n\n addressFormat.forEach(addressFormatItem => {\n if (!propertyName || (propertyName && addressFormatItem.name === propertyName)) {\n validationtor = this._inputValidation(addressFormatItem, validationError, address);\n if (validationtor !== undefined) {\n isValid = validationtor;\n }\n }\n });\n\n return isValid;\n };\n\n public getTranformedAddress = (result: Microsoft.Maps.ISuggestionResult, stateProvinceInfo?: StateProvinceInfo[]): Address => {\n const address: Address = {};\n\n // Zip Code\n if (result.address.postalCode !== undefined) {\n address.ZipCode = result.address.postalCode;\n } else {\n address.ZipCode = '';\n }\n\n // State\n if (stateProvinceInfo) {\n const selectedState = stateProvinceInfo.find(state => state.StateName === result.address.adminDistrict);\n if (!selectedState) {\n address.State = '';\n address.StateName = result.address.adminDistrict;\n } else {\n address.State = selectedState.StateId;\n address.StateName = selectedState.StateName;\n }\n }\n\n // Street\n if (result.address.addressLine !== undefined) {\n address.Street = result.address.addressLine;\n } else {\n address.Street = ' ';\n }\n\n // City\n if (result.address.locality !== undefined) {\n address.City = result.address.locality;\n } else {\n address.City = '';\n }\n\n // District\n if (result.address.district !== undefined) {\n address.DistrictName = result.address.district;\n address.CountyName = result.address.district;\n } else {\n address.DistrictName = '';\n }\n\n // Formatted Address\n address.FullAddress = result.address.formattedAddress;\n\n return address;\n };\n\n private _inputValidation(addressFormatItem: IAddressItem, validationError: Address, address: Address): boolean | undefined {\n set(validationError, { [addressFormatItem.name]: null });\n for (const validationRule of addressFormatItem.validationRules || []) {\n if (!this._validateRegEx(address, addressFormatItem.name, validationRule)) {\n set(validationError, { [addressFormatItem.name]: validationRule.message });\n return false;\n }\n }\n return undefined;\n }\n\n private readonly _validateRegEx = (address: Address, propertyName: string, validationRule: IAddressValidationRule): boolean => {\n if (validationRule.regEx && validationRule.regEx.length > 0) {\n const regex = new RegExp(validationRule.regEx);\n return regex.test((get(address, propertyName) as string) || '');\n }\n return true;\n };\n\n private _getCountryRegionInfo(countryRegionId: string): CountryRegionInfo | undefined {\n return (this.countryRegionsInfo || []).find(countryRegion => {\n return (countryRegion.CountryRegionId || '').toLowerCase() === countryRegionId.toLowerCase();\n });\n }\n\n private _getAddressDisplayFormat(countryRegionInfo: CountryRegionInfo): IAddressItem[] {\n const addressDisplayItem: IAddressItem[] = [];\n\n if (countryRegionInfo && countryRegionInfo.AddressFormatLines) {\n const AddressTypeItem = this._extendAddressDisplayFormat(AddressItemType.AddressTypeValue, true);\n if (AddressTypeItem) {\n addressDisplayItem.push(AddressTypeItem);\n }\n\n const nameDisplayItem = this._extendAddressDisplayFormat(AddressItemType.Name, true);\n if (nameDisplayItem) {\n addressDisplayItem.push(nameDisplayItem);\n }\n\n countryRegionInfo.AddressFormatLines.forEach(formatLine => {\n if (formatLine.AddressComponentNameValue) {\n const addressItem = this.addressMetaData.getItemFormat(formatLine.AddressComponentNameValue);\n if (addressItem) {\n addressItem.isNewLine = formatLine.NewLine || false;\n addressDisplayItem.push(addressItem);\n }\n }\n });\n\n const phoneDisplayItem = this._extendAddressDisplayFormat(AddressItemType.Phone, false);\n if (phoneDisplayItem) {\n addressDisplayItem.push(phoneDisplayItem);\n }\n\n const isPrimaryDisplayItem = this._extendAddressDisplayFormat(AddressItemType.IsPrimary, false);\n if (isPrimaryDisplayItem) {\n addressDisplayItem.push(isPrimaryDisplayItem);\n }\n }\n\n return addressDisplayItem;\n }\n\n private _extendAddressDisplayFormat(type: AddressItemType, isNewLine: boolean): IAddressItem | undefined {\n const addressItem = this.addressMetaData.getItemFormat(type);\n if (addressItem) {\n addressItem.isNewLine = isNewLine;\n }\n return addressItem;\n }\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IActionInput, ICoreContext, IObservableAction, ITelemetry } from '@msdyn365-commerce/core';\nimport {\n Address,\n AddressPurpose,\n CountryRegionInfo,\n StateProvinceInfo\n} from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport {\n addAddress,\n AddressManagementInput,\n ArrayExtensions,\n updateAddress,\n updatePrimaryAddress\n} from '@msdyn365-commerce-modules/retail-actions';\n\nimport { getAddressPurposesAction, GetAddressPurposesInput } from '../actions/get-address-purposes';\nimport { getStateProvinceAction, GetStateProvincesInput } from '../actions/get-state-provinces';\nimport { IAddressResource, IAddressResponse } from './address-module.data';\n\n/**\n *\n * Address common.\n */\nexport class AddressCommon {\n private readonly context: ICoreContext;\n\n private readonly resources: IAddressResource;\n\n private readonly telemetry: ITelemetry;\n\n constructor(context: ICoreContext, resources: IAddressResource, telemetry: ITelemetry) {\n this.context = context;\n this.resources = resources;\n this.telemetry = telemetry;\n }\n\n public getDefaultCountryRegionId = (countryRegionId: string, countryRegions: CountryRegionInfo[], market?: string): string => {\n const marketISOCode = market || 'US';\n const currentCountryRegion = countryRegions.find(countryRegion => (countryRegion.ISOCode || '') === marketISOCode);\n return (currentCountryRegion && currentCountryRegion.CountryRegionId) || countryRegionId;\n };\n\n public parseRetailException = (resources: IAddressResource): IAddressResponse => {\n return {\n errorTitle: resources.addressErrorMessageTitle,\n errorMessage: resources.addressGenericErrorMessage\n };\n };\n\n public isAuthenticatedFlow = (): boolean => {\n return this.context.request.user.isAuthenticated;\n };\n\n public getStateProvinces = async (countryRegionId: string): Promise => {\n let response: StateProvinceInfo[] = [];\n if (this.context && this.context.actionContext) {\n try {\n const input = new GetStateProvincesInput(countryRegionId, this.context.request.apiSettings);\n response = await getStateProvinceAction(input, this.context.actionContext);\n } catch (error) {\n if (this.telemetry) {\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to get state provinces');\n }\n }\n }\n return Promise.resolve(response);\n };\n\n // For any address, check for common requried field else treat it as invalid\\empty address.\n public isEmpty = (address: Address): boolean => {\n if (address && address.ThreeLetterISORegionName && (address.State || address.City)) {\n return false;\n }\n\n return true;\n };\n\n public addCustomerAddress = async (address: Address): Promise => {\n await this.updateLogisticsLocationRoleRecordId(address);\n return this.submitCustomerAddress(addAddress, address);\n };\n\n public updateCustomerAddress = async (address: Address): Promise => {\n await this.updateLogisticsLocationRoleRecordId(address);\n return this.submitCustomerAddress(updateAddress, address);\n };\n\n public updateCustomerPrimaryAddress = async (address: Address): Promise => {\n return this.submitCustomerAddress(updatePrimaryAddress, address);\n };\n\n private readonly submitCustomerAddress = async (\n addressAction: IObservableAction,\n address: Address\n ): Promise => {\n address.AddressTypeValue = address.AddressTypeValue || 7; // 7 sets it to HOME by default\n\n const input = new AddressManagementInput(address);\n return this.execAddressAction(addressAction, input, address);\n };\n\n private readonly execAddressAction = async (\n addressAction: IObservableAction,\n input: IActionInput | IActionInput[],\n address: Address\n ): Promise => {\n let response: IAddressResponse = {};\n\n if (this.context && this.context.actionContext) {\n try {\n const addresses = await addressAction(input, this.context.actionContext);\n if (addresses.length > 0) {\n response.address = address.RecordId ? address : addresses[addresses.length - 1];\n } else {\n response.address = address;\n }\n response.customerAddresses = addresses;\n } catch (error) {\n if (this.telemetry) {\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to exec address action');\n }\n response = this.parseRetailException(this.resources);\n }\n }\n return Promise.resolve(response);\n };\n\n /**\n * Function to get the address purposes and update the LogisticsLocationRoleRecordId to update the address type.\n * @param address - Address object.\n * @returns Returns void.\n */\n private readonly updateLogisticsLocationRoleRecordId = async (address: Address): Promise => {\n let addressPurposes: AddressPurpose[] = [];\n try {\n const input: GetAddressPurposesInput = new GetAddressPurposesInput(this.context.request.apiSettings);\n addressPurposes = await getAddressPurposesAction(input, this.context.actionContext);\n } catch (error) {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- Supparsing the any type for error.\n this.telemetry.error(`Error encountered ${error}`);\n this.telemetry.debug('Unable to get address purposes');\n }\n if (ArrayExtensions.hasElements(addressPurposes)) {\n const addressPurpose: AddressPurpose | undefined = addressPurposes.find(\n purpose => purpose.AddressType === address.AddressTypeValue\n );\n if (addressPurpose) {\n address.LogisticsLocationRoleRecordId = addressPurpose.RecordId;\n }\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-generic-tile.props.autogenerated';\n\nexport interface IAccountGenericTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountGenericTileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\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 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-generic-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountGenericTileLinks;\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\nimport { IOrderLevelCommentViewProps } from './order-level-comment';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\n\r\nexport default (props: IOrderLevelCommentViewProps) => {\r\n const { staticDisplay, orderLevelCommentModuleProps, modal } = props;\r\n return (\r\n \r\n {modal}\r\n \r\n \r\n );\r\n};\r\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport React from 'react';\nimport { KeyCodes } from '@msdyn365-commerce-modules/utilities';\n\nexport interface ISearchBarProps {\n className: string;\n searchPlaceholderLabel: string;\n onSearch(searchText: string): void;\n}\n\nexport interface ISearchBarState {\n searchText: string;\n}\n\nexport class SearchBar extends React.Component {\n constructor(props: ISearchBarProps) {\n super(props);\n this.state = {\n searchText: ''\n };\n }\n\n public render(): JSX.Element {\n const { className, searchPlaceholderLabel } = this.props;\n return (\n
\n \n
\n );\n }\n\n private readonly onSearchTextChange = (ev: React.ChangeEvent): void => {\n this.setState({\n searchText: ev.target.value\n });\n };\n\n private readonly onSearch = (): void => {\n this.props.onSearch(this.state.searchText);\n };\n\n private readonly handleKeyUp = (event: React.KeyboardEvent): void => {\n if (event.keyCode === KeyCodes.Enter) {\n this.onSearch();\n }\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { CommerceException } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { ArrayExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport { Alert, Button } from '@msdyn365-commerce-modules/utilities';\nimport React from 'react';\n\nimport { moduleClassName } from '../business-partners';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { SearchBar } from './search-bar';\n\n/**\n * Props of DataGrid component.\n */\nexport interface IDataGridProps extends IComponentProps {\n className: string;\n pageSize?: number;\n searchPlaceholderLabel: string;\n defaultSorting?: ISortingInfo;\n resources: IBusinessPartnersResources;\n columns: IDataGridColumn[];\n loadData(): Promise;\n}\n\n/**\n * State of DataGrid component.\n */\nexport interface IDataGridState {\n data: Tdata[];\n paging: IPagingInfo;\n filter: IFilterInfo;\n sorting?: ISortingInfo;\n isLoading: boolean;\n errorMessage: string;\n}\n\nexport interface IPagingInfo {\n index: number;\n}\n\nexport interface IFilterInfo {\n searchText: string;\n}\n\nexport interface ISortingInfo {\n fieldName: string;\n ascending: boolean;\n}\n\n/**\n * Column definition of DataGrid component.\n */\nexport interface IDataGridColumn {\n /**\n * A unique key for identifying the column.\n */\n reactKey: string;\n\n /**\n * Name to render on the column header.\n */\n name: string;\n\n /**\n * Class name added to table cell.\n */\n className?: string;\n\n /**\n * The field to pull the text value from for the column.Can be unset if a custom `onRender` method is provided.\n */\n fieldName?: string;\n\n /**\n * Whether the user can search this column by text.\n */\n isSearchable?: boolean;\n\n /**\n * Custom renderer for cell content, instead of the default text rendering.\n */\n onRender?(item: Tdata): JSX.Element;\n\n /**\n * Event when the table cell is clicked.\n */\n onClick?(item: Tdata): void;\n}\n\nconst defaultPageSize = 10;\n\n/**\n * DataGrid component encapsulates common table functionalities.\n */\nexport class DataGrid extends React.Component, IDataGridState> {\n constructor(props: IDataGridProps) {\n super(props);\n this.state = {\n data: [],\n sorting: props.defaultSorting,\n paging: { index: 0 },\n filter: { searchText: '' },\n isLoading: true,\n errorMessage: ''\n };\n }\n\n public componentDidMount(): void {\n this.loadDataInternal();\n }\n\n public shouldComponentUpdate(nextProps: Readonly>, nextState: Readonly>): boolean {\n return (\n this.props.id !== nextProps.id ||\n this.props.columns !== nextProps.columns ||\n this.state.data !== nextState.data ||\n this.state.paging !== nextState.paging ||\n this.state.filter !== nextState.filter ||\n this.state.isLoading !== nextState.isLoading ||\n this.state.errorMessage !== nextState.errorMessage\n );\n }\n\n public render(): JSX.Element | null {\n const data = this.getDataToDisplay();\n const hasMore = this.hasMore();\n if (this.state.errorMessage) {\n return {this.state.errorMessage};\n }\n if (this.state.isLoading) {\n return {this.props.resources.loadingLabel};\n }\n if (!ArrayExtensions.hasElements(data)) {\n return (\n <>\n \n

{this.props.resources.noDataMessage}

\n \n );\n }\n return (\n <>\n \n \n {this.renderGridHeader()}\n {data.map((item, index) => this.renderGridRow(item, index))}\n
\n {hasMore && (\n
\n \n
\n )}\n \n );\n }\n\n /**\n * Renders the TH header in the table.\n * @returns - Header react node.\n */\n private readonly renderGridHeader = () => {\n const className = `${this.props.className}__header`;\n const rowClassName = `${className}__row`;\n return (\n \n \n {this.props.columns.map(column => (\n \n {column.name}\n \n ))}\n \n \n );\n };\n\n /**\n * Renders table row.\n * @param item - Data item for this row.\n * @param index - Index of the row.\n * @returns - Row react node.\n */\n private readonly renderGridRow = (item: Tdata, index: number) => {\n const rowClassName = `${this.props.className}__row`;\n return (\n \n {this.props.columns.map(column => {\n return (\n column.onClick?.(item)}>\n {column.fieldName ? (\n {((item as unknown) as { [key: string]: string })[column.fieldName]}\n ) : (\n column.onRender?.(item)\n )}\n \n );\n })}\n \n );\n };\n\n /**\n * Load data for the table.\n * @returns Promise.\n */\n private readonly loadDataInternal = async () => {\n if (!this.props.context.actionContext.requestContext.user.isAuthenticated) {\n this.setState({\n isLoading: false\n });\n return;\n }\n try {\n const result = await this.props.loadData();\n this.setState({\n isLoading: false,\n data: result\n });\n } catch (e) {\n this.setState({\n isLoading: false,\n errorMessage: (e as { data: CommerceException })?.data?.LocalizedMessage || this.props.resources.genericErrorMessage\n });\n }\n };\n\n private readonly onSearch = (searchText: string): void => {\n this.setState({\n paging: { index: 0 },\n filter: { searchText }\n });\n };\n\n private readonly loadMore = (): void => {\n this.setState({\n paging: { index: this.state.paging.index + 1 }\n });\n };\n\n private readonly sortData = (): Tdata[] => {\n const sorting = this.state.sorting;\n if (!sorting) {\n return this.state.data;\n }\n const { fieldName, ascending } = sorting;\n return this.state.data.sort((item1: Tdata, item2: Tdata) => {\n let value1 = ((item1 as unknown) as { [key: string]: string })[fieldName];\n let value2 = ((item2 as unknown) as { [key: string]: string })[fieldName];\n if (typeof value1 === 'string' && typeof value2 === 'string') {\n value1 = value1.toLowerCase();\n value2 = value2.toLowerCase();\n }\n const compareResult = value1 > value2 ? 1 : value1 < value2 ? -1 : 0;\n return ascending ? compareResult : compareResult * -1;\n });\n };\n\n private readonly filterData = (): Tdata[] => {\n const column = this.props.columns.find(c => c.isSearchable);\n const searchText = this.state.filter.searchText;\n return this.sortData().filter(item => {\n if (!column?.fieldName || !searchText) {\n return true;\n }\n const columnValue = ((item as unknown) as { [key: string]: string })[column.fieldName];\n return columnValue && columnValue.toLowerCase().indexOf(searchText.trim().toLowerCase()) >= 0;\n });\n };\n\n private readonly getDataToDisplay = (): Tdata[] => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.slice(0, itemsCount);\n };\n\n private readonly hasMore = (): boolean => {\n const itemsCount = (this.props.pageSize || defaultPageSize) * (this.state.paging.index + 1);\n const filteredItems = this.filterData();\n return filteredItems.length > itemsCount;\n };\n}\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { IComponentProps } from '@msdyn365-commerce/core';\nimport { ObjectExtensions } from '@msdyn365-commerce-modules/retail-actions';\nimport React, { ReactNode } from 'react';\nimport { isMobile, Node, VariantType } from '@msdyn365-commerce-modules/utilities';\n\nimport { BusinessPartner, BusinessPartnerUser, BusinessPartnersDataActions } from '@msdyn365-commerce/retail-proxy';\nimport { IBusinessPartnersResources } from '../business-partners.props.autogenerated';\nimport { DataGrid, IDataGridColumn } from './data-grid';\n\n/**\n * View model of business partner user, used to display.\n */\nexport interface IBusinessPartnerUserViewModel extends BusinessPartnerUser {\n name: string;\n spendingLimit: ReactNode;\n}\n\n/**\n * Props of BusinessPartnerUsersTable.\n */\nexport interface IBusinessPartnerUsersTableProps extends IComponentProps {\n className: string;\n pageSize?: number;\n businessPartner: BusinessPartner;\n resources: IBusinessPartnersResources;\n onSelect(businessPartnerUser: BusinessPartnerUser): void;\n}\n\n/**\n * BusinessPartnerUsersTable component.\n */\nexport class BusinessPartnerUsersTable extends React.Component {\n public shouldComponentUpdate(nextProps: Readonly): boolean {\n return this.props.id !== nextProps.id;\n }\n\n public render(): JSX.Element {\n return (\n \n );\n }\n\n /**\n * Get column definition of the table.\n * @returns - Columns.\n */\n private readonly getColumns = (): IDataGridColumn[] => {\n const isMobileDevice = isMobile({ variant: VariantType.Viewport, context: this.props.context.request }) === 'xs';\n\n return [\n {\n reactKey: 'name',\n name: this.props.resources.businessUserTableNameHeadingText,\n isSearchable: true,\n onClick: this.props.onSelect,\n onRender: (data: IBusinessPartnerUserViewModel) => {data.name}\n },\n {\n reactKey: 'email',\n name: this.props.resources.businessUserTableEmailHeadingText,\n fieldName: 'Email',\n onClick: this.props.onSelect\n },\n {\n reactKey: 'spendingLimit',\n name: this.props.resources.businessUserTableSpendingLimitHeadingText,\n className: `${this.props.className}__row__column-with-number`,\n fieldName: 'spendingLimit',\n onClick: !isMobileDevice ? this.props.onSelect : undefined\n }\n ];\n };\n\n /**\n * Call retail proxy to get business partner users.\n * @returns - Business partner users view model.\n */\n private readonly getBusinessPartnerUsers = async (): Promise => {\n const businessPartners = await BusinessPartnersDataActions.getUsersAsync(\n {\n callerContext: this.props.context.actionContext,\n bypassCache: 'get',\n queryResultSettings: {}\n },\n this.props.businessPartner.BusinessPartnerId\n );\n return businessPartners\n .filter(user => user.StatusValue === 1)\n .map(user => {\n return {\n ...user,\n name: `${user.FirstName} ${user.LastName}`,\n spendingLimit: (\n \n {!ObjectExtensions.isNullOrUndefined(user.SpendingLimit)\n ? this.props.context.cultureFormatter.formatCurrency(user.SpendingLimit.toString())\n : ''}\n {!ObjectExtensions.isNullOrUndefined(user.SpendingLimit) && user.SpendingLimit === 0 ? (\n \n