@incodetech/web 2.1.0-rc.1 → 2.1.0-rc.3

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.
Files changed (176) hide show
  1. package/dist/ae-signature/ae-signature.es.js +2 -2
  2. package/dist/ae-signature/styles.css +59 -45
  3. package/dist/antifraud/antifraud.es.js +4 -4
  4. package/dist/authentication/authentication.es.js +5 -4
  5. package/dist/{autoFocusTitle-BzkUiELM.js → autoFocusTitle-CuRu2lPg.js} +1 -1
  6. package/dist/base.css +100 -60
  7. package/dist/{bottomSheet-F1GJfQx_.js → bottomSheet-CnWbbUAM.js} +1 -1
  8. package/dist/{button-CM_hgyIP.js → button-Dz6AsbmF.js} +7 -2
  9. package/dist/cameraView-DIEzM5ru.js +47 -0
  10. package/dist/{tutorial-D1qaY2Tm.js → capture-CkGvdDNH.js} +23 -573
  11. package/dist/certificate-issuance/certificate-issuance.es.js +249 -0
  12. package/dist/certificate-issuance/styles.css +114 -0
  13. package/dist/{checkbox-BoeLHKgp.js → checkbox-1wUHSoaK.js} +2 -2
  14. package/dist/consent/consent.es.js +11 -11
  15. package/dist/{countrySelector-mSWyHSy4.js → countrySelector-SvUOyPo0.js} +2 -2
  16. package/dist/cpf-ocr/cpf-ocr.es.js +1 -1
  17. package/dist/cpfOcr-B79245-3.js +2 -0
  18. package/dist/{cpfOcr-MtpRztkG.js → cpfOcr-BhxT-lRN.js} +7 -7
  19. package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
  20. package/dist/curp-validation/curp-validation.es.js +17 -17
  21. package/dist/{customFields-DXXt9HGM.js → customFields-BDsXR7A-.js} +11 -11
  22. package/dist/{customWatchlist-DsW04UF6.js → customWatchlist-CYoRNCim.js} +6 -6
  23. package/dist/dateInputComposed-DRzZi6uy.js +1 -0
  24. package/dist/{dateInputComposed-C_mh4XBg.js → dateInputComposed-DuaofcBl.js} +3 -3
  25. package/dist/document-capture/document-capture.es.js +1 -1
  26. package/dist/documentCapture-DXYYyxZl.js +2 -0
  27. package/dist/{documentCapture-BDV_921m.js → documentCapture-DhbO-A-V.js} +15 -13
  28. package/dist/dropdownComposed-BAoxIIsE.js +1 -0
  29. package/dist/{dropdownComposed-_fgAlo_C.js → dropdownComposed-CoU0enG6.js} +9 -10
  30. package/dist/{dynamicForms-DyfnsS7E.js → dynamicForms-BifGbC9F.js} +24 -13
  31. package/dist/ekyb/ekyb.es.js +1 -1
  32. package/dist/ekybModule-C6Nttked.js +2 -0
  33. package/dist/{ekybModule-CIPGmCvD.js → ekybModule-DGnTw5UV.js} +15 -15
  34. package/dist/ekyc/ekyc.es.js +1 -1
  35. package/dist/ekycModule-CDIEjI6V.js +2 -0
  36. package/dist/{ekycModule-BuTaC5ct.js → ekycModule-Dxpdd0ns.js} +14 -14
  37. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  38. package/dist/{electronic-signature-B-Q7M0wK.js → electronic-signature-Ueoffasr.js} +42 -31
  39. package/dist/email/email.es.js +8 -8
  40. package/dist/{emailInput-KZmhjOdZ.js → emailInput-DsLkDtER.js} +6 -6
  41. package/dist/{expiredId-Q1t6aVpk.js → expiredId-BZXLrLk-.js} +6 -6
  42. package/dist/{extensibility-Cs3KQQdC.js → extensibility-7sRIN0JC.js} +54 -89
  43. package/dist/extensibility.es.js +25 -23
  44. package/dist/face-match/face-match.es.js +1 -1
  45. package/dist/face-match/styles.css +4 -0
  46. package/dist/faceMatch-B_HvxLm_.js +2 -0
  47. package/dist/{faceMatch--RDHJe4t.js → faceMatch-DyTBoMDm.js} +10 -10
  48. package/dist/field-comparison/field-comparison.es.js +1 -1
  49. package/dist/fieldComparison-DfNEuEE5.js +2 -0
  50. package/dist/{fieldComparison-CAF86bTC.js → fieldComparison-L_knHqgw.js} +9 -9
  51. package/dist/fiscal-qr/fiscal-qr.es.js +9 -8
  52. package/dist/flow/flow.es.js +35 -12
  53. package/dist/flow/styles.css +4242 -2972
  54. package/dist/geolocation/geolocation.es.js +190 -326
  55. package/dist/geolocation/styles.css +8 -0
  56. package/dist/{governmentValidation/governmentValidation.es.js → government-validation/government-validation.es.js} +12 -16
  57. package/dist/{homeScreen-BZnIEDrV.js → homeScreen-B6T0JVh8.js} +5 -5
  58. package/dist/{hooks-Da_yP_Dr.js → hooks-CNu7o-v8.js} +39 -2
  59. package/dist/{i18n-CoCO2ZuN.js → i18n-CU4xq8qC.js} +1 -1
  60. package/dist/{icons-Dbs9ZfYM.js → icons-CJJbIpBq.js} +2 -2
  61. package/dist/id/id.es.js +80 -50
  62. package/dist/id/styles.css +1 -9
  63. package/dist/id-ocr/styles.css +12 -2
  64. package/dist/id-verification/id-verification.es.js +5 -5
  65. package/dist/{idOcr-CjGbb4dB.js → idOcr-WFBvqy3b.js} +34 -16
  66. package/dist/identity-reuse/identity-reuse.es.js +7 -7
  67. package/dist/{incodeComponent-wfnHlnXx.js → incodeComponent-CfzJGETt.js} +3 -2
  68. package/dist/{incodeModule-BUDoTwT9.js → incodeModule-B-4_3JrK.js} +1 -1
  69. package/dist/index.es.js +1 -1
  70. package/dist/inputComposed-BaY5q9WM.js +1 -0
  71. package/dist/{inputComposed-CQ4AsvZg.js → inputComposed-C1R2LAa3.js} +3 -3
  72. package/dist/{mandatoryConsent-r0PQHmv-.js → mandatoryConsent-D0GTKu-H.js} +10 -10
  73. package/dist/{modal-nTSaG7nB.js → modal-OxkFuuiR.js} +2 -2
  74. package/dist/{optionAccessibleLabel-CnA-mNAU.js → optionAccessibleLabel-gfF-58Mv.js} +5 -5
  75. package/dist/{otpInput-_JmtVwa0.js → otpInput-CnDc6pQm.js} +14 -13
  76. package/dist/{verifiedByIncode-DjXOdCml.js → page-DidH_RkX.js} +70 -2
  77. package/dist/{pdf-BZA70WbM.js → pdf-BqtJTlor.js} +1 -1
  78. package/dist/{pdfViewer-BK-yVIve.js → pdfViewer-B97DmT9m.js} +57 -20
  79. package/dist/phone/phone.es.js +9 -9
  80. package/dist/{phoneInputComposed-DjNdsmPE.js → phoneInputComposed-DMiXfF-1.js} +5 -5
  81. package/dist/{processing-BM-wT-1W.js → processing-BeUMfdJJ.js} +1 -1
  82. package/dist/qe-signature/qe-signature.es.js +2 -2
  83. package/dist/{radioGroupComposed-BNuaopVr.js → radioGroupComposed-DuQxslB2.js} +4 -4
  84. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +36 -32
  85. package/dist/redirect-to-mobile/styles.css +3 -2
  86. package/dist/{richText-Cf9aMOCk.js → richText-CB1fmegc.js} +1 -1
  87. package/dist/selfie/selfie.es.js +8 -7
  88. package/dist/selfie/styles.css +133 -63
  89. package/dist/signature/signature.es.js +9 -9
  90. package/dist/spinner-BCDCoi9C.js +1 -0
  91. package/dist/{spinner-D8a_2LvW.js → spinner-BMeIEK1d.js} +18 -6
  92. package/dist/{statusPage-DMYPUwRZ.js → statusPage-Bk8nJwXV.js} +2 -2
  93. package/dist/themes/dark.css +24 -2
  94. package/dist/themes/light.css +24 -2
  95. package/dist/{transitionSpinner-DRRz-NV8.js → transitionSpinner-CuNCqHNi.js} +12 -8
  96. package/dist/tutorial-CCfPuVKX.js +706 -0
  97. package/dist/types/ae-signature.d.ts +23 -1
  98. package/dist/types/antifraud.d.ts +23 -1
  99. package/dist/types/authentication.d.ts +23 -1
  100. package/dist/types/certificate-issuance.d.ts +68 -0
  101. package/dist/types/consent.d.ts +23 -1
  102. package/dist/types/cross-document-data-match.d.ts +23 -1
  103. package/dist/types/curp-validation.d.ts +23 -1
  104. package/dist/types/document-capture.d.ts +23 -1
  105. package/dist/types/ekyb.d.ts +23 -1
  106. package/dist/types/ekyc.d.ts +23 -1
  107. package/dist/types/electronic-signature.d.ts +23 -1
  108. package/dist/types/email.d.ts +23 -1
  109. package/dist/types/extensibility.d.ts +40 -3
  110. package/dist/types/face-match.d.ts +23 -1
  111. package/dist/types/field-comparison.d.ts +23 -1
  112. package/dist/types/fiscal-qr.d.ts +23 -1
  113. package/dist/types/flow.d.ts +23 -1
  114. package/dist/types/geolocation.d.ts +27 -2
  115. package/dist/types/{governmentValidation.d.ts → government-validation.d.ts} +23 -1
  116. package/dist/types/id-verification.d.ts +23 -1
  117. package/dist/types/id.d.ts +23 -1
  118. package/dist/types/identity-reuse.d.ts +23 -1
  119. package/dist/types/phone.d.ts +23 -1
  120. package/dist/types/qe-signature.d.ts +23 -1
  121. package/dist/types/selfie.d.ts +23 -1
  122. package/dist/types/signature.d.ts +23 -1
  123. package/dist/types/video-selfie.d.ts +72 -0
  124. package/dist/types/watchlist.d.ts +23 -1
  125. package/dist/types/workflow.d.ts +23 -1
  126. package/dist/{useModuleLoader-CeJ2jL25.js → useModuleLoader-Gvo9qscB.js} +42 -25
  127. package/dist/{verificationResult-Do5SpZ6X.js → verificationResult-BWWkmeiA.js} +8 -8
  128. package/dist/video-selfie/styles.css +1644 -0
  129. package/dist/video-selfie/video-selfie.es.js +854 -0
  130. package/dist/watchlist/watchlist.es.js +6 -6
  131. package/dist/{watchlistForBusiness-BFFXC9d-.js → watchlistForBusiness-D2Uo_TwF.js} +10 -10
  132. package/dist/workflow/styles.css +254 -76
  133. package/dist/workflow/workflow.es.js +146 -17
  134. package/package.json +42 -5
  135. package/dist/cpfOcr-jJkYCfsX.js +0 -2
  136. package/dist/dateInputComposed-Cy6a7ymh.js +0 -1
  137. package/dist/documentCapture-8ypBJehw.js +0 -2
  138. package/dist/dropdownComposed-CEWBSdGl.js +0 -1
  139. package/dist/ekybModule-DFoYpheB.js +0 -2
  140. package/dist/ekycModule-BGzwgjl1.js +0 -2
  141. package/dist/faceMatch-yEKPYaym.js +0 -2
  142. package/dist/fieldComparison-D0an7T_g.js +0 -2
  143. package/dist/inputComposed-BEn7_nZd.js +0 -1
  144. package/dist/page-DxGQj7Gk.js +0 -71
  145. package/dist/spinner-B6RxGFrI.js +0 -1
  146. /package/dist/{aligndevicelottie-DY_bX_p8.js → aligndevicelottie-DFscByAI.js} +0 -0
  147. /package/dist/{back-horizontal-hint-D_8LptLm.js → back-horizontal-hint-xTnSQbzn.js} +0 -0
  148. /package/dist/{back-tutorial-vb1MxlrT.js → back-tutorial-cI_4VHmE.js} +0 -0
  149. /package/dist/{back-vertical-hint-C1evxxq2.js → back-vertical-hint-BWWlHfX2.js} +0 -0
  150. /package/dist/{backdevicelottie-HypPqBz7.js → backdevicelottie-COyhTrxM.js} +0 -0
  151. /package/dist/{blurdevicelottie-CBXtBFiJ.js → blurdevicelottie-BLVeJHEG.js} +0 -0
  152. /package/dist/{browser-ponyfill-CLLvZCVg.js → browser-ponyfill-Df13Th-G.js} +0 -0
  153. /package/dist/{defineProperty-mefzVtTv.js → defineProperty-Qjefk7Uf.js} +0 -0
  154. /package/dist/{errorIcon-DJRZpd8j.js → errorIcon-BA4T6iy-.js} +0 -0
  155. /package/dist/{flip-animation-BGRvygw9.js → flip-animation-CZYSUtMm.js} +0 -0
  156. /package/dist/{front-horizontal-hint-Uf5bHCsd.js → front-horizontal-hint-B84GgTO1.js} +0 -0
  157. /package/dist/{front-vertical-hint-DdWNA45v.js → front-vertical-hint-Bs_avngq.js} +0 -0
  158. /package/dist/{frontdevicelottie-CLqitJhG.js → frontdevicelottie-B4tE2PYQ.js} +0 -0
  159. /package/dist/{glaredevicelottie-BS04U6Fc.js → glaredevicelottie-D1pR73sx.js} +0 -0
  160. /package/dist/{governmentValidation → government-validation}/styles.css +0 -0
  161. /package/dist/{id-laser-h-DX8UbVNH.js → id-laser-h-CzPegPMn.js} +0 -0
  162. /package/dist/{id-laser-v-DhnHdjlB.js → id-laser-v-BiUXkM4x.js} +0 -0
  163. /package/dist/{id-tutorial-lj4iKtYT.js → id-tutorial-DwO90SAm.js} +0 -0
  164. /package/dist/{lottie_light-Dp9Bz3mf.js → lottie_light-C6B2ec41.js} +0 -0
  165. /package/dist/{modal.hooks-D2xhIuHA.js → modal.hooks-ZrzmHAUa.js} +0 -0
  166. /package/dist/{numberedStep-CEtwZqLp.js → numberedStep-CEb-lFJm.js} +0 -0
  167. /package/dist/{passport-horizontal-hint-Bbm2mvSn.js → passport-horizontal-hint-Bj0ZJY0g.js} +0 -0
  168. /package/dist/{passport-tutorial-zT1ZoA-D.js → passport-tutorial-D9JNsMsM.js} +0 -0
  169. /package/dist/{passport-vertical-hint-DJbCtBiM.js → passport-vertical-hint-Dfk77xUJ.js} +0 -0
  170. /package/dist/{registerIncodeElement-77NGCDsy.js → registerIncodeElement-DaNjbAwZ.js} +0 -0
  171. /package/dist/{requiredLabelHint-DEadtiwx.js → requiredLabelHint-D0RhuMed.js} +0 -0
  172. /package/dist/{selfieTutorial-CtruLyO2.js → selfieTutorial-pB-N-fj5.js} +0 -0
  173. /package/dist/{snackbar-CxepGC3e.js → snackbar-DS7Mv62v.js} +0 -0
  174. /package/dist/{successIcon-BAyDPT7I.js → successIcon-B5mGvdx1.js} +0 -0
  175. /package/dist/{tabs-C8npVBbk.js → tabs-C__chW-u.js} +0 -0
  176. /package/dist/{typography-YLgHHuao.js → typography-BZIpjo97.js} +0 -0
