@incodetech/web 2.1.1 → 2.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-D7VzaZ2P.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-Jgwh943i.js} +5 -5
  12. package/dist/connectionError-Bl5E35Qm.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-Sd-u1WGf.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-CiEguXX9.js} +13 -14
  20. package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-BSAW87qq.js} +9 -9
  21. package/dist/dashboardTheme-FtPiizV0.js +223 -0
  22. package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-D0WEYWkS.js} +5 -5
  23. package/dist/dateInputComposed-DKQJz0kJ.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-GFNkI1ly.js} +218 -136
  27. package/dist/documentCapture-sB2_X-we.js +2 -0
  28. package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-BXleSN7n.js} +18 -11
  29. package/dist/dropdownComposed-DE-VJgcR.js +1 -0
  30. package/dist/dynamic-forms/styles.css +58 -6
  31. package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-DU5fT72-.js} +53 -45
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekyb/styles.css +1 -28
  34. package/dist/{ekybModule-DGnTw5UV.js → ekybModule-CMcpoTgh.js} +51 -27
  35. package/dist/ekybModule-CR9A6Fqb.js +2 -0
  36. package/dist/ekyc/ekyc.es.js +1 -1
  37. package/dist/ekyc/styles.css +2 -2
  38. package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-BTO8iIwh.js} +45 -19
  39. package/dist/ekycModule-CewwzYvk.js +2 -0
  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-COBKJBjU.js} +31 -23
  43. package/dist/email/email.es.js +10 -11
  44. package/dist/{emailInput-DsLkDtER.js → emailInput-mPPvterQ.js} +4 -4
  45. package/dist/{expiredId-BZXLrLk-.js → expiredId-CD5ETLV9.js} +6 -6
  46. package/dist/{extensibility-7sRIN0JC.js → extensibility-DBilbbhC.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-2pfSeXeA.js +2 -0
  51. package/dist/{faceMatch-DyTBoMDm.js → faceMatch-CwDBO9Is.js} +71 -79
  52. package/dist/field-comparison/field-comparison.es.js +1 -1
  53. package/dist/fieldComparison-DUYp39WI.js +2 -0
  54. package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-dDvSYYQP.js} +11 -12
  55. package/dist/finalSuccessScreen-B9kb72WR.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 +84 -48
  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-Dycy1yhN.js} +7 -9
  66. package/dist/{icons-CJJbIpBq.js → icons-D0cfSCBM.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-riTHUOlr.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-cGsd55rc.js} +64 -1
  82. package/dist/incodeComponent-B-daxouV.js +713 -0
  83. package/dist/incodeModule-uyUrSSUM.js +25 -0
  84. package/dist/index.es.js +16 -5
  85. package/dist/inputComposed-CABc288U.js +1 -0
  86. package/dist/{inputComposed-C1R2LAa3.js → inputComposed-Pp_XN1-h.js} +9 -9
  87. package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-DSAjFc0h.js} +9 -11
  88. package/dist/manualCaptureButton-BY8dRhGA.js +300 -0
  89. package/dist/{capture-CkGvdDNH.js → manualCaptureButton-BldgUGso.js} +68 -198
  90. package/dist/{modal-OxkFuuiR.js → modal-BlczH_pL.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-Dmz3eRsO.js} +6 -6
  94. package/dist/{otpInput-CnDc6pQm.js → otpInput-B3vUjmBF.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-4xNYiBI1.js +2 -0
  99. package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-BGFFFvmi.js} +5 -7
  100. package/dist/phone/phone.es.js +13 -12
  101. package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-D1ZBsd4S.js} +7 -6
  102. package/dist/{processing-BeUMfdJJ.js → processing-vGhs5Gvb.js} +2 -2
  103. package/dist/qe-signature/qe-signature.es.js +7 -4
  104. package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-CYPHpI6a.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-2OnIN9ff.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-BzyWgQ7J.js} +2 -2
  114. package/dist/spacer-Bnmh-DfR.js +2344 -0
  115. package/dist/{spinner-BMeIEK1d.js → spinner-HP_c74K-.js} +45 -4
  116. package/dist/statusPage-C0vTVW0Q.js +36 -0
  117. package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
  118. package/dist/{tabs-C__chW-u.js → tabs-B_TxQ9ZQ.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-Cuy2ZEG9.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 +160 -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 +109 -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-D7ezQeZ7.js} +63 -3
  155. package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-BImpfi_R.js} +37 -248
  156. package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
  157. package/dist/{verificationResult-BWWkmeiA.js → verificationResult-IUf0w1aR.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-zT9gCfTc.js} +12 -13
  162. package/dist/workflow/styles.css +501 -3977
  163. package/dist/workflow/workflow.es.js +26 -19
  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
@@ -0,0 +1 @@
1
+ import "./dropdownComposed-BXleSN7n.js";
@@ -3,10 +3,28 @@
3
3
  margin-top: var(--spacing-24, var(--spacing-24, 24px));
4
4
  }
5
5
 
