lowcoder-comps 2.4.14 → 2.4.16
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/{fc3b7856.js → 1043ea14.js} +247 -258
- package/{52a11357.js → 14530b4e.js} +5 -5
- package/{029476f8.js → 145794bd.js} +4 -4
- package/248f3eba.js +797 -0
- package/{e6f7d4a7.js → 28364e9c.js} +411 -451
- package/{a3820fc3.js → 38ec0f55.js} +3 -3
- package/{6296008d.js → 40bee586.js} +55069 -55754
- package/{256b619e.js → 428ebac9.js} +14 -15
- package/{21e8a932.js → 4407a5f9.js} +1 -1
- package/{286121b3.js → 474d7e5f.js} +6 -6
- package/{32d11caf.js → 48ca2a1e.js} +2 -2
- package/5b2c9b5c.js +206 -0
- package/{b42bc0a6.js → 633f4ede.js} +919 -969
- package/{35b2542e.js → 668d3da2.js} +1 -1
- package/{005a58c0.js → 78321d1a.js} +4 -4
- package/{2ea4f729.js → 7c479abc.js} +8 -8
- package/{09ab5d81.js → 7c7200e7.js} +7 -7
- package/{d42741f5.js → 7e6d090c.js} +1067 -1085
- package/7e78c333.js +373 -0
- package/{abadf1f6.js → 88415712.js} +140 -141
- package/{43254cb0.js → 8ae1f7a4.js} +4 -5
- package/{af28f5d5.js → 8e6be41e.js} +4 -4
- package/{a73a7fb8.js → 8ffe69e1.js} +6 -6
- package/{14a0be5d.js → 9afbfdff.js} +1 -1
- package/{25f232c1.js → a8987699.js} +6 -6
- package/afdeb8e9.js +190 -0
- package/c0405acc.js +1083 -0
- package/{08ea4a8f.js → ca993649.js} +2 -2
- package/{bf684fc8.js → cc8ba9a3.js} +12713 -12735
- package/{bcd4bce3.js → d27497a0.js} +18 -18
- package/{c69763fa.js → dbeb2d17.js} +2 -2
- package/{6741b2b9.js → de3e61cd.js} +68 -69
- package/df15a543.js +817 -0
- package/{47848c42.js → e5b014a9.js} +5 -5
- package/e86c3e3a.js +1264 -0
- package/{0f43fe1e.js → eb52cd1a.js} +8 -8
- package/{0da7ca4d.js → ebbe2009.js} +92 -92
- package/{cb338c34.js → ecab0a38.js} +96 -99
- package/{268c902c.js → f3455869.js} +26 -27
- package/f701d7da.js +433 -0
- package/{6402852d.js → fc681b47.js} +12 -12
- package/index.js +2 -2
- package/package.json +1 -1
- package/04c7d898.js +0 -819
- package/078d4a18.js +0 -818
- package/18cd6b56.js +0 -391
- package/1a8f0a25.js +0 -455
- package/2b4f4275.js +0 -1276
- package/2efee7c6.js +0 -1102
- package/a6a69647.js +0 -237
- package/c2bb8612.js +0 -208
package/18cd6b56.js
DELETED
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
var X = (n, t, e) => new Promise((r, i) => {
|
|
2
|
-
var a = (l) => {
|
|
3
|
-
try {
|
|
4
|
-
d(e.next(l));
|
|
5
|
-
} catch (h) {
|
|
6
|
-
i(h);
|
|
7
|
-
}
|
|
8
|
-
}, u = (l) => {
|
|
9
|
-
try {
|
|
10
|
-
d(e.throw(l));
|
|
11
|
-
} catch (h) {
|
|
12
|
-
i(h);
|
|
13
|
-
}
|
|
14
|
-
}, d = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(a, u);
|
|
15
|
-
d((e = e.apply(n, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { i as N, G as H } from "./32d11caf.js";
|
|
18
|
-
import { m as J, l as V } from "./c69763fa.js";
|
|
19
|
-
import { c as U } from "./21e8a932.js";
|
|
20
|
-
import { i as W, u as _, s as q, a as z, b as K, g as T, p as $, c as Q, d as Y, e as Z, f as I, h as L, j as D } from "./2efee7c6.js";
|
|
21
|
-
import { l as s, e as O, r as B, j as R } from "./6296008d.js";
|
|
22
|
-
import { a as tt } from "./43254cb0.js";
|
|
23
|
-
function m(n) {
|
|
24
|
-
var t = {
|
|
25
|
-
options: {
|
|
26
|
-
directed: n.isDirected(),
|
|
27
|
-
multigraph: n.isMultigraph(),
|
|
28
|
-
compound: n.isCompound()
|
|
29
|
-
},
|
|
30
|
-
nodes: et(n),
|
|
31
|
-
edges: nt(n)
|
|
32
|
-
};
|
|
33
|
-
return N(n.graph()) || (t.value = U(n.graph())), t;
|
|
34
|
-
}
|
|
35
|
-
function et(n) {
|
|
36
|
-
return J(n.nodes(), function(t) {
|
|
37
|
-
var e = n.node(t), r = n.parent(t), i = { v: t };
|
|
38
|
-
return N(e) || (i.value = e), N(r) || (i.parent = r), i;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function nt(n) {
|
|
42
|
-
return J(n.edges(), function(t) {
|
|
43
|
-
var e = n.edge(t), r = { v: t.v, w: t.w };
|
|
44
|
-
return N(t.name) || (r.name = t.name), N(e) || (r.value = e), r;
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
let f = {}, g = {}, P = {};
|
|
48
|
-
const it = () => {
|
|
49
|
-
g = {}, P = {}, f = {};
|
|
50
|
-
}, p = (n, t) => (s.trace("In isDescendant", t, " ", n, " = ", g[t].includes(n)), !!g[t].includes(n)), st = (n, t) => (s.info("Descendants of ", t, " is ", g[t]), s.info("Edge is ", n), n.v === t || n.w === t ? !1 : g[t] ? g[t].includes(n.v) || p(n.v, t) || p(n.w, t) || g[t].includes(n.w) : (s.debug("Tilt, ", t, ",not in descendants"), !1)), k = (n, t, e, r) => {
|
|
51
|
-
s.warn(
|
|
52
|
-
"Copying children of ",
|
|
53
|
-
n,
|
|
54
|
-
"root",
|
|
55
|
-
r,
|
|
56
|
-
"data",
|
|
57
|
-
t.node(n),
|
|
58
|
-
r
|
|
59
|
-
);
|
|
60
|
-
const i = t.children(n) || [];
|
|
61
|
-
n !== r && i.push(n), s.warn("Copying (nodes) clusterId", n, "nodes", i), i.forEach((a) => {
|
|
62
|
-
if (t.children(a).length > 0)
|
|
63
|
-
k(a, t, e, r);
|
|
64
|
-
else {
|
|
65
|
-
const u = t.node(a);
|
|
66
|
-
s.info("cp ", a, " to ", r, " with parent ", n), e.setNode(a, u), r !== t.parent(a) && (s.warn("Setting parent", a, t.parent(a)), e.setParent(a, t.parent(a))), n !== r && a !== n ? (s.debug("Setting parent", a, n), e.setParent(a, n)) : (s.info("In copy ", n, "root", r, "data", t.node(n), r), s.debug(
|
|
67
|
-
"Not Setting parent for node=",
|
|
68
|
-
a,
|
|
69
|
-
"cluster!==rootId",
|
|
70
|
-
n !== r,
|
|
71
|
-
"node!==clusterId",
|
|
72
|
-
a !== n
|
|
73
|
-
));
|
|
74
|
-
const d = t.edges(a);
|
|
75
|
-
s.debug("Copying Edges", d), d.forEach((l) => {
|
|
76
|
-
s.info("Edge", l);
|
|
77
|
-
const h = t.edge(l.v, l.w, l.name);
|
|
78
|
-
s.info("Edge data", h, r);
|
|
79
|
-
try {
|
|
80
|
-
st(l, r) ? (s.info("Copying as ", l.v, l.w, h, l.name), e.setEdge(l.v, l.w, h, l.name), s.info("newGraph edges ", e.edges(), e.edge(e.edges()[0]))) : s.info(
|
|
81
|
-
"Skipping copy of edge ",
|
|
82
|
-
l.v,
|
|
83
|
-
"-->",
|
|
84
|
-
l.w,
|
|
85
|
-
" rootId: ",
|
|
86
|
-
r,
|
|
87
|
-
" clusterId:",
|
|
88
|
-
n
|
|
89
|
-
);
|
|
90
|
-
} catch (w) {
|
|
91
|
-
s.error(w);
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
s.debug("Removing node", a), t.removeNode(a);
|
|
96
|
-
});
|
|
97
|
-
}, F = (n, t) => {
|
|
98
|
-
const e = t.children(n);
|
|
99
|
-
let r = [...e];
|
|
100
|
-
for (const i of e)
|
|
101
|
-
P[i] = n, r = [...r, ...F(i, t)];
|
|
102
|
-
return r;
|
|
103
|
-
}, C = (n, t) => {
|
|
104
|
-
s.trace("Searching", n);
|
|
105
|
-
const e = t.children(n);
|
|
106
|
-
if (s.trace("Searching children of id ", n, e), e.length < 1)
|
|
107
|
-
return s.trace("This is a valid node", n), n;
|
|
108
|
-
for (const r of e) {
|
|
109
|
-
const i = C(r, t);
|
|
110
|
-
if (i)
|
|
111
|
-
return s.trace("Found replacement for", n, " => ", i), i;
|
|
112
|
-
}
|
|
113
|
-
}, S = (n) => !f[n] || !f[n].externalConnections ? n : f[n] ? f[n].id : n, rt = (n, t) => {
|
|
114
|
-
if (!n || t > 10) {
|
|
115
|
-
s.debug("Opting out, no graph ");
|
|
116
|
-
return;
|
|
117
|
-
} else
|
|
118
|
-
s.debug("Opting in, graph ");
|
|
119
|
-
n.nodes().forEach(function(e) {
|
|
120
|
-
n.children(e).length > 0 && (s.warn(
|
|
121
|
-
"Cluster identified",
|
|
122
|
-
e,
|
|
123
|
-
" Replacement id in edges: ",
|
|
124
|
-
C(e, n)
|
|
125
|
-
), g[e] = F(e, n), f[e] = { id: C(e, n), clusterData: n.node(e) });
|
|
126
|
-
}), n.nodes().forEach(function(e) {
|
|
127
|
-
const r = n.children(e), i = n.edges();
|
|
128
|
-
r.length > 0 ? (s.debug("Cluster identified", e, g), i.forEach((a) => {
|
|
129
|
-
if (a.v !== e && a.w !== e) {
|
|
130
|
-
const u = p(a.v, e), d = p(a.w, e);
|
|
131
|
-
u ^ d && (s.warn("Edge: ", a, " leaves cluster ", e), s.warn("Descendants of XXX ", e, ": ", g[e]), f[e].externalConnections = !0);
|
|
132
|
-
}
|
|
133
|
-
})) : s.debug("Not a cluster ", e, g);
|
|
134
|
-
});
|
|
135
|
-
for (let e of Object.keys(f)) {
|
|
136
|
-
const r = f[e].id, i = n.parent(r);
|
|
137
|
-
i !== e && f[i] && !f[i].externalConnections && (f[e].id = i);
|
|
138
|
-
}
|
|
139
|
-
n.edges().forEach(function(e) {
|
|
140
|
-
const r = n.edge(e);
|
|
141
|
-
s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(n.edge(e)));
|
|
142
|
-
let i = e.v, a = e.w;
|
|
143
|
-
if (s.warn(
|
|
144
|
-
"Fix XXX",
|
|
145
|
-
f,
|
|
146
|
-
"ids:",
|
|
147
|
-
e.v,
|
|
148
|
-
e.w,
|
|
149
|
-
"Translating: ",
|
|
150
|
-
f[e.v],
|
|
151
|
-
" --- ",
|
|
152
|
-
f[e.w]
|
|
153
|
-
), f[e.v] && f[e.w] && f[e.v] === f[e.w]) {
|
|
154
|
-
s.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name), s.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), i = S(e.v), a = S(e.w), n.removeEdge(e.v, e.w, e.name);
|
|
155
|
-
const u = e.w + "---" + e.v;
|
|
156
|
-
n.setNode(u, {
|
|
157
|
-
domId: u,
|
|
158
|
-
id: u,
|
|
159
|
-
labelStyle: "",
|
|
160
|
-
labelText: r.label,
|
|
161
|
-
padding: 0,
|
|
162
|
-
shape: "labelRect",
|
|
163
|
-
style: ""
|
|
164
|
-
});
|
|
165
|
-
const d = structuredClone(r), l = structuredClone(r);
|
|
166
|
-
d.label = "", d.arrowTypeEnd = "none", l.label = "", d.fromCluster = e.v, l.toCluster = e.v, n.setEdge(i, u, d, e.name + "-cyclic-special"), n.setEdge(u, a, l, e.name + "-cyclic-special");
|
|
167
|
-
} else if (f[e.v] || f[e.w]) {
|
|
168
|
-
if (s.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), i = S(e.v), a = S(e.w), n.removeEdge(e.v, e.w, e.name), i !== e.v) {
|
|
169
|
-
const u = n.parent(i);
|
|
170
|
-
f[u].externalConnections = !0, r.fromCluster = e.v;
|
|
171
|
-
}
|
|
172
|
-
if (a !== e.w) {
|
|
173
|
-
const u = n.parent(a);
|
|
174
|
-
f[u].externalConnections = !0, r.toCluster = e.w;
|
|
175
|
-
}
|
|
176
|
-
s.warn("Fix Replacing with XXX", i, a, e.name), n.setEdge(i, a, r, e.name);
|
|
177
|
-
}
|
|
178
|
-
}), s.warn("Adjusted Graph", m(n)), G(n, 0), s.trace(f);
|
|
179
|
-
}, G = (n, t) => {
|
|
180
|
-
if (s.warn("extractor - ", t, m(n), n.children("D")), t > 10) {
|
|
181
|
-
s.error("Bailing out");
|
|
182
|
-
return;
|
|
183
|
-
}
|
|
184
|
-
let e = n.nodes(), r = !1;
|
|
185
|
-
for (const i of e) {
|
|
186
|
-
const a = n.children(i);
|
|
187
|
-
r = r || a.length > 0;
|
|
188
|
-
}
|
|
189
|
-
if (!r) {
|
|
190
|
-
s.debug("Done, no node has children", n.nodes());
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
s.debug("Nodes = ", e, t);
|
|
194
|
-
for (const i of e)
|
|
195
|
-
if (s.debug(
|
|
196
|
-
"Extracting node",
|
|
197
|
-
i,
|
|
198
|
-
f,
|
|
199
|
-
f[i] && !f[i].externalConnections,
|
|
200
|
-
!n.parent(i),
|
|
201
|
-
n.node(i),
|
|
202
|
-
n.children("D"),
|
|
203
|
-
" Depth ",
|
|
204
|
-
t
|
|
205
|
-
), !f[i])
|
|
206
|
-
s.debug("Not a cluster", i, t);
|
|
207
|
-
else if (!f[i].externalConnections && // !graph.parent(node) &&
|
|
208
|
-
n.children(i) && n.children(i).length > 0) {
|
|
209
|
-
s.warn(
|
|
210
|
-
"Cluster without external connections, without a parent and with children",
|
|
211
|
-
i,
|
|
212
|
-
t
|
|
213
|
-
);
|
|
214
|
-
let u = n.graph().rankdir === "TB" ? "LR" : "TB";
|
|
215
|
-
f[i] && f[i].clusterData && f[i].clusterData.dir && (u = f[i].clusterData.dir, s.warn("Fixing dir", f[i].clusterData.dir, u));
|
|
216
|
-
const d = new H({
|
|
217
|
-
multigraph: !0,
|
|
218
|
-
compound: !0
|
|
219
|
-
}).setGraph({
|
|
220
|
-
rankdir: u,
|
|
221
|
-
// Todo: set proper spacing
|
|
222
|
-
nodesep: 50,
|
|
223
|
-
ranksep: 50,
|
|
224
|
-
marginx: 8,
|
|
225
|
-
marginy: 8
|
|
226
|
-
}).setDefaultEdgeLabel(function() {
|
|
227
|
-
return {};
|
|
228
|
-
});
|
|
229
|
-
s.warn("Old graph before copy", m(n)), k(i, n, d, i), n.setNode(i, {
|
|
230
|
-
clusterNode: !0,
|
|
231
|
-
id: i,
|
|
232
|
-
clusterData: f[i].clusterData,
|
|
233
|
-
labelText: f[i].labelText,
|
|
234
|
-
graph: d
|
|
235
|
-
}), s.warn("New graph after copy node: (", i, ")", m(d)), s.debug("Old graph after copy", m(n));
|
|
236
|
-
} else
|
|
237
|
-
s.warn(
|
|
238
|
-
"Cluster ** ",
|
|
239
|
-
i,
|
|
240
|
-
" **not meeting the criteria !externalConnections:",
|
|
241
|
-
!f[i].externalConnections,
|
|
242
|
-
" no parent: ",
|
|
243
|
-
!n.parent(i),
|
|
244
|
-
" children ",
|
|
245
|
-
n.children(i) && n.children(i).length > 0,
|
|
246
|
-
n.children("D"),
|
|
247
|
-
t
|
|
248
|
-
), s.debug(f);
|
|
249
|
-
e = n.nodes(), s.warn("New list of nodes", e);
|
|
250
|
-
for (const i of e) {
|
|
251
|
-
const a = n.node(i);
|
|
252
|
-
s.warn(" Now next level", i, a), a.clusterNode && G(a.graph, t + 1);
|
|
253
|
-
}
|
|
254
|
-
}, j = (n, t) => {
|
|
255
|
-
if (t.length === 0)
|
|
256
|
-
return [];
|
|
257
|
-
let e = Object.assign(t);
|
|
258
|
-
return t.forEach((r) => {
|
|
259
|
-
const i = n.children(r), a = j(n, i);
|
|
260
|
-
e = [...e, ...a];
|
|
261
|
-
}), e;
|
|
262
|
-
}, at = (n) => j(n, n.children()), ct = (n, t) => {
|
|
263
|
-
s.info("Creating subgraph rect for ", t.id, t);
|
|
264
|
-
const e = O(), r = n.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), i = r.insert("rect", ":first-child"), a = B(e.flowchart.htmlLabels), u = r.insert("g").attr("class", "cluster-label"), d = t.labelType === "markdown" ? tt(u, t.labelText, { style: t.labelStyle, useHtmlLabels: a }) : u.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
|
|
265
|
-
let l = d.getBBox();
|
|
266
|
-
if (B(e.flowchart.htmlLabels)) {
|
|
267
|
-
const c = d.children[0], o = R(d);
|
|
268
|
-
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
269
|
-
}
|
|
270
|
-
const h = 0 * t.padding, w = h / 2, x = t.width <= l.width + h ? l.width + h : t.width;
|
|
271
|
-
t.width <= l.width + h ? t.diff = (l.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);
|
|
272
|
-
const { subGraphTitleTopMargin: v } = T(e);
|
|
273
|
-
a ? u.attr(
|
|
274
|
-
"transform",
|
|
275
|
-
// This puts the label on top of the box instead of inside it
|
|
276
|
-
`translate(${t.x - l.width / 2}, ${t.y - t.height / 2 + v})`
|
|
277
|
-
) : u.attr(
|
|
278
|
-
"transform",
|
|
279
|
-
// This puts the label on top of the box instead of inside it
|
|
280
|
-
`translate(${t.x}, ${t.y - t.height / 2 + v})`
|
|
281
|
-
);
|
|
282
|
-
const y = i.node().getBBox();
|
|
283
|
-
return t.width = y.width, t.height = y.height, t.intersect = function(c) {
|
|
284
|
-
return D(t, c);
|
|
285
|
-
}, r;
|
|
286
|
-
}, ot = (n, t) => {
|
|
287
|
-
const e = n.insert("g").attr("class", "note-cluster").attr("id", t.id), r = e.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
288
|
-
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");
|
|
289
|
-
const u = r.node().getBBox();
|
|
290
|
-
return t.width = u.width, t.height = u.height, t.intersect = function(d) {
|
|
291
|
-
return D(t, d);
|
|
292
|
-
}, e;
|
|
293
|
-
}, lt = (n, t) => {
|
|
294
|
-
const e = O(), r = n.insert("g").attr("class", t.classes).attr("id", t.id), i = r.insert("rect", ":first-child"), a = r.insert("g").attr("class", "cluster-label"), u = r.append("rect"), d = a.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
|
|
295
|
-
let l = d.getBBox();
|
|
296
|
-
if (B(e.flowchart.htmlLabels)) {
|
|
297
|
-
const c = d.children[0], o = R(d);
|
|
298
|
-
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
299
|
-
}
|
|
300
|
-
l = d.getBBox();
|
|
301
|
-
const h = 0 * t.padding, w = h / 2, x = t.width <= l.width + t.padding ? l.width + t.padding : t.width;
|
|
302
|
-
t.width <= l.width + t.padding ? t.diff = (l.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), u.attr("class", "inner").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w + l.height - 1).attr("width", x + h).attr("height", t.height + h - l.height - 3);
|
|
303
|
-
const { subGraphTitleTopMargin: v } = T(e);
|
|
304
|
-
a.attr(
|
|
305
|
-
"transform",
|
|
306
|
-
`translate(${t.x - l.width / 2}, ${t.y - t.height / 2 - t.padding / 3 + (B(e.flowchart.htmlLabels) ? 5 : 3) + v})`
|
|
307
|
-
);
|
|
308
|
-
const y = i.node().getBBox();
|
|
309
|
-
return t.height = y.height, t.intersect = function(c) {
|
|
310
|
-
return D(t, c);
|
|
311
|
-
}, r;
|
|
312
|
-
}, ft = (n, t) => {
|
|
313
|
-
const e = n.insert("g").attr("class", t.classes).attr("id", t.id), r = e.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
314
|
-
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);
|
|
315
|
-
const u = r.node().getBBox();
|
|
316
|
-
return t.width = u.width, t.height = u.height, t.diff = -t.padding / 2, t.intersect = function(d) {
|
|
317
|
-
return D(t, d);
|
|
318
|
-
}, e;
|
|
319
|
-
}, dt = { rect: ct, roundedWithTitle: lt, noteGroup: ot, divider: ft };
|
|
320
|
-
let M = {};
|
|
321
|
-
const ut = (n, t) => {
|
|
322
|
-
s.trace("Inserting cluster");
|
|
323
|
-
const e = t.shape || "rect";
|
|
324
|
-
M[t.id] = dt[e](n, t);
|
|
325
|
-
}, ht = () => {
|
|
326
|
-
M = {};
|
|
327
|
-
}, A = (n, t, e, r, i, a) => X(void 0, null, function* () {
|
|
328
|
-
s.info("Graph in recursive render: XXX", m(t), i);
|
|
329
|
-
const u = t.graph().rankdir;
|
|
330
|
-
s.trace("Dir in recursive render - dir:", u);
|
|
331
|
-
const d = n.insert("g").attr("class", "root");
|
|
332
|
-
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]));
|
|
333
|
-
const l = d.insert("g").attr("class", "clusters"), h = d.insert("g").attr("class", "edgePaths"), w = d.insert("g").attr("class", "edgeLabels"), x = d.insert("g").attr("class", "nodes");
|
|
334
|
-
yield Promise.all(
|
|
335
|
-
t.nodes().map(function(c) {
|
|
336
|
-
return X(this, null, function* () {
|
|
337
|
-
const o = t.node(c);
|
|
338
|
-
if (i !== void 0) {
|
|
339
|
-
const b = JSON.parse(JSON.stringify(i.clusterData));
|
|
340
|
-
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));
|
|
341
|
-
}
|
|
342
|
-
if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
|
|
343
|
-
s.info("Cluster identified", c, o.width, t.node(c));
|
|
344
|
-
const b = yield A(
|
|
345
|
-
x,
|
|
346
|
-
o.graph,
|
|
347
|
-
e,
|
|
348
|
-
r,
|
|
349
|
-
t.node(c),
|
|
350
|
-
a
|
|
351
|
-
), E = b.elem;
|
|
352
|
-
_(o, E), o.diff = b.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), q(E, o), s.warn("Recursive render complete ", E, o);
|
|
353
|
-
} else
|
|
354
|
-
t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(C(o.id, t)), f[o.id] = { id: C(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), yield z(x, t.node(c), u));
|
|
355
|
-
});
|
|
356
|
-
})
|
|
357
|
-
), t.edges().forEach(function(c) {
|
|
358
|
-
const o = t.edge(c.v, c.w, c.name);
|
|
359
|
-
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", f, "ids:", c.v, c.w, "Translating: ", f[c.v], f[c.w]), K(w, o);
|
|
360
|
-
}), t.edges().forEach(function(c) {
|
|
361
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
|
|
362
|
-
}), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), V(t), s.info("Graph after layout:", m(t));
|
|
363
|
-
let v = 0;
|
|
364
|
-
const { subGraphTitleTotalMargin: y } = T(a);
|
|
365
|
-
return at(t).forEach(function(c) {
|
|
366
|
-
const o = t.node(c);
|
|
367
|
-
s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
|
|
368
|
-
"Position " + c + ": (" + o.x,
|
|
369
|
-
"," + o.y,
|
|
370
|
-
") width: ",
|
|
371
|
-
o.width,
|
|
372
|
-
" height: ",
|
|
373
|
-
o.height
|
|
374
|
-
), o && o.clusterNode ? (o.y += y, $(o)) : t.children(c).length > 0 ? (o.height += y, ut(l, o), f[o.id].node = o) : (o.y += y / 2, $(o));
|
|
375
|
-
}), t.edges().forEach(function(c) {
|
|
376
|
-
const o = t.edge(c);
|
|
377
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o), o.points.forEach((E) => E.y += y / 2);
|
|
378
|
-
const b = Q(h, c, o, f, e, t, r);
|
|
379
|
-
Y(o, b);
|
|
380
|
-
}), t.nodes().forEach(function(c) {
|
|
381
|
-
const o = t.node(c);
|
|
382
|
-
s.info(c, o.type, o.diff), o.type === "group" && (v = o.diff);
|
|
383
|
-
}), { elem: d, diff: v };
|
|
384
|
-
}), Et = (n, t, e, r, i) => X(void 0, null, function* () {
|
|
385
|
-
W(n, e, r, i), Z(), I(), ht(), it(), s.warn("Graph at first:", JSON.stringify(m(t))), rt(t), s.warn("Graph after:", JSON.stringify(m(t)));
|
|
386
|
-
const a = O();
|
|
387
|
-
yield A(n, t, r, i, void 0, a);
|
|
388
|
-
});
|
|
389
|
-
export {
|
|
390
|
-
Et as r
|
|
391
|
-
};
|