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AAAA,cAACuW,EAAuC,CAACxW,aAAa8D,EAAAA,EAAAA,QAAOiT,EAAyCF,GAAY,OAI1H,OAAOvU,KAAKJ,MAAMqC,WAAWR,EACjC,EAaJ,uDCpFA,MAEA,EAF2DhE,IAAA,IAAC,UAAEG,EAAS,KAAEuC,GAAM1C,EAAA,OAAKE,EAAAA,cAAA,QAAMC,UAAWA,GAAYuC,EAAY,sDCA7H,MAIA,EAJyE1C,IAAA,IAAC,UAAEG,EAAS,YAAEF,GAAaD,EAAA,OAChGE,EAAAA,cAAA,KAAGC,UAAWA,GAAYF,EAAgB","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/account-order-templates-tile/components/account-order-templates-tile-description.tsx?a8c4","webpack://Msdyn365.Commerce.Online/./src/modules/account-order-templates-tile/components/account-order-templates-tile-links.tsx?0bcf","webpack://Msdyn365.Commerce.Online/./src/modules/account-order-templates-tile/account-order-templates-tile.tsx?4e7d","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-order-templates-tile/account-order-templates-tile.view.tsx?a1f9","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/account-profile.view.tsx?b964","webpack://Msdyn365.Commerce.Online/./src/modules/organization-users-tile/components/account-organization-users-tile-description.tsx?3b33","webpack://Msdyn365.Commerce.Online/./src/modules/organization-users-tile/components/account-organization-users-tile-links.tsx?f1c7","webpack://Msdyn365.Commerce.Online/./src/modules/organization-users-tile/organization-users-tile.tsx?f5de","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-text.tsx?8115","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile/components/account-profile-description.tsx?770a"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\nexport interface IAccountOrderTemplatesTileDescription {\n description: string;\n}\n\nexport const AccountOrderTemplatesTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../account-order-templates-tile.props.autogenerated';\n\nexport interface IAccountOrderTemplatesTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nexport const AccountOrderTemplatesTileLinks: React.FC = ({\n links,\n onTextChange,\n telemetryContent,\n requestContext\n}) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-order-templates-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { isChannelTypeB2B } from '@msdyn365-commerce/core';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountOrderTemplatesTileData } from './account-order-templates-tile.data';\nimport { IAccountOrderTemplatesTileProps } from './account-order-templates-tile.props.autogenerated';\nimport { AccountOrderTemplatesTileDescription, AccountOrderTemplatesTileLinks } from './components';\n\nexport interface IAccountOrderTemplatesTileViewProps extends IAccountOrderTemplatesTileProps {\n AccountOrderTemplatesTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountOrderTemplatesTile component.\n * @extends {React.PureComponent>}\n */\nexport class AccountOrderTemplatesTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountOrderTemplatesTileProps) {\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\n if (!this.props.context.request.params.isEditor && !isChannelTypeB2B(this.props.context.request)) {\n return <>;\n }\n\n const { className, heading, links } = config;\n const { accountOrderTemplatesTileDescription } = resources;\n const orderTemplates = data.orderTemplates;\n\n const orderTemplatesCount = (orderTemplates?.result || []).length;\n const description = format(accountOrderTemplatesTileDescription, orderTemplatesCount);\n\n const viewProps = {\n ...this.props,\n className,\n AccountOrderTemplatesTile: {\n moduleProps: this.props,\n className: classnames('ms-account-order-templates-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n this.props.config.heading.text = event.target.value;\n };\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default AccountOrderTemplatesTile;\n","/*!\n * Copyright (c) Microsoft Corporation.\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 = 20;\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 } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { IAccountOrderTemplatesTileViewProps } from './account-order-templates-tile';\n\nconst AccountOrderTemplatesTileView: React.FC = props => {\n const { AccountOrderTemplatesTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountOrderTemplatesTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\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\nexport interface IAccountOrganizationUsersTileDescription {\n description: string;\n}\n\nexport const AccountOrganizationUsersTileDescription: React.FC = ({ description }) => (\n

{description}

