lowcoder-comps 0.0.31 → 0.0.32

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 (86) hide show
  1. package/1e5cb9c2.js +447 -0
  2. package/24307cf2.js +25 -0
  3. package/256b619e.js +92 -0
  4. package/2b031be2.js +2967 -0
  5. package/2ff2c7a6.js +6 -0
  6. package/2ff7471d.js +9 -0
  7. package/444e09f1.js +268 -0
  8. package/4564a1bc.js +86 -0
  9. package/4a489df6.js +8 -0
  10. package/4a860f5d.js +505 -0
  11. package/4cc9caa5.js +2501 -0
  12. package/64d87c95.js +1536 -0
  13. package/6deaf0be.js +881 -0
  14. package/794e64d5.js +208 -0
  15. package/7a3f27e4.js +391 -0
  16. package/7ae6dd1c.js +319 -0
  17. package/92e85b65.js +65 -0
  18. package/97059d88.js +237 -0
  19. package/98955949.js +134435 -0
  20. package/a408f817.js +796 -0
  21. package/a40faea7.js +11624 -0
  22. package/a969f4ca.js +48428 -0
  23. package/aa1becc7.js +455 -0
  24. package/aa82b740.js +1269 -0
  25. package/c289b0aa.js +1102 -0
  26. package/c4d99b09.js +5 -0
  27. package/c9bb75eb.js +960 -0
  28. package/cb40fdd9.js +933 -0
  29. package/cc799554.js +1276 -0
  30. package/d3700d97.js +2284 -0
  31. package/d622fb26.js +818 -0
  32. package/d8c50a91.js +34 -0
  33. package/dce9fa3f.js +769 -0
  34. package/de8c90a7.js +1284 -0
  35. package/debd9490.js +819 -0
  36. package/df803461.js +220 -0
  37. package/e06dcfb0.js +1089 -0
  38. package/e6388bfd.js +915 -0
  39. package/ee801edf.js +804 -0
  40. package/f7c6b13d.js +19104 -0
  41. package/f8b68c1a.js +1127 -0
  42. package/f9637058.js +16 -0
  43. package/fcee2d3c.js +64 -0
  44. package/fd51bb2f.js +1579 -0
  45. package/index.js +5 -0
  46. package/package.json +4 -3
  47. package/README.md +0 -120
  48. package/index.html +0 -26
  49. package/index.tsx +0 -21
  50. package/jest.config.js +0 -6
  51. package/src/__test__/allComp.test.tsx +0 -61
  52. package/src/app-env.d.ts +0 -3
  53. package/src/comps/calendarComp/calendarComp.tsx +0 -633
  54. package/src/comps/calendarComp/calendarConstants.tsx +0 -1048
  55. package/src/comps/calendarComp/errorBoundary.tsx +0 -30
  56. package/src/comps/chartComp/chartComp.tsx +0 -442
  57. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
  58. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
  59. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -9
  60. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
  61. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
  62. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
  63. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
  64. package/src/comps/chartComp/chartConstants.tsx +0 -299
  65. package/src/comps/chartComp/chartPropertyView.tsx +0 -235
  66. package/src/comps/chartComp/chartUtils.ts +0 -291
  67. package/src/comps/chartComp/reactEcharts/core.tsx +0 -194
  68. package/src/comps/chartComp/reactEcharts/index.ts +0 -21
  69. package/src/comps/chartComp/reactEcharts/types.ts +0 -76
  70. package/src/comps/chartComp/seriesComp.tsx +0 -119
  71. package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
  72. package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
  73. package/src/comps/imageEditorComp/index.tsx +0 -184
  74. package/src/comps/mermaidComp/index.tsx +0 -44
  75. package/src/comps/mermaidComp/mermaid.tsx +0 -29
  76. package/src/global.ts +0 -1
  77. package/src/i18n/comps/index.tsx +0 -29
  78. package/src/i18n/comps/locales/en.ts +0 -163
  79. package/src/i18n/comps/locales/enObj.tsx +0 -198
  80. package/src/i18n/comps/locales/index.ts +0 -7
  81. package/src/i18n/comps/locales/types.tsx +0 -10
  82. package/src/i18n/comps/locales/zh.ts +0 -156
  83. package/src/i18n/comps/locales/zhObj.tsx +0 -4
  84. package/src/index.ts +0 -11
  85. package/tsconfig.json +0 -22
  86. package/vite.config.js +0 -10
