@loopstack/loopstack-studio 0.21.3 → 0.22.0
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/api/auth.js +10 -0
- package/dist/api/client.js +13 -0
- package/dist/api/config.js +10 -0
- package/dist/api/dashboard.js +4 -0
- package/dist/api/documents.js +7 -0
- package/dist/api/index.js +24 -0
- package/dist/api/namespaces.js +7 -0
- package/dist/api/pipelines.js +13 -0
- package/dist/api/processor.js +4 -0
- package/dist/api/workflows.js +8 -0
- package/dist/api/workspaces.js +12 -0
- package/dist/app/EnvironmentEmbedRoot.js +33 -0
- package/dist/components/data-table/DataTableFilters.js +74 -63
- package/dist/components/layout/MainLayout.js +7 -4
- package/dist/components/page/PageBreadcrumbs.js +1 -1
- package/dist/components/ui/sidebar.js +359 -359
- package/dist/components/ui-widgets/UiActions.js +22 -15
- package/dist/components/ui-widgets/UiWidget.js +31 -26
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +27 -27
- package/dist/components/ui-widgets/widgets/ButtonFullWidth.js +12 -12
- package/dist/components/ui-widgets/widgets/SandboxRun.js +32 -0
- package/dist/components/ui-widgets/widgets/SubmitButton.js +11 -11
- package/dist/features/code-explorer/utils/fileIcons.js +4 -7
- package/dist/features/oauth/OAuthPromptRenderer.js +1 -1
- package/dist/features/runs/Runs.js +197 -0
- package/dist/features/workbench/NavigationItems.js +1 -1
- package/dist/features/workbench/Workbench.js +109 -75
- package/dist/features/workbench/WorkflowItem.js +8 -11
- package/dist/features/workbench/WorkflowList.js +29 -20
- package/dist/features/workbench/components/DocumentList.js +20 -20
- package/dist/features/workbench/components/NewRunDialog.js +328 -0
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +88 -0
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +48 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +68 -0
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +128 -0
- package/dist/features/workbench/components/WorkflowForms.js +7 -6
- package/dist/features/workbench/components/WorkflowHistoryItem.js +68 -63
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +79 -61
- package/dist/features/workbench/components/document-renderer/DocumentFormRenderer.js +6 -5
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +77 -0
- package/dist/features/workspaces/Workspaces.js +2 -2
- package/dist/features/workspaces/components/CreateWorkspace.js +164 -81
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +63 -0
- package/dist/features/workspaces/components/ExecutionTimeline.js +69 -68
- package/dist/features/workspaces/components/PipelineForm.js +4 -4
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/useApi.js +9 -33
- package/dist/hooks/useAuth.js +18 -38
- package/dist/hooks/useConfig.js +31 -33
- package/dist/hooks/useDashboard.js +1 -4
- package/dist/hooks/useDocuments.js +4 -8
- package/dist/hooks/useFiles.js +31 -41
- package/dist/hooks/useNamespaces.js +5 -8
- package/dist/hooks/usePipelines.js +98 -108
- package/dist/hooks/useProcessor.js +1 -4
- package/dist/hooks/useWorkflows.js +25 -41
- package/dist/hooks/useWorkspaces.js +45 -72
- package/dist/index.d.ts +266 -48
- package/dist/index.js +10 -2
- package/dist/packages/contracts/dist/enums/index.js +25 -0
- package/dist/packages/contracts/dist/enums/pipeline-state.js +10 -0
- package/dist/packages/contracts/dist/enums/registry.enum.js +20 -0
- package/dist/packages/contracts/dist/enums/sort-order.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/user-type.enum.js +10 -0
- package/dist/packages/contracts/dist/enums/workflow-state.enum.js +10 -0
- package/dist/pages/DebugPage.js +12 -14
- package/dist/pages/DebugWorkflowDetailsPage.js +1 -1
- package/dist/pages/DebugWorkflowsPage.js +3 -4
- package/dist/pages/EmbedWorkbenchPage.js +4 -3
- package/dist/pages/PipelineDebugPage.js +2 -2
- package/dist/pages/PreviewWorkbenchPage.js +416 -0
- package/dist/pages/RunsListPage.js +36 -0
- package/dist/pages/RunsPage.js +49 -0
- package/dist/pages/StudioLandingPage.js +145 -0
- package/dist/pages/WorkbenchPage.js +75 -51
- package/dist/providers/InvalidationEventsProvider.js +7 -7
- package/dist/providers/QueryProvider.js +21 -0
- package/dist/routing/LocalRouter.js +9 -0
- package/dist/services/createApiClient.js +4 -10
- package/dist/services/index.js +1 -1
- package/package.json +2 -3
- package/dist/features/code-explorer/CodeExplorer.js +0 -69
- package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -43
- package/dist/features/code-explorer/components/CodeExplorerTreeNode.js +0 -82
- package/dist/features/workbench/components/WorkbenchSidebar.js +0 -109
- package/dist/features/workbench/providers/WorkbenchContextProvider.js +0 -3
|
@@ -1,20 +1,21 @@
|
|
|
1
|
+
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
1
2
|
import UiActions_default from "../../../components/ui-widgets/UiActions.js";
|
|
2
3
|
import { c } from "react/compiler-runtime";
|
|
3
4
|
import React from "react";
|
|
4
|
-
import { WorkflowState } from "@loopstack/api-client";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
var WorkflowForms_default = (
|
|
7
|
-
let o = c(
|
|
6
|
+
var import_enums = require_enums(), WorkflowForms_default = (e) => {
|
|
7
|
+
let o = c(8), { workflow: s, onSubmit: l } = e, u = s.ui?.actions;
|
|
8
8
|
if (!u?.length) return null;
|
|
9
9
|
let d;
|
|
10
10
|
o[0] === s.availableTransitions ? d = o[1] : (d = s.availableTransitions?.map(_temp) ?? [], o[0] = s.availableTransitions, o[1] = d);
|
|
11
|
-
let f = d, p = u, m = s.status === WorkflowState.Completed, h;
|
|
12
|
-
return o[2] !== f || o[3] !== l || o[4] !== p || o[5] !== m ? (h = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
|
|
11
|
+
let f = d, p = u, m = s.status === import_enums.WorkflowState.Completed, h;
|
|
12
|
+
return o[2] !== f || o[3] !== l || o[4] !== p || o[5] !== m || o[6] !== s.place ? (h = /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UiActions_default, {
|
|
13
13
|
actions: p,
|
|
14
14
|
availableTransitions: f,
|
|
15
|
+
currentPlace: s.place,
|
|
15
16
|
disabled: m,
|
|
16
17
|
onSubmit: l
|
|
17
|
-
}) }), o[2] = f, o[3] = l, o[4] = p, o[5] = m, o[6] = h) : h = o[
|
|
18
|
+
}) }), o[2] = f, o[3] = l, o[4] = p, o[5] = m, o[6] = s.place, o[7] = h) : h = o[7], h;
|
|
18
19
|
};
|
|
19
20
|
function _temp(e) {
|
|
20
21
|
return e.id;
|
|
@@ -2,102 +2,104 @@ import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
|
2
2
|
import { cn } from "../../../lib/utils.js";
|
|
3
3
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
4
4
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip.js";
|
|
5
|
-
import { SidebarMenuButton, SidebarMenuItem, SidebarMenuSub } from "../../../components/ui/sidebar.js";
|
|
6
5
|
import { c } from "react/compiler-runtime";
|
|
7
6
|
import React from "react";
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { ChevronRight, Clock, Loader2, Play, Wrench } from "lucide-react";
|
|
10
9
|
import { format } from "date-fns";
|
|
11
|
-
var WorkflowHistoryItem_default = (
|
|
12
|
-
let
|
|
13
|
-
if (
|
|
10
|
+
var WorkflowHistoryItem_default = (_) => {
|
|
11
|
+
let y = c(19), { workflowId: b, workflow: x } = _, S = useWorkflow(b), C = S.data?.history;
|
|
12
|
+
if (S.isLoading) {
|
|
14
13
|
let e;
|
|
15
|
-
return
|
|
16
|
-
className: "
|
|
17
|
-
children:
|
|
18
|
-
className: "text-sm",
|
|
19
|
-
children: "
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
return y[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("li", {
|
|
15
|
+
className: "group/menu-item relative list-none",
|
|
16
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
17
|
+
className: "flex w-full items-center gap-2 rounded-md p-2 text-sm opacity-50",
|
|
18
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "text-sm",
|
|
20
|
+
children: "Loading..."
|
|
21
|
+
})]
|
|
22
|
+
})
|
|
23
|
+
}), y[0] = e) : e = y[0], e;
|
|
22
24
|
}
|
|
23
|
-
if (!
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
let
|
|
27
|
-
|
|
25
|
+
if (!C?.length) return null;
|
|
26
|
+
let w;
|
|
27
|
+
y[1] === Symbol.for("react.memo_cache_sentinel") ? (w = /* @__PURE__ */ jsx(Play, { className: "text-primary h-3.5 w-3.5 fill-current" }), y[1] = w) : w = y[1];
|
|
28
|
+
let T = x.title ?? x.blockName, E;
|
|
29
|
+
y[2] === T ? E = y[3] : (E = /* @__PURE__ */ jsx("span", {
|
|
28
30
|
className: "truncate text-sm",
|
|
29
|
-
children:
|
|
30
|
-
}),
|
|
31
|
-
let
|
|
32
|
-
|
|
33
|
-
let
|
|
34
|
-
|
|
31
|
+
children: T
|
|
32
|
+
}), y[2] = T, y[3] = E);
|
|
33
|
+
let D;
|
|
34
|
+
y[4] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(ChevronRight, { className: "text-muted-foreground ml-auto h-3.5 w-3.5 transition-transform group-data-[state=open]/collapsible:rotate-90" }), y[4] = D) : D = y[4];
|
|
35
|
+
let O;
|
|
36
|
+
y[5] === E ? O = y[6] : (O = /* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
35
37
|
asChild: !0,
|
|
36
|
-
children: /* @__PURE__ */ jsxs(
|
|
37
|
-
className: "group/trigger font-medium",
|
|
38
|
+
children: /* @__PURE__ */ jsxs("button", {
|
|
39
|
+
className: "hover:bg-accent hover:text-accent-foreground group/trigger flex w-full items-center gap-2 rounded-md p-2 text-left text-sm font-medium",
|
|
38
40
|
children: [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
w,
|
|
42
|
+
E,
|
|
43
|
+
D
|
|
42
44
|
]
|
|
43
45
|
})
|
|
44
|
-
}),
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
let
|
|
48
|
-
|
|
46
|
+
}), y[5] = E, y[6] = O);
|
|
47
|
+
let k;
|
|
48
|
+
y[7] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ jsx("div", { className: "from-primary/60 via-primary/30 to-muted/20 absolute top-7 bottom-3 left-1.75 w-0.5 rounded-full bg-linear-to-b" }), y[7] = k) : k = y[7];
|
|
49
|
+
let A;
|
|
50
|
+
y[8] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ jsx("div", {
|
|
49
51
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
50
52
|
children: /* @__PURE__ */ jsx("div", { className: "border-primary/60 bg-primary/20 flex h-4 w-4 items-center justify-center rounded-full border-2" })
|
|
51
|
-
}),
|
|
52
|
-
let
|
|
53
|
-
|
|
53
|
+
}), y[8] = A) : A = y[8];
|
|
54
|
+
let j;
|
|
55
|
+
y[9] === Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ jsxs("div", {
|
|
54
56
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
55
|
-
children: [
|
|
57
|
+
children: [A, /* @__PURE__ */ jsx("div", {
|
|
56
58
|
className: "flex min-w-0 flex-1 items-center gap-1.5",
|
|
57
59
|
children: /* @__PURE__ */ jsx("span", {
|
|
58
60
|
className: "bg-muted text-foreground w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
59
61
|
children: "start"
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
|
-
}),
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
64
|
+
}), y[9] = j) : j = y[9];
|
|
65
|
+
let M;
|
|
66
|
+
if (y[10] !== C) {
|
|
65
67
|
let e;
|
|
66
|
-
|
|
68
|
+
y[12] === C.length ? e = y[13] : (e = (e, p) => {
|
|
67
69
|
console.log(e);
|
|
68
|
-
let
|
|
70
|
+
let m = e.data?.transition, h = Object.keys(e.data?.tools ?? {}), g = p === C.length - 1, _ = e.data?.place ?? m?.to ?? "unknown", v = m?.id;
|
|
69
71
|
return /* @__PURE__ */ jsxs("div", {
|
|
70
72
|
className: "group/entry relative flex gap-3 py-1 pl-0",
|
|
71
73
|
children: [/* @__PURE__ */ jsx("div", {
|
|
72
74
|
className: "relative z-10 flex shrink-0 items-center justify-center",
|
|
73
75
|
children: /* @__PURE__ */ jsx("div", {
|
|
74
|
-
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all",
|
|
75
|
-
children:
|
|
76
|
+
className: cn("flex h-4 w-4 items-center justify-center rounded-full border-2 transition-all", g ? "border-primary bg-primary shadow-primary/40 shadow-sm" : "border-muted-foreground/30 bg-background"),
|
|
77
|
+
children: g && /* @__PURE__ */ jsx("div", { className: "bg-primary-foreground h-1.5 w-1.5 animate-pulse rounded-full" })
|
|
76
78
|
})
|
|
77
79
|
}), /* @__PURE__ */ jsxs("div", {
|
|
78
80
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
79
81
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
80
82
|
className: "flex items-baseline gap-1.5",
|
|
81
83
|
children: [/* @__PURE__ */ jsx("span", {
|
|
82
|
-
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium",
|
|
83
|
-
children:
|
|
84
|
-
}),
|
|
84
|
+
className: cn("w-fit truncate rounded px-1.5 py-0.5 font-mono text-xs font-medium", g ? "bg-primary/15 text-primary" : "bg-muted/60 text-muted-foreground"),
|
|
85
|
+
children: _
|
|
86
|
+
}), v && /* @__PURE__ */ jsxs("span", {
|
|
85
87
|
className: "text-muted-foreground truncate text-[10px] italic",
|
|
86
88
|
children: [
|
|
87
89
|
"(via ",
|
|
88
|
-
|
|
90
|
+
v,
|
|
89
91
|
")"
|
|
90
92
|
]
|
|
91
93
|
})]
|
|
92
94
|
}), /* @__PURE__ */ jsxs("div", {
|
|
93
95
|
className: "text-muted-foreground flex items-center gap-2 text-[10px]",
|
|
94
|
-
children: [
|
|
96
|
+
children: [h.length > 0 && /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
95
97
|
asChild: !0,
|
|
96
98
|
children: /* @__PURE__ */ jsxs("div", {
|
|
97
99
|
className: "flex cursor-default items-center gap-0.5",
|
|
98
100
|
children: [/* @__PURE__ */ jsx(Wrench, { className: "h-3 w-3" }), /* @__PURE__ */ jsx("span", {
|
|
99
101
|
className: "tabular-nums",
|
|
100
|
-
children:
|
|
102
|
+
children: h.length
|
|
101
103
|
})]
|
|
102
104
|
})
|
|
103
105
|
}), /* @__PURE__ */ jsxs(TooltipContent, {
|
|
@@ -108,7 +110,7 @@ var WorkflowHistoryItem_default = (x) => {
|
|
|
108
110
|
children: "Tools used:"
|
|
109
111
|
}), /* @__PURE__ */ jsx("p", {
|
|
110
112
|
className: "text-muted-foreground text-[11px]",
|
|
111
|
-
children:
|
|
113
|
+
children: h.join(", ")
|
|
112
114
|
})]
|
|
113
115
|
})] }), /* @__PURE__ */ jsxs("div", {
|
|
114
116
|
className: "flex items-center gap-0.5",
|
|
@@ -120,25 +122,28 @@ var WorkflowHistoryItem_default = (x) => {
|
|
|
120
122
|
})]
|
|
121
123
|
})]
|
|
122
124
|
}, e.version);
|
|
123
|
-
},
|
|
124
|
-
} else
|
|
125
|
-
let
|
|
126
|
-
|
|
127
|
-
className: "ml-2
|
|
125
|
+
}, y[12] = C.length, y[13] = e), M = C.map(e), y[10] = C, y[11] = M;
|
|
126
|
+
} else M = y[11];
|
|
127
|
+
let N;
|
|
128
|
+
y[14] === M ? N = y[15] : (N = /* @__PURE__ */ jsx(CollapsibleContent, { children: /* @__PURE__ */ jsx("ul", {
|
|
129
|
+
className: "ml-2 flex min-w-0 flex-col gap-1 pl-0",
|
|
128
130
|
children: /* @__PURE__ */ jsxs("div", {
|
|
129
131
|
className: "relative py-2",
|
|
130
132
|
children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
k,
|
|
134
|
+
j,
|
|
135
|
+
M
|
|
134
136
|
]
|
|
135
137
|
})
|
|
136
|
-
}) }),
|
|
137
|
-
let
|
|
138
|
-
return
|
|
138
|
+
}) }), y[14] = M, y[15] = N);
|
|
139
|
+
let P;
|
|
140
|
+
return y[16] !== N || y[17] !== O ? (P = /* @__PURE__ */ jsx(Collapsible, {
|
|
139
141
|
defaultOpen: !0,
|
|
140
142
|
className: "group/collapsible",
|
|
141
|
-
children: /* @__PURE__ */ jsxs(
|
|
142
|
-
|
|
143
|
+
children: /* @__PURE__ */ jsxs("li", {
|
|
144
|
+
className: "group/menu-item relative list-none",
|
|
145
|
+
children: [O, N]
|
|
146
|
+
})
|
|
147
|
+
}), y[16] = N, y[17] = O, y[18] = P) : P = y[18], P;
|
|
143
148
|
};
|
|
144
149
|
export { WorkflowHistoryItem_default as default };
|
|
@@ -1,85 +1,103 @@
|
|
|
1
1
|
import { useStudio } from "../../../../providers/StudioProvider.js";
|
|
2
|
-
import { useDeleteWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
2
|
+
import { useDeleteWorkflow, useWorkflow } from "../../../../hooks/useWorkflows.js";
|
|
3
3
|
import { Button } from "../../../../components/ui/button.js";
|
|
4
4
|
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "../../../../components/ui/alert-dialog.js";
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../../components/ui/tooltip.js";
|
|
5
6
|
import { useRunPipeline } from "../../../../hooks/useProcessor.js";
|
|
6
7
|
import { c } from "react/compiler-runtime";
|
|
7
8
|
import React from "react";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { LockOpen,
|
|
10
|
-
var WorkflowButtons_default = (
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
pipelineId:
|
|
10
|
+
import { LockOpen, Repeat } from "lucide-react";
|
|
11
|
+
var WorkflowButtons_default = (T) => {
|
|
12
|
+
let E = c(36), { pipeline: D, workflowId: O } = T, { router: k } = useStudio(), A = useWorkflow(O).data, j = useDeleteWorkflow(), M = useRunPipeline(), N;
|
|
13
|
+
E[0] !== D.id || E[1] !== M ? (N = () => {
|
|
14
|
+
M.mutate({
|
|
15
|
+
pipelineId: D.id,
|
|
15
16
|
runPipelinePayloadDto: {},
|
|
16
17
|
force: !1
|
|
17
18
|
});
|
|
18
|
-
},
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
pipelineId:
|
|
19
|
+
}, E[0] = D.id, E[1] = M, E[2] = N) : N = E[2];
|
|
20
|
+
let P = N, F;
|
|
21
|
+
E[3] !== D.id || E[4] !== M || E[5] !== O ? (F = () => {
|
|
22
|
+
M.mutate({
|
|
23
|
+
pipelineId: D.id,
|
|
23
24
|
runPipelinePayloadDto: { transition: {
|
|
24
25
|
name: "unlock",
|
|
25
|
-
workflowId:
|
|
26
|
+
workflowId: O
|
|
26
27
|
} },
|
|
27
28
|
force: !1
|
|
28
29
|
});
|
|
29
|
-
},
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
try {
|
|
33
|
-
|
|
34
|
-
} catch (
|
|
35
|
-
let
|
|
36
|
-
console.error("Mutation failed:",
|
|
30
|
+
}, E[3] = D.id, E[4] = M, E[5] = O, E[6] = F) : F = E[6];
|
|
31
|
+
let I = F, L;
|
|
32
|
+
E[7] !== j || E[8] !== P || E[9] !== D.id || E[10] !== k || E[11] !== A ? (L = () => {
|
|
33
|
+
if (A) try {
|
|
34
|
+
j.mutate(A), P(), k.navigateToPipeline(D.id);
|
|
35
|
+
} catch (t) {
|
|
36
|
+
let w = t;
|
|
37
|
+
console.error("Mutation failed:", w);
|
|
37
38
|
}
|
|
38
|
-
},
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
let
|
|
42
|
-
|
|
39
|
+
}, E[7] = j, E[8] = P, E[9] = D.id, E[10] = k, E[11] = A, E[12] = L) : L = E[12];
|
|
40
|
+
let R = L;
|
|
41
|
+
if (!A) return null;
|
|
42
|
+
let z;
|
|
43
|
+
E[13] === j.isPending ? z = E[14] : (z = j.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(Repeat, { className: "h-3.5 w-3.5" }), E[13] = j.isPending, E[14] = z);
|
|
44
|
+
let B;
|
|
45
|
+
E[15] !== j.isPending || E[16] !== z ? (B = /* @__PURE__ */ jsx(TooltipTrigger, {
|
|
43
46
|
asChild: !0,
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
48
|
+
asChild: !0,
|
|
49
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
50
|
+
variant: "ghost",
|
|
51
|
+
size: "icon",
|
|
52
|
+
className: "h-7 w-7",
|
|
53
|
+
disabled: j.isPending,
|
|
54
|
+
children: z
|
|
55
|
+
})
|
|
49
56
|
})
|
|
50
|
-
}),
|
|
51
|
-
let
|
|
52
|
-
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
}), E[15] = j.isPending, E[16] = z, E[17] = B) : B = E[17];
|
|
58
|
+
let V;
|
|
59
|
+
E[18] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsx(TooltipContent, { children: "Repeat" }), E[18] = V) : V = E[18];
|
|
60
|
+
let H;
|
|
61
|
+
E[19] === B ? H = E[20] : (H = /* @__PURE__ */ jsxs(Tooltip, { children: [B, V] }), E[19] = B, E[20] = H);
|
|
62
|
+
let U;
|
|
63
|
+
E[21] === Symbol.for("react.memo_cache_sentinel") ? (U = /* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Repeat workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "This will delete the current workflow run and re-trigger the pipeline." })] }), E[21] = U) : U = E[21];
|
|
64
|
+
let W;
|
|
65
|
+
E[22] === Symbol.for("react.memo_cache_sentinel") ? (W = /* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), E[22] = W) : W = E[22];
|
|
66
|
+
let G;
|
|
67
|
+
E[23] === R ? G = E[24] : (G = /* @__PURE__ */ jsxs(AlertDialogContent, { children: [U, /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [W, /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
68
|
+
onClick: R,
|
|
69
|
+
children: "Repeat"
|
|
70
|
+
})] })] }), E[23] = R, E[24] = G);
|
|
71
|
+
let K;
|
|
72
|
+
E[25] !== G || E[26] !== H ? (K = /* @__PURE__ */ jsxs(AlertDialog, { children: [H, G] }), E[25] = G, E[26] = H, E[27] = K) : K = E[27];
|
|
73
|
+
let q;
|
|
74
|
+
E[28] !== I || E[29] !== M.isPending || E[30] !== A.availableTransitions || E[31] !== A.place ? (q = A.place === "end" && A.availableTransitions?.find(_temp2) && /* @__PURE__ */ jsxs(AlertDialog, { children: [/* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
65
75
|
asChild: !0,
|
|
66
|
-
children: /* @__PURE__ */
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
76
|
+
children: /* @__PURE__ */ jsx(AlertDialogTrigger, {
|
|
77
|
+
asChild: !0,
|
|
78
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
79
|
+
variant: "ghost",
|
|
80
|
+
size: "icon",
|
|
81
|
+
className: "h-7 w-7",
|
|
82
|
+
disabled: M.isPending,
|
|
83
|
+
children: M.isPending ? /* @__PURE__ */ jsx("div", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : /* @__PURE__ */ jsx(LockOpen, { className: "h-3.5 w-3.5" })
|
|
84
|
+
})
|
|
71
85
|
})
|
|
72
|
-
}), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
73
|
-
onClick:
|
|
86
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: "Unlock Step" })] }), /* @__PURE__ */ jsxs(AlertDialogContent, { children: [/* @__PURE__ */ jsxs(AlertDialogHeader, { children: [/* @__PURE__ */ jsx(AlertDialogTitle, { children: "Unlock workflow" }), /* @__PURE__ */ jsx(AlertDialogDescription, { children: "Are you sure you want to unlock this workflow?" })] }), /* @__PURE__ */ jsxs(AlertDialogFooter, { children: [/* @__PURE__ */ jsx(AlertDialogCancel, { children: "Cancel" }), /* @__PURE__ */ jsx(AlertDialogAction, {
|
|
87
|
+
onClick: I,
|
|
74
88
|
children: "Unlock"
|
|
75
|
-
})] })] })] }),
|
|
76
|
-
let
|
|
77
|
-
return
|
|
78
|
-
className: "flex",
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
})] })] })] }), E[28] = I, E[29] = M.isPending, E[30] = A.availableTransitions, E[31] = A.place, E[32] = q) : q = E[32];
|
|
90
|
+
let J;
|
|
91
|
+
return E[33] !== K || E[34] !== q ? (J = /* @__PURE__ */ jsxs("div", {
|
|
92
|
+
className: "flex items-center",
|
|
93
|
+
onClick: _temp,
|
|
94
|
+
children: [K, q]
|
|
95
|
+
}), E[33] = K, E[34] = q, E[35] = J) : J = E[35], J;
|
|
81
96
|
};
|
|
82
|
-
function _temp(
|
|
83
|
-
return
|
|
97
|
+
function _temp(t) {
|
|
98
|
+
return t.stopPropagation();
|
|
99
|
+
}
|
|
100
|
+
function _temp2(t) {
|
|
101
|
+
return t.id === "unlock";
|
|
84
102
|
}
|
|
85
103
|
export { WorkflowButtons_default as default };
|
|
@@ -7,7 +7,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
7
7
|
import { useForm } from "react-hook-form";
|
|
8
8
|
import "zod";
|
|
9
9
|
var DocumentFormRenderer_default = (l) => {
|
|
10
|
-
let u = c(
|
|
10
|
+
let u = c(39), { pipeline: d, workflow: f, document: p, enabled: m, viewOnly: h } = l, g = useRunPipeline(), _;
|
|
11
11
|
u[0] !== p.content || u[1] !== p.schema.type ? (_ = p.schema.type === "object" ? p.content : { raw: p.content }, u[0] = p.content, u[1] = p.schema.type, u[2] = _) : _ = u[2];
|
|
12
12
|
let v;
|
|
13
13
|
u[3] === _ ? v = u[4] : (v = {
|
|
@@ -52,15 +52,16 @@ var DocumentFormRenderer_default = (l) => {
|
|
|
52
52
|
let k = O, A = p.ui, j = p.schema, M = A?.form?.disabled, N = !m || M || !1, P;
|
|
53
53
|
u[22] === p.ui?.actions ? P = u[23] : (P = p.ui?.actions ?? [], u[22] = p.ui?.actions, u[23] = P);
|
|
54
54
|
let F = P, I = A ?? void 0, L = p.meta?.mimeType, R;
|
|
55
|
-
u[24] !== F || u[25] !== C || u[26] !== N || u[27] !== k || u[28] !== g.isPending ? (R = /* @__PURE__ */ jsx(UiActions_default, {
|
|
55
|
+
u[24] !== F || u[25] !== C || u[26] !== N || u[27] !== k || u[28] !== g.isPending || u[29] !== f.place ? (R = /* @__PURE__ */ jsx(UiActions_default, {
|
|
56
56
|
actions: F,
|
|
57
57
|
onSubmit: k,
|
|
58
58
|
availableTransitions: C,
|
|
59
|
+
currentPlace: f.place,
|
|
59
60
|
disabled: N,
|
|
60
61
|
isLoading: g.isPending
|
|
61
|
-
}), u[24] = F, u[25] = C, u[26] = N, u[27] = k, u[28] = g.isPending, u[29] = R) : R = u[
|
|
62
|
+
}), u[24] = F, u[25] = C, u[26] = N, u[27] = k, u[28] = g.isPending, u[29] = f.place, u[30] = R) : R = u[30];
|
|
62
63
|
let z;
|
|
63
|
-
return u[
|
|
64
|
+
return u[31] !== N || u[32] !== y || u[33] !== j || u[34] !== I || u[35] !== L || u[36] !== R || u[37] !== h ? (z = /* @__PURE__ */ jsx("div", {
|
|
64
65
|
className: "flex",
|
|
65
66
|
children: /* @__PURE__ */ jsx(Form_default, {
|
|
66
67
|
form: y,
|
|
@@ -71,7 +72,7 @@ var DocumentFormRenderer_default = (l) => {
|
|
|
71
72
|
viewOnly: h,
|
|
72
73
|
actions: R
|
|
73
74
|
})
|
|
74
|
-
}), u[
|
|
75
|
+
}), u[31] = N, u[32] = y, u[33] = j, u[34] = I, u[35] = L, u[36] = R, u[37] = h, u[38] = z) : z = u[38], z;
|
|
75
76
|
};
|
|
76
77
|
function _temp(e) {
|
|
77
78
|
return e.id;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var WorkbenchLayoutContext = createContext(null);
|
|
5
|
+
function WorkbenchLayoutProvider(a) {
|
|
6
|
+
let o = c(39), { children: s, pipeline: l, isDeveloperMode: u, workspaceConfig: d, getPreviewUrl: f, getEnvironmentPreviewUrl: p, environments: m, previewPanelOpen: h, onPreviewPanelOpenChange: g } = a, _ = u === void 0 ? !1 : u, [v, y] = useState(null), [b, x] = useState(null), [S, C] = useState("preview"), [w, T] = useState(null), [E, D] = useState(""), O = h !== void 0, k = O ? h ? b ?? "preview" : null : b, A = d?.features?.previewPanel?.enabled ?? !1, j;
|
|
7
|
+
o[0] === m ? j = o[1] : (j = m === void 0 || m.some(_temp), o[0] = m, o[1] = j);
|
|
8
|
+
let M = A && j, N = k !== null, P;
|
|
9
|
+
o[2] !== O || o[3] !== g ? (P = (t) => {
|
|
10
|
+
O && g?.(t !== null), x(t);
|
|
11
|
+
}, o[2] = O, o[3] = g, o[4] = P) : P = o[4];
|
|
12
|
+
let F = P, I;
|
|
13
|
+
o[5] === F ? I = o[6] : (I = (t) => {
|
|
14
|
+
y((a) => a === t ? null : t), F(null);
|
|
15
|
+
}, o[5] = F, o[6] = I);
|
|
16
|
+
let L = I, R;
|
|
17
|
+
o[7] === Symbol.for("react.memo_cache_sentinel") ? (R = () => {
|
|
18
|
+
y(null);
|
|
19
|
+
}, o[7] = R) : R = o[7];
|
|
20
|
+
let z = R, B;
|
|
21
|
+
o[8] !== k || o[9] !== F ? (B = (t) => {
|
|
22
|
+
let a = k === t ? null : t;
|
|
23
|
+
F(a), a && y(null);
|
|
24
|
+
}, o[8] = k, o[9] = F, o[10] = B) : B = o[10];
|
|
25
|
+
let V = B, H;
|
|
26
|
+
o[11] === F ? H = o[12] : (H = () => {
|
|
27
|
+
F(null);
|
|
28
|
+
}, o[11] = F, o[12] = H);
|
|
29
|
+
let U = H, W;
|
|
30
|
+
o[13] === F ? W = o[14] : (W = (t) => {
|
|
31
|
+
D(t), F("preview"), y(null);
|
|
32
|
+
}, o[13] = F, o[14] = W);
|
|
33
|
+
let G = W, K;
|
|
34
|
+
o[15] === V ? K = o[16] : (K = () => {
|
|
35
|
+
V("preview");
|
|
36
|
+
}, o[15] = V, o[16] = K);
|
|
37
|
+
let q = K, J;
|
|
38
|
+
o[17] !== v || o[18] !== S || o[19] !== w || o[20] !== k || o[21] !== U || o[22] !== m || o[23] !== p || o[24] !== f || o[25] !== _ || o[26] !== G || o[27] !== l || o[28] !== M || o[29] !== N || o[30] !== E || o[31] !== L || o[32] !== q || o[33] !== V || o[34] !== d ? (J = {
|
|
39
|
+
pipeline: l,
|
|
40
|
+
previewPanelEnabled: M,
|
|
41
|
+
isDeveloperMode: _,
|
|
42
|
+
workspaceConfig: d,
|
|
43
|
+
getPreviewUrl: f,
|
|
44
|
+
getEnvironmentPreviewUrl: p,
|
|
45
|
+
environments: m,
|
|
46
|
+
activeFloatingPanel: v,
|
|
47
|
+
toggleFloatingPanel: L,
|
|
48
|
+
closeFloatingPanel: z,
|
|
49
|
+
activeSidePanel: k,
|
|
50
|
+
toggleSidePanel: V,
|
|
51
|
+
closeSidePanel: U,
|
|
52
|
+
selectedSlotId: E,
|
|
53
|
+
setSelectedSlotId: D,
|
|
54
|
+
openPreviewWithEnvironment: G,
|
|
55
|
+
previewPanelOpen: N,
|
|
56
|
+
togglePreviewPanel: q,
|
|
57
|
+
activePreviewTab: S,
|
|
58
|
+
setActivePreviewTab: C,
|
|
59
|
+
activeSectionId: w,
|
|
60
|
+
setActiveSectionId: T
|
|
61
|
+
}, o[17] = v, o[18] = S, o[19] = w, o[20] = k, o[21] = U, o[22] = m, o[23] = p, o[24] = f, o[25] = _, o[26] = G, o[27] = l, o[28] = M, o[29] = N, o[30] = E, o[31] = L, o[32] = q, o[33] = V, o[34] = d, o[35] = J) : J = o[35];
|
|
62
|
+
let Y = J, X;
|
|
63
|
+
return o[36] !== s || o[37] !== Y ? (X = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
64
|
+
value: Y,
|
|
65
|
+
children: s
|
|
66
|
+
}), o[36] = s, o[37] = Y, o[38] = X) : X = o[38], X;
|
|
67
|
+
}
|
|
68
|
+
function _temp(t) {
|
|
69
|
+
return !!t.connectionUrl && !!t.workerId;
|
|
70
|
+
}
|
|
71
|
+
function useWorkbenchLayout() {
|
|
72
|
+
let t = useContext(WorkbenchLayoutContext);
|
|
73
|
+
if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
74
|
+
return t;
|
|
75
|
+
}
|
|
76
|
+
const WorkbenchContextProvider = createContext(null);
|
|
77
|
+
export { WorkbenchContextProvider, WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
|
+
import { useWorkspaceConfig } from "../../hooks/useConfig.js";
|
|
2
3
|
import { useBatchDeleteWorkspaces, useDeleteWorkspace, useFilterWorkspaces, useSetFavouriteWorkspace } from "../../hooks/useWorkspaces.js";
|
|
3
4
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
4
5
|
import { Badge } from "../../components/ui/badge.js";
|
|
5
6
|
import { Dialog, DialogContent } from "../../components/ui/dialog.js";
|
|
6
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../components/ui/tooltip.js";
|
|
7
8
|
import ListView_default from "../../components/lists/ListView.js";
|
|
8
|
-
import { useWorkspaceConfig } from "../../hooks/useConfig.js";
|
|
9
9
|
import { useDebounce } from "../../hooks/useDebounce.js";
|
|
10
10
|
import CreateWorkspace_default from "./components/CreateWorkspace.js";
|
|
11
11
|
import { c } from "react/compiler-runtime";
|
|
@@ -200,7 +200,7 @@ function _temp(e) {
|
|
|
200
200
|
function _temp2(e) {
|
|
201
201
|
return /* @__PURE__ */ jsxs(Badge, {
|
|
202
202
|
variant: "secondary",
|
|
203
|
-
children: [e.
|
|
203
|
+
children: [e.envName ?? e.remoteEnvironmentId.slice(0, 8), e.type && /* @__PURE__ */ jsxs("span", {
|
|
204
204
|
className: "text-muted-foreground ml-1",
|
|
205
205
|
children: [
|
|
206
206
|
"(",
|