lowcoder-comps 0.0.19 → 0.0.21

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 (78) hide show
  1. package/04ea1009.js +985 -0
  2. package/0a1968f4.js +832 -0
  3. package/256b619e.js +92 -0
  4. package/2768fdea.js +275 -0
  5. package/2ff2c7a6.js +6 -0
  6. package/3087113d.js +1032 -0
  7. package/31b1cdd2.js +236 -0
  8. package/39f71758.js +849 -0
  9. package/3bd738e9.js +212 -0
  10. package/450c6bd6.js +447 -0
  11. package/4d1cf087.js +2679 -0
  12. package/54511d22.js +451 -0
  13. package/59cbb8ee.js +2456 -0
  14. package/62c916e0.js +86 -0
  15. package/74645131.js +1246 -0
  16. package/75095038.js +159 -0
  17. package/7c62ef63.js +34 -0
  18. package/8219433d.js +18619 -0
  19. package/86a4a706.js +1118 -0
  20. package/88c87bf8.js +943 -0
  21. package/8d8e98a7.js +365 -0
  22. package/9200edf7.js +70 -0
  23. package/9f3281b9.js +117321 -0
  24. package/a6e7fb9e.js +326 -0
  25. package/acdad8f2.js +7 -0
  26. package/b38c288b.js +24 -0
  27. package/ba44e76c.js +46688 -0
  28. package/cbee3d44.js +607 -0
  29. package/cc0f1351.js +793 -0
  30. package/e614be0d.js +91 -0
  31. package/f40ee59a.js +940 -0
  32. package/f576ac90.js +798 -0
  33. package/f9637058.js +16 -0
  34. package/fb09e069.js +1602 -0
  35. package/fc5c5300.js +2103 -0
  36. package/fe636892.js +823 -0
  37. package/fea654db.js +2827 -0
  38. package/index.js +5 -0
  39. package/package.json +4 -3
  40. package/README.md +0 -27
  41. package/index.html +0 -26
  42. package/index.tsx +0 -19
  43. package/jest.config.js +0 -6
  44. package/src/__test__/allComp.test.tsx +0 -61
  45. package/src/app-env.d.ts +0 -3
  46. package/src/comps/calendarComp/calendarComp.tsx +0 -443
  47. package/src/comps/calendarComp/calendarConstants.tsx +0 -898
  48. package/src/comps/chartComp/chartComp.tsx +0 -356
  49. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
  50. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
  51. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -9
  52. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
  53. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
  54. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
  55. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
  56. package/src/comps/chartComp/chartConstants.tsx +0 -288
  57. package/src/comps/chartComp/chartPropertyView.tsx +0 -218
  58. package/src/comps/chartComp/chartUtils.ts +0 -291
  59. package/src/comps/chartComp/reactEcharts/core.tsx +0 -194
  60. package/src/comps/chartComp/reactEcharts/index.ts +0 -21
  61. package/src/comps/chartComp/reactEcharts/types.ts +0 -76
  62. package/src/comps/chartComp/seriesComp.tsx +0 -119
  63. package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
  64. package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
  65. package/src/comps/imageEditorComp/index.tsx +0 -184
  66. package/src/comps/mermaidComp/index.tsx +0 -44
  67. package/src/comps/mermaidComp/mermaid.tsx +0 -29
  68. package/src/global.ts +0 -1
  69. package/src/i18n/comps/index.tsx +0 -29
  70. package/src/i18n/comps/locales/en.ts +0 -150
  71. package/src/i18n/comps/locales/enObj.tsx +0 -198
  72. package/src/i18n/comps/locales/index.ts +0 -7
  73. package/src/i18n/comps/locales/types.tsx +0 -10
  74. package/src/i18n/comps/locales/zh.ts +0 -145
  75. package/src/i18n/comps/locales/zhObj.tsx +0 -4
  76. package/src/index.ts +0 -11
  77. package/tsconfig.json +0 -22
  78. package/vite.config.js +0 -10
