lowcoder-comps 0.0.26 → 0.0.28
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/000297fb.js +5 -0
- package/{92fb34a2.js → 0205ce17.js} +27 -27
- package/{3f63d12d.js → 1269154d.js} +32711 -34763
- package/{6fbc4c21.js → 1f088099.js} +18 -18
- package/{2b3b3386.js → 2ae47d58.js} +548 -548
- package/2ff7471d.js +9 -0
- package/{44cd1a62.js → 42b75267.js} +11 -11
- package/{ed8c376c.js → 45a7c119.js} +286 -293
- package/4bc5ef7f.js +881 -0
- package/{90d3581f.js → 4c822e6b.js} +133 -132
- package/5bb002c8.js +64 -0
- package/{82c8e71b.js → 6517e88b.js} +12 -10
- package/65d3daa9.js +391 -0
- package/{87b4699c.js → 6909d829.js} +1 -1
- package/{b28dda80.js → 711961f8.js} +13 -12
- package/77491f00.js +86 -0
- package/7805c934.js +455 -0
- package/7dc7ce37.js +19104 -0
- package/{c3caea77.js → 83feec48.js} +45 -43
- package/{c66d9114.js → 8c8fb30b.js} +25 -24
- package/{3220cb2e.js → 945d7302.js} +2 -1
- package/{4891fa68.js → 9a9b397d.js} +6 -5
- package/{3ebbaeae.js → a2d32dbb.js} +18 -18
- package/{2c0287e1.js → a39d3869.js} +2 -2
- package/a40faea7.js +11624 -0
- package/b7bda09a.js +237 -0
- package/{5f138044.js → b99f5b2a.js} +158 -147
- package/bcc07d29.js +1536 -0
- package/c2bf7d82.js +819 -0
- package/c4bd6ed7.js +1269 -0
- package/c4c5f13b.js +8 -0
- package/d2bae1f4.js +2284 -0
- package/d4b9d281.js +1089 -0
- package/{11b36d97.js → d4ba48b2.js} +148 -145
- package/dd0ec77a.js +48428 -0
- package/{c889073f.js → e0bacb89.js} +1 -1
- package/{b70abaaf.js → e437d53e.js} +1 -1
- package/e95fa522.js +1102 -0
- package/ed46c11a.js +1276 -0
- package/f2b8cbc8.js +25 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/33035c6f.js +0 -86
- package/3f82489c.js +0 -2396
- package/454ca826.js +0 -46724
- package/4938ecf8.js +0 -22
- package/558b96ef.js +0 -18798
- package/596b7f71.js +0 -365
- package/637a168a.js +0 -235
- package/765a2a38.js +0 -1055
- package/8ed940ee.js +0 -786
- package/9c1ceb2f.js +0 -448
- package/aad4f2fa.js +0 -1235
- package/b053e17f.js +0 -1000
- package/bed24264.js +0 -2192
- package/d3478475.js +0 -64
package/b7bda09a.js
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
var H = Object.defineProperty;
|
|
2
|
+
var C = Object.getOwnPropertySymbols;
|
|
3
|
+
var V = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var $ = (l, e, n) => e in l ? H(l, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[e] = n, k = (l, e) => {
|
|
5
|
+
for (var n in e || (e = {}))
|
|
6
|
+
V.call(e, n) && $(l, n, e[n]);
|
|
7
|
+
if (C)
|
|
8
|
+
for (var n of C(e))
|
|
9
|
+
W.call(e, n) && $(l, n, e[n]);
|
|
10
|
+
return l;
|
|
11
|
+
};
|
|
12
|
+
var I = (l, e, n) => new Promise((i, t) => {
|
|
13
|
+
var c = (o) => {
|
|
14
|
+
try {
|
|
15
|
+
r(n.next(o));
|
|
16
|
+
} catch (a) {
|
|
17
|
+
t(a);
|
|
18
|
+
}
|
|
19
|
+
}, s = (o) => {
|
|
20
|
+
try {
|
|
21
|
+
r(n.throw(o));
|
|
22
|
+
} catch (a) {
|
|
23
|
+
t(a);
|
|
24
|
+
}
|
|
25
|
+
}, r = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(c, s);
|
|
26
|
+
r((n = n.apply(l, e)).next());
|
|
27
|
+
});
|
|
28
|
+
import { p as J, d as M, s as K } from "./d4b9d281.js";
|
|
29
|
+
import { l as p, c as d, h as S, A as Q, t as U, o as B, q as G, n as q, j as z } from "./1269154d.js";
|
|
30
|
+
import { G as X } from "./4bc5ef7f.js";
|
|
31
|
+
import { r as Y } from "./65d3daa9.js";
|
|
32
|
+
import "./bcc07d29.js";
|
|
33
|
+
import "./c4c5f13b.js";
|
|
34
|
+
import "./e95fa522.js";
|
|
35
|
+
import "./945d7302.js";
|
|
36
|
+
import "./e437d53e.js";
|
|
37
|
+
import "./2ff2c7a6.js";
|
|
38
|
+
import "./256b619e.js";
|
|
39
|
+
const L = (l) => z.sanitizeText(l, d());
|
|
40
|
+
let T = {
|
|
41
|
+
dividerMargin: 10,
|
|
42
|
+
padding: 5,
|
|
43
|
+
textHeight: 10,
|
|
44
|
+
curve: void 0
|
|
45
|
+
};
|
|
46
|
+
const Z = function(l, e, n, i) {
|
|
47
|
+
const t = Object.keys(l);
|
|
48
|
+
p.info("keys:", t), p.info(l), t.forEach(function(c) {
|
|
49
|
+
var y;
|
|
50
|
+
var s, r;
|
|
51
|
+
const o = l[c], f = {
|
|
52
|
+
shape: "rect",
|
|
53
|
+
id: o.id,
|
|
54
|
+
domId: o.domId,
|
|
55
|
+
labelText: L(o.id),
|
|
56
|
+
labelStyle: "",
|
|
57
|
+
style: "fill: none; stroke: black",
|
|
58
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
59
|
+
padding: (y = (s = d().flowchart) == null ? void 0 : s.padding) != null ? y : (r = d().class) == null ? void 0 : r.padding
|
|
60
|
+
};
|
|
61
|
+
e.setNode(o.id, f), P(o.classes, e, n, i, o.id), p.info("setNode", f);
|
|
62
|
+
});
|
|
63
|
+
}, P = function(l, e, n, i, t) {
|
|
64
|
+
const c = Object.keys(l);
|
|
65
|
+
p.info("keys:", c), p.info(l), c.filter((s) => l[s].parent == t).forEach(function(s) {
|
|
66
|
+
var x, m;
|
|
67
|
+
var r, o;
|
|
68
|
+
const a = l[s], f = a.cssClasses.join(" "), y = B(a.styles), v = (x = a.label) != null ? x : a.id, b = 0, h = "class_box", u = {
|
|
69
|
+
labelStyle: y.labelStyle,
|
|
70
|
+
shape: h,
|
|
71
|
+
labelText: L(v),
|
|
72
|
+
classData: a,
|
|
73
|
+
rx: b,
|
|
74
|
+
ry: b,
|
|
75
|
+
class: f,
|
|
76
|
+
style: y.style,
|
|
77
|
+
id: a.id,
|
|
78
|
+
domId: a.domId,
|
|
79
|
+
tooltip: i.db.getTooltip(a.id, t) || "",
|
|
80
|
+
haveCallback: a.haveCallback,
|
|
81
|
+
link: a.link,
|
|
82
|
+
width: a.type === "group" ? 500 : void 0,
|
|
83
|
+
type: a.type,
|
|
84
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
85
|
+
padding: (m = (r = d().flowchart) == null ? void 0 : r.padding) != null ? m : (o = d().class) == null ? void 0 : o.padding
|
|
86
|
+
};
|
|
87
|
+
e.setNode(a.id, u), t && e.setParent(a.id, t), p.info("setNode", u);
|
|
88
|
+
});
|
|
89
|
+
}, j = function(l, e, n, i) {
|
|
90
|
+
p.info(l), l.forEach(function(t, c) {
|
|
91
|
+
var m;
|
|
92
|
+
var s, r;
|
|
93
|
+
const o = t, a = "", f = { labelStyle: "", style: "" }, y = o.text, v = 0, b = "note", h = {
|
|
94
|
+
labelStyle: f.labelStyle,
|
|
95
|
+
shape: b,
|
|
96
|
+
labelText: L(y),
|
|
97
|
+
noteData: o,
|
|
98
|
+
rx: v,
|
|
99
|
+
ry: v,
|
|
100
|
+
class: a,
|
|
101
|
+
style: f.style,
|
|
102
|
+
id: o.id,
|
|
103
|
+
domId: o.id,
|
|
104
|
+
tooltip: "",
|
|
105
|
+
type: "note",
|
|
106
|
+
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
107
|
+
padding: (m = (s = d().flowchart) == null ? void 0 : s.padding) != null ? m : (r = d().class) == null ? void 0 : r.padding
|
|
108
|
+
};
|
|
109
|
+
if (e.setNode(o.id, h), p.info("setNode", h), !o.class || !(o.class in i))
|
|
110
|
+
return;
|
|
111
|
+
const u = n + c, x = {
|
|
112
|
+
id: `edgeNote${u}`,
|
|
113
|
+
//Set relationship style and line type
|
|
114
|
+
classes: "relation",
|
|
115
|
+
pattern: "dotted",
|
|
116
|
+
// Set link type for rendering
|
|
117
|
+
arrowhead: "none",
|
|
118
|
+
//Set edge extra labels
|
|
119
|
+
startLabelRight: "",
|
|
120
|
+
endLabelLeft: "",
|
|
121
|
+
//Set relation arrow types
|
|
122
|
+
arrowTypeStart: "none",
|
|
123
|
+
arrowTypeEnd: "none",
|
|
124
|
+
style: "fill:none",
|
|
125
|
+
labelStyle: "",
|
|
126
|
+
curve: G(T.curve, q)
|
|
127
|
+
};
|
|
128
|
+
e.setEdge(o.id, o.class, x, u);
|
|
129
|
+
});
|
|
130
|
+
}, O = function(l, e) {
|
|
131
|
+
const n = d().flowchart;
|
|
132
|
+
let i = 0;
|
|
133
|
+
l.forEach(function(t) {
|
|
134
|
+
var r;
|
|
135
|
+
var c;
|
|
136
|
+
i++;
|
|
137
|
+
const s = {
|
|
138
|
+
//Set relationship style and line type
|
|
139
|
+
classes: "relation",
|
|
140
|
+
pattern: t.relation.lineType == 1 ? "dashed" : "solid",
|
|
141
|
+
id: `id_${t.id1}_${t.id2}_${i}`,
|
|
142
|
+
// Set link type for rendering
|
|
143
|
+
arrowhead: t.type === "arrow_open" ? "none" : "normal",
|
|
144
|
+
//Set edge extra labels
|
|
145
|
+
startLabelRight: t.relationTitle1 === "none" ? "" : t.relationTitle1,
|
|
146
|
+
endLabelLeft: t.relationTitle2 === "none" ? "" : t.relationTitle2,
|
|
147
|
+
//Set relation arrow types
|
|
148
|
+
arrowTypeStart: R(t.relation.type1),
|
|
149
|
+
arrowTypeEnd: R(t.relation.type2),
|
|
150
|
+
style: "fill:none",
|
|
151
|
+
labelStyle: "",
|
|
152
|
+
curve: G(n == null ? void 0 : n.curve, q)
|
|
153
|
+
};
|
|
154
|
+
if (p.info(s, t), t.style !== void 0) {
|
|
155
|
+
const o = B(t.style);
|
|
156
|
+
s.style = o.style, s.labelStyle = o.labelStyle;
|
|
157
|
+
}
|
|
158
|
+
t.text = t.title, t.text === void 0 ? t.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((r = (c = d().flowchart) == null ? void 0 : c.htmlLabels) != null ? r : d().htmlLabels) ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + t.text + "</span>") : (s.labelType = "text", s.label = t.text.replace(z.lineBreakRegex, `
|
|
159
|
+
`), t.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), e.setEdge(t.id1, t.id2, s, i);
|
|
160
|
+
});
|
|
161
|
+
}, tt = function(l) {
|
|
162
|
+
T = k(k({}, T), l);
|
|
163
|
+
}, et = function(l, e, n, i) {
|
|
164
|
+
return I(this, null, function* () {
|
|
165
|
+
var m, _, N, D;
|
|
166
|
+
p.info("Drawing class - ", e);
|
|
167
|
+
const t = (m = d().flowchart) != null ? m : d().class, c = d().securityLevel;
|
|
168
|
+
p.info("config:", t);
|
|
169
|
+
const s = (_ = t == null ? void 0 : t.nodeSpacing) != null ? _ : 50, r = (N = t == null ? void 0 : t.rankSpacing) != null ? N : 50, o = new X({
|
|
170
|
+
multigraph: !0,
|
|
171
|
+
compound: !0
|
|
172
|
+
}).setGraph({
|
|
173
|
+
rankdir: i.db.getDirection(),
|
|
174
|
+
nodesep: s,
|
|
175
|
+
ranksep: r,
|
|
176
|
+
marginx: 8,
|
|
177
|
+
marginy: 8
|
|
178
|
+
}).setDefaultEdgeLabel(function() {
|
|
179
|
+
return {};
|
|
180
|
+
}), a = i.db.getNamespaces(), f = i.db.getClasses(), y = i.db.getRelations(), v = i.db.getNotes();
|
|
181
|
+
p.info(y), Z(a, o, e, i), P(f, o, e, i), O(y, o), j(v, o, y.length + 1, f);
|
|
182
|
+
let b;
|
|
183
|
+
c === "sandbox" && (b = S("#i" + e));
|
|
184
|
+
const h = c === "sandbox" ? S(b.nodes()[0].contentDocument.body) : S("body"), u = h.select(`[id="${e}"]`), x = h.select("#" + e + " g");
|
|
185
|
+
if (yield Y(
|
|
186
|
+
x,
|
|
187
|
+
o,
|
|
188
|
+
["aggregation", "extension", "composition", "dependency", "lollipop"],
|
|
189
|
+
"classDiagram",
|
|
190
|
+
e
|
|
191
|
+
), Q.insertTitle(u, "classTitleText", (D = t == null ? void 0 : t.titleTopMargin) != null ? D : 5, i.db.getDiagramTitle()), U(o, u, t == null ? void 0 : t.diagramPadding, t == null ? void 0 : t.useMaxWidth), !(t != null && t.htmlLabels)) {
|
|
192
|
+
const E = c === "sandbox" ? b.nodes()[0].contentDocument : document, F = E.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
|
193
|
+
for (const w of F) {
|
|
194
|
+
const A = w.getBBox(), g = E.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
195
|
+
g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", A.width), g.setAttribute("height", A.height), w.insertBefore(g, w.firstChild);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
};
|
|
200
|
+
function R(l) {
|
|
201
|
+
let e;
|
|
202
|
+
switch (l) {
|
|
203
|
+
case 0:
|
|
204
|
+
e = "aggregation";
|
|
205
|
+
break;
|
|
206
|
+
case 1:
|
|
207
|
+
e = "extension";
|
|
208
|
+
break;
|
|
209
|
+
case 2:
|
|
210
|
+
e = "composition";
|
|
211
|
+
break;
|
|
212
|
+
case 3:
|
|
213
|
+
e = "dependency";
|
|
214
|
+
break;
|
|
215
|
+
case 4:
|
|
216
|
+
e = "lollipop";
|
|
217
|
+
break;
|
|
218
|
+
default:
|
|
219
|
+
e = "none";
|
|
220
|
+
}
|
|
221
|
+
return e;
|
|
222
|
+
}
|
|
223
|
+
const ot = {
|
|
224
|
+
setConf: tt,
|
|
225
|
+
draw: et
|
|
226
|
+
}, ut = {
|
|
227
|
+
parser: J,
|
|
228
|
+
db: M,
|
|
229
|
+
renderer: ot,
|
|
230
|
+
styles: K,
|
|
231
|
+
init: (l) => {
|
|
232
|
+
l.class || (l.class = {}), l.class.arrowMarkerAbsolute = l.arrowMarkerAbsolute, M.clear();
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
export {
|
|
236
|
+
ut as diagram
|
|
237
|
+
};
|