@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.
Files changed (205) hide show
  1. package/dist/ae-signature/ae-signature.es.js +7 -4
  2. package/dist/antifraud/antifraud.es.js +6 -6
  3. package/dist/authentication/authentication.es.js +7 -7
  4. package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
  5. package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
  6. package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
  7. package/dist/base.css +425 -3290
  8. package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
  9. package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
  10. package/dist/certificate-issuance/styles.css +0 -41
  11. package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
  12. package/dist/connectionError-DAeXp8sE.js +45 -0
  13. package/dist/consent/consent.es.js +10 -12
  14. package/dist/consent/styles.css +5 -4
  15. package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
  16. package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
  17. package/dist/curp-validation/curp-validation.es.js +28 -29
  18. package/dist/curp-validation/styles.css +47 -0
  19. package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
  20. package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
  21. package/dist/dashboardTheme-CVliZSR-.js +223 -0
  22. package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
  23. package/dist/dateInputComposed-ks0-opuq.js +1 -0
  24. package/dist/document-capture/document-capture.es.js +1 -1
  25. package/dist/document-capture/styles.css +85 -70
  26. package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
  27. package/dist/documentCapture-DdHdRPzR.js +2 -0
  28. package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
  29. package/dist/dropdownComposed-kjG4UblM.js +1 -0
  30. package/dist/dynamic-forms/styles.css +58 -6
  31. package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekyb/styles.css +1 -28
  34. package/dist/ekybModule-CiaxFHXo.js +2 -0
  35. package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
  36. package/dist/ekyc/ekyc.es.js +1 -1
  37. package/dist/ekyc/styles.css +2 -2
  38. package/dist/ekycModule-BVt10kgv.js +2 -0
  39. package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
  40. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  41. package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
  42. package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
  43. package/dist/email/email.es.js +10 -11
  44. package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
  45. package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
  46. package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
  47. package/dist/extensibility.es.js +24 -28
  48. package/dist/face-match/face-match.es.js +1 -1
  49. package/dist/face-match/styles.css +9 -609
  50. package/dist/faceMatch-D4XFihTc.js +2 -0
  51. package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
  52. package/dist/field-comparison/field-comparison.es.js +1 -1
  53. package/dist/fieldComparison-B_r9Bal7.js +2 -0
  54. package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
  55. package/dist/finalSuccessScreen-DryADx1n.js +500 -0
  56. package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
  57. package/dist/flip-animation-CvN8FLNc.js +6996 -0
  58. package/dist/flow/flow.es.js +81 -45
  59. package/dist/flow/styles.css +908 -5423
  60. package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
  61. package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
  62. package/dist/geolocation/geolocation.es.js +36 -13
  63. package/dist/geolocation/styles.css +1 -1
  64. package/dist/government-validation/government-validation.es.js +11 -12
  65. package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
  66. package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
  67. package/dist/id/id.es.js +222 -52
  68. package/dist/id/styles.css +290 -10
  69. package/dist/id-back-of-card-DO593HH8.js +83 -0
  70. package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
  71. package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
  72. package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
  73. package/dist/id-laser-h-BaUHzX-d.js +480 -0
  74. package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
  75. package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
  76. package/dist/id-selfie-flow/styles.css +749 -0
  77. package/dist/id-verification/id-verification.es.js +13 -9
  78. package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
  79. package/dist/identity-reuse/identity-reuse.es.js +6 -8
  80. package/dist/identity-reuse/styles.css +1 -1
  81. package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
  82. package/dist/incodeComponent-K9ZWg302.js +713 -0
  83. package/dist/incodeModule-CcLzar_X.js +25 -0
  84. package/dist/index.es.js +16 -5
  85. package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
  86. package/dist/inputComposed-CADVQW-o.js +1 -0
  87. package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
  88. package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
  89. package/dist/manualCaptureButton-t_oIol88.js +300 -0
  90. package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
  91. package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
  92. package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
  93. package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
  94. package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
  95. package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
  96. package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
  97. package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
  98. package/dist/pdfViewer-CZb6obcZ.js +2 -0
  99. package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
  100. package/dist/phone/phone.es.js +13 -12
  101. package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
  102. package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
  103. package/dist/qe-signature/qe-signature.es.js +7 -4
  104. package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
  105. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
  106. package/dist/redirect-to-mobile/styles.css +20 -10
  107. package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
  108. package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
  109. package/dist/selfie/selfie.es.js +10 -10
  110. package/dist/selfie/styles.css +16 -949
  111. package/dist/signature/signature.es.js +27 -19
  112. package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
  113. package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
  114. package/dist/spacer-CDlQd12V.js +2344 -0
  115. package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
  116. package/dist/statusPage--GVFSUJp.js +36 -0
  117. package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
  118. package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
  119. package/dist/themes/dark.css +35 -0
  120. package/dist/themes/light.css +35 -0
  121. package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
  122. package/dist/types/ae-signature.d.ts +91 -5
  123. package/dist/types/antifraud.d.ts +86 -3
  124. package/dist/types/authentication.d.ts +86 -3
  125. package/dist/types/certificate-issuance.d.ts +86 -3
  126. package/dist/types/consent.d.ts +86 -3
  127. package/dist/types/cross-document-data-match.d.ts +88 -4
  128. package/dist/types/curp-validation.d.ts +86 -3
  129. package/dist/types/document-capture.d.ts +88 -4
  130. package/dist/types/ekyb.d.ts +88 -4
  131. package/dist/types/ekyc.d.ts +88 -4
  132. package/dist/types/electronic-signature.d.ts +87 -4
  133. package/dist/types/email.d.ts +82 -22
  134. package/dist/types/extensibility.d.ts +157 -5
  135. package/dist/types/face-match.d.ts +84 -22
  136. package/dist/types/field-comparison.d.ts +86 -3
  137. package/dist/types/fiscal-qr.d.ts +89 -5
  138. package/dist/types/flow.d.ts +92 -2
  139. package/dist/types/geolocation.d.ts +86 -3
  140. package/dist/types/government-validation.d.ts +86 -3
  141. package/dist/types/id-selfie-flow.d.ts +161 -0
  142. package/dist/types/id-verification.d.ts +87 -4
  143. package/dist/types/id.d.ts +88 -5
  144. package/dist/types/identity-reuse.d.ts +82 -2
  145. package/dist/types/index.d.ts +106 -1
  146. package/dist/types/phone.d.ts +83 -24
  147. package/dist/types/qe-signature.d.ts +91 -5
  148. package/dist/types/redirect-to-mobile.d.ts +4 -1
  149. package/dist/types/selfie.d.ts +86 -3
  150. package/dist/types/signature.d.ts +91 -5
  151. package/dist/types/video-selfie.d.ts +83 -6
  152. package/dist/types/watchlist.d.ts +91 -5
  153. package/dist/types/workflow.d.ts +85 -2
  154. package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
  155. package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
  156. package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
  157. package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
  158. package/dist/video-selfie/styles.css +349 -1202
  159. package/dist/video-selfie/video-selfie.es.js +120 -381
  160. package/dist/watchlist/watchlist.es.js +16 -13
  161. package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
  162. package/dist/workflow/styles.css +501 -3977
  163. package/dist/workflow/workflow.es.js +25 -18
  164. package/package.json +22 -20
  165. package/dist/button-Dz6AsbmF.js +0 -40
  166. package/dist/cameraView-DIEzM5ru.js +0 -47
  167. package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
  168. package/dist/cpf-ocr/styles.css +0 -45
  169. package/dist/cpfOcr-B79245-3.js +0 -2
  170. package/dist/cpfOcr-BhxT-lRN.js +0 -92
  171. package/dist/dateInputComposed-DRzZi6uy.js +0 -1
  172. package/dist/documentCapture-DXYYyxZl.js +0 -2
  173. package/dist/dropdownComposed-BAoxIIsE.js +0 -1
  174. package/dist/ekybModule-C6Nttked.js +0 -2
  175. package/dist/ekycModule-CDIEjI6V.js +0 -2
  176. package/dist/errorIcon-BA4T6iy-.js +0 -26
  177. package/dist/faceMatch-B_HvxLm_.js +0 -2
  178. package/dist/fieldComparison-DfNEuEE5.js +0 -2
  179. package/dist/flip-animation-CZYSUtMm.js +0 -6983
  180. package/dist/hooks-CNu7o-v8.js +0 -186
  181. package/dist/id-laser-h-CzPegPMn.js +0 -467
  182. package/dist/incodeComponent-CfzJGETt.js +0 -64
  183. package/dist/incodeModule-B-4_3JrK.js +0 -13
  184. package/dist/inputComposed-BaY5q9WM.js +0 -1
  185. package/dist/loadingIcon-B0ysgiNq.js +0 -148
  186. package/dist/page-DidH_RkX.js +0 -171
  187. package/dist/spinner-BCDCoi9C.js +0 -1
  188. package/dist/statusPage-Bk8nJwXV.js +0 -28
  189. package/dist/transitionSpinner-CuNCqHNi.js +0 -30
  190. package/dist/types/cpf-ocr.d.ts +0 -12
  191. package/dist/typography-BZIpjo97.js +0 -45
  192. package/dist/uiConfig-D2_wawvr.js +0 -25
  193. /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
  194. /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
  195. /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
  196. /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
  197. /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
  198. /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
  199. /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
  200. /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
  201. /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
  202. /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
  203. /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
  204. /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
  205. /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
