@incodetech/web 0.0.0-dev-20260928-f4ebf7f2 → 0.0.0-dev-20260928-53468dbb

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.
@@ -4,7 +4,7 @@ import { C as useManager, a as ResolvedConfigProvider, d as TransitionSpinner, s
4
4
  import { b as ErrorIcon } from "../icons-CDGhBUWm.js";
5
5
  import { t as StatusPage } from "../statusPage-DxV8gNNA.js";
6
6
  import { t as registerIncodeModuleElement } from "../incodeModule-B0YLDdFh.js";
7
- import { a as LAZY_UI_MODULES, c as initializeFlowManager, f as warmupWasmIfNeeded, i as HEADLESS_FLOW_MODULE_KEYS, l as preloadFirstModule, m as resolveSessionLanguage, n as extractIncodeStatus, o as createFlowManager, r as UnsupportedModule, s as fetchTheme, t as resolveApiKey, u as preloadHomeScreen } from "../resolveApiKey-CsLHn6a-.js";
7
+ import { a as LAZY_UI_MODULES, c as initializeFlowManager, f as warmupWasmIfNeeded, i as HEADLESS_FLOW_MODULE_KEYS, l as preloadFirstModule, m as resolveSessionLanguage, n as extractIncodeStatus, o as createFlowManager, r as UnsupportedModule, s as fetchTheme, t as resolveApiKey, u as preloadHomeScreen } from "../resolveApiKey-_dJODPZ3.js";
8
8
  import { i as usePrefetchNextModule, n as useModuleLoader, r as useModulePreloader } from "../useModuleLoader-DpcbSKBH.js";
9
9
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
10
10
  import { getNextRequiredWasmPipelines } from "@incodetech/core/flow";
@@ -303,6 +303,7 @@ function useFlowInitialization(options) {
303
303
  } else if (isSelfLoadingFlowConfig(options)) {
304
304
  const session = await createFlowSession(options, signal);
305
305
  resolvedToken = session.token;
306
+ state.flowManager.setInterviewId(session.interviewId);
306
307
  state.flowManager.setEndScreenTexts(session.endScreenTitle ?? null, session.endScreenText ?? null);
307
308
  } else throw new Error("Flow requires token, or configurationId with apiKey or clientId");
308
309
  const activation = initializeFlowManager({
@@ -546,6 +547,10 @@ var IncodeFlowInitialization = ({ config, onFinish, onError, stylesReady }) => {
546
547
  onError
547
548
  ]));
548
549
  const [flowState, flowManager] = useManager(() => initState.flowManager, { autoLoad: false });
550
+ y(() => {
551
+ if (!config.onFlowEvent) return;
552
+ return flowManager.subscribeFlowEvent(config.onFlowEvent);
553
+ }, [flowManager, config.onFlowEvent]);
549
554
  if (!stylesReady) return null;
550
555
  return /* @__PURE__ */ u(IncodeFlowContent, {
551
556
  config,
@@ -576,10 +581,6 @@ var IncodeFlowContent = ({ config, onFinish, onError, initState, flowState, flow
576
581
  const isAwaitingReadyDelayed = useDelayedFlag(flowState.presentation.isAwaitingReady === true, 150);
577
582
  const isModuleLoadingDelayed = useDelayedFlag(flowState.status === "ready" && (moduleLoaderState.status === "idle" || moduleLoaderState.status === "loading" || moduleLoaderState.status === "error"), 150);
578
583
  usePrefetchNextModule(flowState?.status === "ready" ? flowState.steps : [], flowState?.status === "ready" ? flowState.currentStepIndex : -1, LAZY_UI_MODULES, currentModuleLoaded);
579
- y(() => {
580
- if (!config.onFlowEvent) return;
581
- return flowManager.subscribeFlowEvent(config.onFlowEvent);
582
- }, [flowManager, config.onFlowEvent]);
583
584
  y(() => {
584
585
  if (flowState.presentation.shouldPrefetchHome) preloadHomeScreen();
585
586
  }, [flowState.presentation.shouldPrefetchHome]);
@@ -161,9 +161,11 @@ function createFlowManager(options = {}) {
161
161
  endScreenTitle: null,
162
162
  endScreenText: null
163
163
  };
164
+ let interviewId;
164
165
  const manager = createOrchestratedFlowManager({
165
166
  enableHome,
166
167
  deferActivation: true,
168
+ getInterviewId: () => interviewId,
167
169
  getFlow: async (signal) => {
168
170
  const flow = await getFlow(signal, {
169
171
  ...flowFetchOptions,
@@ -186,12 +188,17 @@ function createFlowManager(options = {}) {
186
188
  },
187
189
  lazyModules: scopedLazyModules
188
190
  });
189
- return Object.assign(manager, { setEndScreenTexts(endScreenTitle, endScreenText) {
190
- endScreen = {
191
- endScreenTitle,
192
- endScreenText
193
- };
194
- } });
191
+ return Object.assign(manager, {
192
+ setEndScreenTexts(endScreenTitle, endScreenText) {
193
+ endScreen = {
194
+ endScreenTitle,
195
+ endScreenText
196
+ };
197
+ },
198
+ setInterviewId(nextInterviewId) {
199
+ interviewId = nextInterviewId;
200
+ }
201
+ });
195
202
  }
196
203
  async function setupSDK(options) {
197
204
  const sessionOptions = { token: options.token };
@@ -4,7 +4,7 @@ import { i as fetchAndApplyTheme } from "../dashboardTheme-rukdGoXS.js";
4
4
  import { C as useManager, a as ResolvedConfigProvider, c as Page, d as TransitionSpinner, s as TerminalErrorPage, t as IncodeComponent, w as withSessionExpiry } from "../incodeComponent-CTUNJESK.js";
5
5
  import { t as AutoFocusTitle } from "../autoFocusTitle-BaMtI7u2.js";
6
6
  import { t as registerIncodeModuleElement } from "../incodeModule-B0YLDdFh.js";
7
- import { a as LAZY_UI_MODULES, d as setupSDK, m as resolveSessionLanguage, n as extractIncodeStatus, p as isDesktopOrEmulated, r as UnsupportedModule, t as resolveApiKey } from "../resolveApiKey-CsLHn6a-.js";
7
+ import { a as LAZY_UI_MODULES, d as setupSDK, m as resolveSessionLanguage, n as extractIncodeStatus, p as isDesktopOrEmulated, r as UnsupportedModule, t as resolveApiKey } from "../resolveApiKey-_dJODPZ3.js";
8
8
  import { a as HEADLESS_WORKFLOW_MODULE_KEYS, n as useModuleLoader } from "../useModuleLoader-DpcbSKBH.js";
9
9
  import { resolveWasmConfigForPipelines, setWasmConfig, upgradeToWasmHttpClient, warmupWasm } from "@incodetech/core/wasm";
10
10
  import { bootstrapSession, getFinishStatus, 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-20260928-f4ebf7f2",
3
+ "version": "0.0.0-dev-20260928-53468dbb",
4
4
  "license": "ISC",
5
5
  "repository": {
6
6
  "type": "git",
@@ -287,7 +287,7 @@
287
287
  ],
288
288
  "dependencies": {
289
289
  "preact": "^10.27.2",
290
- "@incodetech/core": "0.0.0-dev-20260928-f4ebf7f2"
290
+ "@incodetech/core": "0.0.0-dev-20260928-53468dbb"
291
291
  },
292
292
  "devDependencies": {
293
293
  "@fontsource/dm-sans": "^5.2.8",