@incodetech/web 0.0.0-dev-20260803-e2b5d35d → 0.0.0-dev-20260803-bc311d6e

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,19 +1,20 @@
1
1
  import { v as u } from "../vendor-preact-mvwZ8mJj.js";
2
2
  import { r as withStandaloneModuleBootstrap } from "../incodeComponent-OSkicUIt.js";
3
- import { n as ElectronicSignature } from "../electronic-signature-C-u0f9Au.js";
3
+ import { n as ElectronicSignature } from "../electronic-signature-DScluk9B.js";
4
4
  import { t as registerIncodeModuleElement } from "../incodeModule-BE4EvBi8.js";
5
5
  //#region src/modules/ae-signature/ae-signature.tsx
6
- var AeSignatureWithLocalConfig = ({ config, onFinish, onError }) => {
6
+ var AeSignatureWithLocalConfig = ({ config, manager, onFinish, onError }) => {
7
7
  return /* @__PURE__ */ u(ElectronicSignature, {
8
8
  config: config ? {
9
9
  ...config,
10
10
  variant: "ae"
11
11
  } : void 0,
12
+ manager,
12
13
  onFinish,
13
14
  onError
14
15
  });
15
16
  };
16
- var AeSignature = withStandaloneModuleBootstrap(AeSignatureWithLocalConfig, "AE_SIGNATURE");
17
+ var AeSignature = withStandaloneModuleBootstrap(AeSignatureWithLocalConfig, "AE_SIGNATURE", { supportsExternalManager: true });
17
18
  registerIncodeModuleElement(AeSignature, "incode-ae-signature");
18
19
  //#endregion
19
20
  export { AeSignature };
@@ -248,7 +248,7 @@
248
248
  }
249
249
 
250
250
  .IncodeElectronicSignature .IncodeElectronicSignatureConsents a {
251
- color: var(--color-text-link-default, var(--text-link-default));
251
+ color: var(--color-text-body-primary, var(--text-body-800-primary));
252
252
  text-decoration-line: underline;
253
253
  }
254
254
 
@@ -1,2 +1,2 @@
1
- import { n as ElectronicSignature, t as AeSignature } from "../electronic-signature-C-u0f9Au.js";
1
+ import { n as ElectronicSignature, t as AeSignature } from "../electronic-signature-DScluk9B.js";
2
2
  export { AeSignature, ElectronicSignature };
@@ -201,13 +201,14 @@ function getVariantCopy(variant, t) {
201
201
  }
202
202
  //#endregion
203
203
  //#region src/modules/electronic-signature/electronic-signature.tsx
204
- var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
204
+ var ElectronicSignatureContent = ({ config, manager: externalManager, onFinish, onError }) => {
205
205
  const { t } = useTranslation();
206
- const [state, manager] = useManager(() => createElectronicSignatureManager({ config }));
206
+ const [state, manager] = useManager(() => {
207
+ if (externalManager) return externalManager;
208
+ if (!config) throw new Error("ElectronicSignature config is required when no manager is provided");
209
+ return createElectronicSignatureManager({ config });
210
+ }, { manageLifecycle: !externalManager });
207
211
  const fileInputRef = A(null);
208
- y(() => {
209
- manager.load();
210
- }, [manager]);
211
212
  useModuleTerminalCallbacks({
212
213
  status: state.status,
213
214
  onFinish,
@@ -255,6 +256,7 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
255
256
  className: "IncodeElectronicSignatureFooter",
256
257
  children: /* @__PURE__ */ u(Button, {
257
258
  onClick: triggerFileInput,
259
+ "data-testid": "electronic-signature-add-document",
258
260
  children: t("aes.confirmSignature.addDocument")
259
261
  })
260
262
  })]
@@ -281,12 +283,14 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
281
283
  className: "IncodeElectronicSignatureFooter",
