lowcoder-comps 0.0.31 → 0.0.33

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 (87) hide show
  1. package/00bb478a.js +1102 -0
  2. package/02bef5a4.js +505 -0
  3. package/057d2a44.js +1127 -0
  4. package/0964fcc6.js +34 -0
  5. package/14220e98.js +1276 -0
  6. package/1c074fe4.js +25 -0
  7. package/250a6954.js +804 -0
  8. package/256b619e.js +92 -0
  9. package/2cd27cf0.js +2501 -0
  10. package/2f064957.js +64 -0
  11. package/2ff2c7a6.js +6 -0
  12. package/2ff7471d.js +9 -0
  13. package/30c4916b.js +8 -0
  14. package/36ec7270.js +915 -0
  15. package/38c14832.js +960 -0
  16. package/3ae34bed.js +819 -0
  17. package/3e2939fa.js +237 -0
  18. package/3f5f874f.js +86 -0
  19. package/3fb86fb9.js +447 -0
  20. package/415177f9.js +1579 -0
  21. package/47848c42.js +11636 -0
  22. package/4c6a0ece.js +162535 -0
  23. package/4db8e48b.js +2284 -0
  24. package/531065f1.js +1089 -0
  25. package/5a398ea8.js +881 -0
  26. package/5ab1614c.js +268 -0
  27. package/65bbb6ae.js +1536 -0
  28. package/777cd15c.js +48428 -0
  29. package/7dacfa82.js +220 -0
  30. package/800cf0d0.js +796 -0
  31. package/92e85b65.js +65 -0
  32. package/93e9bd3a.js +391 -0
  33. package/98622dfa.js +16582 -0
  34. package/a2e74e62.js +2967 -0
  35. package/a61c3bd3.js +5 -0
  36. package/b8f48ff4.js +769 -0
  37. package/bd0f5f65.js +319 -0
  38. package/bf4428f5.js +1269 -0
  39. package/cb1972f7.js +455 -0
  40. package/dfc10c94.js +818 -0
  41. package/ed2c9753.js +208 -0
  42. package/ef2833e6.js +927 -0
  43. package/f9637058.js +16 -0
  44. package/f9e72519.js +1284 -0
  45. package/fe063d15.js +19339 -0
  46. package/index.js +5 -0
  47. package/package.json +30 -3
  48. package/README.md +0 -120
  49. package/index.html +0 -26
  50. package/index.tsx +0 -21
  51. package/jest.config.js +0 -6
  52. package/src/__test__/allComp.test.tsx +0 -61
  53. package/src/app-env.d.ts +0 -3
  54. package/src/comps/calendarComp/calendarComp.tsx +0 -633
  55. package/src/comps/calendarComp/calendarConstants.tsx +0 -1048
  56. package/src/comps/calendarComp/errorBoundary.tsx +0 -30
  57. package/src/comps/chartComp/chartComp.tsx +0 -442
  58. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
  59. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
  60. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -9
  61. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
  62. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
  63. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
  64. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
  65. package/src/comps/chartComp/chartConstants.tsx +0 -299
  66. package/src/comps/chartComp/chartPropertyView.tsx +0 -235
  67. package/src/comps/chartComp/chartUtils.ts +0 -291
  68. package/src/comps/chartComp/reactEcharts/core.tsx +0 -194
  69. package/src/comps/chartComp/reactEcharts/index.ts +0 -21
  70. package/src/comps/chartComp/reactEcharts/types.ts +0 -76
  71. package/src/comps/chartComp/seriesComp.tsx +0 -119
  72. package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
  73. package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
  74. package/src/comps/imageEditorComp/index.tsx +0 -184
  75. package/src/comps/mermaidComp/index.tsx +0 -44
  76. package/src/comps/mermaidComp/mermaid.tsx +0 -29
  77. package/src/global.ts +0 -1
  78. package/src/i18n/comps/index.tsx +0 -29
  79. package/src/i18n/comps/locales/en.ts +0 -163
  80. package/src/i18n/comps/locales/enObj.tsx +0 -198
  81. package/src/i18n/comps/locales/index.ts +0 -7
  82. package/src/i18n/comps/locales/types.tsx +0 -10
  83. package/src/i18n/comps/locales/zh.ts +0 -156
  84. package/src/i18n/comps/locales/zhObj.tsx +0 -4
  85. package/src/index.ts +0 -11
  86. package/tsconfig.json +0 -22
  87. package/vite.config.js +0 -10
