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DCD9B,MAEA,EAF2DrB,IAAA,IAAC,UAAEnM,EAAS,KAAEtC,GAAMyO,EAAA,OAAKrQ,EAAAA,cAAA,QAAMkE,UAAWA,GAAYtC","sources":["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 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 private readonly editAsyncCustomerFeatureName: string = 'Dynamics.AX.Application.RetailEnableAsyncCustomerEditFeature';\n\n private isEditAsyncCustomerFeatureEnabled: boolean = false;\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 this.isEditAsyncCustomerFeatureEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.editAsyncCustomerFeatureName)?.IsEnabled || false;\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 !this.isEditAsyncCustomerFeatureEnabled;\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 {\n ArrayExtensions,\n updateCustomerPersonalization,\n updateCustomerPersonalizationInput\n} 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\n private readonly telemetryContent?: ITelemetryContent;\n private readonly payLoad: IPayLoad;\n private readonly editAsyncCustomerFeatureName: string = 'Dynamics.AX.Application.RetailEnableAsyncCustomerEditFeature';\n\n private isEditAsyncCustomerFeatureEnabled: boolean = false;\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 this.isEditAsyncCustomerFeatureEnabled =\n data.featureState?.result?.find(feature => feature.Name === this.editAsyncCustomerFeatureName)?.IsEnabled || false;\n\n const invalidAsyncCustomerState: boolean =\n (this.props.context.app?.config?.canRenderAsyncCustomerDataAsUnmodifiable || false) &&\n (customerInformation?.IsAsyncCustomer || false) &&\n !this.isEditAsyncCustomerFeatureEnabled;\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 this.getDescription(customerInformation),\n Msdyn365.isOboRequest(this.props.context.request) ? undefined : [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 getDescription(customerInformation: Customer | undefined): string {\n let description = '';\n if (customerInformation !== undefined) {\n if (customerInformation.FirstName) {\n description += customerInformation.FirstName;\n }\n if (customerInformation.LastName) {\n description += customerInformation.FirstName ? ` ${customerInformation.LastName}` : customerInformation.LastName;\n }\n }\n return description;\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 && heading.text && (\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 if (!ArrayExtensions.hasElements(links)) {\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n \n ),\n description: description && (\n \n )\n };\n }\n return {\n AccountProfileItem: {\n className\n },\n heading: heading && (\n \n ),\n links: (\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":["AccountAttributeDataTypeValue","AccountProfileAttributes","React","constructor","props","super","isUpdatingAttributes","gotException","hasError","attributeClassName","maxIntegerLimit","minIntegerLimit","maxDecimalLimit","minDecimalLimit","maxStringLength","maxVATNumberLength","maxPhoneLength","editAsyncCustomerFeatureName","isEditAsyncCustomerFeatureEnabled","_renderAttributes","_data$featureState","_this$props$accountPr","config","data","resources","this","accountProfileProps","attributeDefinitions","result","additionalInformationSectionHeading","text","elements","showAttributes","split","map","att","attributeDefinition","find","attribute","IsHidden","Name","toLocaleLowerCase","RecordId","_renderAttribute","edit","state","editAttributes","payLoad","contentAction","etext","attributesEditButtonText","getTelemetryAttributes","telemetryContent","attributesSaveButtonText","saveAttributes","attributesCancelButtonText","cancelAttributes","customerInformation","featureState","feature","IsEnabled","disableBtn","context","app","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","ref","attributesContainerRef","className","classnames","Text","tag","showPhone","_renderPhone","showVatNumber","_renderVatNumber","attributesSaveExceptionMessage","Button","Object","assign","onClick","_enableAttributes","innerRef","editRef","title","disabled","_saveAttributes","_disableAttributes","phoneSectionHeading","heading","replace","type","onChange","_onPhoneChange","value","phone","_renderError","vatNumberSectionHeading","_onVatNumberChange","vatNumber","customAttribute","ExtDataType","Value","Integer","Decimal","_renderIntegerDecimalInput","_renderTextInputOrSelect","TrueFalse","_renderBoolean","attributeProps","_getAttributeProps","displayName","_onAttributeChange","attributes","IsMandatory","isEnumeration","IsEnumeration","EnumerationDetails","hasNoValue","id","_onAttributeSelect","key","selected","option","EnumerationValue","render","toggleState","arialabel","format","attributeToggleButtonAriaLabel","ariaPressed","toggleValue","TextComponent","toggleDisableText","_onAttributeCheck","toggleEnableText","attributeName","error","attributeError","StringExtensions","isNullOrWhitespace","role","attributePayloadData","name","isMandatory","event","target","setState","MsDyn365","isBrowser","setTimeout","current","getElementsByClassName","length","_setFocus","initialAttributes","initialPhone","initialVatNumber","_objectSpread","currentTarget","selectedOptions","index","selectedIndex","_getAttributes","showAttributesArray","customer","custmerAttributes","Attributes","forEach","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","push","KeyName","Phone","VATNumber","VatNumber","async","input","updateCustomerAttributesInput","AccountNumber","request","apiSettings","updateCustomerAttributes","actionContext","initialCustomerAttributes","telemetry","exception","debug","element","focus","_buildPayloadData","defaultIntegerValue","DefaultValue","LowerBound","UpperBound","defaultDecimalValue","defaultStringValue","defaultBooleanValue","_getCustomerPhoneAndVatNumber","telemetryPageName","friendlyName","getTelemetryObject","getPayloadObject","componentDidMount","reaction","shouldComponentUpdate","nextProps","nextState","__decorate","observable","observer","_mapEditableLinks","linkdata","editableLinks","link","linkText","editableLink","ariaLabel","isDisabled","linkUrl","destinationUrl","openInNewTab","additionalProperties","_ref","links","requestContext","onTextChange","Msdyn365","editProps","AccountProfile","isUpdatingPreference","handleHeadingChange","handleEmailHeadingChange","emailAddressSectionHeading","handleNameHeadingChange","nameSectionHeading","handleLinkTextChange","linkIndex","editButtonText","onClickEventHandler","_updateAccountPersonalization","_renderPreference","sectionHeading","enableAriaLabel","description","isOptOut","onClickHandler","accountPreference","onEdit","buttonWrapper","buttonYesText","buttonNoText","button","toString","DescriptionComponent","onUpdateAccountPreference","isOptOutPersonalization","preferenceType","OptOutWebActivityTracking","updateCustomerPersonalizationInput","OptOutPersonalization","updateCustomerPersonalization","_renderCustomerAttributes","_this$props$context$a","editButtonAriaLabel","invalidAsyncCustomerState","shouldRenderAttributes","editLink","get","viewProps","moduleProps","infoMessageBar","accountProcessingPendingInfoMessage","accountProfileWrapper","emailSection","_renderEmailSection","Email","nameSection","_renderNameSection","getDescription","preferenceSection","_renderPreferenceSection","customerAttributesWrapper","customerAttributesSection","renderView","FirstName","LastName","AccountProfileItem","LinksComponent","ArrayExtensions","hasElements","personalizationDescription","personalizationEnableButtonAriaLabel","webTrackingDescription","webTrackingEnableButtonAriaLabel","preferencesSectionHeading","personalizationSectionHeading","webTrackingSectionHeading","enableDataAnalytics","features","extraPreferences","accountPreferences","personalization","computed","AccountPreferencesSection","Node","AccountPreferenceSection","preferenceSecton","_ref2","AccountProfileSection","_ref3","Module"],"sourceRoot":""}