@notmrabhi/flowforge 0.1.113 → 0.1.115
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/{GatewayBranchEdge-CDNn0TfD.js → GatewayBranchEdge-CQBOd1Bp.js} +2 -2
- package/dist/{GatewayBranchEdge-CDNn0TfD.js.map → GatewayBranchEdge-CQBOd1Bp.js.map} +1 -1
- package/dist/{GatewayBranchEdge-BgktIVzD.js → GatewayBranchEdge-Ceuxbttn.js} +130 -128
- package/dist/{GatewayBranchEdge-BgktIVzD.js.map → GatewayBranchEdge-Ceuxbttn.js.map} +1 -1
- package/dist/{WorkflowExecutionHistory-CFtQjyIb.js → WorkflowExecutionHistory-BhB2RdfX.js} +2 -2
- package/dist/WorkflowExecutionHistory-BhB2RdfX.js.map +1 -0
- package/dist/{WorkflowExecutionHistory-CtdOZdqt.js → WorkflowExecutionHistory-DUVtoDWf.js} +272 -272
- package/dist/WorkflowExecutionHistory-DUVtoDWf.js.map +1 -0
- package/dist/canvas.cjs +1 -1
- package/dist/canvas.d.ts +4 -0
- package/dist/canvas.js +2 -2
- package/dist/defaultUi.cjs +1 -1
- package/dist/defaultUi.d.ts +8 -0
- package/dist/defaultUi.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/dist/WorkflowExecutionHistory-CFtQjyIb.js.map +0 -1
- package/dist/WorkflowExecutionHistory-CtdOZdqt.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as w, jsx as
|
|
1
|
+
import { jsxs as w, jsx as u, Fragment as Se } from "react/jsx-runtime";
|
|
2
2
|
import $, { useRef as Tt, useEffect as se, useState as L, useCallback as U, useMemo as V } from "react";
|
|
3
3
|
import Wn, { useStore as $n, useReactFlow as Gn, Background as Yn, Controls as Kn, MiniMap as Hn } from "reactflow";
|
|
4
4
|
import "reactflow/dist/style.css";
|
|
5
|
-
import { e as Un, G as Vn, E as qn, P as Xn, L as Jn, d as Zn, h as Qn } from "./GatewayBranchEdge-
|
|
5
|
+
import { e as Un, G as Vn, E as qn, P as Xn, L as Jn, d as Zn, h as Qn } from "./GatewayBranchEdge-Ceuxbttn.js";
|
|
6
6
|
import { Dialog as er, Box as re, Drawer as tr, IconButton as Ot, Button as Le, CircularProgress as nr } from "@mui/material";
|
|
7
7
|
import rr from "react-select";
|
|
8
|
-
import { MdClose as or, MdCalendarToday as ir, MdBolt as sr, MdArrowBack as Jt, MdChevronRight as Zt, MdAddCircleOutline as lr, MdApps as ar, MdErrorOutline as dr, MdAccountTree as cr, MdAdd as
|
|
8
|
+
import { MdClose as or, MdCalendarToday as ir, MdBolt as sr, MdArrowBack as Jt, MdChevronRight as Zt, MdAddCircleOutline as lr, MdApps as ar, MdErrorOutline as dr, MdAccountTree as cr, MdAdd as fr, MdSearch as ur, MdCategory as hr, MdCancel as Qt, MdError as en, MdCheckCircle as tn, MdPlayArrow as nn, MdHourglassEmpty as gr, MdSchedule as It, MdPerson as pr, MdExpandLess as yr, MdExpandMore as br } from "react-icons/md";
|
|
9
9
|
import { GrTrigger as mr } from "react-icons/gr";
|
|
10
10
|
import { BiCollapse as vr, BiExpand as wr } from "react-icons/bi";
|
|
11
11
|
import { k as Er, c as xr, O as kr } from "./index-C6t1hp3u.js";
|
|
@@ -248,7 +248,7 @@ function Rr(e) {
|
|
|
248
248
|
}), t;
|
|
249
249
|
}
|
|
250
250
|
var it = {};
|
|
251
|
-
sn(it, { CycleException: () => Fe, bellmanFord: () => an, components: () => Dr, dijkstra: () => Pe, dijkstraAll: () => Gr, findCycles: () => Yr, floydWarshall: () => Hr, isAcyclic: () => Vr, postorder: () => Xr, preorder: () => Jr, prim: () => Zr, shortestPaths: () => Qr, tarjan: () => cn, topsort: () =>
|
|
251
|
+
sn(it, { CycleException: () => Fe, bellmanFord: () => an, components: () => Dr, dijkstra: () => Pe, dijkstraAll: () => Gr, findCycles: () => Yr, floydWarshall: () => Hr, isAcyclic: () => Vr, postorder: () => Xr, preorder: () => Jr, prim: () => Zr, shortestPaths: () => Qr, tarjan: () => cn, topsort: () => fn });
|
|
252
252
|
var Ar = () => 1;
|
|
253
253
|
function an(e, t, n, r) {
|
|
254
254
|
return Br(e, String(t), n || Ar, r || function(o) {
|
|
@@ -256,23 +256,23 @@ function an(e, t, n, r) {
|
|
|
256
256
|
});
|
|
257
257
|
}
|
|
258
258
|
function Br(e, t, n, r) {
|
|
259
|
-
let o = {}, i, s = 0, l = e.nodes(), d = function(
|
|
260
|
-
let h = n(
|
|
261
|
-
o[
|
|
259
|
+
let o = {}, i, s = 0, l = e.nodes(), d = function(f) {
|
|
260
|
+
let h = n(f);
|
|
261
|
+
o[f.v].distance + h < o[f.w].distance && (o[f.w] = { distance: o[f.v].distance + h, predecessor: f.v }, i = !0);
|
|
262
262
|
}, a = function() {
|
|
263
|
-
l.forEach(function(
|
|
264
|
-
r(
|
|
265
|
-
let g = h.v ===
|
|
263
|
+
l.forEach(function(f) {
|
|
264
|
+
r(f).forEach(function(h) {
|
|
265
|
+
let g = h.v === f ? h.v : h.w, E = g === h.v ? h.w : h.v;
|
|
266
266
|
d({ v: g, w: E });
|
|
267
267
|
});
|
|
268
268
|
});
|
|
269
269
|
};
|
|
270
|
-
l.forEach(function(
|
|
271
|
-
let h =
|
|
272
|
-
o[
|
|
270
|
+
l.forEach(function(f) {
|
|
271
|
+
let h = f === t ? 0 : Number.POSITIVE_INFINITY;
|
|
272
|
+
o[f] = { distance: h, predecessor: "" };
|
|
273
273
|
});
|
|
274
274
|
let c = l.length;
|
|
275
|
-
for (let
|
|
275
|
+
for (let f = 1; f < c && (i = !1, s++, a(), !!i); f++) ;
|
|
276
276
|
if (s === c - 1 && (i = !1, a(), i)) throw new Error("The graph contains a negative weight cycle");
|
|
277
277
|
return o;
|
|
278
278
|
}
|
|
@@ -347,9 +347,9 @@ function Pe(e, t, n, r) {
|
|
|
347
347
|
}
|
|
348
348
|
function $r(e, t, n, r) {
|
|
349
349
|
let o = {}, i = new dn(), s, l, d = function(a) {
|
|
350
|
-
let c = a.v !== s ? a.v : a.w,
|
|
350
|
+
let c = a.v !== s ? a.v : a.w, f = o[c], h = n(a), g = l.distance + h;
|
|
351
351
|
if (h < 0) throw new Error("dijkstra does not allow negative edge weights. Bad edge: " + a + " Weight: " + h);
|
|
352
|
-
g <
|
|
352
|
+
g < f.distance && (f.distance = g, f.predecessor = s, i.decrease(c, g));
|
|
353
353
|
};
|
|
354
354
|
for (e.nodes().forEach(function(a) {
|
|
355
355
|
let c = a === t ? 0 : Number.POSITIVE_INFINITY;
|
|
@@ -405,8 +405,8 @@ function Ur(e, t, n) {
|
|
|
405
405
|
o.forEach(function(l) {
|
|
406
406
|
let d = r[l];
|
|
407
407
|
o.forEach(function(a) {
|
|
408
|
-
let c = d[i],
|
|
409
|
-
g < h.distance && (h.distance = g, h.predecessor =
|
|
408
|
+
let c = d[i], f = s[a], h = d[a], g = c.distance + f.distance;
|
|
409
|
+
g < h.distance && (h.distance = g, h.predecessor = f.predecessor);
|
|
410
410
|
});
|
|
411
411
|
});
|
|
412
412
|
}), r;
|
|
@@ -416,7 +416,7 @@ var Fe = class extends Error {
|
|
|
416
416
|
super(...e);
|
|
417
417
|
}
|
|
418
418
|
};
|
|
419
|
-
function
|
|
419
|
+
function fn(e) {
|
|
420
420
|
let t = {}, n = {}, r = [];
|
|
421
421
|
function o(i) {
|
|
422
422
|
if (i in n) throw new Fe();
|
|
@@ -427,7 +427,7 @@ function un(e) {
|
|
|
427
427
|
}
|
|
428
428
|
function Vr(e) {
|
|
429
429
|
try {
|
|
430
|
-
|
|
430
|
+
fn(e);
|
|
431
431
|
} catch (t) {
|
|
432
432
|
if (t instanceof Fe) return !1;
|
|
433
433
|
throw t;
|
|
@@ -442,12 +442,12 @@ function qr(e, t, n, r, o) {
|
|
|
442
442
|
}, s = {};
|
|
443
443
|
return t.forEach(function(l) {
|
|
444
444
|
if (!e.hasNode(l)) throw new Error("Graph does not have node: " + l);
|
|
445
|
-
o =
|
|
445
|
+
o = un(e, l, n === "post", s, i, r, o);
|
|
446
446
|
}), o;
|
|
447
447
|
}
|
|
448
|
-
function
|
|
448
|
+
function un(e, t, n, r, o, i, s) {
|
|
449
449
|
return t in r || (r[t] = !0, n || (s = i(s, t)), o(t).forEach(function(l) {
|
|
450
|
-
s =
|
|
450
|
+
s = un(e, l, n, r, o, i, s);
|
|
451
451
|
}), n && (s = i(s, t))), s;
|
|
452
452
|
}
|
|
453
453
|
function hn(e, t, n) {
|
|
@@ -466,8 +466,8 @@ function Zr(e, t) {
|
|
|
466
466
|
function s(d) {
|
|
467
467
|
let a = d.v === i ? d.w : d.v, c = o.priority(a);
|
|
468
468
|
if (c !== void 0) {
|
|
469
|
-
let
|
|
470
|
-
|
|
469
|
+
let f = t(d);
|
|
470
|
+
f < c && (r[a] = i, o.decrease(a, f));
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
if (e.nodeCount() === 0) return n;
|
|
@@ -497,8 +497,8 @@ function eo(e, t, n, r) {
|
|
|
497
497
|
for (let s = 0; s < i.length; s++) {
|
|
498
498
|
let l = r(i[s]);
|
|
499
499
|
for (let d = 0; d < l.length; d++) {
|
|
500
|
-
let a = l[d], c = a.v === i[s] ? a.v : a.w,
|
|
501
|
-
n({ v: c, w:
|
|
500
|
+
let a = l[d], c = a.v === i[s] ? a.v : a.w, f = c === a.v ? a.w : a.v;
|
|
501
|
+
n({ v: c, w: f }) < 0 && (o = !0);
|
|
502
502
|
}
|
|
503
503
|
if (o) return an(e, t, n, r);
|
|
504
504
|
}
|
|
@@ -642,17 +642,17 @@ var Be = "\0", ao = "3.0.0", co = class {
|
|
|
642
642
|
}
|
|
643
643
|
toString() {
|
|
644
644
|
let e = [], t = this._sentinel, n = t._prev;
|
|
645
|
-
for (; n !== t; ) e.push(JSON.stringify(n,
|
|
645
|
+
for (; n !== t; ) e.push(JSON.stringify(n, fo)), n = n._prev;
|
|
646
646
|
return "[" + e.join(", ") + "]";
|
|
647
647
|
}
|
|
648
648
|
};
|
|
649
649
|
function Pt(e) {
|
|
650
650
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function fo(e, t) {
|
|
653
653
|
if (e !== "_next" && e !== "_prev") return t;
|
|
654
654
|
}
|
|
655
|
-
var
|
|
655
|
+
var uo = co, ho = () => 1;
|
|
656
656
|
function go(e, t) {
|
|
657
657
|
if (e.nodeCount() <= 1) return [];
|
|
658
658
|
let n = yo(e, t || ho);
|
|
@@ -690,10 +690,10 @@ function yo(e, t) {
|
|
|
690
690
|
}), e.edges().forEach((l) => {
|
|
691
691
|
let d = n.edge(l.v, l.w) || 0, a = t(l), c = d + a;
|
|
692
692
|
n.setEdge(l.v, l.w, c);
|
|
693
|
-
let
|
|
694
|
-
o = Math.max(o,
|
|
693
|
+
let f = n.node(l.v), h = n.node(l.w);
|
|
694
|
+
o = Math.max(o, f.out += a), r = Math.max(r, h.in += a);
|
|
695
695
|
});
|
|
696
|
-
let i = bo(o + r + 3).map(() => new
|
|
696
|
+
let i = bo(o + r + 3).map(() => new uo()), s = r + 1;
|
|
697
697
|
return n.nodes().forEach((l) => {
|
|
698
698
|
et(i, s, n.node(l));
|
|
699
699
|
}), { graph: n, buckets: i, zeroIdx: s };
|
|
@@ -742,8 +742,8 @@ function xo(e, t) {
|
|
|
742
742
|
let n = t.v, r = e.node(n).rank, o = t.w, i = e.node(o).rank, s = t.name, l = e.edge(t), d = l.labelRank;
|
|
743
743
|
if (i === r + 1) return;
|
|
744
744
|
e.removeEdge(t);
|
|
745
|
-
let a, c,
|
|
746
|
-
for (
|
|
745
|
+
let a, c, f;
|
|
746
|
+
for (f = 0, ++r; r < i; ++f, ++r) l.points = [], c = { width: 0, height: 0, edgeLabel: l, edgeObj: t, rank: r }, a = ve(e, "edge", c, "_d"), r === d && (c.width = l.width, c.height = l.height, c.dummy = "edge-label", c.labelpos = l.labelpos), e.setEdge(n, a, { weight: l.weight }, s), f === 0 && e.graph().dummyChains.push(a), n = a;
|
|
747
747
|
e.setEdge(n, o, { weight: l.weight }, s);
|
|
748
748
|
}
|
|
749
749
|
function ko(e) {
|
|
@@ -795,14 +795,14 @@ function No(e, t) {
|
|
|
795
795
|
function Co(e, t, n) {
|
|
796
796
|
e.nodes().forEach((r) => t.node(r).rank += n);
|
|
797
797
|
}
|
|
798
|
-
var { preorder: To, postorder: Oo } = it, Io =
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
function
|
|
798
|
+
var { preorder: To, postorder: Oo } = it, Io = ue;
|
|
799
|
+
ue.initLowLimValues = dt;
|
|
800
|
+
ue.initCutValues = at;
|
|
801
|
+
ue.calcCutValue = wn;
|
|
802
|
+
ue.leaveEdge = xn;
|
|
803
|
+
ue.enterEdge = kn;
|
|
804
|
+
ue.exchangeEdges = _n;
|
|
805
|
+
function ue(e) {
|
|
806
806
|
e = to(e), lt(e);
|
|
807
807
|
let t = vn(e);
|
|
808
808
|
dt(t), at(t, e);
|
|
@@ -824,10 +824,10 @@ function wn(e, t, n) {
|
|
|
824
824
|
return l && l.forEach((d) => {
|
|
825
825
|
let a = d.v === n, c = a ? d.w : d.v;
|
|
826
826
|
if (c !== r) {
|
|
827
|
-
let
|
|
828
|
-
if (s +=
|
|
827
|
+
let f = a === o, h = t.edge(d).weight;
|
|
828
|
+
if (s += f ? h : -h, zo(e, n, c)) {
|
|
829
829
|
let g = e.edge(n, c).cutvalue;
|
|
830
|
-
s +=
|
|
830
|
+
s += f ? -g : g;
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
}), s;
|
|
@@ -947,8 +947,8 @@ function Sn(e, t, n, r, o, i, s) {
|
|
|
947
947
|
s !== t && e.setEdge(t, s, { weight: 0, minlen: n });
|
|
948
948
|
return;
|
|
949
949
|
}
|
|
950
|
-
let a = Lt(e, "_bt"), c = Lt(e, "_bb"),
|
|
951
|
-
e.setParent(a, s),
|
|
950
|
+
let a = Lt(e, "_bt"), c = Lt(e, "_bb"), f = e.node(s);
|
|
951
|
+
e.setParent(a, s), f.borderTop = a, e.setParent(c, s), f.borderBottom = c, d.forEach((h) => {
|
|
952
952
|
var g;
|
|
953
953
|
Sn(e, t, n, r, o, i, h);
|
|
954
954
|
let E = e.node(h), b = E.borderTop ? E.borderTop : h, p = E.borderBottom ? E.borderBottom : h, x = E.borderTop ? r : 2 * r, k = b !== p ? 1 : o - ((g = i[s]) != null ? g : 0) + 1;
|
|
@@ -1045,7 +1045,7 @@ function Qo(e, t) {
|
|
|
1045
1045
|
function ei(e, t, n) {
|
|
1046
1046
|
let r = lo(n, n.map((a, c) => c)), o = t.flatMap((a) => {
|
|
1047
1047
|
let c = e.outEdges(a);
|
|
1048
|
-
return c ? c.map((
|
|
1048
|
+
return c ? c.map((f) => ({ pos: r[f.w], weight: e.edge(f).weight })).sort((f, h) => f.pos - h.pos) : [];
|
|
1049
1049
|
}), i = 1;
|
|
1050
1050
|
for (; i < n.length; ) i <<= 1;
|
|
1051
1051
|
let s = 2 * i - 1;
|
|
@@ -1054,9 +1054,9 @@ function ei(e, t, n) {
|
|
|
1054
1054
|
return o.forEach((a) => {
|
|
1055
1055
|
let c = a.pos + i;
|
|
1056
1056
|
l[c] += a.weight;
|
|
1057
|
-
let
|
|
1058
|
-
for (; c > 0; ) c % 2 && (
|
|
1059
|
-
d += a.weight *
|
|
1057
|
+
let f = 0;
|
|
1058
|
+
for (; c > 0; ) c % 2 && (f += l[c + 1]), c = c - 1 >> 1, l[c] += a.weight;
|
|
1059
|
+
d += a.weight * f;
|
|
1060
1060
|
}), d;
|
|
1061
1061
|
}
|
|
1062
1062
|
function ti(e, t = []) {
|
|
@@ -1107,7 +1107,7 @@ function oi(e, t) {
|
|
|
1107
1107
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1108
1108
|
}
|
|
1109
1109
|
function ii(e, t) {
|
|
1110
|
-
let n = io(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c,
|
|
1110
|
+
let n = io(e, (c) => Object.hasOwn(c, "barycenter")), r = n.lhs, o = n.rhs.sort((c, f) => f.i - c.i), i = [], s = 0, l = 0, d = 0;
|
|
1111
1111
|
r.sort(si(!!t)), d = Dt(i, o, d), r.forEach((c) => {
|
|
1112
1112
|
d += c.vs.length, i.push(c.vs), s += c.barycenter * c.weight, l += c.weight, d = Dt(i, o, d);
|
|
1113
1113
|
});
|
|
@@ -1134,16 +1134,16 @@ function Cn(e, t, n, r) {
|
|
|
1134
1134
|
});
|
|
1135
1135
|
let c = ni(a, n);
|
|
1136
1136
|
li(c, d);
|
|
1137
|
-
let
|
|
1137
|
+
let f = ii(c, r);
|
|
1138
1138
|
if (s && l) {
|
|
1139
|
-
|
|
1139
|
+
f.vs = [s, f.vs, l].flat(1);
|
|
1140
1140
|
let h = e.predecessors(s);
|
|
1141
1141
|
if (h && h.length) {
|
|
1142
1142
|
let g = e.node(h[0]), E = e.predecessors(l), b = e.node(E[0]);
|
|
1143
|
-
Object.hasOwn(
|
|
1143
|
+
Object.hasOwn(f, "barycenter") || (f.barycenter = 0, f.weight = 0), f.barycenter = (f.barycenter * f.weight + g.order + b.order) / (f.weight + 2), f.weight += 2;
|
|
1144
1144
|
}
|
|
1145
1145
|
}
|
|
1146
|
-
return
|
|
1146
|
+
return f;
|
|
1147
1147
|
}
|
|
1148
1148
|
function li(e, t) {
|
|
1149
1149
|
e.forEach((n) => {
|
|
@@ -1162,8 +1162,8 @@ function di(e, t, n, r) {
|
|
|
1162
1162
|
i.setNode(s), i.setParent(s, d || o);
|
|
1163
1163
|
let a = e[n](s);
|
|
1164
1164
|
a && a.forEach((c) => {
|
|
1165
|
-
let
|
|
1166
|
-
i.setEdge(
|
|
1165
|
+
let f = c.v === s ? c.w : c.v, h = i.edge(f, s), g = h !== void 0 ? h.weight : 0;
|
|
1166
|
+
i.setEdge(f, s, { weight: e.edge(c).weight + g });
|
|
1167
1167
|
}), Object.hasOwn(l, "minRank") && i.setNode(s, { borderLeft: l.borderLeft[t], borderRight: l.borderRight[t] });
|
|
1168
1168
|
}
|
|
1169
1169
|
}), i;
|
|
@@ -1173,7 +1173,7 @@ function ci(e) {
|
|
|
1173
1173
|
for (; e.hasNode(t = st("_root")); ) ;
|
|
1174
1174
|
return t;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function fi(e, t, n) {
|
|
1177
1177
|
let r = {}, o;
|
|
1178
1178
|
n.forEach((i) => {
|
|
1179
1179
|
let s = e.parent(i), l, d;
|
|
@@ -1195,9 +1195,9 @@ function Tn(e, t = {}) {
|
|
|
1195
1195
|
if ($t(e, i), t.disableOptimalOrderHeuristic) return;
|
|
1196
1196
|
let s = Number.POSITIVE_INFINITY, l, d = t.constraints || [];
|
|
1197
1197
|
for (let a = 0, c = 0; c < 4; ++a, ++c) {
|
|
1198
|
-
|
|
1199
|
-
let
|
|
1200
|
-
|
|
1198
|
+
ui(a % 2 ? r : o, a % 4 >= 2, d), i = Te(e);
|
|
1199
|
+
let f = Qo(e, i);
|
|
1200
|
+
f < s ? (c = 0, l = Object.assign({}, i), s = f) : f === s && (l = structuredClone(i));
|
|
1201
1201
|
}
|
|
1202
1202
|
$t(e, l);
|
|
1203
1203
|
}
|
|
@@ -1213,12 +1213,12 @@ function Wt(e, t, n) {
|
|
|
1213
1213
|
return di(e, i, n, r.get(i) || []);
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function ui(e, t, n) {
|
|
1217
1217
|
let r = new q();
|
|
1218
1218
|
e.forEach(function(o) {
|
|
1219
1219
|
n.forEach((l) => r.setEdge(l.left, l.right));
|
|
1220
1220
|
let i = o.graph().root, s = Cn(o, i, r, t);
|
|
1221
|
-
s.vs.forEach((l, d) => o.node(l).order = d),
|
|
1221
|
+
s.vs.forEach((l, d) => o.node(l).order = d), fi(o, r, s.vs);
|
|
1222
1222
|
});
|
|
1223
1223
|
}
|
|
1224
1224
|
function $t(e, t) {
|
|
@@ -1228,15 +1228,15 @@ function hi(e, t) {
|
|
|
1228
1228
|
let n = {};
|
|
1229
1229
|
function r(o, i) {
|
|
1230
1230
|
let s = 0, l = 0, d = o.length, a = i[i.length - 1];
|
|
1231
|
-
return i.forEach((c,
|
|
1231
|
+
return i.forEach((c, f) => {
|
|
1232
1232
|
let h = pi(e, c), g = h ? e.node(h).order : d;
|
|
1233
|
-
(h || c === a) && (i.slice(l,
|
|
1233
|
+
(h || c === a) && (i.slice(l, f + 1).forEach((E) => {
|
|
1234
1234
|
let b = e.predecessors(E);
|
|
1235
1235
|
b && b.forEach((p) => {
|
|
1236
1236
|
let x = e.node(p), k = x.order;
|
|
1237
1237
|
(k < s || g < k) && !(x.dummy && e.node(E).dummy) && On(n, p, E);
|
|
1238
1238
|
});
|
|
1239
|
-
}), l =
|
|
1239
|
+
}), l = f + 1, s = g);
|
|
1240
1240
|
}), i;
|
|
1241
1241
|
}
|
|
1242
1242
|
return t.length && t.reduce(r), n;
|
|
@@ -1245,26 +1245,26 @@ function gi(e, t) {
|
|
|
1245
1245
|
let n = {};
|
|
1246
1246
|
function r(i, s, l, d, a) {
|
|
1247
1247
|
Ne(s, l).forEach((c) => {
|
|
1248
|
-
let
|
|
1249
|
-
if (
|
|
1250
|
-
let h = e.predecessors(
|
|
1248
|
+
let f = i[c];
|
|
1249
|
+
if (f !== void 0 && e.node(f).dummy) {
|
|
1250
|
+
let h = e.predecessors(f);
|
|
1251
1251
|
h && h.forEach((g) => {
|
|
1252
1252
|
if (g === void 0) return;
|
|
1253
1253
|
let E = e.node(g);
|
|
1254
|
-
E.dummy && (E.order < d || E.order > a) && On(n, g,
|
|
1254
|
+
E.dummy && (E.order < d || E.order > a) && On(n, g, f);
|
|
1255
1255
|
});
|
|
1256
1256
|
}
|
|
1257
1257
|
});
|
|
1258
1258
|
}
|
|
1259
1259
|
function o(i, s) {
|
|
1260
1260
|
let l = -1, d = -1, a = 0;
|
|
1261
|
-
return s.forEach((c,
|
|
1261
|
+
return s.forEach((c, f) => {
|
|
1262
1262
|
if (e.node(c).dummy === "border") {
|
|
1263
1263
|
let h = e.predecessors(c);
|
|
1264
1264
|
if (h && h.length) {
|
|
1265
1265
|
let g = h[0];
|
|
1266
1266
|
if (g === void 0) return;
|
|
1267
|
-
d = e.node(g).order, r(s, a,
|
|
1267
|
+
d = e.node(g).order, r(s, a, f, l, d), a = f, l = d;
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
r(s, a, s.length, d, i.length);
|
|
@@ -1305,12 +1305,12 @@ function bi(e, t, n, r) {
|
|
|
1305
1305
|
l.forEach((a) => {
|
|
1306
1306
|
let c = r(a);
|
|
1307
1307
|
if (c && c.length) {
|
|
1308
|
-
let
|
|
1308
|
+
let f = c.sort((g, E) => {
|
|
1309
1309
|
let b = s[g], p = s[E];
|
|
1310
1310
|
return (b !== void 0 ? b : 0) - (p !== void 0 ? p : 0);
|
|
1311
|
-
}), h = (
|
|
1311
|
+
}), h = (f.length - 1) / 2;
|
|
1312
1312
|
for (let g = Math.floor(h), E = Math.ceil(h); g <= E; ++g) {
|
|
1313
|
-
let b =
|
|
1313
|
+
let b = f[g];
|
|
1314
1314
|
if (b === void 0) continue;
|
|
1315
1315
|
let p = s[b];
|
|
1316
1316
|
if (p !== void 0 && i[a] === a && d < p && !yi(n, a, b)) {
|
|
@@ -1352,13 +1352,13 @@ function mi(e, t, n, r, o = !1) {
|
|
|
1352
1352
|
let p = e.node(g);
|
|
1353
1353
|
b !== Number.POSITIVE_INFINITY && p.borderType !== l && (i[g] = Math.max(i[g] !== void 0 ? i[g] : 0, b));
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function f(g) {
|
|
1356
1356
|
return s.predecessors(g) || [];
|
|
1357
1357
|
}
|
|
1358
1358
|
function h(g) {
|
|
1359
1359
|
return s.successors(g) || [];
|
|
1360
1360
|
}
|
|
1361
|
-
return d(a,
|
|
1361
|
+
return d(a, f), d(c, h), Object.keys(r).forEach((g) => {
|
|
1362
1362
|
var E;
|
|
1363
1363
|
let b = n[g];
|
|
1364
1364
|
b !== void 0 && (i[g] = (E = i[b]) != null ? E : 0);
|
|
@@ -1372,10 +1372,10 @@ function vi(e, t, n, r) {
|
|
|
1372
1372
|
let c = n[a];
|
|
1373
1373
|
if (c !== void 0) {
|
|
1374
1374
|
if (o.setNode(c), d !== void 0) {
|
|
1375
|
-
let
|
|
1376
|
-
if (
|
|
1377
|
-
let h = o.edge(
|
|
1378
|
-
o.setEdge(
|
|
1375
|
+
let f = n[d];
|
|
1376
|
+
if (f !== void 0) {
|
|
1377
|
+
let h = o.edge(f, c);
|
|
1378
|
+
o.setEdge(f, c, Math.max(s(e, a, d), h || 0));
|
|
1379
1379
|
}
|
|
1380
1380
|
}
|
|
1381
1381
|
d = a;
|
|
@@ -1401,7 +1401,7 @@ function Ei(e, t) {
|
|
|
1401
1401
|
let l = i + s, d = e[l];
|
|
1402
1402
|
if (!d || d === t) return;
|
|
1403
1403
|
let a = Object.values(d), c = r - ee(Math.min, a);
|
|
1404
|
-
s !== "l" && (c = o - ee(Math.max, a)), c && (e[l] = Ae(d, (
|
|
1404
|
+
s !== "l" && (c = o - ee(Math.max, a)), c && (e[l] = Ae(d, (f) => f + c));
|
|
1405
1405
|
});
|
|
1406
1406
|
});
|
|
1407
1407
|
}
|
|
@@ -1465,8 +1465,8 @@ function Ci(e) {
|
|
|
1465
1465
|
t.forEach((s) => {
|
|
1466
1466
|
let l = s.reduce((d, a) => {
|
|
1467
1467
|
var c;
|
|
1468
|
-
let
|
|
1469
|
-
return d >
|
|
1468
|
+
let f = (c = e.node(a).height) != null ? c : 0;
|
|
1469
|
+
return d > f ? d : f;
|
|
1470
1470
|
}, 0);
|
|
1471
1471
|
s.forEach((d) => {
|
|
1472
1472
|
let a = e.node(d);
|
|
@@ -1543,8 +1543,8 @@ function $i(e) {
|
|
|
1543
1543
|
function Gi(e) {
|
|
1544
1544
|
let t = Number.POSITIVE_INFINITY, n = 0, r = Number.POSITIVE_INFINITY, o = 0, i = e.graph(), s = i.marginx || 0, l = i.marginy || 0;
|
|
1545
1545
|
function d(a) {
|
|
1546
|
-
let c = a.x,
|
|
1547
|
-
t = Math.min(t, c - h / 2), n = Math.max(n, c + h / 2), r = Math.min(r,
|
|
1546
|
+
let c = a.x, f = a.y, h = a.width, g = a.height;
|
|
1547
|
+
t = Math.min(t, c - h / 2), n = Math.max(n, c + h / 2), r = Math.min(r, f - g / 2), o = Math.max(o, f + g / 2);
|
|
1548
1548
|
}
|
|
1549
1549
|
e.nodes().forEach((a) => d(e.node(a))), e.edges().forEach((a) => {
|
|
1550
1550
|
let c = e.edge(a);
|
|
@@ -1554,8 +1554,8 @@ function Gi(e) {
|
|
|
1554
1554
|
c.x -= t, c.y -= r;
|
|
1555
1555
|
}), e.edges().forEach((a) => {
|
|
1556
1556
|
let c = e.edge(a);
|
|
1557
|
-
c.points.forEach((
|
|
1558
|
-
|
|
1557
|
+
c.points.forEach((f) => {
|
|
1558
|
+
f.x -= t, f.y -= r;
|
|
1559
1559
|
}), Object.hasOwn(c, "x") && (c.x -= t), Object.hasOwn(c, "y") && (c.y -= r);
|
|
1560
1560
|
}), i.width = n - t + s, i.height = o - r + l;
|
|
1561
1561
|
}
|
|
@@ -1674,7 +1674,7 @@ function ns({
|
|
|
1674
1674
|
saveLabel: s = "Save",
|
|
1675
1675
|
saveDisabled: l = !1
|
|
1676
1676
|
}) {
|
|
1677
|
-
const [d, a] = $.useState(!1), [c,
|
|
1677
|
+
const [d, a] = $.useState(!1), [c, f] = $.useState(!1), [h, g] = $.useState(e ?? "");
|
|
1678
1678
|
$.useEffect(() => {
|
|
1679
1679
|
g(e ?? "");
|
|
1680
1680
|
}, [e]);
|
|
@@ -1705,16 +1705,16 @@ function ns({
|
|
|
1705
1705
|
},
|
|
1706
1706
|
children: [
|
|
1707
1707
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 10, minWidth: 0 }, children: [
|
|
1708
|
-
c && t ? /* @__PURE__ */
|
|
1708
|
+
c && t ? /* @__PURE__ */ u(
|
|
1709
1709
|
"input",
|
|
1710
1710
|
{
|
|
1711
1711
|
value: h,
|
|
1712
1712
|
onChange: (p) => g(p.target.value),
|
|
1713
1713
|
onBlur: () => {
|
|
1714
|
-
|
|
1714
|
+
f(!1), h !== e && t(h);
|
|
1715
1715
|
},
|
|
1716
1716
|
onKeyDown: (p) => {
|
|
1717
|
-
p.key === "Enter" && p.target.blur(), p.key === "Escape" && (g(e ?? ""),
|
|
1717
|
+
p.key === "Enter" && p.target.blur(), p.key === "Escape" && (g(e ?? ""), f(!1));
|
|
1718
1718
|
},
|
|
1719
1719
|
autoFocus: !0,
|
|
1720
1720
|
style: {
|
|
@@ -1727,10 +1727,10 @@ function ns({
|
|
|
1727
1727
|
minWidth: 200
|
|
1728
1728
|
}
|
|
1729
1729
|
}
|
|
1730
|
-
) : /* @__PURE__ */
|
|
1730
|
+
) : /* @__PURE__ */ u(
|
|
1731
1731
|
"span",
|
|
1732
1732
|
{
|
|
1733
|
-
onClick: () => t &&
|
|
1733
|
+
onClick: () => t && f(!0),
|
|
1734
1734
|
style: {
|
|
1735
1735
|
fontSize: 15,
|
|
1736
1736
|
fontWeight: 600,
|
|
@@ -1745,7 +1745,7 @@ function ns({
|
|
|
1745
1745
|
children: e || "Untitled workflow"
|
|
1746
1746
|
}
|
|
1747
1747
|
),
|
|
1748
|
-
n && /* @__PURE__ */
|
|
1748
|
+
n && /* @__PURE__ */ u(
|
|
1749
1749
|
"span",
|
|
1750
1750
|
{
|
|
1751
1751
|
style: {
|
|
@@ -1764,7 +1764,7 @@ function ns({
|
|
|
1764
1764
|
)
|
|
1765
1765
|
] }),
|
|
1766
1766
|
/* @__PURE__ */ w("div", { style: { marginLeft: "auto", display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
1767
|
-
i && /* @__PURE__ */
|
|
1767
|
+
i && /* @__PURE__ */ u(
|
|
1768
1768
|
"button",
|
|
1769
1769
|
{
|
|
1770
1770
|
type: "button",
|
|
@@ -1784,7 +1784,7 @@ function ns({
|
|
|
1784
1784
|
children: "Cancel"
|
|
1785
1785
|
}
|
|
1786
1786
|
),
|
|
1787
|
-
o && /* @__PURE__ */
|
|
1787
|
+
o && /* @__PURE__ */ u(
|
|
1788
1788
|
"button",
|
|
1789
1789
|
{
|
|
1790
1790
|
type: "button",
|
|
@@ -1815,15 +1815,15 @@ function ns({
|
|
|
1815
1815
|
}
|
|
1816
1816
|
const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i, width: s = 720 }) => {
|
|
1817
1817
|
const [l, d] = L(!1), a = () => d((h) => !h), c = () => /* @__PURE__ */ w(re, { sx: { display: "flex", alignItems: "center", p: 2, pt: 3, borderBottom: "1px solid #e0e0e0", mb: 0, flexShrink: 0 }, children: [
|
|
1818
|
-
r && /* @__PURE__ */
|
|
1819
|
-
/* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
1821
|
-
/* @__PURE__ */
|
|
1822
|
-
] }),
|
|
1818
|
+
r && /* @__PURE__ */ u(re, { sx: { mr: 1.5, display: "flex", alignItems: "center", fontSize: "1.25rem", color: "#1DBF60" }, children: r }),
|
|
1819
|
+
/* @__PURE__ */ u("span", { style: { flexGrow: 1, fontSize: 14, fontWeight: 500, color: "#212121" }, children: n }),
|
|
1820
|
+
/* @__PURE__ */ u(Ot, { onClick: a, size: "small", sx: { mr: 1 }, title: l ? "Collapse" : "Expand", "data-testid": "expand-collapse-base-drawer-btn", children: l ? /* @__PURE__ */ u(vr, {}) : /* @__PURE__ */ u(wr, {}) }),
|
|
1821
|
+
/* @__PURE__ */ u(Ot, { onClick: t, size: "small", "data-testid": "close-drawer-button", children: /* @__PURE__ */ u(or, {}) })
|
|
1822
|
+
] }), f = () => i ? /* @__PURE__ */ u(re, { sx: { flexShrink: 0, p: 2, borderTop: "1px solid #e0e0e0", display: "flex", justifyContent: "flex-end", gap: 2 }, children: i }) : null;
|
|
1823
1823
|
return l ? /* @__PURE__ */ w(er, { open: e, onClose: t, maxWidth: !1, fullWidth: !0, PaperProps: { sx: { display: "flex", flexDirection: "column", height: "80vh", boxShadow: 24, width: "750px", maxWidth: "100%" } }, children: [
|
|
1824
|
-
/* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */ f
|
|
1824
|
+
/* @__PURE__ */ u(c, {}),
|
|
1825
|
+
/* @__PURE__ */ u(re, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
|
|
1826
|
+
/* @__PURE__ */ u(f, {})
|
|
1827
1827
|
] }) : /* @__PURE__ */ w(
|
|
1828
1828
|
tr,
|
|
1829
1829
|
{
|
|
@@ -1849,9 +1849,9 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1849
1849
|
}
|
|
1850
1850
|
},
|
|
1851
1851
|
children: [
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */ f
|
|
1852
|
+
/* @__PURE__ */ u(c, {}),
|
|
1853
|
+
/* @__PURE__ */ u(re, { sx: { flexGrow: 1, overflowY: "auto", p: 0 }, children: o }),
|
|
1854
|
+
/* @__PURE__ */ u(f, {})
|
|
1855
1855
|
]
|
|
1856
1856
|
}
|
|
1857
1857
|
);
|
|
@@ -1863,9 +1863,9 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1863
1863
|
onClose: o,
|
|
1864
1864
|
loadTriggerSources: i
|
|
1865
1865
|
}) => {
|
|
1866
|
-
const [s, l] = L("trigger"), [d, a] = L(null), [c,
|
|
1866
|
+
const [s, l] = L("trigger"), [d, a] = L(null), [c, f] = L([]), [h, g] = L([]), [E, b] = L(!1), [p, x] = L(null);
|
|
1867
1867
|
se(() => {
|
|
1868
|
-
e || (l("trigger"), a(null),
|
|
1868
|
+
e || (l("trigger"), a(null), f([]), g([]), b(!1), x(null));
|
|
1869
1869
|
}, [e]);
|
|
1870
1870
|
const k = U(async (P) => {
|
|
1871
1871
|
if (!i) {
|
|
@@ -1879,19 +1879,19 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1879
1879
|
r(P);
|
|
1880
1880
|
return;
|
|
1881
1881
|
}
|
|
1882
|
-
|
|
1882
|
+
f(I), l("sources");
|
|
1883
1883
|
} catch (I) {
|
|
1884
1884
|
x(I instanceof Error ? I.message : "Failed to load sources.");
|
|
1885
1885
|
} finally {
|
|
1886
1886
|
b(!1);
|
|
1887
1887
|
}
|
|
1888
1888
|
}, [i, r]), M = () => {
|
|
1889
|
-
l("trigger"), a(null),
|
|
1889
|
+
l("trigger"), a(null), f([]), g([]), x(null);
|
|
1890
1890
|
}, z = () => {
|
|
1891
1891
|
d && r(d, h);
|
|
1892
1892
|
}, W = s === "sources" && d, G = W ? /* @__PURE__ */ w(Se, { children: [
|
|
1893
|
-
/* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1893
|
+
/* @__PURE__ */ u(Le, { type: "button", variant: "outlined", size: "small", onClick: M, children: n.cancel ?? "Back" }),
|
|
1894
|
+
/* @__PURE__ */ u(
|
|
1895
1895
|
Le,
|
|
1896
1896
|
{
|
|
1897
1897
|
type: "button",
|
|
@@ -1903,18 +1903,18 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1903
1903
|
}
|
|
1904
1904
|
)
|
|
1905
1905
|
] }) : null;
|
|
1906
|
-
return /* @__PURE__ */
|
|
1906
|
+
return /* @__PURE__ */ u(
|
|
1907
1907
|
Ce,
|
|
1908
1908
|
{
|
|
1909
1909
|
isOpen: e,
|
|
1910
1910
|
onClose: o,
|
|
1911
1911
|
title: W ? d.label : n.addTriggerTitle,
|
|
1912
|
-
icon: /* @__PURE__ */
|
|
1912
|
+
icon: /* @__PURE__ */ u(mr, {}),
|
|
1913
1913
|
width: 500,
|
|
1914
1914
|
footer: G,
|
|
1915
1915
|
children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
|
|
1916
1916
|
!W && /* @__PURE__ */ w(Se, { children: [
|
|
1917
|
-
/* @__PURE__ */
|
|
1917
|
+
/* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: n.chooseTrigger }),
|
|
1918
1918
|
/* @__PURE__ */ w("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: [
|
|
1919
1919
|
t.map((P) => /* @__PURE__ */ w(
|
|
1920
1920
|
"div",
|
|
@@ -1934,22 +1934,22 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1934
1934
|
I.currentTarget.style.background = "";
|
|
1935
1935
|
},
|
|
1936
1936
|
children: [
|
|
1937
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ u("div", { style: { color: P.triggerCategory === "scheduler" ? "#1976d2" : "#f57c00", marginTop: 2, flexShrink: 0 }, children: P.triggerCategory === "scheduler" ? /* @__PURE__ */ u(ir, { size: 18 }) : /* @__PURE__ */ u(sr, { size: 18 }) }),
|
|
1938
1938
|
/* @__PURE__ */ w("div", { children: [
|
|
1939
|
-
/* @__PURE__ */
|
|
1940
|
-
P.description && /* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: P.label }),
|
|
1940
|
+
P.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: P.description })
|
|
1941
1941
|
] })
|
|
1942
1942
|
]
|
|
1943
1943
|
},
|
|
1944
1944
|
P.triggerKey
|
|
1945
1945
|
)),
|
|
1946
|
-
t.length === 0 && /* @__PURE__ */
|
|
1946
|
+
t.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noTriggers })
|
|
1947
1947
|
] }),
|
|
1948
1948
|
E && /* @__PURE__ */ w(re, { sx: { display: "flex", alignItems: "center", gap: 1, mt: 2, fontSize: 12, color: "#64748b" }, children: [
|
|
1949
|
-
/* @__PURE__ */
|
|
1950
|
-
/* @__PURE__ */
|
|
1949
|
+
/* @__PURE__ */ u(nr, { size: 14 }),
|
|
1950
|
+
/* @__PURE__ */ u("span", { children: "Loading sources for the selected trigger…" })
|
|
1951
1951
|
] }),
|
|
1952
|
-
p && /* @__PURE__ */
|
|
1952
|
+
p && /* @__PURE__ */ u("p", { style: { fontSize: 12, color: "#d32f2f", marginTop: 12 }, children: p })
|
|
1953
1953
|
] }),
|
|
1954
1954
|
W && /* @__PURE__ */ w(Se, { children: [
|
|
1955
1955
|
/* @__PURE__ */ w(
|
|
@@ -1964,17 +1964,17 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1964
1964
|
className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
|
|
1965
1965
|
style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
|
|
1966
1966
|
children: [
|
|
1967
|
-
/* @__PURE__ */
|
|
1968
|
-
/* @__PURE__ */
|
|
1967
|
+
/* @__PURE__ */ u(Jt, { size: 16 }),
|
|
1968
|
+
/* @__PURE__ */ u("span", { children: n.addTriggerTitle })
|
|
1969
1969
|
]
|
|
1970
1970
|
}
|
|
1971
1971
|
),
|
|
1972
1972
|
/* @__PURE__ */ w("p", { className: "ff-text-muted ff-mb-2", style: { fontSize: 13 }, children: [
|
|
1973
1973
|
"Pick one or more sources for ",
|
|
1974
|
-
/* @__PURE__ */
|
|
1974
|
+
/* @__PURE__ */ u("strong", { children: d.label }),
|
|
1975
1975
|
":"
|
|
1976
1976
|
] }),
|
|
1977
|
-
/* @__PURE__ */
|
|
1977
|
+
/* @__PURE__ */ u(
|
|
1978
1978
|
rr,
|
|
1979
1979
|
{
|
|
1980
1980
|
isMulti: !0,
|
|
@@ -1996,11 +1996,11 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
1996
1996
|
transition: "background 0.15s"
|
|
1997
1997
|
}, Ze = "ff-p-3 ff-rounded ff-border ff-d-flex ff-align-items-center ff-gap-3", os = ({ open: e, availableDescriptors: t, messages: n, onSelect: r, onClose: o }) => {
|
|
1998
1998
|
const { apps: i, ungrouped: s } = V(() => {
|
|
1999
|
-
const
|
|
1999
|
+
const f = /* @__PURE__ */ new Map(), h = [];
|
|
2000
2000
|
for (const g of t)
|
|
2001
2001
|
if (g.app) {
|
|
2002
|
-
const E =
|
|
2003
|
-
E ? E.descriptors.push(g) :
|
|
2002
|
+
const E = f.get(g.app.key);
|
|
2003
|
+
E ? E.descriptors.push(g) : f.set(g.app.key, {
|
|
2004
2004
|
key: g.app.key,
|
|
2005
2005
|
label: g.app.label,
|
|
2006
2006
|
icon: g.app.icon,
|
|
@@ -2009,21 +2009,21 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2009
2009
|
});
|
|
2010
2010
|
} else
|
|
2011
2011
|
h.push(g);
|
|
2012
|
-
return { apps: [...
|
|
2013
|
-
}, [t]), [l, d] = L(null), a = l ? i.find((
|
|
2012
|
+
return { apps: [...f.values()], ungrouped: h };
|
|
2013
|
+
}, [t]), [l, d] = L(null), a = l ? i.find((f) => f.key === l) ?? null : null;
|
|
2014
2014
|
se(() => {
|
|
2015
2015
|
e || d(null);
|
|
2016
2016
|
}, [e]), se(() => {
|
|
2017
2017
|
d(null);
|
|
2018
2018
|
}, [t]);
|
|
2019
2019
|
const c = !a;
|
|
2020
|
-
return /* @__PURE__ */
|
|
2020
|
+
return /* @__PURE__ */ u(
|
|
2021
2021
|
Ce,
|
|
2022
2022
|
{
|
|
2023
2023
|
isOpen: e,
|
|
2024
2024
|
onClose: o,
|
|
2025
2025
|
title: c ? n.addStepTitle : a.label,
|
|
2026
|
-
icon: c ? /* @__PURE__ */
|
|
2026
|
+
icon: c ? /* @__PURE__ */ u(lr, {}) : a.icon ?? /* @__PURE__ */ u(ar, {}),
|
|
2027
2027
|
width: 500,
|
|
2028
2028
|
children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
|
|
2029
2029
|
!c && /* @__PURE__ */ w(
|
|
@@ -2032,29 +2032,29 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2032
2032
|
role: "button",
|
|
2033
2033
|
tabIndex: 0,
|
|
2034
2034
|
onClick: () => d(null),
|
|
2035
|
-
onKeyDown: (
|
|
2036
|
-
|
|
2035
|
+
onKeyDown: (f) => {
|
|
2036
|
+
f.key === "Enter" && d(null);
|
|
2037
2037
|
},
|
|
2038
2038
|
className: "ff-d-flex ff-align-items-center ff-gap-1 ff-mb-3",
|
|
2039
2039
|
style: { cursor: "pointer", color: "#0066cc", fontSize: 13, fontWeight: 500, width: "fit-content" },
|
|
2040
2040
|
children: [
|
|
2041
|
-
/* @__PURE__ */
|
|
2042
|
-
/* @__PURE__ */
|
|
2041
|
+
/* @__PURE__ */ u(Jt, { size: 16 }),
|
|
2042
|
+
/* @__PURE__ */ u("span", { children: n.addStepTitle })
|
|
2043
2043
|
]
|
|
2044
2044
|
}
|
|
2045
2045
|
),
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2048
|
-
i.map((
|
|
2046
|
+
/* @__PURE__ */ u("p", { className: "ff-text-muted ff-mb-3", style: { fontSize: 13 }, children: c ? n.chooseAction : `Pick an action from ${a.label}` }),
|
|
2047
|
+
/* @__PURE__ */ u("div", { className: "ff-d-flex ff-flex-column ff-gap-2", children: c ? /* @__PURE__ */ w(Se, { children: [
|
|
2048
|
+
i.map((f) => /* @__PURE__ */ w(
|
|
2049
2049
|
"div",
|
|
2050
2050
|
{
|
|
2051
2051
|
className: Ze,
|
|
2052
2052
|
style: Je,
|
|
2053
|
-
onClick: () => d(
|
|
2053
|
+
onClick: () => d(f.key),
|
|
2054
2054
|
role: "button",
|
|
2055
2055
|
tabIndex: 0,
|
|
2056
2056
|
onKeyDown: (h) => {
|
|
2057
|
-
h.key === "Enter" && d(
|
|
2057
|
+
h.key === "Enter" && d(f.key);
|
|
2058
2058
|
},
|
|
2059
2059
|
onMouseEnter: (h) => {
|
|
2060
2060
|
h.currentTarget.style.background = "#f5f5f5";
|
|
@@ -2063,26 +2063,26 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2063
2063
|
h.currentTarget.style.background = "";
|
|
2064
2064
|
},
|
|
2065
2065
|
children: [
|
|
2066
|
-
|
|
2066
|
+
f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
|
|
2067
2067
|
/* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2068
|
-
/* @__PURE__ */
|
|
2069
|
-
/* @__PURE__ */
|
|
2068
|
+
/* @__PURE__ */ u("div", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label }),
|
|
2069
|
+
/* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", marginTop: 2 }, children: f.description ?? `${f.descriptors.length} action${f.descriptors.length === 1 ? "" : "s"}` })
|
|
2070
2070
|
] }),
|
|
2071
|
-
/* @__PURE__ */
|
|
2071
|
+
/* @__PURE__ */ u(Zt, { size: 18, color: "#9e9e9e" })
|
|
2072
2072
|
]
|
|
2073
2073
|
},
|
|
2074
|
-
`app-${
|
|
2074
|
+
`app-${f.key}`
|
|
2075
2075
|
)),
|
|
2076
|
-
s.map((
|
|
2076
|
+
s.map((f) => /* @__PURE__ */ w(
|
|
2077
2077
|
"div",
|
|
2078
2078
|
{
|
|
2079
2079
|
className: Ze,
|
|
2080
2080
|
style: Je,
|
|
2081
|
-
onClick: () => r(
|
|
2081
|
+
onClick: () => r(f),
|
|
2082
2082
|
role: "button",
|
|
2083
2083
|
tabIndex: 0,
|
|
2084
2084
|
onKeyDown: (h) => {
|
|
2085
|
-
h.key === "Enter" && r(
|
|
2085
|
+
h.key === "Enter" && r(f);
|
|
2086
2086
|
},
|
|
2087
2087
|
onMouseEnter: (h) => {
|
|
2088
2088
|
h.currentTarget.style.background = "#f5f5f5";
|
|
@@ -2091,25 +2091,25 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2091
2091
|
h.currentTarget.style.background = "";
|
|
2092
2092
|
},
|
|
2093
2093
|
children: [
|
|
2094
|
-
|
|
2095
|
-
/* @__PURE__ */
|
|
2094
|
+
f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
|
|
2095
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label })
|
|
2096
2096
|
]
|
|
2097
2097
|
},
|
|
2098
|
-
|
|
2098
|
+
f.type
|
|
2099
2099
|
)),
|
|
2100
|
-
i.length === 0 && s.length === 0 && /* @__PURE__ */
|
|
2100
|
+
i.length === 0 && s.length === 0 && /* @__PURE__ */ u("p", { className: "ff-text-muted ff-text-center", style: { fontSize: 13 }, children: n.noActions })
|
|
2101
2101
|
] }) : (
|
|
2102
2102
|
/* Stage 2 — actions for the selected app */
|
|
2103
|
-
a.descriptors.map((
|
|
2103
|
+
a.descriptors.map((f) => /* @__PURE__ */ w(
|
|
2104
2104
|
"div",
|
|
2105
2105
|
{
|
|
2106
2106
|
className: Ze,
|
|
2107
2107
|
style: Je,
|
|
2108
|
-
onClick: () => r(
|
|
2108
|
+
onClick: () => r(f),
|
|
2109
2109
|
role: "button",
|
|
2110
2110
|
tabIndex: 0,
|
|
2111
2111
|
onKeyDown: (h) => {
|
|
2112
|
-
h.key === "Enter" && r(
|
|
2112
|
+
h.key === "Enter" && r(f);
|
|
2113
2113
|
},
|
|
2114
2114
|
onMouseEnter: (h) => {
|
|
2115
2115
|
h.currentTarget.style.background = "#f5f5f5";
|
|
@@ -2118,11 +2118,11 @@ const Ce = ({ isOpen: e, onClose: t, title: n, icon: r, children: o, footer: i,
|
|
|
2118
2118
|
h.currentTarget.style.background = "";
|
|
2119
2119
|
},
|
|
2120
2120
|
children: [
|
|
2121
|
-
|
|
2122
|
-
/* @__PURE__ */
|
|
2121
|
+
f.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0 }, children: f.icon }),
|
|
2122
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: f.label })
|
|
2123
2123
|
]
|
|
2124
2124
|
},
|
|
2125
|
-
|
|
2125
|
+
f.type
|
|
2126
2126
|
))
|
|
2127
2127
|
) })
|
|
2128
2128
|
] })
|
|
@@ -2139,7 +2139,7 @@ function Ut(e) {
|
|
|
2139
2139
|
}) : Array.isArray(e.fields) && e.fields.length > 0;
|
|
2140
2140
|
}
|
|
2141
2141
|
const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o, onSave: i, onClose: s }) => {
|
|
2142
|
-
const [l, d] = L({ layout: "flat", fields: [] }), [a, c] = L(!1), [
|
|
2142
|
+
const [l, d] = L({ layout: "flat", fields: [] }), [a, c] = L(!1), [f, h] = L(null), [g, E] = L({});
|
|
2143
2143
|
se(() => {
|
|
2144
2144
|
E((r == null ? void 0 : r[Kt]) ?? {});
|
|
2145
2145
|
}, [r, t]), se(() => {
|
|
@@ -2157,9 +2157,9 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
|
|
|
2157
2157
|
k = !0;
|
|
2158
2158
|
};
|
|
2159
2159
|
}, [n, t]);
|
|
2160
|
-
const b = t ? `node-config-form-${t}` : "node-config-form", p = !a && !
|
|
2161
|
-
/* @__PURE__ */
|
|
2162
|
-
/* @__PURE__ */
|
|
2160
|
+
const b = t ? `node-config-form-${t}` : "node-config-form", p = !a && !f && Ut(l), x = p ? /* @__PURE__ */ w(Se, { children: [
|
|
2161
|
+
/* @__PURE__ */ u(Le, { type: "button", variant: "text", size: "small", sx: { textTransform: "none", color: "#475569" }, onClick: s, children: o.cancel }),
|
|
2162
|
+
/* @__PURE__ */ u(
|
|
2163
2163
|
Le,
|
|
2164
2164
|
{
|
|
2165
2165
|
type: "submit",
|
|
@@ -2178,14 +2178,14 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
|
|
|
2178
2178
|
}
|
|
2179
2179
|
)
|
|
2180
2180
|
] }) : null;
|
|
2181
|
-
return n != null && n.customPanel && t ? /* @__PURE__ */
|
|
2181
|
+
return n != null && n.customPanel && t ? /* @__PURE__ */ u(Ce, { isOpen: e, onClose: s, title: n.label ?? o.configureStep, icon: n.icon, width: 500, children: n.customPanel({
|
|
2182
2182
|
nodeId: t,
|
|
2183
2183
|
data: r ?? {},
|
|
2184
2184
|
onSave: (k) => {
|
|
2185
2185
|
i(t, k), s();
|
|
2186
2186
|
},
|
|
2187
2187
|
onClose: s
|
|
2188
|
-
}) }) : /* @__PURE__ */
|
|
2188
|
+
}) }) : /* @__PURE__ */ u(
|
|
2189
2189
|
Ce,
|
|
2190
2190
|
{
|
|
2191
2191
|
isOpen: e,
|
|
@@ -2195,10 +2195,10 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
|
|
|
2195
2195
|
width: 500,
|
|
2196
2196
|
footer: x,
|
|
2197
2197
|
children: /* @__PURE__ */ w(re, { sx: { p: 2 }, children: [
|
|
2198
|
-
a && /* @__PURE__ */
|
|
2199
|
-
!a &&
|
|
2200
|
-
!a && !
|
|
2201
|
-
p && /* @__PURE__ */
|
|
2198
|
+
a && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.loadingConfiguration }),
|
|
2199
|
+
!a && f && /* @__PURE__ */ u("p", { style: { fontSize: 13, color: "#d32f2f" }, children: f }),
|
|
2200
|
+
!a && !f && !Ut(l) && /* @__PURE__ */ u("p", { className: "ff-text-muted", style: { fontSize: 13 }, children: o.noConfigurationNeeded }),
|
|
2201
|
+
p && /* @__PURE__ */ u(
|
|
2202
2202
|
xr,
|
|
2203
2203
|
{
|
|
2204
2204
|
schema: l,
|
|
@@ -2230,26 +2230,26 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
|
|
|
2230
2230
|
return;
|
|
2231
2231
|
}
|
|
2232
2232
|
s({ status: "loading" }), o(n).then((l) => s({ status: "loaded", state: l })).catch((l) => s({ status: "error", message: (l == null ? void 0 : l.message) ?? "Failed to load workflow" }));
|
|
2233
|
-
}, [e, n, o]), /* @__PURE__ */
|
|
2233
|
+
}, [e, n, o]), /* @__PURE__ */ u(
|
|
2234
2234
|
Ce,
|
|
2235
2235
|
{
|
|
2236
2236
|
isOpen: e,
|
|
2237
2237
|
onClose: t,
|
|
2238
2238
|
title: r ? `Preview: ${r}` : "Sub-Workflow Preview",
|
|
2239
|
-
icon: /* @__PURE__ */
|
|
2239
|
+
icon: /* @__PURE__ */ u(cr, { size: 18, color: "#00695c" }),
|
|
2240
2240
|
width: 700,
|
|
2241
2241
|
children: /* @__PURE__ */ w("div", { style: { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", padding: 24 }, children: [
|
|
2242
|
-
i.status === "idle" && /* @__PURE__ */
|
|
2242
|
+
i.status === "idle" && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", fontSize: 14 }, children: "Select a workflow to preview" }),
|
|
2243
2243
|
i.status === "loading" && /* @__PURE__ */ w("div", { style: { textAlign: "center", color: "#9e9e9e" }, children: [
|
|
2244
|
-
/* @__PURE__ */
|
|
2245
|
-
/* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2244
|
+
/* @__PURE__ */ u("div", { style: { width: 32, height: 32, borderRadius: "50%", border: "3px solid #e0e0e0", borderTopColor: "#00897b", animation: "spin 0.8s linear infinite", margin: "0 auto 12px" } }),
|
|
2245
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 14 }, children: "Loading workflow…" }),
|
|
2246
|
+
/* @__PURE__ */ u("style", { children: "@keyframes spin { to { transform: rotate(360deg); } }" })
|
|
2247
2247
|
] }),
|
|
2248
2248
|
i.status === "error" && /* @__PURE__ */ w("div", { style: { textAlign: "center", color: "#c62828" }, children: [
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */
|
|
2249
|
+
/* @__PURE__ */ u(dr, { size: 32, style: { marginBottom: 8 } }),
|
|
2250
|
+
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: i.message })
|
|
2251
2251
|
] }),
|
|
2252
|
-
i.status === "loaded" && /* @__PURE__ */
|
|
2252
|
+
i.status === "loaded" && /* @__PURE__ */ u("div", { style: { width: "100%", flex: 1 }, children: /* @__PURE__ */ u(ls, { state: i.state }) })
|
|
2253
2253
|
] })
|
|
2254
2254
|
}
|
|
2255
2255
|
);
|
|
@@ -2263,7 +2263,7 @@ const is = ({ open: e, nodeId: t, descriptor: n, initialValues: r, messages: o,
|
|
|
2263
2263
|
]).then(([i, s, l]) => {
|
|
2264
2264
|
n(() => i), o({ nodeTypeRegistry: s, templateRegistry: l });
|
|
2265
2265
|
});
|
|
2266
|
-
}, []), !t || !r ? /* @__PURE__ */
|
|
2266
|
+
}, []), !t || !r ? /* @__PURE__ */ u("div", { style: { color: "#9e9e9e", fontSize: 13, textAlign: "center" }, children: "Loading canvas…" }) : /* @__PURE__ */ u("div", { style: { width: "100%", height: 480, border: "1px solid #e0e0e0", borderRadius: 8, overflow: "hidden" }, children: /* @__PURE__ */ u(
|
|
2267
2267
|
t,
|
|
2268
2268
|
{
|
|
2269
2269
|
nodeRegistry: r.nodeTypeRegistry,
|
|
@@ -2307,23 +2307,23 @@ function ds(e, t, n, r = "TB") {
|
|
|
2307
2307
|
return { ...i, position: { x: s.x - l / 2, y: s.y - d / 2 } };
|
|
2308
2308
|
});
|
|
2309
2309
|
}
|
|
2310
|
-
const
|
|
2310
|
+
const fe = (e) => e === "filter" || e === "approval";
|
|
2311
2311
|
function cs(e, t, n, r) {
|
|
2312
|
-
const s = tt, l = 30, d = 30, a = {}, c = {},
|
|
2313
|
-
for (const p of e)
|
|
2312
|
+
const s = tt, l = 30, d = 30, a = {}, c = {}, f = /* @__PURE__ */ new Map();
|
|
2313
|
+
for (const p of e) f.set(p.id, p);
|
|
2314
2314
|
for (const p of Object.values(t))
|
|
2315
2315
|
for (const x of Object.values(p))
|
|
2316
|
-
for (const k of x)
|
|
2316
|
+
for (const k of x) f.set(k.id, k);
|
|
2317
2317
|
const h = (p, x, k) => {
|
|
2318
2318
|
const M = r[p] ?? { width: me, height: 80 };
|
|
2319
2319
|
return a[p] = { x: x - M.width / 2, y: k }, k + M.height;
|
|
2320
2320
|
}, g = (p, x, k) => {
|
|
2321
2321
|
let M = k;
|
|
2322
2322
|
for (const z of p)
|
|
2323
|
-
M = h(z.id, x, M) + s,
|
|
2323
|
+
M = h(z.id, x, M) + s, fe(z.kind) && t[z.id] && (M = E(z.id, x, M));
|
|
2324
2324
|
return M;
|
|
2325
2325
|
}, E = (p, x, k) => {
|
|
2326
|
-
const M = x + 180, z = t[p], W = Object.keys(z), G =
|
|
2326
|
+
const M = x + 180, z = t[p], W = Object.keys(z), G = f.get(p), P = (G == null ? void 0 : G.branchLabels) ?? { pass: "Pass", fail: "Fail" }, I = a[p], Y = r[p] ?? { width: me, height: 80 }, J = I.y + Y.height;
|
|
2327
2327
|
if ((G == null ? void 0 : G.branchStyle) === "inline-gate") {
|
|
2328
2328
|
const ie = [], he = x + Y.width / 2 + 140;
|
|
2329
2329
|
let te = I.y + Y.height / 2;
|
|
@@ -2353,7 +2353,7 @@ function cs(e, t, n, r) {
|
|
|
2353
2353
|
};
|
|
2354
2354
|
let b = nt;
|
|
2355
2355
|
for (const p of e)
|
|
2356
|
-
b = h(p.id, 400, b) + s,
|
|
2356
|
+
b = h(p.id, 400, b) + s, fe(p.kind) && t[p.id] && (b = E(p.id, 400, b));
|
|
2357
2357
|
return {
|
|
2358
2358
|
nodes: n.map((p) => a[p.id] ? { ...p, position: a[p.id] } : p),
|
|
2359
2359
|
railSpecs: c
|
|
@@ -2369,7 +2369,7 @@ function qt(e) {
|
|
|
2369
2369
|
selectable: !1
|
|
2370
2370
|
};
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2372
|
+
function fs(e, t, n, r, o) {
|
|
2373
2373
|
return {
|
|
2374
2374
|
id: `e-${e.id}-${t.id}`,
|
|
2375
2375
|
source: e.id,
|
|
@@ -2383,7 +2383,7 @@ function us(e, t, n, r, o) {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
};
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function us(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
2387
2387
|
const l = o.edgeColor ?? "#b0bec5", d = [], a = [], c = (b, p, x) => {
|
|
2388
2388
|
const k = t[b];
|
|
2389
2389
|
if (!k) return;
|
|
@@ -2394,18 +2394,18 @@ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2394
2394
|
source: b,
|
|
2395
2395
|
sourceHandle: "pass",
|
|
2396
2396
|
target: I[0].id,
|
|
2397
|
-
type: "
|
|
2397
|
+
type: "edgeWithPlusLabel",
|
|
2398
2398
|
style: { stroke: l },
|
|
2399
|
-
data: {
|
|
2399
|
+
data: { label: J, onAddStepClick: n, referenceNodeType: "filterNode", filterId: b, branch: Y }
|
|
2400
2400
|
}) : G ? a.push({
|
|
2401
2401
|
id: `e-${b}-${Y}-start`,
|
|
2402
2402
|
source: b,
|
|
2403
2403
|
sourceHandle: "fail",
|
|
2404
2404
|
target: I[0].id,
|
|
2405
2405
|
targetHandle: "left",
|
|
2406
|
-
type: "
|
|
2406
|
+
type: "labelPlusEdge",
|
|
2407
2407
|
style: { stroke: l },
|
|
2408
|
-
data: {
|
|
2408
|
+
data: { label: J, showPlus: !1, filterId: b, branch: Y }
|
|
2409
2409
|
}) : a.push({
|
|
2410
2410
|
id: `e-${b}-${Y}-start`,
|
|
2411
2411
|
source: b,
|
|
@@ -2415,9 +2415,9 @@ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2415
2415
|
data: { branch: Y, filterId: b, label: J, isFirst: le === 0, onAddStepClick: n, verticalRouting: s === "vertical" }
|
|
2416
2416
|
});
|
|
2417
2417
|
for (let A = 1; A < I.length; A++)
|
|
2418
|
-
|
|
2418
|
+
fe(I[A - 1].kind) || a.push(fs(I[A - 1], I[A], l, n, { filterId: b, branch: Y }));
|
|
2419
2419
|
for (const A of I)
|
|
2420
|
-
|
|
2420
|
+
fe(A.kind) && t[A.id] && c(A.id, A.branchLabels, A.branchStyle);
|
|
2421
2421
|
}
|
|
2422
2422
|
};
|
|
2423
2423
|
W.forEach((I, Y) => {
|
|
@@ -2443,9 +2443,9 @@ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2443
2443
|
}
|
|
2444
2444
|
(p.kind === "filter" || p.kind === "approval") && t[p.id] && c(p.id, p.branchLabels, p.branchStyle);
|
|
2445
2445
|
}
|
|
2446
|
-
const
|
|
2446
|
+
const f = {};
|
|
2447
2447
|
if (d.forEach((b) => {
|
|
2448
|
-
|
|
2448
|
+
f[b.id] = {
|
|
2449
2449
|
width: me,
|
|
2450
2450
|
height: r[b.id] ?? rt[b.type ?? ""] ?? 80
|
|
2451
2451
|
};
|
|
@@ -2453,14 +2453,14 @@ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2453
2453
|
if (i === "LR") {
|
|
2454
2454
|
let M = nt;
|
|
2455
2455
|
return { nodes: d.map((W) => {
|
|
2456
|
-
const G =
|
|
2456
|
+
const G = f[W.id].width, P = f[W.id].height, I = { ...W, position: { x: M, y: 300 - P / 2 } };
|
|
2457
2457
|
return M += G + tt, I;
|
|
2458
2458
|
}), edges: a };
|
|
2459
2459
|
}
|
|
2460
2460
|
const b = 400;
|
|
2461
2461
|
let p = nt;
|
|
2462
2462
|
return { nodes: d.map((k) => {
|
|
2463
|
-
const M =
|
|
2463
|
+
const M = f[k.id].height, z = { ...k, position: { x: b - me / 2, y: p } };
|
|
2464
2464
|
return p += M + tt, z;
|
|
2465
2465
|
}), edges: a };
|
|
2466
2466
|
}
|
|
@@ -2468,12 +2468,12 @@ function fs(e, t, n, r, o = {}, i = "TB", s = "horizontal") {
|
|
|
2468
2468
|
(b) => Object.values(b).flat().some((p) => p.branchStyle === "inline-gate")
|
|
2469
2469
|
);
|
|
2470
2470
|
if (s === "vertical" || g) {
|
|
2471
|
-
const { nodes: b, railSpecs: p } = cs(e, t, d,
|
|
2471
|
+
const { nodes: b, railSpecs: p } = cs(e, t, d, f);
|
|
2472
2472
|
return { nodes: b.map(
|
|
2473
2473
|
(k) => p[k.id] ? { ...k, data: { ...k.data, _branchRail: p[k.id] } } : k
|
|
2474
2474
|
), edges: a };
|
|
2475
2475
|
}
|
|
2476
|
-
return { nodes: ds(d, a,
|
|
2476
|
+
return { nodes: ds(d, a, f, i), edges: a };
|
|
2477
2477
|
}
|
|
2478
2478
|
const Xt = ({
|
|
2479
2479
|
nodeRegistry: e,
|
|
@@ -2487,7 +2487,7 @@ const Xt = ({
|
|
|
2487
2487
|
messages: d,
|
|
2488
2488
|
canvasOptions: a = {},
|
|
2489
2489
|
renderTriggerSelector: c,
|
|
2490
|
-
loadTriggerSources:
|
|
2490
|
+
loadTriggerSources: f,
|
|
2491
2491
|
renderNodePicker: h,
|
|
2492
2492
|
renderNodeConfig: g,
|
|
2493
2493
|
onNodeClick: E,
|
|
@@ -2517,7 +2517,7 @@ const Xt = ({
|
|
|
2517
2517
|
snapGrid: ct = [15, 15],
|
|
2518
2518
|
branchLayout: we = "horizontal",
|
|
2519
2519
|
nodeBody: Ee = "full"
|
|
2520
|
-
} = a, xe = V(() => _r(d), [d]), [R, ae] = L(() => (n == null ? void 0 : n.slots) ?? Vt()), [K, ne] = L(() => (n == null ? void 0 : n.branches) ?? {}), [pe, X] = L(null), [We,
|
|
2520
|
+
} = a, xe = V(() => _r(d), [d]), [R, ae] = L(() => (n == null ? void 0 : n.slots) ?? Vt()), [K, ne] = L(() => (n == null ? void 0 : n.branches) ?? {}), [pe, X] = L(null), [We, ft] = L(null), [Z, Me] = L(null), [de, ut] = L(null), [je, ht] = L(null), [j, gt] = L(() => {
|
|
2521
2521
|
const y = n == null ? void 0 : n.slots.find((S) => S.kind === "triggerFixed"), v = y != null && y.id.startsWith("trigger-") ? y.id.slice(8) : void 0;
|
|
2522
2522
|
return v ? t.lookup(v) ?? null : null;
|
|
2523
2523
|
}), [pt, Mn] = L({}), jn = U((y) => {
|
|
@@ -2534,7 +2534,7 @@ const Xt = ({
|
|
|
2534
2534
|
}
|
|
2535
2535
|
return null;
|
|
2536
2536
|
}, [R, K]), $e = U((y) => {
|
|
2537
|
-
s || (
|
|
2537
|
+
s || (ft(y), X("nodeConfig"));
|
|
2538
2538
|
}, [s]), mt = U((y) => {
|
|
2539
2539
|
if (!s) {
|
|
2540
2540
|
if (R.some((v) => v.id === y)) {
|
|
@@ -2545,10 +2545,10 @@ const Xt = ({
|
|
|
2545
2545
|
}
|
|
2546
2546
|
ae((S) => {
|
|
2547
2547
|
const C = S.filter((T) => T.id !== y);
|
|
2548
|
-
return
|
|
2548
|
+
return fe((v == null ? void 0 : v.kind) ?? "") && !C.some((T) => T.kind === "end") ? [...C, { id: "end", kind: "end", reactFlowType: "endNode" }] : C;
|
|
2549
2549
|
}), ne((S) => {
|
|
2550
2550
|
const C = { ...S }, T = (m) => {
|
|
2551
|
-
C[m] && (Object.values(C[m]).flat().filter((N) =>
|
|
2551
|
+
C[m] && (Object.values(C[m]).flat().filter((N) => fe(N.kind)).forEach((N) => T(N.id)), delete C[m]);
|
|
2552
2552
|
};
|
|
2553
2553
|
return T(y), C;
|
|
2554
2554
|
});
|
|
@@ -2558,7 +2558,7 @@ const Xt = ({
|
|
|
2558
2558
|
const S = (T, m) => {
|
|
2559
2559
|
const N = [];
|
|
2560
2560
|
for (const _ of T)
|
|
2561
|
-
|
|
2561
|
+
fe(_.kind) && m[_.id] && (N.push(_.id), Object.values(m[_.id]).forEach((O) => N.push(...S(O, m))));
|
|
2562
2562
|
return N;
|
|
2563
2563
|
}, C = { ...v };
|
|
2564
2564
|
for (const T of Object.keys(C))
|
|
@@ -2575,7 +2575,7 @@ const Xt = ({
|
|
|
2575
2575
|
}, [s, R]), Ge = U(() => {
|
|
2576
2576
|
s || X("triggerSelect");
|
|
2577
2577
|
}, [s]), vt = U((y, v) => {
|
|
2578
|
-
s || bt || (Me(y),
|
|
2578
|
+
s || bt || (Me(y), ut(v.filterId && v.branch ? { filterId: v.filterId, branch: v.branch } : null), X("nodePicker"));
|
|
2579
2579
|
}, [s, bt]), wt = U((y, v) => {
|
|
2580
2580
|
if (gt(y), X(null), y.skeletonState) {
|
|
2581
2581
|
const C = Array.isArray(v) && v.length > 0, T = (y.skeletonState.slots ?? []).map((m) => m.kind !== "triggerFixed" ? m : {
|
|
@@ -2682,7 +2682,7 @@ const Xt = ({
|
|
|
2682
2682
|
const N = m.findIndex((_) => _.id === Z);
|
|
2683
2683
|
return N === -1 ? m : [...m.slice(0, N + 1), T, ...m.slice(N + 1)];
|
|
2684
2684
|
});
|
|
2685
|
-
Me(null),
|
|
2685
|
+
Me(null), ut(null), ft(v), X("nodeConfig");
|
|
2686
2686
|
}, [Z, de]), _t = U((y, v) => {
|
|
2687
2687
|
const S = (m) => {
|
|
2688
2688
|
const N = m.label || m.key;
|
|
@@ -2766,7 +2766,7 @@ const Xt = ({
|
|
|
2766
2766
|
}
|
|
2767
2767
|
return H != null && H.descriptorType ? e.forType(H.descriptorType) ?? null : null;
|
|
2768
2768
|
}, [H, e, j]), { nodes: Nt, edges: Fn } = V(
|
|
2769
|
-
() =>
|
|
2769
|
+
() => us(R, K, s ? null : vt, pt, l, p, we),
|
|
2770
2770
|
[R, K, s, vt, pt, l, p, we]
|
|
2771
2771
|
), Ct = V(() => {
|
|
2772
2772
|
const y = x ? new Map(x.steps.map((v) => [v.nodeId, v])) : null;
|
|
@@ -2797,7 +2797,7 @@ const Xt = ({
|
|
|
2797
2797
|
shape: { borderRadius: l.borderRadius ?? 6 },
|
|
2798
2798
|
typography: l.fontFamily ? { fontFamily: l.fontFamily } : {}
|
|
2799
2799
|
}), [l]);
|
|
2800
|
-
return /* @__PURE__ */
|
|
2800
|
+
return /* @__PURE__ */ u(Nr, { theme: Bn, children: /* @__PURE__ */ u(kr, { resolvers: J, children: /* @__PURE__ */ u(Qn.Provider, { value: Rn, children: /* @__PURE__ */ w(
|
|
2801
2801
|
"div",
|
|
2802
2802
|
{
|
|
2803
2803
|
className: "flowforge-canvas",
|
|
@@ -2819,7 +2819,7 @@ const Xt = ({
|
|
|
2819
2819
|
"--ff-font-family": l.fontFamily
|
|
2820
2820
|
},
|
|
2821
2821
|
children: [
|
|
2822
|
-
!M && (i || G || z) && /* @__PURE__ */
|
|
2822
|
+
!M && (i || G || z) && /* @__PURE__ */ u(
|
|
2823
2823
|
ns,
|
|
2824
2824
|
{
|
|
2825
2825
|
workflowName: z,
|
|
@@ -2855,7 +2855,7 @@ const Xt = ({
|
|
|
2855
2855
|
S && (E != null && E(S) || (S.kind === "addTrigger" || S.kind === "triggerFixed" ? Ge() : (S.kind === "userTask" || S.kind === "filter" || S.kind === "approval") && $e(v.id)));
|
|
2856
2856
|
},
|
|
2857
2857
|
children: [
|
|
2858
|
-
l.background !== "none" && /* @__PURE__ */
|
|
2858
|
+
l.background !== "none" && /* @__PURE__ */ u(
|
|
2859
2859
|
Yn,
|
|
2860
2860
|
{
|
|
2861
2861
|
variant: l.background,
|
|
@@ -2863,20 +2863,20 @@ const Xt = ({
|
|
|
2863
2863
|
gap: 20
|
|
2864
2864
|
}
|
|
2865
2865
|
),
|
|
2866
|
-
ie && /* @__PURE__ */
|
|
2867
|
-
he && /* @__PURE__ */
|
|
2868
|
-
/* @__PURE__ */
|
|
2866
|
+
ie && /* @__PURE__ */ u(Kn, { showInteractive: !1 }),
|
|
2867
|
+
he && /* @__PURE__ */ u(Hn, { zoomable: !0, pannable: !0 }),
|
|
2868
|
+
/* @__PURE__ */ u(es, { onHeightsReady: jn, nodeCount: Ct.length })
|
|
2869
2869
|
]
|
|
2870
2870
|
}
|
|
2871
2871
|
),
|
|
2872
|
-
c ? pe === "triggerSelect" && c(t.list(), wt, () => X(null)) : /* @__PURE__ */
|
|
2872
|
+
c ? pe === "triggerSelect" && c(t.list(), wt, () => X(null)) : /* @__PURE__ */ u(rs, { open: pe === "triggerSelect", templates: t.list(), messages: xe, onSelect: wt, onClose: () => X(null), loadTriggerSources: f }),
|
|
2873
2873
|
h ? pe === "nodePicker" && h(xt(), kt, () => {
|
|
2874
2874
|
X(null), Me(null);
|
|
2875
|
-
}) : /* @__PURE__ */
|
|
2875
|
+
}) : /* @__PURE__ */ u(os, { open: pe === "nodePicker", availableDescriptors: xt(), messages: xe, onSelect: kt, onClose: () => {
|
|
2876
2876
|
X(null), Me(null);
|
|
2877
2877
|
} }),
|
|
2878
|
-
g ? pe === "nodeConfig" && g(St ?? void 0, H, _t, () => X(null)) : /* @__PURE__ */
|
|
2879
|
-
k && je && /* @__PURE__ */
|
|
2878
|
+
g ? pe === "nodeConfig" && g(St ?? void 0, H, _t, () => X(null)) : /* @__PURE__ */ u(is, { open: pe === "nodeConfig", nodeId: We, descriptor: St, initialValues: H == null ? void 0 : H.formData, messages: xe, onSave: _t, onClose: () => X(null) }),
|
|
2879
|
+
k && je && /* @__PURE__ */ u(
|
|
2880
2880
|
ss,
|
|
2881
2881
|
{
|
|
2882
2882
|
isOpen: !!je,
|
|
@@ -2927,15 +2927,15 @@ function gs({ template: e, onSelect: t }) {
|
|
|
2927
2927
|
},
|
|
2928
2928
|
children: [
|
|
2929
2929
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "flex-start", gap: 10 }, children: [
|
|
2930
|
-
e.icon && /* @__PURE__ */
|
|
2930
|
+
e.icon && /* @__PURE__ */ u("div", { style: { flexShrink: 0, width: 36, height: 36, borderRadius: 8, background: "#f5f5f5", display: "flex", alignItems: "center", justifyContent: "center" }, children: e.icon }),
|
|
2931
2931
|
/* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
2932
|
-
/* @__PURE__ */
|
|
2933
|
-
e.description && /* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ u("div", { style: { fontWeight: 600, fontSize: 14, color: "#212121", marginBottom: 2 }, children: e.label }),
|
|
2933
|
+
e.description && /* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#757575", lineHeight: 1.4, display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden" }, children: e.description })
|
|
2934
2934
|
] })
|
|
2935
2935
|
] }),
|
|
2936
2936
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", flexWrap: "wrap", gap: 4 }, children: [
|
|
2937
|
-
n && /* @__PURE__ */
|
|
2938
|
-
(i = e.tags) == null ? void 0 : i.map((s) => /* @__PURE__ */
|
|
2937
|
+
n && /* @__PURE__ */ u("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: n.bg, color: n.color }, children: n.label }),
|
|
2938
|
+
(i = e.tags) == null ? void 0 : i.map((s) => /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#616161" }, children: s }, s)),
|
|
2939
2939
|
r > 0 && /* @__PURE__ */ w("span", { style: { fontSize: 10, color: "#9e9e9e", marginLeft: "auto" }, children: [
|
|
2940
2940
|
r,
|
|
2941
2941
|
" step",
|
|
@@ -2965,20 +2965,20 @@ const js = ({
|
|
|
2965
2965
|
if (i !== Qe && (a = a.filter((c) => c.category === i)), r.trim()) {
|
|
2966
2966
|
const c = r.toLowerCase();
|
|
2967
2967
|
a = a.filter(
|
|
2968
|
-
(
|
|
2968
|
+
(f) => {
|
|
2969
2969
|
var h, g;
|
|
2970
|
-
return
|
|
2970
|
+
return f.label.toLowerCase().includes(c) || ((h = f.description) == null ? void 0 : h.toLowerCase().includes(c)) || ((g = f.tags) == null ? void 0 : g.some((E) => E.toLowerCase().includes(c)));
|
|
2971
2971
|
}
|
|
2972
2972
|
);
|
|
2973
2973
|
}
|
|
2974
|
-
return [...a].sort((c,
|
|
2974
|
+
return [...a].sort((c, f) => (f.popularity ?? 0) - (c.popularity ?? 0));
|
|
2975
2975
|
}, [e, i, r]);
|
|
2976
2976
|
return /* @__PURE__ */ w("div", { style: { display: "flex", flexDirection: "column", height: "100%", fontFamily: "inherit" }, children: [
|
|
2977
2977
|
/* @__PURE__ */ w("div", { style: { padding: "24px 24px 0", borderBottom: "1px solid #f0f0f0", paddingBottom: 16 }, children: [
|
|
2978
2978
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 16 }, children: [
|
|
2979
2979
|
/* @__PURE__ */ w("div", { children: [
|
|
2980
|
-
/* @__PURE__ */
|
|
2981
|
-
/* @__PURE__ */
|
|
2980
|
+
/* @__PURE__ */ u("h2", { style: { margin: 0, fontSize: 20, fontWeight: 700, color: "#212121" }, children: "Workflow Templates" }),
|
|
2981
|
+
/* @__PURE__ */ u("p", { style: { margin: "4px 0 0", fontSize: 13, color: "#757575" }, children: "Choose a pre-built template or start from scratch" })
|
|
2982
2982
|
] }),
|
|
2983
2983
|
n && /* @__PURE__ */ w(
|
|
2984
2984
|
"button",
|
|
@@ -2986,15 +2986,15 @@ const js = ({
|
|
|
2986
2986
|
onClick: n,
|
|
2987
2987
|
style: { display: "flex", alignItems: "center", gap: 6, padding: "8px 16px", border: "1.5px solid #1976d2", borderRadius: 6, background: "#fff", color: "#1976d2", fontSize: 13, fontWeight: 600, cursor: "pointer" },
|
|
2988
2988
|
children: [
|
|
2989
|
-
/* @__PURE__ */
|
|
2989
|
+
/* @__PURE__ */ u(fr, { size: 16 }),
|
|
2990
2990
|
"Start from Scratch"
|
|
2991
2991
|
]
|
|
2992
2992
|
}
|
|
2993
2993
|
)
|
|
2994
2994
|
] }),
|
|
2995
2995
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 8, background: "#f5f5f5", borderRadius: 8, padding: "8px 12px", marginBottom: 12 }, children: [
|
|
2996
|
-
/* @__PURE__ */
|
|
2997
|
-
/* @__PURE__ */
|
|
2996
|
+
/* @__PURE__ */ u(ur, { size: 18, color: "#9e9e9e" }),
|
|
2997
|
+
/* @__PURE__ */ u(
|
|
2998
2998
|
"input",
|
|
2999
2999
|
{
|
|
3000
3000
|
value: r,
|
|
@@ -3004,7 +3004,7 @@ const js = ({
|
|
|
3004
3004
|
}
|
|
3005
3005
|
)
|
|
3006
3006
|
] }),
|
|
3007
|
-
l.length > 1 && /* @__PURE__ */
|
|
3007
|
+
l.length > 1 && /* @__PURE__ */ u("div", { style: { display: "flex", gap: 4, flexWrap: "wrap" }, children: l.map((a) => /* @__PURE__ */ u(
|
|
3008
3008
|
"button",
|
|
3009
3009
|
{
|
|
3010
3010
|
onClick: () => s(a),
|
|
@@ -3024,10 +3024,10 @@ const js = ({
|
|
|
3024
3024
|
a
|
|
3025
3025
|
)) })
|
|
3026
3026
|
] }),
|
|
3027
|
-
/* @__PURE__ */
|
|
3028
|
-
/* @__PURE__ */
|
|
3029
|
-
/* @__PURE__ */
|
|
3030
|
-
] }) : /* @__PURE__ */
|
|
3027
|
+
/* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto", padding: 24 }, children: d.length === 0 ? /* @__PURE__ */ w("div", { style: { textAlign: "center", padding: "40px 0", color: "#9e9e9e" }, children: [
|
|
3028
|
+
/* @__PURE__ */ u(hr, { size: 36, style: { marginBottom: 8 } }),
|
|
3029
|
+
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No templates found" })
|
|
3030
|
+
] }) : /* @__PURE__ */ u("div", { style: { display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(280px, 1fr))", gap: 16 }, children: d.map((a) => /* @__PURE__ */ u(gs, { template: a, onSelect: () => t(a) }, a.triggerKey)) }) })
|
|
3031
3031
|
] });
|
|
3032
3032
|
}, ze = {
|
|
3033
3033
|
running: { label: "Running", color: oe.running, icon: $.createElement(nn, { size: 14 }) },
|
|
@@ -3072,23 +3072,23 @@ function ys({ step: e }) {
|
|
|
3072
3072
|
o && (i.key === "Enter" || i.key === " ") && n((s) => !s);
|
|
3073
3073
|
},
|
|
3074
3074
|
children: [
|
|
3075
|
-
/* @__PURE__ */
|
|
3076
|
-
/* @__PURE__ */
|
|
3077
|
-
e.branchTaken && /* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
o && /* @__PURE__ */
|
|
3075
|
+
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: $.cloneElement(r.icon, { color: r.color }) }),
|
|
3076
|
+
/* @__PURE__ */ u("span", { style: { flex: 1, fontSize: 13, color: "#212121" }, children: e.label || e.nodeId }),
|
|
3077
|
+
e.branchTaken && /* @__PURE__ */ u("span", { style: { fontSize: 10, padding: "1px 6px", borderRadius: 10, background: "#e3f2fd", color: "#1565c0", fontWeight: 600 }, children: e.branchTaken }),
|
|
3078
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 11, color: "#9e9e9e", flexShrink: 0 }, children: e.startedAt ? In(e.startedAt, e.completedAt) : "—" }),
|
|
3079
|
+
o && /* @__PURE__ */ u("span", { style: { color: "#9e9e9e", flexShrink: 0 }, children: t ? $.createElement(yr, { size: 16 }) : $.createElement(br, { size: 16 }) })
|
|
3080
3080
|
]
|
|
3081
3081
|
}
|
|
3082
3082
|
),
|
|
3083
3083
|
t && o && /* @__PURE__ */ w("div", { style: { padding: "0 12px 10px 32px", fontSize: 12 }, children: [
|
|
3084
|
-
e.error && /* @__PURE__ */
|
|
3084
|
+
e.error && /* @__PURE__ */ u("div", { style: { padding: "6px 10px", borderRadius: 6, background: "#ffebee", color: "#c62828", marginBottom: 6 }, children: e.error }),
|
|
3085
3085
|
e.inputs && Object.keys(e.inputs).length > 0 && /* @__PURE__ */ w("details", { style: { marginBottom: 4 }, children: [
|
|
3086
|
-
/* @__PURE__ */
|
|
3087
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ u("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Inputs" }),
|
|
3087
|
+
/* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.inputs, null, 2) })
|
|
3088
3088
|
] }),
|
|
3089
3089
|
e.outputs && Object.keys(e.outputs).length > 0 && /* @__PURE__ */ w("details", { children: [
|
|
3090
|
-
/* @__PURE__ */
|
|
3091
|
-
/* @__PURE__ */
|
|
3090
|
+
/* @__PURE__ */ u("summary", { style: { cursor: "pointer", color: "#616161", marginBottom: 4 }, children: "Outputs" }),
|
|
3091
|
+
/* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 8, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(e.outputs, null, 2) })
|
|
3092
3092
|
] })
|
|
3093
3093
|
] })
|
|
3094
3094
|
] });
|
|
@@ -3115,9 +3115,9 @@ function bs({ record: e, selected: t, onSelect: n }) {
|
|
|
3115
3115
|
outline: "none"
|
|
3116
3116
|
},
|
|
3117
3117
|
children: [
|
|
3118
|
-
/* @__PURE__ */
|
|
3118
|
+
/* @__PURE__ */ u("span", { style: { color: r.color, flexShrink: 0 }, children: $.cloneElement(r.icon, { color: r.color, size: 16 }) }),
|
|
3119
3119
|
/* @__PURE__ */ w("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
3120
|
-
/* @__PURE__ */
|
|
3120
|
+
/* @__PURE__ */ u("div", { style: { fontSize: 12, color: "#212121", fontWeight: t ? 600 : 400, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: ot(e.triggeredAt) }),
|
|
3121
3121
|
/* @__PURE__ */ w("div", { style: { fontSize: 11, color: "#9e9e9e" }, children: [
|
|
3122
3122
|
e.triggeredBy ? `by ${e.triggeredBy}` : "System",
|
|
3123
3123
|
" · ",
|
|
@@ -3126,8 +3126,8 @@ function bs({ record: e, selected: t, onSelect: n }) {
|
|
|
3126
3126
|
e.steps.length !== 1 ? "s" : ""
|
|
3127
3127
|
] })
|
|
3128
3128
|
] }),
|
|
3129
|
-
/* @__PURE__ */
|
|
3130
|
-
/* @__PURE__ */
|
|
3129
|
+
/* @__PURE__ */ u("span", { style: { fontSize: 11, fontWeight: 600, color: r.color, flexShrink: 0 }, children: r.label }),
|
|
3130
|
+
/* @__PURE__ */ u(Zt, { size: 14, color: "#bdbdbd" })
|
|
3131
3131
|
]
|
|
3132
3132
|
}
|
|
3133
3133
|
);
|
|
@@ -3136,9 +3136,9 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3136
3136
|
var s;
|
|
3137
3137
|
const [n, r] = L(((s = e[0]) == null ? void 0 : s.id) ?? null), o = e.find((l) => l.id === n) ?? null, i = [...e].sort((l, d) => new Date(d.triggeredAt).getTime() - new Date(l.triggeredAt).getTime());
|
|
3138
3138
|
return e.length === 0 ? /* @__PURE__ */ w("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: 300, color: "#9e9e9e", gap: 8 }, children: [
|
|
3139
|
-
/* @__PURE__ */
|
|
3140
|
-
/* @__PURE__ */
|
|
3141
|
-
/* @__PURE__ */
|
|
3139
|
+
/* @__PURE__ */ u(It, { size: 36 }),
|
|
3140
|
+
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 14 }, children: "No executions yet" }),
|
|
3141
|
+
/* @__PURE__ */ u("p", { style: { margin: 0, fontSize: 12 }, children: "Run history will appear here" })
|
|
3142
3142
|
] }) : /* @__PURE__ */ w("div", { style: { display: "flex", height: "100%", fontFamily: "inherit", border: "1px solid #e0e0e0", borderRadius: 8, overflow: "hidden" }, children: [
|
|
3143
3143
|
/* @__PURE__ */ w("div", { style: { width: 260, flexShrink: 0, borderRight: "1px solid #e0e0e0", overflowY: "auto", background: "#fafafa" }, children: [
|
|
3144
3144
|
/* @__PURE__ */ w("div", { style: { padding: "12px 14px", borderBottom: "1px solid #e0e0e0", fontWeight: 600, fontSize: 13, color: "#212121" }, children: [
|
|
@@ -3146,30 +3146,30 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3146
3146
|
e.length,
|
|
3147
3147
|
")"
|
|
3148
3148
|
] }),
|
|
3149
|
-
i.map((l) => /* @__PURE__ */
|
|
3149
|
+
i.map((l) => /* @__PURE__ */ u(bs, { record: l, selected: l.id === n, onSelect: () => r(l.id) }, l.id))
|
|
3150
3150
|
] }),
|
|
3151
|
-
/* @__PURE__ */
|
|
3151
|
+
/* @__PURE__ */ u("div", { style: { flex: 1, overflowY: "auto" }, children: o ? /* @__PURE__ */ w("div", { children: [
|
|
3152
3152
|
/* @__PURE__ */ w("div", { style: { padding: "16px 20px", borderBottom: "1px solid #f0f0f0", display: "flex", alignItems: "flex-start", justifyContent: "space-between", gap: 12 }, children: [
|
|
3153
3153
|
/* @__PURE__ */ w("div", { children: [
|
|
3154
3154
|
/* @__PURE__ */ w("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 4 }, children: [
|
|
3155
3155
|
$.cloneElement(ze[o.status].icon, { color: ze[o.status].color, size: 18 }),
|
|
3156
|
-
/* @__PURE__ */
|
|
3156
|
+
/* @__PURE__ */ u("span", { style: { fontWeight: 700, fontSize: 15, color: "#212121" }, children: ze[o.status].label })
|
|
3157
3157
|
] }),
|
|
3158
3158
|
/* @__PURE__ */ w("div", { style: { fontSize: 12, color: "#757575", display: "flex", flexDirection: "column", gap: 2 }, children: [
|
|
3159
3159
|
/* @__PURE__ */ w("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
3160
|
-
/* @__PURE__ */
|
|
3160
|
+
/* @__PURE__ */ u(It, { size: 13 }),
|
|
3161
3161
|
" ",
|
|
3162
3162
|
ot(o.triggeredAt),
|
|
3163
3163
|
o.completedAt && ` → ${ot(o.completedAt)} (${In(o.triggeredAt, o.completedAt)})`
|
|
3164
3164
|
] }),
|
|
3165
3165
|
o.triggeredBy && /* @__PURE__ */ w("span", { style: { display: "flex", alignItems: "center", gap: 4 }, children: [
|
|
3166
|
-
/* @__PURE__ */
|
|
3166
|
+
/* @__PURE__ */ u(pr, { size: 13 }),
|
|
3167
3167
|
" ",
|
|
3168
3168
|
o.triggeredBy
|
|
3169
3169
|
] })
|
|
3170
3170
|
] })
|
|
3171
3171
|
] }),
|
|
3172
|
-
t && /* @__PURE__ */
|
|
3172
|
+
t && /* @__PURE__ */ u(
|
|
3173
3173
|
"button",
|
|
3174
3174
|
{
|
|
3175
3175
|
onClick: () => t(o),
|
|
@@ -3178,20 +3178,20 @@ const zs = ({ records: e, onViewOnCanvas: t }) => {
|
|
|
3178
3178
|
}
|
|
3179
3179
|
)
|
|
3180
3180
|
] }),
|
|
3181
|
-
o.error && /* @__PURE__ */
|
|
3181
|
+
o.error && /* @__PURE__ */ u("div", { style: { margin: "12px 16px", padding: "10px 14px", borderRadius: 6, background: "#ffebee", color: "#c62828", fontSize: 13 }, children: o.error }),
|
|
3182
3182
|
/* @__PURE__ */ w("div", { children: [
|
|
3183
3183
|
/* @__PURE__ */ w("div", { style: { padding: "10px 12px", fontSize: 12, fontWeight: 600, color: "#757575", borderBottom: "1px solid #f0f0f0" }, children: [
|
|
3184
3184
|
"STEPS (",
|
|
3185
3185
|
o.steps.length,
|
|
3186
3186
|
")"
|
|
3187
3187
|
] }),
|
|
3188
|
-
o.steps.map((l, d) => /* @__PURE__ */
|
|
3188
|
+
o.steps.map((l, d) => /* @__PURE__ */ u(ys, { step: l }, `${l.nodeId}-${d}`))
|
|
3189
3189
|
] }),
|
|
3190
|
-
o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */
|
|
3191
|
-
/* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3190
|
+
o.inputs && Object.keys(o.inputs).length > 0 && /* @__PURE__ */ u("div", { style: { padding: "10px 16px" }, children: /* @__PURE__ */ w("details", { children: [
|
|
3191
|
+
/* @__PURE__ */ u("summary", { style: { cursor: "pointer", fontSize: 12, fontWeight: 600, color: "#757575", marginBottom: 6 }, children: "TRIGGER INPUTS" }),
|
|
3192
|
+
/* @__PURE__ */ u("pre", { style: { margin: 0, fontSize: 11, background: "#f5f5f5", padding: 10, borderRadius: 4, overflowX: "auto" }, children: JSON.stringify(o.inputs, null, 2) })
|
|
3193
3193
|
] }) })
|
|
3194
|
-
] }) : /* @__PURE__ */
|
|
3194
|
+
] }) : /* @__PURE__ */ u("div", { style: { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "#9e9e9e", fontSize: 14 }, children: "Select a run to see details" }) })
|
|
3195
3195
|
] });
|
|
3196
3196
|
};
|
|
3197
3197
|
export {
|
|
@@ -3201,4 +3201,4 @@ export {
|
|
|
3201
3201
|
ns as a,
|
|
3202
3202
|
js as b
|
|
3203
3203
|
};
|
|
3204
|
-
//# sourceMappingURL=WorkflowExecutionHistory-
|
|
3204
|
+
//# sourceMappingURL=WorkflowExecutionHistory-DUVtoDWf.js.map
|