@incodetech/web 2.0.0-rc.0 → 2.0.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 (178) hide show
  1. package/package.json +3 -3
  2. package/dist/ae-signature/ae-signature.es.js +0 -15
  3. package/dist/ae-signature/styles.css +0 -348
  4. package/dist/ae-signature/styles2.css +0 -107
  5. package/dist/aligndevicelottie-DoV8xKjh.js +0 -12757
  6. package/dist/antifraud/antifraud.es.js +0 -18
  7. package/dist/antifraud/styles.css +0 -2
  8. package/dist/authentication/authentication.es.js +0 -29
  9. package/dist/autoFocusTitle-QexamZ4i.js +0 -16
  10. package/dist/back-horizontal-hint-B8Brxh3U.js +0 -137
  11. package/dist/back-tutorial-1NOQobGO.js +0 -14585
  12. package/dist/back-vertical-hint-BBo36dxn.js +0 -128
  13. package/dist/backdevicelottie-C_ceuqY7.js +0 -16678
  14. package/dist/base.css +0 -5818
  15. package/dist/blurdevicelottie-UO14Y0WC.js +0 -15939
  16. package/dist/bottomSheet-DE_8TFEC.js +0 -31
  17. package/dist/browser-ponyfill-jOkuz57z.js +0 -299
  18. package/dist/button-DcCUEn2n.js +0 -24
  19. package/dist/checkbox-Cl57ltq_.js +0 -85
  20. package/dist/consent/consent.es.js +0 -90
  21. package/dist/consent/styles.css +0 -116
  22. package/dist/countrySelector-CE-JgIsv.js +0 -58
  23. package/dist/cpf-ocr/styles.css +0 -45
  24. package/dist/cpfOcr-D_tbwbvh.js +0 -78
  25. package/dist/cross-document-data-match/cross-document-data-match.es.js +0 -18
  26. package/dist/curp-validation/curp-validation.es.js +0 -279
  27. package/dist/curp-validation/styles.css +0 -82
  28. package/dist/custom-fields/styles.css +0 -22
  29. package/dist/customFields-CW38fQUv.js +0 -127
  30. package/dist/customWatchlist-D9_yjEQd.js +0 -33
  31. package/dist/dateInputComposed-BpAGsjN6.js +0 -55
  32. package/dist/dateInputComposed-DU3o6PAV.js +0 -1
  33. package/dist/defineProperty-Dh8nSJpJ.js +0 -39
  34. package/dist/document-capture/styles.css +0 -367
  35. package/dist/documentCapture-xX-JT7ZY.js +0 -763
  36. package/dist/dropdownComposed-DFRBG22E.js +0 -284
  37. package/dist/dropdownComposed-DwTzc2YU.js +0 -1
  38. package/dist/dynamic-forms/styles.css +0 -36
  39. package/dist/dynamicForms-CJP1Ia6Q.js +0 -262
  40. package/dist/ekyb/ekyb.es.js +0 -2
  41. package/dist/ekyb/styles.css +0 -137
  42. package/dist/ekybModule-BSs7mndb.js +0 -280
  43. package/dist/ekybModule-D9M3E2Gm.js +0 -2
  44. package/dist/ekyc/ekyc.es.js +0 -2
  45. package/dist/ekyc/styles.css +0 -106
  46. package/dist/ekycModule-CU9pt5YN.js +0 -246
  47. package/dist/ekycModule-CZw9cLno.js +0 -2
  48. package/dist/electronic-signature/electronic-signature.es.js +0 -2
  49. package/dist/electronic-signature-COYXjGdd.js +0 -410
  50. package/dist/email/email.es.js +0 -87
  51. package/dist/email/styles.css +0 -12
  52. package/dist/emailInput-DppGf9pv.js +0 -37
  53. package/dist/expiredId-BnmzE8T3.js +0 -70
  54. package/dist/extensibility-CzEJfRwo.js +0 -2586
  55. package/dist/extensibility.es.js +0 -25
  56. package/dist/face-match/face-match.es.js +0 -2
  57. package/dist/face-match/styles.css +0 -910
  58. package/dist/faceMatch-B8j0g0Yo.js +0 -2
  59. package/dist/faceMatch-BV8UD7tj.js +0 -201
  60. package/dist/flip-animation-CgwRsEmK.js +0 -6983
  61. package/dist/flow/flow.es.js +0 -661
  62. package/dist/flow/styles.css +0 -5205
  63. package/dist/front-horizontal-hint-DGGGi8e1.js +0 -380
  64. package/dist/front-vertical-hint-CNr5mE6Q.js +0 -420
  65. package/dist/frontdevicelottie-Bu6f9fDE.js +0 -17302
  66. package/dist/geolocation/geolocation.es.js +0 -857
  67. package/dist/geolocation/styles.css +0 -158
  68. package/dist/glaredevicelottie-B10axYs_.js +0 -14466
  69. package/dist/governmentValidation/governmentValidation.es.js +0 -98
  70. package/dist/governmentValidation/styles.css +0 -58
  71. package/dist/homeScreen-DnP1jw9A.js +0 -227
  72. package/dist/hooks-BVnGysT7.js +0 -80
  73. package/dist/i18n-9s4OSqwi.js +0 -2010
  74. package/dist/icons-Cc7zwchP.js +0 -310
  75. package/dist/id/id.es.js +0 -832
  76. package/dist/id/styles.css +0 -1287
  77. package/dist/id-laser-h-mBAzHVOK.js +0 -467
  78. package/dist/id-laser-v-CrFg4bcJ.js +0 -483
  79. package/dist/id-ocr/styles.css +0 -46
  80. package/dist/id-tutorial-BCr42Pnn.js +0 -13153
  81. package/dist/id-verification/id-verification.es.js +0 -20
  82. package/dist/idOcr-CCjfWQvH.js +0 -94
  83. package/dist/identity-reuse/identity-reuse.es.js +0 -198
  84. package/dist/identity-reuse/styles.css +0 -163
  85. package/dist/incode-logo-DX016usY.js +0 -4
  86. package/dist/incodeComponent-C1o4M0ZK.js +0 -50
  87. package/dist/incodeModule-BqCjVgEI.js +0 -18
  88. package/dist/index.es.js +0 -16
  89. package/dist/inputComposed-APSw8C7o.js +0 -89
  90. package/dist/inputComposed-XYrarFxS.js +0 -1
  91. package/dist/loadingIcon-BN5YRQUb.js +0 -104
  92. package/dist/mandatoryConsent-DssKMC3v.js +0 -100
  93. package/dist/modal-NMxsQHAO.js +0 -135
  94. package/dist/modal.hooks-CAjcIFZK.js +0 -126
  95. package/dist/numberedStep-CT-alrK5.js +0 -11
  96. package/dist/optionAccessibleLabel-CzEeX3Q4.js +0 -140
  97. package/dist/otpInput-DqRA_egd.js +0 -145
  98. package/dist/page-C1yT4DLb.js +0 -69
  99. package/dist/passport-horizontal-hint-Bgquwtac.js +0 -293
  100. package/dist/passport-tutorial-DwRwtPVX.js +0 -11689
  101. package/dist/passport-vertical-hint-BT1D5BrW.js +0 -267
  102. package/dist/pdf-BurGZ08w.js +0 -14967
  103. package/dist/pdfViewer-BGBNL1Ea.js +0 -63
  104. package/dist/phone/phone.es.js +0 -98
  105. package/dist/phone/styles.css +0 -11
  106. package/dist/phoneInputComposed-bvWhGLFZ.js +0 -11206
  107. package/dist/processing-G_y3o32b.js +0 -6
  108. package/dist/qe-signature/qe-signature.es.js +0 -15
  109. package/dist/radioGroupComposed-BbmvxmD2.js +0 -177
  110. package/dist/redirect-to-mobile/styles.css +0 -588
  111. package/dist/redirectToMobile-C3k1gloW.js +0 -1514
  112. package/dist/requiredLabelHint-BLwgqozE.js +0 -13
  113. package/dist/richText-DbJ5sl2n.js +0 -1973
  114. package/dist/rolldown-runtime-CYMK-g2i.js +0 -20
  115. package/dist/selfie/selfie.es.js +0 -43
  116. package/dist/selfie/styles.css +0 -706
  117. package/dist/selfieTutorial-BgrlUMXP.js +0 -2677
  118. package/dist/signature/signature.es.js +0 -546
  119. package/dist/snackbar-BDp8x7Cv.js +0 -14
  120. package/dist/spinner-B4dcie2T.js +0 -1
  121. package/dist/spinner-CKnjVHxw.js +0 -39
  122. package/dist/statusPage-CUI7ApcU.js +0 -28
  123. package/dist/successIcon-DbILeIz_.js +0 -28
  124. package/dist/tabs-DaPyP71c.js +0 -78
  125. package/dist/themes/dark.css +0 -1347
  126. package/dist/themes/light.css +0 -1225
  127. package/dist/transitionSpinner-PIEPU2Vx.js +0 -17
  128. package/dist/tutorial-9vHAHvMK.js +0 -2587
  129. package/dist/types/ae-signature.d.ts +0 -40
  130. package/dist/types/antifraud.d.ts +0 -40
  131. package/dist/types/authentication.d.ts +0 -45
  132. package/dist/types/base.d.ts +0 -1
  133. package/dist/types/consent.d.ts +0 -41
  134. package/dist/types/cpf-ocr/styles.d.ts +0 -1
  135. package/dist/types/cross-document-data-match.d.ts +0 -34
  136. package/dist/types/curp-validation.d.ts +0 -40
  137. package/dist/types/custom-fields/styles.d.ts +0 -1
  138. package/dist/types/dark.d.ts +0 -1
  139. package/dist/types/document-capture/styles.d.ts +0 -1
  140. package/dist/types/dynamic-forms/styles.d.ts +0 -1
  141. package/dist/types/ekyb.d.ts +0 -34
  142. package/dist/types/ekyc.d.ts +0 -34
  143. package/dist/types/electronic-signature.d.ts +0 -43
  144. package/dist/types/email.d.ts +0 -67
  145. package/dist/types/extensibility.d.ts +0 -981
  146. package/dist/types/face-match.d.ts +0 -59
  147. package/dist/types/flow.d.ts +0 -137
  148. package/dist/types/geolocation.d.ts +0 -41
  149. package/dist/types/governmentValidation.d.ts +0 -34
  150. package/dist/types/id-ocr/styles.d.ts +0 -1
  151. package/dist/types/id-verification.d.ts +0 -40
  152. package/dist/types/id.d.ts +0 -41
  153. package/dist/types/identity-reuse.d.ts +0 -43
  154. package/dist/types/index.d.ts +0 -32
  155. package/dist/types/light.d.ts +0 -1
  156. package/dist/types/mandatory-consent/styles.d.ts +0 -1
  157. package/dist/types/phone.d.ts +0 -68
  158. package/dist/types/qe-signature.d.ts +0 -40
  159. package/dist/types/redirect-to-mobile/styles.d.ts +0 -1
  160. package/dist/types/selfie.d.ts +0 -41
  161. package/dist/types/signature.d.ts +0 -40
  162. package/dist/types/styles.d.ts +0 -1
  163. package/dist/types/themes/dark.d.ts +0 -1
  164. package/dist/types/themes/light.d.ts +0 -1
  165. package/dist/types/watchlist-for-business/styles.d.ts +0 -1
  166. package/dist/types/watchlist.d.ts +0 -40
  167. package/dist/types/workflow.d.ts +0 -91
  168. package/dist/typography-CxjaknHN.js +0 -28
  169. package/dist/uiConfig-CwpQ-IM6.js +0 -20
  170. package/dist/useModuleLoader-BFiVA41N.js +0 -432
  171. package/dist/vendor-preact-D6SntenC.js +0 -958
  172. package/dist/verificationResult-BrVbUJ4U.js +0 -97
  173. package/dist/verifiedByIncode-ChZBpqNy.js +0 -101
  174. package/dist/watchlist/watchlist.es.js +0 -33
  175. package/dist/watchlist-for-business/styles.css +0 -18
  176. package/dist/watchlistForBusiness-BcSNtHCV.js +0 -77
  177. package/dist/workflow/styles.css +0 -4612
  178. package/dist/workflow/workflow.es.js +0 -244
