lowcoder-comps 0.0.19 → 0.0.20
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.
- package/01102044.js +940 -0
- package/011ccb4a.js +46688 -0
- package/0d5d7030.js +212 -0
- package/0e8dfd52.js +793 -0
- package/0f25771b.js +1118 -0
- package/2470e1d8.js +91 -0
- package/256b619e.js +92 -0
- package/2ff2c7a6.js +6 -0
- package/3196b84f.js +798 -0
- package/31c6e136.js +34 -0
- package/32432dc3.js +86 -0
- package/36552e14.js +849 -0
- package/384b70d4.js +24 -0
- package/3ad35722.js +365 -0
- package/3f4db197.js +943 -0
- package/4791bdd6.js +117321 -0
- package/5a7c40d7.js +18619 -0
- package/5fd0f607.js +447 -0
- package/71827e37.js +1032 -0
- package/7a200c6a.js +607 -0
- package/804e952b.js +451 -0
- package/872f2918.js +7 -0
- package/8d714103.js +1602 -0
- package/93b98f3e.js +832 -0
- package/a06ced05.js +326 -0
- package/a1f987b7.js +236 -0
- package/a42a2ba9.js +2103 -0
- package/af0489f3.js +2456 -0
- package/b56f953d.js +985 -0
- package/b89c6a6a.js +159 -0
- package/bc7030d3.js +70 -0
- package/c739ba3e.js +2679 -0
- package/d306d59c.js +2827 -0
- package/d8adcd1e.js +823 -0
- package/e1466a22.js +275 -0
- package/ef845d7f.js +1246 -0
- package/f9637058.js +16 -0
- package/index.js +5 -0
- package/package.json +4 -3
- package/README.md +0 -27
- package/index.html +0 -26
- package/index.tsx +0 -19
- package/jest.config.js +0 -6
- package/src/__test__/allComp.test.tsx +0 -61
- package/src/app-env.d.ts +0 -3
- package/src/comps/calendarComp/calendarComp.tsx +0 -443
- package/src/comps/calendarComp/calendarConstants.tsx +0 -898
- package/src/comps/chartComp/chartComp.tsx +0 -356
- package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
- package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
- package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -9
- package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
- package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
- package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
- package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
- package/src/comps/chartComp/chartConstants.tsx +0 -288
- package/src/comps/chartComp/chartPropertyView.tsx +0 -218
- package/src/comps/chartComp/chartUtils.ts +0 -291
- package/src/comps/chartComp/reactEcharts/core.tsx +0 -194
- package/src/comps/chartComp/reactEcharts/index.ts +0 -21
- package/src/comps/chartComp/reactEcharts/types.ts +0 -76
- package/src/comps/chartComp/seriesComp.tsx +0 -119
- package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
- package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
- package/src/comps/imageEditorComp/index.tsx +0 -184
- package/src/comps/mermaidComp/index.tsx +0 -44
- package/src/comps/mermaidComp/mermaid.tsx +0 -29
- package/src/global.ts +0 -1
- package/src/i18n/comps/index.tsx +0 -29
- package/src/i18n/comps/locales/en.ts +0 -150
- package/src/i18n/comps/locales/enObj.tsx +0 -198
- package/src/i18n/comps/locales/index.ts +0 -7
- package/src/i18n/comps/locales/types.tsx +0 -10
- package/src/i18n/comps/locales/zh.ts +0 -145
- package/src/i18n/comps/locales/zhObj.tsx +0 -4
- package/src/index.ts +0 -11
- package/tsconfig.json +0 -22
- package/vite.config.js +0 -10
package/2470e1d8.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { p as N, d as M, s as W } from "./71827e37.js";
|
|
2
|
+
import { c as S, l as d, h as u, i as H } from "./4791bdd6.js";
|
|
3
|
+
import { G as X, l as Y } from "./c739ba3e.js";
|
|
4
|
+
import { s as l } from "./b89c6a6a.js";
|
|
5
|
+
import "./31c6e136.js";
|
|
6
|
+
import "./2ff2c7a6.js";
|
|
7
|
+
import "./256b619e.js";
|
|
8
|
+
let h = {};
|
|
9
|
+
const g = 20, p = function(e) {
|
|
10
|
+
const s = Object.entries(h).find((k) => k[1].label === e);
|
|
11
|
+
if (s)
|
|
12
|
+
return s[0];
|
|
13
|
+
}, Z = function(e) {
|
|
14
|
+
e.append("defs").append("marker").attr("id", "extensionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", "extensionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("defs").append("marker").attr("id", "compositionStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "compositionEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "aggregationEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyStart").attr("class", "extension").attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
15
|
+
}, D = function(e, s, k, a) {
|
|
16
|
+
const c = S().class;
|
|
17
|
+
h = {}, d.info("Rendering diagram " + e);
|
|
18
|
+
const L = S().securityLevel;
|
|
19
|
+
let y;
|
|
20
|
+
L === "sandbox" && (y = u("#i" + s));
|
|
21
|
+
const x = L === "sandbox" ? u(y.nodes()[0].contentDocument.body) : u("body"), n = x.select(`[id='${s}']`);
|
|
22
|
+
Z(n);
|
|
23
|
+
const r = new X({
|
|
24
|
+
multigraph: !0
|
|
25
|
+
});
|
|
26
|
+
r.setGraph({
|
|
27
|
+
isMultiGraph: !0
|
|
28
|
+
}), r.setDefaultEdgeLabel(function() {
|
|
29
|
+
return {};
|
|
30
|
+
});
|
|
31
|
+
const m = a.db.getClasses(), $ = Object.keys(m);
|
|
32
|
+
for (const t of $) {
|
|
33
|
+
const o = m[t], i = l.drawClass(n, o, c, a);
|
|
34
|
+
h[i.id] = i, r.setNode(i.id, i), d.info("Org height: " + i.height);
|
|
35
|
+
}
|
|
36
|
+
a.db.getRelations().forEach(function(t) {
|
|
37
|
+
d.info(
|
|
38
|
+
"tjoho" + p(t.id1) + p(t.id2) + JSON.stringify(t)
|
|
39
|
+
), r.setEdge(
|
|
40
|
+
p(t.id1),
|
|
41
|
+
p(t.id2),
|
|
42
|
+
{
|
|
43
|
+
relation: t
|
|
44
|
+
},
|
|
45
|
+
t.title || "DEFAULT"
|
|
46
|
+
);
|
|
47
|
+
}), a.db.getNotes().forEach(function(t) {
|
|
48
|
+
d.debug(`Adding note: ${JSON.stringify(t)}`);
|
|
49
|
+
const o = l.drawNote(n, t, c, a);
|
|
50
|
+
h[o.id] = o, r.setNode(o.id, o), t.class && t.class in m && r.setEdge(
|
|
51
|
+
t.id,
|
|
52
|
+
p(t.class),
|
|
53
|
+
{
|
|
54
|
+
relation: {
|
|
55
|
+
id1: t.id,
|
|
56
|
+
id2: t.class,
|
|
57
|
+
relation: {
|
|
58
|
+
type1: "none",
|
|
59
|
+
type2: "none",
|
|
60
|
+
lineType: 10
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"DEFAULT"
|
|
65
|
+
);
|
|
66
|
+
}), Y(r), r.nodes().forEach(function(t) {
|
|
67
|
+
t !== void 0 && r.node(t) !== void 0 && (d.debug("Node " + t + ": " + JSON.stringify(r.node(t))), x.select("#" + (a.db.lookUpDomId(t) || t)).attr(
|
|
68
|
+
"transform",
|
|
69
|
+
"translate(" + (r.node(t).x - r.node(t).width / 2) + "," + (r.node(t).y - r.node(t).height / 2) + " )"
|
|
70
|
+
));
|
|
71
|
+
}), r.edges().forEach(function(t) {
|
|
72
|
+
t !== void 0 && r.edge(t) !== void 0 && (d.debug("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(r.edge(t))), l.drawEdge(n, r.edge(t), r.edge(t).relation, c, a));
|
|
73
|
+
});
|
|
74
|
+
const f = n.node().getBBox(), E = f.width + g * 2, b = f.height + g * 2;
|
|
75
|
+
H(n, b, E, c.useMaxWidth);
|
|
76
|
+
const w = `${f.x - g} ${f.y - g} ${E} ${b}`;
|
|
77
|
+
d.debug(`viewBox ${w}`), n.attr("viewBox", w);
|
|
78
|
+
}, B = {
|
|
79
|
+
draw: D
|
|
80
|
+
}, R = {
|
|
81
|
+
parser: N,
|
|
82
|
+
db: M,
|
|
83
|
+
renderer: B,
|
|
84
|
+
styles: W,
|
|
85
|
+
init: (e) => {
|
|
86
|
+
e.class || (e.class = {}), e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
R as diagram
|
|
91
|
+
};
|
package/256b619e.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
var E = Math.pow;
|
|
2
|
+
const c = Math.PI, x = 2 * c, u = 1e-6, A = x - u;
|
|
3
|
+
function T(e) {
|
|
4
|
+
this._ += e[0];
|
|
5
|
+
for (let t = 1, h = e.length; t < h; ++t)
|
|
6
|
+
this._ += arguments[t] + e[t];
|
|
7
|
+
}
|
|
8
|
+
function L(e) {
|
|
9
|
+
let t = Math.floor(e);
|
|
10
|
+
if (!(t >= 0))
|
|
11
|
+
throw new Error(`invalid digits: ${e}`);
|
|
12
|
+
if (t > 15)
|
|
13
|
+
return T;
|
|
14
|
+
const h = E(10, t);
|
|
15
|
+
return function(i) {
|
|
16
|
+
this._ += i[0];
|
|
17
|
+
for (let s = 1, n = i.length; s < n; ++s)
|
|
18
|
+
this._ += Math.round(arguments[s] * h) / h + i[s];
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
class P {
|
|
22
|
+
constructor(t) {
|
|
23
|
+
this._x0 = this._y0 = // start of current subpath
|
|
24
|
+
this._x1 = this._y1 = null, this._ = "", this._append = t == null ? T : L(t);
|
|
25
|
+
}
|
|
26
|
+
moveTo(t, h) {
|
|
27
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}`;
|
|
28
|
+
}
|
|
29
|
+
closePath() {
|
|
30
|
+
this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
|
|
31
|
+
}
|
|
32
|
+
lineTo(t, h) {
|
|
33
|
+
this._append`L${this._x1 = +t},${this._y1 = +h}`;
|
|
34
|
+
}
|
|
35
|
+
quadraticCurveTo(t, h, i, s) {
|
|
36
|
+
this._append`Q${+t},${+h},${this._x1 = +i},${this._y1 = +s}`;
|
|
37
|
+
}
|
|
38
|
+
bezierCurveTo(t, h, i, s, n, $) {
|
|
39
|
+
this._append`C${+t},${+h},${+i},${+s},${this._x1 = +n},${this._y1 = +$}`;
|
|
40
|
+
}
|
|
41
|
+
arcTo(t, h, i, s, n) {
|
|
42
|
+
if (t = +t, h = +h, i = +i, s = +s, n = +n, n < 0)
|
|
43
|
+
throw new Error(`negative radius: ${n}`);
|
|
44
|
+
let $ = this._x1, r = this._y1, p = i - t, l = s - h, _ = $ - t, o = r - h, a = _ * _ + o * o;
|
|
45
|
+
if (this._x1 === null)
|
|
46
|
+
this._append`M${this._x1 = t},${this._y1 = h}`;
|
|
47
|
+
else if (a > u)
|
|
48
|
+
if (!(Math.abs(o * p - l * _) > u) || !n)
|
|
49
|
+
this._append`L${this._x1 = t},${this._y1 = h}`;
|
|
50
|
+
else {
|
|
51
|
+
let d = i - $, f = s - r, y = p * p + l * l, m = d * d + f * f, g = Math.sqrt(y), v = Math.sqrt(a), w = n * Math.tan((c - Math.acos((y + a - m) / (2 * g * v))) / 2), M = w / v, b = w / g;
|
|
52
|
+
Math.abs(M - 1) > u && this._append`L${t + M * _},${h + M * o}`, this._append`A${n},${n},0,0,${+(o * d > _ * f)},${this._x1 = t + b * p},${this._y1 = h + b * l}`;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
arc(t, h, i, s, n, $) {
|
|
56
|
+
if (t = +t, h = +h, i = +i, $ = !!$, i < 0)
|
|
57
|
+
throw new Error(`negative radius: ${i}`);
|
|
58
|
+
let r = i * Math.cos(s), p = i * Math.sin(s), l = t + r, _ = h + p, o = 1 ^ $, a = $ ? s - n : n - s;
|
|
59
|
+
this._x1 === null ? this._append`M${l},${_}` : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append`L${l},${_}`, i && (a < 0 && (a = a % x + x), a > A ? this._append`A${i},${i},0,1,${o},${t - r},${h - p}A${i},${i},0,1,${o},${this._x1 = l},${this._y1 = _}` : a > u && this._append`A${i},${i},0,${+(a >= c)},${o},${this._x1 = t + i * Math.cos(n)},${this._y1 = h + i * Math.sin(n)}`);
|
|
60
|
+
}
|
|
61
|
+
rect(t, h, i, s) {
|
|
62
|
+
this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +h}h${i = +i}v${+s}h${-i}Z`;
|
|
63
|
+
}
|
|
64
|
+
toString() {
|
|
65
|
+
return this._;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function C(e) {
|
|
69
|
+
return function() {
|
|
70
|
+
return e;
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function R(e) {
|
|
74
|
+
let t = 3;
|
|
75
|
+
return e.digits = function(h) {
|
|
76
|
+
if (!arguments.length)
|
|
77
|
+
return t;
|
|
78
|
+
if (h == null)
|
|
79
|
+
t = null;
|
|
80
|
+
else {
|
|
81
|
+
const i = Math.floor(h);
|
|
82
|
+
if (!(i >= 0))
|
|
83
|
+
throw new RangeError(`invalid digits: ${h}`);
|
|
84
|
+
t = i;
|
|
85
|
+
}
|
|
86
|
+
return e;
|
|
87
|
+
}, () => new P(t);
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
C as c,
|
|
91
|
+
R as w
|
|
92
|
+
};
|