@incodetech/web 2.1.0-rc.4 → 2.1.0-rc.5

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.
@@ -5,7 +5,8 @@ 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 { a as resolveApiKey, b as TerminalErrorPage, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, g as preloadRedirectToMobile, h as preloadHomeScreen, l as LAZY_UI_MODULES, m as preloadFirstModule, n as useModulePreloader, o as extractIncodeStatus, p as isDesktopOrEmulated, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, v as warmupWasmIfNeeded } from "../useModuleLoader-Gvo9qscB.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-Bi26kJbg.js";
9
+ import { getDeviceClass } from "@incodetech/core/device";
9
10
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
10
11
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
11
12
  //#region src/shared/processing/useDelayedFlag.ts
@@ -159,7 +160,7 @@ function maybePreloadHomeScreen(flowManager) {
159
160
  if (flowManager.getState().presentation.shouldPrefetchHome) preloadHomeScreen();
160
161
  }
161
162
  function maybePreloadRedirectToMobile() {
162
- if (isDesktopOrEmulated()) preloadRedirectToMobile();
163
+ if (getDeviceClass() === "desktop") preloadRedirectToMobile();
163
164
  }
164
165
  function useFlowInitialization(options) {
165
166
  const { lang, disableDashboardTheme, enableHome, onError, useCPF } = options;
@@ -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, isBrowserSimulated } from "@incodetech/core/device";
8
+ import { getDeviceClass } 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";
@@ -347,22 +347,9 @@ function preloadRedirectToMobile() {
347
347
  redirectToMobilePreloadPromise = void 0;
348
348
  });
349
349
  }
350
- /**
351
- * Whether the current browser should be treated as a desktop for the
352
- * desktop-to-mobile redirect decision.
353
- *
354
- * A desktop browser emulating a phone (Chrome DevTools device toolbar) spoofs
355
- * the user agent, so `getDeviceClass()` alone would report mobile and skip the
356
- * dashboard-configured redirect. Treating a detected emulation as desktop keeps
357
- * the redirect from being bypassed that way. Shared by the flow + workflow init
358
- * paths so the "treat as desktop" rule lives in one place.
359
- */
360
- function isDesktopOrEmulated() {
361
- return getDeviceClass() === "desktop" || isBrowserSimulated();
362
- }
363
350
  function createFlowManager(options = {}) {
364
351
  const scopedLazyModules = {};
365
- const isDesktop = options.isDesktop ?? isDesktopOrEmulated();
352
+ const isDesktop = options.isDesktop ?? getDeviceClass() === "desktop";
366
353
  const { enableHome, ...flowFetchOptions } = options;
367
354
  let endScreen = {
368
355
  endScreenTitle: null,
@@ -686,4 +673,4 @@ function usePrefetchNextModule(steps, currentStepIndex, modules, currentModuleLo
686
673
  ]);
687
674
  }
688
675
  //#endregion
689
- export { setupSDK as _, resolveApiKey as a, TerminalErrorPage as b, HEADLESS_FLOW_MODULE_KEYS as c, fetchTheme as d, initializeFlowManager as f, preloadRedirectToMobile as g, preloadHomeScreen as h, HEADLESS_WORKFLOW_MODULE_KEYS as i, LAZY_UI_MODULES as l, preloadFirstModule as m, useModulePreloader as n, extractIncodeStatus as o, isDesktopOrEmulated as p, usePrefetchNextModule as r, UnsupportedModule as s, useModuleLoader as t, createFlowManager as u, warmupWasmIfNeeded as v, fetchAndApplyTheme as y };
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 };
@@ -7,8 +7,9 @@ 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-CuRu2lPg.js";
9
9
  import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
10
- import { _ as setupSDK, a as resolveApiKey, b as TerminalErrorPage, i as HEADLESS_WORKFLOW_MODULE_KEYS, l as LAZY_UI_MODULES, o as extractIncodeStatus, p as isDesktopOrEmulated, s as UnsupportedModule, t as useModuleLoader, y as fetchAndApplyTheme } from "../useModuleLoader-Gvo9qscB.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-Bi26kJbg.js";
11
11
  import { resolveWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
12
+ import { getDeviceClass } from "@incodetech/core/device";
12
13
  import { classifyScoreStatus } from "@incodetech/core/flow";
13
14
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
14
15
  import { createWorkflowManager } from "@incodetech/core/workflow";
@@ -148,7 +149,7 @@ function createWorkflowUIManager(options = {}) {
148
149
  return createWorkflowManager({
149
150
  customModuleCallback: options.customModuleCallback,
150
151
  interviewId: options.interviewId,
151
- isDesktop: options.isDesktop ?? isDesktopOrEmulated()
152
+ isDesktop: options.isDesktop ?? getDeviceClass() === "desktop"
152
153
  });
153
154
  }
154
155
  function warmupWorkflowWasm(wasmConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "2.1.0-rc.4",
3
+ "version": "2.1.0-rc.5",
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": "2.1.0-rc.4"
294
+ "@incodetech/core": "2.1.0-rc.5"
295
295
  },
296
296
  "devDependencies": {
297
297
  "@microsoft/api-extractor": "^7.53.3",