lowcoder-comps 0.0.18 → 0.0.19

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/README.md +27 -0
  2. package/index.html +26 -0
  3. package/index.tsx +19 -0
  4. package/jest.config.js +6 -0
  5. package/package.json +3 -4
  6. package/src/__test__/allComp.test.tsx +61 -0
  7. package/src/app-env.d.ts +3 -0
  8. package/src/comps/calendarComp/calendarComp.tsx +443 -0
  9. package/src/comps/calendarComp/calendarConstants.tsx +898 -0
  10. package/src/comps/chartComp/chartComp.tsx +356 -0
  11. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +51 -0
  12. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +307 -0
  13. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +9 -0
  14. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +55 -0
  15. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +96 -0
  16. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +83 -0
  17. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +62 -0
  18. package/src/comps/chartComp/chartConstants.tsx +288 -0
  19. package/src/comps/chartComp/chartPropertyView.tsx +218 -0
  20. package/src/comps/chartComp/chartUtils.ts +291 -0
  21. package/src/comps/chartComp/reactEcharts/core.tsx +194 -0
  22. package/src/comps/chartComp/reactEcharts/index.ts +21 -0
  23. package/src/comps/chartComp/reactEcharts/types.ts +76 -0
  24. package/src/comps/chartComp/seriesComp.tsx +119 -0
  25. package/src/comps/imageEditorComp/imageEditorClass.tsx +52 -0
  26. package/src/comps/imageEditorComp/imageEditorConstants.tsx +109 -0
  27. package/src/comps/imageEditorComp/index.tsx +184 -0
  28. package/src/comps/mermaidComp/index.tsx +44 -0
  29. package/src/comps/mermaidComp/mermaid.tsx +29 -0
  30. package/src/global.ts +1 -0
  31. package/src/i18n/comps/index.tsx +29 -0
  32. package/src/i18n/comps/locales/en.ts +150 -0
  33. package/src/i18n/comps/locales/enObj.tsx +198 -0
  34. package/src/i18n/comps/locales/index.ts +7 -0
  35. package/src/i18n/comps/locales/types.tsx +10 -0
  36. package/src/i18n/comps/locales/zh.ts +145 -0
  37. package/src/i18n/comps/locales/zhObj.tsx +4 -0
  38. package/src/index.ts +11 -0
  39. package/tsconfig.json +22 -0
  40. package/vite.config.js +10 -0
  41. package/0d763a87.js +0 -798
  42. package/1813144f.js +0 -940
  43. package/2039ece8.js +0 -91
  44. package/256b619e.js +0 -92
  45. package/2ff2c7a6.js +0 -6
  46. package/372dc2a7.js +0 -365
  47. package/3b12eb0e.js +0 -2103
  48. package/3c0b160f.js +0 -236
  49. package/401f73a2.js +0 -1602
  50. package/4137766d.js +0 -86
  51. package/4728777d.js +0 -447
  52. package/4881ced8.js +0 -943
  53. package/50cdd04e.js +0 -823
  54. package/5a46ac81.js +0 -1118
  55. package/6737b605.js +0 -985
  56. package/6a3117df.js +0 -159
  57. package/6add348f.js +0 -2456
  58. package/7aa956be.js +0 -326
  59. package/80fe4e54.js +0 -24
  60. package/847d7b9d.js +0 -7
  61. package/8c3bb161.js +0 -18619
  62. package/8edfc14c.js +0 -1246
  63. package/a96f93b1.js +0 -1032
  64. package/b680d6c7.js +0 -70
  65. package/babb4d5d.js +0 -832
  66. package/bfa09fb0.js +0 -607
  67. package/c1008714.js +0 -275
  68. package/ca536ab8.js +0 -117238
  69. package/cb157d73.js +0 -849
  70. package/ce50b2ed.js +0 -2679
  71. package/d4fa84c2.js +0 -212
  72. package/d7fee54a.js +0 -451
  73. package/e1a22e9d.js +0 -34
  74. package/e1cbc8ec.js +0 -46688
  75. package/f9637058.js +0 -16
  76. package/fbeabd79.js +0 -793
  77. package/fc3693cc.js +0 -2827
  78. package/index.js +0 -5
