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S,SAAUS,EAAOC,EAAaC,GACnE,MAAO,CAGL,SAAeC,GACb,IAAIC,EAAIR,EAAuBzK,MAC3BkL,EAAUZ,EAAkBU,QAAUlN,EAAY4M,EAAUM,EAAQH,GACxE,OAAOK,EAAUf,EAAKe,EAASF,EAAQC,GAAK,IAAIE,OAAOH,GAAQH,GAAOL,EAASS,KAIjF,SAAUG,GACR,IAAIC,EAAKhB,EAASrK,MACdsL,EAAId,EAASY,GACbG,EAAMR,EAAgBD,EAAaO,EAAIC,GAE3C,GAAIC,EAAIC,KAAM,OAAOD,EAAI3O,MAEzB,IAAKyO,EAAGI,OAAQ,OAAOb,EAAWS,EAAIC,GAEtC,IAAII,EAAcL,EAAGM,QACrBN,EAAGO,UAAY,EAIf,IAHA,IAEIC,EAFAC,EAAI,GACJtC,EAAI,EAEgC,QAAhCqC,EAASjB,EAAWS,EAAIC,KAAc,CAC5C,IAAIS,EAAWvB,EAASqB,EAAO,IAC/BC,EAAEtC,GAAKuC,EACU,KAAbA,IAAiBV,EAAGO,UAAYjB,EAAmBW,EAAGf,EAASc,EAAGO,WAAYF,IAClFlC,IAEF,OAAa,IAANA,EAAU,KAAOsC","sources":["webpack://bju-press/./src/modules/bju-onboarding-form/components/sign-up-button.tsx?25ff","webpack://bju-press/./src/modules/bju-onboarding-form/components/sign-up-error.tsx?6dbd","webpack://bju-press/./src/modules/bju-onboarding-form/components/sign-up-input.tsx?f03c","webpack://bju-press/./src/modules/bju-onboarding-form/components/sign-up-label.tsx?4877","webpack://bju-press/./src/modules/bju-onboarding-form/bju-onboarding-form.tsx?6bba","webpack://bju-press/./src/modules/bju-onboarding-form/bju-onboarding-form.view.tsx?5ffe","webpack://bju-press/./lib/bju-onboarding-form/module-registration.js?90e3","webpack://bju-press/external var \"React\"?0d3b","webpack://bju-press/external var \"ReactDOM\"?853b","webpack://bju-press/./node_modules/@msdyn365-commerce/bootloader/node_modules/core-js/modules/es.string.match.js?d557"],"sourcesContent":["/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { Button, getPayloadObject, getTelemetryAttributes, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nexport interface IBusinessSignUpButtonProps {\r\n id?: string;\r\n className: string;\r\n text: string;\r\n ariaLabel: string;\r\n disabled?: boolean;\r\n link?: string;\r\n telemetryContent: ITelemetryContent;\r\n onClick?(event: React.MouseEvent): void;\r\n}\r\n\r\nexport const SignUpButton: React.FC = ({\r\n id,\r\n className,\r\n text,\r\n ariaLabel,\r\n telemetryContent,\r\n disabled,\r\n link,\r\n onClick\r\n}) => {\r\n const payLoad = getPayloadObject('click', telemetryContent, text);\r\n const attributes = getTelemetryAttributes(telemetryContent, payLoad);\r\n return (\r\n \r\n {text}\r\n \r\n );\r\n};\r\n\r\nexport default SignUpButton;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nexport interface IBusinessSignUpErrorProps {\r\n id?: string;\r\n className: string;\r\n type?: string;\r\n message?: string;\r\n}\r\n\r\nexport const SignUpError: React.FC = ({ id, className, type = 'page', message }) => {\r\n const errorClassName = `${className}__${type}-error`;\r\n\r\n return (\r\n \r\n

{message}

