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EAAqB7S,OAAAC,OAAA,GAAKgR,IAC3B/T,EAAAA,cAACsV,EAAyBxS,OAAAC,OAAA,GAAKoR,KAGtCE,GAA6BrU,EAAAA,cAACuV,EAAAA,KAAIzS,OAAAC,OAAA,GAAKsR,GAA4BC,GAC/D,oDCnEjB,MAIA,EAJyElR,IAAA,IAAC,UAAE1B,EAAS,YAAEQ,GAAakB,EAAA,OAChGpD,EAAAA,cAAA,KAAG0B,UAAWA,GAAYQ,EAAgB,6CCD9C,MAEA,EAF2DkB,IAAA,IAAC,UAAE1B,EAAS,KAAEjB,GAAM2C,EAAA,OAAKpD,EAAAA,cAAA,QAAM0B,UAAWA,GAAYjB,EAAY","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/account-address-tile.tsx?2f8c","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/account-address-tile.view.tsx?ac91","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/components/account-address-tile-description.tsx?4911","webpack://Msdyn365.Commerce.Online/./src/modules/account-address-tile/components/account-address-tile-links.tsx?bee7","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-attributes.tsx?bcc2","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-links.tsx?8faf","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/account-profile.tsx?fe69","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/account-profile.view.tsx?b964","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-description.tsx?770a","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-text.tsx?8115"],"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 { 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 private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountAddressTileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public render(): JSX.Element {\n const { config, resources, data } = this.props;\n const { className, heading, links } = config;\n const { accountAddressTileDescriptionForSingleAddress, accountAddressTileDescriptionForMultipleAddresses } = resources;\n const { address } = data;\n const addressCount = (address && address.result && address.result.length) || 0;\n const accountAddressTileDescription =\n 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 && (\n \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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Module } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { 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.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountAddressTileDescription {\n description: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountAddressTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n\nexport default IAccountAddressTileDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-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 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-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.\n * All rights reserved. See LICENSE 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 {\n Button,\n format,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IPayLoad,\n ITelemetryContent\n} 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 =\n (this.props.accountProfileProps &&\n this.props.accountProfileProps.context &&\n this.props.accountProfileProps.context.request &&\n this.props.accountProfileProps.context.request.telemetryPageName) ||\n '';\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, 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 =\n (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(\n 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 const customerInformation = data.customerInformation.result;\n\n // Disable the 'Edit' button if the switch is enabled and the customer is async.\n const disableBtn: boolean =\n (this.props.accountProfileProps.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false);\n return (\n \n {config.additionalInformationSectionHeading && (\n \n )}\n {config.showPhone && this._renderPhone()}\n {config.showVatNumber && this._renderVatNumber()}\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 = (\n customAttribute: AttributeDefinition,\n className: string,\n editAttributes: boolean\n ): 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 = (\n customAttribute: AttributeDefinition,\n className: string,\n editAttributes: boolean\n ): 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 \n )}\n {customAttribute.EnumerationDetails.map(option => {\n const selected = option.EnumerationValue === this.state.attributes[customAttribute.Name || ''];\n return (\n \n {option.EnumerationValue}\n \n );\n })}\n \n
\n );\n }\n return (\n
\n \n \n {this._renderError(customAttribute.Name || '')}\n
\n );\n };\n\n private readonly _renderBoolean = (\n customAttribute: AttributeDefinition,\n className: string,\n editAttributes: boolean\n ): 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 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(\n this.attributeClassName\n );\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({\n editAttributes: false,\n attributeError: {},\n attributes: this.initialAttributes,\n phone: this.initialPhone,\n vatNumber: this.initialVatNumber\n });\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) => (\n event: React.MouseEvent\n ) => {\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 // eslint-disable-next-line\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(\n resources.attributeInputRangeErrorText,\n payloadData.name,\n payloadData.lowerBoundValue,\n payloadData.upperBoundValue\n );\n attributeError[payloadData.name || ''] = rangeError;\n hasError = true;\n }\n } else {\n if (decimalValue > this.maxDecimalLimit) {\n attributeError[payloadData.name || ''] = format(\n resources.attributeInputValueExceedsMaximumErrorText,\n payloadData.name,\n this.maxDecimalLimit\n );\n hasError = true;\n }\n\n if (decimalValue < this.minDecimalLimit) {\n attributeError[payloadData.name || ''] = format(\n resources.attributeInputValueExceedsMinimumErrorText,\n payloadData.name,\n this.minDecimalLimit\n );\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(\n resources.attributeInputRangeErrorText,\n payloadData.name,\n payloadData.lowerBoundValue,\n payloadData.upperBoundValue\n );\n attributeError[payloadData.name || ''] = rangeError;\n hasError = true;\n }\n } else {\n if (integerValue > this.maxIntegerLimit) {\n attributeError[payloadData.name || ''] = format(\n resources.attributeInputValueExceedsMaximumErrorText,\n payloadData.name,\n this.maxIntegerLimit\n );\n hasError = true;\n }\n\n if (integerValue < this.minIntegerLimit) {\n attributeError[payloadData.name || ''] = format(\n resources.attributeInputValueExceedsMinimumErrorText,\n payloadData.name,\n this.minIntegerLimit\n );\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(\n resources.attributeInputStringMaxLengthErrorText,\n payloadData.name,\n this.maxStringLength\n );\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':\n '#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 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(\n customer.AccountNumber,\n customer.Attributes || [],\n context.request.apiSettings,\n customer.Phone,\n customer.VatNumber\n );\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({\n attributeError: {},\n attributes: this.initialAttributes,\n phone: this.initialPhone,\n vatNumber: this.initialVatNumber\n });\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 =\n (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.\n * All rights reserved. See LICENSE 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 isDisabled?: 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 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: link.isDisabled ? 'ms-account-profile__section-link-disable' : '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.\n * All rights reserved. See LICENSE 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 {\n Button,\n getPayloadObject,\n getTelemetryAttributes,\n getTelemetryObject,\n IModuleProps,\n INodeProps,\n IPayLoad,\n ITelemetryContent\n} 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 {\n IAccountProfileProps,\n IEmailAddressSectionHeadingData,\n IHeadingData,\n INameSectionHeadingData\n} 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 infoMessageBar?: React.ReactNode;\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 private readonly telemetryContent?: ITelemetryContent;\n private readonly payLoad: IPayLoad;\n\n constructor(props: IAccountProfileProps) {\n super(props);\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\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 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 const invalidAsyncCustomerState: boolean =\n (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false);\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 isDisabled: invalidAsyncCustomerState\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 infoMessageBar: invalidAsyncCustomerState && (\n \n ),\n accountProfileWrapper: {\n className: classnames('ms-account-profile-wrapper')\n },\n heading: heading && (\n \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 invalidAsyncCustomerState,\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) =>\n (this.props.config.emailAddressSectionHeading!.text = event.target.value);\n\n public handleNameHeadingChange = (event: Msdyn365.ContentEditableEvent) =>\n (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(\n className: string,\n heading?: IEmailAddressSectionHeadingData,\n description?: string,\n links?: ILinksData[]\n ): IAccountProfileItem {\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: description && (\n \n )\n };\n }\n\n private _renderNameSection(\n className: string,\n heading?: INameSectionHeadingData,\n description?: string,\n links?: ILinksData[]\n ): IAccountProfileItem {\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: description && (\n \n )\n };\n }\n\n private readonly onClickEventHandler = (className: string) => async () => {\n return this._updateAccountPersonalization(className);\n };\n\n private _renderPreferenceSection(\n className: string,\n invalidAsyncCustomerState: boolean,\n customerInformation?: Customer\n ): IAccountPreferences | null {\n const {\n personalizationDescription,\n personalizationEnableButtonAriaLabel,\n webTrackingDescription,\n webTrackingEnableButtonAriaLabel\n } = 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 login preference if switch is enabled AND a heading is provided\n enableDataAnalytics &&\n webTrackingSectionHeading &&\n extraPreferences.push(\n this._renderPreference(\n 'web-tracking',\n webTrackingSectionHeading as IHeadingData,\n webTrackingEnableButtonAriaLabel,\n webTrackingDescription,\n customerInformation.OptOutWebActivityTracking || false,\n invalidAsyncCustomerState\n )\n );\n\n return {\n accountPreferences: {\n className\n },\n heading: preferencesSectionHeading && (\n \n ),\n personalization: this._renderPreference(\n 'personalization',\n personalizationSectionHeading as IHeadingData,\n personalizationEnableButtonAriaLabel,\n personalizationDescription,\n customerInformation.OptOutPersonalization || false,\n invalidAsyncCustomerState\n ),\n extraPreferences: extraPreferences || undefined\n };\n }\n\n private readonly _renderPreference = (\n className: string,\n sectionHeading: IHeadingData,\n enableAriaLabel: string,\n description: string,\n isOptOut: boolean,\n disableBtn: boolean\n ) => {\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}`, {\n 'ms-account-profile__personalization-updating': this.isUpdatingPreference\n })\n },\n heading: sectionHeading && (\n \n ),\n buttonWrapper: {\n className: classnames('ms-account-profile__toggle-wrapper', `ms-account-profile__toggle-${toggleState}`, {\n // Disable the toggle completely if customer is async.\n 'ms-account-profile__toggle-disabled': disableBtn\n })\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(\n customerInformation.AccountNumber,\n !isOptOutPersonalization,\n request.apiSettings,\n preferenceType\n );\n break;\n case undefined:\n case 'personalization':\n default:\n isOptOutPersonalization = customerInformation.OptOutPersonalization || false;\n input = new updateCustomerPersonalizationInput(\n customerInformation.AccountNumber,\n !isOptOutPersonalization,\n request.apiSettings,\n preferenceType\n );\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\nexport default AccountProfile;\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 { IAccountPreference, IAccountPreferences, IAccountProfileItem, IAccountProfileViewProps } from './account-profile';\n\nconst AccountPreferencesSection: React.FC = ({ accountPreferences, heading, personalization, extraPreferences }) => {\n return (\n \n {heading}\n \n {extraPreferences &&\n extraPreferences.map((preferenceSecton, index) => {\n return ;\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 return (\n \n {heading}\n {description}\n \n {buttonNoText}\n {button}\n {buttonYesText}\n \n \n );\n};\n\nconst AccountProfileSection: React.FC = ({ AccountProfileItem, heading, links, description }) => {\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nconst AccountProfileView: React.FC = props => {\n const {\n AccountProfile,\n infoMessageBar,\n accountProfileWrapper,\n heading,\n emailSection,\n nameSection,\n preferenceSection,\n customerAttributesWrapper,\n customerAttributesSection\n } = props;\n\n return (\n \n {infoMessageBar}\n {accountProfileWrapper && (\n \n {heading}\n \n \n \n \n )}\n {customerAttributesWrapper && {customerAttributesSection}}\n \n );\n};\n\nexport default AccountProfileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountProfileDescription {\n className: string;\n description: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountProfileDescription: React.FC = ({ className, description }) => (\n

{description}

\n);\n\nexport default IAccountProfileDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountProfileText {\n className: string;\n text: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountProfileText: React.FC = ({ className, text }) => {text};\n\nexport default IAccountProfileText;\n"],"names":["AccountAddressTile","React","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","handleLinkTextChange","linkIndex","links","linkText","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","render","resources","data","className","accountAddressTileDescriptionForSingleAddress","accountAddressTileDescriptionForMultipleAddresses","address","addressCount","result","length","accountAddressTileDescription","description","format","viewProps","_objectSpread","moduleProps","classnames","Msdyn365","tag","editProps","onEdit","requestContext","LinksComponent","Object","assign","onTextChange","DescriptionComponent","renderView","Module","_ref","_mapEditableLinks","linkdata","editableLinks","payLoad","getPayloadObject","forEach","link","index","contentAction","etext","attributes","getTelemetryAttributes","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","AccountAttributeDataTypeValue","AccountProfileAttributes","isUpdatingAttributes","gotException","hasError","attributeClassName","maxIntegerLimit","minIntegerLimit","maxDecimalLimit","minDecimalLimit","maxStringLength","maxVATNumberLength","maxPhoneLength","_renderAttributes","_this$props$accountPr","_this$props$accountPr2","accountProfileProps","attributeDefinitions","additionalInformationSectionHeading","elements","showAttributes","split","map","att","attributeDefinition","find","attribute","IsHidden","Name","toLocaleLowerCase","RecordId","_renderAttribute","edit","state","editAttributes","attributesEditButtonText","attributesSaveButtonText","saveAttributes","attributesCancelButtonText","cancelAttributes","customerInformation","disableBtn","app","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","ref","attributesContainerRef","Text","showPhone","_renderPhone","showVatNumber","_renderVatNumber","attributesSaveExceptionMessage","Button","onClick","_enableAttributes","innerRef","editRef","title","disabled","_saveAttributes","_disableAttributes","phoneSectionHeading","replace","type","onChange","_onPhoneChange","phone","_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","attributePayloadData","name","isMandatory","setState","MsDyn365","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","actionContext","initialCustomerAttributes","exception","debug","element","focus","_buildPayloadData","defaultIntegerValue","DefaultValue","LowerBound","UpperBound","defaultDecimalValue","defaultStringValue","defaultBooleanValue","_getCustomerPhoneAndVatNumber","componentDidMount","reaction","shouldComponentUpdate","nextProps","nextState","__decorate","observable","observer","isDisabled","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","_this$props$context$a","_this$props$context$a2","editButtonAriaLabel","invalidAsyncCustomerState","shouldRenderAttributes","editLink","get","infoMessageBar","accountProcessingPendingInfoMessage","accountProfileWrapper","emailSection","_renderEmailSection","Email","nameSection","_renderNameSection","FirstName","LastName","preferenceSection","_renderPreferenceSection","customerAttributesWrapper","customerAttributesSection","editProfileUrl","AccountProfileItem","personalizationDescription","personalizationEnableButtonAriaLabel","webTrackingDescription","webTrackingEnableButtonAriaLabel","preferencesSectionHeading","personalizationSectionHeading","webTrackingSectionHeading","enableDataAnalytics","features","extraPreferences","accountPreferences","personalization","computed","AccountPreferencesSection","Node","AccountPreferenceSection","preferenceSecton","_ref2","AccountProfileSection","_ref3"],"sourceRoot":""}