@@ -1,15 +1,128 @@
1
- import { n as useTranslation, o as readStoredLanguage } from "../i18n-CoCO2ZuN.js";
1
+ import { n as useTranslation, o as readStoredLanguage } from "../i18n-CU4xq8qC.js";
2
2
  import { _ as y, c as z, l as A, o as P, p as d, v as u } from "../vendor-preact-DThS2ZQ_.js";
3
3
  import { t as setUiConfig } from "../uiConfig-D2_wawvr.js";
4
- import { c as useManager } from "../hooks-Da_yP_Dr.js";
5
- import { t as IncodeComponent } from "../incodeComponent-wfnHlnXx.js";
6
- import { t as TransitionSpinner } from "../transitionSpinner-DRRz-NV8.js";
7
- import { t as registerIncodeModuleElement } from "../incodeModule-BUDoTwT9.js";
8
- import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-CeJ2jL25.js";
4
+ import { u as useManager } from "../hooks-CNu7o-v8.js";
5
+ import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
6
+ import { t as Page } from "../page-DidH_RkX.js";
7
+ import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
8
+ import { t as AutoFocusTitle } from "../autoFocusTitle-CuRu2lPg.js";
9
+ import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
10
+ import { _ as setupSDK, a as resolveApiKey, b as TerminalErrorPage, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, p as isDesktopOrEmulated, s as UnsupportedModule, t as useModuleLoader, y as fetchAndApplyTheme } from "../useModuleLoader-Gvo9qscB.js";
9
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
10
- import { getDeviceClass } from "@incodetech/core/device";
12
+ import { classifyScoreStatus } from "@incodetech/core/flow";
11
13
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
12
14
  import { createWorkflowManager } from "@incodetech/core/workflow";
