lowcoder-comps 2.4.13 → 2.4.15
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/{0fa873f8.js → 0bb0c92e.js} +4 -4
- package/{1d0578cc.js → 0cc36377.js} +919 -969
- package/{4ee1107f.js → 0fa86771.js} +411 -451
- package/{7ceb1a86.js → 19a2ee87.js} +1067 -1085
- package/{62a4e802.js → 1b41afb7.js} +6 -6
- package/{140d1965.js → 1e5b4466.js} +1 -1
- package/21ce624b.js +433 -0
- package/247d363c.js +797 -0
- package/{66d40f47.js → 2dc10e5c.js} +96 -99
- package/{48262065.js → 3a91cb5c.js} +8 -8
- package/{bfff0c9e.js → 3ebe8123.js} +26 -27
- package/{e60eb1d6.js → 3f2bde45.js} +1 -1
- package/{08ce8965.js → 4046c39a.js} +247 -258
- package/{256b619e.js → 428ebac9.js} +14 -15
- package/{f85b9955.js → 4b8936b0.js} +68 -69
- package/{722d14f3.js → 4d48e6df.js} +6 -6
- package/{93e77b54.js → 558e8ee5.js} +4 -4
- package/{d2b89014.js → 56f6e990.js} +92 -92
- package/{6c5168e9.js → 5a31cef7.js} +2 -2
- package/{7873457c.js → 5d41cf38.js} +6 -6
- package/{5d259708.js → 5fd9a898.js} +4 -5
- package/{2c7a98c7.js → 63a771ab.js} +8 -8
- package/6a32f1c1.js +206 -0
- package/{e7717e30.js → 7035666f.js} +7 -7
- package/{c840f94c.js → 74ef17ae.js} +140 -141
- package/{eeeac330.js → 7cc252e4.js} +65540 -59868
- package/81d6ce63.js +817 -0
- package/{c8211b18.js → 832e744b.js} +1 -1
- package/{81a0d6f1.js → 8718dc59.js} +12 -12
- package/{7a22ada0.js → 88953f96.js} +18 -18
- package/a8d4a50e.js +373 -0
- package/aa88392e.js +190 -0
- package/b0862b2f.js +1083 -0
- package/{62c4dc6e.js → c1b710aa.js} +5 -5
- package/{4cf9b6b3.js → d72b57c8.js} +12713 -12735
- package/{629dfdca.js → e441921a.js} +4 -4
- package/{47848c42.js → e5b014a9.js} +5 -5
- package/{b7fefb34.js → eb3bf879.js} +2 -2
- package/{febae45b.js → eb5cf40c.js} +2 -2
- package/{ddee0e99.js → edc74d11.js} +3 -3
- package/f0f41787.js +1264 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/1de1a3c9.js +0 -1102
- package/2510669f.js +0 -237
- package/68ee7280.js +0 -1276
- package/89baa2e6.js +0 -391
- package/9dc6adcd.js +0 -819
- package/ab55adad.js +0 -818
- package/c459c043.js +0 -208
- package/e47dc9ca.js +0 -455
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { p as e, f as o } from "./
|
|
2
|
-
import { f as t, g as a } from "./
|
|
3
|
-
import { x as i } from "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
10
|
-
import "./
|
|
1
|
+
import { p as e, f as o } from "./3ebe8123.js";
|
|
2
|
+
import { f as t, g as a } from "./21ce624b.js";
|
|
3
|
+
import { x as i } from "./7cc252e4.js";
|
|
4
|
+
import "./eb3bf879.js";
|
|
5
|
+
import "./eb5cf40c.js";
|
|
6
|
+
import "./a8d4a50e.js";
|
|
7
|
+
import "./832e744b.js";
|
|
8
|
+
import "./b0862b2f.js";
|
|
9
|
+
import "./5fd9a898.js";
|
|
10
|
+
import "./5a31cef7.js";
|
|
11
11
|
import "./2ff2c7a6.js";
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
12
|
+
import "./428ebac9.js";
|
|
13
|
+
import "./1e5b4466.js";
|
|
14
14
|
const M = {
|
|
15
15
|
parser: e,
|
|
16
16
|
db: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Re, N as je, R as Be, O as Ze, P as Cn, Q as Jt, T as Dn, c as ge, g as ye, e as xt, s as Mn, a as Sn, F as _n, G as Un, d as Yn, b as Fn, H as Ln, o as En, l as Zt, j as Pt, k as An, m as In, C as Wn } from "./
|
|
2
|
-
import { b as On, t as _e, c as Hn, a as Nn, l as Vn } from "./
|
|
1
|
+
import { M as Re, N as je, R as Be, O as Ze, P as Cn, Q as Jt, T as Dn, c as ge, g as ye, e as xt, s as Mn, a as Sn, F as _n, G as Un, d as Yn, b as Fn, H as Ln, o as En, l as Zt, j as Pt, k as An, m as In, C as Wn } from "./7cc252e4.js";
|
|
2
|
+
import { b as On, t as _e, c as Hn, a as Nn, l as Vn } from "./558e8ee5.js";
|
|
3
3
|
import { i as Pn } from "./f9637058.js";
|
|
4
4
|
function zn(t, e) {
|
|
5
5
|
let n;
|
|
@@ -45,9 +45,9 @@ function qn() {
|
|
|
45
45
|
return !this.__axis;
|
|
46
46
|
}
|
|
47
47
|
function Xe(t, e) {
|
|
48
|
-
var n = [], r = null, i = null, s = 6, a = 6, k = 3, Y = typeof window
|
|
48
|
+
var n = [], r = null, i = null, s = 6, a = 6, k = 3, Y = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, g = t === Rt || t === zt ? -1 : 1, b = t === zt || t === Kt ? "x" : "y", U = t === Rt || t === le ? Bn : Zn;
|
|
49
49
|
function C(v) {
|
|
50
|
-
var X = r
|
|
50
|
+
var X = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), y = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : jn), L = Math.max(s, 0) + k, O = e.range(), W = +O[0] + Y, j = +O[O.length - 1] + Y, B = (e.bandwidth ? $n : Xn)(e.copy(), Y), G = v.selection ? v.selection() : v, x = G.selectAll(".domain").data([null]), A = G.selectAll(".tick").data(X, e).order(), T = A.exit(), F = A.enter().append("g").attr("class", "tick"), D = A.select("line"), w = A.select("text");
|
|
51
51
|
x = x.merge(x.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), A = A.merge(F), D = D.merge(F.append("line").attr("stroke", "currentColor").attr(b + "2", g * s)), w = w.merge(F.append("text").attr("fill", "currentColor").attr(b, g * L).attr("dy", t === Rt ? "0em" : t === le ? "0.71em" : "0.32em")), v !== G && (x = x.transition(v), A = A.transition(v), D = D.transition(v), w = w.transition(v), T = T.transition(v).attr("opacity", Ue).attr("transform", function(o) {
|
|
52
52
|
return isFinite(o = B(o)) ? U(o + Y) : this.getAttribute("transform");
|
|
53
53
|
}), F.attr("opacity", Ue).attr("transform", function(o) {
|
|
@@ -98,17 +98,17 @@ function Ke(t) {
|
|
|
98
98
|
return e === n && n === r ? s = a = i : (s = te((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / $e), a = te((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / Ge)), new at(116 * i - 16, 500 * (s - i), 200 * (i - a), t.opacity);
|
|
99
99
|
}
|
|
100
100
|
function er(t, e, n, r) {
|
|
101
|
-
return arguments.length === 1 ? Ke(t) : new at(t, e, n, r
|
|
101
|
+
return arguments.length === 1 ? Ke(t) : new at(t, e, n, r ?? 1);
|
|
102
102
|
}
|
|
103
103
|
function at(t, e, n, r) {
|
|
104
104
|
this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
|
|
105
105
|
}
|
|
106
106
|
Re(at, er, je(Ze, {
|
|
107
107
|
brighter(t) {
|
|
108
|
-
return new at(this.l + Xt * (t
|
|
108
|
+
return new at(this.l + Xt * (t ?? 1), this.a, this.b, this.opacity);
|
|
109
109
|
},
|
|
110
110
|
darker(t) {
|
|
111
|
-
return new at(this.l - Xt * (t
|
|
111
|
+
return new at(this.l - Xt * (t ?? 1), this.a, this.b, this.opacity);
|
|
112
112
|
},
|
|
113
113
|
rgb() {
|
|
114
114
|
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
|
|
@@ -141,7 +141,7 @@ function nr(t) {
|
|
|
141
141
|
return new lt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
|
|
142
142
|
}
|
|
143
143
|
function ue(t, e, n, r) {
|
|
144
|
-
return arguments.length === 1 ? nr(t) : new lt(t, e, n, r
|
|
144
|
+
return arguments.length === 1 ? nr(t) : new lt(t, e, n, r ?? 1);
|
|
145
145
|
}
|
|
146
146
|
function lt(t, e, n, r) {
|
|
147
147
|
this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
|
|
@@ -154,10 +154,10 @@ function tn(t) {
|
|
|
154
154
|
}
|
|
155
155
|
Re(lt, ue, je(Ze, {
|
|
156
156
|
brighter(t) {
|
|
157
|
-
return new lt(this.h, this.c, this.l + Xt * (t
|
|
157
|
+
return new lt(this.h, this.c, this.l + Xt * (t ?? 1), this.opacity);
|
|
158
158
|
},
|
|
159
159
|
darker(t) {
|
|
160
|
-
return new lt(this.h, this.c, this.l - Xt * (t
|
|
160
|
+
return new lt(this.h, this.c, this.l - Xt * (t ?? 1), this.opacity);
|
|
161
161
|
},
|
|
162
162
|
rgb() {
|
|
163
163
|
return tn(this).rgb();
|
|
@@ -882,12 +882,12 @@ function fn(t, e, n, r, i, s, a, k, Y, g) {
|
|
|
882
882
|
return arguments.length ? C(Array.from(x, Ti)) : C().map(pi);
|
|
883
883
|
}, b.ticks = function(x) {
|
|
884
884
|
var A = C();
|
|
885
|
-
return t(A[0], A[A.length - 1], x
|
|
885
|
+
return t(A[0], A[A.length - 1], x ?? 10);
|
|
886
886
|
}, b.tickFormat = function(x, A) {
|
|
887
887
|
return A == null ? G : g(A);
|
|
888
888
|
}, b.nice = function(x) {
|
|
889
889
|
var A = C();
|
|
890
|
-
return (!x || typeof x.range != "function") && (x = e(A[0], A[A.length - 1], x
|
|
890
|
+
return (!x || typeof x.range != "function") && (x = e(A[0], A[A.length - 1], x ?? 10)), x ? C(sr(A, x)) : b;
|
|
891
891
|
}, b.copy = function() {
|
|
892
892
|
return Nn(b, fn(t, e, n, r, i, s, a, k, Y, g));
|
|
893
893
|
}, b;
|
|
@@ -1035,7 +1035,7 @@ var dn = { exports: {} };
|
|
|
1035
1035
|
h && !_ || (M = _ > 0 ? _ - 1 : rt.getMonth());
|
|
1036
1036
|
var l = H || 0, R = V || 0, N = I || 0, q = P || 0;
|
|
1037
1037
|
return it ? new Date(Date.UTC(E, M, p, l, R, N, q + 60 * it.offset * 1e3)) : Z ? new Date(Date.UTC(E, M, p, l, R, N, q)) : new Date(E, M, p, l, R, N, q);
|
|
1038
|
-
} catch
|
|
1038
|
+
} catch {
|
|
1039
1039
|
return /* @__PURE__ */ new Date("");
|
|
1040
1040
|
}
|
|
1041
1041
|
}(G, T, x), this.init(), o && o !== !0 && (this.$L = this.locale(o).$L), w && G != this.format(T) && (this.$d = /* @__PURE__ */ new Date("")), k = {};
|
|
@@ -1250,7 +1250,7 @@ var fe = function() {
|
|
|
1250
1250
|
var d = this, m = [0], u = [], S = [null], c = [], Z = this.table, f = "", h = 0, _ = 0, $ = 2, H = 1, V = c.slice.call(arguments, 1), I = Object.create(this.lexer), P = { yy: {} };
|
|
1251
1251
|
for (var it in this.yy)
|
|
1252
1252
|
Object.prototype.hasOwnProperty.call(this.yy, it) && (P.yy[it] = this.yy[it]);
|
|
1253
|
-
I.setInput(o, P.yy), P.yy.lexer = I, P.yy.parser = this, typeof I.yylloc
|
|
1253
|
+
I.setInput(o, P.yy), P.yy.lexer = I, P.yy.parser = this, typeof I.yylloc > "u" && (I.yylloc = {});
|
|
1254
1254
|
var rt = I.yylloc;
|
|
1255
1255
|
c.push(rt);
|
|
1256
1256
|
var p = I.options && I.options.ranges;
|
|
@@ -1260,7 +1260,7 @@ var fe = function() {
|
|
|
1260
1260
|
return ot = u.pop() || I.lex() || H, typeof ot != "number" && (ot instanceof Array && (u = ot, ot = u.pop()), ot = d.symbols_[ot] || ot), ot;
|
|
1261
1261
|
}
|
|
1262
1262
|
for (var M, l, R, N, q = {}, Q, et, _t, Vt; ; ) {
|
|
1263
|
-
if (l = m[m.length - 1], this.defaultActions[l] ? R = this.defaultActions[l] : ((M === null || typeof M
|
|
1263
|
+
if (l = m[m.length - 1], this.defaultActions[l] ? R = this.defaultActions[l] : ((M === null || typeof M > "u") && (M = E()), R = Z[l] && Z[l][M]), typeof R > "u" || !R.length || !R[0]) {
|
|
1264
1264
|
var Qt = "";
|
|
1265
1265
|
Vt = [];
|
|
1266
1266
|
for (Q in Z[l])
|
|
@@ -1298,7 +1298,7 @@ Expecting ` + Vt.join(", ") + ", got '" + (this.terminals_[M] || M) + "'" : Qt =
|
|
|
1298
1298
|
R[1],
|
|
1299
1299
|
S,
|
|
1300
1300
|
c
|
|
1301
|
-
].concat(V)), typeof N
|
|
1301
|
+
].concat(V)), typeof N < "u")
|
|
1302
1302
|
return N;
|
|
1303
1303
|
et && (m = m.slice(0, -1 * et * 2), S = S.slice(0, -1 * et), c = c.slice(0, -1 * et)), m.push(this.productions_[R[1]][0]), S.push(q.$), c.push(q._$), _t = Z[m[m.length - 2]][m[m.length - 1]], m.push(_t);
|
|
1304
1304
|
break;
|
|
@@ -1692,7 +1692,7 @@ const _i = function() {
|
|
|
1692
1692
|
return [e, a];
|
|
1693
1693
|
}, de = function(t, e, n) {
|
|
1694
1694
|
n = n.trim();
|
|
1695
|
-
const i =
|
|
1695
|
+
const i = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
|
|
1696
1696
|
if (i !== null) {
|
|
1697
1697
|
let a = null;
|
|
1698
1698
|
for (const Y of i.groups.ids.split(" ")) {
|
|
@@ -1724,7 +1724,7 @@ const _i = function() {
|
|
|
1724
1724
|
return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
|
|
1725
1725
|
}, Tn = function(t, e, n, r = !1) {
|
|
1726
1726
|
n = n.trim();
|
|
1727
|
-
const s =
|
|
1727
|
+
const s = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
|
|
1728
1728
|
if (s !== null) {
|
|
1729
1729
|
let b = null;
|
|
1730
1730
|
for (const C of s.groups.ids.split(" ")) {
|
package/a8d4a50e.js
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { i as N, G as A } from "./eb3bf879.js";
|
|
2
|
+
import { m as $, l as H } from "./eb5cf40c.js";
|
|
3
|
+
import { c as V } from "./832e744b.js";
|
|
4
|
+
import { i as U, u as W, s as _, a as q, b as z, g as D, p as O, c as K, d as Q, e as Y, f as Z, h as J, j as p } from "./b0862b2f.js";
|
|
5
|
+
import { l as s, e as T, r as S, j as L } from "./7cc252e4.js";
|
|
6
|
+
import { a as I } from "./5fd9a898.js";
|
|
7
|
+
function m(e) {
|
|
8
|
+
var t = {
|
|
9
|
+
options: {
|
|
10
|
+
directed: e.isDirected(),
|
|
11
|
+
multigraph: e.isMultigraph(),
|
|
12
|
+
compound: e.isCompound()
|
|
13
|
+
},
|
|
14
|
+
nodes: tt(e),
|
|
15
|
+
edges: et(e)
|
|
16
|
+
};
|
|
17
|
+
return N(e.graph()) || (t.value = V(e.graph())), t;
|
|
18
|
+
}
|
|
19
|
+
function tt(e) {
|
|
20
|
+
return $(e.nodes(), function(t) {
|
|
21
|
+
var n = e.node(t), r = e.parent(t), i = { v: t };
|
|
22
|
+
return N(n) || (i.value = n), N(r) || (i.parent = r), i;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function et(e) {
|
|
26
|
+
return $(e.edges(), function(t) {
|
|
27
|
+
var n = e.edge(t), r = { v: t.v, w: t.w };
|
|
28
|
+
return N(t.name) || (r.name = t.name), N(n) || (r.value = n), r;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
let l = {}, g = {}, R = {};
|
|
32
|
+
const nt = () => {
|
|
33
|
+
g = {}, R = {}, l = {};
|
|
34
|
+
}, B = (e, t) => (s.trace("In isDescendant", t, " ", e, " = ", g[t].includes(e)), !!g[t].includes(e)), it = (e, t) => (s.info("Descendants of ", t, " is ", g[t]), s.info("Edge is ", e), e.v === t || e.w === t ? !1 : g[t] ? g[t].includes(e.v) || B(e.v, t) || B(e.w, t) || g[t].includes(e.w) : (s.debug("Tilt, ", t, ",not in descendants"), !1)), P = (e, t, n, r) => {
|
|
35
|
+
s.warn(
|
|
36
|
+
"Copying children of ",
|
|
37
|
+
e,
|
|
38
|
+
"root",
|
|
39
|
+
r,
|
|
40
|
+
"data",
|
|
41
|
+
t.node(e),
|
|
42
|
+
r
|
|
43
|
+
);
|
|
44
|
+
const i = t.children(e) || [];
|
|
45
|
+
e !== r && i.push(e), s.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((a) => {
|
|
46
|
+
if (t.children(a).length > 0)
|
|
47
|
+
P(a, t, n, r);
|
|
48
|
+
else {
|
|
49
|
+
const d = t.node(a);
|
|
50
|
+
s.info("cp ", a, " to ", r, " with parent ", e), n.setNode(a, d), r !== t.parent(a) && (s.warn("Setting parent", a, t.parent(a)), n.setParent(a, t.parent(a))), e !== r && a !== e ? (s.debug("Setting parent", a, e), n.setParent(a, e)) : (s.info("In copy ", e, "root", r, "data", t.node(e), r), s.debug(
|
|
51
|
+
"Not Setting parent for node=",
|
|
52
|
+
a,
|
|
53
|
+
"cluster!==rootId",
|
|
54
|
+
e !== r,
|
|
55
|
+
"node!==clusterId",
|
|
56
|
+
a !== e
|
|
57
|
+
));
|
|
58
|
+
const u = t.edges(a);
|
|
59
|
+
s.debug("Copying Edges", u), u.forEach((f) => {
|
|
60
|
+
s.info("Edge", f);
|
|
61
|
+
const h = t.edge(f.v, f.w, f.name);
|
|
62
|
+
s.info("Edge data", h, r);
|
|
63
|
+
try {
|
|
64
|
+
it(f, r) ? (s.info("Copying as ", f.v, f.w, h, f.name), n.setEdge(f.v, f.w, h, f.name), s.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : s.info(
|
|
65
|
+
"Skipping copy of edge ",
|
|
66
|
+
f.v,
|
|
67
|
+
"-->",
|
|
68
|
+
f.w,
|
|
69
|
+
" rootId: ",
|
|
70
|
+
r,
|
|
71
|
+
" clusterId:",
|
|
72
|
+
e
|
|
73
|
+
);
|
|
74
|
+
} catch (w) {
|
|
75
|
+
s.error(w);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
s.debug("Removing node", a), t.removeNode(a);
|
|
80
|
+
});
|
|
81
|
+
}, k = (e, t) => {
|
|
82
|
+
const n = t.children(e);
|
|
83
|
+
let r = [...n];
|
|
84
|
+
for (const i of n)
|
|
85
|
+
R[i] = e, r = [...r, ...k(i, t)];
|
|
86
|
+
return r;
|
|
87
|
+
}, C = (e, t) => {
|
|
88
|
+
s.trace("Searching", e);
|
|
89
|
+
const n = t.children(e);
|
|
90
|
+
if (s.trace("Searching children of id ", e, n), n.length < 1)
|
|
91
|
+
return s.trace("This is a valid node", e), e;
|
|
92
|
+
for (const r of n) {
|
|
93
|
+
const i = C(r, t);
|
|
94
|
+
if (i)
|
|
95
|
+
return s.trace("Found replacement for", e, " => ", i), i;
|
|
96
|
+
}
|
|
97
|
+
}, X = (e) => !l[e] || !l[e].externalConnections ? e : l[e] ? l[e].id : e, st = (e, t) => {
|
|
98
|
+
if (!e || t > 10) {
|
|
99
|
+
s.debug("Opting out, no graph ");
|
|
100
|
+
return;
|
|
101
|
+
} else
|
|
102
|
+
s.debug("Opting in, graph ");
|
|
103
|
+
e.nodes().forEach(function(n) {
|
|
104
|
+
e.children(n).length > 0 && (s.warn(
|
|
105
|
+
"Cluster identified",
|
|
106
|
+
n,
|
|
107
|
+
" Replacement id in edges: ",
|
|
108
|
+
C(n, e)
|
|
109
|
+
), g[n] = k(n, e), l[n] = { id: C(n, e), clusterData: e.node(n) });
|
|
110
|
+
}), e.nodes().forEach(function(n) {
|
|
111
|
+
const r = e.children(n), i = e.edges();
|
|
112
|
+
r.length > 0 ? (s.debug("Cluster identified", n, g), i.forEach((a) => {
|
|
113
|
+
if (a.v !== n && a.w !== n) {
|
|
114
|
+
const d = B(a.v, n), u = B(a.w, n);
|
|
115
|
+
d ^ u && (s.warn("Edge: ", a, " leaves cluster ", n), s.warn("Descendants of XXX ", n, ": ", g[n]), l[n].externalConnections = !0);
|
|
116
|
+
}
|
|
117
|
+
})) : s.debug("Not a cluster ", n, g);
|
|
118
|
+
});
|
|
119
|
+
for (let n of Object.keys(l)) {
|
|
120
|
+
const r = l[n].id, i = e.parent(r);
|
|
121
|
+
i !== n && l[i] && !l[i].externalConnections && (l[n].id = i);
|
|
122
|
+
}
|
|
123
|
+
e.edges().forEach(function(n) {
|
|
124
|
+
const r = e.edge(n);
|
|
125
|
+
s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), s.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
|
126
|
+
let i = n.v, a = n.w;
|
|
127
|
+
if (s.warn(
|
|
128
|
+
"Fix XXX",
|
|
129
|
+
l,
|
|
130
|
+
"ids:",
|
|
131
|
+
n.v,
|
|
132
|
+
n.w,
|
|
133
|
+
"Translating: ",
|
|
134
|
+
l[n.v],
|
|
135
|
+
" --- ",
|
|
136
|
+
l[n.w]
|
|
137
|
+
), l[n.v] && l[n.w] && l[n.v] === l[n.w]) {
|
|
138
|
+
s.warn("Fixing and trixing link to self - removing XXX", n.v, n.w, n.name), s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name);
|
|
139
|
+
const d = n.w + "---" + n.v;
|
|
140
|
+
e.setNode(d, {
|
|
141
|
+
domId: d,
|
|
142
|
+
id: d,
|
|
143
|
+
labelStyle: "",
|
|
144
|
+
labelText: r.label,
|
|
145
|
+
padding: 0,
|
|
146
|
+
shape: "labelRect",
|
|
147
|
+
style: ""
|
|
148
|
+
});
|
|
149
|
+
const u = structuredClone(r), f = structuredClone(r);
|
|
150
|
+
u.label = "", u.arrowTypeEnd = "none", f.label = "", u.fromCluster = n.v, f.toCluster = n.v, e.setEdge(i, d, u, n.name + "-cyclic-special"), e.setEdge(d, a, f, n.name + "-cyclic-special");
|
|
151
|
+
} else if (l[n.v] || l[n.w]) {
|
|
152
|
+
if (s.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), i = X(n.v), a = X(n.w), e.removeEdge(n.v, n.w, n.name), i !== n.v) {
|
|
153
|
+
const d = e.parent(i);
|
|
154
|
+
l[d].externalConnections = !0, r.fromCluster = n.v;
|
|
155
|
+
}
|
|
156
|
+
if (a !== n.w) {
|
|
157
|
+
const d = e.parent(a);
|
|
158
|
+
l[d].externalConnections = !0, r.toCluster = n.w;
|
|
159
|
+
}
|
|
160
|
+
s.warn("Fix Replacing with XXX", i, a, n.name), e.setEdge(i, a, r, n.name);
|
|
161
|
+
}
|
|
162
|
+
}), s.warn("Adjusted Graph", m(e)), F(e, 0), s.trace(l);
|
|
163
|
+
}, F = (e, t) => {
|
|
164
|
+
if (s.warn("extractor - ", t, m(e), e.children("D")), t > 10) {
|
|
165
|
+
s.error("Bailing out");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
let n = e.nodes(), r = !1;
|
|
169
|
+
for (const i of n) {
|
|
170
|
+
const a = e.children(i);
|
|
171
|
+
r = r || a.length > 0;
|
|
172
|
+
}
|
|
173
|
+
if (!r) {
|
|
174
|
+
s.debug("Done, no node has children", e.nodes());
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
s.debug("Nodes = ", n, t);
|
|
178
|
+
for (const i of n)
|
|
179
|
+
if (s.debug(
|
|
180
|
+
"Extracting node",
|
|
181
|
+
i,
|
|
182
|
+
l,
|
|
183
|
+
l[i] && !l[i].externalConnections,
|
|
184
|
+
!e.parent(i),
|
|
185
|
+
e.node(i),
|
|
186
|
+
e.children("D"),
|
|
187
|
+
" Depth ",
|
|
188
|
+
t
|
|
189
|
+
), !l[i])
|
|
190
|
+
s.debug("Not a cluster", i, t);
|
|
191
|
+
else if (!l[i].externalConnections && // !graph.parent(node) &&
|
|
192
|
+
e.children(i) && e.children(i).length > 0) {
|
|
193
|
+
s.warn(
|
|
194
|
+
"Cluster without external connections, without a parent and with children",
|
|
195
|
+
i,
|
|
196
|
+
t
|
|
197
|
+
);
|
|
198
|
+
let d = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
199
|
+
l[i] && l[i].clusterData && l[i].clusterData.dir && (d = l[i].clusterData.dir, s.warn("Fixing dir", l[i].clusterData.dir, d));
|
|
200
|
+
const u = new A({
|
|
201
|
+
multigraph: !0,
|
|
202
|
+
compound: !0
|
|
203
|
+
}).setGraph({
|
|
204
|
+
rankdir: d,
|
|
205
|
+
// Todo: set proper spacing
|
|
206
|
+
nodesep: 50,
|
|
207
|
+
ranksep: 50,
|
|
208
|
+
marginx: 8,
|
|
209
|
+
marginy: 8
|
|
210
|
+
}).setDefaultEdgeLabel(function() {
|
|
211
|
+
return {};
|
|
212
|
+
});
|
|
213
|
+
s.warn("Old graph before copy", m(e)), P(i, e, u, i), e.setNode(i, {
|
|
214
|
+
clusterNode: !0,
|
|
215
|
+
id: i,
|
|
216
|
+
clusterData: l[i].clusterData,
|
|
217
|
+
labelText: l[i].labelText,
|
|
218
|
+
graph: u
|
|
219
|
+
}), s.warn("New graph after copy node: (", i, ")", m(u)), s.debug("Old graph after copy", m(e));
|
|
220
|
+
} else
|
|
221
|
+
s.warn(
|
|
222
|
+
"Cluster ** ",
|
|
223
|
+
i,
|
|
224
|
+
" **not meeting the criteria !externalConnections:",
|
|
225
|
+
!l[i].externalConnections,
|
|
226
|
+
" no parent: ",
|
|
227
|
+
!e.parent(i),
|
|
228
|
+
" children ",
|
|
229
|
+
e.children(i) && e.children(i).length > 0,
|
|
230
|
+
e.children("D"),
|
|
231
|
+
t
|
|
232
|
+
), s.debug(l);
|
|
233
|
+
n = e.nodes(), s.warn("New list of nodes", n);
|
|
234
|
+
for (const i of n) {
|
|
235
|
+
const a = e.node(i);
|
|
236
|
+
s.warn(" Now next level", i, a), a.clusterNode && F(a.graph, t + 1);
|
|
237
|
+
}
|
|
238
|
+
}, G = (e, t) => {
|
|
239
|
+
if (t.length === 0)
|
|
240
|
+
return [];
|
|
241
|
+
let n = Object.assign(t);
|
|
242
|
+
return t.forEach((r) => {
|
|
243
|
+
const i = e.children(r), a = G(e, i);
|
|
244
|
+
n = [...n, ...a];
|
|
245
|
+
}), n;
|
|
246
|
+
}, rt = (e) => G(e, e.children()), at = (e, t) => {
|
|
247
|
+
s.info("Creating subgraph rect for ", t.id, t);
|
|
248
|
+
const n = T(), r = e.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), i = r.insert("rect", ":first-child"), a = S(n.flowchart.htmlLabels), d = r.insert("g").attr("class", "cluster-label"), u = t.labelType === "markdown" ? I(d, t.labelText, { style: t.labelStyle, useHtmlLabels: a }) : d.node().appendChild(J(t.labelText, t.labelStyle, void 0, !0));
|
|
249
|
+
let f = u.getBBox();
|
|
250
|
+
if (S(n.flowchart.htmlLabels)) {
|
|
251
|
+
const c = u.children[0], o = L(u);
|
|
252
|
+
f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
|
|
253
|
+
}
|
|
254
|
+
const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + h ? f.width + h : t.width;
|
|
255
|
+
t.width <= f.width + h ? t.diff = (f.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, s.trace("Data ", t, JSON.stringify(t)), i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - x / 2).attr("y", t.y - t.height / 2 - w).attr("width", x).attr("height", t.height + h);
|
|
256
|
+
const { subGraphTitleTopMargin: v } = D(n);
|
|
257
|
+
a ? d.attr(
|
|
258
|
+
"transform",
|
|
259
|
+
// This puts the label on top of the box instead of inside it
|
|
260
|
+
`translate(${t.x - f.width / 2}, ${t.y - t.height / 2 + v})`
|
|
261
|
+
) : d.attr(
|
|
262
|
+
"transform",
|
|
263
|
+
// This puts the label on top of the box instead of inside it
|
|
264
|
+
`translate(${t.x}, ${t.y - t.height / 2 + v})`
|
|
265
|
+
);
|
|
266
|
+
const y = i.node().getBBox();
|
|
267
|
+
return t.width = y.width, t.height = y.height, t.intersect = function(c) {
|
|
268
|
+
return p(t, c);
|
|
269
|
+
}, r;
|
|
270
|
+
}, ct = (e, t) => {
|
|
271
|
+
const n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
272
|
+
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
273
|
+
const d = r.node().getBBox();
|
|
274
|
+
return t.width = d.width, t.height = d.height, t.intersect = function(u) {
|
|
275
|
+
return p(t, u);
|
|
276
|
+
}, n;
|
|
277
|
+
}, ot = (e, t) => {
|
|
278
|
+
const n = T(), r = e.insert("g").attr("class", t.classes).attr("id", t.id), i = r.insert("rect", ":first-child"), a = r.insert("g").attr("class", "cluster-label"), d = r.append("rect"), u = a.node().appendChild(J(t.labelText, t.labelStyle, void 0, !0));
|
|
279
|
+
let f = u.getBBox();
|
|
280
|
+
if (S(n.flowchart.htmlLabels)) {
|
|
281
|
+
const c = u.children[0], o = L(u);
|
|
282
|
+
f = c.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
|
|
283
|
+
}
|
|
284
|
+
f = u.getBBox();
|
|
285
|
+
const h = 0 * t.padding, w = h / 2, x = t.width <= f.width + t.padding ? f.width + t.padding : t.width;
|
|
286
|
+
t.width <= f.width + t.padding ? t.diff = (f.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, i.attr("class", "outer").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w).attr("width", x + h).attr("height", t.height + h), d.attr("class", "inner").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w + f.height - 1).attr("width", x + h).attr("height", t.height + h - f.height - 3);
|
|
287
|
+
const { subGraphTitleTopMargin: v } = D(n);
|
|
288
|
+
a.attr(
|
|
289
|
+
"transform",
|
|
290
|
+
`translate(${t.x - f.width / 2}, ${t.y - t.height / 2 - t.padding / 3 + (S(n.flowchart.htmlLabels) ? 5 : 3) + v})`
|
|
291
|
+
);
|
|
292
|
+
const y = i.node().getBBox();
|
|
293
|
+
return t.height = y.height, t.intersect = function(c) {
|
|
294
|
+
return p(t, c);
|
|
295
|
+
}, r;
|
|
296
|
+
}, lt = (e, t) => {
|
|
297
|
+
const n = e.insert("g").attr("class", t.classes).attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
298
|
+
r.attr("class", "divider").attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2).attr("width", t.width + i).attr("height", t.height + i);
|
|
299
|
+
const d = r.node().getBBox();
|
|
300
|
+
return t.width = d.width, t.height = d.height, t.diff = -t.padding / 2, t.intersect = function(u) {
|
|
301
|
+
return p(t, u);
|
|
302
|
+
}, n;
|
|
303
|
+
}, ft = { rect: at, roundedWithTitle: ot, noteGroup: ct, divider: lt };
|
|
304
|
+
let j = {};
|
|
305
|
+
const dt = (e, t) => {
|
|
306
|
+
s.trace("Inserting cluster");
|
|
307
|
+
const n = t.shape || "rect";
|
|
308
|
+
j[t.id] = ft[n](e, t);
|
|
309
|
+
}, ut = () => {
|
|
310
|
+
j = {};
|
|
311
|
+
}, M = async (e, t, n, r, i, a) => {
|
|
312
|
+
s.info("Graph in recursive render: XXX", m(t), i);
|
|
313
|
+
const d = t.graph().rankdir;
|
|
314
|
+
s.trace("Dir in recursive render - dir:", d);
|
|
315
|
+
const u = e.insert("g").attr("class", "root");
|
|
316
|
+
t.nodes() ? s.info("Recursive render XXX", t.nodes()) : s.info("No nodes found for", t), t.edges().length > 0 && s.trace("Recursive edges", t.edge(t.edges()[0]));
|
|
317
|
+
const f = u.insert("g").attr("class", "clusters"), h = u.insert("g").attr("class", "edgePaths"), w = u.insert("g").attr("class", "edgeLabels"), x = u.insert("g").attr("class", "nodes");
|
|
318
|
+
await Promise.all(
|
|
319
|
+
t.nodes().map(async function(c) {
|
|
320
|
+
const o = t.node(c);
|
|
321
|
+
if (i !== void 0) {
|
|
322
|
+
const b = JSON.parse(JSON.stringify(i.clusterData));
|
|
323
|
+
s.info("Setting data for cluster XXX (", c, ") ", b, i), t.setNode(i.id, b), t.parent(c) || (s.trace("Setting parent", c, i.id), t.setParent(c, i.id, b));
|
|
324
|
+
}
|
|
325
|
+
if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
|
|
326
|
+
s.info("Cluster identified", c, o.width, t.node(c));
|
|
327
|
+
const b = await M(
|
|
328
|
+
x,
|
|
329
|
+
o.graph,
|
|
330
|
+
n,
|
|
331
|
+
r,
|
|
332
|
+
t.node(c),
|
|
333
|
+
a
|
|
334
|
+
), E = b.elem;
|
|
335
|
+
W(o, E), o.diff = b.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), _(E, o), s.warn("Recursive render complete ", E, o);
|
|
336
|
+
} else
|
|
337
|
+
t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(C(o.id, t)), l[o.id] = { id: C(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), await q(x, t.node(c), d));
|
|
338
|
+
})
|
|
339
|
+
), t.edges().forEach(function(c) {
|
|
340
|
+
const o = t.edge(c.v, c.w, c.name);
|
|
341
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c)), s.info("Edge " + c.v + " -> " + c.w + ": ", c, " ", JSON.stringify(t.edge(c))), s.info("Fix", l, "ids:", c.v, c.w, "Translating: ", l[c.v], l[c.w]), z(w, o);
|
|
342
|
+
}), t.edges().forEach(function(c) {
|
|
343
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
|
|
344
|
+
}), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), H(t), s.info("Graph after layout:", m(t));
|
|
345
|
+
let v = 0;
|
|
346
|
+
const { subGraphTitleTotalMargin: y } = D(a);
|
|
347
|
+
return rt(t).forEach(function(c) {
|
|
348
|
+
const o = t.node(c);
|
|
349
|
+
s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
|
|
350
|
+
"Position " + c + ": (" + o.x,
|
|
351
|
+
"," + o.y,
|
|
352
|
+
") width: ",
|
|
353
|
+
o.width,
|
|
354
|
+
" height: ",
|
|
355
|
+
o.height
|
|
356
|
+
), o && o.clusterNode ? (o.y += y, O(o)) : t.children(c).length > 0 ? (o.height += y, dt(f, o), l[o.id].node = o) : (o.y += y / 2, O(o));
|
|
357
|
+
}), t.edges().forEach(function(c) {
|
|
358
|
+
const o = t.edge(c);
|
|
359
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o), o.points.forEach((E) => E.y += y / 2);
|
|
360
|
+
const b = K(h, c, o, l, n, t, r);
|
|
361
|
+
Q(o, b);
|
|
362
|
+
}), t.nodes().forEach(function(c) {
|
|
363
|
+
const o = t.node(c);
|
|
364
|
+
s.info(c, o.type, o.diff), o.type === "group" && (v = o.diff);
|
|
365
|
+
}), { elem: u, diff: v };
|
|
366
|
+
}, bt = async (e, t, n, r, i) => {
|
|
367
|
+
U(e, n, r, i), Y(), Z(), ut(), nt(), s.warn("Graph at first:", JSON.stringify(m(t))), st(t), s.warn("Graph after:", JSON.stringify(m(t)));
|
|
368
|
+
const a = T();
|
|
369
|
+
await M(e, t, r, i, void 0, a);
|
|
370
|
+
};
|
|
371
|
+
export {
|
|
372
|
+
bt as r
|
|
373
|
+
};
|