@sheerid/jslib-nightly 2.108.0-alpha.0 → 2.108.0-alpha.2
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 +10 -6
- package/_mysheerid-preview.js.map +1 -1
- 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-CtJ_9k3U.js +4 -4
- package/chunk/bg-CWxXfiDq.js +4 -4
- package/chunk/bn-IN-Dpq_hCqt.js +4 -4
- package/chunk/cs-HevyelX7.js +4 -4
- package/chunk/da-6QXhWjWH.js +4 -4
- package/chunk/de-ChuCvRLv.js +4 -4
- package/chunk/el-3IAhABcN.js +4 -4
- package/chunk/en-GB-ByNBaer-.js +4 -4
- package/chunk/es-CL_dUc9X.js +4 -4
- package/chunk/es-ES-CW4At4Ol.js +4 -4
- package/chunk/fi-D8cIebkk.js +4 -4
- package/chunk/fr-BDU-1C6f.js +4 -4
- package/chunk/fr-CA-Dc02rv8D.js +4 -4
- package/chunk/ga-P7eP-INQ.js +4 -4
- package/chunk/hi-IN-DlmwjoqH.js +4 -4
- package/chunk/hr-CT_VP_lm.js +4 -4
- package/chunk/hu-I8Z1uXsR.js +4 -4
- package/chunk/id-CUPTGKOT.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-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-CcRowarb.js +4 -4
- package/chunk/index-CeHu2Npu.js +4 -4
- package/chunk/index-CniY_P3e.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-FfXcSdRM.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-CUuXi4qZ.js +4 -4
- package/chunk/it-BNmynTsg.js +4 -4
- package/chunk/iw-FGzquR_X.js +4 -4
- package/chunk/ja-YgUpXA0l.js +4 -4
- package/chunk/ko-CuNS5J_M.js +4 -4
- package/chunk/lo-BEf8aFjR.js +4 -4
- package/chunk/lt-DvX1gz1a.js +4 -4
- package/chunk/ms-gSqM-Mfi.js +4 -4
- package/chunk/nl-BE-Cid5LFlN.js +4 -4
- package/chunk/nl-CUUTswxa.js +4 -4
- package/chunk/no-BvUqlShV.js +4 -4
- package/chunk/pl-CU8leZhI.js +4 -4
- package/chunk/pt-BR-CboWpHFi.js +4 -4
- package/chunk/pt-BnK7xRT_.js +4 -4
- package/chunk/ro-BfAyXxSW.js +4 -4
- package/chunk/ru-BD-YGPuQ.js +4 -4
- package/chunk/sk-CqsabpdG.js +4 -4
- package/chunk/sl-CeVAf0S_.js +4 -4
- package/chunk/sr-DSaHxcCQ.js +4 -4
- package/chunk/sv-DOyWYViy.js +4 -4
- package/chunk/sw-2Q7Jo6wp.js +4 -4
- package/chunk/th-BZ6F9sPf.js +4 -4
- package/chunk/tr-om80xrv2.js +4 -4
- package/chunk/uk-Dxugux8e.js +4 -4
- package/chunk/ur-OBILUeZ7.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-BOR2GuRI.js +4 -4
- package/chunk/zh-HK-BI-IHOGG.js +4 -4
- package/chunk/zh-eoMG5RFC.js +4 -4
- package/chunk/zu-D_A8wcJW.js +4 -4
- package/es6.css +4 -4
- package/jslib.js +5 -5
- package/lib/{EmailLoopPending-DYWm_x0O.js → EmailLoopPending-8A6C-2ph.js} +5 -5
- package/lib/{EmailLoopPending-DYWm_x0O.js.map → EmailLoopPending-8A6C-2ph.js.map} +1 -1
- package/lib/{LicensedProfessionalOrganizationComponent-Be1zeXvl.js → LicensedProfessionalOrganizationComponent-Ba58pAHy.js} +5 -5
- package/lib/{LicensedProfessionalOrganizationComponent-Be1zeXvl.js.map → LicensedProfessionalOrganizationComponent-Ba58pAHy.js.map} +1 -1
- package/lib/Onfido-AyvUk6wg.js +4 -4
- package/lib/StepCollectMilitaryStatusComponent-qqfUx_JS.js +11 -0
- package/lib/{StepCollectMilitaryStatusComponent-BKL3fB0E.js.map → StepCollectMilitaryStatusComponent-qqfUx_JS.js.map} +1 -1
- package/lib/{StepIDCheckLoopOnfido-CTbLv0FK.js → StepIDCheckLoopOnfido-BbkpecOJ.js} +5 -5
- package/lib/{StepIDCheckLoopOnfido-CTbLv0FK.js.map → StepIDCheckLoopOnfido-BbkpecOJ.js.map} +1 -1
- package/lib/{StepIDCheckLoopRegula-C-gsPKwf.js → StepIDCheckLoopRegula-DxXGuUT9.js} +5 -5
- package/lib/{StepIDCheckLoopRegula-C-gsPKwf.js.map → StepIDCheckLoopRegula-DxXGuUT9.js.map} +1 -1
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-CAB7YdGU.js → StepInactiveMilitaryPersonalInfoComponent-BD8EVBq4.js} +6 -6
- package/lib/{StepInactiveMilitaryPersonalInfoComponent-CAB7YdGU.js.map → StepInactiveMilitaryPersonalInfoComponent-BD8EVBq4.js.map} +1 -1
- package/lib/{VerificationApiUtils-Ch9wrer5.js → VerificationApiUtils-BtflD8TO.js} +5 -5
- package/lib/{VerificationApiUtils-Ch9wrer5.js.map → VerificationApiUtils-BtflD8TO.js.map} +1 -1
- package/lib/ar-CtJ_9k3U.js +4 -4
- package/lib/bg-CWxXfiDq.js +4 -4
- package/lib/bn-IN-Dpq_hCqt.js +4 -4
- package/lib/cs-HevyelX7.js +4 -4
- package/lib/da-6QXhWjWH.js +4 -4
- package/lib/de-ChuCvRLv.js +4 -4
- package/lib/el-3IAhABcN.js +4 -4
- package/lib/en-GB-ByNBaer-.js +4 -4
- package/lib/es-CL_dUc9X.js +4 -4
- package/lib/es-ES-CW4At4Ol.js +4 -4
- package/lib/{es6-DtTJO40-.js → es6-DHEcq5va.js} +37 -33
- package/lib/es6-DHEcq5va.js.map +1 -0
- package/lib/fi-D8cIebkk.js +4 -4
- package/lib/fr-BDU-1C6f.js +4 -4
- package/lib/fr-CA-Dc02rv8D.js +4 -4
- package/lib/ga-P7eP-INQ.js +4 -4
- package/lib/hi-IN-DlmwjoqH.js +4 -4
- package/lib/hr-CT_VP_lm.js +4 -4
- package/lib/hu-I8Z1uXsR.js +4 -4
- package/lib/id-CUPTGKOT.js +4 -4
- package/lib/{index-DQgcRnuT.js → index-BBbhxq02.js} +6 -6
- package/lib/{index-DQgcRnuT.js.map → index-BBbhxq02.js.map} +1 -1
- package/lib/{index-D-0k7Li4.js → index-BUN0DJiM.js} +6 -6
- package/lib/{index-D-0k7Li4.js.map → index-BUN0DJiM.js.map} +1 -1
- package/lib/{index-CU3Jmwj1.js → index-Bh1721L3.js} +5 -5
- package/lib/{index-CU3Jmwj1.js.map → index-Bh1721L3.js.map} +1 -1
- package/lib/{index-BCtV3LPw.js → index-BkW_8fuH.js} +6 -6
- package/lib/{index-BCtV3LPw.js.map → index-BkW_8fuH.js.map} +1 -1
- package/lib/{index-B3eWlXCp.js → index-C8sQaGlj.js} +6 -6
- package/lib/{index-B3eWlXCp.js.map → index-C8sQaGlj.js.map} +1 -1
- package/lib/{index-BIs9HdNn.js → index-CARfktKC.js} +6 -6
- package/lib/{index-BIs9HdNn.js.map → index-CARfktKC.js.map} +1 -1
- package/lib/index-CR-J9GpF.js +11 -0
- package/lib/index-CR-J9GpF.js.map +1 -0
- package/lib/{index-ChSFM0sQ.js → index-CSeir5aY.js} +7 -7
- package/lib/{index-ChSFM0sQ.js.map → index-CSeir5aY.js.map} +1 -1
- package/lib/{index-4WYi347k.js → index-CepxCLrG.js} +6 -6
- package/lib/{index-4WYi347k.js.map → index-CepxCLrG.js.map} +1 -1
- package/lib/{index-CYSHbxGT.js → index-D3zlXNw7.js} +5 -5
- package/lib/{index-CYSHbxGT.js.map → index-D3zlXNw7.js.map} +1 -1
- package/lib/index-D43LvZnw.js +11 -0
- package/lib/index-D43LvZnw.js.map +1 -0
- package/lib/{index-C2CL1s82.js → index-DFURhiaO.js} +5 -5
- package/lib/{index-C2CL1s82.js.map → index-DFURhiaO.js.map} +1 -1
- package/lib/index-DIkWpujR.js +4 -4
- package/lib/{index-KMXavM8H.js → index-DLdTwB0j.js} +6 -6
- package/lib/{index-KMXavM8H.js.map → index-DLdTwB0j.js.map} +1 -1
- package/lib/{index-B3ayAS9Q.js → index-DVGOZDYm.js} +5 -5
- package/lib/{index-B3ayAS9Q.js.map → index-DVGOZDYm.js.map} +1 -1
- package/lib/{index-7hnX4DXf.js → index-Dp_BEnJI.js} +5 -5
- package/lib/{index-7hnX4DXf.js.map → index-Dp_BEnJI.js.map} +1 -1
- package/lib/index-DsG0HBM_.js +11 -0
- package/lib/index-DsG0HBM_.js.map +1 -0
- package/lib/index-Dzn1x4Z-.js +11 -0
- package/lib/index-Dzn1x4Z-.js.map +1 -0
- package/lib/{index-pUF9o6ta.js → index-Mf5QEyne.js} +5 -5
- package/lib/{index-pUF9o6ta.js.map → index-Mf5QEyne.js.map} +1 -1
- package/lib/{index-S0U5PUSR.js → index-QjwO4Nn5.js} +5 -5
- package/lib/{index-S0U5PUSR.js.map → index-QjwO4Nn5.js.map} +1 -1
- package/lib/{index-BI2TR0rl.js → index-RsNrq3bj.js} +5 -5
- package/lib/{index-BI2TR0rl.js.map → index-RsNrq3bj.js.map} +1 -1
- package/lib/{index-CV4m00WE.js → index-UL9oAwZQ.js} +5 -5
- package/lib/{index-CV4m00WE.js.map → index-UL9oAwZQ.js.map} +1 -1
- package/lib/{index-Bm7vBobV.js → index-bmmHiqgK.js} +5 -5
- package/lib/{index-Bm7vBobV.js.map → index-bmmHiqgK.js.map} +1 -1
- package/lib/{index-BjpD86oy.js → index-e9vI9rRV.js} +7 -7
- package/lib/{index-BjpD86oy.js.map → index-e9vI9rRV.js.map} +1 -1
- package/lib/is-CUuXi4qZ.js +4 -4
- package/lib/it-BNmynTsg.js +4 -4
- package/lib/iw-FGzquR_X.js +4 -4
- package/lib/ja-YgUpXA0l.js +4 -4
- package/lib/ko-CuNS5J_M.js +4 -4
- package/lib/lo-BEf8aFjR.js +4 -4
- package/lib/lt-DvX1gz1a.js +4 -4
- package/lib/ms-gSqM-Mfi.js +4 -4
- package/lib/nl-BE-Cid5LFlN.js +4 -4
- package/lib/nl-CUUTswxa.js +4 -4
- package/lib/no-BvUqlShV.js +4 -4
- package/lib/pl-CU8leZhI.js +4 -4
- package/lib/pt-BR-CboWpHFi.js +4 -4
- package/lib/pt-BnK7xRT_.js +4 -4
- package/lib/ro-BfAyXxSW.js +4 -4
- package/lib/ru-BD-YGPuQ.js +4 -4
- package/lib/sk-CqsabpdG.js +4 -4
- package/lib/sl-CeVAf0S_.js +4 -4
- package/lib/sr-DSaHxcCQ.js +4 -4
- package/lib/sv-DOyWYViy.js +4 -4
- package/lib/sw-2Q7Jo6wp.js +4 -4
- package/lib/th-BZ6F9sPf.js +4 -4
- package/lib/tr-om80xrv2.js +4 -4
- package/lib/uk-Dxugux8e.js +4 -4
- package/lib/ur-OBILUeZ7.js +4 -4
- package/lib/{useCollectFieldsEndpoint-CGRlGJXh.js → useCollectFieldsEndpoint-DxjuQFIC.js} +6 -6
- package/lib/{useCollectFieldsEndpoint-CGRlGJXh.js.map → useCollectFieldsEndpoint-DxjuQFIC.js.map} +1 -1
- package/lib/{useEmailFirstExperiment-DKu4yR6H.js → useEmailFirstExperiment-lDeIaLSH.js} +5 -5
- package/lib/{useEmailFirstExperiment-DKu4yR6H.js.map → useEmailFirstExperiment-lDeIaLSH.js.map} +1 -1
- package/lib/vi-BOR2GuRI.js +4 -4
- package/lib/zh-HK-BI-IHOGG.js +4 -4
- package/lib/zh-eoMG5RFC.js +4 -4
- package/lib/zu-D_A8wcJW.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 +10 -6
- package/sheerid.js.map +1 -1
- package/types-reference.zip +0 -0
- package/lib/StepCollectMilitaryStatusComponent-BKL3fB0E.js +0 -11
- package/lib/es6-DtTJO40-.js.map +0 -1
- package/lib/index-CXzvSXFv.js +0 -11
- package/lib/index-CXzvSXFv.js.map +0 -1
- package/lib/index-ChFdPjD9.js +0 -11
- package/lib/index-ChFdPjD9.js.map +0 -1
- package/lib/index-Z577yryG.js +0 -11
- package/lib/index-Z577yryG.js.map +0 -1
- package/lib/index-kgym3Fk6.js +0 -11
- package/lib/index-kgym3Fk6.js.map +0 -1
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
7
|
*/
|
8
|
-
import { i as l, j as e, A as S, $ as R, q as E, l as V, V as w, K as y } from "./es6-
|
8
|
+
import { i as l, j as e, A as S, $ as R, q as E, l as V, V as w, K as y } from "./es6-DHEcq5va.js";
|
9
9
|
import c from "react";
|
10
10
|
import { injectIntl as _, FormattedHTMLMessage as t } from "react-intl";
|
11
11
|
const k = ({ intl: i, verificationService: s }) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-CYSHbxGT.js","sources":["../../src/components/StepSMSLoop/StepSMSLoopComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { injectIntl, FormattedHTMLMessage, InjectedIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { logger } from \"../../lib/utils/logger/logger\";\nimport {\n VerificationService,\n StudentPersonalInfoViewModel,\n SMSLoopResponse,\n SMSLoopViewModel,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\n\nimport { SMSCodeComponent } from \"../FormFields/SMSCode/SMSCodeComponent\";\n\nimport { VerificationApiClient } from \"../../lib/ServerApi/VerificationApiClient\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepSMSLoopProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepSMSLoop = ({ intl, verificationService }: StepSMSLoopProps) => {\n const viewModel = verificationService.viewModel as SMSLoopViewModel;\n const verificationResponse = verificationService.verificationResponse as SMSLoopResponse;\n const isErrored = Boolean(verificationService.fieldValidationErrors.smsCode);\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n\n const [stepResultMessage, setStepResultMessage] = React.useState(\"\");\n const [isAttemptLimitExceeded, setAttemptLimitExceeded] = React.useState(\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"incorrectSMSCodeAttemptLimitExceeded\"),\n );\n\n const stepSuccessMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.successResend\",\n defaultMessage: \"SMS message re-sent successfully\",\n });\n const maxTotalRetriesMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.codeResendLimit\",\n defaultMessage: \"Maximum number of re-tries has been reached.\",\n });\n const maxRetriesPerCodeMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.codeResendLimit\",\n defaultMessage: \"Maximum number of re-tries has been reached.\",\n });\n const errorResendingSMSMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.resend\",\n defaultMessage: \"Error sending the SMS message\",\n });\n\n React.useEffect(() => {\n if (isAttemptLimitExceeded) {\n setStepResultMessage(maxRetriesPerCodeMessage);\n }\n }, []);\n\n if (\n getSafe(() => verificationResponse.errorIds.length) &&\n !verificationService.fieldValidationErrors.smsCode\n ) {\n verificationService.updateFieldValidationErrors({\n ...verificationService.fieldValidationErrors,\n smsCode: verificationResponse.errorIds[0],\n });\n }\n\n const updateSmsCode = (value) => {\n const nextState: SMSLoopViewModel = produce(viewModel, (draft: SMSLoopViewModel) => {\n draft.smsCode = value;\n draft.phoneNumber = previousViewModel && previousViewModel.phoneNumber;\n });\n verificationService.updateViewModel(nextState);\n };\n\n const submitForm = () => {\n logger.info(\"StepSMSLoop submitting form\");\n verificationService.submitStep(\n VerificationStepsEnum.smsLoop,\n viewModel,\n verificationService.verificationResponse,\n );\n };\n\n const resendSmsCode = async (verificationId) => {\n const response = await VerificationApiClient.getResendNewSmsCode(verificationId);\n if (response) {\n setAttemptLimitExceeded(false);\n setStepResultMessage(response.status === 204 ? stepSuccessMessage : maxTotalRetriesMessage);\n } else {\n setStepResultMessage(errorResendingSMSMessage);\n }\n };\n\n return (\n <div id=\"sid-step-sms-loop\" className=\"sid-sms-loop-container sid-l-container\">\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.smsLoop.verificationCode\"\n defaultMessage=\"Verification Code\"\n tagName=\"h1\"\n />\n </AnnouncingHeader>\n\n <div className=\"sid-header__subtitle\">\n {getSafe(() => previousViewModel.phoneNumber) ? (\n <FormattedHTMLMessage\n id=\"step.smsLoop.titleWithNumber\"\n defaultMessage=\"We've sent an SMS message to the mobile number ending in {number}. Enter your code here.\"\n values={{\n number: getSafe(() => previousViewModel.phoneNumber.slice(-4), \"\"),\n }}\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.smsLoop.titleWithoutNumber\"\n defaultMessage=\"We've sent an SMS to your mobile number. Please enter the code here.\"\n />\n )}\n </div>\n\n <div className=\"sid-sms-code-id-wrapper sid-l-horz-center\">\n <SMSCodeComponent\n onChange={updateSmsCode}\n value={viewModel.smsCode}\n isErrored={isErrored}\n errorId={verificationService.fieldValidationErrors.smsCode}\n />\n </div>\n\n {stepResultMessage && (\n <div>\n <p>{stepResultMessage}</p>\n </div>\n )}\n\n <div className=\"sid-submit sid-sms-loop-submit sid-l-space-top-md sid-l-horz-center\">\n <button\n id=\"sid-submit-sms-code\"\n onClick={submitForm}\n type=\"button\"\n className=\"sid-btn sid-sms-loop-submit-btn sid-btn--dark sid-submit__continue\"\n aria-label=\"submit\"\n disabled={\n !!(!viewModel.smsCode || viewModel.smsCode.length <= 0 || isAttemptLimitExceeded)\n }\n >\n <FormattedHTMLMessage id=\"step.smsLoop.submitButton\" defaultMessage=\"Submit\" />\n </button>\n\n <div className=\"sid-l-space-left-sm\"> </div>\n\n <button\n id=\"sid-resend-sms-code\"\n onClick={() => resendSmsCode(verificationResponse.verificationId)}\n type=\"submit\"\n className=\"sid-btn sid-resend-sms-code-btn sid-btn--light sid-submit__cancel\"\n aria-label=\"re-send\"\n >\n <FormattedHTMLMessage id=\"step.smsLoop.resendButton\" defaultMessage=\"Re-send\" />\n </button>\n </div>\n\n <div className=\"sid-incorrect-number sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber1\"\n defaultMessage=\"Incorrect number? Click\"\n />\n \n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"sid-incorrect-number__refresh-link sid-h-btn-link-like\"\n >\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber2\"\n defaultMessage=\"here\"\n />\n \n </button>\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber3\"\n defaultMessage=\"to return to {companyName}\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n </div>\n </div>\n );\n};\n\nexport const StepSMSLoopComponent = injectIntl(StepSMSLoop);\n"],"names":["StepSMSLoop","intl","verificationService","viewModel","verificationResponse","isErrored","previousViewModel","stepResultMessage","setStepResultMessage","React","isAttemptLimitExceeded","setAttemptLimitExceeded","stepSuccessMessage","maxTotalRetriesMessage","maxRetriesPerCodeMessage","errorResendingSMSMessage","getSafe","updateSmsCode","value","nextState","produce","draft","submitForm","logger","VerificationStepsEnum","resendSmsCode","verificationId","response","VerificationApiClient","jsxs","jsx","AnnouncingHeader","FormattedHTMLMessage","SMSCodeComponent","companyName","StepSMSLoopComponent","injectIntl"],"mappings":";;;AAwBA,MAAMA,IAAc,CAAC,EAAE,MAAAC,GAAM,qBAAAC,QAA4C;AACvE,QAAMC,IAAYD,EAAoB,WAChCE,IAAuBF,EAAoB,sBAC3CG,IAAY,EAAQH,EAAoB,sBAAsB,SAC9DI,IACHJ,EAAoB,qBAAsD,QAEvE,CAACK,GAAmBC,CAAoB,IAAIC,EAAM,SAAS,EAAE,GAC7D,CAACC,GAAwBC,CAAuB,IAAIF,EAAM;AAAA,IAC9DL,EAAqB,YACnBA,EAAqB,SAAS,SAAS,sCAAsC;AAAA,EACjF,GAEMQ,IAAqBX,EAAK,kBAAkB;AAAA,IAChD,IAAI;AAAA,IACJ,gBAAgB;AAAA,EAAA,CACjB,GACKY,IAAyBZ,EAAK,kBAAkB;AAAA,IACpD,IAAI;AAAA,IACJ,gBAAgB;AAAA,EAAA,CACjB,GACKa,IAA2Bb,EAAK,kBAAkB;AAAA,IACtD,IAAI;AAAA,IACJ,gBAAgB;AAAA,EAAA,CACjB,GACKc,IAA2Bd,EAAK,kBAAkB;AAAA,IACtD,IAAI;AAAA,IACJ,gBAAgB;AAAA,EAAA,CACjB;AAEDQ,EAAAA,EAAM,UAAU,MAAM;AACpB,IAAIC,KACFF,EAAqBM,CAAwB;AAAA,EAEjD,GAAG,EAAE,GAGHE,EAAQ,MAAMZ,EAAqB,SAAS,MAAM,KAClD,CAACF,EAAoB,sBAAsB,WAE3CA,EAAoB,4BAA4B;AAAA,IAC9C,GAAGA,EAAoB;AAAA,IACvB,SAASE,EAAqB,SAAS,CAAC;AAAA,EAAA,CACzC;AAGG,QAAAa,IAAgB,CAACC,MAAU;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AA,MACjB;AAAA,MAAE;AAAA,MAEFH,gBAAAA,EAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,OAAO,SAAS,OAAO;AAAA,UACtC,WAAU;AAAA,UAEV,UAAA;AAAA,YAAAC,gBAAAA,EAAA;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YACjB;AAAA,YAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,4BACCA,GAAqB,EAAA,IAAG,eAAc,gBAAe,aACnD,WAACE,MACAJ,gBAAAA,EAAA;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,gBAAe;AAAA,UACf,QAAQ,EAAE,aAAAE,EAAY;AAAA,QAAA;AAAA,MAAA,EAG5B,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ,GAEaC,IAAuBC,EAAWpC,CAAW;"}
|
1
|
+
{"version":3,"file":"index-D3zlXNw7.js","sources":["../../src/components/StepSMSLoop/StepSMSLoopComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { injectIntl, FormattedHTMLMessage, InjectedIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { logger } from \"../../lib/utils/logger/logger\";\nimport {\n VerificationService,\n StudentPersonalInfoViewModel,\n SMSLoopResponse,\n SMSLoopViewModel,\n} from \"../../lib/types/types\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { getSafe } from \"../../lib/utils/getSafe\";\n\nimport { SMSCodeComponent } from \"../FormFields/SMSCode/SMSCodeComponent\";\n\nimport { VerificationApiClient } from \"../../lib/ServerApi/VerificationApiClient\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepSMSLoopProps {\n intl: InjectedIntl;\n verificationService: VerificationService;\n}\n\nconst StepSMSLoop = ({ intl, verificationService }: StepSMSLoopProps) => {\n const viewModel = verificationService.viewModel as SMSLoopViewModel;\n const verificationResponse = verificationService.verificationResponse as SMSLoopResponse;\n const isErrored = Boolean(verificationService.fieldValidationErrors.smsCode);\n const previousViewModel =\n (verificationService.previousViewModel as StudentPersonalInfoViewModel) || undefined;\n\n const [stepResultMessage, setStepResultMessage] = React.useState(\"\");\n const [isAttemptLimitExceeded, setAttemptLimitExceeded] = React.useState(\n verificationResponse.errorIds &&\n verificationResponse.errorIds.includes(\"incorrectSMSCodeAttemptLimitExceeded\"),\n );\n\n const stepSuccessMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.successResend\",\n defaultMessage: \"SMS message re-sent successfully\",\n });\n const maxTotalRetriesMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.codeResendLimit\",\n defaultMessage: \"Maximum number of re-tries has been reached.\",\n });\n const maxRetriesPerCodeMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.codeResendLimit\",\n defaultMessage: \"Maximum number of re-tries has been reached.\",\n });\n const errorResendingSMSMessage = intl.formatHTMLMessage({\n id: \"step.smsLoop.errors.resend\",\n defaultMessage: \"Error sending the SMS message\",\n });\n\n React.useEffect(() => {\n if (isAttemptLimitExceeded) {\n setStepResultMessage(maxRetriesPerCodeMessage);\n }\n }, []);\n\n if (\n getSafe(() => verificationResponse.errorIds.length) &&\n !verificationService.fieldValidationErrors.smsCode\n ) {\n verificationService.updateFieldValidationErrors({\n ...verificationService.fieldValidationErrors,\n smsCode: verificationResponse.errorIds[0],\n });\n }\n\n const updateSmsCode = (value) => {\n const nextState: SMSLoopViewModel = produce(viewModel, (draft: SMSLoopViewModel) => {\n draft.smsCode = value;\n draft.phoneNumber = previousViewModel && previousViewModel.phoneNumber;\n });\n verificationService.updateViewModel(nextState);\n };\n\n const submitForm = () => {\n logger.info(\"StepSMSLoop submitting form\");\n verificationService.submitStep(\n VerificationStepsEnum.smsLoop,\n viewModel,\n verificationService.verificationResponse,\n );\n };\n\n const resendSmsCode = async (verificationId) => {\n const response = await VerificationApiClient.getResendNewSmsCode(verificationId);\n if (response) {\n setAttemptLimitExceeded(false);\n setStepResultMessage(response.status === 204 ? stepSuccessMessage : maxTotalRetriesMessage);\n } else {\n setStepResultMessage(errorResendingSMSMessage);\n }\n };\n\n return (\n <div id=\"sid-step-sms-loop\" className=\"sid-sms-loop-container sid-l-container\">\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.smsLoop.verificationCode\"\n defaultMessage=\"Verification Code\"\n tagName=\"h1\"\n />\n </AnnouncingHeader>\n\n <div className=\"sid-header__subtitle\">\n {getSafe(() => previousViewModel.phoneNumber) ? (\n <FormattedHTMLMessage\n id=\"step.smsLoop.titleWithNumber\"\n defaultMessage=\"We've sent an SMS message to the mobile number ending in {number}. Enter your code here.\"\n values={{\n number: getSafe(() => previousViewModel.phoneNumber.slice(-4), \"\"),\n }}\n />\n ) : (\n <FormattedHTMLMessage\n id=\"step.smsLoop.titleWithoutNumber\"\n defaultMessage=\"We've sent an SMS to your mobile number. Please enter the code here.\"\n />\n )}\n </div>\n\n <div className=\"sid-sms-code-id-wrapper sid-l-horz-center\">\n <SMSCodeComponent\n onChange={updateSmsCode}\n value={viewModel.smsCode}\n isErrored={isErrored}\n errorId={verificationService.fieldValidationErrors.smsCode}\n />\n </div>\n\n {stepResultMessage && (\n <div>\n <p>{stepResultMessage}</p>\n </div>\n )}\n\n <div className=\"sid-submit sid-sms-loop-submit sid-l-space-top-md sid-l-horz-center\">\n <button\n id=\"sid-submit-sms-code\"\n onClick={submitForm}\n type=\"button\"\n className=\"sid-btn sid-sms-loop-submit-btn sid-btn--dark sid-submit__continue\"\n aria-label=\"submit\"\n disabled={\n !!(!viewModel.smsCode || viewModel.smsCode.length <= 0 || isAttemptLimitExceeded)\n }\n >\n <FormattedHTMLMessage id=\"step.smsLoop.submitButton\" defaultMessage=\"Submit\" />\n </button>\n\n <div className=\"sid-l-space-left-sm\"> </div>\n\n <button\n id=\"sid-resend-sms-code\"\n onClick={() => resendSmsCode(verificationResponse.verificationId)}\n type=\"submit\"\n className=\"sid-btn sid-resend-sms-code-btn sid-btn--light sid-submit__cancel\"\n aria-label=\"re-send\"\n >\n <FormattedHTMLMessage id=\"step.smsLoop.resendButton\" defaultMessage=\"Re-send\" />\n </button>\n </div>\n\n <div className=\"sid-incorrect-number sid-l-horz-center\">\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber1\"\n defaultMessage=\"Incorrect number? Click\"\n />\n \n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"sid-incorrect-number__refresh-link sid-h-btn-link-like\"\n >\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber2\"\n defaultMessage=\"here\"\n />\n \n </button>\n <FormattedHTMLMessage id=\"companyName\" defaultMessage=\"{Company}\">\n {(companyName) => (\n <FormattedHTMLMessage\n id=\"step.smsLoop.incorrectNumber.incorrectNumber3\"\n defaultMessage=\"to return to {companyName}\"\n values={{ companyName }}\n />\n )}\n </FormattedHTMLMessage>\n </div>\n </div>\n );\n};\n\nexport const StepSMSLoopComponent = injectIntl(StepSMSLoop);\n"],"names":["StepSMSLoop","intl","verificationService","viewModel","verificationResponse","isErrored","previousViewModel","stepResultMessage","setStepResultMessage","React","isAttemptLimitExceeded","setAttemptLimitExceeded","stepSuccessMessage","maxTotalRetriesMessage","maxRetriesPerCodeMessage","errorResendingSMSMessage","getSafe","updateSmsCode","value","nextState","produce","draft","submitForm","logger","VerificationStepsEnum","resendSmsCode","verificationId","response","VerificationApiClient","jsxs","jsx","AnnouncingHeader","FormattedHTMLMessage","SMSCodeComponent","companyName","StepSMSLoopComponent","injectIntl"],"mappings":";;;AAwBA,MAAMA,IAAc,CAAC,EAAE,MAAAC,GAAM,qBAAAC,QAA4C;AACvE,QAAMC,IAAYD,EAAoB,WAChCE,IAAuBF,EAAoB,sBAC3CG,IAAY,EAAQH,EAAoB,sBAAsB,SAC9DI,IACHJ,EAAoB,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;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,IAAG;AAAA,UACH,gBAAe;AAAA,UACf,QAAQ,EAAE,aAAAE,EAAY;AAAA,QAAA;AAAA,MAAA,EAG5B,CAAA;AAAA,IAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ,GAEaC,IAAuBC,EAAWpC,CAAW;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
|
+
*/
|
8
|
+
import { c as f } from "./es6-DHEcq5va.js";
|
9
|
+
export {
|
10
|
+
f as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-D43LvZnw.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
7
|
*/
|
8
|
-
import { j as s, v as h, r as x, A as y, w as N, x as j, y as S, u as g, z as w, B as C, V as l, p as f, q as M } from "./es6-
|
8
|
+
import { j as s, v as h, r as x, A as y, w as N, x as j, y as S, u as g, z as w, B as C, V as l, p as f, q as M } from "./es6-DHEcq5va.js";
|
9
9
|
import E from "react";
|
10
10
|
import { injectIntl as F, FormattedHTMLMessage as o } from "react-intl";
|
11
11
|
const V = ({ verificationService: e }) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-DFURhiaO.js","sources":["../../src/components/StepSocialSecurityNumber/StepSocialSecurityNumber.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { VerificationStepsEnum, FieldIdEnum } from \"../../lib/types/runtimeTypes\";\nimport { setRef } from \"../../lib/refs/refs\";\nimport { VerificationService, SocialSecurityViewModel } from \"../../lib/types/types\";\nimport {\n submitForm,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { LogoComponent } from \"../LogoComponent/LogoComponent\";\nimport { FormFooterComponent as FormFooter } from \"../FormFooter/FormFooterComponent\";\nimport { SocialSecurityNumber } from \"../FormFields/SSN/SSN\";\nimport { SsnChoice } from \"./SsnChoice\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { AnnouncingHeader } from \"../AnnouncingHeader/AnnouncingHeader\";\n\ninterface StepSocialSecurityNumberProps {\n verificationService: VerificationService;\n}\n\nconst Step = ({ verificationService }: StepSocialSecurityNumberProps) => {\n const [showChoice, setShowChoice] = React.useState(true);\n const viewModel = verificationService.viewModel as SocialSecurityViewModel;\n const { fieldValidationErrors } = verificationService;\n const doCancelStep = () =>\n verificationService.submitStep(\n VerificationStepsEnum.cancelSocialSecurityNumber,\n viewModel,\n verificationService.verificationResponse,\n );\n\n const updateSSNViewModel = (key: keyof SocialSecurityViewModel, value: any) => {\n const nextState: SocialSecurityViewModel = produce(\n viewModel,\n (draft: SocialSecurityViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n const isSubmittable =\n viewModel.socialSecurityNumber && viewModel.socialSecurityNumber.toString().length === 9;\n\n if (showChoice) {\n return (\n <SsnChoice\n useSsn={() => setShowChoice(false)}\n useDocUpload={doCancelStep}\n verificationService={verificationService}\n />\n );\n }\n\n return (\n <div\n id=\"sid-step-social-security\"\n className=\"sid-social-sercurity-number-container sid-l-container sid-l-horz-center\"\n >\n <div role=\"main\">\n <div className=\"sid-header\">\n <div className=\"sid-social-security-number-logo-container sid-l-horz-center\">\n <LogoComponent verificationService={verificationService} />\n </div>\n <AnnouncingHeader align=\"center\">\n <FormattedHTMLMessage\n id=\"step.collectSocialSecurityNumber.title\"\n defaultMessage=\"Enter your social security number\"\n tagName=\"h1\"\n />\n </AnnouncingHeader>\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n\n <div className=\"sid-ssn-wrapper\">\n <SocialSecurityNumber\n value={viewModel.socialSecurityNumber}\n onChange={(value: string) => {\n updateSSNViewModel(\"socialSecurityNumber\", value);\n updateFieldValidationErrorsByFieldId(\n \"socialSecurityNumber\",\n value,\n verificationService,\n );\n }}\n isErrored={!!fieldValidationErrors[FieldIdEnum.socialSecurityNumber]}\n placeholder=\"000-00-0000\"\n />\n </div>\n </div>\n\n <div className=\"sid-form-region sid-submit-wrapper sid-l-space-top-md\">\n <div className=\"sid-social-security-number-submit sid-submit\">\n <button\n id=\"sid-submit-wrapper__collect-info\"\n onClick={() =>\n submitForm(\n viewModel,\n verificationService,\n VerificationStepsEnum.collectSocialSecurityNumber,\n )\n }\n type=\"submit\"\n className={`sid-btn sid-social-security-number-submit-btn sid-btn--dark sid-l-full-width ${\n isSubmittable ? \"\" : \"sid-btn--disabled-like\"\n }`}\n aria-label=\"submit\"\n ref={(button) => setRef(\"submitButton\", button)}\n >\n <FormattedHTMLMessage id=\"proceed\" defaultMessage=\"Proceed\" />\n </button>\n </div>\n </div>\n\n <div\n className=\"sid-form-region sid-social-security-number-upload-instead-btn sid-l-space-top-md\"\n role=\"button\"\n tabIndex={0}\n onKeyUp={doCancelStep}\n onClick={doCancelStep}\n >\n <div className=\"sid-social-security-number-upload-instead-text sid-h-link-like\">\n <FormattedHTMLMessage\n id=\"step.collectSocialSecurityNumber.uploadInstead\"\n defaultMessage=\"Upload a document instead\"\n />\n </div>\n </div>\n </div>\n <FormFooter verificationService={verificationService} />\n </div>\n );\n};\n\n// TODO remove injectIntl, it's not used\nexport const StepSocialSecurityNumber = injectIntl(Step);\n"],"names":["Step","verificationService","showChoice","setShowChoice","React","viewModel","fieldValidationErrors","doCancelStep","VerificationStepsEnum","updateSSNViewModel","key","value","nextState","produce","draft","isSubmittable","jsx","SsnChoice","jsxs","LogoComponent","AnnouncingHeader","FormattedHTMLMessage","ChangeLocaleV2Component","SocialSecurityNumber","updateFieldValidationErrorsByFieldId","FieldIdEnum","submitForm","button","setRef","FormFooter","StepSocialSecurityNumber","injectIntl"],"mappings":";;;AAsBA,MAAMA,IAAO,CAAC,EAAE,qBAAAC,QAAyD;AACvE,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAM,SAAS,EAAI,GACjDC,IAAYJ,EAAoB,WAChC,EAAE,uBAAAK,MAA0BL,GAC5BM,IAAe,MACnBN,EAAoB;AAAA,IAClBO,EAAsB;AAAA,IACtBH;AAAA,IACAJ,EAAoB;AAAA,EACtB,GAEIQ,IAAqB,CAACC,GAAoCC,MAAe;AAC7E,UAAMC,IAAqCC;AAAAA,MACzCR;AAAA,MACA,CAACS,MAAmC;AACjC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAV,EAAoB,gBAAgBW,CAAS;AAAA,EAC/C,GAEMG,IACJV,EAAU,wBAAwBA,EAAU,qBAAqB,SAAA,EAAW,WAAW;AAEzF,SAAIH,IAEAc,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAQ,MAAMd,EAAc,EAAK;AAAA,MACjC,cAAcI;AAAA,MACd,qBAAAN;AAAA,IAAA;AAAA,EACF,IAKFiB,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,WAAU;AAAA,MAEV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AWC,EAAO,gBAAgBD,CAAM;AAAA,cAE9C,UAACX,gBAAAA,EAAA,IAAAK,GAAA,EAAqB,IAAG,WAAU,gBAAe,UAAU,CAAA;AAAA,YAAA;AAAA,aAEhE,EACF,CAAA;AAAA,UAEAL,gBAAAA,EAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,MAAK;AAAA,cACL,UAAU;AAAA,cACV,SAAST;AAAA,cACT,SAASA;AAAA,cAET,UAAAS,gBAAAA,EAAA,IAAC,OAAI,EAAA,WAAU,kEACb,UAAAA,gBAAAA,EAAA;AAAA,gBAACK;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA,EAEnB,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF,GACF;AAAA,QACAL,gBAAAA,MAACa,KAAW,qBAAA5B,EAA0C,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACxD;AAEJ,GAGa6B,IAA2BC,EAAW/B,CAAI;"}
|
package/lib/index-DIkWpujR.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
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,14 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
7
|
*/
|
8
|
-
import { k as V, a7 as k, a8 as A, i as q, u as d, j as o, M as B, N as L, m as U, w as W, a1 as w, f as r, O, T as _, a4 as H, a9 as K, U as X, W as Y, E as Z, n as z, X as G, Y as J, Z as Q, _ as $, o as S, V as v, aa as ee } from "./es6-
|
8
|
+
import { k as V, a7 as k, a8 as A, i as q, u as d, j as o, M as B, N as L, m as U, w as W, a1 as w, f as r, O, T as _, a4 as H, a9 as K, U as X, W as Y, E as Z, n as z, X as G, Y as J, Z as Q, _ as $, o as S, V as v, aa as ee } from "./es6-DHEcq5va.js";
|
9
9
|
import se from "react";
|
10
10
|
import { injectIntl as ae, FormattedHTMLMessage as oe } from "react-intl";
|
11
|
-
import { u as te } from "./useCollectFieldsEndpoint-
|
11
|
+
import { u as te } from "./useCollectFieldsEndpoint-DxjuQFIC.js";
|
12
12
|
const de = ({ verificationService: s, intl: j }) => {
|
13
13
|
var p, C, h, b, i, N, g, x, y;
|
14
14
|
const a = s.viewModel, { fieldValidationErrors: t } = s, l = s.verificationResponse, E = V(l), I = k(
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-KMXavM8H.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,aAA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oComponent.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,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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,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
7
|
*/
|
8
|
-
import { k as i, j as a, M as I, N as y, m as F, w as P, O as T, f as n, u as l, T as k, U as R, W as L, E as V, n as q, X as A, Y as B, Z as O, _ as W, o as D, V as H, q as K } from "./es6-
|
8
|
+
import { k as i, j as a, M as I, N as y, m as F, w as P, O as T, f as n, u as l, T as k, U as R, W as L, E as V, n as q, X as A, Y as B, Z as O, _ as W, o as D, V as H, q as K } from "./es6-DHEcq5va.js";
|
9
9
|
import { useEffect as w } from "react";
|
10
10
|
import { injectIntl as U, FormattedHTMLMessage as m } from "react-intl";
|
11
11
|
const X = ({ verificationService: e }) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-B3ayAS9Q.js","sources":["../../src/components/StepMoverPersonalInfo/StepMoverPersonalInfoComponent.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n VerificationService,\n MoverPersonalInfoViewModel,\n MoverPersonalInfoResponse,\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} 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 { AddressComponent as Address } from \"../FormFields/Address/AddressComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepMoverPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMoverPersonalInfo = ({ verificationService }: StepMoverPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MoverPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MoverPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const updateMoverViewModel = (key: keyof MoverPersonalInfoViewModel, value: any) => {\n const nextState: MoverPersonalInfoViewModel = produce(\n viewModel,\n (draft: MoverPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n // We do not want a drop down list, just apply available statuses to the viewModel\n useEffect(() => {\n updateMoverViewModel(\"statuses\", verificationResponse.availableStatuses);\n }, []);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"mover-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Address\n value={viewModel.address1}\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateMoverViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"streetAddress\" defaultMessage=\"Street Address\" />}\n isRequired\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n />\n\n <PostalCode\n value={viewModel.postalCode}\n isErrored={!!fieldValidationErrors.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMoverViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateMoverViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMoverViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMoverPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Recent Mover Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMoverPersonalInfoComponent = injectIntl(StepMoverPersonalInfo);\n"],"names":["StepMoverPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","updateMoverViewModel","key","value","nextState","produce","draft","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","FirstName","_a","getFieldConfigByFieldId","newValue","updateFieldValidationErrorsByFieldId","LastName","_b","Address","FormattedHTMLMessage","_c","PostalCode","_d","Email","event","handleEmailOnKeyDown","_e","PhoneNumber","_f","config","FormFieldCustom","MarketConsentWrapper","_g","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMoverPersonalInfoComponent","injectIntl"],"mappings":";;;AAsCA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAA+D;;AAC9F,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GAErBC,IAAuB,CAACC,GAAuCC,MAAe;AAClF,UAAMC,IAAwCC;AAAAA,MAC5CX;AAAA,MACA,CAACY,MAAsC;AACpC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAV,EAAoB,gBAAgBW,CAAS;AAAA,EAC/C;AAGA,SAAAG,EAAU,MAAM;AACO,IAAAN,EAAA,YAAYL,EAAqB,iBAAiB;AAAA,EACzE,GAAG,EAAE,GAGHY,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAhB;AAAA,MACA,MAAMG,EAAqB;AAAA,MAE3B,UAAA;AAAA,QAAAc,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAlB;AAAA,YACA,qBAAoB;AAAA,UAAA;AAAA,QACtB;AAAA,QAEAiB,gBAAAA,MAACE,KAAwB,qBAAAnB,GAA0C;A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BAAAA,MAAAsB,GAAA,EAAgB,QAAAD,GAAgB,qBAAAtC,EAAA,CAA0C,CAC5E;AAAA,QAEDiB,gBAAAA,EAAA;AAAA,UAACuB;AAAAA,UAAA;AAAA,YACC,qBAAAxC;AAAA,YACA,WAAW,CAAC,CAACE,EAAsB;AAAA,YACnC,UAAU,CAACqB,MAAa;AACtB,cAAAf,EAAqB,YAAY;AAAA,gBAC/B,GAAGR,EAAoB,UAAU;AAAA,gBACjC,oBAAoBuB;AAAA,cAAA,CACrB,GACoCC,EAAA,sBAAsBD,GAAUvB,CAAmB;AAAA,YAC1F;AAAA,YACA,WAAAC;AAAA,YACA,WAAUwC,IAAAnB,EAAwB,oBAAoB,MAA5C,gBAAAmB,EAA+C;AAAA,UAAA;AAAA,QAC3D;AAAA,QAECxB,gBAAAA,EAAAA,IAAAyB,GAAA,EAAa,qBAAA1C,GAA0C,QAAO,qBAAqB,CAAA;AAAA,QAEpFiB,gBAAAA,EAAA;AAAA,UAAC0B;AAAA,UAAA;AAAA,YACC,MAAMC,EAAsB;AAAA,YAC5B,qBAAA5C;AAAA,YACA,WAAAC;AAAA,YACA,oBAAAG;AAAA,YACA,YACEa,gBAAAA,EAAA;AAAA,cAACW;AAAA,cAAA;AAAA,gBACC,IAAG;AAAA,gBACH,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EACF;AAEJ,GAEaiB,IAAiCC,EAAW/C,CAAqB;"}
|
1
|
+
{"version":3,"file":"index-DVGOZDYm.js","sources":["../../src/components/StepMoverPersonalInfo/StepMoverPersonalInfoComponent.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { FormattedHTMLMessage, injectIntl } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport {\n VerificationService,\n MoverPersonalInfoViewModel,\n MoverPersonalInfoResponse,\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} 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 { AddressComponent as Address } from \"../FormFields/Address/AddressComponent\";\nimport { PostalCodeComponent as PostalCode } from \"../FormFields/PostalCode/PostalCodeComponent\";\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { getOptions } from \"../../options/options\";\nimport { FormFieldCustom } from \"../FormFields/FormFieldCustom/FormFieldCustom\";\nimport { ExtraMessage } from \"../ExtraMessage\";\nimport { ChangeLocaleV2Component } from \"../FormFields/ChangeLocale/ChangeLocaleComponent\";\nimport { PersonalInfoWrapper } from \"../PersonalInfoStepWrapper/PersonalInfoStepWrapper\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\n\ninterface StepMoverPersonalInfoComponentProps {\n verificationService: VerificationService;\n}\n\nconst StepMoverPersonalInfo = ({ verificationService }: StepMoverPersonalInfoComponentProps) => {\n const viewModel = verificationService.viewModel as MoverPersonalInfoViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse =\n verificationService.verificationResponse as MoverPersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n const options = getOptions();\n\n const updateMoverViewModel = (key: keyof MoverPersonalInfoViewModel, value: any) => {\n const nextState: MoverPersonalInfoViewModel = produce(\n viewModel,\n (draft: MoverPersonalInfoViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n // We do not want a drop down list, just apply available statuses to the viewModel\n useEffect(() => {\n updateMoverViewModel(\"statuses\", verificationResponse.availableStatuses);\n }, []);\n\n return (\n <PersonalInfoWrapper\n verificationService={verificationService}\n step={verificationResponse.currentStep}\n >\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"mover-personal-info\"\n />\n\n <ChangeLocaleV2Component verificationService={verificationService} />\n\n <div className=\"sid-names\">\n <FirstName\n value={viewModel.firstName}\n isErrored={!!fieldValidationErrors.firstName}\n disabled={getFieldConfigByFieldId(\"firstName\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"firstName\", newValue);\n updateFieldValidationErrorsByFieldId(\"firstName\", newValue, verificationService);\n }}\n />\n\n <LastName\n value={viewModel.lastName}\n isErrored={!!fieldValidationErrors.lastName}\n disabled={getFieldConfigByFieldId(\"lastName\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"lastName\", newValue);\n updateFieldValidationErrorsByFieldId(\"lastName\", newValue, verificationService);\n }}\n />\n </div>\n\n <Address\n value={viewModel.address1}\n isErrored={!!fieldValidationErrors.address1}\n errorId={fieldValidationErrors.address1}\n onChange={(newValue) => {\n updateMoverViewModel(\"address1\", newValue);\n updateFieldValidationErrorsByFieldId(\"address1\", newValue, verificationService);\n }}\n label={<FormattedHTMLMessage id=\"streetAddress\" defaultMessage=\"Street Address\" />}\n isRequired\n disabled={getFieldConfigByFieldId(\"address1\")?.disabled}\n />\n\n <PostalCode\n value={viewModel.postalCode}\n isErrored={!!fieldValidationErrors.postalCode}\n disabled={getFieldConfigByFieldId(\"postalCode\")?.disabled}\n onChange={(newValue) => {\n updateMoverViewModel(\"postalCode\", newValue);\n updateFieldValidationErrorsByFieldId(\"postalCode\", newValue, verificationService);\n }}\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"emailExplanation\"\n defaultMessage=\"Needed to send you your unique code\"\n />\n }\n onChange={(newValue) => {\n updateMoverViewModel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event) => handleEmailOnKeyDown(event)}\n disabled={getFieldConfigByFieldId(\"email\")?.disabled}\n />\n\n {verificationService.programTheme.isSmsNotifierConfigured ||\n verificationService.programTheme.smsLoopEnabled ? (\n <PhoneNumber\n isRequired={!!verificationService.programTheme.smsLoopEnabled}\n value={viewModel.phoneNumber}\n isErrored={!!fieldValidationErrors.phoneNumber}\n onChange={(newValue) => {\n updateMoverViewModel(\"phoneNumber\", newValue);\n updateFieldValidationErrorsByFieldId(\"phoneNumber\", newValue, verificationService);\n }}\n selectedCountryCode={viewModel.countryChoice && viewModel.countryChoice.value}\n disabled={getFieldConfigByFieldId(\"phoneNumber\")?.disabled}\n />\n ) : null}\n\n {options.customFormFields.map((config: CustomFormFieldConfig) => (\n <FormFieldCustom config={config} verificationService={verificationService} />\n ))}\n\n <MarketConsentWrapper\n verificationService={verificationService}\n isErrored={!!fieldValidationErrors.marketConsentValue}\n onChange={(newValue) => {\n updateMoverViewModel(\"metadata\", {\n ...verificationService.viewModel.metadata,\n marketConsentValue: newValue,\n });\n updateFieldValidationErrorsByFieldId(\"marketConsentValue\", newValue, verificationService);\n }}\n viewModel={viewModel}\n disabled={getFieldConfigByFieldId(\"marketConsentValue\")?.disabled}\n />\n\n <ExtraMessage verificationService={verificationService} suffix=\"CollectAboveSubmit\" />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectMoverPersonalInfo}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify My Recent Mover Status\"\n />\n }\n />\n </PersonalInfoWrapper>\n );\n};\n\nexport const StepMoverPersonalInfoComponent = injectIntl(StepMoverPersonalInfo);\n"],"names":["StepMoverPersonalInfo","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","options","getOptions","updateMoverViewModel","key","value","nextState","produce","draft","useEffect","jsxs","PersonalInfoWrapper","jsx","PersonalInfoHeader","ChangeLocaleV2Component","FirstName","_a","getFieldConfigByFieldId","newValue","updateFieldValidationErrorsByFieldId","LastName","_b","Address","FormattedHTMLMessage","_c","PostalCode","_d","Email","event","handleEmailOnKeyDown","_e","PhoneNumber","_f","config","FormFieldCustom","MarketConsentWrapper","_g","ExtraMessage","PersonalInfoStepSubmitButton","VerificationStepsEnum","StepMoverPersonalInfoComponent","injectIntl"],"mappings":";;;AAsCA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAA+D;;AAC9F,QAAMC,IAAYD,EAAoB,WAChC,EAAE,uBAAAE,MAA0BF,GAC5BG,IACJH,EAAoB,sBAChBI,IAAqBC,EAAsBF,CAAoB,GAC/DG,IAAUC,EAAW,GAErBC,IAAuB,CAACC,GAAuCC,MAAe;AAClF,UAAMC,IAAwCC;AAAAA,MAC5CX;AAAA,MACA,CAACY,MAAsC;AACpC,QAAAA,EAAMJ,CAAG,IAAYC;AAAA,MAAA;AAAA,IAE1B;AACA,IAAAV,EAAoB,gBAAgBW,CAAS;AAAA,EAC/C;AAGA,SAAAG,EAAU,MAAM;AACO,IAAAN,EAAA,YAAYL,EAAqB,iBAAiB;AAAA,EACzE,GAAG,EAAE,GAGHY,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,qBAAAhB;AAAA,MACA,MAAMG,EAAqB;AAAA,MAE3B,UAAA;AAAA,QAAAc,gBAAAA,EAAA;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,qBAAAlB;AAAA,YACA,qBAAoB;AAAA,UAAA;AAAA,QACtB;AAAA,QAEAiB,gBAAAA,MAACE,KAAwB,qBAAAnB,GAA0C;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BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
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-DHEcq5va.js";
|
9
9
|
import { FormattedHTMLMessage as o } from "react-intl";
|
10
10
|
const C = ({ verificationService: t }) => {
|
11
11
|
const s = t.viewModel, { fieldValidationErrors: a } = t, l = t.verificationResponse, d = m(l), i = (n, r) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index-
|
1
|
+
{"version":3,"file":"index-Dp_BEnJI.js","sources":["../../src/components/StepCollectIdentifier/StepCollectIdentifierComponent.tsx"],"sourcesContent":["import React from \"react\";\nimport { FormattedHTMLMessage } from \"react-intl\";\nimport { produce } from \"immer\";\n\nimport { hasFailedInstantMatch } from \"../../lib/VerificationService/VerificationServiceHelpers\";\nimport {\n VerificationService,\n CollectIdentifierViewModel,\n PersonalInfoResponse,\n} from \"../../lib/types/types\";\n\nimport {\n handleEmailOnKeyDown,\n updateFieldValidationErrorsByFieldId,\n} from \"../../lib/utils/stepComponentHelpers/stepComponentHelpers\";\nimport { FormFooterComponent as FormFooter } from \"../FormFooter/FormFooterComponent\";\n\nimport { EmailComponent as Email } from \"../FormFields/Email/EmailComponent\";\nimport { VerificationStepsEnum } from \"../../lib/types/runtimeTypes\";\nimport { PersonalInfoHeader } from \"../FormHeader/StepHeaders/PersonalInfoHeaderComponent\";\nimport { PersonalInfoStepSubmitButton } from \"../PersonalInfoStepSubmitButton/PersonalInfoStepSubmitButton\";\n\ninterface StepCollectIdentifierProps {\n verificationService: VerificationService;\n}\n\nconst StepCollectIdentifier = ({ verificationService }: StepCollectIdentifierProps) => {\n const viewModel = verificationService.viewModel as CollectIdentifierViewModel;\n const { fieldValidationErrors } = verificationService;\n const verificationResponse = verificationService.verificationResponse as PersonalInfoResponse;\n const failedInstantMatch = hasFailedInstantMatch(verificationResponse);\n\n const updateCollectIdentifierViewmodel = (key: keyof CollectIdentifierViewModel, value: any) => {\n const nextState: CollectIdentifierViewModel = produce(\n viewModel,\n (draft: CollectIdentifierViewModel) => {\n (draft[key] as any) = value;\n },\n );\n verificationService.updateViewModel(nextState);\n };\n\n return (\n <div\n id=\"sid-step-collect-transaction-id\"\n className=\"sid-step-collect-transaction-id-container sid-l-container\"\n >\n <div role=\"main\">\n <PersonalInfoHeader\n verificationService={verificationService}\n classNameIdentifier=\"step-collect-transaction-id\"\n />\n\n <Email\n value={viewModel.email}\n isErrored={!!fieldValidationErrors.email}\n explanation={\n <FormattedHTMLMessage\n id=\"step.collectIdentifier.inputExplanation\"\n defaultMessage=\"Needed to send authentication code\"\n />\n }\n onChange={(newValue) => {\n updateCollectIdentifierViewmodel(\"email\", newValue);\n updateFieldValidationErrorsByFieldId(\"email\", newValue, verificationService);\n }}\n onKeyDown={(event: React.KeyboardEvent<HTMLInputElement>) => handleEmailOnKeyDown(event)}\n />\n\n <PersonalInfoStepSubmitButton\n step={VerificationStepsEnum.collectIdentifier}\n verificationService={verificationService}\n viewModel={viewModel}\n failedInstantMatch={failedInstantMatch}\n buttonText={\n <FormattedHTMLMessage\n id=\"step.personalInfo.submitButtonText\"\n defaultMessage=\"Verify and continue\"\n />\n }\n />\n </div>\n <FormFooter verificationService={verificationService} />\n </div>\n );\n};\n\nexport const StepCollectIdentifierComponent = StepCollectIdentifier;\n"],"names":["StepCollectIdentifier","verificationService","viewModel","fieldValidationErrors","verificationResponse","failedInstantMatch","hasFailedInstantMatch","updateCollectIdentifierViewmodel","key","value","nextState","produce","draft","jsxs","jsx","PersonalInfoHeader","Email","FormattedHTMLMessage","newValue","updateFieldValidationErrorsByFieldId","event","handleEmailOnKeyDown","PersonalInfoStepSubmitButton","VerificationStepsEnum","FormFooter","StepCollectIdentifierComponent"],"mappings":";;AA0BA,MAAMA,IAAwB,CAAC,EAAE,qBAAAC,QAAsD;AAC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AAA,kBACH,gBAAe;AAAA,gBAAA;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAEJ,GACF;AAAA,QACAH,gBAAAA,MAACU,KAAW,qBAAAvB,EAA0C,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACxD;AAEJ,GAEawB,IAAiCzB;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
|
+
*/
|
8
|
+
import { b as f } from "./es6-DHEcq5va.js";
|
9
|
+
export {
|
10
|
+
f as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-DsG0HBM_.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
|
2
|
+
/**
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
|
+
*/
|
8
|
+
import { d as e } from "./es6-DHEcq5va.js";
|
9
|
+
export {
|
10
|
+
e as default
|
11
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index-Dzn1x4Z-.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
2
|
/**
|
3
|
-
* VERSION: 2.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
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-DHEcq5va.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-Mf5QEyne.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,IAAG;AAAA,cACH,gBAAe;AAAA,cACf,SAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACV;AAAA,MACF;AAAA,MAEAF,gBAAAA,EAAAA,IAAC,OAAI,EAAA,WAAU,qBACb,UAAAA,gBAAAA,EAAA;A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AAc,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.108.0-alpha.
|
4
|
-
* BUILD_TIMESTAMP:
|
5
|
-
* BUILD_DATE:
|
6
|
-
* BUILD_COMMIT:
|
3
|
+
* VERSION: 2.108.0-alpha.2
|
4
|
+
* BUILD_TIMESTAMP: 1747259307400
|
5
|
+
* BUILD_DATE: Wed May 14 2025 21:48:27 GMT+0000 (Coordinated Universal Time)
|
6
|
+
* BUILD_COMMIT: 821e5ffe88752cf00bf237eacdbb540d33472a84
|
7
7
|
*/
|
8
|
-
import { ak as V, B as R, V as F, j as a, A as B, u as K, q as O } from "./es6-
|
8
|
+
import { ak as V, B as R, V as F, j as a, A as B, u as K, q as O } from "./es6-DHEcq5va.js";
|
9
9
|
import * as N from "react";
|
10
10
|
import P, { forwardRef as S, useRef as z, useImperativeHandle as U, useEffect as Z } from "react";
|
11
11
|
import { FormattedHTMLMessage as x } from "react-intl";
|