@incodetech/web 0.0.0-dev-20260916-52844605 → 0.0.0-dev-20260916-b81d875b
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.
package/dist/types/workflow.d.ts
CHANGED
|
@@ -237,6 +237,8 @@ declare type TokenWorkflowRuntimeConfig = WorkflowBaseConfig & {
|
|
|
237
237
|
* initialization and surface via the SDK's terminal error screen.
|
|
238
238
|
*/
|
|
239
239
|
urlUuid?: string;
|
|
240
|
+
endScreenTitle?: string | null;
|
|
241
|
+
endScreenText?: string | null;
|
|
240
242
|
apiKey?: never;
|
|
241
243
|
clientId?: never;
|
|
242
244
|
configurationId?: never;
|
|
@@ -8,7 +8,7 @@ import { a as LAZY_UI_MODULES, d as setupSDK, m as resolveSessionLanguage, n as
|
|
|
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 { classifyScoreStatus } from "@incodetech/core/flow";
|
|
11
|
-
import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
|
|
11
|
+
import { bootstrapSession, getFinishStatus, refreshQrUrlUuid } from "@incodetech/core/session";
|
|
12
12
|
import { createWorkflowManager } from "@incodetech/core/workflow";
|
|
13
13
|
//#region src/modules/workflow/finishScreenStatusIcons.tsx
|
|
14
14
|
var FinishStatusSuccessIcon = () => /* @__PURE__ */ u("svg", {
|
|
@@ -149,11 +149,27 @@ async function fetchWorkflowTheme() {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
function createWorkflowUIManager(options = {}) {
|
|
152
|
-
|
|
152
|
+
let endScreen = {
|
|
153
|
+
endScreenTitle: null,
|
|
154
|
+
endScreenText: null
|
|
155
|
+
};
|
|
156
|
+
const manager = createWorkflowManager({
|
|
153
157
|
customModuleCallback: options.customModuleCallback,
|
|
154
158
|
interviewId: options.interviewId,
|
|
155
|
-
isDesktop: options.isDesktop ?? isDesktopOrEmulated()
|
|
159
|
+
isDesktop: options.isDesktop ?? isDesktopOrEmulated(),
|
|
160
|
+
getFinishStatus: async (workflowId, signal) => {
|
|
161
|
+
return {
|
|
162
|
+
...await getFinishStatus(workflowId, signal),
|
|
163
|
+
...endScreen
|
|
164
|
+
};
|
|
165
|
+
}
|
|
156
166
|
});
|
|
167
|
+
return Object.assign(manager, { setEndScreenTexts(endScreenTitle, endScreenText) {
|
|
168
|
+
endScreen = {
|
|
169
|
+
endScreenTitle,
|
|
170
|
+
endScreenText
|
|
171
|
+
};
|
|
172
|
+
} });
|
|
157
173
|
}
|
|
158
174
|
function warmupWorkflowWasm(wasmConfig) {
|
|
159
175
|
if (wasmConfig === false) return;
|
|
@@ -205,9 +221,13 @@ function useWorkflowInitialization(options) {
|
|
|
205
221
|
try {
|
|
206
222
|
let resolvedToken;
|
|
207
223
|
let resolvedInterviewId;
|
|
224
|
+
let endScreenTitle = null;
|
|
225
|
+
let endScreenText = null;
|
|
208
226
|
if (hasWorkflowToken(options)) {
|
|
209
227
|
resolvedToken = options.token;
|
|
210
228
|
resolvedInterviewId = options.interviewId;
|
|
229
|
+
endScreenTitle = options.endScreenTitle ?? null;
|
|
230
|
+
endScreenText = options.endScreenText ?? null;
|
|
211
231
|
if (options.urlUuid) await refreshQrUrlUuid({
|
|
212
232
|
urlUuid: options.urlUuid,
|
|
213
233
|
onboardingId: null,
|
|
@@ -217,6 +237,8 @@ function useWorkflowInitialization(options) {
|
|
|
217
237
|
const session = await createWorkflowSession(options, signal);
|
|
218
238
|
resolvedToken = session.token;
|
|
219
239
|
resolvedInterviewId = session.interviewId;
|
|
240
|
+
endScreenTitle = session.endScreenTitle ?? null;
|
|
241
|
+
endScreenText = session.endScreenText ?? null;
|
|
220
242
|
} else throw new Error("Workflow requires token, or configurationId with apiKey or clientId");
|
|
221
243
|
if (signal.aborted) return;
|
|
222
244
|
await setupWorkflowSDK({
|
|
@@ -234,6 +256,7 @@ function useWorkflowInitialization(options) {
|
|
|
234
256
|
interviewId: resolvedInterviewId,
|
|
235
257
|
isDesktop: options.isDesktop
|
|
236
258
|
});
|
|
259
|
+
managerRef.current.setEndScreenTexts(endScreenTitle, endScreenText);
|
|
237
260
|
managerRef.current.load();
|
|
238
261
|
await themePromise;
|
|
239
262
|
if (signal.aborted) return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/web",
|
|
3
|
-
"version": "0.0.0-dev-20260916-
|
|
3
|
+
"version": "0.0.0-dev-20260916-b81d875b",
|
|
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-20260916-
|
|
290
|
+
"@incodetech/core": "0.0.0-dev-20260916-b81d875b"
|
|
291
291
|
},
|
|
292
292
|
"devDependencies": {
|
|
293
293
|
"@fontsource/dm-sans": "^5.2.8",
|