package/7ae6dd1c.js ADDED
@@ -0,0 +1,319 @@
1
+ import { l as Y, T as D, i as M } from "./98955949.js";
2
+ var O = function() {
3
+ var a = function(u, t, e, n) {
4
+ for (e = e || {}, n = u.length; n--; e[u[n]] = t)
5
+ ;
6
+ return e;
7
+ }, f = [6, 9, 10], m = {
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, d) {
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] }, a(f, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: 6, 9: [1, 7], 10: [1, 8] }, { 1: [2, 1] }, a(f, [2, 3]), a(f, [2, 4]), a(f, [2, 5]), a(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 = [], d = this.table, P = "", v = 0, T = 0, N = 2, L = 1, R = i.slice.call(arguments, 1), o = Object.create(this.lexer), p = { yy: {} };
37
+ for (var E in this.yy)
38
+ Object.prototype.hasOwnProperty.call(this.yy, E) && (p.yy[E] = this.yy[E]);
39
+ o.setInput(t, p.yy), p.yy.lexer = o, p.yy.parser = this, typeof o.yylloc == "undefined" && (o.yylloc = {});
40
+ var I = o.yylloc;
41
+ i.push(I);
42
+ var z = o.options && o.options.ranges;
43
+ typeof p.yy.parseError == "function" ? this.parseError = p.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
44
+ function U() {
45
+ var y;
46
+ return y = s.pop() || o.lex() || L, typeof y != "number" && (y instanceof Array && (s = y, y = s.pop()), y = e.symbols_[y] || y), y;
47
+ }
48
+ for (var l, g, h, w, _ = {}, b, c, F, S; ; ) {
49
+ if (g = n[n.length - 1], this.defaultActions[g] ? h = this.defaultActions[g] : ((l === null || typeof l == "undefined") && (l = U()), h = d[g] && d[g][l]), typeof h == "undefined" || !h.length || !h[0]) {
50
+ var A = "";
51
+ S = [];
52
+ for (b in d[g])
53
+ this.terminals_[b] && b > N && S.push("'" + this.terminals_[b] + "'");
54
+ o.showPosition ? A = "Parse error on line " + (v + 1) + `:
55
+ ` + o.showPosition() + `
56
+ Expecting ` + S.join(", ") + ", got '" + (this.terminals_[l] || l) + "'" : A = "Parse error on line " + (v + 1) + ": Unexpected " + (l == L ? "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: I,
61
+ expected: S
62
+ });
63
+ }
64
+ if (h[0] instanceof Array && h.length > 1)
65
+ throw new Error("Parse Error: multiple actions possible at state: " + g + ", token: " + l);
66
+ switch (h[0]) {
67
+ case 1:
68
+ n.push(l), r.push(o.yytext), i.push(o.yylloc), n.push(h[1]), l = null, T = o.yyleng, P = o.yytext, v = o.yylineno, I = o.yylloc;
69
+ break;
70
+ case 2:
71
+ if (c = this.productions_[h[1]][1], _.$ = r[r.length - c], _._$ = {
72
+ first_line: i[i.length - (c || 1)].first_line,
73
+ last_line: i[i.length - 1].last_line,
74
+ first_column: i[i.length - (c || 1)].first_column,
75
+ last_column: i[i.length - 1].last_column
76
+ }, z && (_._$.range = [
77
+ i[i.length - (c || 1)].range[0],
78
+ i[i.length - 1].range[1]
79
+ ]), w = this.performAction.apply(_, [
80
+ P,
81
+ T,
82
+ v,
83
+ p.yy,
84
+ h[1],
85
+ r,
86
+ i
87
+ ].concat(R)), typeof w != "undefined")
88
+ return w;
89
+ c && (n = n.slice(0, -1 * c * 2), r = r.slice(0, -1 * c), i = i.slice(0, -1 * c)), n.push(this.productions_[h[1]][0]), r.push(_.$), i.push(_._$), F = d[n[n.length - 2]][n[n.length - 1]], n.push(F);
90
+ break;
91
+ case 3:
92
+ return !0;
93
+ }
94
+ }
95
+ return !0;
96
+ }
97
+ }, k = function() {
98
+ var u = {
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 u;
287
+ }();
288
+ m.lexer = k;
289
+ function x() {
290
+ this.yy = {};
291
+ }
292
+ return x.prototype = m, m.Parser = x, new x();
293
+ }();
294
+ O.parser = O;
295
+ const B = O, j = {
296
+ info: !1
297
+ };
298
+ let $ = j.info;
299
+ const V = (a) => {
300
+ $ = a;
301
+ }, X = () => $, q = () => {
302
+ $ = j.info;
303
+ }, C = {
304
+ clear: q,
305
+ setInfo: V,
306
+ getInfo: X
307
+ }, G = (a, f, m) => {
308
+ Y.debug(`rendering info diagram
309
+ ` + a);
310
+ const k = D(f);
311
+ M(k, 100, 400, !0), k.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${m}`);
312
+ }, H = { draw: G }, K = {
313
+ parser: B,
314
+ db: C,
315
+ renderer: H
316
+ };
317
+ export {
318
+ K as diagram
319
+ };
package/92e85b65.js ADDED
@@ -0,0 +1,65 @@
1
+ import { i as a } from "./f9637058.js";
2
+ class o extends Map {
3
+ constructor(n, t = g) {
4
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null)
5
+ for (const [r, s] of n)
6
+ this.set(r, s);
7
+ }
8
+ get(n) {
9
+ return super.get(c(this, n));
10
+ }
11
+ has(n) {
12
+ return super.has(c(this, n));
13
+ }
14
+ set(n, t) {
15
+ return super.set(l(this, n), t);
16
+ }
17
+ delete(n) {
18
+ return super.delete(p(this, n));
19
+ }
20
+ }
21
+ function c({ _intern: e, _key: n }, t) {
22
+ const r = n(t);
23
+ return e.has(r) ? e.get(r) : t;
24
+ }
25
+ function l({ _intern: e, _key: n }, t) {
26
+ const r = n(t);
27
+ return e.has(r) ? e.get(r) : (e.set(r, t), t);
28
+ }
29
+ function p({ _intern: e, _key: n }, t) {
30
+ const r = n(t);
31
+ return e.has(r) && (t = e.get(r), e.delete(r)), t;
32
+ }
33
+ function g(e) {
34
+ return e !== null && typeof e == "object" ? e.valueOf() : e;
35
+ }
36
+ const f = Symbol("implicit");
37
+ function h() {
38
+ var e = new o(), n = [], t = [], r = f;
39
+ function s(u) {
40
+ let i = e.get(u);
41
+ if (i === void 0) {
42
+ if (r !== f)
43
+ return r;
44
+ e.set(u, i = n.push(u) - 1);
45
+ }
46
+ return t[i % t.length];
47
+ }
48
+ return s.domain = function(u) {
49
+ if (!arguments.length)
50
+ return n.slice();
51
+ n = [], e = new o();
52
+ for (const i of u)
53
+ e.has(i) || e.set(i, n.push(i) - 1);
54
+ return s;
55
+ }, s.range = function(u) {
56
+ return arguments.length ? (t = Array.from(u), s) : t.slice();
57
+ }, s.unknown = function(u) {
58
+ return arguments.length ? (r = u, s) : r;
59
+ }, s.copy = function() {
60
+ return h(n, t).unknown(r);
61
+ }, a.apply(s, arguments), s;
62
+ }
63
+ export {
64
+ h as o
65
+ };
package/97059d88.js ADDED
@@ -0,0 +1,237 @@
1
+ var H = Object.defineProperty;
2
+ var C = Object.getOwnPropertySymbols;
3
+ var V = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
4
+ var $ = (l, e, n) => e in l ? H(l, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : l[e] = n, k = (l, e) => {
5
+ for (var n in e || (e = {}))
6
+ V.call(e, n) && $(l, n, e[n]);
7
+ if (C)
8
+ for (var n of C(e))
9
+ W.call(e, n) && $(l, n, e[n]);
10
+ return l;
11
+ };
12
+ var I = (l, e, n) => new Promise((i, t) => {
13
+ var c = (o) => {
14
+ try {
15
+ r(n.next(o));
16
+ } catch (a) {
17
+ t(a);
18
+ }
19
+ }, s = (o) => {
20
+ try {
21
+ r(n.throw(o));
22
+ } catch (a) {
23
+ t(a);
24
+ }
25
+ }, r = (o) => o.done ? i(o.value) : Promise.resolve(o.value).then(c, s);
26
+ r((n = n.apply(l, e)).next());
27
+ });
28
+ import { p as J, d as M, s as K } from "./e06dcfb0.js";
29
+ import { l as p, c as d, h as S, A as Q, t as U, o as B, q as G, n as q, j as z } from "./98955949.js";
30
+ import { G as X } from "./6deaf0be.js";
31
+ import { r as Y } from "./7a3f27e4.js";
32
+ import "./64d87c95.js";
33
+ import "./4a489df6.js";
34
+ import "./c289b0aa.js";
35
+ import "./2b031be2.js";
36
+ import "./d8c50a91.js";
37
+ import "./2ff2c7a6.js";
38
+ import "./256b619e.js";
39
+ const L = (l) => z.sanitizeText(l, d());
40
+ let T = {
41
+ dividerMargin: 10,
42
+ padding: 5,
43
+ textHeight: 10,
44
+ curve: void 0
45
+ };
46
+ const Z = function(l, e, n, i) {
47
+ const t = Object.keys(l);
48
+ p.info("keys:", t), p.info(l), t.forEach(function(c) {
49
+ var y;
50
+ var s, r;
51
+ const o = l[c], f = {
52
+ shape: "rect",
53
+ id: o.id,
54
+ domId: o.domId,
55
+ labelText: L(o.id),
56
+ labelStyle: "",
57
+ style: "fill: none; stroke: black",
58
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
59
+ padding: (y = (s = d().flowchart) == null ? void 0 : s.padding) != null ? y : (r = d().class) == null ? void 0 : r.padding
60
+ };
61
+ e.setNode(o.id, f), P(o.classes, e, n, i, o.id), p.info("setNode", f);
62
+ });
63
+ }, P = function(l, e, n, i, t) {
64
+ const c = Object.keys(l);
65
+ p.info("keys:", c), p.info(l), c.filter((s) => l[s].parent == t).forEach(function(s) {
66
+ var x, m;
67
+ var r, o;
68
+ const a = l[s], f = a.cssClasses.join(" "), y = B(a.styles), v = (x = a.label) != null ? x : a.id, b = 0, h = "class_box", u = {
69
+ labelStyle: y.labelStyle,
70
+ shape: h,
71
+ labelText: L(v),
72
+ classData: a,
73
+ rx: b,
74
+ ry: b,
75
+ class: f,
76
+ style: y.style,
77
+ id: a.id,
78
+ domId: a.domId,
79
+ tooltip: i.db.getTooltip(a.id, t) || "",
80
+ haveCallback: a.haveCallback,
81
+ link: a.link,
82
+ width: a.type === "group" ? 500 : void 0,
83
+ type: a.type,
84
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
85
+ padding: (m = (r = d().flowchart) == null ? void 0 : r.padding) != null ? m : (o = d().class) == null ? void 0 : o.padding
86
+ };
87
+ e.setNode(a.id, u), t && e.setParent(a.id, t), p.info("setNode", u);
88
+ });
89
+ }, j = function(l, e, n, i) {
90
+ p.info(l), l.forEach(function(t, c) {
91
+ var m;
92
+ var s, r;
93
+ const o = t, a = "", f = { labelStyle: "", style: "" }, y = o.text, v = 0, b = "note", h = {
94
+ labelStyle: f.labelStyle,
95
+ shape: b,
96
+ labelText: L(y),
97
+ noteData: o,
98
+ rx: v,
99
+ ry: v,
100
+ class: a,
101
+ style: f.style,
102
+ id: o.id,
103
+ domId: o.id,
104
+ tooltip: "",
105
+ type: "note",
106
+ // TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
107
+ padding: (m = (s = d().flowchart) == null ? void 0 : s.padding) != null ? m : (r = d().class) == null ? void 0 : r.padding
108
+ };
109
+ if (e.setNode(o.id, h), p.info("setNode", h), !o.class || !(o.class in i))
110
+ return;
111
+ const u = n + c, x = {
112
+ id: `edgeNote${u}`,
113
+ //Set relationship style and line type
114
+ classes: "relation",
115
+ pattern: "dotted",
116
+ // Set link type for rendering
117
+ arrowhead: "none",
118
+ //Set edge extra labels
119
+ startLabelRight: "",
120
+ endLabelLeft: "",
121
+ //Set relation arrow types
122
+ arrowTypeStart: "none",
123
+ arrowTypeEnd: "none",
124
+ style: "fill:none",
125
+ labelStyle: "",
126
+ curve: G(T.curve, q)
127
+ };
128
+ e.setEdge(o.id, o.class, x, u);
129
+ });
130
+ }, O = function(l, e) {
131
+ const n = d().flowchart;
132
+ let i = 0;
133
+ l.forEach(function(t) {
134
+ var r;
135
+ var c;
136
+ i++;
137
+ const s = {
138
+ //Set relationship style and line type
139
+ classes: "relation",
140
+ pattern: t.relation.lineType == 1 ? "dashed" : "solid",
141
+ id: `id_${t.id1}_${t.id2}_${i}`,
142
+ // Set link type for rendering
143
+ arrowhead: t.type === "arrow_open" ? "none" : "normal",
144
+ //Set edge extra labels
145
+ startLabelRight: t.relationTitle1 === "none" ? "" : t.relationTitle1,
146
+ endLabelLeft: t.relationTitle2 === "none" ? "" : t.relationTitle2,
147
+ //Set relation arrow types
148
+ arrowTypeStart: R(t.relation.type1),
149
+ arrowTypeEnd: R(t.relation.type2),
150
+ style: "fill:none",
151
+ labelStyle: "",
152
+ curve: G(n == null ? void 0 : n.curve, q)
153
+ };
154
+ if (p.info(s, t), t.style !== void 0) {
155
+ const o = B(t.style);
156
+ s.style = o.style, s.labelStyle = o.labelStyle;
157
+ }
158
+ t.text = t.title, t.text === void 0 ? t.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">' + t.text + "</span>") : (s.labelType = "text", s.label = t.text.replace(z.lineBreakRegex, `
159
+ `), t.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), e.setEdge(t.id1, t.id2, s, i);
160
+ });
161
+ }, tt = function(l) {
162
+ T = k(k({}, T), l);
163
+ }, et = function(l, e, n, i) {
164
+ return I(this, null, function* () {
165
+ var m, _, N, D;
166
+ p.info("Drawing class - ", e);
167
+ const t = (m = d().flowchart) != null ? m : d().class, c = d().securityLevel;
168
+ p.info("config:", t);
169
+ const s = (_ = t == null ? void 0 : t.nodeSpacing) != null ? _ : 50, r = (N = t == null ? void 0 : t.rankSpacing) != null ? N : 50, o = new X({
170
+ multigraph: !0,
171
+ compound: !0
172
+ }).setGraph({
173
+ rankdir: i.db.getDirection(),
174
+ nodesep: s,
175
+ ranksep: r,
176
+ marginx: 8,
177
+ marginy: 8
178
+ }).setDefaultEdgeLabel(function() {
179
+ return {};
180
+ }), a = i.db.getNamespaces(), f = i.db.getClasses(), y = i.db.getRelations(), v = i.db.getNotes();
181
+ p.info(y), Z(a, o, e, i), P(f, o, e, i), O(y, o), j(v, o, y.length + 1, f);
182
+ let b;
183
+ c === "sandbox" && (b = S("#i" + e));
184
+ const h = c === "sandbox" ? S(b.nodes()[0].contentDocument.body) : S("body"), u = h.select(`[id="${e}"]`), x = h.select("#" + e + " g");
185
+ if (yield Y(
186
+ x,
187
+ o,
188
+ ["aggregation", "extension", "composition", "dependency", "lollipop"],
189
+ "classDiagram",
190
+ e
191
+ ), Q.insertTitle(u, "classTitleText", (D = t == null ? void 0 : t.titleTopMargin) != null ? D : 5, i.db.getDiagramTitle()), U(o, u, t == null ? void 0 : t.diagramPadding, t == null ? void 0 : t.useMaxWidth), !(t != null && t.htmlLabels)) {
192
+ const E = c === "sandbox" ? b.nodes()[0].contentDocument : document, F = E.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
193
+ for (const w of F) {
194
+ const A = w.getBBox(), g = E.createElementNS("http://www.w3.org/2000/svg", "rect");
195
+ g.setAttribute("rx", 0), g.setAttribute("ry", 0), g.setAttribute("width", A.width), g.setAttribute("height", A.height), w.insertBefore(g, w.firstChild);
196
+ }
197
+ }
198
+ });
199
+ };
200
+ function R(l) {
201
+ let e;
202
+ switch (l) {
203
+ case 0:
204
+ e = "aggregation";
205
+ break;
206
+ case 1:
207
+ e = "extension";
208
+ break;
209
+ case 2:
210
+ e = "composition";
211
+ break;
212
+ case 3:
213
+ e = "dependency";
214
+ break;
215
+ case 4:
216
+ e = "lollipop";
217
+ break;
218
+ default:
219
+ e = "none";
220
+ }
221
+ return e;
222
+ }
223
+ const ot = {
224
+ setConf: tt,
225
+ draw: et
226
+ }, ut = {
227
+ parser: J,
228
+ db: M,
229
+ renderer: ot,
230
+ styles: K,
231
+ init: (l) => {
232
+ l.class || (l.class = {}), l.class.arrowMarkerAbsolute = l.arrowMarkerAbsolute, M.clear();
233
+ }
234
+ };
235
+ export {
236
+ ut as diagram
237
+ };