@incodetech/web 0.0.0-dev-20260619-079080ef → 0.0.0-dev-20260622-9bf8c7b6

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.
@@ -21,7 +21,7 @@ var ConsentContent = ({ config, manager: externalManager, onFinish, onError }) =
21
21
  if (!config) throw new Error("Consent config is required");
22
22
  return createConsentManager({ config: {
23
23
  ...config,
24
- language: i18n.language
24
+ language: config.language ?? i18n.language
25
25
  } });
26
26
  }, { manageLifecycle: !externalManager });
27
27
  const checkboxes = "checkboxes" in state ? state.checkboxes : void 0;
@@ -5,7 +5,7 @@ import { c as useManager } from "../hooks-Da_yP_Dr.js";
5
5
  import { t as IncodeComponent } from "../incodeComponent-Cmi1rlWs.js";
6
6
  import { t as TransitionSpinner } from "../transitionSpinner-4rPkt-KM.js";
7
7
  import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.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-C4-JpdMq.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-Kt78XfNR.js";
9
9
  import { getDeviceClass } from "@incodetech/core/device";
10
10
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
11
11
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
package/dist/id/id.es.js CHANGED
@@ -913,7 +913,7 @@ function preloadIdTutorialAssets() {
913
913
  }
914
914
  //#endregion
915
915
  //#region src/modules/id/id.tsx
