lowcoder-comps 0.0.20 → 0.0.22

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 (58) hide show
  1. package/029c585a.js +825 -0
  2. package/0f49842f.js +915 -0
  3. package/14c95def.js +2396 -0
  4. package/{5a7c40d7.js → 14de54b2.js} +7120 -6939
  5. package/17b0984b.js +1116 -0
  6. package/{a1f987b7.js → 1a4b39ab.js} +29 -30
  7. package/1e35aee7.js +932 -0
  8. package/{804e952b.js → 1f97d569.js} +73 -76
  9. package/3120eee5.js +1235 -0
  10. package/313e94fb.js +796 -0
  11. package/{384b70d4.js → 41a4677f.js} +10 -12
  12. package/{e1466a22.js → 48a69d01.js} +89 -97
  13. package/4a8006fe.js +2501 -0
  14. package/{a06ced05.js → 585231df.js} +64 -71
  15. package/5e96f5d8.js +64 -0
  16. package/5f9be850.js +1055 -0
  17. package/{3196b84f.js → 6e0c66a6.js} +97 -109
  18. package/76d315c1.js +2192 -0
  19. package/{31c6e136.js → 867cdd47.js} +1 -1
  20. package/{0d5d7030.js → 8a65542f.js} +58 -64
  21. package/913e1a65.js +804 -0
  22. package/92e85b65.js +65 -0
  23. package/97298a99.js +2966 -0
  24. package/{5fd0f607.js → a396e61e.js} +44 -44
  25. package/a6d42292.js +1284 -0
  26. package/afd2e4d5.js +86 -0
  27. package/be5f3226.js +768 -0
  28. package/{4791bdd6.js → bf75928a.js} +30142 -30663
  29. package/{011ccb4a.js → bfd01456.js} +4257 -4221
  30. package/c239ec69.js +1000 -0
  31. package/e731f493.js +502 -0
  32. package/ef3524ce.js +960 -0
  33. package/f5b4a4bc.js +365 -0
  34. package/{8d714103.js → fa29410e.js} +598 -622
  35. package/fbc7bdd4.js +218 -0
  36. package/index.js +2 -2
  37. package/package.json +2 -2
  38. package/01102044.js +0 -940
  39. package/0e8dfd52.js +0 -793
  40. package/0f25771b.js +0 -1118
  41. package/2470e1d8.js +0 -91
  42. package/32432dc3.js +0 -86
  43. package/36552e14.js +0 -849
  44. package/3ad35722.js +0 -365
  45. package/3f4db197.js +0 -943
  46. package/71827e37.js +0 -1032
  47. package/7a200c6a.js +0 -607
  48. package/872f2918.js +0 -7
  49. package/93b98f3e.js +0 -832
  50. package/a42a2ba9.js +0 -2103
  51. package/af0489f3.js +0 -2456
  52. package/b56f953d.js +0 -985
  53. package/b89c6a6a.js +0 -159
  54. package/bc7030d3.js +0 -70
  55. package/c739ba3e.js +0 -2679
  56. package/d306d59c.js +0 -2827
  57. package/d8adcd1e.js +0 -823
  58. package/ef845d7f.js +0 -1246
