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.
Files changed (56) hide show
  1. package/{83f8a9bc.js → 2085da13.js} +1 -1
  2. package/250691b5.js +5 -0
  3. package/274f545c.js +881 -0
  4. package/{991b6314.js → 289305a1.js} +45 -43
  5. package/{6e6c38ae.js → 2eae45c2.js} +1 -1
  6. package/2ff7471d.js +9 -0
  7. package/{d16a79d9.js → 335b22a2.js} +12 -10
  8. package/{e30d5d4a.js → 38c826fe.js} +158 -147
  9. package/{ca35eaa7.js → 44011c1d.js} +286 -293
  10. package/4fc06812.js +64 -0
  11. package/{e7309c57.js → 56a787cf.js} +2 -2
  12. package/590941ff.js +86 -0
  13. package/{a607b479.js → 6341867f.js} +27 -27
  14. package/657fd065.js +8 -0
  15. package/{daee88f9.js → 78a5e50d.js} +133 -132
  16. package/820c3641.js +25 -0
  17. package/{70705fc3.js → 88b4e75a.js} +2 -1
  18. package/8d999722.js +1102 -0
  19. package/{65ab329e.js → 989caea2.js} +148 -145
  20. package/99b984d1.js +237 -0
  21. package/9e5f02d6.js +19104 -0
  22. package/a40faea7.js +11624 -0
  23. package/abac9104.js +1536 -0
  24. package/af2f19b3.js +819 -0
  25. package/{3544d11b.js → af5ee3de.js} +13 -12
  26. package/b24707c2.js +48428 -0
  27. package/b68f8b69.js +1276 -0
  28. package/ba68ba65.js +391 -0
  29. package/{796a2b34.js → bafb8599.js} +1 -1
  30. package/{0d26e631.js → bba60c35.js} +548 -548
  31. package/bd7c2a8e.js +1089 -0
  32. package/c71dadea.js +455 -0
  33. package/{8d8803ff.js → d05c1762.js} +25 -24
  34. package/{5edf1d55.js → d073ab24.js} +32557 -34230
  35. package/{11bb676b.js → d838cd10.js} +6 -5
  36. package/{cea82f05.js → dc36a6eb.js} +11 -11
  37. package/{e1a5f037.js → ed143450.js} +18 -18
  38. package/ee8ec8f2.js +2284 -0
  39. package/f6755210.js +1269 -0
  40. package/{560f788e.js → fba4c8e4.js} +18 -18
  41. package/index.js +2 -2
  42. package/package.json +11 -9
  43. package/31a2d08c.js +0 -365
  44. package/49315e81.js +0 -64
  45. package/55e01450.js +0 -46724
  46. package/63aaeeb8.js +0 -1055
  47. package/685b5f6c.js +0 -1235
  48. package/77072d20.js +0 -22
  49. package/919ae09a.js +0 -1000
  50. package/a0a687f6.js +0 -235
  51. package/a664ee52.js +0 -2192
  52. package/b8dbed32.js +0 -448
  53. package/d9708225.js +0 -86
  54. package/eca15e1d.js +0 -2396
  55. package/f3f6fcfc.js +0 -18798
  56. package/f45254b8.js +0 -786
package/99b984d1.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 "./bd7c2a8e.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 "./d073ab24.js";
30
+ import { G as X } from "./274f545c.js";
31
+ import { r as Y } from "./ba68ba65.js";
32
+ import "./abac9104.js";
33
+ import "./657fd065.js";
34
+ import "./8d999722.js";
35
+ import "./88b4e75a.js";
36
+ import "./2eae45c2.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
+ };