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
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function T(e) {
|
|
1
|
+
const c = Math.PI, x = 2 * c, u = 1e-6, m = x - u;
|
|
2
|
+
function E(e) {
|
|
4
3
|
this._ += e[0];
|
|
5
4
|
for (let t = 1, h = e.length; t < h; ++t)
|
|
6
5
|
this._ += arguments[t] + e[t];
|
|
7
6
|
}
|
|
8
|
-
function
|
|
7
|
+
function A(e) {
|
|
9
8
|
let t = Math.floor(e);
|
|
10
9
|
if (!(t >= 0))
|
|
11
10
|
throw new Error(`invalid digits: ${e}`);
|
|
12
11
|
if (t > 15)
|
|
13
|
-
return
|
|
14
|
-
const h =
|
|
12
|
+
return E;
|
|
13
|
+
const h = 10 ** t;
|
|
15
14
|
return function(i) {
|
|
16
15
|
this._ += i[0];
|
|
17
16
|
for (let s = 1, n = i.length; s < n; ++s)
|
|
18
17
|
this._ += Math.round(arguments[s] * h) / h + i[s];
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
class
|
|
20
|
+
class L {
|
|
22
21
|
constructor(t) {
|
|
23
22
|
this._x0 = this._y0 = // start of current subpath
|
|
24
|
-
this._x1 = this._y1 = null, this._ = "", this._append = t == null ?
|
|
23
|
+
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? E : A(t);
|
|
25
24
|
}
|
|
26
25
|
moveTo(t, h) {
|
|
27
26
|
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}`;
|
|
@@ -48,7 +47,7 @@ class P {
|
|
|
48
47
|
if (!(Math.abs(o * p - l * _) > u) || !n)
|
|
49
48
|
this._append`L${this._x1 = t},${this._y1 = h}`;
|
|
50
49
|
else {
|
|
51
|
-
let d = i - $, f = s - r, y = p * p + l * l,
|
|
50
|
+
let d = i - $, f = s - r, y = p * p + l * l, T = d * d + f * f, g = Math.sqrt(y), v = Math.sqrt(a), w = n * Math.tan((c - Math.acos((y + a - T) / (2 * g * v))) / 2), M = w / v, b = w / g;
|
|
52
51
|
Math.abs(M - 1) > u && this._append`L${t + M * _},${h + M * o}`, this._append`A${n},${n},0,0,${+(o * d > _ * f)},${this._x1 = t + b * p},${this._y1 = h + b * l}`;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -56,7 +55,7 @@ class P {
|
|
|
56
55
|
if (t = +t, h = +h, i = +i, $ = !!$, i < 0)
|
|
57
56
|
throw new Error(`negative radius: ${i}`);
|
|
58
57
|
let r = i * Math.cos(s), p = i * Math.sin(s), l = t + r, _ = h + p, o = 1 ^ $, a = $ ? s - n : n - s;
|
|
59
|
-
this._x1 === null ? this._append`M${l},${_}` : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append`L${l},${_}`, i && (a < 0 && (a = a % x + x), a >
|
|
58
|
+
this._x1 === null ? this._append`M${l},${_}` : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append`L${l},${_}`, i && (a < 0 && (a = a % x + x), a > m ? this._append`A${i},${i},0,1,${o},${t - r},${h - p}A${i},${i},0,1,${o},${this._x1 = l},${this._y1 = _}` : a > u && this._append`A${i},${i},0,${+(a >= c)},${o},${this._x1 = t + i * Math.cos(n)},${this._y1 = h + i * Math.sin(n)}`);
|
|
60
59
|
}
|
|
61
60
|
rect(t, h, i, s) {
|
|
62
61
|
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}h${i = +i}v${+s}h${-i}Z`;
|
|
@@ -65,12 +64,12 @@ class P {
|
|
|
65
64
|
return this._;
|
|
66
65
|
}
|
|
67
66
|
}
|
|
68
|
-
function
|
|
67
|
+
function P(e) {
|
|
69
68
|
return function() {
|
|
70
69
|
return e;
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
function
|
|
72
|
+
function q(e) {
|
|
74
73
|
let t = 3;
|
|
75
74
|
return e.digits = function(h) {
|
|
76
75
|
if (!arguments.length)
|
|
@@ -84,9 +83,9 @@ function R(e) {
|
|
|
84
83
|
t = i;
|
|
85
84
|
}
|
|
86
85
|
return e;
|
|
87
|
-
}, () => new
|
|
86
|
+
}, () => new L(t);
|
|
88
87
|
}
|
|
89
88
|
export {
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
P as c,
|
|
90
|
+
q as w
|
|
92
91
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { p as A, d as S, s as G } from "./
|
|
2
|
-
import { e as v, l as y, j as B, k as I, I as W, C as M, J as $ } from "./
|
|
3
|
-
import { G as J } from "./
|
|
4
|
-
import { l as O } from "./
|
|
5
|
-
import { l as P } from "./
|
|
1
|
+
import { p as A, d as S, s as G } from "./78321d1a.js";
|
|
2
|
+
import { e as v, l as y, j as B, k as I, I as W, C as M, J as $ } from "./40bee586.js";
|
|
3
|
+
import { G as J } from "./48ca2a1e.js";
|
|
4
|
+
import { l as O } from "./dbeb2d17.js";
|
|
5
|
+
import { l as P } from "./ca993649.js";
|
|
6
6
|
import "./2ff2c7a6.js";
|
|
7
|
-
import "./
|
|
7
|
+
import "./428ebac9.js";
|
|
8
8
|
let H = 0;
|
|
9
9
|
const X = function(i, a, t, o, p) {
|
|
10
10
|
const g = function(e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aK as I, aL as qe, aM as O, ah as y, ag as Te, aN as Xe, aO as Qe, aP as We, aQ as Ee, aR as G, ae as X, aS as Je, aT as Oe, aU as ze, aV as C, aW as R, an as $e, a8 as me, aX as Ve, aY as Z, aZ as ke, a_ as en, a$ as L, am as nn, b0 as rn, af as tn, b1 as re, b2 as sn, b3 as an, al as un, ak as we, ai as fn, b4 as B, ac as on, b5 as dn, ao as M, B as te, b6 as ie } from "./
|
|
1
|
+
import { aK as I, aL as qe, aM as O, ah as y, ag as Te, aN as Xe, aO as Qe, aP as We, aQ as Ee, aR as G, ae as X, aS as Je, aT as Oe, aU as ze, aV as C, aW as R, an as $e, a8 as me, aX as Ve, aY as Z, aZ as ke, a_ as en, a$ as L, am as nn, b0 as rn, af as tn, b1 as re, b2 as sn, b3 as an, al as un, ak as we, ai as fn, b4 as B, ac as on, b5 as dn, ao as M, B as te, b6 as ie } from "./40bee586.js";
|
|
2
2
|
var hn = "[object Symbol]";
|
|
3
3
|
function Q(e) {
|
|
4
4
|
return typeof e == "symbol" || I(e) && qe(e) == hn;
|
|
@@ -499,7 +499,7 @@ function Nt(e, n) {
|
|
|
499
499
|
}
|
|
500
500
|
function Ft(e) {
|
|
501
501
|
return function(n) {
|
|
502
|
-
return n
|
|
502
|
+
return n?.[e];
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
505
|
function Mt(e) {
|
package/5b2c9b5c.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { p as M, d as _, s as R } from "./78321d1a.js";
|
|
2
|
+
import { l as d, e as c, j as w, C as B, v as G, q as C, u as D, p as E, m as A } from "./40bee586.js";
|
|
3
|
+
import { G as q } from "./48ca2a1e.js";
|
|
4
|
+
import { r as z } from "./7e78c333.js";
|
|
5
|
+
import "./dbeb2d17.js";
|
|
6
|
+
import "./4407a5f9.js";
|
|
7
|
+
import "./c0405acc.js";
|
|
8
|
+
import "./8ae1f7a4.js";
|
|
9
|
+
import "./ca993649.js";
|
|
10
|
+
import "./2ff2c7a6.js";
|
|
11
|
+
import "./428ebac9.js";
|
|
12
|
+
const S = (s) => A.sanitizeText(s, c());
|
|
13
|
+
let k = {
|
|
14
|
+
dividerMargin: 10,
|
|
15
|
+
padding: 5,
|
|
16
|
+
textHeight: 10,
|
|
17
|
+
curve: void 0
|
|
18
|
+
};
|
|
19
|
+
const P = function(s, t, y, a) {
|
|
20
|
+
const e = Object.keys(s);
|
|
21
|
+
d.info("keys:", e), d.info(s), e.forEach(function(i) {
|
|
22
|
+
var o, r;
|
|
23
|
+
const l = s[i], p = {
|
|
24
|
+
shape: "rect",
|
|
25
|
+
id: l.id,
|
|
26
|
+
domId: l.domId,
|
|
27
|
+
labelText: S(l.id),
|
|
28
|
+
labelStyle: "",
|
|
29
|
+
style: "fill: none; stroke: black",
|
|
30
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
31
|
+
padding: ((o = c().flowchart) == null ? void 0 : o.padding) ?? ((r = c().class) == null ? void 0 : r.padding)
|
|
32
|
+
};
|
|
33
|
+
t.setNode(l.id, p), $(l.classes, t, y, a, l.id), d.info("setNode", p);
|
|
34
|
+
});
|
|
35
|
+
}, $ = function(s, t, y, a, e) {
|
|
36
|
+
const i = Object.keys(s);
|
|
37
|
+
d.info("keys:", i), d.info(s), i.filter((o) => s[o].parent == e).forEach(function(o) {
|
|
38
|
+
var r, l;
|
|
39
|
+
const n = s[o], p = n.cssClasses.join(" "), f = C(n.styles), h = n.label ?? n.id, b = 0, m = "class_box", u = {
|
|
40
|
+
labelStyle: f.labelStyle,
|
|
41
|
+
shape: m,
|
|
42
|
+
labelText: S(h),
|
|
43
|
+
classData: n,
|
|
44
|
+
rx: b,
|
|
45
|
+
ry: b,
|
|
46
|
+
class: p,
|
|
47
|
+
style: f.style,
|
|
48
|
+
id: n.id,
|
|
49
|
+
domId: n.domId,
|
|
50
|
+
tooltip: a.db.getTooltip(n.id, e) || "",
|
|
51
|
+
haveCallback: n.haveCallback,
|
|
52
|
+
link: n.link,
|
|
53
|
+
width: n.type === "group" ? 500 : void 0,
|
|
54
|
+
type: n.type,
|
|
55
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
56
|
+
padding: ((r = c().flowchart) == null ? void 0 : r.padding) ?? ((l = c().class) == null ? void 0 : l.padding)
|
|
57
|
+
};
|
|
58
|
+
t.setNode(n.id, u), e && t.setParent(n.id, e), d.info("setNode", u);
|
|
59
|
+
});
|
|
60
|
+
}, F = function(s, t, y, a) {
|
|
61
|
+
d.info(s), s.forEach(function(e, i) {
|
|
62
|
+
var o, r;
|
|
63
|
+
const l = e, n = "", p = { labelStyle: "", style: "" }, f = l.text, h = 0, b = "note", m = {
|
|
64
|
+
labelStyle: p.labelStyle,
|
|
65
|
+
shape: b,
|
|
66
|
+
labelText: S(f),
|
|
67
|
+
noteData: l,
|
|
68
|
+
rx: h,
|
|
69
|
+
ry: h,
|
|
70
|
+
class: n,
|
|
71
|
+
style: p.style,
|
|
72
|
+
id: l.id,
|
|
73
|
+
domId: l.id,
|
|
74
|
+
tooltip: "",
|
|
75
|
+
type: "note",
|
|
76
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
77
|
+
padding: ((o = c().flowchart) == null ? void 0 : o.padding) ?? ((r = c().class) == null ? void 0 : r.padding)
|
|
78
|
+
};
|
|
79
|
+
if (t.setNode(l.id, m), d.info("setNode", m), !l.class || !(l.class in a))
|
|
80
|
+
return;
|
|
81
|
+
const u = y + i, x = {
|
|
82
|
+
id: `edgeNote${u}`,
|
|
83
|
+
//Set relationship style and line type
|
|
84
|
+
classes: "relation",
|
|
85
|
+
pattern: "dotted",
|
|
86
|
+
// Set link type for rendering
|
|
87
|
+
arrowhead: "none",
|
|
88
|
+
//Set edge extra labels
|
|
89
|
+
startLabelRight: "",
|
|
90
|
+
endLabelLeft: "",
|
|
91
|
+
//Set relation arrow types
|
|
92
|
+
arrowTypeStart: "none",
|
|
93
|
+
arrowTypeEnd: "none",
|
|
94
|
+
style: "fill:none",
|
|
95
|
+
labelStyle: "",
|
|
96
|
+
curve: D(k.curve, E)
|
|
97
|
+
};
|
|
98
|
+
t.setEdge(l.id, l.class, x, u);
|
|
99
|
+
});
|
|
100
|
+
}, H = function(s, t) {
|
|
101
|
+
const y = c().flowchart;
|
|
102
|
+
let a = 0;
|
|
103
|
+
s.forEach(function(e) {
|
|
104
|
+
var i;
|
|
105
|
+
a++;
|
|
106
|
+
const o = {
|
|
107
|
+
//Set relationship style and line type
|
|
108
|
+
classes: "relation",
|
|
109
|
+
pattern: e.relation.lineType == 1 ? "dashed" : "solid",
|
|
110
|
+
id: `id_${e.id1}_${e.id2}_${a}`,
|
|
111
|
+
// Set link type for rendering
|
|
112
|
+
arrowhead: e.type === "arrow_open" ? "none" : "normal",
|
|
113
|
+
//Set edge extra labels
|
|
114
|
+
startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1,
|
|
115
|
+
endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2,
|
|
116
|
+
//Set relation arrow types
|
|
117
|
+
arrowTypeStart: N(e.relation.type1),
|
|
118
|
+
arrowTypeEnd: N(e.relation.type2),
|
|
119
|
+
style: "fill:none",
|
|
120
|
+
labelStyle: "",
|
|
121
|
+
curve: D(y?.curve, E)
|
|
122
|
+
};
|
|
123
|
+
if (d.info(o, e), e.style !== void 0) {
|
|
124
|
+
const r = C(e.style);
|
|
125
|
+
o.style = r.style, o.labelStyle = r.labelStyle;
|
|
126
|
+
}
|
|
127
|
+
e.text = e.title, e.text === void 0 ? e.style !== void 0 && (o.arrowheadStyle = "fill: #333") : (o.arrowheadStyle = "fill: #333", o.labelpos = "c", ((i = c().flowchart) == null ? void 0 : i.htmlLabels) ?? c().htmlLabels ? (o.labelType = "html", o.label = '<span class="edgeLabel">' + e.text + "</span>") : (o.labelType = "text", o.label = e.text.replace(A.lineBreakRegex, `
|
|
128
|
+
`), e.style === void 0 && (o.style = o.style || "stroke: #333; stroke-width: 1.5px;fill:none"), o.labelStyle = o.labelStyle.replace("color:", "fill:"))), t.setEdge(e.id1, e.id2, o, a);
|
|
129
|
+
});
|
|
130
|
+
}, V = function(s) {
|
|
131
|
+
k = {
|
|
132
|
+
...k,
|
|
133
|
+
...s
|
|
134
|
+
};
|
|
135
|
+
}, W = async function(s, t, y, a) {
|
|
136
|
+
d.info("Drawing class - ", t);
|
|
137
|
+
const e = c().flowchart ?? c().class, i = c().securityLevel;
|
|
138
|
+
d.info("config:", e);
|
|
139
|
+
const o = e?.nodeSpacing ?? 50, r = e?.rankSpacing ?? 50, l = new q({
|
|
140
|
+
multigraph: !0,
|
|
141
|
+
compound: !0
|
|
142
|
+
}).setGraph({
|
|
143
|
+
rankdir: a.db.getDirection(),
|
|
144
|
+
nodesep: o,
|
|
145
|
+
ranksep: r,
|
|
146
|
+
marginx: 8,
|
|
147
|
+
marginy: 8
|
|
148
|
+
}).setDefaultEdgeLabel(function() {
|
|
149
|
+
return {};
|
|
150
|
+
}), n = a.db.getNamespaces(), p = a.db.getClasses(), f = a.db.getRelations(), h = a.db.getNotes();
|
|
151
|
+
d.info(f), P(n, l, t, a), $(p, l, t, a), H(f, l), F(h, l, f.length + 1, p);
|
|
152
|
+
let b;
|
|
153
|
+
i === "sandbox" && (b = w("#i" + t));
|
|
154
|
+
const m = i === "sandbox" ? w(b.nodes()[0].contentDocument.body) : w("body"), u = m.select(`[id="${t}"]`), x = m.select("#" + t + " g");
|
|
155
|
+
if (await z(
|
|
156
|
+
x,
|
|
157
|
+
l,
|
|
158
|
+
["aggregation", "extension", "composition", "dependency", "lollipop"],
|
|
159
|
+
"classDiagram",
|
|
160
|
+
t
|
|
161
|
+
), B.insertTitle(u, "classTitleText", e?.titleTopMargin ?? 5, a.db.getDiagramTitle()), G(l, u, e?.diagramPadding, e?.useMaxWidth), !e?.htmlLabels) {
|
|
162
|
+
const T = i === "sandbox" ? b.nodes()[0].contentDocument : document, I = T.querySelectorAll('[id="' + t + '"] .edgeLabel .label');
|
|
163
|
+
for (const g of I) {
|
|
164
|
+
const L = g.getBBox(), v = T.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
165
|
+
v.setAttribute("rx", 0), v.setAttribute("ry", 0), v.setAttribute("width", L.width), v.setAttribute("height", L.height), g.insertBefore(v, g.firstChild);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
function N(s) {
|
|
170
|
+
let t;
|
|
171
|
+
switch (s) {
|
|
172
|
+
case 0:
|
|
173
|
+
t = "aggregation";
|
|
174
|
+
break;
|
|
175
|
+
case 1:
|
|
176
|
+
t = "extension";
|
|
177
|
+
break;
|
|
178
|
+
case 2:
|
|
179
|
+
t = "composition";
|
|
180
|
+
break;
|
|
181
|
+
case 3:
|
|
182
|
+
t = "dependency";
|
|
183
|
+
break;
|
|
184
|
+
case 4:
|
|
185
|
+
t = "lollipop";
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
t = "none";
|
|
189
|
+
}
|
|
190
|
+
return t;
|
|
191
|
+
}
|
|
192
|
+
const J = {
|
|
193
|
+
setConf: V,
|
|
194
|
+
draw: W
|
|
195
|
+
}, le = {
|
|
196
|
+
parser: M,
|
|
197
|
+
db: _,
|
|
198
|
+
renderer: J,
|
|
199
|
+
styles: R,
|
|
200
|
+
init: (s) => {
|
|
201
|
+
s.class || (s.class = {}), s.class.arrowMarkerAbsolute = s.arrowMarkerAbsolute, _.clear();
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
export {
|
|
205
|
+
le as diagram
|
|
206
|
+
};
|