package/3ad35722.js DELETED
@@ -1,365 +0,0 @@
1
- var b = (n, t, e) => new Promise((r, s) => {
2
- var a = (f) => {
3
- try {
4
- l(e.next(f));
5
- } catch (u) {
6
- s(u);
7
- }
8
- }, h = (f) => {
9
- try {
10
- l(e.throw(f));
11
- } catch (u) {
12
- s(u);
13
- }
14
- }, l = (f) => f.done ? r(f.value) : Promise.resolve(f.value).then(a, h);
15
- l((e = e.apply(n, t)).next());
16
- });
17
- import { b as G, a as v, m as O, G as j, l as A } from "./c739ba3e.js";
18
- import { i as M, u as _, s as H, a as V, b as q, p as D, c as U, d as W, e as Y, f as z, g as L, h as C } from "./36552e14.js";
19
- import { l as i, q as E, c as S, h as T } from "./4791bdd6.js";
20
- import { c as K } from "./d306d59c.js";
21
- var Q = 4;
22
- function Z(n) {
23
- return G(n, Q);
24
- }
25
- function y(n) {
26
- var t = {
27
- options: {
28
- directed: n.isDirected(),
29
- multigraph: n.isMultigraph(),
30
- compound: n.isCompound()
31
- },
32
- nodes: I(n),
33
- edges: tt(n)
34
- };
35
- return v(n.graph()) || (t.value = Z(n.graph())), t;
36
- }
37
- function I(n) {
38
- return O(n.nodes(), function(t) {
39
- var e = n.node(t), r = n.parent(t), s = { v: t };
40
- return v(e) || (s.value = e), v(r) || (s.parent = r), s;
41
- });
42
- }
43
- function tt(n) {
44
- return O(n.edges(), function(t) {
45
- var e = n.edge(t), r = { v: t.v, w: t.w };
46
- return v(t.name) || (r.name = t.name), v(e) || (r.value = e), r;
47
- });
48
- }
49
- let d = {}, x = {}, J = {};
50
- const et = () => {
51
- x = {}, J = {}, d = {};
52
- }, X = (n, t) => (i.trace("In isDecendant", t, " ", n, " = ", x[t].includes(n)), !!x[t].includes(n)), nt = (n, t) => (i.info("Decendants of ", t, " is ", x[t]), i.info("Edge is ", n), n.v === t || n.w === t ? !1 : x[t] ? x[t].includes(n.v) || X(n.v, t) || X(n.w, t) || x[t].includes(n.w) : (i.debug("Tilt, ", t, ",not in decendants"), !1)), p = (n, t, e, r) => {
53
- i.warn(
54
- "Copying children of ",
55
- n,
56
- "root",
57
- r,
58
- "data",
59
- t.node(n),
60
- r
61
- );
62
- const s = t.children(n) || [];
63
- n !== r && s.push(n), i.warn("Copying (nodes) clusterId", n, "nodes", s), s.forEach((a) => {
64
- if (t.children(a).length > 0)
65
- p(a, t, e, r);
66
- else {
67
- const h = t.node(a);
68
- i.info("cp ", a, " to ", r, " with parent ", n), e.setNode(a, h), r !== t.parent(a) && (i.warn("Setting parent", a, t.parent(a)), e.setParent(a, t.parent(a))), n !== r && a !== n ? (i.debug("Setting parent", a, n), e.setParent(a, n)) : (i.info("In copy ", n, "root", r, "data", t.node(n), r), i.debug(
69
- "Not Setting parent for node=",
70
- a,
71
- "cluster!==rootId",
72
- n !== r,
73
- "node!==clusterId",
74
- a !== n
75
- ));
76
- const l = t.edges(a);
77
- i.debug("Copying Edges", l), l.forEach((f) => {
78
- i.info("Edge", f);
79
- const u = t.edge(f.v, f.w, f.name);
80
- i.info("Edge data", u, r);
81
- try {
82
- nt(f, r) ? (i.info("Copying as ", f.v, f.w, u, f.name), e.setEdge(f.v, f.w, u, f.name), i.info("newGraph edges ", e.edges(), e.edge(e.edges()[0]))) : i.info(
83
- "Skipping copy of edge ",
84
- f.v,
85
- "-->",
86
- f.w,
87
- " rootId: ",
88
- r,
89
- " clusterId:",
90
- n
91
- );
92
- } catch (g) {
93
- i.error(g);
94
- }
95
- });
96
- }
97
- i.debug("Removing node", a), t.removeNode(a);
98
- });
99
- }, R = (n, t) => {
100
- const e = t.children(n);
101
- let r = [...e];
102
- for (const s of e)
103
- J[s] = n, r = [...r, ...R(s, t)];
104
- return r;
105
- }, m = (n, t) => {
106
- i.trace("Searching", n);
107
- const e = t.children(n);
108
- if (i.trace("Searching children of id ", n, e), e.length < 1)
109
- return i.trace("This is a valid node", n), n;
110
- for (const r of e) {
111
- const s = m(r, t);
112
- if (s)
113
- return i.trace("Found replacement for", n, " => ", s), s;
114
- }
115
- }, N = (n) => !d[n] || !d[n].externalConnections ? n : d[n] ? d[n].id : n, it = (n, t) => {
116
- if (!n || t > 10) {
117
- i.debug("Opting out, no graph ");
118
- return;
119
- } else
120
- i.debug("Opting in, graph ");
121
- n.nodes().forEach(function(e) {
122
- n.children(e).length > 0 && (i.warn(
123
- "Cluster identified",
124
- e,
125
- " Replacement id in edges: ",
126
- m(e, n)
127
- ), x[e] = R(e, n), d[e] = { id: m(e, n), clusterData: n.node(e) });
128
- }), n.nodes().forEach(function(e) {
129
- const r = n.children(e), s = n.edges();
130
- r.length > 0 ? (i.debug("Cluster identified", e, x), s.forEach((a) => {
131
- if (a.v !== e && a.w !== e) {
132
- const h = X(a.v, e), l = X(a.w, e);
133
- h ^ l && (i.warn("Edge: ", a, " leaves cluster ", e), i.warn("Decendants of XXX ", e, ": ", x[e]), d[e].externalConnections = !0);
134
- }
135
- })) : i.debug("Not a cluster ", e, x);
136
- }), n.edges().forEach(function(e) {
137
- const r = n.edge(e);
138
- i.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), i.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(n.edge(e)));
139
- let s = e.v, a = e.w;
140
- if (i.warn(
141
- "Fix XXX",
142
- d,
143
- "ids:",
144
- e.v,
145
- e.w,
146
- "Translating: ",
147
- d[e.v],
148
- " --- ",
149
- d[e.w]
150
- ), d[e.v] && d[e.w] && d[e.v] === d[e.w]) {
151
- i.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name), i.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), s = N(e.v), a = N(e.w), n.removeEdge(e.v, e.w, e.name);
152
- const h = e.w + "---" + e.v;
153
- n.setNode(h, {
154
- domId: h,
155
- id: h,
156
- labelStyle: "",
157
- labelText: r.label,
158
- padding: 0,
159
- shape: "labelRect",
160
- style: ""
161
- });
162
- const l = JSON.parse(JSON.stringify(r)), f = JSON.parse(JSON.stringify(r));
163
- l.label = "", l.arrowTypeEnd = "none", f.label = "", l.fromCluster = e.v, f.toCluster = e.v, n.setEdge(s, h, l, e.name + "-cyclic-special"), n.setEdge(h, a, f, e.name + "-cyclic-special");
164
- } else
165
- (d[e.v] || d[e.w]) && (i.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), s = N(e.v), a = N(e.w), n.removeEdge(e.v, e.w, e.name), s !== e.v && (r.fromCluster = e.v), a !== e.w && (r.toCluster = e.w), i.warn("Fix Replacing with XXX", s, a, e.name), n.setEdge(s, a, r, e.name));
166
- }), i.warn("Adjusted Graph", y(n)), P(n, 0), i.trace(d);
167
- }, P = (n, t) => {
168
- if (i.warn("extractor - ", t, y(n), n.children("D")), t > 10) {
169
- i.error("Bailing out");
170
- return;
171
- }
172
- let e = n.nodes(), r = !1;
173
- for (const s of e) {
174
- const a = n.children(s);
175
- r = r || a.length > 0;
176
- }
177
- if (!r) {
178
- i.debug("Done, no node has children", n.nodes());
179
- return;
180
- }
181
- i.debug("Nodes = ", e, t);
182
- for (const s of e)
183
- if (i.debug(
184
- "Extracting node",
185
- s,
186
- d,
187
- d[s] && !d[s].externalConnections,
188
- !n.parent(s),
189
- n.node(s),
190
- n.children("D"),
191
- " Depth ",
192
- t
193
- ), !d[s])
194
- i.debug("Not a cluster", s, t);
195
- else if (!d[s].externalConnections && // !graph.parent(node) &&
196
- n.children(s) && n.children(s).length > 0) {
197
- i.warn(
198
- "Cluster without external connections, without a parent and with children",
199
- s,
200
- t
201
- );
202
- let h = n.graph().rankdir === "TB" ? "LR" : "TB";
203
- d[s] && d[s].clusterData && d[s].clusterData.dir && (h = d[s].clusterData.dir, i.warn("Fixing dir", d[s].clusterData.dir, h));
204
- const l = new j({
205
- multigraph: !0,
206
- compound: !0
207
- }).setGraph({
208
- rankdir: h,
209
- // Todo: set proper spacing
210
- nodesep: 50,
211
- ranksep: 50,
212
- marginx: 8,
213
- marginy: 8
214
- }).setDefaultEdgeLabel(function() {
215
- return {};
216
- });
217
- i.warn("Old graph before copy", y(n)), p(s, n, l, s), n.setNode(s, {
218
- clusterNode: !0,
219
- id: s,
220
- clusterData: d[s].clusterData,
221
- labelText: d[s].labelText,
222
- graph: l
223
- }), i.warn("New graph after copy node: (", s, ")", y(l)), i.debug("Old graph after copy", y(n));
224
- } else
225
- i.warn(
226
- "Cluster ** ",
227
- s,
228
- " **not meeting the criteria !externalConnections:",
229
- !d[s].externalConnections,
230
- " no parent: ",
231
- !n.parent(s),
232
- " children ",
233
- n.children(s) && n.children(s).length > 0,
234
- n.children("D"),
235
- t
236
- ), i.debug(d);
237
- e = n.nodes(), i.warn("New list of nodes", e);
238
- for (const s of e) {
239
- const a = n.node(s);
240
- i.warn(" Now next level", s, a), a.clusterNode && P(a.graph, t + 1);
241
- }
242
- }, F = (n, t) => {
243
- if (t.length === 0)
244
- return [];
245
- let e = Object.assign(t);
246
- return t.forEach((r) => {
247
- const s = n.children(r), a = F(n, s);
248
- e = [...e, ...a];
249
- }), e;
250
- }, st = (n) => F(n, n.children()), rt = (n, t) => {
251
- i.info("Creating subgraph rect for ", t.id, t);
252
- const e = n.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), r = e.insert("rect", ":first-child"), s = E(S().flowchart.htmlLabels), a = e.insert("g").attr("class", "cluster-label"), h = t.labelType === "markdown" ? K(a, t.labelText, { style: t.labelStyle, useHtmlLabels: s }) : a.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
253
- let l = h.getBBox();
254
- if (E(S().flowchart.htmlLabels)) {
255
- const o = h.children[0], w = T(h);
256
- l = o.getBoundingClientRect(), w.attr("width", l.width), w.attr("height", l.height);
257
- }
258
- const f = 0 * t.padding, u = f / 2, g = t.width <= l.width + f ? l.width + f : t.width;
259
- t.width <= l.width + f ? t.diff = (l.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, i.trace("Data ", t, JSON.stringify(t)), r.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - g / 2).attr("y", t.y - t.height / 2 - u).attr("width", g).attr("height", t.height + f), s ? a.attr(
260
- "transform",
261
- // This puts the labal on top of the box instead of inside it
262
- "translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2) + ")"
263
- ) : a.attr(
264
- "transform",
265
- // This puts the labal on top of the box instead of inside it
266
- "translate(" + t.x + ", " + (t.y - t.height / 2) + ")"
267
- );
268
- const c = r.node().getBBox();
269
- return t.width = c.width, t.height = c.height, t.intersect = function(o) {
270
- return C(t, o);
271
- }, e;
272
- }, at = (n, t) => {
273
- const e = n.insert("g").attr("class", "note-cluster").attr("id", t.id), r = e.insert("rect", ":first-child"), s = 0 * t.padding, a = s / 2;
274
- r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + s).attr("height", t.height + s).attr("fill", "none");
275
- const h = r.node().getBBox();
276
- return t.width = h.width, t.height = h.height, t.intersect = function(l) {
277
- return C(t, l);
278
- }, e;
279
- }, ct = (n, t) => {
280
- const e = n.insert("g").attr("class", t.classes).attr("id", t.id), r = e.insert("rect", ":first-child"), s = e.insert("g").attr("class", "cluster-label"), a = e.append("rect"), h = s.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
281
- let l = h.getBBox();
282
- if (E(S().flowchart.htmlLabels)) {
283
- const o = h.children[0], w = T(h);
284
- l = o.getBoundingClientRect(), w.attr("width", l.width), w.attr("height", l.height);
285
- }
286
- l = h.getBBox();
287
- const f = 0 * t.padding, u = f / 2, g = t.width <= l.width + t.padding ? l.width + t.padding : t.width;
288
- t.width <= l.width + t.padding ? t.diff = (l.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, r.attr("class", "outer").attr("x", t.x - g / 2 - u).attr("y", t.y - t.height / 2 - u).attr("width", g + f).attr("height", t.height + f), a.attr("class", "inner").attr("x", t.x - g / 2 - u).attr("y", t.y - t.height / 2 - u + l.height - 1).attr("width", g + f).attr("height", t.height + f - l.height - 3), s.attr(
289
- "transform",
290
- "translate(" + (t.x - l.width / 2) + ", " + (t.y - t.height / 2 - t.padding / 3 + (E(S().flowchart.htmlLabels) ? 5 : 3)) + ")"
291
- );
292
- const c = r.node().getBBox();
293
- return t.height = c.height, t.intersect = function(o) {
294
- return C(t, o);
295
- }, e;
296
- }, ot = (n, t) => {
297
- const e = n.insert("g").attr("class", t.classes).attr("id", t.id), r = e.insert("rect", ":first-child"), s = 0 * t.padding, a = s / 2;
298
- r.attr("class", "divider").attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2).attr("width", t.width + s).attr("height", t.height + s);
299
- const h = r.node().getBBox();
300
- return t.width = h.width, t.height = h.height, t.diff = -t.padding / 2, t.intersect = function(l) {
301
- return C(t, l);
302
- }, e;
303
- }, lt = { rect: rt, roundedWithTitle: ct, noteGroup: at, divider: ot };
304
- let $ = {};
305
- const ft = (n, t) => {
306
- i.trace("Inserting cluster");
307
- const e = t.shape || "rect";
308
- $[t.id] = lt[e](n, t);
309
- }, dt = () => {
310
- $ = {};
311
- }, k = (n, t, e, r) => b(void 0, null, function* () {
312
- i.info("Graph in recursive render: XXX", y(t), r);
313
- const s = t.graph().rankdir;
314
- i.trace("Dir in recursive render - dir:", s);
315
- const a = n.insert("g").attr("class", "root");
316
- t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.trace("Recursive edges", t.edge(t.edges()[0]));
317
- const h = a.insert("g").attr("class", "clusters"), l = a.insert("g").attr("class", "edgePaths"), f = a.insert("g").attr("class", "edgeLabels"), u = a.insert("g").attr("class", "nodes");
318
- yield Promise.all(
319
- t.nodes().map(function(c) {
320
- return b(this, null, function* () {
321
- const o = t.node(c);
322
- if (r !== void 0) {
323
- const w = JSON.parse(JSON.stringify(r.clusterData));
324
- i.info("Setting data for cluster XXX (", c, ") ", w, r), t.setNode(r.id, w), t.parent(c) || (i.trace("Setting parent", c, r.id), t.setParent(c, r.id, w));
325
- }
326
- if (i.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
327
- i.info("Cluster identified", c, o.width, t.node(c));
328
- const w = yield k(u, o.graph, e, t.node(c)), B = w.elem;
329
- _(o, B), o.diff = w.diff || 0, i.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), H(B, o), i.warn("Recursive render complete ", B, o);
330
- } else
331
- t.children(c).length > 0 ? (i.info("Cluster - the non recursive path XXX", c, o.id, o, t), i.info(m(o.id, t)), d[o.id] = { id: m(o.id, t), node: o }) : (i.info("Node - the non recursive path", c, o.id, o), yield V(u, t.node(c), s));
332
- });
333
- })
334
- ), t.edges().forEach(function(c) {
335
- const o = t.edge(c.v, c.w, c.name);
336
- i.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c)), i.info("Edge " + c.v + " -> " + c.w + ": ", c, " ", JSON.stringify(t.edge(c))), i.info("Fix", d, "ids:", c.v, c.w, "Translateing: ", d[c.v], d[c.w]), q(f, o);
337
- }), t.edges().forEach(function(c) {
338
- i.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
339
- }), i.info("#############################################"), i.info("### Layout ###"), i.info("#############################################"), i.info(t), A(t), i.info("Graph after layout:", y(t));
340
- let g = 0;
341
- return st(t).forEach(function(c) {
342
- const o = t.node(c);
343
- i.info("Position " + c + ": " + JSON.stringify(t.node(c))), i.info(
344
- "Position " + c + ": (" + o.x,
345
- "," + o.y,
346
- ") width: ",
347
- o.width,
348
- " height: ",
349
- o.height
350
- ), o && o.clusterNode ? D(o) : t.children(c).length > 0 ? (ft(h, o), d[o.id].node = o) : D(o);
351
- }), t.edges().forEach(function(c) {
352
- const o = t.edge(c);
353
- i.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o);
354
- const w = U(l, c, o, d, e, t);
355
- W(o, w);
356
- }), t.nodes().forEach(function(c) {
357
- const o = t.node(c);
358
- i.info(c, o.type, o.diff), o.type === "group" && (g = o.diff);
359
- }), { elem: a, diff: g };
360
- }), yt = (n, t, e, r, s) => b(void 0, null, function* () {
361
- M(n, e, r, s), Y(), z(), dt(), et(), i.warn("Graph at first:", y(t)), it(t), i.warn("Graph after:", y(t)), yield k(n, t, r);
362
- });
363
- export {
364
- yt as r
365
- };