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GA,UAAYsD,UAAW,GAAGA,UAAmBgG,QAASjC,GAC/DzH,+CCLT,MAIA,EAJgFiI,IAAA,IAAC,UAAEvE,GAAWuE,EAAA,OAC1F3I,EAAAA,cAAA,OAAKoE,UAAW,GAAGA,gECAvB,MAIA,EAJsFuE,IAAA,IAAC,UAAEvE,EAAS,QAAE9B,GAASqG,EAAA,OACzG3I,EAAAA,cAAA,OAAKoE,UAAW,GAAGA,sBAA+B9B,WCbtD+H,EAAOC,QAAUtK,cCAjBqK,EAAOC,QAAUC","sources":["webpack://Msdyn365.Commerce.Online/./lib/account-profile-edit/module-registration.js?e173","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/account-profile-edit.tsx?a0b5","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/account-profile-edit.view.tsx?530d","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-button.tsx?e669","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-error.tsx?eadf","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-input.tsx?5c72","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-label.tsx?4793","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-loading-icon.tsx?fba0","webpack://Msdyn365.Commerce.Online/./src/modules/account-profile-edit/components/account-profile-edit-loading-message.tsx?7cf0","webpack://Msdyn365.Commerce.Online/external var \"React\"?0d3b","webpack://Msdyn365.Commerce.Online/external var \"ReactDOM\"?853b"],"sourcesContent":["const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['account-profile-edit'] = {\n c: () => require('@msdyn365-commerce-modules/account-management/dist/lib/modules/account-profile-edit/account-profile-edit'),\n $type: 'contentModule',\n da: [],\n \n iNM: true,\n ns: '@msdyn365-commerce-modules',\n n: 'account-profile-edit',\n p: 'account-management',\n \n pdp: '',\n \n \n md: 'node_modules/@msdyn365-commerce-modules/account-management/dist/lib/modules/account-profile-edit'\n });\n \n\n \n window.__bindings__ = window.__bindings__ || {};\n window.__bindings__.modules = {\n ...window.__bindings__.modules || {},\n ...binding.modules\n };\n \n window.__bindings__.dataActions = {\n ...window.__bindings__.dataActions || {},\n ...binding.dataActions\n };\n export const viewDictionary = {};\n viewDictionary['@msdyn365-commerce-modules|account-management|modules|account-profile-edit|account-profile-edit'] = {\n c: () => require('@msdyn365-commerce-modules/account-management/dist/lib/modules/account-profile-edit/account-profile-edit.view.js'),\n cn: '@msdyn365-commerce-modules-account-management-account-profile-edit'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\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 { EmailRegex } 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 { IAccountProfileEditConfig, IAccountProfileEditProps } from './account-profile-edit.props.autogenerated';\nimport AccountProfileEditButtonComponent from './components/account-profile-edit-button';\nimport AccountProfileEditErrorComponent from './components/account-profile-edit-error';\nimport AccountProfileEditInputComponent from './components/account-profile-edit-input';\nimport AccountProfileEditLabelComponent from './components/account-profile-edit-label';\nimport AccountProfileEditLoadingIconComponent from './components/account-profile-edit-loading-icon';\nimport AccountProfileEditLoadingMessageComponent from './components/account-profile-edit-loading-message';\n\nexport interface IAccountProfileEditViewState {\n isShowLoading: boolean;\n}\n\nexport interface IAccountProfileEditItem {\n wrapper: INodeProps;\n key: string;\n label: React.ReactNode;\n errorMessage: React.ReactNode;\n input: React.ReactNode;\n}\n\nexport interface IAccountProfileEditLocalAccount {\n localAccount: INodeProps;\n items: IAccountProfileEditItem[];\n errorMessage: React.ReactNode[];\n buttonsWrapper: INodeProps;\n buttons: React.ReactNode[];\n verificationSuccessModal: INodeProps;\n verificationSuccessModalMessage: INodeProps;\n}\n\nexport interface IAccountProfileEditLoading {\n modal: INodeProps;\n modalBody: INodeProps;\n icon: React.ReactNode;\n message: React.ReactNode;\n}\n\nexport interface IAccountProfileEditViewProps {\n className: string;\n viewState: IAccountProfileEditViewState;\n loading: IAccountProfileEditLoading;\n accountProfileEdit: IModuleProps;\n defaultAADConainer: INodeProps;\n aadConainer: INodeProps;\n heading: React.ReactNode;\n accountProfileEditLocalAccount: IAccountProfileEditLocalAccount;\n}\n\n/**\n *\n * AccountProfileEdit component\n * All AAD related module is rendered on AAD page and we need to respect HTML contract provide by AAD.\n * Please ensure any change in module don't break contract with AAD.\n * @extends {React.Component>}\n */\n@observer\nclass AccountProfileEdit extends React.Component> {\n private readonly moduleClassName: string = 'ms-account-profile-edit';\n\n private readonly telemetryContent: ITelemetryContent;\n\n @observable private givenName: string;\n\n @observable private surname: string;\n\n @observable private email: string;\n\n @observable private emailRegex: 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: IAccountProfileEditProps) {\n super(props);\n this.givenName = '';\n this.surname = '';\n this.email = '';\n this.emailRegex = EmailRegex.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(\n nextProps: IAccountProfileEditProps,\n nextState: IAccountProfileEditViewState\n ): 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 accountProfileEdit: {\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 && config.heading.text && (\n \n ),\n accountProfileEditLocalAccount: 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 public onTextBoxChange = (event: React.ChangeEvent) => {\n const id = event.target.id;\n const value = event.target.value;\n\n switch (id.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.emailRegex = value;\n break;\n }\n default:\n }\n };\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 const { resources } = this.props;\n const invalidEmailAddressError = resources.invalidEmailAddressError || 'Please enter a valid email address.';\n\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(\n (obj: { ID: string; PRE: string; PAT: string; UX_INPUT_TYPE: string; PAT_DESC: string }) => {\n const value = obj.PRE ? this._htmlDecode(obj.PRE) : '';\n switch (obj.ID.toLowerCase()) {\n case 'givenname': {\n this.givenName = value;\n break;\n }\n case 'surname': {\n this.surname = value;\n break;\n }\n case 'email': {\n this.email = value;\n this.emailRegex = obj.PAT;\n obj.PAT_DESC = invalidEmailAddressError;\n break;\n }\n default:\n }\n }\n );\n }\n };\n\n private _htmlDecode(str: string): string {\n const e = document.createElement('div');\n\n e.innerHTML = str;\n return e.childNodes.length === 0 ? '' : e.childNodes[0].nodeValue || '';\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 required_field: resources.requiredFieldMissingError,\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(): IAccountProfileEditLocalAccount {\n const { config, resources } = this.props;\n const localAccount = {\n localAccount: {\n id: 'attributeList',\n className: `${this.moduleClassName}__account-items attr`\n },\n items: [\n this._renderInput('givenName', 'text', this.givenName, resources.firstNameLabelText, resources.firstNameMaxLength),\n this._renderInput('surname', 'text', this.surname, resources.lastNameLabelText, resources.lastNameMaxLength)\n ],\n errorMessage: [\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 if (config.showEmail && this.email !== '') {\n localAccount.items.push(\n this._renderInput('email', 'email', this.email, resources.emailAddressLabelText, undefined, this.emailRegex)\n );\n }\n\n return localAccount;\n }\n\n private _renderInput(\n id: string,\n type: string,\n value: string,\n labelText: string,\n maxLength?: string,\n pattern?: string\n ): IAccountProfileEditItem {\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 AccountProfileEdit;\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 {\n IAccountProfileEditItem,\n IAccountProfileEditLoading,\n IAccountProfileEditLocalAccount,\n IAccountProfileEditViewProps\n} from './account-profile-edit';\n\nconst AccountProfileEditItem: 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: IAccountProfileEditItem) => {\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 AccountProfileEditLoading: React.FC = ({ modal, modalBody, icon, message }) => {\n return (\n \n \n {icon}\n {message}\n \n \n );\n};\n\nconst AccountProfileEditView: React.FC = props => {\n const { accountProfileEdit, viewState, loading, defaultAADConainer, aadConainer, heading, accountProfileEditLocalAccount } = props;\n\n return (\n \n {viewState.isShowLoading && }\n {viewState.isShowLoading && }\n \n {heading}\n {LocalAccount(accountProfileEditLocalAccount)}\n \n \n );\n};\n\nexport default AccountProfileEditView;\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 IAccountProfileEditButton {\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 AccountProfileEditButton: React.FC = ({\n id,\n className,\n text,\n ariaLabel,\n disabled,\n telemetryContent,\n onClick\n}) => {\n const payLoad = getPayloadObject('click', telemetryContent!, text);\n const attributes = getTelemetryAttributes(telemetryContent!, payLoad);\n\n return (\n \n );\n};\n\nexport default AccountProfileEditButton;\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 IAccountProfileEditErrorProps {\n id?: string;\n className: string;\n type?: string;\n message?: string;\n}\n\nconst AccountProfileEditError: React.FC = ({ id, className, type = 'page', message }) => {\n const errorClassName = `${className}__${type}-error`;\n\n return (\n \n );\n};\n\nexport default AccountProfileEditError;\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 IAccountProfileEditInputProps {\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 IAccountProfileEditInput {\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 AccountProfileEditInput: React.FC = ({ id, type, value, pattern, className, maxLength, onChange }) => (\n \n);\n\nexport default AccountProfileEditInput;\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 IAccountProfileEditLabel {\n id: string;\n forId: string;\n className: string;\n text: string;\n}\n\nconst AccountProfileEditLabel: React.FC = ({ id, forId, className, text }) => (\n \n);\n\nexport default AccountProfileEditLabel;\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 IAccountProfileEditLoadingIcon {\n className: string;\n}\n\nconst AccountProfileEditLoadingIcon: React.FC = ({ className }) => (\n
\n);\n\nexport default AccountProfileEditLoadingIcon;\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 IAccountProfileEditLoadingMessage {\n className: string;\n message: string;\n}\n\nconst AccountProfileEditLoadingMessage: React.FC = ({ className, message }) => (\n
{message}
\n);\n\nexport default AccountProfileEditLoadingMessage;\n","module.exports = React;","module.exports = ReactDOM;"],"names":["binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","_objectSpread","viewDictionary","cn","AccountProfileEdit","React","constructor","props","super","moduleClassName","handleHeadingChange","event","this","config","heading","text","target","value","onTextBoxChange","id","toLowerCase","givenName","surname","emailRegex","_onInit","_prePopulateData","_updateErrorMessage","initializationTimer","setInterval","_isInitializationSuccessful","setTimeout","clearInterval","isInitialized","resources","invalidEmailAddressError","map","obj","PRE","_htmlDecode","ID","email","PAT","PAT_DESC","message","required_field","requiredFieldMissingError","verifying_blurb","loadingMessage","Object","assign","EmailRegex","defaultRegex","source","telemetryContent","getTelemetryObject","context","request","telemetryPageName","friendlyName","telemetry","componentDidMount","componentDidUpdate","shouldComponentUpdate","nextProps","nextState","state","data","render","viewProps","viewState","isShowLoading","accountProfileEdit","moduleProps","className","classnames","loading","modal","tag","Modal","isOpen","modalBody","ModalBody","icon","AccountProfileEditLoadingIconComponent","AccountProfileEditLoadingMessageComponent","defaultAADConainer","style","display","aadConainer","Msdyn365","editProps","onEdit","requestContext","accountProfileEditLocalAccount","_renderLocalAccount","renderView","str","e","document","createElement","innerHTML","childNodes","length","nodeValue","localAccount","items","_renderInput","firstNameLabelText","firstNameMaxLength","lastNameLabelText","lastNameMaxLength","errorMessage","AccountProfileEditErrorComponent","key","requiredFieldMissingSummaryError","fieldIncorrectError","buttonsWrapper","buttons","AccountProfileEditButtonComponent","ariaLabel","saveButtonAriaLabel","saveButtonText","cancelButtonText","verificationSuccessModal","verificationSuccessModalMessage","showEmail","push","emailAddressLabelText","undefined","type","labelText","maxLength","pattern","wrapper","label","AccountProfileEditLabelComponent","forId","input","AccountProfileEditInputComponent","onChange","__decorate","observable","observer","AccountProfileEditItem","_ref","Node","AccountProfileEditLoading","_ref3","Module","_ref2","item","error","index","button","LocalAccount","disabled","onClick","payLoad","getPayloadObject","attributes","getTelemetryAttributes","Button","errorClassName","role","GetMaxLength","parsedMaxLength","Number","parseInt","isNaN","htmlFor","module","exports","ReactDOM"],"sourceRoot":""}