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.
Files changed (51) hide show
  1. package/{fc3b7856.js → 1043ea14.js} +247 -258
  2. package/{52a11357.js → 14530b4e.js} +5 -5
  3. package/{029476f8.js → 145794bd.js} +4 -4
  4. package/248f3eba.js +797 -0
  5. package/{e6f7d4a7.js → 28364e9c.js} +411 -451
  6. package/{a3820fc3.js → 38ec0f55.js} +3 -3
  7. package/{6296008d.js → 40bee586.js} +55069 -55754
  8. package/{256b619e.js → 428ebac9.js} +14 -15
  9. package/{21e8a932.js → 4407a5f9.js} +1 -1
  10. package/{286121b3.js → 474d7e5f.js} +6 -6
  11. package/{32d11caf.js → 48ca2a1e.js} +2 -2
  12. package/5b2c9b5c.js +206 -0
  13. package/{b42bc0a6.js → 633f4ede.js} +919 -969
  14. package/{35b2542e.js → 668d3da2.js} +1 -1
  15. package/{005a58c0.js → 78321d1a.js} +4 -4
  16. package/{2ea4f729.js → 7c479abc.js} +8 -8
  17. package/{09ab5d81.js → 7c7200e7.js} +7 -7
  18. package/{d42741f5.js → 7e6d090c.js} +1067 -1085
  19. package/7e78c333.js +373 -0
  20. package/{abadf1f6.js → 88415712.js} +140 -141
  21. package/{43254cb0.js → 8ae1f7a4.js} +4 -5
  22. package/{af28f5d5.js → 8e6be41e.js} +4 -4
  23. package/{a73a7fb8.js → 8ffe69e1.js} +6 -6
  24. package/{14a0be5d.js → 9afbfdff.js} +1 -1
  25. package/{25f232c1.js → a8987699.js} +6 -6
  26. package/afdeb8e9.js +190 -0
  27. package/c0405acc.js +1083 -0
  28. package/{08ea4a8f.js → ca993649.js} +2 -2
  29. package/{bf684fc8.js → cc8ba9a3.js} +12713 -12735
  30. package/{bcd4bce3.js → d27497a0.js} +18 -18
  31. package/{c69763fa.js → dbeb2d17.js} +2 -2
  32. package/{6741b2b9.js → de3e61cd.js} +68 -69
  33. package/df15a543.js +817 -0
  34. package/{47848c42.js → e5b014a9.js} +5 -5
  35. package/e86c3e3a.js +1264 -0
  36. package/{0f43fe1e.js → eb52cd1a.js} +8 -8
  37. package/{0da7ca4d.js → ebbe2009.js} +92 -92
  38. package/{cb338c34.js → ecab0a38.js} +96 -99
  39. package/{268c902c.js → f3455869.js} +26 -27
  40. package/f701d7da.js +433 -0
  41. package/{6402852d.js → fc681b47.js} +12 -12
  42. package/index.js +2 -2
  43. package/package.json +1 -1
  44. package/04c7d898.js +0 -819
  45. package/078d4a18.js +0 -818
  46. package/18cd6b56.js +0 -391
  47. package/1a8f0a25.js +0 -455
  48. package/2b4f4275.js +0 -1276
  49. package/2efee7c6.js +0 -1102
  50. package/a6a69647.js +0 -237
  51. package/c2bb8612.js +0 -208