\n);\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nimport { ILinksData } from '../organization-users-tile.props.autogenerated';\n\nexport interface IAccountOrganizationUsersTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nexport const AccountOrganizationUsersTileLinks: React.FC = ({\n links,\n telemetryContent,\n onTextChange,\n requestContext\n}) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\n\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-organization-users-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n","/*!\n * Copyright (c) Microsoft Corporation.\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 { AccountOrganizationUsersTileDescription, AccountOrganizationUsersTileLinks } from './components';\nimport { IOrganizationUsersTileData } from './organization-users-tile.data';\nimport { IOrganizationUsersTileProps } from './organization-users-tile.props.autogenerated';\n\nexport interface IOrganizationUsersTileViewProps extends IOrganizationUsersTileProps {\n OrganizationUsersTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * OrganizationUsersTile component.\n * @extends {React.PureComponent>}\n */\nclass OrganizationUsersTile extends React.PureComponent> {\n private readonly telemetryContent?: ITelemetryContent;\n\n constructor(props: IOrganizationUsersTileProps) {\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 | null {\n const { config, resources, data } = this.props;\n const { className, heading, links } = config;\n const { accountOrganizationUsersTileDescriptionForSingleUser, accountOrganizationUsersTileDescriptionForMultipleUsers } = resources;\n const numUsers = data.users && data.users.result;\n const accountOrganizationUsersTileDescription =\n numUsers === 1 ? accountOrganizationUsersTileDescriptionForSingleUser : accountOrganizationUsersTileDescriptionForMultipleUsers;\n const customerInformation = data.customerInformation.result;\n\n // Organization-users tile will not be render for non-admin users.\n if (!customerInformation?.IsB2bAdmin) {\n return null;\n }\n\n const viewProps = {\n ...this.props,\n className,\n OrganizationUsersTile: {\n moduleProps: this.props,\n className: classnames('ms-account-organization-users-tile', config.className)\n },\n heading: heading && heading.text && (\n \n ),\n links: links && links.length > 0 && (\n \n ),\n description: (\n \n )\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => {\n this.props.config.heading.text = event.target.value;\n };\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.links && this.props.config.links[linkIndex]) {\n this.props.config.links[linkIndex].linkText = event.target.value;\n }\n };\n}\n\nexport default OrganizationUsersTile;\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","/*!\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"],"names":["AccountOrderTemplatesTileDescription","_ref","description","React","className","AccountOrderTemplatesTileLinks","links","onTextChange","telemetryContent","requestContext","length","editableLinks","_mapEditableLinks","Msdyn365","editProps","linkdata","payLoad","getPayloadObject","forEach","link","index","contentAction","etext","linkText","attributes","getTelemetryAttributes","editableLink","ariaLabel","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","AccountOrderTemplatesTile","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","handleLinkTextChange","linkIndex","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","render","resources","data","params","isEditor","isChannelTypeB2B","accountOrderTemplatesTileDescription","orderTemplates","orderTemplatesCount","result","format","viewProps","_objectSpread","moduleProps","classnames","tag","onEdit","Object","assign","renderView","AccountAttributeDataTypeValue","AccountProfileAttributes","isUpdatingAttributes","gotException","hasError","attributeClassName","maxIntegerLimit","minIntegerLimit","maxDecimalLimit","minDecimalLimit","maxStringLength","maxVATNumberLength","maxPhoneLength","editAsyncCustomerFeatureName","isEditAsyncCustomerFeatureEnabled","_renderAttributes","_data$featureState","_this$props$accountPr","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","featureState","feature","IsEnabled","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","isNullOrWhitespace","attributePayloadData","name","isMandatory","setState","MsDyn365","isBrowser","setTimeout","current","getElementsByClassName","_setFocus","initialAttributes","initialPhone","initialVatNumber","currentTarget","selectedOptions","selectedIndex","_getAttributes","showAttributesArray","customer","custmerAttributes","Attributes","showAttribute","defaultValue","AttributeValue","DataTypeValue","IntegerValue","String","DecimalValue","StringValue","BooleanValue","keys","_addOrUpdateAttribute","hasValue","entries","payloadData","dataTypeValue","decimalValue","Number","isNaN","typeError","attributeInputTypeErrorText","undefined","lowerBoundValue","upperBoundValue","rangeError","attributeInputRangeErrorText","attributeInputValueExceedsMaximumErrorText","attributeInputValueExceedsMinimumErrorText","integerValue","includes","trimValue","trim","attributeInputStringMaxLengthErrorText","textValue","booleanValue","attributeInputMandatoryErrorText","findIndex","splice","Attribute","recordId","Units","ExtensionProperties","NameTranslations","KeyName","Phone","VATNumber","VatNumber","async","input","updateCustomerAttributesInput","AccountNumber","apiSettings","updateCustomerAttributes","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","DescriptionComponent","onUpdateAccountPreference","isOptOutPersonalization","preferenceType","OptOutWebActivityTracking","updateCustomerPersonalizationInput","OptOutPersonalization","updateCustomerPersonalization","_renderCustomerAttributes","_this$props$context$a","editButtonAriaLabel","invalidAsyncCustomerState","shouldRenderAttributes","editLink","get","infoMessageBar","accountProcessingPendingInfoMessage","accountProfileWrapper","emailSection","_renderEmailSection","Email","nameSection","_renderNameSection","getDescription","preferenceSection","_renderPreferenceSection","customerAttributesWrapper","customerAttributesSection","editProfileUrl","FirstName","LastName","AccountProfileItem","LinksComponent","ArrayExtensions","hasElements","personalizationDescription","personalizationEnableButtonAriaLabel","webTrackingDescription","webTrackingEnableButtonAriaLabel","preferencesSectionHeading","personalizationSectionHeading","webTrackingSectionHeading","enableDataAnalytics","features","extraPreferences","accountPreferences","personalization","computed","Module","AccountPreferencesSection","Node","AccountPreferenceSection","preferenceSecton","_ref2","AccountProfileSection","_ref3","AccountOrganizationUsersTileDescription","AccountOrganizationUsersTileLinks","OrganizationUsersTile","accountOrganizationUsersTileDescriptionForSingleUser","accountOrganizationUsersTileDescriptionForMultipleUsers","numUsers","users","accountOrganizationUsersTileDescription","IsB2bAdmin"],"sourceRoot":""}