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/afdeb8e9.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { p as J, d as B, s as Q, D as H, a as X, S as Z, b as F, c as I } from "./8ffe69e1.js";
|
|
2
|
+
import { G as tt } from "./48ca2a1e.js";
|
|
3
|
+
import { l as E, e as g, j as x, C as et, k as ot, m as w } from "./40bee586.js";
|
|
4
|
+
import { r as st } 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 h = "rect", C = "rectWithTitle", nt = "start", it = "end", ct = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = `${_}-${dt}`, U = "transition", St = "note", Tt = "note-edge", pt = `${U} ${Tt}`, _t = `${_}-${St}`, ut = "cluster", Dt = `${_}-${ut}`, bt = "cluster-alt", ft = `${_}-${bt}`, V = "parent", Y = "note", At = "state", N = "----", ht = `${N}${Y}`, M = `${N}${V}`, m = "fill:none", W = "fill: #333", z = "c", j = "text", q = "normal";
|
|
13
|
+
let y = {}, d = 0;
|
|
14
|
+
const yt = function(t) {
|
|
15
|
+
const n = Object.keys(t);
|
|
16
|
+
for (const e of n)
|
|
17
|
+
t[e];
|
|
18
|
+
}, gt = function(t, n) {
|
|
19
|
+
return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
|
|
20
|
+
};
|
|
21
|
+
function $t(t) {
|
|
22
|
+
return t == null ? "" : t.classes ? t.classes.join(" ") : "";
|
|
23
|
+
}
|
|
24
|
+
function R(t = "", n = 0, e = "", i = N) {
|
|
25
|
+
const c = e !== null && e.length > 0 ? `${i}${e}` : "";
|
|
26
|
+
return `${At}-${t}${c}-${n}`;
|
|
27
|
+
}
|
|
28
|
+
const A = (t, n, e, i, c, r) => {
|
|
29
|
+
const o = e.id, u = $t(i[o]);
|
|
30
|
+
if (o !== "root") {
|
|
31
|
+
let T = h;
|
|
32
|
+
e.start === !0 && (T = nt), e.start === !1 && (T = it), e.type !== H && (T = e.type), y[o] || (y[o] = {
|
|
33
|
+
id: o,
|
|
34
|
+
shape: T,
|
|
35
|
+
description: w.sanitizeText(o, g()),
|
|
36
|
+
classes: `${u} ${Et}`
|
|
37
|
+
});
|
|
38
|
+
const s = y[o];
|
|
39
|
+
e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [e.description] : s.description = [s.description, e.description]) : (s.shape = h, s.description = e.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && e.doc && (E.info("Setting cluster for ", o, G(e)), s.type = "group", s.dir = G(e), s.shape = e.type === X ? ct : rt, s.classes = s.classes + " " + Dt + " " + (r ? ft : ""));
|
|
40
|
+
const p = {
|
|
41
|
+
labelStyle: "",
|
|
42
|
+
shape: s.shape,
|
|
43
|
+
labelText: s.description,
|
|
44
|
+
// typeof newNode.description === 'object'
|
|
45
|
+
// ? newNode.description[0]
|
|
46
|
+
// : newNode.description,
|
|
47
|
+
classes: s.classes,
|
|
48
|
+
style: "",
|
|
49
|
+
//styles.style,
|
|
50
|
+
id: o,
|
|
51
|
+
dir: s.dir,
|
|
52
|
+
domId: R(o, d),
|
|
53
|
+
type: s.type,
|
|
54
|
+
padding: 15
|
|
55
|
+
//getConfig().flowchart.padding
|
|
56
|
+
};
|
|
57
|
+
if (p.centerLabel = !0, e.note) {
|
|
58
|
+
const l = {
|
|
59
|
+
labelStyle: "",
|
|
60
|
+
shape: lt,
|
|
61
|
+
labelText: e.note.text,
|
|
62
|
+
classes: _t,
|
|
63
|
+
// useHtmlLabels: false,
|
|
64
|
+
style: "",
|
|
65
|
+
// styles.style,
|
|
66
|
+
id: o + ht + "-" + d,
|
|
67
|
+
domId: R(o, d, Y),
|
|
68
|
+
type: s.type,
|
|
69
|
+
padding: 15
|
|
70
|
+
//getConfig().flowchart.padding
|
|
71
|
+
}, a = {
|
|
72
|
+
labelStyle: "",
|
|
73
|
+
shape: at,
|
|
74
|
+
labelText: e.note.text,
|
|
75
|
+
classes: s.classes,
|
|
76
|
+
style: "",
|
|
77
|
+
// styles.style,
|
|
78
|
+
id: o + M,
|
|
79
|
+
domId: R(o, d, V),
|
|
80
|
+
type: "group",
|
|
81
|
+
padding: 0
|
|
82
|
+
//getConfig().flowchart.padding
|
|
83
|
+
};
|
|
84
|
+
d++;
|
|
85
|
+
const D = o + M;
|
|
86
|
+
t.setNode(D, a), t.setNode(l.id, l), t.setNode(o, p), t.setParent(o, D), t.setParent(l.id, D);
|
|
87
|
+
let S = o, b = l.id;
|
|
88
|
+
e.note.position === "left of" && (S = l.id, b = o), t.setEdge(S, b, {
|
|
89
|
+
arrowhead: "none",
|
|
90
|
+
arrowType: "",
|
|
91
|
+
style: m,
|
|
92
|
+
labelStyle: "",
|
|
93
|
+
classes: pt,
|
|
94
|
+
arrowheadStyle: W,
|
|
95
|
+
labelpos: z,
|
|
96
|
+
labelType: j,
|
|
97
|
+
thickness: q
|
|
98
|
+
});
|
|
99
|
+
} else
|
|
100
|
+
t.setNode(o, p);
|
|
101
|
+
}
|
|
102
|
+
n && n.id !== "root" && (E.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (E.trace("Adding nodes children "), xt(t, e, e.doc, i, c, !r));
|
|
103
|
+
}, xt = (t, n, e, i, c, r) => {
|
|
104
|
+
E.trace("items", e), e.forEach((o) => {
|
|
105
|
+
switch (o.stmt) {
|
|
106
|
+
case F:
|
|
107
|
+
A(t, n, o, i, c, r);
|
|
108
|
+
break;
|
|
109
|
+
case H:
|
|
110
|
+
A(t, n, o, i, c, r);
|
|
111
|
+
break;
|
|
112
|
+
case Z:
|
|
113
|
+
{
|
|
114
|
+
A(t, n, o.state1, i, c, r), A(t, n, o.state2, i, c, r);
|
|
115
|
+
const u = {
|
|
116
|
+
id: "edge" + d,
|
|
117
|
+
arrowhead: "normal",
|
|
118
|
+
arrowTypeEnd: "arrow_barb",
|
|
119
|
+
style: m,
|
|
120
|
+
labelStyle: "",
|
|
121
|
+
label: w.sanitizeText(o.description, g()),
|
|
122
|
+
arrowheadStyle: W,
|
|
123
|
+
labelpos: z,
|
|
124
|
+
labelType: j,
|
|
125
|
+
thickness: q,
|
|
126
|
+
classes: U
|
|
127
|
+
};
|
|
128
|
+
t.setEdge(o.state1.id, o.state2.id, u, d), d++;
|
|
129
|
+
}
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}, G = (t, n = I) => {
|
|
134
|
+
let e = n;
|
|
135
|
+
if (t.doc)
|
|
136
|
+
for (let i = 0; i < t.doc.length; i++) {
|
|
137
|
+
const c = t.doc[i];
|
|
138
|
+
c.stmt === "dir" && (e = c.value);
|
|
139
|
+
}
|
|
140
|
+
return e;
|
|
141
|
+
}, Ct = async function(t, n, e, i) {
|
|
142
|
+
E.info("Drawing state diagram (v2)", n), y = {}, i.db.getDirection();
|
|
143
|
+
const { securityLevel: c, state: r } = g(), o = r.nodeSpacing || 50, u = r.rankSpacing || 50;
|
|
144
|
+
E.info(i.db.getRootDocV2()), i.db.extract(i.db.getRootDocV2()), E.info(i.db.getRootDocV2());
|
|
145
|
+
const T = i.db.getStates(), s = new tt({
|
|
146
|
+
multigraph: !0,
|
|
147
|
+
compound: !0
|
|
148
|
+
}).setGraph({
|
|
149
|
+
rankdir: G(i.db.getRootDocV2()),
|
|
150
|
+
nodesep: o,
|
|
151
|
+
ranksep: u,
|
|
152
|
+
marginx: 8,
|
|
153
|
+
marginy: 8
|
|
154
|
+
}).setDefaultEdgeLabel(function() {
|
|
155
|
+
return {};
|
|
156
|
+
});
|
|
157
|
+
A(s, void 0, i.db.getRootDocV2(), T, i.db, !0);
|
|
158
|
+
let p;
|
|
159
|
+
c === "sandbox" && (p = x("#i" + n));
|
|
160
|
+
const l = c === "sandbox" ? x(p.nodes()[0].contentDocument.body) : x("body"), a = l.select(`[id="${n}"]`), D = l.select("#" + n + " g");
|
|
161
|
+
await st(D, s, ["barb"], _, n);
|
|
162
|
+
const S = 8;
|
|
163
|
+
et.insertTitle(a, "statediagramTitleText", r.titleTopMargin, i.db.getDiagramTitle());
|
|
164
|
+
const b = a.node().getBBox(), L = b.width + S * 2, P = b.height + S * 2;
|
|
165
|
+
a.attr("class", _);
|
|
166
|
+
const O = a.node().getBBox();
|
|
167
|
+
ot(a, P, L, r.useMaxWidth);
|
|
168
|
+
const k = `${O.x - S} ${O.y - S} ${L} ${P}`;
|
|
169
|
+
E.debug(`viewBox ${k}`), a.attr("viewBox", k);
|
|
170
|
+
const K = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
|
|
171
|
+
for (const $ of K) {
|
|
172
|
+
const v = $.getBBox(), f = document.createElementNS("http://www.w3.org/2000/svg", h);
|
|
173
|
+
f.setAttribute("rx", 0), f.setAttribute("ry", 0), f.setAttribute("width", v.width), f.setAttribute("height", v.height), $.insertBefore(f, $.firstChild);
|
|
174
|
+
}
|
|
175
|
+
}, Rt = {
|
|
176
|
+
setConf: yt,
|
|
177
|
+
getClasses: gt,
|
|
178
|
+
draw: Ct
|
|
179
|
+
}, Ut = {
|
|
180
|
+
parser: J,
|
|
181
|
+
db: B,
|
|
182
|
+
renderer: Rt,
|
|
183
|
+
styles: Q,
|
|
184
|
+
init: (t) => {
|
|
185
|
+
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, B.clear();
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
Ut as diagram
|
|
190
|
+
};
|