@incodetech/core 2.5.0-rc.6 → 2.5.0-rc.8
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/{FaceDetectionProvider-CyJw0IsP.esm.js → FaceDetectionProvider-CH8q7pdG.esm.js} +7 -7
- package/dist/{addressSearch-BGHyclUd.esm.js → addressSearch-BTo2kH5N.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CE2Cxfqy.esm.js → antifraudManager-TwVzUgUe.esm.js} +3 -3
- package/dist/{antifraudStateMachine-BpeuH5Wx.esm.js → antifraudStateMachine-CFkvyDFG.esm.js} +1 -1
- package/dist/{api-BMLJdwd_.esm.js → api-jplFqPcE.esm.js} +2 -0
- package/dist/{apiError-DRTHDDhm.esm.js → apiError-BRqZjDN7.esm.js} +1 -1
- package/dist/{attemptCarry-Dp2xFl7A.esm.js → attemptCarry-Dew-8qhm.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-9ONStCgT.esm.js → authenticationManager-D2Tc1zUZ.esm.js} +5 -5
- package/dist/{authenticationManager-DWFnFadt.d.ts → authenticationManager-D65y6VFI.d.ts} +1 -1
- package/dist/{authenticationStateMachine-C5x183J5.esm.js → authenticationStateMachine-DptfsNO0.esm.js} +3 -3
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-BQ74_sGE.esm.js → certificateIssuanceManager-CfKhx7Uk.esm.js} +3 -3
- package/dist/{certificateIssuanceStateMachine-Cm3b9OoM.esm.js → certificateIssuanceStateMachine-4NpYY6ct.esm.js} +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-DEC34vhb.esm.js → consentManager-BaQJnQ8U.esm.js} +3 -3
- package/dist/{consentManager-Bx_osBME.d.ts → consentManager-DlvhoJYc.d.ts} +5 -5
- package/dist/{consentStateMachine-D0Nh_LD7.esm.js → consentStateMachine-Bl6TbzJW.esm.js} +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-BHRsIIYY.esm.js → crossDocumentDataMatchManager-DhrMB_iS.esm.js} +3 -3
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-nIJpoMnT.esm.js → curpValidationManager-DYfD1Res.esm.js} +3 -3
- package/dist/{curpValidationManager-Ci2iVuog.d.ts → curpValidationManager-DgUZySoq.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-4MAvdROS.esm.js → curpValidationStateMachine-Bv_PYQq8.esm.js} +2 -2
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-BGCfq1Z3.esm.js → customFieldsManager-BYw2qjWs.esm.js} +3 -3
- package/dist/{customWatchlistManager-B5rEcjyh.esm.js → customWatchlistManager-BMG12VEa.esm.js} +3 -3
- package/dist/{customWatchlistStateMachine-5DmmGqzB.esm.js → customWatchlistStateMachine-BuooJa9X.esm.js} +1 -1
- package/dist/{deepsightLoader-RG59l8ri.esm.js → deepsightLoader-BLUSJ6NH.esm.js} +3 -3
- package/dist/{desktopCameraElection-h7SmDXmW.esm.js → desktopCameraElection-_aIttlzU.esm.js} +1 -1
- package/dist/document-capture.d.ts +1 -1
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.d.ts +123 -0
- package/dist/document-signature.esm.js +149 -0
- package/dist/{documentCaptureManager-DODC4eUX.esm.js → documentCaptureManager-B3ZH-_GY.esm.js} +3 -3
- package/dist/{documentCaptureManager-BZBmcOKI.d.ts → documentCaptureManager-Dd3T6bcs.d.ts} +4 -4
- package/dist/{documentCaptureStateMachine-B4CPAJrT.esm.js → documentCaptureStateMachine-CnKVcxV1.esm.js} +2 -2
- package/dist/documentSignatureStateMachine-CYQWjdU3.esm.js +219 -0
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-8zrLS2Ck.esm.js → dynamicFormsManager-DnVJqyQU.esm.js} +3 -3
- package/dist/{dynamicFormsStateMachine-CK3zL3iS.esm.js → dynamicFormsStateMachine-dYN65J5x.esm.js} +2 -2
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +2 -2
- package/dist/{ekybManager-DDP5IaHY.esm.js → ekybManager-DrfIdHZB.esm.js} +3 -3
- package/dist/{ekybStateMachine-BD0CIuRz.esm.js → ekybStateMachine-HSwsgyB6.esm.js} +3 -3
- package/dist/ekyc-prefill.d.ts +1 -1
- package/dist/ekyc-prefill.esm.js +2 -2
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-DWuONuie.esm.js → ekycManager-DeocHrn-.esm.js} +3 -3
- package/dist/{ekycPrefillManager-CTWhBVoN.esm.js → ekycPrefillManager-BwRgcrQy.esm.js} +1 -1
- package/dist/{ekycPrefillManager-BQ_KKUv5.d.ts → ekycPrefillManager-DY3f44kC.d.ts} +26 -26
- package/dist/{ekycPrefillStateMachine-r8bL9KfD.esm.js → ekycPrefillStateMachine-CaLE_Fjo.esm.js} +2 -2
- package/dist/{ekycStateMachine-BsclGsmE.esm.js → ekycStateMachine-mB4i5_03.esm.js} +2 -2
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-B3-sH5IC.esm.js → electronicSignatureManager-D9V5lHkF.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-DJfqy42G.esm.js → emailManager-CFPz1wdm.esm.js} +3 -3
- package/dist/{emailStateMachine-Ba4dmk3l.esm.js → emailStateMachine-_fNnmAC7.esm.js} +2 -2
- package/dist/{events-C2lGiIT1.esm.js → events-C3sjvrjL.esm.js} +2 -2
- package/dist/events.d.ts +1 -0
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +14 -14
- package/dist/extensibility.esm.js +35 -35
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-BJS2Tnx-.esm.js → faceCaptureManagerFactory-THEBUUb4.esm.js} +3 -3
- package/dist/{faceCaptureManagerFactory-DLFzd1nq.d.ts → faceCaptureManagerFactory-lVe9Pv_9.d.ts} +3 -3
- package/dist/{faceCaptureSetup-Bhz8lwW7.esm.js → faceCaptureSetup-C7XsAZnn.esm.js} +9 -9
- package/dist/{faceMatchManager-BFLHLTGE.esm.js → faceMatchManager-k87nK4mq.esm.js} +3 -3
- package/dist/{faceMatchStateMachine-Bjjv_w-a.esm.js → faceMatchStateMachine-C4jjFiCT.esm.js} +2 -2
- package/dist/{feature-management-C3QneguW.esm.js → feature-management-m4UsSUwN.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CPQEHk24.esm.js → fieldComparisonManager-ZUiwGMJc.esm.js} +3 -3
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Ej11Z_Qk.esm.js → fiscalQrManager-CldPP6Os.esm.js} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +5 -5
- package/dist/flow.esm.js +5 -5
- package/dist/{flowCompletionService-BlZf2S4D.esm.js → flowCompletionService-BuJ1oerY.esm.js} +2 -2
- package/dist/{flowServices-ebGF4q88.esm.js → flowServices-GF1eHOjk.esm.js} +7 -7
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-BiT8y5PE.esm.js → geolocationManager-Clz4mC3u.esm.js} +3 -3
- package/dist/{geolocationManager-CENrvxpK.d.ts → geolocationManager-Del2ddmt.d.ts} +1 -1
- package/dist/{geolocationStateMachine-DgXn12M8.esm.js → geolocationStateMachine-B2BPALvl.esm.js} +3 -3
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-Dr5zg44a.esm.js → governmentValidationManager-B4ArAcGg.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-BmgcBddx.esm.js → governmentValidationStateMachine-axGh-8TD.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +2 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +6 -6
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureManager-DBVw9Etw.d.ts → idCaptureManager-DkDj5gHx.d.ts} +2 -2
- package/dist/{idCaptureManager-kdke1gtm.esm.js → idCaptureManager-omn5pr7y.esm.js} +7 -7
- package/dist/{idCaptureServices-D-agq_ax.esm.js → idCaptureServices-wLZw-q26.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-B0AxoQow.esm.js → idCaptureStateMachine-DKRg-Ufl.esm.js} +14 -14
- package/dist/{idOcrManager-CUqaGVGx.esm.js → idOcrManager-BNKDn2kw.esm.js} +3 -3
- package/dist/{idOcrManager-CNGVEZ7B.d.ts → idOcrManager-C3BHGgSb.d.ts} +1 -1
- package/dist/{idOcrStateMachine-8PmK-51A.esm.js → idOcrStateMachine-Cu0mWUbo.esm.js} +1 -1
- package/dist/{idVerificationManager-BCJSTVib.esm.js → idVerificationManager-BOtnxdC3.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-XRiYohGp.esm.js → idVerificationStateMachine-B8eWoP7-.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.esm.js +2 -2
- package/dist/{identityReuseManager-BX6Xwekg.esm.js → identityReuseManager-BJye1oP7.esm.js} +3 -3
- package/dist/{identityReuseManager-D_jiHp1n.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +4 -4
- package/dist/{identityReuseStateMachine-X1jzn8C5.esm.js → identityReuseStateMachine-Dt8zs3Qj.esm.js} +1 -1
- package/dist/{index-DxYNO94y.d.ts → index-C0WIMlJE.d.ts} +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-lXP41N7b.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-DjrU0M3B.esm.js → kybChecksManager-10l2WR2F.esm.js} +1 -1
- package/dist/{kybChecksStateMachine-DYphplJy.esm.js → kybChecksStateMachine-C1RFwtON.esm.js} +2 -2
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-H7bI8hDD.d.ts → mandatoryConsentManager-BGGbTEwN.d.ts} +6 -6
- package/dist/{mandatoryConsentManager-FKRF94TQ.esm.js → mandatoryConsentManager-DN1AwCQx.esm.js} +3 -3
- package/dist/{mandatoryConsentStateMachine-CSF03QyH.esm.js → mandatoryConsentStateMachine-CLQm6Ad-.esm.js} +1 -1
- package/dist/{multipartRecordingService-UQ06vyEa.esm.js → multipartRecordingService-DmBEbIol.esm.js} +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-xOrux05n.esm.js → phoneManager-Dbwc_IFU.esm.js} +3 -3
- package/dist/{phoneServices-3DueJr0O.esm.js → phoneServices-DX65S3qe.esm.js} +1 -1
- package/dist/{phoneStateMachine-Bn9WlZnH.esm.js → phoneStateMachine-Bpy7TZWN.esm.js} +2 -2
- package/dist/{processFaceMatch-BwjIWIbi.esm.js → processFaceMatch-BSCDDCky.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-DE9YedlD.esm.js → recordingService-CAKIalaG.esm.js} +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-PWuwwVbb.esm.js → redirectToMobileManager-f8V6eC1M.esm.js} +3 -3
- package/dist/{redirectToMobileStateMachine-DHpg32uO.esm.js → redirectToMobileStateMachine-lXoxB7XV.esm.js} +1 -1
- package/dist/{runChildModule-BH_gn9m0.esm.js → runChildModule-y6ly8qGX.esm.js} +2 -2
- package/dist/{sdkVersion-CF6EnSdD.esm.js → sdkVersion-F_L7hmUd.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-XE4MAZtM.esm.js → selfieErrorUtils-5bJxFzd6.esm.js} +1 -1
- package/dist/{selfieManager-DYsXvWXe.esm.js → selfieManager-C1w36k0m.esm.js} +5 -5
- package/dist/{selfieManager-CvWeyYup.d.ts → selfieManager-DoRM58fT.d.ts} +1 -1
- package/dist/{selfieStateMachine-sA0CAdEh.esm.js → selfieStateMachine-Br2Bj55v.esm.js} +3 -3
- package/dist/{session-BlQhABCI.esm.js → session-DZ6V1DTE.esm.js} +4 -4
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-CyNOMKjP.esm.js → sessionInitializer-_Sh4CabE.esm.js} +7 -7
- package/dist/{setup-Dn7aLuAf.esm.js → setup-DHhq4hrm.esm.js} +8 -8
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-DIXqYmUN.esm.js → signatureManager-Cvee768u.esm.js} +3 -3
- package/dist/{signatureStateMachine-B7yC0mK9.esm.js → signatureStateMachine-CVv3ZeY5.esm.js} +1 -1
- package/dist/{stats-ummJank2.esm.js → stats-BYIXomqT.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{trueSightService-CGd9xhHT.esm.js → trueSightService-DOho-FEV.esm.js} +5 -4
- package/dist/trust-graph.esm.js +2 -2
- package/dist/{types-Ddc4Tr_f.d.ts → types-B2DGXHe6.d.ts} +2 -0
- package/dist/types-BNkzXOXE.d.ts +45 -0
- package/dist/{types-DJPU3W2M.d.ts → types-BkWUNheX.d.ts} +1 -1
- package/dist/types-C2uJrJrS.d.ts +6 -0
- package/dist/{types-DYYMdAGv.esm.js → types-CBQN04Rh.esm.js} +2 -1
- package/dist/{types-DFP7eSle.d.ts → types-Crg7oL-l.d.ts} +1 -1
- package/dist/{types-CYrtpEe5.d.ts → types-DqCEOLF8.d.ts} +1 -1
- package/dist/{types-BRmwbyAu.d.ts → types-x5MQKskR.d.ts} +1 -1
- package/dist/video-selfie.d.ts +1 -1
- package/dist/video-selfie.esm.js +6 -6
- package/dist/{videoSelfieCameraWarmer-B7HwT-tE.esm.js → videoSelfieCameraWarmer-B15TIhId.esm.js} +4 -4
- package/dist/{videoSelfieStepDetector-DStjqQQm.d.ts → videoSelfieStepDetector-CYvhxbG2.d.ts} +2 -2
- package/dist/wasm.esm.js +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CCzx7A5X.esm.js → watchlistForBusinessManager-B3CoCZlU.esm.js} +3 -3
- package/dist/{watchlistForBusinessStateMachine-DPS6rkl6.esm.js → watchlistForBusinessStateMachine-ClSxGCmw.esm.js} +1 -1
- package/dist/{watchlistManager-DDMrwI-3.esm.js → watchlistManager-X0oD_RE9.esm.js} +3 -3
- package/dist/{watchlistStateMachine-BuJHQJ_p.esm.js → watchlistStateMachine-DubBSexb.esm.js} +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +39 -37
- package/package.json +6 -1
- package/dist/types-Bc1-m6MR.d.ts +0 -6
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
|
|
3
|
+
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
4
|
+
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
|
+
import { a as hasReadAll, i as hasDownloads, n as canSubmitSignature, r as documentSignatureMachine, t as canOpenSign } from "./documentSignatureStateMachine-CYQWjdU3.esm.js";
|
|
6
|
+
//#region src/modules/document-signature/documentSignatureActor.ts
|
|
7
|
+
function createDocumentSignatureActor(options) {
|
|
8
|
+
return createActor(documentSignatureMachine, { input: { config: options.config } }).start();
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region src/modules/document-signature/documentSignatureManager.ts
|
|
12
|
+
function readingFields(context) {
|
|
13
|
+
return {
|
|
14
|
+
title: context.config.title,
|
|
15
|
+
subtitle: context.config.subTitle,
|
|
16
|
+
consentText: context.config.consentText,
|
|
17
|
+
documents: context.documents,
|
|
18
|
+
reachedEndIds: context.reachedEndIds,
|
|
19
|
+
allRead: hasReadAll(context),
|
|
20
|
+
canSign: canOpenSign(context)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function sheetFields(context) {
|
|
24
|
+
return {
|
|
25
|
+
method: context.method,
|
|
26
|
+
typedName: context.typedName,
|
|
27
|
+
maxTypedNameLength: 100,
|
|
28
|
+
canSubmit: canSubmitSignature(context)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function mapState(snapshot) {
|
|
32
|
+
const typed = snapshot;
|
|
33
|
+
const { context } = typed;
|
|
34
|
+
if (typed.matches("loading")) return { status: "loading" };
|
|
35
|
+
if (typed.matches("reading")) return {
|
|
36
|
+
status: "reading",
|
|
37
|
+
...readingFields(context)
|
|
38
|
+
};
|
|
39
|
+
if (typed.matches("signing")) return {
|
|
40
|
+
status: "signing",
|
|
41
|
+
...readingFields(context),
|
|
42
|
+
...sheetFields(context)
|
|
43
|
+
};
|
|
44
|
+
if (typed.matches("submitting")) return {
|
|
45
|
+
status: "submitting",
|
|
46
|
+
...readingFields(context),
|
|
47
|
+
...sheetFields(context)
|
|
48
|
+
};
|
|
49
|
+
if (typed.matches("signed")) return {
|
|
50
|
+
status: "signed",
|
|
51
|
+
documents: context.documents,
|
|
52
|
+
hasDownloads: hasDownloads(context)
|
|
53
|
+
};
|
|
54
|
+
if (typed.matches("signFailed")) return { status: "signFailed" };
|
|
55
|
+
if (typed.matches("finished")) return { status: "finished" };
|
|
56
|
+
if (typed.matches("error")) return {
|
|
57
|
+
status: "error",
|
|
58
|
+
error: context.error ?? "LOAD_FAILED"
|
|
59
|
+
};
|
|
60
|
+
return { status: "idle" };
|
|
61
|
+
}
|
|
62
|
+
function createApi({ actor, trackElementClicked }) {
|
|
63
|
+
return {
|
|
64
|
+
/** Loads the session's documents. */
|
|
65
|
+
load() {
|
|
66
|
+
actor.send({ type: "LOAD" });
|
|
67
|
+
},
|
|
68
|
+
/**
|
|
69
|
+
* Reports that a document's end is on screen. Repeated calls are ignored.
|
|
70
|
+
* Pass `scrolled: true` when the user scrolled there: then reaching the last
|
|
71
|
+
* end opens the sign sheet.
|
|
72
|
+
*/
|
|
73
|
+
reachedEnd(documentId, scrolled = false) {
|
|
74
|
+
actor.send({
|
|
75
|
+
type: "DOCUMENT_REACHED_END",
|
|
76
|
+
documentId,
|
|
77
|
+
scrolled
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
/** Opens the sign sheet. Ignored until `canSign` is true. */
|
|
81
|
+
openSign() {
|
|
82
|
+
trackElementClicked?.("sign");
|
|
83
|
+
actor.send({ type: "OPEN_SIGN" });
|
|
84
|
+
},
|
|
85
|
+
/** Closes the sign sheet without signing. */
|
|
86
|
+
closeSign() {
|
|
87
|
+
actor.send({ type: "CLOSE_SIGN" });
|
|
88
|
+
},
|
|
89
|
+
/** Switches between drawing and typing the name. */
|
|
90
|
+
selectMethod(method) {
|
|
91
|
+
actor.send({
|
|
92
|
+
type: "SELECT_METHOD",
|
|
93
|
+
method
|
|
94
|
+
});
|
|
95
|
+
},
|
|
96
|
+
/** Reports the total stroke length, in CSS pixels, of the drawn signature. */
|
|
97
|
+
setDrawing(inkLength) {
|
|
98
|
+
actor.send({
|
|
99
|
+
type: "DRAWING_CHANGED",
|
|
100
|
+
inkLength
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
/** Updates the typed name. */
|
|
104
|
+
setTypedName(typedName) {
|
|
105
|
+
actor.send({
|
|
106
|
+
type: "TYPED_NAME_CHANGED",
|
|
107
|
+
typedName
|
|
108
|
+
});
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* Signs every document. For a drawn signature, pass the PNG as base64
|
|
112
|
+
* without the `data:` prefix. For a typed name, call it without arguments.
|
|
113
|
+
*/
|
|
114
|
+
submit(signatureBase64) {
|
|
115
|
+
trackElementClicked?.("confirmAndSign");
|
|
116
|
+
actor.send({
|
|
117
|
+
type: "SUBMIT",
|
|
118
|
+
signatureBase64
|
|
119
|
+
});
|
|
120
|
+
},
|
|
121
|
+
/** After a failed sign or a failed load, loads the documents again. */
|
|
122
|
+
retry() {
|
|
123
|
+
trackElementClicked?.("tryAgain");
|
|
124
|
+
actor.send({ type: "RETRY" });
|
|
125
|
+
},
|
|
126
|
+
/** Leaves the signed screen and finishes the module. Only needed when it shows download links. */
|
|
127
|
+
continue() {
|
|
128
|
+
trackElementClicked?.("continue");
|
|
129
|
+
actor.send({ type: "CONTINUE" });
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function createDocumentSignatureManager(options) {
|
|
134
|
+
return createDocumentSignatureManagerFromActor(createDocumentSignatureActor(options));
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Creates a Document Signature manager from a pre-built actor.
|
|
138
|
+
* Use it when you override the machine with `.provide()`.
|
|
139
|
+
*/
|
|
140
|
+
function createDocumentSignatureManagerFromActor(actor) {
|
|
141
|
+
return createManager({
|
|
142
|
+
actor,
|
|
143
|
+
mapState,
|
|
144
|
+
createApi,
|
|
145
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.documentSignature)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
//#endregion
|
|
149
|
+
export { createDocumentSignatureManager, createDocumentSignatureManagerFromActor, documentSignatureMachine };
|
package/dist/{documentCaptureManager-DODC4eUX.esm.js → documentCaptureManager-B3ZH-_GY.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-
|
|
6
|
+
import { n as DEFAULT_MAX_FILE_SIZE, r as DOCUMENT_CAPTURE_ERROR_CODES, t as documentCaptureMachine } from "./documentCaptureStateMachine-CnKVcxV1.esm.js";
|
|
7
7
|
//#region src/modules/document-capture/documentCaptureActor.ts
|
|
8
8
|
function createDocumentCaptureActor(options) {
|
|
9
9
|
return createActor(documentCaptureMachine, { input: { config: options.config } }).start();
|
|
@@ -102,14 +102,14 @@ declare const documentCaptureMachine: StateMachine<DocumentCaptureContext, {
|
|
|
102
102
|
id: string | undefined;
|
|
103
103
|
};
|
|
104
104
|
}>, Values<{
|
|
105
|
-
decrementAttemptsRemaining: {
|
|
106
|
-
type: "decrementAttemptsRemaining";
|
|
107
|
-
params: NonReducibleUnknown;
|
|
108
|
-
};
|
|
109
105
|
clearError: {
|
|
110
106
|
type: "clearError";
|
|
111
107
|
params: NonReducibleUnknown;
|
|
112
108
|
};
|
|
109
|
+
decrementAttemptsRemaining: {
|
|
110
|
+
type: "decrementAttemptsRemaining";
|
|
111
|
+
params: NonReducibleUnknown;
|
|
112
|
+
};
|
|
113
113
|
setStream: {
|
|
114
114
|
type: "setStream";
|
|
115
115
|
params: NonReducibleUnknown;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
|
|
2
2
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
4
4
|
import { a as stopCameraStream } from "./camera-wzsqfd3B.esm.js";
|
|
5
5
|
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BMQItC9y.esm.js";
|
|
6
6
|
import { r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-CR0Z10rU.esm.js";
|
|
7
|
-
import { t as carryAttempts } from "./attemptCarry-
|
|
7
|
+
import { t as carryAttempts } from "./attemptCarry-Dew-8qhm.esm.js";
|
|
8
8
|
import { n as getBackCameraStream } from "./backCameraStream-Bn9Z5wM5.esm.js";
|
|
9
9
|
//#region src/modules/document-capture/types.ts
|
|
10
10
|
const PROCESSING_TYPE_MAP = {
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
import { n as eventModuleNames, v as addEvent } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
|
|
3
|
+
import "./events-C3sjvrjL.esm.js";
|
|
4
|
+
import { i as toIncodeApiError } from "./apiError-BRqZjDN7.esm.js";
|
|
5
|
+
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
+
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
7
|
+
//#region src/modules/document-signature/documentSignatureServices.ts
|
|
8
|
+
/** Lists the session's documents in display order. Throws on failure. */
|
|
9
|
+
async function getDocuments(signal) {
|
|
10
|
+
try {
|
|
11
|
+
return [...(await api.get(endpoints.documentSignatureDocuments, { signal })).data.documents].sort((a, b) => a.order - b.order);
|
|
12
|
+
} catch (error) {
|
|
13
|
+
toIncodeApiError(endpoints.documentSignatureDocuments, error);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/** Signs every listed document with one signature. Idempotent on the backend. Throws on failure. */
|
|
17
|
+
async function signDocuments(body, signal) {
|
|
18
|
+
try {
|
|
19
|
+
return (await api.post(endpoints.documentSignatureSign, body, { signal })).data;
|
|
20
|
+
} catch (error) {
|
|
21
|
+
toIncodeApiError(endpoints.documentSignatureSign, error);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/** How long the signed screen stays before the module finishes, when it has no download links. */
|
|
25
|
+
const SIGNED_DISPLAY_MS = 1500;
|
|
26
|
+
const SCREEN = "documentSignature";
|
|
27
|
+
function track(code, payload = {}) {
|
|
28
|
+
addEvent({
|
|
29
|
+
code,
|
|
30
|
+
module: eventModuleNames.documentSignature,
|
|
31
|
+
screen: SCREEN,
|
|
32
|
+
payload
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function isTypedNameValid(name) {
|
|
36
|
+
const trimmed = name.trim();
|
|
37
|
+
return trimmed.length > 1 && trimmed.length <= 100 && !/[\r\n]/.test(trimmed);
|
|
38
|
+
}
|
|
39
|
+
const isSigned = (documents) => documents.some((d) => Boolean(d.signatureId));
|
|
40
|
+
/** True when the user has scrolled every document to its end. */
|
|
41
|
+
function hasReadAll(context) {
|
|
42
|
+
return context.documents.every((d) => context.reachedEndIds.includes(d.documentId));
|
|
43
|
+
}
|
|
44
|
+
/** True when the user may open the sign sheet. */
|
|
45
|
+
function canOpenSign(context) {
|
|
46
|
+
return context.config.requireScrollToEnd === false || hasReadAll(context);
|
|
47
|
+
}
|
|
48
|
+
/** True when the signed screen shows download links, so the user leaves it with Continue. */
|
|
49
|
+
function hasDownloads(context) {
|
|
50
|
+
return context.config.allowDownload === true && context.documents.some((d) => Boolean(d.signedUrl));
|
|
51
|
+
}
|
|
52
|
+
/** True when the current signature input is complete enough to submit. */
|
|
53
|
+
function canSubmitSignature(context) {
|
|
54
|
+
return context.method === "draw" ? context.inkLength >= 60 : isTypedNameValid(context.typedName);
|
|
55
|
+
}
|
|
56
|
+
function isFirstReachedEnd(context, event) {
|
|
57
|
+
const { documentId } = event;
|
|
58
|
+
return !context.reachedEndIds.includes(documentId) && context.documents.some((d) => d.documentId === documentId);
|
|
59
|
+
}
|
|
60
|
+
const outputOf = (event) => event.output;
|
|
61
|
+
const documentSignatureMachine = setup({
|
|
62
|
+
types: {
|
|
63
|
+
context: {},
|
|
64
|
+
events: {},
|
|
65
|
+
input: {}
|
|
66
|
+
},
|
|
67
|
+
actors: {
|
|
68
|
+
getDocuments: fromPromise(({ signal }) => getDocuments(signal)),
|
|
69
|
+
signDocuments: fromPromise(({ input, signal }) => signDocuments(input, signal))
|
|
70
|
+
},
|
|
71
|
+
actions: {
|
|
72
|
+
setDocuments: assign(({ context, event }) => {
|
|
73
|
+
const documents = outputOf(event);
|
|
74
|
+
return {
|
|
75
|
+
documents,
|
|
76
|
+
reachedEndIds: context.reachedEndIds.filter((id) => documents.some((d) => d.documentId === id))
|
|
77
|
+
};
|
|
78
|
+
}),
|
|
79
|
+
setSignedDocuments: assign(({ event }) => ({ documents: outputOf(event).documents })),
|
|
80
|
+
addReachedEnd: assign(({ context, event }) => {
|
|
81
|
+
const { documentId } = event;
|
|
82
|
+
return { reachedEndIds: [...context.reachedEndIds, documentId] };
|
|
83
|
+
}),
|
|
84
|
+
trackReachedEnd: ({ event }) => {
|
|
85
|
+
const { documentId } = event;
|
|
86
|
+
track("documentSignatureReachedEnd", { documentId });
|
|
87
|
+
},
|
|
88
|
+
resetSignatureInput: assign({
|
|
89
|
+
method: () => "draw",
|
|
90
|
+
inkLength: () => 0,
|
|
91
|
+
typedName: () => "",
|
|
92
|
+
signatureBase64: () => void 0
|
|
93
|
+
}),
|
|
94
|
+
setMethod: assign(({ event }) => ({
|
|
95
|
+
method: event.method,
|
|
96
|
+
inkLength: 0,
|
|
97
|
+
typedName: ""
|
|
98
|
+
})),
|
|
99
|
+
trackTypedSelected: () => track("documentSignatureTypedSignatureSelected"),
|
|
100
|
+
trackSignTapped: () => track("documentSignatureSignTapped"),
|
|
101
|
+
setInkLength: assign(({ event }) => ({ inkLength: event.inkLength })),
|
|
102
|
+
setTypedName: assign(({ event }) => ({ typedName: event.typedName })),
|
|
103
|
+
setSignatureImage: assign(({ event }) => ({ signatureBase64: event.signatureBase64 })),
|
|
104
|
+
setNoDocumentsError: assign({ error: () => "NO_DOCUMENTS" }),
|
|
105
|
+
setLoadError: assign({ error: () => "LOAD_FAILED" })
|
|
106
|
+
},
|
|
107
|
+
guards: {
|
|
108
|
+
outputIsSigned: ({ event }) => isSigned(outputOf(event)),
|
|
109
|
+
outputIsEmpty: ({ event }) => outputOf(event).length === 0,
|
|
110
|
+
isFirstReachedEnd: ({ context, event }) => isFirstReachedEnd(context, event),
|
|
111
|
+
finishesReading: ({ context, event }) => event.scrolled === true && isFirstReachedEnd(context, event) && context.documents.every((d) => d.documentId === event.documentId || context.reachedEndIds.includes(d.documentId)),
|
|
112
|
+
hasNoDownloads: ({ context }) => !hasDownloads(context),
|
|
113
|
+
canOpenSign: ({ context }) => canOpenSign(context),
|
|
114
|
+
isTypeMethod: ({ event }) => event.method === "type",
|
|
115
|
+
canSubmit: ({ context, event }) => canSubmitSignature(context) && (context.method === "type" || !!event.signatureBase64)
|
|
116
|
+
}
|
|
117
|
+
}).createMachine({
|
|
118
|
+
id: "documentSignature",
|
|
119
|
+
initial: "idle",
|
|
120
|
+
context: ({ input }) => ({
|
|
121
|
+
config: input.config,
|
|
122
|
+
documents: [],
|
|
123
|
+
reachedEndIds: [],
|
|
124
|
+
method: "draw",
|
|
125
|
+
inkLength: 0,
|
|
126
|
+
typedName: "",
|
|
127
|
+
signatureBase64: void 0,
|
|
128
|
+
error: void 0
|
|
129
|
+
}),
|
|
130
|
+
states: {
|
|
131
|
+
idle: { on: { LOAD: "loading" } },
|
|
132
|
+
loading: { invoke: {
|
|
133
|
+
src: "getDocuments",
|
|
134
|
+
onDone: [
|
|
135
|
+
{
|
|
136
|
+
target: "signed",
|
|
137
|
+
guard: "outputIsSigned",
|
|
138
|
+
actions: "setDocuments"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
target: "error",
|
|
142
|
+
guard: "outputIsEmpty",
|
|
143
|
+
actions: "setNoDocumentsError"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
target: "reading",
|
|
147
|
+
actions: "setDocuments"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
onError: {
|
|
151
|
+
target: "error",
|
|
152
|
+
actions: "setLoadError"
|
|
153
|
+
}
|
|
154
|
+
} },
|
|
155
|
+
reading: { on: {
|
|
156
|
+
DOCUMENT_REACHED_END: [{
|
|
157
|
+
target: "signing",
|
|
158
|
+
guard: "finishesReading",
|
|
159
|
+
actions: [
|
|
160
|
+
"addReachedEnd",
|
|
161
|
+
"trackReachedEnd",
|
|
162
|
+
"resetSignatureInput"
|
|
163
|
+
]
|
|
164
|
+
}, {
|
|
165
|
+
guard: "isFirstReachedEnd",
|
|
166
|
+
actions: ["addReachedEnd", "trackReachedEnd"]
|
|
167
|
+
}],
|
|
168
|
+
OPEN_SIGN: {
|
|
169
|
+
target: "signing",
|
|
170
|
+
guard: "canOpenSign",
|
|
171
|
+
actions: ["resetSignatureInput", "trackSignTapped"]
|
|
172
|
+
}
|
|
173
|
+
} },
|
|
174
|
+
signing: { on: {
|
|
175
|
+
CLOSE_SIGN: "reading",
|
|
176
|
+
SELECT_METHOD: [{
|
|
177
|
+
guard: "isTypeMethod",
|
|
178
|
+
actions: ["setMethod", "trackTypedSelected"]
|
|
179
|
+
}, { actions: "setMethod" }],
|
|
180
|
+
DRAWING_CHANGED: { actions: "setInkLength" },
|
|
181
|
+
TYPED_NAME_CHANGED: { actions: "setTypedName" },
|
|
182
|
+
SUBMIT: {
|
|
183
|
+
target: "submitting",
|
|
184
|
+
guard: "canSubmit",
|
|
185
|
+
actions: "setSignatureImage"
|
|
186
|
+
}
|
|
187
|
+
} },
|
|
188
|
+
submitting: { invoke: {
|
|
189
|
+
src: "signDocuments",
|
|
190
|
+
input: ({ context }) => {
|
|
191
|
+
const documentIds = context.documents.map((d) => d.documentId);
|
|
192
|
+
return context.method === "type" ? {
|
|
193
|
+
documentIds,
|
|
194
|
+
typedName: context.typedName.trim()
|
|
195
|
+
} : {
|
|
196
|
+
documentIds,
|
|
197
|
+
signatureBase64: context.signatureBase64 ?? ""
|
|
198
|
+
};
|
|
199
|
+
},
|
|
200
|
+
onDone: {
|
|
201
|
+
target: "signed",
|
|
202
|
+
actions: "setSignedDocuments"
|
|
203
|
+
},
|
|
204
|
+
onError: "signFailed"
|
|
205
|
+
} },
|
|
206
|
+
signFailed: { on: { RETRY: "loading" } },
|
|
207
|
+
signed: {
|
|
208
|
+
after: { [SIGNED_DISPLAY_MS]: {
|
|
209
|
+
target: "finished",
|
|
210
|
+
guard: "hasNoDownloads"
|
|
211
|
+
} },
|
|
212
|
+
on: { CONTINUE: "finished" }
|
|
213
|
+
},
|
|
214
|
+
finished: { type: "final" },
|
|
215
|
+
error: { on: { RETRY: "loading" } }
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
//#endregion
|
|
219
|
+
export { hasReadAll as a, hasDownloads as i, canSubmitSignature as n, documentSignatureMachine as r, canOpenSign as t };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
2
|
-
import { t as createDynamicFormsManager } from "./dynamicFormsManager-
|
|
1
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-dYN65J5x.esm.js";
|
|
2
|
+
import { t as createDynamicFormsManager } from "./dynamicFormsManager-DnVJqyQU.esm.js";
|
|
3
3
|
export { createDynamicFormsManager, dynamicFormsMachine };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-
|
|
6
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-dYN65J5x.esm.js";
|
|
7
7
|
//#region src/modules/dynamic-forms/dynamicFormsActor.ts
|
|
8
8
|
function createDynamicFormsActor(options) {
|
|
9
9
|
return createActor(dynamicFormsMachine, { input: { config: options.config } }).start();
|
package/dist/{dynamicFormsStateMachine-CK3zL3iS.esm.js → dynamicFormsStateMachine-dYN65J5x.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
|
|
2
|
+
import { i as toIncodeApiError, r as isServerError, t as IncodeApiError } from "./apiError-BRqZjDN7.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
5
5
|
import { t as isoDateToMs } from "./dateUtils-CvG0FvK8.esm.js";
|
package/dist/ekyb.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./xstate.cjs-D6Ur0X1F.js";
|
|
2
2
|
import { n as AddressSuggestion } from "./textRules-D4NRinKY.js";
|
|
3
|
-
import { i as FlowModuleConfig } from "./types-
|
|
3
|
+
import { i as FlowModuleConfig } from "./types-B2DGXHe6.js";
|
|
4
4
|
import { a as EkybValidationError, n as EkybCountry, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-BgRHw-dR.js";
|
|
5
5
|
import { n as EkybState, o as ekybMachine, r as createEkybManager, t as EkybManager } from "./ekybManager-BflWuTe4.js";
|
|
6
6
|
//#region src/modules/ekyb/ekybServices.d.ts
|
package/dist/ekyb.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as ALL_COUNTRIES, f as SUPPORTED_COUNTRIES, l as DEV_ONLY_COUNTRIES, m as isSupportedCountry, o as toEkybConfig } from "./ekybUtils-Cw8Ta9Qi.esm.js";
|
|
2
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
3
|
-
import { t as createEkybManager } from "./ekybManager-
|
|
2
|
+
import { t as ekybMachine } from "./ekybStateMachine-HSwsgyB6.esm.js";
|
|
3
|
+
import { t as createEkybManager } from "./ekybManager-DrfIdHZB.esm.js";
|
|
4
4
|
export { ALL_COUNTRIES, DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager, ekybMachine, isSupportedCountry, toEkybConfig };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as ekybMachine } from "./ekybStateMachine-
|
|
6
|
+
import { t as ekybMachine } from "./ekybStateMachine-HSwsgyB6.esm.js";
|
|
7
7
|
//#region src/modules/ekyb/ekybActor.ts
|
|
8
8
|
/**
|
|
9
9
|
* Creates and starts an eKYB actor.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { n as getFlow } from "./flowServices-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
|
|
2
|
+
import { n as getFlow } from "./flowServices-GF1eHOjk.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
4
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
5
5
|
import { a as sortModulesByOrder, c as ALL_COUNTRIES, d as FIELD_ORDER, i as requiresAddressValidation, m as isSupportedCountry, n as hasAtLeastOneAddressField, o as toEkybConfig, p as UBO_FIELD_LABELS, r as isFieldOptional, s as ADDRESS_FIELDS, u as FIELD_NAME_MAPPING } from "./ekybUtils-Cw8Ta9Qi.esm.js";
|
|
@@ -7,7 +7,7 @@ import { t as usStateOptions } from "./usStates-CwOQ2kAx.esm.js";
|
|
|
7
7
|
import { n as requiresCnpjValidation, r as validateCNPJ } from "./cnpj-Bl_olpdX.esm.js";
|
|
8
8
|
import { a as getPostalCodeMaxLength, c as fillFromSuggestion, i as getPostalCodeErrorParams, l as getStreetLevelErrorForSuggestion, n as formatPostalCode, o as validatePostalCode, r as getPostalCodeErrorKey, s as STREET_LEVEL_REQUIRED_ERROR, t as createBundledDefinitionSource, u as keepSuggestedStateInOptions } from "./definitionSource-Nw0YCbpe.esm.js";
|
|
9
9
|
import { n as checkSupport, r as DYNAMIC_REQUIRED_KEY, t as resolveForm } from "./resolveForm-DaaQSVWp.esm.js";
|
|
10
|
-
import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-
|
|
10
|
+
import { r as isFormDefinitionsEnabled, t as debounceSearchActor } from "./addressSearch-BTo2kH5N.esm.js";
|
|
11
11
|
//#region src/modules/ekyb/ekybValidators.ts
|
|
12
12
|
const createValidators = () => ({
|
|
13
13
|
required: (value, _rule, field) => {
|
package/dist/ekyc-prefill.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as EkycFormValues, c as EkycValidationErrors, s as EkycValidationError } from "./types-DEa3taWc.js";
|
|
2
2
|
import { a as EkycPrefillFieldDef, c as EkycPrefillModuleConfig, i as EkycPrefillErrorKind, l as EkycPrefillServedField, n as EkycPrefillConfigField, s as EkycPrefillInputFormat, t as EkycPrefillConfig } from "./types-B-PIc0en.js";
|
|
3
|
-
import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-
|
|
3
|
+
import { a as EkycPrefillFormState, c as EkycPrefillManager, d as EkycPrefillSubmittingState, f as createEkycPrefillManager, h as ekycPrefillMachine, i as EkycPrefillFinishedState, l as EkycPrefillMisconfiguredState, n as EkycPrefillClosedState, o as EkycPrefillIdleState, r as EkycPrefillErrorState, s as EkycPrefillLimitReachedState, t as EkycPrefillAnyOfState, u as EkycPrefillState } from "./ekycPrefillManager-DY3f44kC.js";
|
|
4
4
|
//#region src/modules/ekyc-prefill/ekycPrefillConfig.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Normalizes the served `EKYC_PREFILL` configuration. Idempotent, so a
|
package/dist/ekyc-prefill.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-
|
|
2
|
-
import { t as createEkycPrefillManager } from "./ekycPrefillManager-
|
|
1
|
+
import { i as toEkycPrefillConfig, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-CaLE_Fjo.esm.js";
|
|
2
|
+
import { t as createEkycPrefillManager } from "./ekycPrefillManager-BwRgcrQy.esm.js";
|
|
3
3
|
export { createEkycPrefillManager, ekycPrefillMachine, toEkycPrefillConfig };
|
package/dist/ekyc.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ekycMachine } from "./ekycStateMachine-
|
|
1
|
+
import { t as ekycMachine } from "./ekycStateMachine-mB4i5_03.esm.js";
|
|
2
2
|
import { l as toEkycConfig } from "./ekycUtils-FcqA6oU4.esm.js";
|
|
3
|
-
import { t as createEkycManager } from "./ekycManager-
|
|
3
|
+
import { t as createEkycManager } from "./ekycManager-DeocHrn-.esm.js";
|
|
4
4
|
export { createEkycManager, ekycMachine, toEkycConfig };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-CBQN04Rh.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-C3sjvrjL.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-
|
|
6
|
+
import { i as isStepValid, n as buildEkycSteps, r as clampStepIndex, t as ekycMachine } from "./ekycStateMachine-mB4i5_03.esm.js";
|
|
7
7
|
//#region src/modules/ekyc/ekycActor.ts
|
|
8
8
|
/**
|
|
9
9
|
* Creates and starts an eKYC actor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
2
2
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
|
-
import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-
|
|
3
|
+
import { n as isAnyOfMissing, r as validateForm, t as ekycPrefillMachine } from "./ekycPrefillStateMachine-CaLE_Fjo.esm.js";
|
|
4
4
|
//#region src/modules/ekyc-prefill/ekycPrefillActor.ts
|
|
5
5
|
/** Creates and starts an eKYC Pre-fill actor, idle until `LOAD`. */
|
|
6
6
|
function createEkycPrefillActor(options = {}) {
|
|
@@ -28,10 +28,15 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
28
28
|
} | {
|
|
29
29
|
type: "CLOSE";
|
|
30
30
|
}, {
|
|
31
|
-
[x: string]: ActorRefFromLogic<PromiseActorLogic<void, {
|
|
31
|
+
[x: string]: ActorRefFromLogic<PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>> | ActorRefFromLogic<PromiseActorLogic<void, {
|
|
32
32
|
hasPhone: boolean;
|
|
33
|
-
}, EventObject>> |
|
|
33
|
+
}, EventObject>> | undefined;
|
|
34
34
|
}, Values<{
|
|
35
|
+
submit: {
|
|
36
|
+
src: "submit";
|
|
37
|
+
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
38
|
+
id: string | undefined;
|
|
39
|
+
};
|
|
35
40
|
loadPhoneRules: {
|
|
36
41
|
src: "loadPhoneRules";
|
|
37
42
|
logic: PromiseActorLogic<void, {
|
|
@@ -39,11 +44,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
39
44
|
}, EventObject>;
|
|
40
45
|
id: string | undefined;
|
|
41
46
|
};
|
|
42
|
-
submit: {
|
|
43
|
-
src: "submit";
|
|
44
|
-
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
45
|
-
id: string | undefined;
|
|
46
|
-
};
|
|
47
47
|
}>, Values<{
|
|
48
48
|
applyForm: {
|
|
49
49
|
type: "applyForm";
|
|
@@ -110,24 +110,20 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
110
110
|
type: "isLimitReached";
|
|
111
111
|
params: unknown;
|
|
112
112
|
};
|
|
113
|
-
}>, never, "error" | "idle" | "closed" | "finished" | "
|
|
113
|
+
}>, never, "error" | "idle" | "closed" | "finished" | "misconfigured" | "submitting" | "limitReached" | {
|
|
114
114
|
form: "inputting" | "validating";
|
|
115
115
|
}, string, EkycPrefillInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
116
116
|
readonly id: "ekycPrefill";
|
|
117
117
|
readonly initial: "idle";
|
|
118
118
|
readonly context: ({ input }: {
|
|
119
119
|
spawn: {
|
|
120
|
-
<TSrc extends "
|
|
121
|
-
src: "
|
|
122
|
-
logic: PromiseActorLogic<
|
|
123
|
-
hasPhone: boolean;
|
|
124
|
-
}, EventObject>;
|
|
120
|
+
<TSrc extends "submit" | "loadPhoneRules">(logic: TSrc, ...[options]: ({
|
|
121
|
+
src: "submit";
|
|
122
|
+
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
125
123
|
id: string | undefined;
|
|
126
124
|
} extends (infer T) ? T extends {
|
|
127
|
-
src: "
|
|
128
|
-
logic: PromiseActorLogic<
|
|
129
|
-
hasPhone: boolean;
|
|
130
|
-
}, EventObject>;
|
|
125
|
+
src: "submit";
|
|
126
|
+
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
131
127
|
id: string | undefined;
|
|
132
128
|
} ? T extends {
|
|
133
129
|
src: TSrc;
|
|
@@ -137,12 +133,16 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
137
133
|
input?: InputFrom<T["logic"]> | undefined;
|
|
138
134
|
syncSnapshot?: boolean;
|
|
139
135
|
} & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never) | ({
|
|
140
|
-
src: "
|
|
141
|
-
logic: PromiseActorLogic<
|
|
136
|
+
src: "loadPhoneRules";
|
|
137
|
+
logic: PromiseActorLogic<void, {
|
|
138
|
+
hasPhone: boolean;
|
|
139
|
+
}, EventObject>;
|
|
142
140
|
id: string | undefined;
|
|
143
141
|
} extends (infer T_1) ? T_1 extends {
|
|
144
|
-
src: "
|
|
145
|
-
logic: PromiseActorLogic<
|
|
142
|
+
src: "loadPhoneRules";
|
|
143
|
+
logic: PromiseActorLogic<void, {
|
|
144
|
+
hasPhone: boolean;
|
|
145
|
+
}, EventObject>;
|
|
146
146
|
id: string | undefined;
|
|
147
147
|
} ? T_1 extends {
|
|
148
148
|
src: TSrc;
|
|
@@ -152,6 +152,11 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
152
152
|
input?: InputFrom<T_1["logic"]> | undefined;
|
|
153
153
|
syncSnapshot?: boolean;
|
|
154
154
|
} & { [K_1 in RequiredActorOptions<T_1>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T_1>>> : never : never : never)): ActorRefFromLogic<GetConcreteByKey<Values<{
|
|
155
|
+
submit: {
|
|
156
|
+
src: "submit";
|
|
157
|
+
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
158
|
+
id: string | undefined;
|
|
159
|
+
};
|
|
155
160
|
loadPhoneRules: {
|
|
156
161
|
src: "loadPhoneRules";
|
|
157
162
|
logic: PromiseActorLogic<void, {
|
|
@@ -159,11 +164,6 @@ declare const ekycPrefillMachine: StateMachine<EkycPrefillContext, {
|
|
|
159
164
|
}, EventObject>;
|
|
160
165
|
id: string | undefined;
|
|
161
166
|
};
|
|
162
|
-
submit: {
|
|
163
|
-
src: "submit";
|
|
164
|
-
logic: PromiseActorLogic<EkycPrefillSubmitResponse, SubmitInput, EventObject>;
|
|
165
|
-
id: string | undefined;
|
|
166
|
-
};
|
|
167
167
|
}>, "src", TSrc>["logic"]>;
|
|
168
168
|
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
|
|
169
169
|
id?: never;
|
package/dist/{ekycPrefillStateMachine-r8bL9KfD.esm.js → ekycPrefillStateMachine-CaLE_Fjo.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
2
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-jplFqPcE.esm.js";
|
|
2
|
+
import { i as toIncodeApiError } from "./apiError-BRqZjDN7.esm.js";
|
|
3
3
|
import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
4
4
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
5
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|