@incodetech/web 2.0.1 → 2.1.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 (253) hide show
  1. package/dist/ae-signature/ae-signature.es.js +15 -13
  2. package/dist/ae-signature/styles.css +3 -17
  3. package/dist/ae-signature/styles2.css +15 -5
  4. package/dist/aligndevicelottie-DY_bX_p8.js +12769 -0
  5. package/dist/antifraud/antifraud.es.js +23 -16
  6. package/dist/authentication/authentication.es.js +42 -27
  7. package/dist/autoFocusTitle-BzkUiELM.js +29 -0
  8. package/dist/{back-horizontal-hint-B8Brxh3U.js → back-horizontal-hint-D_8LptLm.js} +26 -26
  9. package/dist/back-tutorial-vb1MxlrT.js +14597 -0
  10. package/dist/{back-vertical-hint-BBo36dxn.js → back-vertical-hint-C1evxxq2.js} +27 -27
  11. package/dist/backdevicelottie-HypPqBz7.js +16690 -0
  12. package/dist/base.css +1258 -104
  13. package/dist/blurdevicelottie-CBXtBFiJ.js +15951 -0
  14. package/dist/bottomSheet-F1GJfQx_.js +39 -0
  15. package/dist/browser-ponyfill-CLLvZCVg.js +441 -0
  16. package/dist/button-CM_hgyIP.js +35 -0
  17. package/dist/checkbox-BoeLHKgp.js +96 -0
  18. package/dist/consent/consent.es.js +89 -73
  19. package/dist/consent/styles.css +35 -22
  20. package/dist/countrySelector-mSWyHSy4.js +60 -0
  21. package/dist/cpf-ocr/cpf-ocr.es.js +2 -0
  22. package/dist/cpfOcr-MtpRztkG.js +92 -0
  23. package/dist/cpfOcr-jJkYCfsX.js +2 -0
  24. package/dist/cross-document-data-match/cross-document-data-match.es.js +20 -16
  25. package/dist/curp-validation/curp-validation.es.js +247 -203
  26. package/dist/customFields-DXXt9HGM.js +140 -0
  27. package/dist/customWatchlist-DsW04UF6.js +36 -0
  28. package/dist/dateInputComposed-C_mh4XBg.js +69 -0
  29. package/dist/dateInputComposed-Cy6a7ymh.js +1 -0
  30. package/dist/defineProperty-mefzVtTv.js +39 -0
  31. package/dist/document-capture/document-capture.es.js +2 -0
  32. package/dist/document-capture/styles.css +2 -5
  33. package/dist/documentCapture-8ypBJehw.js +2 -0
  34. package/dist/documentCapture-BDV_921m.js +880 -0
  35. package/dist/dropdownComposed-CEWBSdGl.js +1 -0
  36. package/dist/dropdownComposed-_fgAlo_C.js +380 -0
  37. package/dist/dynamic-forms/styles.css +25 -13
  38. package/dist/dynamicForms-DyfnsS7E.js +352 -0
  39. package/dist/ekyb/ekyb.es.js +2 -2
  40. package/dist/ekyb/styles.css +2 -0
  41. package/dist/ekybModule-CIPGmCvD.js +279 -0
  42. package/dist/ekybModule-DFoYpheB.js +2 -0
  43. package/dist/ekyc/ekyc.es.js +2 -2
  44. package/dist/ekyc/styles.css +9 -7
  45. package/dist/ekycModule-BGzwgjl1.js +2 -0
  46. package/dist/ekycModule-BuTaC5ct.js +257 -0
  47. package/dist/electronic-signature/electronic-signature.es.js +2 -2
  48. package/dist/electronic-signature-B-Q7M0wK.js +430 -0
  49. package/dist/email/email.es.js +199 -66
  50. package/dist/emailInput-KZmhjOdZ.js +39 -0
  51. package/dist/errorIcon-DJRZpd8j.js +26 -0
  52. package/dist/expiredId-Q1t6aVpk.js +85 -0
  53. package/dist/extensibility-Cs3KQQdC.js +3070 -0
  54. package/dist/extensibility.es.js +26 -25
  55. package/dist/face-match/face-match.es.js +2 -2
  56. package/dist/face-match/styles.css +0 -4
  57. package/dist/faceMatch--RDHJe4t.js +343 -0
  58. package/dist/faceMatch-yEKPYaym.js +2 -0
  59. package/dist/field-comparison/field-comparison.es.js +2 -0
  60. package/dist/field-comparison/styles.css +16 -0
  61. package/dist/fieldComparison-CAF86bTC.js +88 -0
  62. package/dist/fieldComparison-D0an7T_g.js +2 -0
  63. package/dist/fiscal-qr/fiscal-qr.es.js +224 -0
  64. package/dist/fiscal-qr/styles.css +71 -0
  65. package/dist/{flip-animation-CgwRsEmK.js → flip-animation-BGRvygw9.js} +4221 -4221
  66. package/dist/flow/flow.es.js +619 -484
  67. package/dist/flow/styles.css +378 -418
  68. package/dist/{front-horizontal-hint-DGGGi8e1.js → front-horizontal-hint-Uf5bHCsd.js} +70 -70
  69. package/dist/{front-vertical-hint-CNr5mE6Q.js → front-vertical-hint-DdWNA45v.js} +81 -81
  70. package/dist/frontdevicelottie-CLqitJhG.js +17314 -0
  71. package/dist/geolocation/geolocation.es.js +486 -395
  72. package/dist/glaredevicelottie-BS04U6Fc.js +14478 -0
  73. package/dist/governmentValidation/governmentValidation.es.js +166 -93
  74. package/dist/governmentValidation/styles.css +0 -17
  75. package/dist/homeScreen-BZnIEDrV.js +264 -0
  76. package/dist/hooks-Da_yP_Dr.js +149 -0
  77. package/dist/i18n-CoCO2ZuN.js +2971 -0
  78. package/dist/icons-Dbs9ZfYM.js +360 -0
  79. package/dist/id/id.es.js +583 -414
  80. package/dist/id/styles.css +59 -43
  81. package/dist/id-laser-h-DX8UbVNH.js +467 -0
  82. package/dist/id-laser-v-DhnHdjlB.js +490 -0
  83. package/dist/id-tutorial-lj4iKtYT.js +13165 -0
  84. package/dist/id-verification/id-verification.es.js +21 -17
  85. package/dist/idOcr-CjGbb4dB.js +123 -0
  86. package/dist/identity-reuse/identity-reuse.es.js +311 -182
  87. package/dist/identity-reuse/styles.css +134 -80
  88. package/dist/incode-logo-57XFniXU.js +4 -0
  89. package/dist/incodeComponent-wfnHlnXx.js +63 -0
  90. package/dist/incodeModule-BUDoTwT9.js +13 -0
  91. package/dist/index.es.js +16 -13
  92. package/dist/inputComposed-BEn7_nZd.js +1 -0
  93. package/dist/inputComposed-CQ4AsvZg.js +99 -0
  94. package/dist/loadingIcon-B0ysgiNq.js +148 -0
  95. package/dist/lottie_light-Dp9Bz3mf.js +9031 -0
  96. package/dist/mandatoryConsent-r0PQHmv-.js +107 -0
  97. package/dist/modal-nTSaG7nB.js +139 -0
  98. package/dist/modal.hooks-D2xhIuHA.js +195 -0
  99. package/dist/numberedStep-CEtwZqLp.js +13 -0
  100. package/dist/optionAccessibleLabel-CnA-mNAU.js +202 -0
  101. package/dist/otpInput-_JmtVwa0.js +195 -0
  102. package/dist/page-DxGQj7Gk.js +71 -0
  103. package/dist/{passport-horizontal-hint-Bgquwtac.js → passport-horizontal-hint-Bbm2mvSn.js} +55 -55
  104. package/dist/{passport-tutorial-DwRwtPVX.js → passport-tutorial-zT1ZoA-D.js} +7096 -7084
  105. package/dist/{passport-vertical-hint-BT1D5BrW.js → passport-vertical-hint-DJbCtBiM.js} +49 -49
  106. package/dist/pdf-BZA70WbM.js +22398 -0
  107. package/dist/pdfViewer-BK-yVIve.js +114 -0
  108. package/dist/phone/phone.es.js +214 -70
  109. package/dist/phoneInputComposed-DjNdsmPE.js +12142 -0
  110. package/dist/processing-BM-wT-1W.js +8 -0
  111. package/dist/qe-signature/qe-signature.es.js +15 -13
  112. package/dist/radioGroupComposed-BNuaopVr.js +215 -0
  113. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +2774 -0
  114. package/dist/redirect-to-mobile/styles.css +19 -269
  115. package/dist/registerIncodeElement-77NGCDsy.js +11 -0
  116. package/dist/requiredLabelHint-DEadtiwx.js +17 -0
  117. package/dist/richText-Cf9aMOCk.js +3153 -0
  118. package/dist/rolldown-runtime--E5BIlTp.js +33 -0
  119. package/dist/selfie/selfie.es.js +54 -37
  120. package/dist/selfie/styles.css +0 -4
  121. package/dist/selfieTutorial-CtruLyO2.js +2689 -0
  122. package/dist/signature/signature.es.js +778 -405
  123. package/dist/snackbar-CxepGC3e.js +16 -0
  124. package/dist/spinner-B6RxGFrI.js +1 -0
  125. package/dist/spinner-D8a_2LvW.js +42 -0
  126. package/dist/statusPage-DMYPUwRZ.js +28 -0
  127. package/dist/successIcon-BAyDPT7I.js +30 -0
  128. package/dist/tabs-C8npVBbk.js +103 -0
  129. package/dist/themes/dark.css +5 -0
  130. package/dist/themes/light.css +4 -0
  131. package/dist/transitionSpinner-DRRz-NV8.js +26 -0
  132. package/dist/{tutorial-9vHAHvMK.js → tutorial-D1qaY2Tm.js} +1105 -856
  133. package/dist/types/ae-signature.d.ts +4 -1
  134. package/dist/types/antifraud.d.ts +9 -3
  135. package/dist/types/authentication.d.ts +4 -1
  136. package/dist/types/consent.d.ts +4 -1
  137. package/dist/types/cpf-ocr.d.ts +12 -0
  138. package/dist/types/cross-document-data-match.d.ts +4 -1
  139. package/dist/types/curp-validation.d.ts +9 -3
  140. package/dist/types/document-capture.d.ts +37 -0
  141. package/dist/types/ekyb.d.ts +4 -1
  142. package/dist/types/ekyc.d.ts +4 -1
  143. package/dist/types/electronic-signature.d.ts +4 -1
  144. package/dist/types/email.d.ts +4 -1
  145. package/dist/types/extensibility.d.ts +40 -15
  146. package/dist/types/face-match.d.ts +4 -1
  147. package/dist/types/field-comparison.d.ts +38 -0
  148. package/dist/types/fiscal-qr.d.ts +43 -0
  149. package/dist/types/flow.d.ts +5 -2
  150. package/dist/types/geolocation.d.ts +4 -1
  151. package/dist/types/governmentValidation.d.ts +4 -1
  152. package/dist/types/id-verification.d.ts +4 -1
  153. package/dist/types/id.d.ts +4 -1
  154. package/dist/types/identity-reuse.d.ts +4 -1
  155. package/dist/types/index.d.ts +20 -2
  156. package/dist/types/phone.d.ts +4 -1
  157. package/dist/types/qe-signature.d.ts +4 -1
  158. package/dist/types/redirect-to-mobile.d.ts +17 -0
  159. package/dist/types/selfie.d.ts +4 -1
  160. package/dist/types/signature.d.ts +4 -1
  161. package/dist/types/watchlist.d.ts +4 -1
  162. package/dist/types/workflow.d.ts +55 -11
  163. package/dist/typography-YLgHHuao.js +45 -0
  164. package/dist/uiConfig-D2_wawvr.js +25 -0
  165. package/dist/useModuleLoader-CeJ2jL25.js +672 -0
  166. package/dist/vendor-preact-DThS2ZQ_.js +955 -0
  167. package/dist/verificationResult-Do5SpZ6X.js +64 -0
  168. package/dist/verifiedByIncode-DjXOdCml.js +103 -0
  169. package/dist/watchlist/watchlist.es.js +31 -28
  170. package/dist/watchlistForBusiness-BFFXC9d-.js +80 -0
  171. package/dist/workflow/styles.css +449 -427
  172. package/dist/workflow/workflow.es.js +268 -182
  173. package/package.json +32 -10
  174. package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
  175. package/dist/autoFocusTitle-QexamZ4i.js +0 -16
  176. package/dist/back-tutorial-1NOQobGO.js +0 -14585
  177. package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
  178. package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
  179. package/dist/bottomSheet-DE_8TFEC.js +0 -31
  180. package/dist/browser-ponyfill-jOkuz57z.js +0 -299
  181. package/dist/button-DcCUEn2n.js +0 -24
  182. package/dist/checkbox-Cl57ltq_.js +0 -85
  183. package/dist/countrySelector-CE-JgIsv.js +0 -58
  184. package/dist/cpfOcr-D_tbwbvh.js +0 -78
  185. package/dist/customFields-CW38fQUv.js +0 -127
  186. package/dist/customWatchlist-D9_yjEQd.js +0 -33
  187. package/dist/dateInputComposed-BpAGsjN6.js +0 -55
  188. package/dist/dateInputComposed-DU3o6PAV.js +0 -1
  189. package/dist/defineProperty-Dh8nSJpJ.js +0 -39
  190. package/dist/documentCapture-xX-JT7ZY.js +0 -763
  191. package/dist/dropdownComposed-DFRBG22E.js +0 -284
  192. package/dist/dropdownComposed-DwTzc2YU.js +0 -1
  193. package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
  194. package/dist/ekybModule-BSs7mndb.js +0 -280
  195. package/dist/ekybModule-D9M3E2Gm.js +0 -2
  196. package/dist/ekycModule-CU9pt5YN.js +0 -246
  197. package/dist/ekycModule-CZw9cLno.js +0 -2
  198. package/dist/electronic-signature-COYXjGdd.js +0 -410
  199. package/dist/emailInput-DppGf9pv.js +0 -37
  200. package/dist/expiredId-BnmzE8T3.js +0 -70
  201. package/dist/extensibility-CzEJfRwo.js +0 -2586
  202. package/dist/faceMatch-B8j0g0Yo.js +0 -2
  203. package/dist/faceMatch-BV8UD7tj.js +0 -201
  204. package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
  205. package/dist/glaredevicelottie-B10axYs_.js +0 -14466
  206. package/dist/homeScreen-DnP1jw9A.js +0 -227
  207. package/dist/hooks-BVnGysT7.js +0 -80
  208. package/dist/i18n-9s4OSqwi.js +0 -2010
  209. package/dist/icons-Cc7zwchP.js +0 -310
  210. package/dist/id-laser-h-mBAzHVOK.js +0 -467
  211. package/dist/id-laser-v-CrFg4bcJ.js +0 -483
  212. package/dist/id-tutorial-BCr42Pnn.js +0 -13153
  213. package/dist/idOcr-CCjfWQvH.js +0 -94
  214. package/dist/incode-logo-DX016usY.js +0 -4
  215. package/dist/incodeComponent-C1o4M0ZK.js +0 -50
  216. package/dist/incodeModule-BqCjVgEI.js +0 -18
  217. package/dist/inputComposed-APSw8C7o.js +0 -89
  218. package/dist/inputComposed-XYrarFxS.js +0 -1
  219. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  220. package/dist/mandatoryConsent-DssKMC3v.js +0 -100
  221. package/dist/modal-NMxsQHAO.js +0 -135
  222. package/dist/modal.hooks-CAjcIFZK.js +0 -126
  223. package/dist/numberedStep-CT-alrK5.js +0 -11
  224. package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
  225. package/dist/otpInput-DqRA_egd.js +0 -145
  226. package/dist/page-C1yT4DLb.js +0 -69
  227. package/dist/pdf-BurGZ08w.js +0 -14967
  228. package/dist/pdfViewer-BGBNL1Ea.js +0 -63
  229. package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
  230. package/dist/processing-G_y3o32b.js +0 -6
  231. package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
  232. package/dist/redirectToMobile-C3k1gloW.js +0 -1514
  233. package/dist/requiredLabelHint-BLwgqozE.js +0 -13
  234. package/dist/richText-DbJ5sl2n.js +0 -1973
  235. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  236. package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
  237. package/dist/snackbar-BDp8x7Cv.js +0 -14
  238. package/dist/spinner-B4dcie2T.js +0 -1
  239. package/dist/spinner-CKnjVHxw.js +0 -39
  240. package/dist/statusPage-CUI7ApcU.js +0 -28
  241. package/dist/successIcon-DbILeIz_.js +0 -28
  242. package/dist/tabs-DaPyP71c.js +0 -78
  243. package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
  244. package/dist/types/cpf-ocr/styles.d.ts +0 -1
  245. package/dist/types/document-capture/styles.d.ts +0 -1
  246. package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
  247. package/dist/typography-CxjaknHN.js +0 -28
  248. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  249. package/dist/useModuleLoader-BFiVA41N.js +0 -432
  250. package/dist/vendor-preact-D6SntenC.js +0 -958
  251. package/dist/verificationResult-BrVbUJ4U.js +0 -97
  252. package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
  253. package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
