@ucdjs/pipelines-ui 0.0.1-beta.1
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/LICENSE +21 -0
- package/README.md +27 -0
- package/dist/components/detail/execution-result.d.mts +49 -0
- package/dist/components/detail/execution-result.mjs +366 -0
- package/dist/components/detail/version-selector.d.mts +21 -0
- package/dist/components/detail/version-selector.mjs +132 -0
- package/dist/components/graph/details.d.mts +14 -0
- package/dist/components/graph/details.mjs +369 -0
- package/dist/components/graph/filters.d.mts +14 -0
- package/dist/components/graph/filters.mjs +183 -0
- package/dist/components/graph/node-types.d.mts +10 -0
- package/dist/components/graph/node-types.mjs +13 -0
- package/dist/components/graph/nodes.d.mts +14 -0
- package/dist/components/graph/nodes.mjs +264 -0
- package/dist/components/graph/pipeline-graph.d.mts +15 -0
- package/dist/components/graph/pipeline-graph.mjs +241 -0
- package/dist/components/logs/execution-log-payload.d.mts +12 -0
- package/dist/components/logs/execution-log-payload.mjs +79 -0
- package/dist/components/logs/execution-log-table.d.mts +16 -0
- package/dist/components/logs/execution-log-table.mjs +121 -0
- package/dist/components/logs/execution-span-drawer.d.mts +16 -0
- package/dist/components/logs/execution-span-drawer.mjs +208 -0
- package/dist/components/logs/execution-waterfall.d.mts +18 -0
- package/dist/components/logs/execution-waterfall.mjs +354 -0
- package/dist/components/pipeline-sidebar.d.mts +6 -0
- package/dist/components/pipeline-sidebar.mjs +190 -0
- package/dist/components/status-badge.d.mts +11 -0
- package/dist/components/status-badge.mjs +50 -0
- package/dist/components/status-icon.d.mts +11 -0
- package/dist/components/status-icon.mjs +46 -0
- package/dist/hooks/index.d.mts +7 -0
- package/dist/hooks/index.mjs +8 -0
- package/dist/hooks/use-event-view.d.mts +19 -0
- package/dist/hooks/use-event-view.mjs +112 -0
- package/dist/hooks/use-execute.d.mts +20 -0
- package/dist/hooks/use-execute.mjs +68 -0
- package/dist/hooks/use-pipeline-file.d.mts +20 -0
- package/dist/hooks/use-pipeline-file.mjs +39 -0
- package/dist/hooks/use-pipeline-versions.d.mts +10 -0
- package/dist/hooks/use-pipeline-versions.mjs +137 -0
- package/dist/hooks/use-pipeline.d.mts +21 -0
- package/dist/hooks/use-pipeline.mjs +46 -0
- package/dist/hooks/use-pipelines.d.mts +26 -0
- package/dist/hooks/use-pipelines.mjs +38 -0
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +29 -0
- package/dist/lib/adapter.d.mts +26 -0
- package/dist/lib/adapter.mjs +74 -0
- package/dist/lib/colors.d.mts +7 -0
- package/dist/lib/colors.mjs +15 -0
- package/dist/lib/execution-logs.d.mts +19 -0
- package/dist/lib/execution-logs.mjs +74 -0
- package/dist/lib/format-time.d.mts +4 -0
- package/dist/lib/format-time.mjs +7 -0
- package/dist/lib/index.d.mts +5 -0
- package/dist/lib/index.mjs +6 -0
- package/dist/lib/layout.d.mts +8 -0
- package/dist/lib/layout.mjs +71 -0
- package/dist/lib/pipeline-utils.d.mts +9 -0
- package/dist/lib/pipeline-utils.mjs +49 -0
- package/dist/lib/utils.d.mts +6 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/styles/globals.css +3 -0
- package/dist/types.d.mts +143 -0
- package/package.json +95 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { Handle, Position } from "@xyflow/react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/graph/nodes.tsx
|
|
7
|
+
const nodeTypeStyles = {
|
|
8
|
+
source: {
|
|
9
|
+
bg: "#eef2ff",
|
|
10
|
+
border: "#a5b4fc",
|
|
11
|
+
iconBg: "#6366f1",
|
|
12
|
+
icon: "S"
|
|
13
|
+
},
|
|
14
|
+
file: {
|
|
15
|
+
bg: "#ecfdf5",
|
|
16
|
+
border: "#6ee7b7",
|
|
17
|
+
iconBg: "#10b981",
|
|
18
|
+
icon: "F"
|
|
19
|
+
},
|
|
20
|
+
route: {
|
|
21
|
+
bg: "#fffbeb",
|
|
22
|
+
border: "#fcd34d",
|
|
23
|
+
iconBg: "#f59e0b",
|
|
24
|
+
icon: "R"
|
|
25
|
+
},
|
|
26
|
+
artifact: {
|
|
27
|
+
bg: "#f5f3ff",
|
|
28
|
+
border: "#c4b5fd",
|
|
29
|
+
iconBg: "#8b5cf6",
|
|
30
|
+
icon: "A"
|
|
31
|
+
},
|
|
32
|
+
output: {
|
|
33
|
+
bg: "#f0f9ff",
|
|
34
|
+
border: "#7dd3fc",
|
|
35
|
+
iconBg: "#0ea5e9",
|
|
36
|
+
icon: "O"
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const defaultStyle = {
|
|
40
|
+
bg: "#f9fafb",
|
|
41
|
+
border: "#d1d5db",
|
|
42
|
+
iconBg: "#6b7280",
|
|
43
|
+
icon: "?"
|
|
44
|
+
};
|
|
45
|
+
const flexCenterStyle = {
|
|
46
|
+
display: "flex",
|
|
47
|
+
alignItems: "center"
|
|
48
|
+
};
|
|
49
|
+
const labelContainerStyle = {
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
overflow: "hidden",
|
|
53
|
+
marginLeft: "10px"
|
|
54
|
+
};
|
|
55
|
+
const typeStyle = {
|
|
56
|
+
fontSize: "10px",
|
|
57
|
+
textTransform: "uppercase",
|
|
58
|
+
letterSpacing: "0.05em",
|
|
59
|
+
color: "#6b7280",
|
|
60
|
+
marginBottom: "1px"
|
|
61
|
+
};
|
|
62
|
+
const labelStyle = {
|
|
63
|
+
fontSize: "13px",
|
|
64
|
+
fontWeight: 500,
|
|
65
|
+
color: "#111827",
|
|
66
|
+
whiteSpace: "nowrap",
|
|
67
|
+
overflow: "hidden",
|
|
68
|
+
textOverflow: "ellipsis"
|
|
69
|
+
};
|
|
70
|
+
const containerStyleCache = /* @__PURE__ */ new Map();
|
|
71
|
+
const iconStyleCache = /* @__PURE__ */ new Map();
|
|
72
|
+
const handleStyleCache = /* @__PURE__ */ new Map();
|
|
73
|
+
function getContainerStyle(styles, selected) {
|
|
74
|
+
const key = `${styles.bg}-${styles.border}-${selected}`;
|
|
75
|
+
let cached = containerStyleCache.get(key);
|
|
76
|
+
if (!cached) {
|
|
77
|
+
cached = {
|
|
78
|
+
backgroundColor: styles.bg,
|
|
79
|
+
border: `2px solid ${styles.border}`,
|
|
80
|
+
borderRadius: "10px",
|
|
81
|
+
padding: "10px 14px",
|
|
82
|
+
minWidth: "150px",
|
|
83
|
+
maxWidth: "220px",
|
|
84
|
+
boxShadow: selected ? `0 0 0 2px #3b82f6, 0 1px 3px rgba(0,0,0,0.1)` : "0 1px 3px rgba(0,0,0,0.1)",
|
|
85
|
+
transition: "box-shadow 0.15s ease",
|
|
86
|
+
fontFamily: "system-ui, -apple-system, sans-serif"
|
|
87
|
+
};
|
|
88
|
+
containerStyleCache.set(key, cached);
|
|
89
|
+
}
|
|
90
|
+
return cached;
|
|
91
|
+
}
|
|
92
|
+
function getIconStyle(iconBg) {
|
|
93
|
+
let cached = iconStyleCache.get(iconBg);
|
|
94
|
+
if (!cached) {
|
|
95
|
+
cached = {
|
|
96
|
+
display: "flex",
|
|
97
|
+
alignItems: "center",
|
|
98
|
+
justifyContent: "center",
|
|
99
|
+
width: "28px",
|
|
100
|
+
height: "28px",
|
|
101
|
+
borderRadius: "6px",
|
|
102
|
+
backgroundColor: iconBg,
|
|
103
|
+
color: "#ffffff",
|
|
104
|
+
fontSize: "12px",
|
|
105
|
+
fontWeight: 700,
|
|
106
|
+
flexShrink: 0
|
|
107
|
+
};
|
|
108
|
+
iconStyleCache.set(iconBg, cached);
|
|
109
|
+
}
|
|
110
|
+
return cached;
|
|
111
|
+
}
|
|
112
|
+
function getHandleStyle(border) {
|
|
113
|
+
let cached = handleStyleCache.get(border);
|
|
114
|
+
if (!cached) {
|
|
115
|
+
cached = {
|
|
116
|
+
width: "8px",
|
|
117
|
+
height: "8px",
|
|
118
|
+
backgroundColor: border,
|
|
119
|
+
border: "none"
|
|
120
|
+
};
|
|
121
|
+
handleStyleCache.set(border, cached);
|
|
122
|
+
}
|
|
123
|
+
return cached;
|
|
124
|
+
}
|
|
125
|
+
function BaseNode(t0) {
|
|
126
|
+
const $ = c(31);
|
|
127
|
+
const { data, selected: t1, type } = t0;
|
|
128
|
+
const selected = t1 === void 0 ? false : t1;
|
|
129
|
+
const styles = nodeTypeStyles[type] ?? defaultStyle;
|
|
130
|
+
let t2;
|
|
131
|
+
if ($[0] !== selected || $[1] !== styles) {
|
|
132
|
+
t2 = getContainerStyle(styles, selected);
|
|
133
|
+
$[0] = selected;
|
|
134
|
+
$[1] = styles;
|
|
135
|
+
$[2] = t2;
|
|
136
|
+
} else t2 = $[2];
|
|
137
|
+
let t3;
|
|
138
|
+
if ($[3] !== styles.border) {
|
|
139
|
+
t3 = getHandleStyle(styles.border);
|
|
140
|
+
$[3] = styles.border;
|
|
141
|
+
$[4] = t3;
|
|
142
|
+
} else t3 = $[4];
|
|
143
|
+
let t4;
|
|
144
|
+
if ($[5] !== t3) {
|
|
145
|
+
t4 = /* @__PURE__ */ jsx(Handle, {
|
|
146
|
+
type: "target",
|
|
147
|
+
position: Position.Left,
|
|
148
|
+
style: t3
|
|
149
|
+
});
|
|
150
|
+
$[5] = t3;
|
|
151
|
+
$[6] = t4;
|
|
152
|
+
} else t4 = $[6];
|
|
153
|
+
let t5;
|
|
154
|
+
if ($[7] !== styles.iconBg) {
|
|
155
|
+
t5 = getIconStyle(styles.iconBg);
|
|
156
|
+
$[7] = styles.iconBg;
|
|
157
|
+
$[8] = t5;
|
|
158
|
+
} else t5 = $[8];
|
|
159
|
+
let t6;
|
|
160
|
+
if ($[9] !== styles.icon || $[10] !== t5) {
|
|
161
|
+
t6 = /* @__PURE__ */ jsx("span", {
|
|
162
|
+
style: t5,
|
|
163
|
+
children: styles.icon
|
|
164
|
+
});
|
|
165
|
+
$[9] = styles.icon;
|
|
166
|
+
$[10] = t5;
|
|
167
|
+
$[11] = t6;
|
|
168
|
+
} else t6 = $[11];
|
|
169
|
+
let t7;
|
|
170
|
+
if ($[12] !== type) {
|
|
171
|
+
t7 = /* @__PURE__ */ jsx("span", {
|
|
172
|
+
style: typeStyle,
|
|
173
|
+
children: type
|
|
174
|
+
});
|
|
175
|
+
$[12] = type;
|
|
176
|
+
$[13] = t7;
|
|
177
|
+
} else t7 = $[13];
|
|
178
|
+
let t8;
|
|
179
|
+
if ($[14] !== data.label) {
|
|
180
|
+
t8 = /* @__PURE__ */ jsx("span", {
|
|
181
|
+
style: labelStyle,
|
|
182
|
+
title: data.label,
|
|
183
|
+
children: data.label
|
|
184
|
+
});
|
|
185
|
+
$[14] = data.label;
|
|
186
|
+
$[15] = t8;
|
|
187
|
+
} else t8 = $[15];
|
|
188
|
+
let t9;
|
|
189
|
+
if ($[16] !== t7 || $[17] !== t8) {
|
|
190
|
+
t9 = /* @__PURE__ */ jsxs("div", {
|
|
191
|
+
style: labelContainerStyle,
|
|
192
|
+
children: [t7, t8]
|
|
193
|
+
});
|
|
194
|
+
$[16] = t7;
|
|
195
|
+
$[17] = t8;
|
|
196
|
+
$[18] = t9;
|
|
197
|
+
} else t9 = $[18];
|
|
198
|
+
let t10;
|
|
199
|
+
if ($[19] !== t6 || $[20] !== t9) {
|
|
200
|
+
t10 = /* @__PURE__ */ jsxs("div", {
|
|
201
|
+
style: flexCenterStyle,
|
|
202
|
+
children: [t6, t9]
|
|
203
|
+
});
|
|
204
|
+
$[19] = t6;
|
|
205
|
+
$[20] = t9;
|
|
206
|
+
$[21] = t10;
|
|
207
|
+
} else t10 = $[21];
|
|
208
|
+
let t11;
|
|
209
|
+
if ($[22] !== styles.border) {
|
|
210
|
+
t11 = getHandleStyle(styles.border);
|
|
211
|
+
$[22] = styles.border;
|
|
212
|
+
$[23] = t11;
|
|
213
|
+
} else t11 = $[23];
|
|
214
|
+
let t12;
|
|
215
|
+
if ($[24] !== t11) {
|
|
216
|
+
t12 = /* @__PURE__ */ jsx(Handle, {
|
|
217
|
+
type: "source",
|
|
218
|
+
position: Position.Right,
|
|
219
|
+
style: t11
|
|
220
|
+
});
|
|
221
|
+
$[24] = t11;
|
|
222
|
+
$[25] = t12;
|
|
223
|
+
} else t12 = $[25];
|
|
224
|
+
let t13;
|
|
225
|
+
if ($[26] !== t10 || $[27] !== t12 || $[28] !== t2 || $[29] !== t4) {
|
|
226
|
+
t13 = /* @__PURE__ */ jsxs("div", {
|
|
227
|
+
style: t2,
|
|
228
|
+
children: [
|
|
229
|
+
t4,
|
|
230
|
+
t10,
|
|
231
|
+
t12
|
|
232
|
+
]
|
|
233
|
+
});
|
|
234
|
+
$[26] = t10;
|
|
235
|
+
$[27] = t12;
|
|
236
|
+
$[28] = t2;
|
|
237
|
+
$[29] = t4;
|
|
238
|
+
$[30] = t13;
|
|
239
|
+
} else t13 = $[30];
|
|
240
|
+
return t13;
|
|
241
|
+
}
|
|
242
|
+
function createNodeComponent(type) {
|
|
243
|
+
return memo((props) => {
|
|
244
|
+
const $ = c(2);
|
|
245
|
+
let t0;
|
|
246
|
+
if ($[0] !== props) {
|
|
247
|
+
t0 = /* @__PURE__ */ jsx(BaseNode, {
|
|
248
|
+
...props,
|
|
249
|
+
type
|
|
250
|
+
});
|
|
251
|
+
$[0] = props;
|
|
252
|
+
$[1] = t0;
|
|
253
|
+
} else t0 = $[1];
|
|
254
|
+
return t0;
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
const SourceNode = createNodeComponent("source");
|
|
258
|
+
const FileNode = createNodeComponent("file");
|
|
259
|
+
const RouteNode = createNodeComponent("route");
|
|
260
|
+
const ArtifactNode = createNodeComponent("artifact");
|
|
261
|
+
const OutputNode = createNodeComponent("output");
|
|
262
|
+
|
|
263
|
+
//#endregion
|
|
264
|
+
export { ArtifactNode, FileNode, OutputNode, RouteNode, SourceNode };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "@xyflow/react/dist/style.css";
|
|
2
|
+
import { PipelineGraph, PipelineGraphNode } from "@ucdjs/pipelines-core";
|
|
3
|
+
|
|
4
|
+
//#region src/components/graph/pipeline-graph.d.ts
|
|
5
|
+
interface PipelineGraphProps {
|
|
6
|
+
graph: PipelineGraph;
|
|
7
|
+
onNodeSelect?: (node: PipelineGraphNode | null) => void;
|
|
8
|
+
showFilters?: boolean;
|
|
9
|
+
showDetails?: boolean;
|
|
10
|
+
showMinimap?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const PipelineGraph$1: any;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { PipelineGraph$1 as PipelineGraph, PipelineGraphProps };
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { PipelineGraphDetails } from "./details.mjs";
|
|
2
|
+
import { PipelineGraphFilters } from "./filters.mjs";
|
|
3
|
+
import { nodeTypes } from "./node-types.mjs";
|
|
4
|
+
import { filterNodesByType, pipelineGraphToFlow } from "../../lib/adapter.mjs";
|
|
5
|
+
import { getNodeColor } from "../../lib/colors.mjs";
|
|
6
|
+
import { applyLayout } from "../../lib/layout.mjs";
|
|
7
|
+
import { c } from "react/compiler-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { memo, useState } from "react";
|
|
10
|
+
import { Background, Controls, MiniMap, ReactFlow } from "@xyflow/react";
|
|
11
|
+
import "@xyflow/react/dist/style.css";
|
|
12
|
+
|
|
13
|
+
//#region src/components/graph/pipeline-graph.tsx
|
|
14
|
+
const defaultVisibleTypes = new Set([
|
|
15
|
+
"source",
|
|
16
|
+
"file",
|
|
17
|
+
"route",
|
|
18
|
+
"artifact",
|
|
19
|
+
"output"
|
|
20
|
+
]);
|
|
21
|
+
const containerStyle = {
|
|
22
|
+
display: "flex",
|
|
23
|
+
height: "100%",
|
|
24
|
+
width: "100%"
|
|
25
|
+
};
|
|
26
|
+
const graphContainerStyle = {
|
|
27
|
+
flex: 1,
|
|
28
|
+
display: "flex",
|
|
29
|
+
flexDirection: "column",
|
|
30
|
+
position: "relative"
|
|
31
|
+
};
|
|
32
|
+
const filtersContainerStyle = {
|
|
33
|
+
position: "absolute",
|
|
34
|
+
top: "12px",
|
|
35
|
+
left: "12px",
|
|
36
|
+
zIndex: 10
|
|
37
|
+
};
|
|
38
|
+
const fitViewOptions = { padding: .2 };
|
|
39
|
+
const proOptions = { hideAttribution: true };
|
|
40
|
+
const minimapMaskColor = "rgba(0, 0, 0, 0.1)";
|
|
41
|
+
const PipelineGraph = memo((t0) => {
|
|
42
|
+
const $ = c(44);
|
|
43
|
+
const { graph, onNodeSelect, showFilters: t1, showDetails: t2, showMinimap: t3, className } = t0;
|
|
44
|
+
const showFilters = t1 === void 0 ? true : t1;
|
|
45
|
+
const showDetails = t2 === void 0 ? true : t2;
|
|
46
|
+
const showMinimap = t3 === void 0 ? true : t3;
|
|
47
|
+
let t4;
|
|
48
|
+
if ($[0] !== graph) {
|
|
49
|
+
t4 = pipelineGraphToFlow(graph);
|
|
50
|
+
$[0] = graph;
|
|
51
|
+
$[1] = t4;
|
|
52
|
+
} else t4 = $[1];
|
|
53
|
+
const { nodes, edges } = t4;
|
|
54
|
+
let t5;
|
|
55
|
+
if ($[2] !== edges || $[3] !== nodes) {
|
|
56
|
+
t5 = {
|
|
57
|
+
allNodes: nodes,
|
|
58
|
+
allEdges: edges
|
|
59
|
+
};
|
|
60
|
+
$[2] = edges;
|
|
61
|
+
$[3] = nodes;
|
|
62
|
+
$[4] = t5;
|
|
63
|
+
} else t5 = $[4];
|
|
64
|
+
const { allNodes, allEdges } = t5;
|
|
65
|
+
const [visibleTypes, setVisibleTypes] = useState(_temp);
|
|
66
|
+
const [selectedNode, setSelectedNode] = useState(null);
|
|
67
|
+
let filteredEdges;
|
|
68
|
+
let t6;
|
|
69
|
+
if ($[5] !== allEdges || $[6] !== allNodes || $[7] !== visibleTypes) {
|
|
70
|
+
const { nodes: filteredNodes, edges: t7 } = filterNodesByType(allNodes, allEdges, visibleTypes);
|
|
71
|
+
filteredEdges = t7;
|
|
72
|
+
t6 = applyLayout(filteredNodes, filteredEdges);
|
|
73
|
+
$[5] = allEdges;
|
|
74
|
+
$[6] = allNodes;
|
|
75
|
+
$[7] = visibleTypes;
|
|
76
|
+
$[8] = filteredEdges;
|
|
77
|
+
$[9] = t6;
|
|
78
|
+
} else {
|
|
79
|
+
filteredEdges = $[8];
|
|
80
|
+
t6 = $[9];
|
|
81
|
+
}
|
|
82
|
+
const positioned = t6;
|
|
83
|
+
let t7;
|
|
84
|
+
if ($[10] !== filteredEdges || $[11] !== positioned) {
|
|
85
|
+
t7 = {
|
|
86
|
+
layoutedNodes: positioned,
|
|
87
|
+
layoutedEdges: filteredEdges
|
|
88
|
+
};
|
|
89
|
+
$[10] = filteredEdges;
|
|
90
|
+
$[11] = positioned;
|
|
91
|
+
$[12] = t7;
|
|
92
|
+
} else t7 = $[12];
|
|
93
|
+
const { layoutedNodes, layoutedEdges } = t7;
|
|
94
|
+
const nodes_0 = layoutedNodes;
|
|
95
|
+
let t8;
|
|
96
|
+
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
97
|
+
t8 = (type) => {
|
|
98
|
+
setVisibleTypes((prev) => {
|
|
99
|
+
const next = new Set(prev);
|
|
100
|
+
if (next.has(type)) {
|
|
101
|
+
if (next.size > 1) next.delete(type);
|
|
102
|
+
} else next.add(type);
|
|
103
|
+
return next;
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
$[13] = t8;
|
|
107
|
+
} else t8 = $[13];
|
|
108
|
+
const handleToggleType = t8;
|
|
109
|
+
let t9;
|
|
110
|
+
if ($[14] !== onNodeSelect) {
|
|
111
|
+
t9 = (_event, node) => {
|
|
112
|
+
const pipelineNode = node.data?.pipelineNode ?? null;
|
|
113
|
+
setSelectedNode(pipelineNode);
|
|
114
|
+
onNodeSelect?.(pipelineNode);
|
|
115
|
+
};
|
|
116
|
+
$[14] = onNodeSelect;
|
|
117
|
+
$[15] = t9;
|
|
118
|
+
} else t9 = $[15];
|
|
119
|
+
const handleNodeClick = t9;
|
|
120
|
+
let t10;
|
|
121
|
+
if ($[16] !== onNodeSelect) {
|
|
122
|
+
t10 = () => {
|
|
123
|
+
setSelectedNode(null);
|
|
124
|
+
onNodeSelect?.(null);
|
|
125
|
+
};
|
|
126
|
+
$[16] = onNodeSelect;
|
|
127
|
+
$[17] = t10;
|
|
128
|
+
} else t10 = $[17];
|
|
129
|
+
const handlePaneClick = t10;
|
|
130
|
+
let t11;
|
|
131
|
+
if ($[18] !== onNodeSelect) {
|
|
132
|
+
t11 = () => {
|
|
133
|
+
setSelectedNode(null);
|
|
134
|
+
onNodeSelect?.(null);
|
|
135
|
+
};
|
|
136
|
+
$[18] = onNodeSelect;
|
|
137
|
+
$[19] = t11;
|
|
138
|
+
} else t11 = $[19];
|
|
139
|
+
const handleCloseDetails = t11;
|
|
140
|
+
let t12;
|
|
141
|
+
if ($[20] !== showFilters || $[21] !== visibleTypes) {
|
|
142
|
+
t12 = showFilters && /* @__PURE__ */ jsx("div", {
|
|
143
|
+
style: filtersContainerStyle,
|
|
144
|
+
children: /* @__PURE__ */ jsx(PipelineGraphFilters, {
|
|
145
|
+
visibleTypes,
|
|
146
|
+
onToggleType: handleToggleType
|
|
147
|
+
})
|
|
148
|
+
});
|
|
149
|
+
$[20] = showFilters;
|
|
150
|
+
$[21] = visibleTypes;
|
|
151
|
+
$[22] = t12;
|
|
152
|
+
} else t12 = $[22];
|
|
153
|
+
let t13;
|
|
154
|
+
let t14;
|
|
155
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
156
|
+
t13 = /* @__PURE__ */ jsx(Background, {});
|
|
157
|
+
t14 = /* @__PURE__ */ jsx(Controls, {});
|
|
158
|
+
$[23] = t13;
|
|
159
|
+
$[24] = t14;
|
|
160
|
+
} else {
|
|
161
|
+
t13 = $[23];
|
|
162
|
+
t14 = $[24];
|
|
163
|
+
}
|
|
164
|
+
let t15;
|
|
165
|
+
if ($[25] !== showMinimap) {
|
|
166
|
+
t15 = showMinimap && /* @__PURE__ */ jsx(MiniMap, {
|
|
167
|
+
nodeColor: getNodeColor,
|
|
168
|
+
maskColor: minimapMaskColor
|
|
169
|
+
});
|
|
170
|
+
$[25] = showMinimap;
|
|
171
|
+
$[26] = t15;
|
|
172
|
+
} else t15 = $[26];
|
|
173
|
+
let t16;
|
|
174
|
+
if ($[27] !== handleNodeClick || $[28] !== handlePaneClick || $[29] !== layoutedEdges || $[30] !== nodes_0 || $[31] !== t15) {
|
|
175
|
+
t16 = /* @__PURE__ */ jsxs(ReactFlow, {
|
|
176
|
+
nodes: nodes_0,
|
|
177
|
+
edges: layoutedEdges,
|
|
178
|
+
onNodeClick: handleNodeClick,
|
|
179
|
+
onPaneClick: handlePaneClick,
|
|
180
|
+
nodeTypes,
|
|
181
|
+
fitView: true,
|
|
182
|
+
fitViewOptions,
|
|
183
|
+
minZoom: .1,
|
|
184
|
+
maxZoom: 2,
|
|
185
|
+
proOptions,
|
|
186
|
+
nodesDraggable: false,
|
|
187
|
+
nodesConnectable: false,
|
|
188
|
+
children: [
|
|
189
|
+
t13,
|
|
190
|
+
t14,
|
|
191
|
+
t15
|
|
192
|
+
]
|
|
193
|
+
});
|
|
194
|
+
$[27] = handleNodeClick;
|
|
195
|
+
$[28] = handlePaneClick;
|
|
196
|
+
$[29] = layoutedEdges;
|
|
197
|
+
$[30] = nodes_0;
|
|
198
|
+
$[31] = t15;
|
|
199
|
+
$[32] = t16;
|
|
200
|
+
} else t16 = $[32];
|
|
201
|
+
let t17;
|
|
202
|
+
if ($[33] !== t12 || $[34] !== t16) {
|
|
203
|
+
t17 = /* @__PURE__ */ jsxs("div", {
|
|
204
|
+
style: graphContainerStyle,
|
|
205
|
+
children: [t12, t16]
|
|
206
|
+
});
|
|
207
|
+
$[33] = t12;
|
|
208
|
+
$[34] = t16;
|
|
209
|
+
$[35] = t17;
|
|
210
|
+
} else t17 = $[35];
|
|
211
|
+
let t18;
|
|
212
|
+
if ($[36] !== handleCloseDetails || $[37] !== selectedNode || $[38] !== showDetails) {
|
|
213
|
+
t18 = showDetails && selectedNode && /* @__PURE__ */ jsx(PipelineGraphDetails, {
|
|
214
|
+
node: selectedNode,
|
|
215
|
+
onClose: handleCloseDetails
|
|
216
|
+
});
|
|
217
|
+
$[36] = handleCloseDetails;
|
|
218
|
+
$[37] = selectedNode;
|
|
219
|
+
$[38] = showDetails;
|
|
220
|
+
$[39] = t18;
|
|
221
|
+
} else t18 = $[39];
|
|
222
|
+
let t19;
|
|
223
|
+
if ($[40] !== className || $[41] !== t17 || $[42] !== t18) {
|
|
224
|
+
t19 = /* @__PURE__ */ jsxs("div", {
|
|
225
|
+
style: containerStyle,
|
|
226
|
+
className,
|
|
227
|
+
children: [t17, t18]
|
|
228
|
+
});
|
|
229
|
+
$[40] = className;
|
|
230
|
+
$[41] = t17;
|
|
231
|
+
$[42] = t18;
|
|
232
|
+
$[43] = t19;
|
|
233
|
+
} else t19 = $[43];
|
|
234
|
+
return t19;
|
|
235
|
+
});
|
|
236
|
+
function _temp() {
|
|
237
|
+
return new Set(defaultVisibleTypes);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
//#endregion
|
|
241
|
+
export { PipelineGraph };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ExecutionLogItem } from "../../types.mjs";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/logs/execution-log-payload.d.ts
|
|
5
|
+
interface ExecutionLogPayloadPanelProps {
|
|
6
|
+
log: ExecutionLogItem | null;
|
|
7
|
+
}
|
|
8
|
+
declare function ExecutionLogPayloadPanel({
|
|
9
|
+
log
|
|
10
|
+
}: ExecutionLogPayloadPanelProps): react.JSX.Element | null;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { ExecutionLogPayloadPanel, ExecutionLogPayloadPanelProps };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Badge } from "@ucdjs-internal/shared-ui/ui/badge";
|
|
4
|
+
|
|
5
|
+
//#region src/components/logs/execution-log-payload.tsx
|
|
6
|
+
function ExecutionLogPayloadPanel(t0) {
|
|
7
|
+
const $ = c(16);
|
|
8
|
+
const { log } = t0;
|
|
9
|
+
if (!log) return null;
|
|
10
|
+
let t1;
|
|
11
|
+
if ($[0] !== log.message || $[1] !== log.payload || $[2] !== log.stream) {
|
|
12
|
+
t1 = log.payload ?? {
|
|
13
|
+
message: log.message,
|
|
14
|
+
stream: log.stream
|
|
15
|
+
};
|
|
16
|
+
$[0] = log.message;
|
|
17
|
+
$[1] = log.payload;
|
|
18
|
+
$[2] = log.stream;
|
|
19
|
+
$[3] = t1;
|
|
20
|
+
} else t1 = $[3];
|
|
21
|
+
const payload = t1;
|
|
22
|
+
let t2;
|
|
23
|
+
if ($[4] !== payload) {
|
|
24
|
+
t2 = JSON.stringify(payload, null, 2);
|
|
25
|
+
$[4] = payload;
|
|
26
|
+
$[5] = t2;
|
|
27
|
+
} else t2 = $[5];
|
|
28
|
+
const jsonString = t2;
|
|
29
|
+
let t3;
|
|
30
|
+
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
32
|
+
className: "text-sm font-medium",
|
|
33
|
+
children: "Payload"
|
|
34
|
+
});
|
|
35
|
+
$[6] = t3;
|
|
36
|
+
} else t3 = $[6];
|
|
37
|
+
let t4;
|
|
38
|
+
if ($[7] !== payload.event) {
|
|
39
|
+
t4 = payload.event && /* @__PURE__ */ jsx(Badge, {
|
|
40
|
+
variant: "outline",
|
|
41
|
+
className: "text-xs",
|
|
42
|
+
children: payload.event.type
|
|
43
|
+
});
|
|
44
|
+
$[7] = payload.event;
|
|
45
|
+
$[8] = t4;
|
|
46
|
+
} else t4 = $[8];
|
|
47
|
+
let t5;
|
|
48
|
+
if ($[9] !== t4) {
|
|
49
|
+
t5 = /* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "flex items-center justify-between mb-3",
|
|
51
|
+
children: [t3, t4]
|
|
52
|
+
});
|
|
53
|
+
$[9] = t4;
|
|
54
|
+
$[10] = t5;
|
|
55
|
+
} else t5 = $[10];
|
|
56
|
+
let t6;
|
|
57
|
+
if ($[11] !== jsonString) {
|
|
58
|
+
t6 = /* @__PURE__ */ jsx("pre", {
|
|
59
|
+
className: "text-xs font-mono whitespace-pre-wrap break-words",
|
|
60
|
+
children: /* @__PURE__ */ jsx("code", { children: jsonString })
|
|
61
|
+
});
|
|
62
|
+
$[11] = jsonString;
|
|
63
|
+
$[12] = t6;
|
|
64
|
+
} else t6 = $[12];
|
|
65
|
+
let t7;
|
|
66
|
+
if ($[13] !== t5 || $[14] !== t6) {
|
|
67
|
+
t7 = /* @__PURE__ */ jsxs("div", {
|
|
68
|
+
className: "border border-border rounded-lg bg-background p-4",
|
|
69
|
+
children: [t5, t6]
|
|
70
|
+
});
|
|
71
|
+
$[13] = t5;
|
|
72
|
+
$[14] = t6;
|
|
73
|
+
$[15] = t7;
|
|
74
|
+
} else t7 = $[15];
|
|
75
|
+
return t7;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
//#endregion
|
|
79
|
+
export { ExecutionLogPayloadPanel };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ExecutionLogItem } from "../../types.mjs";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/logs/execution-log-table.d.ts
|
|
5
|
+
interface ExecutionLogTableProps {
|
|
6
|
+
logs: ExecutionLogItem[];
|
|
7
|
+
expandedLogId: string | null;
|
|
8
|
+
onToggle: (logId: string) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function ExecutionLogTable({
|
|
11
|
+
logs,
|
|
12
|
+
expandedLogId,
|
|
13
|
+
onToggle
|
|
14
|
+
}: ExecutionLogTableProps): react.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { ExecutionLogTable, ExecutionLogTableProps };
|