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,EAAAA,cAAC2U,EAAAA,KAAI,iBAAKqD,GACLC,GACGA,EAAMxS,KAAKgU,GAEAzZ,EAAAA,cAACuZ,EAAiB,iBAAKE,MAErCpB,GACGA,EAAa5S,KAAI,CAACiF,EAAwB5L,IAC/BkB,EAAAA,cAACA,EAAAA,SAAc,CAAC4J,IAAK9K,GAAQ4L,KAE5C1K,EAAAA,cAAC2U,EAAAA,KAAI,iBAAK+D,GACLC,GACGA,EAAQlT,KAAI,CAACsM,EAAyBjT,IAC3BkB,EAAAA,cAACA,EAAAA,SAAc,CAAC4J,IAAK9K,GAAQiT,MAIhD/R,EAAAA,cAAC2U,EAAAA,KAAI,iBAAKqE,GACNhZ,EAAAA,cAAC2U,EAAAA,KAAI,iBAAKsE,OA0BTS,CAAa5B","sources":["webpack://Msdyn365.Commerce.Online/./src/modules/account-loyalty-tile/components/account-loyalty-tile-links.tsx?6c7f","webpack://Msdyn365.Commerce.Online/./src/modules/account-loyalty-tile/account-loyalty-tile.tsx?7f29","webpack://Msdyn365.Commerce.Online/./src/modules/account-loyalty-tile/account-loyalty-tile.view.tsx?3547","webpack://Msdyn365.Commerce.Online/./src/modules/account-loyalty-tile/components/account-loyalty-tile-description.tsx?c7bb","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-order-templates-tile/account-order-templates-tile.view.tsx?a1f9","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","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-button.tsx?a869","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-error.tsx?fbfd","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-input.tsx?20d9","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-label.tsx?6ef1","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-loading-icon.tsx?8828","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/components/password-reset-loading-message.tsx?a980","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/password-reset.tsx?0983","webpack://Msdyn365.Commerce.Online/./src/modules/password-reset/password-reset.view.tsx?b341"],"sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { ILinkData } from '@msdyn365-commerce/core';\nimport { getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface ILinksData {\n linkText?: string;\n linkUrl: ILinkData;\n ariaLabel?: string;\n openInNewTab?: boolean;\n}\n\nexport interface IAccountLoyaltyTileLinks {\n links: ILinksData[];\n requestContext: Msdyn365.IRequestContext;\n\n /**\n * The telemetry content\n */\n telemetryContent?: ITelemetryContent;\n onTextChange?(index: number): (event: Msdyn365.ContentEditableEvent) => void;\n}\n\nconst AccountLoyaltyTileLinks: React.FC = ({ links, telemetryContent, onTextChange, requestContext }) => {\n if (links.length === 0) {\n return null;\n }\n const editableLinks = _mapEditableLinks(links, telemetryContent);\n return (\n
\n {editableLinks && editableLinks.length > 0 ? (\n \n ) : null}\n
\n );\n};\nconst _mapEditableLinks = (linkdata: ILinksData[], telemetryContent?: ITelemetryContent): Msdyn365.ILinksData[] | null => {\n if (!linkdata || linkdata.length === 0) {\n return null;\n }\n const editableLinks: Msdyn365.ILinksData[] = [];\n const payLoad = getPayloadObject('click', telemetryContent!, '');\n linkdata.forEach((link, index) => {\n payLoad.contentAction.etext = link.linkText;\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n const editableLink: Msdyn365.ILinksData = {\n ariaLabel: link.ariaLabel,\n className: 'ms-account-loyalty-tile__link',\n linkText: link.linkText,\n linkUrl: link.linkUrl.destinationUrl,\n openInNewTab: link.openInNewTab,\n role: 'link',\n additionalProperties: attributes\n };\n editableLinks.push(editableLink);\n });\n\n return editableLinks;\n};\n\nexport default AccountLoyaltyTileLinks;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as Msdyn365 from '@msdyn365-commerce/core';\nimport { LoyaltyRewardPoint } from '@msdyn365-commerce/retail-proxy';\nimport { format, getTelemetryObject, IModuleProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nimport { IAccountLoyaltyTileData } from './account-loyalty-tile.data';\nimport { IAccountLoyaltyTileProps } from './account-loyalty-tile.props.autogenerated';\nimport DescriptionComponent from './components/account-loyalty-tile-description';\nimport LinksComponent from './components/account-loyalty-tile-links';\n\nexport interface IAccountLoyaltyTileViewProps extends IAccountLoyaltyTileProps {\n AccountLoyaltyTile: IModuleProps;\n className: string;\n heading?: React.ReactNode;\n links?: React.ReactNode;\n description?: React.ReactNode;\n}\n\n/**\n *\n * AccountLoyalty component.\n * @extends {React.PureComponent>}\n */\nclass AccountLoyaltyTile extends React.PureComponent> {\n private readonly telemetryContent: ITelemetryContent;\n\n constructor(props: IAccountLoyaltyTileProps) {\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, data, resources, context } = this.props;\n const { className, heading, signUpLinkText, signUpLinkAriaLabel, viewLinkText, viewLinkAriaLabel } = config;\n const { accountLoyaltySummary, accountLoyaltyMemberSummary } = resources;\n const { loyaltyCard } = data;\n\n let description = accountLoyaltySummary;\n let url = Msdyn365.getUrlSync('loyaltyJoin', context.actionContext) || '';\n const link = { linkText: signUpLinkText, linkUrl: { destinationUrl: url }, ariaLabel: signUpLinkAriaLabel };\n\n if (loyaltyCard && loyaltyCard.result && loyaltyCard.result.CardNumber) {\n const decimalPrecision = 2;\n let points = 0;\n\n if (loyaltyCard.result.RewardPoints && loyaltyCard.result.RewardPoints.length > 0) {\n loyaltyCard.result.RewardPoints.forEach((rewardPoint: LoyaltyRewardPoint) => {\n points += rewardPoint.ActivePoints!;\n });\n }\n link.ariaLabel = viewLinkAriaLabel;\n link.linkText = viewLinkText;\n url = Msdyn365.getUrlSync('loyalty', context.actionContext) || '';\n link.linkUrl.destinationUrl = url;\n description = format(accountLoyaltyMemberSummary, points.toFixed(decimalPrecision));\n }\n\n const viewProps = {\n ...this.props,\n className,\n AccountLoyaltyTile: {\n moduleProps: this.props,\n className: classnames('ms-account-loyalty-tile', config.className)\n },\n heading: heading && (\n \n ),\n links: (\n \n ),\n description: \n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading.text = event.target.value);\n\n public handleLinkTextChange = (linkIndex: number) => (event: Msdyn365.ContentEditableEvent) => {\n if (this.props.config.signUpLinkText && this.props.config.viewLinkText) {\n this.props.config.viewLinkText = event.target.value;\n }\n };\n}\n\nexport default AccountLoyaltyTile;\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 { IAccountLoyaltyTileViewProps } from './account-loyalty-tile';\n\nconst AccountLoyaltyTileView: React.FC = props => {\n const { AccountLoyaltyTile, heading, description, links } = props;\n\n return (\n \n {heading}\n {description}\n {links}\n \n );\n};\n\nexport default AccountLoyaltyTileView;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountLoyaltyTileDescription {\n description: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountLoyaltyTileDescription: React.FC = ({ description }) => (\n

{description}

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

{description}

\n);\n\nexport default IAccountProfileDescription;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport * as React from 'react';\n\ninterface IAccountProfileText {\n className: string;\n text: string;\n}\n\n// eslint-disable-next-line no-redeclare\nconst IAccountProfileText: React.FC = ({ className, text }) => {text};\n\nexport default IAccountProfileText;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetButton {\n id?: string;\n className: string;\n text: string;\n ariaLabel: string;\n disabled?: boolean;\n telemetryContent?: ITelemetryContent;\n onClick?(event: React.MouseEvent): void;\n}\n\nconst PasswordResetButton: React.FC = ({ id, className, text, ariaLabel, disabled, telemetryContent, onClick }) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n return (\n \n );\n};\n\nexport default PasswordResetButton;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport classnames from 'classnames';\nimport * as React from 'react';\n\nexport interface IPasswordResetErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst PasswordResetError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default PasswordResetError;\n","/*!\n * Copyright (c) Microsoft Corporation.\n * All rights reserved. See LICENSE in the project root for license information.\n */\n\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\nimport * as React from 'react';\n\nexport interface IPasswordResetInputProps {\n id?: string;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n type: any;\n value?: string;\n pattern?: string;\n className: string;\n maxLength?: string;\n onChange?(event: React.ChangeEvent): void;\n}\n\nexport interface IPasswordResetInput {\n key: string;\n AddressItem: INodeProps;\n label: React.ReactNode;\n alert: React.ReactNode;\n input: React.ReactNode;\n}\n\nconst GetMaxLength = (maxLength?: string): number | undefined => {\n if (maxLength) {\n const parsedMaxLength = Number.parseInt(maxLength, 10);\n if (!isNaN(parsedMaxLength)) {\n return parsedMaxLength;\n }\n }\n\n return undefined;\n};\n\nconst PasswordResetInput: React.FC = ({ id, type, value, pattern, className, maxLength, onChange }) => (\n \n);\n\nexport default PasswordResetInput;\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 IPasswordResetLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst PasswordResetLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default PasswordResetLabel;\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 IPasswordResetLoadingIcon {\n className: string;\n}\n\nconst PasswordResetLoadingIcon: React.FC = ({ className }) =>
;\n\nexport default PasswordResetLoadingIcon;\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 IPasswordResetLoadingMessage {\n className: string;\n message: string;\n}\n\nconst PasswordResetLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default PasswordResetLoadingMessage;\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 { PasswordRegex } from '@msdyn365-commerce-modules/retail-actions';\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent, Modal, ModalBody } from '@msdyn365-commerce-modules/utilities';\nimport classnames from 'classnames';\nimport { observable } from 'mobx';\nimport { observer } from 'mobx-react';\nimport * as React from 'react';\n\nimport PasswordResetButtonComponent from './components/password-reset-button';\nimport PasswordResetErrorComponent from './components/password-reset-error';\nimport PasswordResetInputComponent from './components/password-reset-input';\nimport PasswordResetLabelComponent from './components/password-reset-label';\nimport PasswordResetLoadingIconComponent from './components/password-reset-loading-icon';\nimport PasswordResetLoadingMessageComponent from './components/password-reset-loading-message';\nimport { IPasswordResetConfig, IPasswordResetProps } from './password-reset.props.autogenerated';\n\nexport interface IPasswordResetViewState {\n isShowLoading: boolean;\n}\n\nexport interface IPasswordResetItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IPasswordResetLocalAccount {\n localAccount: INodeProps;\n items: IPasswordResetItem[];\n errorMessage: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IPasswordResetLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IPasswordResetViewProps {\n className: string;\n viewState: IPasswordResetViewState;\n loading: IPasswordResetLoading;\n passwordReset: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n passwordResetLocalAccount: IPasswordResetLocalAccount;\n}\n\n/**\n *\n * PasswordReset component.\n * @extends {React.Component>}\n */\n@observer\nclass PasswordReset extends React.Component> {\n private readonly moduleClassName: string = 'ms-password-reset';\n\n private readonly telemetryContent?: ITelemetryContent;\n\n @observable private newPasswordRegex: string;\n\n @observable private reenterPasswordRegex: string;\n\n @observable private isInitialized: boolean;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private initializationTimer: any;\n\n constructor(props: IPasswordResetProps) {\n super(props);\n\n this.newPasswordRegex = PasswordRegex.defaultRegex.source;\n this.reenterPasswordRegex = PasswordRegex.defaultRegex.source;\n this.isInitialized = false;\n this.telemetryContent = getTelemetryObject(\n this.props.context.request.telemetryPageName!,\n this.props.friendlyName,\n this.props.telemetry\n );\n }\n\n public componentDidMount(): void {\n this._onInit();\n }\n\n // After successful AAD initialization, call initialize method provided by AAD to attach events.\n public componentDidUpdate(): void {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (this.isInitialized && window && window['$element'] && window['$element']['initialize']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['$element']['initialize']();\n }\n }\n\n public shouldComponentUpdate(nextProps: IPasswordResetProps, nextState: IPasswordResetViewState): boolean {\n if (this.state === nextState && this.props.data === nextProps.data) {\n return false;\n }\n return true;\n }\n\n public render(): JSX.Element {\n const { config, resources } = this.props;\n\n const viewProps = {\n ...this.props,\n viewState: {\n isShowLoading: !this.isInitialized\n },\n passwordReset: {\n moduleProps: this.props,\n className: classnames(this.moduleClassName, config.className)\n },\n loading: {\n modal: {\n tag: Modal,\n isOpen: true\n },\n modalBody: {\n tag: ModalBody\n },\n icon: ,\n message: \n },\n defaultAADConainer: {\n id: 'api',\n style: { display: 'none' }\n },\n aadConainer: {\n id: this.isInitialized ? 'api' : null,\n className: `${this.moduleClassName}__container`\n },\n heading: config.heading && (\n \n ),\n passwordResetLocalAccount: this._renderLocalAccount()\n };\n\n return this.props.renderView(viewProps) as React.ReactElement;\n }\n\n public handleHeadingChange = (event: Msdyn365.ContentEditableEvent) => (this.props.config.heading!.text = event.target.value);\n\n // eslint-disable-next-line @typescript-eslint/naming-convention\n public _onInit = () => {\n this._prePopulateData();\n this._updateErrorMessage();\n\n // Check if AAD initialization is complete. AAD do not provide any event to subscribe so we need to check variable set by AAD to check initialization status.\n this.initializationTimer = setInterval(() => {\n this._isInitializationSuccessful();\n }, 100);\n setTimeout(() => {\n clearInterval(this.initializationTimer);\n }, 10_000);\n };\n\n // After successful AAD initialization, remove waiting and preload any data, if needed.\n private readonly _isInitializationSuccessful = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window && window['$diags'] && window['$diags']['initializationSuccessful']) {\n clearInterval(this.initializationTimer);\n this.isInitialized = true;\n }\n };\n\n private readonly _prePopulateData = () => {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n if (window['SA_FIELDS'] && window['SA_FIELDS']['AttributeFields']) {\n // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-unsafe-member-access -- Auto-suppressed.\n window['SA_FIELDS']['AttributeFields'].map((obj: { ID: string; PAT: string }) => {\n switch (obj.ID.toLowerCase()) {\n case 'newpassword': {\n this.newPasswordRegex = obj.PAT;\n break;\n }\n case 'reenterpassword': {\n this.reenterPasswordRegex = obj.PAT;\n break;\n }\n default:\n }\n });\n }\n };\n\n private readonly _updateErrorMessage = () => {\n const { resources } = this.props;\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n if (window && window['CONTENT']) {\n const message = {\n verifying_blurb: resources.loadingMessage\n };\n\n // eslint-disable-next-line @typescript-eslint/dot-notation -- Auto-suppressed.\n Object.assign(window['CONTENT'], message);\n }\n };\n\n private _renderLocalAccount(): IPasswordResetLocalAccount {\n const { resources } = this.props;\n return {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n items: [\n this._renderInput('newPassword', 'password', resources.newPasswordLabelText, this.newPasswordRegex),\n this._renderInput('reenterPassword', 'password', resources.confirmPasswordLabelText, this.reenterPasswordRegex)\n ],\n errorMessage: [\n ,\n ,\n ,\n \n ],\n buttonsWrapper: {\n className: `${this.moduleClassName}__buttons`\n },\n buttons: [\n ,\n \n ],\n verificationSuccessModal: {\n className: `${this.moduleClassName}__verifying-modal verifying-modal`\n },\n verificationSuccessModalMessage: {\n id: 'verifying_blurb',\n className: `${this.moduleClassName}__verifying-modal-message`\n }\n };\n }\n\n private _renderInput(id: string, type: string, labelText: string, pattern?: string): IPasswordResetItem {\n const className = `${this.moduleClassName}__account-item`;\n return {\n wrapper: {\n className: classnames(className, `${className}-${id}`, 'entry-item', 'attrEntry')\n },\n key: id,\n label: (\n \n ),\n errorMessage: (\n \n ),\n input: (\n \n )\n };\n }\n}\n\nexport default PasswordReset;\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 { IPasswordResetItem, IPasswordResetLoading, IPasswordResetLocalAccount, IPasswordResetViewProps } from './password-reset';\n\nconst PasswordResetItem: React.FC = ({ wrapper, label, errorMessage, input }) => {\n return (\n \n {label}\n {errorMessage}\n {input}\n \n );\n};\n\nconst LocalAccount: React.FC = ({\n localAccount,\n items,\n errorMessage,\n buttonsWrapper,\n buttons,\n verificationSuccessModal,\n verificationSuccessModalMessage\n}) => {\n return (\n \n {items &&\n items.map((item: IPasswordResetItem) => {\n // eslint-disable-next-line react/jsx-key\n return ;\n })}\n {errorMessage &&\n errorMessage.map((error: React.ReactNode, index: number) => {\n return {error};\n })}\n \n {buttons &&\n buttons.map((button: React.ReactNode, index: number) => {\n return {button};\n })}\n \n\n \n \n \n \n );\n};\n\nconst PasswordResetLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst PasswordResetView: React.FC = props => {\n const { passwordReset, viewState, loading, defaultAADConainer, aadConainer, heading, passwordResetLocalAccount } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(passwordResetLocalAccount)}\n \n \n );\n};\n\nexport default PasswordResetView;\n"],"names":["_mapEditableLinks","linkdata","telemetryContent","length","editableLinks","payLoad","getPayloadObject","forEach","link","index","contentAction","etext","linkText","attributes","getTelemetryAttributes","editableLink","ariaLabel","className","linkUrl","destinationUrl","openInNewTab","role","additionalProperties","push","links","onTextChange","requestContext","React","Msdyn365","editProps","AccountLoyaltyTile","constructor","props","super","handleHeadingChange","event","this","config","heading","text","target","value","handleLinkTextChange","linkIndex","signUpLinkText","viewLinkText","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","render","data","resources","signUpLinkAriaLabel","viewLinkAriaLabel","accountLoyaltySummary","accountLoyaltyMemberSummary","loyaltyCard","description","url","actionContext","result","CardNumber","decimalPrecision","points","RewardPoints","rewardPoint","ActivePoints","format","toFixed","viewProps","moduleProps","classnames","tag","onEdit","LinksComponent","DescriptionComponent","renderView","Module","AccountOrderTemplatesTileDescription","AccountOrderTemplatesTileLinks","AccountOrderTemplatesTile","RetailB2BEcommerceFeatureState","featureState","find","Name","params","isEditor","IsEnabled","customerInformation","IsB2b","accountOrderTemplatesTileDescription","orderTemplates","orderTemplatesCount","AccountAttributeDataTypeValue","AccountProfileAttributes","isUpdatingAttributes","gotException","hasError","attributeClassName","maxIntegerLimit","minIntegerLimit","maxDecimalLimit","minDecimalLimit","maxStringLength","maxVATNumberLength","maxPhoneLength","_renderAttributes","accountProfileProps","attributeDefinitions","additionalInformationSectionHeading","elements","showAttributes","split","map","att","attributeDefinition","attribute","IsHidden","toLocaleLowerCase","RecordId","_renderAttribute","edit","state","editAttributes","attributesEditButtonText","attributesSaveButtonText","saveAttributes","attributesCancelButtonText","cancelAttributes","disableBtn","app","canRenderAsyncCustomerDataAsUnmodifiable","IsAsyncCustomer","ref","attributesContainerRef","Text","showPhone","_renderPhone","showVatNumber","_renderVatNumber","attributesSaveExceptionMessage","Button","onClick","_enableAttributes","innerRef","editRef","title","disabled","_saveAttributes","_disableAttributes","phoneSectionHeading","replace","type","onChange","_onPhoneChange","phone","_renderError","vatNumberSectionHeading","_onVatNumberChange","vatNumber","customAttribute","ExtDataType","Value","Integer","Decimal","_renderIntegerDecimalInput","_renderTextInputOrSelect","TrueFalse","_renderBoolean","attributeProps","_getAttributeProps","displayName","_onAttributeChange","IsMandatory","isEnumeration","IsEnumeration","EnumerationDetails","hasNoValue","id","_onAttributeSelect","key","selected","option","EnumerationValue","toggleState","arialabel","attributeToggleButtonAriaLabel","ariaPressed","toggleValue","TextComponent","toggleDisableText","_onAttributeCheck","toggleEnableText","attributeName","error","attributeError","StringExtensions","attributePayloadData","name","isMandatory","setState","MsDyn365","setTimeout","current","getElementsByClassName","_setFocus","initialAttributes","initialPhone","initialVatNumber","currentTarget","selectedOptions","selectedIndex","_getAttributes","showAttributesArray","customer","custmerAttributes","Attributes","showAttribute","defaultValue","AttributeValue","DataTypeValue","IntegerValue","String","DecimalValue","StringValue","BooleanValue","Object","keys","_addOrUpdateAttribute","hasValue","entries","payloadData","dataTypeValue","decimalValue","Number","isNaN","typeError","attributeInputTypeErrorText","undefined","lowerBoundValue","upperBoundValue","rangeError","attributeInputRangeErrorText","attributeInputValueExceedsMaximumErrorText","attributeInputValueExceedsMinimumErrorText","integerValue","includes","trimValue","trim","attributeInputStringMaxLengthErrorText","textValue","booleanValue","attributeInputMandatoryErrorText","findIndex","splice","Attribute","recordId","Units","ExtensionProperties","NameTranslations","KeyName","Phone","VATNumber","VatNumber","async","input","updateCustomerAttributesInput","AccountNumber","apiSettings","updateCustomerAttributes","initialCustomerAttributes","exception","debug","element","focus","_buildPayloadData","defaultIntegerValue","DefaultValue","LowerBound","UpperBound","defaultDecimalValue","defaultStringValue","defaultBooleanValue","_getCustomerPhoneAndVatNumber","componentDidMount","reaction","shouldComponentUpdate","nextProps","nextState","__decorate","observable","observer","isDisabled","AccountProfile","isUpdatingPreference","handleEmailHeadingChange","emailAddressSectionHeading","handleNameHeadingChange","nameSectionHeading","editButtonText","onClickEventHandler","_updateAccountPersonalization","_renderPreference","sectionHeading","enableAriaLabel","isOptOut","onClickHandler","accountPreference","buttonWrapper","buttonYesText","buttonNoText","button","toString","onUpdateAccountPreference","isOptOutPersonalization","preferenceType","OptOutWebActivityTracking","updateCustomerPersonalizationInput","OptOutPersonalization","updateCustomerPersonalization","_renderCustomerAttributes","editButtonAriaLabel","invalidAsyncCustomerState","shouldRenderAttributes","editLink","get","infoMessageBar","accountProcessingPendingInfoMessage","accountProfileWrapper","emailSection","_renderEmailSection","Email","nameSection","_renderNameSection","FirstName","LastName","preferenceSection","_renderPreferenceSection","customerAttributesWrapper","customerAttributesSection","AccountProfileItem","personalizationDescription","personalizationEnableButtonAriaLabel","webTrackingDescription","webTrackingEnableButtonAriaLabel","preferencesSectionHeading","personalizationSectionHeading","webTrackingSectionHeading","enableDataAnalytics","features","extraPreferences","accountPreferences","personalization","computed","AccountPreferencesSection","Node","AccountPreferenceSection","preferenceSecton","AccountProfileSection","message","errorClassName","GetMaxLength","maxLength","parsedMaxLength","parseInt","pattern","forId","htmlFor","PasswordReset","moduleClassName","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","clearInterval","window","isInitialized","obj","ID","toLowerCase","newPasswordRegex","PAT","reenterPasswordRegex","verifying_blurb","loadingMessage","assign","PasswordRegex","componentDidUpdate","viewState","isShowLoading","passwordReset","loading","modal","Modal","isOpen","modalBody","ModalBody","icon","PasswordResetLoadingIconComponent","PasswordResetLoadingMessageComponent","defaultAADConainer","style","display","aadConainer","passwordResetLocalAccount","_renderLocalAccount","localAccount","items","_renderInput","newPasswordLabelText","confirmPasswordLabelText","errorMessage","PasswordResetErrorComponent","passwordEntryMismatchError","requiredFieldMissingError","fieldIncorrectError","buttonsWrapper","buttons","PasswordResetButtonComponent","saveButtonAriaLabel","saveButtonText","cancelButtonText","verificationSuccessModal","verificationSuccessModalMessage","labelText","wrapper","label","PasswordResetLabelComponent","PasswordResetInputComponent","PasswordResetItem","PasswordResetLoading","item","LocalAccount"],"sourceRoot":""}