15
+ //#region src/modules/workflow/finishScreenStatusIcons.tsx
16
+ var FinishStatusSuccessIcon = () => /* @__PURE__ */ u("svg", {
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ width: "54",
19
+ height: "54",
20
+ viewBox: "0 0 54 54",
21
+ fill: "none",
22
+ class: "IncodeFinishStatusSuccessIcon",
23
+ "aria-hidden": "true",
24
+ focusable: "false",
25
+ children: [/* @__PURE__ */ u("path", {
26
+ d: "M27 53.25C41.4975 53.25 53.25 41.4975 53.25 27C53.25 12.5025 41.4975 0.75 27 0.75C12.5025 0.75 0.75 12.5025 0.75 27C0.75 41.4975 12.5025 53.25 27 53.25Z",
27
+ fill: "#0CD5A2"
28
+ }), /* @__PURE__ */ u("path", {
29
+ d: "M37.5 20L23.492 35.75L16.5 27.875",
30
+ stroke: "white",
31
+ "stroke-width": "4",
32
+ "stroke-linecap": "round",
33
+ "stroke-linejoin": "round"
34
+ })]
35
+ });
36
+ var FinishStatusReviewIcon = () => /* @__PURE__ */ u("svg", {
37
+ xmlns: "http://www.w3.org/2000/svg",
38
+ width: "56",
39
+ height: "54",
40
+ viewBox: "0 0 33 32",
41
+ fill: "none",
42
+ class: "IncodeFinishStatusReviewIcon",
43
+ "aria-hidden": "true",
44
+ focusable: "false",
45
+ children: /* @__PURE__ */ u("path", {
46
+ d: "M16.5 0C25.348 0 32.5 7.1696 32.5 16C32.5 24.8336 25.348 32 16.5 32C7.668 32 0.5 24.8336 0.5 16C0.5 7.1696 7.668 0 16.5 0ZM16.5 20.6896C15.732 20.6896 15.108 21.3136 15.108 22.0816C15.108 22.8496 15.732 23.4896 16.516 23.4896C17.284 23.4896 17.908 22.8496 17.908 22.0816C17.908 21.3136 17.284 20.6896 16.5 20.6896ZM16.5 8.528C15.732 8.528 15.092 9.1696 15.092 9.936V17.008C15.092 17.7776 15.732 18.4 16.5 18.4C17.268 18.4 17.892 17.7776 17.892 17.008V9.936C17.892 9.1696 17.268 8.528 16.5 8.528Z",
47
+ fill: "#FF9900"
48
+ })
49
+ });
50
+ var FinishStatusErrorIcon = () => /* @__PURE__ */ u("svg", {
51
+ xmlns: "http://www.w3.org/2000/svg",
52
+ width: "72",
53
+ height: "72",
54
+ viewBox: "0 0 72 72",
55
+ fill: "none",
56
+ class: "IncodeFinishStatusErrorIcon",
57
+ "aria-hidden": "true",
58
+ focusable: "false",
59
+ children: /* @__PURE__ */ u("path", {
60
+ "fill-rule": "evenodd",
61
+ "clip-rule": "evenodd",
62
+ d: "M44.598 44.592C44.16 45.03 43.584 45.252 43.008 45.252C42.429 45.252 41.856 45.03 41.415 44.592L35.997 39.171L30.594 44.574C29.715 45.453 28.29 45.453 27.411 44.574C26.535 43.695 26.535 42.273 27.411 41.394L32.814 35.991L27.408 30.582C26.529 29.703 26.529 28.281 27.408 27.402C28.287 26.523 29.709 26.523 30.588 27.402L35.994 32.808L41.4 27.405C42.279 26.526 43.701 26.526 44.58 27.405C45.459 28.281 45.459 29.706 44.58 30.585L39.177 35.991L44.598 41.409C45.477 42.288 45.477 43.713 44.598 44.592ZM36 7.5C20.286 7.5 7.5 20.283 7.5 36C7.5 51.714 20.286 64.5 36 64.5C51.714 64.5 64.5 51.714 64.5 36C64.5 20.283 51.714 7.5 36 7.5Z",
63
+ fill: "#FF0000"
64
+ })
65
+ });
66
+ //#endregion
67
+ //#region src/modules/workflow/finishScreenBySessionStatus.tsx
68
+ var VARIANT_CONTENT = {
69
+ success: {
70
+ Icon: FinishStatusSuccessIcon,
71
+ titleKey: "finishScreenBySessionStatus.success.title",
72
+ titleDefault: "Identity",
73
+ subtitleKey: "finishScreenBySessionStatus.success.subtitle",
74
+ subtitleDefault: "successfully verified"
75
+ },
76
+ error: {
77
+ Icon: FinishStatusErrorIcon,
78
+ titleKey: "finishScreenBySessionStatus.error.title",
79
+ titleDefault: "Unable to verify identity",
80
+ descriptionKey: "finishScreenBySessionStatus.error.description",
81
+ descriptionDefault: "We encountered an issue while processing your request. Please try again later."
82
+ },
83
+ review: {
84
+ Icon: FinishStatusReviewIcon,
85
+ titleKey: "finishScreenBySessionStatus.review.title",
86
+ titleDefault: "Verification under review",
87
+ descriptionKey: "finishScreenBySessionStatus.review.description",
88
+ descriptionDefault: "Your information did not match our records. Please contact IT support for assistance."
89
+ }
90
+ };
91
+ /** Status-specific workflow completion screen (success / error / review). */
92
+ var FinishScreenBySessionStatus = ({ scoreStatus }) => {
93
+ const { t } = useTranslation();
94
+ const variant = classifyScoreStatus(scoreStatus);
95
+ const content = VARIANT_CONTENT[variant];
96
+ const { Icon } = content;
97
+ return /* @__PURE__ */ u(Page, {
98
+ className: "IncodeFinishScreenBySessionStatus",
99
+ "data-testid": "finish-screen-by-session-status",
100
+ hideHeader: true,
101
+ hideFooterBranding: true,
102
+ children: /* @__PURE__ */ u("div", {
103
+ class: "IncodeFinishScreenStatus",
104
+ "data-variant": variant,
105
+ children: [
106
+ /* @__PURE__ */ u(Icon, {}),
107
+ /* @__PURE__ */ u("div", {
108
+ class: "IncodeFinishScreenTitleGroup",
109
+ children: [/* @__PURE__ */ u(AutoFocusTitle, {
110
+ className: "IncodeFinishScreenTitle",
111
+ children: t(content.titleKey, { defaultValue: content.titleDefault })
112
+ }, variant), content.subtitleKey ? /* @__PURE__ */ u("p", {
113
+ class: "IncodeFinishScreenSubtitle",
114
+ children: t(content.subtitleKey, { defaultValue: content.subtitleDefault })
115
+ }) : null]
116
+ }),
117
+ content.descriptionKey ? /* @__PURE__ */ u("p", {
118
+ class: "IncodeFinishScreenDescription",
119
+ children: t(content.descriptionKey, { defaultValue: content.descriptionDefault })
120
+ }) : null
121
+ ]
122
+ })
123
+ });
124
+ };
125
+ //#endregion
13
126
  //#region src/modules/workflow/workflowInit.ts
