@sheerid/jslib 2.218.0 → 2.220.0
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 +4 -4
- package/_mysheerid-preview.js +26 -26
- package/_mysheerid-preview.js.map +1 -1
- package/chunk/{ActiveDutyStartDateComponent-8ed93MIc.js → ActiveDutyStartDateComponent-DN0HfTFx.js} +5 -5
- package/chunk/{ActiveDutyStartDateComponent-8ed93MIc.js.map → ActiveDutyStartDateComponent-DN0HfTFx.js.map} +1 -1
- package/chunk/{ActiveDutyStartDateComponent-BfkF0ser.js → ActiveDutyStartDateComponent-mYpDRuc-.js} +5 -5
- package/chunk/{ActiveDutyStartDateComponent-BfkF0ser.js.map → ActiveDutyStartDateComponent-mYpDRuc-.js.map} +1 -1
- package/chunk/AddressComponent-AiyIPiCz.js +4 -4
- package/chunk/AddressComponent-DV2Wsw6k.js +4 -4
- package/chunk/{CaptchaComponent-CSCvSY8Y.js → CaptchaComponent-BfZgvFl0.js} +349 -343
- package/chunk/{CaptchaComponent-CSCvSY8Y.js.map → CaptchaComponent-BfZgvFl0.js.map} +1 -1
- package/chunk/{CaptchaComponent-DcxyBvrf.js → CaptchaComponent-DFZOJr8t.js} +349 -343
- package/chunk/{CaptchaComponent-DcxyBvrf.js.map → CaptchaComponent-DFZOJr8t.js.map} +1 -1
- package/chunk/ChangeLocaleComponent-Cu2DR-Q3.js +4 -4
- package/chunk/ChangeLocaleComponent-DUnfgQuX.js +4 -4
- package/chunk/City-BmrJpnS6.js +4 -4
- package/chunk/City-yVVnZQTP.js +4 -4
- package/chunk/CollegeNameComponent-DaTimEqC.js +4 -4
- package/chunk/CollegeNameComponent-DtKPZHb-.js +4 -4
- package/chunk/CopyToClipboardComponent-9hyfSMC0.js +4 -4
- package/chunk/CopyToClipboardComponent-H3bJGcOM.js +4 -4
- package/chunk/CountryComponentWrapper--2UQ7mXP.js +4 -4
- package/chunk/CountryComponentWrapper-Ceq-eink.js +4 -4
- package/chunk/DriverLicenseNumberComponent-D9cakdvU.js +4 -4
- package/chunk/DriverLicenseNumberComponent-ziLNYB8e.js +4 -4
- package/chunk/EBTCardNumberComponent-B1kv4R4G.js +4 -4
- package/chunk/EBTCardNumberComponent-oYQJ_tP7.js +4 -4
- package/chunk/EmailLoopPending-In0FH-Ap.js +4 -4
- package/chunk/EmailLoopPending-lxRF0bx8.js +4 -4
- package/chunk/FirstResponderOrganizationComponent-Bru1a0U7.js +4 -4
- package/chunk/FirstResponderOrganizationComponent-fPxZFdpO.js +4 -4
- package/chunk/FormFieldInputSelect-CjWY_ush.js +4 -4
- package/chunk/FormFieldInputSelect-o7QZaYhS.js +4 -4
- package/chunk/FormFieldLayout-DDEEmlGC.js +4 -4
- package/chunk/FormFieldLayout-DEVPpEyA.js +4 -4
- package/chunk/FormFieldText-CJ-GVpZE.js +4 -4
- package/chunk/FormFieldText-CaWtYVur.js +4 -4
- package/chunk/FormFieldTypeahead-C6eS7yJg.js +4 -4
- package/chunk/FormFieldTypeahead-CyKKVK89.js +4 -4
- package/chunk/FormSelectChoice-BahCx4wG.js +4 -4
- package/chunk/FormSelectChoice-C-rIlDKl.js +4 -4
- package/chunk/InputText-CCNbZmMe.js +4 -4
- package/chunk/InputText-PEiatRRJ.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-C5pc7hVJ.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-CnR_qF3r.js +4 -4
- package/chunk/MedicalProfessionalOrganizationComponent-CXHX25GN.js +4 -4
- package/chunk/MedicalProfessionalOrganizationComponent-DBf6V49M.js +4 -4
- package/chunk/MemberIdComponent-C8mVSo9m.js +4 -4
- package/chunk/MemberIdComponent-oanWSvQh.js +4 -4
- package/chunk/MembershipOrganizationComponent-CN6_d_Fk.js +4 -4
- package/chunk/MembershipOrganizationComponent-yu-UNXIK.js +4 -4
- package/chunk/Onfido-BG8cDEVW.js +4 -4
- package/chunk/PersonalInfoStepSubmitButton-j44RdZDq.js +4 -4
- package/chunk/PersonalInfoStepSubmitButton-v_kWLmEw.js +4 -4
- package/chunk/PersonalInfoStepWrapper-BOBNCgik.js +4 -4
- package/chunk/PersonalInfoStepWrapper-PV06WMKL.js +4 -4
- package/chunk/PostalCodeComponent-DrCcV90W.js +4 -4
- package/chunk/PostalCodeComponent-KXVfZkLx.js +4 -4
- package/chunk/SSN-B_z2R4Bx.js +4 -4
- package/chunk/SSN-Hb1lTx8A.js +4 -4
- package/chunk/StateSelectComponent-CChSqKXz.js +4 -4
- package/chunk/StateSelectComponent-CIpB-Rh1.js +4 -4
- package/chunk/StatusComponent-C6J1B7Tl.js +4 -4
- package/chunk/StatusComponent-pmuIhuXi.js +4 -4
- package/chunk/StepCard-CIfaQVu-.js +4 -4
- package/chunk/StepCard-dcwCtPrW.js +4 -4
- package/chunk/{StepCollectMilitaryStatusComponent-CaP-tPJA.js → StepCollectMilitaryStatusComponent-CvXEQ2_6.js} +7 -7
- package/chunk/{StepCollectMilitaryStatusComponent-C02BKffq.js.map → StepCollectMilitaryStatusComponent-CvXEQ2_6.js.map} +1 -1
- package/chunk/{StepCollectMilitaryStatusComponent-C02BKffq.js → StepCollectMilitaryStatusComponent-Dpchizu3.js} +7 -7
- package/chunk/{StepCollectMilitaryStatusComponent-CaP-tPJA.js.map → StepCollectMilitaryStatusComponent-Dpchizu3.js.map} +1 -1
- package/chunk/{StepDriverLicensePersonalInfoComponent-I3LNN4GB.js → StepDriverLicensePersonalInfoComponent-DP6zH_ax.js} +5 -5
- package/chunk/{StepDriverLicensePersonalInfoComponent-C4QRbgMC.js.map → StepDriverLicensePersonalInfoComponent-DP6zH_ax.js.map} +1 -1
- package/chunk/{StepDriverLicensePersonalInfoComponent-C4QRbgMC.js → StepDriverLicensePersonalInfoComponent-ewQpSg2t.js} +5 -5
- package/chunk/{StepDriverLicensePersonalInfoComponent-I3LNN4GB.js.map → StepDriverLicensePersonalInfoComponent-ewQpSg2t.js.map} +1 -1
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-CGIiAyvk.js → StepGeneralIdentityPersonalInfoComponent-CJjM8zVt.js} +6 -6
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Bw6WDrOP.js.map → StepGeneralIdentityPersonalInfoComponent-CJjM8zVt.js.map} +1 -1
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-Bw6WDrOP.js → StepGeneralIdentityPersonalInfoComponent-CpkyNgCu.js} +6 -6
- package/chunk/{StepGeneralIdentityPersonalInfoComponent-CGIiAyvk.js.map → StepGeneralIdentityPersonalInfoComponent-CpkyNgCu.js.map} +1 -1
- package/chunk/{StepHybridIdentityPersonalInfoComponent-kE7xVuag.js → StepHybridIdentityPersonalInfoComponent-DO0EJx9W.js} +6 -6
- package/chunk/{StepHybridIdentityPersonalInfoComponent-BAe_HzjN.js.map → StepHybridIdentityPersonalInfoComponent-DO0EJx9W.js.map} +1 -1
- package/chunk/{StepHybridIdentityPersonalInfoComponent-BAe_HzjN.js → StepHybridIdentityPersonalInfoComponent-mXPGFhFn.js} +6 -6
- package/chunk/{StepHybridIdentityPersonalInfoComponent-kE7xVuag.js.map → StepHybridIdentityPersonalInfoComponent-mXPGFhFn.js.map} +1 -1
- package/chunk/StepIDCheckLoopOnfido-Sg4a19wV.js +4 -4
- package/chunk/StepIDCheckLoopOnfido-djTS20UT.js +4 -4
- package/chunk/StepIDCheckLoopRegula-B5I-ojjy.js +4 -4
- package/chunk/StepIDCheckLoopRegula-DZA5G1Z6.js +4 -4
- package/chunk/{StepInactiveMilitaryPersonalInfoComponent-DDwAnwM5.js → StepInactiveMilitaryPersonalInfoComponent-B-4CBRod.js} +7 -7
- package/chunk/{StepInactiveMilitaryPersonalInfoComponent-BBsJj3Sm.js.map → StepInactiveMilitaryPersonalInfoComponent-B-4CBRod.js.map} +1 -1
- package/chunk/{StepInactiveMilitaryPersonalInfoComponent-BBsJj3Sm.js → StepInactiveMilitaryPersonalInfoComponent-C7_holiH.js} +7 -7
- package/chunk/{StepInactiveMilitaryPersonalInfoComponent-DDwAnwM5.js.map → StepInactiveMilitaryPersonalInfoComponent-C7_holiH.js.map} +1 -1
- package/chunk/TeacherSchoolComponent-BSHPjiwQ.js +4 -4
- package/chunk/TeacherSchoolComponent-Bf3ZhJ_c.js +4 -4
- package/chunk/ar-uNi-5jZs.js +4 -4
- package/chunk/bg-BSs2zI8g.js +4 -4
- package/chunk/bn-IN-DgKTANOE.js +4 -4
- package/chunk/cs-ZQhsI2gf.js +4 -4
- package/chunk/da-Ca6-P-fb.js +4 -4
- package/chunk/de-qTizo3k0.js +4 -4
- package/chunk/downshift.esm-CtrbqQGL.js +4 -4
- package/chunk/downshift.esm-huKBwB2d.js +4 -4
- package/chunk/el-Ci0_i7um.js +4 -4
- package/chunk/en-GB-BMFtN6kg.js +4 -4
- package/chunk/es-10I2Uwx1.js +4 -4
- package/chunk/es-ES-BEtGV8ZY.js +4 -4
- package/chunk/fi-VAIle52X.js +4 -4
- package/chunk/fr-CA-YGnUj1Cd.js +4 -4
- package/chunk/fr-CmkojiS4.js +4 -4
- package/chunk/ga-CTdDfi4f.js +4 -4
- package/chunk/hi-IN-mBG2SFX6.js +4 -4
- package/chunk/hr-D8voB0hC.js +4 -4
- package/chunk/hu-DzN9Oup5.js +4 -4
- package/chunk/id-ZqMlj7_U.js +4 -4
- package/chunk/{index-CBoeMu9i.js → index-Ag935IQm.js} +7 -7
- package/chunk/{index-Ck4Jg3xo.js.map → index-Ag935IQm.js.map} +1 -1
- package/chunk/index-B0SBEWOf.js +4 -4
- package/chunk/{index-q6PutwA-.js → index-B4FcNhzB.js} +19 -16
- package/chunk/index-B4FcNhzB.js.map +1 -0
- package/chunk/index-BA3bE-f-.js +4 -4
- package/chunk/{index-DE_o4TXi.js → index-BGgNLPMu.js} +6 -6
- package/chunk/{index-zyCRCimF.js.map → index-BGgNLPMu.js.map} +1 -1
- package/chunk/{index-DeW_gAIO.js → index-BKyRIfb4.js} +6 -6
- package/chunk/{index-CARFmnRY.js.map → index-BKyRIfb4.js.map} +1 -1
- package/chunk/{index-DdxRfsSh.js → index-BUKeo5wI.js} +5 -5
- package/chunk/{index-DdxRfsSh.js.map → index-BUKeo5wI.js.map} +1 -1
- package/chunk/{index-MB6FRj7G.js → index-BW4GfeEt.js} +5 -5
- package/chunk/{index-dWqQPCim.js.map → index-BW4GfeEt.js.map} +1 -1
- package/chunk/{index-BKJ-EAbL.js → index-BXgePv3X.js} +6 -6
- package/chunk/{index-BKJ-EAbL.js.map → index-BXgePv3X.js.map} +1 -1
- package/chunk/index-BZ1nv-sB.js +4 -4
- package/chunk/{index-C6CmnxtU.js → index-BZxLbodL.js} +6 -6
- package/chunk/{index-C6CmnxtU.js.map → index-BZxLbodL.js.map} +1 -1
- package/chunk/index-BbOCWcRK.js +4 -4
- package/chunk/{index-Dekegp07.js → index-BjnL3xjz.js} +6 -6
- package/chunk/{index-Dekegp07.js.map → index-BjnL3xjz.js.map} +1 -1
- package/chunk/index-Bn00xQJF.js +4 -4
- package/chunk/index-Brpm5gN6.js +4 -4
- package/chunk/index-CHDBBfsg.js +4 -4
- package/chunk/index-CR19uOwz.js +4 -4
- package/chunk/index-CTGY1a4m.js +4 -4
- package/chunk/{index-DWjm3Bvf.js → index-CU6BdnXA.js} +6 -6
- package/chunk/{index-DD5n87cJ.js.map → index-CU6BdnXA.js.map} +1 -1
- package/chunk/{index-Xq2oC7I1.js → index-CXkOlMH8.js} +6 -6
- package/chunk/{index-CYi-EOgq.js.map → index-CXkOlMH8.js.map} +1 -1
- package/chunk/{index-W05VUuom.js → index-CYCcqiVr.js} +6 -6
- package/chunk/{index-W05VUuom.js.map → index-CYCcqiVr.js.map} +1 -1
- package/chunk/index-CaBrLsal.js +4 -4
- package/chunk/{index-jeII5suL.js → index-CiSNwFCt.js} +6 -6
- package/chunk/{index-jeII5suL.js.map → index-CiSNwFCt.js.map} +1 -1
- package/chunk/index-CrPc1exn.js +4 -4
- package/chunk/{index-OS2bzRh2.js → index-CwaTj-69.js} +19 -16
- package/chunk/index-CwaTj-69.js.map +1 -0
- package/chunk/{index-BSzMX8zb.js → index-CxnTO_Lf.js} +6 -6
- package/chunk/{index-BSzMX8zb.js.map → index-CxnTO_Lf.js.map} +1 -1
- package/chunk/index-D2d6x5LN.js +4 -4
- package/chunk/index-D7Mqx5na.js +4 -4
- package/chunk/{index-DD5n87cJ.js → index-DAIJvzG8.js} +6 -6
- package/chunk/{index-DWjm3Bvf.js.map → index-DAIJvzG8.js.map} +1 -1
- package/chunk/index-DFoMYB8K.js +4 -4
- package/chunk/index-DIkWpujR.js +4 -4
- package/chunk/{index-DbVmFTqT.js → index-DR6Pa1j5.js} +6 -6
- package/chunk/{index-DbVmFTqT.js.map → index-DR6Pa1j5.js.map} +1 -1
- package/chunk/{index-CYi-EOgq.js → index-DUSchoSP.js} +6 -6
- package/chunk/{index-Xq2oC7I1.js.map → index-DUSchoSP.js.map} +1 -1
- package/chunk/{index-CzRLvvKQ.js → index-DknL9KFe.js} +5 -5
- package/chunk/{index-CzRLvvKQ.js.map → index-DknL9KFe.js.map} +1 -1
- package/chunk/{index-BbDuLZm0.js → index-DmsA0RkT.js} +6 -6
- package/chunk/{index-BbDuLZm0.js.map → index-DmsA0RkT.js.map} +1 -1
- package/chunk/{index-zyCRCimF.js → index-Du8yP6jg.js} +6 -6
- package/chunk/{index-DE_o4TXi.js.map → index-Du8yP6jg.js.map} +1 -1
- package/chunk/index-EUJqfdiJ.js +4 -4
- package/chunk/{index-Ck4Jg3xo.js → index-PK17Xb1V.js} +7 -7
- package/chunk/{index-CBoeMu9i.js.map → index-PK17Xb1V.js.map} +1 -1
- package/chunk/{index-dWqQPCim.js → index-TJmIB8hf.js} +5 -5
- package/chunk/{index-MB6FRj7G.js.map → index-TJmIB8hf.js.map} +1 -1
- package/chunk/index-dTu4ORna.js +4 -4
- package/chunk/{index-CARFmnRY.js → index-t_EdXFvl.js} +6 -6
- package/chunk/{index-DeW_gAIO.js.map → index-t_EdXFvl.js.map} +1 -1
- package/chunk/is-OeoxCvCJ.js +4 -4
- package/chunk/it-C8ZVZXAZ.js +4 -4
- package/chunk/iw-BlNWQ44s.js +4 -4
- package/chunk/ja-ByZsq6B3.js +4 -4
- package/chunk/ko-CJtRHc1k.js +4 -4
- package/chunk/lo-DG5_kBxI.js +4 -4
- package/chunk/lt-CPMjVK0l.js +4 -4
- package/chunk/{militaryStepHelpers-BBHrfNCB.js → militaryStepHelpers-CmAqOhOv.js} +5 -5
- package/chunk/{militaryStepHelpers-BAkdVJwA.js.map → militaryStepHelpers-CmAqOhOv.js.map} +1 -1
- package/chunk/{militaryStepHelpers-BAkdVJwA.js → militaryStepHelpers-DuJLFDxo.js} +5 -5
- package/chunk/{militaryStepHelpers-BBHrfNCB.js.map → militaryStepHelpers-DuJLFDxo.js.map} +1 -1
- package/chunk/mocks-CeAm-JFs.js +4 -4
- package/chunk/mocks-ClJ0M6QH.js +4 -4
- package/chunk/ms-kW4-QxcQ.js +4 -4
- package/chunk/nl-BE-B50g9ESZ.js +4 -4
- package/chunk/nl-CqhguuWs.js +4 -4
- package/chunk/no-oDvd5Pbh.js +4 -4
- package/chunk/pl-CmJTwwaK.js +4 -4
- package/chunk/pt-BR-Bn7yzXgL.js +4 -4
- package/chunk/pt-CO5wB188.js +4 -4
- package/chunk/ro-sj1FJM-g.js +4 -4
- package/chunk/ru-8IiNvgy2.js +4 -4
- package/chunk/sk-aGVgcFKm.js +4 -4
- package/chunk/sl-BhNdkTbu.js +4 -4
- package/chunk/sr-BMFHnZm-.js +4 -4
- package/chunk/sv-B_eq88ce.js +4 -4
- package/chunk/sw-DbdFPGF8.js +4 -4
- package/chunk/th-BYY2tGFz.js +4 -4
- package/chunk/tr-d4Yjkvpu.js +4 -4
- package/chunk/uk-Cm64Vc92.js +4 -4
- package/chunk/ur-DFf2LHi5.js +4 -4
- package/chunk/useCollectFieldsEndpoint-Cd6d_u47.js +4 -4
- package/chunk/useCollectFieldsEndpoint-DqTjyVEr.js +4 -4
- package/chunk/useMetrics-D2fG6cgw.js +4 -4
- package/chunk/useMetrics-wq7yrL0b.js +4 -4
- package/chunk/vi-DDgpUcog.js +4 -4
- package/chunk/zh-BoejQGiZ.js +4 -4
- package/chunk/zh-HK-Bwd8sr9B.js +4 -4
- package/chunk/zu-BKlg24xX.js +4 -4
- package/package.json +1 -1
- package/sheerid-install.css +4 -4
- package/sheerid-install.js +4 -4
- package/sheerid.css +4 -4
- package/sheerid.js +914 -914
- package/sheerid.js.map +1 -1
- package/chunk/index-OS2bzRh2.js.map +0 -1
- package/chunk/index-q6PutwA-.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-zyCRCimF.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 type VerificationService,\n type Organization,\n type MemberPersonalInfoViewModel,\n type MemberPersonalInfoResponse,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\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 const existing = (verificationService.viewModel?.fieldsToSkipValidation || []).filter(\n (id) => id !== \"memberId\",\n );\n if (!isMemberIdRequired) {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [...existing, \"memberId\"] },\n { partial: true },\n );\n } else {\n verificationService.updateViewModel({ fieldsToSkipValidation: existing }, { 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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\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","getFieldConfigByFieldId","locale","updateMemberViewModel","key","value","nextState","produce","draft","React","existing","id","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","MembershipOrganizationComponent","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","newValue","LastName","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","BirthDate","MemberId","PhoneNumber","config","FormFieldCustom","MarketConsentWrapperComponent","ExtraMessage","CaptchaComponent","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,EAAA,GACVC,IAAqBC,EAAwB,UAAU,GAAG,mBAE1DC,IAAST,EAAU,aAAa,OAEhCU,IAAwB,CAACC,GAAwCC,MAAe;AACpF,UAAMC,IAAyCC;AAAAA,MAC7Cd;AAAA,MACA,CAACe,MAAuC;AACrC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MACxB;AAAA,IAAA;AAEF,IAAAb,EAAoB,gBAAgBc,CAAS;AAAA,EAC/C;AAEA,SAAAG,EAAM,UAAU,MAAM;AACpB,UAAMC,KAAYlB,EAAoB,WAAW,0BAA0B,CAAA,GAAI;AAAA,MAC7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AAAC;AAAA,YACA,UAAUQ,EAAwB,oBAAoB,GAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAG3Da,gBAAAA,EAAAA,IAACqB,GAAA,EAAa,qBAAA3C,GAA0C,QAAO,qBAAA,CAAqB;AAAA,QAEpFsB,gBAAAA,EAAAA;AAAAA,UAACsB;AAAA,UAAA;AAAA,YACC,qBAAA5C;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrCoB,gBAAAA,EAAAA;AAAAA,UAACuB;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA9C;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEkB,gBAAAA,EAAAA;AAAAA,cAACY;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaa,IAAkChD;"}
|
|
1
|
+
{"version":3,"file":"index-BGgNLPMu.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 type VerificationService,\n type Organization,\n type MemberPersonalInfoViewModel,\n type MemberPersonalInfoResponse,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\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 const existing = (verificationService.viewModel?.fieldsToSkipValidation || []).filter(\n (id) => id !== \"memberId\",\n );\n if (!isMemberIdRequired) {\n verificationService.updateViewModel(\n { fieldsToSkipValidation: [...existing, \"memberId\"] },\n { partial: true },\n );\n } else {\n verificationService.updateViewModel({ fieldsToSkipValidation: existing }, { 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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\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","getFieldConfigByFieldId","locale","updateMemberViewModel","key","value","nextState","produce","draft","React","existing","id","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","MembershipOrganizationComponent","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","newValue","LastName","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","BirthDate","MemberId","PhoneNumber","config","FormFieldCustom","MarketConsentWrapperComponent","ExtraMessage","CaptchaComponent","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,EAAA,GACVC,IAAqBC,EAAwB,UAAU,GAAG,mBAE1DC,IAAST,EAAU,aAAa,OAEhCU,IAAwB,CAACC,GAAwCC,M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AACoB;AAAA,UAAA;AAAA,YACC,qBAAA1C;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,YACnC,UAAU,CAAC6B,MAAa;AACtB,cAAApB,EAAsB,YAAY;AAAA,gBAChC,GAAGX,EAAoB,UAAU;AAAA,gBACjC,oBAAoB+B;AAAA,cAAA,CACrB,GACDF,EAAqC,sBAAsBE,GAAU/B,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,UAAUQ,EAAwB,oBAAoB,GAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAG3Da,gBAAAA,EAAAA,IAACqB,GAAA,EAAa,qBAAA3C,GAA0C,QAAO,qBAAA,CAAqB;AAAA,QAEpFsB,gBAAAA,EAAAA;AAAAA,UAACsB;AAAA,UAAA;AAAA,YACC,qBAAA5C;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrCoB,gBAAAA,EAAAA;AAAAA,UAACuB;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA9C;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEkB,gBAAAA,EAAAA;AAAAA,cAACY;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaa,IAAkChD;"}
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE:
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.220.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776785604219
|
|
9
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:24 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
11
11
|
*/
|
|
12
12
|
import { i as I, m as F, $ as P, a0 as M, h as c, R, o as d, j as o, P as D, g as r, n as A, F as u, U as T, V, x as k, e as q } from "../_mysheerid-preview.js";
|
|
13
13
|
import { u as B } from "./useCollectFieldsEndpoint-Cd6d_u47.js";
|
|
14
|
-
import { F as L, L as U, P as W, a as w, M as H, C as K } from "./CaptchaComponent-
|
|
14
|
+
import { F as L, L as U, P as W, a as w, M as H, C as K } from "./CaptchaComponent-BfZgvFl0.js";
|
|
15
15
|
import { E as O, P as $ } from "./PersonalInfoStepSubmitButton-v_kWLmEw.js";
|
|
16
|
-
import { B as z } from "./militaryStepHelpers-
|
|
16
|
+
import { B as z } from "./militaryStepHelpers-DuJLFDxo.js";
|
|
17
17
|
import { P as G } from "./PostalCodeComponent-KXVfZkLx.js";
|
|
18
18
|
import { C as J } from "./CountryComponentWrapper--2UQ7mXP.js";
|
|
19
19
|
import { C as Q } from "./City-BmrJpnS6.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-CARFmnRY.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, type InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n type VerificationService,\n type AgePersonalInfoViewModel,\n type AgePersonalInfoResponse,\n type FormSelectChoice,\n type Country,\n type FieldDescription,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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\";\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\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\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 explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\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","getFieldConfigByFieldId","FirstName","newValue","LastName","BirthDate","CityComponent","AddressComponent","PostalCode","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;;;;;;;;AAqDA,MAAMA,IAAsB,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,EAAA,GAEIQ,IACJC,EAAwBH,CAAc,GAClCI,IAAmBC,EAAQ,MAAMV,EAAU,cAAc,OAAOO,EAAqB,KAAK,GAC1FI,IACJF,MAAqB,OAAO,CAAC,EAAE,KAAK,aAAA,CAAc,IAAI,CAAA,GAGlDG,IACJH,MAAqB,QACrBX,EAAoB,aAAa,2BACjCA,EAAoB,aAAa,gBAC7Be,IACJJ,MAAqB,QAAQX,EAAoB,aAAa,gBAE1DgB,IAASd,EAAU,aAAa,OACh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4.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, type InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { getSafe } from \"@jslib/shared/utils/getSafe\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n type VerificationService,\n type AgePersonalInfoViewModel,\n type AgePersonalInfoResponse,\n type FormSelectChoice,\n type Country,\n type FieldDescription,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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\";\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\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\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 explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\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","getFieldConfigByFieldId","FirstName","newValue","LastName","BirthDate","CityComponent","AddressComponent","PostalCode","Email","FormattedHTMLMessage","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;;;;;;;;AAqDA,MAAMA,IAAsB,CAAC,EAAE,qBAAAC,GAAqB,MAAAC,QAA8C;AAChG,QAAMC,I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BAAAnD;AAAA,YACA,WAAW,CAAC,CAACG,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAErC2B,gBAAAA,EAAAA;AAAAA,UAACsB;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAArD;AAAA,YACA,WAAAE;AAAA,YACA,oBAAAG;AAAA,YACA,YACEyB,gBAAAA,EAAAA;AAAAA,cAACa;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaW,KAA+BC,EAAWxD,CAAmB;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
/**
|
|
3
|
-
* VERSION: 2.
|
|
4
|
-
* BUILD_TIMESTAMP:
|
|
5
|
-
* BUILD_DATE:
|
|
6
|
-
* BUILD_COMMIT:
|
|
3
|
+
* VERSION: 2.220.0
|
|
4
|
+
* BUILD_TIMESTAMP: 1776785593286
|
|
5
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:13 GMT+0000 (Coordinated Universal Time)
|
|
6
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
7
7
|
*/
|
|
8
8
|
import { i as x, g as n, j as a, c as b, F as p, P as j, a8 as h, _ as E, o as r, Y as M, n as f, U as N, V as F, p as T, e as I } from "../sheerid.js";
|
|
9
|
-
import { F as P, L as k, P as V, a as z, M as A, C as L } from "./CaptchaComponent-
|
|
9
|
+
import { F as P, L as k, P as V, a as z, M as A, C as L } from "./CaptchaComponent-DFZOJr8t.js";
|
|
10
10
|
import { E as w, P as H } from "./PersonalInfoStepSubmitButton-j44RdZDq.js";
|
|
11
11
|
import { A as R } from "./AddressComponent-AiyIPiCz.js";
|
|
12
12
|
import { C as B } from "./City-yVVnZQTP.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-DdxRfsSh.js","sources":["../../src/components/FormFields/Company/CompanyComponent.tsx","../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["import { FormattedHTMLMessage, injectIntl } from \"react-intl\";\n\nimport { getFieldConfigByFieldId } from \"@/lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport {\n type FormFieldComponentProps,\n type VerificationServiceProps,\n type Organization,\n} from \"../../../lib/types/types\";\nimport { FormFieldTypeahead } from \"../FormFieldTypeahead/FormFieldTypeahead\";\nimport { getOrgSearchUrl } from \"../../../lib/ProgramTheme/programThemeGetters\";\n\nexport const Company = ({\n value,\n isErrored,\n onChange,\n verificationService,\n intl,\n placeholder = \"\",\n disabled = false,\n}: FormFieldComponentProps & VerificationServiceProps) => {\n const isFieldHidden = getFieldConfigByFieldId(\"organization\")?.hidden;\n\n if (isFieldHidden) {\n return null;\n }\n\n return (\n <FormFieldTypeahead\n fieldId=\"company\"\n value={value}\n verificationService={verificationService}\n onChange={(choice: Organization) => onChange(choice)}\n placeholder={\n placeholder ||\n intl.formatHTMLMessage({ id: \"companyPlaceholder\", defaultMessage: \"Company\" })\n }\n label={<FormattedHTMLMessage id=\"company\" defaultMessage=\"Company\" />}\n errorMessage={\n isErrored && (\n <FormattedHTMLMessage\n id=\"errorId.invalidOrganization\"\n defaultMessage=\"You must select an organization from the list\"\n />\n )\n }\n orgSearchUrl={getOrgSearchUrl(\n verificationService.viewModel,\n verificationService.programTheme,\n )}\n showPlaceholderAndHideLabel={!!placeholder}\n disabled={disabled}\n />\n );\n};\n\nexport const CompanyComponent = injectIntl(Company);\n","/**\n * TODO - preamble\n */\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n type VerificationService,\n type Organization,\n type EmploymentPersonalInfoViewModel,\n type CustomFormFieldConfig,\n type FormSelectChoice,\n type State,\n type FieldId,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n const addressFields: FieldId[] = [\"address1\", \"city\", \"state\", \"postalCode\"];\n const existing = (viewModel.fieldsToSkipValidation || []).filter(\n (id) => !addressFields.includes(id),\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [...existing, ...addressFields];\n } else {\n viewModel.fieldsToSkipValidation = existing.length ? existing : undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["Company","value","isErrored","onChange","verificationService","intl","placeholder","disabled","getFieldConfigByFieldId","jsx","FormFieldTypeahead","choice","FormattedHTMLMessage","getOrgSearchUrl","CompanyComponent","injectIntl","StepEmploymentPersonalInfo","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","nextState","produce","draft","jsxs","PersonalInfoWrapper","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","countryChoice","shouldCollectAddressFields","addressFields","existing","id","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","newValue","LastName","AddressComponent","CityComponent","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","PostalCodeComponent","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent"],"mappings":";;;;;;;;;;;AAYO,MAAMA,IAAU,CAAC;AAAA,EACtB,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AACb,MACwBC,EAAwB,cAAc,GAAG,SAGtD,OAIPC,gBAAAA,EAAAA;AAAAA,EAACC;AAAA,EAAA;AAAA,IACC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AC8C,GAAA,EAAa,qBAAAnD,GAA0C,QAAO,qBAAA,CAAqB;AAAA,QAEpFK,gBAAAA,EAAAA;AAAAA,UAAC+C;AAAA,UAAA;AAAA,YACC,qBAAApD;AAAA,YACA,WAAW,CAAC,CAACc,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrCT,gBAAAA,EAAAA;AAAAA,UAACgD;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAtD;AAAA,YACA,WAAAa;AAAA,YACA,YACER,gBAAAA,EAAAA;AAAAA,cAACG;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAGa+C,KAAsC5C,EAAWC,CAA0B;"}
|
|
1
|
+
{"version":3,"file":"index-BUKeo5wI.js","sources":["../../src/components/FormFields/Company/CompanyComponent.tsx","../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["import { FormattedHTMLMessage, injectIntl } from \"react-intl\";\n\nimport { getFieldConfigByFieldId } from \"@/lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport {\n type FormFieldComponentProps,\n type VerificationServiceProps,\n type Organization,\n} from \"../../../lib/types/types\";\nimport { FormFieldTypeahead } from \"../FormFieldTypeahead/FormFieldTypeahead\";\nimport { getOrgSearchUrl } from \"../../../lib/ProgramTheme/programThemeGetters\";\n\nexport const Company = ({\n value,\n isErrored,\n onChange,\n verificationService,\n intl,\n placeholder = \"\",\n disabled = false,\n}: FormFieldComponentProps & VerificationServiceProps) => {\n const isFieldHidden = getFieldConfigByFieldId(\"organization\")?.hidden;\n\n if (isFieldHidden) {\n return null;\n }\n\n return (\n <FormFieldTypeahead\n fieldId=\"company\"\n value={value}\n verificationService={verificationService}\n onChange={(choice: Organization) => onChange(choice)}\n placeholder={\n placeholder ||\n intl.formatHTMLMessage({ id: \"companyPlaceholder\", defaultMessage: \"Company\" })\n }\n label={<FormattedHTMLMessage id=\"company\" defaultMessage=\"Company\" />}\n errorMessage={\n isErrored && (\n <FormattedHTMLMessage\n id=\"errorId.invalidOrganization\"\n defaultMessage=\"You must select an organization from the list\"\n />\n )\n }\n orgSearchUrl={getOrgSearchUrl(\n verificationService.viewModel,\n verificationService.programTheme,\n )}\n showPlaceholderAndHideLabel={!!placeholder}\n disabled={disabled}\n />\n );\n};\n\nexport const CompanyComponent = injectIntl(Company);\n","/**\n * TODO - preamble\n */\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n type VerificationService,\n type Organization,\n type EmploymentPersonalInfoViewModel,\n type CustomFormFieldConfig,\n type FormSelectChoice,\n type State,\n type FieldId,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n const addressFields: FieldId[] = [\"address1\", \"city\", \"state\", \"postalCode\"];\n const existing = (viewModel.fieldsToSkipValidation || []).filter(\n (id) => !addressFields.includes(id),\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [...existing, ...addressFields];\n } else {\n viewModel.fieldsToSkipValidation = existing.length ? existing : undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["Company","value","isErrored","onChange","verificationService","intl","placeholder","disabled","getFieldConfigByFieldId","jsx","FormFieldTypeahead","choice","FormattedHTMLMessage","getOrgSearchUrl","CompanyComponent","injectIntl","StepEmploymentPersonalInfo","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","nextState","produce","draft","jsxs","PersonalInfoWrapper","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","countryChoice","shouldCollectAddressFields","addressFields","existing","id","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","newValue","LastName","AddressComponent","CityComponent","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","PostalCodeComponent","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent"],"mappings":";;;;;;;;;;;AAYO,MAAMA,IAAU,CAAC;AAAA,EACtB,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AACb,MACwBC,EAAwB,cAAc,GAAG,SAGtD,OAIPC,gBAAAA,EAAAA;AAAAA,EAACC;AAAA,EAAA;AAAA,IACC,SAAQ;AAAA,IACR,OAAAT;AAAA,IACA,qBAAAG;AAAA,IACA,UAAU,CAACO,MAAyBR,EAASQ,CAAM;AAAA,IACnD,aACEL,KACAD,EAAK,kBAAkB,EAAE,IAAI,sBAAsB,gBAAgB,WAAW;AAAA,IAEhF,OAAOI,gBAAAA,EAAAA,IAACG,GAAA,EAAqB,IAAG,WAAU,gBAAe,WAAU;AAAA,IACnE,cACEV,KACEO,gBAAAA,EAAAA;AAAAA,MAACG;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,gBAAe;AAAA,MAAA;AAAA,IAAA;AAAA,IAIrB,cAAcC;AAAA,MACZT,EAAoB;AAAA,MACpBA,EAAoB;AAAA,IAAA;AAAA,IAEtB,6BAA6B,CAAC,CAACE;AAAA,IAC/B,UAAAC;AAAA,EAAA;AAAA,GAKOO,IAAmBC,EAAWf,CAAO,GCP5CgB,IAA6B,CAAC;AAAA,EAClC,MAAAX;AAAA,EACA,qBAAAD;AACF,MAAgD;AAC9C,QAAMa,IAAYb,EAAoB,WAChC,EAAE,uBAAAc,MAA0Bd,GAC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
|
-
* BUILD_COMMIT:
|
|
3
|
+
* VERSION: 2.220.0
|
|
4
|
+
* BUILD_TIMESTAMP: 1776785593286
|
|
5
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:13 GMT+0000 (Coordinated Universal Time)
|
|
6
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
7
7
|
*/
|
|
8
8
|
import { i as h, m as N, b as g, j as a, P as j, o as n, g as l, F as m, n as E, U as M, V as f, p as i, e as I } from "../sheerid.js";
|
|
9
|
-
import { F, L as P, P as y, a as T, M as k, C as L } from "./CaptchaComponent-
|
|
9
|
+
import { F, L as P, P as y, a as T, M as k, C as L } from "./CaptchaComponent-DFZOJr8t.js";
|
|
10
10
|
import { A as R } from "./AddressComponent-AiyIPiCz.js";
|
|
11
11
|
import { P as A } from "./PostalCodeComponent-DrCcV90W.js";
|
|
12
12
|
import { E as V, P as B } from "./PersonalInfoStepSubmitButton-j44RdZDq.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-dWqQPCim.js","sources":["../../src/components/StepMoverPersonalInfo/StepMoverPersonalInfoComponent.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n type VerificationService,\n type MoverPersonalInfoViewModel,\n type MoverPersonalInfoResponse,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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 { AddressComponent as Address } from \"../FormFields/Address/AddressComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\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 { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\ninterface StepMoverPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMoverPersonalInfo = ({ verificationService }: StepMoverPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MoverPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MoverPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const updateMoverViewModel = (key: keyof MoverPersonalInfoViewModel, value: any) => {\n const nextState: MoverPersonalInfoViewModel = produce(\n viewModel,\n (draft: MoverPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n // We do not want a drop down list, just apply available statuses to the viewModel\n useEffect(() => {\n updateMoverViewModel(\"statuses\", verificationResponse.availableStatuses);\n }, []);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"mover-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\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 updateMoverViewModel(\"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 updateMoverViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Address\n value={viewModel.address1}\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateMoverViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"streetAddress\" defaultMessage=\"Street Address\" />}\n isRequired\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n />\n\n <PostalCode\n value={viewModel.postalCode}\n isErrored={!!fieldValidationErrors.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMoverViewModel(\"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 updateMoverViewModel(\"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 updateMoverViewModel(\"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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMoverPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Recent Mover Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMoverPersonalInfoComponent = injectIntl(StepMoverPersonalInfo);\n"],"names":["StepMoverPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","updateMoverViewModel","key","value","nextState","produce","draft","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","FirstName","getFieldConfigByFieldId","newValue","updateFieldValidationErrorsByFieldId","LastName","Address","FormattedHTMLMessage","PostalCode","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMoverPersonalInfoComponent","injectIntl"],"mappings":";;;;;;;AAqCA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAA+D;AAC9F,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAA,GAEVC,IAAuB,CAACC,GAAuCC,MAAe;AAClF,UAAMC,IAAwCC;AAAAA,MAC5CX;AAAA,MACA,CAACY,MAAsC;AACpC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MACxB;AAAA,IAAA;AAEF,IAAAV,EAAoB,gBAAgBW,CAAS;AAAA,EAC/C;AAGAG,SAAAA,EAAAA,UAAU,MAAM;AACd,IAAAN,EAAqB,YAAYL,EAAqB,iBAAiB;AAAA,EACzE,GAAG,CAAA,CAAE,GAGHY,gBAAAA,EAAAA;AAAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAhB;AAAA,MACA,MAAMG,EAAqB;AAAA,MAE3B,UAAA;AAAA,QAAAc,gBAAAA,EAAAA;AAAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAlB;AAAA,YACA,qBAAoB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGtBiB,gBAAAA,MAACE,KAAwB,qBAAAnB,GAA0C;AAAA,QAEnEe,gBAAAA,EAAAA,KAAC,OAAA,EAAI,WAAU,aACb,UAAA;AAAA,UAAAE,gBAAAA,EAAAA;AAAAA,YAACG;AAAAA,YAAA;AAAA,cACC,OAAOnB,EAAU;AAAA,cACjB,WAAW,CAAC,CAACC,EAAsB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AAAA,gBACjC,oBAAoBsB;AAAA,cAAA,CACrB,GACDC,EAAqC,sBAAsBD,GAAUtB,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,UAAUoB,EAAwB,oBAAoB,GAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAG3DJ,gBAAAA,EAAAA,IAACkB,GAAA,EAAa,qBAAAnC,GAA0C,QAAO,qBAAA,CAAqB;AAAA,QAEpFiB,gBAAAA,EAAAA;AAAAA,UAACmB;AAAA,UAAA;AAAA,YACC,qBAAApC;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrCe,gBAAAA,EAAAA;AAAAA,UAACoB;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAtC;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEa,gBAAAA,EAAAA;AAAAA,cAACS;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaa,IAAiCC,EAAWzC,CAAqB;"}
|
|
1
|
+
{"version":3,"file":"index-BW4GfeEt.js","sources":["../../src/components/StepMoverPersonalInfo/StepMoverPersonalInfoComponent.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n type VerificationService,\n type MoverPersonalInfoViewModel,\n type MoverPersonalInfoResponse,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\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 { AddressComponent as Address } from \"../FormFields/Address/AddressComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\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 { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\ninterface StepMoverPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMoverPersonalInfo = ({ verificationService }: StepMoverPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MoverPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MoverPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const updateMoverViewModel = (key: keyof MoverPersonalInfoViewModel, value: any) => {\n const nextState: MoverPersonalInfoViewModel = produce(\n viewModel,\n (draft: MoverPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n // We do not want a drop down list, just apply available statuses to the viewModel\n useEffect(() => {\n updateMoverViewModel(\"statuses\", verificationResponse.availableStatuses);\n }, []);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"mover-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\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 updateMoverViewModel(\"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 updateMoverViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Address\n value={viewModel.address1}\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateMoverViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"streetAddress\" defaultMessage=\"Street Address\" />}\n isRequired\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n />\n\n <PostalCode\n value={viewModel.postalCode}\n isErrored={!!fieldValidationErrors.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMoverViewModel(\"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 updateMoverViewModel(\"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 updateMoverViewModel(\"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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMoverPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Recent Mover Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMoverPersonalInfoComponent = injectIntl(StepMoverPersonalInfo);\n"],"names":["StepMoverPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","updateMoverViewModel","key","value","nextState","produce","draft","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","FirstName","getFieldConfigByFieldId","newValue","updateFieldValidationErrorsByFieldId","LastName","Address","FormattedHTMLMessage","PostalCode","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","ExtraMessage","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMoverPersonalInfoComponent","injectIntl"],"mappings":";;;;;;;AAqCA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAA+D;AAC9F,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAA,GAEVC,IAAuB,CAACC,GAAuCC,MAAe;AAClF,UAAMC,IAAwCC;AAAAA,MAC5CX;AAAA,MACA,CAACY,MAAsC;AACpC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MACxB;AAAA,IAAA;AAEF,IAAAV,EAAoB,gBAAgBW,CAAS;AAAA,EAC/C;AAGAG,SAAAA,EAAAA,UAAU,MAAM;AACd,IAAAN,EAAqB,YAAYL,EAAqB,iBAAiB;AAAA,EACzE,GAAG,CAAA,CAAE,GAGHY,gBAAAA,EAAAA;AAAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAhB;AAAA,MACA,MAAMG,EAAqB;AAAA,MAE3B,UAAA;AAAA,QAAAc,gBAAAA,EAAAA;AAAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAlB;AAAA,YACA,qBAAoB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGtBiB,gBAAAA,MAACE,KAAwB,qBAAAnB,GAA0C;AAAA,QAEnEe,gBAAAA,EAAAA,KAAC,OAAA,EAA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AAAlC;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,YACnC,UAAU,CAACoB,MAAa;AACtB,cAAAd,EAAqB,YAAY;AAAA,gBAC/B,GAAGR,EAAoB,UAAU;AAAA,gBACjC,oBAAoBsB;AAAA,cAAA,CACrB,GACDC,EAAqC,sBAAsBD,GAAUtB,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,UAAUoB,EAAwB,oBAAoB,GAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAG3DJ,gBAAAA,EAAAA,IAACkB,GAAA,EAAa,qBAAAnC,GAA0C,QAAO,qBAAA,CAAqB;AAAA,QAEpFiB,gBAAAA,EAAAA;AAAAA,UAACmB;AAAA,UAAA;AAAA,YACC,qBAAApC;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrCe,gBAAAA,EAAAA;AAAAA,UAACoB;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAtC;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEa,gBAAAA,EAAAA;AAAAA,cAACS;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaa,IAAiCC,EAAWzC,CAAqB;"}
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE:
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.220.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776785604219
|
|
9
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:24 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
11
11
|
*/
|
|
12
12
|
import { i as M, B as h, l as x, m as L, R as y, J as P, j as o, P as T, g as d, p as E, A as f, o as n, a9 as w, a2 as F, D as V, _ as B, F as b, Y as R, n as O, V as z, e as D, aa as A } from "../_mysheerid-preview.js";
|
|
13
|
-
import { B as k } from "./militaryStepHelpers-
|
|
13
|
+
import { B as k } from "./militaryStepHelpers-DuJLFDxo.js";
|
|
14
14
|
import { E as _, P as q } from "./PersonalInfoStepSubmitButton-v_kWLmEw.js";
|
|
15
|
-
import { F as H, L as W, P as Y, a as c, M as G, C as K } from "./CaptchaComponent-
|
|
15
|
+
import { F as H, L as W, P as Y, a as c, M as G, C as K } from "./CaptchaComponent-BfZgvFl0.js";
|
|
16
16
|
import { S as U } from "./StatusComponent-pmuIhuXi.js";
|
|
17
17
|
import { E as J, L as S } from "./EBTCardNumberComponent-oYQJ_tP7.js";
|
|
18
18
|
import { P as Q } from "./PostalCodeComponent-KXVfZkLx.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-BKJ-EAbL.js","sources":["../../src/components/StepLowIncomePersonalInfo/StepLowIncomePersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport {\n LowIncomeStatusDefaultMessagesEnum,\n VerificationStepsEnum,\n} from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n type FormSelectChoice,\n type LowIncomePersonalInfoResponse,\n type LowIncomePersonalInfoViewModel,\n type LowIncomeStatus,\n type Organization,\n type State,\n type VerificationService,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getAvailableLowIncomeStatuses,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n getStatusLabel,\n handleEmailOnKeyDown,\n orgToOption,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { StatusComponent } from \"../FormFields/Status/StatusComponent\";\nimport { LowIncomeOrganizationComponent as LowIncomeOrganization } from \"../FormFields/LowIncomeOrganization/LowIncomeOrganizationComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { EBTCardNumberComponent } from \"../FormFields/EBTCardNumber/EBTCardNumberComponent\";\nimport { setViewModel } from \"../../lib/VerificationService/ViewModel\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { blankOrganization } from \"../../lib/types/empties\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\nimport { isLowIncomeVM } from \"./lowIncomeTypes\";\n\ninterface StepLowIncomePersonalInfoComponentProps {\n verificationService: VerificationService<LowIncomePersonalInfoViewModel>;\n intl: any;\n}\n\ntype DefaultStatusMessages = {\n [key in LowIncomeStatus]: string;\n};\n\nexport const defaultStatusMessages: DefaultStatusMessages = {\n SNAP_BENEFITS: \"Snap Benefits Recipient\",\n OTHER_GOVERNMENT_ASSISTANCE: \"Other Government Assistance Recipient\",\n COMMUNITY_ELIGIBILITY_PROVISION: \"CEP (Community Eligibility Provision, Title 1/LAP)\",\n};\n\nconst StepLowIncomePersonalInfo = ({\n intl,\n verificationService,\n}: StepLowIncomePersonalInfoComponentProps) => {\n const { viewModel } = verificationService;\n const options = getOptions();\n\n if (!isLowIncomeVM(viewModel)) {\n logger.error(\"Expected LowIncomePersonalInfoViewModel\");\n return null;\n }\n\n const { fieldValidationErrors } = verificationService;\n const { verificationResponse } = verificationService;\n const failedInstantMatch = hasFailedInstantMatch(\n verificationResponse as LowIncomePersonalInfoResponse,\n );\n\n const locale = viewModel.localeChoice.value;\n\n const selectedStatus = viewModel.statuses[0] ? viewModel.statuses[0] : undefined;\n const isSelectedStatusSnapBenefits = selectedStatus === \"SNAP_BENEFITS\";\n const updateLowIncomeViewModel = (key: keyof LowIncomePersonalInfoViewModel, value: any) => {\n if (!isLowIncomeVM(viewModel)) {\n logger.error(\"Expected LowIncomePersonalInfoViewModel\");\n return;\n }\n const nextState: LowIncomePersonalInfoViewModel = produce(\n viewModel,\n (draft: LowIncomePersonalInfoViewModel) => {\n draft[key] = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n React.useEffect(() => {\n if (isSelectedStatusSnapBenefits) {\n const updatedViewModel = { fieldsToSkipValidation: [\"organization\"] };\n setViewModel(updatedViewModel);\n }\n }, [isSelectedStatusSnapBenefits]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"low-income\"\n />\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <StatusComponent\n segmentId=\"low-income\"\n value={{\n value: viewModel.statuses ? viewModel.statuses[0] : \"\",\n label: viewModel.statuses\n ? getStatusLabel(intl, viewModel.statuses[0], LowIncomeStatusDefaultMessagesEnum)\n : \"\",\n }}\n isErrored={!!fieldValidationErrors.statuses}\n disabled={getFieldConfigByFieldId(\"status\")?.disabled}\n options={getAvailableLowIncomeStatuses(\n intl,\n (verificationResponse as LowIncomePersonalInfoResponse).availableStatuses,\n )}\n onChange={(status: FormSelectChoice<LowIncomeStatus>) => {\n const updatedStatuses = status ? [status.value as LowIncomeStatus] : [];\n const nextState: LowIncomePersonalInfoViewModel = produce(\n viewModel,\n (draft: LowIncomePersonalInfoViewModel) => {\n if (viewModel.statuses[0] !== updatedStatuses[0]) {\n draft.organization = blankOrganization.organization; // Clear out the org b/c they're of different kind\n }\n draft.statuses = updatedStatuses;\n },\n );\n verificationService.updateViewModel(nextState);\n updateFieldValidationErrorsByFieldId(\n \"statuses\",\n status ? status.value : \"\",\n verificationService,\n );\n }}\n />\n {selectedStatus === \"SNAP_BENEFITS\" && (\n <EBTCardNumberComponent\n value={viewModel.ebtCardNumber}\n isErrored={!!fieldValidationErrors.ebtCardNumber}\n disabled={getFieldConfigByFieldId(\"ebtCardNumber\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"ebtCardNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"ebtCardNumber\", newValue, verificationService);\n }}\n />\n )}\n {(selectedStatus === \"OTHER_GOVERNMENT_ASSISTANCE\" ||\n selectedStatus === \"COMMUNITY_ELIGIBILITY_PROVISION\") && (\n <LowIncomeOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={orgToOption(verificationService.viewModel.organization)}\n verificationService={verificationService}\n isRequired\n disabled={getFieldConfigByFieldId(\"organization\")?.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 updateLowIncomeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"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 updateLowIncomeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n value={viewModel.address1}\n isRequired\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n <div className=\"sid-address-extra-fields sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateLowIncomeViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.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 updateLowIncomeViewModel(\"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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectLowIncomePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepLowIncomePersonalInfoComponent = injectIntl(StepLowIncomePersonalInfo);\n"],"names":["StepLowIncomePersonalInfo","intl","verificationService","viewModel","options","getOptions","isLowIncomeVM","logger","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","locale","selectedStatus","isSelectedStatusSnapBenefits","updateLowIncomeViewModel","key","value","nextState","produce","draft","React","setViewModel","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","getFieldConfigByFieldId","StatusComponent","getStatusLabel","LowIncomeStatusDefaultMessagesEnum","getAvailableLowIncomeStatuses","status","updatedStatuses","blankOrganization","updateFieldValidationErrorsByFieldId","EBTCardNumberComponent","newValue","LowIncomeOrganization","choice","updateViewModelOrganization","orgToOption","FirstName","LastName","BirthDate","AddressComponent","FormattedHTMLMessage","CityComponent","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","PostalCodeComponent","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","Capt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AEaiB,KAAqCC,EAAWlE,EAAyB;"}
|
|
1
|
+
{"version":3,"file":"index-BXgePv3X.js","sources":["../../src/components/StepLowIncomePersonalInfo/StepLowIncomePersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { logger } from \"@jslib/shared/utils/logger\";\n\nimport {\n LowIncomeStatusDefaultMessagesEnum,\n VerificationStepsEnum,\n} from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n type FormSelectChoice,\n type LowIncomePersonalInfoResponse,\n type LowIncomePersonalInfoViewModel,\n type LowIncomeStatus,\n type Organization,\n type State,\n type VerificationService,\n type CustomFormFieldConfig,\n} from \"../../lib/types/types\";\nimport {\n getAvailableLowIncomeStatuses,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n getStatusLabel,\n handleEmailOnKeyDown,\n orgToOption,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { StatusComponent } from \"../FormFields/Status/StatusComponent\";\nimport { LowIncomeOrganizationComponent as LowIncomeOrganization } from \"../FormFields/LowIncomeOrganization/LowIncomeOrganizationComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { EBTCardNumberComponent } from \"../FormFields/EBTCardNumber/EBTCardNumberComponent\";\nimport { setViewModel } from \"../../lib/VerificationService/ViewModel\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { blankOrganization } from \"../../lib/types/empties\";\nimport { CaptchaComponent } from \"../FormFields/Captcha/CaptchaComponent\";\n\nimport { isLowIncomeVM } from \"./lowIncomeTypes\";\n\ninterface StepLowIncomePersonalInfoComponentProps {\n verificationService: VerificationService<LowIncomePersonalInfoViewModel>;\n intl: any;\n}\n\ntype DefaultStatusMessages = {\n [key in LowIncomeStatus]: string;\n};\n\nexport const defaultStatusMessages: DefaultStatusMessages = {\n SNAP_BENEFITS: \"Snap Benefits Recipient\",\n OTHER_GOVERNMENT_ASSISTANCE: \"Other Government Assistance Recipient\",\n COMMUNITY_ELIGIBILITY_PROVISION: \"CEP (Community Eligibility Provision, Title 1/LAP)\",\n};\n\nconst StepLowIncomePersonalInfo = ({\n intl,\n verificationService,\n}: StepLowIncomePersonalInfoComponentProps) => {\n const { viewModel } = verificationService;\n const options = getOptions();\n\n if (!isLowIncomeVM(viewModel)) {\n logger.error(\"Expected LowIncomePersonalInfoViewModel\");\n return null;\n }\n\n const { fieldValidationErrors } = verificationService;\n const { verificationResponse } = verificationService;\n const failedInstantMatch = hasFailedInstantMatch(\n verificationResponse as LowIncomePersonalInfoResponse,\n );\n\n const locale = viewModel.localeChoice.value;\n\n const selectedStatus = viewModel.statuses[0] ? viewModel.statuses[0] : undefined;\n const isSelectedStatusSnapBenefits = selectedStatus === \"SNAP_BENEFITS\";\n const updateLowIncomeViewModel = (key: keyof LowIncomePersonalInfoViewModel, value: any) => {\n if (!isLowIncomeVM(viewModel)) {\n logger.error(\"Expected LowIncomePersonalInfoViewModel\");\n return;\n }\n const nextState: LowIncomePersonalInfoViewModel = produce(\n viewModel,\n (draft: LowIncomePersonalInfoViewModel) => {\n draft[key] = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n React.useEffect(() => {\n if (isSelectedStatusSnapBenefits) {\n const updatedViewModel = { fieldsToSkipValidation: [\"organization\"] };\n setViewModel(updatedViewModel);\n }\n }, [isSelectedStatusSnapBenefits]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"low-income\"\n />\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <StatusComponent\n segmentId=\"low-income\"\n value={{\n value: viewModel.statuses ? viewModel.statuses[0] : \"\",\n label: viewModel.statuses\n ? getStatusLabel(intl, viewModel.statuses[0], LowIncomeStatusDefaultMessagesEnum)\n : \"\",\n }}\n isErrored={!!fieldValidationErrors.statuses}\n disabled={getFieldConfigByFieldId(\"status\")?.disabled}\n options={getAvailableLowIncomeStatuses(\n intl,\n (verificationResponse as LowIncomePersonalInfoResponse).availableStatuses,\n )}\n onChange={(status: FormSelectChoice<LowIncomeStatus>) => {\n const updatedStatuses = status ? [status.value as LowIncomeStatus] : [];\n const nextState: LowIncomePersonalInfoViewModel = produce(\n viewModel,\n (draft: LowIncomePersonalInfoViewModel) => {\n if (viewModel.statuses[0] !== updatedStatuses[0]) {\n draft.organization = blankOrganization.organization; // Clear out the org b/c they're of different kind\n }\n draft.statuses = updatedStatuses;\n },\n );\n verificationService.updateViewModel(nextState);\n updateFieldValidationErrorsByFieldId(\n \"statuses\",\n status ? status.value : \"\",\n verificationService,\n );\n }}\n />\n {selectedStatus === \"SNAP_BENEFITS\" && (\n <EBTCardNumberComponent\n value={viewModel.ebtCardNumber}\n isErrored={!!fieldValidationErrors.ebtCardNumber}\n disabled={getFieldConfigByFieldId(\"ebtCardNumber\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"ebtCardNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"ebtCardNumber\", newValue, verificationService);\n }}\n />\n )}\n {(selectedStatus === \"OTHER_GOVERNMENT_ASSISTANCE\" ||\n selectedStatus === \"COMMUNITY_ELIGIBILITY_PROVISION\") && (\n <LowIncomeOrganization\n isErrored={!!fieldValidationErrors.organization}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n value={orgToOption(verificationService.viewModel.organization)}\n verificationService={verificationService}\n isRequired\n disabled={getFieldConfigByFieldId(\"organization\")?.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 updateLowIncomeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"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 updateLowIncomeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n />\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n value={viewModel.address1}\n isRequired\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n <div className=\"sid-address-extra-fields sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateLowIncomeViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={<FormattedHTMLMessage id=\"emailExplanation\" defaultMessage=\" \" />}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateLowIncomeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.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 updateLowIncomeViewModel(\"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 <CaptchaComponent\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.captchaToken}\n />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectLowIncomePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepLowIncomePersonalInfoComponent = injectIntl(StepLowIncomePersonalInfo);\n"],"names":["StepLowIncomePersonalInfo","intl","verificationService","viewModel","options","getOptions","isLowIncomeVM","logger","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","locale","selectedStatus","isSelectedStatusSnapBenefits","updateLowIncomeViewModel","key","value","nextState","produce","draft","React","setViewModel","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","getFieldConfigByFieldId","StatusComponent","getStatusLabel","LowIncomeStatusDefaultMessagesEnum","getAvailableLowIncomeStatuses","status","updatedStatuses","blankOrganization","updateFieldValidationErrorsByFieldId","EBTCardNumberComponent","newValue","LowIncomeOrganization","choice","updateViewModelOrganization","orgToOption","FirstName","LastName","BirthDate","AddressComponent","FormattedHTMLMessage","CityComponent","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","PostalCodeComponent","Email","event","handleEmailOnKeyDown","PhoneNumber","config","FormFieldCustom","MarketConsentWrapper","CaptchaComponent","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepLowIncomePersonalInfoComponent","injectIntl"],"mappings":";;;;;;;;;;;;;AAwEA,MAAMA,KAA4B,CAAC;AAAA,EACjC,MAAAC;AAAA,EACA,qBAAAC;AACF,MAA+C;AAC7C,QAAM,EAAE,WAAAC,MAAcD,GAChBE,IAAUC,EAAA;AAEhB,MAAI,CAACC,EAAcH,CAAS;AAC1B,WAAAI,EAAO,MAAM,yCAAyC,GAC/C;AAGT,QAAM,EAAE,uBAAAC,MAA0BN,GAC5B,EAAE,sBAAAO,MAAyBP,GAC3BQ,IAAqBC;AAAA,IACzBF;AAAA,EAAA,GAGIG,IAAST,EAAU,aAAa,OAEhCU,IAAiBV,EAAU,SAAS,CAAC,IAAIA,EAAU,SAAS,CAAC,IAAI,QACjEW,IAA+BD,MAAmB,iBAClDE,IAA2B,CAACC,GAA2CC,MAAe;AAC1F,QAAI,CAACX,EAAcH,CAAS,GAAG;AAC7B,MAAAI,EAAO,MAAM,yCAAyC;AACtD;AAAA,IACF;AACA,UAAMW,IAA4CC;AAAAA,MAChD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AAAA,YACA,WAAAC;AAAA,YACA,UAAU0B,EAAwB,oBAAoB,GAAG;AAAA,UAAA;AAAA,QAAA;AAAA,QAE3DJ,gBAAAA,EAAAA;AAAAA,UAACqC;AAAA,UAAA;AAAA,YACC,qBAAA5D;AAAA,YACA,WAAW,CAAC,CAACM,EAAsB;AAAA,UAAA;AAAA,QAAA;AAAA,QAErCiB,gBAAAA,EAAAA;AAAAA,UAACsC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA9D;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAO;AAAA,YACA,YACEe,gBAAAA,EAAAA;AAAAA,cAACuB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,GAEaiB,KAAqCC,EAAWlE,EAAyB;"}
|
package/chunk/index-BZ1nv-sB.js
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE:
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.220.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776785604219
|
|
9
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:24 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
11
11
|
*/
|
|
12
12
|
import { j as s, L as n, F as l, a as r, i as j, R as N, I as y, k as S, o as g, s as f, M as C, V as a, p as w } from "../_mysheerid-preview.js";
|
|
13
13
|
import { S as M } from "./SSN-Hb1lTx8A.js";
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* This file is not intended for use in other contexts and there are no guarantees about its behavior outside of MySheerID.
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
7
|
-
* VERSION: 2.
|
|
8
|
-
* BUILD_TIMESTAMP:
|
|
9
|
-
* BUILD_DATE:
|
|
10
|
-
* BUILD_COMMIT:
|
|
7
|
+
* VERSION: 2.220.0
|
|
8
|
+
* BUILD_TIMESTAMP: 1776785604219
|
|
9
|
+
* BUILD_DATE: Tue Apr 21 2026 15:33:24 GMT+0000 (Coordinated Universal Time)
|
|
10
|
+
* BUILD_COMMIT: 2afa2b6b8ba8a91ceba649fb1c953b467bba4c7f
|
|
11
11
|
*/
|
|
12
12
|
import { i as j, m as F, j as o, P as N, g as n, o as d, a1 as M, a2 as I, A as z, p as g, h as m, n as y, F as i, U as P, V as R, e as f, a3 as D } from "../_mysheerid-preview.js";
|
|
13
|
-
import { F as T, L as k, P as L, a as B, M as O, C as V } from "./CaptchaComponent-
|
|
13
|
+
import { F as T, L as k, P as L, a as B, M as O, C as V } from "./CaptchaComponent-BfZgvFl0.js";
|
|
14
14
|
import { E as A, P as W } from "./PersonalInfoStepSubmitButton-v_kWLmEw.js";
|
|
15
|
-
import { B as q } from "./militaryStepHelpers-
|
|
15
|
+
import { B as q } from "./militaryStepHelpers-DuJLFDxo.js";
|
|
16
16
|
import { S as w } from "./StatusComponent-pmuIhuXi.js";
|
|
17
17
|
import { F as H } from "./FirstResponderOrganizationComponent-fPxZFdpO.js";
|
|
18
18
|
import { P as K } from "./PostalCodeComponent-KXVfZkLx.js";
|