@sheerid/jslib-nightly 2.112.0-alpha.5 → 2.112.0-alpha.6
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 +387 -392
- package/_mysheerid-preview.js.map +1 -1
- 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-CTZ8n_FV.js +3 -3
- package/chunk/bg-B1tbUffD.js +3 -3
- package/chunk/bn-IN-BA_ZFkiC.js +3 -3
- package/chunk/cs-_sREQ07E.js +3 -3
- package/chunk/da-DPi7xGRT.js +3 -3
- package/chunk/de-Cdu4F7oz.js +3 -3
- package/chunk/el-Csc8XB1z.js +3 -3
- package/chunk/en-GB-CDsqsXSF.js +3 -3
- package/chunk/es-BgNy3pMu.js +3 -3
- package/chunk/es-ES-HVAL-fE7.js +3 -3
- package/chunk/fi-CCyjkr-W.js +3 -3
- package/chunk/fr-CA-DwRs4Got.js +3 -3
- package/chunk/fr-alhQlPBO.js +3 -3
- package/chunk/ga-DfyMbfDn.js +3 -3
- package/chunk/hi-IN-CnIX7S9Z.js +3 -3
- package/chunk/hr-HChVQ_Sw.js +3 -3
- package/chunk/hu-CWN1WU0a.js +3 -3
- package/chunk/id-C1Ck0Iu_.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-Bf2mOiIg.js +3 -3
- package/chunk/it-IMkNWYOG.js +3 -3
- package/chunk/iw-BuDnLn5x.js +3 -3
- package/chunk/ja-DdM1Ym9C.js +3 -3
- package/chunk/ko-B01TPi1c.js +3 -3
- package/chunk/lo-CDeDGaKo.js +3 -3
- package/chunk/lt-DyBa0gOR.js +3 -3
- package/chunk/ms-LqU5Yd8l.js +3 -3
- package/chunk/nl-BE-BFg3IyDd.js +3 -3
- package/chunk/nl-kMVLoHoM.js +3 -3
- package/chunk/no-BAFfWVPm.js +3 -3
- package/chunk/pl-Cxz2q367.js +3 -3
- package/chunk/pt-BR-CgWnbrVG.js +3 -3
- package/chunk/pt-ClU8GfPr.js +3 -3
- package/chunk/ro-CjVQ_Zpn.js +3 -3
- package/chunk/ru-BdRZQIfm.js +3 -3
- package/chunk/sk-C-xR48Aj.js +3 -3
- package/chunk/sl-CImZBWQa.js +3 -3
- package/chunk/sr-CZdt5Aa4.js +3 -3
- package/chunk/sv-BclJkJLk.js +3 -3
- package/chunk/sw-BMcrEvkG.js +3 -3
- package/chunk/th-Dl_Lc--C.js +3 -3
- package/chunk/tr-CL17frp4.js +3 -3
- package/chunk/uk-zgBsQ3Tg.js +3 -3
- package/chunk/ur-DJP0igA6.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-B1t3wnVe.js +3 -3
- package/chunk/zh-B1K_f766.js +3 -3
- package/chunk/zh-HK-B7LwDNgi.js +3 -3
- package/chunk/zu-DXIuiqYP.js +3 -3
- package/es6.css +3 -3
- package/jslib.js +4 -4
- package/lib/{EmailLoopPending-BE_De6Tx.js → EmailLoopPending-8SrVq8_4.js} +4 -4
- package/lib/{EmailLoopPending-BE_De6Tx.js.map → EmailLoopPending-8SrVq8_4.js.map} +1 -1
- package/lib/{LicensedProfessionalOrganizationComponent-Rp-GMuxJ.js → LicensedProfessionalOrganizationComponent-CNZuQ91j.js} +4 -4
- package/lib/{LicensedProfessionalOrganizationComponent-Rp-GMuxJ.js.map → LicensedProfessionalOrganizationComponent-CNZuQ91j.js.map} +1 -1
- package/lib/Onfido-AyvUk6wg.js +3 -3
- package/lib/StepCollectMilitaryStatusComponent-diSO4X44.js +11 -0
- package/lib/{StepCollectMilitaryStatusComponent-DDTELGtg.js.map → StepCollectMilitaryStatusComponent-diSO4X44.js.map} +1 -1
- package/lib/{StepIDCheckLoopOnfido-38qsgxKR.js → StepIDCheckLoopOnfido-BwfFHPbH.js} +4 -4
- package/lib/{StepIDCheckLoopOnfido-38qsgxKR.js.map → StepIDCheckLoopOnfido-BwfFHPbH.js.map} +1 -1
- package/lib/{StepIDCheckLoopRegula-B53-JUxK.js → StepIDCheckLoopRegula-B_XUpN32.js} +4 -4
- package/lib/{StepIDCheckLoopRegula-B53-JUxK.js.map → StepIDCheckLoopRegula-B_XUpN32.js.map} +1 -1
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-DyVGxkil.js → StepInactiveMilitaryPersonalInfoComponent--j3AeyAM.js} +5 -5
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-DyVGxkil.js.map → StepInactiveMilitaryPersonalInfoComponent--j3AeyAM.js.map} +1 -1
- package/lib/{VerificationApiUtils-CdImPZ20.js → VerificationApiUtils-qdYPexhk.js} +4 -4
- package/lib/{VerificationApiUtils-CdImPZ20.js.map → VerificationApiUtils-qdYPexhk.js.map} +1 -1
- package/lib/ar-CTZ8n_FV.js +3 -3
- package/lib/bg-B1tbUffD.js +3 -3
- package/lib/bn-IN-BA_ZFkiC.js +3 -3
- package/lib/cs-_sREQ07E.js +3 -3
- package/lib/da-DPi7xGRT.js +3 -3
- package/lib/de-Cdu4F7oz.js +3 -3
- package/lib/el-Csc8XB1z.js +3 -3
- package/lib/en-GB-CDsqsXSF.js +3 -3
- package/lib/es-BgNy3pMu.js +3 -3
- package/lib/es-ES-HVAL-fE7.js +3 -3
- package/lib/{es6-CgnlHiAA.js → es6-CmswRPjK.js} +228 -233
- package/lib/es6-CmswRPjK.js.map +1 -0
- package/lib/fi-CCyjkr-W.js +3 -3
- package/lib/fr-CA-DwRs4Got.js +3 -3
- package/lib/fr-alhQlPBO.js +3 -3
- package/lib/ga-DfyMbfDn.js +3 -3
- package/lib/hi-IN-CnIX7S9Z.js +3 -3
- package/lib/hr-HChVQ_Sw.js +3 -3
- package/lib/hu-CWN1WU0a.js +3 -3
- package/lib/id-C1Ck0Iu_.js +3 -3
- package/lib/index-3Zq_I3L9.js +11 -0
- package/lib/index-3Zq_I3L9.js.map +1 -0
- package/lib/{index-Co1axwsC.js → index-B0Xzi5fz.js} +4 -4
- package/lib/{index-Co1axwsC.js.map → index-B0Xzi5fz.js.map} +1 -1
- package/lib/{index-BZB6rx_i.js → index-BVkO1s81.js} +5 -5
- package/lib/{index-BZB6rx_i.js.map → index-BVkO1s81.js.map} +1 -1
- package/lib/{index-DnzWG-zK.js → index-BW1KI9lV.js} +4 -4
- package/lib/{index-DnzWG-zK.js.map → index-BW1KI9lV.js.map} +1 -1
- package/lib/{index-XEJe5RvW.js → index-BcXJ1-DF.js} +5 -5
- package/lib/{index-XEJe5RvW.js.map → index-BcXJ1-DF.js.map} +1 -1
- package/lib/{index-DoGwOM4c.js → index-Be3_NBkN.js} +4 -4
- package/lib/{index-DoGwOM4c.js.map → index-Be3_NBkN.js.map} +1 -1
- package/lib/{index-D0gFTmpL.js → index-BiIbo2KG.js} +4 -4
- package/lib/{index-D0gFTmpL.js.map → index-BiIbo2KG.js.map} +1 -1
- package/lib/index-BvTqyz7K.js +11 -0
- package/lib/index-BvTqyz7K.js.map +1 -0
- package/lib/{index-BGG4-eSW.js → index-CLW01LQa.js} +5 -5
- package/lib/{index-BGG4-eSW.js.map → index-CLW01LQa.js.map} +1 -1
- package/lib/{index-C_ZhLmx8.js → index-CVplTTFK.js} +5 -5
- package/lib/{index-C_ZhLmx8.js.map → index-CVplTTFK.js.map} +1 -1
- package/lib/index-D6B6HAGi.js +11 -0
- package/lib/index-D6B6HAGi.js.map +1 -0
- package/lib/{index-GynW23rm.js → index-DC_tMfvx.js} +6 -6
- package/lib/{index-GynW23rm.js.map → index-DC_tMfvx.js.map} +1 -1
- package/lib/{index-BFQec87Y.js → index-DI0BRmX0.js} +6 -6
- package/lib/{index-BFQec87Y.js.map → index-DI0BRmX0.js.map} +1 -1
- package/lib/index-DIkWpujR.js +3 -3
- package/lib/{index-D14OVclA.js → index-DLEUiNwX.js} +4 -4
- package/lib/{index-D14OVclA.js.map → index-DLEUiNwX.js.map} +1 -1
- package/lib/index-DjHUibJy.js +11 -0
- package/lib/index-DjHUibJy.js.map +1 -0
- package/lib/{index-GSRwQMPe.js → index-Dt00IbgN.js} +5 -5
- package/lib/{index-GSRwQMPe.js.map → index-Dt00IbgN.js.map} +1 -1
- package/lib/{index-CdRJ0N3E.js → index-DvtVG-vT.js} +4 -4
- package/lib/{index-CdRJ0N3E.js.map → index-DvtVG-vT.js.map} +1 -1
- package/lib/{index-wYIO-QSJ.js → index-OeVwnTSz.js} +4 -4
- package/lib/{index-wYIO-QSJ.js.map → index-OeVwnTSz.js.map} +1 -1
- package/lib/{index-Y27hMIeU.js → index-d_PLvLfG.js} +4 -4
- package/lib/{index-Y27hMIeU.js.map → index-d_PLvLfG.js.map} +1 -1
- package/lib/{index-HkVmx6UM.js → index-grVGwN7h.js} +5 -5
- package/lib/{index-HkVmx6UM.js.map → index-grVGwN7h.js.map} +1 -1
- package/lib/{index-CvWITFn3.js → index-nX2lLyUj.js} +5 -5
- package/lib/{index-CvWITFn3.js.map → index-nX2lLyUj.js.map} +1 -1
- package/lib/{index-BaWK4IwT.js → index-pdBa2Jss.js} +4 -4
- package/lib/{index-BaWK4IwT.js.map → index-pdBa2Jss.js.map} +1 -1
- package/lib/{index-DnEaVDvq.js → index-wlSdkN3D.js} +4 -4
- package/lib/{index-DnEaVDvq.js.map → index-wlSdkN3D.js.map} +1 -1
- package/lib/is-Bf2mOiIg.js +3 -3
- package/lib/it-IMkNWYOG.js +3 -3
- package/lib/iw-BuDnLn5x.js +3 -3
- package/lib/ja-DdM1Ym9C.js +3 -3
- package/lib/ko-B01TPi1c.js +3 -3
- package/lib/lo-CDeDGaKo.js +3 -3
- package/lib/lt-DyBa0gOR.js +3 -3
- package/lib/ms-LqU5Yd8l.js +3 -3
- package/lib/nl-BE-BFg3IyDd.js +3 -3
- package/lib/nl-kMVLoHoM.js +3 -3
- package/lib/no-BAFfWVPm.js +3 -3
- package/lib/pl-Cxz2q367.js +3 -3
- package/lib/pt-BR-CgWnbrVG.js +3 -3
- package/lib/pt-ClU8GfPr.js +3 -3
- package/lib/ro-CjVQ_Zpn.js +3 -3
- package/lib/ru-BdRZQIfm.js +3 -3
- package/lib/sk-C-xR48Aj.js +3 -3
- package/lib/sl-CImZBWQa.js +3 -3
- package/lib/sr-CZdt5Aa4.js +3 -3
- package/lib/sv-BclJkJLk.js +3 -3
- package/lib/sw-BMcrEvkG.js +3 -3
- package/lib/th-Dl_Lc--C.js +3 -3
- package/lib/tr-CL17frp4.js +3 -3
- package/lib/uk-zgBsQ3Tg.js +3 -3
- package/lib/ur-DJP0igA6.js +3 -3
- package/lib/{useCollectFieldsEndpoint-BnXXSTq-.js → useCollectFieldsEndpoint-dzRFN2x5.js} +5 -5
- package/lib/{useCollectFieldsEndpoint-BnXXSTq-.js.map → useCollectFieldsEndpoint-dzRFN2x5.js.map} +1 -1
- package/lib/{useEmailFirstExperiment-SbjjFUHp.js → useEmailFirstExperiment-BQshZb8j.js} +4 -4
- package/lib/{useEmailFirstExperiment-SbjjFUHp.js.map → useEmailFirstExperiment-BQshZb8j.js.map} +1 -1
- package/lib/vi-B1t3wnVe.js +3 -3
- package/lib/zh-B1K_f766.js +3 -3
- package/lib/zh-HK-B7LwDNgi.js +3 -3
- package/lib/zu-DXIuiqYP.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 +316 -321
- package/sheerid.js.map +1 -1
- package/src/lib/GoogleAnalytics/ga.d.ts +0 -1
- package/types-reference.zip +0 -0
- package/lib/StepCollectMilitaryStatusComponent-DDTELGtg.js +0 -11
- package/lib/es6-CgnlHiAA.js.map +0 -1
- package/lib/index-BjHfv8dl.js +0 -11
- package/lib/index-BjHfv8dl.js.map +0 -1
- package/lib/index-CZOLRTeH.js +0 -11
- package/lib/index-CZOLRTeH.js.map +0 -1
- package/lib/index-CvpSQuMF.js +0 -11
- package/lib/index-CvpSQuMF.js.map +0 -1
- package/lib/index-IHeM7MeN.js +0 -11
- package/lib/index-IHeM7MeN.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-DoGwOM4c.js","sources":["../../src/components/StepMemberPersonalInfo/StepMemberPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n Organization,\n MemberPersonalInfoViewModel,\n MemberPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\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 { MemberIdComponent as MemberId } from \"../FormFields/MemberId/MemberIdComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { MembershipOrganizationComponent } from \"../FormFields/MembershipOrganization/MembershipOrganizationComponent\";\nimport { MarketConsentWrapperComponent } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepMemberPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMemberPersonalInfo = ({ verificationService }: StepMemberPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MemberPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MemberPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n const isMemberIdRequired = getFieldConfigByFieldId(\"memberId\")?.requireIfOptional;\n\n const locale = viewModel.localeChoice.value;\n\n const updateMemberViewModel = (key: keyof MemberPersonalInfoViewModel, value: any) => {\n const nextState: MemberPersonalInfoViewModel = produce(\n viewModel,\n (draft: MemberPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n React.useEffect(() => {\n if (!isMemberIdRequired) {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [\"memberId\"] },\n { partial: true },\n );\n } else {\n verificationService.updateViewModel({ fieldsToSkipValidation: [] }, { partial: true });\n }\n }, [isMemberIdRequired]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"member-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <MembershipOrganizationComponent\n value={(verificationService.viewModel as MemberPersonalInfoViewModel).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 updateMemberViewModel(\"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 updateMemberViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\n onChange={(newValue) => {\n updateMemberViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n isRequired={getFieldConfigByFieldId(\"birthDate\")?.requireIfOptional}\n onChange={(newValue) => {\n updateMemberViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n\n <MemberId\n value={viewModel.memberId}\n isErrored={!!fieldValidationErrors.memberId}\n isRequired={isMemberIdRequired}\n disabled={getFieldConfigByFieldId(\"memberId\")?.disabled}\n onChange={(newValue) => {\n updateMemberViewModel(\"memberId\", newValue);\n updateFieldValidationErrorsByFieldId(\"memberId\", newValue, verificationService);\n }}\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 updateMemberViewModel(\"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 <MarketConsentWrapperComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMemberViewModel(\"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.collectMemberPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Membership Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMemberPersonalInfoComponent = StepMemberPersonalInfo;\n"],"names":["StepMemberPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","isMemberIdRequired","_a","getFieldConfigByFieldId","locale","updateMemberViewModel","key","value","nextState","produce","draft","React","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_b","MembershipOrganizationComponent","_c","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_d","newValue","LastName","_e","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","_f","BirthDate","_g","_h","MemberId","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapperComponent","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMemberPersonalInfoComponent"],"mappings":";;;AAyCA,MAAMA,IAAyB,CAAC,EAAE,qBAAAC,QAAgE;;AAChG,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GACrBC,KAAqBC,IAAAC,EAAwB,UAAU,MAAlC,gBAAAD,EAAqC,mBAE1DE,IAASV,EAAU,aAAa,OAEhCW,IAAwB,CAACC,GAAwCC,MAAe;AACpF,UAAMC,IAAyCC;AAAAA,MAC7Cf;AAAA,MACA,CAACgB,MAAuC;AACrC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAd,EAAoB,gBAAgBe,CAAS;AAAA,EAC/C;AAEAG,SAAAA,EAAM,UAAU,MAAM;AACpB,IAAKV,IAMiBR,EAAA,gBAAgB,EAAE,wBAAwB,MAAM,EAAE,SAAS,IAAM,IALjEA,EAAA;AAAA,MA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mB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,WAAUkD,IAAAzC,EAAwB,oBAAoB,MAA5C,gBAAAyC,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAEC9B,gBAAAA,EAAAA,IAAA+B,GAAA,EAAa,qBAAApD,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFqB,gBAAAA,EAAA;AAAA,UAACgC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAtD;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEiB,gBAAAA,EAAA;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEakB,KAAkCxD;"}
|
1
|
+
{"version":3,"file":"index-Be3_NBkN.js","sources":["../../src/components/StepMemberPersonalInfo/StepMemberPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n Organization,\n MemberPersonalInfoViewModel,\n MemberPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\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 { MemberIdComponent as MemberId } from \"../FormFields/MemberId/MemberIdComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { MembershipOrganizationComponent } from \"../FormFields/MembershipOrganization/MembershipOrganizationComponent\";\nimport { MarketConsentWrapperComponent } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepMemberPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMemberPersonalInfo = ({ verificationService }: StepMemberPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MemberPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MemberPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n const isMemberIdRequired = getFieldConfigByFieldId(\"memberId\")?.requireIfOptional;\n\n const locale = viewModel.localeChoice.value;\n\n const updateMemberViewModel = (key: keyof MemberPersonalInfoViewModel, value: any) => {\n const nextState: MemberPersonalInfoViewModel = produce(\n viewModel,\n (draft: MemberPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n React.useEffect(() => {\n if (!isMemberIdRequired) {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [\"memberId\"] },\n { partial: true },\n );\n } else {\n verificationService.updateViewModel({ fieldsToSkipValidation: [] }, { partial: true });\n }\n }, [isMemberIdRequired]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"member-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <MembershipOrganizationComponent\n value={(verificationService.viewModel as MemberPersonalInfoViewModel).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 updateMemberViewModel(\"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 updateMemberViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\n onChange={(newValue) => {\n updateMemberViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n isRequired={getFieldConfigByFieldId(\"birthDate\")?.requireIfOptional}\n onChange={(newValue) => {\n updateMemberViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n\n <MemberId\n value={viewModel.memberId}\n isErrored={!!fieldValidationErrors.memberId}\n isRequired={isMemberIdRequired}\n disabled={getFieldConfigByFieldId(\"memberId\")?.disabled}\n onChange={(newValue) => {\n updateMemberViewModel(\"memberId\", newValue);\n updateFieldValidationErrorsByFieldId(\"memberId\", newValue, verificationService);\n }}\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 updateMemberViewModel(\"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 <MarketConsentWrapperComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMemberViewModel(\"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.collectMemberPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Membership Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMemberPersonalInfoComponent = StepMemberPersonalInfo;\n"],"names":["StepMemberPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","isMemberIdRequired","_a","getFieldConfigByFieldId","locale","updateMemberViewModel","key","value","nextState","produce","draft","React","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_b","MembershipOrganizationComponent","_c","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_d","newValue","LastName","_e","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","_f","BirthDate","_g","_h","MemberId","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapperComponent","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMemberPersonalInfoComponent"],"mappings":";;;AAyCA,MAAMA,IAAyB,CAAC,EAAE,qBAAAC,QAAgE;;AAChG,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GACrBC,KAAqBC,IAAAC,EAAwB,UAAU,MAAlC,gBAAAD,EAAqC,mBAE1DE,IAASV,EAAU,aAAa,OAEhCW,IAAwB,CAACC,GAAwCC,MAAe;AACpF,UAAMC,IAAyCC;AAAAA,MAC7Cf;AAAA,MACA,CAACgB,MAAuC;AACrC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAd,EAAoB,gBAAgBe,CAAS;AAAA,EAC/C;AAEAG,SAAAA,EAAM,UAAU,MAAM;AACpB,IAAKV,IAMi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;AAAA,gBACjC,oBAAoBiC;AAAA,cAAA,CACrB,GACoCH,EAAA,sBAAsBG,GAAUjC,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,WAAUkD,IAAAzC,EAAwB,oBAAoB,MAA5C,gBAAAyC,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAEC9B,gBAAAA,EAAAA,IAAA+B,GAAA,EAAa,qBAAApD,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFqB,gBAAAA,EAAA;AAAA,UAACgC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAtD;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEiB,gBAAAA,EAAA;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEakB,KAAkCxD;"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.112.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
7
7
|
*/
|
8
|
-
import { k as m, j as e, m as u, E as x, n as f, u as I, o as j, V as E, p as M, q as h } from "./es6-
|
8
|
+
import { k as m, j as e, m as u, E as x, n as f, u as I, o as j, V as E, p as M, q as h } from "./es6-CmswRPjK.js";
|
9
9
|
import { FormattedHTMLMessage as o } from "react-intl";
|
10
10
|
const C = ({ verificationService: t }) => {
|
11
11
|
const s = t.viewModel, { fieldValidationErrors: a } = t, l = t.verificationResponse, d = m(l), i = (n, r) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-BiIbo2KG.js","sources":["../../src/components/StepCollectIdentifier/StepCollectIdentifierComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n CollectIdentifierViewModel,\n PersonalInfoResponse,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { FormFooterComponent as FormFooter } from \"../FormFooter/FormFooterComponent\";\n\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\n\ninterface StepCollectIdentifierProps {\n verificationService: VerificationService;\n}\n\nconst StepCollectIdentifier = ({ verificationService }: StepCollectIdentifierProps) => {\n const viewModel = verificationService.viewModel as CollectIdentifierViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as PersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const updateCollectIdentifierViewmodel = (key: keyof CollectIdentifierViewModel, value: any) => {\n const nextState: CollectIdentifierViewModel = produce(\n viewModel,\n (draft: CollectIdentifierViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <div\n id=\"sid-step-collect-transaction-id\"\n className=\"sid-step-collect-transaction-id-container sid-l-container\"\n >\n <div role=\"main\">\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"step-collect-transaction-id\"\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"step.collectIdentifier.inputExplanation\"\n defaultMessage=\"Needed to send authentication code\"\n />\n }\n onChange={(newValue) => {\n updateCollectIdentifierViewmodel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event: React.KeyboardEvent<HTMLInputElement>) => handleEmailOnKeyDown(event)}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectIdentifier}\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 </div>\n <FormFooter verificationService={verificationService} />\n </div>\n );\n};\n\nexport const StepCollectIdentifierComponent = StepCollectIdentifier;\n"],"names":["StepCollectIdentifier","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","updateCollectIdentifierViewmodel","key","value","nextState","produce","draft","jsxs","jsx","PersonalInfoHeader","Email","FormattedHTMLMessage","newValue","updateFieldValidationErrorsByFieldId","event","handleEmailOnKeyDown","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormFooter","StepCollectIdentifierComponent"],"mappings":";;AA0BA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAAsD;AACrF,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IAAuBH,EAAoB,sBAC3CI,IAAqBC,EAAsBF,CAAoB,GAE/DG,IAAmC,CAACC,GAAuCC,MAAe;AAC9F,UAAMC,IAAwCC;AAAAA,MAC5CT;AAAA,MACA,CAACU,MAAsC;AACpC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAR,EAAoB,gBAAgBS,CAAS;AAAA,E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1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
7
|
+
*/
|
8
|
+
import { b as f } from "./es6-CmswRPjK.js";
|
9
|
+
export {
|
10
|
+
f as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-BvTqyz7K.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.112.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
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-CmswRPjK.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-dzRFN2x5.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-BGG4-eSW.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,uBAA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8B,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-CLW01LQa.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,CACd;AAGG,QAAAgB,IAAqB,CAACC,GAAqCC,MAAe;AAC9E,UAAMC,IAAsCC,GAAsBrB,GAAWkB,GAAKC,CAAK;AACvF,IAAArB,EAAoB,gBAAgBsB,CAAS;AAAA,EAC/C,GAEM,EAAE,iBAAAE,EAAgB,IAAIC,GAAyB;AAAA,IACnD,gBAAgBrB,EAAqB;AAAA,IACrC,aAAaA,EAAqB;AAAA,IAClC,WAAAF;AAAA,IACA,uBAAAW;AAAA,EAAA,CACD;AAEDa,SAAAA,GAAM,UAAU,MAAM;AAEiB,IAAAC,EAAA,eAAezB,EAAU,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CX,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,14 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.112.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
7
7
|
*/
|
8
|
-
import { k as X, j as e, M as Y, m as Z, al as G, E as D, f as t, u as d, N as J, w as Q, a1 as $, am as S, a3 as k, O as v, T as aa, a4 as sa, n as ea, X as oa, an as la, W as na, Y as ta, Z as da, _ as ma, o as ra, V as pa } from "./es6-
|
8
|
+
import { k as X, j as e, M as Y, m as Z, al as G, E as D, f as t, u as d, N as J, w as Q, a1 as $, am as S, a3 as k, O as v, T as aa, a4 as sa, n as ea, X as oa, an as la, W as na, Y as ta, Z as da, _ as ma, o as ra, V as pa } from "./es6-CmswRPjK.js";
|
9
9
|
import h, { useEffect as ua } from "react";
|
10
10
|
import { FormattedHTMLMessage as i } from "react-intl";
|
11
|
-
import { u as ha, E as ia, a as I } from "./useEmailFirstExperiment-
|
11
|
+
import { u as ha, E as ia, a as I } from "./useEmailFirstExperiment-BQshZb8j.js";
|
12
12
|
const Ca = ({
|
13
13
|
verificationService: a
|
14
14
|
}) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-C_ZhLmx8.js","sources":["../../src/components/StepTeacherPersonalInfo/StepTeacherPersonalInfoComponent.tsx"],"sourcesContent":["/* eslint-disable */\nimport React, { useEffect } from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport { shouldCollectPostalCode } from \"../../lib/organization/organization\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n CustomFormFieldConfig,\n Organization,\n TeacherPersonalInfoResponse,\n TeacherPersonalInfoViewModel,\n VerificationService,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\n\nimport { getOptions } from \"../../options/options\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { TeacherSchoolComponent } from \"../FormFields/TeacherSchool/TeacherSchoolComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\nimport { EmailLookupStatus } from \"../FormFields/EmailFirstCollectInfo/types\";\n\ninterface StepTeacherPersonalInfoComponentProps {\n verificationService: VerificationService<TeacherPersonalInfoViewModel>;\n}\n\nconst StepTeacherPersonalInfo = ({\n verificationService,\n}: StepTeacherPersonalInfoComponentProps) => {\n const { viewModel } = verificationService;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as TeacherPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n const locale = viewModel.localeChoice.value;\n const updateTeacherViewModel = (key: keyof TeacherPersonalInfoViewModel, value: any) => {\n const nextState = {\n [key]: value,\n };\n verificationService.updateViewModel(nextState, { partial: true });\n };\n\n // #region collect-info-step-email-first\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n isValidEmail,\n getOrgByDomain,\n enableFormFields,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n const [orgByEmailDomain, setOrgByEmailDomain] = React.useState<Organization | null>(null);\n const [selectedOrganization, setSelectedOrganization] = React.useState<Organization | null>(null);\n\n React.useEffect(() => {\n const fetchOrg = async () => {\n if (\n viewModel.email &&\n isValidEmail &&\n emailLookupResponse &&\n emailLookupResponse.status === EmailLookupStatus.NOT_FOUND\n ) {\n const org = await getOrgByDomain(verificationService);\n if (org) {\n setOrgByEmailDomain(org);\n updateViewModelOrganization(org, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", org, verificationService);\n }\n } else {\n setOrgByEmailDomain(null);\n }\n };\n\n if (isValidEmail && emailLookupResponse) {\n fetchOrg();\n }\n }, [viewModel.email, isValidEmail, emailLookupResponse?.status]);\n // #endregion collect-info-step-email-first\n\n // Don't validate DOB if ID Check is not enabled\n useEffect(() => {\n if (!verificationService.programTheme.idCheckAddOnEnabled) {\n updateTeacherViewModel(\"birthDate\", \"\");\n updateTeacherViewModel(\"fieldsToSkipValidation\", [\"birthDate\"]);\n } else {\n updateTeacherViewModel(\"fieldsToSkipValidation\", []);\n }\n }, [verificationService.programTheme.idCheckAddOnEnabled]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"teacher-personal-info\"\n />\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <>\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"sid-spinner scaled\">\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=\"Must be your school-issued email address\"\n />\n }\n onChange={(newValue) => {\n updateTeacherViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n </>\n )\n // #endregion email-first-experiment\n }\n {showEmailLookupResponseMessages && emailLookupResponse && isValidEmail && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <>\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <TeacherSchoolComponent\n value={\n selectedOrganization ||\n (isEmailUpTop &&\n emailLookupResponse?.status === EmailLookupStatus.NOT_FOUND &&\n orgByEmailDomain) ||\n verificationService.viewModel.organization\n }\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n setSelectedOrganization(choice);\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\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 updateTeacherViewModel(\"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 updateTeacherViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n {verificationService.programTheme.idCheckAddOnEnabled ? (\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateTeacherViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n ) : null}\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Must be your school-issued email address\"\n />\n }\n onChange={(newValue) => {\n updateTeacherViewModel(\"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 updateTeacherViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\n \"phoneNumber\",\n newValue,\n verificationService,\n );\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n {shouldCollectPostalCode(verificationService.programTheme, viewModel) ? (\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateTeacherViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n ) : null}\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 updateTeacherViewModel(\"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.collectTeacherPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Teacher Status\"\n />\n }\n />\n </div>\n </>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepTeacherPersonalInfoComponent = StepTeacherPersonalInfo;\nfunction userDidConvert(COLLECT_INFO_SUBMIT: any, COLLECT_INFO_SUBMISSION_TIME: any) {\n throw new Error(\"Function not implemented.\");\n}\n"],"names":["StepTeacherPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","locale","updateTeacherViewModel","key","value","nextState","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","isValidEmail","getOrgByDomain","enableFormFields","handleOnClickProceedHere","useEmailFirstExperiment","orgByEmailDomain","setOrgByEmailDomain","React","selectedOrganization","setSelectedOrganization","EmailLookupStatus","org","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","Fragment","LoadingSpinnerComponent","Email","FormattedHTMLMessage","newValue","_a","getFieldConfigByFieldId","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_b","TeacherSchoolComponent","_c","choice","FirstName","_d","LastName","_e","BirthDate","_f","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","shouldCollectPostalCode","PostalCodeComponent","_i","config","FormFieldCustom","MarketConsentWrapper","_j","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepTeacherPersonalInfoComponent"],"mappings":";;;;AA8CA,MAAMA,KAA0B,CAAC;AAAA,EAC/B,qBAAAC;AACF,MAA6C;;AACrC,QAAA,EAAE,WAAAC,MAAcD,GAChB,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GACrBC,IAASP,EAAU,aAAa,OAChCQ,IAAyB,CAACC,GAAyCC,MAAe;AACtF,UAAMC,IAAY;AAAA,MAChB,CAACF,CAAG,GAAGC;AAAA,IACT;AACA,IAAAX,EAAoB,gBAAgBY,GAAW,EAAE,SAAS,IAAM;AAAA,EAClE,GAGM;AAAA,IACJ,cAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,iCAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,0BAAAC;AAAA,EAAA,IACEC;AAAA,IACFzB,EAAoB;AAAA,IACpBC,EAAU;AAAA,IACVD,EAAoB,qBAAqB;AAAA,EAC3C,GACM,CAAC0B,GAAkBC,CAAmB,IAAIC,EAAM,SAA8B,IAAI,GAClF,CAACC,GAAsBC,CAAuB,IAAIF,EAAM,SAA8B,IAAI;AAEhGA,SAAAA,EAAM,UAAU,MAAM;AAmBpB,IAAIP,KAAgBL,MAlBH,YAAY;AAC3B,UACEf,EAAU,SACVoB,KACAL,KACAA,EAAoB,WAAWe,EAAkB,WACjD;AACM,cAAAC,IAAM,MAAMV,EAAetB,CAAmB;AACpD,QAAIgC,MACFL,EAAoBK,CAAG,GACvBC,EAA4B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ACDsC,gBAAAA,EAAA;AAAA,YAACgC;AAAAA,YAAA;AAAA,cACC,qBAAAtE;AAAA,cACA,WAAW,CAAC,CAACE,EAAsB;AAAA,cACnC,UAAU,CAAC0C,MAAa;AACtB,gBAAAnC,EAAuB,YAAY;AAAA,kBACjC,GAAGT,EAAoB,UAAU;AAAA,kBACjC,oBAAoB4C;AAAA,gBAAA,CACrB,GACDV;AAAA,kBACE;AAAA,kBACAU;AAAA,kBACA5C;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAAC;AAAA,cACA,WAAUsE,IAAAzB,EAAwB,oBAAoB,MAA5C,gBAAAyB,EAA+C;AAAA,YAAA;AAAA,UAC3D;AAAA,UACCjC,gBAAAA,EAAAA,IAAAkC,IAAA,EAAa,qBAAAxE,GAA0C,QAAO,qBAAqB,CAAA;AAAA,UACpFsC,gBAAAA,EAAA;AAAA,YAACmC;AAAA,YAAA;AAAA,cACC,MAAMC,GAAsB;AAAA,cAC5B,qBAAA1E;AAAA,cACA,WAAAC;AAAA,cACA,oBAAAG;AAAA,cACA,YACEkC,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,EAAA,CACF,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEagC,KAAmC5E;"}
|
1
|
+
{"version":3,"file":"index-CVplTTFK.js","sources":["../../src/components/StepTeacherPersonalInfo/StepTeacherPersonalInfoComponent.tsx"],"sourcesContent":["/* eslint-disable */\nimport React, { useEffect } from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport { shouldCollectPostalCode } from \"../../lib/organization/organization\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n CustomFormFieldConfig,\n Organization,\n TeacherPersonalInfoResponse,\n TeacherPersonalInfoViewModel,\n VerificationService,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\n\nimport { getOptions } from \"../../options/options\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { TeacherSchoolComponent } from \"../FormFields/TeacherSchool/TeacherSchoolComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\nimport { EmailLookupStatus } from \"../FormFields/EmailFirstCollectInfo/types\";\n\ninterface StepTeacherPersonalInfoComponentProps {\n verificationService: VerificationService<TeacherPersonalInfoViewModel>;\n}\n\nconst StepTeacherPersonalInfo = ({\n verificationService,\n}: StepTeacherPersonalInfoComponentProps) => {\n const { viewModel } = verificationService;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as TeacherPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n const locale = viewModel.localeChoice.value;\n const updateTeacherViewModel = (key: keyof TeacherPersonalInfoViewModel, value: any) => {\n const nextState = {\n [key]: value,\n };\n verificationService.updateViewModel(nextState, { partial: true });\n };\n\n // #region collect-info-step-email-first\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n isValidEmail,\n getOrgByDomain,\n enableFormFields,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n const [orgByEmailDomain, setOrgByEmailDomain] = React.useState<Organization | null>(null);\n const [selectedOrganization, setSelectedOrganization] = React.useState<Organization | null>(null);\n\n React.useEffect(() => {\n const fetchOrg = async () => {\n if (\n viewModel.email &&\n isValidEmail &&\n emailLookupResponse &&\n emailLookupResponse.status === EmailLookupStatus.NOT_FOUND\n ) {\n const org = await getOrgByDomain(verificationService);\n if (org) {\n setOrgByEmailDomain(org);\n updateViewModelOrganization(org, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", org, verificationService);\n }\n } else {\n setOrgByEmailDomain(null);\n }\n };\n\n if (isValidEmail && emailLookupResponse) {\n fetchOrg();\n }\n }, [viewModel.email, isValidEmail, emailLookupResponse?.status]);\n // #endregion collect-info-step-email-first\n\n // Don't validate DOB if ID Check is not enabled\n useEffect(() => {\n if (!verificationService.programTheme.idCheckAddOnEnabled) {\n updateTeacherViewModel(\"birthDate\", \"\");\n updateTeacherViewModel(\"fieldsToSkipValidation\", [\"birthDate\"]);\n } else {\n updateTeacherViewModel(\"fieldsToSkipValidation\", []);\n }\n }, [verificationService.programTheme.idCheckAddOnEnabled]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"teacher-personal-info\"\n />\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <>\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"sid-spinner scaled\">\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=\"Must be your school-issued email address\"\n />\n }\n onChange={(newValue) => {\n updateTeacherViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n </>\n )\n // #endregion email-first-experiment\n }\n {showEmailLookupResponseMessages && emailLookupResponse && isValidEmail && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <>\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <TeacherSchoolComponent\n value={\n selectedOrganization ||\n (isEmailUpTop &&\n emailLookupResponse?.status === EmailLookupStatus.NOT_FOUND &&\n orgByEmailDomain) ||\n verificationService.viewModel.organization\n }\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n setSelectedOrganization(choice);\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\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 updateTeacherViewModel(\"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 updateTeacherViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n {verificationService.programTheme.idCheckAddOnEnabled ? (\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateTeacherViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n ) : null}\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Must be your school-issued email address\"\n />\n }\n onChange={(newValue) => {\n updateTeacherViewModel(\"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 updateTeacherViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\n \"phoneNumber\",\n newValue,\n verificationService,\n );\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n {shouldCollectPostalCode(verificationService.programTheme, viewModel) ? (\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateTeacherViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n ) : null}\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 updateTeacherViewModel(\"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.collectTeacherPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Teacher Status\"\n />\n }\n />\n </div>\n </>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepTeacherPersonalInfoComponent = StepTeacherPersonalInfo;\nfunction userDidConvert(COLLECT_INFO_SUBMIT: any, COLLECT_INFO_SUBMISSION_TIME: any) {\n throw new Error(\"Function not implemented.\");\n}\n"],"names":["StepTeacherPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","locale","updateTeacherViewModel","key","value","nextState","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","isValidEmail","getOrgByDomain","enableFormFields","handleOnClickProceedHere","useEmailFirstExperiment","orgByEmailDomain","setOrgByEmailDomain","React","selectedOrganization","setSelectedOrganization","EmailLookupStatus","org","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","Fragment","LoadingSpinnerComponent","Email","FormattedHTMLMessage","newValue","_a","getFieldConfigByFieldId","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_b","TeacherSchoolComponent","_c","choice","FirstName","_d","LastName","_e","BirthDate","_f","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","shouldCollectPostalCode","PostalCodeComponent","_i","config","FormFieldCustom","MarketConsentWrapper","_j","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepTeacherPersonalInfoComponent"],"mappings":";;;;AA8CA,MAAMA,KAA0B,CAAC;AAAA,EAC/B,qBAAAC;AACF,MAA6C;;AACrC,QAAA,EAAE,WAAAC,MAAcD,GAChB,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GACrBC,IAASP,EAAU,aAAa,OAChCQ,IAAyB,CAACC,GAAyCC,MAAe;AACtF,UAAMC,IAAY;AAAA,MAChB,CAACF,CAAG,GAAGC;AAAA,IACT;AACA,IAAAX,EAAoB,gBAAgBY,GAAW,EAAE,SAAS,IAAM;AAAA,EAClE,GAGM;AAAA,IACJ,cAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,qBAAAC;AAA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A,cACA,YACEkC,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,EAAA,CACF,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEagC,KAAmC5E;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
7
|
+
*/
|
8
|
+
import { c as f } from "./es6-CmswRPjK.js";
|
9
|
+
export {
|
10
|
+
f as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-D6B6HAGi.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,15 +1,15 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.112.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
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-CmswRPjK.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-dzRFN2x5.js";
|
12
|
+
import { u as Me, E as Ee } from "./useEmailFirstExperiment-BQshZb8j.js";
|
13
13
|
const Ie = {
|
14
14
|
AT: "gbrNummer",
|
15
15
|
ES: "numeroColegiado",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-GynW23rm.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;A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E,EAAA,CAA0C,CAC5E;AAAA,UACD+B,gBAAAA,EAAA;AAAA,YAACyC;AAAAA,YAAA;AAAA,cACC,qBAAAxE;AAAA,cACA,WAAW,CAAC,CAACE,EAAsB;AAAA,cACnC,UAAU,CAACkC,MAAa;AACtB,gBAAA3B,EAAmC,YAAY;AAAA,kBAC7C,GAAGT,EAAoB,UAAU;AAAA,kBACjC,oBAAoBoC;AAAA,gBAAA,CACrB,GACDC;AAAA,kBACE;AAAA,kBACAD;AAAA,kBACApC;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAAC;AAAA,cACA,WAAUwE,IAAAlC,EAAwB,oBAAoB,MAA5C,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-DC_tMfvx.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,s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QAEJ,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEa0C,KAA+CC;AAAA,EAC1DhF;AACF;"}
|
@@ -1,16 +1,16 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.112.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
3
|
+
* VERSION: 2.112.0-alpha.6
|
4
|
+
* BUILD_TIMESTAMP: 1749741537426
|
5
|
+
* BUILD_DATE: Thu Jun 12 2025 15:18:57 GMT+0000 (Coordinated Universal Time)
|
6
6
|
* BUILD_COMMIT: f4ba2ded1f8d08fc71867122ea5facb3f85d0d30
|
7
7
|
*/
|
8
|
-
import { e as t, Q as n, j as e, I as r, L as i } from "./es6-
|
8
|
+
import { e as t, Q as n, j as e, I as r, L as i } from "./es6-CmswRPjK.js";
|
9
9
|
import { Suspense as C, lazy as p } from "react";
|
10
10
|
const a = p(
|
11
|
-
() => import("./StepIDCheckLoopOnfido-
|
11
|
+
() => import("./StepIDCheckLoopOnfido-BwfFHPbH.js")
|
12
12
|
), d = p(
|
13
|
-
() => import("./StepIDCheckLoopRegula-
|
13
|
+
() => import("./StepIDCheckLoopRegula-B_XUpN32.js")
|
14
14
|
), h = ({ verificationService: o }) => {
|
15
15
|
const s = o.verificationResponse, c = t(
|
16
16
|
n
|