package/7aa956be.js DELETED
@@ -1,326 +0,0 @@
1
- import { l as N, c as M, h as O } from "./ca536ab8.js";
2
- var $ = function() {
3
- var c = function(h, t, e, n) {
4
- for (e = e || {}, n = h.length; n--; e[h[n]] = t)
5
- ;
6
- return e;
7
- }, f = [6, 9, 10], d = {
8
- trace: function() {
9
- },
10
- yy: {},
11
- symbols_: { error: 2, start: 3, info: 4, document: 5, EOF: 6, line: 7, statement: 8, NL: 9, showInfo: 10, $accept: 0, $end: 1 },
12
- terminals_: { 2: "error", 4: "info", 6: "EOF", 9: "NL", 10: "showInfo" },
13
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 1], [7, 1], [8, 1]],
14
- performAction: function(t, e, n, s, r, i, k) {
15
- switch (i.length - 1, r) {
16
- case 1:
17
- return s;
18
- case 4:
19
- break;
20
- case 6:
21
- s.setInfo(!0);
22
- break;
23
- }
24
- },
25
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, c(f, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, c(f, [2, 3]), c(f, [2, 4]), c(f, [2, 5]), c(f, [2, 6])],
26
- defaultActions: { 4: [2, 1] },
27
- parseError: function(t, e) {
28
- if (e.recoverable)
29
- this.trace(t);
30
- else {
31
- var n = new Error(t);
32
- throw n.hash = e, n;
33
- }
34
- },
35
- parse: function(t) {
36
- var e = this, n = [0], s = [], r = [null], i = [], k = this.table, L = "", b = 0, T = 0, z = 2, F = 1, D = i.slice.call(arguments, 1), o = Object.create(this.lexer), g = { yy: {} };
37
- for (var E in this.yy)
38
- Object.prototype.hasOwnProperty.call(this.yy, E) && (g.yy[E] = this.yy[E]);
39
- o.setInput(t, g.yy), g.yy.lexer = o, g.yy.parser = this, typeof o.yylloc == "undefined" && (o.yylloc = {});
40
- var w = o.yylloc;
41
- i.push(w);
42
- var U = o.options && o.options.ranges;
43
- typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
44
- function Y() {
45
- var u;
46
- return u = s.pop() || o.lex() || F, typeof u != "number" && (u instanceof Array && (s = u, u = s.pop()), u = e.symbols_[u] || u), u;
47
- }
48
- for (var l, _, a, I, m = {}, v, y, j, S; ; ) {
49
- if (_ = n[n.length - 1], this.defaultActions[_] ? a = this.defaultActions[_] : ((l === null || typeof l == "undefined") && (l = Y()), a = k[_] && k[_][l]), typeof a == "undefined" || !a.length || !a[0]) {
50
- var A = "";
51
- S = [];
52
- for (v in k[_])
53
- this.terminals_[v] && v > z && S.push("'" + this.terminals_[v] + "'");
54
- o.showPosition ? A = "Parse error on line " + (b + 1) + `:
55
- ` + o.showPosition() + `
56
- Expecting ` + S.join(", ") + ", got '" + (this.terminals_[l] || l) + "'" : A = "Parse error on line " + (b + 1) + ": Unexpected " + (l == F ? "end of input" : "'" + (this.terminals_[l] || l) + "'"), this.parseError(A, {
57
- text: o.match,
58
- token: this.terminals_[l] || l,
59
- line: o.yylineno,
60
- loc: w,
61
- expected: S
62
- });
63
- }
64
- if (a[0] instanceof Array && a.length > 1)
65
- throw new Error("Parse Error: multiple actions possible at state: " + _ + ", token: " + l);
66
- switch (a[0]) {
67
- case 1:
68
- n.push(l), r.push(o.yytext), i.push(o.yylloc), n.push(a[1]), l = null, T = o.yyleng, L = o.yytext, b = o.yylineno, w = o.yylloc;
69
- break;
70
- case 2:
71
- if (y = this.productions_[a[1]][1], m.$ = r[r.length - y], m._$ = {
72
- first_line: i[i.length - (y || 1)].first_line,
73
- last_line: i[i.length - 1].last_line,
74
- first_column: i[i.length - (y || 1)].first_column,
75
- last_column: i[i.length - 1].last_column
76
- }, U && (m._$.range = [
77
- i[i.length - (y || 1)].range[0],
78
- i[i.length - 1].range[1]
79
- ]), I = this.performAction.apply(m, [
80
- L,
81
- T,
82
- b,
83
- g.yy,
84
- a[1],
85
- r,
86
- i
87
- ].concat(D)), typeof I != "undefined")
88
- return I;
89
- y && (n = n.slice(0, -1 * y * 2), r = r.slice(0, -1 * y), i = i.slice(0, -1 * y)), n.push(this.productions_[a[1]][0]), r.push(m.$), i.push(m._$), j = k[n[n.length - 2]][n[n.length - 1]], n.push(j);
90
- break;
91
- case 3:
92
- return !0;
93
- }
94
- }
95
- return !0;
96
- }
97
- }, x = function() {
98
- var h = {
99
- EOF: 1,
100
- parseError: function(e, n) {
101
- if (this.yy.parser)
102
- this.yy.parser.parseError(e, n);
103
- else
104
- throw new Error(e);
105
- },
106
- // resets the lexer, sets new input
107
- setInput: function(t, e) {
108
- return this.yy = e || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
109
- first_line: 1,
110
- first_column: 0,
111
- last_line: 1,
112
- last_column: 0
113
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
114
- },
115
- // consumes and returns one char from the input
116
- input: function() {
117
- var t = this._input[0];
118
- this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
119
- var e = t.match(/(?:\r\n?|\n).*/g);
120
- return e ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
121
- },
122
- // unshifts one char (or a string) into the input
123
- unput: function(t) {
124
- var e = t.length, n = t.split(/(?:\r\n?|\n)/g);
125
- this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e), this.offset -= e;
126
- var s = this.match.split(/(?:\r\n?|\n)/g);
127
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
128
- var r = this.yylloc.range;
129
- return this.yylloc = {
130
- first_line: this.yylloc.first_line,
131
- last_line: this.yylineno + 1,
132
- first_column: this.yylloc.first_column,
133
- last_column: n ? (n.length === s.length ? this.yylloc.first_column : 0) + s[s.length - n.length].length - n[0].length : this.yylloc.first_column - e
134
- }, this.options.ranges && (this.yylloc.range = [r[0], r[0] + this.yyleng - e]), this.yyleng = this.yytext.length, this;
135
- },
136
- // When called from action, caches matched text and appends it on next action
137
- more: function() {
138
- return this._more = !0, this;
139
- },
140
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
141
- reject: function() {
142
- if (this.options.backtrack_lexer)
143
- this._backtrack = !0;
144
- else
145
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
146
- ` + this.showPosition(), {
147
- text: "",
148
- token: null,
149
- line: this.yylineno
150
- });
151
- return this;
152
- },
153
- // retain first n characters of the match
154
- less: function(t) {
155
- this.unput(this.match.slice(t));
156
- },
157
- // displays already matched input, i.e. for error messages
158
- pastInput: function() {
159
- var t = this.matched.substr(0, this.matched.length - this.match.length);
160
- return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
161
- },
162
- // displays upcoming input, i.e. for error messages
163
- upcomingInput: function() {
164
- var t = this.match;
165
- return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
166
- },
167
- // displays the character position where the lexing error occurred, i.e. for error messages
168
- showPosition: function() {
169
- var t = this.pastInput(), e = new Array(t.length + 1).join("-");
170
- return t + this.upcomingInput() + `
171
- ` + e + "^";
172
- },
173
- // test the lexed token: return FALSE when not a match, otherwise return token
174
- test_match: function(t, e) {
175
- var n, s, r;
176
- if (this.options.backtrack_lexer && (r = {
177
- yylineno: this.yylineno,
178
- yylloc: {
179
- first_line: this.yylloc.first_line,
180
- last_line: this.last_line,
181
- first_column: this.yylloc.first_column,
182
- last_column: this.yylloc.last_column
183
- },
184
- yytext: this.yytext,
185
- match: this.match,
186
- matches: this.matches,
187
- matched: this.matched,
188
- yyleng: this.yyleng,
189
- offset: this.offset,
190
- _more: this._more,
191
- _input: this._input,
192
- yy: this.yy,
193
- conditionStack: this.conditionStack.slice(0),
194
- done: this.done
195
- }, this.options.ranges && (r.yylloc.range = this.yylloc.range.slice(0))), s = t[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
196
- first_line: this.yylloc.last_line,
197
- last_line: this.yylineno + 1,
198
- first_column: this.yylloc.last_column,
199
- last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
200
- }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, e, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
201
- return n;
202
- if (this._backtrack) {
203
- for (var i in r)
204
- this[i] = r[i];
205
- return !1;
206
- }
207
- return !1;
208
- },
209
- // return next match in input
210
- next: function() {
211
- if (this.done)
212
- return this.EOF;
213
- this._input || (this.done = !0);
214
- var t, e, n, s;
215
- this._more || (this.yytext = "", this.match = "");
216
- for (var r = this._currentRules(), i = 0; i < r.length; i++)
217
- if (n = this._input.match(this.rules[r[i]]), n && (!e || n[0].length > e[0].length)) {
218
- if (e = n, s = i, this.options.backtrack_lexer) {
219
- if (t = this.test_match(n, r[i]), t !== !1)
220
- return t;
221
- if (this._backtrack) {
222
- e = !1;
223
- continue;
224
- } else
225
- return !1;
226
- } else if (!this.options.flex)
227
- break;
228
- }
229
- return e ? (t = this.test_match(e, r[s]), t !== !1 ? t : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
230
- ` + this.showPosition(), {
231
- text: "",
232
- token: null,
233
- line: this.yylineno
234
- });
235
- },
236
- // return next match that has a token
237
- lex: function() {
238
- var e = this.next();
239
- return e || this.lex();
240
- },
241
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
242
- begin: function(e) {
243
- this.conditionStack.push(e);
244
- },
245
- // pop the previously active lexer condition state off the condition stack
246
- popState: function() {
247
- var e = this.conditionStack.length - 1;
248
- return e > 0 ? this.conditionStack.pop() : this.conditionStack[0];
249
- },
250
- // produce the lexer rule set which is active for the currently active lexer condition state
251
- _currentRules: function() {
252
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
253
- },
254
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
255
- topState: function(e) {
256
- return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
257
- },
258
- // alias for begin(condition)
259
- pushState: function(e) {
260
- this.begin(e);
261
- },
262
- // return the number of states currently on the stack
263
- stateStackSize: function() {
264
- return this.conditionStack.length;
265
- },
266
- options: { "case-insensitive": !0 },
267
- performAction: function(e, n, s, r) {
268
- switch (s) {
269
- case 0:
270
- return 4;
271
- case 1:
272
- return 9;
273
- case 2:
274
- return "space";
275
- case 3:
276
- return 10;
277
- case 4:
278
- return 6;
279
- case 5:
280
- return "TXT";
281
- }
282
- },
283
- rules: [/^(?:info\b)/i, /^(?:[\s\n\r]+)/i, /^(?:[\s]+)/i, /^(?:showInfo\b)/i, /^(?:$)/i, /^(?:.)/i],
284
- conditions: { INITIAL: { rules: [0, 1, 2, 3, 4, 5], inclusive: !0 } }
285
- };
286
- return h;
287
- }();
288
- d.lexer = x;
289
- function p() {
290
- this.yy = {};
291
- }
292
- return p.prototype = d, d.Parser = p, new p();
293
- }();
294
- $.parser = $;
295
- const B = $, R = {
296
- info: !1
297
- };
298
- let P = R.info;
299
- const C = (c) => {
300
- P = c;
301
- }, V = () => P, X = () => {
302
- P = R.info;
303
- }, q = {
304
- clear: X,
305
- setInfo: C,
306
- getInfo: V
307
- }, G = (c, f, d) => {
308
- try {
309
- N.debug(`rendering info diagram
310
- ` + c);
311
- const { securityLevel: x } = M();
312
- let p, h;
313
- x === "sandbox" && (p = O("#i" + f), h = p.nodes()[0].contentDocument);
314
- const e = (p !== void 0 && h !== void 0 && h !== null ? O(h) : O("body")).select("#" + f);
315
- e.attr("height", 100), e.attr("width", 400), e.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", "32px").style("text-anchor", "middle").text("v " + d);
316
- } catch (x) {
317
- N.error("error while rendering info diagram", x);
318
- }
319
- }, H = { draw: G }, K = {
320
- parser: B,
321
- db: q,
322
- renderer: H
323
- };
324
- export {
325
- K as diagram
326
- };
package/80fe4e54.js DELETED
@@ -1,24 +0,0 @@
1
- import { p as e, f as o } from "./5a46ac81.js";
2
- import { f as t, g as a } from "./d7fee54a.js";
3
- import { u as s } from "./ca536ab8.js";
4
- import "./ce50b2ed.js";
5
- import "./372dc2a7.js";
6
- import "./cb157d73.js";
7
- import "./fc3693cc.js";
8
- import "./6a3117df.js";
9
- import "./e1a22e9d.js";
10
- import "./2ff2c7a6.js";
11
- import "./256b619e.js";
12
- import "./847d7b9d.js";
13
- const A = {
14
- parser: e,
15
- db: o,
16
- renderer: t,
17
- styles: a,
18
- init: (r) => {
19
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, s({ flowchart: { arrowMarkerAbsolute: r.arrowMarkerAbsolute } }), t.setConf(r.flowchart), o.clear(), o.setGen("gen-2");
20
- }
21
- };
22
- export {
23
- A as diagram
24
- };
package/847d7b9d.js DELETED
@@ -1,7 +0,0 @@
1
- import { a1 as t, a2 as n, a3 as o } from "./ca536ab8.js";
2
- function r(e) {
3
- return typeof e == "string" ? new t([document.querySelectorAll(e)], [document.documentElement]) : new t([o(e)], n);
4
- }
5
- export {
6
- r as s
7
- };