\r\n \r\n );\r\n};\r\n\r\nexport default SignUpError;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport { INodeProps } from '@msdyn365-commerce-modules/utilities';\r\nimport * as React from 'react';\r\n\r\nimport { InputType, IFormItem } from '../bju-onboarding-form'; // @CUSTOM: Import IFormItem for radio button boolean values\r\nimport { IBjuOnboardingFormResources } from '../bju-onboarding-form.props.autogenerated'; // @CUSTOM: Import IBjuOnboardingFormResources for radio button boolean labels\r\n\r\nexport interface IBusinessSignUpInputProps {\r\n id?: string;\r\n type: InputType;\r\n value?: string;\r\n pattern?: string;\r\n className: string;\r\n maxLength?: string;\r\n isRequired: boolean;\r\n fieldReference?: React.RefObject;\r\n onChange?(event: React.ChangeEvent): void;\r\n resources: IBjuOnboardingFormResources; // @CUSTOM: Pass resources for radio button boolean labels\r\n formItems: IFormItem[]; // @CUSTOM: Pass state form data for radio button boolean checked values\r\n}\r\n\r\nexport interface IBusinessSignUpInput {\r\n key: string;\r\n AddressItem: INodeProps;\r\n label: React.ReactNode;\r\n alert: React.ReactNode;\r\n input: React.ReactNode;\r\n}\r\n\r\nconst GetMaxLength = (maxLength?: string): number | undefined => {\r\n if (maxLength) {\r\n const parsedMaxLength = Number.parseInt(maxLength, 10);\r\n if (!isNaN(parsedMaxLength)) {\r\n return parsedMaxLength;\r\n }\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const SignUpInput: React.FC = ({\r\n id,\r\n type,\r\n value,\r\n pattern,\r\n className,\r\n maxLength,\r\n isRequired,\r\n onChange,\r\n fieldReference,\r\n resources, // @CUSTOM: Pass resources for radio button boolean labels\r\n formItems // @CUSTOM: Pass state form data for radio button boolean checked values\r\n}) => {\r\n if (type === InputType.TextArea) {\r\n return (\r\n \r\n );\r\n }\r\n\r\n //------------------------------------------------------\r\n // @CUSTOM: Boolean input type\r\n //------------------------------------------------------\r\n if (type === InputType.Boolean) {\r\n const inputValue = formItems.find(item => item.id === id)?.value;\r\n return (\r\n
\r\n \r\n \r\n
\r\n );\r\n }\r\n //------------------------------------------------------\r\n\r\n return (\r\n \r\n );\r\n};\r\n\r\nexport default SignUpInput;\r\n","/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\nimport * as React from 'react';\r\n\r\nexport interface IBusinessSignUpLabelProps {\r\n id: string;\r\n forId: string;\r\n className: string;\r\n text: string;\r\n}\r\n\r\nexport const SignUpLabel: React.FC = ({ id, forId, className, text }) => (\r\n \r\n);\r\n\r\nexport default SignUpLabel;\r\n","// @CUSTOM: This module has been cloned from the business-sign-up module.\r\n\r\n/*!\r\n * Copyright (c) Microsoft Corporation.\r\n * All rights reserved. See LICENSE in the project root for license information.\r\n */\r\n\r\n/* eslint-disable no-duplicate-imports */\r\nimport { ContentEditableEvent, getUrlSync, RichTextComponent, Text } from '@msdyn365-commerce/core';\r\nimport { Address, BusinessPartnerProspect } from '@msdyn365-commerce/retail-proxy';\r\nimport { createProspectAsync } from '@msdyn365-commerce/retail-proxy/dist/DataActions/BusinessPartnersDataActions.g';\r\nimport { EmailRegex, PhoneRegex } from '@msdyn365-commerce-modules/retail-actions';\r\nimport { getTelemetryObject, IModuleProps, INodeProps, ITelemetryContent } from '@msdyn365-commerce-modules/utilities';\r\nimport classnames from 'classnames';\r\nimport * as React from 'react';\r\n\r\nimport { IBjuOnboardingFormConfig, IBjuOnboardingFormProps, IBjuOnboardingFormResources } from './bju-onboarding-form.props.autogenerated'; // @CUSTOM: Need to import resources for radio button boolean labels\r\nimport { SignUpButton, SignUpError, SignUpInput, SignUpLabel } from './components';\r\n\r\nexport interface IBusinessSignUpExtendedProps extends IBjuOnboardingFormProps {\r\n formItems?: IFormItem[];\r\n}\r\n\r\nexport interface IBusinessSignUpItem {\r\n wrapper: INodeProps;\r\n isAddressInput?: boolean;\r\n id: string;\r\n label: React.ReactNode;\r\n errorMessage: React.ReactNode;\r\n input?: React.ReactNode;\r\n}\r\n\r\nexport interface IBusinessState {\r\n isReady: boolean;\r\n formItems: IFormItem[];\r\n addressHasErrors: boolean;\r\n showAddressErrors: boolean;\r\n hasSubmitErrors: boolean;\r\n}\r\n\r\nexport interface IBusinessSignUpLocalAccount {\r\n FormWrapper: INodeProps;\r\n items: IBusinessSignUpItem[];\r\n buttons: React.ReactNode[];\r\n errorMessage: React.ReactNode[];\r\n disclaimer: React.ReactNode;\r\n}\r\n\r\nexport interface IBusinessSignUpViewProps {\r\n className: string;\r\n businessSignUp: IModuleProps;\r\n ContainerWrapper: INodeProps;\r\n heading: React.ReactNode;\r\n businessSignUpForm: IBusinessSignUpLocalAccount;\r\n formItems: IFormItem[];\r\n instructions: React.ReactNode;\r\n}\r\n\r\nexport interface IFormItem {\r\n id: string;\r\n type: InputType;\r\n label: string;\r\n value: string;\r\n maxChars?: string;\r\n isRequired: boolean;\r\n pattern?: string;\r\n address?: Address;\r\n customClass?: string;\r\n fieldReference?: React.RefObject;\r\n customField?: boolean; // @CUSTOM: Identify custom fields before sending to backend\r\n}\r\n\r\nexport enum InputType {\r\n // eslint-disable-next-line @typescript-eslint/no-shadow -- Text enum doesn't override the imported Text\r\n Text = 'text',\r\n Address = 'address',\r\n Email = 'email',\r\n TextArea = 'textarea',\r\n Boolean = 'boolean' // @CUSTOM: BJU custom input type\r\n}\r\n\r\nexport enum InputID {\r\n FirstName = 'FirstName',\r\n LastName = 'LastName',\r\n Email = 'CompanyEmail',\r\n CompanyName = 'CompanyName',\r\n Address = 'CompanyAddress',\r\n JobTitle = 'JobTitle',\r\n Size = 'CompanySize',\r\n Department = 'Department',\r\n Comment = 'Comment',\r\n // @CUSTOM: BJU custom fields\r\n AdministratorName = 'AdministratorName',\r\n AdministratorEmail = 'AdministratorEmail',\r\n TreasurerName = 'TreasurerName',\r\n TreasurerEmail = 'TreasurerEmail',\r\n TreasurerPhone = 'TreasurerPhone',\r\n ChurchSponsor = 'ChurchSponsor',\r\n AdditionalInformation = 'AdditionalInformation'\r\n}\r\n\r\nexport const renderInputSection = (\r\n inputs: IFormItem[],\r\n className: string,\r\n needToReset: boolean,\r\n onInputChange: (event: React.ChangeEvent) => void,\r\n showErrors: boolean,\r\n resources: IBjuOnboardingFormResources, // @CUSTOM: Pass resources for radio button boolean labels\r\n addressForm?: React.ReactNode,\r\n updateAddress?: (errors: boolean, currAddress?: Address) => void\r\n): IBusinessSignUpItem[] => {\r\n return inputs.map((element, index) => {\r\n const { id, type, label, maxChars, isRequired, pattern, customClass, value, fieldReference } = element;\r\n\r\n const baseSignUpItem: IBusinessSignUpItem = {\r\n wrapper: {\r\n className: classnames(className, `${className}-${id}`, customClass)\r\n },\r\n id,\r\n label: ,\r\n errorMessage: \r\n };\r\n\r\n if (type === InputType.Address) {\r\n if (addressForm) {\r\n baseSignUpItem.isAddressInput = true;\r\n baseSignUpItem.input = (\r\n <>\r\n {React.cloneElement(addressForm as React.ReactElement, {\r\n updateForm: updateAddress,\r\n hasError: showErrors,\r\n isRequired: isRequired === undefined ? false : isRequired,\r\n resetAddress: needToReset\r\n })}\r\n \r\n );\r\n } else {\r\n // If the address slot is not filled, remove this input from the form\r\n inputs.splice(index, 1);\r\n }\r\n } else {\r\n baseSignUpItem.input = (\r\n \r\n );\r\n }\r\n\r\n return baseSignUpItem;\r\n });\r\n};\r\n\r\n/**\r\n *\r\n * Business Request Form Modules\r\n * Form that a business can use to submit a request to become a partner with Microsoft.\r\n * @extends {React.Component>}\r\n */\r\nclass BusinessSignUp extends React.Component {\r\n // Used as default data\r\n public BusinessSignUpDefaultInputs: IFormItem[] = [\r\n {\r\n id: InputID.FirstName,\r\n type: InputType.Text,\r\n label: this.props.resources.firstNameLabel,\r\n value: '',\r\n isRequired: true,\r\n customClass: 'width-25'\r\n },\r\n {\r\n id: InputID.LastName,\r\n type: InputType.Text,\r\n label: this.props.resources.lastNameLabel,\r\n value: '',\r\n isRequired: true,\r\n customClass: 'width-25'\r\n },\r\n {\r\n id: InputID.Email,\r\n type: InputType.Email,\r\n label: this.props.resources.emailAddressLabel,\r\n value: '',\r\n isRequired: true,\r\n pattern: EmailRegex.defaultRegex.source,\r\n customClass: 'width-50'\r\n },\r\n {\r\n id: InputID.CompanyName,\r\n type: InputType.Text,\r\n label: this.props.resources.companyLabel,\r\n value: '',\r\n isRequired: true,\r\n customClass: 'width-50'\r\n },\r\n {\r\n id: InputID.Department,\r\n type: InputType.Text,\r\n label: this.props.resources.departmentLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-50'\r\n },\r\n {\r\n id: InputID.JobTitle,\r\n type: InputType.Text,\r\n label: this.props.resources.jobTitleLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-50'\r\n },\r\n {\r\n id: InputID.Size,\r\n type: InputType.Text,\r\n label: this.props.resources.companySizeLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-50'\r\n },\r\n {\r\n id: InputID.Address,\r\n type: InputType.Address,\r\n label: this.props.resources.companyAddressLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-100'\r\n },\r\n // @CUSTOM: Replaced default Comments with combined contents of custom fields\r\n // {\r\n // id: InputID.Comment,\r\n // type: InputType.TextArea,\r\n // label: this.props.resources.commentLabel,\r\n // value: '',\r\n // isRequired: false,\r\n // customClass: 'width-100'\r\n // },\r\n //--------------------------------------------------\r\n // @CUSTOM: BJU custom fields\r\n //--------------------------------------------------\r\n {\r\n id: InputID.AdministratorName,\r\n type: InputType.Text,\r\n label: this.props.resources.administratorNameLabel,\r\n value: '',\r\n isRequired: true,\r\n customClass: 'width-50',\r\n customField: true\r\n },\r\n {\r\n id: InputID.AdministratorEmail,\r\n type: InputType.Email,\r\n label: this.props.resources.administratorEmailLabel,\r\n value: '',\r\n isRequired: true,\r\n pattern: EmailRegex.defaultRegex.source,\r\n customClass: 'width-50',\r\n customField: true\r\n },\r\n {\r\n id: InputID.TreasurerName,\r\n type: InputType.Text,\r\n label: this.props.resources.treasurerNameLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-50',\r\n customField: true\r\n },\r\n {\r\n id: InputID.TreasurerEmail,\r\n type: InputType.Email,\r\n label: this.props.resources.treasurerEmailLabel,\r\n value: '',\r\n isRequired: false,\r\n pattern: EmailRegex.defaultRegex.source,\r\n customClass: 'width-25',\r\n customField: true\r\n },\r\n {\r\n id: InputID.TreasurerPhone,\r\n type: InputType.Text,\r\n label: this.props.resources.treasurerPhoneLabel,\r\n value: '',\r\n isRequired: false,\r\n pattern: PhoneRegex.defaultRegex,\r\n customClass: 'width-25',\r\n customField: true\r\n },\r\n {\r\n id: InputID.ChurchSponsor,\r\n type: InputType.Boolean,\r\n label: this.props.resources.churchSponsorLabel,\r\n value: '',\r\n isRequired: true,\r\n customClass: 'width-100',\r\n customField: true\r\n },\r\n {\r\n id: InputID.AdditionalInformation,\r\n type: InputType.TextArea,\r\n label: this.props.resources.additionalInformationLabel,\r\n value: '',\r\n isRequired: false,\r\n customClass: 'width-100',\r\n customField: true\r\n }\r\n //--------------------------------------------------\r\n ];\r\n\r\n private readonly formChildReference: React.RefObject = React.createRef();\r\n\r\n private readonly moduleClassName: string = 'ms-business-sign-up';\r\n\r\n private needsToReset: boolean = false;\r\n\r\n private readonly telemetryContent: ITelemetryContent;\r\n\r\n constructor(props: IBusinessSignUpExtendedProps) {\r\n super(props);\r\n\r\n this.state = {\r\n isReady: false,\r\n formItems: this.props.formItems || this._addedReference(),\r\n addressHasErrors: false,\r\n showAddressErrors: false,\r\n hasSubmitErrors: false\r\n };\r\n this.telemetryContent = getTelemetryObject(\r\n this.props.context.request.telemetryPageName!,\r\n this.props.friendlyName,\r\n this.props.telemetry\r\n );\r\n }\r\n\r\n public componentDidMount(): void {\r\n this.formChildReference.current?.focus();\r\n }\r\n\r\n public shouldComponentUpdate(nextProps: IBusinessSignUpExtendedProps, nextState: IBusinessState): boolean {\r\n if (this.state === nextState && this.props.data === nextProps.data) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n public render(): JSX.Element {\r\n const { config } = this.props;\r\n const { formItems } = this.state;\r\n const { className, heading} = config; // Extract heading and instructions\r\n const viewProps = {\r\n ...this.props,\r\n businessSignUp: {\r\n moduleProps: this.props,\r\n className: classnames(this.moduleClassName, className)\r\n },\r\n ContainerWrapper: {\r\n className: `${this.moduleClassName}__container`\r\n },\r\n heading: (\r\n \r\n ),\r\n instructions: config.instructions && (\r\n \r\n ),\r\n businessSignUpForm: this._renderForm(),\r\n formItems\r\n };\r\n\r\n return this.props.renderView(viewProps) as React.ReactElement;\r\n }\r\n\r\n\r\n /**\r\n * Handle the heading change event.\r\n * @param event - Content Editable Event.\r\n */\r\n public handleHeadingChange = (event: ContentEditableEvent): void => {\r\n this.props.config.heading.text = event.target.value;\r\n };\r\n public handleInstructionsChange = (event: ContentEditableEvent): void => {\r\n this.props.config.instructions = event.target.value;\r\n };\r\n private _renderForm(): IBusinessSignUpLocalAccount {\r\n const { config, resources, slots } = this.props;\r\n const { showAddressErrors, hasSubmitErrors, isReady, formItems } = this.state;\r\n const {\r\n signUpButtonArialabel,\r\n signUpButtonText,\r\n cancelButtonArialabel,\r\n cancelButtonText,\r\n errorMessage,\r\n partialAddressErrorMessage\r\n } = resources;\r\n const addressForm = (slots && slots.addressSlot && slots.addressSlot.length > 0 && slots.addressSlot[0]) || undefined;\r\n const successPageURL =\r\n (config.confirmationLink && config.confirmationLink.linkUrl && config.confirmationLink.linkUrl.destinationUrl) ||\r\n getUrlSync('home', this.props.context.actionContext);\r\n\r\n const form = {\r\n FormWrapper: {\r\n className: `${this.moduleClassName}__form `\r\n },\r\n items: renderInputSection(\r\n formItems,\r\n `${this.moduleClassName}__form-item`,\r\n this.needsToReset,\r\n this._onInputChange,\r\n showAddressErrors,\r\n resources, // @CUSTOM: Pass resources for radio button boolean labels\r\n addressForm,\r\n this._onAddressChange\r\n ),\r\n buttons: [\r\n ,\r\n \r\n ],\r\n errorMessage: [\r\n hasSubmitErrors && ,\r\n showAddressErrors && (\r\n \r\n )\r\n ],\r\n disclaimer: config.disclaimer && (\r\n \r\n )\r\n };\r\n\r\n if (this.needsToReset) {\r\n this.needsToReset = false;\r\n }\r\n\r\n return form;\r\n }\r\n\r\n private readonly _onInputChange = (event: React.ChangeEvent): void => {\r\n const newForm = this.state.formItems;\r\n newForm.forEach(item => {\r\n if (item.id === event.target.id) {\r\n item.value = event.target.value;\r\n }\r\n });\r\n\r\n // Check if form is ready, update state object with latest values, values have changed so reset hasSubmitErrros\r\n this.setState({\r\n isReady: this._isFormReady(),\r\n formItems: newForm,\r\n hasSubmitErrors: false\r\n });\r\n };\r\n\r\n private _addedReference(): IFormItem[] {\r\n const newFormFields = this.BusinessSignUpDefaultInputs;\r\n newFormFields[0].fieldReference = this.formChildReference;\r\n return newFormFields;\r\n }\r\n\r\n private readonly _onAddressChange = (errors: boolean, currentAddress?: Address): void => {\r\n // Find address item\r\n const newForm = this.state.formItems;\r\n const addressItem = newForm.find(item => {\r\n return item.type === InputType.Address;\r\n });\r\n\r\n // If found --> set to currentAddress\r\n if (addressItem) {\r\n addressItem.address = currentAddress;\r\n\r\n // Update state with new values and set errors to false if address is not required field\r\n this.setState(\r\n {\r\n formItems: newForm,\r\n addressHasErrors: errors,\r\n showAddressErrors: false\r\n },\r\n () => {\r\n this.setState({ isReady: this._isFormReady() });\r\n }\r\n );\r\n }\r\n };\r\n\r\n private readonly _isFormReady = (): boolean => {\r\n const { formItems } = this.state;\r\n\r\n for (const currentInput of formItems) {\r\n // Will return FALSE if:\r\n // - input field is required\r\n // IF is address AND addressHasErrors === true\r\n // ELSE value is undefined OR empty\r\n // OR\r\n // - pattern provided and value does not match pattern\r\n\r\n if (currentInput.isRequired) {\r\n if (currentInput.type === InputType.Address) {\r\n if (this.state.addressHasErrors) {\r\n return false;\r\n }\r\n } else if (currentInput.value === undefined || currentInput.value === '') {\r\n return false;\r\n }\r\n }\r\n if (currentInput.value && currentInput.pattern !== undefined && currentInput.value.match(currentInput.pattern) === null) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n private readonly _onSubmit = (event: React.MouseEvent) => {\r\n if (this.state.addressHasErrors) {\r\n this.setState({\r\n showAddressErrors: true\r\n });\r\n\r\n event.preventDefault();\r\n return;\r\n }\r\n\r\n const { context } = this.props;\r\n\r\n // Check for matching id and if not empty\r\n const firstName = this._getItem(InputID.FirstName);\r\n const lastName = this._getItem(InputID.LastName);\r\n const companyName = this._getItem(InputID.CompanyName);\r\n const companyEmail = this._getItem(InputID.Email);\r\n const companyAddress = this._getItem(InputID.Address, true);\r\n const jobTitle = this._getItem(InputID.JobTitle);\r\n const department = this._getItem(InputID.Department);\r\n const companySize = this._getItem(InputID.Size);\r\n // const comments = this._getItem(InputID.Comment); // @CUSTOM: Replaced default Comments with combined contents of custom fields\r\n\r\n //--------------------------------------------------\r\n // @CUSTOM: Get custom field data and combine\r\n //--------------------------------------------------\r\n const customFields = this.state.formItems.filter(item => item.customField && item.value);\r\n const customArray = customFields.map(field => `${field.id}: ${field.value}`);\r\n const customComment = customArray.join('; ');\r\n //--------------------------------------------------\r\n\r\n // API gets email as part of the address object, but I do not use the email input from the address component, thus we need to copy it over\r\n if (companyEmail && companyEmail.value && companyAddress && companyAddress.address) {\r\n companyAddress.address.Email = companyEmail.value;\r\n }\r\n\r\n const newPartner: BusinessPartnerProspect = {\r\n FirstName: firstName && firstName.value,\r\n LastName: lastName && lastName.value,\r\n CompanyName: companyName && companyName.value,\r\n Address: companyAddress && companyAddress.address && companyAddress.address,\r\n JobTitle: jobTitle && jobTitle.value,\r\n Department: department && department.value,\r\n CompanySize: (companySize && Number.parseInt(companySize.value, 10)) || 0,\r\n // Comments: comments && comments.value // @CUSTOM: Remove for custom fields below\r\n Comments: customComment // @CUSTOM: Replaced default Comments with combined contents of custom fields\r\n };\r\n\r\n // Create business partner request\r\n createProspectAsync({ callerContext: context.actionContext }, newPartner).catch(() => {\r\n this.setState({\r\n hasSubmitErrors: true,\r\n isReady: false\r\n });\r\n });\r\n };\r\n\r\n private readonly _onCancel = () => {\r\n // Reset values of the form\r\n const cleanForm = this.state.formItems;\r\n cleanForm.forEach(input => {\r\n input.value = '';\r\n });\r\n\r\n // Set reset flag so address input will get reset on next renderInputSection() call\r\n this.needsToReset = true;\r\n\r\n this.setState({\r\n isReady: false,\r\n formItems: cleanForm,\r\n addressHasErrors: true,\r\n showAddressErrors: false,\r\n hasSubmitErrors: false\r\n });\r\n };\r\n\r\n private readonly _getItem = (id: string, isAddress: boolean = false) => {\r\n if (isAddress) {\r\n return this.state.formItems.find(item => {\r\n return item.id === id && item.address;\r\n });\r\n }\r\n return this.state.formItems.find(item => {\r\n return item.id === id && item.value !== '';\r\n });\r\n };\r\n}\r\n\r\nexport default BusinessSignUp;\r\n","import * as React from 'react';\r\nimport { Module, Node } from '@msdyn365-commerce-modules/utilities';\r\nimport { IBusinessSignUpItem, IBusinessSignUpViewProps } from './bju-onboarding-form';\r\n\r\nconst BusinessSignUpItem: React.FC = ({ wrapper, label, errorMessage, input, isAddressInput }) => {\r\n // Hide label and error message if rendering address section\r\n return (\r\n \r\n {!isAddressInput && label}\r\n {!isAddressInput && errorMessage}\r\n {input}\r\n \r\n );\r\n};\r\n\r\nconst BusinesSignUpView: React.FC = props => {\r\n const { businessSignUp, ContainerWrapper, businessSignUpForm, heading, instructions } = props;\r\n\r\n const { FormWrapper, buttons, items, errorMessage, disclaimer } = businessSignUpForm;\r\n\r\n return (\r\n \r\n \r\n
\r\n {heading}\r\n {instructions}\r\n
\r\n {/* Rest of the form */}\r\n \r\n {items &&\r\n items.map((item: IBusinessSignUpItem) => {\r\n return ;\r\n })}\r\n {errorMessage &&\r\n errorMessage.map((error: React.ReactNode, index: number) => {\r\n return {error};\r\n })}\r\n {buttons &&\r\n buttons.map((button: React.ReactNode, index: number) => {\r\n return {button};\r\n })}\r\n {disclaimer}\r\n \r\n
\r\n
\r\n );\r\n};\r\n\r\nexport default BusinesSignUpView;\r\n","const binding = { modules: {}, dataActions: {} };\n\n (binding.modules['bju-onboarding-form'] = {\n c: () => require('partner/modules/bju-onboarding-form/bju-onboarding-form.tsx'),\n $type: 'containerModule',\n da: [],\n \n iNM: false,\n ns: '__local__',\n n: 'bju-onboarding-form',\n p: '__local__',\n \n pdp: '',\n \n \n md: 'src/modules/bju-onboarding-form'\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['__local__|__local__|modules|bju-onboarding-form|bju-onboarding-form'] = {\n c: () => require('partner/modules/bju-onboarding-form/bju-onboarding-form.view.tsx'),\n cn: '__local__-__local__-bju-onboarding-form'\n };\nwindow.__bindings__ = window.__bindings__ || {};\nwindow.__bindings__.viewDictionary = {\n ...window.__bindings__.viewDictionary || {},\n ...viewDictionary\n };","module.exports = React;","module.exports = ReactDOM;","'use strict';\nvar call = require('../internals/function-call');\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar isNullOrUndefined = require('../internals/is-null-or-undefined');\nvar toLength = require('../internals/to-length');\nvar toString = require('../internals/to-string');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar getMethod = require('../internals/get-method');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.es/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, MATCH);\n return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@match\n function (string) {\n var rx = anObject(this);\n var S = toString(string);\n var res = maybeCallNative(nativeMatch, rx, S);\n\n if (res.done) return res.value;\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = toString(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n"],"names":["SignUpButton","_ref","id","className","text","ariaLabel","telemetryContent","disabled","link","onClick","payLoad","getPayloadObject","attributes","getTelemetryAttributes","React","Button","Object","assign","role","href","SignUpError","type","message","errorClassName","classnames","GetMaxLength","maxLength","parsedMaxLength","Number","parseInt","isNaN","SignUpInput","value","pattern","isRequired","onChange","fieldReference","resources","formItems","InputType","TextArea","name","Boolean","_formItems$find","inputValue","find","item","booleanTrueLabel","checked","booleanFalseLabel","undefined","ref","SignUpLabel","forId","htmlFor","InputID","renderInputSection","inputs","needToReset","onInputChange","showErrors","addressForm","updateAddress","map","element","index","label","maxChars","customClass","baseSignUpItem","wrapper","errorMessage","Address","isAddressInput","input","updateForm","hasError","resetAddress","splice","BusinessSignUp","constructor","props","_this","super","this","BusinessSignUpDefaultInputs","FirstName","Text","firstNameLabel","LastName","lastNameLabel","Email","emailAddressLabel","EmailRegex","defaultRegex","source","CompanyName","companyLabel","Department","departmentLabel","JobTitle","jobTitleLabel","Size","companySizeLabel","companyAddressLabel","AdministratorName","administratorNameLabel","customField","AdministratorEmail","administratorEmailLabel","TreasurerName","treasurerNameLabel","TreasurerEmail","treasurerEmailLabel","TreasurerPhone","treasurerPhoneLabel","PhoneRegex","ChurchSponsor","churchSponsorLabel","AdditionalInformation","additionalInformationLabel","formChildReference","moduleClassName","needsToReset","handleHeadingChange","event","config","heading","target","handleInstructionsChange","instructions","_onInputChange","newForm","state","forEach","setState","isReady","_isFormReady","hasSubmitErrors","_onAddressChange","errors","currentAddress","addressItem","address","addressHasErrors","showAddressErrors","currentInput","match","_onSubmit","preventDefault","context","firstName","_getItem","lastName","companyName","companyEmail","companyAddress","jobTitle","department","companySize","customComment","filter","field","join","newPartner","CompanySize","Comments","createProspectAsync","callerContext","actionContext","catch","_onCancel","cleanForm","isAddress","arguments","length","_addedReference","getTelemetryObject","request","telemetryPageName","friendlyName","telemetry","componentDidMount","_this$formChildRefere","current","focus","shouldComponentUpdate","nextProps","nextState","data","render","viewProps","_objectSpread","businessSignUp","moduleProps","ContainerWrapper","editProps","onEdit","requestContext","RichTextComponent","businessSignUpForm","_renderForm","renderView","slots","signUpButtonArialabel","signUpButtonText","cancelButtonArialabel","cancelButtonText","partialAddressErrorMessage","addressSlot","successPageURL","confirmationLink","linkUrl","destinationUrl","getUrlSync","form","FormWrapper","items","buttons","key","disclaimer","newFormFields","BusinessSignUpItem","Node","Module","error","button","binding","modules","dataActions","c","require","$type","da","iNM","ns","n","p","pdp","md","window","__bindings__","viewDictionary","cn","module","exports","ReactDOM","call","fixRegExpWellKnownSymbolLogic","anObject","isNullOrUndefined","toLength","toString","requireObjectCoercible","getMethod","advanceStringIndex","regExpExec","MATCH","nativeMatch","maybeCallNative","regexp","O","matcher","RegExp","string","rx","S","res","done","global","fullUnicode","unicode","lastIndex","result","A","matchStr"],"sourceRoot":""}