@incodetech/core 2.0.1-rc.0 → 2.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BrowserStorageProvider-CuOW1Er2.esm.js → BrowserStorageProvider-BpJM-gIl.esm.js} +8 -1
- package/dist/{IpifyProvider-D7jx52AL.esm.js → IpifyProvider-D4LWD15E.esm.js} +28 -0
- package/dist/{MotionSensorProvider-4v7xkqAp.esm.js → MotionSensorProvider-Bx7Mpzt0.esm.js} +63 -13
- package/dist/{OpenViduRecordingProvider-CMu6XVdc.esm.js → OpenViduRecordingProvider-O4GjBseO.esm.js} +1 -1
- package/dist/StateMachine-BC_nGvrc.d.ts +2 -0
- package/dist/StreamCanvasCapture-ImiDQdVA.esm.js +118 -0
- package/dist/StreamCanvasCapture-yyl20qd9.d.ts +152 -0
- package/dist/{BaseWasmProvider-C_DLEI40.esm.js → WasmUtilProvider-CiEN7Gjn.esm.js} +183 -11
- package/dist/{addressSearch-BpTbTWCa.esm.js → addressSearch-DvmWXKZg.esm.js} +63 -57
- package/dist/{ae-signature-DDDZmWXj.esm.js → ae-signature-BFZta3TZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +3 -3
- package/dist/ae-signature.esm.js +6 -5
- package/dist/antifraud.d.ts +5 -46
- package/dist/antifraud.esm.js +6 -43
- package/dist/antifraudManager-CkV4u-LE.esm.js +55 -0
- package/dist/antifraudManager-CznnhyvD.d.ts +63 -0
- package/dist/{antifraudStateMachine-O0TMf6yc.esm.js → antifraudStateMachine-Ccrb-Jxc.esm.js} +2 -2
- package/dist/apiError-B-j-gyDx.esm.js +51 -0
- package/dist/authentication.d.ts +13 -11
- package/dist/authentication.esm.js +26 -22
- package/dist/{authenticationManager-C83GNIhl.d.ts → authenticationManager-CIVY80H9.d.ts} +4 -4
- package/dist/{authenticationManager-5M-fKzXx.esm.js → authenticationManager-ZNotsWnC.esm.js} +6 -6
- package/dist/{authenticationStateMachine-BMZqatiF.esm.js → authenticationStateMachine-DksVbF_H.esm.js} +21 -9
- package/dist/{backCameraStream-DMdMeGk2.esm.js → backCameraStream-D7Wo4Nbx.esm.js} +95 -7
- package/dist/{session-CGtQJJzB.esm.js → browserSimulation-B1dWiXp7.esm.js} +61 -476
- package/dist/camera.d.ts +4 -3
- package/dist/camera.esm.js +4 -3
- package/dist/canvas-SKcRBxsk.esm.js +230 -0
- package/dist/consent.d.ts +4 -398
- package/dist/consent.esm.js +6 -77
- package/dist/consentManager-BLd51QiW.d.ts +419 -0
- package/dist/consentManager-BYo9Nu1r.esm.js +90 -0
- package/dist/{consentStateMachine-CCT-B60O.esm.js → consentStateMachine-BG3yL8aC.esm.js} +9 -6
- package/dist/cpf-ocr.d.ts +4 -199
- package/dist/cpf-ocr.esm.js +8 -177
- package/dist/cpfOcrManager-BnieFXuG.d.ts +216 -0
- package/dist/cpfOcrManager-sSKegxox.esm.js +190 -0
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +4 -4
- package/dist/curp-validation.d.ts +8 -158
- package/dist/curp-validation.esm.js +6 -108
- package/dist/curpValidationManager-CFem6zP9.esm.js +122 -0
- package/dist/curpValidationManager-RttixpIc.d.ts +184 -0
- package/dist/{curpValidationStateMachine-CitWLr2c.esm.js → curpValidationStateMachine-B7V_qp66.esm.js} +20 -13
- package/dist/custom-fields.d.ts +2 -2
- package/dist/custom-fields.esm.js +4 -4
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +4 -41
- package/dist/customWatchlistStateMachine-HmFybXLX.esm.js +50 -0
- package/dist/{deepsightLoader-Cm4JIT_z.esm.js → deepsightLoader-65k1Appi.esm.js} +19 -10
- package/dist/{deepsightService-CEVxzehb.d.ts → deepsightService-B7ShOkWL.d.ts} +8 -160
- package/dist/deepsightService-CrHmvx8X.esm.js +276 -0
- package/dist/device.esm.js +4 -3
- package/dist/document-capture.d.ts +992 -83
- package/dist/document-capture.esm.js +34 -8
- package/dist/document-upload.d.ts +47 -47
- package/dist/document-upload.esm.js +7 -7
- package/dist/{documentCaptureStateMachine-BqzTDy9k.esm.js → documentCaptureStateMachine-WYV1r9le.esm.js} +90 -6
- package/dist/dynamic-forms.d.ts +20 -5
- package/dist/dynamic-forms.esm.js +150 -61
- package/dist/ekyb.d.ts +32 -13
- package/dist/ekyb.esm.js +25 -15
- package/dist/{ekybStateMachine-BR2let5f.esm.js → ekybStateMachine-aYixw2sL.esm.js} +319 -207
- package/dist/ekyc.d.ts +10 -78
- package/dist/ekyc.esm.js +17 -12
- package/dist/{ekycStateMachine-oeO0Iekd.esm.js → ekycStateMachine-CXbpaJJn.esm.js} +201 -113
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +5 -4
- package/dist/{electronicSignatureManager-D9OHzTpG.esm.js → electronicSignatureManager-BaECdJ1u.esm.js} +91 -23
- package/dist/email.d.ts +4 -3
- package/dist/email.esm.js +6 -5
- package/dist/{emailManager-wAV0LE-H.esm.js → emailManager--D5G3ChB.esm.js} +30 -7
- package/dist/{emailManager-DIfnS5g1.d.ts → emailManager-lAzDoQOs.d.ts} +66 -8
- package/dist/{emailStateMachine-DOf4j58N.esm.js → emailStateMachine-CxTOMAjC.esm.js} +46 -11
- package/dist/{endpoints-CnN3SyDa.esm.js → endpoints-BeTK0Mlt.esm.js} +6 -3
- package/dist/{events-D6-e4vok.esm.js → events-Dvvriq9l.esm.js} +3 -1
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +32 -16
- package/dist/extensibility.esm.js +55 -33
- package/dist/face-match.d.ts +32 -2
- package/dist/face-match.esm.js +5 -5
- package/dist/{faceCaptureManagerFactory-yqtpxjnN.d.ts → faceCaptureManagerFactory-C_hRHx8a.d.ts} +35 -11
- package/dist/{faceCaptureManagerFactory-Dh2PdGlF.esm.js → faceCaptureManagerFactory-kqbUqtrr.esm.js} +21 -5
- package/dist/{faceCaptureSetup-B3faSpYA.esm.js → faceCaptureSetup-CtvHWd3x.esm.js} +68 -183
- package/dist/{faceMatchStateMachine-DNFrxTFS.esm.js → faceMatchStateMachine-DdGXUBnx.esm.js} +60 -6
- package/dist/field-comparison.d.ts +4 -0
- package/dist/field-comparison.esm.js +7 -0
- package/dist/fieldComparisonManager-Bu5TaSr3.d.ts +76 -0
- package/dist/fieldComparisonManager-COGI2ARD.esm.js +162 -0
- package/dist/fiscal-qr.d.ts +59 -0
- package/dist/fiscal-qr.esm.js +323 -0
- package/dist/flow-events.d.ts +6 -5
- package/dist/flow.d.ts +23 -15
- package/dist/flow.esm.js +63 -17
- package/dist/flowCompletionService-BdR2cGgB.d.ts +19 -0
- package/dist/flowCompletionService-DdGojV9K.esm.js +20 -0
- package/dist/{flowServices-DG3IdWw6.esm.js → flowServices-BTuHLHVr.esm.js} +10 -5
- package/dist/geolocation.d.ts +4 -4
- package/dist/geolocation.esm.js +6 -6
- package/dist/{geolocationStateMachine-asasuHY2.esm.js → geolocationStateMachine-Dvh7X0wF.esm.js} +5 -5
- package/dist/getBrowser-C8DP7oTB.esm.js +8 -0
- package/dist/{getBrowser-BSXUTWXw.esm.js → getDeviceClass-C0olyNFS.esm.js} +1 -8
- package/dist/{getDeviceClass-BSntT9_j.esm.js → getDeviceClass-C8Do2qYu.esm.js} +1 -1
- package/dist/government-validation.d.ts +28 -8
- package/dist/government-validation.esm.js +19 -8
- package/dist/{governmentValidationStateMachine-BDDYrJTo.esm.js → governmentValidationStateMachine-DcJ-BfsC.esm.js} +35 -77
- package/dist/home.d.ts +15 -14
- package/dist/home.esm.js +2 -2
- package/dist/http-Cai3IoLS.esm.js +0 -0
- package/dist/http.esm.js +1 -0
- package/dist/id-ocr.d.ts +54 -54
- package/dist/id-ocr.esm.js +5 -5
- package/dist/id-verification.d.ts +27 -27
- package/dist/id-verification.esm.js +4 -4
- package/dist/id.d.ts +12 -10
- package/dist/id.esm.js +36 -26
- package/dist/{idCaptureManager-Fyd0eam-.d.ts → idCaptureManager-D-QYESvF.d.ts} +28 -14
- package/dist/{idCaptureManager-ZPkD7Gjk.esm.js → idCaptureManager-DGVv5l1_.esm.js} +22 -7
- package/dist/{idCaptureStateMachine-BK0bPHoc.esm.js → idCaptureStateMachine-DHi7HydI.esm.js} +172 -123
- package/dist/{idOcrStateMachine-YbjjC_Gg.esm.js → idOcrStateMachine-CDQ5d_VM.esm.js} +4 -4
- package/dist/{idVerificationStateMachine-xbw9HP1Z.esm.js → idVerificationStateMachine-kRxwImzO.esm.js} +2 -2
- package/dist/identity-reuse.d.ts +4 -530
- package/dist/identity-reuse.esm.js +8 -274
- package/dist/identityReuseManager-C6n_97dw.esm.js +95 -0
- package/dist/identityReuseManager-DwLtVzUn.d.ts +428 -0
- package/dist/identityReuseStateMachine-BfE5YiEr.esm.js +148 -0
- package/dist/{index-BcRG8rtJ.d.ts → index-B5hPA0Bg.d.ts} +2 -2
- package/dist/{index-DZoqeAo9.d.ts → index-B9NysVDB.d.ts} +469 -195
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +10 -8
- package/dist/{invokeOnCaptureCallback-rc6kBHo5.esm.js → invokeOnCaptureCallback-ygByVdnn.esm.js} +1 -1
- package/dist/{lib-BB0B_qQX.esm.js → lib-BY67lgbq.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +8 -412
- package/dist/mandatory-consent.esm.js +6 -76
- package/dist/mandatoryConsentManager-H6D18cZB.esm.js +89 -0
- package/dist/mandatoryConsentManager-KfIlURRY.d.ts +429 -0
- package/dist/{mandatoryConsentStateMachine-Cnco1jvn.esm.js → mandatoryConsentStateMachine-DtQNW1ji.esm.js} +6 -6
- package/dist/openviduLazy-B8L--0oe.esm.js +3 -0
- package/dist/{openviduLazy-Cok70ZSg.esm.js → openviduLazy-Dh14JNJc.esm.js} +2 -2
- package/dist/otp-CGMdUzBC.esm.js +33 -0
- package/dist/otp-DF5A0sFx.d.ts +8 -0
- package/dist/permissionGuards-C1ispV96.esm.js +23 -0
- package/dist/permissionServices-CG3bMSfG.esm.js +130 -0
- package/dist/phone.d.ts +4 -3
- package/dist/phone.esm.js +6 -5
- package/dist/{phoneManager-DAJbGhlY.esm.js → phoneManager-BmF-0Ez4.esm.js} +30 -7
- package/dist/{phoneManager-B6M30hKE.d.ts → phoneManager-fPmIBYQK.d.ts} +65 -7
- package/dist/{phoneStateMachine-CuPARRaT.esm.js → phoneStateMachine-BiV0yoEx.esm.js} +46 -11
- package/dist/{qe-signature-DFo_Cc-I.esm.js → qe-signature-CUYPcHVo.esm.js} +1 -1
- package/dist/qe-signature.d.ts +3 -3
- package/dist/qe-signature.esm.js +6 -5
- package/dist/{recordingService-Ig2UgbLv.esm.js → recordingService-Bn9EdCmz.esm.js} +197 -179
- package/dist/redirect-to-mobile.d.ts +6 -104
- package/dist/redirect-to-mobile.esm.js +6 -99
- package/dist/redirectToMobileManager-BNe3IzC_.d.ts +178 -0
- package/dist/redirectToMobileManager-Dy3t7o0C.esm.js +159 -0
- package/dist/{redirectToMobileStateMachine-BOEqe46A.esm.js → redirectToMobileStateMachine-DyAdRxfP.esm.js} +28 -19
- package/dist/{runChildModule-CqqwqAkW.esm.js → runChildModule-CuoHZ1cx.esm.js} +35 -3
- package/dist/selfie.d.ts +13 -11
- package/dist/selfie.esm.js +27 -23
- package/dist/{selfieManager-Duisl7qN.esm.js → selfieManager-BjCoKRy0.esm.js} +6 -6
- package/dist/{selfieManager-D0lSgd-J.d.ts → selfieManager-dUbKRzOh.d.ts} +4 -4
- package/dist/{selfieStateMachine-D76whWEf.esm.js → selfieStateMachine-b4F2q9zw.esm.js} +5 -3
- package/dist/session-DoVb-OcB.esm.js +152 -0
- package/dist/session.d.ts +37 -5
- package/dist/session.esm.js +12 -7
- package/dist/sessionInitializer-B8H5MsXM.esm.js +366 -0
- package/dist/{setup-C5AITV8m.d.ts → setup-BbkprdVv.d.ts} +57 -6
- package/dist/{setup-DsM8IG7k.esm.js → setup-BqEfrdja.esm.js} +162 -24
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +4 -4
- package/dist/{signatureStateMachine-B5-QVUve.esm.js → signatureStateMachine-C5qqYLRz.esm.js} +3 -3
- package/dist/stats-BMNUG1AU.esm.js +41 -0
- package/dist/stats.d.ts +13 -2
- package/dist/stats.esm.js +3 -2
- package/dist/trust-graph.d.ts +33 -4
- package/dist/trust-graph.esm.js +21 -15
- package/dist/{types-CFV9G_7j.d.ts → types-Bj9hdFjU.d.ts} +1 -1
- package/dist/{types-BP1m8VRw.d.ts → types-DOUhndhT.d.ts} +14 -2
- package/dist/types-DsnEVMhr.esm.js +34 -0
- package/dist/types-DvGZI7BF.d.ts +131 -0
- package/dist/{types-B06Ypu2F.d.ts → types-NuT8ftBV.d.ts} +1 -1
- package/dist/types-ya0LN_MX.d.ts +5 -0
- package/dist/{warmup-CEcppFiS.d.ts → warmup-Dg8Lh-50.d.ts} +8 -0
- package/dist/wasm.d.ts +6 -4
- package/dist/wasm.esm.js +11 -9
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +5 -73
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +4 -41
- package/dist/watchlistForBusinessStateMachine-DMl8j2Ov.esm.js +74 -0
- package/dist/watchlistStateMachine-DmQlqI6L.esm.js +50 -0
- package/dist/workflow.d.ts +153 -100
- package/dist/workflow.esm.js +156 -80
- package/package.json +19 -1
- package/dist/StateMachine-BCQrZJhf.d.ts +0 -2
- package/dist/WasmUtilProvider-j98OJf-S.esm.js +0 -114
- package/dist/browserSimulation-gxD8cSpM.esm.js +0 -20
- package/dist/deepsightService-O74l4Y__.esm.js +0 -489
- package/dist/displayErrors-DqJ_IbsG.d.ts +0 -39
- package/dist/flowCompletionService-DhkT4SRY.d.ts +0 -10
- package/dist/flowCompletionService-P54yzGvA.esm.js +0 -13
- package/dist/openviduLazy-Cm0XFh_v.esm.js +0 -3
- package/dist/permissionServices-D_i6nzEw.esm.js +0 -50
- package/dist/stats-CIfiPzb1.esm.js +0 -16
- package/dist/types-CAD4va6a.d.ts +0 -5
- package/dist/watchlistServices-DMbUhkBX.esm.js +0 -12
- /package/dist/{Actor-CI32dTbG.d.ts → Actor-Y0_Fj-KL.d.ts} +0 -0
- /package/dist/{ITimerCapability-C67ZRskg.esm.js → ITimerCapability-CB0I1Uf2.esm.js} +0 -0
- /package/dist/{Manager-C8PrhBOx.d.ts → Manager-BHn8wH8K.d.ts} +0 -0
- /package/dist/{camera-PA2Ljri3.esm.js → camera-DJWm3V4g.esm.js} +0 -0
- /package/dist/{camera-DBSxa6ML.d.ts → camera-SRBpPq2X.d.ts} +0 -0
- /package/dist/{chunk-CRF6K_H_.esm.js → chunk-CMUKZ2uL.esm.js} +0 -0
- /package/dist/{cpf-PPz2Njto.esm.js → cpf-BRzggV8G.esm.js} +0 -0
- /package/dist/{dateUtils-UoN5xswP.esm.js → dateUtils-AksLQmgV.esm.js} +0 -0
- /package/dist/{platform-CfrjKhmi.esm.js → platform-SKvEfCBh.esm.js} +0 -0
- /package/dist/{xstate.esm-B70JrNqo.esm.js → xstate.esm-C9wncMQa.esm.js} +0 -0
package/dist/phone.esm.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import "./BrowserTimerProvider-DhNc_x02.esm.js";
|
|
2
2
|
import "./api-CESGtpbH.esm.js";
|
|
3
|
-
import "./events-
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import "./xstate.esm-
|
|
6
|
-
import
|
|
7
|
-
import { t as
|
|
3
|
+
import "./events-Dvvriq9l.esm.js";
|
|
4
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
5
|
+
import "./xstate.esm-C9wncMQa.esm.js";
|
|
6
|
+
import "./otp-CGMdUzBC.esm.js";
|
|
7
|
+
import { t as phoneMachine } from "./phoneStateMachine-BiV0yoEx.esm.js";
|
|
8
|
+
import { t as createPhoneManager } from "./phoneManager-BmF-0Ez4.esm.js";
|
|
8
9
|
|
|
9
10
|
export { createPhoneManager, phoneMachine };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
2
|
-
import { c as createManager, s as createActor } from "./xstate.esm-
|
|
3
|
-
import { t as
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Dvvriq9l.esm.js";
|
|
2
|
+
import { c as createManager, s as createActor } from "./xstate.esm-C9wncMQa.esm.js";
|
|
3
|
+
import { t as OTP_CODE_LENGTH } from "./otp-CGMdUzBC.esm.js";
|
|
4
|
+
import { t as phoneMachine } from "./phoneStateMachine-BiV0yoEx.esm.js";
|
|
4
5
|
|
|
5
6
|
//#region src/modules/phone/phoneActor.ts
|
|
6
7
|
function createPhoneActor(options) {
|
|
@@ -114,29 +115,45 @@ function mapState(snapshot) {
|
|
|
114
115
|
phonePrefix: context.phonePrefix,
|
|
115
116
|
prefilledPhone: context.prefilledPhone,
|
|
116
117
|
phoneError: context.phoneError,
|
|
118
|
+
validationErrors: context.validationErrors,
|
|
119
|
+
isValid: Object.keys(context.validationErrors ?? {}).length === 0,
|
|
117
120
|
otpVerification: context.config.otpVerification,
|
|
118
121
|
optinEnabled: context.config.optinEnabled ?? false
|
|
119
122
|
};
|
|
120
123
|
if (typedSnapshot.matches("submitting")) return { status: "submitting" };
|
|
121
|
-
if (typedSnapshot.matches("resendingOtp")) return {
|
|
124
|
+
if (typedSnapshot.matches("resendingOtp")) return {
|
|
125
|
+
status: "resendingOtp",
|
|
126
|
+
otpCode: context.otpCode,
|
|
127
|
+
otpLength: OTP_CODE_LENGTH
|
|
128
|
+
};
|
|
122
129
|
if (typedSnapshot.matches("sendingInitialOtp")) return { status: "sendingInitialOtp" };
|
|
123
130
|
if (typedSnapshot.matches("awaitingOtp")) return {
|
|
124
131
|
status: "awaitingOtp",
|
|
125
132
|
resendTimer: context.resendTimer,
|
|
126
133
|
canResend: !context.resendTimerActive,
|
|
127
|
-
attemptsRemaining: context.attemptsRemaining
|
|
134
|
+
attemptsRemaining: context.attemptsRemaining,
|
|
135
|
+
otpCode: context.otpCode,
|
|
136
|
+
otpLength: OTP_CODE_LENGTH,
|
|
137
|
+
otpValidationErrors: context.otpValidationErrors,
|
|
138
|
+
isOtpValid: Object.keys(context.otpValidationErrors ?? {}).length === 0
|
|
128
139
|
};
|
|
129
140
|
if (typedSnapshot.matches("verifyingOtp")) return {
|
|
130
141
|
status: "verifyingOtp",
|
|
131
142
|
resendTimer: context.resendTimer,
|
|
132
|
-
canResend: !context.resendTimerActive
|
|
143
|
+
canResend: !context.resendTimerActive,
|
|
144
|
+
otpCode: context.otpCode,
|
|
145
|
+
otpLength: OTP_CODE_LENGTH
|
|
133
146
|
};
|
|
134
147
|
if (typedSnapshot.matches("otpError")) return {
|
|
135
148
|
status: "otpError",
|
|
136
149
|
otpError: context.otpError ?? "otp.errorv2",
|
|
137
150
|
attemptsRemaining: context.attemptsRemaining,
|
|
138
151
|
resendTimer: context.resendTimer,
|
|
139
|
-
canResend: !context.resendTimerActive
|
|
152
|
+
canResend: !context.resendTimerActive,
|
|
153
|
+
otpCode: context.otpCode,
|
|
154
|
+
otpLength: OTP_CODE_LENGTH,
|
|
155
|
+
otpValidationErrors: context.otpValidationErrors,
|
|
156
|
+
isOtpValid: Object.keys(context.otpValidationErrors ?? {}).length === 0
|
|
140
157
|
};
|
|
141
158
|
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
142
159
|
if (typedSnapshot.matches("error")) return {
|
|
@@ -157,6 +174,9 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
157
174
|
isValid
|
|
158
175
|
});
|
|
159
176
|
},
|
|
177
|
+
validatePhone() {
|
|
178
|
+
actor.send({ type: "VALIDATE_PHONE" });
|
|
179
|
+
},
|
|
160
180
|
setOptInGranted(granted) {
|
|
161
181
|
actor.send({
|
|
162
182
|
type: "OPT_IN_CHANGED",
|
|
@@ -173,6 +193,9 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
173
193
|
code
|
|
174
194
|
});
|
|
175
195
|
},
|
|
196
|
+
validateOtp() {
|
|
197
|
+
actor.send({ type: "VALIDATE_OTP" });
|
|
198
|
+
},
|
|
176
199
|
submitOtp(code) {
|
|
177
200
|
trackElementClicked?.("submitOtp");
|
|
178
201
|
actor.send({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { t as ActorRefFrom } from "./Actor-
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import { t as ActorRefFrom } from "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import { t as OtpValidationErrors } from "./otp-DF5A0sFx.js";
|
|
3
4
|
|
|
4
5
|
//#region src/modules/phone/types.d.ts
|
|
5
6
|
|
|
@@ -62,6 +63,10 @@ type PhoneConfig = {
|
|
|
62
63
|
*/
|
|
63
64
|
maxOtpAttempts?: number;
|
|
64
65
|
};
|
|
66
|
+
/** Client-side validation errors for the phone input screen, keyed by field. */
|
|
67
|
+
type PhoneValidationErrors = {
|
|
68
|
+
phone?: string;
|
|
69
|
+
};
|
|
65
70
|
//#endregion
|
|
66
71
|
//#region src/modules/phone/phoneStateMachine.d.ts
|
|
67
72
|
|
|
@@ -107,6 +112,10 @@ type PhoneInputtingState = {
|
|
|
107
112
|
phonePrefix: string;
|
|
108
113
|
prefilledPhone?: string;
|
|
109
114
|
phoneError?: string;
|
|
115
|
+
/** Client-side validation errors (e.g. invalid/empty phone). Surfaced on blur and submit. */
|
|
116
|
+
validationErrors?: PhoneValidationErrors;
|
|
117
|
+
/** True iff `validationErrors` is empty. Optimistic semantic: starts true on initial render. */
|
|
118
|
+
isValid: boolean;
|
|
110
119
|
otpVerification?: boolean;
|
|
111
120
|
optinEnabled?: boolean;
|
|
112
121
|
};
|
|
@@ -117,6 +126,10 @@ type PhoneSubmittingState = {
|
|
|
117
126
|
/** OTP is being sent to the phone number on resend */
|
|
118
127
|
type PhoneResendingOtpState = {
|
|
119
128
|
status: 'resendingOtp';
|
|
129
|
+
/** The OTP code entered so far (controlled-input value, kept visible while disabled) */
|
|
130
|
+
otpCode: string;
|
|
131
|
+
/** Expected OTP length (owned by Core) */
|
|
132
|
+
otpLength: number;
|
|
120
133
|
};
|
|
121
134
|
/** OTP is being initialy sent to the phone number */
|
|
122
135
|
type PhoneSendingInitialOtp = {
|
|
@@ -127,22 +140,34 @@ type PhoneSendingInitialOtp = {
|
|
|
127
140
|
* @property resendTimer - Seconds remaining before resend is allowed
|
|
128
141
|
* @property canResend - Whether the resend button should be enabled
|
|
129
142
|
* @property attemptsRemaining - Number of OTP verification attempts left
|
|
143
|
+
* @property otpCode - The OTP code entered so far (controlled-input value)
|
|
144
|
+
* @property otpLength - Expected OTP length (owned by Core; the UI should not hardcode it)
|
|
145
|
+
* @property otpValidationErrors - Client-side OTP errors (e.g. incomplete code). Surfaced on blur and submit.
|
|
146
|
+
* @property isOtpValid - True iff `otpValidationErrors` is empty. Optimistic semantic: starts true.
|
|
130
147
|
*/
|
|
131
148
|
type PhoneAwaitingOtpState = {
|
|
132
149
|
status: 'awaitingOtp';
|
|
133
150
|
resendTimer: number;
|
|
134
151
|
canResend: boolean;
|
|
135
152
|
attemptsRemaining: number;
|
|
153
|
+
otpCode: string;
|
|
154
|
+
otpLength: number;
|
|
155
|
+
otpValidationErrors?: OtpValidationErrors;
|
|
156
|
+
isOtpValid: boolean;
|
|
136
157
|
};
|
|
137
158
|
/**
|
|
138
159
|
* OTP code is being verified against the backend
|
|
139
160
|
* @property resendTimer - Seconds remaining on resend cooldown (unchanged while verifying)
|
|
140
161
|
* @property canResend - Whether resend is allowed (cooldown finished)
|
|
162
|
+
* @property otpCode - The code being verified (controlled-input value, kept visible while disabled)
|
|
163
|
+
* @property otpLength - Expected OTP length (owned by Core)
|
|
141
164
|
*/
|
|
142
165
|
type PhoneVerifyingOtpState = {
|
|
143
166
|
status: 'verifyingOtp';
|
|
144
167
|
resendTimer: number;
|
|
145
168
|
canResend: boolean;
|
|
169
|
+
otpCode: string;
|
|
170
|
+
otpLength: number;
|
|
146
171
|
};
|
|
147
172
|
/**
|
|
148
173
|
* OTP verification failed - user can retry with `submitOtp()`
|
|
@@ -150,6 +175,10 @@ type PhoneVerifyingOtpState = {
|
|
|
150
175
|
* @property attemptsRemaining - Number of remaining attempts before lockout
|
|
151
176
|
* @property resendTimer - Seconds remaining on resend cooldown (same as awaiting OTP)
|
|
152
177
|
* @property canResend - Whether resend is allowed (cooldown finished)
|
|
178
|
+
* @property otpCode - The OTP code entered so far (controlled-input value)
|
|
179
|
+
* @property otpLength - Expected OTP length (owned by Core)
|
|
180
|
+
* @property otpValidationErrors - Client-side OTP errors (e.g. incomplete code). Server `otpError` takes precedence in the UI.
|
|
181
|
+
* @property isOtpValid - True iff `otpValidationErrors` is empty. Optimistic semantic: starts true.
|
|
153
182
|
*/
|
|
154
183
|
type PhoneOtpErrorState = {
|
|
155
184
|
status: 'otpError';
|
|
@@ -157,6 +186,10 @@ type PhoneOtpErrorState = {
|
|
|
157
186
|
attemptsRemaining: number;
|
|
158
187
|
resendTimer: number;
|
|
159
188
|
canResend: boolean;
|
|
189
|
+
otpCode: string;
|
|
190
|
+
otpLength: number;
|
|
191
|
+
otpValidationErrors?: OtpValidationErrors;
|
|
192
|
+
isOtpValid: boolean;
|
|
160
193
|
};
|
|
161
194
|
/** Phone verification completed successfully */
|
|
162
195
|
type PhoneFinishedState = {
|
|
@@ -248,6 +281,11 @@ declare function createPhoneManager(options: CreatePhoneActorOptions): Manager<P
|
|
|
248
281
|
* ```
|
|
249
282
|
*/
|
|
250
283
|
setPhoneNumber(phone: string, isValid: boolean): void;
|
|
284
|
+
/**
|
|
285
|
+
* Validates the current phone number (e.g., on blur).
|
|
286
|
+
* Populates or clears `validationErrors.phone` on the 'inputting' state.
|
|
287
|
+
*/
|
|
288
|
+
validatePhone(): void;
|
|
251
289
|
/**
|
|
252
290
|
* Sets the marketing opt-in preference.
|
|
253
291
|
* Only relevant if `config.optinEnabled` is true.
|
|
@@ -257,8 +295,9 @@ declare function createPhoneManager(options: CreatePhoneActorOptions): Manager<P
|
|
|
257
295
|
setOptInGranted(granted: boolean): void;
|
|
258
296
|
/**
|
|
259
297
|
* Submits the phone number for verification.
|
|
260
|
-
*
|
|
261
|
-
*
|
|
298
|
+
* Runs full validation first: if the phone is empty or invalid, populates
|
|
299
|
+
* `validationErrors` and stays on 'inputting'; otherwise transitions to
|
|
300
|
+
* 'submitting', then to 'sendingInitialOtp' or 'finished' (if no OTP).
|
|
262
301
|
*/
|
|
263
302
|
submit(): void;
|
|
264
303
|
/**
|
|
@@ -268,6 +307,12 @@ declare function createPhoneManager(options: CreatePhoneActorOptions): Manager<P
|
|
|
268
307
|
* @param code - The OTP code entered by the user
|
|
269
308
|
*/
|
|
270
309
|
setOtpCode(code: string): void;
|
|
310
|
+
/**
|
|
311
|
+
* Validates the current OTP code (e.g. on blur), without submitting.
|
|
312
|
+
* Populates or clears `otpValidationErrors.otp` on the 'awaitingOtp' /
|
|
313
|
+
* 'otpError' states (incomplete code → `isOtpValid` becomes false).
|
|
314
|
+
*/
|
|
315
|
+
validateOtp(): void;
|
|
271
316
|
/**
|
|
272
317
|
* Sets and submits the OTP code in one call.
|
|
273
318
|
* Should be called when state is 'awaitingOtp' or 'otpError'.
|
|
@@ -323,6 +368,11 @@ declare function createPhoneManagerFromActor(actor: PhoneActor): Manager<PhoneSt
|
|
|
323
368
|
* ```
|
|
324
369
|
*/
|
|
325
370
|
setPhoneNumber(phone: string, isValid: boolean): void;
|
|
371
|
+
/**
|
|
372
|
+
* Validates the current phone number (e.g., on blur).
|
|
373
|
+
* Populates or clears `validationErrors.phone` on the 'inputting' state.
|
|
374
|
+
*/
|
|
375
|
+
validatePhone(): void;
|
|
326
376
|
/**
|
|
327
377
|
* Sets the marketing opt-in preference.
|
|
328
378
|
* Only relevant if `config.optinEnabled` is true.
|
|
@@ -332,8 +382,9 @@ declare function createPhoneManagerFromActor(actor: PhoneActor): Manager<PhoneSt
|
|
|
332
382
|
setOptInGranted(granted: boolean): void;
|
|
333
383
|
/**
|
|
334
384
|
* Submits the phone number for verification.
|
|
335
|
-
*
|
|
336
|
-
*
|
|
385
|
+
* Runs full validation first: if the phone is empty or invalid, populates
|
|
386
|
+
* `validationErrors` and stays on 'inputting'; otherwise transitions to
|
|
387
|
+
* 'submitting', then to 'sendingInitialOtp' or 'finished' (if no OTP).
|
|
337
388
|
*/
|
|
338
389
|
submit(): void;
|
|
339
390
|
/**
|
|
@@ -343,6 +394,12 @@ declare function createPhoneManagerFromActor(actor: PhoneActor): Manager<PhoneSt
|
|
|
343
394
|
* @param code - The OTP code entered by the user
|
|
344
395
|
*/
|
|
345
396
|
setOtpCode(code: string): void;
|
|
397
|
+
/**
|
|
398
|
+
* Validates the current OTP code (e.g. on blur), without submitting.
|
|
399
|
+
* Populates or clears `otpValidationErrors.otp` on the 'awaitingOtp' /
|
|
400
|
+
* 'otpError' states (incomplete code → `isOtpValid` becomes false).
|
|
401
|
+
*/
|
|
402
|
+
validateOtp(): void;
|
|
346
403
|
/**
|
|
347
404
|
* Sets and submits the OTP code in one call.
|
|
348
405
|
* Should be called when state is 'awaitingOtp' or 'otpError'.
|
|
@@ -387,6 +444,7 @@ declare function createPhoneManagerFromActor(actor: PhoneActor): Manager<PhoneSt
|
|
|
387
444
|
* @property setOptInGranted - Sets marketing opt-in preference
|
|
388
445
|
* @property submit - Submits the phone number
|
|
389
446
|
* @property setOtpCode - Sets OTP code without submitting
|
|
447
|
+
* @property validateOtp - Validates the current OTP (e.g. on blur)
|
|
390
448
|
* @property submitOtp - Sets and submits OTP code
|
|
391
449
|
* @property resendOtp - Requests new OTP code
|
|
392
450
|
* @property back - Returns to phone input from OTP screen
|
|
@@ -394,4 +452,4 @@ declare function createPhoneManagerFromActor(actor: PhoneActor): Manager<PhoneSt
|
|
|
394
452
|
*/
|
|
395
453
|
type PhoneManager = ReturnType<typeof createPhoneManager>;
|
|
396
454
|
//#endregion
|
|
397
|
-
export {
|
|
455
|
+
export { PhoneActor as a, createPhoneManagerFromActor as i, PhoneState as n, phoneMachine as o, createPhoneManager as r, PhoneConfig as s, PhoneManager as t };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-DhNc_x02.esm.js";
|
|
2
2
|
import { t as api } from "./api-CESGtpbH.esm.js";
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import { a as fromPromise, i as fromCallback, r as assign, t as setup } from "./xstate.esm-
|
|
3
|
+
import { t as endpoints } from "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import { a as fromPromise, i as fromCallback, r as assign, t as setup } from "./xstate.esm-C9wncMQa.esm.js";
|
|
5
|
+
import { n as computeOtpValidationErrors, r as isOtpComplete } from "./otp-CGMdUzBC.esm.js";
|
|
5
6
|
|
|
6
7
|
//#region src/modules/phone/phoneServices.ts
|
|
7
8
|
function getPhoneServerFailureReason(error, invalidStatus) {
|
|
@@ -60,6 +61,10 @@ function getErrorMessage(error) {
|
|
|
60
61
|
if (error instanceof Error) return error.message;
|
|
61
62
|
return String(error);
|
|
62
63
|
}
|
|
64
|
+
function computePhoneValidationErrors(context) {
|
|
65
|
+
if (context.phone.trim().length === 0 || !context.isValid) return { phone: "invalidPhone" };
|
|
66
|
+
return {};
|
|
67
|
+
}
|
|
63
68
|
const phoneMachine = setup({
|
|
64
69
|
types: {
|
|
65
70
|
context: {},
|
|
@@ -122,9 +127,18 @@ const phoneMachine = setup({
|
|
|
122
127
|
return {
|
|
123
128
|
phone: e.phone,
|
|
124
129
|
isValid: e.isValid,
|
|
125
|
-
phoneError: void 0
|
|
130
|
+
phoneError: void 0,
|
|
131
|
+
validationErrors: void 0
|
|
126
132
|
};
|
|
127
133
|
}),
|
|
134
|
+
validatePhoneField: assign(({ context }) => {
|
|
135
|
+
const errors = computePhoneValidationErrors(context);
|
|
136
|
+
return { validationErrors: errors.phone ? errors : void 0 };
|
|
137
|
+
}),
|
|
138
|
+
computeValidationResult: assign(({ context }) => {
|
|
139
|
+
const errors = computePhoneValidationErrors(context);
|
|
140
|
+
return { validationErrors: errors.phone ? errors : void 0 };
|
|
141
|
+
}),
|
|
128
142
|
setPhoneError: assign(({ event }) => ({ phoneError: getErrorMessage(event.error) })),
|
|
129
143
|
setOptInGranted: assign(({ event }) => ({ optInGranted: event.granted })),
|
|
130
144
|
setError: assign(({ event }) => ({ error: getErrorMessage(event.error) })),
|
|
@@ -132,8 +146,13 @@ const phoneMachine = setup({
|
|
|
132
146
|
clearPhoneError: assign({ phoneError: () => void 0 }),
|
|
133
147
|
setOtpCode: assign(({ event }) => ({
|
|
134
148
|
otpCode: event.code,
|
|
135
|
-
otpError: void 0
|
|
149
|
+
otpError: void 0,
|
|
150
|
+
otpValidationErrors: void 0
|
|
136
151
|
})),
|
|
152
|
+
validateOtpField: assign(({ context }) => {
|
|
153
|
+
const errors = computeOtpValidationErrors(context.otpCode);
|
|
154
|
+
return { otpValidationErrors: errors.otp ? errors : void 0 };
|
|
155
|
+
}),
|
|
137
156
|
setOtpError: assign(({ context, event }) => ({
|
|
138
157
|
otpError: getErrorMessage(event.error),
|
|
139
158
|
attemptsRemaining: context.attemptsRemaining - 1
|
|
@@ -141,7 +160,8 @@ const phoneMachine = setup({
|
|
|
141
160
|
setOtpRequestError: assign(({ event }) => ({ otpError: getErrorMessage(event.error) })),
|
|
142
161
|
clearOtpError: assign({
|
|
143
162
|
otpError: () => void 0,
|
|
144
|
-
otpCode: () => ""
|
|
163
|
+
otpCode: () => "",
|
|
164
|
+
otpValidationErrors: () => void 0
|
|
145
165
|
}),
|
|
146
166
|
startResendTimer: assign({
|
|
147
167
|
resendTimer: () => RESEND_TIMER_SECONDS,
|
|
@@ -159,6 +179,7 @@ const phoneMachine = setup({
|
|
|
159
179
|
phone: "",
|
|
160
180
|
isValid: false,
|
|
161
181
|
phoneError: void 0,
|
|
182
|
+
validationErrors: void 0,
|
|
162
183
|
countryCode: "",
|
|
163
184
|
phonePrefix: "",
|
|
164
185
|
prefilledPhone: void 0,
|
|
@@ -167,6 +188,7 @@ const phoneMachine = setup({
|
|
|
167
188
|
error: void 0,
|
|
168
189
|
otpCode: "",
|
|
169
190
|
otpError: void 0,
|
|
191
|
+
otpValidationErrors: void 0,
|
|
170
192
|
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
171
193
|
resendTimer: 0,
|
|
172
194
|
resendTimerActive: false
|
|
@@ -175,8 +197,9 @@ const phoneMachine = setup({
|
|
|
175
197
|
guards: {
|
|
176
198
|
hasPrefill: ({ context }) => context.config.prefill,
|
|
177
199
|
hasOtpVerification: ({ context }) => context.config.otpVerification,
|
|
178
|
-
|
|
200
|
+
hasNoValidationErrors: ({ context }) => !context.validationErrors || Object.keys(context.validationErrors).length === 0,
|
|
179
201
|
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 1,
|
|
202
|
+
hasCompleteOtp: ({ context }) => isOtpComplete(context.otpCode),
|
|
180
203
|
canResend: ({ context }) => !context.resendTimerActive
|
|
181
204
|
}
|
|
182
205
|
}).createMachine({
|
|
@@ -187,6 +210,7 @@ const phoneMachine = setup({
|
|
|
187
210
|
phone: "",
|
|
188
211
|
isValid: false,
|
|
189
212
|
phoneError: void 0,
|
|
213
|
+
validationErrors: void 0,
|
|
190
214
|
countryCode: "",
|
|
191
215
|
phonePrefix: "",
|
|
192
216
|
prefilledPhone: void 0,
|
|
@@ -195,6 +219,7 @@ const phoneMachine = setup({
|
|
|
195
219
|
error: void 0,
|
|
196
220
|
otpCode: "",
|
|
197
221
|
otpError: void 0,
|
|
222
|
+
otpValidationErrors: void 0,
|
|
198
223
|
attemptsRemaining: input.config.maxOtpAttempts ?? 3,
|
|
199
224
|
resendTimer: 0,
|
|
200
225
|
resendTimerActive: false
|
|
@@ -225,12 +250,17 @@ const phoneMachine = setup({
|
|
|
225
250
|
inputting: { on: {
|
|
226
251
|
PHONE_CHANGED: { actions: "setPhone" },
|
|
227
252
|
OPT_IN_CHANGED: { actions: "setOptInGranted" },
|
|
228
|
-
|
|
253
|
+
VALIDATE_PHONE: { actions: "validatePhoneField" },
|
|
254
|
+
SUBMIT: { target: "validatingSubmit" }
|
|
255
|
+
} },
|
|
256
|
+
validatingSubmit: {
|
|
257
|
+
entry: "computeValidationResult",
|
|
258
|
+
always: [{
|
|
259
|
+
guard: "hasNoValidationErrors",
|
|
229
260
|
target: "submitting",
|
|
230
|
-
guard: "isValidPhone",
|
|
231
261
|
actions: "clearPhoneError"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
262
|
+
}, { target: "inputting" }]
|
|
263
|
+
},
|
|
234
264
|
submitting: { invoke: {
|
|
235
265
|
id: "submitPhone",
|
|
236
266
|
src: "submitPhone",
|
|
@@ -281,7 +311,11 @@ const phoneMachine = setup({
|
|
|
281
311
|
on: {
|
|
282
312
|
TICK: { actions: "tickResendTimer" },
|
|
283
313
|
OTP_CHANGED: { actions: "setOtpCode" },
|
|
284
|
-
|
|
314
|
+
VALIDATE_OTP: { actions: "validateOtpField" },
|
|
315
|
+
VERIFY_OTP: [{
|
|
316
|
+
guard: "hasCompleteOtp",
|
|
317
|
+
target: "verifyingOtp"
|
|
318
|
+
}, { actions: "validateOtpField" }],
|
|
285
319
|
RESEND_OTP: {
|
|
286
320
|
target: "resendingOtp",
|
|
287
321
|
guard: "canResend"
|
|
@@ -332,6 +366,7 @@ const phoneMachine = setup({
|
|
|
332
366
|
target: "awaitingOtp",
|
|
333
367
|
actions: "setOtpCode"
|
|
334
368
|
},
|
|
369
|
+
VALIDATE_OTP: { actions: "validateOtpField" },
|
|
335
370
|
RESEND_OTP: {
|
|
336
371
|
target: "resendingOtp",
|
|
337
372
|
guard: "canResend"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createElectronicSignatureManager } from "./electronicSignatureManager-
|
|
1
|
+
import { t as createElectronicSignatureManager } from "./electronicSignatureManager-BaECdJ1u.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region src/modules/qe-signature/index.ts
|
|
4
4
|
function createQeSignatureManager(options) {
|
package/dist/qe-signature.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-
|
|
1
|
+
import { t as Manager } from "./Manager-BHn8wH8K.js";
|
|
2
|
+
import "./Actor-Y0_Fj-KL.js";
|
|
3
|
+
import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-B9NysVDB.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/qe-signature/index.d.ts
|
|
6
6
|
|
package/dist/qe-signature.esm.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import "./api-CESGtpbH.esm.js";
|
|
2
|
-
import "./events-
|
|
3
|
-
import "./endpoints-
|
|
4
|
-
import "./xstate.esm-
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
2
|
+
import "./events-Dvvriq9l.esm.js";
|
|
3
|
+
import "./endpoints-BeTK0Mlt.esm.js";
|
|
4
|
+
import "./xstate.esm-C9wncMQa.esm.js";
|
|
5
|
+
import "./apiError-B-j-gyDx.esm.js";
|
|
6
|
+
import { a as areAllConsented, i as QE_CONSENT_KEYS, n as electronicSignatureMachine, s as getDefaultConsentChecks } from "./electronicSignatureManager-BaECdJ1u.esm.js";
|
|
7
|
+
import { t as createQeSignatureManager } from "./qe-signature-CUYPcHVo.esm.js";
|
|
7
8
|
|
|
8
9
|
export { QE_CONSENT_KEYS, areAllConsented, createQeSignatureManager, getDefaultConsentChecks, electronicSignatureMachine as qeSignatureMachine };
|