@incodetech/web 2.1.1 → 2.2.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/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-gLba2mgp.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-C38Elx0O.js} +5 -5
- package/dist/connectionError-DAeXp8sE.js +45 -0
- package/dist/consent/consent.es.js +10 -12
- package/dist/consent/styles.css +5 -4
- package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.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-B8HQZ7Mh.js} +13 -14
- package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
- package/dist/dashboardTheme-CVliZSR-.js +223 -0
- package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
- package/dist/dateInputComposed-ks0-opuq.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-BvEGCYj-.js} +218 -136
- package/dist/documentCapture-DdHdRPzR.js +2 -0
- package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
- package/dist/dropdownComposed-kjG4UblM.js +1 -0
- package/dist/dynamic-forms/styles.css +58 -6
- package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +1 -28
- package/dist/ekybModule-CiaxFHXo.js +2 -0
- package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +2 -2
- package/dist/ekycModule-BVt10kgv.js +2 -0
- package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
- 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-yamI6zHM.js} +31 -23
- package/dist/email/email.es.js +10 -11
- package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
- package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
- package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.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-D4XFihTc.js +2 -0
- package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/fieldComparison-B_r9Bal7.js +2 -0
- package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
- package/dist/finalSuccessScreen-DryADx1n.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 +81 -45
- 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-Pv3v_0ji.js} +7 -9
- package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.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-gsIXHq6R.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-rGFjZHqi.js} +64 -1
- package/dist/incodeComponent-K9ZWg302.js +713 -0
- package/dist/incodeModule-CcLzar_X.js +25 -0
- package/dist/index.es.js +16 -5
- package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
- package/dist/inputComposed-CADVQW-o.js +1 -0
- package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
- package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
- package/dist/manualCaptureButton-t_oIol88.js +300 -0
- package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.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-DgfHD_mx.js} +6 -6
- package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.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-CZb6obcZ.js +2 -0
- package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
- package/dist/phone/phone.es.js +13 -12
- package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
- package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +7 -4
- package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.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-CTHBpZOw.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-C9Mqrh0e.js} +2 -2
- package/dist/spacer-CDlQd12V.js +2344 -0
- package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
- package/dist/statusPage--GVFSUJp.js +36 -0
- package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
- package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
- package/dist/themes/dark.css +35 -0
- package/dist/themes/light.css +35 -0
- package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.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 +157 -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 +106 -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-B5ASPUL4.js} +26 -3
- package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
- package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
- package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.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-D8Is99bZ.js} +12 -13
- package/dist/workflow/styles.css +501 -3977
- package/dist/workflow/workflow.es.js +25 -18
- 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
package/dist/types/email.d.ts
CHANGED
|
@@ -1,31 +1,63 @@
|
|
|
1
|
+
import { DeepPartial } from '@incodetech/core/flow';
|
|
1
2
|
import { EmailConfig } from '@incodetech/core/email';
|
|
2
3
|
import { EmailManager } from '@incodetech/core/email';
|
|
3
4
|
import { FC } from 'preact/compat';
|
|
5
|
+
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { SVGProps } from 'preact/compat';
|
|
4
7
|
|
|
5
8
|
/**
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* -
|
|
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.
|
|
12
15
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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.
|
|
25
35
|
*
|
|
26
|
-
*
|
|
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.
|
|
27
40
|
*/
|
|
28
|
-
|
|
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;
|
|
57
|
+
|
|
58
|
+
export declare const Email: FC<Omit<EmailProps, "config"> & {
|
|
59
|
+
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
60
|
+
}>;
|
|
29
61
|
|
|
30
62
|
/**
|
|
31
63
|
* Props for the Email component
|
|
@@ -52,12 +84,16 @@ declare type IncodeFinishMeta = {
|
|
|
52
84
|
sdkOwnsTerminalScreen?: boolean;
|
|
53
85
|
};
|
|
54
86
|
|
|
55
|
-
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
87
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
56
88
|
/**
|
|
57
89
|
* Module configuration required to render the flow.
|
|
58
90
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
91
|
+
*
|
|
92
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
93
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
94
|
+
* element only and are ignored by the core manager.
|
|
59
95
|
*/
|
|
60
|
-
config?:
|
|
96
|
+
config?: TConfigInput;
|
|
61
97
|
/**
|
|
62
98
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
63
99
|
*/
|
|
@@ -83,6 +119,30 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
|
83
119
|
onError?: (error: string | undefined, errorCode?: number, moduleErrorCode?: string) => void;
|
|
84
120
|
};
|
|
85
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
124
|
+
*
|
|
125
|
+
* These ride on the module's `config` prop and are published once at the
|
|
126
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
127
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
128
|
+
*/
|
|
129
|
+
declare type InstanceOverrides = {
|
|
130
|
+
assets?: AssetOverrides;
|
|
131
|
+
animations?: AnimationOverrides;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
declare type LottieAnimationData = {
|
|
135
|
+
fr: number;
|
|
136
|
+
v: string;
|
|
137
|
+
ip: number;
|
|
138
|
+
op: number;
|
|
139
|
+
w: number;
|
|
140
|
+
h: number;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
144
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
145
|
+
|
|
86
146
|
export { }
|
|
87
147
|
|
|
88
148
|
declare global {
|
|
@@ -3,6 +3,7 @@ import { CountryCode } from 'libphonenumber-js';
|
|
|
3
3
|
import { CSSProperties } from 'preact';
|
|
4
4
|
import { FC } from 'preact/compat';
|
|
5
5
|
import { FunctionalComponent } from 'preact';
|
|
6
|
+
import { FunctionComponent } from 'preact';
|
|
6
7
|
import { HTMLAttributes } from 'preact';
|
|
7
8
|
import { HTMLAttributes as HTMLAttributes_2 } from 'preact/compat';
|
|
8
9
|
import { i18n } from 'i18next';
|
|
@@ -15,13 +16,58 @@ import { PermissionStatus as PermissionStatus_2 } from '@incodetech/core/camera'
|
|
|
15
16
|
import { PropsWithoutRef } from 'preact/compat';
|
|
16
17
|
import { Ref } from 'preact';
|
|
17
18
|
import { RefObject } from 'preact';
|
|
19
|
+
import { RefObject as RefObject_2 } from 'preact/compat';
|
|
18
20
|
import { SelfieManager } from '@incodetech/core/selfie';
|
|
19
21
|
import { SelfieState } from '@incodetech/core/selfie';
|
|
22
|
+
import { SVGProps } from 'preact/compat';
|
|
20
23
|
import { TargetedEvent } from 'preact';
|
|
21
24
|
import { TFunction } from 'i18next';
|
|
22
25
|
import { VNode } from 'preact';
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Allowlisted keys for overridable Lottie animations
|
|
29
|
+
*/
|
|
30
|
+
export declare type AnimationKey = 'id.tutorial.front' | 'id.tutorial.back' | 'id.tutorial.passport' | 'id.flip' | 'id.processing' | 'selfie.tutorial' | 'loader.spinner';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A customer-supplied replacement for a built-in Lottie animation.
|
|
34
|
+
*
|
|
35
|
+
* - `LottieAnimationData` — a parsed Lottie JSON object.
|
|
36
|
+
* - `{ url }` — fetched and cached at runtime.
|
|
37
|
+
* - `{ animationData }` — explicit object form.
|
|
38
|
+
*/
|
|
39
|
+
export declare type AnimationOverride = LottieAnimationData | {
|
|
40
|
+
url: string;
|
|
41
|
+
} | {
|
|
42
|
+
animationData: LottieAnimationData;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare type AnimationOverrides = Partial<Record<AnimationKey, AnimationOverride>>;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Allowlisted keys for overridable branded SVG illustrations
|
|
49
|
+
*/
|
|
50
|
+
export 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';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A customer-supplied replacement for a built-in SVG illustration.
|
|
54
|
+
*
|
|
55
|
+
* - `string` — a URL, or raw `<svg …>` markup (detected by a leading `<`).
|
|
56
|
+
* - `{ url }` — fetched and rendered via `<img>`; no script execution.
|
|
57
|
+
* - `{ raw }` — inline markup; sanitized before injection.
|
|
58
|
+
* - `{ svg }` — a precompiled component, for build-time integrations.
|
|
59
|
+
*/
|
|
60
|
+
export declare type AssetOverride = string | {
|
|
61
|
+
url: string;
|
|
62
|
+
} | {
|
|
63
|
+
raw: string;
|
|
64
|
+
} | {
|
|
65
|
+
svg: SvgComponent;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export declare type AssetOverrides = Partial<Record<AssetKey, AssetOverride>>;
|
|
69
|
+
|
|
70
|
+
export declare const BaseTutorial: ({ className, animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, stopFramePosition, recolor, }: BaseTutorialProps) => JSX.Element;
|
|
25
71
|
|
|
26
72
|
declare type BaseTutorialProps = {
|
|
27
73
|
className?: string;
|
|
@@ -34,6 +80,12 @@ declare type BaseTutorialProps = {
|
|
|
34
80
|
disclaimerText: string;
|
|
35
81
|
isLoading?: boolean;
|
|
36
82
|
stopFramePosition?: 'first' | 'middle' | 'last';
|
|
83
|
+
/**
|
|
84
|
+
* Re-tint the animation's brand-colored elements to the active branding
|
|
85
|
+
* color. On for built-in animations; pass `false` for customer overrides so
|
|
86
|
+
* their artwork is rendered as-authored (no recoloring).
|
|
87
|
+
*/
|
|
88
|
+
recolor?: boolean;
|
|
37
89
|
};
|
|
38
90
|
|
|
39
91
|
export declare const BottomSheet: FC<BottomSheetProps>;
|
|
@@ -43,6 +95,7 @@ declare type BottomSheetProps = {
|
|
|
43
95
|
onClose?: () => void;
|
|
44
96
|
labelledById: string;
|
|
45
97
|
children: ComponentChildren;
|
|
98
|
+
returnFocusRef?: RefObject<HTMLElement | null>;
|
|
46
99
|
};
|
|
47
100
|
|
|
48
101
|
export declare const Button: FunctionalComponent<PropsWithoutRef<ButtonProps> & {
|
|
@@ -110,6 +163,7 @@ declare type CameraOverlayHeaderProps = {
|
|
|
110
163
|
visible?: boolean;
|
|
111
164
|
className?: string;
|
|
112
165
|
titleId?: string;
|
|
166
|
+
titleRef?: RefObject_2<HTMLHeadingElement>;
|
|
113
167
|
};
|
|
114
168
|
|
|
115
169
|
declare type CameraOverlayProps = {
|
|
@@ -148,6 +202,13 @@ declare type CaptureFooterProps = {
|
|
|
148
202
|
captureButtonRef?: Ref<HTMLButtonElement>;
|
|
149
203
|
encryptionLabel?: string;
|
|
150
204
|
children?: ComponentChildren;
|
|
205
|
+
/**
|
|
206
|
+
* Hides the help button and the manual-capture button/section, keeping
|
|
207
|
+
* only the encryption label — for surfaces where there's nothing left
|
|
208
|
+
* for the user to act on (e.g. the `uxp_idc_exp05_show_result` live
|
|
209
|
+
* post-capture overlay while the upload is in flight).
|
|
210
|
+
*/
|
|
211
|
+
hideActions?: boolean;
|
|
151
212
|
};
|
|
152
213
|
|
|
153
214
|
declare type CaptureProps = {
|
|
@@ -158,7 +219,6 @@ declare type CaptureProps = {
|
|
|
158
219
|
declare type CaptureProps_2 = {
|
|
159
220
|
manager: IdCaptureManager;
|
|
160
221
|
state: CaptureState_2;
|
|
161
|
-
onFinish?: () => void;
|
|
162
222
|
};
|
|
163
223
|
|
|
164
224
|
declare type CaptureState = Extract<SelfieState, {
|
|
@@ -258,6 +318,35 @@ declare type CloseIconProps = {
|
|
|
258
318
|
fillColor?: string;
|
|
259
319
|
};
|
|
260
320
|
|
|
321
|
+
/**
|
|
322
|
+
* A module `config` intersected with the per-instance override maps. Typed at
|
|
323
|
+
* the UI boundary so core config types (e.g. `IdCaptureConfig`) stay untouched;
|
|
324
|
+
* `FlowConfig` also declares the maps directly.
|
|
325
|
+
*/
|
|
326
|
+
declare type ConfigWithOverrides<TConfig> = TConfig & InstanceOverrides;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Full-screen "no internet connection" state, shown whenever a backend request
|
|
330
|
+
* fails due to lost connectivity. Flow-agnostic and cross-cutting — any module
|
|
331
|
+
* can render it on a connectivity failure — so it lives in `shared/` rather
|
|
332
|
+
* than inside a single module. Composes the shared `StatusPage` primitive
|
|
333
|
+
* (icon + title + subtitle + actions) so it stays visually consistent with the
|
|
334
|
+
* rest of the status/result screens. Copy defaults to the shared
|
|
335
|
+
* `connectionError.*` namespace and can be overridden per caller.
|
|
336
|
+
*/
|
|
337
|
+
export declare const ConnectionError: FC<ConnectionErrorProps>;
|
|
338
|
+
|
|
339
|
+
declare type ConnectionErrorProps = {
|
|
340
|
+
/** Invoked by the primary action. Typically `() => window.location.reload()`. */
|
|
341
|
+
onRefresh: () => void;
|
|
342
|
+
/** Overrides the default connectivity title copy. */
|
|
343
|
+
title?: string;
|
|
344
|
+
/** Overrides the default connectivity subtitle copy. */
|
|
345
|
+
subtitle?: string;
|
|
346
|
+
/** Overrides the default refresh button label. */
|
|
347
|
+
refreshLabel?: string;
|
|
348
|
+
};
|
|
349
|
+
|
|
261
350
|
export declare const countries: CountryData[];
|
|
262
351
|
|
|
263
352
|
declare type CountryData = {
|
|
@@ -314,6 +403,12 @@ declare type DropdownOption = {
|
|
|
314
403
|
ariaLabel?: string;
|
|
315
404
|
};
|
|
316
405
|
|
|
406
|
+
export declare const EllipseIcon: FC<EllipseIconProps>;
|
|
407
|
+
|
|
408
|
+
declare type EllipseIconProps = {
|
|
409
|
+
size?: number | string;
|
|
410
|
+
};
|
|
411
|
+
|
|
317
412
|
export declare const ErrorContent: ({ title, description, attemptsRemaining, onButtonClick, "data-testid": testId, }: ErrorContentProps) => JSX.Element;
|
|
318
413
|
|
|
319
414
|
declare type ErrorContentProps = {
|
|
@@ -330,6 +425,18 @@ declare type ErrorIconProps = {
|
|
|
330
425
|
size?: number | string;
|
|
331
426
|
};
|
|
332
427
|
|
|
428
|
+
export declare const EyeIcon: FC<EyeIconProps>;
|
|
429
|
+
|
|
430
|
+
declare type EyeIconProps = {
|
|
431
|
+
size?: number | string;
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
export declare const EyeOffIcon: FC<EyeOffIconProps>;
|
|
435
|
+
|
|
436
|
+
declare type EyeOffIconProps = {
|
|
437
|
+
size?: number | string;
|
|
438
|
+
};
|
|
439
|
+
|
|
333
440
|
export declare const FileIcon: FC<FileIconProps>;
|
|
334
441
|
|
|
335
442
|
declare type FileIconProps = {
|
|
@@ -357,6 +464,7 @@ declare type FormFieldProps = {
|
|
|
357
464
|
readonly?: boolean;
|
|
358
465
|
maxLength?: number;
|
|
359
466
|
disabled?: boolean;
|
|
467
|
+
autoComplete?: string;
|
|
360
468
|
/**
|
|
361
469
|
* Pre-translated text rendered next to the label (e.g. "(optional)").
|
|
362
470
|
* Forms derive this via the majority rule (`getRequiredHintMode` +
|
|
@@ -453,12 +561,16 @@ declare type IncodeFinishMeta = {
|
|
|
453
561
|
sdkOwnsTerminalScreen?: boolean;
|
|
454
562
|
};
|
|
455
563
|
|
|
456
|
-
export declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
564
|
+
export declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
457
565
|
/**
|
|
458
566
|
* Module configuration required to render the flow.
|
|
459
567
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
568
|
+
*
|
|
569
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
570
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
571
|
+
* element only and are ignored by the core manager.
|
|
460
572
|
*/
|
|
461
|
-
config?:
|
|
573
|
+
config?: TConfigInput;
|
|
462
574
|
/**
|
|
463
575
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
464
576
|
*/
|
|
@@ -501,6 +613,7 @@ declare type InputComposedProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'i
|
|
|
501
613
|
label?: string;
|
|
502
614
|
labelHint?: string;
|
|
503
615
|
error?: string;
|
|
616
|
+
invalid?: boolean;
|
|
504
617
|
helper?: string;
|
|
505
618
|
showErrorIcon?: boolean;
|
|
506
619
|
showHelperIcon?: boolean;
|
|
@@ -516,6 +629,18 @@ declare type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'class' |
|
|
|
516
629
|
'data-has-value'?: boolean;
|
|
517
630
|
};
|
|
518
631
|
|
|
632
|
+
/**
|
|
633
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
634
|
+
*
|
|
635
|
+
* These ride on the module's `config` prop and are published once at the
|
|
636
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
637
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
638
|
+
*/
|
|
639
|
+
declare type InstanceOverrides = {
|
|
640
|
+
assets?: AssetOverrides;
|
|
641
|
+
animations?: AnimationOverrides;
|
|
642
|
+
};
|
|
643
|
+
|
|
519
644
|
export declare function LandscapeBlocker(): VNode | null;
|
|
520
645
|
|
|
521
646
|
export { LightningIcon }
|
|
@@ -704,6 +829,26 @@ declare type PageProps = {
|
|
|
704
829
|
'data-permission-status'?: string;
|
|
705
830
|
};
|
|
706
831
|
|
|
832
|
+
export declare const PasswordInputComposed: FunctionalComponent<PropsWithoutRef<PasswordInputComposedProps> & {
|
|
833
|
+
ref?: Ref<HTMLInputElement> | undefined;
|
|
834
|
+
}>;
|
|
835
|
+
|
|
836
|
+
export declare type PasswordInputComposedProps = Omit<InputComposedProps, 'type' | 'closeButton' | 'rightIcon'> & {
|
|
837
|
+
showPasswordAriaLabel: string;
|
|
838
|
+
hidePasswordAriaLabel: string;
|
|
839
|
+
defaultVisible?: boolean;
|
|
840
|
+
requirementsHeading?: string;
|
|
841
|
+
requirements?: PasswordRequirement[];
|
|
842
|
+
requirementMetLabel?: string;
|
|
843
|
+
requirementUnmetLabel?: string;
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
export declare type PasswordRequirement = {
|
|
847
|
+
key: string;
|
|
848
|
+
label: string;
|
|
849
|
+
met: boolean;
|
|
850
|
+
};
|
|
851
|
+
|
|
707
852
|
declare const Permissions_2: FC<PermissionsProps>;
|
|
708
853
|
export { Permissions_2 as Permissions }
|
|
709
854
|
|
|
@@ -785,10 +930,10 @@ declare type RadioButtonComposedProps = Omit<InputHTMLAttributes<HTMLInputElemen
|
|
|
785
930
|
helper?: string;
|
|
786
931
|
showErrorIcon?: boolean;
|
|
787
932
|
class?: string;
|
|
933
|
+
textSize?: TextSize;
|
|
788
934
|
'aria-label'?: string;
|
|
789
935
|
'aria-labelledby'?: string;
|
|
790
936
|
'aria-describedby'?: string;
|
|
791
|
-
'aria-invalid'?: boolean;
|
|
792
937
|
};
|
|
793
938
|
|
|
794
939
|
export declare const RadioGroupComposed: FunctionalComponent<PropsWithoutRef<RadioGroupComposedProps> & {
|
|
@@ -894,6 +1039,9 @@ declare type SuccessIconProps = {
|
|
|
894
1039
|
size?: number | string;
|
|
895
1040
|
};
|
|
896
1041
|
|
|
1042
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
1043
|
+
export declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
1044
|
+
|
|
897
1045
|
export declare const TextArea: FunctionalComponent<PropsWithoutRef<TextAreaProps> & {
|
|
898
1046
|
ref?: Ref<HTMLTextAreaElement> | undefined;
|
|
899
1047
|
}>;
|
|
@@ -918,6 +1066,8 @@ declare type TextAreaProps = Omit<JSX.IntrinsicElements['textarea'], 'class'> &
|
|
|
918
1066
|
class?: string;
|
|
919
1067
|
};
|
|
920
1068
|
|
|
1069
|
+
declare type TextSize = 'M' | 'S';
|
|
1070
|
+
|
|
921
1071
|
export declare const Title: FunctionalComponent<PropsWithoutRef<TitleProps> & {
|
|
922
1072
|
ref?: Ref<HTMLHeadingElement> | undefined;
|
|
923
1073
|
}>;
|
|
@@ -962,6 +1112,8 @@ export declare type UiConfig = {
|
|
|
962
1112
|
subtitle?: string;
|
|
963
1113
|
hideHeader?: boolean;
|
|
964
1114
|
hideFooterBranding?: boolean;
|
|
1115
|
+
assets?: AssetOverrides;
|
|
1116
|
+
animations?: AnimationOverrides;
|
|
965
1117
|
};
|
|
966
1118
|
|
|
967
1119
|
/**
|
|
@@ -1,34 +1,68 @@
|
|
|
1
|
+
import { DeepPartial } from '@incodetech/core/flow';
|
|
1
2
|
import { FaceMatchConfig } from '@incodetech/core/face-match';
|
|
3
|
+
import { FaceMatchManager } from '@incodetech/core/face-match';
|
|
2
4
|
import { FC } from 'preact/compat';
|
|
5
|
+
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { SVGProps } from 'preact/compat';
|
|
3
7
|
|
|
4
8
|
/**
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* -
|
|
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.
|
|
11
15
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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.
|
|
23
35
|
*
|
|
24
|
-
*
|
|
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.
|
|
25
40
|
*/
|
|
26
|
-
|
|
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;
|
|
57
|
+
|
|
58
|
+
export declare const FaceMatch: FC<Omit<FaceMatchProps, "config"> & {
|
|
59
|
+
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
60
|
+
}>;
|
|
27
61
|
|
|
28
62
|
/**
|
|
29
63
|
* Props for the FaceMatch component
|
|
30
64
|
*/
|
|
31
|
-
declare type FaceMatchProps = IncodeModuleProps<FaceMatchConfig>;
|
|
65
|
+
declare type FaceMatchProps = IncodeModuleProps<FaceMatchConfig, void, FaceMatchManager>;
|
|
32
66
|
|
|
33
67
|
/**
|
|
34
68
|
* Extra context passed to `onFinish` alongside the result. Lets a host decide
|
|
@@ -50,12 +84,16 @@ declare type IncodeFinishMeta = {
|
|
|
50
84
|
sdkOwnsTerminalScreen?: boolean;
|
|
51
85
|
};
|
|
52
86
|
|
|
53
|
-
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
87
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
54
88
|
/**
|
|
55
89
|
* Module configuration required to render the flow.
|
|
56
90
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
91
|
+
*
|
|
92
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
93
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
94
|
+
* element only and are ignored by the core manager.
|
|
57
95
|
*/
|
|
58
|
-
config?:
|
|
96
|
+
config?: TConfigInput;
|
|
59
97
|
/**
|
|
60
98
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
61
99
|
*/
|
|
@@ -81,4 +119,28 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
|
81
119
|
onError?: (error: string | undefined, errorCode?: number, moduleErrorCode?: string) => void;
|
|
82
120
|
};
|
|
83
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
124
|
+
*
|
|
125
|
+
* These ride on the module's `config` prop and are published once at the
|
|
126
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
127
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
128
|
+
*/
|
|
129
|
+
declare type InstanceOverrides = {
|
|
130
|
+
assets?: AssetOverrides;
|
|
131
|
+
animations?: AnimationOverrides;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
declare type LottieAnimationData = {
|
|
135
|
+
fr: number;
|
|
136
|
+
v: string;
|
|
137
|
+
ip: number;
|
|
138
|
+
op: number;
|
|
139
|
+
w: number;
|
|
140
|
+
h: number;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
144
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
145
|
+
|
|
84
146
|
export { }
|
|
@@ -1,8 +1,63 @@
|
|
|
1
|
+
import { DeepPartial } from '@incodetech/core/flow';
|
|
1
2
|
import { FC } from 'preact/compat';
|
|
2
3
|
import { FieldComparisonConfig } from '@incodetech/core/field-comparison';
|
|
3
4
|
import { FieldComparisonManager } from '@incodetech/core/field-comparison';
|
|
5
|
+
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { SVGProps } from 'preact/compat';
|
|
4
7
|
|
|
5
|
-
|
|
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;
|
|
57
|
+
|
|
58
|
+
export declare const FieldComparison: FC<Omit<FieldComparisonProps, "config"> & {
|
|
59
|
+
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
60
|
+
}>;
|
|
6
61
|
|
|
7
62
|
declare type FieldComparisonProps = IncodeModuleProps<FieldComparisonConfig, void, FieldComparisonManager>;
|
|
8
63
|
|
|
@@ -26,12 +81,16 @@ declare type IncodeFinishMeta = {
|
|
|
26
81
|
sdkOwnsTerminalScreen?: boolean;
|
|
27
82
|
};
|
|
28
83
|
|
|
29
|
-
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown
|
|
84
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
30
85
|
/**
|
|
31
86
|
* Module configuration required to render the flow.
|
|
32
87
|
* For Web Components, this is typically assigned via `element.config = ...`.
|
|
88
|
+
*
|
|
89
|
+
* Also carries optional per-instance `assets`/`animations` override maps;
|
|
90
|
+
* they override the global `setup({ uiConfig })` values for this
|
|
91
|
+
* element only and are ignored by the core manager.
|
|
33
92
|
*/
|
|
34
|
-
config?:
|
|
93
|
+
config?: TConfigInput;
|
|
35
94
|
/**
|
|
36
95
|
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
37
96
|
*/
|
|
@@ -57,4 +116,28 @@ declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown> = {
|
|
|
57
116
|
onError?: (error: string | undefined, errorCode?: number, moduleErrorCode?: string) => void;
|
|
58
117
|
};
|
|
59
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Per-instance asset/animation overrides for a single mounted SDK module.
|
|
121
|
+
*
|
|
122
|
+
* These ride on the module's `config` prop and are published once at the
|
|
123
|
+
* module root by `registerIncodeModuleElement`, so a deep `<Asset>`/`<AnimatedAsset>`
|
|
124
|
+
* reads them via {@link useInstanceOverrides} without any prop drilling.
|
|
125
|
+
*/
|
|
126
|
+
declare type InstanceOverrides = {
|
|
127
|
+
assets?: AssetOverrides;
|
|
128
|
+
animations?: AnimationOverrides;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
declare type LottieAnimationData = {
|
|
132
|
+
fr: number;
|
|
133
|
+
v: string;
|
|
134
|
+
ip: number;
|
|
135
|
+
op: number;
|
|
136
|
+
w: number;
|
|
137
|
+
h: number;
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
141
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
142
|
+
|
|
60
143
|
export { }
|