@sheerid/jslib-nightly 2.115.0-alpha.7 → 2.115.0-alpha.9
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 +6 -6
- package/chunk/EmailLoopPending-Dtf0p85F.js +4 -4
- package/chunk/EmailLoopPending-Dy8mLFvV.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-BYijEfDT.js +4 -4
- package/chunk/LicensedProfessionalOrganizationComponent-CiYU-2dW.js +4 -4
- package/chunk/Onfido-AyvUk6wg.js +4 -4
- package/chunk/StepIDCheckLoopOnfido-CmNwFqjD.js +4 -4
- package/chunk/StepIDCheckLoopOnfido-DtbplNxs.js +4 -4
- package/chunk/StepIDCheckLoopRegula-RoX971sR.js +4 -4
- package/chunk/StepIDCheckLoopRegula-oqf-QxHT.js +4 -4
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-CTCfr5Y8.js +4 -4
- package/chunk/StepInactiveMilitaryPersonalInfoComponent-D4veFRlW.js +4 -4
- package/chunk/ar-BZsYQiJv.js +4 -4
- package/chunk/bg-DB_ZEB5O.js +4 -4
- package/chunk/bn-IN-D69rNeuh.js +4 -4
- package/chunk/cs-Dk4czWE5.js +4 -4
- package/chunk/da-NesYkkEW.js +4 -4
- package/chunk/de-4yAGb-JC.js +4 -4
- package/chunk/el-D1h3O3E7.js +4 -4
- package/chunk/en-GB-QY9gqmlz.js +4 -4
- package/chunk/es-BYhP2rUk.js +4 -4
- package/chunk/es-ES-BJLdehwH.js +4 -4
- package/chunk/fi-D-Ycqh7I.js +4 -4
- package/chunk/fr-CA-a8W9ZT_A.js +4 -4
- package/chunk/fr-DR25pnXw.js +4 -4
- package/chunk/ga-Bj6efXd2.js +4 -4
- package/chunk/hi-IN-C-u9_T8L.js +4 -4
- package/chunk/hr-B8E9jyUX.js +4 -4
- package/chunk/hu-C7z4yBSK.js +4 -4
- package/chunk/id-AsEkOlRu.js +4 -4
- package/chunk/index-4APUDd8S.js +4 -4
- package/chunk/index-9OD0Bw98.js +4 -4
- package/chunk/index-B-PpnUEO.js +4 -4
- package/chunk/index-B8F8N-JM.js +4 -4
- package/chunk/index-B8KPM--K.js +4 -4
- package/chunk/index-BD2bjH-C.js +4 -4
- package/chunk/index-BD_a0MZT.js +4 -4
- package/chunk/index-BDrKYann.js +4 -4
- package/chunk/index-BORxVuto.js +4 -4
- package/chunk/index-BTMETMEE.js +4 -4
- package/chunk/index-Bi9QXN5x.js +4 -4
- package/chunk/index-Bmq6cJ3F.js +4 -4
- package/chunk/index-BpZoH-Wz.js +4 -4
- package/chunk/index-BuX76GyE.js +4 -4
- package/chunk/index-C2h0Wj84.js +4 -4
- package/chunk/index-C8MQD8EK.js +4 -4
- package/chunk/index-C8u9IJUa.js +4 -4
- package/chunk/index-C96ntS0u.js +4 -4
- package/chunk/index-CHK5i4jj.js +4 -4
- package/chunk/index-CTb96lOK.js +4 -4
- package/chunk/index-CU0rkVHP.js +4 -4
- package/chunk/index-CcRowarb.js +4 -4
- package/chunk/index-CeHu2Npu.js +4 -4
- package/chunk/index-DIkWpujR.js +4 -4
- package/chunk/index-DKWjcFJK.js +4 -4
- package/chunk/index-DLz31Fzh.js +4 -4
- package/chunk/index-DO5Z3e-E.js +4 -4
- package/chunk/index-DRlGAW07.js +4 -4
- package/chunk/index-DVynViqA.js +4 -4
- package/chunk/index-D_9J6arc.js +4 -4
- package/chunk/index-Dg8t7-dm.js +4 -4
- package/chunk/index-DhGg9lvf.js +4 -4
- package/chunk/index-DsgCNIS5.js +4 -4
- package/chunk/index-DvQoVn8P.js +4 -4
- package/chunk/index-DzqRsB7_.js +4 -4
- package/chunk/index-FjzhfDlx.js +4 -4
- package/chunk/index-Gfy-1H7s.js +4 -4
- package/chunk/index-YSVzGeq_.js +4 -4
- package/chunk/index-_t8SsXjy.js +4 -4
- package/chunk/is-PzizLXcv.js +4 -4
- package/chunk/it-CiJeQN1_.js +4 -4
- package/chunk/iw-QHmqNHZP.js +4 -4
- package/chunk/ja-DPgVvasb.js +4 -4
- package/chunk/ko-DykOu1Yp.js +4 -4
- package/chunk/lo-C4bFrJOj.js +4 -4
- package/chunk/lt-KjZ7oOV5.js +4 -4
- package/chunk/ms-CNvzXjsH.js +4 -4
- package/chunk/nl-BE-BXbsNtu2.js +4 -4
- package/chunk/nl-ucuj2G5l.js +4 -4
- package/chunk/no-D8IuXJ7O.js +4 -4
- package/chunk/pl-DvnUkXGb.js +4 -4
- package/chunk/pt-BR-Be00Hx-L.js +4 -4
- package/chunk/pt-DS7isrlt.js +4 -4
- package/chunk/ro-BHCICvJV.js +4 -4
- package/chunk/ru-DUDtL41i.js +4 -4
- package/chunk/sk-O9yqW58Q.js +4 -4
- package/chunk/sl-CxcvfiDu.js +4 -4
- package/chunk/sr-DgvzAvVS.js +4 -4
- package/chunk/sv-BtktR0mm.js +4 -4
- package/chunk/sw-D06YJhji.js +4 -4
- package/chunk/th-C1KZhtMd.js +4 -4
- package/chunk/tr-CqpbTukW.js +4 -4
- package/chunk/uk-BWHH_jN1.js +4 -4
- package/chunk/ur-BHWni4Fn.js +4 -4
- package/chunk/useCollectFieldsEndpoint-C5fsaYJe.js +4 -4
- package/chunk/useCollectFieldsEndpoint-kmLFyUA-.js +4 -4
- package/chunk/useEmailFirstExperiment-BbDrKQEs.js +4 -4
- package/chunk/useEmailFirstExperiment-CgU-itQI.js +4 -4
- package/chunk/vi-DVhQHKtP.js +4 -4
- package/chunk/zh-HK-C-wTSVhL.js +4 -4
- package/chunk/zh-qa3hzwEB.js +4 -4
- package/chunk/zu-DwVIy-bC.js +4 -4
- package/es6.css +4 -4
- package/jslib.js +5 -5
- package/lib/{EmailLoopPending-vJdq7Nf2.js → EmailLoopPending-Cz0xRaPV.js} +5 -5
- package/lib/{EmailLoopPending-vJdq7Nf2.js.map → EmailLoopPending-Cz0xRaPV.js.map} +1 -1
- package/lib/{LicensedProfessionalOrganizationComponent-DlwLUQ0q.js → LicensedProfessionalOrganizationComponent-DblArXx1.js} +5 -5
- package/lib/{LicensedProfessionalOrganizationComponent-DlwLUQ0q.js.map → LicensedProfessionalOrganizationComponent-DblArXx1.js.map} +1 -1
- package/lib/Onfido-AyvUk6wg.js +4 -4
- package/lib/StepCollectMilitaryStatusComponent-mwuq3SVV.js +11 -0
- package/lib/{StepCollectMilitaryStatusComponent-BGeRjFmq.js.map → StepCollectMilitaryStatusComponent-mwuq3SVV.js.map} +1 -1
- package/lib/{StepIDCheckLoopOnfido-C35nnBhi.js → StepIDCheckLoopOnfido-DBa5o2sR.js} +5 -5
- package/lib/{StepIDCheckLoopOnfido-C35nnBhi.js.map → StepIDCheckLoopOnfido-DBa5o2sR.js.map} +1 -1
- package/lib/{StepIDCheckLoopRegula-CID7o4Hg.js → StepIDCheckLoopRegula-Df2jr9tB.js} +5 -5
- package/lib/{StepIDCheckLoopRegula-CID7o4Hg.js.map → StepIDCheckLoopRegula-Df2jr9tB.js.map} +1 -1
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-C4aq_INV.js → StepInactiveMilitaryPersonalInfoComponent-DcHQtb_C.js} +6 -6
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-C4aq_INV.js.map → StepInactiveMilitaryPersonalInfoComponent-DcHQtb_C.js.map} +1 -1
- package/lib/{VerificationApiUtils-B83za6ox.js → VerificationApiUtils-BPJK8G-5.js} +5 -5
- package/lib/{VerificationApiUtils-B83za6ox.js.map → VerificationApiUtils-BPJK8G-5.js.map} +1 -1
- package/lib/ar-BZsYQiJv.js +4 -4
- package/lib/bg-DB_ZEB5O.js +4 -4
- package/lib/bn-IN-D69rNeuh.js +4 -4
- package/lib/cs-Dk4czWE5.js +4 -4
- package/lib/da-NesYkkEW.js +4 -4
- package/lib/de-4yAGb-JC.js +4 -4
- package/lib/el-D1h3O3E7.js +4 -4
- package/lib/en-GB-QY9gqmlz.js +4 -4
- package/lib/es-BYhP2rUk.js +4 -4
- package/lib/es-ES-BJLdehwH.js +4 -4
- package/lib/{es6-DGcA9fL4.js → es6-DVLmEXlW.js} +33 -33
- package/lib/{es6-DGcA9fL4.js.map → es6-DVLmEXlW.js.map} +1 -1
- package/lib/fi-D-Ycqh7I.js +4 -4
- package/lib/fr-CA-a8W9ZT_A.js +4 -4
- package/lib/fr-DR25pnXw.js +4 -4
- package/lib/ga-Bj6efXd2.js +4 -4
- package/lib/hi-IN-C-u9_T8L.js +4 -4
- package/lib/hr-B8E9jyUX.js +4 -4
- package/lib/hu-C7z4yBSK.js +4 -4
- package/lib/id-AsEkOlRu.js +4 -4
- package/lib/{index-8xJnfS0X.js → index--z1nAE7Q.js} +6 -6
- package/lib/{index-8xJnfS0X.js.map → index--z1nAE7Q.js.map} +1 -1
- package/lib/{index-CdIOs3cV.js → index-03RaAdx6.js} +7 -7
- package/lib/{index-CdIOs3cV.js.map → index-03RaAdx6.js.map} +1 -1
- package/lib/index-B-ATz7tN.js +11 -0
- package/lib/index-B-ATz7tN.js.map +1 -0
- package/lib/{index-LUHarNKH.js → index-B0aQB6nx.js} +6 -6
- package/lib/{index-LUHarNKH.js.map → index-B0aQB6nx.js.map} +1 -1
- package/lib/{index-CLLq1o1l.js → index-B2sHNRu5.js} +5 -5
- package/lib/{index-CLLq1o1l.js.map → index-B2sHNRu5.js.map} +1 -1
- package/lib/{index-BhVCrHl8.js → index-BCmBIUUN.js} +5 -5
- package/lib/{index-BhVCrHl8.js.map → index-BCmBIUUN.js.map} +1 -1
- package/lib/{index-Dc6fPqH3.js → index-BLWFObEy.js} +7 -7
- package/lib/{index-Dc6fPqH3.js.map → index-BLWFObEy.js.map} +1 -1
- package/lib/{index-BcfEFaYx.js → index-B_k_UodE.js} +5 -5
- package/lib/{index-BcfEFaYx.js.map → index-B_k_UodE.js.map} +1 -1
- package/lib/{index-CXz2jYO8.js → index-CFoE5wW_.js} +5 -5
- package/lib/{index-CXz2jYO8.js.map → index-CFoE5wW_.js.map} +1 -1
- package/lib/{index-CzEe4-vK.js → index-CNXHMBXa.js} +6 -6
- package/lib/{index-CzEe4-vK.js.map → index-CNXHMBXa.js.map} +1 -1
- package/lib/index-CTPl3Jfz.js +11 -0
- package/lib/index-CTPl3Jfz.js.map +1 -0
- package/lib/{index-sgxdKvyt.js → index-CUg1NKkz.js} +5 -5
- package/lib/{index-sgxdKvyt.js.map → index-CUg1NKkz.js.map} +1 -1
- package/lib/{index-BnAxSz5S.js → index-CXu8sbCw.js} +6 -6
- package/lib/{index-BnAxSz5S.js.map → index-CXu8sbCw.js.map} +1 -1
- package/lib/{index-DYsG1QXc.js → index-Cb6rS3ug.js} +6 -6
- package/lib/{index-DYsG1QXc.js.map → index-Cb6rS3ug.js.map} +1 -1
- package/lib/{index-CMB4zknz.js → index-CkUxiakj.js} +6 -6
- package/lib/{index-CMB4zknz.js.map → index-CkUxiakj.js.map} +1 -1
- package/lib/index-CrSpGjlz.js +11 -0
- package/lib/index-CrSpGjlz.js.map +1 -0
- package/lib/{index-BJXFF654.js → index-D7poy40s.js} +5 -5
- package/lib/{index-BJXFF654.js.map → index-D7poy40s.js.map} +1 -1
- package/lib/{index-Car2nzvx.js → index-D9e88ogy.js} +6 -6
- package/lib/{index-Car2nzvx.js.map → index-D9e88ogy.js.map} +1 -1
- package/lib/index-DIkWpujR.js +4 -4
- package/lib/{index-DLvR9J-j.js → index-DNVzPuWH.js} +5 -5
- package/lib/{index-DLvR9J-j.js.map → index-DNVzPuWH.js.map} +1 -1
- package/lib/{index-D_wkT1Os.js → index-E7HFWjnx.js} +5 -5
- package/lib/{index-D_wkT1Os.js.map → index-E7HFWjnx.js.map} +1 -1
- package/lib/{index-MutBCooF.js → index-IGdsbKp3.js} +5 -5
- package/lib/{index-MutBCooF.js.map → index-IGdsbKp3.js.map} +1 -1
- package/lib/index-g4cYDDQv.js +11 -0
- package/lib/index-g4cYDDQv.js.map +1 -0
- package/lib/{index-CBRsnLsG.js → index-hwpwsGyf.js} +5 -5
- package/lib/{index-CBRsnLsG.js.map → index-hwpwsGyf.js.map} +1 -1
- package/lib/is-PzizLXcv.js +4 -4
- package/lib/it-CiJeQN1_.js +4 -4
- package/lib/iw-QHmqNHZP.js +4 -4
- package/lib/ja-DPgVvasb.js +4 -4
- package/lib/ko-DykOu1Yp.js +4 -4
- package/lib/lo-C4bFrJOj.js +4 -4
- package/lib/lt-KjZ7oOV5.js +4 -4
- package/lib/ms-CNvzXjsH.js +4 -4
- package/lib/nl-BE-BXbsNtu2.js +4 -4
- package/lib/nl-ucuj2G5l.js +4 -4
- package/lib/no-D8IuXJ7O.js +4 -4
- package/lib/pl-DvnUkXGb.js +4 -4
- package/lib/pt-BR-Be00Hx-L.js +4 -4
- package/lib/pt-DS7isrlt.js +4 -4
- package/lib/ro-BHCICvJV.js +4 -4
- package/lib/ru-DUDtL41i.js +4 -4
- package/lib/sk-O9yqW58Q.js +4 -4
- package/lib/sl-CxcvfiDu.js +4 -4
- package/lib/sr-DgvzAvVS.js +4 -4
- package/lib/sv-BtktR0mm.js +4 -4
- package/lib/sw-D06YJhji.js +4 -4
- package/lib/th-C1KZhtMd.js +4 -4
- package/lib/tr-CqpbTukW.js +4 -4
- package/lib/uk-BWHH_jN1.js +4 -4
- package/lib/ur-BHWni4Fn.js +4 -4
- package/lib/{useCollectFieldsEndpoint-DjczxCnE.js → useCollectFieldsEndpoint-CN4vrKsd.js} +6 -6
- package/lib/{useCollectFieldsEndpoint-DjczxCnE.js.map → useCollectFieldsEndpoint-CN4vrKsd.js.map} +1 -1
- package/lib/{useEmailFirstExperiment-DhFj-Ikz.js → useEmailFirstExperiment-Bop0_o_w.js} +5 -5
- package/lib/{useEmailFirstExperiment-DhFj-Ikz.js.map → useEmailFirstExperiment-Bop0_o_w.js.map} +1 -1
- package/lib/vi-DVhQHKtP.js +4 -4
- package/lib/zh-HK-C-wTSVhL.js +4 -4
- package/lib/zh-qa3hzwEB.js +4 -4
- package/lib/zu-DwVIy-bC.js +4 -4
- package/package.json +1 -1
- package/sheerid-install.css +4 -4
- package/sheerid-install.js +5 -5
- package/sheerid.css +4 -4
- package/sheerid.js +6 -6
- package/types-reference.zip +0 -0
- package/lib/StepCollectMilitaryStatusComponent-BGeRjFmq.js +0 -11
- package/lib/index-CPtiIJT3.js +0 -11
- package/lib/index-CPtiIJT3.js.map +0 -1
- package/lib/index-Cbqjl_Mq.js +0 -11
- package/lib/index-Cbqjl_Mq.js.map +0 -1
- package/lib/index-Dh-MXyVl.js +0 -11
- package/lib/index-Dh-MXyVl.js.map +0 -1
- package/lib/index-DrX8tXUT.js +0 -11
- package/lib/index-DrX8tXUT.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-CMB4zknz.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\nimport {\n VerificationService,\n AgePersonalInfoViewModel,\n AgePersonalInfoResponse,\n FormSelectChoice,\n Country,\n FieldDescription,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepAgePersonalInfoComponentProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepAgePersonalInfo = ({ verificationService, intl }: StepAgePersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as AgePersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as AgePersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const countryChoices: FormSelectChoice<Country, string>[] = getAvailableCountryChoices(\n verificationService.programTheme,\n intl,\n );\n const defaultCountryChoice: FormSelectChoice<Country, string> =\n getDefaultCountryChoice(countryChoices);\n const safeCountryValue = getSafe(() => viewModel.countryChoice.value, defaultCountryChoice.value);\n const defaultRequiredFields: FieldDescription[] =\n safeCountryValue === \"US\" ? [{ key: \"postalCode\" }] : [];\n\n // PhoneNumber is required for all non-US age programs and if smsLoop is enabled.\n const showPhoneNumber =\n safeCountryValue !== \"US\" ||\n verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled;\n const phoneNumberRequired =\n safeCountryValue !== \"US\" || verificationService.programTheme.smsLoopEnabled;\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n if (\n !fieldValidationErrors.phoneNumber &&\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"invalidPhoneNumber\")\n ) {\n verificationService.updateFieldValidationErrors({\n ...fieldValidationErrors,\n phoneNumber: \"invalidPhoneNumber\",\n });\n }\n\n const updateAgeViewModel = (key: keyof AgePersonalInfoViewModel, value: any) => {\n const nextState: AgePersonalInfoViewModel = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldRequired } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n defaultRequiredFields,\n });\n\n React.useEffect(() => {\n // When country changes re-check the phone number validation\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", viewModel.phoneNumber, verificationService);\n }, [viewModel.country]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader verificationService={verificationService} classNameIdentifier=\"age\" />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateAgeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n {isFieldRequired(\"city\") && (\n <CityComponent\n value={viewModel.city}\n isRequired\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n onChange={(value) => {\n updateAgeViewModel(\"city\", value);\n updateFieldValidationErrorsByFieldId(\"city\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"address1\") && (\n <AddressComponent\n value={viewModel.address1}\n isRequired\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(value) => {\n updateAgeViewModel(\"address1\", value);\n updateFieldValidationErrorsByFieldId(\"address1\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"postalCode\") && (\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateAgeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n onChange={(newValue) => {\n updateAgeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {showPhoneNumber ? (\n <PhoneNumber\n isRequired={phoneNumberRequired}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateAgeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateAgeViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectAgePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify and continue\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepAgePersonalInfoComponent = injectIntl(StepAgePersonalInfo);\n"],"names":["StepAgePersonalInfo","verificationService","intl","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","countryChoices","getAvailableCountryChoices","defaultCountryChoice","getDefaultCountryChoice","safeCountryValue","getSafe","defaultRequiredFields","showPhoneNumber","phoneNumberRequired","locale","options","getOptions","updateAgeViewModel","key","value","nextState","produceDraftViewModel","isFieldRequired","useCollectFieldsEndpoint","React","updateFieldValidationErrorsByFieldId","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","FirstName","_b","newValue","LastName","_c","BirthDate","_d","CityComponent","_e","AddressComponent","PostalCode","_f","Email","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","config","FormFieldCustom","MarketConsentWrapper","_i","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormattedHTMLMessage","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;AAqDA,MAAMA,KAAsB,CAAC,EAAE,qBAAAC,GAAqB,MAAAC,QAA8C;;AAChG,QAAMC,IAAYF,EAAoB,WAChC,EAAE,uBAAAG,MAA0BH,GAC5BI,IAAuBJ,EAAoB,sBAC3CK,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAsDC;AAAA,IAC1DR,EAAoB;AAAA,IACpBC;AAAA,EACF,GACMQ,IACJC,EAAwBH,CAAc,GAClCI,IAAmBC,EAAQ,MAAMV,EAAU,cAAc,OAAOO,EAAqB,KAAK,GAC1FI,IACJF,MAAqB,OAAO,CAAC,EAAE,KAAK,aAAc,CAAA,IAAI,CAAC,GAGnDG,IACJH,MAAqB,QACrBX,EAAoB,aAAa,2BACjCA,EAAoB,aAAa,gBAC7Be,IACJJ,MAAqB,QAAQX,EAAoB,aAAa,gBAE1DgB,IAASd,EAAU,aAAa,OAChCe,IAAUC,EAAW;AAGzB,EAAA,CAACf,EAAsB,eACvBC,EAAqB,YACrBA,EAAqB,SAAS,SAAS,oBAAoB,KAE3DJ,EAAoB,4BAA4B;AAAA,IAC9C,GAAGG;AAAA,IACH,aAAa;AAAA,EAAA,CACd;AAGG,QAAAgB,IAAqB,CAACC,GAAqCC,MAAe;AAC9E,UAAMC,IAAsCC,GAAsBrB,GAAWkB,GAAKC,CAAK;AACvF,IAAArB,EAAoB,gBAAgBsB,CAAS;AAAA,EAC/C,GAEM,EAAE,iBAAAE,EAAgB,IAAIC,GAAyB;AAAA,IACnD,gBAAgBrB,EAAqB;AAAA,IACrC,aAAaA,EAAqB;AAAA,IAClC,WAAAF;AAAA,IACA,uBAAAW;AAAA,EAAA,CACD;AAEDa,SAAAA,GAAM,UAAU,MAAM;AAEiB,IAAA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AAAA,cAAA,CACrB,GACoCX,EAAA,sBAAsBW,GAAUtC,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAE;AAAA,YACA,WAAUuD,IAAAtB,EAAwB,oBAAoB,MAA5C,gBAAAsB,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAEC3B,gBAAAA,EAAAA,IAAA4B,GAAA,EAAa,qBAAA1D,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpF8B,gBAAAA,EAAA;AAAA,UAAC6B;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA5D;AAAA,YACA,WAAAE;AAAA,YACA,oBAAAG;AAAA,YACA,YACEyB,gBAAAA,EAAA;AAAA,cAAC+B;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEaC,KAA+BC,GAAWhE,EAAmB;"}
|
1
|
+
{"version":3,"file":"index-CkUxiakj.js","sources":["../../src/components/StepAgePersonalInfo/StepAgePersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, InjectedIntl, injectIntl } from \"react-intl\";\n\nimport { useCollectFieldsEndpoint } from \"@/lib/ServerApi/useCollectFieldsEndpoint\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\nimport {\n VerificationService,\n AgePersonalInfoViewModel,\n AgePersonalInfoResponse,\n FormSelectChoice,\n Country,\n FieldDescription,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n getAvailableCountryChoices,\n getDefaultCountryChoice,\n produceDraftViewModel,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { BirthDateComponent as BirthDate } from \"../FormFields/BirthDate/BirthDateComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepAgePersonalInfoComponentProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepAgePersonalInfo = ({ verificationService, intl }: StepAgePersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as AgePersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as AgePersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const countryChoices: FormSelectChoice<Country, string>[] = getAvailableCountryChoices(\n verificationService.programTheme,\n intl,\n );\n const defaultCountryChoice: FormSelectChoice<Country, string> =\n getDefaultCountryChoice(countryChoices);\n const safeCountryValue = getSafe(() => viewModel.countryChoice.value, defaultCountryChoice.value);\n const defaultRequiredFields: FieldDescription[] =\n safeCountryValue === \"US\" ? [{ key: \"postalCode\" }] : [];\n\n // PhoneNumber is required for all non-US age programs and if smsLoop is enabled.\n const showPhoneNumber =\n safeCountryValue !== \"US\" ||\n verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled;\n const phoneNumberRequired =\n safeCountryValue !== \"US\" || verificationService.programTheme.smsLoopEnabled;\n\n const locale = viewModel.localeChoice.value;\n const options = getOptions();\n\n if (\n !fieldValidationErrors.phoneNumber &&\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"invalidPhoneNumber\")\n ) {\n verificationService.updateFieldValidationErrors({\n ...fieldValidationErrors,\n phoneNumber: \"invalidPhoneNumber\",\n });\n }\n\n const updateAgeViewModel = (key: keyof AgePersonalInfoViewModel, value: any) => {\n const nextState: AgePersonalInfoViewModel = produceDraftViewModel(viewModel, key, value);\n verificationService.updateViewModel(nextState);\n };\n\n const { isFieldRequired } = useCollectFieldsEndpoint({\n verificationId: verificationResponse.verificationId,\n currentStep: verificationResponse.currentStep,\n viewModel,\n defaultRequiredFields,\n });\n\n React.useEffect(() => {\n // When country changes re-check the phone number validation\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", viewModel.phoneNumber, verificationService);\n }, [viewModel.country]);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader verificationService={verificationService} classNameIdentifier=\"age\" />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateAgeViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n onChange={(newValue) => {\n updateAgeViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n value={viewModel.birthDate}\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n />\n {isFieldRequired(\"city\") && (\n <CityComponent\n value={viewModel.city}\n isRequired\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n onChange={(value) => {\n updateAgeViewModel(\"city\", value);\n updateFieldValidationErrorsByFieldId(\"city\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"address1\") && (\n <AddressComponent\n value={viewModel.address1}\n isRequired\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(value) => {\n updateAgeViewModel(\"address1\", value);\n updateFieldValidationErrorsByFieldId(\"address1\", value, verificationService);\n }}\n />\n )}\n {isFieldRequired(\"postalCode\") && (\n <PostalCode\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateAgeViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n onChange={(newValue) => {\n updateAgeViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {showPhoneNumber ? (\n <PhoneNumber\n isRequired={phoneNumberRequired}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateAgeViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateAgeViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectAgePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify and continue\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepAgePersonalInfoComponent = injectIntl(StepAgePersonalInfo);\n"],"names":["StepAgePersonalInfo","verificationService","intl","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","countryChoices","getAvailableCountryChoices","defaultCountryChoice","getDefaultCountryChoice","safeCountryValue","getSafe","defaultRequiredFields","showPhoneNumber","phoneNumberRequired","locale","options","getOptions","updateAgeViewModel","key","value","nextState","produceDraftViewModel","isFieldRequired","useCollectFieldsEndpoint","React","updateFieldValidationErrorsByFieldId","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","FirstName","_b","newValue","LastName","_c","BirthDate","_d","CityComponent","_e","AddressComponent","PostalCode","_f","Email","event","handleEmailOnKeyDown","_g","PhoneNumber","_h","config","FormFieldCustom","MarketConsentWrapper","_i","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormattedHTMLMessage","StepAgePersonalInfoComponent","injectIntl"],"mappings":";;;;AAqDA,MAAMA,KAAsB,CAAC,EAAE,qBAAAC,GAAqB,MAAAC,QAA8C;;AAChG,QAAMC,IAAYF,EAAoB,WAChC,EAAE,uBAAAG,MAA0BH,GAC5BI,IAAuBJ,EAAoB,sBAC3CK,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAsDC;AAAA,IAC1DR,EAAoB;AAAA,IACpBC;AAAA,EACF,GACMQ,IACJC,EAAwBH,CAAc,GAClCI,IAAmBC,EAAQ,MAAMV,EAAU,cAAc,OAAOO,EAAqB,KAAK,GAC1FI,IACJF,MAAqB,OAAO,CAAC,EAAE,KAAK,aAAc,CAAA,IAAI,CAAC,GAGnDG,IACJH,MAAqB,QACrBX,EAAoB,aAAa,2BACjCA,EAAoB,aAAa,gBAC7Be,IACJJ,MAAqB,QAAQX,EAAoB,aAAa,gBAE1DgB,IAASd,EAAU,aAAa,OAChCe,IAAUC,EAAW;AAGzB,EAAA,CAACf,EAAsB,eACvBC,EAAqB,YACrBA,EAAqB,SAAS,SAAS,oBAAoB,KAE3DJ,EAAoB,4BAA4B;AAAA,IAC9C,GAAGG;AAAA,IACH,aAAa;AAAA,EAAA,CACd;AAGG,QAAAgB,IAAqB,CAACC,GAAqCC,MAAe;AAC9E,UAAMC,IAAsCC,GAAsBrB,GAAWkB,GAA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AAAtD,EAAA,CAA0C,CAC5E;AAAA,QAED8B,gBAAAA,EAAA;AAAA,UAAC0B;AAAAA,UAAA;AAAA,YACC,qBAAAxD;AAAA,YACA,WAAW,CAAC,CAACG,EAAsB;AAAA,YACnC,UAAU,CAACmC,MAAa;AACtB,cAAAnB,EAAmB,YAAY;AAAA,gBAC7B,GAAGnB,EAAoB,UAAU;AAAA,gBACjC,oBAAoBsC;AAAA,cAAA,CACrB,GACoCX,EAAA,sBAAsBW,GAAUtC,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAE;AAAA,YACA,WAAUuD,IAAAtB,EAAwB,oBAAoB,MAA5C,gBAAAsB,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAEC3B,gBAAAA,EAAAA,IAAA4B,GAAA,EAAa,qBAAA1D,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpF8B,gBAAAA,EAAA;AAAA,UAAC6B;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA5D;AAAA,YACA,WAAAE;AAAA,YACA,oBAAAG;AAAA,YACA,YACEyB,gBAAAA,EAAA;AAAA,cAAC+B;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEaC,KAA+BC,GAAWhE,EAAmB;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
|
+
*/
|
8
|
+
import { d as e } from "./es6-DVLmEXlW.js";
|
9
|
+
export {
|
10
|
+
e as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-CrSpGjlz.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
|
-
import { j as a, M as k, N as P, m as V, w as f, a1 as A, f as t, ag as u, ah as R, a3 as q, u as n, O as w, T as z, U as B, a9 as L, ai as D, aj as O, W, E as U, n as H, X as K, Y as X, Z as Y, _ as Z, o as _, V as G, q as J } from "./es6-
|
8
|
+
import { j as a, M as k, N as P, m as V, w as f, a1 as A, f as t, ag as u, ah as R, a3 as q, u as n, O as w, T as z, U as B, a9 as L, ai as D, aj as O, W, E as U, n as H, X as K, Y as X, Z as Y, _ as Z, o as _, V as G, q as J } from "./es6-DVLmEXlW.js";
|
9
9
|
import { injectIntl as Q, FormattedHTMLMessage as p } from "react-intl";
|
10
10
|
const $ = ({
|
11
11
|
intl: I,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-BJXFF654.js","sources":["../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n VerificationService,\n Organization,\n EmploymentPersonalInfoViewModel,\n CustomFormFieldConfig,\n FormSelectChoice,\n State,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [\"address1\", \"city\", \"state\", \"postalCode\"];\n } else {\n viewModel.fieldsToSkipValidation = undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["StepEmploymentPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","value","nextState","produce","draft","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","countryChoice","shouldCollectAddressFields","CompanyComponent","_b","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_c","newValue","LastName","_d","AddressComponent","_e","FormattedHTMLMessage","CityComponent","_f","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","_g","PostalCodeComponent","_h","Email","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapper","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent","injectIntl"],"mappings":";;AAkDA,MAAMA,IAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,qBAAAC;AACF,MAAgD;;AAC9C,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IAAUC,EAAW,GAErBC,IAA4B,CAACC,GAA4CC,MAAe;AAC5F,UAAMC,IAA6CC;AAAAA,MACjDR;AAAA,MACA,CAACS,MAA2C;AACzC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAP,EAAoB,gBAAgBQ,CAAS;AAAA,EAC/C;AAGE,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAZ;AAAA,MACA,MAAMA,EAAoB,qBAAqB;AAAA,MAE/C,UAAA;AAAA,QAAAa,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA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BG,GAAU5B,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,WAAUmD,IAAAlC,EAAwB,oBAAoB,MAA5C,gBAAAkC,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAECvC,gBAAAA,EAAAA,IAAAwC,GAAA,EAAa,qBAAArD,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFa,gBAAAA,EAAA;AAAA,UAACyC;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAAvD;AAAA,YACA,WAAAC;AAAA,YACA,YACEY,gBAAAA,EAAA;AAAA,cAACoB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAGauB,IAAsCC,EAAW3D,CAA0B;"}
|
1
|
+
{"version":3,"file":"index-D7poy40s.js","sources":["../../src/components/StepEmploymentPersonalInfo/StepEmploymentPersonalInfoComponent.tsx"],"sourcesContent":["/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport {\n VerificationService,\n Organization,\n EmploymentPersonalInfoViewModel,\n CustomFormFieldConfig,\n FormSelectChoice,\n State,\n} from \"../../lib/types/types\";\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n shouldCollectAddressFields,\n getAvailableStateChoices,\n getFieldConfigByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { FirstNameComponent as FirstName } from \"../FormFields/FirstName/FirstNameComponent\";\nimport { LastNameComponent as LastName } from \"../FormFields/LastName/LastNameComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { AddressComponent } from \"../FormFields/Address/AddressComponent\";\nimport { CityComponent } from \"../FormFields/City/City\";\nimport { StateSelectComponent } from \"../FormFields/State/StateSelectComponent\";\nimport { CompanyComponent } from \"../FormFields/Company/CompanyComponent\";\nimport { PostalCodeComponent } from \"../FormFields/PostalCode/PostalCodeComponent\";\n\nimport { CountryComponentWrapper } from \"../FormFields/Country/CountryComponentWrapper\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepEmploymentPersonalInfoComponentProps {\n intl: any;\n verificationService: VerificationService;\n}\n\nconst StepEmploymentPersonalInfo = ({\n intl,\n verificationService,\n}: StepEmploymentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as EmploymentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const options = getOptions();\n\n const updateEmploymentViewModel = (key: keyof EmploymentPersonalInfoViewModel, value: any) => {\n const nextState: EmploymentPersonalInfoViewModel = produce(\n viewModel,\n (draft: EmploymentPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationService.verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"employment\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n viewModelDraftDecorator={(draft, countryChoice) => {\n const viewModel = draft as EmploymentPersonalInfoViewModel;\n\n viewModel.shouldCollectAddress = shouldCollectAddressFields(\n countryChoice,\n verificationService.programTheme.config.countries,\n );\n if (!viewModel.shouldCollectAddress) {\n viewModel.address1 = \"\";\n viewModel.city = \"\";\n viewModel.state = \"\";\n viewModel.postalCode = \"\";\n viewModel.fieldsToSkipValidation = [\"address1\", \"city\", \"state\", \"postalCode\"];\n } else {\n viewModel.fieldsToSkipValidation = undefined;\n }\n }}\n />\n\n <CompanyComponent\n value={(verificationService.viewModel as EmploymentPersonalInfoViewModel).organization}\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <AddressComponent\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n isRequired\n value={viewModel.address1}\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n explanation={\n <FormattedHTMLMessage id=\"addressExplanation\" defaultMessage=\"Use your home address\" />\n }\n />\n ) : null}\n\n {shouldCollectAddressFields(\n viewModel.countryChoice,\n verificationService.programTheme.config.countries,\n ) ? (\n <div className=\"sid-thirds\">\n <CityComponent\n isErrored={!!fieldValidationErrors.city}\n errorId={fieldValidationErrors.city}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"city\", newValue);\n updateFieldValidationErrorsByFieldId(\"city\", newValue, verificationService);\n }}\n value={viewModel.city}\n isRequired\n disabled={getFieldConfigByFieldId(\"city\")?.disabled}\n />\n <StateSelectComponent\n isRequired\n options={getAvailableStateChoices(verificationService.programTheme, intl)}\n value={viewModel.state || undefined}\n isErrored={Boolean(fieldValidationErrors.state)}\n onChange={async (stateChoice: FormSelectChoice<State, string>) => {\n const stateValue = stateChoice ? stateChoice.value : undefined;\n updateEmploymentViewModel(\"state\", stateValue);\n updateFieldValidationErrorsByFieldId(\"state\", stateValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"state\" defaultMessage=\"State\" />}\n disabled={getFieldConfigByFieldId(\"state\")?.disabled}\n />\n <PostalCodeComponent\n isErrored={!!fieldValidationErrors.postalCode}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n value={viewModel.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n />\n </div>\n ) : null}\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Use your work email if you have one\"\n />\n }\n onChange={(newValue) => {\n updateEmploymentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateEmploymentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectEmployeePersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Employment Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\n// TODO remove injectIntl, unused\nexport const StepEmploymentPersonalInfoComponent = injectIntl(StepEmploymentPersonalInfo);\n"],"names":["StepEmploymentPersonalInfo","intl","verificationService","viewModel","fieldValidationErrors","options","getOptions","updateEmploymentViewModel","key","value","nextState","produce","draft","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","CountryComponentWrapper","_a","getFieldConfigByFieldId","countryChoice","shouldCollectAddressFields","CompanyComponent","_b","choice","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","FirstName","_c","newValue","LastName","_d","AddressComponent","_e","FormattedHTMLMessage","CityComponent","_f","StateSelectComponent","getAvailableStateChoices","stateChoice","stateValue","_g","PostalCodeComponent","_h","Email","event","handleEmailOnKeyDown","_i","PhoneNumber","_j","config","FormFieldCustom","MarketConsentWrapper","_k","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepEmploymentPersonalInfoComponent","injectIntl"],"mappings":";;AAkDA,MAAMA,IAA6B,CAAC;AAAA,EAClC,MAAAC;AAAA,EACA,qBAAAC;AACF,MAAgD;;AAC9C,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IAAUC,EAAW,GAErBC,IAA4B,CAACC,GAA4CC,MAAe;AAC5F,UAAMC,IAA6CC;AAAAA,MACjDR;AAAA,MACA,CAACS,MAA2C;AACzC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAP,EAAoB,gBAAgBQ,CAAS;AAAA,EAC/C;AAGE,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAZ;AAAA,MACA,MAAMA,EAAoB,qBAAqB;AAAA,MAE/C,UAAA;AAAA,QAAAa,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAd;AAAA,YACA,qBAAoB;AAAA,UAAA;AAAA,QACtB;AAAA,QAEAa,gBAAAA,MAACE,KAAwB,qBAAAf,GAA0C;AAAA,QACnEa,gBAAAA,EAAA;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,qBAAAhB;AAAA,YACA,WAAUiB,IAAAC,EAAwB,SAAS,MAAjC,gBAAAD,EAAoC;AAAA,YAC9C,yBAAyB,CAACP,GAAOS,MAAkB;AACjD,oBAAMlB,IAAYS;AAElBT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,qBAAAvD;AAAA,YACA,WAAAC;AAAA,YACA,YACEY,gBAAAA,EAAA;AAAA,cAACoB;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAGauB,IAAsCC,EAAW3D,CAA0B;"}
|
@@ -1,14 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
|
-
import { at as B, f as o, j as a, a0 as $, k as S, q as v, M as ee, m as ae, al as se, E as R, u as r, N as ne, w as te, a1 as oe, au as le, a3 as w, O as de, T as re, a4 as me, n as ie, X as ue, Y as pe, Z as be, _ as ce, o as Ce, V as ge } from "./es6-
|
8
|
+
import { at as B, f as o, j as a, a0 as $, k as S, q as v, M as ee, m as ae, al as se, E as R, u as r, N as ne, w as te, a1 as oe, au as le, a3 as w, O as de, T as re, a4 as me, n as ie, X as ue, Y as pe, Z as be, _ as ce, o as Ce, V as ge } from "./es6-DVLmEXlW.js";
|
9
9
|
import g from "react";
|
10
10
|
import { injectIntl as he, FormattedHTMLMessage as m } from "react-intl";
|
11
|
-
import { u as xe, E as Ne, a as L } from "./useEmailFirstExperiment-
|
11
|
+
import { u as xe, E as Ne, a as L } from "./useEmailFirstExperiment-Bop0_o_w.js";
|
12
12
|
const Ee = ({
|
13
13
|
value: e,
|
14
14
|
isErrored: n,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-Car2nzvx.js","sources":["../../src/components/FormFields/CVECNumber/CVECNumberComponent.tsx","../../src/components/StepStudentPersonalInfo/StepStudentPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { getFieldConfigByFieldId } from \"@/lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { FormFieldComponentProps } from \"../../../lib/types/types\";\nimport { FormFieldText } from \"../FormFieldText/FormFieldText\";\nimport { useFlag } from \"../../FeatureFlags/hooks\";\n\ninterface PassedProps {\n explanation?: string | JSX.Element;\n}\n\nexport const CVECNumber = ({\n value,\n isErrored,\n onChange,\n intl,\n explanation,\n placeholder = \"\",\n isRequired = false,\n}: FormFieldComponentProps & PassedProps) => {\n // #region include-cvec-field-france-student\n const showCvecInputVariation = useFlag(\"include-cvec-field-france-student\");\n\n const getDefaultExplanation = () =>\n showCvecInputVariation === \"labeled-optional\" ? (\n <FormattedHTMLMessage\n id=\"cvecNumberExplanation\"\n defaultMessage=\"Optional - Add your CVEC number to increase your chances of being verified instantly.\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"_EXPERIMENTAL.cvecNumberExplanation\"\n defaultMessage=\"Add your CVEC number to increase your chances of being verified instantly.\"\n />\n );\n // #endregion include-cvec-field-france-student\n\n const isFieldHidden = getFieldConfigByFieldId(\"cvecNumber\")?.hidden;\n\n if (isFieldHidden) {\n return null;\n }\n\n return (\n <FormFieldText\n fieldId=\"cvecNumber\"\n value={value}\n onChange={onChange}\n placeholder={\n placeholder ||\n intl.formatHTMLMessage({\n id: \"cvecNumberPlaceholder\",\n defaultMessage: \"CVEC certificate number\",\n })\n }\n label={<FormattedHTMLMessage id=\"cvecNumber\" defaultMessage=\"CVEC certificate number\" />}\n errorMessage={\n isErrored && (\n <FormattedHTMLMessage\n id=\"errorId.invalidCvecNumber\"\n defaultMessage=\"Invalid CVEC certificate number\"\n />\n )\n }\n showPlaceholderAndHideLabel={!!placeholder}\n required={isRequired}\n explanation={explanation || getDefaultExplanation()}\n />\n );\n};\nexport const CVECNumberComponent = injectIntl(CVECNumber);\n","/* eslint-disable */\n/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n VerificationService,\n StudentPersonalInfoViewModel,\n Organization,\n StudentPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { CollegeNameComponent as CollegeName } from \"../FormFields/CollegeName/CollegeNameComponent\";\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 { 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 { useFlag } from \"../FeatureFlags/hooks\";\nimport { CVECNumberComponent } from \"../FormFields/CVECNumber/CVECNumberComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\nimport { EmailLookupStatus } from \"../FormFields/EmailFirstCollectInfo/types\";\n\ninterface StepStudentPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepStudentPersonalInfo = ({\n verificationService,\n}: StepStudentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as StudentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as StudentPersonalInfoResponse;\n const options = getOptions();\n\n // #region include-cvec-field-france-student\n const showCvecInputVariation = useFlag(\"include-cvec-field-france-student\");\n const showCvecInput =\n showCvecInputVariation !== \"control\" &&\n showCvecInputVariation !== \"default\" &&\n viewModel?.countryChoice?.value === \"FR\";\n\n React.useEffect(() => {\n if (showCvecInput) {\n updateStudentViewModel(\"fieldsToSkipValidation\", []);\n } else {\n // Don't validate CVEC number if country is not France\n updateStudentViewModel(\"fieldsToSkipValidation\", [\"cvecNumber\"]);\n }\n }, [showCvecInput]);\n // #endregion include-cvec-field-france-student\n\n // #region collect-info-step-email-first\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n enableFormFields,\n isValidEmail,\n getOrgByDomain,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n const [orgByEmailDomain, setOrgByEmailDomain] = React.useState<Organization | null>(null);\n const [selectedOrganization, setSelectedOrganization] = React.useState<Organization | null>(null);\n\n React.useEffect(() => {\n const fetchOrg = async () => {\n if (\n viewModel.email &&\n isValidEmail &&\n emailLookupResponse &&\n emailLookupResponse.status === EmailLookupStatus.NOT_FOUND\n ) {\n const org = await getOrgByDomain(verificationService);\n\n if (org) {\n setOrgByEmailDomain(org);\n updateViewModelOrganization(org, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", org, verificationService);\n }\n } else {\n setOrgByEmailDomain(null);\n }\n };\n\n if (isValidEmail && emailLookupResponse) {\n fetchOrg();\n }\n }, [viewModel.email, isValidEmail, emailLookupResponse?.status]);\n // #endregion collect-info-step-email-first\n\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const updateStudentViewModel = (key: keyof StudentPersonalInfoViewModel, value: any) => {\n const nextState: StudentPersonalInfoViewModel = produce(\n viewModel,\n (draft: StudentPersonalInfoViewModel) => {\n draft[key] = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const locale = viewModel.localeChoice.value;\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"student-personal-info\"\n />\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <>\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"sid-spinner scaled\">\n <LoadingSpinnerComponent />\n </div>\n </div>\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal or school email is fine\"\n />\n }\n onChange={(newValue) => {\n updateStudentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n </>\n )\n }\n {showEmailLookupResponseMessages && emailLookupResponse && isValidEmail && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <>\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n {\" \"}\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <CollegeName\n value={\n selectedOrganization ||\n (isEmailUpTop &&\n emailLookupResponse?.status === EmailLookupStatus.NOT_FOUND &&\n orgByEmailDomain) ||\n (verificationService.viewModel as StudentPersonalInfoViewModel).organization\n }\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n isRequired\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n setSelectedOrganization(choice);\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n {showCvecInput && (\n <CVECNumberComponent\n isRequired={getFieldConfigByFieldId(\"cvecNumber\")?.requireIfOptional}\n value={viewModel.cvecNumber}\n isErrored={!!fieldValidationErrors.cvecNumber}\n disabled={getFieldConfigByFieldId(\"cvecNumber\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"cvecNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"cvecNumber\", newValue, 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 updateStudentViewModel(\"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 updateStudentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n value={viewModel.birthDate}\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n isRequired\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n />\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal or school email is fine\"\n />\n }\n onChange={(newValue) => {\n updateStudentViewModel(\"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 disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\n \"phoneNumber\",\n newValue,\n verificationService,\n );\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\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 disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\n \"marketConsentValue\",\n newValue,\n verificationService,\n );\n }}\n viewModel={viewModel}\n />\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectStudentPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Student Status\"\n />\n }\n />\n </div>\n </>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepStudentPersonalInfoComponent = StepStudentPersonalInfo;\n"],"names":["CVECNumber","value","isErrored","onChange","intl","explanation","placeholder","isRequired","showCvecInputVariation","useFlag","getDefaultExplanation","jsx","FormattedHTMLMessage","_a","getFieldConfigByFieldId","FormFieldText","CVECNumberComponent","injectIntl","StepStudentPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","options","getOptions","showCvecInput","React","updateStudentViewModel","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","enableFormFields","isValidEmail","getOrgByDomain","handleOnClickProceedHere","useEmailFirstExperiment","orgByEmailDomain","setOrgByEmailDomain","selectedOrganization","setSelectedOrganization","EmailLookupStatus","org","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","failedInstantMatch","hasFailedInstantMatch","key","nextState","produce","draft","locale","jsxs","PersonalInfoWrapper","PersonalInfoHeader","Fragment","LoadingSpinnerComponent","Email","newValue","_b","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_c","CollegeName","_d","choice","_e","_f","FirstName","_g","LastName","_h","BirthDate","_i","event","handleEmailOnKeyDown","_j","PhoneNumber","_k","config","FormFieldCustom","MarketConsentWrapper","_l","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepStudentPersonalInfoComponent"],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W,CAAC,CAACE,EAAsB;AAAA,cACnC,WAAUkE,IAAAzE,EAAwB,oBAAoB,MAA5C,gBAAAyE,EAA+C;AAAA,cACzD,UAAU,CAACzB,MAAa;AACtB,gBAAAnC,EAAuB,YAAY;AAAA,kBACjC,GAAGR,EAAoB,UAAU;AAAA,kBACjC,oBAAoB2C;AAAA,gBAAA,CACrB,GACDd;AAAA,kBACE;AAAA,kBACAc;AAAA,kBACA3C;AAAA,gBACF;AAAA,cACF;AAAA,cACA,WAAAC;AAAA,YAAA;AAAA,UACF;AAAA,UACCT,gBAAAA,EAAAA,IAAA6E,IAAA,EAAa,qBAAArE,GAA0C,QAAO,qBAAqB,CAAA;AAAA,UACpFR,gBAAAA,EAAA;AAAA,YAAC8E;AAAA,YAAA;AAAA,cACC,MAAMC,GAAsB;AAAA,cAC5B,qBAAAvE;AAAA,cACA,WAAAC;AAAA,cACA,oBAAA6B;AAAA,cACA,YACEtC,gBAAAA,EAAA;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,EAAA,CACF,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEa+E,KAAmCzE;"}
|
1
|
+
{"version":3,"file":"index-D9e88ogy.js","sources":["../../src/components/FormFields/CVECNumber/CVECNumberComponent.tsx","../../src/components/StepStudentPersonalInfo/StepStudentPersonalInfoComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { getFieldConfigByFieldId } from \"@/lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { FormFieldComponentProps } from \"../../../lib/types/types\";\nimport { FormFieldText } from \"../FormFieldText/FormFieldText\";\nimport { useFlag } from \"../../FeatureFlags/hooks\";\n\ninterface PassedProps {\n explanation?: string | JSX.Element;\n}\n\nexport const CVECNumber = ({\n value,\n isErrored,\n onChange,\n intl,\n explanation,\n placeholder = \"\",\n isRequired = false,\n}: FormFieldComponentProps & PassedProps) => {\n // #region include-cvec-field-france-student\n const showCvecInputVariation = useFlag(\"include-cvec-field-france-student\");\n\n const getDefaultExplanation = () =>\n showCvecInputVariation === \"labeled-optional\" ? (\n <FormattedHTMLMessage\n id=\"cvecNumberExplanation\"\n defaultMessage=\"Optional - Add your CVEC number to increase your chances of being verified instantly.\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"_EXPERIMENTAL.cvecNumberExplanation\"\n defaultMessage=\"Add your CVEC number to increase your chances of being verified instantly.\"\n />\n );\n // #endregion include-cvec-field-france-student\n\n const isFieldHidden = getFieldConfigByFieldId(\"cvecNumber\")?.hidden;\n\n if (isFieldHidden) {\n return null;\n }\n\n return (\n <FormFieldText\n fieldId=\"cvecNumber\"\n value={value}\n onChange={onChange}\n placeholder={\n placeholder ||\n intl.formatHTMLMessage({\n id: \"cvecNumberPlaceholder\",\n defaultMessage: \"CVEC certificate number\",\n })\n }\n label={<FormattedHTMLMessage id=\"cvecNumber\" defaultMessage=\"CVEC certificate number\" />}\n errorMessage={\n isErrored && (\n <FormattedHTMLMessage\n id=\"errorId.invalidCvecNumber\"\n defaultMessage=\"Invalid CVEC certificate number\"\n />\n )\n }\n showPlaceholderAndHideLabel={!!placeholder}\n required={isRequired}\n explanation={explanation || getDefaultExplanation()}\n />\n );\n};\nexport const CVECNumberComponent = injectIntl(CVECNumber);\n","/* eslint-disable */\n/**\n * TODO - preamble\n */\nimport React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n VerificationService,\n StudentPersonalInfoViewModel,\n Organization,\n StudentPersonalInfoResponse,\n CustomFormFieldConfig,\n} from \"../../lib/types/types\";\n\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n getFieldConfigByFieldId,\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n updateViewModelOrganization,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\n\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { MarketConsentWrapperComponent as MarketConsentWrapper } from \"../FormFields/MarketConsentWrapper/MarketConsentWrapperComponent\";\nimport { PhoneNumberComponent as PhoneNumber } from \"../FormFields/PhoneNumber/PhoneNumberComponent\";\nimport { CollegeNameComponent as CollegeName } from \"../FormFields/CollegeName/CollegeNameComponent\";\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 { 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 { useFlag } from \"../FeatureFlags/hooks\";\nimport { CVECNumberComponent } from \"../FormFields/CVECNumber/CVECNumberComponent\";\nimport EmailLookupResponseMessages from \"../FormFields/EmailFirstCollectInfo/EmailLookupResponseMessageComponent\";\nimport { LoadingSpinnerComponent } from \"../LoadingSpinner/LoadingSpinnerComponent\";\nimport { useEmailFirstExperiment } from \"../FormFields/EmailFirstCollectInfo/useEmailFirstExperiment\";\nimport { EmailLookupStatus } from \"../FormFields/EmailFirstCollectInfo/types\";\n\ninterface StepStudentPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepStudentPersonalInfo = ({\n verificationService,\n}: StepStudentPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as StudentPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as StudentPersonalInfoResponse;\n const options = getOptions();\n\n // #region include-cvec-field-france-student\n const showCvecInputVariation = useFlag(\"include-cvec-field-france-student\");\n const showCvecInput =\n showCvecInputVariation !== \"control\" &&\n showCvecInputVariation !== \"default\" &&\n viewModel?.countryChoice?.value === \"FR\";\n\n React.useEffect(() => {\n if (showCvecInput) {\n updateStudentViewModel(\"fieldsToSkipValidation\", []);\n } else {\n // Don't validate CVEC number if country is not France\n updateStudentViewModel(\"fieldsToSkipValidation\", [\"cvecNumber\"]);\n }\n }, [showCvecInput]);\n // #endregion include-cvec-field-france-student\n\n // #region collect-info-step-email-first\n const {\n isEmailUpTop,\n isEmailValidationLoading,\n showFormFields,\n emailLookupResponse,\n emailOnBlur,\n emailOnKeyDown,\n handleResendClick,\n showEmailLookupResponseMessages,\n enableFormFields,\n isValidEmail,\n getOrgByDomain,\n handleOnClickProceedHere,\n } = useEmailFirstExperiment(\n verificationService.programId,\n viewModel.email,\n verificationService.verificationResponse.segment,\n );\n const [orgByEmailDomain, setOrgByEmailDomain] = React.useState<Organization | null>(null);\n const [selectedOrganization, setSelectedOrganization] = React.useState<Organization | null>(null);\n\n React.useEffect(() => {\n const fetchOrg = async () => {\n if (\n viewModel.email &&\n isValidEmail &&\n emailLookupResponse &&\n emailLookupResponse.status === EmailLookupStatus.NOT_FOUND\n ) {\n const org = await getOrgByDomain(verificationService);\n\n if (org) {\n setOrgByEmailDomain(org);\n updateViewModelOrganization(org, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", org, verificationService);\n }\n } else {\n setOrgByEmailDomain(null);\n }\n };\n\n if (isValidEmail && emailLookupResponse) {\n fetchOrg();\n }\n }, [viewModel.email, isValidEmail, emailLookupResponse?.status]);\n // #endregion collect-info-step-email-first\n\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const updateStudentViewModel = (key: keyof StudentPersonalInfoViewModel, value: any) => {\n const nextState: StudentPersonalInfoViewModel = produce(\n viewModel,\n (draft: StudentPersonalInfoViewModel) => {\n draft[key] = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const locale = viewModel.localeChoice.value;\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"student-personal-info\"\n />\n {\n // #region email-first-experiment\n isEmailUpTop && (\n <>\n <div className=\"email-input-wrapper\">\n {isEmailValidationLoading && (\n <div className=\"email-input-wrapper-frame\">\n <div className=\"sid-spinner scaled\">\n <LoadingSpinnerComponent />\n </div>\n </div>\n )}\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal or school email is fine\"\n />\n }\n onChange={(newValue) => {\n updateStudentViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={emailOnKeyDown}\n onBlur={emailOnBlur}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n </div>\n </>\n )\n }\n {showEmailLookupResponseMessages && emailLookupResponse && isValidEmail && (\n <EmailLookupResponseMessages\n emailLookupResponse={emailLookupResponse}\n onResendClick={handleResendClick}\n onHandleClickLink={handleOnClickProceedHere}\n />\n )}\n {showFormFields && (\n <>\n <div className={enableFormFields || !isEmailUpTop ? \"\" : \"sid-disable-elements\"}>\n {\" \"}\n <ChangeLocaleV2Component verificationService={verificationService} />\n <CountryComponentWrapper\n verificationService={verificationService}\n disabled={getFieldConfigByFieldId(\"country\")?.disabled}\n />\n <CollegeName\n value={\n selectedOrganization ||\n (isEmailUpTop &&\n emailLookupResponse?.status === EmailLookupStatus.NOT_FOUND &&\n orgByEmailDomain) ||\n (verificationService.viewModel as StudentPersonalInfoViewModel).organization\n }\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.organization}\n isRequired\n disabled={getFieldConfigByFieldId(\"organization\")?.disabled}\n onChange={(choice: Organization) => {\n setSelectedOrganization(choice);\n updateViewModelOrganization(choice, verificationService);\n updateFieldValidationErrorsByFieldId(\"organization\", choice, verificationService);\n }}\n />\n {showCvecInput && (\n <CVECNumberComponent\n isRequired={getFieldConfigByFieldId(\"cvecNumber\")?.requireIfOptional}\n value={viewModel.cvecNumber}\n isErrored={!!fieldValidationErrors.cvecNumber}\n disabled={getFieldConfigByFieldId(\"cvecNumber\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"cvecNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"cvecNumber\", newValue, 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 updateStudentViewModel(\"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 updateStudentViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n <BirthDate\n value={viewModel.birthDate}\n errorId={fieldValidationErrors.birthDate}\n locale={locale}\n isRequired\n disabled={getFieldConfigByFieldId(\"birthDate\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"birthDate\", newValue);\n updateFieldValidationErrorsByFieldId(\"birthDate\", newValue, verificationService);\n }}\n />\n {!isEmailUpTop && (\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Personal or school email is fine\"\n />\n }\n onChange={(newValue) => {\n updateStudentViewModel(\"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 disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\n \"phoneNumber\",\n newValue,\n verificationService,\n );\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\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 disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n onChange={(newValue) => {\n updateStudentViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\n \"marketConsentValue\",\n newValue,\n verificationService,\n );\n }}\n viewModel={viewModel}\n />\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectStudentPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Student Status\"\n />\n }\n />\n </div>\n </>\n )}\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepStudentPersonalInfoComponent = StepStudentPersonalInfo;\n"],"names":["CVECNumber","value","isErrored","onChange","intl","explanation","placeholder","isRequired","showCvecInputVariation","useFlag","getDefaultExplanation","jsx","FormattedHTMLMessage","_a","getFieldConfigByFieldId","FormFieldText","CVECNumberComponent","injectIntl","StepStudentPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","options","getOptions","showCvecInput","React","updateStudentViewModel","isEmailUpTop","isEmailValidationLoading","showFormFields","emailLookupResponse","emailOnBlur","emailOnKeyDown","handleResendClick","showEmailLookupResponseMessages","enableFormFields","isValidEmail","getOrgByDomain","handleOnClickProceedHere","useEmailFirstExperiment","orgByEmailDomain","setOrgByEmailDomain","selectedOrganization","setSelectedOrganization","EmailLookupStatus","org","updateViewModelOrganization","updateFieldValidationErrorsByFieldId","failedInstantMatch","hasFailedInstantMatch","key","nextState","produce","draft","locale","jsxs","PersonalInfoWrapper","PersonalInfoHeader","Fragment","LoadingSpinnerComponent","Email","newValue","_b","EmailLookupResponseMessages","ChangeLocaleV2Component","CountryComponentWrapper","_c","CollegeName","_d","choice","_e","_f","FirstName","_g","LastName","_h","BirthDate","_i","event","handleEmailOnKeyDown","_j","PhoneNumber","_k","config","FormFieldCustom","MarketConsentWrapper","_l","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepStudentPersonalInfoComponent"],"mappings":";;;;AAWO,MAAMA,KAAa,CAAC;AAAA,EACzB,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AACf,MAA6C;;AAErC,QAAAC,IAAyBC,EAAQ,mCAAmC,GAEpEC,IAAwB,MAC5BF,MAA2B,qBACzBG,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,gBAAe;AAAA,IAAA;AAAA,EAAA,IAGjBD,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAA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BAAqB,CAAA;AAAA,UACpFR,gBAAAA,EAAA;AAAA,YAAC8E;AAAA,YAAA;AAAA,cACC,MAAMC,GAAsB;AAAA,cAC5B,qBAAAvE;AAAA,cACA,WAAAC;AAAA,cACA,oBAAA6B;AAAA,cACA,YACEtC,gBAAAA,EAAA;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,EAAA,CACF,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ;AAEJ,GAEa+E,KAAmCzE;"}
|
package/lib/index-DIkWpujR.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
8
|
const v = () => {
|
9
9
|
let m = window.hp_frame || null, d = window.tmx_frame || null, f = window.tmx_script || null;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
|
-
import { e as v, ac as y, ad as M, ae as w, j as e, r as C, A as R, R as F, t as S, C as E, af as I, N as k } from "./es6-
|
8
|
+
import { e as v, ac as y, ad as M, ae as w, j as e, r as C, A as R, R as F, t as S, C as E, af as I, N as k } from "./es6-DVLmEXlW.js";
|
9
9
|
import h from "react";
|
10
10
|
import { FormattedHTMLMessage as s } from "react-intl";
|
11
11
|
const g = (t, r = "_top") => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-DLvR9J-j.js","sources":["../../src/components/StepSuccess/StepSuccessComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport { loadAffinityIFrame } from \"@/lib/installScript\";\nimport { VerificationService, SuccessResponse, ConsumerInfoState } from \"../../lib/types/types\";\n\nimport { LogoComponent } from \"../LogoComponent/LogoComponent\";\nimport { CopyToClipboard } from \"../CopyToClipboard/CopyToClipboardComponent\";\nimport { getBarcodeUrl } from \"../../lib/ServerApi/ApiUrls\";\nimport { RewardDisplayEnum } from \"../../lib/types/runtimeTypes\";\nimport { getLocaleSafely } from \"../../lib/intl/intl\";\nimport { getRememberMeRedirectDestination } from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { getQueryOrOption } from \"../../lib/ServerApi/TestingRouteOverrides\";\nimport { QUERY_STRING_REMEMBER_ME_OVERRIDE } from \"../../constants\";\nimport { getOptions } from \"../../options/options\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepSuccessProps {\n verificationService: VerificationService;\n}\n\nconst redirect = (redirectDestination: string, target: string = \"_top\") => {\n const win = window.open(redirectDestination, target);\n win.focus();\n};\n\nconst getAffinityBaseUrl = () => {\n const options = getOptions();\n const apiBaseUrl = options.restApi.serviceUrl;\n\n switch (apiBaseUrl) {\n case \"https://services.sheerid.com\":\n return \"https://shr-id.com\";\n default:\n return \"https://aa-preview.sheerid.net\";\n }\n};\n\nconst StepSuccess = ({ verificationService }: StepSuccessProps) => {\n const { verificationResponse, programId, viewModel } = verificationService;\n const { verificationId, redirectUrl } = verificationResponse as SuccessResponse;\n const { config } = verificationService.programTheme;\n const affinityRef = React.useRef<HTMLDivElement>(null);\n\n const showRedirect = Boolean(redirectUrl);\n const rewardCode = (verificationResponse as SuccessResponse).rewardCode || \"{rewardCode}\";\n const noCodeType = config.offerType === \"noCode\";\n\n const { rewardDisplay } = config;\n const showReward = !noCodeType && !!rewardDisplay.length;\n\n const mockConsumerInfoState = getQueryOrOption(\n QUERY_STRING_REMEMBER_ME_OVERRIDE,\n ) as ConsumerInfoState;\n const consumerInfoState: ConsumerInfoState =\n mockConsumerInfoState || (verificationResponse as SuccessResponse).consumerInfoState;\n const showRememberMeFooter =\n consumerInfoState === \"consumerNotFound\" ||\n consumerInfoState === \"consumerFoundNewFieldsAvailable\";\n\n const locale = getLocaleSafely(viewModel, verificationResponse);\n\n React.useEffect(() => {\n // Load the affinity widget if enabled\n if (affinityRef.current) {\n affinityRef.current.innerHTML = \"\";\n loadAffinityIFrame(\n affinityRef.current,\n `${getAffinityBaseUrl()}/affinity/${locale}/${programId}/${verificationId}`,\n );\n }\n }, [affinityRef, programId, verificationId, locale]);\n\n return (\n <div id=\"sid-step-success\" className=\"sid-success-container sid-l-container\" role=\"region\">\n <div className=\"sid-header sid-l-horz-center sid-l-space-top-md\">\n <div className=\"sid-success-logo-container sid-l-horz-center\">\n <LogoComponent\n verificationService={verificationService}\n fallbackLogo={\n <img\n className=\"sid-success-logo-default sid-l-lead-image\"\n alt=\"\"\n src=\"https://assets-resources.sheerid.com/common/images/2018/icons/circle-check.svg\"\n />\n }\n />\n </div>\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.success.title\"\n defaultMessage=\"Success! You've been verified.\"\n tagName=\"h1\"\n />\n </AnnouncingHeader>\n <div className=\"sid-header__subtitle sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.success.subtitle\"\n defaultMessage={`Here is your personal coupon code.\n It is unique to you and can only be used once.`}\n tagName=\"p\"\n />\n </div>\n </div>\n\n {showReward && (\n <div className=\"sid-l-horz-center sid-reward-container sid-l-space-top-md\">\n {rewardDisplay.map((displayType) => {\n if (displayType !== RewardDisplayEnum.TEXT)\n return (\n <img\n key={displayType}\n className=\"sid-l-space-top-md sid-barcode\"\n alt={rewardCode}\n src={getBarcodeUrl(verificationId, \"rewardCode\", displayType)}\n />\n );\n return (\n <div key={displayType}>\n <div\n className=\"sid-reward-code sid-l-space-top-md sid-h-jumbo-text sid-l-horz-center\"\n role=\"region\"\n >\n {rewardCode}\n </div>\n <div className=\"sid-l-space-top-md sid-h-bold-text sid-l-horz-center\">\n <CopyToClipboard\n textToCopy={rewardCode}\n notificationText={<FormattedHTMLMessage id=\"copied\" defaultMessage=\"Copied\" />}\n >\n <FormattedHTMLMessage\n id=\"step.success.copyCouponCode\"\n defaultMessage=\"Copy Coupon code\"\n />\n </CopyToClipboard>\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n <div\n className={`sid-footer sid-success-footer sid-l-horz-center ${\n noCodeType ? \"sid-l-space-top-md\" : \"sid-l-space-top-lg\"\n }`}\n >\n <FormattedHTMLMessage\n id=\"step.success.emailNotification\"\n defaultMessage=\"We have emailed you a copy so you can use your code now or later. Look for the email from verify@sheerid.com\"\n tagName=\"p\"\n />\n </div>\n\n {showRedirect ? (\n <div className=\"sid-submit sid-success-submit sid-l-space-top-md\">\n <button\n type=\"button\"\n onClick={() => redirect(redirectUrl)}\n className=\"sid-btn sid-success-redirect-btn sid-btn--dark\"\n >\n <FormattedHTMLMessage\n id=\"step.success.redirectButtonText\"\n defaultMessage=\"Use code now\"\n />\n </button>\n </div>\n ) : (\n \"\"\n )}\n\n <div\n className=\"sid-footer sid-success-verification-only-footer sid-l-horz-center sid-l-space-top-lg sid-h-small-text\"\n role=\"contentinfo\"\n >\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.verificationOnly\"\n defaultMessage={`\n SheerID handles verification only.\n Now that you've been approved, please direct all questions about the\n promotion terms to {companyName} customer service.\n `}\n values={{ companyName }}\n tagName=\"p\"\n />\n )}\n </FormattedHTMLMessage>\n </div>\n\n {verificationService.programTheme.affinityProgramEnabled && (\n <div\n ref={affinityRef}\n id=\"sid-affinity-iframe\"\n className=\"sid-affinity-container sid-l-full-width sid-l-space-top-lg\"\n />\n )}\n\n {showRememberMeFooter && (\n <div className=\"sid-remember-me-footer-container\">\n <div className=\"sid-remember-me-title\">\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.title\"\n defaultMessage=\"Save your info for 1-click verification\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.title\"\n defaultMessage=\"Update Your Profile\"\n />\n )}\n </div>\n <div className=\"sid-remember-me-description\">\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.description\"\n defaultMessage=\"Get faster access to future offers with {companyName} and other brands using SheerID's Remember Me service.\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n ) : (\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.description\"\n defaultMessage=\"Save new info for future offers with {companyName} and other brands using SheerID's Remember Me service.\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n )}\n </div>\n <button\n type=\"button\"\n onClick={() =>\n redirect(\n getRememberMeRedirectDestination(locale, programId, verificationId),\n \"_blank\",\n )\n }\n className=\"sid-btn sid-remember-me-redirect-btn\"\n >\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.button\"\n defaultMessage=\"Enroll Now\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.button\"\n defaultMessage=\"Save to Remember Me\"\n />\n )}\n </button>\n </div>\n )}\n </div>\n );\n};\n\nexport const StepSuccessComponent = StepSuccess;\n"],"names":["redirect","redirectDestination","target","getAffinityBaseUrl","getOptions","StepSuccess","verificationService","verificationResponse","programId","viewModel","verificationId","redirectUrl","config","affinityRef","React","showRedirect","rewardCode","noCodeType","rewardDisplay","showReward","consumerInfoState","getQueryOrOption","QUERY_STRING_REMEMBER_ME_OVERRIDE","showRememberMeFooter","locale","getLocaleSafely","loadAffinityIFrame","jsxs","jsx","LogoComponent","AnnouncingHeader","FormattedHTMLMessage","displayType","RewardDisplayEnum","getBarcodeUrl","CopyToClipboard","companyName","getRememberMeRedirectDestination","StepSuccessComponent"],"mappings":";;;AAqBA,MAAMA,IAAW,CAACC,GAA6BC,IAAiB,WAAW;AAEzE,EADY,OAAO,KAAKD,GAAqBC,CAAM,EAC/C,MAAM;AACZ,GAEMC,IAAqB,MAAM;AAI/B,UAHgBC,EAAW,EACA,QAAQ,YAEf;AAAA,IAClB,KAAK;AACI,aAAA;AAAA,IACT;AACS,aAAA;AAAA,EAAA;AAEb,GAEMC,IAAc,CAAC,EAAE,qBAAAC,QAA4C;AACjE,QAAM,EAAE,sBAAAC,GAAsB,WAAAC,GAAW,WAAAC,EAAc,IAAAH,GACjD,EAAE,gBAAAI,GAAgB,aAAAC,EAAA,IAAgBJ,GAClC,EAAE,QAAAK,MAAWN,EAAoB,cACjCO,IAAcC,EAAM,OAAuB,IAAI,GAE/CC,IAAe,EAAQJ,GACvBK,IAAcT,EAAyC,cAAc,gBACrEU,IAAaL,EAAO,cAAc,UAElC,EAAE,eAAAM,MAAkBN,GACpBO,IAAa,CAACF,KAAc,CAAC,CAACC,EAAc,QAK5CE,IAHwBC;AAAA,IAC5BC;AAAA,EACF,KAE4Bf,EAAyC,mBAC/DgB,IACJH,MAAsB,sBACtBA,MAAsB,mCAEl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J,IAECR,gBAAAA,EAAAA,IAAAG,GAAA,EAAqB,IAAG,eAAc,gBAAe,aACnD,UAAA,CAACK,MACAR,gBAAAA,EAAA;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,gBAAe;AAAA,UACf,QAAQ,EAAE,aAAAK,EAAY;AAAA,QAAA;AAAA,SAG5B,EAEJ,CAAA;AAAA,MACAR,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MACP5B;AAAA,YACEqC,EAAiCb,GAAQhB,GAAWE,CAAc;AAAA,YAClE;AAAA,UACF;AAAA,UAEF,WAAU;AAAA,UAET,gBAAsB,qBACrBkB,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,gBAAe;AAAA,YAAA;AAAA,UAAA,IAGjBH,gBAAAA,EAAA;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,gBAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB;AAAA,MAAA;AAAA,IAEJ,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ,GAEaO,IAAuBjC;"}
|
1
|
+
{"version":3,"file":"index-DNVzPuWH.js","sources":["../../src/components/StepSuccess/StepSuccessComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport { loadAffinityIFrame } from \"@/lib/installScript\";\nimport { VerificationService, SuccessResponse, ConsumerInfoState } from \"../../lib/types/types\";\n\nimport { LogoComponent } from \"../LogoComponent/LogoComponent\";\nimport { CopyToClipboard } from \"../CopyToClipboard/CopyToClipboardComponent\";\nimport { getBarcodeUrl } from \"../../lib/ServerApi/ApiUrls\";\nimport { RewardDisplayEnum } from \"../../lib/types/runtimeTypes\";\nimport { getLocaleSafely } from \"../../lib/intl/intl\";\nimport { getRememberMeRedirectDestination } from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { getQueryOrOption } from \"../../lib/ServerApi/TestingRouteOverrides\";\nimport { QUERY_STRING_REMEMBER_ME_OVERRIDE } from \"../../constants\";\nimport { getOptions } from \"../../options/options\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepSuccessProps {\n verificationService: VerificationService;\n}\n\nconst redirect = (redirectDestination: string, target: string = \"_top\") => {\n const win = window.open(redirectDestination, target);\n win.focus();\n};\n\nconst getAffinityBaseUrl = () => {\n const options = getOptions();\n const apiBaseUrl = options.restApi.serviceUrl;\n\n switch (apiBaseUrl) {\n case \"https://services.sheerid.com\":\n return \"https://shr-id.com\";\n default:\n return \"https://aa-preview.sheerid.net\";\n }\n};\n\nconst StepSuccess = ({ verificationService }: StepSuccessProps) => {\n const { verificationResponse, programId, viewModel } = verificationService;\n const { verificationId, redirectUrl } = verificationResponse as SuccessResponse;\n const { config } = verificationService.programTheme;\n const affinityRef = React.useRef<HTMLDivElement>(null);\n\n const showRedirect = Boolean(redirectUrl);\n const rewardCode = (verificationResponse as SuccessResponse).rewardCode || \"{rewardCode}\";\n const noCodeType = config.offerType === \"noCode\";\n\n const { rewardDisplay } = config;\n const showReward = !noCodeType && !!rewardDisplay.length;\n\n const mockConsumerInfoState = getQueryOrOption(\n QUERY_STRING_REMEMBER_ME_OVERRIDE,\n ) as ConsumerInfoState;\n const consumerInfoState: ConsumerInfoState =\n mockConsumerInfoState || (verificationResponse as SuccessResponse).consumerInfoState;\n const showRememberMeFooter =\n consumerInfoState === \"consumerNotFound\" ||\n consumerInfoState === \"consumerFoundNewFieldsAvailable\";\n\n const locale = getLocaleSafely(viewModel, verificationResponse);\n\n React.useEffect(() => {\n // Load the affinity widget if enabled\n if (affinityRef.current) {\n affinityRef.current.innerHTML = \"\";\n loadAffinityIFrame(\n affinityRef.current,\n `${getAffinityBaseUrl()}/affinity/${locale}/${programId}/${verificationId}`,\n );\n }\n }, [affinityRef, programId, verificationId, locale]);\n\n return (\n <div id=\"sid-step-success\" className=\"sid-success-container sid-l-container\" role=\"region\">\n <div className=\"sid-header sid-l-horz-center sid-l-space-top-md\">\n <div className=\"sid-success-logo-container sid-l-horz-center\">\n <LogoComponent\n verificationService={verificationService}\n fallbackLogo={\n <img\n className=\"sid-success-logo-default sid-l-lead-image\"\n alt=\"\"\n src=\"https://assets-resources.sheerid.com/common/images/2018/icons/circle-check.svg\"\n />\n }\n />\n </div>\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.success.title\"\n defaultMessage=\"Success! You've been verified.\"\n tagName=\"h1\"\n />\n </AnnouncingHeader>\n <div className=\"sid-header__subtitle sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.success.subtitle\"\n defaultMessage={`Here is your personal coupon code.\n It is unique to you and can only be used once.`}\n tagName=\"p\"\n />\n </div>\n </div>\n\n {showReward && (\n <div className=\"sid-l-horz-center sid-reward-container sid-l-space-top-md\">\n {rewardDisplay.map((displayType) => {\n if (displayType !== RewardDisplayEnum.TEXT)\n return (\n <img\n key={displayType}\n className=\"sid-l-space-top-md sid-barcode\"\n alt={rewardCode}\n src={getBarcodeUrl(verificationId, \"rewardCode\", displayType)}\n />\n );\n return (\n <div key={displayType}>\n <div\n className=\"sid-reward-code sid-l-space-top-md sid-h-jumbo-text sid-l-horz-center\"\n role=\"region\"\n >\n {rewardCode}\n </div>\n <div className=\"sid-l-space-top-md sid-h-bold-text sid-l-horz-center\">\n <CopyToClipboard\n textToCopy={rewardCode}\n notificationText={<FormattedHTMLMessage id=\"copied\" defaultMessage=\"Copied\" />}\n >\n <FormattedHTMLMessage\n id=\"step.success.copyCouponCode\"\n defaultMessage=\"Copy Coupon code\"\n />\n </CopyToClipboard>\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n <div\n className={`sid-footer sid-success-footer sid-l-horz-center ${\n noCodeType ? \"sid-l-space-top-md\" : \"sid-l-space-top-lg\"\n }`}\n >\n <FormattedHTMLMessage\n id=\"step.success.emailNotification\"\n defaultMessage=\"We have emailed you a copy so you can use your code now or later. Look for the email from verify@sheerid.com\"\n tagName=\"p\"\n />\n </div>\n\n {showRedirect ? (\n <div className=\"sid-submit sid-success-submit sid-l-space-top-md\">\n <button\n type=\"button\"\n onClick={() => redirect(redirectUrl)}\n className=\"sid-btn sid-success-redirect-btn sid-btn--dark\"\n >\n <FormattedHTMLMessage\n id=\"step.success.redirectButtonText\"\n defaultMessage=\"Use code now\"\n />\n </button>\n </div>\n ) : (\n \"\"\n )}\n\n <div\n className=\"sid-footer sid-success-verification-only-footer sid-l-horz-center sid-l-space-top-lg sid-h-small-text\"\n role=\"contentinfo\"\n >\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.verificationOnly\"\n defaultMessage={`\n SheerID handles verification only.\n Now that you've been approved, please direct all questions about the\n promotion terms to {companyName} customer service.\n `}\n values={{ companyName }}\n tagName=\"p\"\n />\n )}\n </FormattedHTMLMessage>\n </div>\n\n {verificationService.programTheme.affinityProgramEnabled && (\n <div\n ref={affinityRef}\n id=\"sid-affinity-iframe\"\n className=\"sid-affinity-container sid-l-full-width sid-l-space-top-lg\"\n />\n )}\n\n {showRememberMeFooter && (\n <div className=\"sid-remember-me-footer-container\">\n <div className=\"sid-remember-me-title\">\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.title\"\n defaultMessage=\"Save your info for 1-click verification\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.title\"\n defaultMessage=\"Update Your Profile\"\n />\n )}\n </div>\n <div className=\"sid-remember-me-description\">\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.description\"\n defaultMessage=\"Get faster access to future offers with {companyName} and other brands using SheerID's Remember Me service.\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n ) : (\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.description\"\n defaultMessage=\"Save new info for future offers with {companyName} and other brands using SheerID's Remember Me service.\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n )}\n </div>\n <button\n type=\"button\"\n onClick={() =>\n redirect(\n getRememberMeRedirectDestination(locale, programId, verificationId),\n \"_blank\",\n )\n }\n className=\"sid-btn sid-remember-me-redirect-btn\"\n >\n {consumerInfoState === \"consumerNotFound\" ? (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerNotFound.button\"\n defaultMessage=\"Enroll Now\"\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.success.rememberMe.consumerFound.button\"\n defaultMessage=\"Save to Remember Me\"\n />\n )}\n </button>\n </div>\n )}\n </div>\n );\n};\n\nexport const StepSuccessComponent = StepSuccess;\n"],"names":["redirect","redirectDestination","target","getAffinityBaseUrl","getOptions","StepSuccess","verificationService","verificationResponse","programId","viewModel","verificationId","redirectUrl","config","affinityRef","React","showRedirect","rewardCode","noCodeType","rewardDisplay","showReward","consumerInfoState","getQueryOrOption","QUERY_STRING_REMEMBER_ME_OVERRIDE","showRememberMeFooter","locale","getLocaleSafely","loadAffinityIFrame","jsxs","jsx","LogoComponent","AnnouncingHeader","FormattedHTMLMessage","displayType","RewardDisplayEnum","getBarcodeUrl","CopyToClipboard","companyName","getRememberMeRedirectDestination","StepSuccessComponent"],"mappings":";;;AAqBA,MAAMA,IAAW,CAACC,GAA6BC,IAAiB,WAAW;AAEzE,EADY,OAAO,KAAKD,GAAqBC,CAAM,EAC/C,MAAM;AACZ,GAEMC,IAAqB,MAAM;AAI/B,UAHgBC,EAAW,EACA,QAAQ,YAEf;AAAA,IAClB,KAAK;AACI,aAAA;AAAA,IACT;AACS,aAAA;AAAA,EAAA;AAEb,GAEMC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@@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
|
-
import { j as e, r as l, R as c, t as p, C as m } from "./es6-
|
8
|
+
import { j as e, r as l, R as c, t as p, C as m } from "./es6-DVLmEXlW.js";
|
9
9
|
import { FormattedHTMLMessage as o } from "react-intl";
|
10
10
|
const u = ({ verificationService: s }) => {
|
11
11
|
const t = s.verificationResponse.consolationRewardCode || "${consolationRewardCode}", i = s.programTheme.config.offerType === "noCode", { verificationId: n } = s.verificationResponse, { rewardDisplay: d } = s.programTheme.config, r = !i && !!d.length;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-E7HFWjnx.js","sources":["../../src/components/StepConsolation/StepConsolationComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\n\nimport { VerificationService, ConsolationResponse } from \"../../lib/types/types\";\n\nimport { LogoComponent } from \"../LogoComponent/LogoComponent\";\nimport { CopyToClipboard } from \"../CopyToClipboard/CopyToClipboardComponent\";\nimport { RewardDisplayEnum } from \"../../lib/types/runtimeTypes\";\nimport { getBarcodeUrl } from \"../../lib/ServerApi/ApiUrls\";\n\ninterface StepConsolationProps {\n verificationService: VerificationService;\n}\n\nconst StepConsolation = ({ verificationService }: StepConsolationProps) => {\n const consolationRewardCode =\n (verificationService.verificationResponse as ConsolationResponse).consolationRewardCode ||\n \"${consolationRewardCode}\"; // eslint-disable-line no-template-curly-in-string\n\n const noCodeType = verificationService.programTheme.config.offerType === \"noCode\";\n const { verificationId } = verificationService.verificationResponse;\n\n const { rewardDisplay } = verificationService.programTheme.config;\n const showReward = !noCodeType && !!rewardDisplay.length;\n\n return (\n <div id=\"sid-step-consolation\" className=\"sid-l-container\">\n <div className=\"sid-header sid-l-horz-center sid-l-space-top-md\">\n <div className=\"sid-l-horz-center\">\n <LogoComponent verificationService={verificationService} />\n </div>\n\n <div\n className=\"sid-header__title sid-l-horz-center sid-l-space-top-md\"\n id=\"consolation-status\"\n role=\"alertdialog\"\n >\n <FormattedHTMLMessage\n id=\"step.consolation.title\"\n defaultMessage=\"Claim your offer\"\n tagName=\"h1\"\n />\n </div>\n\n <div className=\"sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.consolation.subtitle\"\n defaultMessage=\"Unfortunately we could not verify your status, but we value your interest and are offering this promo code as a thank you. It is unique to you and can only be used once.\"\n />\n </div>\n </div>\n\n {showReward && (\n <div className=\"sid-l-horz-center sid-reward-container sid-l-space-top-md\">\n {rewardDisplay.map((displayType) => {\n if (displayType !== RewardDisplayEnum.TEXT)\n return (\n <img\n key={displayType}\n className=\"sid-l-space-top-md sid-barcode\"\n alt={consolationRewardCode}\n src={getBarcodeUrl(verificationId, \"consolationRewardCode\", displayType)}\n />\n );\n return (\n <>\n <div\n className=\"sid-reward-code sid-l-space-top-lg sid-h-jumbo-text sid-l-horz-center\"\n role=\"region\"\n >\n {consolationRewardCode}\n </div>\n <div className=\"sid-l-space-top-md sid-h-bold-text sid-l-horz-center\">\n <CopyToClipboard\n textToCopy={consolationRewardCode}\n notificationText={<FormattedHTMLMessage id=\"copied\" defaultMessage=\"Copied\" />}\n >\n <FormattedHTMLMessage\n id=\"step.success.copyCouponCode\"\n defaultMessage=\"Copy Coupon code\"\n />\n </CopyToClipboard>\n </div>\n </>\n );\n })}\n </div>\n )}\n\n <div className=\"sid-footer sid-l-horz-center sid-l-space-top-lg\">\n <FormattedHTMLMessage\n id=\"rewardCodeEmailNotification\"\n defaultMessage=\"We have emailed you a copy so you can use your new code now or later. Look for the email from verify@sheerid.com.\"\n />\n </div>\n\n <div\n className=\"sid-footer sid-l-horz-center sid-l-space-top-lg sid-h-small-text\"\n role=\"contentinfo\"\n >\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.consolation.verificationOnly\"\n defaultMessage=\"Please direct any and all questions about this offer to {companyName}.\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n </div>\n </div>\n );\n};\n\nexport const StepConsolationComponent = StepConsolation;\n"],"names":["StepConsolation","verificationService","consolationRewardCode","noCodeType","verificationId","rewardDisplay","showReward","jsxs","jsx","LogoComponent","FormattedHTMLMessage","displayType","RewardDisplayEnum","getBarcodeUrl","Fragment","CopyToClipboard","companyName","StepConsolationComponent"],"mappings":";;AAcA,MAAMA,IAAkB,CAAC,EAAE,qBAAAC,QAAgD;AACnE,QAAAC,IACHD,EAAoB,qBAA6C,yBAClE,4BAEIE,IAAaF,EAAoB,aAAa,OAAO,cAAc,UACnE,EAAE,gBAAAG,MAAmBH,EAAoB,sBAEzC,EAAE,eAAAI,EAAA,IAAkBJ,EAAoB,aAAa,QACrDK,IAAa,CAACH,KAAc,CAAC,CAACE,EAAc;AAElD,SACGE,gBAAAA,EAAAA,KAAA,OAAA,EAAI,IAAG,wBAAuB,WAAU,mBACvC,UAAA;AAAA,IAACA,gBAAAA,EAAAA,KAAA,OAAA,EAAI,WAAU,mDACb,UAAA;AAAA,MAAAC,gBAAAA,EAAAA,IAAC,SAAI,WAAU,qBACb,UAACA,gBAAAA,EAAA,IAAAC,GAAA,EAAc,qBAAAR,EAA0C,CAAA,GAC3D;AAAA,MAEAO,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,MAAK;AAAA,UAEL,UAAAA,gBAAAA,EAAA;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,IAA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H,gBAAe;AAAA,MAAA;AAAA,IAAA,GAEnB;AAAA,IAEAF,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QAEL,gCAACE,GAAqB,EAAA,IAAG,eAAc,gBAAe,aACnD,WAACM,MACAR,gBAAAA,EAAA;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,gBAAe;AAAA,YACf,QAAQ,EAAE,aAAAM,EAAY;AAAA,UAAA;AAAA,QAAA,EAG5B,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ,GAEaC,IAA2BjB;"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.115.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.115.0-alpha.9
|
4
|
+
* BUILD_TIMESTAMP: 1752095390243
|
5
|
+
* BUILD_DATE: Wed Jul 09 2025 21:09:50 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821fab51bd71995854e86f7cdee77a5b89617244
|
7
7
|
*/
|
8
|
-
import { k as m, j as e, m as u, E as x, n as f, u as I, o as j, V as E, p as M, q as h } from "./es6-
|
8
|
+
import { k as m, j as e, m as u, E as x, n as f, u as I, o as j, V as E, p as M, q as h } from "./es6-DVLmEXlW.js";
|
9
9
|
import { FormattedHTMLMessage as o } from "react-intl";
|
10
10
|
const C = ({ verificationService: t }) => {
|
11
11
|
const s = t.viewModel, { fieldValidationErrors: a } = t, l = t.verificationResponse, d = m(l), i = (n, r) => {
|