@@ -1,15 +1,11 @@
1
- import { n as useTranslation, o as readStoredLanguage } from "../i18n-CU4xq8qC.js";
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
- import { t as setUiConfig } from "../uiConfig-D2_wawvr.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 { 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-Bi26kJbg.js";
1
+ import { c as readStoredLanguage, i as useTranslation, t as setUiConfig } from "../uiConfig-B5ASPUL4.js";
2
+ import { _ as y, c as z, l as A, o as P, p as d, v as u } from "../vendor-preact-mvwZ8mJj.js";
3
+ import { i as fetchAndApplyTheme } from "../dashboardTheme-CVliZSR-.js";
4
+ import { a as TerminalErrorPage, i as ResolvedConfigProvider, l as TransitionSpinner, o as Page, t as IncodeComponent, y as useManager } from "../incodeComponent-K9ZWg302.js";
5
+ import { t as AutoFocusTitle } from "../autoFocusTitle-gLba2mgp.js";
6
+ import { t as registerIncodeModuleElement } from "../incodeModule-CcLzar_X.js";
7
+ 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 isDesktopOrEmulated } from "../useModuleLoader-D_YpuVsS.js";
11
8
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
- import { getDeviceClass } from "@incodetech/core/device";
13
9
  import { classifyScoreStatus } from "@incodetech/core/flow";
