@sheerid/jslib-nightly 2.114.0-alpha.6 → 2.114.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_mysheerid-preview.css +3 -3
- package/_mysheerid-preview.js +5 -5
- package/chunk/EmailLoopPending-Dtf0p85F.js +3 -3
- package/chunk/EmailLoopPending-Dy8mLFvV.js +3 -3
- package/chunk/LicensedProfessionalOrganizationComponent-BYijEfDT.js +3 -3
- package/chunk/LicensedProfessionalOrganizationComponent-CiYU-2dW.js +3 -3
- package/chunk/Onfido-AyvUk6wg.js +3 -3
- package/chunk/StepIDCheckLoopOnfido-CmNwFqjD.js +3 -3
- package/chunk/StepIDCheckLoopOnfido-DtbplNxs.js +3 -3
- package/chunk/StepIDCheckLoopRegula-RoX971sR.js +3 -3
- package/chunk/StepIDCheckLoopRegula-oqf-QxHT.js +3 -3
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-CTCfr5Y8.js +3 -3
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-D4veFRlW.js +3 -3
- package/chunk/ar-BZsYQiJv.js +3 -3
- package/chunk/bg-DB_ZEB5O.js +3 -3
- package/chunk/bn-IN-D69rNeuh.js +3 -3
- package/chunk/cs-Dk4czWE5.js +3 -3
- package/chunk/da-NesYkkEW.js +3 -3
- package/chunk/de-4yAGb-JC.js +3 -3
- package/chunk/el-D1h3O3E7.js +3 -3
- package/chunk/en-GB-QY9gqmlz.js +3 -3
- package/chunk/es-BYhP2rUk.js +3 -3
- package/chunk/es-ES-BJLdehwH.js +3 -3
- package/chunk/fi-D-Ycqh7I.js +3 -3
- package/chunk/fr-CA-a8W9ZT_A.js +3 -3
- package/chunk/fr-DR25pnXw.js +3 -3
- package/chunk/ga-Bj6efXd2.js +3 -3
- package/chunk/hi-IN-C-u9_T8L.js +3 -3
- package/chunk/hr-B8E9jyUX.js +3 -3
- package/chunk/hu-C7z4yBSK.js +3 -3
- package/chunk/id-AsEkOlRu.js +3 -3
- package/chunk/index-4APUDd8S.js +3 -3
- package/chunk/index-9OD0Bw98.js +3 -3
- package/chunk/index-B-PpnUEO.js +3 -3
- package/chunk/index-B8F8N-JM.js +3 -3
- package/chunk/index-B8KPM--K.js +3 -3
- package/chunk/index-BD2bjH-C.js +3 -3
- package/chunk/index-BD_a0MZT.js +3 -3
- package/chunk/index-BDrKYann.js +3 -3
- package/chunk/index-BORxVuto.js +3 -3
- package/chunk/index-BTMETMEE.js +3 -3
- package/chunk/index-Bi9QXN5x.js +3 -3
- package/chunk/index-Bmq6cJ3F.js +3 -3
- package/chunk/index-BpZoH-Wz.js +3 -3
- package/chunk/index-BuX76GyE.js +3 -3
- package/chunk/index-C2h0Wj84.js +3 -3
- package/chunk/index-C8MQD8EK.js +3 -3
- package/chunk/index-C8u9IJUa.js +3 -3
- package/chunk/index-C96ntS0u.js +3 -3
- package/chunk/index-CHK5i4jj.js +3 -3
- package/chunk/index-CTb96lOK.js +3 -3
- package/chunk/index-CU0rkVHP.js +3 -3
- package/chunk/index-CcRowarb.js +3 -3
- package/chunk/index-CeHu2Npu.js +3 -3
- package/chunk/index-DIkWpujR.js +3 -3
- package/chunk/index-DKWjcFJK.js +3 -3
- package/chunk/index-DLz31Fzh.js +3 -3
- package/chunk/index-DO5Z3e-E.js +3 -3
- package/chunk/index-DRlGAW07.js +3 -3
- package/chunk/index-DVynViqA.js +3 -3
- package/chunk/index-D_9J6arc.js +3 -3
- package/chunk/index-Dg8t7-dm.js +3 -3
- package/chunk/index-DhGg9lvf.js +3 -3
- package/chunk/index-DsgCNIS5.js +3 -3
- package/chunk/index-DvQoVn8P.js +3 -3
- package/chunk/index-DzqRsB7_.js +3 -3
- package/chunk/index-FjzhfDlx.js +3 -3
- package/chunk/index-Gfy-1H7s.js +3 -3
- package/chunk/index-YSVzGeq_.js +3 -3
- package/chunk/index-_t8SsXjy.js +3 -3
- package/chunk/is-PzizLXcv.js +3 -3
- package/chunk/it-CiJeQN1_.js +3 -3
- package/chunk/iw-QHmqNHZP.js +3 -3
- package/chunk/ja-DPgVvasb.js +3 -3
- package/chunk/ko-DykOu1Yp.js +3 -3
- package/chunk/lo-C4bFrJOj.js +3 -3
- package/chunk/lt-KjZ7oOV5.js +3 -3
- package/chunk/ms-CNvzXjsH.js +3 -3
- package/chunk/nl-BE-BXbsNtu2.js +3 -3
- package/chunk/nl-ucuj2G5l.js +3 -3
- package/chunk/no-D8IuXJ7O.js +3 -3
- package/chunk/pl-DvnUkXGb.js +3 -3
- package/chunk/pt-BR-Be00Hx-L.js +3 -3
- package/chunk/pt-DS7isrlt.js +3 -3
- package/chunk/ro-BHCICvJV.js +3 -3
- package/chunk/ru-DUDtL41i.js +3 -3
- package/chunk/sk-O9yqW58Q.js +3 -3
- package/chunk/sl-CxcvfiDu.js +3 -3
- package/chunk/sr-DgvzAvVS.js +3 -3
- package/chunk/sv-BtktR0mm.js +3 -3
- package/chunk/sw-D06YJhji.js +3 -3
- package/chunk/th-C1KZhtMd.js +3 -3
- package/chunk/tr-CqpbTukW.js +3 -3
- package/chunk/uk-BWHH_jN1.js +3 -3
- package/chunk/ur-BHWni4Fn.js +3 -3
- package/chunk/useCollectFieldsEndpoint-C5fsaYJe.js +3 -3
- package/chunk/useCollectFieldsEndpoint-kmLFyUA-.js +3 -3
- package/chunk/useEmailFirstExperiment-BbDrKQEs.js +3 -3
- package/chunk/useEmailFirstExperiment-CgU-itQI.js +3 -3
- package/chunk/vi-DVhQHKtP.js +3 -3
- package/chunk/zh-HK-C-wTSVhL.js +3 -3
- package/chunk/zh-qa3hzwEB.js +3 -3
- package/chunk/zu-DwVIy-bC.js +3 -3
- package/es6.css +3 -3
- package/jslib.js +4 -4
- package/lib/{EmailLoopPending-DZBx_Mbf.js → EmailLoopPending-BEZ_Dlj3.js} +4 -4
- package/lib/{EmailLoopPending-DZBx_Mbf.js.map → EmailLoopPending-BEZ_Dlj3.js.map} +1 -1
- package/lib/{LicensedProfessionalOrganizationComponent-DKs0FPrD.js → LicensedProfessionalOrganizationComponent-CiLyLM4E.js} +4 -4
- package/lib/{LicensedProfessionalOrganizationComponent-DKs0FPrD.js.map → LicensedProfessionalOrganizationComponent-CiLyLM4E.js.map} +1 -1
- package/lib/Onfido-AyvUk6wg.js +3 -3
- package/lib/StepCollectMilitaryStatusComponent-CBsNnlYI.js +11 -0
- package/lib/{StepCollectMilitaryStatusComponent-CKQtZOI1.js.map → StepCollectMilitaryStatusComponent-CBsNnlYI.js.map} +1 -1
- package/lib/{StepIDCheckLoopOnfido-C9yVYjVQ.js → StepIDCheckLoopOnfido-CeW8viJQ.js} +4 -4
- package/lib/{StepIDCheckLoopOnfido-C9yVYjVQ.js.map → StepIDCheckLoopOnfido-CeW8viJQ.js.map} +1 -1
- package/lib/{StepIDCheckLoopRegula-CqZQSBfe.js → StepIDCheckLoopRegula-_rktFGPK.js} +4 -4
- package/lib/{StepIDCheckLoopRegula-CqZQSBfe.js.map → StepIDCheckLoopRegula-_rktFGPK.js.map} +1 -1
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-BCnvvapt.js → StepInactiveMilitaryPersonalInfoComponent-B291irJC.js} +5 -5
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-BCnvvapt.js.map → StepInactiveMilitaryPersonalInfoComponent-B291irJC.js.map} +1 -1
- package/lib/{VerificationApiUtils-TVsND75s.js → VerificationApiUtils-CmspxUTj.js} +4 -4
- package/lib/{VerificationApiUtils-TVsND75s.js.map → VerificationApiUtils-CmspxUTj.js.map} +1 -1
- package/lib/ar-BZsYQiJv.js +3 -3
- package/lib/bg-DB_ZEB5O.js +3 -3
- package/lib/bn-IN-D69rNeuh.js +3 -3
- package/lib/cs-Dk4czWE5.js +3 -3
- package/lib/da-NesYkkEW.js +3 -3
- package/lib/de-4yAGb-JC.js +3 -3
- package/lib/el-D1h3O3E7.js +3 -3
- package/lib/en-GB-QY9gqmlz.js +3 -3
- package/lib/es-BYhP2rUk.js +3 -3
- package/lib/es-ES-BJLdehwH.js +3 -3
- package/lib/{es6-C_99KlFr.js → es6-DUBW_76-.js} +32 -32
- package/lib/{es6-C_99KlFr.js.map → es6-DUBW_76-.js.map} +1 -1
- package/lib/fi-D-Ycqh7I.js +3 -3
- package/lib/fr-CA-a8W9ZT_A.js +3 -3
- package/lib/fr-DR25pnXw.js +3 -3
- package/lib/ga-Bj6efXd2.js +3 -3
- package/lib/hi-IN-C-u9_T8L.js +3 -3
- package/lib/hr-B8E9jyUX.js +3 -3
- package/lib/hu-C7z4yBSK.js +3 -3
- package/lib/id-AsEkOlRu.js +3 -3
- package/lib/index-2x-jGQgB.js +11 -0
- package/lib/index-2x-jGQgB.js.map +1 -0
- package/lib/{index-C_iBLKwH.js → index-B2Hw3ZsD.js} +5 -5
- package/lib/{index-C_iBLKwH.js.map → index-B2Hw3ZsD.js.map} +1 -1
- package/lib/{index-Cs7ijogy.js → index-B4_sYdgH.js} +5 -5
- package/lib/{index-Cs7ijogy.js.map → index-B4_sYdgH.js.map} +1 -1
- package/lib/{index-DuqGb99f.js → index-BC9vWT3e.js} +4 -4
- package/lib/{index-DuqGb99f.js.map → index-BC9vWT3e.js.map} +1 -1
- package/lib/{index-UBQz7Q-3.js → index-BHc2JUsr.js} +4 -4
- package/lib/{index-UBQz7Q-3.js.map → index-BHc2JUsr.js.map} +1 -1
- package/lib/{index-DFXTvQ3I.js → index-BQqU7NVM.js} +5 -5
- package/lib/{index-DFXTvQ3I.js.map → index-BQqU7NVM.js.map} +1 -1
- package/lib/index-BTdDfTkk.js +11 -0
- package/lib/index-BTdDfTkk.js.map +1 -0
- package/lib/index-BciQUTkn.js +11 -0
- package/lib/index-BciQUTkn.js.map +1 -0
- package/lib/{index-BRinhyTK.js → index-BheE-gaj.js} +6 -6
- package/lib/{index-BRinhyTK.js.map → index-BheE-gaj.js.map} +1 -1
- package/lib/index-CFTsl_Kh.js +11 -0
- package/lib/index-CFTsl_Kh.js.map +1 -0
- package/lib/{index-D4Kgldkd.js → index-CQykinUy.js} +4 -4
- package/lib/{index-D4Kgldkd.js.map → index-CQykinUy.js.map} +1 -1
- package/lib/{index-CHNXOSWd.js → index-CSA4r1s3.js} +4 -4
- package/lib/{index-CHNXOSWd.js.map → index-CSA4r1s3.js.map} +1 -1
- package/lib/{index-BAf5uTAB.js → index-CfDDIVQW.js} +5 -5
- package/lib/{index-BAf5uTAB.js.map → index-CfDDIVQW.js.map} +1 -1
- package/lib/{index-EFiv72_1.js → index-CsviUSjm.js} +5 -5
- package/lib/{index-EFiv72_1.js.map → index-CsviUSjm.js.map} +1 -1
- package/lib/{index-D5XLi9m9.js → index-D7lmBvmp.js} +4 -4
- package/lib/{index-D5XLi9m9.js.map → index-D7lmBvmp.js.map} +1 -1
- package/lib/index-DIkWpujR.js +3 -3
- package/lib/{index-lZKxm8AO.js → index-DP0rCK64.js} +4 -4
- package/lib/{index-lZKxm8AO.js.map → index-DP0rCK64.js.map} +1 -1
- package/lib/{index-Dh5LHKxY.js → index-DZoBX4A8.js} +4 -4
- package/lib/{index-Dh5LHKxY.js.map → index-DZoBX4A8.js.map} +1 -1
- package/lib/{index-C4IwazOc.js → index-Dk6pJDlI.js} +4 -4
- package/lib/{index-C4IwazOc.js.map → index-Dk6pJDlI.js.map} +1 -1
- package/lib/{index-DER4wNKW.js → index-DrKfjc-q.js} +5 -5
- package/lib/{index-DER4wNKW.js.map → index-DrKfjc-q.js.map} +1 -1
- package/lib/{index-CmnbmD6-.js → index-JWvyoaUt.js} +6 -6
- package/lib/{index-CmnbmD6-.js.map → index-JWvyoaUt.js.map} +1 -1
- package/lib/{index-hF9oCs2V.js → index-sE-GklWh.js} +5 -5
- package/lib/{index-hF9oCs2V.js.map → index-sE-GklWh.js.map} +1 -1
- package/lib/{index-BR-Zl3Ml.js → index-w7TosKki.js} +4 -4
- package/lib/{index-BR-Zl3Ml.js.map → index-w7TosKki.js.map} +1 -1
- package/lib/{index-BAq-Jq2T.js → index-wjUcY3JV.js} +4 -4
- package/lib/{index-BAq-Jq2T.js.map → index-wjUcY3JV.js.map} +1 -1
- package/lib/is-PzizLXcv.js +3 -3
- package/lib/it-CiJeQN1_.js +3 -3
- package/lib/iw-QHmqNHZP.js +3 -3
- package/lib/ja-DPgVvasb.js +3 -3
- package/lib/ko-DykOu1Yp.js +3 -3
- package/lib/lo-C4bFrJOj.js +3 -3
- package/lib/lt-KjZ7oOV5.js +3 -3
- package/lib/ms-CNvzXjsH.js +3 -3
- package/lib/nl-BE-BXbsNtu2.js +3 -3
- package/lib/nl-ucuj2G5l.js +3 -3
- package/lib/no-D8IuXJ7O.js +3 -3
- package/lib/pl-DvnUkXGb.js +3 -3
- package/lib/pt-BR-Be00Hx-L.js +3 -3
- package/lib/pt-DS7isrlt.js +3 -3
- package/lib/ro-BHCICvJV.js +3 -3
- package/lib/ru-DUDtL41i.js +3 -3
- package/lib/sk-O9yqW58Q.js +3 -3
- package/lib/sl-CxcvfiDu.js +3 -3
- package/lib/sr-DgvzAvVS.js +3 -3
- package/lib/sv-BtktR0mm.js +3 -3
- package/lib/sw-D06YJhji.js +3 -3
- package/lib/th-C1KZhtMd.js +3 -3
- package/lib/tr-CqpbTukW.js +3 -3
- package/lib/uk-BWHH_jN1.js +3 -3
- package/lib/ur-BHWni4Fn.js +3 -3
- package/lib/{useCollectFieldsEndpoint-Dikzi0_r.js → useCollectFieldsEndpoint-NufsNFLB.js} +5 -5
- package/lib/{useCollectFieldsEndpoint-Dikzi0_r.js.map → useCollectFieldsEndpoint-NufsNFLB.js.map} +1 -1
- package/lib/{useEmailFirstExperiment-CrFK19iH.js → useEmailFirstExperiment-mQKoHYe_.js} +4 -4
- package/lib/{useEmailFirstExperiment-CrFK19iH.js.map → useEmailFirstExperiment-mQKoHYe_.js.map} +1 -1
- package/lib/vi-DVhQHKtP.js +3 -3
- package/lib/zh-HK-C-wTSVhL.js +3 -3
- package/lib/zh-qa3hzwEB.js +3 -3
- package/lib/zu-DwVIy-bC.js +3 -3
- package/package.json +1 -1
- package/sheerid-install.css +3 -3
- package/sheerid-install.js +4 -4
- package/sheerid.css +3 -3
- package/sheerid.js +5 -5
- package/types-reference.zip +0 -0
- package/lib/StepCollectMilitaryStatusComponent-CKQtZOI1.js +0 -11
- package/lib/index-2eh3nVLP.js +0 -11
- package/lib/index-2eh3nVLP.js.map +0 -1
- package/lib/index-D_thaigM.js +0 -11
- package/lib/index-D_thaigM.js.map +0 -1
- package/lib/index-Eu6kawQV.js +0 -11
- package/lib/index-Eu6kawQV.js.map +0 -1
- package/lib/index-kVxLgjr8.js +0 -11
- package/lib/index-kVxLgjr8.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-DER4wNKW.js","sources":["../../src/components/StepLicensedProfessionalPersonalInfo/StepLicensedProfessionalPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n CustomFormFieldConfig,\n FormSelectChoice,\n LicensedProfessionalPersonalInfoResponse,\n LicensedProfessionalPersonalInfoViewModel,\n LicensedProfessionalStatus,\n Organization,\n VerificationService,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { StatusComponent as LicensedProfessionalStatusComponent } from \"../FormFields/Status/StatusComponent\";\nimport { LicensedProfessionalOrganizationComponent as LicensedProfessionalOrganization } from \"../FormFields/LicensedProfessionalOrganization/LicensedProfessionalOrganizationComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepLicensedProfessionalPersonalInfoComponentProps {\n verificationService: VerificationService;\n intl: any;\n}\n\ntype DefaultStatusMessages = {\n [key in LicensedProfessionalStatus]: string;\n};\n\nconst defaultStatusMessages: DefaultStatusMessages = {\n LICENSED_COSMETOLOGIST: \"Licensed Cosmetologist\",\n LICENSED_REAL_ESTATE_AGENT: \"Licensed Real Estate Agent\",\n VETERINARIAN: \"Veterinarian\",\n CHILD_CARE_WORKER: \"Child Care Worker\",\n LIBRARIAN: \"Librarian\",\n INTERIOR_DESIGNER: \"Interior Designer\",\n ARCHITECT: \"Architect\",\n GENERAL_CONTRACTOR: \"General Contractor\",\n NUTRITION_PROFESSIONAL: \"Nutrition Professional\",\n};\n\nconst StepLicensedProfessionalPersonalInfo = ({\n intl,\n verificationService,\n}: StepLicensedProfessionalPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as LicensedProfessionalPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as LicensedProfessionalPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n const updateLicensedProfessionalViewModel = (\n key: keyof LicensedProfessionalPersonalInfoViewModel,\n value: any,\n ) => {\n const nextState: LicensedProfessionalPersonalInfoViewModel = produce(\n viewModel,\n (draft: LicensedProfessionalPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const getStatusLabel = (status: LicensedProfessionalStatus | undefined): string => {\n if (!status) {\n return \"\";\n }\n return intl.formatHTMLMessage({ id: status, defaultMessage: defaultStatusMessages[status] });\n };\n\n const getAvailableLicensedProfessionalStatuses = () => {\n const availableStatusesResponse = verificationResponse.availableStatuses;\n const availableStatuses: FormSelectChoice[] = [];\n\n if (availableStatusesResponse) {\n for (const status of availableStatusesResponse) {\n availableStatuses.push({\n value: status,\n label: getStatusLabel(status),\n });\n }\n }\n return availableStatuses;\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"licensed-professional\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <LicensedProfessionalStatusComponent\n segmentId=\"licensed-professional\"\n value={{\n value: viewModel.statuses ? viewModel.statuses[0] : \"\",\n label: viewModel.statuses ? getStatusLabel(viewModel.statuses[0]) : \"\",\n }}\n isErrored={!!fieldValidationErrors.statuses}\n options={getAvailableLicensedProfessionalStatuses()}\n disabled={getFieldConfigByFieldId(\"statuses\")?.disabled}\n onChange={(status: FormSelectChoice) => {\n const updatedStatuses = status ? [status.value as string] : [];\n updateLicensedProfessionalViewModel(\"statuses\", updatedStatuses);\n updateFieldValidationErrorsByFieldId(\n \"statuses\",\n status ? (status.value as string) : \"\",\n verificationService,\n );\n }}\n />\n <LicensedProfessionalOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={\n (verificationService.viewModel as LicensedProfessionalPersonalInfoViewModel).organization\n }\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n />\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n explanation={\n <FormattedHTMLMessage\n id=\"postalCodeExplanation\"\n defaultMessage=\"Use the location on file with your licensing body\"\n />\n }\n />\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectLicensedProfessionalPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Licensed Professional Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepLicensedProfessionalPersonalInfoComponent = injectIntl(\n StepLicensedProfessionalPersonalInfo,\n);\n"],"names":["defaultStatusMessages","StepLicensedProfessionalPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","locale","options","getOptions","updateLicensedProfessionalViewModel","key","value","nextState","produce","draft","getStatusLabel","status","getAvailableLicensedProfessionalStatuses","availableStatusesResponse","availableStatuses","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","LicensedProfessionalStatusComponent","_b","updatedStatuses","updateFieldValidationErrorsByFieldId","LicensedProfessionalOrganization","choice","updateViewModelOrganization","_c","FirstName","_d","newValue","LastName","_e","BirthDate","_f","PostalCodeComponent","_g","FormattedHTMLMessage","Email","event","handleEmailOnKeyDown","_h","PhoneNumber","_i","config","FormFieldCustom","MarketConsentWrapper","_j","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepLicensedProfessionalPersonalInfoComponent","injectIntl"],"mappings":";;;AAiDA,MAAMA,IAA+C;AAAA,EACnD,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,wBAAwB;AAC1B,GAEMC,IAAuC,CAAC;AAAA,EAC5C,MAAAC;AAAA,EACA,qBAAAC;AACF,MAA0D;;AACxD,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAE/DG,IAASL,EAAU,aAAa,OAChCM,IAAUC,EAAW,GAErBC,IAAsC,CAC1CC,GACAC,MACG;AACH,UAAMC,IAAuDC;AAAAA,MAC3DZ;AAAA,MACA,CAACa,MAAqD;AACnD,QAAAA,EAAMJ,CAAG,IAAYC;AA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AA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA1D;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEkB,gBAAAA,EAAA;AAAA,cAACuB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEac,KAAgDC;AAAA,EAC3D9D;AACF;"}
|
1
|
+
{"version":3,"file":"index-DrKfjc-q.js","sources":["../../src/components/StepLicensedProfessionalPersonalInfo/StepLicensedProfessionalPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n CustomFormFieldConfig,\n FormSelectChoice,\n LicensedProfessionalPersonalInfoResponse,\n LicensedProfessionalPersonalInfoViewModel,\n LicensedProfessionalStatus,\n Organization,\n VerificationService,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { StatusComponent as LicensedProfessionalStatusComponent } from \"../FormFields/Status/StatusComponent\";\nimport { LicensedProfessionalOrganizationComponent as LicensedProfessionalOrganization } from \"../FormFields/LicensedProfessionalOrganization/LicensedProfessionalOrganizationComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepLicensedProfessionalPersonalInfoComponentProps {\n verificationService: VerificationService;\n intl: any;\n}\n\ntype DefaultStatusMessages = {\n [key in LicensedProfessionalStatus]: string;\n};\n\nconst defaultStatusMessages: DefaultStatusMessages = {\n LICENSED_COSMETOLOGIST: \"Licensed Cosmetologist\",\n LICENSED_REAL_ESTATE_AGENT: \"Licensed Real Estate Agent\",\n VETERINARIAN: \"Veterinarian\",\n CHILD_CARE_WORKER: \"Child Care Worker\",\n LIBRARIAN: \"Librarian\",\n INTERIOR_DESIGNER: \"Interior Designer\",\n ARCHITECT: \"Architect\",\n GENERAL_CONTRACTOR: \"General Contractor\",\n NUTRITION_PROFESSIONAL: \"Nutrition Professional\",\n};\n\nconst StepLicensedProfessionalPersonalInfo = ({\n intl,\n verificationService,\n}: StepLicensedProfessionalPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as LicensedProfessionalPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as LicensedProfessionalPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n const updateLicensedProfessionalViewModel = (\n key: keyof LicensedProfessionalPersonalInfoViewModel,\n value: any,\n ) => {\n const nextState: LicensedProfessionalPersonalInfoViewModel = produce(\n viewModel,\n (draft: LicensedProfessionalPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const getStatusLabel = (status: LicensedProfessionalStatus | undefined): string => {\n if (!status) {\n return \"\";\n }\n return intl.formatHTMLMessage({ id: status, defaultMessage: defaultStatusMessages[status] });\n };\n\n const getAvailableLicensedProfessionalStatuses = () => {\n const availableStatusesResponse = verificationResponse.availableStatuses;\n const availableStatuses: FormSelectChoice[] = [];\n\n if (availableStatusesResponse) {\n for (const status of availableStatusesResponse) {\n availableStatuses.push({\n value: status,\n label: getStatusLabel(status),\n });\n }\n }\n return availableStatuses;\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"licensed-professional\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <LicensedProfessionalStatusComponent\n segmentId=\"licensed-professional\"\n value={{\n value: viewModel.statuses ? viewModel.statuses[0] : \"\",\n label: viewModel.statuses ? getStatusLabel(viewModel.statuses[0]) : \"\",\n }}\n isErrored={!!fieldValidationErrors.statuses}\n options={getAvailableLicensedProfessionalStatuses()}\n disabled={getFieldConfigByFieldId(\"statuses\")?.disabled}\n onChange={(status: FormSelectChoice) => {\n const updatedStatuses = status ? [status.value as string] : [];\n updateLicensedProfessionalViewModel(\"statuses\", updatedStatuses);\n updateFieldValidationErrorsByFieldId(\n \"statuses\",\n status ? (status.value as string) : \"\",\n verificationService,\n );\n }}\n />\n <LicensedProfessionalOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={\n (verificationService.viewModel as LicensedProfessionalPersonalInfoViewModel).organization\n }\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n />\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n explanation={\n <FormattedHTMLMessage\n id=\"postalCodeExplanation\"\n defaultMessage=\"Use the location on file with your licensing body\"\n />\n }\n />\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateLicensedProfessionalViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectLicensedProfessionalPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Licensed Professional Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepLicensedProfessionalPersonalInfoComponent = injectIntl(\n StepLicensedProfessionalPersonalInfo,\n);\n"],"names":["defaultStatusMessages","StepLicensedProfessionalPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","locale","options","getOptions","updateLicensedProfessionalViewModel","key","value","nextState","produce","draft","getStatusLabel","status","getAvailableLicensedProfessionalStatuses","availableStatusesResponse","availableStatuses","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","LicensedProfessionalStatusComponent","_b","updatedStatuses","updateFieldValidationErrorsByFieldId","LicensedProfessionalOrganization","choice","updateViewModelOrganization","_c","FirstName","_d","newValue","LastName","_e","BirthDate","_f","PostalCodeComponent","_g","FormattedHTMLMessage","Email","event","handleEmailOnKeyDown","_h","PhoneNumber","_i","config","FormFieldCustom","MarketConsentWrapper","_j","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepLicensedProfessionalPersonalInfoComponent","injectIntl"],"mappings":";;;AAiDA,MAAMA,IAA+C;AAAA,EACnD,wBAAwB;AAAA,EACxB,4BAA4B;AAAA,EAC5B,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,WAAW;AAAA,EACX,oBAAoB;AAAA,EACpB,wBAAwB;AAC1B,GAEMC,IAAuC,CAAC;AAAA,EAC5C,MAAAC;AAAA,EACA,qBAAAC;AACF,MAA0D;;AACxD,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAE/DG,IAASL,EAAU,aAAa,OAChCM,IAAUC,EAAW,GAErBC,IAAsC,CAC1CC,GACAC,MACG;AACH,UAAMC,IAAuDC;AAAAA,MAC3DZ;AAAA,MACA,CAACa,MAAqD;AACnD,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAX,EAAoB,gBAAgBY,CAAS;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AAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEkB,gBAAAA,EAAA;AAAA,cAACuB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEac,KAAgDC;AAAA,EAC3D9D;AACF;"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.114.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE: Thu Jul 03 2025 01:
|
3
|
+
* VERSION: 2.114.0-alpha.7
|
4
|
+
* BUILD_TIMESTAMP: 1751507593391
|
5
|
+
* BUILD_DATE: Thu Jul 03 2025 01:53:13 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: d84b30bf8adccbad6cb5930a1a4341149780d3cf
|
7
7
|
*/
|
8
|
-
import { k as _, j as s, M as U, m as Y, al as $, E as F, f as l, u as t, N as G, w as X, a1 as Z, ab as J, av as Q, ap as S, aw as v, a3 as ee, O as ae, T as se, a4 as oe, W as le, n as ne, X as te, a5 as de, Y as re, Z as me, _ as ie, o as pe, V as ue, aa as be, ax as Ce } from "./es6-
|
8
|
+
import { k as _, j as s, M as U, m as Y, al as $, E as F, f as l, u as t, N as G, w as X, a1 as Z, ab as J, av as Q, ap as S, aw as v, a3 as ee, O as ae, T as se, a4 as oe, W as le, n as ne, X as te, a5 as de, Y as re, Z as me, _ as ie, o as pe, V as ue, aa as be, ax as Ce } from "./es6-DUBW_76-.js";
|
9
9
|
import ge from "react";
|
10
10
|
import { injectIntl as xe, FormattedHTMLMessage as r } from "react-intl";
|
11
|
-
import { u as he } from "./useCollectFieldsEndpoint-
|
12
|
-
import { u as Me, E as Ee } from "./useEmailFirstExperiment-
|
11
|
+
import { u as he } from "./useCollectFieldsEndpoint-NufsNFLB.js";
|
12
|
+
import { u as Me, E as Ee } from "./useEmailFirstExperiment-mQKoHYe_.js";
|
13
13
|
const Ie = {
|
14
14
|
AT: "gbrNummer",
|
15
15
|
ES: "numeroColegiado",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-CmnbmD6-.js","sources":["../../src/components/StepMedicalProfessionalPersonalInfo/StepMedicalProfessionalPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport {\n VerificationStepsEnum,\n MedicalProfessionalStatusDefaultMessagesEnum,\n} from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n FormSelectChoice,\n Organization,\n MedicalProfessionalPersonalInfoViewModel,\n MedicalProfessionalPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n produceDraftViewModel,\n getStatusLabel,\n getAvailableMedicalStatuses,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { StatusComponent as MedicalStatus } from \"../FormFields/Status/StatusComponent\";\nimport { MedicalProfessionalOrganizationComponent as MedicalProfessionalOrganization } from \"../FormFields/MedicalProfessionalOrganization/MedicalProfessionalOrganizationComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { MemberIdComponent as MemberId } from \"../FormFields/MemberId/MemberIdComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\n\ninterface StepMedicalProfessionalPersonalInfoComponentProps {\n verificationService: VerificationService;\n intl: any;\n}\n\ntype MemberIdFieldType =\n | \"registrationNumber\"\n | \"numeroColegiado\"\n | \"autorisationsId\"\n | \"globalLocationNumber\"\n | \"gbrNummer\";\n\nconst memberIdMessageKeysByCountry: Record<string, MemberIdFieldType> = {\n AT: \"gbrNummer\",\n ES: \"numeroColegiado\",\n DK: \"autorisationsId\",\n CH: \"globalLocationNumber\",\n IE: \"registrationNumber\",\n GB: \"registrationNumber\",\n};\n\nconst getMemberIdMessageKeys = (country: string) => {\n const memberIdFieldType: MemberIdFieldType =\n memberIdMessageKeysByCountry[country] || \"registrationNumber\";\n return {\n labelKey: `step.collectMedicalPersonalInfo.${memberIdFieldType}Label`,\n explanationKey: `step.collectMedicalPersonalInfo.${memberIdFieldType}Explanation`,\n };\n};\n\nexport const StepMedicalProfessionalPersonalInfo = ({\n intl,\n verificationService,\n}: StepMedicalProfessionalPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MedicalProfessionalPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MedicalProfessionalPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const locale = viewModel.localeChoice.value;\n\n const updateMedicalProfessionalViewModel = (\n key: keyof MedicalProfessionalPersonalInfoViewModel,\n value: any,\n ) => {\n const nextState = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldOptional } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n });\n const shouldRenderMemberId = isFieldOptional(\"memberId\");\n\n // #region collect-info-step-email-first\n\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n enableFormFields,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n // #endregion collect-info-step-email-first\n\n React.useEffect(() => {\n // If the memberId field is not rendered, we shouldn't validate it\n // partially update to avoid clobbering the rest of the viewModel\n if (shouldRenderMemberId) {\n verificationService.updateViewModel({ fieldsToSkipValidation: [] }, { partial: true });\n } else {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [\"memberId\"] },\n { partial: true },\n );\n }\n }, [shouldRenderMemberId]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"medical-personal-info\"\n />\n\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"transform-scale\">\n <LoadingSpinnerComponent />\n </div>\n </div>\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal email address is recommended\"\n />\n }\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n )\n // #endregion email-first-experiment\n }\n {showEmailLookupResponseMessages && emailLookupResponse && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <MedicalStatus\n segmentId=\"medical\"\n value={{\n value: viewModel.status,\n label: getStatusLabel(\n intl,\n viewModel.status,\n MedicalProfessionalStatusDefaultMessagesEnum,\n ),\n }}\n isErrored={!!fieldValidationErrors.status}\n options={getAvailableMedicalStatuses(intl, verificationResponse.availableStatuses)}\n disabled={getFieldConfigByFieldId(\"status\")?.disabled}\n onChange={(status: FormSelectChoice) => {\n updateMedicalProfessionalViewModel(\"status\", status ? (status.value as string) : \"\");\n updateFieldValidationErrorsByFieldId(\n \"status\",\n status ? (status.value as string) : \"\",\n verificationService,\n );\n }}\n />\n <MedicalProfessionalOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={\n (verificationService.viewModel as MedicalProfessionalPersonalInfoViewModel)\n .organization\n }\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n />\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n explanation={\n <FormattedHTMLMessage\n id=\"postalCodeExplanation\"\n defaultMessage=\"Use the location on file with your licensing body\"\n />\n }\n />\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n )}\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n {shouldRenderMemberId && (\n <MemberId\n value={viewModel.memberId}\n isErrored={!!fieldValidationErrors.memberId}\n isRequired={getFieldConfigByFieldId(\"memberId\")?.requireIfOptional}\n disabled={getFieldConfigByFieldId(\"memberId\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"memberId\", newValue);\n updateFieldValidationErrorsByFieldId(\"memberId\", newValue, verificationService);\n }}\n explanation={\n <FormattedHTMLMessage\n id={getMemberIdMessageKeys(viewModel.country).explanationKey}\n defaultMessage=\"Your Professional Membership Registration Number\"\n />\n }\n label={\n <FormattedHTMLMessage\n id={getMemberIdMessageKeys(viewModel.country).labelKey}\n defaultMessage=\"Registration Number\"\n />\n }\n />\n )}\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\n \"marketConsentValue\",\n newValue,\n verificationService,\n );\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMedicalProfessionalPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Medical Professional Status\"\n />\n }\n />\n </div>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMedicalProfessionalPersonalInfoComponent = injectIntl(\n StepMedicalProfessionalPersonalInfo,\n);\n"],"names":["memberIdMessageKeysByCountry","getMemberIdMessageKeys","country","memberIdFieldType","StepMedicalProfessionalPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","locale","updateMedicalProfessionalViewModel","key","value","nextState","produceDraftViewModel","isFieldOptional","useCollectFieldsEndpoint","shouldRenderMemberId","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","enableFormFields","handleOnClickProceedHere","useEmailFirstExperiment","React","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","LoadingSpinnerComponent","Email","FormattedHTMLMessage","newValue","updateFieldValidationErrorsByFieldId","_a","getFieldConfigByFieldId","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_b","MedicalStatus","getStatusLabel","MedicalProfessionalStatusDefaultMessagesEnum","getAvailableMedicalStatuses","_c","status","MedicalProfessionalOrganization","choice","updateViewModelOrganization","_d","FirstName","_e","LastName","_f","BirthDate","_g","PostalCode","_h","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","MemberId","_k","_l","config","FormFieldCustom","MarketConsentWrapper","_m","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMedicalProfessionalPersonalInfoComponent","injectIntl"],"mappings":";;;;;AAgEA,MAAMA,KAAkE;AAAA,E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AA5C,gBAAAkC,EAA+C;AAAA,YAAA;AAAA,UAC3D;AAAA,UACC1C,gBAAAA,EAAAA,IAAA2C,IAAA,EAAa,qBAAA1E,GAA0C,QAAO,qBAAqB,CAAA;AAAA,UACpF+B,gBAAAA,EAAA;AAAA,YAAC4C;AAAA,YAAA;AAAA,cACC,MAAMC,GAAsB;AAAA,cAC5B,qBAAA5E;AAAA,cACA,WAAAC;AAAA,cACA,oBAAAG;AAAA,cACA,YACE2B,gBAAAA,EAAA;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEa0C,KAA+CC;AAAA,EAC1DhF;AACF;"}
|
1
|
+
{"version":3,"file":"index-JWvyoaUt.js","sources":["../../src/components/StepMedicalProfessionalPersonalInfo/StepMedicalProfessionalPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport {\n VerificationStepsEnum,\n MedicalProfessionalStatusDefaultMessagesEnum,\n} from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n FormSelectChoice,\n Organization,\n MedicalProfessionalPersonalInfoViewModel,\n MedicalProfessionalPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n produceDraftViewModel,\n getStatusLabel,\n getAvailableMedicalStatuses,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { StatusComponent as MedicalStatus } from \"../FormFields/Status/StatusComponent\";\nimport { MedicalProfessionalOrganizationComponent as MedicalProfessionalOrganization } from \"../FormFields/MedicalProfessionalOrganization/MedicalProfessionalOrganizationComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { MemberIdComponent as MemberId } from \"../FormFields/MemberId/MemberIdComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\n\ninterface StepMedicalProfessionalPersonalInfoComponentProps {\n verificationService: VerificationService;\n intl: any;\n}\n\ntype MemberIdFieldType =\n | \"registrationNumber\"\n | \"numeroColegiado\"\n | \"autorisationsId\"\n | \"globalLocationNumber\"\n | \"gbrNummer\";\n\nconst memberIdMessageKeysByCountry: Record<string, MemberIdFieldType> = {\n AT: \"gbrNummer\",\n ES: \"numeroColegiado\",\n DK: \"autorisationsId\",\n CH: \"globalLocationNumber\",\n IE: \"registrationNumber\",\n GB: \"registrationNumber\",\n};\n\nconst getMemberIdMessageKeys = (country: string) => {\n const memberIdFieldType: MemberIdFieldType =\n memberIdMessageKeysByCountry[country] || \"registrationNumber\";\n return {\n labelKey: `step.collectMedicalPersonalInfo.${memberIdFieldType}Label`,\n explanationKey: `step.collectMedicalPersonalInfo.${memberIdFieldType}Explanation`,\n };\n};\n\nexport const StepMedicalProfessionalPersonalInfo = ({\n intl,\n verificationService,\n}: StepMedicalProfessionalPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MedicalProfessionalPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MedicalProfessionalPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const locale = viewModel.localeChoice.value;\n\n const updateMedicalProfessionalViewModel = (\n key: keyof MedicalProfessionalPersonalInfoViewModel,\n value: any,\n ) => {\n const nextState = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldOptional } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n });\n const shouldRenderMemberId = isFieldOptional(\"memberId\");\n\n // #region collect-info-step-email-first\n\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n enableFormFields,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n // #endregion collect-info-step-email-first\n\n React.useEffect(() => {\n // If the memberId field is not rendered, we shouldn't validate it\n // partially update to avoid clobbering the rest of the viewModel\n if (shouldRenderMemberId) {\n verificationService.updateViewModel({ fieldsToSkipValidation: [] }, { partial: true });\n } else {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [\"memberId\"] },\n { partial: true },\n );\n }\n }, [shouldRenderMemberId]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"medical-personal-info\"\n />\n\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"transform-scale\">\n <LoadingSpinnerComponent />\n </div>\n </div>\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal email address is recommended\"\n />\n }\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n )\n // #endregion email-first-experiment\n }\n {showEmailLookupResponseMessages && emailLookupResponse && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <MedicalStatus\n segmentId=\"medical\"\n value={{\n value: viewModel.status,\n label: getStatusLabel(\n intl,\n viewModel.status,\n MedicalProfessionalStatusDefaultMessagesEnum,\n ),\n }}\n isErrored={!!fieldValidationErrors.status}\n options={getAvailableMedicalStatuses(intl, verificationResponse.availableStatuses)}\n disabled={getFieldConfigByFieldId(\"status\")?.disabled}\n onChange={(status: FormSelectChoice) => {\n updateMedicalProfessionalViewModel(\"status\", status ? (status.value as string) : \"\");\n updateFieldValidationErrorsByFieldId(\n \"status\",\n status ? (status.value as string) : \"\",\n verificationService,\n );\n }}\n />\n <MedicalProfessionalOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={\n (verificationService.viewModel as MedicalProfessionalPersonalInfoViewModel)\n .organization\n }\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n />\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n explanation={\n <FormattedHTMLMessage\n id=\"postalCodeExplanation\"\n defaultMessage=\"Use the location on file with your licensing body\"\n />\n }\n />\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n )}\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n {shouldRenderMemberId && (\n <MemberId\n value={viewModel.memberId}\n isErrored={!!fieldValidationErrors.memberId}\n isRequired={getFieldConfigByFieldId(\"memberId\")?.requireIfOptional}\n disabled={getFieldConfigByFieldId(\"memberId\")?.disabled}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"memberId\", newValue);\n updateFieldValidationErrorsByFieldId(\"memberId\", newValue, verificationService);\n }}\n explanation={\n <FormattedHTMLMessage\n id={getMemberIdMessageKeys(viewModel.country).explanationKey}\n defaultMessage=\"Your Professional Membership Registration Number\"\n />\n }\n label={\n <FormattedHTMLMessage\n id={getMemberIdMessageKeys(viewModel.country).labelKey}\n defaultMessage=\"Registration Number\"\n />\n }\n />\n )}\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMedicalProfessionalViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\n \"marketConsentValue\",\n newValue,\n verificationService,\n );\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMedicalProfessionalPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Medical Professional Status\"\n />\n }\n />\n </div>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMedicalProfessionalPersonalInfoComponent = injectIntl(\n StepMedicalProfessionalPersonalInfo,\n);\n"],"names":["memberIdMessageKeysByCountry","getMemberIdMessageKeys","country","memberIdFieldType","StepMedicalProfessionalPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","locale","updateMedicalProfessionalViewModel","key","value","nextState","produceDraftViewModel","isFieldOptional","useCollectFieldsEndpoint","shouldRenderMemberId","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","enableFormFields","handleOnClickProceedHere","useEmailFirstExperiment","React","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","LoadingSpinnerComponent","Email","FormattedHTMLMessage","newValue","updateFieldValidationErrorsByFieldId","_a","getFieldConfigByFieldId","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_b","MedicalStatus","getStatusLabel","MedicalProfessionalStatusDefaultMessagesEnum","getAvailableMedicalStatuses","_c","status","MedicalProfessionalOrganization","choice","updateViewModelOrganization","_d","FirstName","_e","LastName","_f","BirthDate","_g","PostalCode","_h","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","MemberId","_k","_l","config","FormFieldCustom","MarketConsentWrapper","_m","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMedicalProfessionalPersonalInfoComponent","injectIntl"],"mappings":";;;;;AAgEA,MAAMA,KAAkE;AAAA,EACtE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAEMC,IAAyB,CAACC,MAAoB;AAC5C,QAAAC,IACJH,GAA6BE,CAAO,KAAK;AACpC,SAAA;AAAA,IACL,UAAU,mCAAmCC,CAAiB;AAAA,IAC9D,gBAAgB,mCAAmCA,CAAiB;AAAA,EACtE;AACF,GAEaC,KAAsC,CAAC;AAAA,EAClD,MAAAC;AAAA,EACA,qBAAAC;AACF,MAAyD;;AACvD,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GAErBC,IAASP,EAAU,aAAa,OAEhCQ,IAAqC,CACzCC,GACAC,MACG;AACH,UAAMC,IAAYC,GAAsBZ,GAAWS,GAAKC,CAAK;AAC7D,IAAAX,EAAoB,gBAAgBY,CAAS;AAAA,EAC/C,GAEM,EAAE,iBAAAE,EAAgB,IAAIC,GAAyB;AAAA,IACnD,gBAAgBZ,EAAqB;AAAA,IACrC,aAAaA,EAAqB;AAAA,IAClC,WAAAF;AAAA,EAAA,CACD,GACKe,IAAuBF,EAAgB,UAAU,GAIjD;AAAA,IACJ,cAAAG;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_COMMIT: d84b30bf8adccbad6cb5930a1a4341149780d3cf
|
7
7
|
*/
|
8
|
-
import { k as V, a7 as k, a8 as A, i as q, u as d, j as o, M as B, N as L, m as U, w as W, a1 as w, f as r, O, T as _, a4 as H, a9 as K, U as X, W as Y, E as Z, n as z, X as G, Y as J, Z as Q, _ as $, o as S, V as v, aa as ee } from "./es6-
|
8
|
+
import { k as V, a7 as k, a8 as A, i as q, u as d, j as o, M as B, N as L, m as U, w as W, a1 as w, f as r, O, T as _, a4 as H, a9 as K, U as X, W as Y, E as Z, n as z, X as G, Y as J, Z as Q, _ as $, o as S, V as v, aa as ee } from "./es6-DUBW_76-.js";
|
9
9
|
import se from "react";
|
10
10
|
import { injectIntl as ae, FormattedHTMLMessage as oe } from "react-intl";
|
11
|
-
import { u as te } from "./useCollectFieldsEndpoint-
|
11
|
+
import { u as te } from "./useCollectFieldsEndpoint-NufsNFLB.js";
|
12
12
|
const de = ({ verificationService: s, intl: j }) => {
|
13
13
|
var p, C, h, b, i, N, g, x, y;
|
14
14
|
const a = s.viewModel, { fieldValidationErrors: t } = s, l = s.verificationResponse, E = V(l), I = k(
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-hF9oCs2V.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\nimport {\n VerificationService,\n AgePersonalInfoViewModel,\n AgePersonalInfoResponse,\n FormSelectChoice,\n Country,\n FieldDescription,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepAgePersonalInfoComponentProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepAgePersonalInfo = ({ verificationService, intl }: StepAgePersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as AgePersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as AgePersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const countryChoices: FormSelectChoice<Country, string>[] = getAvailableCountryChoices(\n verificationService.programTheme,\n intl,\n );\n const defaultCountryChoice: FormSelectChoice<Country, string> =\n getDefaultCountryChoice(countryChoices);\n const safeCountryValue = getSafe(() => viewModel.countryChoice.value, defaultCountryChoice.value);\n const defaultRequiredFields: FieldDescription[] =\n safeCountryValue === \"US\" ? [{ key: \"postalCode\" }] : [];\n\n // PhoneNumber is required for all non-US age programs and if smsLoop is enabled.\n const showPhoneNumber =\n safeCountryValue !== \"US\" ||\n verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled;\n const phoneNumberRequired =\n safeCountryValue !== \"US\" || verificationService.programTheme.smsLoopEnabled;\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n if (\n !fieldValidationErrors.phoneNumber &&\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"invalidPhoneNumber\")\n ) {\n verificationService.updateFieldValidationErrors({\n ...fieldValidationErrors,\n phoneNumber: \"invalidPhoneNumber\",\n });\n }\n\n const updateAgeViewModel = (key: keyof AgePersonalInfoViewModel, value: any) => {\n const nextState: AgePersonalInfoViewModel = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldRequired } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n defaultRequiredFields,\n });\n\n React.useEffect(() => {\n // When country changes re-check the phone number validation\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", viewModel.phoneNumber, verificationService);\n }, [viewModel.country]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader verificationService={verificationService} classNameIdentifier=\"age\" />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateAgeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n {isFieldRequired(\"city\") && (\n <CityComponent\n value={viewModel.city}\n isRequired\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n onChange={(value) => {\n updateAgeViewModel(\"city\", value);\n updateFieldValidationErrorsByFieldId(\"city\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"address1\") && (\n <AddressComponent\n value={viewModel.address1}\n isRequired\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(value) => {\n updateAgeViewModel(\"address1\", value);\n updateFieldValidationErrorsByFieldId(\"address1\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"postalCode\") && (\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateAgeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n onChange={(newValue) => {\n updateAgeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {showPhoneNumber ? (\n <PhoneNumber\n isRequired={phoneNumberRequired}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateAgeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateAgeViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectAgePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify and continue\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepAgePersonalInfoComponent = injectIntl(StepAgePersonalInfo);\n"],"names":["StepAgePersonalInfo","verificationService","intl","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","countryChoices","getAvailableCountryChoices","defaultCountryChoice","getDefaultCountryChoice","safeCountryValue","getSafe","defaultRequiredFields","showPhoneNumber","phoneNumberRequired","locale","options","getOptions","updateAgeViewModel","key","value","nextState","produceDraftViewModel","isFieldRequired","useCollectFieldsEndpoint","React","updateFieldValidationErrorsByFieldId","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","FirstName","_b","newValue","LastName","_c","BirthDate","_d","CityComponent","_e","AddressComponent","PostalCode","_f","Email","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","config","FormFieldCustom","MarketConsentWrapper","_i","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormattedHTMLMessage","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;AAqDA,MAAMA,KAAsB,CAAC,EAAE,qBAAAC,GAAqB,MAAAC,QAA8C;;AAChG,QAAMC,IAAYF,EAAoB,WAChC,EAAE,uBAAAG,MAA0BH,GAC5BI,IAAuBJ,EAAoB,sBAC3CK,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAsDC;AAAA,IAC1DR,EAAoB;AAAA,IACpBC;AAAA,EACF,GACMQ,IACJC,EAAwBH,CAAc,GAClCI,IAAmBC,EAAQ,MAAMV,EAAU,cAAc,OAAOO,EAAqB,KAAK,GAC1FI,IACJF,MAAqB,OAAO,CAAC,EAAE,KAAK,aAAc,CAAA,IAAI,CAAC,GAGnDG,IACJH,MAAqB,QACrBX,EAAoB,aAAa,2BACjCA,EAAoB,aAAa,gBAC7Be,IACJJ,MAAqB,QAAQX,EAAoB,aAAa,gBAE1DgB,IAASd,EAAU,aAAa,OAChCe,IAAUC,EAAW;AAGzB,EAAA,CAACf,EAAsB,eACvBC,EAAqB,YACrBA,EAAqB,SAAS,SAAS,oBAAoB,KAE3DJ,EAAoB,4BAA4B;AAAA,IAC9C,GAAGG;AAAA,IACH,aAAa;AAAA,EAAA,CAC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pC,EAAQ,iBAAiB,IAAI,CAACqC,MAC5BxB,gBAAAA,MAAAyB,GAAA,EAAgB,QAAAD,GAAgB,qBAAAtD,EAAA,CAA0C,CAC5E;AAAA,QAED8B,gBAAAA,EAAA;AAAA,UAAC0B;AAAAA,UAAA;AAAA,YACC,qBAAAxD;AAAA,YACA,WAAW,CAAC,CAACG,EAAsB;AAAA,YACnC,UAAU,CAACmC,MAAa;AACtB,cAAAnB,EAAmB,YAAY;AAAA,gBAC7B,GAAGnB,EAAoB,UAAU;AAAA,gBACjC,oBAAoBsC;AAAA,cAAA,CACrB,GACoCX,EAAA,sBAAsBW,GAAUtC,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAE;AAAA,YACA,WAAUuD,IAAAtB,EAAwB,oBAAoB,MAA5C,gBAAAsB,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAEC3B,gBAAAA,EAAAA,IAAA4B,GAAA,EAAa,qBAAA1D,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpF8B,gBAAAA,EAAA;AAAA,UAAC6B;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA5D;AAAA,YACA,WAAAE;AAAA,YACA,oBAAAG;AAAA,YACA,YACEyB,gBAAAA,EAAA;AAAA,cAAC+B;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEaC,KAA+BC,GAAWhE,EAAmB;"}
|
1
|
+
{"version":3,"file":"index-sE-GklWh.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\nimport {\n VerificationService,\n AgePersonalInfoViewModel,\n AgePersonalInfoResponse,\n FormSelectChoice,\n Country,\n FieldDescription,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepAgePersonalInfoComponentProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepAgePersonalInfo = ({ verificationService, intl }: StepAgePersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as AgePersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as AgePersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const countryChoices: FormSelectChoice<Country, string>[] = getAvailableCountryChoices(\n verificationService.programTheme,\n intl,\n );\n const defaultCountryChoice: FormSelectChoice<Country, string> =\n getDefaultCountryChoice(countryChoices);\n const safeCountryValue = getSafe(() => viewModel.countryChoice.value, defaultCountryChoice.value);\n const defaultRequiredFields: FieldDescription[] =\n safeCountryValue === \"US\" ? [{ key: \"postalCode\" }] : [];\n\n // PhoneNumber is required for all non-US age programs and if smsLoop is enabled.\n const showPhoneNumber =\n safeCountryValue !== \"US\" ||\n verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled;\n const phoneNumberRequired =\n safeCountryValue !== \"US\" || verificationService.programTheme.smsLoopEnabled;\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n if (\n !fieldValidationErrors.phoneNumber &&\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"invalidPhoneNumber\")\n ) {\n verificationService.updateFieldValidationErrors({\n ...fieldValidationErrors,\n phoneNumber: \"invalidPhoneNumber\",\n });\n }\n\n const updateAgeViewModel = (key: keyof AgePersonalInfoViewModel, value: any) => {\n const nextState: AgePersonalInfoViewModel = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldRequired } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n defaultRequiredFields,\n });\n\n React.useEffect(() => {\n // When country changes re-check the phone number validation\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", viewModel.phoneNumber, verificationService);\n }, [viewModel.country]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader verificationService={verificationService} classNameIdentifier=\"age\" />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateAgeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n {isFieldRequired(\"city\") && (\n <CityComponent\n value={viewModel.city}\n isRequired\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n onChange={(value) => {\n updateAgeViewModel(\"city\", value);\n updateFieldValidationErrorsByFieldId(\"city\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"address1\") && (\n <AddressComponent\n value={viewModel.address1}\n isRequired\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(value) => {\n updateAgeViewModel(\"address1\", value);\n updateFieldValidationErrorsByFieldId(\"address1\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"postalCode\") && (\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateAgeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n onChange={(newValue) => {\n updateAgeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {showPhoneNumber ? (\n <PhoneNumber\n isRequired={phoneNumberRequired}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateAgeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateAgeViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectAgePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify and continue\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepAgePersonalInfoComponent = injectIntl(StepAgePersonalInfo);\n"],"names":["StepAgePersonalInfo","verificationService","intl","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","countryChoices","getAvailableCountryChoices","defaultCountryChoice","getDefaultCountryChoice","safeCountryValue","getSafe","defaultRequiredFields","showPhoneNumber","phoneNumberRequired","locale","options","getOptions","updateAgeViewModel","key","value","nextState","produceDraftViewModel","isFieldRequired","useCollectFieldsEndpoint","React","updateFieldValidationErrorsByFieldId","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","FirstName","_b","newValue","LastName","_c","BirthDate","_d","CityComponent","_e","AddressComponent","PostalCode","_f","Email","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","config","FormFieldCustom","MarketConsentWrapper","_i","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormattedHTMLMessage","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;AAqDA,MAAMA,KAAsB,CAAC,EAAE,qBAAAC,GAAqB,MAAAC,QAA8C;;AAChG,QAAMC,IAAYF,EAAoB,WAChC,EAAE,uBAAAG,MAA0BH,GAC5BI,IAAuBJ,EAAoB,sBAC3CK,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAsDC;AAAA,IAC1DR,EAAoB;AAAA,IACpBC;AAAA,EACF,GACMQ,IACJC,EAAwBH,CAAc,GAClCI,IAAmBC,EAAQ,MAAMV,EAAU,cAAc,OAAOO,EAAqB,KAAK,GAC1FI,IACJF,MAAqB,OAAO,CAAC,EAAE,KAAK,aAAc,CAAA,IAAI,CAAC,GAGnDG,IACJH,MAAqB,QACrBX,EAAoB,aAAa,2BACjCA,E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mB;"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.114.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE: Thu Jul 03 2025 01:
|
3
|
+
* VERSION: 2.114.0-alpha.7
|
4
|
+
* BUILD_TIMESTAMP: 1751507593391
|
5
|
+
* BUILD_DATE: Thu Jul 03 2025 01:53:13 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: d84b30bf8adccbad6cb5930a1a4341149780d3cf
|
7
7
|
*/
|
8
|
-
import { ak as V, B as R, V as F, j as a, A as B, u as K, q as O } from "./es6-
|
8
|
+
import { ak as V, B as R, V as F, j as a, A as B, u as K, q as O } from "./es6-DUBW_76-.js";
|
9
9
|
import * as N from "react";
|
10
10
|
import P, { forwardRef as S, useRef as z, useImperativeHandle as U, useEffect as Z } from "react";
|
11
11
|
import { FormattedHTMLMessage as x } from "react-intl";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-BR-Zl3Ml.js","sources":["../../node_modules/react-auth-code-input/dist/index.modern.js","../../src/components/StepCompleteAuthentication/StepCompleteAuthenticationComponent.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';\n\nvar allowedCharactersValues = ['alpha', 'numeric', 'alphanumeric'];\nvar propsMap = {\n alpha: {\n type: 'text',\n inputMode: 'text',\n pattern: '[a-zA-Z]{1}'\n },\n alphanumeric: {\n type: 'text',\n inputMode: 'text',\n pattern: '[a-zA-Z0-9]{1}'\n },\n numeric: {\n type: 'tel',\n inputMode: 'numeric',\n pattern: '[0-9]{1}',\n min: '0',\n max: '9'\n }\n};\nvar AuthCode = forwardRef(function (_ref, ref) {\n var _ref$allowedCharacter = _ref.allowedCharacters,\n allowedCharacters = _ref$allowedCharacter === void 0 ? 'alphanumeric' : _ref$allowedCharacter,\n ariaLabel = _ref.ariaLabel,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,\n containerClassName = _ref.containerClassName,\n disabled = _ref.disabled,\n inputClassName = _ref.inputClassName,\n _ref$isPassword = _ref.isPassword,\n isPassword = _ref$isPassword === void 0 ? false : _ref$isPassword,\n _ref$length = _ref.length,\n length = _ref$length === void 0 ? 6 : _ref$length,\n placeholder = _ref.placeholder,\n onChange = _ref.onChange;\n\n if (isNaN(length) || length < 1) {\n throw new Error('Length should be a number and greater than 0');\n }\n\n if (!allowedCharactersValues.some(function (value) {\n return value === allowedCharacters;\n })) {\n throw new Error('Invalid value for allowedCharacters. Use alpha, numeric, or alphanumeric');\n }\n\n var inputsRef = useRef([]);\n var inputProps = propsMap[allowedCharacters];\n useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n if (inputsRef.current) {\n inputsRef.current[0].focus();\n }\n },\n clear: function clear() {\n if (inputsRef.current) {\n for (var i = 0; i < inputsRef.current.length; i++) {\n inputsRef.current[i].value = '';\n }\n\n inputsRef.current[0].focus();\n }\n\n sendResult();\n }\n };\n });\n useEffect(function () {\n if (autoFocus) {\n inputsRef.current[0].focus();\n }\n }, []);\n\n var sendResult = function sendResult() {\n var res = inputsRef.current.map(function (input) {\n return input.value;\n }).join('');\n onChange && onChange(res);\n };\n\n var handleOnChange = function handleOnChange(e) {\n var _e$target = e.target,\n value = _e$target.value,\n nextElementSibling = _e$target.nextElementSibling;\n\n if (value.length > 1) {\n e.target.value = value.charAt(0);\n\n if (nextElementSibling !== null) {\n nextElementSibling.focus();\n }\n } else {\n if (value.match(inputProps.pattern)) {\n if (nextElementSibling !== null) {\n nextElementSibling.focus();\n }\n } else {\n e.target.value = '';\n }\n }\n\n sendResult();\n };\n\n var handleOnKeyDown = function handleOnKeyDown(e) {\n var key = e.key;\n var target = e.target;\n\n if (key === 'Backspace') {\n if (target.value === '') {\n if (target.previousElementSibling !== null) {\n var t = target.previousElementSibling;\n t.value = '';\n t.focus();\n e.preventDefault();\n }\n } else {\n target.value = '';\n }\n\n sendResult();\n }\n };\n\n var handleOnFocus = function handleOnFocus(e) {\n e.target.select();\n };\n\n var handleOnPaste = function handleOnPaste(e) {\n var pastedValue = e.clipboardData.getData('Text');\n var currentInput = 0;\n\n for (var i = 0; i < pastedValue.length; i++) {\n var pastedCharacter = pastedValue.charAt(i);\n var currentValue = inputsRef.current[currentInput].value;\n\n if (pastedCharacter.match(inputProps.pattern)) {\n if (!currentValue) {\n inputsRef.current[currentInput].value = pastedCharacter;\n\n if (inputsRef.current[currentInput].nextElementSibling !== null) {\n inputsRef.current[currentInput].nextElementSibling.focus();\n currentInput++;\n }\n }\n }\n }\n\n sendResult();\n e.preventDefault();\n };\n\n var inputs = [];\n\n var _loop = function _loop(i) {\n inputs.push(React.createElement(\"input\", Object.assign({\n key: i,\n onChange: handleOnChange,\n onKeyDown: handleOnKeyDown,\n onFocus: handleOnFocus,\n onPaste: handleOnPaste\n }, inputProps, {\n type: isPassword ? 'password' : inputProps.type,\n ref: function ref(el) {\n inputsRef.current[i] = el;\n },\n maxLength: 1,\n className: inputClassName,\n autoComplete: i === 0 ? 'one-time-code' : 'off',\n \"aria-label\": ariaLabel ? ariaLabel + \". Character \" + (i + 1) + \".\" : \"Character \" + (i + 1) + \".\",\n disabled: disabled,\n placeholder: placeholder\n })));\n };\n\n for (var i = 0; i < length; i++) {\n _loop(i);\n }\n\n return React.createElement(\"div\", {\n className: containerClassName\n }, inputs);\n});\n\nexport default AuthCode;\n//# sourceMappingURL=index.modern.js.map\n","import * as React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport AuthCode from \"react-auth-code-input\";\nimport produce from \"immer\";\nimport { CompleteAuthenticationViewModel, VerificationService } from \"../../lib/types/types\";\nimport {\n submitForm,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { AUTH_TOKEN_LENGTH } from \"../../constants\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepCompleteAuthenticationProps {\n verificationService: VerificationService;\n}\n\nexport const StepCompleteAuthenticationComponent = ({\n verificationService,\n}: StepCompleteAuthenticationProps) => {\n const viewModel = verificationService.viewModel as CompleteAuthenticationViewModel;\n const { fieldValidationErrors, verificationResponse } = verificationService;\n const { errorIds } = verificationResponse;\n\n const authInputRef = React.useRef(null);\n\n const updateCompleteAuthenticationViewmodel = (\n key: keyof CompleteAuthenticationViewModel,\n value: any,\n ) => {\n const nextState: CompleteAuthenticationViewModel = produce(\n viewModel,\n (draft: CompleteAuthenticationViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const manuallyVerifyViewModel = (): CompleteAuthenticationViewModel => {\n const nextState: CompleteAuthenticationViewModel = produce(\n viewModel,\n (draft: CompleteAuthenticationViewModel) => {\n draft.didManuallyVerify = true;\n delete draft.authenticationCode;\n },\n );\n verificationService.updateViewModel(nextState);\n\n return nextState;\n };\n\n React.useEffect(() => {\n if (viewModel.authenticationCode) {\n // reset local viewModel's authenticationCode to prevent form from submitting\n // prematurely when provided with an incorrect auth code.\n viewModel.authenticationCode = \"\";\n }\n }, []);\n\n React.useEffect(() => {\n if (viewModel.authenticationCode.length >= AUTH_TOKEN_LENGTH) {\n submitForm(viewModel, verificationService, VerificationStepsEnum.completeAuthentication);\n }\n }, [viewModel.authenticationCode]);\n\n return (\n <div\n id=\"sid-step-complete-authentication\"\n className=\"sid-step-complete-authentication-container sid-l-container\"\n >\n <div className=\"sid-header\">\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.title\"\n defaultMessage=\"Verify with Remember Me\"\n />\n </AnnouncingHeader>\n <div className=\"sid-header__subtitle sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.subtitle\"\n defaultMessage=\"Enter the code sent to your email.\"\n />\n </div>\n </div>\n <div className=\"sid-l-space-top-md\" />\n <div className=\"auth-code\">\n <AuthCode\n onChange={(token) => {\n updateCompleteAuthenticationViewmodel(\"authenticationCode\", token);\n updateFieldValidationErrorsByFieldId(\"authenticationCode\", token, verificationService);\n }}\n ref={authInputRef}\n allowedCharacters=\"numeric\"\n length={AUTH_TOKEN_LENGTH}\n isPassword\n containerClassName=\"auth-code__container\"\n inputClassName={`auth-code__input${\n fieldValidationErrors.authenticationCode ? \" auth-code__input-error\" : \"\"\n }`}\n />\n {fieldValidationErrors.authenticationCode ||\n (errorIds?.length > 0 && (\n <div className=\"auth-code__error-container\">\n <div>\n <img\n alt=\"red-exclaimation-circle\"\n src=\"https://assets-resources.sheerid.com/common/images/2018/icons/red-exclaimation-circle.svg\"\n />\n </div>\n <div className=\"auth-code__error-text\">\n <FormattedHTMLMessage\n id=\"errorId.invalidAuthenticationLoopToken\"\n defaultMessage=\"The code provided is invalid\"\n />\n </div>\n </div>\n ))}\n </div>\n <div className=\"sid-complete-auth__manually-verify-button-continer\">\n <button\n type=\"button\"\n className=\"sid-btn sid-btn-light sid-complete-auth__manually-verify-button\"\n aria-label=\"submit\"\n onClick={() => {\n submitForm(\n manuallyVerifyViewModel(),\n verificationService,\n VerificationStepsEnum.completeAuthentication,\n );\n }}\n >\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.manuallyVerifyButton\"\n defaultMessage=\"Manually verify\"\n />\n </button>\n </div>\n </div>\n );\n};\n"],"names":["allowedCharactersValues","propsMap","AuthCode","forwardRef","_ref","ref","_ref$allowedCharacter","allowedCharacters","ariaLabel","_ref$autoFocus","autoFocus","containerClassName","disabled","inputClassName","_ref$isPassword","isPassword","_ref$length","length","placeholder","onChange","value","inputsRef","useRef","inputProps","useImperativeHandle","i","sendResult","useEffect","res","input","handleOnChange","_e$target","nextElementSibling","handleOnKeyDown","key","target","t","handleOnFocus","handleOnPaste","pastedValue","currentInput","pastedCharacter","currentValue","inputs","_loop","React","el","StepCompleteAuthenticationComponent","verificationService","viewModel","fieldValidationErrors","verificationResponse","errorIds","authInputRef","updateCompleteAuthenticationViewmodel","nextState","produce","draft","manuallyVerifyViewModel","AUTH_TOKEN_LENGTH","submitForm","VerificationStepsEnum","jsxs","jsx","AnnouncingHeader","FormattedHTMLMessage","token","updateFieldValidationErrorsByFieldId"],"mappings":";;;;AAEA,IAAIA,IAA0B,CAAC,SAAS,WAAW,cAAc,GAC7DC,IAAW;AAAA,EACb,OAAO;AAAA,IACL,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EACV;AAAA,EACD,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,EACV;AAAA,EACD,SAAS;AAAA,IACP,MAAM;AAAA,IACN,WAAW;AAAA,IACX,SAAS;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,EACT;AACA,GACIC,IAAWC,EAAW,SAAUC,GAAMC,GAAK;AAC7C,MAAIC,IAAwBF,EAAK,mBAC7BG,IAAoBD,MAA0B,SAAS,iBAAiBA,GACxEE,IAAYJ,EAAK,WACjBK,IAAiBL,EAAK,WACtBM,IAAYD,MAAmB,SAAS,KAAOA,GAC/CE,IAAqBP,EAAK,oBAC1BQ,IAAWR,EAAK,UAChBS,IAAiBT,EAAK,gBACtBU,IAAkBV,EAAK,YACvBW,IAAaD,MAAoB,SAAS,KAAQA,GAClDE,IAAcZ,EAAK,QACnBa,IAASD,MAAgB,SAAS,IAAIA,GACtCE,IAAcd,EAAK,aACnBe,IAAWf,EAAK;AAEpB,MAAI,MAAMa,CAAM,KAAKA,IAAS;AAC5B,UAAM,IAAI,MAAM,8CAA8C;AAGhE,MAAI,CAACjB,EAAwB,KAAK,SAAUoB,GAAO;AACjD,WAAOA,MAAUb;AAAA,EACrB,CAAG;AACC,UAAM,IAAI,MAAM,0EAA0E;AAG5F,MAAIc,IAAYC,EAAO,EAAE,GACrBC,IAAatB,EAASM,CAAiB;AAC3C,EAAAiB,EAAoBnB,GAAK,WAAY;AACnC,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AA,GAEN;AAAA,QACAF,gBAAAA,EAAAA,IAAC,OAAI,EAAA,WAAU,sDACb,UAAAA,gBAAAA,EAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,cAAW;AAAA,YACX,SAAS,MAAM;AACb,cAAAH;AAAA,gBACEF,EAAwB;AAAA,gBACxBV;AAAA,gBACAa,EAAsB;AAAA,cACxB;AAAA,YACF;AAAA,YAEA,UAAAE,gBAAAA,EAAA;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index-w7TosKki.js","sources":["../../node_modules/react-auth-code-input/dist/index.modern.js","../../src/components/StepCompleteAuthentication/StepCompleteAuthenticationComponent.tsx"],"sourcesContent":["import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';\n\nvar allowedCharactersValues = ['alpha', 'numeric', 'alphanumeric'];\nvar propsMap = {\n alpha: {\n type: 'text',\n inputMode: 'text',\n pattern: '[a-zA-Z]{1}'\n },\n alphanumeric: {\n type: 'text',\n inputMode: 'text',\n pattern: '[a-zA-Z0-9]{1}'\n },\n numeric: {\n type: 'tel',\n inputMode: 'numeric',\n pattern: '[0-9]{1}',\n min: '0',\n max: '9'\n }\n};\nvar AuthCode = forwardRef(function (_ref, ref) {\n var _ref$allowedCharacter = _ref.allowedCharacters,\n allowedCharacters = _ref$allowedCharacter === void 0 ? 'alphanumeric' : _ref$allowedCharacter,\n ariaLabel = _ref.ariaLabel,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,\n containerClassName = _ref.containerClassName,\n disabled = _ref.disabled,\n inputClassName = _ref.inputClassName,\n _ref$isPassword = _ref.isPassword,\n isPassword = _ref$isPassword === void 0 ? false : _ref$isPassword,\n _ref$length = _ref.length,\n length = _ref$length === void 0 ? 6 : _ref$length,\n placeholder = _ref.placeholder,\n onChange = _ref.onChange;\n\n if (isNaN(length) || length < 1) {\n throw new Error('Length should be a number and greater than 0');\n }\n\n if (!allowedCharactersValues.some(function (value) {\n return value === allowedCharacters;\n })) {\n throw new Error('Invalid value for allowedCharacters. Use alpha, numeric, or alphanumeric');\n }\n\n var inputsRef = useRef([]);\n var inputProps = propsMap[allowedCharacters];\n useImperativeHandle(ref, function () {\n return {\n focus: function focus() {\n if (inputsRef.current) {\n inputsRef.current[0].focus();\n }\n },\n clear: function clear() {\n if (inputsRef.current) {\n for (var i = 0; i < inputsRef.current.length; i++) {\n inputsRef.current[i].value = '';\n }\n\n inputsRef.current[0].focus();\n }\n\n sendResult();\n }\n };\n });\n useEffect(function () {\n if (autoFocus) {\n inputsRef.current[0].focus();\n }\n }, []);\n\n var sendResult = function sendResult() {\n var res = inputsRef.current.map(function (input) {\n return input.value;\n }).join('');\n onChange && onChange(res);\n };\n\n var handleOnChange = function handleOnChange(e) {\n var _e$target = e.target,\n value = _e$target.value,\n nextElementSibling = _e$target.nextElementSibling;\n\n if (value.length > 1) {\n e.target.value = value.charAt(0);\n\n if (nextElementSibling !== null) {\n nextElementSibling.focus();\n }\n } else {\n if (value.match(inputProps.pattern)) {\n if (nextElementSibling !== null) {\n nextElementSibling.focus();\n }\n } else {\n e.target.value = '';\n }\n }\n\n sendResult();\n };\n\n var handleOnKeyDown = function handleOnKeyDown(e) {\n var key = e.key;\n var target = e.target;\n\n if (key === 'Backspace') {\n if (target.value === '') {\n if (target.previousElementSibling !== null) {\n var t = target.previousElementSibling;\n t.value = '';\n t.focus();\n e.preventDefault();\n }\n } else {\n target.value = '';\n }\n\n sendResult();\n }\n };\n\n var handleOnFocus = function handleOnFocus(e) {\n e.target.select();\n };\n\n var handleOnPaste = function handleOnPaste(e) {\n var pastedValue = e.clipboardData.getData('Text');\n var currentInput = 0;\n\n for (var i = 0; i < pastedValue.length; i++) {\n var pastedCharacter = pastedValue.charAt(i);\n var currentValue = inputsRef.current[currentInput].value;\n\n if (pastedCharacter.match(inputProps.pattern)) {\n if (!currentValue) {\n inputsRef.current[currentInput].value = pastedCharacter;\n\n if (inputsRef.current[currentInput].nextElementSibling !== null) {\n inputsRef.current[currentInput].nextElementSibling.focus();\n currentInput++;\n }\n }\n }\n }\n\n sendResult();\n e.preventDefault();\n };\n\n var inputs = [];\n\n var _loop = function _loop(i) {\n inputs.push(React.createElement(\"input\", Object.assign({\n key: i,\n onChange: handleOnChange,\n onKeyDown: handleOnKeyDown,\n onFocus: handleOnFocus,\n onPaste: handleOnPaste\n }, inputProps, {\n type: isPassword ? 'password' : inputProps.type,\n ref: function ref(el) {\n inputsRef.current[i] = el;\n },\n maxLength: 1,\n className: inputClassName,\n autoComplete: i === 0 ? 'one-time-code' : 'off',\n \"aria-label\": ariaLabel ? ariaLabel + \". Character \" + (i + 1) + \".\" : \"Character \" + (i + 1) + \".\",\n disabled: disabled,\n placeholder: placeholder\n })));\n };\n\n for (var i = 0; i < length; i++) {\n _loop(i);\n }\n\n return React.createElement(\"div\", {\n className: containerClassName\n }, inputs);\n});\n\nexport default AuthCode;\n//# sourceMappingURL=index.modern.js.map\n","import * as React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport AuthCode from \"react-auth-code-input\";\nimport produce from \"immer\";\nimport { CompleteAuthenticationViewModel, VerificationService } from \"../../lib/types/types\";\nimport {\n submitForm,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { AUTH_TOKEN_LENGTH } from \"../../constants\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepCompleteAuthenticationProps {\n verificationService: VerificationService;\n}\n\nexport const StepCompleteAuthenticationComponent = ({\n verificationService,\n}: StepCompleteAuthenticationProps) => {\n const viewModel = verificationService.viewModel as CompleteAuthenticationViewModel;\n const { fieldValidationErrors, verificationResponse } = verificationService;\n const { errorIds } = verificationResponse;\n\n const authInputRef = React.useRef(null);\n\n const updateCompleteAuthenticationViewmodel = (\n key: keyof CompleteAuthenticationViewModel,\n value: any,\n ) => {\n const nextState: CompleteAuthenticationViewModel = produce(\n viewModel,\n (draft: CompleteAuthenticationViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const manuallyVerifyViewModel = (): CompleteAuthenticationViewModel => {\n const nextState: CompleteAuthenticationViewModel = produce(\n viewModel,\n (draft: CompleteAuthenticationViewModel) => {\n draft.didManuallyVerify = true;\n delete draft.authenticationCode;\n },\n );\n verificationService.updateViewModel(nextState);\n\n return nextState;\n };\n\n React.useEffect(() => {\n if (viewModel.authenticationCode) {\n // reset local viewModel's authenticationCode to prevent form from submitting\n // prematurely when provided with an incorrect auth code.\n viewModel.authenticationCode = \"\";\n }\n }, []);\n\n React.useEffect(() => {\n if (viewModel.authenticationCode.length >= AUTH_TOKEN_LENGTH) {\n submitForm(viewModel, verificationService, VerificationStepsEnum.completeAuthentication);\n }\n }, [viewModel.authenticationCode]);\n\n return (\n <div\n id=\"sid-step-complete-authentication\"\n className=\"sid-step-complete-authentication-container sid-l-container\"\n >\n <div className=\"sid-header\">\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.title\"\n defaultMessage=\"Verify with Remember Me\"\n />\n </AnnouncingHeader>\n <div className=\"sid-header__subtitle sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.subtitle\"\n defaultMessage=\"Enter the code sent to your email.\"\n />\n </div>\n </div>\n <div className=\"sid-l-space-top-md\" />\n <div className=\"auth-code\">\n <AuthCode\n onChange={(token) => {\n updateCompleteAuthenticationViewmodel(\"authenticationCode\", token);\n updateFieldValidationErrorsByFieldId(\"authenticationCode\", token, verificationService);\n }}\n ref={authInputRef}\n allowedCharacters=\"numeric\"\n length={AUTH_TOKEN_LENGTH}\n isPassword\n containerClassName=\"auth-code__container\"\n inputClassName={`auth-code__input${\n fieldValidationErrors.authenticationCode ? \" auth-code__input-error\" : \"\"\n }`}\n />\n {fieldValidationErrors.authenticationCode ||\n (errorIds?.length > 0 && (\n <div className=\"auth-code__error-container\">\n <div>\n <img\n alt=\"red-exclaimation-circle\"\n src=\"https://assets-resources.sheerid.com/common/images/2018/icons/red-exclaimation-circle.svg\"\n />\n </div>\n <div className=\"auth-code__error-text\">\n <FormattedHTMLMessage\n id=\"errorId.invalidAuthenticationLoopToken\"\n defaultMessage=\"The code provided is invalid\"\n />\n </div>\n </div>\n ))}\n </div>\n <div className=\"sid-complete-auth__manually-verify-button-continer\">\n <button\n type=\"button\"\n className=\"sid-btn sid-btn-light sid-complete-auth__manually-verify-button\"\n aria-label=\"submit\"\n onClick={() => {\n submitForm(\n manuallyVerifyViewModel(),\n verificationService,\n VerificationStepsEnum.completeAuthentication,\n );\n }}\n >\n <FormattedHTMLMessage\n id=\"step.completeAuthentication.manuallyVerifyButton\"\n defaultMessage=\"Manually verify\"\n />\n </button>\n </div>\n </div>\n );\n};\n"],"names":["allowedCharactersValues","propsMap","AuthCode","forwardRef","_ref","ref","_ref$allowedCharacter","allowedCharacters","ariaLabel","_ref$autoFocus","autoFocus","containerClassName","disabled","inputClassName","_ref$isPassword","isPassword","_ref$length","length","placeholder","onChange","value","inputsRef","useRef","inputProps","useImperativeHandle","i","sendResult","useEffect","res","input","handleOnChange","_e$target","nextElementSibling","handleOnKeyDown","key","target","t","handleOnFocus","handleOnPaste","pastedValue","currentInput","pastedCharacter","currentValue","inputs","_loop","React","el","StepCompleteAuthenticationComponent","verificationService","viewModel","fieldValidationErrors","verificationResponse","errorIds","authInputRef","updateCompleteAuthenticationViewmodel","nextState","produce","draft","manuallyVerifyViewModel","AUTH_TOKEN_LENGTH","submitForm","VerificationStepsEnum","jsxs","jsx","An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AA,YACL,WAAU;AAAA,YACV,cAAW;AAAA,YACX,SAAS,MAAM;AACb,cAAAH;AAAA,gBACEF,EAAwB;AAAA,gBACxBV;AAAA,gBACAa,EAAsB;AAAA,cACxB;AAAA,YACF;AAAA,YAEA,UAAAE,gBAAAA,EAAA;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;","x_google_ignoreList":[0]}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.114.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE: Thu Jul 03 2025 01:
|
3
|
+
* VERSION: 2.114.0-alpha.7
|
4
|
+
* BUILD_TIMESTAMP: 1751507593391
|
5
|
+
* BUILD_DATE: Thu Jul 03 2025 01:53:13 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: d84b30bf8adccbad6cb5930a1a4341149780d3cf
|
7
7
|
*/
|
8
|
-
import { j as a, M as k, N as P, m as V, w as f, a1 as A, f as t, ag as u, ah as R, a3 as q, u as n, O as w, T as z, U as B, a9 as L, ai as D, aj as O, W, E as U, n as H, X as K, Y as X, Z as Y, _ as Z, o as _, V as G, q as J } from "./es6-
|
8
|
+
import { j as a, M as k, N as P, m as V, w as f, a1 as A, f as t, ag as u, ah as R, a3 as q, u as n, O as w, T as z, U as B, a9 as L, ai as D, aj as O, W, E as U, n as H, X as K, Y as X, Z as Y, _ as Z, o as _, V as G, q as J } from "./es6-DUBW_76-.js";
|
9
9
|
import { injectIntl as Q, FormattedHTMLMessage as p } from "react-intl";
|
10
10
|
const $ = ({
|
11
11
|
intl: I,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-BAq-Jq2T.js","sources":["../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n VerificationService,\n Organization,\n EmploymentPersonalInfoViewModel,\n CustomFormFieldConfig,\n FormSelectChoice,\n State,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [\"address1\", \"city\", \"state\", \"postalCode\"];\n } else {\n viewModel.fieldsToSkipValidation = undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["StepEmploymentPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","value","nextState","produce","draft","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","countryChoice","shouldCollectAddressFields","CompanyComponent","_b","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_c","newValue","LastName","_d","AddressComponent","_e","FormattedHTMLMessage","CityComponent","_f","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","_g","PostalCodeComponent","_h","Email","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapper","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent","injectIntl"],"mappings":";;AAkDA,MAAMA,IAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,qBAAAC;AACF,MAAgD;;AAC9C,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IAAUC,EAAW,GAErBC,IAA4B,CAACC,GAA4CC,MAAe;AAC5F,UAAMC,IAA6CC;AAAAA,MACjDR;AAAA,MACA,CAACS,MAA2C;AACzC,Q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A0C,CAC5E;AAAA,QAEDa,gBAAAA,EAAA;AAAA,UAACsC;AAAAA,UAAA;AAAA,YACC,qBAAAnD;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,YACnC,UAAU,CAAC0B,MAAa;AACtB,cAAAvB,EAA0B,YAAY;AAAA,gBACpC,GAAGL,EAAoB,UAAU;AAAA,gBACjC,oBAAoB4B;AAAA,cAAA,CACrB,GACoCH,EAAA,sBAAsBG,GAAU5B,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,WAAUmD,IAAAlC,EAAwB,oBAAoB,MAA5C,gBAAAkC,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAECvC,gBAAAA,EAAAA,IAAAwC,GAAA,EAAa,qBAAArD,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFa,gBAAAA,EAAA;AAAA,UAACyC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAvD;AAAA,YACA,WAAAC;AAAA,YACA,YACEY,gBAAAA,EAAA;AAAA,cAACoB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAGauB,IAAsCC,EAAW3D,CAA0B;"}
|
1
|
+
{"version":3,"file":"index-wjUcY3JV.js","sources":["../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n VerificationService,\n Organization,\n EmploymentPersonalInfoViewModel,\n CustomFormFieldConfig,\n FormSelectChoice,\n State,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [\"address1\", \"city\", \"state\", \"postalCode\"];\n } else {\n viewModel.fieldsToSkipValidation = undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["StepEmploymentPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","value","nextState","produce","draft","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","countryChoice","shouldCollectAddressFields","CompanyComponent","_b","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_c","newValue","LastName","_d","AddressComponent","_e","FormattedHTMLMessage","CityComponent","_f","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","_g","PostalCodeComponent","_h","Email","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapper","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent","injectIntl"],"mappings":";;AAkDA,MAAMA,IAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,qBAAAC;AACF,MAAgD;;AAC9C,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IAAUC,EAAW,GAErBC,IAA4B,CAACC,GAA4CC,MAAe;AAC5F,UAAMC,IAA6CC;AAAAA,MACjDR;AAAA,MACA,CAACS,MAA2C;AACzC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAP,EAAoB,gBAAgBQ,CAAS;AAAA,EAC/C;AAGE,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAZ;AAAA,MACA,MAAMA,EAAoB,qBAAqB;AAAA,MAE/C,UAAA;AAAA,QAAAa,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAd;AAAA,YACA,qBAAoB;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ACA,WAAAC;AAAA,YACA,WAAUmD,IAAAlC,EAAwB,oBAAoB,MAA5C,gBAAAkC,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAECvC,gBAAAA,EAAAA,IAAAwC,GAAA,EAAa,qBAAArD,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFa,gBAAAA,EAAA;AAAA,UAACyC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAvD;AAAA,YACA,WAAAC;AAAA,YACA,YACEY,gBAAAA,EAAA;AAAA,cAACoB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAGauB,IAAsCC,EAAW3D,CAA0B;"}
|
package/lib/is-PzizLXcv.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.114.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE: Thu Jul 03 2025 01:
|
3
|
+
* VERSION: 2.114.0-alpha.7
|
4
|
+
* BUILD_TIMESTAMP: 1751507593391
|
5
|
+
* BUILD_DATE: Thu Jul 03 2025 01:53:13 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: d84b30bf8adccbad6cb5930a1a4341149780d3cf
|
7
7
|
*/
|
8
8
|
const e = {
|