@@ -1,280 +0,0 @@
1
- import { n as e } from "./i18n-9s4OSqwi.js";
2
- import { S as t, _ as n, d as r, h as i, l as a, p as o, v as s } from "./vendor-preact-D6SntenC.js";
3
- import { i as c, o as l } from "./hooks-BVnGysT7.js";
4
- import { t as u } from "./incodeComponent-C1o4M0ZK.js";
5
- import { r as d } from "./loadingIcon-BN5YRQUb.js";
6
- import { t as f } from "./page-C1yT4DLb.js";
7
- import "./extensibility-CzEJfRwo.js";
8
- import { t as p } from "./spinner-CKnjVHxw.js";
9
- import { t as m } from "./button-DcCUEn2n.js";
10
- import { t as h } from "./verificationResult-BrVbUJ4U.js";
11
- import { t as g } from "./inputComposed-APSw8C7o.js";
12
- import { i as _, r as v } from "./radioGroupComposed-BbmvxmD2.js";
13
- import { t as y } from "./dropdownComposed-DFRBG22E.js";
14
- import { t as b } from "./incodeModule-BqCjVgEI.js";
15
- import { n as x, t as S } from "./requiredLabelHint-BLwgqozE.js";
16
- import { n as C, t as w } from "./optionAccessibleLabel-CzEeX3Q4.js";
17
- import { t as T } from "./countrySelector-CE-JgIsv.js";
18
- import { DEV_ONLY_COUNTRIES as E, SUPPORTED_COUNTRIES as D, computeEkybDisplayErrors as O, createEkybManager as k } from "@incodetech/core/ekyb";
19
- //#region src/modules/ekyb/countrySelector.tsx
20
- var A = ({ value: t, onChange: n }) => {
21
- let { t: r } = e();
22
- return /* @__PURE__ */ s(T, {
23
- id: "ekyb-country",
24
- label: r("ekyb.country"),
25
- value: t,
26
- onChange: n,
27
- countryCodes: D,
28
- devOnlyCountryCodes: E,
29
- "data-testid": "ekyb-country-selector"
30
- });
31
- }, j = ({ field: t, value: n, error: r, errorParams: i, country: a, labelHint: o, onChange: c, onBlur: l }) => {
32
- let { t: u } = e();
33
- return t.type === "dropdown" ? /* @__PURE__ */ s(y, {
34
- id: `ekyb-${t.name}`,
35
- label: u(t.label),
36
- labelHint: o,
37
- placeholder: t.placeholder ? u(t.placeholder) : void 0,
38
- value: n,
39
- options: (t.options ?? []).map((e) => {
40
- let t = u(e.label);
41
- return {
42
- ...e,
43
- label: t,
44
- ariaLabel: w(t)
45
- };
46
- }),
47
- error: _(u, r, i),
48
- required: t.required,
49
- searchable: !0,
50
- onChange: (e) => c(t.name, e),
51
- onBlur: l ? () => l(t.name) : void 0,
52
- "data-testid": `ekyb-field-${t.name}`
53
- }) : /* @__PURE__ */ s(v, {
54
- name: t.name,
55
- label: t.label,
56
- displayLabel: t.displayLabel,
57
- value: n,
58
- error: r,
59
- errorParams: i,
60
- required: t.required,
61
- labelHint: o,
62
- onChange: c,
63
- onBlur: l
64
- });
65
- }, M = ({ ubos: t, errors: n, errorParams: r, canAddUbo: i, labelHint: a, onSetField: o, onBlur: c, onAdd: l, onRemove: u }) => {
66
- let { t: d } = e(), f = (e) => _(d, n[e], r[e]);
67
- return t.length === 0 ? null : /* @__PURE__ */ s("div", {
68
- className: "IncodeEkybUbos",
69
- children: [t.map((e, t) => {
70
- let n = t === 0 ? d("ekyb.uboName") : d("ekyb.uboNameWithNumber", { number: t + 1 }), r = t === 0 ? d("ekyb.uboSurname") : d("ekyb.uboSurnameWithNumber", { number: t + 1 }), i = t === 0;
71
- return /* @__PURE__ */ s("div", {
72
- className: "IncodeEkybUboEntry",
73
- role: "group",
74
- "aria-label": `UBO ${t + 1}`,
75
- children: [
76
- /* @__PURE__ */ s(g, {
77
- id: `ubo-${t}-name`,
78
- label: n,
79
- labelHint: a,
80
- name: `ubo-${t}-name`,
81
- value: e.name,
82
- error: f(`ubo-${t}-name`),
83
- required: !0,
84
- onInput: (e) => o(t, "name", e.target.value),
85
- onBlur: c ? () => c(`ubo-${t}-name`) : void 0,
86
- "data-testid": `ekyb-ubo-${t}-name`
87
- }),
88
- /* @__PURE__ */ s(g, {
89
- id: `ubo-${t}-surname`,
90
- label: r,
91
- labelHint: a,
92
- name: `ubo-${t}-surname`,
93
- value: e.surname,
94
- error: f(`ubo-${t}-surname`),
95
- required: !0,
96
- onInput: (e) => o(t, "surname", e.target.value),
97
- onBlur: c ? () => c(`ubo-${t}-surname`) : void 0,
98
- "data-testid": `ekyb-ubo-${t}-surname`
99
- }),
100
- !i && /* @__PURE__ */ s("button", {
101
- className: "IncodeEkybRemoveUbo",
102
- onClick: () => u(t),
103
- type: "button",
104
- "aria-label": `${d("common.remove")} UBO ${t + 1}`,
105
- children: d("common.remove")
106
- })
107
- ]
108
- }, e.id);
109
- }), i && /* @__PURE__ */ s("button", {
110
- className: "IncodeEkybAddUbo",
111
- onClick: l,
112
- type: "button",
113
- "data-testid": "ekyb-add-ubo",
114
- children: d("ekyb.addAnotherUbo")
115
- })]
116
- });
117
- }, N = ({ config: t, onFinish: r }) => {
118
- let { t: i } = e(), [a, o] = l(() => k({ config: t }));
119
- return n(() => {
120
- (a.status === "finished" || a.status === "closed") && r?.();
121
- }, [a.status, r]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ s(h, {
122
- status: "submitting",
123
- submittingTitle: i("common.loading")
124
- }) : a.status === "submitting" ? /* @__PURE__ */ s(f, {
125
- className: "IncodeEkybPage",
126
- children: /* @__PURE__ */ s(p, {
127
- fullScreen: !1,
128
- title: i("common.processing"),
129
- className: "IncodeEkybSpinner"
130
- })
131
- }) : a.status === "success" ? /* @__PURE__ */ s(h, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ s(h, {
132
- status: "failure",
133
- onRetry: () => o.retry()
134
- }) : a.status === "form" ? /* @__PURE__ */ s(I, {
135
- state: a,
136
- manager: o
137
- }) : null;
138
- }, P = new Set([
139
- "street",
140
- "houseNo",
141
- "addressLine2",
142
- "city",
143
- "state",
144
- "postalCode"
145
- ]), F = [
146
- "street",
147
- "city",
148
- "state",
149
- "postalCode",
150
- "houseNo"
151
- ], I = ({ state: l, manager: u }) => {
152
- let { country: p, fields: h, values: g, errors: _, isValid: v, ubos: y, canAddUbo: b, addressSuggestions: w, submitAttempted: T } = l, { t: E } = e(), D = a(null), k = a(null), N = a(void 0), I = c(D, h.length), [L, R] = o({}), z = i((e) => {
153
- R((t) => t[e] ? t : {
154
- ...t,
155
- [e]: !0
156
- });
157
- }, []), { displayErrors: B, errorParams: V } = r(() => O(_, L, T, p, h), [
158
- _,
159
- L,
160
- T,
161
- p,
162
- h
163
- ]), H = i((e) => z(e), [z]), U = i((e, t) => {
164
- z(e), u.setField(e, t);
165
- }, [u, z]), W = i((e, t, n) => {
166
- z(`ubo-${e}-${t}`), u.setUboField(e, t, n);
167
- }, [u, z]), G = i((e) => {
168
- for (let e of F) z(e);
169
- u.selectAddress(e);
170
- }, [u, z]), K = i((e) => {
171
- u.removeUbo(e), R((t) => {
172
- let n = {};
173
- for (let [r, i] of Object.entries(t)) {
174
- let t = r.match(/^ubo-(\d+)-(name|surname)$/);
175
- if (!t) {
176
- n[r] = i;
177
- continue;
178
- }
179
- let a = Number(t[1]);
180
- if (a === e) continue;
181
- let o = a > e ? a - 1 : a;
182
- n[`ubo-${o}-${t[2]}`] = i;
183
- }
184
- return n;
185
- });
186
- }, [u]);
187
- n(() => {
188
- let e = B.postalCode, t = N.current;
189
- if (N.current = e, !e || t === e) return;
190
- let n = requestAnimationFrame(() => {
191
- let e = k.current;
192
- e && (e.querySelector("#postalCode-error") ?? e).scrollIntoView({
193
- behavior: "smooth",
194
- block: "nearest"
195
- });
196
- });
197
- return () => cancelAnimationFrame(n);
198
- }, [B.postalCode]);
199
- let q = h.filter((e) => !P.has(e.name)), J = h.filter((e) => P.has(e.name)), Y = r(() => x(h.map((e) => e.required)), [h]), X = (e) => {
200
- let t = S(Y, e);
201
- return t ? E(`forms.label.${t}`) : void 0;
202
- };
203
- return /* @__PURE__ */ s(f, {
204
- className: `IncodeEkybPage${I ? " IncodeEkybPageScrollable" : ""}`,
205
- title: E("ekyb.title"),
206
- children: [/* @__PURE__ */ s("div", {
207
- ref: D,
208
- className: "IncodeEkybForm",
209
- children: [
210
- /* @__PURE__ */ s(A, {
211
- value: p,
212
- onChange: (e) => u.setCountry(e)
213
- }),
214
- q.map((e) => /* @__PURE__ */ s(j, {
215
- field: e,
216
- value: g[e.name] ?? "",
217
- error: B[e.name],
218
- errorParams: V[e.name],
219
- country: p,
220
- labelHint: X(e.required),
221
- onChange: U,
222
- onBlur: H
223
- }, e.name)),
224
- /* @__PURE__ */ s(M, {
225
- ubos: y,
226
- errors: B,
227
- errorParams: V,
228
- canAddUbo: b,
229
- labelHint: X(!0),
230
- onSetField: W,
231
- onBlur: H,
232
- onAdd: () => u.addUbo(),
233
- onRemove: K
234
- }),
235
- J.length > 0 && /* @__PURE__ */ s(t, { children: [/* @__PURE__ */ s("h3", {
236
- className: "IncodeEkybSectionHeader",
237
- children: E("ekyb.addressDetails")
238
- }), J.map((e) => e.name === "street" ? /* @__PURE__ */ s(C, {
239
- label: e.label,
240
- labelHint: X(e.required),
241
- value: g.street ?? "",
242
- error: B.street,
243
- errorParams: V.street,
244
- suggestions: w,
245
- required: e.required,
246
- onChange: (e) => U("street", e),
247
- onSearch: (e) => u.searchAddress(e),
248
- onSelect: G,
249
- onBlur: () => H("street")
250
- }, e.name) : /* @__PURE__ */ s("div", {
251
- ref: e.name === "postalCode" ? k : void 0,
252
- children: /* @__PURE__ */ s(j, {
253
- field: e,
254
- value: g[e.name] ?? "",
255
- error: B[e.name],
256
- errorParams: V[e.name],
257
- country: p,
258
- labelHint: X(e.required),
259
- onChange: U,
260
- onBlur: H
261
- })
262
- }, e.name))] })
263
- ]
264
- }), /* @__PURE__ */ s("div", {
265
- className: "IncodeEkybFooter",
266
- children: [/* @__PURE__ */ s(m, {
267
- onClick: () => u.submit(),
268
- disabled: !v,
269
- "data-testid": "ekyb-submit",
270
- children: E("ekyb.continue")
271
- }), /* @__PURE__ */ s(d, { size: 16 })]
272
- })]
273
- });
274
- }, L = ({ config: e, onFinish: t }) => /* @__PURE__ */ s(u, { children: e ? /* @__PURE__ */ s(N, {
275
- config: e,
276
- onFinish: t
277
- }) : null });
278
- b(L, "incode-ekyb");
279
- //#endregion
280
- export { L as t };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./ekybModule-BSs7mndb.js";
2
- export { e as EkybModule };
@@ -1,246 +0,0 @@
1
- import { n as e } from "./i18n-9s4OSqwi.js";
2
- import { _ as t, d as n, h as r, l as i, p as a, v as o } from "./vendor-preact-D6SntenC.js";
3
- import { i as s, o as c } from "./hooks-BVnGysT7.js";
4
- import { t as l } from "./incodeComponent-C1o4M0ZK.js";
5
- import { t as u } from "./page-C1yT4DLb.js";
6
- import { t as d } from "./spinner-CKnjVHxw.js";
7
- import { t as f } from "./button-DcCUEn2n.js";
8
- import { t as p } from "./verificationResult-BrVbUJ4U.js";
9
- import { i as m, r as h, t as g } from "./radioGroupComposed-BbmvxmD2.js";
10
- import { t as _ } from "./phoneInputComposed-bvWhGLFZ.js";
11
- import { t as v } from "./dropdownComposed-DFRBG22E.js";
12
- import { t as y } from "./dateInputComposed-BpAGsjN6.js";
13
- import { t as b } from "./incodeModule-BqCjVgEI.js";
14
- import { n as x, t as S } from "./requiredLabelHint-BLwgqozE.js";
15
- import { n as C, t as w } from "./optionAccessibleLabel-CzEeX3Q4.js";
16
- import { computeEkycDisplayErrors as T, createEkycManager as E } from "@incodetech/core/ekyc";
17
- //#region src/modules/ekyc/ekycModule.tsx
18
- var D = ({ config: n, onFinish: r }) => {
19
- let { t: i } = e(), [a, s] = c(() => E({ config: n }));
20
- return t(() => {
21
- (a.status === "finished" || a.status === "closed") && r?.();
22
- }, [a.status, r]), a.status === "finished" || a.status === "closed" ? null : a.status === "loading" ? /* @__PURE__ */ o(p, {
23
- status: "submitting",
24
- submittingTitle: i("common.loading")
25
- }) : a.status === "submitting" ? /* @__PURE__ */ o(u, {
26
- className: "IncodeEkycPage",
27
- children: /* @__PURE__ */ o(d, {
28
- fullScreen: !1,
29
- title: i("common.processing"),
30
- className: "IncodeEkycSpinner"
31
- })
32
- }) : a.status === "success" ? /* @__PURE__ */ o(p, { status: "success" }) : a.status === "error" ? /* @__PURE__ */ o(p, {
33
- status: "failure",
34
- onRetry: () => s.retry(),
35
- onSkip: () => s.skip()
36
- }) : a.status === "misconfigured" ? /* @__PURE__ */ o(p, {
37
- status: "failure",
38
- failureTitle: i("verification.noFormFields"),
39
- onSkip: () => s.close(),
40
- skipLabel: i("common.close")
41
- }) : a.status === "form" ? /* @__PURE__ */ o(k, {
42
- state: a,
43
- manager: s
44
- }) : null;
45
- }, O = [
46
- "street",
47
- "city",
48
- "state",
49
- "postalCode",
50
- "houseNo"
51
- ], k = ({ state: c, manager: l }) => {
52
- let { fields: d, values: p, errors: b, isValid: E, addressSuggestions: D, prefilled: k, hideEmail: A, fieldsCountry: j, submitError: M, submitAttempted: N } = c, { t: P } = e(), F = i(null), I = i(null), L = i(void 0), R = s(F, d.length), [z, B] = a({}), V = r((e) => {
53
- B((t) => t[e] ? t : {
54
- ...t,
55
- [e]: !0
56
- });
57
- }, []), { displayErrors: H, errorParams: U } = n(() => T(b, z, N, j, d), [
58
- b,
59
- z,
60
- N,
61
- j,
62
- d
63
- ]), W = r((e) => V(e), [V]), G = r((e, t) => {
64
- V(e), l.setField(e, t);
65
- }, [l, V]), K = r((e) => {
66
- for (let e of O) V(e);
67
- l.selectAddress(e);
68
- }, [l, V]), q = n(() => x(d.filter((e) => !(e.name === "email" && A)).map((e) => e.readonly || k[e.name] ? !1 : e.required)), [
69
- d,
70
- A,
71
- k
72
- ]), J = (e) => {
73
- let t = S(q, e);
74
- return t ? P(`forms.label.${t}`) : void 0;
75
- };
76
- t(() => {
77
- let e = H.postalCode, t = L.current;
78
- if (L.current = e, !e || t === e) return;
79
- let n = requestAnimationFrame(() => {
80
- let e = I.current;
81
- e && (e.querySelector("#postalCode-error") ?? e).scrollIntoView({
82
- behavior: "smooth",
83
- block: "nearest"
84
- });
85
- });
86
- return () => cancelAnimationFrame(n);
87
- }, [H.postalCode]);
88
- let Y = (e, t) => m(P, t, U[e]), X;
89
- return /* @__PURE__ */ o(u, {
90
- className: `IncodeEkycPage${R ? " IncodeEkycPageScrollable" : ""}`,
91
- title: P("verification.title"),
92
- children: [/* @__PURE__ */ o("div", {
93
- ref: F,
94
- className: "IncodeEkycForm",
95
- children: d.map((e) => {
96
- if (e.name === "email" && A) return null;
97
- let t = null;
98
- e.section && e.section !== X && (X = e.section, t = /* @__PURE__ */ o("h3", {
99
- className: "IncodeEkycSectionHeader",
100
- children: P({
101
- address: "verification.labels.addressDetailsSection",
102
- driverLicense: "verification.labels.dlDetailsSection"
103
- }[e.section] ?? e.section)
104
- }));
105
- let n = e.readonly || k[e.name], r = n ? !1 : e.required, i = J(r), a = p[e.name] ?? "", s = H[e.name];
106
- if (e.name === "street" && e.section === "address") return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(C, {
107
- label: e.label,
108
- labelHint: i,
109
- value: a,
110
- error: s,
111
- errorParams: U[e.name],
112
- suggestions: D,
113
- readonly: n,
114
- required: r,
115
- onChange: (e) => G("street", e),
116
- onSearch: (e) => l.searchAddress(e),
117
- onSelect: K,
118
- onBlur: () => W("street")
119
- })] }, e.name);
120
- if (e.type === "dropdown") {
121
- let c = P(e.label);
122
- return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(v, {
123
- id: `ekyc-${e.name}`,
124
- label: c,
125
- labelHint: i,
126
- placeholder: e.placeholder ? P(e.placeholder) : void 0,
127
- value: a,
128
- options: (e.options ?? []).map((e) => {
129
- let t = P(e.label);
130
- return {
131
- ...e,
132
- label: t,
133
- ariaLabel: w(t)
134
- };
135
- }),
136
- error: Y(e.name, s),
137
- disabled: n,
138
- required: r,
139
- searchable: !0,
140
- onChange: (t) => G(e.name, t),
141
- onBlur: () => W(e.name),
142
- "data-testid": `ekyc-field-${e.name}`
143
- })] }, e.name);
144
- }
145
- if (e.type === "date") {
146
- let c = P(e.label);
147
- return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(y, {
148
- id: `ekyc-${e.name}`,
149
- label: c,
150
- labelHint: i,
151
- value: a,
152
- error: Y(e.name, s),
153
- disabled: n,
154
- required: r,
155
- onInput: (t) => {
156
- let n = t.target;
157
- G(e.name, n.value);
158
- },
159
- onBlur: () => W(e.name),
160
- "data-testid": `ekyc-field-${e.name}`
161
- })] }, e.name);
162
- }
163
- if (e.type === "phone") {
164
- let c = P(e.label);
165
- return /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(_, {
166
- id: `ekyc-${e.name}`,
167
- label: c,
168
- labelHint: i,
169
- countryCode: j,
170
- value: a,
171
- placeholder: e.placeholder,
172
- error: Y(e.name, s),
173
- disabled: n,
174
- disableCountrySelector: e.disableCountrySelector,
175
- required: r,
176
- onChange: (t) => G(e.name, t),
177
- onBlur: () => W(e.name),
178
- "data-testid": `ekyc-field-${e.name}`
179
- })] }, e.name);
180
- }
181
- return e.type === "radio" ? /* @__PURE__ */ o("div", { children: [t, /* @__PURE__ */ o(g, {
182
- id: `ekyc-${e.name}`,
183
- class: "IncodeEkycRadioGroup",
184
- label: P(e.label),
185
- labelHint: i,
186
- value: a,
187
- options: (e.options ?? []).map((e) => ({
188
- value: e.value,
189
- label: P(e.label)
190
- })),
191
- error: s ? Y(e.name, s) : void 0,
192
- disabled: n,
193
- required: r,
194
- onChange: (t) => G(e.name, t),
195
- onBlur: () => W(e.name)
196
- })] }, e.name) : /* @__PURE__ */ o("div", {
197
- ref: e.name === "postalCode" ? I : void 0,
198
- children: [t, /* @__PURE__ */ o(h, {
199
- name: e.name,
200
- label: e.label,
201
- displayLabel: e.displayLabel,
202
- value: a,
203
- error: s,
204
- errorParams: U[e.name],
205
- type: e.type,
206
- placeholder: e.placeholder,
207
- placeholderParams: e.placeholderParams,
208
- required: r,
209
- labelHint: i,
210
- readonly: n,
211
- maxLength: e.maxLength,
212
- onChange: G,
213
- onBlur: W
214
- })]
215
- }, e.name);
216
- })
217
- }), /* @__PURE__ */ o("div", {
218
- className: "IncodeEkycFooter",
219
- children: [
220
- M && /* @__PURE__ */ o("p", {
221
- className: "IncodeEkycSubmitError",
222
- role: "alert",
223
- children: P(M)
224
- }),
225
- /* @__PURE__ */ o(f, {
226
- onClick: () => l.submit(),
227
- disabled: !E,
228
- "data-testid": "ekyc-submit",
229
- children: P("common.continue")
230
- }),
231
- M === "verification.errors.countryNotSupported" && /* @__PURE__ */ o(f, {
232
- variant: "link",
233
- onClick: () => l.skip(),
234
- "data-testid": "ekyc-skip",
235
- children: P("verification.labels.skip")
236
- })
237
- ]
238
- })]
239
- });
240
- }, A = ({ config: e, onFinish: t }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(D, {
241
- config: e,
242
- onFinish: t
243
- }) : null });
244
- b(A, "incode-ekyc");
245
- //#endregion
246
- export { A as t };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./ekycModule-CU9pt5YN.js";
2
- export { e as EkycModule };