@incodetech/web 2.1.1 → 2.2.0-rc.1
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/ae-signature/ae-signature.es.js +7 -4
- package/dist/antifraud/antifraud.es.js +6 -6
- package/dist/authentication/authentication.es.js +7 -7
- package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-D7VzaZ2P.js} +6 -3
- package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
- package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
- package/dist/base.css +425 -3290
- package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
- package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
- package/dist/certificate-issuance/styles.css +0 -41
- package/dist/{checkbox-1wUHSoaK.js → checkbox-Jgwh943i.js} +5 -5
- package/dist/connectionError-Bl5E35Qm.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-Sd-u1WGf.js} +3 -3
- package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
- package/dist/curp-validation/curp-validation.es.js +28 -29
- package/dist/curp-validation/styles.css +47 -0
- package/dist/{customFields-BDsXR7A-.js → customFields-CiEguXX9.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-BSAW87qq.js} +9 -9
- package/dist/dashboardTheme-FtPiizV0.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-D0WEYWkS.js} +5 -5
- package/dist/dateInputComposed-DKQJz0kJ.js +1 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +85 -70
- package/dist/{documentCapture-DhbO-A-V.js → documentCapture-GFNkI1ly.js} +218 -136
- package/dist/documentCapture-sB2_X-we.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-BXleSN7n.js} +18 -11
- package/dist/dropdownComposed-DE-VJgcR.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-DU5fT72-.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-CMcpoTgh.js} +51 -27
- package/dist/ekybModule-CR9A6Fqb.js +2 -0
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-BTO8iIwh.js} +45 -19
- package/dist/ekycModule-CewwzYvk.js +2 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
- package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-COBKJBjU.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-mPPvterQ.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-CD5ETLV9.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-DBilbbhC.js} +440 -374
- package/dist/extensibility.es.js +24 -28
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +9 -609
- package/dist/faceMatch-2pfSeXeA.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-CwDBO9Is.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-DUYp39WI.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-dDvSYYQP.js} +11 -12
- package/dist/finalSuccessScreen-B9kb72WR.js +500 -0
- package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
- package/dist/flip-animation-CvN8FLNc.js +6996 -0
- package/dist/flow/flow.es.js +84 -48
- package/dist/flow/styles.css +908 -5423
- package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
- package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
- package/dist/geolocation/geolocation.es.js +36 -13
- package/dist/geolocation/styles.css +1 -1
- package/dist/government-validation/government-validation.es.js +11 -12
- package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Dycy1yhN.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons-D0cfSCBM.js} +92 -7
- package/dist/id/id.es.js +222 -52
- package/dist/id/styles.css +290 -10
- package/dist/id-back-of-card-DO593HH8.js +83 -0
- package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
- package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
- package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
- package/dist/id-laser-h-BaUHzX-d.js +480 -0
- package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
- package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
- package/dist/id-selfie-flow/styles.css +749 -0
- package/dist/id-verification/id-verification.es.js +13 -9
- package/dist/{idOcr-WFBvqy3b.js → idOcr-riTHUOlr.js} +14 -15
- package/dist/identity-reuse/identity-reuse.es.js +6 -8
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-57XFniXU.js → incode-logo-cGsd55rc.js} +64 -1
- package/dist/incodeComponent-B-daxouV.js +713 -0
- package/dist/incodeModule-uyUrSSUM.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/inputComposed-CABc288U.js +1 -0
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-Pp_XN1-h.js} +9 -9
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-DSAjFc0h.js} +9 -11
- package/dist/manualCaptureButton-BY8dRhGA.js +300 -0
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-BldgUGso.js} +68 -198
- package/dist/{modal-OxkFuuiR.js → modal-BlczH_pL.js} +4 -4
- package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
- package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
- package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-Dmz3eRsO.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-B3vUjmBF.js} +72 -36
- package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
- package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
- package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
- package/dist/pdfViewer-4xNYiBI1.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-BGFFFvmi.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-D1ZBsd4S.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-vGhs5Gvb.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-CYPHpI6a.js} +16 -15
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
- package/dist/redirect-to-mobile/styles.css +20 -10
- package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
- package/dist/{richText-CB1fmegc.js → richText-2OnIN9ff.js} +3 -1607
- package/dist/selfie/selfie.es.js +10 -10
- package/dist/selfie/styles.css +16 -949
- package/dist/signature/signature.es.js +27 -19
- package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
- package/dist/{snackbar-DS7Mv62v.js → snackbar-BzyWgQ7J.js} +2 -2
- package/dist/spacer-Bnmh-DfR.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-HP_c74K-.js} +45 -4
- package/dist/statusPage-C0vTVW0Q.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-B_TxQ9ZQ.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-Cuy2ZEG9.js} +222 -180
- package/dist/types/ae-signature.d.ts +91 -5
- package/dist/types/antifraud.d.ts +86 -3
- package/dist/types/authentication.d.ts +86 -3
- package/dist/types/certificate-issuance.d.ts +86 -3
- package/dist/types/consent.d.ts +86 -3
- package/dist/types/cross-document-data-match.d.ts +88 -4
- package/dist/types/curp-validation.d.ts +86 -3
- package/dist/types/document-capture.d.ts +88 -4
- package/dist/types/ekyb.d.ts +88 -4
- package/dist/types/ekyc.d.ts +88 -4
- package/dist/types/electronic-signature.d.ts +87 -4
- package/dist/types/email.d.ts +82 -22
- package/dist/types/extensibility.d.ts +160 -5
- package/dist/types/face-match.d.ts +84 -22
- package/dist/types/field-comparison.d.ts +86 -3
- package/dist/types/fiscal-qr.d.ts +89 -5
- package/dist/types/flow.d.ts +92 -2
- package/dist/types/geolocation.d.ts +86 -3
- package/dist/types/government-validation.d.ts +86 -3
- package/dist/types/id-selfie-flow.d.ts +161 -0
- package/dist/types/id-verification.d.ts +87 -4
- package/dist/types/id.d.ts +88 -5
- package/dist/types/identity-reuse.d.ts +82 -2
- package/dist/types/index.d.ts +109 -1
- package/dist/types/phone.d.ts +83 -24
- package/dist/types/qe-signature.d.ts +91 -5
- package/dist/types/redirect-to-mobile.d.ts +4 -1
- package/dist/types/selfie.d.ts +86 -3
- package/dist/types/signature.d.ts +91 -5
- package/dist/types/video-selfie.d.ts +83 -6
- package/dist/types/watchlist.d.ts +91 -5
- package/dist/types/workflow.d.ts +85 -2
- package/dist/{i18n-CU4xq8qC.js → uiConfig-D7ezQeZ7.js} +63 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-BImpfi_R.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-IUf0w1aR.js} +26 -15
- package/dist/video-selfie/styles.css +349 -1202
- package/dist/video-selfie/video-selfie.es.js +120 -381
- package/dist/watchlist/watchlist.es.js +16 -13
- package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-zT9gCfTc.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +26 -19
- package/package.json +22 -20
- package/dist/button-Dz6AsbmF.js +0 -40
- package/dist/cameraView-DIEzM5ru.js +0 -47
- package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
- package/dist/cpf-ocr/styles.css +0 -45
- package/dist/cpfOcr-B79245-3.js +0 -2
- package/dist/cpfOcr-BhxT-lRN.js +0 -92
- package/dist/dateInputComposed-DRzZi6uy.js +0 -1
- package/dist/documentCapture-DXYYyxZl.js +0 -2
- package/dist/dropdownComposed-BAoxIIsE.js +0 -1
- package/dist/ekybModule-C6Nttked.js +0 -2
- package/dist/ekycModule-CDIEjI6V.js +0 -2
- package/dist/errorIcon-BA4T6iy-.js +0 -26
- package/dist/faceMatch-B_HvxLm_.js +0 -2
- package/dist/fieldComparison-DfNEuEE5.js +0 -2
- package/dist/flip-animation-CZYSUtMm.js +0 -6983
- package/dist/hooks-CNu7o-v8.js +0 -186
- package/dist/id-laser-h-CzPegPMn.js +0 -467
- package/dist/incodeComponent-CfzJGETt.js +0 -64
- package/dist/incodeModule-B-4_3JrK.js +0 -13
- package/dist/inputComposed-BaY5q9WM.js +0 -1
- package/dist/loadingIcon-B0ysgiNq.js +0 -148
- package/dist/page-DidH_RkX.js +0 -171
- package/dist/spinner-BCDCoi9C.js +0 -1
- package/dist/statusPage-Bk8nJwXV.js +0 -28
- package/dist/transitionSpinner-CuNCqHNi.js +0 -30
- package/dist/types/cpf-ocr.d.ts +0 -12
- package/dist/typography-BZIpjo97.js +0 -45
- package/dist/uiConfig-D2_wawvr.js +0 -25
- /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
- /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
- /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
- /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
- /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
- /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
- /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
- /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
- /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
- /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
- /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
- /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
- /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
|
@@ -1,5 +1,59 @@
|
|
|
1
|
+
import { DeepPartial } from '@incodetech/core/flow';
|
|
1
2
|
import { FC } from 'preact/compat';
|
|
3
|
+
import { FunctionComponent } from 'preact';
|
|
4
|
+
import { SVGProps } from 'preact/compat';
|
|
2
5
|
import { WatchlistConfig } from '@incodetech/core/watchlist';
|
|
6
|
+
import { WatchlistManager } from '@incodetech/core/watchlist';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Allowlisted keys for overridable Lottie animations
|
|
10
|
+
*/
|
|
11
|
+
declare type AnimationKey = 'id.tutorial.front' | 'id.tutorial.back' | 'id.tutorial.passport' | 'id.flip' | 'id.processing' | 'selfie.tutorial' | 'loader.spinner';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A customer-supplied replacement for a built-in Lottie animation.
|
|
15
|
+
*
|
|
16
|
+
* - `LottieAnimationData` — a parsed Lottie JSON object.
|
|
17
|
+
* - `{ url }` — fetched and cached at runtime.
|
|
18
|
+
* - `{ animationData }` — explicit object form.
|
|
19
|
+
*/
|
|
20
|
+
declare type AnimationOverride = LottieAnimationData | {
|
|
21
|
+
url: string;
|
|
22
|
+
} | {
|
|
23
|
+
animationData: LottieAnimationData;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
declare type AnimationOverrides = Partial<Record<AnimationKey, AnimationOverride>>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Allowlisted keys for overridable branded SVG illustrations
|
|
30
|
+
*/
|
|
31
|
+
declare type AssetKey = 'faceMatch.success' | 'faceMatch.fail' | 'documentCapture.tutorial' | 'id.uploadScreen' | 'id.ageVerification.dob' | 'id.ageVerification.scan' | 'id.ageVerification.privacy' | 'videoSelfie.success' | 'videoSelfie.fail' | 'videoSelfie.tutorial.permission' | 'videoSelfie.tutorial.selfie' | 'videoSelfie.tutorial.frontId' | 'videoSelfie.tutorial.backId' | 'videoSelfie.tutorial.poa' | 'videoSelfie.tutorial.questions' | 'videoSelfie.tutorial.speech' | 'loader.spinner';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A customer-supplied replacement for a built-in SVG illustration.
|
|
35
|
+
*
|
|
36
|
+
* - `string` — a URL, or raw `<svg …>` markup (detected by a leading `<`).
|
|
37
|
+
* - `{ url }` — fetched and rendered via `<img>`; no script execution.
|
|
38
|
+
* - `{ raw }` — inline markup; sanitized before injection.
|
|
39
|
+
* - `{ svg }` — a precompiled component, for build-time integrations.
|
|
40
|
+
*/
|
|
41
|
+
declare type AssetOverride = string | {
|
|
42
|
+
url: string;
|
|
43
|
+
} | {
|
|
44
|
+
raw: string;
|
|
45
|
+
} | {
|
|
46
|
+
svg: SvgComponent;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
declare type AssetOverrides = Partial<Record<AssetKey, AssetOverride>>;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* A module `config` intersected with the per-instance override maps. Typed at
|
|
53
|
+
* the UI boundary so core config types (e.g. `IdCaptureConfig`) stay untouched;
|
|
54
|
+
* `FlowConfig` also declares the maps directly.
|
|
55
|
+
*/
|
|
56
|
+
declare type ConfigWithOverrides<TConfig> = TConfig & InstanceOverrides;
|
|
3
57
|
|
|
4
58
|
/**
|
|
5
59
|
* Extra context passed to `onFinish` alongside the result. Lets a host decide
|
|
@@ -21,12 +75,16 @@ declare type IncodeFinishMeta = {
|
|
|
21
75
|
sdkOwnsTerminalScreen?: boolean;
|
|
22
76
|
};
|
|
23
77
|
|
|
24
|
-
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
78
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
25
79
|
/**
|
|
26
80
|
* Module configuration required to render the flow.
|
|
27
81
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
82
|
+
*
|
|
83
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
84
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
85
|
+
* element only and are ignored by the core manager.
|
|
28
86
|
*/
|
|
29
|
-
config?:
|
|
87
|
+
config?: TConfigInput;
|
|
30
88
|
/**
|
|
31
89
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
32
90
|
*/
|
|
@@ -52,14 +110,42 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
|
52
110
|
onError?: (error: string | undefined, errorCode?: number, moduleErrorCode?: string) => void;
|
|
53
111
|
};
|
|
54
112
|
|
|
55
|
-
|
|
113
|
+
/**
|
|
114
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
115
|
+
*
|
|
116
|
+
* These ride on the module's `config` prop and are published once at the
|
|
117
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
118
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
119
|
+
*/
|
|
120
|
+
declare type InstanceOverrides = {
|
|
121
|
+
assets?: AssetOverrides;
|
|
122
|
+
animations?: AnimationOverrides;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
declare type LottieAnimationData = {
|
|
126
|
+
fr: number;
|
|
127
|
+
v: string;
|
|
128
|
+
ip: number;
|
|
129
|
+
op: number;
|
|
130
|
+
w: number;
|
|
131
|
+
h: number;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
135
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
136
|
+
|
|
137
|
+
export declare const Watchlist: FC<Omit<WatchlistProps, "config"> & {
|
|
138
|
+
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
139
|
+
}>;
|
|
56
140
|
|
|
57
|
-
declare type WatchlistProps = IncodeModuleProps<WatchlistConfig>;
|
|
141
|
+
declare type WatchlistProps = IncodeModuleProps<WatchlistConfig, void, WatchlistManager>;
|
|
58
142
|
|
|
59
143
|
export { }
|
|
60
144
|
|
|
61
145
|
declare global {
|
|
62
146
|
interface HTMLElementTagNameMap {
|
|
63
|
-
'incode-watchlist': HTMLElement & IncodeModuleProps<WatchlistConfig
|
|
147
|
+
'incode-watchlist': HTMLElement & IncodeModuleProps<WatchlistConfig,
|
|
148
|
+
void,
|
|
149
|
+
WatchlistManager>;
|
|
64
150
|
}
|
|
65
151
|
}
|
package/dist/types/workflow.d.ts
CHANGED
|
@@ -2,18 +2,70 @@ import { CreateSessionOptions } from '@incodetech/core/session';
|
|
|
2
2
|
import { CustomModuleCallback } from '@incodetech/core/workflow';
|
|
3
3
|
import { FC } from 'preact/compat';
|
|
4
4
|
import { FinishStatus } from '@incodetech/core/flow';
|
|
5
|
+
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { SVGProps } from 'preact/compat';
|
|
5
7
|
import { WasmConfig } from '@incodetech/core/wasm';
|
|
6
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Allowlisted keys for overridable Lottie animations
|
|
11
|
+
*/
|
|
12
|
+
declare type AnimationKey = 'id.tutorial.front' | 'id.tutorial.back' | 'id.tutorial.passport' | 'id.flip' | 'id.processing' | 'selfie.tutorial' | 'loader.spinner';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A customer-supplied replacement for a built-in Lottie animation.
|
|
16
|
+
*
|
|
17
|
+
* - `LottieAnimationData` — a parsed Lottie JSON object.
|
|
18
|
+
* - `{ url }` — fetched and cached at runtime.
|
|
19
|
+
* - `{ animationData }` — explicit object form.
|
|
20
|
+
*/
|
|
21
|
+
declare type AnimationOverride = LottieAnimationData | {
|
|
22
|
+
url: string;
|
|
23
|
+
} | {
|
|
24
|
+
animationData: LottieAnimationData;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
declare type AnimationOverrides = Partial<Record<AnimationKey, AnimationOverride>>;
|
|
28
|
+
|
|
7
29
|
declare type ApiKeySessionBootstrap = {
|
|
8
30
|
apiKey: string;
|
|
9
31
|
clientId?: string;
|
|
10
32
|
};
|
|
11
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Allowlisted keys for overridable branded SVG illustrations
|
|
36
|
+
*/
|
|
37
|
+
declare type AssetKey = 'faceMatch.success' | 'faceMatch.fail' | 'documentCapture.tutorial' | 'id.uploadScreen' | 'id.ageVerification.dob' | 'id.ageVerification.scan' | 'id.ageVerification.privacy' | 'videoSelfie.success' | 'videoSelfie.fail' | 'videoSelfie.tutorial.permission' | 'videoSelfie.tutorial.selfie' | 'videoSelfie.tutorial.frontId' | 'videoSelfie.tutorial.backId' | 'videoSelfie.tutorial.poa' | 'videoSelfie.tutorial.questions' | 'videoSelfie.tutorial.speech' | 'loader.spinner';
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A customer-supplied replacement for a built-in SVG illustration.
|
|
41
|
+
*
|
|
42
|
+
* - `string` — a URL, or raw `<svg …>` markup (detected by a leading `<`).
|
|
43
|
+
* - `{ url }` — fetched and rendered via `<img>`; no script execution.
|
|
44
|
+
* - `{ raw }` — inline markup; sanitized before injection.
|
|
45
|
+
* - `{ svg }` — a precompiled component, for build-time integrations.
|
|
46
|
+
*/
|
|
47
|
+
declare type AssetOverride = string | {
|
|
48
|
+
url: string;
|
|
49
|
+
} | {
|
|
50
|
+
raw: string;
|
|
51
|
+
} | {
|
|
52
|
+
svg: SvgComponent;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare type AssetOverrides = Partial<Record<AssetKey, AssetOverride>>;
|
|
56
|
+
|
|
12
57
|
declare type ClientIdSessionBootstrap = {
|
|
13
58
|
apiKey?: string;
|
|
14
59
|
clientId: string;
|
|
15
60
|
};
|
|
16
61
|
|
|
62
|
+
/**
|
|
63
|
+
* A module `config` intersected with the per-instance override maps. Typed at
|
|
64
|
+
* the UI boundary so core config types (e.g. `IdCaptureConfig`) stay untouched;
|
|
65
|
+
* `FlowConfig` also declares the maps directly.
|
|
66
|
+
*/
|
|
67
|
+
declare type ConfigWithOverrides<TConfig> = TConfig & InstanceOverrides;
|
|
68
|
+
|
|
17
69
|
/**
|
|
18
70
|
* Extra context passed to `onFinish` alongside the result. Lets a host decide
|
|
19
71
|
* how to react to the terminal state without inspecting the DOM. Only the
|
|
@@ -34,12 +86,16 @@ export declare type IncodeFinishMeta = {
|
|
|
34
86
|
sdkOwnsTerminalScreen?: boolean;
|
|
35
87
|
};
|
|
36
88
|
|
|
37
|
-
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
89
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
38
90
|
/**
|
|
39
91
|
* Module configuration required to render the flow.
|
|
40
92
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
93
|
+
*
|
|
94
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
95
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
96
|
+
* element only and are ignored by the core manager.
|
|
41
97
|
*/
|
|
42
|
-
config?:
|
|
98
|
+
config?: TConfigInput;
|
|
43
99
|
/**
|
|
44
100
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
45
101
|
*/
|
|
@@ -69,6 +125,27 @@ export declare const IncodeWorkflow: FC<IncodeWorkflowProps>;
|
|
|
69
125
|
|
|
70
126
|
declare type IncodeWorkflowProps = IncodeModuleProps<WorkflowComponentConfig, FinishStatus>;
|
|
71
127
|
|
|
128
|
+
/**
|
|
129
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
130
|
+
*
|
|
131
|
+
* These ride on the module's `config` prop and are published once at the
|
|
132
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
133
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
134
|
+
*/
|
|
135
|
+
declare type InstanceOverrides = {
|
|
136
|
+
assets?: AssetOverrides;
|
|
137
|
+
animations?: AnimationOverrides;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
declare type LottieAnimationData = {
|
|
141
|
+
fr: number;
|
|
142
|
+
v: string;
|
|
143
|
+
ip: number;
|
|
144
|
+
op: number;
|
|
145
|
+
w: number;
|
|
146
|
+
h: number;
|
|
147
|
+
};
|
|
148
|
+
|
|
72
149
|
export declare function mapModuleConfig(options: MapModuleConfigOptions): Record<string, unknown>;
|
|
73
150
|
|
|
74
151
|
/**
|
|
@@ -80,6 +157,7 @@ declare type MapModuleConfigOptions = {
|
|
|
80
157
|
config: Record<string, unknown>;
|
|
81
158
|
workflowId: string;
|
|
82
159
|
authHint?: string;
|
|
160
|
+
loginHintPrefill?: string;
|
|
83
161
|
lang?: string;
|
|
84
162
|
mergeSessionRecordings?: boolean;
|
|
85
163
|
ageAssurance?: boolean;
|
|
@@ -105,6 +183,9 @@ declare type SpinnerConfig = {
|
|
|
105
183
|
|
|
106
184
|
declare type SpinnerSize = 'small' | 'medium' | 'large';
|
|
107
185
|
|
|
186
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
187
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
188
|
+
|
|
108
189
|
declare type TokenWorkflowRuntimeConfig = WorkflowBaseConfig & {
|
|
109
190
|
token: string;
|
|
110
191
|
/**
|
|
@@ -140,6 +221,8 @@ declare type WorkflowBaseConfig = {
|
|
|
140
221
|
isDesktop?: boolean;
|
|
141
222
|
/** Authentication hint for AUTHENTICATION module. Required when workflow includes face authentication. */
|
|
142
223
|
authHint?: string;
|
|
224
|
+
/** Login-hint prefill forwarded to the DYNAMIC_FORMS module's `prefillValue`. Distinct from `authHint`. */
|
|
225
|
+
loginHintPrefill?: string;
|
|
143
226
|
onModuleLoading?: (moduleKey: string) => void;
|
|
144
227
|
onModuleLoaded?: (moduleKey: string) => void;
|
|
145
228
|
onUrlUuidRefreshed?: (urlUuid: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM } from "./rolldown-runtime--E5BIlTp.js";
|
|
2
|
-
import { _ as y, d as T,
|
|
2
|
+
import { S as k, _ as y, d as T, i as C, p as d, v as u, y as K } from "./vendor-preact-mvwZ8mJj.js";
|
|
3
3
|
//#region ../../node_modules/.pnpm/i18next@25.7.1_typescript@5.9.3/node_modules/i18next/dist/esm/i18next.js
|
|
4
4
|
var isString = (obj) => typeof obj === "string";
|
|
5
5
|
var defer = () => {
|
|
@@ -2360,7 +2360,7 @@ if (typeof ActiveXObject === "function") {
|
|
|
2360
2360
|
}
|
|
2361
2361
|
if (typeof fetchApi !== "function") fetchApi = void 0;
|
|
2362
2362
|
if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) try {
|
|
2363
|
-
import("./browser-ponyfill-
|
|
2363
|
+
import("./browser-ponyfill-CBjGwwPW.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1)).then(function(mod) {
|
|
2364
2364
|
fetchApi = mod.default;
|
|
2365
2365
|
}).catch(function() {});
|
|
2366
2366
|
} catch (e) {}
|
|
@@ -2968,4 +2968,64 @@ var Trans = ({ i18nKey, boldClass = "IncodeTransBold", arrowClass = "IncodeTrans
|
|
|
2968
2968
|
}) });
|
|
2969
2969
|
};
|
|
2970
2970
|
//#endregion
|
|
2971
|
-
|
|
2971
|
+
//#region src/shared/uiConfig/uiConfig.ts
|
|
2972
|
+
/** Tier 1: set by the host via `setup({ uiConfig })` / `setUiConfig`. Wins. */
|
|
2973
|
+
var hostUiConfig = {};
|
|
2974
|
+
/** Tier 2: derived from the tenant's dashboard theme. Fills the gaps. */
|
|
2975
|
+
var themeUiConfig = {};
|
|
2976
|
+
/**
|
|
2977
|
+
* Cached composition of the two tiers. `useSyncExternalStore` requires
|
|
2978
|
+
* `getSnapshot` to return a referentially stable value — composing on every
|
|
2979
|
+
* call would hand Preact a new object each time and loop forever — so the
|
|
2980
|
+
* merge happens once per write instead.
|
|
2981
|
+
*/
|
|
2982
|
+
var snapshot = {};
|
|
2983
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
2984
|
+
function withoutUndefined(value) {
|
|
2985
|
+
const defined = {};
|
|
2986
|
+
for (const key of Object.keys(value)) if (value[key] !== void 0) defined[key] = value[key];
|
|
2987
|
+
return defined;
|
|
2988
|
+
}
|
|
2989
|
+
/**
|
|
2990
|
+
* Host fields win over theme fields; a host field left `undefined` counts as
|
|
2991
|
+
* "not specified" and lets the theme through, rather than blanking it.
|
|
2992
|
+
*/
|
|
2993
|
+
function publish() {
|
|
2994
|
+
snapshot = {
|
|
2995
|
+
...themeUiConfig,
|
|
2996
|
+
...withoutUndefined(hostUiConfig)
|
|
2997
|
+
};
|
|
2998
|
+
for (const listener of listeners) listener();
|
|
2999
|
+
}
|
|
3000
|
+
function subscribe(listener) {
|
|
3001
|
+
listeners.add(listener);
|
|
3002
|
+
return () => {
|
|
3003
|
+
listeners.delete(listener);
|
|
3004
|
+
};
|
|
3005
|
+
}
|
|
3006
|
+
function getSnapshot() {
|
|
3007
|
+
return snapshot;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Sets global UI configuration defaults for `@incodetech/ui`.
|
|
3011
|
+
*
|
|
3012
|
+
* Replaces (does not merge with) the previous host-supplied config, so omitting
|
|
3013
|
+
* a field clears it. The dashboard theme is held separately and is unaffected.
|
|
3014
|
+
*/
|
|
3015
|
+
function setUiConfig(next) {
|
|
3016
|
+
hostUiConfig = next;
|
|
3017
|
+
publish();
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Internal: publishes the branding fields derived from the tenant's dashboard
|
|
3021
|
+
* theme. Not exported from the package — hosts use {@link setUiConfig}.
|
|
3022
|
+
*/
|
|
3023
|
+
function setThemeUiConfig(next) {
|
|
3024
|
+
themeUiConfig = next;
|
|
3025
|
+
publish();
|
|
3026
|
+
}
|
|
3027
|
+
function useUiConfig() {
|
|
3028
|
+
return C(subscribe, getSnapshot);
|
|
3029
|
+
}
|
|
3030
|
+
//#endregion
|
|
3031
|
+
export { useTranslation as a, createI18n as c, supportedLanguages as d, Trans as i, readStoredLanguage as l, setUiConfig as n, hasI18nInstance as o, useUiConfig as r, setI18nInstance as s, setThemeUiConfig as t, getLanguageEmoji as u };
|