package/31b1cdd2.js ADDED
@@ -0,0 +1,236 @@
1
+ var F = Object.defineProperty;
2
+ var A = Object.getOwnPropertySymbols;
3
+ var H = Object.prototype.hasOwnProperty, V = Object.prototype.propertyIsEnumerable;
4
+ var $ = (l, t, n) => t in l ? F(l, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[t] = n, k = (l, t) => {
5
+ for (var n in t || (t = {}))
6
+ H.call(t, n) && $(l, n, t[n]);
7
+ if (A)
8
+ for (var n of A(t))
9
+ V.call(t, n) && $(l, n, t[n]);
10
+ return l;
11
+ };
12
+ var I = (l, t, n) => new Promise((i, e) => {
13
+ var c = (o) => {
14
+ try {
15
+ r(n.next(o));
16
+ } catch (a) {
17
+ e(a);
18
+ }
19
+ }, s = (o) => {
20
+ try {
21
+ r(n.throw(o));
22
+ } catch (a) {
23
+ e(a);
24
+ }
25
+ }, r = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(c, s);
26
+ r((n = n.apply(l, t)).next());
27
+ });
28
+ import { p as W, d as M, s as J } from "./3087113d.js";
29
+ import { l as p, c as d, h as S, x as K, t as Q, r as B, o as G, p as U, j as z } from "./9f3281b9.js";
30
+ import { G as X } from "./4d1cf087.js";
31
+ import { r as Y } from "./8d8e98a7.js";
32
+ import "./39f71758.js";
33
+ import "./fea654db.js";
34
+ import "./75095038.js";
35
+ import "./7c62ef63.js";
36
+ import "./2ff2c7a6.js";
37
+ import "./256b619e.js";
38
+ const L = (l) => z.sanitizeText(l, d());
39
+ let T = {
40
+ dividerMargin: 10,
41
+ padding: 5,
42
+ textHeight: 10,
43
+ curve: void 0
44
+ };
45
+ const Z = function(l, t, n, i) {
46
+ const e = Object.keys(l);
47
+ p.info("keys:", e), p.info(l), e.forEach(function(c) {
48
+ var y;
49
+ var s, r;
50
+ const o = l[c], f = {
51
+ shape: "rect",
52
+ id: o.id,
53
+ domId: o.domId,
54
+ labelText: L(o.id),
55
+ labelStyle: "",
56
+ style: "fill: none; stroke: black",
57
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
58
+ padding: (y = (s = d().flowchart) == null ? void 0 : s.padding) != null ? y : (r = d().class) == null ? void 0 : r.padding
59
+ };
60
+ t.setNode(o.id, f), P(o.classes, t, n, i, o.id), p.info("setNode", f);
61
+ });
62
+ }, P = function(l, t, n, i, e) {
63
+ const c = Object.keys(l);
64
+ p.info("keys:", c), p.info(l), c.filter((s) => l[s].parent == e).forEach(function(s) {
65
+ var x, h;
66
+ var r, o;
67
+ const a = l[s], f = a.cssClasses.join(" "), y = { labelStyle: "", style: "" }, v = (x = a.label) != null ? x : a.id, b = 0, m = "class_box", u = {
68
+ labelStyle: y.labelStyle,
69
+ shape: m,
70
+ labelText: L(v),
71
+ classData: a,
72
+ rx: b,
73
+ ry: b,
74
+ class: f,
75
+ style: y.style,
76
+ id: a.id,
77
+ domId: a.domId,
78
+ tooltip: i.db.getTooltip(a.id, e) || "",
79
+ haveCallback: a.haveCallback,
80
+ link: a.link,
81
+ width: a.type === "group" ? 500 : void 0,
82
+ type: a.type,
83
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
84
+ padding: (h = (r = d().flowchart) == null ? void 0 : r.padding) != null ? h : (o = d().class) == null ? void 0 : o.padding
85
+ };
86
+ t.setNode(a.id, u), e && t.setParent(a.id, e), p.info("setNode", u);
87
+ });
88
+ }, j = function(l, t, n, i) {
89
+ p.info(l), l.forEach(function(e, c) {
90
+ var h;
91
+ var s, r;
92
+ const o = e, a = "", f = { labelStyle: "", style: "" }, y = o.text, v = 0, b = "note", m = {
93
+ labelStyle: f.labelStyle,
94
+ shape: b,
95
+ labelText: L(y),
96
+ noteData: o,
97
+ rx: v,
98
+ ry: v,
99
+ class: a,
100
+ style: f.style,
101
+ id: o.id,
102
+ domId: o.id,
103
+ tooltip: "",
104
+ type: "note",
105
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
106
+ padding: (h = (s = d().flowchart) == null ? void 0 : s.padding) != null ? h : (r = d().class) == null ? void 0 : r.padding
107
+ };
108
+ if (t.setNode(o.id, m), p.info("setNode", m), !o.class || !(o.class in i))
109
+ return;
110
+ const u = n + c, x = {
111
+ id: `edgeNote${u}`,
112
+ //Set relationship style and line type
113
+ classes: "relation",
114
+ pattern: "dotted",
115
+ // Set link type for rendering
116
+ arrowhead: "none",
117
+ //Set edge extra labels
118
+ startLabelRight: "",
119
+ endLabelLeft: "",
120
+ //Set relation arrow types
121
+ arrowTypeStart: "none",
122
+ arrowTypeEnd: "none",
123
+ style: "fill:none",
124
+ labelStyle: "",
125
+ curve: B(T.curve, G)
126
+ };
127
+ t.setEdge(o.id, o.class, x, u);
128
+ });
129
+ }, O = function(l, t) {
130
+ const n = d().flowchart;
131
+ let i = 0;
132
+ l.forEach(function(e) {
133
+ var r;
134
+ var c;
135
+ i++;
136
+ const s = {
137
+ //Set relationship style and line type
138
+ classes: "relation",
139
+ pattern: e.relation.lineType == 1 ? "dashed" : "solid",
140
+ id: "id" + i,
141
+ // Set link type for rendering
142
+ arrowhead: e.type === "arrow_open" ? "none" : "normal",
143
+ //Set edge extra labels
144
+ startLabelRight: e.relationTitle1 === "none" ? "" : e.relationTitle1,
145
+ endLabelLeft: e.relationTitle2 === "none" ? "" : e.relationTitle2,
146
+ //Set relation arrow types
147
+ arrowTypeStart: R(e.relation.type1),
148
+ arrowTypeEnd: R(e.relation.type2),
149
+ style: "fill:none",
150
+ labelStyle: "",
151
+ curve: B(n == null ? void 0 : n.curve, G)
152
+ };
153
+ if (p.info(s, e), e.style !== void 0) {
154
+ const o = U(e.style);
155
+ s.style = o.style, s.labelStyle = o.labelStyle;
156
+ }
157
+ e.text = e.title, e.text === void 0 ? e.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">' + e.text + "</span>") : (s.labelType = "text", s.label = e.text.replace(z.lineBreakRegex, `
158
+ `), e.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), t.setEdge(e.id1, e.id2, s, i);
159
+ });
160
+ }, ee = function(l) {
161
+ T = k(k({}, T), l);
162
+ }, te = function(l, t, n, i) {
163
+ return I(this, null, function* () {
164
+ var h, N, D, E;
165
+ p.info("Drawing class - ", t);
166
+ const e = (h = d().flowchart) != null ? h : d().class, c = d().securityLevel;
167
+ p.info("config:", e);
168
+ const s = (N = e == null ? void 0 : e.nodeSpacing) != null ? N : 50, r = (D = e == null ? void 0 : e.rankSpacing) != null ? D : 50, o = new X({
169
+ multigraph: !0,
170
+ compound: !0
171
+ }).setGraph({
172
+ rankdir: i.db.getDirection(),
173
+ nodesep: s,
174
+ ranksep: r,
175
+ marginx: 8,
176
+ marginy: 8
177
+ }).setDefaultEdgeLabel(function() {
178
+ return {};
179
+ }), a = i.db.getNamespaces(), f = i.db.getClasses(), y = i.db.getRelations(), v = i.db.getNotes();
180
+ p.info(y), Z(a, o, t, i), P(f, o, t, i), O(y, o), j(v, o, y.length + 1, f);
181
+ let b;
182
+ c === "sandbox" && (b = S("#i" + t));
183
+ const m = c === "sandbox" ? S(b.nodes()[0].contentDocument.body) : S("body"), u = m.select(`[id="${t}"]`), x = m.select("#" + t + " g");
184
+ if (yield Y(
185
+ x,
186
+ o,
187
+ ["aggregation", "extension", "composition", "dependency", "lollipop"],
188
+ "classDiagram",
189
+ t
190
+ ), K.insertTitle(u, "classTitleText", (E = e == null ? void 0 : e.titleTopMargin) != null ? E : 5, i.db.getDiagramTitle()), Q(o, u, e == null ? void 0 : e.diagramPadding, e == null ? void 0 : e.useMaxWidth), !(e != null && e.htmlLabels)) {
191
+ const _ = c === "sandbox" ? b.nodes()[0].contentDocument : document, q = _.querySelectorAll('[id="' + t + '"] .edgeLabel .label');
192
+ for (const w of q) {
193
+ const C = w.getBBox(), g = _.createElementNS("http://www.w3.org/2000/svg", "rect");
194
+ g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", C.width), g.setAttribute("height", C.height), w.insertBefore(g, w.firstChild);
195
+ }
196
+ }
197
+ });
198
+ };
199
+ function R(l) {
200
+ let t;
201
+ switch (l) {
202
+ case 0:
203
+ t = "aggregation";
204
+ break;
205
+ case 1:
206
+ t = "extension";
207
+ break;
208
+ case 2:
209
+ t = "composition";
210
+ break;
211
+ case 3:
212
+ t = "dependency";
213
+ break;
214
+ case 4:
215
+ t = "lollipop";
216
+ break;
217
+ default:
218
+ t = "none";
219
+ }
220
+ return t;
221
+ }
222
+ const oe = {
223
+ setConf: ee,
224
+ draw: te
225
+ }, be = {
226
+ parser: W,
227
+ db: M,
228
+ renderer: oe,
229
+ styles: J,
230
+ init: (l) => {
231
+ l.class || (l.class = {}), l.class.arrowMarkerAbsolute = l.arrowMarkerAbsolute, M.clear();
232
+ }
233
+ };
234
+ export {
235
+ be as diagram
236
+ };