@incodetech/web 2.2.0 → 2.3.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/THIRD_PARTY_NOTICES.txt +398 -0
- package/dist/ae-signature/ae-signature.es.js +4 -4
- package/dist/af-ZA-CiGNWICE.js +3043 -0
- package/dist/am-C5YehVGG.js +3043 -0
- package/dist/antifraud/antifraud.es.js +4 -4
- package/dist/ar-AE-BMJuIKTB.js +3059 -0
- package/dist/ar-CUw7KMHb.js +3059 -0
- package/dist/ar-EG-ojf2Ene5.js +3059 -0
- package/dist/assets/dm-sans-latin-400-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-500-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-600-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-700-normal.woff2 +0 -0
- package/dist/assets/rethink-sans-latin-800-normal.woff2 +0 -0
- package/dist/authentication/authentication.es.js +15 -11
- package/dist/{autoFocusTitle-DB-23sv_.js → autoFocusTitle-CVjuQOGZ.js} +2 -2
- package/dist/az-DsqjgKhY.js +3043 -0
- package/dist/{back-horizontal-hint-CjdigFZj.js → back-horizontal-hint-UQ7Nof6k.js} +1 -1
- package/dist/{back-vertical-hint-OhaKsINF.js → back-vertical-hint-Crc8ybfk.js} +1 -1
- package/dist/base.css +917 -283
- package/dist/baseTutorial-BM2Ho3QZ.js +172 -0
- package/dist/bn-Bbn6O_i2.js +3043 -0
- package/dist/bottomSheet-Cixb81_b.js +101 -0
- package/dist/bs-CYW5eATI.js +3047 -0
- package/dist/ca-D5u2Z71o.js +3043 -0
- package/dist/cameraOverlay-MpL3OBQu.js +2 -0
- package/dist/cameraOverlayHeader-BarDrIC9.js +43 -0
- package/dist/cameraView-BNqv7JUh.js +49 -0
- package/dist/captureFooter-De74TCQi.js +67 -0
- package/dist/ceb-tXsl4nyX.js +3043 -0
- package/dist/certificate-issuance/certificate-issuance.es.js +19 -14
- package/dist/certificate-issuance/styles.css.js +1 -0
- package/dist/{checkbox-FGA-Ij-D.js → checkbox-BR-RTI4R.js} +9 -8
- package/dist/{connectionError-BurQq_4R.js → connectionError-Haw33Di8.js} +4 -4
- package/dist/consent/consent.es.js +26 -33
- package/dist/consent/styles.css +4 -4
- package/dist/consent/styles.css.js +1 -0
- package/dist/countries-5e8kwG_m.js +8560 -0
- package/dist/{countrySelector-COZ7XQHp.js → countrySelector-Zbe2eGzy.js} +8 -10
- package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
- package/dist/cs-CZ-BUx_DNTa.js +3051 -0
- package/dist/cs-D_6Vg3XS.js +3051 -0
- package/dist/curp-validation/curp-validation.es.js +15 -22
- package/dist/curp-validation/styles.css.js +1 -0
- package/dist/custom-fields/styles.css.js +1 -0
- package/dist/{customFields-rVMTo1Yu.js → customFields-CEFWn2wC.js} +44 -19
- package/dist/{customWatchlist-DgpXtVRf.js → customWatchlist-Xn3d-zbf.js} +14 -11
- package/dist/da-DK-CsmjiCBo.js +3043 -0
- package/dist/{dashboardTheme-BUDq5UYs.js → dashboardTheme-B_YjGFDU.js} +31 -7
- package/dist/dateInputComposed-0tUVTT0_.js +1 -0
- package/dist/{dateInputComposed-DSgV0wnb.js → dateInputComposed-ByhgHDX8.js} +5 -5
- package/dist/de-BsJlhx6J.js +3043 -0
- package/dist/{manualCaptureButton-D58WsS-x.js → denied-CB1v3PyY.js} +270 -233
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +4 -4
- package/dist/document-capture/styles.css.js +1 -0
- package/dist/{documentCapture-sZj09g0I.js → documentCapture-Cj8G5Wgb.js} +16 -17
- package/dist/documentCapture-D0o4Xh1J.js +2 -0
- package/dist/dropdownComposed-BsEtJjhn.js +1 -0
- package/dist/{dropdownComposed-CEegNzG4.js → dropdownComposed-DptsxuHA.js} +9 -9
- package/dist/{dynamicForms-t3vepXqJ.js → dynamic-forms/dynamic-forms.es.js} +24 -19
- package/dist/dynamic-forms/styles.css +5 -0
- package/dist/dynamic-forms/styles.css.js +1 -0
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +15 -13
- package/dist/ekyb/styles.css.js +1 -0
- package/dist/ekybModule-B-gioC08.js +2 -0
- package/dist/{ekybModule-Dvkf5WAr.js → ekybModule-DqA0hfNQ.js} +17 -30
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +17 -16
- package/dist/ekyc/styles.css.js +1 -0
- package/dist/ekycModule-CjkpPQ3f.js +2 -0
- package/dist/{ekycModule-C5QXVGP7.js → ekycModule-bRC6FW2H.js} +14 -29
- package/dist/el-Dq-L-4X5.js +3043 -0
- package/dist/el-GR-c9roJIs_.js +3043 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/electronic-signature/styles.css +62 -2
- package/dist/electronic-signature/styles.css.js +1 -0
- package/dist/{electronic-signature-CyE8F7LZ.js → electronic-signature-DRMdCzdF.js} +65 -18
- package/dist/email/email.es.js +9 -8
- package/dist/email/styles.css.js +1 -0
- package/dist/{emailInput-CsT8_C01.js → emailInput-Dz8ukhAE.js} +4 -4
- package/dist/en-CmZT05w8.js +3043 -0
- package/dist/en-DG-BQHfwiXE.js +3043 -0
- package/dist/errorContent-aJuo21I4.js +58 -0
- package/dist/es-419-CoqfXTDl.js +3043 -0
- package/dist/es-DXFWBB40.js +3043 -0
- package/dist/es-ES-TOSb7vSR.js +3043 -0
- package/dist/es-MX-CpubyuFB.js +3043 -0
- package/dist/et-dg12JfIX.js +3043 -0
- package/dist/{expiredId-BQ1uPh7b.js → expiredId-BPgVum6e.js} +22 -27
- package/dist/extensibility.es.js +701 -24
- package/dist/fa-IR-TKcZgrd1.js +3043 -0
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +76 -40
- package/dist/face-match/styles.css.js +1 -0
- package/dist/{faceMatch-Rf-MMdto.js → faceMatch-BcScQR2O.js} +7 -8
- package/dist/faceMatch-BvaN_Ggn.js +2 -0
- package/dist/fi-FI-BP9vgY5F.js +3043 -0
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/field-comparison/styles.css +12 -0
- package/dist/field-comparison/styles.css.js +1 -0
- package/dist/fieldComparison-D4YoXJKX.js +2 -0
- package/dist/{fieldComparison-BnGj3nNp.js → fieldComparison-UKZsi875.js} +27 -11
- package/dist/fieldLabelHint-CxjArYkQ.js +16 -0
- package/dist/{finalSuccessScreen-B9uB3bST.js → finalSuccessScreen-7OX0TdIz.js} +13 -14
- package/dist/fiscal-qr/fiscal-qr.es.js +28 -9
- package/dist/fiscal-qr/styles.css +13 -1
- package/dist/fiscal-qr/styles.css.js +1 -0
- package/dist/{extensibility-C5XqL_A3.js → flipAnimation-BwI4pEJc.js} +608 -1005
- package/dist/flow/flow.es.js +308 -62
- package/dist/flow/shell/styles.css +402 -0
- package/dist/flow/shell/styles.css.js +1 -0
- package/dist/flow/styles.css +582 -312
- package/dist/formField-DWExlgnz.js +60 -0
- package/dist/fr-B4LoNDGy.js +3047 -0
- package/dist/fr-CA-CjN8CDsE.js +3047 -0
- package/dist/{front-horizontal-hint-Bhz1rq-w.js → front-horizontal-hint-mgovnJf3.js} +1 -1
- package/dist/{front-vertical-hint-C4FC1ksx.js → front-vertical-hint-qXMVdLri.js} +1 -1
- package/dist/geolocation/geolocation.es.js +9 -9
- package/dist/geolocation/styles.css +4 -4
- package/dist/geolocation/styles.css.js +1 -0
- package/dist/government-validation/government-validation.es.js +38 -86
- package/dist/government-validation/styles.css +2 -38
- package/dist/government-validation/styles.css.js +1 -0
- package/dist/he-CJNS0xku.js +3051 -0
- package/dist/hi-CoHu7PnX.js +3043 -0
- package/dist/hmn-qubMIB6T.js +3043 -0
- package/dist/{homeScreen-Bv9mUUOF.js → homeScreen-CqLbJbhW.js} +8 -7
- package/dist/hr-N3Dy9ndd.js +3047 -0
- package/dist/ht-iHGiGZhO.js +3043 -0
- package/dist/hu-hlQUlAJs.js +3043 -0
- package/dist/{icons-ChHV5iHi.js → icons-DNXYxUPA.js} +99 -11
- package/dist/id/id.es.js +576 -62
- package/dist/id/styles.css +114 -45
- package/dist/id/styles.css.js +1 -0
- package/dist/id-Dhk7ywrq.js +3037 -0
- package/dist/{id-back-of-card-C4XViC7W.js → id-back-of-card-B6EcmiCs.js} +1 -1
- package/dist/{id-back-of-card-vertical-DCz0rj8m.js → id-back-of-card-vertical-B3FXhPpj.js} +1 -1
- package/dist/{id-front-of-card-CUA1ocVF.js → id-front-of-card-V_BlLaZr.js} +1 -1
- package/dist/{id-front-of-card-vertical-Ddm_BwD3.js → id-front-of-card-vertical-CuZjL8kc.js} +1 -1
- package/dist/id-ocr/styles.css.js +1 -0
- package/dist/id-selfie-flow/id-selfie-flow.es.js +10 -9
- package/dist/id-selfie-flow/styles.css +40 -8
- package/dist/id-verification/id-verification.es.js +5 -5
- package/dist/{idOcr-Da1-2sWY.js → idOcr-Bt0V72id.js} +13 -16
- package/dist/identity-reuse/identity-reuse.es.js +8 -113
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-DeIDDejm.js → incode-logo-BzJOZr3f.js} +1 -64
- package/dist/{incodeComponent-BtFz-bx2.js → incodeComponent-DeVV0gEn.js} +192 -22
- package/dist/{incodeModule-9K8KUs61.js → incodeModule-Do8qpZk7.js} +3 -3
- package/dist/index.es.js +4 -3
- package/dist/{inputComposed-C2zTEXsp.js → inputComposed-9aPipTS_.js} +9 -9
- package/dist/inputComposed-DZokKK4c.js +1 -0
- package/dist/it-CXYuJ5BQ.js +3043 -0
- package/dist/ja-B5OkMrWD.js +3037 -0
- package/dist/ja-JP-SlPp7xE2.js +3037 -0
- package/dist/jv-DduD6MhM.js +3037 -0
- package/dist/ka-CG2wabuB.js +3043 -0
- package/dist/kk-D984nBRQ.js +3043 -0
- package/dist/km-B-DaaNxL.js +3037 -0
- package/dist/ko-B8I6YPOu.js +3037 -0
- package/dist/ko-KP-BTQZdVex.js +3037 -0
- package/dist/ky-p_wAYlXq.js +3043 -0
- package/dist/lo-CS-RhXrt.js +3037 -0
- package/dist/lt-C1yAMYTU.js +3051 -0
- package/dist/lv-CiHCsaN9.js +3047 -0
- package/dist/{mandatoryConsent-CxShVycM.js → mandatoryConsent-BJcDf3s-.js} +10 -7
- package/dist/manualCaptureButton-2RTC1vZC.js +63 -0
- package/dist/{manualCaptureButton-DzJFIEfu.js → manualCaptureButton-CqwPCE8h.js} +10 -55
- package/dist/mk-VumecXcv.js +3043 -0
- package/dist/mn-DGMJpCs6.js +3043 -0
- package/dist/{modal-BH2wi8Q0.js → modal-H_YHBjxJ.js} +7 -6
- package/dist/{modal.hooks-DcakflQ4.js → modal.hooks-B0Wrc9s2.js} +7 -1
- package/dist/ms-CBk2NkZ1.js +3037 -0
- package/dist/my-BWcPvvs5.js +3037 -0
- package/dist/nb-NO-D7azau2s.js +3043 -0
- package/dist/ne-D9CU-qx6.js +3043 -0
- package/dist/nl-BVhLZVXm.js +3043 -0
- package/dist/{numberedStep-DqtXyT11.js → numberedStep-C8e_uPaz.js} +1 -1
- package/dist/{optionAccessibleLabel-C5iZCrlq.js → optionAccessibleLabel-C0BRq4LF.js} +6 -6
- package/dist/{otpInput-CvPR3ZpP.js → otpInput-C8mlw_Cm.js} +8 -83
- package/dist/{passport-horizontal-hint-DzkhjC8Q.js → passport-horizontal-hint-6Ghn2EEN.js} +1 -1
- package/dist/{passport-vertical-hint-Bd0BQn2Y.js → passport-vertical-hint-UPFFpdf4.js} +1 -1
- package/dist/passwordInputComposed-CDbxJKHR.js +74 -0
- package/dist/{pdf-BUoY_2gv.js → pdf-CFubyG0B.js} +1 -1
- package/dist/pdfViewer-CCu7pBQv.js +2 -0
- package/dist/{pdfViewer-TTZmPABh.js → pdfViewer-DTwxqwSD.js} +4 -4
- package/dist/permissions-B0ctl0V9.js +212 -0
- package/dist/phone/phone.es.js +10 -9
- package/dist/phone/styles.css +1 -1
- package/dist/phone/styles.css.js +1 -0
- package/dist/{phoneInputComposed-byyszNoS.js → phoneInputComposed-Bz37hY_u.js} +20 -8412
- package/dist/pl-DWKpY783.js +3051 -0
- package/dist/{processing-B2eaSGLu.js → processing-CrNgzN1u.js} +2 -2
- package/dist/pt-B2_-n4Z3.js +3043 -0
- package/dist/pt-BR-CC8MxgMX.js +3043 -0
- package/dist/pt-PT-vo9--bzz.js +3043 -0
- package/dist/qe-signature/qe-signature.es.js +4 -4
- package/dist/radioGroupComposed-BFzxJVpZ.js +1 -0
- package/dist/{radioGroupComposed-DQzTWutW.js → radioGroupComposed-BrawV4FU.js} +15 -71
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +34 -178
- package/dist/redirect-to-mobile/styles.css +2 -27
- package/dist/redirect-to-mobile/styles.css.js +1 -0
- package/dist/{registerIncodeElement-DW2PE_DX.js → registerIncodeElement-CbZczi4S.js} +1 -1
- package/dist/resendTimer-C0HqF9VE.js +79 -0
- package/dist/{useModuleLoader-DxOEZ0vn.js → resolveApiKey-DU0APKTv.js} +70 -222
- package/dist/{richText-CEwM8jib.js → richText-BEuqr0as.js} +9 -9
- package/dist/ro-DOhwcTr3.js +3047 -0
- package/dist/ru-CD71PeIH.js +3051 -0
- package/dist/ru-RU-DLHiNY0O.js +3051 -0
- package/dist/selfie/selfie.es.js +184 -8
- package/dist/selfie/styles.css +225 -36
- package/dist/selfie/styles.css.js +1 -0
- package/dist/signature/signature.es.js +8 -9
- package/dist/signature/styles.css.js +1 -0
- package/dist/sk-DaVWjX4k.js +3051 -0
- package/dist/sl-YiCpfUol.js +3051 -0
- package/dist/smsTabContent-C1C1g4GT.js +172 -0
- package/dist/so-B2bRmOT5.js +3043 -0
- package/dist/{spacer-DLEDuWEx.js → spacer-DZ-t7RMQ.js} +10 -10
- package/dist/spinner-hjbTcmA1.js +88 -0
- package/dist/sr-BbjKCO-a.js +3047 -0
- package/dist/sr-Latn-D-xKaOqV.js +3047 -0
- package/dist/sr-YU-1ULH6b8i.js +3047 -0
- package/dist/{statusPage-BF4qGjF3.js → statusPage-DeP-KBHD.js} +4 -4
- package/dist/sv-SE-5wAQ-CsE.js +3043 -0
- package/dist/sw-DVj-0--U.js +3043 -0
- package/dist/{tabs-BGL1oRLb.js → tabs-C8WsKO4V.js} +2 -2
- package/dist/th-TH-DAqLZmwn.js +3037 -0
- package/dist/th-ubpxty9O.js +3037 -0
- package/dist/themes/dark.css +125 -0
- package/dist/themes/light.css +124 -0
- package/dist/tl-DCL6tS5T.js +3043 -0
- package/dist/tl-PH-Wftt86RZ.js +3043 -0
- package/dist/tr-B58sWy89.js +3043 -0
- package/dist/{tutorial-LQuJ4dse.js → tutorial-BP1F722m.js} +40 -226
- package/dist/types/certificate-issuance.d.ts +4 -4
- package/dist/types/dynamic-forms.d.ts +177 -0
- package/dist/types/extensibility.d.ts +75 -23
- package/dist/types/flow.d.ts +37 -0
- package/dist/types/government-validation.d.ts +2 -1
- package/dist/types/index.d.ts +28 -4
- package/dist/types/video-selfie.d.ts +6 -161
- package/dist/typography-CYO7ELEl.js +53 -0
- package/dist/{uiConfig-Dqnjankd.js → uiConfig-BcjOx3PY.js} +184 -8
- package/dist/uk-BaklGIxd.js +3051 -0
- package/dist/uk-UA-BoawOp_y.js +3051 -0
- package/dist/ur-MYw3j3wD.js +3043 -0
- package/dist/useModuleLoader-DpcbSKBH.js +176 -0
- package/dist/uz-DWfToWrZ.js +3043 -0
- package/dist/{vendor-preact-BPXMFRom.js → vendor-preact-C0jX1Cbq.js} +68 -181
- package/dist/{verificationResult-q_zD_Pxh.js → verificationResult-Bre5Fb7M.js} +32 -25
- package/dist/vi-IY_487Pk.js +3037 -0
- package/dist/video-selfie/styles.css +51 -17
- package/dist/video-selfie/styles.css.js +1 -0
- package/dist/video-selfie/video-selfie.es.js +35 -23
- package/dist/watchlist/watchlist.es.js +7 -7
- package/dist/watchlist-for-business/styles.css.js +1 -0
- package/dist/{watchlistForBusiness-C_zqdY4P.js → watchlistForBusiness-BIrl-mYj.js} +28 -16
- package/dist/workflow/styles.css +1073 -356
- package/dist/workflow/workflow.es.js +17 -15
- package/dist/zh-B1yRDjHf.js +3037 -0
- package/dist/zh-CN-B2Yvvabk.js +3037 -0
- package/dist/zh-HANT-CdNxQtKM.js +3037 -0
- package/dist/zh-TW-BgqFmnMA.js +3037 -0
- package/package.json +32 -22
- package/dist/bottomSheet-BWEUBq8m.js +0 -38
- package/dist/dateInputComposed-BGC37jC7.js +0 -1
- package/dist/documentCapture-CO9kIxru.js +0 -2
- package/dist/dropdownComposed-Bf4EcKFw.js +0 -1
- package/dist/ekybModule-uN0ComAn.js +0 -2
- package/dist/ekycModule-B7KRJ7l3.js +0 -2
- package/dist/faceMatch-DjD2hgBp.js +0 -2
- package/dist/fieldComparison-DFH4hUM_.js +0 -2
- package/dist/inputComposed-kKtrvJU5.js +0 -1
- package/dist/pdfViewer-C1B-07Wu.js +0 -2
- package/dist/requiredLabelHint-Dx0WS2cR.js +0 -17
- package/dist/snackbar-eBOj46AK.js +0 -16
- package/dist/spinner-CJCOHUKx.js +0 -95
- package/dist/successIcon-DS8BLsgy.js +0 -30
- package/dist/types/dynamic-forms/styles.d.ts +0 -1
- /package/dist/{aligndevicelottie-CfoZ5Uus.js → aligndevicelottie-B12hbVhG.js} +0 -0
- /package/dist/{back-tutorial-BHyRHyET.js → back-tutorial-XdmQ0Wml.js} +0 -0
- /package/dist/{backdevicelottie-yKkczgFy.js → backdevicelottie-m_DOD8xE.js} +0 -0
- /package/dist/{blurdevicelottie-8BbophdM.js → blurdevicelottie-DQo_hTMD.js} +0 -0
- /package/dist/{browser-ponyfill-CBjGwwPW.js → browser-ponyfill-ZkeBm4ji.js} +0 -0
- /package/dist/{defineProperty-BbpBna-2.js → defineProperty-BojnCa44.js} +0 -0
- /package/dist/{flip-animation-CvN8FLNc.js → flip-animation-VicedlT5.js} +0 -0
- /package/dist/{frontdevicelottie-CFcahVLk.js → frontdevicelottie-CyIerlMv.js} +0 -0
- /package/dist/{glaredevicelottie-Cnvah0kz.js → glaredevicelottie-QM2C6Ivp.js} +0 -0
- /package/dist/{id-laser-h-BaUHzX-d.js → id-laser-h-B0-iXcvl.js} +0 -0
- /package/dist/{id-laser-v-Dv9yEYJE.js → id-laser-v-Bqh6vimi.js} +0 -0
- /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-IhmAzrIF.js} +0 -0
- /package/dist/{lottie_light-Bv56F2Ae.js → lottie_light-CzZ3CHBk.js} +0 -0
- /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-61vlloJS.js} +0 -0
- /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-BRQ2QNxQ.js} +0 -0
|
@@ -1,207 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as useAnimationData, d as cn, n as LoadingIcon,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import { t as
|
|
11
|
-
|
|
12
|
-
var ErrorContent = ({ title, description, attemptsRemaining, onButtonClick, "data-testid": testId }) => {
|
|
13
|
-
const { t } = useTranslation();
|
|
14
|
-
const noMoreAttempts = attemptsRemaining <= 0;
|
|
15
|
-
return /* @__PURE__ */ u(Modal.Root, {
|
|
16
|
-
open: true,
|
|
17
|
-
dismissible: false,
|
|
18
|
-
hasBackdrop: false,
|
|
19
|
-
class: "IncodeErrorContent",
|
|
20
|
-
children: /* @__PURE__ */ u(Modal.Content, {
|
|
21
|
-
class: "IncodeErrorContentContent",
|
|
22
|
-
children: /* @__PURE__ */ u(Page, {
|
|
23
|
-
"data-testid": testId,
|
|
24
|
-
className: "IncodeErrorContentPage",
|
|
25
|
-
children: /* @__PURE__ */ u("div", {
|
|
26
|
-
class: "IncodeErrorContentContainer",
|
|
27
|
-
children: [/* @__PURE__ */ u("div", {
|
|
28
|
-
class: "IncodeErrorContentIconContainer",
|
|
29
|
-
children: [
|
|
30
|
-
noMoreAttempts ? /* @__PURE__ */ u(ErrorIcon, { size: 32 }) : /* @__PURE__ */ u(WarningIcon, { size: 32 }),
|
|
31
|
-
/* @__PURE__ */ u(Spacer, { size: 16 }),
|
|
32
|
-
/* @__PURE__ */ u(Modal.Title, {
|
|
33
|
-
class: "IncodeErrorContentTitle",
|
|
34
|
-
children: title
|
|
35
|
-
}),
|
|
36
|
-
/* @__PURE__ */ u(Spacer, { size: 12 }),
|
|
37
|
-
/* @__PURE__ */ u(Modal.Subtitle, {
|
|
38
|
-
class: "IncodeErrorContentDescription",
|
|
39
|
-
children: description
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
}), /* @__PURE__ */ u("div", {
|
|
43
|
-
class: "IncodeErrorContentAttemptsContainer",
|
|
44
|
-
children: [
|
|
45
|
-
!noMoreAttempts ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("p", {
|
|
46
|
-
class: "IncodeErrorContentAttemptsText",
|
|
47
|
-
children: t("common.attemptsRemaining", { count: attemptsRemaining })
|
|
48
|
-
}), /* @__PURE__ */ u(Spacer, { size: 24 })] }) : null,
|
|
49
|
-
/* @__PURE__ */ u(Button, {
|
|
50
|
-
onClick: onButtonClick,
|
|
51
|
-
children: noMoreAttempts ? t("common.continue") : t("common.tryAgain")
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ u(Spacer, { size: 16 })
|
|
54
|
-
]
|
|
55
|
-
})]
|
|
56
|
-
})
|
|
57
|
-
})
|
|
58
|
-
})
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region src/shared/baseTutorial/replaceBaseTutorial.ts
|
|
63
|
-
/**
|
|
64
|
-
* The brand blues baked into the tutorial animations. The selfie oval/shoulders
|
|
65
|
-
* use `#007aff`; the ID/passport tutorials additionally use `#006aff` (the
|
|
66
|
-
* default brand blue) for their accent. Both are re-tinted to the active
|
|
67
|
-
* branding color.
|
|
68
|
-
*
|
|
69
|
-
* Authored as hex and converted to Lottie's normalized `[r, g, b]` (0–1) form.
|
|
70
|
-
* The two greens are ~0.06 apart, comfortably outside `COLOR_MATCH_TOLERANCE`,
|
|
71
|
-
* so they neither cross-match nor catch the (grayscale/white) document and
|
|
72
|
-
* face artwork.
|
|
73
|
-
*/
|
|
74
|
-
var SOURCE_BRAND_COLORS = ["#007aff", "#006aff"].map(hexToRgbUnit).filter((color) => color !== null);
|
|
75
|
-
/**
|
|
76
|
-
* Per-channel tolerance when matching a source color. The baked values are
|
|
77
|
-
* authored as rounded decimals (e.g. `0.48`), so an exact comparison is too
|
|
78
|
-
* brittle; a small tolerance keeps the match robust without catching
|
|
79
|
-
* unrelated colors.
|
|
80
|
-
*/
|
|
81
|
-
var COLOR_MATCH_TOLERANCE = .02;
|
|
82
|
-
/**
|
|
83
|
-
* Reads a CSS custom property off the document root and returns its value.
|
|
84
|
-
* Returns `fallback` (empty by default) when the property is unset or
|
|
85
|
-
* unavailable (e.g. during SSR / tests). With the default empty fallback the
|
|
86
|
-
* recolor no-ops, leaving the animation's authored colors in place — which are
|
|
87
|
-
* the default brand blue, so no theme-specific literal is needed here.
|
|
88
|
-
*/
|
|
89
|
-
function getCssVariableAsHex(variableName, fallback = "") {
|
|
90
|
-
if (typeof document === "undefined") return fallback;
|
|
91
|
-
return getComputedStyle(document.documentElement).getPropertyValue(variableName).trim() || fallback;
|
|
92
|
-
}
|
|
93
|
-
function hexToRgbUnit(hex) {
|
|
94
|
-
let normalized = hex.replace("#", "").trim();
|
|
95
|
-
if (normalized.length === 3) normalized = normalized.split("").map((char) => char + char).join("");
|
|
96
|
-
const result = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(normalized);
|
|
97
|
-
if (!result) return null;
|
|
98
|
-
return [
|
|
99
|
-
Number.parseInt(result[1], 16) / 255,
|
|
100
|
-
Number.parseInt(result[2], 16) / 255,
|
|
101
|
-
Number.parseInt(result[3], 16) / 255
|
|
102
|
-
];
|
|
103
|
-
}
|
|
104
|
-
function channelMatches(a, b) {
|
|
105
|
-
return Math.abs(a - b) <= COLOR_MATCH_TOLERANCE;
|
|
106
|
-
}
|
|
107
|
-
function isSourceColor(r, g, b) {
|
|
108
|
-
return SOURCE_BRAND_COLORS.some(([sr, sg, sb]) => channelMatches(r, sr) && channelMatches(g, sg) && channelMatches(b, sb));
|
|
109
|
-
}
|
|
110
|
-
function isStaticColorArray(value) {
|
|
111
|
-
return Array.isArray(value) && value.length >= 3 && value.every((entry) => typeof entry === "number");
|
|
112
|
-
}
|
|
113
|
-
function recolorSolid(node, target) {
|
|
114
|
-
const colorHolder = node.c;
|
|
115
|
-
if (!colorHolder || typeof colorHolder !== "object") return;
|
|
116
|
-
const k = colorHolder.k;
|
|
117
|
-
if (isStaticColorArray(k) && isSourceColor(k[0], k[1], k[2])) {
|
|
118
|
-
k[0] = target[0];
|
|
119
|
-
k[1] = target[1];
|
|
120
|
-
k[2] = target[2];
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function recolorGradient(node, target) {
|
|
124
|
-
const gradient = node.g;
|
|
125
|
-
if (!gradient || typeof gradient !== "object") return;
|
|
126
|
-
const { p, k } = gradient;
|
|
127
|
-
const stopCount = typeof p === "number" ? p : 0;
|
|
128
|
-
const stops = k?.k;
|
|
129
|
-
if (stopCount <= 0 || !Array.isArray(stops)) return;
|
|
130
|
-
for (let stop = 0; stop < stopCount; stop++) {
|
|
131
|
-
const base = stop * 4;
|
|
132
|
-
const r = stops[base + 1];
|
|
133
|
-
const g = stops[base + 2];
|
|
134
|
-
const b = stops[base + 3];
|
|
135
|
-
if (typeof r === "number" && typeof g === "number" && typeof b === "number" && isSourceColor(r, g, b)) {
|
|
136
|
-
stops[base + 1] = target[0];
|
|
137
|
-
stops[base + 2] = target[1];
|
|
138
|
-
stops[base + 3] = target[2];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
function recolorNode(node, target) {
|
|
143
|
-
if (Array.isArray(node)) {
|
|
144
|
-
for (const child of node) recolorNode(child, target);
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (!node || typeof node !== "object") return;
|
|
148
|
-
const obj = node;
|
|
149
|
-
if (obj.ty === "fl" || obj.ty === "st") recolorSolid(obj, target);
|
|
150
|
-
else if (obj.ty === "gf" || obj.ty === "gs") recolorGradient(obj, target);
|
|
151
|
-
for (const key of Object.keys(obj)) recolorNode(obj[key], target);
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Returns a deep copy of `animationData` with the baked-in brand blue swapped
|
|
155
|
-
* for `hexColor`. The input is never mutated. Unparseable colors leave the
|
|
156
|
-
* animation untouched.
|
|
157
|
-
*/
|
|
158
|
-
function replaceLottieColor(animationData, hexColor) {
|
|
159
|
-
const target = hexToRgbUnit(hexColor);
|
|
160
|
-
if (!target) return animationData;
|
|
161
|
-
const clone = JSON.parse(JSON.stringify(animationData));
|
|
162
|
-
recolorNode(clone, target);
|
|
163
|
-
return clone;
|
|
164
|
-
}
|
|
165
|
-
//#endregion
|
|
166
|
-
//#region src/shared/baseTutorial/baseTutorial.tsx
|
|
167
|
-
var BaseTutorial = ({ className = "", animationData, title, titleId, subtitle, onContinue, buttonText, disclaimerText, isLoading, stopFramePosition = "middle", recolor = true }) => {
|
|
168
|
-
const themedAnimationData = T(() => {
|
|
169
|
-
if (!animationData) return null;
|
|
170
|
-
if (!recolor) return animationData;
|
|
171
|
-
return replaceLottieColor(animationData, getCssVariableAsHex("--primitive-color-brand-500"));
|
|
172
|
-
}, [animationData, recolor]);
|
|
173
|
-
return /* @__PURE__ */ u(Page, {
|
|
174
|
-
className: cn("IncodeTutorialPage", className),
|
|
175
|
-
title,
|
|
176
|
-
titleId,
|
|
177
|
-
subtitle,
|
|
178
|
-
children: [/* @__PURE__ */ u("div", {
|
|
179
|
-
class: "IncodeBaseTutorialContainer",
|
|
180
|
-
children: /* @__PURE__ */ u("div", {
|
|
181
|
-
class: "IncodeBaseTutorialAnimationContainer",
|
|
182
|
-
"aria-hidden": "true",
|
|
183
|
-
children: themedAnimationData ? /* @__PURE__ */ u(Lottie, {
|
|
184
|
-
animationData: themedAnimationData,
|
|
185
|
-
className: "IncodeBaseTutorialAnimation",
|
|
186
|
-
autoStop: true,
|
|
187
|
-
stopFramePosition
|
|
188
|
-
}) : null
|
|
189
|
-
})
|
|
190
|
-
}), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ u("p", {
|
|
191
|
-
class: "IncodeBaseTutorialDisclaimer",
|
|
192
|
-
children: disclaimerText
|
|
193
|
-
}), /* @__PURE__ */ u("div", {
|
|
194
|
-
class: "IncodeBaseTutorialButtonContainer",
|
|
195
|
-
children: /* @__PURE__ */ u(Button, {
|
|
196
|
-
onClick: onContinue,
|
|
197
|
-
class: "IncodeBaseTutorialButton",
|
|
198
|
-
isLoading,
|
|
199
|
-
children: buttonText
|
|
200
|
-
})
|
|
201
|
-
})] })]
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
//#endregion
|
|
1
|
+
import { o as useTranslation } from "./uiConfig-BcjOx3PY.js";
|
|
2
|
+
import { S as k, _ as y, c as A, f as d, h as q, p as g, v as u } from "./vendor-preact-C0jX1Cbq.js";
|
|
3
|
+
import { c as Page, d as TransitionSpinner } from "./incodeComponent-DeVV0gEn.js";
|
|
4
|
+
import { a as useAnimationData, d as cn, n as LoadingIcon, t as Spacer } from "./spacer-DZ-t7RMQ.js";
|
|
5
|
+
import { t as Title } from "./typography-CYO7ELEl.js";
|
|
6
|
+
import { r as SuccessIcon } from "./icons-DNXYxUPA.js";
|
|
7
|
+
import { t as ErrorContent } from "./errorContent-aJuo21I4.js";
|
|
8
|
+
import { t as ConnectionError } from "./connectionError-Haw33Di8.js";
|
|
9
|
+
import { c as useCoverMedia } from "./denied-CB1v3PyY.js";
|
|
10
|
+
import { t as BaseTutorial } from "./baseTutorial-BM2Ho3QZ.js";
|
|
11
|
+
import { t as ManualCaptureButton } from "./manualCaptureButton-2RTC1vZC.js";
|
|
205
12
|
//#region src/shared/capture/faceOutline.tsx
|
|
206
13
|
var FaceOutline = () => {
|
|
207
14
|
return /* @__PURE__ */ u("svg", {
|
|
@@ -309,7 +116,7 @@ var Notification = ({ detectionState, disabled, guideStyle = "silhouette" }) =>
|
|
|
309
116
|
faceAngle: t(dotted ? "notifications.onFaceAngle" : "notifications.onFaceAngleV2"),
|
|
310
117
|
headWear: t("notifications.removeHeadwear"),
|
|
311
118
|
lenses: t("notifications.removeLenses"),
|
|
312
|
-
eyesClosed: t("notifications.
|
|
119
|
+
eyesClosed: t("notifications.closedEyes"),
|
|
313
120
|
faceMask: t("notifications.mask"),
|
|
314
121
|
centerFace: centerFaceText,
|
|
315
122
|
getReady: t("notifications.getReady"),
|
|
@@ -404,16 +211,20 @@ var Notification = ({ detectionState, disabled, guideStyle = "silhouette" }) =>
|
|
|
404
211
|
*/
|
|
405
212
|
var AvatarCanvas = ({ canvas, mirrored }) => {
|
|
406
213
|
const hostRef = A(null);
|
|
214
|
+
const canvasRef = A(null);
|
|
407
215
|
y(() => {
|
|
408
216
|
const host = hostRef.current;
|
|
409
217
|
if (!host || !canvas) return void 0;
|
|
410
218
|
canvas.classList.add("IncodeCaptureAvatarElement");
|
|
411
219
|
canvas.classList.toggle("IncodeCaptureAvatarMirrored", mirrored);
|
|
412
220
|
host.appendChild(canvas);
|
|
221
|
+
canvasRef.current = canvas;
|
|
413
222
|
return () => {
|
|
414
223
|
if (canvas.parentElement === host) host.removeChild(canvas);
|
|
224
|
+
if (canvasRef.current === canvas) canvasRef.current = null;
|
|
415
225
|
};
|
|
416
226
|
}, [canvas, mirrored]);
|
|
227
|
+
useCoverMedia(canvasRef, canvas);
|
|
417
228
|
return /* @__PURE__ */ u("div", {
|
|
418
229
|
ref: hostRef,
|
|
419
230
|
class: "IncodeCaptureAvatarHost",
|
|
@@ -450,8 +261,8 @@ var CaptureStatusPage = ({ icon, title, className, isLoading }) => {
|
|
|
450
261
|
//#endregion
|
|
451
262
|
//#region src/modules/selfie/errorModal.tsx
|
|
452
263
|
var defaultError = {
|
|
453
|
-
title: "
|
|
454
|
-
description: "
|
|
264
|
+
title: "common.somethingWentWrong",
|
|
265
|
+
description: "support.tryAgain"
|
|
455
266
|
};
|
|
456
267
|
var errorContent = {
|
|
457
268
|
MASK_ERROR: {
|
|
@@ -521,6 +332,10 @@ var errorContent = {
|
|
|
521
332
|
title: "notifications.removeHeadwear",
|
|
522
333
|
description: "notifications.removeHeadwearDescription"
|
|
523
334
|
},
|
|
335
|
+
FACE_OCCLUDED: {
|
|
336
|
+
title: "notifications.faceOccluded",
|
|
337
|
+
description: "notifications.faceOccludedDescription"
|
|
338
|
+
},
|
|
524
339
|
FACE_TOO_BLURRY: {
|
|
525
340
|
title: "notifications.spoof",
|
|
526
341
|
description: "notifications.spoofDescription"
|
|
@@ -561,6 +376,7 @@ var ERROR_CODES = [
|
|
|
561
376
|
"FACE_MASK_DETECTED",
|
|
562
377
|
"CLOSED_EYES_DETECTED",
|
|
563
378
|
"HEAD_COVER_DETECTED",
|
|
379
|
+
"FACE_OCCLUDED",
|
|
564
380
|
"FACE_CROPPING_FAILED",
|
|
565
381
|
"FACE_TOO_SMALL",
|
|
566
382
|
"FACE_TOO_BLURRY",
|
|
@@ -582,8 +398,9 @@ var ErrorModal = ({ error, attemptsRemaining, onTryAgain }) => {
|
|
|
582
398
|
const { t } = useTranslation();
|
|
583
399
|
if (!error) return null;
|
|
584
400
|
const { title, description } = errorContent[parseErrorCode(error) ?? error] ?? defaultError;
|
|
585
|
-
const
|
|
586
|
-
const
|
|
401
|
+
const noMoreAttempts = attemptsRemaining <= 0;
|
|
402
|
+
const titleText = noMoreAttempts ? t("notifications.selfieCaptureFailed") : t(title) ?? title;
|
|
403
|
+
const descriptionText = noMoreAttempts ? t("notifications.selfieCaptureFailedDescription") : t(description);
|
|
587
404
|
return /* @__PURE__ */ u(ErrorContent, {
|
|
588
405
|
"data-testid": "face-capture-error-modal",
|
|
589
406
|
title: titleText,
|
|
@@ -605,7 +422,7 @@ var Capture = ({ manager, state }) => {
|
|
|
605
422
|
}, [detectionStatus]);
|
|
606
423
|
if (captureStatus === "initializing") return /* @__PURE__ */ u(TransitionSpinner, { subtitleKey: "loadingCircle.preparingCamera" });
|
|
607
424
|
if (captureStatus === "detecting") {
|
|
608
|
-
if (detectionStatus === "offline") return /* @__PURE__ */ u(
|
|
425
|
+
if (detectionStatus === "offline") return /* @__PURE__ */ u(ConnectionError, { onRefresh: () => window.location.reload() });
|
|
609
426
|
const getBorderState = () => {
|
|
610
427
|
if (isManualCapturing) return "capturing";
|
|
611
428
|
if (detectionStatus === "detecting") return "idle";
|
|
@@ -675,19 +492,7 @@ var Capture = ({ manager, state }) => {
|
|
|
675
492
|
]
|
|
676
493
|
});
|
|
677
494
|
}
|
|
678
|
-
if (captureStatus === "capturing") return /* @__PURE__ */ u(
|
|
679
|
-
className: "IncodeCaptureCapturingPage",
|
|
680
|
-
title: "Capturing",
|
|
681
|
-
subtitle: "Taking photo...",
|
|
682
|
-
children: /* @__PURE__ */ u("div", {
|
|
683
|
-
class: "IncodeCaptureCapturingActions",
|
|
684
|
-
children: /* @__PURE__ */ u(Button, {
|
|
685
|
-
isLoading: true,
|
|
686
|
-
children: "Capturing..."
|
|
687
|
-
})
|
|
688
|
-
})
|
|
689
|
-
});
|
|
690
|
-
if (captureStatus === "uploading") return /* @__PURE__ */ u(CaptureStatusPage, {
|
|
495
|
+
if (captureStatus === "capturing" || captureStatus === "uploading") return /* @__PURE__ */ u(CaptureStatusPage, {
|
|
691
496
|
className: "IncodeCaptureStatusUploading",
|
|
692
497
|
isLoading: true,
|
|
693
498
|
icon: /* @__PURE__ */ u(LoadingIcon, { size: 64 }),
|
|
@@ -709,8 +514,12 @@ var Capture = ({ manager, state }) => {
|
|
|
709
514
|
};
|
|
710
515
|
var Video = ({ stream, mirrored }) => {
|
|
711
516
|
const ref = A(null);
|
|
517
|
+
useCoverMedia(ref, stream);
|
|
712
518
|
y(() => {
|
|
713
|
-
if (ref.current && stream)
|
|
519
|
+
if (ref.current && stream) {
|
|
520
|
+
ref.current.srcObject = stream;
|
|
521
|
+
ref.current.play().catch(() => {});
|
|
522
|
+
}
|
|
714
523
|
}, [stream]);
|
|
715
524
|
return /* @__PURE__ */ u("video", {
|
|
716
525
|
ref,
|
|
@@ -723,7 +532,7 @@ var Video = ({ stream, mirrored }) => {
|
|
|
723
532
|
};
|
|
724
533
|
//#endregion
|
|
725
534
|
//#region src/modules/selfie/tutorial.tsx
|
|
726
|
-
var Tutorial = ({ manager, ageAssurance = false }) => {
|
|
535
|
+
var Tutorial = ({ manager, ageAssurance = false, showManualUploadLink = false }) => {
|
|
727
536
|
const { t } = useTranslation();
|
|
728
537
|
const [isLoading, setIsLoading] = d(false);
|
|
729
538
|
const { data: animationData, isOverride } = useAnimationData("selfie.tutorial");
|
|
@@ -741,8 +550,13 @@ var Tutorial = ({ manager, ageAssurance = false }) => {
|
|
|
741
550
|
buttonText: t(ageAssurance ? "face.tutorial.ageAssuranceStartCapture" : "face.tutorial.startCapture"),
|
|
742
551
|
disclaimerText: t("face.tutorial.autoCapture"),
|
|
743
552
|
isLoading,
|
|
553
|
+
secondaryAction: showManualUploadLink ? {
|
|
554
|
+
label: t("selfiev2.manualUpload.uploadSelfieManually"),
|
|
555
|
+
onClick: () => manager.goToManualUpload(),
|
|
556
|
+
testId: "selfie-manual-upload-link"
|
|
557
|
+
} : void 0,
|
|
744
558
|
className: "IncodeSelfieTutorial"
|
|
745
559
|
});
|
|
746
560
|
};
|
|
747
561
|
//#endregion
|
|
748
|
-
export {
|
|
562
|
+
export { Capture as n, Tutorial as t };
|
|
@@ -52,9 +52,7 @@ export declare const CertificateIssuance: FC<Omit<CertificateIssuanceProps, "con
|
|
|
52
52
|
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
53
53
|
}>;
|
|
54
54
|
|
|
55
|
-
declare type CertificateIssuanceProps = IncodeModuleProps<CertificateIssuanceConfig
|
|
56
|
-
manager?: CertificateIssuanceManager;
|
|
57
|
-
};
|
|
55
|
+
declare type CertificateIssuanceProps = IncodeModuleProps<CertificateIssuanceConfig, void, CertificateIssuanceManager>;
|
|
58
56
|
|
|
59
57
|
/**
|
|
60
58
|
* A module `config` intersected with the per-instance override maps. Typed at
|
|
@@ -172,6 +170,8 @@ export { }
|
|
|
172
170
|
|
|
173
171
|
declare global {
|
|
174
172
|
interface HTMLElementTagNameMap {
|
|
175
|
-
'incode-certificate-issuance': HTMLElement & IncodeModuleProps<CertificateIssuanceConfig
|
|
173
|
+
'incode-certificate-issuance': HTMLElement & IncodeModuleProps<CertificateIssuanceConfig,
|
|
174
|
+
void,
|
|
175
|
+
CertificateIssuanceManager>;
|
|
176
176
|
}
|
|
177
177
|
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { DeepPartial } from '@incodetech/core/flow';
|
|
2
|
+
import { DynamicFormsConfig } from '@incodetech/core/dynamic-forms';
|
|
3
|
+
import { DynamicFormsManager } from '@incodetech/core/dynamic-forms';
|
|
4
|
+
import { FC } from 'preact/compat';
|
|
5
|
+
import { FunctionComponent } from 'preact';
|
|
6
|
+
import { SVGProps } from 'preact/compat';
|
|
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;
|
|
57
|
+
|
|
58
|
+
export declare const DynamicForms: FC<Omit<DynamicFormsProps, "config"> & {
|
|
59
|
+
config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
|
|
62
|
+
declare type DynamicFormsProps = IncodeModuleProps<DynamicFormsConfig, void, DynamicFormsManager>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Extra context passed to `onFinish` alongside the result. Lets a host decide
|
|
66
|
+
* how to react to the terminal state without inspecting the DOM. Only the
|
|
67
|
+
* workflow module sets these fields today.
|
|
68
|
+
*/
|
|
69
|
+
declare type IncodeFinishMeta = {
|
|
70
|
+
/**
|
|
71
|
+
* True when the SDK owns the terminal screen — it has already rendered its
|
|
72
|
+
* own finish UI (today, the workflow's `showFinishScreenBySessionStatus`
|
|
73
|
+
* screen), so the host should not render its own completion screen on top.
|
|
74
|
+
* `onFinish` still fires so the host can run side effects (e.g. notify an
|
|
75
|
+
* OAuth parent).
|
|
76
|
+
*
|
|
77
|
+
* Advisory only: the SDK cannot stop a host from rendering. This works solely
|
|
78
|
+
* because the host reads this flag — a host that ignores it will still
|
|
79
|
+
* replace the SDK screen. Not a guarantee.
|
|
80
|
+
*/
|
|
81
|
+
sdkOwnsTerminalScreen?: boolean;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
declare type IncodeModuleProps<TConfig, TResult = void, TManager = unknown, TConfigInput = ConfigWithOverrides<TConfig>> = {
|
|
85
|
+
/**
|
|
86
|
+
* Module configuration required to render the flow.
|
|
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.
|
|
92
|
+
*/
|
|
93
|
+
config?: TConfigInput;
|
|
94
|
+
/**
|
|
95
|
+
* Optional pre-built manager. When provided, the module does not create or manage the manager lifecycle.
|
|
96
|
+
*/
|
|
97
|
+
manager?: TManager;
|
|
98
|
+
/**
|
|
99
|
+
* Callback invoked when the module completes successfully.
|
|
100
|
+
* @param result - Optional result data from the module completion
|
|
101
|
+
* @param meta - Optional context about how the module resolved (e.g. whether
|
|
102
|
+
* the SDK rendered its own terminal finish screen). See {@link IncodeFinishMeta}.
|
|
103
|
+
*/
|
|
104
|
+
onFinish?: (result?: TResult, meta?: IncodeFinishMeta) => void;
|
|
105
|
+
/**
|
|
106
|
+
* Callback invoked when a fatal module error occurs.
|
|
107
|
+
*
|
|
108
|
+
* @param error - Human-readable error message.
|
|
109
|
+
* @param errorCode - Optional numeric code (e.g. HTTP status). Populated by
|
|
110
|
+
* the workflow and flow modules on QR validation failures —
|
|
111
|
+
* `4026` (`expiredUUID`), `4081` (`invalidQRuuid`) or `4083` (`onboardingUrlAlreadyUsed`).
|
|
112
|
+
* @param moduleErrorCode - Optional machine-readable error code (e.g. a
|
|
113
|
+
* `FaceErrorCode` such as `NONEXISTENT_CUSTOMER`). Lets an orchestrator
|
|
114
|
+
* branch on the specific terminal error without parsing the message string.
|
|
115
|
+
*/
|
|
116
|
+
onError?: (error: string | undefined, errorCode?: number, moduleErrorCode?: string) => void;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Per-instance 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
|
+
* or `<TransitionSpinner>` reads them via {@link useInstanceOverrides} without
|
|
125
|
+
* any prop drilling.
|
|
126
|
+
*/
|
|
127
|
+
declare type InstanceOverrides = {
|
|
128
|
+
assets?: AssetOverrides;
|
|
129
|
+
animations?: AnimationOverrides;
|
|
130
|
+
spinner?: SpinnerPresentation;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
declare type LottieAnimationData = {
|
|
134
|
+
fr: number;
|
|
135
|
+
v: string;
|
|
136
|
+
ip: number;
|
|
137
|
+
op: number;
|
|
138
|
+
w: number;
|
|
139
|
+
h: number;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Host-facing loader presentation, settable globally via
|
|
144
|
+
* `setup({ uiConfig: { spinner } })` or per element via `config.spinner`.
|
|
145
|
+
*
|
|
146
|
+
* Copy is deliberately absent. Loader text comes from i18n (`loadingCircle.*`),
|
|
147
|
+
* which keeps it localizable — a literal string here would freeze in whatever
|
|
148
|
+
* language the host typed it in when the user switches language mid-flow — and
|
|
149
|
+
* leaves one source of truth for user-facing strings.
|
|
150
|
+
*/
|
|
151
|
+
declare type SpinnerPresentation = {
|
|
152
|
+
renderMode?: SpinnerRenderMode;
|
|
153
|
+
size?: SpinnerSize;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Which parts of a loader render.
|
|
158
|
+
*
|
|
159
|
+
* An enum rather than a pair of booleans so the meaningless fourth state —
|
|
160
|
+
* neither icon nor text, i.e. a blank screen — is unrepresentable.
|
|
161
|
+
*/
|
|
162
|
+
declare type SpinnerRenderMode = 'spinnerAndText' | 'spinnerOnly' | 'textOnly';
|
|
163
|
+
|
|
164
|
+
declare type SpinnerSize = 'small' | 'medium' | 'large';
|
|
165
|
+
|
|
166
|
+
/** An SVG imported as a Preact component (the `?react` import shape). */
|
|
167
|
+
declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
|
|
168
|
+
|
|
169
|
+
export { }
|
|
170
|
+
|
|
171
|
+
declare global {
|
|
172
|
+
interface HTMLElementTagNameMap {
|
|
173
|
+
'incode-dynamic-forms': HTMLElement & IncodeModuleProps<DynamicFormsConfig,
|
|
174
|
+
void,
|
|
175
|
+
DynamicFormsManager>;
|
|
176
|
+
}
|
|
177
|
+
}
|