@incodetech/web 0.0.0-dev-20260714-84eb7a5b → 0.0.0-dev-20260715-b208c5e1

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.
@@ -1,2 +1,2 @@
1
- import { t as EkybModule } from "../ekybModule-DETayLNn.js";
1
+ import { t as EkybModule } from "../ekybModule-CSVRfnNR.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
- }
@@ -71,9 +71,18 @@ var FieldInput = ({ field, value, error, errorParams, country: _country, labelHi
71
71
  //#region src/modules/ekyb/uboInputs.tsx
72
72
  var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onBlur, onAdd, onRemove }) => {
73
73
  const { t } = useTranslation();
74
+ const containerRef = A(null);
75
+ const addButtonRef = A(null);
76
+ const pendingFocusRef = A();
74
77
  const translateError$2 = (err) => translateError(t, err?.key, err?.params);
78
+ y(() => {
79
+ if (pendingFocusRef.current === "added-name") containerRef.current?.querySelector(`#ubo-${ubos.length - 1}-name`)?.focus();
80
+ else if (pendingFocusRef.current === "add-button") addButtonRef.current?.focus();
81
+ pendingFocusRef.current = void 0;
82
+ }, [ubos.length]);
75
83
  if (ubos.length === 0) return null;
76
84
  return /* @__PURE__ */ u("div", {
85
+ ref: containerRef,
77
86
  className: "IncodeEkybUbos",
78
87
  children: [ubos.map((ubo, index) => {
79
88
  const nameLabel = index === 0 ? t("ekyb.uboName") : t("ekyb.uboNameWithNumber", { number: index + 1 });
@@ -108,18 +117,29 @@ var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onB
108
117
  onBlur: onBlur ? () => onBlur(`ubo-${index}-surname`) : void 0,
109
118
  "data-testid": `ekyb-ubo-${index}-surname`
110
119
  }),
111
- !isFirst && /* @__PURE__ */ u("button", {
112
- className: "IncodeEkybRemoveUbo",
113
- onClick: () => onRemove(index),
120
+ !isFirst && /* @__PURE__ */ u(Button, {
121
+ class: "IncodeEkybRemoveUbo",
122
+ variant: "link",
123
+ size: "S",
124
+ onClick: () => {
125
+ pendingFocusRef.current = "add-button";
126
+ onRemove(index);
127
+ },
114
128
  type: "button",
115
129
  "aria-label": `${t("common.remove")} UBO ${index + 1}`,
116
130
  children: t("common.remove")
117
131
  })
118
132
  ]
119
133
  }, ubo.id);
120
- }), canAddUbo && /* @__PURE__ */ u("button", {
121
- className: "IncodeEkybAddUbo",
122
- onClick: onAdd,
134
+ }), canAddUbo && /* @__PURE__ */ u(Button, {
135
+ ref: addButtonRef,
136
+ class: "IncodeEkybAddUbo",
137
+ variant: "link",
138
+ size: "S",
139
+ onClick: () => {
140
+ pendingFocusRef.current = "added-name";
141
+ onAdd();
142
+ },
123
143
  type: "button",
124
144
  "data-testid": "ekyb-add-ubo",
125
145
  children: t("ekyb.addAnotherUbo")
@@ -128,9 +148,13 @@ var UboInputs = ({ ubos, validationErrors, canAddUbo, labelHint, onSetField, onB
128
148
  };
129
149
  //#endregion
130
150
  //#region src/modules/ekyb/ekybModule.tsx
131
- var EkybContent = ({ config, onFinish }) => {
151
+ var EkybContent = ({ config, manager: externalManager, onFinish }) => {
132
152
  const { t } = useTranslation();
133
- const [state, manager] = useManager(() => createEkybManager({ config }));
153
+ const [state, manager] = useManager(() => {
154
+ if (externalManager) return externalManager;
155
+ if (!config) throw new Error("Ekyb config is required when no manager is provided");
156
+ return createEkybManager({ config });
157
+ }, { manageLifecycle: !externalManager });
134
158
  useModuleTerminalCallbacks({
135
159
  status: state.status === "closed" ? "finished" : state.status,
136
160
  onFinish
@@ -268,9 +292,10 @@ var EkybForm = ({ state, manager }) => {
268
292
  })]
269
293
  });
270
294
  };
271
- var EkybModule = ({ config, onFinish }) => {
272
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(EkybContent, {
295
+ var EkybModule = ({ config, manager, onFinish }) => {
296
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(EkybContent, {
273
297
  config,
298
+ manager,
274
299
  onFinish
275
300
  }) : null });
276
301
  };
@@ -0,0 +1,2 @@
1
+ import { t as EkybModule } from "./ekybModule-CSVRfnNR.js";
2
+ export { EkybModule };
@@ -5,8 +5,7 @@ import { u as useManager } from "../hooks-CNu7o-v8.js";
5
5
  import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
6
6
  import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
7
7
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
8
- import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as TerminalErrorPage } from "../useModuleLoader-DtWjpKDk.js";
9
- import { getDeviceClass } from "@incodetech/core/device";
8
+ import { _ as warmupWasmIfNeeded, a as resolveApiKey, b as TerminalErrorPage, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as isDesktopOrEmulated } from "../useModuleLoader-lVZdN1m0.js";
10
9
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
11
10
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
12
11
  //#region src/shared/processing/useDelayedFlag.ts
@@ -160,7 +159,7 @@ function maybePreloadHomeScreen(flowManager) {
160
159
  if (flowManager.getState().presentation.shouldPrefetchHome) preloadHomeScreen();
161
160
  }
162
161
  function maybePreloadRedirectToMobile() {
163
- if (getDeviceClass() === "desktop") preloadRedirectToMobile();
162
+ if (isDesktopOrEmulated()) preloadRedirectToMobile();
164
163
  }
165
164
  function useFlowInitialization(options) {
166
165
  const { lang, disableDashboardTheme, enableHome, onError, useCPF } = options;
@@ -7921,27 +7921,16 @@
7921
7921
  }
7922
7922
 
7923
7923
  .IncodeEkybPage .IncodeEkybRemoveUbo {
7924
- cursor: pointer;
7925
- border-style: var(--tw-border-style);
7926
- border-width: var(--border-width-none, var(--primitive-border-width-0));
7927
- --tw-border-style: none;
7928
- padding: var(--spacing-0, var(--spacing-none, 0px));
7929
7924
  font-family: var(--typography-body-family);
7930
7925
  font-size: var(--typography-body-s-regular-size);
7931
7926
  font-weight: var(--typography-body-s-regular-weight);
7932
7927
  line-height: var(--typography-body-s-regular-line-height);
7933
7928
  letter-spacing: var(--typography-body-s-regular-letter-spacing);
7934
7929
  color: var(--color-text-status-negative, var(--text-status-negative));
7935
- background-color: #0000;
7936
- border-style: none;
7930
+ text-decoration-line: none;
7937
7931
  }
7938
7932
 
7939
7933
  .IncodeEkybPage .IncodeEkybAddUbo {
7940
- cursor: pointer;
7941
- border-style: var(--tw-border-style);
7942
- border-width: var(--border-width-none, var(--primitive-border-width-0));
7943
- --tw-border-style: none;
7944
- padding-block: var(--spacing-8, var(--spacing-8, 8px));
7945
7934
  text-align: center;
7946
7935
  font-family: var(--typography-button-family);
7947
7936
  font-size: var(--typography-button-m-underlined-size);
@@ -7951,8 +7940,6 @@
7951
7940
  -webkit-text-decoration-skip-ink: none;
7952
7941
  text-decoration-skip-ink: none;
7953
7942
  color: var(--color-button-primary-surface-default, var(--button-primary-surface-default));
7954
- background-color: #0000;
7955
- border-style: none;
7956
7943
  text-decoration-line: underline;
7957
7944
  text-decoration-style: solid;
7958
7945
  text-decoration-thickness: auto;
@@ -1,9 +1,10 @@
1
1
  import { EkybConfig } from '@incodetech/core/ekyb';
2
+ import { EkybManager } from '@incodetech/core/ekyb';
2
3
  import { FC } from 'preact/compat';
3
4
 
4
5
  export declare const EkybModule: FC<EkybModuleProps>;
5
6
 
6
- declare type EkybModuleProps = IncodeModuleProps<EkybConfig>;
7
+ declare type EkybModuleProps = IncodeModuleProps<EkybConfig, void, EkybManager>;
7
8
 
8
9
  /**
9
10
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -5,7 +5,7 @@ import { t as Page } from "./page-DidH_RkX.js";
5
5
  import { t as Button } from "./button-Dz6AsbmF.js";
6
6
  import { t as ErrorIcon } from "./errorIcon-BA4T6iy-.js";
7
7
  import { initializeWasmUtil, resolveWasmConfig, setWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
8
- import { getDeviceClass } from "@incodetech/core/device";
8
+ import { isDesktopOrEmulated } from "@incodetech/core/device";
9
9
  import { createOrchestratedFlowManager, getFlow, getRequiredWasmPipelines } from "@incodetech/core/flow";
10
10
  import { getFinishStatus, initializeSession } from "@incodetech/core/session";
11
11
  import { api } from "@incodetech/core/http";
@@ -74,6 +74,11 @@ var TerminalErrorPage = ({ message, onRetry }) => {
74
74
  });
75
75
  };
76
76
  //#endregion
77
+ //#region src/shared/device/redirectDeviceClassification.ts
78
+ function isDesktopOrEmulated$1() {
79
+ return isDesktopOrEmulated();
80
+ }
81
+ //#endregion
77
82
  //#region src/styles/generatePalette.ts
78
83
  function hexToHsl(hex) {
79
84
  let normalizedHex = hex.replace("#", "");
@@ -296,7 +301,7 @@ var LAZY_UI_MODULES = {
296
301
  INE_VALIDATION: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
297
302
  GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((m) => m.Geolocation),
298
303
  EXTERNAL_VERIFICATION: () => import("./ekycModule-BVaeu3_l.js").then((m) => m.EkycModule),
299
- EKYB: () => import("./ekybModule-BtaABaHv.js").then((m) => m.EkybModule),
304
+ EKYB: () => import("./ekybModule-DXoUU86h.js").then((m) => m.EkybModule),
300
305
  DOCUMENT_CAPTURE: () => import("./documentCapture-l1DB8Zag.js").then((m) => m.DocumentCapture),
301
306
  ADDRESS: () => import("./documentCapture-l1DB8Zag.js").then((m) => m.DocumentCapture),
302
307
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((m) => m.Consent),
@@ -349,7 +354,7 @@ function preloadRedirectToMobile() {
349
354
  }
350
355
  function createFlowManager(options = {}) {
351
356
  const scopedLazyModules = {};
352
- const isDesktop = options.isDesktop ?? getDeviceClass() === "desktop";
357
+ const isDesktop = options.isDesktop ?? isDesktopOrEmulated$1();
353
358
  const { enableHome, ...flowFetchOptions } = options;
354
359
  let endScreen = {
355
360
  endScreenTitle: null,
@@ -673,4 +678,4 @@ function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLo
673
678
  ]);
674
679
  }
675
680
  //#endregion
676
- export { warmupWasmIfNeeded as _, resolveApiKey as a, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, fetchAndApplyTheme as v, TerminalErrorPage as y };
681
+ export { warmupWasmIfNeeded as _, resolveApiKey as a, TerminalErrorPage as b, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, setupSDK as g, preloadRedirectToMobile as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadHomeScreen as m, useModulePreloader as n, extractIncodeStatus as o, preloadFirstModule as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, fetchAndApplyTheme as v, isDesktopOrEmulated$1 as y };
@@ -6557,27 +6557,16 @@
6557
6557
  }
6558
6558
 
6559
6559
  .IncodeEkybPage .IncodeEkybRemoveUbo {
6560
- cursor: pointer;
6561
- border-style: var(--tw-border-style);
6562
- border-width: var(--border-width-none, var(--primitive-border-width-0));
6563
- --tw-border-style: none;
6564
- padding: var(--spacing-0, var(--spacing-none, 0px));
6565
6560
  font-family: var(--typography-body-family);
6566
6561
  font-size: var(--typography-body-s-regular-size);
6567
6562
  font-weight: var(--typography-body-s-regular-weight);
6568
6563
  line-height: var(--typography-body-s-regular-line-height);
6569
6564
  letter-spacing: var(--typography-body-s-regular-letter-spacing);
6570
6565
  color: var(--color-text-status-negative, var(--text-status-negative));
6571
- background-color: #0000;
6572
- border-style: none;
6566
+ text-decoration-line: none;
6573
6567
  }
6574
6568
 
6575
6569
  .IncodeEkybPage .IncodeEkybAddUbo {
6576
- cursor: pointer;
6577
- border-style: var(--tw-border-style);
6578
- border-width: var(--border-width-none, var(--primitive-border-width-0));
6579
- --tw-border-style: none;
6580
- padding-block: var(--spacing-8, var(--spacing-8, 8px));
6581
6570
  text-align: center;
6582
6571
  font-family: var(--typography-button-family);
6583
6572
  font-size: var(--typography-button-m-underlined-size);
@@ -6587,8 +6576,6 @@
6587
6576
  -webkit-text-decoration-skip-ink: none;
6588
6577
  text-decoration-skip-ink: none;
6589
6578
  color: var(--color-button-primary-surface-default, var(--button-primary-surface-default));
6590
- background-color: #0000;
6591
- border-style: none;
6592
6579
  text-decoration-line: underline;
6593
6580
  text-decoration-style: solid;
6594
6581
  text-decoration-thickness: auto;
@@ -7,9 +7,8 @@ import { t as Page } from "../page-DidH_RkX.js";
7
7
  import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
8
8
  import { t as AutoFocusTitle } from "../autoFocusTitle-uXtAKBTO.js";
9
9
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
10
- import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as TerminalErrorPage } from "../useModuleLoader-DtWjpKDk.js";
10
+ import { a as resolveApiKey, b as TerminalErrorPage, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as fetchAndApplyTheme, y as isDesktopOrEmulated } from "../useModuleLoader-lVZdN1m0.js";
11
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
- import { getDeviceClass } from "@incodetech/core/device";
13
12
  import { classifyScoreStatus } from "@incodetech/core/flow";
14
13
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
15
14
  import { createWorkflowManager } from "@incodetech/core/workflow";
@@ -149,7 +148,7 @@ function createWorkflowUIManager(options = {}) {
149
148
  return createWorkflowManager({
150
149
  customModuleCallback: options.customModuleCallback,
151
150
  interviewId: options.interviewId,
152
- isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
151
+ isDesktop: options.isDesktop ?? isDesktopOrEmulated()
153
152
  });
154
153
  }
155
154
  function warmupWorkflowWasm(wasmConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260714-84eb7a5b",
3
+ "version": "0.0.0-dev-20260715-b208c5e1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -291,7 +291,7 @@
291
291
  "qrcode": "^1.5.4",
292
292
  "signature_pad": "^5.1.3",
293
293
  "tailwindcss": "^4.1.17",
294
- "@incodetech/core": "0.0.0-dev-20260714-84eb7a5b"
294
+ "@incodetech/core": "0.0.0-dev-20260715-b208c5e1"
295
295
  },
296
296
  "devDependencies": {
297
297
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,2 +0,0 @@
1
- import { t as EkybModule } from "./ekybModule-DETayLNn.js";
2
- export { EkybModule };