lowcoder-comps 0.0.21 → 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/{8219433d.js → 14de54b2.js} +7120 -6939
  5. package/17b0984b.js +1116 -0
  6. package/{31b1cdd2.js → 1a4b39ab.js} +29 -30
  7. package/1e35aee7.js +932 -0
  8. package/{54511d22.js → 1f97d569.js} +73 -76
  9. package/3120eee5.js +1235 -0
  10. package/313e94fb.js +796 -0
  11. package/{b38c288b.js → 41a4677f.js} +10 -12
  12. package/{2768fdea.js → 48a69d01.js} +89 -97
  13. package/4a8006fe.js +2501 -0
  14. package/{a6e7fb9e.js → 585231df.js} +64 -71
  15. package/5e96f5d8.js +64 -0
  16. package/5f9be850.js +1055 -0
  17. package/{f576ac90.js → 6e0c66a6.js} +97 -109
  18. package/76d315c1.js +2192 -0
  19. package/{7c62ef63.js → 867cdd47.js} +1 -1
  20. package/{3bd738e9.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/{450c6bd6.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/{9f3281b9.js → bf75928a.js} +30053 -30574
  29. package/{ba44e76c.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/{fb09e069.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/04ea1009.js +0 -985
  39. package/0a1968f4.js +0 -832
  40. package/3087113d.js +0 -1032
  41. package/39f71758.js +0 -849
  42. package/4d1cf087.js +0 -2679
  43. package/59cbb8ee.js +0 -2456
  44. package/62c916e0.js +0 -86
  45. package/74645131.js +0 -1246
  46. package/75095038.js +0 -159
  47. package/86a4a706.js +0 -1118
  48. package/88c87bf8.js +0 -943
  49. package/8d8e98a7.js +0 -365
  50. package/9200edf7.js +0 -70
  51. package/acdad8f2.js +0 -7
  52. package/cbee3d44.js +0 -607
  53. package/cc0f1351.js +0 -793
  54. package/e614be0d.js +0 -91
  55. package/f40ee59a.js +0 -940
  56. package/fc5c5300.js +0 -2103
  57. package/fe636892.js +0 -823
  58. package/fea654db.js +0 -2827
@@ -1,6 +1,6 @@
1
1
  import { a as h } from "./2ff2c7a6.js";
2
2
  import { w as d, c as o } from "./256b619e.js";
3
- import { o as v } from "./9f3281b9.js";
3
+ import { n as v } from "./bf75928a.js";
4
4
  function w(t) {
5
5
  return t[0];
6
6
  }
@@ -14,41 +14,35 @@ var B = (e, n, t) => new Promise((c, i) => {
14
14
  }, a = (l) => l.done ? c(l.value) : Promise.resolve(l.value).then(r, o);
15
15
  a((t = t.apply(e, n)).next());
16
16
  });
17
- import { p as X, d as M, s as Z, D as U, a as j, S as F, b as I, c as tt } from "./04ea1009.js";
18
- import { G as et } from "./4d1cf087.js";
19
- import { l as d, c as g, h as x, x as ot, i as st, j as w } from "./9f3281b9.js";
20
- import { r as nt } from "./8d8e98a7.js";
21
- import "./39f71758.js";
22
- import "./fea654db.js";
23
- import "./75095038.js";
24
- import "./7c62ef63.js";
17
+ import { p as Q, d as M, s as X, D as U, a as Z, S as F, b as I, c as tt } from "./ef3524ce.js";
18
+ import { G as et } from "./14c95def.js";
19
+ import { l as T, c as g, h as x, z as ot, i as st, j as w } from "./bf75928a.js";
20
+ import { r as nt } from "./f5b4a4bc.js";
21
+ import "./c239ec69.js";
22
+ import "./97298a99.js";
23
+ import "./867cdd47.js";
25
24
  import "./2ff2c7a6.js";
26
25
  import "./256b619e.js";
27
- const A = "rect", C = "rectWithTitle", ct = "start", it = "end", rt = "divider", lt = "roundedWithTitle", at = "note", dt = "noteGroup", u = "statediagram", Et = "state", St = `${u}-${Et}`, V = "transition", Tt = "note", pt = "note-edge", _t = `${V} ${pt}`, ut = `${u}-${Tt}`, Dt = "cluster", ft = `${u}-${Dt}`, bt = "cluster-alt", ht = `${u}-${bt}`, Y = "parent", W = "note", At = "state", N = "----", yt = `${N}${W}`, H = `${N}${Y}`, z = "fill:none", m = "fill: #333", q = "c", K = "text", J = "normal";
28
- let y = {}, T = 0;
26
+ const h = "rect", C = "rectWithTitle", ct = "start", it = "end", rt = "divider", lt = "roundedWithTitle", at = "note", dt = "noteGroup", u = "statediagram", Et = "state", St = `${u}-${Et}`, V = "transition", Tt = "note", pt = "note-edge", _t = `${V} ${pt}`, ut = `${u}-${Tt}`, Dt = "cluster", bt = `${u}-${Dt}`, ft = "cluster-alt", At = `${u}-${ft}`, Y = "parent", z = "note", ht = "state", N = "----", yt = `${N}${z}`, H = `${N}${Y}`, W = "fill:none", m = "fill: #333", j = "c", q = "text", K = "normal";
27
+ let y = {}, S = 0;
29
28
  const gt = function(e) {
30
29
  const n = Object.keys(e);
31
30
  for (const t of n)
32
31
  e[t];
33
32
  }, $t = function(e, n) {
34
- d.trace("Extracting classes"), n.db.clear();
35
- try {
36
- return n.parser.parse(e), n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
37
- } catch (t) {
38
- return t;
39
- }
33
+ return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
40
34
  };
41
35
  function xt(e) {
42
36
  return e == null ? "" : e.classes ? e.classes.join(" ") : "";
43
37
  }
44
38
  function R(e = "", n = 0, t = "", c = N) {
45
39
  const i = t !== null && t.length > 0 ? `${c}${t}` : "";
46
- return `${At}-${e}${i}-${n}`;
40
+ return `${ht}-${e}${i}-${n}`;
47
41
  }
48
- const h = (e, n, t, c, i, r) => {
42
+ const A = (e, n, t, c, i, r) => {
49
43
  const o = t.id, a = xt(c[o]);
50
44
  if (o !== "root") {
51
- let l = A;
45
+ let l = h;
52
46
  t.start === !0 && (l = ct), t.start === !1 && (l = it), t.type !== U && (l = t.type), y[o] || (y[o] = {
53
47
  id: o,
54
48
  shape: l,
@@ -56,7 +50,7 @@ const h = (e, n, t, c, i, r) => {
56
50
  classes: `${a} ${St}`
57
51
  });
58
52
  const s = y[o];
59
- t.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(t.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [t.description] : s.description = [s.description, t.description]) : (s.shape = A, s.description = t.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = A), !s.type && t.doc && (d.info("Setting cluster for ", o, G(t)), s.type = "group", s.dir = G(t), s.shape = t.type === j ? rt : lt, s.classes = s.classes + " " + ft + " " + (r ? ht : ""));
53
+ t.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(t.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [t.description] : s.description = [s.description, t.description]) : (s.shape = h, s.description = t.description), s.description = w.sanitizeTextOrArray(s.description, g())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && t.doc && (T.info("Setting cluster for ", o, G(t)), s.type = "group", s.dir = G(t), s.shape = t.type === Z ? rt : lt, s.classes = s.classes + " " + bt + " " + (r ? At : ""));
60
54
  const _ = {
61
55
  labelStyle: "",
62
56
  shape: s.shape,
@@ -69,13 +63,13 @@ const h = (e, n, t, c, i, r) => {
69
63
  //styles.style,
70
64
  id: o,
71
65
  dir: s.dir,
72
- domId: R(o, T),
66
+ domId: R(o, S),
73
67
  type: s.type,
74
68
  padding: 15
75
69
  //getConfig().flowchart.padding
76
70
  };
77
71
  if (_.centerLabel = !0, t.note) {
78
- const E = {
72
+ const d = {
79
73
  labelStyle: "",
80
74
  shape: at,
81
75
  labelText: t.note.text,
@@ -83,12 +77,12 @@ const h = (e, n, t, c, i, r) => {
83
77
  // useHtmlLabels: false,
84
78
  style: "",
85
79
  // styles.style,
86
- id: o + yt + "-" + T,
87
- domId: R(o, T, W),
80
+ id: o + yt + "-" + S,
81
+ domId: R(o, S, z),
88
82
  type: s.type,
89
83
  padding: 15
90
84
  //getConfig().flowchart.padding
91
- }, S = {
85
+ }, E = {
92
86
  labelStyle: "",
93
87
  shape: dt,
94
88
  labelText: t.note.text,
@@ -96,56 +90,56 @@ const h = (e, n, t, c, i, r) => {
96
90
  style: "",
97
91
  // styles.style,
98
92
  id: o + H,
99
- domId: R(o, T, Y),
93
+ domId: R(o, S, Y),
100
94
  type: "group",
101
95
  padding: 0
102
96
  //getConfig().flowchart.padding
103
97
  };
104
- T++;
98
+ S++;
105
99
  const D = o + H;
106
- e.setNode(D, S), e.setNode(E.id, E), e.setNode(o, _), e.setParent(o, D), e.setParent(E.id, D);
107
- let p = o, f = E.id;
108
- t.note.position === "left of" && (p = E.id, f = o), e.setEdge(p, f, {
100
+ e.setNode(D, E), e.setNode(d.id, d), e.setNode(o, _), e.setParent(o, D), e.setParent(d.id, D);
101
+ let p = o, b = d.id;
102
+ t.note.position === "left of" && (p = d.id, b = o), e.setEdge(p, b, {
109
103
  arrowhead: "none",
110
104
  arrowType: "",
111
- style: z,
105
+ style: W,
112
106
  labelStyle: "",
113
107
  classes: _t,
114
108
  arrowheadStyle: m,
115
- labelpos: q,
116
- labelType: K,
117
- thickness: J
109
+ labelpos: j,
110
+ labelType: q,
111
+ thickness: K
118
112
  });
119
113
  } else
120
114
  e.setNode(o, _);
121
115
  }
122
- n && n.id !== "root" && (d.trace("Setting node ", o, " to be child of its parent ", n.id), e.setParent(o, n.id)), t.doc && (d.trace("Adding nodes children "), Ct(e, t, t.doc, c, i, !r));
116
+ n && n.id !== "root" && (T.trace("Setting node ", o, " to be child of its parent ", n.id), e.setParent(o, n.id)), t.doc && (T.trace("Adding nodes children "), Ct(e, t, t.doc, c, i, !r));
123
117
  }, Ct = (e, n, t, c, i, r) => {
124
- d.trace("items", t), t.forEach((o) => {
118
+ T.trace("items", t), t.forEach((o) => {
125
119
  switch (o.stmt) {
126
120
  case I:
127
- h(e, n, o, c, i, r);
121
+ A(e, n, o, c, i, r);
128
122
  break;
129
123
  case U:
130
- h(e, n, o, c, i, r);
124
+ A(e, n, o, c, i, r);
131
125
  break;
132
126
  case F:
133
127
  {
134
- h(e, n, o.state1, c, i, r), h(e, n, o.state2, c, i, r);
128
+ A(e, n, o.state1, c, i, r), A(e, n, o.state2, c, i, r);
135
129
  const a = {
136
- id: "edge" + T,
130
+ id: "edge" + S,
137
131
  arrowhead: "normal",
138
132
  arrowTypeEnd: "arrow_barb",
139
- style: z,
133
+ style: W,
140
134
  labelStyle: "",
141
135
  label: w.sanitizeText(o.description, g()),
142
136
  arrowheadStyle: m,
143
- labelpos: q,
144
- labelType: K,
145
- thickness: J,
137
+ labelpos: j,
138
+ labelType: q,
139
+ thickness: K,
146
140
  classes: V
147
141
  };
148
- e.setEdge(o.state1.id, o.state2.id, a, T), T++;
142
+ e.setEdge(o.state1.id, o.state2.id, a, S), S++;
149
143
  }
150
144
  break;
151
145
  }
@@ -160,9 +154,9 @@ const h = (e, n, t, c, i, r) => {
160
154
  return t;
161
155
  }, Rt = function(e, n, t, c) {
162
156
  return B(this, null, function* () {
163
- d.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
157
+ T.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
164
158
  const { securityLevel: i, state: r } = g(), o = r.nodeSpacing || 50, a = r.rankSpacing || 50;
165
- d.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), d.info(c.db.getRootDocV2());
159
+ T.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), T.info(c.db.getRootDocV2());
166
160
  const l = c.db.getStates(), s = new et({
167
161
  multigraph: !0,
168
162
  compound: !0
@@ -175,38 +169,38 @@ const h = (e, n, t, c, i, r) => {
175
169
  }).setDefaultEdgeLabel(function() {
176
170
  return {};
177
171
  });
178
- h(s, void 0, c.db.getRootDocV2(), l, c.db, !0);
172
+ A(s, void 0, c.db.getRootDocV2(), l, c.db, !0);
179
173
  let _;
180
174
  i === "sandbox" && (_ = x("#i" + n));
181
- const E = i === "sandbox" ? x(_.nodes()[0].contentDocument.body) : x("body"), S = E.select(`[id="${n}"]`), D = E.select("#" + n + " g");
175
+ const d = i === "sandbox" ? x(_.nodes()[0].contentDocument.body) : x("body"), E = d.select(`[id="${n}"]`), D = d.select("#" + n + " g");
182
176
  yield nt(D, s, ["barb"], u, n);
183
177
  const p = 8;
184
- ot.insertTitle(S, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
185
- const f = S.node().getBBox(), L = f.width + p * 2, P = f.height + p * 2;
186
- S.attr("class", u);
187
- const k = S.node().getBBox();
188
- st(S, P, L, r.useMaxWidth);
189
- const v = `${k.x - p} ${k.y - p} ${L} ${P}`;
190
- d.debug(`viewBox ${v}`), S.attr("viewBox", v);
191
- const Q = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
192
- for (const $ of Q) {
193
- const O = $.getBBox(), b = document.createElementNS("http://www.w3.org/2000/svg", A);
194
- b.setAttribute("rx", 0), b.setAttribute("ry", 0), b.setAttribute("width", O.width), b.setAttribute("height", O.height), $.insertBefore(b, $.firstChild);
178
+ ot.insertTitle(E, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
179
+ const b = E.node().getBBox(), L = b.width + p * 2, P = b.height + p * 2;
180
+ E.attr("class", u);
181
+ const O = E.node().getBBox();
182
+ st(E, P, L, r.useMaxWidth);
183
+ const k = `${O.x - p} ${O.y - p} ${L} ${P}`;
184
+ T.debug(`viewBox ${k}`), E.attr("viewBox", k);
185
+ const J = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
186
+ for (const $ of J) {
187
+ const v = $.getBBox(), f = document.createElementNS("http://www.w3.org/2000/svg", h);
188
+ f.setAttribute("rx", 0), f.setAttribute("ry", 0), f.setAttribute("width", v.width), f.setAttribute("height", v.height), $.insertBefore(f, $.firstChild);
195
189
  }
196
190
  });
197
191
  }, wt = {
198
192
  setConf: gt,
199
193
  getClasses: $t,
200
194
  draw: Rt
201
- }, Vt = {
202
- parser: X,
195
+ }, Ut = {
196
+ parser: Q,
203
197
  db: M,
204
198
  renderer: wt,
205
- styles: Z,
199
+ styles: X,
206
200
  init: (e) => {
207
201
  e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
208
202
  }
209
203
  };
210
204
  export {
211
- Vt as diagram
205
+ Ut as diagram
212
206
  };