lowcoder-comps 0.0.27 → 0.0.29
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/{83f8a9bc.js → 2085da13.js} +1 -1
- package/250691b5.js +5 -0
- package/274f545c.js +881 -0
- package/{991b6314.js → 289305a1.js} +45 -43
- package/{6e6c38ae.js → 2eae45c2.js} +1 -1
- package/2ff7471d.js +9 -0
- package/{d16a79d9.js → 335b22a2.js} +12 -10
- package/{e30d5d4a.js → 38c826fe.js} +158 -147
- package/{ca35eaa7.js → 44011c1d.js} +286 -293
- package/4fc06812.js +64 -0
- package/{e7309c57.js → 56a787cf.js} +2 -2
- package/590941ff.js +86 -0
- package/{a607b479.js → 6341867f.js} +27 -27
- package/657fd065.js +8 -0
- package/{daee88f9.js → 78a5e50d.js} +133 -132
- package/820c3641.js +25 -0
- package/{70705fc3.js → 88b4e75a.js} +2 -1
- package/8d999722.js +1102 -0
- package/{65ab329e.js → 989caea2.js} +148 -145
- package/99b984d1.js +237 -0
- package/9e5f02d6.js +19104 -0
- package/a40faea7.js +11624 -0
- package/abac9104.js +1536 -0
- package/af2f19b3.js +819 -0
- package/{3544d11b.js → af5ee3de.js} +13 -12
- package/b24707c2.js +48428 -0
- package/b68f8b69.js +1276 -0
- package/ba68ba65.js +391 -0
- package/{796a2b34.js → bafb8599.js} +1 -1
- package/{0d26e631.js → bba60c35.js} +548 -548
- package/bd7c2a8e.js +1089 -0
- package/c71dadea.js +455 -0
- package/{8d8803ff.js → d05c1762.js} +25 -24
- package/{5edf1d55.js → d073ab24.js} +32557 -34230
- package/{11bb676b.js → d838cd10.js} +6 -5
- package/{cea82f05.js → dc36a6eb.js} +11 -11
- package/{e1a5f037.js → ed143450.js} +18 -18
- package/ee8ec8f2.js +2284 -0
- package/f6755210.js +1269 -0
- package/{560f788e.js → fba4c8e4.js} +18 -18
- package/index.js +2 -2
- package/package.json +11 -9
- package/31a2d08c.js +0 -365
- package/49315e81.js +0 -64
- package/55e01450.js +0 -46724
- package/63aaeeb8.js +0 -1055
- package/685b5f6c.js +0 -1235
- package/77072d20.js +0 -22
- package/919ae09a.js +0 -1000
- package/a0a687f6.js +0 -235
- package/a664ee52.js +0 -2192
- package/b8dbed32.js +0 -448
- package/d9708225.js +0 -86
- package/eca15e1d.js +0 -2396
- package/f3f6fcfc.js +0 -18798
- package/f45254b8.js +0 -786
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as un, $ as I, a0 as U, a1 as Y, a2 as fn } from "./d073ab24.js";
|
|
2
2
|
import { i as cn } from "./f9637058.js";
|
|
3
3
|
function F(n, t) {
|
|
4
4
|
return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
|
|
@@ -6,7 +6,7 @@ function F(n, t) {
|
|
|
6
6
|
function hn(n, t) {
|
|
7
7
|
return n == null || t == null ? NaN : t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function W(n) {
|
|
10
10
|
let t, e, r;
|
|
11
11
|
n.length !== 2 ? (t = F, e = (u, c) => F(n(u), c), r = (u, c) => n(u) - c) : (t = n === F || n === hn ? n : mn, e = n, r = n);
|
|
12
12
|
function i(u, c, o = 0, l = u.length) {
|
|
@@ -43,8 +43,8 @@ function mn() {
|
|
|
43
43
|
function sn(n) {
|
|
44
44
|
return n === null ? NaN : +n;
|
|
45
45
|
}
|
|
46
|
-
const ln =
|
|
47
|
-
|
|
46
|
+
const ln = W(F), dn = ln.right;
|
|
47
|
+
W(sn).center;
|
|
48
48
|
const gn = dn, yn = Math.sqrt(50), Mn = Math.sqrt(10), pn = Math.sqrt(2);
|
|
49
49
|
function R(n, t, e) {
|
|
50
50
|
const r = (t - n) / Math.max(0, e), i = Math.floor(Math.log10(r)), f = r / Math.pow(10, i), a = f >= yn ? 10 : f >= Mn ? 5 : f >= pn ? 2 : 1;
|
|
@@ -220,7 +220,7 @@ function Z(n, t) {
|
|
|
220
220
|
var r = e[0], i = e[1];
|
|
221
221
|
return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
|
|
222
222
|
}
|
|
223
|
-
const
|
|
223
|
+
const _ = {
|
|
224
224
|
"%": (n, t) => (n * 100).toFixed(t),
|
|
225
225
|
b: (n) => Math.round(n).toString(2),
|
|
226
226
|
c: (n) => n + "",
|
|
@@ -235,17 +235,17 @@ const H = {
|
|
|
235
235
|
X: (n) => Math.round(n).toString(16).toUpperCase(),
|
|
236
236
|
x: (n) => Math.round(n).toString(16)
|
|
237
237
|
};
|
|
238
|
-
function
|
|
238
|
+
function H(n) {
|
|
239
239
|
return n;
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var J = Array.prototype.map, K = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
242
242
|
function En(n) {
|
|
243
|
-
var t = n.grouping === void 0 || n.thousands === void 0 ?
|
|
243
|
+
var t = n.grouping === void 0 || n.thousands === void 0 ? H : Pn(J.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", r = n.currency === void 0 ? "" : n.currency[1] + "", i = n.decimal === void 0 ? "." : n.decimal + "", f = n.numerals === void 0 ? H : zn(J.call(n.numerals, String)), a = n.percent === void 0 ? "%" : n.percent + "", u = n.minus === void 0 ? "−" : n.minus + "", c = n.nan === void 0 ? "NaN" : n.nan + "";
|
|
244
244
|
function o(h) {
|
|
245
245
|
h = D(h);
|
|
246
246
|
var s = h.fill, p = h.align, y = h.sign, S = h.symbol, k = h.zero, b = h.width, T = h.comma, w = h.precision, G = h.trim, d = h.type;
|
|
247
|
-
d === "n" ? (T = !0, d = "g") :
|
|
248
|
-
var en = S === "$" ? e : S === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", on = S === "$" ? r : /[%p]/.test(d) ? a : "", O =
|
|
247
|
+
d === "n" ? (T = !0, d = "g") : _[d] || (w === void 0 && (w = 12), G = !0, d = "g"), (k || s === "0" && p === "=") && (k = !0, s = "0", p = "=");
|
|
248
|
+
var en = S === "$" ? e : S === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", on = S === "$" ? r : /[%p]/.test(d) ? a : "", O = _[d], an = /[defgprs%]/.test(d);
|
|
249
249
|
w = w === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, w)) : Math.max(0, Math.min(20, w));
|
|
250
250
|
function V(m) {
|
|
251
251
|
var N = en, g = on, x, X, j;
|
|
@@ -254,7 +254,7 @@ function En(n) {
|
|
|
254
254
|
else {
|
|
255
255
|
m = +m;
|
|
256
256
|
var P = m < 0 || 1 / m < 0;
|
|
257
|
-
if (m = isNaN(m) ? c : O(Math.abs(m), w), G && (m = Fn(m)), P && +m == 0 && y !== "+" && (P = !1), N = (P ? y === "(" ? y : u : y === "-" || y === "(" ? "" : y) + N, g = (d === "s" ?
|
|
257
|
+
if (m = isNaN(m) ? c : O(Math.abs(m), w), G && (m = Fn(m)), P && +m == 0 && y !== "+" && (P = !1), N = (P ? y === "(" ? y : u : y === "-" || y === "(" ? "" : y) + N, g = (d === "s" ? K[8 + nn / 3] : "") + g + (P && y === "(" ? ")" : ""), an) {
|
|
258
258
|
for (x = -1, X = m.length; ++x < X; )
|
|
259
259
|
if (j = m.charCodeAt(x), 48 > j || j > 57) {
|
|
260
260
|
g = (j === 46 ? i + m.slice(x + 1) : m.slice(x)) + g, m = m.slice(0, x);
|
|
@@ -285,7 +285,7 @@ function En(n) {
|
|
|
285
285
|
}, V;
|
|
286
286
|
}
|
|
287
287
|
function l(h, s) {
|
|
288
|
-
var p = o((h = D(h), h.type = "f", h)), y = Math.max(-8, Math.min(8, Math.floor(v(s) / 3))) * 3, S = Math.pow(10, -y), k =
|
|
288
|
+
var p = o((h = D(h), h.type = "f", h)), y = Math.max(-8, Math.min(8, Math.floor(v(s) / 3))) * 3, S = Math.pow(10, -y), k = K[8 + y / 3];
|
|
289
289
|
return function(b) {
|
|
290
290
|
return p(S * b) + k;
|
|
291
291
|
};
|
|
@@ -321,7 +321,7 @@ function qn(n) {
|
|
|
321
321
|
function Cn(n) {
|
|
322
322
|
return +n;
|
|
323
323
|
}
|
|
324
|
-
var
|
|
324
|
+
var Q = [0, 1];
|
|
325
325
|
function A(n) {
|
|
326
326
|
return n;
|
|
327
327
|
}
|
|
@@ -355,7 +355,7 @@ function Vn(n, t) {
|
|
|
355
355
|
return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
|
|
356
356
|
}
|
|
357
357
|
function Xn() {
|
|
358
|
-
var n =
|
|
358
|
+
var n = Q, t = Q, e = C, r, i, f, a = A, u, c, o;
|
|
359
359
|
function l() {
|
|
360
360
|
var s = Math.min(n.length, t.length);
|
|
361
361
|
return a !== A && (a = Bn(n[0], n[s - 1])), u = s > 2 ? On : Gn, c = o = null, h;
|
|
@@ -432,16 +432,16 @@ function Zn(n) {
|
|
|
432
432
|
return n;
|
|
433
433
|
}, n;
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function _n() {
|
|
436
436
|
var n = Un();
|
|
437
437
|
return n.copy = function() {
|
|
438
|
-
return Vn(n,
|
|
438
|
+
return Vn(n, _n());
|
|
439
439
|
}, cn.apply(n, arguments), Zn(n);
|
|
440
440
|
}
|
|
441
441
|
export {
|
|
442
442
|
Vn as a,
|
|
443
|
-
|
|
443
|
+
W as b,
|
|
444
444
|
Un as c,
|
|
445
|
-
|
|
445
|
+
_n as l,
|
|
446
446
|
Nn as t
|
|
447
447
|
};
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="lowcoder-comps-0.0.
|
|
2
|
-
import {
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="lowcoder-comps-0.0.29",e.appendChild(document.createTextNode("")),document.head.appendChild(e)}}catch(c){console.error("vite-plugin-css-injected-by-js",c)}})();
|
|
2
|
+
import { b8 as f } from "./d073ab24.js";
|
|
3
3
|
export {
|
|
4
4
|
f as default
|
|
5
5
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lowcoder-comps",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,11 +10,13 @@
|
|
|
10
10
|
"@fullcalendar/interaction": "^6.1.6",
|
|
11
11
|
"@fullcalendar/list": "^6.1.9",
|
|
12
12
|
"@fullcalendar/moment": "^6.1.6",
|
|
13
|
+
"@fullcalendar/multimonth": "^6.1.6",
|
|
13
14
|
"@fullcalendar/react": "^6.1.6",
|
|
14
15
|
"@fullcalendar/resource": "^6.1.11",
|
|
15
16
|
"@fullcalendar/resource-timegrid": "^6.1.11",
|
|
16
17
|
"@fullcalendar/resource-timeline": "^6.1.11",
|
|
17
18
|
"@fullcalendar/timegrid": "^6.1.6",
|
|
19
|
+
"@fullcalendar/timeline": "^6.1.6",
|
|
18
20
|
"@types/react": "^18.2.45",
|
|
19
21
|
"@types/react-dom": "^18.2.18",
|
|
20
22
|
"big.js": "^6.2.1",
|
|
@@ -30,6 +32,14 @@
|
|
|
30
32
|
"lowcoder": {
|
|
31
33
|
"description": "",
|
|
32
34
|
"comps": {
|
|
35
|
+
"calendar": {
|
|
36
|
+
"name": "Calendar",
|
|
37
|
+
"icon": "./icons/icon-comp-calendar.svg",
|
|
38
|
+
"layoutInfo": {
|
|
39
|
+
"w": 15,
|
|
40
|
+
"h": 60
|
|
41
|
+
}
|
|
42
|
+
},
|
|
33
43
|
"chart": {
|
|
34
44
|
"name": "Chart",
|
|
35
45
|
"icon": "./icons/icon-chart.svg",
|
|
@@ -46,14 +56,6 @@
|
|
|
46
56
|
"h": 40
|
|
47
57
|
}
|
|
48
58
|
},
|
|
49
|
-
"calendar": {
|
|
50
|
-
"name": "Calendar",
|
|
51
|
-
"icon": "./icons/icon-comp-calendar.svg",
|
|
52
|
-
"layoutInfo": {
|
|
53
|
-
"w": 15,
|
|
54
|
-
"h": 60
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
59
|
"mermaid": {
|
|
58
60
|
"name": "Mermaid",
|
|
59
61
|
"icon": "./icons/mermaidchart.svg",
|
package/31a2d08c.js
DELETED
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
var E = (n, t, e) => new Promise((r, i) => {
|
|
2
|
-
var a = (f) => {
|
|
3
|
-
try {
|
|
4
|
-
l(e.next(f));
|
|
5
|
-
} catch (h) {
|
|
6
|
-
i(h);
|
|
7
|
-
}
|
|
8
|
-
}, u = (f) => {
|
|
9
|
-
try {
|
|
10
|
-
l(e.throw(f));
|
|
11
|
-
} catch (h) {
|
|
12
|
-
i(h);
|
|
13
|
-
}
|
|
14
|
-
}, l = (f) => f.done ? r(f.value) : Promise.resolve(f.value).then(a, u);
|
|
15
|
-
l((e = e.apply(n, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { b as j, i as m, m as L, G as A, l as M } from "./eca15e1d.js";
|
|
18
|
-
import { i as _, u as H, s as V, a as U, b as W, p as O, c as Y, d as q, e as z, f as K, g as T, h as B } from "./919ae09a.js";
|
|
19
|
-
import { l as s, p as S, c as X, h as J } from "./5edf1d55.js";
|
|
20
|
-
import { a as Q } from "./70705fc3.js";
|
|
21
|
-
var Z = 4;
|
|
22
|
-
function I(n) {
|
|
23
|
-
return j(n, Z);
|
|
24
|
-
}
|
|
25
|
-
function x(n) {
|
|
26
|
-
var t = {
|
|
27
|
-
options: {
|
|
28
|
-
directed: n.isDirected(),
|
|
29
|
-
multigraph: n.isMultigraph(),
|
|
30
|
-
compound: n.isCompound()
|
|
31
|
-
},
|
|
32
|
-
nodes: tt(n),
|
|
33
|
-
edges: et(n)
|
|
34
|
-
};
|
|
35
|
-
return m(n.graph()) || (t.value = I(n.graph())), t;
|
|
36
|
-
}
|
|
37
|
-
function tt(n) {
|
|
38
|
-
return L(n.nodes(), function(t) {
|
|
39
|
-
var e = n.node(t), r = n.parent(t), i = { v: t };
|
|
40
|
-
return m(e) || (i.value = e), m(r) || (i.parent = r), i;
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function et(n) {
|
|
44
|
-
return L(n.edges(), function(t) {
|
|
45
|
-
var e = n.edge(t), r = { v: t.v, w: t.w };
|
|
46
|
-
return m(t.name) || (r.name = t.name), m(e) || (r.value = e), r;
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
let d = {}, g = {}, R = {};
|
|
50
|
-
const nt = () => {
|
|
51
|
-
g = {}, R = {}, d = {};
|
|
52
|
-
}, C = (n, t) => (s.trace("In isDecendant", t, " ", n, " = ", g[t].includes(n)), !!g[t].includes(n)), it = (n, t) => (s.info("Decendants of ", t, " is ", g[t]), s.info("Edge is ", n), n.v === t || n.w === t ? !1 : g[t] ? g[t].includes(n.v) || C(n.v, t) || C(n.w, t) || g[t].includes(n.w) : (s.debug("Tilt, ", t, ",not in decendants"), !1)), p = (n, t, e, r) => {
|
|
53
|
-
s.warn(
|
|
54
|
-
"Copying children of ",
|
|
55
|
-
n,
|
|
56
|
-
"root",
|
|
57
|
-
r,
|
|
58
|
-
"data",
|
|
59
|
-
t.node(n),
|
|
60
|
-
r
|
|
61
|
-
);
|
|
62
|
-
const i = t.children(n) || [];
|
|
63
|
-
n !== r && i.push(n), s.warn("Copying (nodes) clusterId", n, "nodes", i), i.forEach((a) => {
|
|
64
|
-
if (t.children(a).length > 0)
|
|
65
|
-
p(a, t, e, r);
|
|
66
|
-
else {
|
|
67
|
-
const u = t.node(a);
|
|
68
|
-
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(
|
|
69
|
-
"Not Setting parent for node=",
|
|
70
|
-
a,
|
|
71
|
-
"cluster!==rootId",
|
|
72
|
-
n !== r,
|
|
73
|
-
"node!==clusterId",
|
|
74
|
-
a !== n
|
|
75
|
-
));
|
|
76
|
-
const l = t.edges(a);
|
|
77
|
-
s.debug("Copying Edges", l), l.forEach((f) => {
|
|
78
|
-
s.info("Edge", f);
|
|
79
|
-
const h = t.edge(f.v, f.w, f.name);
|
|
80
|
-
s.info("Edge data", h, r);
|
|
81
|
-
try {
|
|
82
|
-
it(f, r) ? (s.info("Copying as ", f.v, f.w, h, f.name), e.setEdge(f.v, f.w, h, f.name), s.info("newGraph edges ", e.edges(), e.edge(e.edges()[0]))) : s.info(
|
|
83
|
-
"Skipping copy of edge ",
|
|
84
|
-
f.v,
|
|
85
|
-
"-->",
|
|
86
|
-
f.w,
|
|
87
|
-
" rootId: ",
|
|
88
|
-
r,
|
|
89
|
-
" clusterId:",
|
|
90
|
-
n
|
|
91
|
-
);
|
|
92
|
-
} catch (w) {
|
|
93
|
-
s.error(w);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
s.debug("Removing node", a), t.removeNode(a);
|
|
98
|
-
});
|
|
99
|
-
}, P = (n, t) => {
|
|
100
|
-
const e = t.children(n);
|
|
101
|
-
let r = [...e];
|
|
102
|
-
for (const i of e)
|
|
103
|
-
R[i] = n, r = [...r, ...P(i, t)];
|
|
104
|
-
return r;
|
|
105
|
-
}, b = (n, t) => {
|
|
106
|
-
s.trace("Searching", n);
|
|
107
|
-
const e = t.children(n);
|
|
108
|
-
if (s.trace("Searching children of id ", n, e), e.length < 1)
|
|
109
|
-
return s.trace("This is a valid node", n), n;
|
|
110
|
-
for (const r of e) {
|
|
111
|
-
const i = b(r, t);
|
|
112
|
-
if (i)
|
|
113
|
-
return s.trace("Found replacement for", n, " => ", i), i;
|
|
114
|
-
}
|
|
115
|
-
}, N = (n) => !d[n] || !d[n].externalConnections ? n : d[n] ? d[n].id : n, st = (n, t) => {
|
|
116
|
-
if (!n || t > 10) {
|
|
117
|
-
s.debug("Opting out, no graph ");
|
|
118
|
-
return;
|
|
119
|
-
} else
|
|
120
|
-
s.debug("Opting in, graph ");
|
|
121
|
-
n.nodes().forEach(function(e) {
|
|
122
|
-
n.children(e).length > 0 && (s.warn(
|
|
123
|
-
"Cluster identified",
|
|
124
|
-
e,
|
|
125
|
-
" Replacement id in edges: ",
|
|
126
|
-
b(e, n)
|
|
127
|
-
), g[e] = P(e, n), d[e] = { id: b(e, n), clusterData: n.node(e) });
|
|
128
|
-
}), n.nodes().forEach(function(e) {
|
|
129
|
-
const r = n.children(e), i = n.edges();
|
|
130
|
-
r.length > 0 ? (s.debug("Cluster identified", e, g), i.forEach((a) => {
|
|
131
|
-
if (a.v !== e && a.w !== e) {
|
|
132
|
-
const u = C(a.v, e), l = C(a.w, e);
|
|
133
|
-
u ^ l && (s.warn("Edge: ", a, " leaves cluster ", e), s.warn("Decendants of XXX ", e, ": ", g[e]), d[e].externalConnections = !0);
|
|
134
|
-
}
|
|
135
|
-
})) : s.debug("Not a cluster ", e, g);
|
|
136
|
-
}), n.edges().forEach(function(e) {
|
|
137
|
-
const r = n.edge(e);
|
|
138
|
-
s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(n.edge(e)));
|
|
139
|
-
let i = e.v, a = e.w;
|
|
140
|
-
if (s.warn(
|
|
141
|
-
"Fix XXX",
|
|
142
|
-
d,
|
|
143
|
-
"ids:",
|
|
144
|
-
e.v,
|
|
145
|
-
e.w,
|
|
146
|
-
"Translating: ",
|
|
147
|
-
d[e.v],
|
|
148
|
-
" --- ",
|
|
149
|
-
d[e.w]
|
|
150
|
-
), d[e.v] && d[e.w] && d[e.v] === d[e.w]) {
|
|
151
|
-
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 = N(e.v), a = N(e.w), n.removeEdge(e.v, e.w, e.name);
|
|
152
|
-
const u = e.w + "---" + e.v;
|
|
153
|
-
n.setNode(u, {
|
|
154
|
-
domId: u,
|
|
155
|
-
id: u,
|
|
156
|
-
labelStyle: "",
|
|
157
|
-
labelText: r.label,
|
|
158
|
-
padding: 0,
|
|
159
|
-
shape: "labelRect",
|
|
160
|
-
style: ""
|
|
161
|
-
});
|
|
162
|
-
const l = structuredClone(r), f = structuredClone(r);
|
|
163
|
-
l.label = "", l.arrowTypeEnd = "none", f.label = "", l.fromCluster = e.v, f.toCluster = e.v, n.setEdge(i, u, l, e.name + "-cyclic-special"), n.setEdge(u, a, f, e.name + "-cyclic-special");
|
|
164
|
-
} else
|
|
165
|
-
(d[e.v] || d[e.w]) && (s.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), i = N(e.v), a = N(e.w), n.removeEdge(e.v, e.w, e.name), i !== e.v && (r.fromCluster = e.v), a !== e.w && (r.toCluster = e.w), s.warn("Fix Replacing with XXX", i, a, e.name), n.setEdge(i, a, r, e.name));
|
|
166
|
-
}), s.warn("Adjusted Graph", x(n)), F(n, 0), s.trace(d);
|
|
167
|
-
}, F = (n, t) => {
|
|
168
|
-
if (s.warn("extractor - ", t, x(n), n.children("D")), t > 10) {
|
|
169
|
-
s.error("Bailing out");
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
let e = n.nodes(), r = !1;
|
|
173
|
-
for (const i of e) {
|
|
174
|
-
const a = n.children(i);
|
|
175
|
-
r = r || a.length > 0;
|
|
176
|
-
}
|
|
177
|
-
if (!r) {
|
|
178
|
-
s.debug("Done, no node has children", n.nodes());
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
s.debug("Nodes = ", e, t);
|
|
182
|
-
for (const i of e)
|
|
183
|
-
if (s.debug(
|
|
184
|
-
"Extracting node",
|
|
185
|
-
i,
|
|
186
|
-
d,
|
|
187
|
-
d[i] && !d[i].externalConnections,
|
|
188
|
-
!n.parent(i),
|
|
189
|
-
n.node(i),
|
|
190
|
-
n.children("D"),
|
|
191
|
-
" Depth ",
|
|
192
|
-
t
|
|
193
|
-
), !d[i])
|
|
194
|
-
s.debug("Not a cluster", i, t);
|
|
195
|
-
else if (!d[i].externalConnections && // !graph.parent(node) &&
|
|
196
|
-
n.children(i) && n.children(i).length > 0) {
|
|
197
|
-
s.warn(
|
|
198
|
-
"Cluster without external connections, without a parent and with children",
|
|
199
|
-
i,
|
|
200
|
-
t
|
|
201
|
-
);
|
|
202
|
-
let u = n.graph().rankdir === "TB" ? "LR" : "TB";
|
|
203
|
-
d[i] && d[i].clusterData && d[i].clusterData.dir && (u = d[i].clusterData.dir, s.warn("Fixing dir", d[i].clusterData.dir, u));
|
|
204
|
-
const l = new A({
|
|
205
|
-
multigraph: !0,
|
|
206
|
-
compound: !0
|
|
207
|
-
}).setGraph({
|
|
208
|
-
rankdir: u,
|
|
209
|
-
// Todo: set proper spacing
|
|
210
|
-
nodesep: 50,
|
|
211
|
-
ranksep: 50,
|
|
212
|
-
marginx: 8,
|
|
213
|
-
marginy: 8
|
|
214
|
-
}).setDefaultEdgeLabel(function() {
|
|
215
|
-
return {};
|
|
216
|
-
});
|
|
217
|
-
s.warn("Old graph before copy", x(n)), p(i, n, l, i), n.setNode(i, {
|
|
218
|
-
clusterNode: !0,
|
|
219
|
-
id: i,
|
|
220
|
-
clusterData: d[i].clusterData,
|
|
221
|
-
labelText: d[i].labelText,
|
|
222
|
-
graph: l
|
|
223
|
-
}), s.warn("New graph after copy node: (", i, ")", x(l)), s.debug("Old graph after copy", x(n));
|
|
224
|
-
} else
|
|
225
|
-
s.warn(
|
|
226
|
-
"Cluster ** ",
|
|
227
|
-
i,
|
|
228
|
-
" **not meeting the criteria !externalConnections:",
|
|
229
|
-
!d[i].externalConnections,
|
|
230
|
-
" no parent: ",
|
|
231
|
-
!n.parent(i),
|
|
232
|
-
" children ",
|
|
233
|
-
n.children(i) && n.children(i).length > 0,
|
|
234
|
-
n.children("D"),
|
|
235
|
-
t
|
|
236
|
-
), s.debug(d);
|
|
237
|
-
e = n.nodes(), s.warn("New list of nodes", e);
|
|
238
|
-
for (const i of e) {
|
|
239
|
-
const a = n.node(i);
|
|
240
|
-
s.warn(" Now next level", i, a), a.clusterNode && F(a.graph, t + 1);
|
|
241
|
-
}
|
|
242
|
-
}, k = (n, t) => {
|
|
243
|
-
if (t.length === 0)
|
|
244
|
-
return [];
|
|
245
|
-
let e = Object.assign(t);
|
|
246
|
-
return t.forEach((r) => {
|
|
247
|
-
const i = n.children(r), a = k(n, i);
|
|
248
|
-
e = [...e, ...a];
|
|
249
|
-
}), e;
|
|
250
|
-
}, rt = (n) => k(n, n.children()), at = (n, t) => {
|
|
251
|
-
s.info("Creating subgraph rect for ", t.id, t);
|
|
252
|
-
const e = n.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), r = e.insert("rect", ":first-child"), i = S(X().flowchart.htmlLabels), a = e.insert("g").attr("class", "cluster-label"), u = t.labelType === "markdown" ? Q(a, t.labelText, { style: t.labelStyle, useHtmlLabels: i }) : a.node().appendChild(T(t.labelText, t.labelStyle, void 0, !0));
|
|
253
|
-
let l = u.getBBox();
|
|
254
|
-
if (S(X().flowchart.htmlLabels)) {
|
|
255
|
-
const c = u.children[0], o = J(u);
|
|
256
|
-
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
257
|
-
}
|
|
258
|
-
const f = 0 * t.padding, h = f / 2, w = t.width <= l.width + f ? l.width + f : t.width;
|
|
259
|
-
t.width <= l.width + f ? t.diff = (l.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, s.trace("Data ", t, JSON.stringify(t)), r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - w / 2).attr("y", t.y - t.height / 2 - h).attr("width", w).attr("height", t.height + f), i ? a.attr(
|
|
260
|
-
"transform",
|
|
261
|
-
// This puts the labal on top of the box instead of inside it
|
|
262
|
-
"translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2) + ")"
|
|
263
|
-
) : a.attr(
|
|
264
|
-
"transform",
|
|
265
|
-
// This puts the labal on top of the box instead of inside it
|
|
266
|
-
"translate(" + t.x + ", " + (t.y - t.height / 2) + ")"
|
|
267
|
-
);
|
|
268
|
-
const v = r.node().getBBox();
|
|
269
|
-
return t.width = v.width, t.height = v.height, t.intersect = function(c) {
|
|
270
|
-
return B(t, c);
|
|
271
|
-
}, e;
|
|
272
|
-
}, ct = (n, t) => {
|
|
273
|
-
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;
|
|
274
|
-
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");
|
|
275
|
-
const u = r.node().getBBox();
|
|
276
|
-
return t.width = u.width, t.height = u.height, t.intersect = function(l) {
|
|
277
|
-
return B(t, l);
|
|
278
|
-
}, e;
|
|
279
|
-
}, ot = (n, t) => {
|
|
280
|
-
const e = n.insert("g").attr("class", t.classes).attr("id", t.id), r = e.insert("rect", ":first-child"), i = e.insert("g").attr("class", "cluster-label"), a = e.append("rect"), u = i.node().appendChild(T(t.labelText, t.labelStyle, void 0, !0));
|
|
281
|
-
let l = u.getBBox();
|
|
282
|
-
if (S(X().flowchart.htmlLabels)) {
|
|
283
|
-
const c = u.children[0], o = J(u);
|
|
284
|
-
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
285
|
-
}
|
|
286
|
-
l = u.getBBox();
|
|
287
|
-
const f = 0 * t.padding, h = f / 2, w = t.width <= l.width + t.padding ? l.width + t.padding : t.width;
|
|
288
|
-
t.width <= l.width + t.padding ? t.diff = (l.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, r.attr("class", "outer").attr("x", t.x - w / 2 - h).attr("y", t.y - t.height / 2 - h).attr("width", w + f).attr("height", t.height + f), a.attr("class", "inner").attr("x", t.x - w / 2 - h).attr("y", t.y - t.height / 2 - h + l.height - 1).attr("width", w + f).attr("height", t.height + f - l.height - 3), i.attr(
|
|
289
|
-
"transform",
|
|
290
|
-
"translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2 - t.padding / 3 + (S(X().flowchart.htmlLabels) ? 5 : 3)) + ")"
|
|
291
|
-
);
|
|
292
|
-
const v = r.node().getBBox();
|
|
293
|
-
return t.height = v.height, t.intersect = function(c) {
|
|
294
|
-
return B(t, c);
|
|
295
|
-
}, e;
|
|
296
|
-
}, lt = (n, t) => {
|
|
297
|
-
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;
|
|
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 u = r.node().getBBox();
|
|
300
|
-
return t.width = u.width, t.height = u.height, t.diff = -t.padding / 2, t.intersect = function(l) {
|
|
301
|
-
return B(t, l);
|
|
302
|
-
}, e;
|
|
303
|
-
}, ft = { rect: at, roundedWithTitle: ot, noteGroup: ct, divider: lt };
|
|
304
|
-
let $ = {};
|
|
305
|
-
const dt = (n, t) => {
|
|
306
|
-
s.trace("Inserting cluster");
|
|
307
|
-
const e = t.shape || "rect";
|
|
308
|
-
$[t.id] = ft[e](n, t);
|
|
309
|
-
}, ut = () => {
|
|
310
|
-
$ = {};
|
|
311
|
-
}, G = (n, t, e, r, i) => E(void 0, null, function* () {
|
|
312
|
-
s.info("Graph in recursive render: XXX", x(t), i);
|
|
313
|
-
const a = t.graph().rankdir;
|
|
314
|
-
s.trace("Dir in recursive render - dir:", a);
|
|
315
|
-
const u = n.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 l = u.insert("g").attr("class", "clusters"), f = u.insert("g").attr("class", "edgePaths"), h = u.insert("g").attr("class", "edgeLabels"), w = u.insert("g").attr("class", "nodes");
|
|
318
|
-
yield Promise.all(
|
|
319
|
-
t.nodes().map(function(c) {
|
|
320
|
-
return E(this, null, function* () {
|
|
321
|
-
const o = t.node(c);
|
|
322
|
-
if (i !== void 0) {
|
|
323
|
-
const y = JSON.parse(JSON.stringify(i.clusterData));
|
|
324
|
-
s.info("Setting data for cluster XXX (", c, ") ", y, i), t.setNode(i.id, y), t.parent(c) || (s.trace("Setting parent", c, i.id), t.setParent(c, i.id, y));
|
|
325
|
-
}
|
|
326
|
-
if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
|
|
327
|
-
s.info("Cluster identified", c, o.width, t.node(c));
|
|
328
|
-
const y = yield G(w, o.graph, e, r, t.node(c)), D = y.elem;
|
|
329
|
-
H(o, D), o.diff = y.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), V(D, o), s.warn("Recursive render complete ", D, o);
|
|
330
|
-
} else
|
|
331
|
-
t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(b(o.id, t)), d[o.id] = { id: b(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), yield U(w, t.node(c), a));
|
|
332
|
-
});
|
|
333
|
-
})
|
|
334
|
-
), t.edges().forEach(function(c) {
|
|
335
|
-
const o = t.edge(c.v, c.w, c.name);
|
|
336
|
-
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", d, "ids:", c.v, c.w, "Translateing: ", d[c.v], d[c.w]), W(h, o);
|
|
337
|
-
}), t.edges().forEach(function(c) {
|
|
338
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
|
|
339
|
-
}), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), M(t), s.info("Graph after layout:", x(t));
|
|
340
|
-
let v = 0;
|
|
341
|
-
return rt(t).forEach(function(c) {
|
|
342
|
-
const o = t.node(c);
|
|
343
|
-
s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
|
|
344
|
-
"Position " + c + ": (" + o.x,
|
|
345
|
-
"," + o.y,
|
|
346
|
-
") width: ",
|
|
347
|
-
o.width,
|
|
348
|
-
" height: ",
|
|
349
|
-
o.height
|
|
350
|
-
), o && o.clusterNode ? O(o) : t.children(c).length > 0 ? (dt(l, o), d[o.id].node = o) : O(o);
|
|
351
|
-
}), t.edges().forEach(function(c) {
|
|
352
|
-
const o = t.edge(c);
|
|
353
|
-
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o);
|
|
354
|
-
const y = Y(f, c, o, d, e, t, r);
|
|
355
|
-
q(o, y);
|
|
356
|
-
}), t.nodes().forEach(function(c) {
|
|
357
|
-
const o = t.node(c);
|
|
358
|
-
s.info(c, o.type, o.diff), o.type === "group" && (v = o.diff);
|
|
359
|
-
}), { elem: u, diff: v };
|
|
360
|
-
}), vt = (n, t, e, r, i) => E(void 0, null, function* () {
|
|
361
|
-
_(n, e, r, i), z(), K(), ut(), nt(), s.warn("Graph at first:", JSON.stringify(x(t))), st(t), s.warn("Graph after:", JSON.stringify(x(t))), yield G(n, t, r, i);
|
|
362
|
-
});
|
|
363
|
-
export {
|
|
364
|
-
vt as r
|
|
365
|
-
};
|
package/49315e81.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { aO as o, m as i } from "./5edf1d55.js";
|
|
2
|
-
const c = (s, t) => {
|
|
3
|
-
const r = s.append("rect");
|
|
4
|
-
if (r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), t.rx !== void 0 && r.attr("rx", t.rx), t.ry !== void 0 && r.attr("ry", t.ry), t.attrs !== void 0)
|
|
5
|
-
for (const e in t.attrs)
|
|
6
|
-
r.attr(e, t.attrs[e]);
|
|
7
|
-
return t.class !== void 0 && r.attr("class", t.class), r;
|
|
8
|
-
}, x = (s, t) => {
|
|
9
|
-
const r = {
|
|
10
|
-
x: t.startx,
|
|
11
|
-
y: t.starty,
|
|
12
|
-
width: t.stopx - t.startx,
|
|
13
|
-
height: t.stopy - t.starty,
|
|
14
|
-
fill: t.fill,
|
|
15
|
-
stroke: t.stroke,
|
|
16
|
-
class: "rect"
|
|
17
|
-
};
|
|
18
|
-
c(s, r).lower();
|
|
19
|
-
}, d = (s, t) => {
|
|
20
|
-
const r = t.text.replace(o, " "), e = s.append("text");
|
|
21
|
-
e.attr("x", t.x), e.attr("y", t.y), e.attr("class", "legend"), e.style("text-anchor", t.anchor), t.class !== void 0 && e.attr("class", t.class);
|
|
22
|
-
const n = e.append("tspan");
|
|
23
|
-
return n.attr("x", t.x + t.textMargin * 2), n.text(r), e;
|
|
24
|
-
}, h = (s, t, r, e) => {
|
|
25
|
-
const n = s.append("image");
|
|
26
|
-
n.attr("x", t), n.attr("y", r);
|
|
27
|
-
const a = i.sanitizeUrl(e);
|
|
28
|
-
n.attr("xlink:href", a);
|
|
29
|
-
}, y = (s, t, r, e) => {
|
|
30
|
-
const n = s.append("use");
|
|
31
|
-
n.attr("x", t), n.attr("y", r);
|
|
32
|
-
const a = i.sanitizeUrl(e);
|
|
33
|
-
n.attr("xlink:href", `#${a}`);
|
|
34
|
-
}, g = () => ({
|
|
35
|
-
x: 0,
|
|
36
|
-
y: 0,
|
|
37
|
-
width: 100,
|
|
38
|
-
height: 100,
|
|
39
|
-
fill: "#EDF2AE",
|
|
40
|
-
stroke: "#666",
|
|
41
|
-
anchor: "start",
|
|
42
|
-
rx: 0,
|
|
43
|
-
ry: 0
|
|
44
|
-
}), p = () => ({
|
|
45
|
-
x: 0,
|
|
46
|
-
y: 0,
|
|
47
|
-
width: 100,
|
|
48
|
-
height: 100,
|
|
49
|
-
"text-anchor": "start",
|
|
50
|
-
style: "#666",
|
|
51
|
-
textMargin: 0,
|
|
52
|
-
rx: 0,
|
|
53
|
-
ry: 0,
|
|
54
|
-
tspan: !0
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
x as a,
|
|
58
|
-
y as b,
|
|
59
|
-
h as c,
|
|
60
|
-
c as d,
|
|
61
|
-
p as e,
|
|
62
|
-
d as f,
|
|
63
|
-
g
|
|
64
|
-
};
|