{"version":3,"sources":["webpack:///src/modules/account-address-tile/account-address-tile.view.tsx?0b73","webpack:///src/modules/account-profile/components/account-profile-description.tsx?6478","webpack:///src/modules/account-address-tile/account-address-tile.tsx?4565","webpack:///src/modules/account-loyalty-tile/components/account-loyalty-tile-links.tsx?0c40","webpack:///src/modules/account-loyalty-tile/account-loyalty-tile.tsx?b50e","webpack:///src/modules/account-order-templates-tile/account-order-templates-tile.view.tsx?90af","webpack:///src/modules/account-profile/components/account-profile-attributes.tsx?dd79","webpack:///src/modules/account-profile/components/account-profile-links.tsx?2955","webpack:///src/modules/account-profile/account-profile.tsx?8999","webpack:///src/modules/account-profile/account-profile.view.tsx?b442","webpack:///src/modules/account-address-tile/components/account-address-tile-description.tsx?88b9","webpack:///src/modules/account-order-templates-tile/components/account-order-templates-tile-description.tsx?7b53","webpack:///src/modules/account-order-templates-tile/components/account-order-templates-tile-links.tsx?5371","webpack:///src/modules/account-order-templates-tile/account-order-templates-tile.tsx?db71","webpack:///src/modules/account-loyalty-tile/account-loyalty-tile.view.tsx?c661","webpack:///src/modules/account-profile/components/account-profile-text.tsx?c06a","webpack:///src/modules/account-address-tile/components/account-address-tile-links.tsx?7e3f","webpack:///src/modules/account-loyalty-tile/components/account-loyalty-tile-description.tsx?a49e"],"names":["AccountAddressTileView","props","AccountAddressTile","heading","description","links","React","Module","Object","IAccountProfileDescription","className","constructor","super","handleHeadingChange","event","this","config","text","target","value","handleLinkTextChange","linkIndex","linkText","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","render","resources","data","accountAddressTileDescriptionForSingleAddress","accountAddressTileDescriptionForMultipleAddresses","address","customerInformation","result","addressCount","length","accountAddressTileDescription","format","viewProps","moduleProps","classnames","Msdyn365","tag","editProps","onEdit","requestContext","IsAsyncCustomer","LinksComponent","onTextChange","DescriptionComponent","renderView","_mapEditableLinks","linkdata","editableLinks","payLoad","getPayloadObject","forEach","link","index","contentAction","etext","attributes","getTelemetryAttributes","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","AccountLoyaltyTileLinks","AccountLoyaltyTile","signUpLinkText","viewLinkText","signUpLinkAriaLabel","viewLinkAriaLabel","accountLoyaltySummary","accountLoyaltyMemberSummary","loyaltyCard","url","actionContext","CardNumber","decimalPrecision","points","RewardPoints","rewardPoint","ActivePoints","toFixed","AccountOrderTemplatesTileView","AccountOrderTemplatesTile","AccountAttributeDataTypeValue","AccountProfileAttributes","isUpdatingAttributes","gotException","hasError","attributeClassName","maxIntegerLimit","minIntegerLimit","maxDecimalLimit","minDecimalLimit","maxStringLength","maxVATNumberLength","maxPhoneLength","_renderAttributes","accountProfileProps","attributeDefinitions","additionalInformationSectionHeading","elements","showAttributes","split","map","att","attributeDefinition","find","attribute","IsHidden","Name","toLocaleLowerCase","RecordId","_renderAttribute","edit","state","editAttributes","attributesEditButtonText","attributesSaveButtonText","saveAttributes","attributesCancelButtonText","cancelAttributes","ref","attributesContainerRef","Text","showPhone","_renderPhone","showVatNumber","_renderVatNumber","attributesSaveExceptionMessage","Button","onClick","_enableAttributes","innerRef","editRef","title","_saveAttributes","_disableAttributes","phoneSectionHeading","replace","type","onChange","_onPhoneChange","phone","disabled","_renderError","vatNumberSectionHeading","_onVatNumberChange","vatNumber","customAttribute","ExtDataType","Value","Integer","Decimal","_renderIntegerDecimalInput","_renderTextInputOrSelect","TrueFalse","_renderBoolean","attributeProps","_getAttributeProps","displayName","_onAttributeChange","IsMandatory","isEnumeration","IsEnumeration","EnumerationDetails","hasNoValue","id","_onAttributeSelect","key","selected","option","EnumerationValue","toggleState","arialabel","attributeToggleButtonAriaLabel","ariaPressed","toggleValue","TextComponent","toggleDisableText","_onAttributeCheck","toggleEnableText","attributeName","error","attributeError","StringExtensions","isNullOrWhitespace","attributePayloadData","name","isMandatory","setState","MsDyn365","isBrowser","setTimeout","current","getElementsByClassName","_setFocus","initialAttributes","initialPhone","initialVatNumber","currentTarget","selectedOptions","selectedIndex","_getAttributes","showAttributesArray","customer","custmerAttributes","Attributes","showAttribute","defaultValue","AttributeValue","DataTypeValue","IntegerValue","String","DecimalValue","StringValue","BooleanValue","keys","_addOrUpdateAttribute","hasValue","entries","payloadData","dataTypeValue","decimalValue","Number","isNaN","typeError","attributeInputTypeErrorText","undefined","lowerBoundValue","upperBoundValue","rangeError","attributeInputRangeErrorText","attributeInputValueExceedsMaximumErrorText","attributeInputValueExceedsMinimumErrorText","integerValue","includes","trimValue","trim","attributeInputStringMaxLengthErrorText","textValue","booleanValue","attributeInputMandatoryErrorText","findIndex","splice","Attribute","recordId","Units","ExtensionProperties","NameTranslations","KeyName","Phone","VATNumber","VatNumber","async","input","updateCustomerAttributesInput","AccountNumber","apiSettings","updateCustomerAttributes","initialCustomerAttributes","exception","debug","element","focus","_buildPayloadData","defaultIntegerValue","DefaultValue","LowerBound","UpperBound","defaultDecimalValue","defaultStringValue","defaultBooleanValue","_getCustomerPhoneAndVatNumber","componentDidMount","reaction","shouldComponentUpdate","nextProps","nextState","__decorate","observable","observer","AccountProfileLinks","AccountProfile","isUpdatingPreference","handleEmailHeadingChange","emailAddressSectionHeading","handleNameHeadingChange","nameSectionHeading","editButtonText","onClickEventHandler","_updateAccountPersonalization","_renderPreference","sectionHeading","enableAriaLabel","isOptOut","onClickHandler","accountPreference","buttonWrapper","buttonYesText","buttonNoText","button","toString","onUpdateAccountPreference","isOptOutPersonalization","preferenceType","OptOutWebActivityTracking","updateCustomerPersonalizationInput","OptOutPersonalization","updateCustomerPersonalization","_renderCustomerAttributes","editButtonAriaLabel","shouldRenderAttributes","editLink","get","accountProfileWrapper","emailSection","_renderEmailSection","Email","nameSection","_renderNameSection","FirstName","LastName","preferenceSection","_renderPreferenceSection","customerAttributesWrapper","customerAttributesSection","AccountProfileItem","personalizationDescription","personalizationEnableButtonAriaLabel","webTrackingDescription","webTrackingEnableButtonAriaLabel","preferencesSectionHeading","personalizationSectionHeading","webTrackingSectionHeading","enableDataAnalytics","features","extraPreferences","accountPreferences","personalization","computed","AccountPreferencesSection","Node","AccountPreferenceSection","preferenceSecton","AccountProfileSection","AccountProfileView","IAccountAddressTileDescription","AccountOrderTemplatesTileDescription","AccountOrderTemplatesTileLinks","RetailB2BEcommerceFeatureState","featureState","params","isEditor","IsEnabled","IsB2b","accountOrderTemplatesTileDescription","orderTemplates","orderTemplatesCount","AccountLoyaltyTileView","IAccountProfileText","AccountAddressTileLinks","IAccountLoyaltyTileDescription"],"mappings":"oJAsBeA,UAZwDC,IACnE,MAAM,mBAAEC,EAAF,QAAsBC,EAAtB,YAA+BC,EAA/B,MAA4CC,GAAUJ,EAE5D,OACIK,gBAACC,SAAMC,iBAAKN,GACPC,EACAC,EACAC,K,4DCCEI,IAN0D,QAAC,UAAEC,EAAF,YAAaN,GAAd,SACrEE,qBAAGI,UAAWA,GACTN,K,yuBCcT,MAAMF,UAA2BI,gBAI7BK,YAAYV,GACRW,MAAMX,GAqCH,KAAAY,oBAAuBC,GAAyCC,KAAKd,MAAMe,OAAOb,QAAQc,KAAOH,EAAMI,OAAOC,MAE9G,KAAAC,qBAAwBC,GAAuBP,IAC9CC,KAAKd,MAAMe,OAAOX,OAASU,KAAKd,MAAMe,OAAOX,MAAMgB,KACnDN,KAAKd,MAAMe,OAAOX,MAAMgB,GAAWC,SAAWR,EAAMI,OAAOC,QAxC/DJ,KAAKQ,iBAAmBC,6BAAmBT,KAAKd,MAAMwB,QAAQC,QAAQC,kBAAoBZ,KAAKd,MAAM2B,aAAcb,KAAKd,MAAM4B,WAG3HC,SACH,MAAM,OAAEd,EAAF,UAAUe,EAAV,KAAqBC,GAASjB,KAAKd,OACnC,UAAES,EAAF,QAAaP,EAAb,MAAsBE,GAAUW,GAChC,8CAAEiB,EAAF,kDAAiDC,GAAsDH,GACvG,QAAEI,GAAYH,EACdI,EAAsBJ,EAAKI,oBAAoBC,OAC/CC,EAAgBH,GAAWA,EAAQE,QAAUF,EAAQE,OAAOE,QAAW,EACvEC,EAAiD,IAAjBF,EAAqBL,EAAgDC,EAC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AAQK,cAAcC,MAAQH,EAAKvC,SACnC,MAAM2C,EAAaC,iCAAuB3C,EAAmBmC,GACvDS,EAAoC,CACtCC,UAAWP,EAAKO,UAChB1D,UAAW,gCACXY,SAAUuC,EAAKvC,SACf+C,QAASR,EAAKQ,QAAQC,eACtBC,aAAcV,EAAKU,aACnBC,KAAM,OACNC,qBAAsBR,GAE1BR,EAAciB,KAAKP,KAGhBV,GAGI2T,IAxCqD,IAA8D,IAA7D,MAAE/W,EAAF,iBAASkB,EAAT,eAA2B0B,EAA3B,aAA2CG,GAAkB,EAC9H,GAAqB,IAAjB/C,EAAMkC,OACN,OAAO,KAEX,MAAMkB,EAAgBF,EAAkBlD,EAAOkB,GAE/C,OACIjB,uBAAKI,UAAU,kCACT+C,GAAiBA,EAAclB,OAAS,EAAIjC,gBAACuC,IAAc,CACzDxC,MAAOoD,EACPV,UAAW,CAAEK,eAAcH,oBAC1B,Q,4DChBFoU,IANkE,QAAC,YAAEjX,GAAH,SAC7EE,qBAAGI,UAAU,wCACRN","file":"static/js/5.b4c3264af7d246b6cb31.chunk.js","sourcesContent":["/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountAddressTileViewProps } from './account-address-tile';\n\nconst AccountAddressTileView: React.FC = props => {\n const { AccountAddressTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountAddressTileView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\ninterface IAccountProfileDescription {\n className: string;\n description: string;\n}\n\nconst IAccountProfileDescription: React.FC = ({ className, description }) => (\n

\n {description}\n

\n);\n\nexport default IAccountProfileDescription;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountAddressTileData } from './account-address-tile.data';\nimport { IAccountAddressTileProps } from './account-address-tile.props.autogenerated';\nimport DescriptionComponent from './components/account-address-tile-description';\nimport LinksComponent from './components/account-address-tile-links';\n\nexport interface IAccountAddressTileViewProps extends IAccountAddressTileProps {\n AccountAddressTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountAddress component.\n * @extends {React.PureComponent>}\n */\nclass AccountAddressTile extends React.PureComponent> {\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountAddressTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const { config, resources, data } = this.props;\n const { className, heading, links } = config;\n const { accountAddressTileDescriptionForSingleAddress, accountAddressTileDescriptionForMultipleAddresses } = resources;\n const { address } = data;\n const customerInformation = data.customerInformation.result;\n const addressCount = (address && address.result && address.result.length) || 0;\n const accountAddressTileDescription = addressCount === 1 ? accountAddressTileDescriptionForSingleAddress : accountAddressTileDescriptionForMultipleAddresses;\n const description = format(accountAddressTileDescription, addressCount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountAddressTile: {\n moduleProps: this.props,\n className: classnames('ms-account-address-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && customerInformation?.IsAsyncCustomer !== true &&\n ,\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading.text = event.target.value;\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountAddressTile;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ILinkData } from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILinksData {\n linkText?: string;\n linkUrl: ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountLoyaltyTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountLoyaltyTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n { editableLinks && editableLinks.length > 0 ? : null}\n
\n );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-loyalty-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountLoyaltyTileLinks;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountLoyaltyTileData } from './account-loyalty-tile.data';\nimport { IAccountLoyaltyTileProps } from './account-loyalty-tile.props.autogenerated';\nimport DescriptionComponent from './components/account-loyalty-tile-description';\nimport LinksComponent from './components/account-loyalty-tile-links';\n\nexport interface IAccountLoyaltyTileViewProps extends IAccountLoyaltyTileProps {\n AccountLoyaltyTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountLoyalty component.\n * @extends {React.PureComponent>}\n */\nclass AccountLoyaltyTile extends React.PureComponent> {\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountLoyaltyTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const { config, data, resources, context } = this.props;\n const { className, heading, signUpLinkText, signUpLinkAriaLabel, viewLinkText, viewLinkAriaLabel } = config;\n const { accountLoyaltySummary, accountLoyaltyMemberSummary } = resources;\n const { loyaltyCard } = data;\n\n let description = accountLoyaltySummary;\n let url = Msdyn365.getUrlSync('loyaltyJoin', context.actionContext) || '';\n const link = { linkText: signUpLinkText, linkUrl: { destinationUrl: url }, ariaLabel: signUpLinkAriaLabel };\n\n if (loyaltyCard && loyaltyCard.result && loyaltyCard.result.CardNumber) {\n const decimalPrecision = 2;\n let points = 0;\n\n if (loyaltyCard.result.RewardPoints && loyaltyCard.result.RewardPoints.length > 0) {\n loyaltyCard.result.RewardPoints.forEach((rewardPoint: LoyaltyRewardPoint) => {\n points += rewardPoint.ActivePoints!;\n });\n }\n link.ariaLabel = viewLinkAriaLabel;\n link.linkText = viewLinkText;\n url = Msdyn365.getUrlSync('loyalty', context.actionContext) || '';\n link.linkUrl.destinationUrl = url;\n description = format(accountLoyaltyMemberSummary, points.toFixed(decimalPrecision));\n }\n\n const viewProps = {\n ...this.props,\n className,\n AccountLoyaltyTile: {\n moduleProps: this.props,\n className: classnames('ms-account-loyalty-tile', config.className)\n },\n heading: heading && (\n \n ),\n links: ,\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading.text = event.target.value;\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.signUpLinkText && this.props.config.viewLinkText) {\n this.props.config.viewLinkText = event.target.value;\n }\n };\n\n}\n\nexport default AccountLoyaltyTile;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountOrderTemplatesTileViewProps } from './account-order-templates-tile';\n\nconst AccountOrderTemplatesTileView: React.FC = props => {\n const { AccountOrderTemplatesTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountOrderTemplatesTileView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport MsDyn365, { IDictionary, Text } from '@msdyn365-commerce/core';\nimport { AttributeDefinition, Customer, CustomerAttribute } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { StringExtensions, updateCustomerAttributes, updateCustomerAttributesInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, format, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable, reaction } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IAccountProfileData } from '../account-profile.data';\nimport { IAccountProfileProps } from '../account-profile.props.autogenerated';\nimport TextComponent from './account-profile-text';\n\ninterface IAttributePropertiesType {\n Name?: string;\n IsMandatory?: boolean;\n}\n\nexport interface IAccountProfileAttributesProps {\n accountProfileProps: IAccountProfileProps;\n}\n\nexport enum AccountAttributeDataTypeValue {\n Decimal = 3,\n Integer = 4,\n Text = 5,\n TrueFalse = 6\n}\n\nexport interface IAttributePayloadData {\n recordId?: number;\n name?: string;\n dataTypeValue?: number;\n isEnumeration?: boolean;\n lowerBoundValue?: number;\n upperBoundValue?: number;\n decimalValue?: number;\n integerValue?: number;\n textValue?: string;\n booleanValue?: boolean;\n isMandatory?: boolean;\n defaultValue?: string;\n}\n\nexport interface IAccountProfileAttributesState extends React.ComponentState {\n editAttributes: boolean;\n phone: string;\n vatNumber: string;\n attributes: IDictionary;\n attributeError: IDictionary;\n}\n\n/**\n *\n * AccountProfileAttributes class.\n * @extends {React.PureComponentIAccountProfileAttributesProps, IAccountProfileAttributesState>}\n */\n@observer\nclass AccountProfileAttributes extends React.Component {\n private readonly attributePayloadData: IAttributePayloadData[];\n\n @observable private isUpdatingAttributes: boolean = false;\n\n @observable private gotException: boolean = false;\n\n private hasError: boolean = false;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private initialAttributes: IDictionary;\n\n private initialCustomerAttributes?: CustomerAttribute[];\n\n private initialPhone: string;\n\n private initialVatNumber: string;\n\n private readonly payLoad: IPayLoad;\n\n private readonly editRef: React.RefObject;\n\n private readonly attributesContainerRef: React.RefObject;\n\n private readonly attributeClassName: string = 'ms-account-profile__attributes-element';\n\n private readonly maxIntegerLimit: number = 2_100_000_000;\n\n private readonly minIntegerLimit: number = -2_100_000_000;\n\n private readonly maxDecimalLimit: number = 7_900_000_000_000;\n\n private readonly minDecimalLimit: number = -7_900_000_000_000;\n\n private readonly maxStringLength: number = 1000;\n\n private readonly maxVATNumberLength: number = 20;\n\n private readonly maxPhoneLength: number = 25;\n\n constructor(props: IAccountProfileAttributesProps) {\n super(props);\n this.state = {\n editAttributes: false,\n phone: '',\n vatNumber: '',\n attributes: {},\n attributeError: {}\n };\n this.initialAttributes = {};\n this.initialCustomerAttributes = [];\n this.initialPhone = '';\n this.initialVatNumber = '';\n this.attributePayloadData = [];\n const telemetryPageName = this.props.accountProfileProps && this.props.accountProfileProps.context && this.props.accountProfileProps.context.request && this.props.accountProfileProps.context.request.telemetryPageName || '';\n const friendlyName = this.props.accountProfileProps && this.props.accountProfileProps.friendlyName || '';\n const telemetry = this.props.accountProfileProps && this.props.accountProfileProps.telemetry || {};\n this.telemetryContent = getTelemetryObject(telemetryPageName, friendlyName, telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n this.editRef = React.createRef();\n this.attributesContainerRef = React.createRef();\n }\n\n public componentDidMount(): void {\n this._buildPayloadData();\n this._getAttributes();\n this._getCustomerPhoneAndVatNumber();\n reaction(\n () => this.props.accountProfileProps.data.customerInformation.result,\n () => {\n const customerInformation = this.props.accountProfileProps.data.customerInformation.result;\n this.initialCustomerAttributes = customerInformation && customerInformation.Attributes;\n this._getAttributes();\n this._getCustomerPhoneAndVatNumber();\n }\n );\n reaction(\n () => this.props.accountProfileProps.data.attributeDefinitions.result,\n () => {\n this._buildPayloadData();\n }\n );\n }\n\n public shouldComponentUpdate(nextProps: IAccountProfileAttributesProps,\n nextState: IAccountProfileAttributesState): boolean {\n if (this.state === nextState && this.props.accountProfileProps.data === nextProps.accountProfileProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element | null {\n return this._renderAttributes();\n }\n\n private readonly _renderAttributes = (): JSX.Element | null => {\n const { config, data, resources } = this.props.accountProfileProps;\n const attributeDefinitions: AttributeDefinition[] = data.attributeDefinitions.result || [];\n const additionalInformationSectionHeading = config.additionalInformationSectionHeading && config.additionalInformationSectionHeading.text || '';\n const showAttributes = config.showAttributes || '';\n const attributes = showAttributes.split(',');\n const elements = attributes.map(att => {\n const attributeDefinition: AttributeDefinition = attributeDefinitions.find(attribute => attribute.IsHidden === false && attribute.Name!.toLocaleLowerCase() === att.toLocaleLowerCase()\n ) || { RecordId: 0 };\n return this._renderAttribute(attributeDefinition);\n });\n const edit = this.state && this.state.editAttributes || false;\n this.payLoad.contentAction.etext = `${resources.attributesEditButtonText} ${additionalInformationSectionHeading}`;\n const editAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = `${resources.attributesSaveButtonText} ${additionalInformationSectionHeading}`;\n const saveAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n this.payLoad.contentAction.etext = `${resources.attributesCancelButtonText} ${additionalInformationSectionHeading}`;\n const cancelAttributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n return (\n
\n {config.additionalInformationSectionHeading && (\n \n )}\n {config.showPhone && (\n this._renderPhone()\n )}\n {config.showVatNumber && (\n this._renderVatNumber()\n )}\n {elements}\n {this.gotException && (\n
\n \n
\n )}\n {!edit && (\n \n {resources.attributesEditButtonText}\n \n )}\n {edit && (\n \n {resources.attributesSaveButtonText}\n \n )}\n {edit && (\n \n {resources.attributesCancelButtonText}\n \n )}\n
\n );\n };\n\n private readonly _renderPhone = (): JSX.Element | null => {\n const { phoneSectionHeading } = this.props.accountProfileProps.config;\n const heading = phoneSectionHeading && phoneSectionHeading.text || '';\n const className = heading && heading.replace(/ /g, '_') || '';\n const editAttributes = this.state && this.state.editAttributes || false;\n return (\n
\n {phoneSectionHeading && ()}\n \n {this._renderError('Phone')}\n
\n );\n };\n\n private readonly _renderVatNumber = (): JSX.Element | null => {\n const { vatNumberSectionHeading } = this.props.accountProfileProps.config;\n const heading = vatNumberSectionHeading && vatNumberSectionHeading.text || '';\n const className = heading && heading.replace(/ /g, '_') || '';\n const editAttributes = this.state && this.state.editAttributes || false;\n return (\n
\n {vatNumberSectionHeading && ()}\n \n {this._renderError('VATNumber')}\n
\n );\n };\n\n private readonly _renderAttribute = (customAttribute: AttributeDefinition): JSX.Element | null => {\n const editAttributes = this.state && this.state.editAttributes || false;\n const className = customAttribute.Name && customAttribute.Name.replace(/ /g, '_') || '';\n switch (customAttribute.ExtDataType && customAttribute.ExtDataType.Value) {\n case AccountAttributeDataTypeValue.Integer:\n case AccountAttributeDataTypeValue.Decimal:\n return this._renderIntegerDecimalInput(customAttribute, className, editAttributes);\n case AccountAttributeDataTypeValue.Text:\n return this._renderTextInputOrSelect(customAttribute, className, editAttributes);\n case AccountAttributeDataTypeValue.TrueFalse:\n return this._renderBoolean(customAttribute, className, editAttributes);\n default:\n return null;\n }\n };\n\n private readonly _renderIntegerDecimalInput = (customAttribute: AttributeDefinition, className: string, editAttributes: boolean): JSX.Element | null => {\n const edit = this.state && this.state.editAttributes || false;\n const attributeProps = this._getAttributeProps(customAttribute.Name || '');\n const displayName: string = attributeProps.Name || '';\n return (\n
\n \n \n {this._renderError(customAttribute.Name || '')}\n
\n );\n };\n\n private readonly _renderTextInputOrSelect = (customAttribute: AttributeDefinition, className: string, editAttributes: boolean): JSX.Element | null => {\n const isEnumeration: boolean = customAttribute.IsEnumeration || false;\n const edit = this.state && this.state.editAttributes || false;\n const attributeProps = this._getAttributeProps(customAttribute.Name || '');\n const displayName: string = attributeProps.Name || '';\n if (isEnumeration && customAttribute.EnumerationDetails) {\n const value = this.state.attributes[customAttribute.Name || ''] || '';\n const hasNoValue = value === '';\n return (\n
\n \n \n {hasNoValue && ()}\n {customAttribute.EnumerationDetails.map((option) => {\n const selected = option.EnumerationValue === this.state.attributes[customAttribute.Name || ''];\n return (\n {option.EnumerationValue}\n );\n })}\n \n
\n );\n }\n return (\n
\n \n \n {this._renderError(customAttribute.Name || '')}\n
\n );\n\n };\n\n private readonly _renderBoolean = (customAttribute: AttributeDefinition, className: string, editAttributes: boolean): JSX.Element | null => {\n let value = this.state.attributes[customAttribute.Name || ''] || '';\n const hasNoValue = value === '';\n const render = !((hasNoValue && !editAttributes));\n value = value || 'false';\n const toggleState = value === 'true' && 'enable' || 'disable';\n const arialabel = format(this.props.accountProfileProps.resources.attributeToggleButtonAriaLabel, customAttribute.Name);\n const ariaPressed = value === 'true' && true || false;\n const attributeProps = this._getAttributeProps(customAttribute.Name || '');\n const displayName: string = attributeProps.Name || '';\n let toggleValue = 'false';\n if (value === 'true') {\n toggleValue = 'false';\n } else {\n toggleValue = 'true';\n }\n\n return (\n
\n \n {render && (\n
\n\n \n \n \n
\n )}\n
\n );\n };\n\n private readonly _renderError = (attributeName: string): JSX.Element | null => {\n const error: string = this.state && this.state.attributeError && this.state.attributeError[attributeName] || '';\n const hasError = !StringExtensions.isNullOrWhitespace(error);\n if (hasError) {\n return (\n
\n \n
\n );\n }\n return null;\n };\n\n private readonly _getAttributeProps = (attributeName: string): IAttributePropertiesType => {\n const attributePayloadData = this.attributePayloadData.find((att) => att.name === attributeName);\n const isMandatory: boolean = attributePayloadData && attributePayloadData.isMandatory || false;\n return {\n Name: isMandatory ? `${attributeName || ''} *` : attributeName || '',\n IsMandatory: isMandatory\n };\n };\n\n private readonly _onPhoneChange = (event: React.ChangeEvent): void => {\n const value = event.target.value;\n this.setState({ phone: value });\n };\n\n private readonly _onVatNumberChange = (event: React.ChangeEvent): void => {\n const value = event.target.value;\n this.setState({ vatNumber: value });\n };\n\n private readonly _enableAttributes = () => {\n this.hasError = false;\n\n // To clear exception messages\n this.gotException = false;\n this.setState({ editAttributes: true, attributeError: {} });\n if (MsDyn365.isBrowser) {\n setTimeout(() => {\n if (this.attributesContainerRef.current) {\n const attributes: HTMLCollectionOf = this.attributesContainerRef.current.getElementsByClassName(this.attributeClassName);\n if (attributes && attributes.length > 0) {\n this._setFocus(attributes[0] as HTMLElement);\n }\n }\n }, 0);\n }\n };\n\n private readonly _disableAttributes = () => {\n this.setState({ editAttributes: false, attributeError: {}, attributes: this.initialAttributes, phone: this.initialPhone, vatNumber: this.initialVatNumber });\n if (MsDyn365.isBrowser) {\n setTimeout(() => {\n this._setFocus(this.editRef.current);\n }, 0);\n }\n };\n\n private readonly _onAttributeChange = (attributeDefinition: AttributeDefinition) => (event: React.ChangeEvent) => {\n const value = event.target.value;\n const name = attributeDefinition.Name || '';\n this.setState({\n attributes: {\n ...this.state.attributes,\n [name]: value\n }\n });\n };\n\n private readonly _onAttributeCheck = (attributeDefinition: AttributeDefinition, value: string) => (event: React.MouseEvent) => {\n const name = attributeDefinition.Name || '';\n this.setState({\n attributes: {\n ...this.state.attributes,\n [name]: value\n }\n });\n };\n\n private readonly _onAttributeSelect = (attributeDefinition: AttributeDefinition) => (event: React.ChangeEvent) => {\n const value = event.currentTarget.selectedOptions[0].value;\n const index = event.currentTarget.selectedOptions[0].index;\n const name = attributeDefinition.Name || '';\n this.setState({\n attributes: {\n ...this.state.attributes,\n [name]: value\n },\n selectedIndex: {\n ...this.state.selectedIndex,\n [name]: index\n }\n });\n };\n\n private readonly _getAttributes = () => {\n const { config, data } = this.props.accountProfileProps;\n const showAttributes = config.showAttributes || '';\n const showAttributesArray = showAttributes.split(',');\n const customer = data.customerInformation.result;\n const custmerAttributes: CustomerAttribute[] = customer && customer.Attributes || [];\n const attributes: IDictionary = {};\n\n showAttributesArray.forEach(showAttribute => {\n const attributePayloadData = this.attributePayloadData.find((att) => att.name === showAttribute);\n const isMandatory: boolean = attributePayloadData && attributePayloadData.isMandatory || false;\n const defaultValue = attributePayloadData && attributePayloadData.defaultValue;\n const attribute = custmerAttributes.find((att) => att.Name === showAttribute);\n let value: string = '';\n if (attribute && attribute.AttributeValue) {\n const name = attribute && attribute.Name || '';\n switch (attribute.DataTypeValue) {\n case AccountAttributeDataTypeValue.Integer:\n if (attribute.AttributeValue.IntegerValue) {\n value = String(attribute.AttributeValue.IntegerValue);\n attributes[name] = value;\n }\n break;\n case AccountAttributeDataTypeValue.Decimal:\n if (attribute.AttributeValue.DecimalValue) {\n value = String(attribute.AttributeValue.DecimalValue);\n attributes[name] = value;\n }\n break;\n case AccountAttributeDataTypeValue.Text:\n if (attribute.AttributeValue.StringValue) {\n value = attribute.AttributeValue.StringValue;\n attributes[name] = value;\n }\n break;\n case AccountAttributeDataTypeValue.TrueFalse:\n if (attribute.AttributeValue.BooleanValue !== null) {\n value = String(attribute.AttributeValue.BooleanValue);\n attributes[name] = value;\n }\n break;\n default:\n\n // Do nothing\n }\n }\n if (StringExtensions.isNullOrWhitespace(value) && isMandatory) {\n attributes[showAttribute] = '';\n }\n if (value.length === 0 && defaultValue) {\n attributes[showAttribute] = String(defaultValue);\n }\n });\n if (Object.keys(this.initialAttributes).length === 0) {\n this.initialAttributes = attributes;\n }\n this.setState({ attributes });\n };\n\n private readonly _addOrUpdateAttribute = (customer: Customer) => {\n const { resources } = this.props.accountProfileProps;\n const { phone, vatNumber } = this.state;\n const attributeError: IDictionary = {};\n let hasError: boolean = false;\n let hasValue: boolean = true;\n for (const [key, value] of Object.entries(this.state.attributes)) {\n const payloadData: IAttributePayloadData = this.attributePayloadData.find(data => data.name === key) || {};\n if (payloadData) {\n switch (payloadData.dataTypeValue) {\n case AccountAttributeDataTypeValue.Decimal:\n const decimalValue = Number(value);\n if (isNaN(decimalValue)) {\n const typeError = format(resources.attributeInputTypeErrorText, payloadData.name, 'Decimal');\n attributeError[payloadData.name || ''] = typeError;\n hasError = true;\n } else if (payloadData.lowerBoundValue !== undefined && payloadData.upperBoundValue !== undefined) {\n if (decimalValue < payloadData.lowerBoundValue || decimalValue > payloadData.upperBoundValue) {\n const rangeError = format(resources.attributeInputRangeErrorText, payloadData.name, payloadData.lowerBoundValue, payloadData.upperBoundValue);\n attributeError[payloadData.name || ''] = rangeError;\n hasError = true;\n }\n } else {\n if (decimalValue > this.maxDecimalLimit) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputValueExceedsMaximumErrorText, payloadData.name, this.maxDecimalLimit);\n hasError = true;\n }\n\n if (decimalValue < this.minDecimalLimit) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputValueExceedsMinimumErrorText, payloadData.name, this.minDecimalLimit);\n hasError = true;\n }\n }\n\n if (!hasError) {\n if (StringExtensions.isNullOrWhitespace(value)) {\n hasValue = false;\n } else {\n payloadData.decimalValue = decimalValue;\n hasValue = true;\n }\n }\n break;\n case AccountAttributeDataTypeValue.Integer:\n const integerValue = Number(value);\n if (isNaN(integerValue) || value.includes('.')) {\n const typeError = format(resources.attributeInputTypeErrorText, payloadData.name, 'Integer');\n attributeError[payloadData.name || ''] = typeError;\n hasError = true;\n } else if (payloadData.lowerBoundValue !== undefined && payloadData.upperBoundValue !== undefined) {\n if (integerValue < payloadData.lowerBoundValue || integerValue > payloadData.upperBoundValue) {\n const rangeError = format(resources.attributeInputRangeErrorText, payloadData.name, payloadData.lowerBoundValue, payloadData.upperBoundValue);\n attributeError[payloadData.name || ''] = rangeError;\n hasError = true;\n }\n } else {\n if (integerValue > this.maxIntegerLimit) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputValueExceedsMaximumErrorText, payloadData.name, this.maxIntegerLimit);\n hasError = true;\n }\n\n if (integerValue < this.minIntegerLimit) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputValueExceedsMinimumErrorText, payloadData.name, this.minIntegerLimit);\n hasError = true;\n }\n }\n\n if (!hasError) {\n if (StringExtensions.isNullOrWhitespace(value)) {\n hasValue = false;\n } else {\n payloadData.integerValue = integerValue;\n hasValue = true;\n }\n }\n break;\n case AccountAttributeDataTypeValue.Text:\n let trimValue = '';\n if (!StringExtensions.isNullOrWhitespace(value)) {\n trimValue = value.trim();\n }\n if (trimValue.length > this.maxStringLength) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputStringMaxLengthErrorText, payloadData.name, this.maxStringLength);\n hasError = true;\n }\n if (!hasError) {\n payloadData.textValue = trimValue;\n }\n break;\n case AccountAttributeDataTypeValue.TrueFalse:\n payloadData.booleanValue = value === 'true';\n break;\n default:\n\n // Do nothing\n }\n\n if (payloadData.isMandatory && StringExtensions.isNullOrWhitespace(value)) {\n attributeError[payloadData.name || ''] = format(resources.attributeInputMandatoryErrorText, payloadData.name);\n hasError = true;\n }\n\n const custmerAttributes: CustomerAttribute[] = customer && customer.Attributes || [];\n const attribute = custmerAttributes.find((att) => att.Name === key);\n const index = custmerAttributes.findIndex((att) => att.Name === key);\n\n if (index !== -1 && !hasValue) {\n custmerAttributes.splice(index, 1);\n }\n\n if (!hasError && hasValue) {\n if (attribute) {\n attribute.Attribute = undefined;\n attribute.DataTypeValue = payloadData.dataTypeValue;\n attribute.Name = payloadData.name;\n attribute.RecordId = payloadData.recordId;\n attribute.Units = undefined;\n attribute.AttributeValue = {\n IntegerValue: payloadData.integerValue,\n BooleanValue: payloadData.booleanValue,\n StringValue: payloadData.textValue,\n DecimalValue: payloadData.decimalValue\n };\n attribute.ExtensionProperties = [];\n attribute.NameTranslations = [];\n } else {\n custmerAttributes.push({\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CustomerAttribute',\n Attribute: undefined,\n DataTypeValue: payloadData.dataTypeValue,\n KeyName: payloadData.name,\n Name: payloadData.name,\n RecordId: payloadData.recordId,\n Units: undefined,\n AttributeValue: {\n // @ts-expect-error\n '@odata.type': '#Microsoft.Dynamics.Commerce.Runtime.DataModel.CommercePropertyValue',\n IntegerValue: payloadData.integerValue,\n BooleanValue: payloadData.booleanValue,\n StringValue: payloadData.textValue,\n DecimalValue: payloadData.decimalValue\n },\n 'ExtensionProperties@odata.type': '#Collection(Microsoft.Dynamics.Commerce.Runtime.DataModel.CommerceProperty)',\n ExtensionProperties: [],\n 'NameTranslations@odata.type': '#Collection(Microsoft.Dynamics.Commerce.Runtime.DataModel.TextValueTranslation)',\n NameTranslations: []\n });\n }\n }\n }\n }\n\n if (phone.trim().length > this.maxPhoneLength) {\n attributeError.Phone = format(resources.attributeInputStringMaxLengthErrorText, 'Phone', this.maxPhoneLength);\n hasError = true;\n } else {\n customer.Phone = phone.trim();\n }\n\n if (vatNumber.trim().length > this.maxVATNumberLength) {\n attributeError.VATNumber = format(resources.attributeInputStringMaxLengthErrorText, 'VAT Number', this.maxVATNumberLength);\n hasError = true;\n } else {\n customer.VatNumber = vatNumber.trim();\n }\n\n this.hasError = hasError;\n this.setState({ attributeError });\n\n };\n\n private readonly _saveAttributes = async () => {\n const { context, data } = this.props.accountProfileProps;\n const customer = data.customerInformation.result;\n\n if (customer && context) {\n this._addOrUpdateAttribute(customer);\n const input = new updateCustomerAttributesInput(customer.AccountNumber, customer.Attributes || [], context.request.apiSettings, customer.Phone, customer.VatNumber);\n\n this.isUpdatingAttributes = true;\n this.gotException = false;\n\n if (!this.hasError) {\n this.setState({ editAttributes: false });\n try {\n await updateCustomerAttributes(input, context.actionContext);\n } catch (error) {\n this.gotException = true;\n customer.Attributes = this.initialCustomerAttributes;\n if (context.telemetry) {\n context.telemetry.exception(error);\n context.telemetry.debug('Unable to update customer attributes');\n }\n this.setState({ attributeError: {}, attributes: this.initialAttributes, phone: this.initialPhone, vatNumber: this.initialVatNumber });\n }\n this.setState({ editAttributes: false });\n if (!this.gotException) {\n this.initialAttributes = this.state.attributes;\n this.initialCustomerAttributes = customer.Attributes;\n this.initialPhone = this.state.phone;\n this.initialVatNumber = this.state.vatNumber;\n }\n }\n\n this.isUpdatingAttributes = false;\n\n if (MsDyn365.isBrowser) {\n setTimeout(() => {\n this._setFocus(this.editRef.current);\n }, 0);\n }\n }\n };\n\n private readonly _setFocus = (element: HTMLElement | null) => {\n element?.focus();\n };\n\n private readonly _buildPayloadData = () => {\n const { data } = this.props.accountProfileProps;\n const attributeDefinitions = data.attributeDefinitions.result || [];\n const attributes: IDictionary = {};\n\n attributeDefinitions.forEach(attributeDefinition => {\n const attributePayloadData: IAttributePayloadData = {};\n attributePayloadData.recordId = attributeDefinition.RecordId;\n attributePayloadData.name = attributeDefinition.Name;\n attributePayloadData.dataTypeValue = attributeDefinition.DataTypeValue;\n attributePayloadData.isEnumeration = attributeDefinition.IsEnumeration;\n attributePayloadData.isMandatory = attributeDefinition.IsMandatory;\n switch (attributeDefinition.DataTypeValue) {\n case AccountAttributeDataTypeValue.Integer:\n const defaultIntegerValue = attributeDefinition.DefaultValue && attributeDefinition.DefaultValue.IntegerValue;\n attributePayloadData.lowerBoundValue = attributeDefinition.LowerBound && attributeDefinition.LowerBound.IntegerValue;\n attributePayloadData.upperBoundValue = attributeDefinition.UpperBound && attributeDefinition.UpperBound.IntegerValue;\n if (attributePayloadData.name && defaultIntegerValue) {\n attributePayloadData.defaultValue = String(defaultIntegerValue);\n attributes[attributePayloadData.name] = String(defaultIntegerValue);\n }\n break;\n case AccountAttributeDataTypeValue.Decimal:\n const defaultDecimalValue = attributeDefinition.DefaultValue && attributeDefinition.DefaultValue.DecimalValue;\n attributePayloadData.lowerBoundValue = attributeDefinition.LowerBound && attributeDefinition.LowerBound.DecimalValue;\n attributePayloadData.upperBoundValue = attributeDefinition.UpperBound && attributeDefinition.UpperBound.DecimalValue;\n if (attributePayloadData.name && defaultDecimalValue) {\n attributePayloadData.defaultValue = String(defaultDecimalValue);\n attributes[attributePayloadData.name] = String(defaultDecimalValue);\n }\n break;\n case AccountAttributeDataTypeValue.Text:\n const defaultStringValue = attributeDefinition.DefaultValue && attributeDefinition.DefaultValue.StringValue;\n if (attributePayloadData.name && defaultStringValue) {\n attributePayloadData.defaultValue = defaultStringValue;\n attributes[attributePayloadData.name] = defaultStringValue;\n }\n break;\n case AccountAttributeDataTypeValue.TrueFalse:\n const defaultBooleanValue = attributeDefinition.DefaultValue && attributeDefinition.DefaultValue.BooleanValue || false;\n if (attributePayloadData.name) {\n attributePayloadData.defaultValue = String(defaultBooleanValue);\n attributes[attributePayloadData.name] = String(defaultBooleanValue);\n }\n break;\n default:\n\n // Do nothing\n }\n this.attributePayloadData.push(attributePayloadData);\n });\n Object.keys(attributes).length > 0 && this.setState({ attributes });\n };\n\n private readonly _getCustomerPhoneAndVatNumber = () => {\n const customer = this.props.accountProfileProps.data.customerInformation.result;\n const phone = customer && customer.Phone || '';\n const vatNumber = customer && customer.VatNumber || '';\n this.setState({ phone, vatNumber });\n if (this.initialPhone.length === 0) {\n this.initialPhone = phone;\n }\n if (this.initialVatNumber.length === 0) {\n this.initialVatNumber = vatNumber;\n }\n };\n}\n\nexport default AccountProfileAttributes;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ILinkData } from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILinksData {\n linkText?: string;\n linkUrl: ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountProfileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountProfileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n { editableLinks && editableLinks.length > 0 ? : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-profile__section-link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountProfileLinks;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { Customer } from '@msdyn365-commerce/retail-proxy/dist/Entities/CommerceTypes.g';\nimport { updateCustomerPersonalization, updateCustomerPersonalizationInput } from '@msdyn365-commerce-modules/retail-actions';\nimport { Button, getPayloadObject, getTelemetryAttributes, getTelemetryObject, IModuleProps, INodeProps, IPayLoad, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport get from 'lodash/get';\nimport { computed, observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport { IAccountProfileData } from './account-profile.data';\nimport { IAccountProfileProps, IEmailAddressSectionHeadingData, IHeadingData, INameSectionHeadingData } from './account-profile.props.autogenerated';\nimport AccountProfileAttributes from './components/account-profile-attributes';\nimport DescriptionComponent from './components/account-profile-description';\nimport LinksComponent, { ILinksData } from './components/account-profile-links';\nimport TextComponent from './components/account-profile-text';\n\nexport interface IAccountPreference {\n accountPreference: INodeProps;\n heading: React.ReactNode;\n buttonWrapper: INodeProps;\n buttonYesText: React.ReactNode;\n buttonNoText: React.ReactNode;\n button: React.ReactNode;\n description: React.ReactNode;\n onUpdateAccountPreference(preferenceType?: string): void;\n}\n\nexport interface IAccountPreferences {\n accountPreferences: INodeProps;\n heading?: React.ReactNode;\n personalization: IAccountPreference;\n extraPreferences?: IAccountPreference[];\n}\n\nexport interface IAccountProfileItem {\n AccountProfileItem: INodeProps;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\nexport interface IAccountCustomerAttributes {\n customerAttributes?: React.ReactNode;\n}\n\nexport interface IAccountProfileViewProps extends IAccountProfileProps {\n AccountProfile: IModuleProps;\n accountProfileWrapper?: INodeProps;\n className: string;\n heading?: React.ReactNode;\n emailSection: IAccountProfileItem;\n nameSection: IAccountProfileItem;\n preferenceSection: IAccountPreferences;\n customerAttributesWrapper?: INodeProps;\n customerAttributesSection?: IAccountCustomerAttributes;\n}\n\n/**\n *\n * AccountProfile component.\n * @extends {React.Component>}\n */\n@observer\nclass AccountProfile extends React.Component> {\n @observable private isUpdatingPreference: boolean = false;\n\n private readonly telemetryContent?: ITelemetryContent;\n\n private readonly payLoad: IPayLoad;\n\n constructor(props: IAccountProfileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n this.payLoad = getPayloadObject('click', this.telemetryContent, '');\n }\n\n public shouldComponentUpdate(nextProps: IAccountProfileProps): boolean {\n if (this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n\n const { config, resources, data } = this.props;\n const { className, heading, emailAddressSectionHeading, nameSectionHeading, showAttributes, showPhone, showVatNumber } = config;\n\n const { editButtonText, editButtonAriaLabel } = resources;\n const customerInformation = data.customerInformation.result;\n\n // As per the design, phone and vat numbers are part of the profile attributes section\n const shouldRenderAttributes = (showAttributes && showAttributes.length > 0) || showPhone || showVatNumber || false;\n const editLink: ILinksData = {\n linkUrl: {\n destinationUrl: get(this.props, 'context.request.user.editProfileUrl', '')\n },\n linkText: editButtonText,\n ariaLabel: editButtonAriaLabel\n };\n\n const viewProps = {\n ...this.props,\n className,\n AccountProfile: {\n moduleProps: this.props,\n className: classnames('ms-account-profile', config.className)\n },\n accountProfileWrapper: {\n className: classnames('ms-account-profile-wrapper')\n },\n heading: heading && (\n ),\n emailSection: this._renderEmailSection(\n classnames('ms-account-profile__section', 'ms-account-profile__section-email'),\n emailAddressSectionHeading as IEmailAddressSectionHeadingData,\n customerInformation && customerInformation.Email\n ),\n nameSection: this._renderNameSection(\n classnames('ms-account-profile__section', 'ms-account-profile__section-name'),\n nameSectionHeading as INameSectionHeadingData,\n `${customerInformation && customerInformation.FirstName} ${customerInformation && customerInformation.LastName}`,\n [editLink]\n ),\n preferenceSection: this._renderPreferenceSection(\n classnames('ms-account-profile__section', 'ms-account-profile__section-preferences'),\n customerInformation\n ),\n customerAttributesWrapper: {\n className: classnames('ms-account-profile__attributes-wrapper')\n },\n customerAttributesSection: shouldRenderAttributes && this._renderCustomerAttributes()\n };\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.heading.text = event.target.value;\n\n public handleEmailHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.emailAddressSectionHeading!.text = event.target.value;\n\n public handleNameHeadingChange = (event: Msdyn365.ContentEditableEvent) => this.props.config.nameSectionHeading!.text = event.target.value;\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.resources.editButtonText) {\n this.props.resources.editButtonText = event.target.value;\n }\n };\n\n @computed get editProfileUrl(): string {\n return get(this.props, 'context.request.user.editProfileUrl', '');\n }\n\n private _renderEmailSection(className: string, heading?: IEmailAddressSectionHeadingData, description?: string, links?: ILinksData[]): IAccountProfileItem {\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n ),\n links: links && links.length > 0 && ,\n description: description && \n };\n }\n\n private _renderNameSection(className: string, heading?: INameSectionHeadingData, description?: string, links?: ILinksData[]): IAccountProfileItem {\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n ),\n links: links && links.length > 0 && ,\n description: description && \n };\n }\n\n private readonly onClickEventHandler = (className: string) => async () => {\n return this._updateAccountPersonalization(className);\n };\n\n private _renderPreferenceSection(className: string, customerInformation?: Customer): IAccountPreferences | null {\n const { personalizationDescription, personalizationEnableButtonAriaLabel,\n webTrackingDescription, webTrackingEnableButtonAriaLabel } = this.props.resources;\n const { preferencesSectionHeading, personalizationSectionHeading, webTrackingSectionHeading } = this.props.config;\n const { enableDataAnalytics } = this.props.context.request.features;\n const extraPreferences: IAccountPreference[] = [];\n\n if (!customerInformation) {\n this.props.context.telemetry.error('Account profile data is empty, module wont render');\n return null;\n }\n\n // Show browser activity loggin preference if switch is enabled AND a heading is provided\n enableDataAnalytics && webTrackingSectionHeading &&\n extraPreferences.push(this._renderPreference('web-tracking', webTrackingSectionHeading as IHeadingData, webTrackingEnableButtonAriaLabel,\n webTrackingDescription, customerInformation.OptOutWebActivityTracking || false));\n\n return {\n accountPreferences: {\n className\n },\n heading: preferencesSectionHeading && (\n ),\n personalization: this._renderPreference('personalization', personalizationSectionHeading as IHeadingData, personalizationEnableButtonAriaLabel,\n personalizationDescription, customerInformation.OptOutPersonalization || false),\n extraPreferences: extraPreferences || undefined\n };\n }\n\n private readonly _renderPreference = (className: string, sectionHeading: IHeadingData, enableAriaLabel: string, description: string, isOptOut: boolean) => {\n const { toggleDisableText, toggleEnableText } = this.props.resources;\n const toggleState = isOptOut ? 'disable' : 'enable';\n const onClickHandler = this.onClickEventHandler(className);\n this.payLoad.contentAction.etext = sectionHeading.text;\n const attributes = getTelemetryAttributes(this.telemetryContent!, this.payLoad);\n\n return {\n accountPreference: {\n className: classnames('ms-account-profile__preference', `ms-account-profile__preference-${className}`, { 'ms-account-profile__personalization-updating': this.isUpdatingPreference })\n },\n heading: sectionHeading && (\n ),\n buttonWrapper: {\n className: classnames('ms-account-profile__toggle-wrapper', `ms-account-profile__toggle-${toggleState}`)\n },\n buttonYesText: ,\n buttonNoText: ,\n button: (\n \n ),\n description: ,\n onUpdateAccountPreference: async () => this._updateAccountPersonalization(className)\n };\n };\n\n private readonly _updateAccountPersonalization = async (preferenceType?: string) => {\n const customerInformation = this.props.data.customerInformation.result;\n\n if (customerInformation) {\n const {\n telemetry,\n context: { request, actionContext }\n } = this.props;\n\n let isOptOutPersonalization = false;\n let input;\n\n switch (preferenceType) {\n case 'web-tracking':\n isOptOutPersonalization = customerInformation.OptOutWebActivityTracking || false;\n input = new updateCustomerPersonalizationInput(customerInformation.AccountNumber, !isOptOutPersonalization, request.apiSettings, preferenceType);\n break;\n case undefined:\n case 'personalization':\n default:\n isOptOutPersonalization = customerInformation.OptOutPersonalization || false;\n input = new updateCustomerPersonalizationInput(customerInformation.AccountNumber, !isOptOutPersonalization, request.apiSettings, preferenceType);\n }\n\n this.isUpdatingPreference = true;\n\n try {\n await updateCustomerPersonalization(input, actionContext);\n } catch (error) {\n if (telemetry) {\n telemetry.exception(error);\n telemetry.debug('Unable to update customer personalization');\n }\n }\n\n this.isUpdatingPreference = false;\n }\n };\n\n private readonly _renderCustomerAttributes = (): React.ReactNode => {\n return (\n \n );\n };\n}\n\nexport default AccountProfile;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport {\n IAccountPreference, IAccountPreferences, IAccountProfileItem, IAccountProfileViewProps\n} from './account-profile';\n\nconst AccountPreferencesSection: React.FC = ({\n accountPreferences,\n heading,\n personalization,\n extraPreferences\n}) => {\n\n return (\n \n {heading}\n \n {\n extraPreferences && extraPreferences.map((preferenceSecton, index) => {\n return ;\n })\n }\n \n );\n};\n\nconst AccountPreferenceSection: React.FC = ({\n accountPreference,\n heading,\n description,\n buttonWrapper,\n buttonYesText,\n button,\n buttonNoText\n}) => {\n\n return (\n \n {heading}\n {description}\n \n {buttonNoText}\n {button}\n {buttonYesText}\n \n \n );\n};\n\nconst AccountProfileSection: React.FC = ({\n AccountProfileItem,\n heading,\n links,\n description\n}) => {\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nconst AccountProfileView: React.FC = props => {\n const { AccountProfile, accountProfileWrapper, heading, emailSection, nameSection, preferenceSection, customerAttributesWrapper, customerAttributesSection } = props;\n\n return (\n \n {accountProfileWrapper && (\n {heading}\n \n \n \n \n )}\n {customerAttributesWrapper && (\n {customerAttributesSection}\n \n )}\n \n );\n};\n\nexport default AccountProfileView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\ninterface IAccountAddressTileDescription {\n description: string;\n}\n\nconst IAccountAddressTileDescription: React.FC = ({ description }) => (\n

\n {description}\n

\n);\n\nexport default IAccountAddressTileDescription;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\nexport interface IAccountOrderTemplatesTileDescription {\n description: string;\n}\n\nexport const AccountOrderTemplatesTileDescription: React.FC = ({ description }) => (\n

\n {description}\n

\n);\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-order-templates-tile.props.autogenerated';\n\nexport interface IAccountOrderTemplatesTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nexport const AccountOrderTemplatesTileLinks: React.FC = ({ links, onTextChange, telemetryContent, requestContext }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n { editableLinks && editableLinks.length > 0 ? : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-order-templates-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountOrderTemplatesTileData } from './account-order-templates-tile.data';\nimport { IAccountOrderTemplatesTileProps } from './account-order-templates-tile.props.autogenerated';\nimport { AccountOrderTemplatesTileDescription, AccountOrderTemplatesTileLinks } from './components';\n\nexport interface IAccountOrderTemplatesTileViewProps extends IAccountOrderTemplatesTileProps {\n AccountOrderTemplatesTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountOrderTemplatesTile component.\n * @extends {React.PureComponent>}\n */\nexport class AccountOrderTemplatesTile extends React.PureComponent> {\n\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountOrderTemplatesTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(this.props.context.request.telemetryPageName!, this.props.friendlyName, this.props.telemetry);\n }\n\n public render(): JSX.Element {\n const { config, resources, data } = this.props;\n const RetailB2BEcommerceFeatureState = this.props.data.featureState.result?.find(featureState => featureState.Name === 'Dynamics.AX.Application.RetailB2BEcommerceFeature');\n if (!this.props.context.request.params.isEditor &&\n (!RetailB2BEcommerceFeatureState?.IsEnabled || !this.props.data.customerInformation.result?.IsB2b)) {\n return <>;\n }\n\n const { className, heading, links } = config;\n const { accountOrderTemplatesTileDescription } = resources;\n const orderTemplates = data.orderTemplates;\n\n const orderTemplatesCount = (orderTemplates?.result || []).length;\n const description = format(accountOrderTemplatesTileDescription, orderTemplatesCount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountOrderTemplatesTile: {\n moduleProps: this.props,\n className: classnames('ms-account-order-templates-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && ,\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n this.props.config.heading.text = event.target.value;\n };\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountOrderTemplatesTile;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountLoyaltyTileViewProps } from './account-loyalty-tile';\n\nconst AccountLoyaltyTileView: React.FC = props => {\n const { AccountLoyaltyTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountLoyaltyTileView;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\ninterface IAccountProfileText {\n className: string;\n text: string;\n}\n\nconst IAccountProfileText: React.FC = ({ className, text }) => (\n \n {text}\n \n);\n\nexport default IAccountProfileText;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-address-tile.props.autogenerated';\n\nexport interface IAccountAddressTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountAddressTileLinks: React.FC = ({ links, telemetryContent, requestContext, onTextChange }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n\n return (\n
\n { editableLinks && editableLinks.length > 0 ? : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-address-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountAddressTileLinks;\n","/*--------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * See License.txt in the project root for license information.\n *--------------------------------------------------------------*/\n\nimport * as React from 'react';\n\ninterface IAccountLoyaltyTileDescription {\n description: string;\n}\n\nconst IAccountLoyaltyTileDescription: React.FC = ({ description }) => (\n

\n {description}\n

\n);\n\nexport default IAccountLoyaltyTileDescription;\n"],"sourceRoot":""}