14
10
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
15
11
  import { createWorkflowManager } from "@incodetech/core/workflow";
@@ -131,6 +127,12 @@ var LAZY_WORKFLOW_MODULES = {
131
127
  ID: () => import("../id-verification/id-verification.es.js").then((m) => m.IdVerification),
132
128
  IDENTITY_REUSE: () => import("../identity-reuse/identity-reuse.es.js").then((m) => m.IdentityReuse)
133
129
  };
130
+ function setupWorkflowSDK(options) {
131
+ return setupSDK({
132
+ ...options,
133
+ preloadFlow: false
134
+ });
135
+ }
134
136
  async function fetchWorkflowTheme() {
135
137
  try {
136
138
  const theme = await fetchAndApplyTheme();
@@ -149,7 +151,7 @@ function createWorkflowUIManager(options = {}) {
149
151
  return createWorkflowManager({
150
152
  customModuleCallback: options.customModuleCallback,
151
153
  interviewId: options.interviewId,
152
- isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
154
+ isDesktop: options.isDesktop ?? isDesktopOrEmulated()
153
155
  });
154
156
  }
155
157
  function warmupWorkflowWasm(wasmConfig) {
@@ -218,7 +220,7 @@ function useWorkflowInitialization(options) {
218
220
  resolvedInterviewId = session.interviewId;
219
221
  } else throw new Error("Workflow requires token, or configurationId with apiKey or clientId");
220
222
  if (signal.aborted) return;
221
- await setupSDK({
223
+ await setupWorkflowSDK({
222
224
  token: resolvedToken,
223
225
  lang: options.lang
224
226
  });
@@ -263,14 +265,18 @@ function useWorkflowInitialization(options) {
263
265
  }
264
266
  //#endregion
265
267
  //#region src/modules/workflow/workflow.tsx
266
- var LazyHomeScreen = z(() => import("../homeScreen-B6T0JVh8.js").then((module) => ({ default: module.HomeScreen })));
268
+ var LazyHomeScreen = z(() => import("../homeScreen-Pv3v_0ji.js").then((module) => ({ default: module.HomeScreen })));
267
269
  function mapModuleConfig(options) {
268
- const { moduleKey, config, workflowId, authHint, lang, mergeSessionRecordings, ageAssurance } = options;
270
+ const { moduleKey, config, workflowId, authHint, loginHintPrefill, lang, mergeSessionRecordings, ageAssurance } = options;
269
271
  switch (moduleKey) {
270
272
  case "AUTHENTICATION": return {
271
273
  ...config,
272
274
  authHint
273
275
  };
276
+ case "DYNAMIC_FORMS": return {
277
+ ...config,
278
+ prefillValue: loginHintPrefill
279
+ };
274
280
  case "REDIRECT_TO_MOBILE": return {
275
281
  ...config,
276
282
  flowId: workflowId,
@@ -402,6 +408,7 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
402
408
  config: workflowState.config,
403
409
  workflowId: workflowState.workflowConfig.id,
404
410
  authHint: config.authHint,
411
+ loginHintPrefill: config.loginHintPrefill,
405
412
  lang: config.lang,
406
413
  mergeSessionRecordings: workflowState.workflowConfig.mergeSessionRecordings,
407
414
  ageAssurance: workflowState.workflowConfig.ageAssurance
@@ -415,7 +422,7 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
415
422
  class: "IncodeWorkflow",
416
423
  children: /* @__PURE__ */ u(Component, {
417
424
  config: moduleConfig,
418
- onFinish: () => workflowManager.completeModule(),
425
+ onFinish: (output) => workflowManager.completeModule(output),
419
426
  onError: handleModuleError,
420
427
  ...extraProps
421
428
  }, workflowState.currentNode.id)
@@ -450,11 +457,11 @@ var IncodeWorkflowContent = ({ config, onFinish, onError }) => {
450
457
  onError
451
458
  });
452
459
  };
453
- var IncodeWorkflow = ({ config, onFinish, onError }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IncodeWorkflowContent, {
460
+ var IncodeWorkflow = ({ config, onFinish, onError }) => /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(ResolvedConfigProvider, { children: /* @__PURE__ */ u(IncodeWorkflowContent, {
454
461
  config,
455
462
  onFinish,
456
463
  onError
457
- }) : null });
464
+ }) }) : null });
458
465
  registerIncodeModuleElement(IncodeWorkflow, "incode-workflow");
459
466
  //#endregion
460
467
  export { IncodeWorkflow, mapModuleConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "2.1.1",
3
+ "version": "2.2.0-rc.0",
4
4
  "license": "ISC",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,6 +45,15 @@
45
45
  "source": "./src/modules/video-selfie/styles.css",
46
46
  "default": "./dist/video-selfie/styles.css"
47
47
  },
48
+ "./id-selfie-flow": {
49
+ "source": "./src/modules/id-selfie-flow/id-selfie-flow.tsx",
50
+ "types": "./dist/types/id-selfie-flow.d.ts",
51
+ "import": "./dist/id-selfie-flow/id-selfie-flow.es.js"
52
+ },
53
+ "./id-selfie-flow/styles.css": {
54
+ "source": "./src/modules/id-selfie-flow/styles.css",
55
+ "default": "./dist/id-selfie-flow/styles.css"
56
+ },
48
57
  "./phone": {
49
58
  "source": "./src/modules/phone/phone.tsx",
50
59
  "types": "./dist/types/phone.d.ts",
@@ -117,15 +126,6 @@
117
126
  "source": "./src/modules/government-validation/styles.css",
118
127
  "default": "./dist/government-validation/styles.css"
119
128
  },
120
- "./cpf-ocr": {
121
- "source": "./src/modules/cpf-ocr/cpfOcr.tsx",
122
- "types": "./dist/types/cpf-ocr.d.ts",
123
- "import": "./dist/cpf-ocr/cpf-ocr.es.js"
124
- },
125
- "./cpf-ocr/styles.css": {
126
- "source": "./src/modules/cpf-ocr/styles.css",
127
- "default": "./dist/cpf-ocr/styles.css"
128
- },
129
129
  "./geolocation": {
130
130
  "source": "./src/modules/geolocation/geolocation.tsx",
131
131
  "types": "./dist/types/geolocation.d.ts",
@@ -236,8 +236,8 @@
236
236
  "import": "./dist/ae-signature/ae-signature.es.js"
237
237
  },
238
238
  "./ae-signature/styles.css": {
239
- "source": "./src/modules/ae-signature/styles.css",
240
- "default": "./dist/ae-signature/styles.css"
239
+ "source": "./src/modules/electronic-signature/styles.css",
240
+ "default": "./dist/electronic-signature/styles.css"
241
241
  },
242
242
  "./qe-signature": {
243
243
  "source": "./src/modules/qe-signature/qe-signature.tsx",
@@ -245,8 +245,8 @@
245
245
  "import": "./dist/qe-signature/qe-signature.es.js"
246
246
  },
247
247
  "./qe-signature/styles.css": {
248
- "source": "./src/modules/qe-signature/styles.css",
249
- "default": "./dist/qe-signature/styles.css"
248
+ "source": "./src/modules/electronic-signature/styles.css",
249
+ "default": "./dist/electronic-signature/styles.css"
250
250
  },
251
251
  "./workflow": {
252
252
  "source": "./src/modules/workflow/workflow.tsx",
@@ -292,7 +292,7 @@
292
292
  "qrcode": "^1.5.4",
293
293
  "signature_pad": "^5.1.3",
294
294
  "tailwindcss": "^4.1.17",
295
- "@incodetech/core": "2.1.1"
295
+ "@incodetech/core": "2.2.0-rc.0"
296
296
  },
297
297
  "devDependencies": {
298
298
  "@microsoft/api-extractor": "^7.53.3",
@@ -308,11 +308,12 @@
308
308
  "@types/node": "^22.10.5",
309
309
  "@types/qrcode": "^1.5.6",
310
310
  "@vitejs/plugin-basic-ssl": "^2.3.0",
311
- "@vitest/browser": "4.0.13",
312
- "@vitest/browser-playwright": "4.0.13",
313
- "@vitest/coverage-v8": "^4.0.13",
311
+ "@vitest/browser": "4.1.10",
312
+ "@vitest/browser-playwright": "4.1.10",
313
+ "@vitest/coverage-v8": "4.1.10",
314
+ "axe-core": "4.11.1",
314
315
  "happy-dom": "^20.7.0",
315
- "playwright": "^1.60.0",
316
+ "playwright": "1.60.0",
316
317
  "postcss": "^8.5.6",
317
318
  "postcss-import": "^16.1.1",
318
319
  "preact": "^10.27.2",
@@ -324,12 +325,13 @@
324
325
  "vite": "^8.0.0",
325
326
  "vite-plugin-dts": "^4.5.4",
326
327
  "vite-plugin-svgr": "^5.2.0",
327
- "vitest": "^4.0.13",
328
+ "vitest": "4.1.10",
328
329
  "@incodetech/config": "1.0.2"
329
330
  },
330
331
  "scripts": {
331
332
  "build": "rm -rf dist && vite build",
332
333
  "build:cdn": "rm -rf dist && NODE_OPTIONS=--experimental-strip-types BUILD_TARGET=cdn vite build",
334
+ "check:css-scope": "node scripts/check-css-scope.mjs",
333
335
  "build:dev": "NODE_ENV=development vite build",
334
336
  "build:analyze": "rm -rf dist && ANALYZE=1 vite build && echo '\\nBundle report: packages/ui/dist/stats.html\\n'",
335
337
  "test": "vitest run --project=unit",
@@ -1,40 +0,0 @@
1
- import { a as D, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
2
- import { n as cn, t as LoadingIcon } from "./loadingIcon-B0ysgiNq.js";
3
- //#region src/shared/button/button.tsx
4
- var LOADER_SIZE = 30;
5
- var variantClass = {
6
- primary: "IncodeButtonPrimary",
7
- secondary: "IncodeButtonSecondary",
8
- link: "IncodeButtonLink"
9
- };
10
- var sizeClass = {
11
- L: "IncodeButtonL",
12
- M: "IncodeButtonM",
13
- S: "IncodeButtonS",
14
- inline: "IncodeButtonInline"
15
- };
16
- var Button = D((props, ref) => {
17
- const { isLoading = false, variant = "primary", size = "L", icon, class: className, type = "button", children, disabled, ...rest } = props;
18
- const iconOnly = !children && !!icon;
19
- const showLoader = isLoading && size === "L";
20
- const renderContent = () => {
21
- if (showLoader) return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u(LoadingIcon, { size: LOADER_SIZE }), children ? /* @__PURE__ */ u("span", {
22
- class: "IncodeButtonLoadingLabel",
23
- children
24
- }) : null] });
25
- if (iconOnly) return icon;
26
- if (icon) return /* @__PURE__ */ u(k, { children: [children, icon] });
27
- return children;
28
- };
29
- return /* @__PURE__ */ u("button", {
30
- ref,
31
- ...rest,
32
- class: cn("IncodeButton", variantClass[variant], sizeClass[size], showLoader ? "IncodeButtonLoading" : "", iconOnly ? "IncodeButtonIconOnly" : "", className),
33
- disabled: disabled || showLoader,
34
- "aria-busy": showLoader || void 0,
35
- type,
36
- children: renderContent()
37
- });
38
- });
39
- //#endregion
40
- export { Button as t };
@@ -1,47 +0,0 @@
1
- import { _ as y, a as D, l as A, v as u } from "./vendor-preact-DThS2ZQ_.js";
2
- import { n as cn } from "./loadingIcon-B0ysgiNq.js";
3
- //#region src/shared/cameraOverlay/cameraFrame.tsx
4
- var CameraFrame = D(({ variant, aspectRatio, orientation = "horizontal", frameState = "idle", className, children }, ref) => {
5
- const stateClass = `IncodeCameraFrame${frameState.charAt(0).toUpperCase()}${frameState.slice(1)}`;
6
- return /* @__PURE__ */ u("div", {
7
- ref,
8
- class: cn("IncodeCameraFrame", variant === "fill" && "IncodeCameraFrameFill", variant === "locked" && "IncodeCameraFrameLocked", variant === "locked" && orientation === "horizontal" && "IncodeCameraFrameHorizontal", variant === "locked" && orientation === "vertical" && "IncodeCameraFrameVertical", stateClass, className),
9
- style: aspectRatio ? { aspectRatio } : void 0,
10
- "aria-hidden": true,
11
- children
12
- });
13
- });
14
- //#endregion
15
- //#region src/shared/cameraOverlay/cameraView.tsx
16
- var CameraView = ({ stream, children, videoRef: externalVideoRef, onPlaying, className, mirrored, ...rest }) => {
17
- const internalVideoRef = A(null);
18
- const setVideoRef = (el) => {
19
- internalVideoRef.current = el;
20
- if (typeof externalVideoRef === "function") externalVideoRef(el);
21
- else if (externalVideoRef) externalVideoRef.current = el;
22
- };
23
- y(() => {
24
- if (internalVideoRef.current && stream) {
25
- internalVideoRef.current.srcObject = stream;
26
- internalVideoRef.current.play().catch(() => {});
27
- }
28
- }, [stream]);
29
- return /* @__PURE__ */ u("div", {
30
- class: cn("IncodeCameraView", className),
31
- ...rest,
32
- children: [/* @__PURE__ */ u("div", {
33
- class: "IncodeCameraViewVideo",
34
- children: /* @__PURE__ */ u("video", {
35
- ref: setVideoRef,
36
- autoplay: true,
37
- playsInline: true,
38
- muted: true,
39
- onPlaying,
40
- "aria-hidden": "true",
41
- class: cn("IncodeCameraViewVideoElement", mirrored && "IncodeCameraViewVideoMirrored")
42
- })
43
- }), children]
44
- });
45
- };
46
- //#endregion
47
- export { CameraFrame as n, CameraView as t };
@@ -1,2 +0,0 @@
1
- import { t as CpfOcr } from "../cpfOcr-BhxT-lRN.js";
2
- export { CpfOcr };
@@ -1,45 +0,0 @@
1
- /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- .IncodeCpfOcrPage {
3
- width: 100%;
4
- height: 100%;
5
- animation: fadeIn var(--motion-fade-in-duration, .7s) ease-out;
6
- margin-inline: auto;
7
- animation-fill-mode: both;
8
- }
9
-
10
- @media (min-width: 48rem) {
11
- .IncodeCpfOcrPage.IncodePageContainer {
12
- align-items: stretch;
13
- }
14
- }
15
-
16
- .IncodeCpfOcrPage .IncodePageInner {
17
- height: 100%;
18
- min-height: var(--spacing-0, var(--spacing-none, 0px));
19
- }
20
-
21
- .IncodeCpfOcrPage .IncodePageContent {
22
- min-height: var(--spacing-0, var(--spacing-none, 0px));
23
- }
24
-
25
- .IncodeCpfOcrPage .IncodeCpfOcr {
26
- height: 100%;
27
- min-height: var(--spacing-0, var(--spacing-none, 0px));
28
- width: 100%;
29
- max-width: var(--incode-form-max-w);
30
- align-items: center;
31
- gap: var(--spacing-16, var(--spacing-16, 16px));
32
- flex-direction: column;
33
- flex: 1;
34
- display: flex;
35
- }
36
-
37
- .IncodeCpfOcrPage .IncodeCpfOcrLoading {
38
- height: 100%;
39
- min-height: var(--spacing-0, var(--spacing-none, 0px));
40
- flex-direction: column;
41
- flex: 1;
42
- justify-content: center;
43
- align-items: center;
44
- display: flex;
45
- }
@@ -1,2 +0,0 @@
1
- import { t as CpfOcr } from "./cpfOcr-BhxT-lRN.js";
2
- export { CpfOcr };
@@ -1,92 +0,0 @@
1
- import { _ as y, p as d, v as u } from "./vendor-preact-DThS2ZQ_.js";
2
- import { c as useModuleTerminalCallbacks, u as useManager } from "./hooks-CNu7o-v8.js";
3
- import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
4
- import { t as Page } from "./page-DidH_RkX.js";
5
- import { t as Spinner } from "./spinner-BMeIEK1d.js";
6
- import "./spinner-BCDCoi9C.js";
7
- import { t as Button } from "./button-Dz6AsbmF.js";
8
- import { t as VerificationResult } from "./verificationResult-BWWkmeiA.js";
9
- import { t as InputComposed } from "./inputComposed-C1R2LAa3.js";
10
- import { createCpfOcrManager } from "@incodetech/core/cpf-ocr";
11
- //#region src/modules/cpf-ocr/cpfOcr.tsx
12
- var getInputState = (state) => {
13
- if (state.status === "inputting") return {
14
- cpf: state.cpf,
15
- isValid: state.isValid
16
- };
17
- return {
18
- cpf: "",
19
- isValid: false
20
- };
21
- };
22
- var CpfOcr = ({ manager: externalManager, onFinish, onError }) => {
23
- const [state, manager] = useManager(() => externalManager ?? createCpfOcrManager(), { manageLifecycle: !externalManager });
24
- const [hasBlurred, setHasBlurred] = d(false);
25
- const [hasEdited, setHasEdited] = d(false);
26
- const [isFocused, setIsFocused] = d(false);
27
- useModuleTerminalCallbacks({
28
- status: state.status === "finished" ? "finished" : "loading",
29
- onFinish
30
- });
31
- y(() => {
32
- if (state.status === "error") onError?.(state.error);
33
- }, [state, onError]);
34
- if (state.status === "idle" || state.status === "loading" || state.status === "submitting") return /* @__PURE__ */ u(Page, {
35
- className: "IncodeCpfOcrPage",
36
- children: /* @__PURE__ */ u("div", {
37
- class: "IncodeCpfOcrLoading",
38
- children: /* @__PURE__ */ u(Spinner, { fullScreen: false })
39
- })
40
- });
41
- if (state.status === "error") return /* @__PURE__ */ u(VerificationResult, {
42
- status: "failure",
43
- failureTitle: "Não foi possível verificar o CPF",
44
- onRetry: () => manager.retry()
45
- });
46
- if (state.status === "finished") return null;
47
- const inputState = getInputState(state);
48
- const isComplete = inputState.cpf.replace(/\D/g, "").length === 11;
49
- const cpfError = hasEdited && !inputState.isValid && (isComplete || hasBlurred && !isFocused) ? "Insira um CPF válido" : void 0;
50
- return /* @__PURE__ */ u(Page, {
51
- className: "IncodeCpfOcrPage",
52
- title: "Insira e verifique o número do seu CPF",
53
- children: /* @__PURE__ */ u("div", {
54
- class: "IncodeCpfOcr",
55
- children: [
56
- /* @__PURE__ */ u(Spacer, { size: 32 }),
57
- /* @__PURE__ */ u(InputComposed, {
58
- id: "cpf-ocr-input",
59
- label: "",
60
- value: inputState.cpf,
61
- placeholder: "Seu CPF",
62
- maxLength: 14,
63
- inputMode: "numeric",
64
- "aria-label": "CPF",
65
- onInput: (event) => {
66
- setHasEdited(true);
67
- manager.setCpf(event.target.value);
68
- },
69
- onFocus: () => {
70
- setIsFocused(true);
71
- },
72
- onBlur: () => {
73
- setIsFocused(false);
74
- setHasBlurred(true);
75
- },
76
- error: cpfError,
77
- showErrorIcon: true
78
- }),
79
- /* @__PURE__ */ u(Spacer, {}),
80
- /* @__PURE__ */ u(Button, {
81
- type: "button",
82
- onClick: () => manager.submit(),
83
- disabled: !inputState.isValid,
84
- "data-testid": "cpf-ocr-continue",
85
- children: "Continuar"
86
- })
87
- ]
88
- })
89
- });
90
- };
91
- //#endregion
92
- export { CpfOcr as t };
@@ -1 +0,0 @@
1
- import "./dateInputComposed-DuaofcBl.js";
@@ -1,2 +0,0 @@
1
- import { t as DocumentCapture } from "./documentCapture-DhbO-A-V.js";
2
- export { DocumentCapture };
@@ -1 +0,0 @@
1
- import "./dropdownComposed-CoU0enG6.js";
@@ -1,2 +0,0 @@
1
- import { t as EkybModule } from "./ekybModule-DGnTw5UV.js";
2
- export { EkybModule };
@@ -1,2 +0,0 @@
1
- import { t as EkycModule } from "./ekycModule-Dxpdd0ns.js";
2
- export { EkycModule };
@@ -1,26 +0,0 @@
1
- import { v as u } from "./vendor-preact-DThS2ZQ_.js";
2
- //#region src/shared/icons/errorIcon.tsx
3
- var ErrorIcon = ({ size = 32 }) => {
4
- return /* @__PURE__ */ u("svg", {
5
- xmlns: "http://www.w3.org/2000/svg",
6
- width: size,
7
- height: size,
8
- viewBox: "0 0 64 64",
9
- fill: "none",
10
- class: "IncodeErrorIcon",
11
- "aria-hidden": "true",
12
- children: [/* @__PURE__ */ u("path", {
13
- "fill-rule": "evenodd",
14
- "clip-rule": "evenodd",
15
- d: "M32 6.66669C18.032 6.66669 6.66669 18.0294 6.66669 32C6.66669 45.968 18.032 57.3334 32 57.3334C45.968 57.3334 57.3334 45.968 57.3334 32C57.3334 18.0294 45.968 6.66669 32 6.66669Z",
16
- fill: "var(--icon-status-negative)"
17
- }), /* @__PURE__ */ u("path", {
18
- "fill-rule": "evenodd",
19
- "clip-rule": "evenodd",
20
- d: "M39.6426 39.6368C39.2533 40.0261 38.7413 40.2235 38.2293 40.2235C37.7146 40.2235 37.2053 40.0261 36.8133 39.6368L31.9973 34.8181L27.1946 39.6208C26.4133 40.4021 25.1467 40.4021 24.3653 39.6208C23.5867 38.8395 23.5867 37.5755 24.3653 36.7941L29.168 31.9915L24.3627 27.1835C23.5813 26.4021 23.5813 25.1381 24.3627 24.3568C25.144 23.5755 26.408 23.5755 27.1893 24.3568L31.9946 29.1621L36.8 24.3595C37.5813 23.5781 38.8453 23.5781 39.6266 24.3595C40.408 25.1381 40.408 26.4048 39.6266 27.1861L34.824 31.9915L39.6426 36.8075C40.424 37.5888 40.424 38.8555 39.6426 39.6368Z",
21
- fill: "var(--icon-neutral-0)"
22
- })]
23
- });
24
- };
25
- //#endregion
26
- export { ErrorIcon as t };
@@ -1,2 +0,0 @@
1
- import { t as FaceMatch } from "./faceMatch-DyTBoMDm.js";
2
- export { FaceMatch };
@@ -1,2 +0,0 @@
1
- import { t as FieldComparison } from "./fieldComparison-L_knHqgw.js";
2
- export { FieldComparison };