6
+ @media (min-width: 48rem) {
7
+ .IncodeDynamicFormsPage.IncodePageContainer {
8
+ align-items: stretch;
9
+ }
10
+
11
+ .IncodeDynamicFormsPage .IncodePageInner {
12
+ height: 100%;
13
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
14
+ }
15
+ }
16
+
6
17
  .IncodeDynamicFormsPage .IncodePageContent {
18
+ padding-bottom: var(--spacing-16, var(--spacing-16, 16px));
7
19
  align-items: center;
8
20
  }
9
21
 
22
+ @media (min-width: 48rem) {
23
+ .IncodeDynamicFormsPage .IncodePageContent {
24
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
25
+ }
26
+ }
27
+
10
28
  .IncodeDynamicFormsPage .IncodeDynamicFormsProgress {
11
29
  margin-bottom: var(--spacing-4, var(--spacing-4, 4px));
12
30
  text-align: center;
@@ -15,16 +33,24 @@
15
33
  color: var(--text-secondary);
16
34
  }
17
35
 
18
- .IncodeDynamicFormsPage .IncodeDynamicFormsForm {
19
- width: 100%;
20
- height: 100%;
21
- max-width: var(--incode-form-max-w);
36
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFields {
37
+ margin-top: var(--spacing-32, var(--spacing-32, 32px));
22
38
  flex-direction: column;
39
+ width: 100%;
23
40
  display: flex;
24
41
  }
25
42
 
26
- .IncodeDynamicFormsPage .IncodeDynamicFormsForm button {
27
- margin-top: auto;
43
+ @media (min-width: 48rem) {
44
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFields {
45
+ min-height: var(--spacing-0, var(--spacing-none, 0px));
46
+ padding-bottom: var(--spacing-8, var(--spacing-8, 8px));
47
+ flex: 1;
48
+ overflow-y: auto;
49
+ }
50
+ }
51
+
52
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFields {
53
+ max-width: var(--incode-form-max-w);
28
54
  }
29
55
 
30
56
  .IncodeDynamicFormsPage .IncodeDynamicFormsField {
@@ -35,6 +61,32 @@
35
61
  display: flex;
36
62
  }
37
63
 
64
+ .IncodeDynamicFormsPage .IncodeDynamicFormsField--prefilled .IncodeInputComposedLabel, .IncodeDynamicFormsPage .IncodeDynamicFormsField--prefilled .IncodeDropdownComposedLabel {
65
+ justify-content: space-between;
66
+ align-items: baseline;
67
+ width: 100%;
68
+ display: flex;
69
+ }
70
+
71
+ .IncodeDynamicFormsPage .IncodeDynamicFormsField--prefilled .IncodeInputComposedLabelHint, .IncodeDynamicFormsPage .IncodeDynamicFormsField--prefilled .IncodeDropdownComposedLabelHint {
72
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
73
+ }
74
+
75
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFooter {
76
+ width: 100%;
77
+ padding-top: var(--spacing-16, var(--spacing-16, 16px));
78
+ }
79
+
80
+ @media (min-width: 48rem) {
81
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFooter {
82
+ flex-shrink: 0;
83
+ }
84
+ }
85
+
86
+ .IncodeDynamicFormsPage .IncodeDynamicFormsFooter {
87
+ max-width: var(--incode-form-max-w);
88
+ }
89
+
38
90
  .IncodeDynamicFormsPage .IncodeSrOnly {
39
91
  clip-path: inset(50%);
40
92
  white-space: nowrap;
@@ -1,20 +1,17 @@
1
- import { n as useTranslation } from "./i18n-CU4xq8qC.js";
2
- import { d as T, m as g, v as u } from "./vendor-preact-DThS2ZQ_.js";
3
- import { c as useModuleTerminalCallbacks, u as useManager } from "./hooks-CNu7o-v8.js";
4
- import { t as IncodeComponent } from "./incodeComponent-CfzJGETt.js";
5
- import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
6
- import { t as Page } from "./page-DidH_RkX.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 { n as countries, t as PhoneInputComposed } from "./phoneInputComposed-DMiXfF-1.js";
11
- import { t as DropdownComposed } from "./dropdownComposed-CoU0enG6.js";
12
- import { t as DateInputComposed } from "./dateInputComposed-DuaofcBl.js";
13
- import { t as registerIncodeModuleElement } from "./incodeModule-B-4_3JrK.js";
14
- import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-D0RhuMed.js";
15
- import { t as EmailInput } from "./emailInput-DsLkDtER.js";
16
- import { formatCPF, isValidCPF } from "@incodetech/core/cpf-ocr";
1
+ import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
2
+ import { d as T, m as g, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { _ as useModuleTerminalCallbacks, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-B-daxouV.js";
4
+ import { r as Button } from "./incode-logo-cGsd55rc.js";
5
+ import { t as VerificationResult } from "./verificationResult-IUf0w1aR.js";
6
+ import { t as InputComposed } from "./inputComposed-Pp_XN1-h.js";
7
+ import { n as countries, t as PhoneInputComposed } from "./phoneInputComposed-D1ZBsd4S.js";
8
+ import { t as DropdownComposed } from "./dropdownComposed-BXleSN7n.js";
9
+ import { t as DateInputComposed } from "./dateInputComposed-D0WEYWkS.js";
10
+ import { t as registerIncodeModuleElement } from "./incodeModule-uyUrSSUM.js";
11
+ import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-Dx0WS2cR.js";
12
+ import { t as EmailInput } from "./emailInput-mPPvterQ.js";
17
13
  import { createDynamicFormsManager } from "@incodetech/core/dynamic-forms";
14
+ import { formatCPF, isValidCPF } from "@incodetech/core/id-ocr";
18
15
  //#region src/modules/dynamic-forms/dynamicForms.tsx
19
16
  function getEffectiveType(question) {
20
17
  return question.inputType ?? question.overrides ?? "TEXT";
@@ -27,13 +24,14 @@ function getAutocompleteToken(type) {
27
24
  default: return;
28
25
  }
29
26
  }
30
- var QuestionInput = ({ question, value, disabled = false, error, labelHint, onChange, onFormatValidityChange, onBlur }) => {
27
+ var QuestionInput = ({ question, value, disabled = false, error, labelHint, isPrefilled = false, onChange, onFormatValidityChange, onBlur }) => {
31
28
  const { t } = useTranslation();
32
29
  const effectiveType = getEffectiveType(question);
33
30
  const id = `dynamic-form-${question.questionId}`;
34
31
  const label = question.question;
35
32
  const isRequired = !question.isOptional;
36
33
  const autocomplete = getAutocompleteToken(effectiveType);
34
+ const fieldClass = isPrefilled ? "IncodeDynamicFormsField IncodeDynamicFormsField--prefilled" : "IncodeDynamicFormsField";
37
35
  const isCountryField = effectiveType === "COUNTRY" || effectiveType === "NATIONALITY";
38
36
  const countryOptions = T(() => isCountryField ? countries.map((c) => ({
39
37
  value: c.code,
@@ -49,7 +47,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
49
47
  label: t("common.no")
50
48
  }];
51
49
  return /* @__PURE__ */ u("div", {
52
- class: "IncodeDynamicFormsField",
50
+ class: fieldClass,
53
51
  children: /* @__PURE__ */ u(DropdownComposed, {
54
52
  id,
55
53
  "data-testid": id,
@@ -67,7 +65,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
67
65
  });
68
66
  }
69
67
  if (effectiveType === "DATE") return /* @__PURE__ */ u("div", {
70
- class: "IncodeDynamicFormsField",
68
+ class: fieldClass,
71
69
  children: /* @__PURE__ */ u(DateInputComposed, {
72
70
  id,
73
71
  "data-testid": id,
@@ -85,7 +83,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
85
83
  })
86
84
  });
87
85
  if (effectiveType === "PHONE") return /* @__PURE__ */ u("div", {
88
- class: "IncodeDynamicFormsField",
86
+ class: fieldClass,
89
87
  onFocusOut: () => onBlur?.(question.questionId),
90
88
  children: /* @__PURE__ */ u(PhoneInputComposed, {
91
89
  id,
@@ -105,7 +103,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
105
103
  })
106
104
  });
107
105
  if (effectiveType === "COUNTRY" || effectiveType === "NATIONALITY") return /* @__PURE__ */ u("div", {
108
- class: "IncodeDynamicFormsField",
106
+ class: fieldClass,
109
107
  children: /* @__PURE__ */ u(DropdownComposed, {
110
108
  id,
111
109
  "data-testid": id,
@@ -127,7 +125,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
127
125
  label: o
128
126
  }));
129
127
  return /* @__PURE__ */ u("div", {
130
- class: "IncodeDynamicFormsField",
128
+ class: fieldClass,
131
129
  children: /* @__PURE__ */ u(DropdownComposed, {
132
130
  id,
133
131
  "data-testid": id,
@@ -145,7 +143,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
145
143
  });
146
144
  }
147
145
  if (effectiveType === "EMAIL") return /* @__PURE__ */ u("div", {
148
- class: "IncodeDynamicFormsField",
146
+ class: fieldClass,
149
147
  children: /* @__PURE__ */ u(EmailInput, {
150
148
  id,
151
149
  "data-testid": id,
@@ -163,7 +161,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
163
161
  })
164
162
  });
165
163
  if (effectiveType === "CPF") return /* @__PURE__ */ u("div", {
166
- class: "IncodeDynamicFormsField",
164
+ class: fieldClass,
167
165
  children: /* @__PURE__ */ u(InputComposed, {
168
166
  id,
169
167
  "data-testid": id,
@@ -187,7 +185,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
187
185
  })
188
186
  });
189
187
  if (effectiveType === "NUMBER") return /* @__PURE__ */ u("div", {
190
- class: "IncodeDynamicFormsField",
188
+ class: fieldClass,
191
189
  children: /* @__PURE__ */ u(InputComposed, {
192
190
  id,
193
191
  "data-testid": id,
@@ -209,7 +207,7 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
209
207
  })
210
208
  });
211
209
  return /* @__PURE__ */ u("div", {
212
- class: "IncodeDynamicFormsField",
210
+ class: fieldClass,
213
211
  children: /* @__PURE__ */ u(InputComposed, {
214
212
  id,
215
213
  "data-testid": id,
@@ -228,55 +226,57 @@ var QuestionInput = ({ question, value, disabled = false, error, labelHint, onCh
228
226
  })
229
227
  });
230
228
  };
231
- var ScreenForm = ({ screen, answers, validationErrors, canSubmit, isSubmitting = false, onAnswerChange, onAnswerValidityChange, onValidateField, onSubmit }) => {
229
+ var ScreenForm = ({ screen, answers, validationErrors, canSubmit, isSubmitting = false, prefilledQuestionIds, nonEditableQuestionIds, onAnswerChange, onAnswerValidityChange, onValidateField, onSubmit }) => {
232
230
  const { t } = useTranslation();
233
231
  const title = screen.hideTitle ? void 0 : screen.title || t("dynamicForms.title");
234
232
  const titleId = g();
235
- const fallbackFormLabel = screen.title || t("dynamicForms.title");
236
233
  const hintMode = T(() => getRequiredHintMode(screen.questions.map((q) => !q.isOptional)), [screen]);
234
+ const prefilledSet = T(() => new Set(prefilledQuestionIds), [prefilledQuestionIds]);
235
+ const nonEditableSet = T(() => new Set(nonEditableQuestionIds), [nonEditableQuestionIds]);
237
236
  return /* @__PURE__ */ u(Page, {
238
237
  className: "IncodeDynamicFormsPage",
239
238
  title,
240
239
  titleId: title ? titleId : void 0,
241
240
  hideFooterBranding: true,
242
241
  children: [
243
- /* @__PURE__ */ u(Spacer, { size: 32 }),
244
242
  isSubmitting && /* @__PURE__ */ u("div", {
245
243
  role: "status",
246
244
  "aria-live": "polite",
247
245
  class: "IncodeSrOnly",
248
246
  children: t("common.processing")
249
247
  }),
250
- /* @__PURE__ */ u("form", {
251
- class: "IncodeDynamicFormsForm",
252
- onSubmit: (e) => {
253
- e.preventDefault();
254
- onSubmit();
255
- },
256
- "aria-labelledby": title ? titleId : void 0,
257
- "aria-label": title ? void 0 : fallbackFormLabel,
258
- "aria-busy": isSubmitting || void 0,
259
- children: [screen.questions.map((question) => {
248
+ /* @__PURE__ */ u("div", {
249
+ class: "IncodeDynamicFormsFields",
250
+ children: screen.questions.map((question) => {
260
251
  const errorKey = validationErrors?.[question.questionId];
252
+ const isPrefilled = prefilledSet.has(question.questionId);
253
+ const isReadOnly = nonEditableSet.has(question.questionId);
261
254
  const hint = getFieldHint(hintMode, !question.isOptional);
262
- const labelHint = hint ? t(`forms.label.${hint}`) ?? void 0 : void 0;
255
+ let labelHint;
256
+ if (isPrefilled) labelHint = t("forms.prefill.fromId") ?? void 0;
257
+ else if (hint) labelHint = t(`forms.label.${hint}`) ?? void 0;
263
258
  return /* @__PURE__ */ u(QuestionInput, {
264
259
  question,
265
260
  value: answers[question.questionId] ?? "",
266
- disabled: isSubmitting,
261
+ disabled: isSubmitting || isReadOnly,
267
262
  error: errorKey ? t(errorKey) : void 0,
268
263
  labelHint,
264
+ isPrefilled,
269
265
  onChange: onAnswerChange,
270
266
  onFormatValidityChange: onAnswerValidityChange,
271
267
  onBlur: onValidateField
272
268
  }, question.questionId);
273
- }), /* @__PURE__ */ u(Button, {
274
- type: "submit",
269
+ })
270
+ }),
271
+ /* @__PURE__ */ u("div", {
272
+ class: "IncodeDynamicFormsFooter",
273
+ children: /* @__PURE__ */ u(Button, {
275
274
  "data-testid": "dynamic-forms-submit",
276
275
  disabled: !canSubmit,
277
276
  isLoading: isSubmitting,
277
+ onClick: onSubmit,
278
278
  children: t("common.continue")
279
- })]
279
+ })
280
280
  })
281
281
  ]
282
282
  });
@@ -308,6 +308,8 @@ var DynamicFormsContent = ({ config, manager: externalManager, onFinish }) => {
308
308
  validationErrors: state.validationErrors,
309
309
  canSubmit,
310
310
  isSubmitting,
311
+ prefilledQuestionIds: state.prefilledQuestionIds,
312
+ nonEditableQuestionIds: state.nonEditableQuestionIds,
311
313
  onAnswerChange: (questionId, value) => manager.setAnswer(questionId, value),
312
314
  onAnswerValidityChange: (questionId, isValid) => manager.setAnswerValidity(questionId, isValid),
313
315
  onValidateField: (questionId) => manager.validateField(questionId),
@@ -324,6 +326,11 @@ var DynamicFormsContent = ({ config, manager: externalManager, onFinish }) => {
324
326
  onSkip: () => manager.close(),
325
327
  skipLabel: t("common.close")
326
328
  });
329
+ if (state.status === "attemptsExhausted") return /* @__PURE__ */ u(VerificationResult, {
330
+ status: "failure",
331
+ failureTitle: t("forms.loginHintBlocked.title"),
332
+ errorMessage: t("forms.loginHintBlocked.message")
333
+ });
327
334
  if (state.status === "finished" || state.status === "closed") return null;
328
335
  };
329
336
  /**
@@ -351,13 +358,14 @@ var DynamicFormsContent = ({ config, manager: externalManager, onFinish }) => {
351
358
  *
352
359
  * @see {@link createDynamicFormsManager} for headless usage
353
360
  */
354
- var DynamicForms = ({ config, manager, onFinish }) => {
361
+ var DynamicFormsWithLocalConfig = ({ config, manager, onFinish }) => {
355
362
  return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(DynamicFormsContent, {
356
363
  config,
357
364
  manager,
358
365
  onFinish
359
366
  }) : null });
360
367
  };
368
+ var DynamicForms = withStandaloneModuleBootstrap(DynamicFormsWithLocalConfig, "DYNAMIC_FORMS", { supportsExternalManager: true });
361
369
  registerIncodeModuleElement(DynamicForms, "incode-dynamic-forms");
362
370
  //#endregion
363
371
  export { DynamicForms };
@@ -1,2 +1,2 @@
1
- import { t as EkybModule } from "../ekybModule-DGnTw5UV.js";
1
+ import { t as EkybModule } from "../ekybModule-CMcpoTgh.js";
2
2
  export { EkybModule };
@@ -1,12 +1,4 @@
1
1
  /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- @layer properties {
3
- @supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
4
- *, :before, :after, ::backdrop {
5
- --tw-border-style: solid;
6
- }
7
- }
8
- }
9
-
10
2
  .IncodeEkybPage {
11
3
  animation: fadeIn var(--motion-fade-in-duration, .7s) ease-out;
12
4
  margin-inline: auto;
@@ -48,27 +40,16 @@
48
40
  }
49
41
 
50
42
  .IncodeEkybPage .IncodeEkybRemoveUbo {
51
- cursor: pointer;
52
- border-style: var(--tw-border-style);
53
- border-width: var(--border-width-none, var(--primitive-border-width-0));
54
- --tw-border-style: none;
55
- padding: var(--spacing-0, var(--spacing-none, 0px));
56
43
  font-family: var(--typography-body-family);
57
44
  font-size: var(--typography-body-s-regular-size);
58
45
  font-weight: var(--typography-body-s-regular-weight);
59
46
  line-height: var(--typography-body-s-regular-line-height);
60
47
  letter-spacing: var(--typography-body-s-regular-letter-spacing);
61
48
  color: var(--color-text-status-negative, var(--text-status-negative));
62
- background-color: #0000;
63
- border-style: none;
49
+ text-decoration-line: none;
64
50
  }
65
51
 
66
52
  .IncodeEkybPage .IncodeEkybAddUbo {
67
- cursor: pointer;
68
- border-style: var(--tw-border-style);
69
- border-width: var(--border-width-none, var(--primitive-border-width-0));
70
- --tw-border-style: none;
71
- padding-block: var(--spacing-8, var(--spacing-8, 8px));
72
53
  text-align: center;
73
54
  font-family: var(--typography-button-family);
74
55
  font-size: var(--typography-button-m-underlined-size);
@@ -78,8 +59,6 @@
78
59
  -webkit-text-decoration-skip-ink: none;
79
60
  text-decoration-skip-ink: none;
80
61
  color: var(--color-button-primary-surface-default, var(--button-primary-surface-default));
81
- background-color: #0000;
82
- border-style: none;
83
62
  text-decoration-line: underline;
84
63
  text-decoration-style: solid;
85
64
  text-decoration-thickness: auto;
@@ -131,9 +110,3 @@
131
110
  flex-shrink: 0;
132
111
  }
133
112
  }
134
-
135
- @property --tw-border-style {
136
- syntax: "*";
137
- inherits: false;
138
- initial-value: solid;
139
- }
@@ -1,20 +1,18 @@
1
- import { n as useTranslation } from "./i18n-CU4xq8qC.js";
2
- import { _ as y, d as T, l as A, v as u, x as k } from "./vendor-preact-DThS2ZQ_.js";
3
- import { c as useModuleTerminalCallbacks, o as useFormScrollable, u as useManager } from "./hooks-CNu7o-v8.js";
4
- import { t as IncodeComponent } from "./incodeComponent-CfzJGETt.js";
5
- import { r as Spacer } from "./loadingIcon-B0ysgiNq.js";
6
- import { t as Page } from "./page-DidH_RkX.js";
7
- import "./extensibility-7sRIN0JC.js";
8
- import { t as Spinner } from "./spinner-BMeIEK1d.js";
9
- import { t as Button } from "./button-Dz6AsbmF.js";
10
- import { t as VerificationResult } from "./verificationResult-BWWkmeiA.js";
11
- import { t as InputComposed } from "./inputComposed-C1R2LAa3.js";
12
- import { i as translateError, r as FormField } from "./radioGroupComposed-DuQxslB2.js";
13
- import { t as DropdownComposed } from "./dropdownComposed-CoU0enG6.js";
14
- import { t as registerIncodeModuleElement } from "./incodeModule-B-4_3JrK.js";
15
- import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-D0RhuMed.js";
16
- import { n as AddressAutocomplete, t as getAccessibleOptionLabel } from "./optionAccessibleLabel-gfF-58Mv.js";
17
- import { t as CountrySelector$1 } from "./countrySelector-SvUOyPo0.js";
1
+ import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
2
+ import { S as k, _ as y, d as T, l as A, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { _ as useModuleTerminalCallbacks, h as useFormScrollable, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-B-daxouV.js";
4
+ import { t as Spacer } from "./spacer-Bnmh-DfR.js";
5
+ import { t as Spinner } from "./spinner-HP_c74K-.js";
6
+ import { r as Button } from "./incode-logo-cGsd55rc.js";
7
+ import "./extensibility-DBilbbhC.js";
8
+ import { t as VerificationResult } from "./verificationResult-IUf0w1aR.js";
9
+ import { t as InputComposed } from "./inputComposed-Pp_XN1-h.js";
10
+ import { i as translateError, r as FormField } from "./radioGroupComposed-CYPHpI6a.js";
11
+ import { t as DropdownComposed } from "./dropdownComposed-BXleSN7n.js";
12
+ import { t as registerIncodeModuleElement } from "./incodeModule-uyUrSSUM.js";
13
+ import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-Dx0WS2cR.js";
14
+ import { n as AddressAutocomplete, t as getAccessibleOptionLabel } from "./optionAccessibleLabel-Dmz3eRsO.js";
15
+ import { t as CountrySelector$1 } from "./countrySelector-Sd-u1WGf.js";
18
16
  import { DEV_ONLY_COUNTRIES, SUPPORTED_COUNTRIES, createEkybManager } from "@incodetech/core/ekyb";
19
17
  //#region src/modules/ekyb/countrySelector.tsx
20
18
  var CountrySelector = ({ value, onChange }) => {
@@ -71,9 +69,18 @@ var FieldInput = ({ field, value, error, errorParams, country: _country, labelHi
71
69
  //#region src/modules/ekyb/uboInputs.tsx
72
70
  var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onBlur, onAdd, onRemove }) => {
73
71
  const { t } = useTranslation();
72
+ const containerRef = A(null);
73
+ const addButtonRef = A(null);
74
+ const pendingFocusRef = A();
74
75
  const translateError$2 = (err) => translateError(t, err?.key, err?.params);
76
+ y(() => {
77
+ if (pendingFocusRef.current === "added-name") containerRef.current?.querySelector(`#ubo-${ubos.length - 1}-name`)?.focus();
78
+ else if (pendingFocusRef.current === "add-button") addButtonRef.current?.focus();
79
+ pendingFocusRef.current = void 0;
80
+ }, [ubos.length]);
75
81
  if (ubos.length === 0) return null;
76
82
  return /* @__PURE__ */ u("div", {
83
+ ref: containerRef,
77
84
  className: "IncodeEkybUbos",
78
85
  children: [ubos.map((ubo, index) => {
79
86
  const nameLabel = index === 0 ? t("ekyb.uboName") : t("ekyb.uboNameWithNumber", { number: index + 1 });
@@ -108,18 +115,29 @@ var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onB
108
115
  onBlur: onBlur ? () => onBlur(`ubo-${index}-surname`) : void 0,
109
116
  "data-testid": `ekyb-ubo-${index}-surname`
110
117
  }),
111
- !isFirst && /* @__PURE__ */ u("button", {
112
- className: "IncodeEkybRemoveUbo",
113
- onClick: () => onRemove(index),
118
+ !isFirst && /* @__PURE__ */ u(Button, {
119
+ class: "IncodeEkybRemoveUbo",
120
+ variant: "link",
121
+ size: "S",
122
+ onClick: () => {
123
+ pendingFocusRef.current = "add-button";
124
+ onRemove(index);
125
+ },
114
126
  type: "button",
115
127
  "aria-label": `${t("common.remove")} UBO ${index + 1}`,
116
128
  children: t("common.remove")
117
129
  })
118
130
  ]
119
131
  }, ubo.id);
120
- }), canAddUbo && /* @__PURE__ */ u("button", {
121
- className: "IncodeEkybAddUbo",
122
- onClick: onAdd,
132
+ }), canAddUbo && /* @__PURE__ */ u(Button, {
133
+ ref: addButtonRef,
134
+ class: "IncodeEkybAddUbo",
135
+ variant: "link",
136
+ size: "S",
137
+ onClick: () => {
138
+ pendingFocusRef.current = "added-name";
139
+ onAdd();
140
+ },
123
141
  type: "button",
124
142
  "data-testid": "ekyb-add-ubo",
125
143
  children: t("ekyb.addAnotherUbo")
@@ -128,9 +146,13 @@ var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onB
128
146
  };
129
147
  //#endregion
130
148
  //#region src/modules/ekyb/ekybModule.tsx
131
- var EkybContent = ({ config, onFinish }) => {
149
+ var EkybContent = ({ config, manager: externalManager, onFinish }) => {
132
150
  const { t } = useTranslation();
133
- const [state, manager] = useManager(() => createEkybManager({ config }));
151
+ const [state, manager] = useManager(() => {
152
+ if (externalManager) return externalManager;
153
+ if (!config) throw new Error("Ekyb config is required when no manager is provided");
154
+ return createEkybManager({ config });
155
+ }, { manageLifecycle: !externalManager });
134
156
  useModuleTerminalCallbacks({
135
157
  status: state.status === "closed" ? "finished" : state.status,
136
158
  onFinish
@@ -268,12 +290,14 @@ var EkybForm = ({ state, manager }) => {
268
290
  })]
269
291
  });
270
292
  };
271
- var EkybModule = ({ config, onFinish }) => {
272
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(EkybContent, {
293
+ var EkybModuleWithLocalConfig = ({ config, manager, onFinish }) => {
294
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(EkybContent, {
273
295
  config,
296
+ manager,
274
297
  onFinish
275
298
  }) : null });
276
299
  };
300
+ var EkybModule = withStandaloneModuleBootstrap(EkybModuleWithLocalConfig, "EKYB", { supportsExternalManager: true });
277
301
  registerIncodeModuleElement(EkybModule, "incode-ekyb");
278
302
  //#endregion
279
303
  export { EkybModule as t };
@@ -0,0 +1,2 @@
1
+ import { t as EkybModule } from "./ekybModule-CMcpoTgh.js";
2
+ export { EkybModule };
@@ -1,2 +1,2 @@
1
- import { t as EkycModule } from "../ekycModule-Dxpdd0ns.js";
1
+ import { t as EkycModule } from "../ekycModule-BTO8iIwh.js";
2
2
  export { EkycModule };
@@ -79,9 +79,9 @@
79
79
 
80
80
  @media (min-width: 768px) {
81
81
  .IncodeEkycPage.IncodePageContainer {
82
- height: 100dvh;
83
- max-height: none;
84
82
  margin-top: var(--spacing-0, var(--spacing-none, 0px));
83
+ height: 100%;
84
+ max-height: none;
85
85
  }
86
86
 
87
87
  .IncodeEkycPage .IncodePageInner {
@@ -1,23 +1,44 @@
1
- import { n as useTranslation } from "./i18n-CU4xq8qC.js";
2
- import { _ as y, d as T, l as A, v as u } from "./vendor-preact-DThS2ZQ_.js";
3
- import { c as useModuleTerminalCallbacks, o as useFormScrollable, u as useManager } from "./hooks-CNu7o-v8.js";
4
- import { t as IncodeComponent } from "./incodeComponent-CfzJGETt.js";
5
- import { t as Page } from "./page-DidH_RkX.js";
6
- import { t as Spinner } from "./spinner-BMeIEK1d.js";
7
- import { t as Button } from "./button-Dz6AsbmF.js";
8
- import { t as VerificationResult } from "./verificationResult-BWWkmeiA.js";
9
- import { i as translateError, r as FormField, t as RadioGroupComposed } from "./radioGroupComposed-DuQxslB2.js";
10
- import { t as PhoneInputComposed } from "./phoneInputComposed-DMiXfF-1.js";
11
- import { t as DropdownComposed } from "./dropdownComposed-CoU0enG6.js";
12
- import { t as DateInputComposed } from "./dateInputComposed-DuaofcBl.js";
13
- import { t as registerIncodeModuleElement } from "./incodeModule-B-4_3JrK.js";
14
- import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-D0RhuMed.js";
15
- import { n as AddressAutocomplete, t as getAccessibleOptionLabel } from "./optionAccessibleLabel-gfF-58Mv.js";
1
+ import { a as useTranslation } from "./uiConfig-D7ezQeZ7.js";
2
+ import { _ as y, d as T, l as A, v as u } from "./vendor-preact-mvwZ8mJj.js";
3
+ import { _ as useModuleTerminalCallbacks, h as useFormScrollable, o as Page, r as withStandaloneModuleBootstrap, t as IncodeComponent, y as useManager } from "./incodeComponent-B-daxouV.js";
4
+ import { t as Spinner } from "./spinner-HP_c74K-.js";
5
+ import { r as Button } from "./incode-logo-cGsd55rc.js";
6
+ import { t as VerificationResult } from "./verificationResult-IUf0w1aR.js";
7
+ import { i as translateError, r as FormField, t as RadioGroupComposed } from "./radioGroupComposed-CYPHpI6a.js";
8
+ import { t as PhoneInputComposed } from "./phoneInputComposed-D1ZBsd4S.js";
9
+ import { t as DropdownComposed } from "./dropdownComposed-BXleSN7n.js";
10
+ import { t as DateInputComposed } from "./dateInputComposed-D0WEYWkS.js";
11
+ import { t as registerIncodeModuleElement } from "./incodeModule-uyUrSSUM.js";
12
+ import { n as getRequiredHintMode, t as getFieldHint } from "./requiredLabelHint-Dx0WS2cR.js";
13
+ import { n as AddressAutocomplete, t as getAccessibleOptionLabel } from "./optionAccessibleLabel-Dmz3eRsO.js";
16
14
  import { createEkycManager } from "@incodetech/core/ekyc";
17
15
  //#region src/modules/ekyc/ekycModule.tsx
18
- var EkycContent = ({ config, onFinish }) => {
16
+ /**
17
+ * WCAG 2.2 SC 1.3.5 (Identify Input Purpose) — maps eKYC field names to the
18
+ * standard HTML `autocomplete` token so browsers/password managers can offer
19
+ * the right value. Only personal-info fields with an unambiguous token are
20
+ * listed; unmapped fields (IDs, SSNs, dropdowns, address-search combobox) fall
21
+ * through to `undefined`.
22
+ */
23
+ var EKYC_AUTOCOMPLETE_TOKENS = {
24
+ firstName: "given-name",
25
+ middleName: "additional-name",
26
+ surName: "family-name",
27
+ email: "email",
28
+ phone: "tel",
29
+ city: "address-level2",
30
+ state: "address-level1",
31
+ postalCode: "postal-code",
32
+ dateOfBirth: "bday"
33
+ };
34
+ var getEkycAutocomplete = (name) => EKYC_AUTOCOMPLETE_TOKENS[name];
35
+ var EkycContent = ({ config, manager: externalManager, onFinish }) => {
19
36
  const { t } = useTranslation();
20
- const [state, manager] = useManager(() => createEkycManager({ config }));
37
+ const [state, manager] = useManager(() => {
38
+ if (externalManager) return externalManager;
39
+ if (!config) throw new Error("Ekyc config is required when no manager is provided");
40
+ return createEkycManager({ config });
41
+ }, { manageLifecycle: !externalManager });
21
42
  useModuleTerminalCallbacks({
22
43
  status: state.status === "closed" ? "finished" : state.status,
23
44
  onFinish
@@ -155,6 +176,7 @@ var EkycForm = ({ state, manager }) => {
155
176
  id: `ekyc-${field.name}`,
156
177
  label: dateLabel,
157
178
  labelHint,
179
+ autoComplete: getEkycAutocomplete(field.name),
158
180
  value: fieldValue,
159
181
  error: translateError$1(fieldError),
160
182
  disabled: isReadonly,
@@ -173,6 +195,7 @@ var EkycForm = ({ state, manager }) => {
173
195
  id: `ekyc-${field.name}`,
174
196
  label: phoneLabel,
175
197
  labelHint,
198
+ autoComplete: getEkycAutocomplete(field.name),
176
199
  countryCode: fieldsCountry,
177
200
  value: fieldValue,
178
201
  placeholder: field.placeholder,
@@ -207,6 +230,7 @@ var EkycForm = ({ state, manager }) => {
207
230
  name: field.name,
208
231
  label: field.label,
209
232
  displayLabel: field.displayLabel,
233
+ autoComplete: getEkycAutocomplete(field.name),
210
234
  value: fieldValue,
211
235
  error: fieldError?.key,
212
236
  errorParams: fieldError?.params,
@@ -246,12 +270,14 @@ var EkycForm = ({ state, manager }) => {
246
270
  })]
247
271
  });
248
272
  };
249
- var EkycModule = ({ config, onFinish }) => {
250
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(EkycContent, {
273
+ var EkycModuleWithLocalConfig = ({ config, manager, onFinish }) => {
274
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(EkycContent, {
251
275
  config,
276
+ manager,
252
277
  onFinish
253
278
  }) : null });
254
279
  };
280
+ var EkycModule = withStandaloneModuleBootstrap(EkycModuleWithLocalConfig, "EXTERNAL_VERIFICATION", { supportsExternalManager: true });
255
281
  registerIncodeModuleElement(EkycModule, "incode-ekyc");
256
282
  //#endregion
257
283
  export { EkycModule as t };
@@ -0,0 +1,2 @@
1
+ import { t as EkycModule } from "./ekycModule-BTO8iIwh.js";
2
+ export { EkycModule };
@@ -1,2 +1,2 @@
1
- import { n as ElectronicSignature, t as AeSignature } from "../electronic-signature-Ueoffasr.js";
1
+ import { n as ElectronicSignature, t as AeSignature } from "../electronic-signature-COBKJBjU.js";
2
2
  export { AeSignature, ElectronicSignature };