282
284
  children: [/* @__PURE__ */ u(Button, {
283
285
  onClick: () => manager.finish(),
286
+ "data-testid": "electronic-signature-success-continue",
284
287
  children: t("common.continue")
285
288
  }), state.signedDocuments.filter((doc) => !!doc.signedDocumentUrl).map((doc, i) => /* @__PURE__ */ u("a", {
286
289
  href: doc.signedDocumentUrl,
287
290
  target: "_blank",
288
291
  rel: "noopener noreferrer",
289
292
  className: "IncodeElectronicSignatureDownloadLink",
293
+ "data-testid": `electronic-signature-download-document-${i}`,
290
294
  children: t("aes.confirmSignature.downloadDocument")
291
295
  }, i))]
292
296
  })]
@@ -321,7 +325,8 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
321
325
  class: "IncodeElectronicSignatureBackButton",
322
326
  icon: /* @__PURE__ */ u(ChevronLeftIcon, { variant: "m" }),
323
327
  onClick: () => manager.closeDocumentView(),
324
- "aria-label": t("common.back")
328
+ "aria-label": t("common.back"),
329
+ "data-testid": "electronic-signature-document-back"
325
330
  })
326
331
  }),
327
332
  /* @__PURE__ */ u(PdfViewer, {
@@ -331,7 +336,7 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
331
336
  "aria-label": t("aes.confirmSignature.contract")
332
337
  })
333
338
  ]
334
- });
339
+ }, "document-view");
335
340
  const variant = state.variant;
336
341
  const consentItems = getConsentItems(variant, t);
337
342
  const copy = getVariantCopy(variant, t);
@@ -357,6 +362,7 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
357
362
  size: "S",
358
363
  class: "IncodeElectronicSignatureDocRowAction",
359
364
  onClick: () => manager.viewDocument(doc.documentUrl),
365
+ "data-testid": `electronic-signature-view-document-${i}`,
360
366
  children: t("aes.confirmSignature.viewDocument")
361
367
  })]
362
368
  }, doc.documentRef))
@@ -378,11 +384,12 @@ var ElectronicSignatureContent = ({ config, onFinish, onError }) => {
378
384
  children: /* @__PURE__ */ u(Button, {
379
385
  onClick: () => manager.sign(),
380
386
  disabled: !state.allConsented,
387
+ "data-testid": "electronic-signature-sign",
381
388
  children: copy.signButtonLabel
382
389
  })
383
390
  })]
384
391
  })]
385
- });
392
+ }, "signing");
386
393
  }
387
394
  return null;
388
395
  };
@@ -416,18 +423,21 @@ var ReviewScreen = ({ state, manager, t }) => {
416
423
  className: "IncodeElectronicSignatureFooter",
417
424
  children: [/* @__PURE__ */ u(Button, {
418
425
  onClick: () => manager.confirmFile(),
426
+ "data-testid": "electronic-signature-review-continue",
419
427
  children: t("common.continue")
420
428
  }), /* @__PURE__ */ u(Button, {
421
429
  variant: "secondary",
422
430
  onClick: () => manager.replaceFile(),
431
+ "data-testid": "electronic-signature-review-replace",
423
432
  children: t("aes.reviewDocument.replace")
424
433
  })]
425
434
  })]
426
435
  });
427
436
  };