package/f701d7da.js ADDED
@@ -0,0 +1,433 @@
1
+ import { G as R } from "./48ca2a1e.js";
2
+ import { S as z, y as F, z as j, A as U, B as H, q as N, l as g, r as K, e as S, m as G, t as q, u as E, p as L, j as C, C as W, v as X, D as J } from "./40bee586.js";
3
+ import { r as Q } from "./7e78c333.js";
4
+ import { c as Y } from "./668d3da2.js";
5
+ function Z(e) {
6
+ return typeof e == "string" ? new z([document.querySelectorAll(e)], [document.documentElement]) : new z([j(e)], F);
7
+ }
8
+ function pe(e, l) {
9
+ return !!e.children(l).length;
10
+ }
11
+ function be(e) {
12
+ return A(e.v) + ":" + A(e.w) + ":" + A(e.name);
13
+ }
14
+ var O = /:/g;
15
+ function A(e) {
16
+ return e ? String(e).replace(O, "\\:") : "";
17
+ }
18
+ function ee(e, l) {
19
+ l && e.attr("style", l);
20
+ }
21
+ function fe(e, l, c) {
22
+ l && e.attr("class", l).attr("class", c + " " + e.attr("class"));
23
+ }
24
+ function ue(e, l) {
25
+ var c = l.graph();
26
+ if (U(c)) {
27
+ var a = c.transition;
28
+ if (H(a))
29
+ return a(e);
30
+ }
31
+ return e;
32
+ }
33
+ function te(e, l) {
34
+ var c = e.append("foreignObject").attr("width", "100000"), a = c.append("xhtml:div");
35
+ a.attr("xmlns", "http://www.w3.org/1999/xhtml");
36
+ var i = l.label;
37
+ switch (typeof i) {
38
+ case "function":
39
+ a.insert(i);
40
+ break;
41
+ case "object":
42
+ a.insert(function() {
43
+ return i;
44
+ });
45
+ break;
46
+ default:
47
+ a.html(i);
48
+ }
49
+ ee(a, l.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap");
50
+ var d = a.node().getBoundingClientRect();
51
+ return c.attr("width", d.width).attr("height", d.height), c;
52
+ }
53
+ const P = {}, re = function(e) {
54
+ const l = Object.keys(e);
55
+ for (const c of l)
56
+ P[c] = e[c];
57
+ }, V = async function(e, l, c, a, i, d) {
58
+ const u = a.select(`[id="${c}"]`), n = Object.keys(e);
59
+ for (const p of n) {
60
+ const r = e[p];
61
+ let y = "default";
62
+ r.classes.length > 0 && (y = r.classes.join(" ")), y = y + " flowchart-label";
63
+ const w = N(r.styles);
64
+ let t = r.text !== void 0 ? r.text : r.id, s;
65
+ if (g.info("vertex", r, r.labelType), r.labelType === "markdown")
66
+ g.info("vertex", r, r.labelType);
67
+ else if (K(S().flowchart.htmlLabels))
68
+ s = te(u, {
69
+ label: t
70
+ }).node(), s.parentNode.removeChild(s);
71
+ else {
72
+ const k = i.createElementNS("http://www.w3.org/2000/svg", "text");
73
+ k.setAttribute("style", w.labelStyle.replace("color:", "fill:"));
74
+ const _ = t.split(G.lineBreakRegex);
75
+ for (const $ of _) {
76
+ const v = i.createElementNS("http://www.w3.org/2000/svg", "tspan");
77
+ v.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), v.setAttribute("dy", "1em"), v.setAttribute("x", "1"), v.textContent = $, k.appendChild(v);
78
+ }
79
+ s = k;
80
+ }
81
+ let b = 0, o = "";
82
+ switch (r.type) {
83
+ case "round":
84
+ b = 5, o = "rect";
85
+ break;
86
+ case "square":
87
+ o = "rect";
88
+ break;
89
+ case "diamond":
90
+ o = "question";
91
+ break;
92
+ case "hexagon":
93
+ o = "hexagon";
94
+ break;
95
+ case "odd":
96
+ o = "rect_left_inv_arrow";
97
+ break;
98
+ case "lean_right":
99
+ o = "lean_right";
100
+ break;
101
+ case "lean_left":
102
+ o = "lean_left";
103
+ break;
104
+ case "trapezoid":
105
+ o = "trapezoid";
106
+ break;
107
+ case "inv_trapezoid":
108
+ o = "inv_trapezoid";
109
+ break;
110
+ case "odd_right":
111
+ o = "rect_left_inv_arrow";
112
+ break;
113
+ case "circle":
114
+ o = "circle";
115
+ break;
116
+ case "ellipse":
117
+ o = "ellipse";
118
+ break;
119
+ case "stadium":
120
+ o = "stadium";
121
+ break;
122
+ case "subroutine":
123
+ o = "subroutine";
124
+ break;
125
+ case "cylinder":
126
+ o = "cylinder";
127
+ break;
128
+ case "group":
129
+ o = "rect";
130
+ break;
131
+ case "doublecircle":
132
+ o = "doublecircle";
133
+ break;
134
+ default:
135
+ o = "rect";
136
+ }
137
+ const T = await q(t, S());
138
+ l.setNode(r.id, {
139
+ labelStyle: w.labelStyle,
140
+ shape: o,
141
+ labelText: T,
142
+ labelType: r.labelType,
143
+ rx: b,
144
+ ry: b,
145
+ class: y,
146
+ style: w.style,
147
+ id: r.id,
148
+ link: r.link,
149
+ linkTarget: r.linkTarget,
150
+ tooltip: d.db.getTooltip(r.id) || "",
151
+ domId: d.db.lookUpDomId(r.id),
152
+ haveCallback: r.haveCallback,
153
+ width: r.type === "group" ? 500 : void 0,
154
+ dir: r.dir,
155
+ type: r.type,
156
+ props: r.props,
157
+ padding: S().flowchart.padding
158
+ }), g.info("setNode", {
159
+ labelStyle: w.labelStyle,
160
+ labelType: r.labelType,
161
+ shape: o,
162
+ labelText: T,
163
+ rx: b,
164
+ ry: b,
165
+ class: y,
166
+ style: w.style,
167
+ id: r.id,
168
+ domId: d.db.lookUpDomId(r.id),
169
+ width: r.type === "group" ? 500 : void 0,
170
+ type: r.type,
171
+ dir: r.dir,
172
+ props: r.props,
173
+ padding: S().flowchart.padding
174
+ });
175
+ }
176
+ }, M = async function(e, l, c) {
177
+ g.info("abc78 edges = ", e);
178
+ let a = 0, i = {}, d, u;
179
+ if (e.defaultStyle !== void 0) {
180
+ const n = N(e.defaultStyle);
181
+ d = n.style, u = n.labelStyle;
182
+ }
183
+ for (const n of e) {
184
+ a++;
185
+ const p = "L-" + n.start + "-" + n.end;
186
+ i[p] === void 0 ? (i[p] = 0, g.info("abc78 new entry", p, i[p])) : (i[p]++, g.info("abc78 new entry", p, i[p]));
187
+ let r = p + "-" + i[p];
188
+ g.info("abc78 new link id to be used is", p, r, i[p]);
189
+ const y = "LS-" + n.start, w = "LE-" + n.end, t = { style: "", labelStyle: "" };
190
+ switch (t.minlen = n.length || 1, n.type === "arrow_open" ? t.arrowhead = "none" : t.arrowhead = "normal", t.arrowTypeStart = "arrow_open", t.arrowTypeEnd = "arrow_open", n.type) {
191
+ case "double_arrow_cross":
192
+ t.arrowTypeStart = "arrow_cross";
193
+ case "arrow_cross":
194
+ t.arrowTypeEnd = "arrow_cross";
195
+ break;
196
+ case "double_arrow_point":
197
+ t.arrowTypeStart = "arrow_point";
198
+ case "arrow_point":
199
+ t.arrowTypeEnd = "arrow_point";
200
+ break;
201
+ case "double_arrow_circle":
202
+ t.arrowTypeStart = "arrow_circle";
203
+ case "arrow_circle":
204
+ t.arrowTypeEnd = "arrow_circle";
205
+ break;
206
+ }
207
+ let s = "", b = "";
208
+ switch (n.stroke) {
209
+ case "normal":
210
+ s = "fill:none;", d !== void 0 && (s = d), u !== void 0 && (b = u), t.thickness = "normal", t.pattern = "solid";
211
+ break;
212
+ case "dotted":
213
+ t.thickness = "normal", t.pattern = "dotted", t.style = "fill:none;stroke-width:2px;stroke-dasharray:3;";
214
+ break;
215
+ case "thick":
216
+ t.thickness = "thick", t.pattern = "solid", t.style = "stroke-width: 3.5px;fill:none;";
217
+ break;
218
+ case "invisible":
219
+ t.thickness = "invisible", t.pattern = "solid", t.style = "stroke-width: 0;fill:none;";
220
+ break;
221
+ }
222
+ if (n.style !== void 0) {
223
+ const o = N(n.style);
224
+ s = o.style, b = o.labelStyle;
225
+ }
226
+ t.style = t.style += s, t.labelStyle = t.labelStyle += b, n.interpolate !== void 0 ? t.curve = E(n.interpolate, L) : e.defaultInterpolate !== void 0 ? t.curve = E(e.defaultInterpolate, L) : t.curve = E(P.curve, L), n.text === void 0 ? n.style !== void 0 && (t.arrowheadStyle = "fill: #333") : (t.arrowheadStyle = "fill: #333", t.labelpos = "c"), t.labelType = n.labelType, t.label = await q(n.text.replace(G.lineBreakRegex, `
227
+ `), S()), n.style === void 0 && (t.style = t.style || "stroke: #333; stroke-width: 1.5px;fill:none;"), t.labelStyle = t.labelStyle.replace("color:", "fill:"), t.id = r, t.classes = "flowchart-link " + y + " " + w, l.setEdge(n.start, n.end, t, a);
228
+ }
229
+ }, le = function(e, l) {
230
+ return l.db.getClasses();
231
+ }, ae = async function(e, l, c, a) {
232
+ g.info("Drawing flowchart");
233
+ let i = a.db.getDirection();
234
+ i === void 0 && (i = "TD");
235
+ const { securityLevel: d, flowchart: u } = S(), n = u.nodeSpacing || 50, p = u.rankSpacing || 50;
236
+ let r;
237
+ d === "sandbox" && (r = C("#i" + l));
238
+ const y = d === "sandbox" ? C(r.nodes()[0].contentDocument.body) : C("body"), w = d === "sandbox" ? r.nodes()[0].contentDocument : document, t = new R({
239
+ multigraph: !0,
240
+ compound: !0
241
+ }).setGraph({
242
+ rankdir: i,
243
+ nodesep: n,
244
+ ranksep: p,
245
+ marginx: 0,
246
+ marginy: 0
247
+ }).setDefaultEdgeLabel(function() {
248
+ return {};
249
+ });
250
+ let s;
251
+ const b = a.db.getSubGraphs();
252
+ g.info("Subgraphs - ", b);
253
+ for (let f = b.length - 1; f >= 0; f--)
254
+ s = b[f], g.info("Subgraph - ", s), a.db.addVertex(
255
+ s.id,
256
+ { text: s.title, type: s.labelType },
257
+ "group",
258
+ void 0,
259
+ s.classes,
260
+ s.dir
261
+ );
262
+ const o = a.db.getVertices(), T = a.db.getEdges();
263
+ g.info("Edges", T);
264
+ let k = 0;
265
+ for (k = b.length - 1; k >= 0; k--) {
266
+ s = b[k], Z("cluster").append("text");
267
+ for (let f = 0; f < s.nodes.length; f++)
268
+ g.info("Setting up subgraphs", s.nodes[f], s.id), t.setParent(s.nodes[f], s.id);
269
+ }
270
+ await V(o, t, l, y, w, a), await M(T, t);
271
+ const _ = y.select(`[id="${l}"]`), $ = y.select("#" + l + " g");
272
+ if (await Q($, t, ["point", "circle", "cross"], "flowchart", l), W.insertTitle(_, "flowchartTitleText", u.titleTopMargin, a.db.getDiagramTitle()), X(t, _, u.diagramPadding, u.useMaxWidth), a.db.indexNodes("subGraph" + k), !u.htmlLabels) {
273
+ const f = w.querySelectorAll('[id="' + l + '"] .edgeLabel .label');
274
+ for (const x of f) {
275
+ const m = x.getBBox(), h = w.createElementNS("http://www.w3.org/2000/svg", "rect");
276
+ h.setAttribute("rx", 0), h.setAttribute("ry", 0), h.setAttribute("width", m.width), h.setAttribute("height", m.height), x.insertBefore(h, x.firstChild);
277
+ }
278
+ }
279
+ Object.keys(o).forEach(function(f) {
280
+ const x = o[f];
281
+ if (x.link) {
282
+ const m = C("#" + l + ' [id="' + f + '"]');
283
+ if (m) {
284
+ const h = w.createElementNS("http://www.w3.org/2000/svg", "a");
285
+ h.setAttributeNS("http://www.w3.org/2000/svg", "class", x.classes.join(" ")), h.setAttributeNS("http://www.w3.org/2000/svg", "href", x.link), h.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), d === "sandbox" ? h.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : x.linkTarget && h.setAttributeNS("http://www.w3.org/2000/svg", "target", x.linkTarget);
286
+ const B = m.insert(function() {
287
+ return h;
288
+ }, ":first-child"), D = m.select(".label-container");
289
+ D && B.append(function() {
290
+ return D.node();
291
+ });
292
+ const I = m.select(".label");
293
+ I && B.append(function() {
294
+ return I.node();
295
+ });
296
+ }
297
+ }
298
+ });
299
+ }, we = {
300
+ setConf: re,
301
+ addVertices: V,
302
+ addEdges: M,
303
+ getClasses: le,
304
+ draw: ae
305
+ }, oe = (e, l) => {
306
+ const c = Y, a = c(e, "r"), i = c(e, "g"), d = c(e, "b");
307
+ return J(a, i, d, l);
308
+ }, ne = (e) => `.label {
309
+ font-family: ${e.fontFamily};
310
+ color: ${e.nodeTextColor || e.textColor};
311
+ }
312
+ .cluster-label text {
313
+ fill: ${e.titleColor};
314
+ }
315
+ .cluster-label span,p {
316
+ color: ${e.titleColor};
317
+ }
318
+
319
+ .label text,span,p {
320
+ fill: ${e.nodeTextColor || e.textColor};
321
+ color: ${e.nodeTextColor || e.textColor};
322
+ }
323
+
324
+ .node rect,
325
+ .node circle,
326
+ .node ellipse,
327
+ .node polygon,
328
+ .node path {
329
+ fill: ${e.mainBkg};
330
+ stroke: ${e.nodeBorder};
331
+ stroke-width: 1px;
332
+ }
333
+ .flowchart-label text {
334
+ text-anchor: middle;
335
+ }
336
+ // .flowchart-label .text-outer-tspan {
337
+ // text-anchor: middle;
338
+ // }
339
+ // .flowchart-label .text-inner-tspan {
340
+ // text-anchor: start;
341
+ // }
342
+
343
+ .node .katex path {
344
+ fill: #000;
345
+ stroke: #000;
346
+ stroke-width: 1px;
347
+ }
348
+
349
+ .node .label {
350
+ text-align: center;
351
+ }
352
+ .node.clickable {
353
+ cursor: pointer;
354
+ }
355
+
356
+ .arrowheadPath {
357
+ fill: ${e.arrowheadColor};
358
+ }
359
+
360
+ .edgePath .path {
361
+ stroke: ${e.lineColor};
362
+ stroke-width: 2.0px;
363
+ }
364
+
365
+ .flowchart-link {
366
+ stroke: ${e.lineColor};
367
+ fill: none;
368
+ }
369
+
370
+ .edgeLabel {
371
+ background-color: ${e.edgeLabelBackground};
372
+ rect {
373
+ opacity: 0.5;
374
+ background-color: ${e.edgeLabelBackground};
375
+ fill: ${e.edgeLabelBackground};
376
+ }
377
+ text-align: center;
378
+ }
379
+
380
+ /* For html labels only */
381
+ .labelBkg {
382
+ background-color: ${oe(e.edgeLabelBackground, 0.5)};
383
+ // background-color:
384
+ }
385
+
386
+ .cluster rect {
387
+ fill: ${e.clusterBkg};
388
+ stroke: ${e.clusterBorder};
389
+ stroke-width: 1px;
390
+ }
391
+
392
+ .cluster text {
393
+ fill: ${e.titleColor};
394
+ }
395
+
396
+ .cluster span,p {
397
+ color: ${e.titleColor};
398
+ }
399
+ /* .cluster div {
400
+ color: ${e.titleColor};
401
+ } */
402
+
403
+ div.mermaidTooltip {
404
+ position: absolute;
405
+ text-align: center;
406
+ max-width: 200px;
407
+ padding: 2px;
408
+ font-family: ${e.fontFamily};
409
+ font-size: 12px;
410
+ background: ${e.tertiaryColor};
411
+ border: 1px solid ${e.border2};
412
+ border-radius: 2px;
413
+ pointer-events: none;
414
+ z-index: 100;
415
+ }
416
+
417
+ .flowchartTitleText {
418
+ text-anchor: middle;
419
+ font-size: 18px;
420
+ fill: ${e.textColor};
421
+ }
422
+ `, he = ne;
423
+ export {
424
+ ee as a,
425
+ te as b,
426
+ ue as c,
427
+ fe as d,
428
+ be as e,
429
+ we as f,
430
+ he as g,
431
+ pe as i,
432
+ Z as s
433
+ };
@@ -1,16 +1,16 @@
1
- import { p as e, f as o } from "./268c902c.js";
2
- import { f as t, g as a } from "./1a8f0a25.js";
3
- import { x as i } from "./6296008d.js";
4
- import "./32d11caf.js";
5
- import "./c69763fa.js";
6
- import "./18cd6b56.js";
7
- import "./21e8a932.js";
8
- import "./2efee7c6.js";
9
- import "./43254cb0.js";
10
- import "./08ea4a8f.js";
1
+ import { p as e, f as o } from "./f3455869.js";
2
+ import { f as t, g as a } from "./f701d7da.js";
3
+ import { x as i } from "./40bee586.js";
4
+ import "./48ca2a1e.js";
5
+ import "./dbeb2d17.js";
6
+ import "./7e78c333.js";
7
+ import "./4407a5f9.js";
8
+ import "./c0405acc.js";
9
+ import "./8ae1f7a4.js";
10
+ import "./ca993649.js";
11
11
  import "./2ff2c7a6.js";
12
- import "./256b619e.js";
13
- import "./35b2542e.js";
12
+ import "./428ebac9.js";
13
+ import "./668d3da2.js";
14
14
  const M = {
15
15
  parser: e,
16
16
  db: o,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="lowcoder-comps-2.4.14",e.appendChild(document.createTextNode("")),document.head.appendChild(e)}}catch(c){console.error("vite-plugin-css-injected-by-js",c)}})();
2
- import { b9 as f } from "./6296008d.js";
1
+ (function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.id="lowcoder-comps-2.4.16",e.appendChild(document.createTextNode("")),document.head.appendChild(e)}}catch(c){console.error("vite-plugin-css-injected-by-js",c)}})();
2
+ import { b9 as f } from "./40bee586.js";
3
3
  export {
4
4
  f as default
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lowcoder-comps",
3
- "version": "2.4.14",
3
+ "version": "2.4.16",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "dependencies": {