@@ -1,284 +0,0 @@
1
- import { _ as e, l as t, p as n, v as r } from "./vendor-preact-D6SntenC.js";
2
- import { n as i } from "./loadingIcon-BN5YRQUb.js";
3
- import { g as a, l as o, n as s, o as c, u as ee } from "./icons-Cc7zwchP.js";
4
- import { t as te } from "./successIcon-DbILeIz_.js";
5
- //#region src/shared/dropdownComposed/dropdownComposed.tsx
6
- var l = ({ id: l, label: u, labelHint: d, placeholder: f = "Choose an option", value: p, options: m, onChange: h, error: g, helper: _, showErrorIcon: v, showHelperIcon: y, suppressMessages: b = !1, disabled: x = !1, required: S, searchable: C = !1, searchPlaceholder: w = "Search...", noResultsText: T = "No results found", name: E, tabIndex: ne, onKeyDown: re, onBlur: ie, renderSelectedLabel: D, siblingElement: O, enterKeyHint: ae, class: k, "aria-label": A, "data-testid": j }) => {
7
- let [M, N] = n(!1), [P, F] = n(!1), [I, L] = n(-1), [R, z] = n(""), B = t(null), V = t(null), H = t(null), U = t([]), W = t(null), G = t(""), K = t(), q = m.find((e) => e.value === p), oe = q ? D ? D(q) : q.label : f, J = C && R ? m.filter((e) => e.label.toLowerCase().includes(R.toLowerCase())) : m, Y = `${l}-label`, X = `${l}-listbox`, Z = `${l}-helper`, Q = `${l}-error`, se = b ? "" : [_ ? Z : null, g ? Q : null].filter(Boolean).join(" ");
8
- e(() => {
9
- if (!M) return;
10
- let e = requestAnimationFrame(() => {
11
- C && W.current && W.current.focus(), requestAnimationFrame(() => {
12
- H.current?.scrollIntoView({
13
- behavior: "smooth",
14
- block: "nearest",
15
- inline: "nearest"
16
- });
17
- });
18
- });
19
- return () => cancelAnimationFrame(e);
20
- }, [M, C]), e(() => {
21
- M || (L(-1), z(""));
22
- }, [M]), e(() => {
23
- I >= 0 && U.current[I] && U.current[I]?.scrollIntoView({
24
- block: "nearest",
25
- inline: "nearest"
26
- });
27
- }, [I]), e(() => () => {
28
- K.current && clearTimeout(K.current);
29
- }, []);
30
- let ce = () => {
31
- x || N((e) => !e);
32
- }, $ = (e) => {
33
- h(e), N(!1), L(-1), V.current?.focus();
34
- }, le = () => {
35
- F(!0);
36
- }, ue = (e) => {
37
- F(!1), B.current?.contains(e.relatedTarget) || (N(!1), ie?.());
38
- }, de = (e) => {
39
- if (x) return;
40
- re?.(e);
41
- let { key: t } = e;
42
- if (t.length === 1 && /^[a-zA-Z0-9]$/.test(t)) {
43
- e.preventDefault(), K.current && clearTimeout(K.current), G.current += t.toLowerCase();
44
- let n = J.findIndex((e) => e.label.toLowerCase().startsWith(G.current));
45
- n !== -1 && (M || N(!0), L(n)), K.current = setTimeout(() => {
46
- G.current = "";
47
- }, 500);
48
- return;
49
- }
50
- switch (t) {
51
- case "ArrowDown":
52
- e.preventDefault(), M ? L((e) => e < J.length - 1 ? e + 1 : e) : (N(!0), L(0));
53
- break;
54
- case "ArrowUp":
55
- e.preventDefault(), M ? L((e) => e > 0 ? e - 1 : e) : (N(!0), L(J.length - 1));
56
- break;
57
- case "Home":
58
- e.preventDefault(), M && L(0);
59
- break;
60
- case "End":
61
- e.preventDefault(), M && L(J.length - 1);
62
- break;
63
- case "Enter":
64
- e.preventDefault(), M && I >= 0 && J[I] ? $(J[I].value) : M || N(!0);
65
- break;
66
- case " ":
67
- e.preventDefault(), M && I >= 0 && J[I] ? $(J[I].value) : M || (N(!0), L(0));
68
- break;
69
- case "Escape":
70
- e.preventDefault(), M && (N(!1), L(-1), V.current?.focus());
71
- break;
72
- case "Tab":
73
- M && (N(!1), L(-1));
74
- break;
75
- default: break;
76
- }
77
- }, fe = (e) => {
78
- let { key: t } = e;
79
- switch (t) {
80
- case "ArrowDown":
81
- e.preventDefault(), L((e) => e < J.length - 1 ? e + 1 : e);
82
- break;
83
- case "ArrowUp":
84
- e.preventDefault(), L((e) => e > 0 ? e - 1 : e);
85
- break;
86
- case "Home":
87
- e.preventDefault(), L(0);
88
- break;
89
- case "End":
90
- e.preventDefault(), L(J.length - 1);
91
- break;
92
- case "Enter":
93
- e.preventDefault(), I >= 0 && J[I] && $(J[I].value);
94
- break;
95
- case "Escape":
96
- e.preventDefault(), N(!1), L(-1), V.current?.focus();
97
- break;
98
- case "Tab":
99
- R || (N(!1), L(-1));
100
- break;
101
- default: break;
102
- }
103
- };
104
- return /* @__PURE__ */ r("div", {
105
- class: i("IncodeDropdownComposed", k),
106
- ref: B,
107
- onBlur: ue,
108
- children: [
109
- E && /* @__PURE__ */ r("input", {
110
- type: "hidden",
111
- name: E,
112
- value: p || "",
113
- disabled: x,
114
- required: S
115
- }),
116
- u && /* @__PURE__ */ r("label", {
117
- class: "IncodeDropdownComposedLabel",
118
- id: Y,
119
- htmlFor: l,
120
- "data-testid": `${l}-label`,
121
- children: [u, d && /* @__PURE__ */ r("span", {
122
- class: "IncodeDropdownComposedLabelHint",
123
- "data-testid": `${l}-label-hint`,
124
- children: d
125
- })]
126
- }),
127
- /* @__PURE__ */ r("div", {
128
- class: "IncodeDropdownComposedWrapper",
129
- children: [/* @__PURE__ */ r("div", {
130
- class: i("IncodeDropdownComposedTriggerRow", { IncodeDropdownComposedTriggerRowWithSibling: !!O }),
131
- children: [/* @__PURE__ */ r("button", {
132
- ref: V,
133
- type: "button",
134
- id: l,
135
- class: "IncodeDropdownComposedTrigger",
136
- onClick: ce,
137
- onFocus: le,
138
- onKeyDown: de,
139
- tabIndex: x ? -1 : ne ?? 0,
140
- disabled: x,
141
- "aria-haspopup": "listbox",
142
- "aria-expanded": M ? "true" : "false",
143
- "aria-disabled": x ? "true" : void 0,
144
- "aria-labelledby": u ? Y : void 0,
145
- "aria-label": u ? void 0 : A,
146
- "aria-controls": M ? X : void 0,
147
- "aria-activedescendant": M && I >= 0 ? `${l}-option-${I}` : void 0,
148
- "aria-invalid": g ? "true" : void 0,
149
- "aria-required": S ? "true" : void 0,
150
- "aria-describedby": se || void 0,
151
- "data-error": g ? "true" : void 0,
152
- "data-focused": P || M ? "true" : void 0,
153
- "data-testid": j,
154
- children: [/* @__PURE__ */ r("span", {
155
- class: q ? "IncodeDropdownComposedTriggerText" : "IncodeDropdownComposedTriggerPlaceholder",
156
- "aria-hidden": !u && A ? "true" : void 0,
157
- children: oe
158
- }), /* @__PURE__ */ r("span", {
159
- class: "IncodeDropdownComposedTriggerIcon",
160
- "aria-hidden": "true",
161
- "data-open": M,
162
- children: /* @__PURE__ */ r(o, {})
163
- })]
164
- }), O && /* @__PURE__ */ r("div", {
165
- class: "IncodeDropdownComposedSibling",
166
- children: O
167
- })]
168
- }), M && /* @__PURE__ */ r("div", {
169
- ref: H,
170
- class: "IncodeDropdownComposedList",
171
- "data-error": g ? "true" : void 0,
172
- children: [C && /* @__PURE__ */ r("div", {
173
- class: "IncodeDropdownComposedSearchWrapper",
174
- children: /* @__PURE__ */ r("div", {
175
- class: "IncodeDropdownComposedSearchInner",
176
- children: [/* @__PURE__ */ r("input", {
177
- ref: W,
178
- type: "text",
179
- class: "IncodeDropdownComposedSearchInput",
180
- value: R,
181
- onInput: (e) => {
182
- z(e.target.value), L(0);
183
- },
184
- onKeyDown: fe,
185
- placeholder: w,
186
- role: "combobox",
187
- "aria-autocomplete": "list",
188
- "aria-expanded": "true",
189
- "aria-controls": X,
190
- "aria-activedescendant": I >= 0 ? `${l}-option-${I}` : void 0,
191
- "aria-label": w,
192
- autocomplete: "off"
193
- }), R ? /* @__PURE__ */ r("button", {
194
- type: "button",
195
- class: "IncodeDropdownComposedCloseIconButton",
196
- onMouseDown: (e) => e.preventDefault(),
197
- onClick: () => {
198
- R && (z(""), W.current?.focus());
199
- },
200
- "aria-label": "Clear search query",
201
- children: /* @__PURE__ */ r(c, {
202
- width: 20,
203
- height: 20,
204
- fillColor: "var(--icon-neutral-500)"
205
- })
206
- }) : /* @__PURE__ */ r("span", {
207
- class: "IncodeDropdownComposedSearchIcon",
208
- "aria-hidden": "true",
209
- children: /* @__PURE__ */ r(s, { size: 20 })
210
- })]
211
- })
212
- }), /* @__PURE__ */ r("div", {
213
- id: X,
214
- role: "listbox",
215
- "aria-labelledby": u ? Y : void 0,
216
- "aria-label": u ? void 0 : A ?? f,
217
- class: "IncodeDropdownComposedOptionsScroll",
218
- children: J.length === 0 ? /* @__PURE__ */ r("div", {
219
- class: "IncodeDropdownComposedNoResults",
220
- children: T
221
- }) : J.map((e, t) => {
222
- let n = p === e.value;
223
- return /* @__PURE__ */ r("div", {
224
- id: `${l}-option-${t}`,
225
- role: "option",
226
- "aria-label": e.ariaLabel,
227
- "aria-selected": n ? "true" : "false",
228
- class: "IncodeDropdownComposedOption",
229
- "data-highlighted": I === t,
230
- ref: (e) => {
231
- U.current[t] = e;
232
- },
233
- onClick: () => $(e.value),
234
- onMouseDown: (e) => e.preventDefault(),
235
- onMouseEnter: () => L(t),
236
- children: [e.ariaLabel ? /* @__PURE__ */ r("span", {
237
- "aria-hidden": "true",
238
- children: e.label
239
- }) : e.label, n && /* @__PURE__ */ r("span", {
240
- class: "IncodeDropdownComposedCheckmarkIcon",
241
- "aria-hidden": "true",
242
- children: /* @__PURE__ */ r(ee, {})
243
- })]
244
- }, e.value);
245
- })
246
- })]
247
- })]
248
- }),
249
- C && /* @__PURE__ */ r("div", {
250
- class: "IncodeDropdownComposedLiveRegion",
251
- role: "status",
252
- "aria-live": "polite",
253
- "aria-atomic": "true",
254
- children: M && R ? J.length === 0 ? T : `${J.length} result${J.length === 1 ? "" : "s"} available` : ""
255
- }),
256
- !b && g && /* @__PURE__ */ r("div", {
257
- class: "IncodeDropdownComposedErrorWrapper",
258
- "data-testid": `${l}-error-wrapper`,
259
- children: [v && /* @__PURE__ */ r("div", {
260
- class: "IncodeDropdownComposedIconWrapper",
261
- children: /* @__PURE__ */ r(a, { size: 17 })
262
- }), /* @__PURE__ */ r("p", {
263
- id: Q,
264
- class: "IncodeDropdownComposedError",
265
- children: g
266
- })]
267
- }),
268
- !b && _ && !g && /* @__PURE__ */ r("div", {
269
- class: "IncodeDropdownComposedHelperWrapper",
270
- "data-testid": `${l}-helper-wrapper`,
271
- children: [y && /* @__PURE__ */ r("div", {
272
- class: "IncodeDropdownComposedIconWrapper",
273
- children: /* @__PURE__ */ r(te, { size: 17 })
274
- }), /* @__PURE__ */ r("p", {
275
- id: Z,
276
- class: "IncodeDropdownComposedHelper",
277
- children: _
278
- })]
279
- })
280
- ]
281
- });
282
- };
283
- //#endregion
284
- export { l as t };
@@ -1 +0,0 @@
1
- import "./dropdownComposed-DFRBG22E.js";
@@ -1,36 +0,0 @@
1
- /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
- .IncodeDynamicFormsProgress {
3
- margin-bottom: var(--spacing-4, var(--spacing-4, 4px));
4
- text-align: center;
5
- font-size: var(--text-sm, .875rem);
6
- line-height: var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));
7
- color: var(--text-secondary);
8
- }
9
-
10
- .IncodeDynamicFormsPage .IncodePageTitleContainer {
11
- margin-top: var(--spacing-24, var(--spacing-24, 24px));
12
- }
13
-
14
- .IncodeDynamicFormsPage .IncodePageContent {
15
- align-items: center;
16
- }
17
-
18
- .IncodeDynamicFormsForm {
19
- flex-direction: column;
20
- width: 100%;
21
- max-width: 420px;
22
- height: 100%;
23
- display: flex;
24
- }
25
-
26
- .IncodeDynamicFormsForm button {
27
- margin-top: auto;
28
- }
29
-
30
- .IncodeDynamicFormsField {
31
- margin-bottom: var(--spacing-16, var(--spacing-16, 16px));
32
- flex-direction: column;
33
- align-items: flex-start;
34
- width: 100%;
35
- display: flex;
36
- }
@@ -1,262 +0,0 @@
1
- import { n as e } from "./i18n-9s4OSqwi.js";
2
- import { _ as t, d as n, p as r, v as i } from "./vendor-preact-D6SntenC.js";
3
- import { o as a } from "./hooks-BVnGysT7.js";
4
- import { t as o } from "./incodeComponent-C1o4M0ZK.js";
5
- import { r as s } from "./loadingIcon-BN5YRQUb.js";
6
- import { t as c } from "./page-C1yT4DLb.js";
7
- import { t as l } from "./button-DcCUEn2n.js";
8
- import { t as u } from "./verificationResult-BrVbUJ4U.js";
9
- import { t as d } from "./inputComposed-APSw8C7o.js";
10
- import { t as f } from "./checkbox-Cl57ltq_.js";
11
- import { n as p, t as m } from "./phoneInputComposed-bvWhGLFZ.js";
12
- import { t as h } from "./dropdownComposed-DFRBG22E.js";
13
- import { t as g } from "./dateInputComposed-BpAGsjN6.js";
14
- import { t as _ } from "./incodeModule-BqCjVgEI.js";
15
- import { t as v } from "./emailInput-DppGf9pv.js";
16
- import { formatCPF as y } from "@incodetech/core/cpf-ocr";
17
- import { createDynamicFormsManager as b } from "@incodetech/core/dynamic-forms";
18
- //#region src/modules/dynamic-forms/dynamicForms.tsx
19
- function x(e) {
20
- return e.inputType ?? e.overrides ?? "TEXT";
21
- }
22
- var S = ({ question: e, value: t, disabled: r = !1, onChange: a, onPhoneChange: o, onPhoneBlur: s, phoneError: c, onEmailChange: l, onEmailBlur: u, emailError: _, onCpfChange: b, onCpfBlur: S, cpfError: C }) => {
23
- let w = x(e), T = `dynamic-form-${e.questionId}`, E = e.isOptional ? e.question : `* ${e.question}`, D = w === "COUNTRY" || w === "NATIONALITY", O = n(() => D ? p.map((e) => ({
24
- value: e.code,
25
- label: `${e.emoji} ${e.name}`,
26
- ariaLabel: e.name
27
- })) : [], [D]);
28
- if (w === "YESNO") return /* @__PURE__ */ i("div", {
29
- class: "IncodeDynamicFormsField",
30
- children: /* @__PURE__ */ i(f, {
31
- id: T,
32
- name: e.questionId,
33
- label: E,
34
- checked: t === "YES",
35
- disabled: r,
36
- onChange: (t) => a(e.questionId, t.target.checked ? "YES" : "NO")
37
- })
38
- });
39
- if (w === "DATE") return /* @__PURE__ */ i("div", {
40
- class: "IncodeDynamicFormsField",
41
- children: /* @__PURE__ */ i(g, {
42
- id: T,
43
- name: e.questionId,
44
- label: E,
45
- value: t,
46
- disabled: r,
47
- onInput: (t) => a(e.questionId, t.target.value)
48
- })
49
- });
50
- if (w === "PHONE") return /* @__PURE__ */ i("div", {
51
- class: "IncodeDynamicFormsField",
52
- onFocusOut: () => s?.(e.questionId),
53
- children: /* @__PURE__ */ i(m, {
54
- id: T,
55
- label: E,
56
- value: t,
57
- error: c,
58
- showErrorIcon: !!c,
59
- disabled: r,
60
- onChange: (t, n) => o?.(e.questionId, t, n)
61
- })
62
- });
63
- if (w === "COUNTRY" || w === "NATIONALITY") return /* @__PURE__ */ i("div", {
64
- class: "IncodeDynamicFormsField",
65
- children: /* @__PURE__ */ i(h, {
66
- id: T,
67
- label: E,
68
- value: t,
69
- options: O,
70
- searchable: !0,
71
- disabled: r,
72
- onChange: (t) => a(e.questionId, t)
73
- })
74
- });
75
- if (w === "SELECT" || w === "MULTISELECT") {
76
- let n = (e.options ?? []).map((e) => ({
77
- value: e,
78
- label: e
79
- }));
80
- return /* @__PURE__ */ i("div", {
81
- class: "IncodeDynamicFormsField",
82
- children: /* @__PURE__ */ i(h, {
83
- id: T,
84
- label: E,
85
- value: t,
86
- options: n,
87
- searchable: n.length > 5,
88
- disabled: r,
89
- onChange: (t) => a(e.questionId, t)
90
- })
91
- });
92
- }
93
- return w === "EMAIL" ? /* @__PURE__ */ i("div", {
94
- class: "IncodeDynamicFormsField",
95
- children: /* @__PURE__ */ i(v, {
96
- value: t,
97
- emailError: _,
98
- label: E,
99
- disabled: r,
100
- onEmailChange: (t, n) => {
101
- a(e.questionId, t), l?.(e.questionId, t, n);
102
- },
103
- onBlur: () => u?.(e.questionId)
104
- })
105
- }) : w === "CPF" ? /* @__PURE__ */ i("div", {
106
- class: "IncodeDynamicFormsField",
107
- children: /* @__PURE__ */ i(d, {
108
- id: T,
109
- name: e.questionId,
110
- label: E,
111
- inputMode: "numeric",
112
- maxLength: 14,
113
- value: t,
114
- error: C,
115
- showErrorIcon: !!C,
116
- disabled: r,
117
- onInput: (t) => {
118
- let n = y(t.target.value);
119
- t.target.value = n, a(e.questionId, n), b?.(e.questionId, n);
120
- },
121
- onBlur: () => S?.(e.questionId)
122
- })
123
- }) : w === "NUMBER" ? /* @__PURE__ */ i("div", {
124
- class: "IncodeDynamicFormsField",
125
- children: /* @__PURE__ */ i(d, {
126
- id: T,
127
- name: e.questionId,
128
- label: E,
129
- type: "number",
130
- inputMode: "numeric",
131
- value: t,
132
- disabled: r,
133
- onInput: (t) => {
134
- let n = t.target.value.replace(/[^0-9]/g, "");
135
- a(e.questionId, n);
136
- }
137
- })
138
- }) : /* @__PURE__ */ i("div", {
139
- class: "IncodeDynamicFormsField",
140
- children: /* @__PURE__ */ i(d, {
141
- id: T,
142
- name: e.questionId,
143
- label: E,
144
- type: "text",
145
- value: t,
146
- disabled: r,
147
- onInput: (t) => a(e.questionId, t.target.value)
148
- })
149
- });
150
- }, C = ({ screen: n, answers: a, answerValidity: o, canSubmit: u, isSubmitting: d = !1, onAnswerChange: f, onAnswerValidityChange: p, onSubmit: m }) => {
151
- let { t: h } = e(), [g, _] = r({}), [v, y] = r({}), [b, C] = r({}), [w, T] = r({}), [E, D] = r({}), [O, k] = r({});
152
- return t(() => {
153
- _({}), y({}), C({}), T({}), D({}), k({});
154
- }, [n]), /* @__PURE__ */ i(c, {
155
- className: "IncodeDynamicFormsPage",
156
- title: n.hideTitle ? void 0 : n.title || h("dynamicForms.title"),
157
- hideFooterBranding: !0,
158
- children: [/* @__PURE__ */ i(s, { size: 32 }), /* @__PURE__ */ i("form", {
159
- class: "IncodeDynamicFormsForm",
160
- onSubmit: (e) => {
161
- e.preventDefault(), m();
162
- },
163
- autoComplete: "off",
164
- children: [n.questions.map((e) => {
165
- let t = x(e), n = t === "PHONE", r = t === "EMAIL", s = t === "CPF", c = o[e.questionId], l = n && g[e.questionId] && v[e.questionId] && c === !1 ? h("phone.invalidPhone") : void 0, u = r && b[e.questionId] && w[e.questionId] && c === !1 ? h("verification.errors.emailInvalid") : void 0, m = s && E[e.questionId] && O[e.questionId] && c === !1 ? h("dynamicForms.invalidCpf") : void 0;
166
- return /* @__PURE__ */ i(S, {
167
- question: e,
168
- value: a[e.questionId] ?? "",
169
- disabled: d,
170
- onChange: f,
171
- onPhoneChange: (e, t, n) => {
172
- f(e, t), p(e, n), _((t) => ({
173
- ...t,
174
- [e]: !0
175
- }));
176
- },
177
- onPhoneBlur: (e) => y((t) => ({
178
- ...t,
179
- [e]: !0
180
- })),
181
- phoneError: l,
182
- onEmailChange: (e, t, n) => {
183
- p(e, n), C((t) => ({
184
- ...t,
185
- [e]: !0
186
- }));
187
- },
188
- onEmailBlur: (e) => T((t) => ({
189
- ...t,
190
- [e]: !0
191
- })),
192
- emailError: u,
193
- onCpfChange: (e) => {
194
- D((t) => ({
195
- ...t,
196
- [e]: !0
197
- }));
198
- },
199
- onCpfBlur: (e) => k((t) => ({
200
- ...t,
201
- [e]: !0
202
- })),
203
- cpfError: m
204
- }, e.questionId);
205
- }), /* @__PURE__ */ i(l, {
206
- type: "submit",
207
- disabled: !u,
208
- isLoading: d,
209
- children: h("common.continue")
210
- })]
211
- })]
212
- });
213
- }, w = ({ config: n, manager: r, onFinish: o }) => {
214
- let { t: s } = e(), [c, l] = a(() => {
215
- if (r) return r;
216
- if (!n) throw Error("DynamicForms config is required");
217
- return b({ config: n });
218
- }, {
219
- manageLifecycle: !r,
220
- autoLoad: !0
221
- });
222
- if (t(() => {
223
- (c.status === "finished" || c.status === "closed") && o?.();
224
- }, [c.status, o]), c.status === "idle" || c.status === "loadingScreens") return /* @__PURE__ */ i(u, {
225
- status: "submitting",
226
- submittingTitle: s("common.loading"),
227
- hideFooterBranding: !0
228
- });
229
- if (c.status === "inputting" || c.status === "submitting") {
230
- let e = c.status === "submitting", t = c.status === "inputting" ? c.canSubmit : !1;
231
- return /* @__PURE__ */ i(C, {
232
- screen: c.currentScreen,
233
- answers: c.answers,
234
- answerValidity: c.answerValidity,
235
- canSubmit: t,
236
- isSubmitting: e,
237
- onAnswerChange: (e, t) => l.setAnswer(e, t),
238
- onAnswerValidityChange: (e, t) => l.setAnswerValidity(e, t),
239
- onSubmit: () => l.submit()
240
- });
241
- }
242
- if (c.status === "success") return /* @__PURE__ */ i(u, {
243
- status: "success",
244
- successTitle: s("dynamicForms.success"),
245
- hideFooterBranding: !0
246
- });
247
- if (c.status === "misconfigured") return /* @__PURE__ */ i(u, {
248
- status: "failure",
249
- failureTitle: s("dynamicForms.misconfigured"),
250
- onSkip: () => l.close(),
251
- skipLabel: s("common.close"),
252
- hideFooterBranding: !0
253
- });
254
- if (c.status === "finished" || c.status === "closed") return null;
255
- }, T = ({ config: e, manager: t, onFinish: n }) => /* @__PURE__ */ i(o, { children: e || t ? /* @__PURE__ */ i(w, {
256
- config: e,
257
- manager: t,
258
- onFinish: n
259
- }) : null });
260
- _(T, "incode-dynamic-forms");
261
- //#endregion
262
- export { T as DynamicForms };
@@ -1,2 +0,0 @@
1
- import { t as e } from "../ekybModule-BSs7mndb.js";
2
- export { e as EkybModule };