428
- var ElectronicSignature = ({ config, onFinish, onError }) => {
429
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(ElectronicSignatureContent, {
437
+ var ElectronicSignature = ({ config, manager, onFinish, onError }) => {
438
+ return /* @__PURE__ */ u(IncodeComponent, { children: config || manager ? /* @__PURE__ */ u(ElectronicSignatureContent, {
430
439
  config,
440
+ manager,
431
441
  onFinish,
432
442
  onError
433
443
  }) : null });
@@ -1,2 +1,2 @@
1
- import { t as FaceMatch } from "../faceMatch-DkaXGu8c.js";
1
+ import { t as FaceMatch } from "../faceMatch-DY6NdxJF.js";
2
2
  export { FaceMatch };
@@ -0,0 +1,2 @@
1
+ import { t as FaceMatch } from "./faceMatch-DY6NdxJF.js";
2
+ export { FaceMatch };
@@ -187,6 +187,7 @@ var MatchResultDisplay = ({ matched, titleRef }) => {
187
187
  return /* @__PURE__ */ u(k, { children: [/* @__PURE__ */ u("div", {
188
188
  className: "IncodeFaceMatchAnimatedIcon",
189
189
  "aria-hidden": "true",
190
+ "data-testid": "face-match-result-icon",
190
191
  children: matched === true ? /* @__PURE__ */ u(Asset, {
191
192
  name: "faceMatch.success",
192
193
  class: "IncodeFaceMatchResultIcon",
@@ -261,6 +262,7 @@ var FaceMatchContent = ({ config, manager: externalManager, onFinish, onError })
261
262
  children: [/* @__PURE__ */ u("div", {
262
263
  className: `IncodeFaceMatchPhotoWrapper ${showResult ? "IncodeFaceMatchPhotoWrapperHidden" : ""}`,
263
264
  "aria-hidden": "true",
265
+ "data-testid": "face-match-photo-wrapper",
264
266
  children: /* @__PURE__ */ u(PhotoAnimation, {
265
267
  images: state.images,
266
268
  variant: isSecondId ? "secondId" : "selfieVsId"
@@ -275,6 +277,8 @@ var FaceMatchContent = ({ config, manager: externalManager, onFinish, onError })
275
277
  }),
276
278
  showResult && liveness !== null && /* @__PURE__ */ u("div", {
277
279
  className: "IncodeFaceMatchLivenessContainer IncodeFaceMatchLivenessVisible",
280
+ "data-testid": "face-match-liveness",
281
+ "data-variant": liveness ? "positive" : "negative",
278
282
  children: /* @__PURE__ */ u(Snackbar, {
279
283
  variant: liveness ? "positive" : "negative",
280
284
  children: t(liveness ? "matchUser.livenessSuccess" : "matchUser.livenessFailed")
@@ -4,7 +4,7 @@ import { a as TerminalErrorPage, i as ResolvedConfigProvider, l as TransitionSpi
4
4
  import { n as ErrorIcon } from "../incode-logo-DfmsgFwc.js";
5
5
  import { t as StatusPage } from "../statusPage-CbYK3HZ1.js";
6
6
  import { t as registerIncodeModuleElement } from "../incodeModule-BE4EvBi8.js";
7
- 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, v as isDesktopOrEmulated } from "../useModuleLoader-DnsgA8LH.js";
7
+ 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, v as isDesktopOrEmulated } from "../useModuleLoader-Bgr82tPE.js";
8
8
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
9
9
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
10
10
  //#region src/shared/processing/useDelayedFlag.ts
@@ -9332,7 +9332,7 @@
9332
9332
  }
9333
9333
 
9334
9334
  .IncodeElectronicSignature .IncodeElectronicSignatureConsents a {
9335
- color: var(--color-text-link-default, var(--text-link-default));
9335
+ color: var(--color-text-body-primary, var(--text-body-800-primary));
9336
9336
  text-decoration-line: underline;
9337
9337
  }
9338
9338
 
@@ -1,19 +1,20 @@
1
1
  import { v as u } from "../vendor-preact-mvwZ8mJj.js";
2
2
  import { r as withStandaloneModuleBootstrap } from "../incodeComponent-OSkicUIt.js";
3
- import { n as ElectronicSignature } from "../electronic-signature-C-u0f9Au.js";
3
+ import { n as ElectronicSignature } from "../electronic-signature-DScluk9B.js";
4
4
  import { t as registerIncodeModuleElement } from "../incodeModule-BE4EvBi8.js";
5
5
  //#region src/modules/qe-signature/qe-signature.tsx
6
- var QeSignatureWithLocalConfig = ({ config, onFinish, onError }) => {
6
+ var QeSignatureWithLocalConfig = ({ config, manager, onFinish, onError }) => {
7
7
  return /* @__PURE__ */ u(ElectronicSignature, {
8
8
  config: config ? {
9
9
  ...config,
10
10
  variant: "qe"
11
11
  } : void 0,
12
+ manager,
12
13
  onFinish,
13
14
  onError
14
15
  });
15
16
  };
16
- var QeSignature = withStandaloneModuleBootstrap(QeSignatureWithLocalConfig, "QE_SIGNATURE");
17
+ var QeSignature = withStandaloneModuleBootstrap(QeSignatureWithLocalConfig, "QE_SIGNATURE", { supportsExternalManager: true });
17
18
  registerIncodeModuleElement(QeSignature, "incode-qe-signature");
18
19
  //#endregion
19
20
  export { QeSignature };
@@ -1,4 +1,5 @@
1
1
  import { AeSignatureConfig } from '@incodetech/core/ae-signature';
2
+ import { AeSignatureManager } from '@incodetech/core/ae-signature';
2
3
  import { DeepPartial } from '@incodetech/core/flow';
3
4
  import { FC } from 'preact/compat';
4
5
  import { FunctionComponent } from 'preact';
@@ -8,7 +9,7 @@ export declare const AeSignature: FC<Omit<AeSignatureModuleProps, "config"> & {
8
9
  config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
9
10
  }>;
10
11
 
11
- declare type AeSignatureModuleProps = IncodeModuleProps<AeSignatureConfig>;
12
+ declare type AeSignatureModuleProps = IncodeModuleProps<AeSignatureConfig, void, AeSignatureManager>;
12
13
 
13
14
  /**
14
15
  * Allowlisted keys for overridable Lottie animations
@@ -143,6 +144,8 @@ export { }
143
144
 
144
145
  declare global {
145
146
  interface HTMLElementTagNameMap {
146
- 'incode-ae-signature': HTMLElement & IncodeModuleProps<AeSignatureConfig>;
147
+ 'incode-ae-signature': HTMLElement & IncodeModuleProps<AeSignatureConfig,
148
+ void,
149
+ AeSignatureManager>;
147
150
  }
148
151
  }
@@ -1,4 +1,5 @@
1
1
  import { ElectronicSignatureConfig } from '@incodetech/core/electronic-signature';
2
+ import { ElectronicSignatureManager } from '@incodetech/core/electronic-signature';
2
3
  import { FC } from 'preact/compat';
3
4
  import { FunctionComponent } from 'preact';
4
5
  import { SVGProps } from 'preact/compat';
@@ -58,7 +59,7 @@ declare type ConfigWithOverrides<TConfig> = TConfig & InstanceOverrides;
58
59
 
59
60
  export declare const ElectronicSignature: FC<ElectronicSignatureModuleProps>;
60
61
 
61
- declare type ElectronicSignatureModuleProps = IncodeModuleProps<ElectronicSignatureConfig>;
62
+ declare type ElectronicSignatureModuleProps = IncodeModuleProps<ElectronicSignatureConfig, void, ElectronicSignatureManager>;
62
63
 
63
64
  /**
64
65
  * Extra context passed to `onFinish` alongside the result. Lets a host decide
@@ -143,6 +144,8 @@ export { }
143
144
 
144
145
  declare global {
145
146
  interface HTMLElementTagNameMap {
146
- 'incode-electronic-signature': HTMLElement & IncodeModuleProps<ElectronicSignatureConfig>;
147
+ 'incode-electronic-signature': HTMLElement & IncodeModuleProps<ElectronicSignatureConfig,
148
+ void,
149
+ ElectronicSignatureManager>;
147
150
  }
148
151
  }
@@ -2,6 +2,7 @@ import { DeepPartial } from '@incodetech/core/flow';
2
2
  import { FC } from 'preact/compat';
3
3
  import { FunctionComponent } from 'preact';
4
4
  import { QeSignatureConfig } from '@incodetech/core/qe-signature';
5
+ import { QeSignatureManager } from '@incodetech/core/qe-signature';
5
6
  import { SVGProps } from 'preact/compat';
6
7
 
7
8
  /**
@@ -134,7 +135,7 @@ export declare const QeSignature: FC<Omit<QeSignatureModuleProps, "config"> & {
134
135
  config?: (Omit<unknown, never> & DeepPartial<Pick<unknown, never>>) | undefined;
135
136
  }>;
136
137
 
137
- declare type QeSignatureModuleProps = IncodeModuleProps<QeSignatureConfig>;
138
+ declare type QeSignatureModuleProps = IncodeModuleProps<QeSignatureConfig, void, QeSignatureManager>;
138
139
 
139
140
  /** An SVG imported as a Preact component (the `?react` import shape). */
140
141
  declare type SvgComponent = FunctionComponent<SVGProps<SVGSVGElement>>;
@@ -143,6 +144,8 @@ export { }
143
144
 
144
145
  declare global {
145
146
  interface HTMLElementTagNameMap {
146
- 'incode-qe-signature': HTMLElement & IncodeModuleProps<QeSignatureConfig>;
147
+ 'incode-qe-signature': HTMLElement & IncodeModuleProps<QeSignatureConfig,
148
+ void,
149
+ QeSignatureManager>;
147
150
  }
148
151
  }
@@ -78,7 +78,7 @@ var LAZY_UI_MODULES = {
78
78
  ID_CAPTURE: lazyIdModule,
79
79
  TUTORIAL_ID: lazyIdModule,
80
80
  SECOND_ID: lazyIdModule,
81
- FACE_MATCH: () => import("./faceMatch-DGdKw2fY.js").then((m) => m.FaceMatch),
81
+ FACE_MATCH: () => import("./faceMatch-BclKEUp2.js").then((m) => m.FaceMatch),
82
82
  CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((m) => m.CurpValidation),
83
83
  GOVT_VALIDATION_PROVISIONING: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
84
84
  INE_VALIDATION: () => import("./government-validation/government-validation.es.js").then((m) => m.GovernmentValidation),
@@ -4,7 +4,7 @@ import { i as fetchAndApplyTheme } from "../dashboardTheme-CVliZSR-.js";
4
4
  import { a as TerminalErrorPage, i as ResolvedConfigProvider, l as TransitionSpinner, o as Page, t as IncodeComponent, y as useManager } from "../incodeComponent-OSkicUIt.js";
5
5
  import { t as AutoFocusTitle } from "../autoFocusTitle-CQTmpnAv.js";
6
6
  import { t as registerIncodeModuleElement } from "../incodeModule-BE4EvBi8.js";
7
- import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as isDesktopOrEmulated } from "../useModuleLoader-DnsgA8LH.js";
7
+ import { a as resolveApiKey, g as setupSDK, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, s as UnsupportedModule, t as useModuleLoader, v as isDesktopOrEmulated } from "../useModuleLoader-Bgr82tPE.js";
8
8
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
9
9
  import { classifyScoreStatus } from "@incodetech/core/flow";
10
10
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260803-e2b5d35d",
3
+ "version": "0.0.0-dev-20260803-bc311d6e",
4
4
  "license": "ISC",
5
5
  "repository": {
6
6
  "type": "git",
@@ -292,7 +292,7 @@
292
292
  "qrcode": "^1.5.4",
293
293
  "signature_pad": "^5.1.3",
294
294
  "tailwindcss": "^4.1.17",
295
- "@incodetech/core": "0.0.0-dev-20260803-e2b5d35d"
295
+ "@incodetech/core": "0.0.0-dev-20260803-bc311d6e"
296
296
  },
297
297
  "devDependencies": {
298
298
  "@microsoft/api-extractor": "^7.53.3",
@@ -308,9 +308,9 @@
308
308
  "@types/node": "^22.10.5",
309
309
  "@types/qrcode": "^1.5.6",
310
310
  "@vitejs/plugin-basic-ssl": "^2.3.0",
311
- "@vitest/browser": "4.1.4",
312
- "@vitest/browser-playwright": "4.1.4",
313
- "@vitest/coverage-v8": "4.1.4",
311
+ "@vitest/browser": "4.1.10",
312
+ "@vitest/browser-playwright": "4.1.10",
313
+ "@vitest/coverage-v8": "4.1.10",
314
314
  "axe-core": "4.11.1",
315
315
  "happy-dom": "^20.7.0",
316
316
  "playwright": "1.60.0",
@@ -325,7 +325,7 @@
325
325
  "vite": "^8.0.0",
326
326
  "vite-plugin-dts": "^4.5.4",
327
327
  "vite-plugin-svgr": "^5.2.0",
328
- "vitest": "4.1.4",
328
+ "vitest": "4.1.10",
329
329
  "@incodetech/config": "1.0.2"
330
330
  },
331
331
  "scripts": {
@@ -1,2 +0,0 @@
1
- import { t as FaceMatch } from "./faceMatch-DkaXGu8c.js";
2
- export { FaceMatch };