{"version":3,"sources":["webpack:///src/modules/account-management-address/account-management-address.tsx?2c3f","webpack:///src/common/address-autosuggest.ts?520f","webpack:///src/common/components/address-button.tsx?e3b2","webpack:///src/common/components/address-error-title.tsx?a723","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/modules/account-management-address/account-management-address.view.tsx?739e","webpack:///src/common/address-format.data.ts?da4c","webpack:///src/common/components/address-alert.tsx?0da8","webpack:///src/modules/business-account-address/business-account-address.view.tsx?dcd1","webpack:///src/common/components/address-dropdown.tsx?3e73","webpack:///src/common/components/address-list.tsx?8cb2","webpack:///src/common/address-format.ts?400b","webpack:///src/common/address-common.ts?0583","webpack:///src/common/components/address-checkbox.tsx?a46e","webpack:///src/common/components/address-add.tsx?0cbd","webpack:///src/common/components/address-error-message.tsx?c7bd","webpack:///src/common/components/address-input.tsx?ed8f","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","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","key","lang","AddressButtonFunctionComponent","ariaLabel","disabled","isDisabled","onClick","role","payLoad","getPayloadObject","attributes","getTelemetryAttributes","Object","assign","AddressErrorTitleFunctionComponent","title","BusinessAccountAddress","shouldAutoFocus","excludedList","_resetAddressFields","map","addressFormatItem","displayType","AddressItemDisplayType","Input","Checkbox","countryStates","_data$countryStates$r","Company","_updateAddress","_updateCountryRegionId","updateForm","isRequired","cleanValue","_isEmpty","_isInputRequired","addressItemValue","ObjectExtensions","isNullOrUndefined","validationRules","length","validationRule","AddressValidationRuleType","Required","componentDidMount","resetAddress","_request$channel","AddressLabelFunctionComponent","id","itemId","htmlFor","AddressShow","AddressDetail","items","item","addressTypeValue","toString","addressTypeDescription","Description","description","AddressDetailItemComponent","isNewLine","isShowLabel","Phone","labelText","label","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","message","itemType","_validationRule","Format","regEx","_ref","Node","_ref2","isShowList","Item","showItems","isShowPrimaryButton","primaryButton","editButton","removeButton","Error","isShowError","AddressLists","_ref3","ListAddress","isShowEmptyListMessage","emptyListMessage","addButton","primaryAddressList","otherAddressList","_ref4","AddressForm","isShowSaveButton","saveButton","isShowCancelButton","cancelButton","AddressItem","alert","input","AddressError","AccountManagementAddressView","Module","AddressAlertFunctionComponent","BusinessAccountAddressView","AddressDropdownFunctionComponent","additionalAddributes","displayData","onChange","getDropdownItem","selectedValue","isSelected","toLowerCase","getButtonAriaLabel","addressName","getAddressList","showPrimaryButton","errorTitle","errorMessage","Heading","isSelectedAddress","RecordId","isInvalidAsyncState","AddressErrorTitleComponent","AddressErrorMessageComponent","AddressButtonComponent","addressPrimaryButtonText","addressPrimaryButtonAriaLabel","addressEditButtonText","addressEditButtonAriaLabel","addressRemoveButtonText","addressRemoveButtonAriaLabel","getPrimaryAddressList","primaryAddresses","filter","getOtherAddressList","otherAddresses","_heading$headingTag","headingComponent","editProps","onEdit","disableAddButton","addressEmptyListAddressMessage","addressAddButtonText","addressAddButtonAriaLabel","countryRegionsInfo","addressMetaData","stateDefaultSelectionText","defaultStateText","dropdownData","getCountryFormat","getStateFormat","unshift","getAddressTypeFormat","_getCountryRegionInfo","ISOCode","propertyName","validationtor","isValid","_inputValidation","postalCode","selectedState","StateName","adminDistrict","addressLine","locality","district","formattedAddress","_validateRegEx","test","get","countryRegionInfo","_getAddressDisplayFormat","countryRegion","CountryRegionId","ShortName","addressPurpose","addressDisplayItem","AddressFormatLines","AddressTypeItem","_extendAddressDisplayFormat","nameDisplayItem","formatLine","AddressComponentNameValue","addressItem","NewLine","phoneDisplayItem","isPrimaryDisplayItem","marketISOCode","currentCountryRegion","parseRetailException","addressErrorMessageTitle","addressGenericErrorMessage","user","isAuthenticated","GetStateProvincesInput","apiSettings","getStateProvinceAction","isEmpty","updateLogisticsLocationRoleRecordId","submitCustomerAddress","addAddress","updateAddress","updatePrimaryAddress","addressAction","AddressManagementInput","execAddressAction","GetAddressPurposesInput","getAddressPurposesAction","ArrayExtensions","hasElements","purpose","LogisticsLocationRoleRecordId","AddressCheckboxFunctionComponent","isChecked","autoFocus","shouldBeAutoFocused","getRequriedAttribute","getAddessItems","index","elementId","classname","AddressInputComponent","AdressCheckboxComponent","AdressDropdownComponent","AddressLabelComponent","AddressAlertComponent","editAddressHeading","addAddressHeading","hasExternalSubmitGroup","addressSaveButtonText","addressSaveButtonAriaLabel","addressCancelButtonText","addressCancelButtonAriaLabel","AddressErrorMessageFunctionComponent","AddressInputFunctionComponent","shouldUseAutoFocus","AddressDetailItemFunctionComponent","mainClass"],"mappings":";m8BA6DA,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,cAGlDC,WAAW,KACPT,YAAIP,KAAKQ,iBAAkB,CAAEC,OAAQP,EAAQO,UAC9C,IAOU,KAAAR,oBAAsB,KACTD,KAAKG,cAAcc,iBACzCjB,KAAKQ,iBAAiBU,0BAA4BlB,KAAKV,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M,KACVrQ,EAAI,UACJ6H,EAAS,KACTlD,EAAI,MACJtB,EAAK,UACLsO,EAAS,qBACT8D,EACA6G,UAAWqB,EAAkB,iBAC7Bjc,EAAgB,SAChBiU,GACA9X,EAEE+P,EAAUC,2BAAiB,QAASnM,EAAmB1B,GACvD8N,EAAaC,iCAAuBrM,EAAmBkM,GAC7D,OACIjQ,gBAAA,QAAAqQ,OAAAC,OAAA,CACIjO,KAAMA,EACNoQ,GAAIC,EACJxI,UAAW,GAAGA,YAAoBA,YAAoBlD,IACtDA,KAAMA,EACN2X,UAAWqB,EACXta,MAAOA,EACPsO,UAAWA,GACN8D,GAAwB,GACzB3H,EAAU,CACd6H,SAAUA,O,kCCrDtB,qCAgDeiI,IA3BkE/f,IAC7E,MAAM,UAAEoT,EAAS,YAAEC,EAAW,UAAEE,EAAS,KAAEpR,EAAI,MAAEqD,GAAUxF,EAErDgK,EAAY,qDAAqD7H,EAAK+V,cACtEsF,IAAYhY,GAASA,EAAMuM,OAAS,GACpCiO,EAAY3M,EACZ,oEAAoEE,EACpEwL,IAAU/U,EAAW,CAAE,iCAAkCwT,EAAS,mCAAoCpK,IAC5G,OACItT,gBAAA,QAAMkK,UAAW+U,IAAUiB,EAAW,CAAE,sCAAuCxC,KAC1EnK,GACGvT,2BAAA,KACIA,gBAAA,QAAMkK,UAAcA,EAAH,UAAuBuJ,GACxCzT,gBAAA,QACIkK,UAAW+U,IAAU/U,EAAW,CAC5B,iCAAkCwT,EAClC,mCAAoCpK,IACtC,oBAKb5N,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/18.8d002826b6c82bb66ef4.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 { 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","/*!\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","/*!\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 { 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 * 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 { 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 * 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 { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IAdressCheckbox {\n id?: string;\n name?: string;\n className: string;\n type: string;\n isChecked: boolean;\n autoFocus?: boolean;\n additionalAddributes?: object;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Address checkbox.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressCheckboxFunctionComponent: React.FC = (props: IAdressCheckbox) => {\n const {\n id: itemId,\n name,\n className,\n type,\n isChecked,\n additionalAddributes,\n telemetryContent,\n autoFocus: shouldBeAutoFocused,\n onChange\n } = props;\n\n const payLoad = getPayloadObject('click', telemetryContent!, name!);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressCheckboxFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Address } 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 classname from 'classnames';\nimport { get } from 'mobx';\nimport * as React from 'react';\n\nimport {\n AddressItemDisplayType,\n AddressItemType,\n AddressValidationRuleType,\n IAddressDropdownsData,\n IAddressItem,\n IAddressValidationRule\n} from '../address-format.data';\nimport { AddressType, IAddressResource, IAddressResponse } from '../address-module.data';\nimport AddressAlertComponent from './address-alert';\nimport AddressButtonComponent from './address-button';\nimport AdressCheckboxComponent from './address-checkbox';\nimport AdressDropdownComponent from './address-dropdown';\nimport AddressErrorMessageComponent from './address-error-message';\nimport AddressErrorTitleComponent from './address-error-title';\nimport AddressInputComponent from './address-input';\nimport AddressLabelComponent from './address-label';\n\nexport interface IAddressAddInputProps {\n isUpdating?: boolean;\n hasError?: boolean;\n hasExternalSubmitGroup?: boolean;\n addressType: AddressType;\n addressFormat: IAddressItem[];\n defaultCountryRegionId: string;\n defaultAddressType: number;\n selectedAddress?: Address;\n dropdownDisplayData: IAddressDropdownsData;\n resources: IAddressResource;\n addressActionResponse?: IAddressResponse;\n addAddressHeading?: HeadingData;\n editAddressHeading?: HeadingData;\n validationError?: object;\n telemetryContent?: ITelemetryContent;\n shouldAutoFocus?: boolean;\n onInputChange(event: React.ChangeEvent): void;\n onDropdownChange(event: React.ChangeEvent): void;\n onSave?(): void;\n onCancel?(): void;\n}\n\nexport interface IAddressError {\n AddressError: INodeProps;\n title: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAddressAddItem {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IAddressAddUpdateProps {\n AddressForm: INodeProps;\n heading: React.ReactNode;\n items: IAddressAddItem[];\n hasError: boolean;\n error: IAddressError;\n isShowSaveButton: boolean;\n saveButton: React.ReactNode;\n isShowCancelButton: boolean;\n cancelButton: React.ReactNode;\n}\n\nconst getRequriedAttribute = (validationRules?: IAddressValidationRule[]): object => {\n const requriedRule = (validationRules || []).find(validationRule => {\n return validationRule.type === AddressValidationRuleType.Required;\n });\n\n return requriedRule ? { 'aria-required': true } : {};\n};\n\nconst getAddessItems = (selectedAddress: Address, props: IAddressAddInputProps): IAddressAddItem[] => {\n const {\n addressFormat,\n addressType,\n dropdownDisplayData,\n defaultCountryRegionId,\n defaultAddressType,\n validationError = {},\n onInputChange,\n onDropdownChange,\n shouldAutoFocus\n } = props;\n\n return addressFormat.map((addressFormatItem, index) => {\n const elementId = `${addressType.toLowerCase()}_address${addressFormatItem.name.toLowerCase()}`;\n const errorMessage = get(validationError, addressFormatItem.name);\n const className = classname('msc-address-form__item', `msc-address-form__item-${addressFormatItem.name.toLowerCase()}`, {\n 'msc-address-form__item-newline': addressFormatItem.isNewLine,\n 'address-form__item-invalid': errorMessage\n });\n let input;\n\n if (addressFormatItem.displayType === AddressItemDisplayType.Input) {\n input = (\n \n );\n } else if (addressFormatItem.displayType === AddressItemDisplayType.Checkbox) {\n input = (\n \n );\n } else {\n const displayData = dropdownDisplayData[addressFormatItem.name];\n let selectedValue = selectedAddress[addressFormatItem.name];\n\n if (addressFormatItem.type === AddressItemType.ThreeLetterISORegionName) {\n selectedValue = selectedValue || defaultCountryRegionId;\n }\n\n if (addressFormatItem.type === AddressItemType.AddressTypeValue) {\n selectedValue = selectedValue || defaultAddressType;\n }\n\n input = (\n \n );\n }\n\n return {\n key: addressFormatItem.name,\n AddressItem: { className, id: `${elementId}_container` },\n label: ,\n alert: ,\n input\n };\n });\n};\n\nexport const AddressAddUpdate = (props: IAddressAddInputProps): IAddressAddUpdateProps => {\n const {\n editAddressHeading,\n addAddressHeading,\n selectedAddress = {},\n resources,\n hasError,\n onCancel,\n onSave,\n hasExternalSubmitGroup,\n isUpdating,\n addressActionResponse,\n telemetryContent\n } = props;\n const heading = selectedAddress.RecordId ? editAddressHeading : addAddressHeading;\n\n return {\n AddressForm: { className: 'msc-address-form' },\n heading: heading && ,\n items: getAddessItems(selectedAddress, props),\n isShowSaveButton: !hasExternalSubmitGroup,\n saveButton: onSave && (\n \n ),\n isShowCancelButton: !hasExternalSubmitGroup,\n cancelButton: onCancel && (\n \n ),\n hasError: hasError || false,\n error: {\n AddressError: { className: 'msc-address-form__error' },\n title: addressActionResponse && addressActionResponse.errorTitle && (\n \n ),\n message: addressActionResponse && addressActionResponse.errorMessage && (\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 * as React from 'react';\n\nexport interface IAdressErrorMessage {\n message: string;\n}\n\n/**\n * Address error message.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressErrorMessageFunctionComponent: React.FC = (props: IAdressErrorMessage) => {\n const { message } = props;\n\n return

{message}

;\n};\n\nexport default AddressErrorMessageFunctionComponent;\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 IAdressInput {\n id?: string;\n name?: string;\n className: string;\n type: string;\n value: string;\n maxLength?: number;\n autoFocus?: boolean;\n additionalAddributes?: object;\n telemetryContent?: ITelemetryContent;\n onChange(event: React.ChangeEvent): void;\n}\n\n/**\n * Address input.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressInputFunctionComponent: React.FC = (props: IAdressInput) => {\n const {\n id: itemId,\n name,\n className,\n type,\n value,\n maxLength,\n additionalAddributes,\n autoFocus: shouldUseAutoFocus,\n telemetryContent,\n onChange\n } = props;\n\n const payLoad = getPayloadObject('click', telemetryContent!, name!);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default AddressInputFunctionComponent;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classname from 'classnames';\nimport * as React from 'react';\n\nexport interface IAddressDetailItem {\n isNewLine: boolean;\n isShowLabel: boolean;\n labelText: string;\n name: string;\n value: string;\n}\n\n/**\n * Address details item.\n * @param props - Configuration of the functional component.\n * @returns React functional component.\n */\nexport const AddressDetailItemFunctionComponent: React.FC = (props: IAddressDetailItem) => {\n const { isNewLine, isShowLabel, labelText, name, value } = props;\n\n const className = `msc-address-detail__item msc-address-detail__item-${name.toLowerCase()}`;\n const isEmpty = !(value && value.length > 0);\n const mainClass = isShowLabel\n ? `msc-address-detail__item msc-address-detail__item-address-detail_${labelText}`\n : classname(className, { 'msc-address-detail__item-empty': isEmpty, 'msc-address-detail__item-newline': isNewLine });\n return (\n \n {isShowLabel && (\n <>\n {labelText}\n \n \n )}\n {value}\n \n );\n};\n\nexport default AddressDetailItemFunctionComponent;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Address } from '@msdyn365-commerce/retail-proxy';\nimport { Heading } from '@msdyn365-commerce-modules/data-types';\n\nexport enum AddressOperation {\n Add = 'Add',\n Show = 'Show',\n Update = 'Update',\n List = 'List'\n}\n\nexport enum AddressType {\n Shipping = 'Shipping',\n Billing = 'Billing',\n Invoice = 'Invoice',\n Company = 'Company'\n}\n\nexport interface IDropdownDisplayData {\n [index: string]: { key?: string; value?: string }[];\n}\n\nexport interface IAddressResponse {\n errorTitle?: string;\n errorMessage?: string;\n customerAddresses?: Address[];\n address?: Address;\n}\n\nexport interface IAddressConfig {\n heading?: Heading;\n primaryAddressSectionHeading?: Heading;\n otherAddressSectionHeading?: Heading;\n addAddressHeading?: Heading;\n editAddressHeading?: Heading;\n}\n\nexport interface IAddressResource {\n addressChangeCheckboxAriaLabel: string;\n addressAddButtonText: string;\n addressAddButtonAriaLabel: string;\n addressPrimaryButtonText: string;\n addressPrimaryButtonAriaLabel: string;\n addressEditButtonText: string;\n addressEditButtonAriaLabel: string;\n addressRemoveButtonText: string;\n addressRemoveButtonAriaLabel: string;\n addressSaveButtonText: string;\n addressSaveButtonAriaLabel: string;\n addressCancelButtonText: string;\n addressCancelButtonAriaLabel: string;\n addressStateDefaultSelectionText: string;\n addressNameLabel: string;\n addressNameLabelOptional?: string;\n addressNameRequiredErrorMessage: string;\n addressPhoneLabel: string;\n addressPhoneLabelOptional?: string;\n addressPhoneRequiredErrorMessage: string;\n addressZipCodeLabel: string;\n addressZipCodeLabelOptional?: string;\n addressZipCodeRequiredErrorMessage: string;\n addressCityLabel: string;\n addressCityLabelOptional?: string;\n addressCityRequiredErrorMessage: string;\n addressCountyLabel: string;\n addressCountyLabelOptional?: string;\n addressCountyRequiredErrorMessage: string;\n addressStateLabel: string;\n addressStateLabelOptional?: string;\n addressStateRequiredErrorMessage: string;\n addressThreeLetterISORegionNameLabel: string;\n addressThreeLetterISORegionNameLabelOptional?: string;\n addressThreeLetterISORegionNameRequiredErrorMessage: string;\n addressStreetRequiredErrorMessage: string;\n addressDistrictLabel: string;\n addressDistrictLabelOptional?: string;\n addressDistrictNameLabel: string;\n addressDistrictNameLabelOptional?: string;\n addressDistrictRequiredErrorMessage: string;\n addressStreetNumberLabel: string;\n addressStreetNumberLabelOptional?: string;\n addressStreetNumberRequiredErrorMessage: string;\n addressBuildingComplimentLabel: string;\n addressBuildingComplimentLabelOptional?: string;\n addressBuildingComplimentRequiredErrorMessage: string;\n addressPostboxLabel: string;\n addressPostboxLabelOptional?: string;\n addressPostboxRequiredErrorMessage: string;\n addressHouseRULabel: string;\n addressHouseRULabelOptional?: string;\n addressHouseRURequiredErrorMessage: string;\n addressFlatRULabel: string;\n addressFlatRULabelOptional?: string;\n addressFlatRURequiredErrorMessage: string;\n addressCountryOKSMCodeRULabel: string;\n addressCountryOKSMCodeRURequiredErrorMessage: string;\n addressErrorMessageTitle: string;\n addressGenericErrorMessage: string;\n addressEmptyListAddressMessage: string;\n removeAddressNotification?: string;\n}\n"],"sourceRoot":""}