14
127
  var LAZY_WORKFLOW_MODULES = {
15
128
  ...LAZY_UI_MODULES,
@@ -35,7 +148,7 @@ function createWorkflowUIManager(options = {}) {
35
148
  return createWorkflowManager({
36
149
  customModuleCallback: options.customModuleCallback,
37
150
  interviewId: options.interviewId,
38
- isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
151
+ isDesktop: options.isDesktop ?? isDesktopOrEmulated()
39
152
  });
40
153
  }
41
154
  function warmupWorkflowWasm(wasmConfig) {
@@ -149,7 +262,7 @@ function useWorkflowInitialization(options) {
149
262
  }
150
263
  //#endregion
151
264
  //#region src/modules/workflow/workflow.tsx
152
- var LazyHomeScreen = z(() => import("../homeScreen-BZnIEDrV.js").then((module) => ({ default: module.HomeScreen })));
265
+ var LazyHomeScreen = z(() => import("../homeScreen-B6T0JVh8.js").then((module) => ({ default: module.HomeScreen })));
153
266
  function mapModuleConfig(options) {
154
267
  const { moduleKey, config, workflowId, authHint, lang, mergeSessionRecordings, ageAssurance } = options;
155
268
  switch (moduleKey) {
@@ -201,8 +314,10 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
201
314
  autoLoad: false,
202
315
  manageLifecycle: false
203
316
  });
317
+ const moduleKey = workflowState?.status === "ready" ? workflowState.currentNode.moduleKey : void 0;
318
+ const showFinishScreen = workflowState?.status === "finished" && workflowState.workflowConfig.showFinishScreenBySessionStatus === true;
204
319
  const moduleLoaderState = useModuleLoader({
205
- moduleKey: workflowState?.status === "ready" ? workflowState.currentNode.moduleKey : void 0,
320
+ moduleKey,
206
321
  modules: LAZY_WORKFLOW_MODULES,
207
322
  headlessModuleKeys: HEADLESS_WORKFLOW_MODULE_KEYS,
208
323
  onModuleLoading: config.onModuleLoading,
@@ -215,7 +330,7 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
215
330
  if (workflowState?.status === "finished") {
216
331
  terminalFiredRef.current = true;
217
332
  const finishStatus = workflowState.finishStatus;
218
- queueMicrotask(() => onFinish?.(finishStatus));
333
+ queueMicrotask(() => onFinish?.(finishStatus, { sdkOwnsTerminalScreen: showFinishScreen }));
219
334
  return;
220
335
  }
221
336
  if (workflowState?.status === "asyncResolution") {
@@ -225,14 +340,14 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
225
340
  }
226
341
  if (workflowState?.status === "error" && onError) {
227
342
  terminalFiredRef.current = true;
228
- const { error, errorCode } = workflowState;
229
- queueMicrotask(() => onError(error, errorCode));
343
+ const { error, errorCode, moduleErrorCode } = workflowState;
344
+ queueMicrotask(() => onError(error, errorCode, moduleErrorCode));
230
345
  }
231
346
  }, [
232
- workflowState?.status,
347
+ workflowState,
233
348
  onFinish,
234
349
  onError,
235
- workflowState
350
+ showFinishScreen
236
351
  ]);
237
352
  const hideSpinnerText = !(config.spinnerConfig?.title || config.spinnerConfig?.subtitle);
238
353
  const renderSpinner = () => /* @__PURE__ */ u("div", {
@@ -260,7 +375,18 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
260
375
  class: "IncodeWorkflow",
261
376
  children: /* @__PURE__ */ u(TerminalErrorPage, { message: workflowState.error })
262
377
  });
263
- if (workflowState.status === "finished" || workflowState.status === "asyncResolution" || workflowState.status === "closed") return null;
378
+ if (workflowState.status === "completing") return /* @__PURE__ */ u("div", {
379
+ class: "IncodeWorkflow",
380
+ children: /* @__PURE__ */ u(TransitionSpinner, {})
381
+ });
382
+ if (workflowState.status === "finished") {
383
+ if (showFinishScreen) return /* @__PURE__ */ u("div", {
384
+ class: "IncodeWorkflow",
385
+ children: /* @__PURE__ */ u(FinishScreenBySessionStatus, { scoreStatus: workflowState.scoreStatus })
386
+ });
387
+ return null;
388
+ }
389
+ if (workflowState.status === "asyncResolution" || workflowState.status === "closed") return null;
264
390
  if (moduleLoaderState.status === "unsupported") return /* @__PURE__ */ u("div", {
265
391
  class: "IncodeWorkflow",
266
392
  children: /* @__PURE__ */ u(UnsupportedModule, {
@@ -280,7 +406,10 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
280
406
  ageAssurance: workflowState.workflowConfig.ageAssurance
281
407
  });
282
408
  let extraProps = {};
283
- if (workflowState.currentNode.moduleKey === "REDIRECT_TO_MOBILE") extraProps = { onContinue: () => workflowManager.completeModule() };
409
+ if (workflowState.currentNode.moduleKey === "REDIRECT_TO_MOBILE") extraProps = {
410
+ onFinish: () => workflowManager.finishWorkflow(),
411
+ onContinue: () => workflowManager.completeModule()
412
+ };
284
413
  return /* @__PURE__ */ u("div", {
285
414
  class: "IncodeWorkflow",
286
415
  children: /* @__PURE__ */ u(Component, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "2.1.0-rc.1",
3
+ "version": "2.1.0-rc.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -35,6 +35,15 @@
35
35
  "source": "./src/modules/selfie/styles.css",
36
36
  "default": "./dist/selfie/styles.css"
37
37
  },
38
+ "./video-selfie": {
39
+ "source": "./src/modules/video-selfie/video-selfie.tsx",
40
+ "types": "./dist/types/video-selfie.d.ts",
41
+ "import": "./dist/video-selfie/video-selfie.es.js"
42
+ },
43
+ "./video-selfie/styles.css": {
44
+ "source": "./src/modules/video-selfie/styles.css",
45
+ "default": "./dist/video-selfie/styles.css"
46
+ },
38
47
  "./phone": {
39
48
  "source": "./src/modules/phone/phone.tsx",
40
49
  "types": "./dist/types/phone.d.ts",
@@ -98,6 +107,15 @@
98
107
  "source": "./src/modules/curp-validation/styles.css",
99
108
  "default": "./dist/curp-validation/styles.css"
100
109
  },
110
+ "./government-validation": {
111
+ "source": "./src/modules/government-validation/government-validation.tsx",
112
+ "types": "./dist/types/government-validation.d.ts",
113
+ "import": "./dist/government-validation/government-validation.es.js"
114
+ },
115
+ "./government-validation/styles.css": {
116
+ "source": "./src/modules/government-validation/styles.css",
117
+ "default": "./dist/government-validation/styles.css"
118
+ },
101
119
  "./cpf-ocr": {
102
120
  "source": "./src/modules/cpf-ocr/cpfOcr.tsx",
103
121
  "types": "./dist/types/cpf-ocr.d.ts",
@@ -193,6 +211,15 @@
193
211
  "source": "./src/modules/field-comparison/styles.css",
194
212
  "default": "./dist/field-comparison/styles.css"
195
213
  },
214
+ "./fiscal-qr": {
215
+ "source": "./src/modules/fiscal-qr/fiscal-qr.tsx",
216
+ "types": "./dist/types/fiscal-qr.d.ts",
217
+ "import": "./dist/fiscal-qr/fiscal-qr.es.js"
218
+ },
219
+ "./fiscal-qr/styles.css": {
220
+ "source": "./src/modules/fiscal-qr/styles.css",
221
+ "default": "./dist/fiscal-qr/styles.css"
222
+ },
196
223
  "./electronic-signature": {
197
224
  "source": "./src/modules/electronic-signature/electronic-signature.tsx",
198
225
  "types": "./dist/types/electronic-signature.d.ts",
@@ -233,6 +260,15 @@
233
260
  "source": "./src/modules/cross-document-data-match/cross-document-data-match.tsx",
234
261
  "types": "./dist/types/cross-document-data-match.d.ts",
235
262
  "import": "./dist/cross-document-data-match/cross-document-data-match.es.js"
263
+ },
264
+ "./certificate-issuance": {
265
+ "source": "./src/modules/certificate-issuance/certificate-issuance.tsx",
266
+ "types": "./dist/types/certificate-issuance.d.ts",
267
+ "import": "./dist/certificate-issuance/certificate-issuance.es.js"
268
+ },
269
+ "./certificate-issuance/styles.css": {
270
+ "source": "./src/modules/certificate-issuance/styles.css",
271
+ "default": "./dist/certificate-issuance/styles.css"
236
272
  }
237
273
  },
238
274
  "files": [
@@ -255,7 +291,7 @@
255
291
  "qrcode": "^1.5.4",
256
292
  "signature_pad": "^5.1.3",
257
293
  "tailwindcss": "^4.1.17",
258
- "@incodetech/core": "2.1.0-rc.1"
294
+ "@incodetech/core": "2.1.0-rc.3"
259
295
  },
260
296
  "devDependencies": {
261
297
  "@microsoft/api-extractor": "^7.53.3",
@@ -295,9 +331,10 @@
295
331
  "build:cdn": "rm -rf dist && NODE_OPTIONS=--experimental-strip-types BUILD_TARGET=cdn vite build",
296
332
  "build:dev": "NODE_ENV=development vite build",
297
333
  "build:analyze": "rm -rf dist && ANALYZE=1 vite build && echo '\\nBundle report: packages/ui/dist/stats.html\\n'",
298
- "test": "vitest run",
299
- "test:a11y": "VITE_STORYBOOK_A11Y=true vitest run",
300
- "coverage": "vitest run --coverage",
334
+ "test": "vitest run --project=unit",
335
+ "test:storybook": "vitest run --project=storybook",
336
+ "test:a11y": "VITE_STORYBOOK_A11Y=true vitest run --project=storybook",
337
+ "coverage": "vitest run --project=unit --coverage",
301
338
  "lint": "eslint . && pnpm lint:styles",
302
339
  "lint:fix": "eslint . --fix && pnpm lint:styles",
303
340
  "lint:styles": "stylelint \"src/**/*.css\"",
@@ -1,2 +0,0 @@
1
- import { t as CpfOcr } from "./cpfOcr-MtpRztkG.js";
2
- export { CpfOcr };
@@ -1 +0,0 @@
1
- import "./dateInputComposed-C_mh4XBg.js";
@@ -1,2 +0,0 @@
1
- import { t as DocumentCapture } from "./documentCapture-BDV_921m.js";
2
- export { DocumentCapture };
@@ -1 +0,0 @@
1
- import "./dropdownComposed-_fgAlo_C.js";
@@ -1,2 +0,0 @@
1
- import { t as EkybModule } from "./ekybModule-CIPGmCvD.js";
2
- export { EkybModule };
@@ -1,2 +0,0 @@
1
- import { t as EkycModule } from "./ekycModule-BuTaC5ct.js";
2
- export { EkycModule };
@@ -1,2 +0,0 @@
1
- import { t as FaceMatch } from "./faceMatch--RDHJe4t.js";
2
- export { FaceMatch };
@@ -1,2 +0,0 @@
1
- import { t as FieldComparison } from "./fieldComparison-CAF86bTC.js";
2
- export { FieldComparison };
@@ -1 +0,0 @@
1
- import "./inputComposed-CQ4AsvZg.js";
@@ -1,71 +0,0 @@
1
- import { _ as y, l as A, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
2
- import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
3
- import { t as incode_logo_default } from "./incode-logo-57XFniXU.js";
4
- import { n as usePageUiConfig, t as VerifiedByIncodeLogo } from "./verifiedByIncode-DjXOdCml.js";
5
- //#region src/shared/page/page.tsx
6
- var Page = ({ title, titleId, subtitle, titleTopSlot, className, logo, children, hideHeader, hideFooterBranding, footerBrandingSlot, "data-testid": dataTestId, "data-permission-status": dataPermissionStatus }) => {
7
- const titleRef = A(null);
8
- y(() => {
9
- titleRef.current?.focus();
10
- }, []);
11
- const uiConfig = usePageUiConfig({
12
- hideHeader,
13
- hideFooterBranding,
14
- logo,
15
- defaultLogoSrc: incode_logo_default
16
- });
17
- const shouldShowHeader = title || subtitle || titleTopSlot;
18
- return /* @__PURE__ */ u("div", {
19
- class: `IncodePageContainer ${className ?? ""}`,
20
- "data-testid": dataTestId,
21
- "data-permission-status": dataPermissionStatus,
22
- children: /* @__PURE__ */ u("main", {
23
- class: "IncodePageInner",
24
- children: [
25
- !uiConfig.hideHeader && /* @__PURE__ */ u("header", {
26
- class: "IncodePageHeader",
27
- children: /* @__PURE__ */ u("img", {
28
- src: uiConfig.logoSrc,
29
- height: uiConfig.logoHeightPx,
30
- class: "IncodePageLogo",
31
- "aria-hidden": "true",
32
- alt: ""
33
- })
34
- }),
35
- shouldShowHeader ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: uiConfig.hideHeader ? 40 : 24 }), /* @__PURE__ */ u("div", {
36
- class: "IncodePageTitleContainer",
37
- children: [
38
- titleTopSlot ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
39
- class: "IncodePageTitleTopSlot",
40
- children: titleTopSlot
41
- }), /* @__PURE__ */ u(Spacer, { size: 12 })] }) : null,
42
- title ? /* @__PURE__ */ u("h2", {
43
- ref: titleRef,
44
- id: titleId,
45
- class: "IncodePageTitle",
46
- tabIndex: -1,
47
- children: title
48
- }) : null,
49
- subtitle ? /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(Spacer, { size: 12 }), /* @__PURE__ */ u("p", {
50
- class: "IncodePageSubtitle",
51
- children: subtitle
52
- })] }) : null
53
- ]
54
- })] }) : null,
55
- /* @__PURE__ */ u("div", {
56
- class: "IncodePageContent",
57
- children
58
- }),
59
- !uiConfig.hideFooterBranding ? /* @__PURE__ */ u("div", {
60
- class: "IncodePageFooter",
61
- children: /* @__PURE__ */ u("div", {
62
- class: "IncodePageFooterInner",
63
- children: footerBrandingSlot ?? /* @__PURE__ */ u(VerifiedByIncodeLogo, {})
64
- })
65
- }) : null
66
- ]
67
- })
68
- });
69
- };
70
- //#endregion
71
- export { Page as t };
@@ -1 +0,0 @@
1
- import "./spinner-D8a_2LvW.js";
File without changes