lowcoder-comps 2.7.1 → 2.7.2
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/{20043e57.js → 06bfc8fd.js} +2 -2
- package/{2ab6c3e7.js → 0bc1e750.js} +103 -103
- package/{3d5c53a9.js → 16017dca.js} +1 -1
- package/{75ca0804.js → 188d0a7b.js} +1 -1
- package/194933bf.js +21942 -0
- package/{6f672a37.js → 1d548e39.js} +30 -30
- package/{ae063085.js → 1e6f66fd.js} +4 -4
- package/{9ab17d2b.js → 250dc9f4.js} +11 -11
- package/2bab86ad.js +2318 -0
- package/{3320cebb.js → 38362e7c.js} +1 -1
- package/{b79eb0a0.js → 455488fd.js} +2 -2
- package/{a423d8a4.js → 456027f3.js} +10 -10
- package/{145bbbf8.js → 4626b6f8.js} +1 -1
- package/{368623d4.js → 46b8527c.js} +3 -3
- package/{1355af90.js → 50383021.js} +1 -1
- package/{e686efca.js → 514e4c08.js} +1 -1
- package/{572dbe1a.js → 5e5d535b.js} +6 -2
- package/{d8eb5780.js → 78f1ff0d.js} +9 -9
- package/{4fca0408.js → 816637dc.js} +83239 -86684
- package/{a2092753.js → 822253e7.js} +2 -2
- package/{14aee76a.js → 87065cc7.js} +1 -1
- package/{144f954a.js → 91e84a61.js} +1 -1
- package/{668e2d53.js → 9a7ae50a.js} +4 -4
- package/{3c051c62.js → 9dbba476.js} +5 -5
- package/{4b4585a7.js → a23f123d.js} +5 -5
- package/{5ed067d2.js → ac024963.js} +1 -1
- package/{903f681c.js → ba8c6a16.js} +29 -29
- package/{7519dcf3.js → c5be1d77.js} +9 -9
- package/{819e4d36.js → cbf03099.js} +2 -2
- package/{7800e924.js → d29b1617.js} +4 -4
- package/{7f1c17ab.js → d4b2d80a.js} +2 -2
- package/{9dfda495.js → d5dbb80b.js} +6 -6
- package/{b08a1a87.js → d708b9ba.js} +5 -5
- package/{e5b014a9.js → e8a70b0f.js} +932 -868
- package/{5906ae5d.js → e9f334a4.js} +22 -22
- package/{9b21f3b2.js → f06f653d.js} +1 -1
- package/{47fc5096.js → fb7b2a8c.js} +1 -1
- package/{79a34448.js → ff57e9e3.js} +3 -3
- package/ffd1bcb0.js +86 -0
- package/{bb21178e.js → fff3acf7.js} +11 -11
- package/index.js +3 -3
- package/package.json +1 -1
- package/1bdddbe6.js +0 -2501
- package/54155789.js +0 -19321
- package/5ef4a192.js +0 -86
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as F, b as xn, c as zn, d as L, k as Un, e as Hn, g as jn, j as P, l as En, m as kn, n as yn, t as Jn, o as Nn, p as Kn, q as Zn, f as s, G as x, h as w, i as g, r as M, v as y, s as V } from "./
|
|
2
|
-
import {
|
|
1
|
+
import { a as F, b as xn, c as zn, d as L, k as Un, e as Hn, g as jn, j as P, l as En, m as kn, n as yn, t as Jn, o as Nn, p as Kn, q as Zn, f as s, G as x, h as w, i as g, r as M, v as y, s as V } from "./e9f334a4.js";
|
|
2
|
+
import { aa as A, ab as Qn, ac as ne, ad as ee, ae as Ln, af as B, ag as _n, ah as re, ai as Cn, aj as J, ak as te, al as ie, am as K, an as ae, ao as In, ap as oe, aq as ue, ar as H } from "./816637dc.js";
|
|
3
3
|
var de = /\s/;
|
|
4
4
|
function fe(n) {
|
|
5
5
|
for (var e = n.length; e-- && de.test(n.charAt(e)); )
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
import { c as
|
|
3
|
-
import { i as
|
|
4
|
-
import { G as
|
|
5
|
-
import { o as
|
|
6
|
-
import { s as
|
|
7
|
-
import { c as
|
|
8
|
-
import "./
|
|
9
|
-
import "./
|
|
1
|
+
import { e as he, a0 as se, j as H, k as ye, l as S, H as Ee, D as we, m as De, q as ve } from "./816637dc.js";
|
|
2
|
+
import { c as Ne } from "./87065cc7.js";
|
|
3
|
+
import { i as ke, c as Ie, b as Oe, d as Te, a as ge, p as ze } from "./46b8527c.js";
|
|
4
|
+
import { G as Ce } from "./e9f334a4.js";
|
|
5
|
+
import { o as Ae } from "./92e85b65.js";
|
|
6
|
+
import { s as Re } from "./2ff7471d.js";
|
|
7
|
+
import { c as Be } from "./188d0a7b.js";
|
|
8
|
+
import "./5e5d535b.js";
|
|
9
|
+
import "./91e84a61.js";
|
|
10
10
|
import "./2ff2c7a6.js";
|
|
11
11
|
import "./428ebac9.js";
|
|
12
12
|
import "./f9637058.js";
|
|
@@ -132,20 +132,20 @@ var le, oe, ee = function() {
|
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
parse: function(o) {
|
|
135
|
-
var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1,
|
|
135
|
+
var s = this, i = [0], u = [], h = [null], t = [], m = this.table, r = "", R = 0, Y = 0, F = 2, C = 1, Le = t.slice.call(arguments, 1), w = Object.create(this.lexer), K = { yy: {} };
|
|
136
136
|
for (var Z in this.yy)
|
|
137
137
|
Object.prototype.hasOwnProperty.call(this.yy, Z) && (K.yy[Z] = this.yy[Z]);
|
|
138
138
|
w.setInput(o, K.yy), K.yy.lexer = w, K.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
|
|
139
139
|
var J = w.yylloc;
|
|
140
140
|
t.push(J);
|
|
141
|
-
var
|
|
141
|
+
var me = w.options && w.options.ranges;
|
|
142
142
|
typeof K.yy.parseError == "function" ? this.parseError = K.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
143
|
-
function
|
|
143
|
+
function _e() {
|
|
144
144
|
var P;
|
|
145
145
|
return P = u.pop() || w.lex() || C, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = s.symbols_[P] || P), P;
|
|
146
146
|
}
|
|
147
147
|
for (var I, M, z, Q, W = {}, X, B, ae, G; ; ) {
|
|
148
|
-
if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I =
|
|
148
|
+
if (M = i[i.length - 1], this.defaultActions[M] ? z = this.defaultActions[M] : ((I === null || typeof I > "u") && (I = _e()), z = m[M] && m[M][I]), typeof z > "u" || !z.length || !z[0]) {
|
|
149
149
|
var $ = "";
|
|
150
150
|
G = [];
|
|
151
151
|
for (X in m[M])
|
|
@@ -172,7 +172,7 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "
|
|
|
172
172
|
last_line: t[t.length - 1].last_line,
|
|
173
173
|
first_column: t[t.length - (B || 1)].first_column,
|
|
174
174
|
last_column: t[t.length - 1].last_column
|
|
175
|
-
},
|
|
175
|
+
}, me && (W._$.range = [
|
|
176
176
|
t[t.length - (B || 1)].range[0],
|
|
177
177
|
t[t.length - 1].range[1]
|
|
178
178
|
]), Q = this.performAction.apply(W, [
|
|
@@ -183,7 +183,7 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "
|
|
|
183
183
|
z[1],
|
|
184
184
|
h,
|
|
185
185
|
t
|
|
186
|
-
].concat(
|
|
186
|
+
].concat(Le)), typeof Q < "u")
|
|
187
187
|
return Q;
|
|
188
188
|
B && (i = i.slice(0, -1 * B * 2), h = h.slice(0, -1 * B), t = t.slice(0, -1 * B)), i.push(this.productions_[z[1]][0]), h.push(W.$), t.push(W._$), ae = m[i[i.length - 2]][i[i.length - 1]], i.push(ae);
|
|
189
189
|
break;
|
|
@@ -607,25 +607,25 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : $ = "
|
|
|
607
607
|
return k.prototype = L, L.Parser = k, new k();
|
|
608
608
|
}();
|
|
609
609
|
ee.parser = ee;
|
|
610
|
-
const
|
|
610
|
+
const Pe = ee;
|
|
611
611
|
let O = {}, ie = [], j = {};
|
|
612
|
-
const ce = "color", ue = "fill",
|
|
612
|
+
const ce = "color", ue = "fill", Fe = "bgFill", pe = ",", Ke = he();
|
|
613
613
|
let V = {};
|
|
614
|
-
const
|
|
614
|
+
const Me = (e) => De.sanitizeText(e, Ke), Ye = function(e, a = "") {
|
|
615
615
|
V[e] === void 0 && (V[e] = { id: e, styles: [], textStyles: [] });
|
|
616
616
|
const d = V[e];
|
|
617
|
-
a?.split(
|
|
617
|
+
a?.split(pe).forEach((c) => {
|
|
618
618
|
const n = c.replace(/([^;]*);/, "$1").trim();
|
|
619
619
|
if (c.match(ce)) {
|
|
620
|
-
const l = n.replace(ue,
|
|
620
|
+
const l = n.replace(ue, Fe).replace(ce, ue);
|
|
621
621
|
d.textStyles.push(l);
|
|
622
622
|
}
|
|
623
623
|
d.styles.push(n);
|
|
624
624
|
});
|
|
625
|
-
},
|
|
625
|
+
}, We = function(e, a = "") {
|
|
626
626
|
const d = O[e];
|
|
627
|
-
a != null && (d.styles = a.split(
|
|
628
|
-
},
|
|
627
|
+
a != null && (d.styles = a.split(pe));
|
|
628
|
+
}, je = function(e, a) {
|
|
629
629
|
e.split(",").forEach(function(d) {
|
|
630
630
|
let c = O[d];
|
|
631
631
|
if (c === void 0) {
|
|
@@ -634,19 +634,19 @@ const Fe = function(e, a = "") {
|
|
|
634
634
|
}
|
|
635
635
|
c.classes || (c.classes = []), c.classes.push(a);
|
|
636
636
|
});
|
|
637
|
-
},
|
|
637
|
+
}, fe = (e, a) => {
|
|
638
638
|
const d = e.flat(), c = [];
|
|
639
639
|
for (const n of d) {
|
|
640
|
-
if (n.type === "classDef") {
|
|
641
|
-
|
|
640
|
+
if (n.label && (n.label = Me(n.label)), n.type === "classDef") {
|
|
641
|
+
Ye(n.id, n.css);
|
|
642
642
|
continue;
|
|
643
643
|
}
|
|
644
644
|
if (n.type === "applyClass") {
|
|
645
|
-
|
|
645
|
+
je(n.id, n?.styleClass || "");
|
|
646
646
|
continue;
|
|
647
647
|
}
|
|
648
648
|
if (n.type === "applyStyles") {
|
|
649
|
-
n?.stylesStr &&
|
|
649
|
+
n?.stylesStr && We(n.id, n?.stylesStr);
|
|
650
650
|
continue;
|
|
651
651
|
}
|
|
652
652
|
if (n.type === "column-setting")
|
|
@@ -656,10 +656,10 @@ const Fe = function(e, a = "") {
|
|
|
656
656
|
else {
|
|
657
657
|
n.label || (n.type === "composite" ? n.label = "" : n.label = n.id);
|
|
658
658
|
const g = !O[n.id];
|
|
659
|
-
if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children &&
|
|
659
|
+
if (g ? O[n.id] = n : (n.type !== "na" && (O[n.id].type = n.type), n.label !== n.id && (O[n.id].label = n.label)), n.children && fe(n.children, n), n.type === "space") {
|
|
660
660
|
const l = n.width || 1;
|
|
661
661
|
for (let f = 0; f < l; f++) {
|
|
662
|
-
const b =
|
|
662
|
+
const b = Ne(n);
|
|
663
663
|
b.id = b.id + "-" + f, O[b.id] = b, c.push(b);
|
|
664
664
|
}
|
|
665
665
|
} else
|
|
@@ -669,10 +669,10 @@ const Fe = function(e, a = "") {
|
|
|
669
669
|
a.children = c;
|
|
670
670
|
};
|
|
671
671
|
let re = [], U = { id: "root", type: "composite", children: [], columns: -1 };
|
|
672
|
-
const
|
|
672
|
+
const Ve = () => {
|
|
673
673
|
S.debug("Clear called"), Ee(), U = { id: "root", type: "composite", children: [], columns: -1 }, O = { root: U }, re = [], V = {}, ie = [], j = {};
|
|
674
674
|
};
|
|
675
|
-
function
|
|
675
|
+
function Ue(e) {
|
|
676
676
|
switch (S.debug("typeStr2Type", e), e) {
|
|
677
677
|
case "[]":
|
|
678
678
|
return "square";
|
|
@@ -708,7 +708,7 @@ function We(e) {
|
|
|
708
708
|
return "na";
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function Xe(e) {
|
|
712
712
|
switch (S.debug("typeStr2Type", e), e) {
|
|
713
713
|
case "==":
|
|
714
714
|
return "thick";
|
|
@@ -716,7 +716,7 @@ function je(e) {
|
|
|
716
716
|
return "normal";
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Ge(e) {
|
|
720
720
|
switch (e.trim()) {
|
|
721
721
|
case "--x":
|
|
722
722
|
return "arrow_cross";
|
|
@@ -727,35 +727,35 @@ function Ve(e) {
|
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
let de = 0;
|
|
730
|
-
const
|
|
731
|
-
U.children = e,
|
|
732
|
-
},
|
|
730
|
+
const He = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + de), qe = (e) => {
|
|
731
|
+
U.children = e, fe(e, U), re = U.children;
|
|
732
|
+
}, Ze = (e) => {
|
|
733
733
|
const a = O[e];
|
|
734
734
|
return a ? a.columns ? a.columns : a.children ? a.children.length : -1 : -1;
|
|
735
|
-
},
|
|
735
|
+
}, Je = () => [...Object.values(O)], Qe = () => re || [], $e = () => ie, et = (e) => O[e], tt = (e) => {
|
|
736
736
|
O[e.id] = e;
|
|
737
|
-
},
|
|
737
|
+
}, st = () => console, it = function() {
|
|
738
738
|
return V;
|
|
739
|
-
},
|
|
739
|
+
}, rt = {
|
|
740
740
|
getConfig: () => se().block,
|
|
741
|
-
typeStr2Type:
|
|
742
|
-
edgeTypeStr2Type:
|
|
743
|
-
edgeStrToEdgeData:
|
|
744
|
-
getLogger:
|
|
745
|
-
getBlocksFlat:
|
|
746
|
-
getBlocks:
|
|
747
|
-
getEdges:
|
|
748
|
-
setHierarchy:
|
|
749
|
-
getBlock:
|
|
750
|
-
setBlock:
|
|
751
|
-
getColumns:
|
|
752
|
-
getClasses:
|
|
753
|
-
clear:
|
|
754
|
-
generateId:
|
|
755
|
-
},
|
|
756
|
-
const d =
|
|
741
|
+
typeStr2Type: Ue,
|
|
742
|
+
edgeTypeStr2Type: Xe,
|
|
743
|
+
edgeStrToEdgeData: Ge,
|
|
744
|
+
getLogger: st,
|
|
745
|
+
getBlocksFlat: Je,
|
|
746
|
+
getBlocks: Qe,
|
|
747
|
+
getEdges: $e,
|
|
748
|
+
setHierarchy: qe,
|
|
749
|
+
getBlock: et,
|
|
750
|
+
setBlock: tt,
|
|
751
|
+
getColumns: Ze,
|
|
752
|
+
getClasses: it,
|
|
753
|
+
clear: Ve,
|
|
754
|
+
generateId: He
|
|
755
|
+
}, nt = rt, q = (e, a) => {
|
|
756
|
+
const d = Be, c = d(e, "r"), n = d(e, "g"), g = d(e, "b");
|
|
757
757
|
return we(c, n, g, a);
|
|
758
|
-
},
|
|
758
|
+
}, at = (e) => `.label {
|
|
759
759
|
font-family: ${e.fontFamily};
|
|
760
760
|
color: ${e.nodeTextColor || e.textColor};
|
|
761
761
|
}
|
|
@@ -867,8 +867,8 @@ const Ue = () => (de++, "id-" + Math.random().toString(36).substr(2, 12) + "-" +
|
|
|
867
867
|
font-size: 18px;
|
|
868
868
|
fill: ${e.textColor};
|
|
869
869
|
}
|
|
870
|
-
`,
|
|
871
|
-
function
|
|
870
|
+
`, lt = at;
|
|
871
|
+
function be(e, a, d = !1) {
|
|
872
872
|
var c, n, g;
|
|
873
873
|
const l = e;
|
|
874
874
|
let f = "default";
|
|
@@ -935,7 +935,7 @@ function fe(e, a, d = !1) {
|
|
|
935
935
|
default:
|
|
936
936
|
p = "rect";
|
|
937
937
|
}
|
|
938
|
-
const y =
|
|
938
|
+
const y = ve(l?.styles || []), T = l.label, v = l.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
939
939
|
return {
|
|
940
940
|
labelStyle: y.labelStyle,
|
|
941
941
|
shape: p,
|
|
@@ -956,29 +956,29 @@ function fe(e, a, d = !1) {
|
|
|
956
956
|
padding: x ?? (((g = (n = se()) == null ? void 0 : n.block) == null ? void 0 : g.padding) || 0)
|
|
957
957
|
};
|
|
958
958
|
}
|
|
959
|
-
async function
|
|
960
|
-
const c =
|
|
959
|
+
async function ot(e, a, d) {
|
|
960
|
+
const c = be(a, d, !1);
|
|
961
961
|
if (c.type === "group")
|
|
962
962
|
return;
|
|
963
|
-
const n = await
|
|
963
|
+
const n = await ge(e, c), g = n.node().getBBox(), l = d.getBlock(c.id);
|
|
964
964
|
l.size = { width: g.width, height: g.height, x: 0, y: 0, node: n }, d.setBlock(l), n.remove();
|
|
965
965
|
}
|
|
966
|
-
async function
|
|
967
|
-
const c =
|
|
968
|
-
d.getBlock(c.id).type !== "space" && (await
|
|
966
|
+
async function ct(e, a, d) {
|
|
967
|
+
const c = be(a, d, !0);
|
|
968
|
+
d.getBlock(c.id).type !== "space" && (await ge(e, c), a.intersect = c?.intersect, ze(c));
|
|
969
969
|
}
|
|
970
970
|
async function ne(e, a, d, c) {
|
|
971
971
|
for (const n of a)
|
|
972
972
|
await c(e, n, d), n.children && await ne(e, n.children, d, c);
|
|
973
973
|
}
|
|
974
|
-
async function
|
|
975
|
-
await ne(e, a, d,
|
|
974
|
+
async function ut(e, a, d) {
|
|
975
|
+
await ne(e, a, d, ot);
|
|
976
976
|
}
|
|
977
|
-
async function
|
|
978
|
-
await ne(e, a, d,
|
|
977
|
+
async function dt(e, a, d) {
|
|
978
|
+
await ne(e, a, d, ct);
|
|
979
979
|
}
|
|
980
|
-
async function
|
|
981
|
-
const g = new
|
|
980
|
+
async function ht(e, a, d, c, n) {
|
|
981
|
+
const g = new Ce({
|
|
982
982
|
multigraph: !0,
|
|
983
983
|
compound: !0
|
|
984
984
|
});
|
|
@@ -1004,7 +1004,7 @@ async function ct(e, a, d, c, n) {
|
|
|
1004
1004
|
{ x: p.x + (x.x - p.x) / 2, y: p.y + (x.y - p.y) / 2 },
|
|
1005
1005
|
{ x: x.x, y: x.y }
|
|
1006
1006
|
];
|
|
1007
|
-
await
|
|
1007
|
+
await Ie(
|
|
1008
1008
|
e,
|
|
1009
1009
|
{ v: l.start, w: l.end, name: l.id },
|
|
1010
1010
|
{
|
|
@@ -1018,7 +1018,7 @@ async function ct(e, a, d, c, n) {
|
|
|
1018
1018
|
"block",
|
|
1019
1019
|
g,
|
|
1020
1020
|
n
|
|
1021
|
-
), l.label && (await
|
|
1021
|
+
), l.label && (await Oe(e, {
|
|
1022
1022
|
...l,
|
|
1023
1023
|
label: l.label,
|
|
1024
1024
|
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
@@ -1026,7 +1026,7 @@ async function ct(e, a, d, c, n) {
|
|
|
1026
1026
|
arrowTypeStart: l.arrowTypeStart,
|
|
1027
1027
|
points: y,
|
|
1028
1028
|
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
1029
|
-
}), await
|
|
1029
|
+
}), await Te(
|
|
1030
1030
|
{ ...l, x: y[1].x, y: y[1].y },
|
|
1031
1031
|
{
|
|
1032
1032
|
originalPath: y
|
|
@@ -1035,8 +1035,8 @@ async function ct(e, a, d, c, n) {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
|
-
const _ = ((oe = (le =
|
|
1039
|
-
function
|
|
1038
|
+
const _ = ((oe = (le = he()) == null ? void 0 : le.block) == null ? void 0 : oe.padding) || 8;
|
|
1039
|
+
function gt(e, a) {
|
|
1040
1040
|
if (e === 0 || !Number.isInteger(e))
|
|
1041
1041
|
throw new Error("Columns must be an integer !== 0.");
|
|
1042
1042
|
if (a < 0 || !Number.isInteger(a))
|
|
@@ -1048,7 +1048,7 @@ function ut(e, a) {
|
|
|
1048
1048
|
const d = a % e, c = Math.floor(a / e);
|
|
1049
1049
|
return { px: d, py: c };
|
|
1050
1050
|
}
|
|
1051
|
-
const
|
|
1051
|
+
const pt = (e) => {
|
|
1052
1052
|
let a = 0, d = 0;
|
|
1053
1053
|
for (const c of e.children) {
|
|
1054
1054
|
const { width: n, height: g, x: l, y: f } = c.size || { width: 0, height: 0, x: 0, y: 0 };
|
|
@@ -1088,7 +1088,7 @@ function te(e, a, d = 0, c = 0) {
|
|
|
1088
1088
|
if (((l = e.children) == null ? void 0 : l.length) > 0) {
|
|
1089
1089
|
for (const h of e.children)
|
|
1090
1090
|
te(h, a);
|
|
1091
|
-
const A =
|
|
1091
|
+
const A = pt(e);
|
|
1092
1092
|
E = A.width, L = A.height, S.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", E, L);
|
|
1093
1093
|
for (const h of e.children)
|
|
1094
1094
|
h.size && (S.debug(
|
|
@@ -1143,7 +1143,7 @@ function te(e, a, d = 0, c = 0) {
|
|
|
1143
1143
|
(N = e?.size) == null ? void 0 : N.height
|
|
1144
1144
|
);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function xe(e, a) {
|
|
1147
1147
|
var d, c, n, g, l, f, b, p, x, y, T, v, N, E, L, A, k;
|
|
1148
1148
|
S.debug(
|
|
1149
1149
|
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(d = e?.size) == null ? void 0 : d.x} y: ${(c = e?.size) == null ? void 0 : c.y} width: ${(n = e?.size) == null ? void 0 : n.width}`
|
|
@@ -1160,7 +1160,7 @@ function be(e, a) {
|
|
|
1160
1160
|
const m = e;
|
|
1161
1161
|
if (!t.size)
|
|
1162
1162
|
continue;
|
|
1163
|
-
const { width: r, height: R } = t.size, { px: Y, py: F } =
|
|
1163
|
+
const { width: r, height: R } = t.size, { px: Y, py: F } = gt(D, i);
|
|
1164
1164
|
if (F != h && (h = F, u = (y = e?.size) != null && y.x ? ((T = e?.size) == null ? void 0 : T.x) + (-((v = e?.size) == null ? void 0 : v.width) / 2 || 0) : -_, S.debug("New row in layout for block", e.id, " and child ", t.id, h)), S.debug(
|
|
1165
1165
|
`abc89 layout blocks (child) id: ${t.id} Pos: ${i} (px, py) ${Y},${F} (${(N = m?.size) == null ? void 0 : N.x},${(E = m?.size) == null ? void 0 : E.y}) parent: ${m.id} width: ${r}${_}`
|
|
1166
1166
|
), m.size) {
|
|
@@ -1171,59 +1171,59 @@ function be(e, a) {
|
|
|
1171
1171
|
`abc88 layout blocks (calc) px, pyid:${t.id}startingPosX${u}${_}${C}=>x:${t.size.x}y:${t.size.y}${t.widthInColumns}(width * (child?.w || 1)) / 2${r * (t?.widthInColumns || 1) / 2}`
|
|
1172
1172
|
);
|
|
1173
1173
|
}
|
|
1174
|
-
t.children &&
|
|
1174
|
+
t.children && xe(t), i += t?.widthInColumns || 1, S.debug("abc88 columnsPos", t, i);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
1177
|
S.debug(
|
|
1178
1178
|
`layout blocks (<==layoutBlocks) ${e.id} x: ${(L = e?.size) == null ? void 0 : L.x} y: ${(A = e?.size) == null ? void 0 : A.y} width: ${(k = e?.size) == null ? void 0 : k.width}`
|
|
1179
1179
|
);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Se(e, { minX: a, minY: d, maxX: c, maxY: n } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1182
1182
|
if (e.size && e.id !== "root") {
|
|
1183
1183
|
const { x: g, y: l, width: f, height: b } = e.size;
|
|
1184
1184
|
g - f / 2 < a && (a = g - f / 2), l - b / 2 < d && (d = l - b / 2), g + f / 2 > c && (c = g + f / 2), l + b / 2 > n && (n = l + b / 2);
|
|
1185
1185
|
}
|
|
1186
1186
|
if (e.children)
|
|
1187
1187
|
for (const g of e.children)
|
|
1188
|
-
({ minX: a, minY: d, maxX: c, maxY: n } =
|
|
1188
|
+
({ minX: a, minY: d, maxX: c, maxY: n } = Se(g, { minX: a, minY: d, maxX: c, maxY: n }));
|
|
1189
1189
|
return { minX: a, minY: d, maxX: c, maxY: n };
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function ft(e) {
|
|
1192
1192
|
const a = e.getBlock("root");
|
|
1193
1193
|
if (!a)
|
|
1194
1194
|
return;
|
|
1195
|
-
te(a, e, 0, 0),
|
|
1196
|
-
const { minX: d, minY: c, maxX: n, maxY: g } =
|
|
1195
|
+
te(a, e, 0, 0), xe(a), S.debug("getBlocks", JSON.stringify(a, null, 2));
|
|
1196
|
+
const { minX: d, minY: c, maxX: n, maxY: g } = Se(a), l = g - c, f = n - d;
|
|
1197
1197
|
return { x: d, y: c, width: f, height: l };
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const bt = function(e, a) {
|
|
1200
1200
|
return a.db.getClasses();
|
|
1201
|
-
},
|
|
1201
|
+
}, xt = async function(e, a, d, c) {
|
|
1202
1202
|
const { securityLevel: n, block: g } = se(), l = c.db;
|
|
1203
1203
|
let f;
|
|
1204
1204
|
n === "sandbox" && (f = H("#i" + a));
|
|
1205
1205
|
const b = n === "sandbox" ? H(f.nodes()[0].contentDocument.body) : H("body"), p = n === "sandbox" ? b.select(`[id="${a}"]`) : H(`[id="${a}"]`);
|
|
1206
|
-
|
|
1206
|
+
ke(p, ["point", "circle", "cross"], c.type, a);
|
|
1207
1207
|
const y = l.getBlocks(), T = l.getBlocksFlat(), v = l.getEdges(), N = p.insert("g").attr("class", "block");
|
|
1208
|
-
await
|
|
1209
|
-
const E =
|
|
1210
|
-
if (await
|
|
1208
|
+
await ut(N, y, l);
|
|
1209
|
+
const E = ft(l);
|
|
1210
|
+
if (await dt(N, y, l), await ht(N, v, T, l, a), E) {
|
|
1211
1211
|
const L = E, A = Math.max(1, Math.round(0.125 * (L.width / L.height))), k = L.height + A + 10, D = L.width + 10, { useMaxWidth: o } = g;
|
|
1212
1212
|
ye(p, k, D, !!o), S.debug("Here Bounds", E, L), p.attr(
|
|
1213
1213
|
"viewBox",
|
|
1214
1214
|
`${L.x - 5} ${L.y - 5} ${L.width + 10} ${L.height + 10}`
|
|
1215
1215
|
);
|
|
1216
1216
|
}
|
|
1217
|
-
|
|
1218
|
-
},
|
|
1219
|
-
draw:
|
|
1220
|
-
getClasses:
|
|
1221
|
-
},
|
|
1222
|
-
parser:
|
|
1223
|
-
db:
|
|
1224
|
-
renderer:
|
|
1225
|
-
styles:
|
|
1217
|
+
Ae(Re);
|
|
1218
|
+
}, St = {
|
|
1219
|
+
draw: xt,
|
|
1220
|
+
getClasses: bt
|
|
1221
|
+
}, Tt = {
|
|
1222
|
+
parser: Pe,
|
|
1223
|
+
db: nt,
|
|
1224
|
+
renderer: St,
|
|
1225
|
+
styles: lt
|
|
1226
1226
|
};
|
|
1227
1227
|
export {
|
|
1228
|
-
|
|
1228
|
+
Tt as diagram
|
|
1229
1229
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { as as o, o as i } from "./816637dc.js";
|
|
2
2
|
const l = (s, t) => {
|
|
3
3
|
const e = s.append("rect");
|
|
4
4
|
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
|