916
- var MandatoryConsent = z(() => import("../mandatoryConsent-BBh32ghz.js").then((module) => ({ default: module.MandatoryConsent })));
916
+ var MandatoryConsent = z(() => import("../mandatoryConsent-DOQ0DKgM.js").then((module) => ({ default: module.MandatoryConsent })));
917
917
  var IdContent = ({ config, manager: externalManager, onFinish, onError }) => {
918
918
  usePreloadDisplayFont();
919
919
  const { t } = useTranslation();
@@ -21,7 +21,7 @@ var MandatoryConsentContent = ({ config, manager: externalManager, onFinish, onE
21
21
  if (!config) throw new Error("MandatoryConsent config is required when no manager is provided");
22
22
  return createMandatoryConsentManager({ config: {
23
23
  ...config,
24
- language: i18n.language
24
+ language: config.language ?? i18n.language
25
25
  } });
26
26
  }, { manageLifecycle: !externalManager });
27
27
  y(() => {
@@ -299,8 +299,8 @@ var LAZY_UI_MODULES = {
299
299
  DOCUMENT_CAPTURE: () => import("./documentCapture-3RHCHepT.js").then((m) => m.DocumentCapture),
300
300
  ADDRESS: () => import("./documentCapture-3RHCHepT.js").then((m) => m.DocumentCapture),
301
301
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((m) => m.Consent),
302
- MANDATORY_CONSENT: () => import("./mandatoryConsent-BBh32ghz.js").then((m) => m.MandatoryConsent),
303
- ML_CONSENT: () => import("./mandatoryConsent-BBh32ghz.js").then((m) => m.MandatoryConsent),
302
+ MANDATORY_CONSENT: () => import("./mandatoryConsent-DOQ0DKgM.js").then((m) => m.MandatoryConsent),
303
+ ML_CONSENT: () => import("./mandatoryConsent-DOQ0DKgM.js").then((m) => m.MandatoryConsent),
304
304
  SIGNATURE: () => import("./signature/signature.es.js").then((m) => m.Signature),
305
305
  ID_OCR: () => import("./idOcr-C4K2XVJr.js").then((m) => m.IdOcr),
306
306
  CPF_OCR: () => import("./cpfOcr-BJOYoITy.js").then((m) => m.CpfOcr),
@@ -2925,6 +2925,51 @@
2925
2925
  }
2926
2926
  }
2927
2927
 
2928
+ @media (min-width: 40rem) {
2929
+ .incode-container {
2930
+ max-width: 40rem;
2931
+ }
2932
+ }
2933
+
2934
+ @media (min-width: 48rem) {
2935
+ .incode-container {
2936
+ max-width: 48rem;
2937
+ }
2938
+ }
2939
+
2940
+ @media (min-width: 64rem) {
2941
+ .incode-container {
2942
+ max-width: 64rem;
2943
+ }
2944
+ }
2945
+
2946
+ @media (min-width: 80rem) {
2947
+ .incode-container {
2948
+ max-width: 80rem;
2949
+ }
2950
+ }
2951
+
2952
+ @media (min-width: 96rem) {
2953
+ .incode-container {
2954
+ max-width: 96rem;
2955
+ }
2956
+ }
2957
+
2958
+ @media (min-width: 48rem) {
2959
+ .incode-container {
2960
+ max-height: var(--incode-page-max-h);
2961
+ max-width: var(--incode-page-max-w);
2962
+ }
2963
+
2964
+ @media not all and (min-width: 80rem) {
2965
+ @media (orientation: landscape) {
2966
+ .incode-container {
2967
+ max-height: var(--incode-page-max-h-landscape);
2968
+ }
2969
+ }
2970
+ }
2971
+ }
2972
+
2928
2973
  .incode-container {
2929
2974
  width: 100%;
2930
2975
  }
@@ -3417,6 +3462,11 @@
3417
3462
  font-weight: var(--typography-button-m-underlined-weight);
3418
3463
  line-height: var(--typography-button-m-underlined-line-height);
3419
3464
  letter-spacing: var(--typography-button-m-underlined-letter-spacing);
3465
+ font-family: var(--typography-button-family);
3466
+ font-size: var(--typography-button-m-underlined-size);
3467
+ font-weight: var(--typography-button-m-underlined-weight);
3468
+ line-height: var(--typography-button-m-underlined-line-height);
3469
+ letter-spacing: var(--typography-button-m-underlined-letter-spacing);
3420
3470
  text-decoration-line: underline;
3421
3471
  text-decoration-style: solid;
3422
3472
  text-decoration-thickness: auto;
@@ -7279,6 +7329,53 @@
7279
7329
  margin-top: var(--spacing-8, var(--spacing-8, 8px));
7280
7330
  }
7281
7331
 
7332
+ .IncodeFinishScreenBySessionStatus .IncodePageContent {
7333
+ flex-direction: column;
7334
+ flex: 1;
7335
+ display: flex;
7336
+ }
7337
+
7338
+ .IncodeFinishScreenBySessionStatus .IncodeFinishScreenStatus {
7339
+ text-align: center;
7340
+ justify-content: center;
7341
+ align-items: center;
7342
+ gap: var(--spacing-16, var(--spacing-16, 16px));
7343
+ width: 100%;
7344
+ padding: var(--spacing-24, var(--spacing-24, 24px));
7345
+ flex-direction: column;
7346
+ flex: 1;
7347
+ display: flex;
7348
+ }
7349
+
7350
+ .IncodeFinishScreenBySessionStatus .IncodeFinishScreenTitleGroup {
7351
+ align-items: center;
7352
+ gap: var(--spacing-4, var(--spacing-4, 4px));
7353
+ flex-direction: column;
7354
+ display: flex;
7355
+ }
7356
+
7357
+ .IncodeFinishScreenBySessionStatus .IncodeFinishScreenTitle, .IncodeFinishScreenBySessionStatus .IncodeFinishScreenSubtitle {
7358
+ font-family: var(--typography-headline-family);
7359
+ font-size: var(--typography-headline-h2-size);
7360
+ font-weight: var(--typography-headline-h2-weight);
7361
+ line-height: var(--typography-headline-h2-line-height);
7362
+ letter-spacing: var(--typography-headline-h2-letter-spacing);
7363
+ color: var(--color-text-body-primary, var(--text-body-800-primary));
7364
+ --tw-outline-style: none;
7365
+ outline-style: none;
7366
+ }
7367
+
7368
+ .IncodeFinishScreenBySessionStatus .IncodeFinishScreenDescription {
7369
+ font-family: var(--typography-headline-family);
7370
+ font-size: var(--typography-headline-h5-size);
7371
+ font-weight: var(--typography-headline-h5-weight);
7372
+ line-height: var(--typography-headline-h5-line-height);
7373
+ letter-spacing: var(--typography-headline-h5-letter-spacing);
7374
+ color: var(--color-text-body-secondary, var(--text-body-500-secondary));
7375
+ overflow-wrap: break-word;
7376
+ max-width: var(--incode-form-max-w);
7377
+ }
7378
+
7282
7379
  .IncodeWorkflow {
7283
7380
  width: 100%;
7284
7381
  height: 100%;
@@ -3,13 +3,133 @@ import { _ as y, c as z, l as A, o as P, p as d, v as u } from "../vendor-preact
3
3
  import { t as setUiConfig } from "../uiConfig-D2_wawvr.js";
4
4
  import { c as useManager } from "../hooks-Da_yP_Dr.js";
5
5
  import { t as IncodeComponent } from "../incodeComponent-Cmi1rlWs.js";
6
+ import { t as Page } from "../page-DidH_RkX.js";
6
7
  import { t as TransitionSpinner } from "../transitionSpinner-4rPkt-KM.js";
8
+ import { t as AutoFocusTitle } from "../autoFocusTitle-CuRu2lPg.js";
7
9
  import { t as registerIncodeModuleElement } from "../incodeModule-M8DszCee.js";
8
- 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-C4-JpdMq.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-Kt78XfNR.js";
9
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
10
12
  import { getDeviceClass } from "@incodetech/core/device";
13
+ import { classifyScoreStatus, getTotalScoreStatus } from "@incodetech/core/flow";
11
14
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
12
15
  import { createWorkflowManager } from "@incodetech/core/workflow";
16
+ //#region src/modules/workflow/finishScreenStatusIcons.tsx
17
+ var FinishStatusSuccessIcon = () => /* @__PURE__ */ u("svg", {
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ width: "54",
20
+ height: "54",
21
+ viewBox: "0 0 54 54",
22
+ fill: "none",
23
+ class: "IncodeFinishStatusSuccessIcon",
24
+ "aria-hidden": "true",
25
+ focusable: "false",
26
+ children: [/* @__PURE__ */ u("path", {
27
+ d: "M27 53.25C41.4975 53.25 53.25 41.4975 53.25 27C53.25 12.5025 41.4975 0.75 27 0.75C12.5025 0.75 0.75 12.5025 0.75 27C0.75 41.4975 12.5025 53.25 27 53.25Z",
28
+ fill: "#0CD5A2"
29
+ }), /* @__PURE__ */ u("path", {
30
+ d: "M37.5 20L23.492 35.75L16.5 27.875",
31
+ stroke: "white",
32
+ "stroke-width": "4",
33
+ "stroke-linecap": "round",
34
+ "stroke-linejoin": "round"
35
+ })]
36
+ });
37
+ var FinishStatusReviewIcon = () => /* @__PURE__ */ u("svg", {
38
+ xmlns: "http://www.w3.org/2000/svg",
39
+ width: "56",
40
+ height: "54",
41
+ viewBox: "0 0 33 32",
42
+ fill: "none",
43
+ class: "IncodeFinishStatusReviewIcon",
44
+ "aria-hidden": "true",
45
+ focusable: "false",
46
+ children: /* @__PURE__ */ u("path", {
47
+ d: "M16.5 0C25.348 0 32.5 7.1696 32.5 16C32.5 24.8336 25.348 32 16.5 32C7.668 32 0.5 24.8336 0.5 16C0.5 7.1696 7.668 0 16.5 0ZM16.5 20.6896C15.732 20.6896 15.108 21.3136 15.108 22.0816C15.108 22.8496 15.732 23.4896 16.516 23.4896C17.284 23.4896 17.908 22.8496 17.908 22.0816C17.908 21.3136 17.284 20.6896 16.5 20.6896ZM16.5 8.528C15.732 8.528 15.092 9.1696 15.092 9.936V17.008C15.092 17.7776 15.732 18.4 16.5 18.4C17.268 18.4 17.892 17.7776 17.892 17.008V9.936C17.892 9.1696 17.268 8.528 16.5 8.528Z",
48
+ fill: "#FF9900"
49
+ })
50
+ });
51
+ var FinishStatusErrorIcon = () => /* @__PURE__ */ u("svg", {
52
+ xmlns: "http://www.w3.org/2000/svg",
53
+ width: "72",
54
+ height: "72",
55
+ viewBox: "0 0 72 72",
56
+ fill: "none",
57
+ class: "IncodeFinishStatusErrorIcon",
58
+ "aria-hidden": "true",
59
+ focusable: "false",
60
+ children: /* @__PURE__ */ u("path", {
61
+ "fill-rule": "evenodd",
62
+ "clip-rule": "evenodd",
63
+ d: "M44.598 44.592C44.16 45.03 43.584 45.252 43.008 45.252C42.429 45.252 41.856 45.03 41.415 44.592L35.997 39.171L30.594 44.574C29.715 45.453 28.29 45.453 27.411 44.574C26.535 43.695 26.535 42.273 27.411 41.394L32.814 35.991L27.408 30.582C26.529 29.703 26.529 28.281 27.408 27.402C28.287 26.523 29.709 26.523 30.588 27.402L35.994 32.808L41.4 27.405C42.279 26.526 43.701 26.526 44.58 27.405C45.459 28.281 45.459 29.706 44.58 30.585L39.177 35.991L44.598 41.409C45.477 42.288 45.477 43.713 44.598 44.592ZM36 7.5C20.286 7.5 7.5 20.283 7.5 36C7.5 51.714 20.286 64.5 36 64.5C51.714 64.5 64.5 51.714 64.5 36C64.5 20.283 51.714 7.5 36 7.5Z",
64
+ fill: "#FF0000"
65
+ })
66
+ });
67
+ //#endregion
68
+ //#region src/modules/workflow/finishScreenBySessionStatus.tsx
69
+ var VARIANT_CONTENT = {
70
+ success: {
71
+ Icon: FinishStatusSuccessIcon,
72
+ titleKey: "finishScreenBySessionStatus.success.title",
73
+ titleDefault: "Identity",
74
+ subtitleKey: "finishScreenBySessionStatus.success.subtitle",
75
+ subtitleDefault: "successfully verified"
76
+ },
77
+ error: {
78
+ Icon: FinishStatusErrorIcon,
79
+ titleKey: "finishScreenBySessionStatus.error.title",
80
+ titleDefault: "Unable to verify identity",
81
+ descriptionKey: "finishScreenBySessionStatus.error.description",
82
+ descriptionDefault: "We encountered an issue while processing your request. Please try again later."
83
+ },
84
+ review: {
85
+ Icon: FinishStatusReviewIcon,
86
+ titleKey: "finishScreenBySessionStatus.review.title",
87
+ titleDefault: "Verification under review",
88
+ descriptionKey: "finishScreenBySessionStatus.review.description",
89
+ descriptionDefault: "Your information did not match our records. Please contact IT support for assistance."
90
+ }
91
+ };
92
+ /** Status-specific workflow completion screen (success / error / review). */
93
+ var FinishScreenBySessionStatus = ({ scoreStatus, isDesktop }) => {
94
+ const { t } = useTranslation();
95
+ const [variant, setVariant] = d(() => classifyScoreStatus(scoreStatus));
96
+ y(() => {
97
+ if (!isDesktop) return;
98
+ const controller = new AbortController();
99
+ getTotalScoreStatus(controller.signal).then((total) => setVariant(classifyScoreStatus(total))).catch(() => {});
100
+ return () => controller.abort();
101
+ }, [isDesktop]);
102
+ const content = VARIANT_CONTENT[variant];
103
+ const { Icon } = content;
104
+ return /* @__PURE__ */ u(Page, {
105
+ className: "IncodeFinishScreenBySessionStatus",
106
+ "data-testid": "finish-screen-by-session-status",
107
+ hideHeader: true,
108
+ hideFooterBranding: true,
109
+ children: /* @__PURE__ */ u("div", {
110
+ class: "IncodeFinishScreenStatus",
111
+ "data-variant": variant,
112
+ children: [
113
+ /* @__PURE__ */ u(Icon, {}),
114
+ /* @__PURE__ */ u("div", {
115
+ class: "IncodeFinishScreenTitleGroup",
116
+ children: [/* @__PURE__ */ u(AutoFocusTitle, {
117
+ className: "IncodeFinishScreenTitle",
118
+ children: t(content.titleKey, { defaultValue: content.titleDefault })
119
+ }, variant), content.subtitleKey ? /* @__PURE__ */ u("p", {
120
+ class: "IncodeFinishScreenSubtitle",
121
+ children: t(content.subtitleKey, { defaultValue: content.subtitleDefault })
122
+ }) : null]
123
+ }),
124
+ content.descriptionKey ? /* @__PURE__ */ u("p", {
125
+ class: "IncodeFinishScreenDescription",
126
+ children: t(content.descriptionKey, { defaultValue: content.descriptionDefault })
127
+ }) : null
128
+ ]
129
+ })
130
+ });
131
+ };
132
+ //#endregion
13
133
  //#region src/modules/workflow/workflowInit.ts
14
134
  var LAZY_WORKFLOW_MODULES = {
15
135
  ...LAZY_UI_MODULES,
@@ -260,7 +380,17 @@ var IncodeWorkflowReady = ({ config, workflowManager: initialManager, onFinish,
260
380
  class: "IncodeWorkflow",
261
381
  children: /* @__PURE__ */ u(TerminalErrorPage, { message: workflowState.error })
262
382
  });
263
- if (workflowState.status === "finished" || workflowState.status === "asyncResolution" || workflowState.status === "closed") return null;
383
+ if (workflowState.status === "finished") {
384
+ if (workflowState.workflowConfig.showFinishScreenBySessionStatus) return /* @__PURE__ */ u("div", {
385
+ class: "IncodeWorkflow",
386
+ children: /* @__PURE__ */ u(FinishScreenBySessionStatus, {
387
+ scoreStatus: workflowState.finishStatus.scoreStatus,
388
+ isDesktop: config.isDesktop
389
+ })
390
+ });
391
+ return null;
392
+ }
393
+ if (workflowState.status === "asyncResolution" || workflowState.status === "closed") return null;
264
394
  if (moduleLoaderState.status === "unsupported") return /* @__PURE__ */ u("div", {
265
395
  class: "IncodeWorkflow",
266
396
  children: /* @__PURE__ */ u(UnsupportedModule, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260619-079080ef",
3
+ "version": "0.0.0-dev-20260622-9bf8c7b6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -264,7 +264,7 @@
264
264
  "qrcode": "^1.5.4",
265
265
  "signature_pad": "^5.1.3",
266
266
  "tailwindcss": "^4.1.17",
267
- "@incodetech/core": "0.0.0-dev-20260619-079080ef"
267
+ "@incodetech/core": "0.0.0-dev-20260622-9bf8c7b6"
268
268
  },
269
269
  "devDependencies": {
270
270
  "@microsoft/api-extractor": "^7.53.3",