@workflow/web 5.3.2 → 5.3.3
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/build/client/assets/app-CmaRLUwS.css +1 -0
- package/build/client/assets/arrow-up-right-AHTyWXU2.js +9 -0
- package/build/client/assets/{entry.client-xzxVCL3o.js → entry.client-BqbaswKw.js} +13 -35
- package/build/client/assets/{highlighted-body-JLMTFACH-1yzOVKg0.js → highlighted-body-JLMTFACH-_kzpqYmW.js} +2 -2
- package/build/client/assets/{home--wf0CrF6.js → home-DjUPTrY5.js} +91 -161
- package/build/client/assets/{index-wl5l5E8H.js → index-BUQuaV5X.js} +78 -149
- package/build/client/assets/{manifest-7b81d8d4.js → manifest-9126df65.js} +1 -1
- package/build/client/assets/{mermaid-WFAXDIZX-CB__BxYb.js → mermaid-WFAXDIZX-CNo_0yWo.js} +1236 -1340
- package/build/client/assets/mermaid-WFAXDIZX-F88p7PFX.css +1 -0
- package/build/client/assets/{root-C1XwTNUK.js → root-Bh-E5He-.js} +7 -31
- package/build/client/assets/root-kJB77No4.css +1 -0
- package/build/client/assets/{rpc-client-SbyXJdFV.js → rpc-client-DL_nSX36.js} +3 -4
- package/build/client/assets/{run-detail-2CnpdXm1.js → run-detail-5dPVsaSm.js} +121 -203
- package/build/client/assets/{run-usage-DRV6lopZ.js → run-usage-BEswHGKU.js} +15 -24
- package/build/client/assets/{run-usage-C3aywyqa.js → run-usage-C_wyncgV.js} +5 -5
- package/build/client/assets/{skeleton-DMLgjvZZ.js → skeleton-DE14mNQw.js} +3 -21
- package/build/client/assets/{url-state-JAVaNZ_m.js → url-state-5GKQwo-f.js} +471 -702
- package/build/client/assets/{zstd-browser-decoder-Z5736ep5.js → zstd-browser-decoder-CbTMLAMd.js} +2 -2
- package/build/server/assets/{app-C4Vf0mu1.js → app-C-e60j14.js} +11450 -12386
- package/build/server/assets/{esm-CETb4fkq.js → esm-BzrGWk7J.js} +2 -2
- package/build/server/assets/{highlighted-body-JLMTFACH-CF_5tt3-.js → highlighted-body-JLMTFACH-B7y0X_Kn.js} +1 -1
- package/build/server/assets/{index-BrYeW--s.js → index-DRDsjR--.js} +398 -490
- package/build/server/assets/{mermaid-WFAXDIZX-BHZz_uL6.js → mermaid-WFAXDIZX-MsPxEM1Y.js} +1 -1
- package/build/server/assets/{token-B94O3LuJ.js → token-CKgyaeCJ.js} +5 -5
- package/build/server/assets/{token-k0na1G9v.js → token-DXh0TnqB.js} +6 -6
- package/build/server/assets/{token-util-DFlzY9Hw.js → token-util-CCc0uYVy.js} +2 -2
- package/build/server/assets/{token-util-DgTmPzWb.js → token-util-DOHYMq7D.js} +1 -1
- package/build/server/assets/{wrapper-BEqyNEir.js → wrapper-BzLz38Oh.js} +2 -2
- package/build/server/assets/{zstd-browser-decoder-LnaKiDUZ.js → zstd-browser-decoder-BSSEC3XP.js} +1 -1
- package/build/server/index.js +1 -1
- package/package.json +8 -8
- package/build/client/assets/app-BHCSMHev.css +0 -1
- package/build/client/assets/arrow-up-right-DyaB_ak4.js +0 -15
- package/build/client/assets/mermaid-WFAXDIZX-D8CjRQta.css +0 -1
- package/build/client/assets/root-C3ED6Dwc.css +0 -1
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { r as reactExports, j as jsxRuntimeExports, L as Link, g as reactDomExports, C as useSearchParams, B as useNavigate, D as useLocation, w as withComponentProps } from "./index-
|
|
2
|
-
import { R as ResolveHookModal, S as Send, u as unwrapOrThrow, W as WorkflowWebAPIError, g as getPaginationDisplay, f as fetchHookToken, D as DEFAULT_PAGE_SIZE, a as RelativeTime, A as Alert, b as AlertTitle, c as getErrorTitle, d as AlertDescription, e as getErrorMessage, C as CopyableText, h as DropdownMenu, i as DropdownMenuTrigger, E as Ellipsis, j as DropdownMenuContent, k as DropdownMenuItem, r as resumeHook, l as useDirection, m as createCollection, n as hideOthers, o as useFocusGuards, p as ReactRemoveScroll, q as ChevronUp, X, s as useWorkflowRunsInfinite, t as bulkCancelRuns, v as reenqueueRun, w as StatusBadge, Z as Zap, x as CircleX, y as RunActionsDropdownItems, z as Dialog, B as DialogContent, F as DialogClose, G as DialogTitle, H as DialogDescription, I as DialogPortal, J as DialogOverlay, K as unwrapServerActionResult, L as WorkflowGraphViewer, M as useOptimisticSearchParams, T as Tabs, N as TabsList, O as TabsTrigger, P as TabsContent, Q as ErrorBoundary } from "./url-state-
|
|
3
|
-
import { c as createLucideIcon, m as useToast, a as cn, T as Tooltip, d as TooltipTrigger, S as Spinner, n as Check, o as Copy, e as TooltipContent, B as Button, C as ChevronRight, p as useComposedRefs, q as useLayoutEffect2, P as Primitive, s as useControllableState, v as useId, w as Popper, V as VISUALLY_HIDDEN_STYLES, x as createPopperScope, y as createContextScope, z as PopperAnchor, A as composeEventHandlers, D as Portal, E as Presence, F as FocusScope, G as DismissableLayer, H as PopperContent, J as useCallbackRef, K as createSlot, L as ChevronDown, M as useSize, N as BULK_CANCEL_MAX_RUN_IDS, t as toast, O as cva } from "./mermaid-WFAXDIZX-
|
|
4
|
-
import { f as fetchHooks, a as fetchEvents, u as useServerConfig, b as fetchRun, c as fetchWorkflowsManifest } from "./rpc-client-
|
|
5
|
-
import { S as Skeleton, b as CircleAlert, a as parseWorkflowName } from "./skeleton-
|
|
6
|
-
/**
|
|
7
|
-
* @license lucide-react v0.575.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports, L as Link, g as reactDomExports, C as useSearchParams, B as useNavigate, D as useLocation, w as withComponentProps } from "./index-BUQuaV5X.js";
|
|
2
|
+
import { R as ResolveHookModal, S as Send, u as unwrapOrThrow, W as WorkflowWebAPIError, g as getPaginationDisplay, f as fetchHookToken, D as DEFAULT_PAGE_SIZE, a as RelativeTime, A as Alert, b as AlertTitle, c as getErrorTitle, d as AlertDescription, e as getErrorMessage, C as CopyableText, h as DropdownMenu, i as DropdownMenuTrigger, E as Ellipsis, j as DropdownMenuContent, k as DropdownMenuItem, r as resumeHook, l as useDirection, m as createCollection, n as hideOthers, o as useFocusGuards, p as ReactRemoveScroll, q as ChevronUp, X, s as useWorkflowRunsInfinite, t as bulkCancelRuns, v as reenqueueRun, w as StatusBadge, Z as Zap, x as CircleX, y as RunActionsDropdownItems, z as Dialog, B as DialogContent, F as DialogClose, G as DialogTitle, H as DialogDescription, I as DialogPortal, J as DialogOverlay, K as unwrapServerActionResult, L as WorkflowGraphViewer, M as useOptimisticSearchParams, T as Tabs, N as TabsList, O as TabsTrigger, P as TabsContent, Q as ErrorBoundary } from "./url-state-5GKQwo-f.js";
|
|
3
|
+
import { c as createLucideIcon, m as useToast, a as cn, T as Tooltip, d as TooltipTrigger, S as Spinner, n as Check, o as Copy, e as TooltipContent, B as Button, C as ChevronRight, p as useComposedRefs, q as useLayoutEffect2, P as Primitive, s as useControllableState, v as useId, w as Popper, V as VISUALLY_HIDDEN_STYLES, x as createPopperScope, y as createContextScope, z as PopperAnchor, A as composeEventHandlers, D as Portal, E as Presence, F as FocusScope, G as DismissableLayer, H as PopperContent, J as useCallbackRef, K as createSlot, L as ChevronDown, M as useSize, N as BULK_CANCEL_MAX_RUN_IDS, t as toast, O as cva } from "./mermaid-WFAXDIZX-CNo_0yWo.js";
|
|
4
|
+
import { f as fetchHooks, a as fetchEvents, u as useServerConfig, b as fetchRun, c as fetchWorkflowsManifest } from "./rpc-client-DL_nSX36.js";
|
|
5
|
+
import { S as Skeleton, b as CircleAlert, a as parseWorkflowName } from "./skeleton-DE14mNQw.js";
|
|
12
6
|
const __iconNode$6 = [
|
|
13
7
|
["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
|
|
14
8
|
["path", { d: "M7 20V4", key: "1yoxec" }],
|
|
@@ -17,12 +11,6 @@ const __iconNode$6 = [
|
|
|
17
11
|
["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
|
|
18
12
|
];
|
|
19
13
|
const ArrowDownAZ = createLucideIcon("arrow-down-a-z", __iconNode$6);
|
|
20
|
-
/**
|
|
21
|
-
* @license lucide-react v0.575.0 - ISC
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the ISC license.
|
|
24
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/
|
|
26
14
|
const __iconNode$5 = [
|
|
27
15
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
28
16
|
["path", { d: "M7 4v16", key: "1glfcx" }],
|
|
@@ -31,40 +19,16 @@ const __iconNode$5 = [
|
|
|
31
19
|
["path", { d: "M15 14h5l-5 6h5", key: "ur5jdg" }]
|
|
32
20
|
];
|
|
33
21
|
const ArrowUpAZ = createLucideIcon("arrow-up-a-z", __iconNode$5);
|
|
34
|
-
/**
|
|
35
|
-
* @license lucide-react v0.575.0 - ISC
|
|
36
|
-
*
|
|
37
|
-
* This source code is licensed under the ISC license.
|
|
38
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/
|
|
40
22
|
const __iconNode$4 = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
41
23
|
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$4);
|
|
42
|
-
/**
|
|
43
|
-
* @license lucide-react v0.575.0 - ISC
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the ISC license.
|
|
46
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/
|
|
48
24
|
const __iconNode$3 = [
|
|
49
25
|
["path", { d: "M15 6a9 9 0 0 0-9 9V3", key: "1cii5b" }],
|
|
50
26
|
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }],
|
|
51
27
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }]
|
|
52
28
|
];
|
|
53
29
|
const GitBranch = createLucideIcon("git-branch", __iconNode$3);
|
|
54
|
-
/**
|
|
55
|
-
* @license lucide-react v0.575.0 - ISC
|
|
56
|
-
*
|
|
57
|
-
* This source code is licensed under the ISC license.
|
|
58
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/
|
|
60
30
|
const __iconNode$2 = [["path", { d: "M5 12h14", key: "1ays0h" }]];
|
|
61
31
|
const Minus = createLucideIcon("minus", __iconNode$2);
|
|
62
|
-
/**
|
|
63
|
-
* @license lucide-react v0.575.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/
|
|
68
32
|
const __iconNode$1 = [
|
|
69
33
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
70
34
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
@@ -72,12 +36,6 @@ const __iconNode$1 = [
|
|
|
72
36
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
73
37
|
];
|
|
74
38
|
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$1);
|
|
75
|
-
/**
|
|
76
|
-
* @license lucide-react v0.575.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/
|
|
81
39
|
const __iconNode = [
|
|
82
40
|
["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
|
|
83
41
|
["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
|
|
@@ -98,7 +56,6 @@ function useHookActions({ onResolve, callbacks }) {
|
|
|
98
56
|
setSelectedHook(null);
|
|
99
57
|
}, []);
|
|
100
58
|
const handleResolve = reactExports.useCallback(async (payload) => {
|
|
101
|
-
var _a;
|
|
102
59
|
if (isResolving || !selectedHook)
|
|
103
60
|
return;
|
|
104
61
|
try {
|
|
@@ -108,7 +65,7 @@ function useHookActions({ onResolve, callbacks }) {
|
|
|
108
65
|
description: "The payload has been sent and the hook resolved."
|
|
109
66
|
});
|
|
110
67
|
setSelectedHook(null);
|
|
111
|
-
|
|
68
|
+
callbacks?.onSuccess?.();
|
|
112
69
|
} catch (err) {
|
|
113
70
|
console.error("Failed to resolve hook:", err);
|
|
114
71
|
toast2.error("Failed to resolve hook", {
|
|
@@ -320,7 +277,6 @@ function useLoadMoreOnScroll(loadMore, {
|
|
|
320
277
|
return sentinelRef;
|
|
321
278
|
}
|
|
322
279
|
function usePaginatedList(fetchFn) {
|
|
323
|
-
var _a;
|
|
324
280
|
const [cursor, setCursor] = reactExports.useState(void 0);
|
|
325
281
|
const [hasMore, setHasMore] = reactExports.useState(false);
|
|
326
282
|
const [currentPage, setCurrentPage] = reactExports.useState(0);
|
|
@@ -334,10 +290,9 @@ function usePaginatedList(fetchFn) {
|
|
|
334
290
|
async (pageIndex, pageCursor, force = false) => {
|
|
335
291
|
const cacheKey = pageCursor ?? "initial";
|
|
336
292
|
setAllPageResults((prev) => {
|
|
337
|
-
var _a2;
|
|
338
293
|
const newMap = new Map(prev);
|
|
339
294
|
newMap.set(pageIndex, {
|
|
340
|
-
data:
|
|
295
|
+
data: prev.get(pageIndex)?.data ?? null,
|
|
341
296
|
isLoading: true,
|
|
342
297
|
error: null
|
|
343
298
|
});
|
|
@@ -384,10 +339,9 @@ function usePaginatedList(fetchFn) {
|
|
|
384
339
|
} catch (err) {
|
|
385
340
|
const error = err instanceof Error ? err : new WorkflowWebAPIError(String(err), { layer: "client" });
|
|
386
341
|
setAllPageResults((prev) => {
|
|
387
|
-
var _a2;
|
|
388
342
|
const newMap = new Map(prev);
|
|
389
343
|
newMap.set(pageIndex, {
|
|
390
|
-
data:
|
|
344
|
+
data: prev.get(pageIndex)?.data ?? null,
|
|
391
345
|
isLoading: false,
|
|
392
346
|
error
|
|
393
347
|
});
|
|
@@ -445,7 +399,7 @@ function usePaginatedList(fetchFn) {
|
|
|
445
399
|
isLoading: true,
|
|
446
400
|
error: null
|
|
447
401
|
};
|
|
448
|
-
const globalError =
|
|
402
|
+
const globalError = Array.from(allPageResults.values()).find((p) => p.error)?.error ?? null;
|
|
449
403
|
const globalLoading = Array.from(allPageResults.values()).some(
|
|
450
404
|
(p) => p.isLoading
|
|
451
405
|
);
|
|
@@ -778,7 +732,7 @@ function HooksTable({
|
|
|
778
732
|
"No active hooks found. ",
|
|
779
733
|
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
780
734
|
/* @__PURE__ */ jsxRuntimeExports.jsx(DocsLink, { href: "https://workflow-sdk.dev/docs/api-reference/workflow/create-hook", children: "Learn how to create a hook" })
|
|
781
|
-
] }) : loading && !
|
|
735
|
+
] }) : loading && !data?.data ? /* @__PURE__ */ jsxRuntimeExports.jsx(TableSkeleton, { variant: "hooks" }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
782
736
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Card, { className: "overflow-hidden mt-4 bg-background", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { className: "p-0 max-h-[calc(100vh-280px)] overflow-auto", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Table, { children: [
|
|
783
737
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHeader, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableRow, { children: [
|
|
784
738
|
/* @__PURE__ */ jsxRuntimeExports.jsx(TableHead, { className: "sticky top-0 bg-background z-10 border-b shadow-sm h-10", children: "Hook ID" }),
|
|
@@ -938,7 +892,7 @@ function SelectProvider(props) {
|
|
|
938
892
|
}, "handleUserSelect");
|
|
939
893
|
const initialValueRef = reactExports.useRef(value);
|
|
940
894
|
reactExports.useEffect(() => {
|
|
941
|
-
const associatedForm = form ? trigger
|
|
895
|
+
const associatedForm = form ? trigger?.ownerDocument.getElementById(form) : trigger?.form;
|
|
942
896
|
if (associatedForm instanceof HTMLFormElement) {
|
|
943
897
|
const reset = /* @__PURE__ */ __name$1(() => setValue(initialValueRef.current), "reset");
|
|
944
898
|
associatedForm.addEventListener("reset", reset);
|
|
@@ -1205,10 +1159,10 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1205
1159
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
1206
1160
|
for (const candidate of candidates) {
|
|
1207
1161
|
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
1208
|
-
candidate
|
|
1162
|
+
candidate?.scrollIntoView({ block: "nearest" });
|
|
1209
1163
|
if (candidate === firstItem && viewport) viewport.scrollTop = 0;
|
|
1210
1164
|
if (candidate === lastItem && viewport) viewport.scrollTop = viewport.scrollHeight;
|
|
1211
|
-
candidate
|
|
1165
|
+
candidate?.focus();
|
|
1212
1166
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
1213
1167
|
}
|
|
1214
1168
|
},
|
|
@@ -1228,10 +1182,9 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1228
1182
|
if (content) {
|
|
1229
1183
|
let pointerMoveDelta = { x: 0, y: 0 };
|
|
1230
1184
|
const handlePointerMove = /* @__PURE__ */ __name$1((event) => {
|
|
1231
|
-
var _a, _b;
|
|
1232
1185
|
pointerMoveDelta = {
|
|
1233
|
-
x: Math.abs(Math.round(event.pageX) - (
|
|
1234
|
-
y: Math.abs(Math.round(event.pageY) - (
|
|
1186
|
+
x: Math.abs(Math.round(event.pageX) - (triggerPointerDownPosRef.current?.x ?? 0)),
|
|
1187
|
+
y: Math.abs(Math.round(event.pageY) - (triggerPointerDownPosRef.current?.y ?? 0))
|
|
1235
1188
|
};
|
|
1236
1189
|
}, "handlePointerMove");
|
|
1237
1190
|
const handlePointerUp = /* @__PURE__ */ __name$1((event) => {
|
|
@@ -1269,10 +1222,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1269
1222
|
const currentItem = enabledItems.find((item) => item.ref.current === document.activeElement);
|
|
1270
1223
|
const nextItem = findNextItem(enabledItems, search, currentItem);
|
|
1271
1224
|
if (nextItem) {
|
|
1272
|
-
setTimeout(() =>
|
|
1273
|
-
var _a;
|
|
1274
|
-
return (_a = nextItem.ref.current) == null ? void 0 : _a.focus();
|
|
1275
|
-
});
|
|
1225
|
+
setTimeout(() => nextItem.ref.current?.focus());
|
|
1276
1226
|
}
|
|
1277
1227
|
});
|
|
1278
1228
|
const itemRefCallback = reactExports.useCallback(
|
|
@@ -1290,7 +1240,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1290
1240
|
},
|
|
1291
1241
|
[context.value]
|
|
1292
1242
|
);
|
|
1293
|
-
const handleItemLeave = reactExports.useCallback(() => content
|
|
1243
|
+
const handleItemLeave = reactExports.useCallback(() => content?.focus(), [content]);
|
|
1294
1244
|
const itemTextRefCallback = reactExports.useCallback(
|
|
1295
1245
|
(node, value, disabled) => {
|
|
1296
1246
|
if (!node) return;
|
|
@@ -1344,8 +1294,7 @@ var SelectContentImpl = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1344
1294
|
event.preventDefault();
|
|
1345
1295
|
},
|
|
1346
1296
|
onUnmountAutoFocus: composeEventHandlers(onCloseAutoFocus, (event) => {
|
|
1347
|
-
|
|
1348
|
-
(_a = context.trigger) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
1297
|
+
context.trigger?.focus({ preventScroll: true });
|
|
1349
1298
|
event.preventDefault();
|
|
1350
1299
|
}),
|
|
1351
1300
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -1501,7 +1450,7 @@ var SelectItemAlignedPosition = /* @__PURE__ */ reactExports.forwardRef(/* @__PU
|
|
|
1501
1450
|
contentWrapper.style.margin = `${CONTENT_MARGIN}px 0`;
|
|
1502
1451
|
contentWrapper.style.minHeight = minContentHeight + "px";
|
|
1503
1452
|
contentWrapper.style.maxHeight = availableHeight + "px";
|
|
1504
|
-
onPlaced
|
|
1453
|
+
onPlaced?.();
|
|
1505
1454
|
requestAnimationFrame(() => shouldExpandOnScrollRef.current = true);
|
|
1506
1455
|
}
|
|
1507
1456
|
}, [
|
|
@@ -1525,7 +1474,7 @@ var SelectItemAlignedPosition = /* @__PURE__ */ reactExports.forwardRef(/* @__PU
|
|
|
1525
1474
|
(node) => {
|
|
1526
1475
|
if (node && shouldRepositionRef.current === true) {
|
|
1527
1476
|
position();
|
|
1528
|
-
focusSelectedItem
|
|
1477
|
+
focusSelectedItem?.();
|
|
1529
1478
|
shouldRepositionRef.current = false;
|
|
1530
1479
|
}
|
|
1531
1480
|
},
|
|
@@ -1642,7 +1591,7 @@ var SelectViewport = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1642
1591
|
onScroll: composeEventHandlers(viewportProps.onScroll, (event) => {
|
|
1643
1592
|
const viewport = event.currentTarget;
|
|
1644
1593
|
const { contentWrapper, shouldExpandOnScrollRef } = viewportContext;
|
|
1645
|
-
if (
|
|
1594
|
+
if (shouldExpandOnScrollRef?.current && contentWrapper) {
|
|
1646
1595
|
const scrolledBy = Math.abs(prevScrollTopRef.current - viewport.scrollTop);
|
|
1647
1596
|
if (scrolledBy > 0) {
|
|
1648
1597
|
const availableHeight = window.innerHeight - CONTENT_MARGIN * 2;
|
|
@@ -1695,10 +1644,7 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1695
1644
|
const [textValue, setTextValue] = reactExports.useState(textValueProp ?? "");
|
|
1696
1645
|
const [isFocused, setIsFocused] = reactExports.useState(false);
|
|
1697
1646
|
const handleItemRefCallback = useCallbackRef(
|
|
1698
|
-
(node) =>
|
|
1699
|
-
var _a;
|
|
1700
|
-
return (_a = contentContext.itemRefCallback) == null ? void 0 : _a.call(contentContext, node, value, disabled);
|
|
1701
|
-
}
|
|
1647
|
+
(node) => contentContext.itemRefCallback?.(node, value, disabled)
|
|
1702
1648
|
);
|
|
1703
1649
|
const composedRefs = useComposedRefs(forwardedRef, handleItemRefCallback);
|
|
1704
1650
|
const textId = useId();
|
|
@@ -1718,7 +1664,7 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1718
1664
|
textId,
|
|
1719
1665
|
isSelected,
|
|
1720
1666
|
onItemTextChange: reactExports.useCallback((node) => {
|
|
1721
|
-
setTextValue((prevTextValue) => prevTextValue || (
|
|
1667
|
+
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
1722
1668
|
}, []),
|
|
1723
1669
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1724
1670
|
Collection.ItemSlot,
|
|
@@ -1762,26 +1708,23 @@ var SelectItem$1 = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1762
1708
|
pointerTypeRef.current = event.pointerType;
|
|
1763
1709
|
}),
|
|
1764
1710
|
onPointerMove: composeEventHandlers(itemProps.onPointerMove, (event) => {
|
|
1765
|
-
var _a;
|
|
1766
1711
|
pointerTypeRef.current = event.pointerType;
|
|
1767
1712
|
if (disabled) {
|
|
1768
|
-
|
|
1713
|
+
contentContext.onItemLeave?.();
|
|
1769
1714
|
} else if (pointerTypeRef.current === "mouse") {
|
|
1770
1715
|
event.currentTarget.focus({ preventScroll: true });
|
|
1771
1716
|
}
|
|
1772
1717
|
}),
|
|
1773
1718
|
onPointerLeave: composeEventHandlers(itemProps.onPointerLeave, (event) => {
|
|
1774
|
-
var _a;
|
|
1775
1719
|
if (event.currentTarget === document.activeElement) {
|
|
1776
|
-
|
|
1720
|
+
contentContext.onItemLeave?.();
|
|
1777
1721
|
}
|
|
1778
1722
|
}),
|
|
1779
1723
|
onKeyDown: composeEventHandlers(itemProps.onKeyDown, (event) => {
|
|
1780
|
-
var _a;
|
|
1781
1724
|
if (disabled || event.target !== event.currentTarget) {
|
|
1782
1725
|
return;
|
|
1783
1726
|
}
|
|
1784
|
-
const isTypingAhead =
|
|
1727
|
+
const isTypingAhead = contentContext.searchRef?.current !== "";
|
|
1785
1728
|
if (isTypingAhead && event.key === " ") {
|
|
1786
1729
|
return;
|
|
1787
1730
|
}
|
|
@@ -1810,10 +1753,7 @@ var SelectItemText = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1810
1753
|
const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
|
|
1811
1754
|
const [itemTextNode, setItemTextNode] = reactExports.useState(null);
|
|
1812
1755
|
const handleItemTextRefCallback = useCallbackRef(
|
|
1813
|
-
(node) =>
|
|
1814
|
-
var _a;
|
|
1815
|
-
return (_a = contentContext.itemTextRefCallback) == null ? void 0 : _a.call(contentContext, node, itemContext.value, itemContext.disabled);
|
|
1816
|
-
}
|
|
1756
|
+
(node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled)
|
|
1817
1757
|
);
|
|
1818
1758
|
const composedRefs = useComposedRefs(
|
|
1819
1759
|
forwardedRef,
|
|
@@ -1821,7 +1761,7 @@ var SelectItemText = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
1821
1761
|
itemContext.onItemTextChange,
|
|
1822
1762
|
handleItemTextRefCallback
|
|
1823
1763
|
);
|
|
1824
|
-
const textContent = itemTextNode
|
|
1764
|
+
const textContent = itemTextNode?.textContent;
|
|
1825
1765
|
const nativeOption = reactExports.useMemo(
|
|
1826
1766
|
() => /* @__PURE__ */ jsxRuntimeExports.jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
1827
1767
|
[itemContext.disabled, itemContext.value, textContent]
|
|
@@ -1928,9 +1868,8 @@ var SelectScrollButtonImpl = /* @__PURE__ */ reactExports.forwardRef(/* @__PURE_
|
|
|
1928
1868
|
return () => clearAutoScrollTimer();
|
|
1929
1869
|
}, [clearAutoScrollTimer]);
|
|
1930
1870
|
useLayoutEffect2(() => {
|
|
1931
|
-
var _a;
|
|
1932
1871
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
1933
|
-
|
|
1872
|
+
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
1934
1873
|
}, [getItems]);
|
|
1935
1874
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
1936
1875
|
Primitive.div,
|
|
@@ -1945,8 +1884,7 @@ var SelectScrollButtonImpl = /* @__PURE__ */ reactExports.forwardRef(/* @__PURE_
|
|
|
1945
1884
|
}
|
|
1946
1885
|
}),
|
|
1947
1886
|
onPointerMove: composeEventHandlers(scrollIndicatorProps.onPointerMove, () => {
|
|
1948
|
-
|
|
1949
|
-
(_a = contentContext.onItemLeave) == null ? void 0 : _a.call(contentContext);
|
|
1887
|
+
contentContext.onItemLeave?.();
|
|
1950
1888
|
if (autoScrollTimerRef.current === null) {
|
|
1951
1889
|
autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
|
|
1952
1890
|
}
|
|
@@ -2337,14 +2275,13 @@ function useTableSelection({
|
|
|
2337
2275
|
);
|
|
2338
2276
|
}
|
|
2339
2277
|
function getRunReplayDisabledReason(run, runIdentityLoading) {
|
|
2340
|
-
var _a;
|
|
2341
2278
|
if (runIdentityLoading) {
|
|
2342
2279
|
return "Loading run identity...";
|
|
2343
2280
|
}
|
|
2344
2281
|
if (!run) {
|
|
2345
2282
|
return "Unable to verify whether this run can be replayed.";
|
|
2346
2283
|
}
|
|
2347
|
-
if (
|
|
2284
|
+
if (run.executionContext?.dynamicWorkflow) {
|
|
2348
2285
|
return "Dynamic runs cannot be replayed as a new run.";
|
|
2349
2286
|
}
|
|
2350
2287
|
return void 0;
|
|
@@ -2472,7 +2409,7 @@ var CheckboxTrigger = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
2472
2409
|
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
|
2473
2410
|
const initialCheckedStateRef = reactExports.useRef(checked);
|
|
2474
2411
|
reactExports.useEffect(() => {
|
|
2475
|
-
const form = control
|
|
2412
|
+
const form = control?.form;
|
|
2476
2413
|
if (form) {
|
|
2477
2414
|
const reset = /* @__PURE__ */ __name(() => setChecked(initialCheckedStateRef.current), "reset");
|
|
2478
2415
|
form.addEventListener("reset", reset);
|
|
@@ -2630,7 +2567,7 @@ var CheckboxBubbleInput = /* @__PURE__ */ reactExports.forwardRef(
|
|
|
2630
2567
|
} else if (checkedChanged) {
|
|
2631
2568
|
const pendingUserClick = pendingUserClickRef.current;
|
|
2632
2569
|
pendingUserClickRef.current = null;
|
|
2633
|
-
const isPendingUserChange =
|
|
2570
|
+
const isPendingUserChange = pendingUserClick?.requestedChecked === checked;
|
|
2634
2571
|
shouldStopClickPropagationRef.current = true;
|
|
2635
2572
|
input.indeterminate = isIndeterminate(checked);
|
|
2636
2573
|
setChecked.call(input, isIndeterminate(checked) ? false : checked);
|
|
@@ -2710,7 +2647,7 @@ const Checkbox = reactExports.forwardRef(({ className, checked, indeterminate, o
|
|
|
2710
2647
|
id: checkboxId,
|
|
2711
2648
|
checked: checkedState,
|
|
2712
2649
|
onCheckedChange: (state) => {
|
|
2713
|
-
onCheckedChange
|
|
2650
|
+
onCheckedChange?.(state === true);
|
|
2714
2651
|
},
|
|
2715
2652
|
className: cn(
|
|
2716
2653
|
"peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow",
|
|
@@ -2739,7 +2676,7 @@ function RunActionsDropdownContentInner({
|
|
|
2739
2676
|
const [eventsLoading, setEventsLoading] = reactExports.useState(true);
|
|
2740
2677
|
const [run, setRun] = reactExports.useState(void 0);
|
|
2741
2678
|
const [runIdentityLoading, setRunIdentityLoading] = reactExports.useState(true);
|
|
2742
|
-
const status =
|
|
2679
|
+
const status = run?.status || runStatus;
|
|
2743
2680
|
reactExports.useEffect(() => {
|
|
2744
2681
|
setRun(void 0);
|
|
2745
2682
|
setRunIdentityLoading(true);
|
|
@@ -2950,10 +2887,7 @@ function FilterControls({
|
|
|
2950
2887
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectTrigger, { className: "w-[180px] h-9", children: /* @__PURE__ */ jsxRuntimeExports.jsx(SelectValue, { placeholder: "Filter by workflow" }) }),
|
|
2951
2888
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SelectContent, { children: [
|
|
2952
2889
|
/* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: "all", children: "All Workflows" }),
|
|
2953
|
-
Array.from(seenWorkflowNames).sort().map((name) => {
|
|
2954
|
-
var _a;
|
|
2955
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: name, children: ((_a = parseWorkflowName(name)) == null ? void 0 : _a.shortName) || name }, name);
|
|
2956
|
-
})
|
|
2890
|
+
Array.from(seenWorkflowNames).sort().map((name) => /* @__PURE__ */ jsxRuntimeExports.jsx(SelectItem, { value: name, children: parseWorkflowName(name)?.shortName || name }, name))
|
|
2957
2891
|
] })
|
|
2958
2892
|
]
|
|
2959
2893
|
}
|
|
@@ -3018,7 +2952,6 @@ function FilterControls({
|
|
|
3018
2952
|
] });
|
|
3019
2953
|
}
|
|
3020
2954
|
function RunsTable({ onRunClick }) {
|
|
3021
|
-
var _a, _b, _c;
|
|
3022
2955
|
const [searchParams] = useSearchParams();
|
|
3023
2956
|
const handleWorkflowFilter = useWorkflowFilter();
|
|
3024
2957
|
const handleStatusFilter = useStatusFilter();
|
|
@@ -3038,12 +2971,12 @@ function RunsTable({ onRunClick }) {
|
|
|
3038
2971
|
const [hasLoadedOnce, setHasLoadedOnce] = reactExports.useState(false);
|
|
3039
2972
|
const env = reactExports.useMemo(() => ({}), []);
|
|
3040
2973
|
const isLocal = serverConfig.backendId === "local" || serverConfig.backendId === "@workflow/world-local";
|
|
3041
|
-
const localDataDirPath =
|
|
3042
|
-
const localShortName =
|
|
2974
|
+
const localDataDirPath = serverConfig.displayInfo?.["local.dataDirPath"];
|
|
2975
|
+
const localShortName = serverConfig.displayInfo?.["local.shortName"];
|
|
3043
2976
|
const [seenWorkflowNames, setSeenWorkflowNames] = reactExports.useState(
|
|
3044
2977
|
/* @__PURE__ */ new Set()
|
|
3045
2978
|
);
|
|
3046
|
-
const isVercelBackend =
|
|
2979
|
+
const isVercelBackend = serverConfig.backendId?.includes("vercel") ?? false;
|
|
3047
2980
|
const [listingWindow, setListingWindow] = reactExports.useState(
|
|
3048
2981
|
() => isVercelBackend ? getListingWindow(period, periodPreset.ms) : void 0
|
|
3049
2982
|
);
|
|
@@ -3070,8 +3003,8 @@ function RunsTable({ onRunClick }) {
|
|
|
3070
3003
|
sortOrder,
|
|
3071
3004
|
workflowName: workflowNameFilter === "all" ? void 0 : workflowNameFilter,
|
|
3072
3005
|
status: status === "all" ? void 0 : status,
|
|
3073
|
-
startTime: listingWindow
|
|
3074
|
-
endTime: listingWindow
|
|
3006
|
+
startTime: listingWindow?.startTime,
|
|
3007
|
+
endTime: listingWindow?.endTime
|
|
3075
3008
|
});
|
|
3076
3009
|
const [planInfo, setPlanInfo] = reactExports.useState(void 0);
|
|
3077
3010
|
reactExports.useEffect(() => {
|
|
@@ -3245,7 +3178,7 @@ function RunsTable({ onRunClick }) {
|
|
|
3245
3178
|
period,
|
|
3246
3179
|
showPeriodPicker: isVercelBackend,
|
|
3247
3180
|
planWindowMs,
|
|
3248
|
-
planUpgradeAvailable:
|
|
3181
|
+
planUpgradeAvailable: planInfo?.upgradeAvailable ?? false,
|
|
3249
3182
|
onWorkflowChange: handleWorkflowFilter,
|
|
3250
3183
|
onStatusChange: handleStatusFilter,
|
|
3251
3184
|
onPeriodChange: handlePeriodFilter,
|
|
@@ -3294,49 +3227,46 @@ function RunsTable({ onRunClick }) {
|
|
|
3294
3227
|
"."
|
|
3295
3228
|
] }),
|
|
3296
3229
|
isLocalAndHasMissingData && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "text-sm flex items-center gap-2", children: "This view will update once you run a workflow." })
|
|
3297
|
-
] }) }) }) : runs.map((run) =>
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
"
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
run.runId
|
|
3338
|
-
);
|
|
3339
|
-
}),
|
|
3230
|
+
] }) }) }) : runs.map((run) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
3231
|
+
TableRow,
|
|
3232
|
+
{
|
|
3233
|
+
className: "cursor-pointer group relative",
|
|
3234
|
+
onClick: () => onRunClick(run.runId),
|
|
3235
|
+
"data-selected": selection.isSelected(run),
|
|
3236
|
+
children: [
|
|
3237
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3238
|
+
Checkbox,
|
|
3239
|
+
{
|
|
3240
|
+
checked: selection.isSelected(run),
|
|
3241
|
+
onCheckedChange: () => selection.toggleSelection(run),
|
|
3242
|
+
"aria-label": `Select run ${run.runId}`
|
|
3243
|
+
}
|
|
3244
|
+
) }),
|
|
3245
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.workflowName, overlay: true, children: parseWorkflowName(run.workflowName)?.shortName || "?" }) }),
|
|
3246
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "font-mono text-xs py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CopyableText, { text: run.runId, overlay: true, children: run.runId }) }),
|
|
3247
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3248
|
+
StatusBadge,
|
|
3249
|
+
{
|
|
3250
|
+
status: run.status,
|
|
3251
|
+
context: run,
|
|
3252
|
+
durationMs: run.startedAt ? (run.completedAt ? new Date(run.completedAt).getTime() : Date.now()) - new Date(run.startedAt).getTime() : void 0
|
|
3253
|
+
}
|
|
3254
|
+
) }),
|
|
3255
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.startedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.startedAt }) : "-" }),
|
|
3256
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2 text-muted-foreground text-xs", children: run.completedAt ? /* @__PURE__ */ jsxRuntimeExports.jsx(RelativeTime, { date: run.completedAt }) : "-" }),
|
|
3257
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { className: "py-2", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
3258
|
+
LazyDropdownMenu,
|
|
3259
|
+
{
|
|
3260
|
+
env,
|
|
3261
|
+
runId: run.runId,
|
|
3262
|
+
runStatus: run.status,
|
|
3263
|
+
onSuccess: onReload
|
|
3264
|
+
}
|
|
3265
|
+
) })
|
|
3266
|
+
]
|
|
3267
|
+
},
|
|
3268
|
+
run.runId
|
|
3269
|
+
)),
|
|
3340
3270
|
isLoadingMore && /* @__PURE__ */ jsxRuntimeExports.jsx(TableRow, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableCell, { colSpan: 7, className: "py-3", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center justify-center gap-2 text-sm text-muted-foreground", children: [
|
|
3341
3271
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spinner, { size: "md" }),
|
|
3342
3272
|
"Loading more runs…"
|
|
@@ -3357,7 +3287,7 @@ function RunsTable({ onRunClick }) {
|
|
|
3357
3287
|
] }) }),
|
|
3358
3288
|
isVercelBackend && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
|
3359
3289
|
periodPreset.label,
|
|
3360
|
-
|
|
3290
|
+
planInfo?.upgradeAvailable ? ` · plan window ${planInfo.currentLookbackDays} day${planInfo.currentLookbackDays === 1 ? "" : "s"}` : ""
|
|
3361
3291
|
] })
|
|
3362
3292
|
] }),
|
|
3363
3293
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -3623,14 +3553,14 @@ function calculateNodePositions(rawNodes, edges) {
|
|
|
3623
3553
|
}
|
|
3624
3554
|
function adaptManifest(raw) {
|
|
3625
3555
|
const workflows = {};
|
|
3626
|
-
console.log("[adaptManifest] Raw manifest version:", raw
|
|
3556
|
+
console.log("[adaptManifest] Raw manifest version:", raw?.version);
|
|
3627
3557
|
console.log(
|
|
3628
3558
|
"[adaptManifest] Raw workflows keys:",
|
|
3629
|
-
Object.keys(
|
|
3559
|
+
Object.keys(raw?.workflows || {})
|
|
3630
3560
|
);
|
|
3631
|
-
if (!
|
|
3561
|
+
if (!raw?.workflows) {
|
|
3632
3562
|
console.log("[adaptManifest] No workflows in manifest, returning empty");
|
|
3633
|
-
return { version:
|
|
3563
|
+
return { version: raw?.version || "1.0.0", workflows: {} };
|
|
3634
3564
|
}
|
|
3635
3565
|
for (const [filePath, workflowsInFile] of Object.entries(raw.workflows)) {
|
|
3636
3566
|
for (const [workflowName, entry] of Object.entries(workflowsInFile)) {
|
|
@@ -3685,7 +3615,7 @@ function useWorkflowGraphManifest() {
|
|
|
3685
3615
|
);
|
|
3686
3616
|
console.log(
|
|
3687
3617
|
"[useWorkflowGraphManifest] Workflows in raw:",
|
|
3688
|
-
Object.keys(
|
|
3618
|
+
Object.keys(rawManifest?.workflows || {})
|
|
3689
3619
|
);
|
|
3690
3620
|
const adaptedManifest = adaptManifest(rawManifest);
|
|
3691
3621
|
console.log(
|
|
@@ -3731,13 +3661,13 @@ function WorkflowsList({ onWorkflowSelect }) {
|
|
|
3731
3661
|
[workflows]
|
|
3732
3662
|
);
|
|
3733
3663
|
const selectedWorkflowStepCount = reactExports.useMemo(
|
|
3734
|
-
() =>
|
|
3664
|
+
() => selectedWorkflow?.nodes.filter((node) => node.data.nodeKind === "step").length ?? 0,
|
|
3735
3665
|
[selectedWorkflow]
|
|
3736
3666
|
);
|
|
3737
3667
|
const handleViewWorkflow = (workflow) => {
|
|
3738
3668
|
setSelectedWorkflow(workflow);
|
|
3739
3669
|
setSheetOpen(true);
|
|
3740
|
-
onWorkflowSelect
|
|
3670
|
+
onWorkflowSelect?.(workflow.workflowName);
|
|
3741
3671
|
};
|
|
3742
3672
|
if (loading) {
|
|
3743
3673
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(TableSkeleton, { variant: "workflows", rows: 6 });
|
|
@@ -3796,7 +3726,7 @@ function WorkflowsList({ onWorkflowSelect }) {
|
|
|
3796
3726
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SheetHeader, { children: [
|
|
3797
3727
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(SheetTitle, { className: "flex items-center gap-2", children: [
|
|
3798
3728
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Workflow, { className: "h-5 w-5" }),
|
|
3799
|
-
selectedWorkflow
|
|
3729
|
+
selectedWorkflow?.workflowName
|
|
3800
3730
|
] }),
|
|
3801
3731
|
selectedWorkflow && /* @__PURE__ */ jsxRuntimeExports.jsx(SheetDescription, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "space-y-2", children: [
|
|
3802
3732
|
/* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "text-xs", children: selectedWorkflow.filePath }),
|