package/ed2c9753.js ADDED
@@ -0,0 +1,208 @@
1
+ var B = (e, n, t) => new Promise((i, c) => {
2
+ var r = (l) => {
3
+ try {
4
+ a(t.next(l));
5
+ } catch (s) {
6
+ c(s);
7
+ }
8
+ }, o = (l) => {
9
+ try {
10
+ a(t.throw(l));
11
+ } catch (s) {
12
+ c(s);
13
+ }
14
+ }, a = (l) => l.done ? i(l.value) : Promise.resolve(l.value).then(r, o);
15
+ a((t = t.apply(e, n)).next());
16
+ });
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 "./38c14832.js";
18
+ import { G as et } from "./5a398ea8.js";
19
+ import { l as T, e as g, j as x, C as ot, k as st, m as w } from "./4c6a0ece.js";
20
+ import { r as nt } from "./93e9bd3a.js";
21
+ import "./65bbb6ae.js";
22
+ import "./30c4916b.js";
23
+ import "./00bb478a.js";
24
+ import "./a2e74e62.js";
25
+ import "./0964fcc6.js";
26
+ import "./2ff2c7a6.js";
27
+ import "./256b619e.js";
28
+ const h = "rect", C = "rectWithTitle", it = "start", ct = "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", m = "note", ht = "state", N = "----", yt = `${N}${m}`, H = `${N}${Y}`, W = "fill:none", z = "fill: #333", j = "c", q = "text", K = "normal";
29
+ let y = {}, S = 0;
30
+ const gt = function(e) {
31
+ const n = Object.keys(e);
32
+ for (const t of n)
33
+ e[t];
34
+ }, $t = function(e, n) {
35
+ return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
36
+ };
37
+ function xt(e) {
38
+ return e == null ? "" : e.classes ? e.classes.join(" ") : "";
39
+ }
40
+ function R(e = "", n = 0, t = "", i = N) {
41
+ const c = t !== null && t.length > 0 ? `${i}${t}` : "";
42
+ return `${ht}-${e}${c}-${n}`;
43
+ }
44
+ const A = (e, n, t, i, c, r) => {
45
+ const o = t.id, a = xt(i[o]);
46
+ if (o !== "root") {
47
+ let l = h;
48
+ t.start === !0 && (l = it), t.start === !1 && (l = ct), t.type !== U && (l = t.type), y[o] || (y[o] = {
49
+ id: o,
50
+ shape: l,
51
+ description: w.sanitizeText(o, g()),
52
+ classes: `${a} ${St}`
53
+ });
54
+ const s = y[o];
55
+ 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 : ""));
56
+ const _ = {
57
+ labelStyle: "",
58
+ shape: s.shape,
59
+ labelText: s.description,
60
+ // typeof newNode.description === 'object'
61
+ // ? newNode.description[0]
62
+ // : newNode.description,
63
+ classes: s.classes,
64
+ style: "",
65
+ //styles.style,
66
+ id: o,
67
+ dir: s.dir,
68
+ domId: R(o, S),
69
+ type: s.type,
70
+ padding: 15
71
+ //getConfig().flowchart.padding
72
+ };
73
+ if (_.centerLabel = !0, t.note) {
74
+ const d = {
75
+ labelStyle: "",
76
+ shape: at,
77
+ labelText: t.note.text,
78
+ classes: ut,
79
+ // useHtmlLabels: false,
80
+ style: "",
81
+ // styles.style,
82
+ id: o + yt + "-" + S,
83
+ domId: R(o, S, m),
84
+ type: s.type,
85
+ padding: 15
86
+ //getConfig().flowchart.padding
87
+ }, E = {
88
+ labelStyle: "",
89
+ shape: dt,
90
+ labelText: t.note.text,
91
+ classes: s.classes,
92
+ style: "",
93
+ // styles.style,
94
+ id: o + H,
95
+ domId: R(o, S, Y),
96
+ type: "group",
97
+ padding: 0
98
+ //getConfig().flowchart.padding
99
+ };
100
+ S++;
101
+ const D = o + H;
102
+ e.setNode(D, E), e.setNode(d.id, d), e.setNode(o, _), e.setParent(o, D), e.setParent(d.id, D);
103
+ let p = o, b = d.id;
104
+ t.note.position === "left of" && (p = d.id, b = o), e.setEdge(p, b, {
105
+ arrowhead: "none",
106
+ arrowType: "",
107
+ style: W,
108
+ labelStyle: "",
109
+ classes: _t,
110
+ arrowheadStyle: z,
111
+ labelpos: j,
112
+ labelType: q,
113
+ thickness: K
114
+ });
115
+ } else
116
+ e.setNode(o, _);
117
+ }
118
+ 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, i, c, !r));
119
+ }, Ct = (e, n, t, i, c, r) => {
120
+ T.trace("items", t), t.forEach((o) => {
121
+ switch (o.stmt) {
122
+ case I:
123
+ A(e, n, o, i, c, r);
124
+ break;
125
+ case U:
126
+ A(e, n, o, i, c, r);
127
+ break;
128
+ case F:
129
+ {
130
+ A(e, n, o.state1, i, c, r), A(e, n, o.state2, i, c, r);
131
+ const a = {
132
+ id: "edge" + S,
133
+ arrowhead: "normal",
134
+ arrowTypeEnd: "arrow_barb",
135
+ style: W,
136
+ labelStyle: "",
137
+ label: w.sanitizeText(o.description, g()),
138
+ arrowheadStyle: z,
139
+ labelpos: j,
140
+ labelType: q,
141
+ thickness: K,
142
+ classes: V
143
+ };
144
+ e.setEdge(o.state1.id, o.state2.id, a, S), S++;
145
+ }
146
+ break;
147
+ }
148
+ });
149
+ }, G = (e, n = tt) => {
150
+ let t = n;
151
+ if (e.doc)
152
+ for (let i = 0; i < e.doc.length; i++) {
153
+ const c = e.doc[i];
154
+ c.stmt === "dir" && (t = c.value);
155
+ }
156
+ return t;
157
+ }, Rt = function(e, n, t, i) {
158
+ return B(this, null, function* () {
159
+ T.info("Drawing state diagram (v2)", n), y = {}, i.db.getDirection();
160
+ const { securityLevel: c, state: r } = g(), o = r.nodeSpacing || 50, a = r.rankSpacing || 50;
161
+ T.info(i.db.getRootDocV2()), i.db.extract(i.db.getRootDocV2()), T.info(i.db.getRootDocV2());
162
+ const l = i.db.getStates(), s = new et({
163
+ multigraph: !0,
164
+ compound: !0
165
+ }).setGraph({
166
+ rankdir: G(i.db.getRootDocV2()),
167
+ nodesep: o,
168
+ ranksep: a,
169
+ marginx: 8,
170
+ marginy: 8
171
+ }).setDefaultEdgeLabel(function() {
172
+ return {};
173
+ });
174
+ A(s, void 0, i.db.getRootDocV2(), l, i.db, !0);
175
+ let _;
176
+ c === "sandbox" && (_ = x("#i" + n));
177
+ const d = c === "sandbox" ? x(_.nodes()[0].contentDocument.body) : x("body"), E = d.select(`[id="${n}"]`), D = d.select("#" + n + " g");
178
+ yield nt(D, s, ["barb"], u, n);
179
+ const p = 8;
180
+ ot.insertTitle(E, "statediagramTitleText", r.titleTopMargin, i.db.getDiagramTitle());
181
+ const b = E.node().getBBox(), L = b.width + p * 2, P = b.height + p * 2;
182
+ E.attr("class", u);
183
+ const O = E.node().getBBox();
184
+ st(E, P, L, r.useMaxWidth);
185
+ const k = `${O.x - p} ${O.y - p} ${L} ${P}`;
186
+ T.debug(`viewBox ${k}`), E.attr("viewBox", k);
187
+ const J = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
188
+ for (const $ of J) {
189
+ const v = $.getBBox(), f = document.createElementNS("http://www.w3.org/2000/svg", h);
190
+ f.setAttribute("rx", 0), f.setAttribute("ry", 0), f.setAttribute("width", v.width), f.setAttribute("height", v.height), $.insertBefore(f, $.firstChild);
191
+ }
192
+ });
193
+ }, wt = {
194
+ setConf: gt,
195
+ getClasses: $t,
196
+ draw: Rt
197
+ }, Yt = {
198
+ parser: Q,
199
+ db: M,
200
+ renderer: wt,
201
+ styles: X,
202
+ init: (e) => {
203
+ e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
204
+ }
205
+ };
206
+ export {
207
+ Yt as diagram
208
+ };