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/b89c6a6a.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import { D as k, x as v, l as B, E as N } from "./4791bdd6.js";
|
|
2
|
+
import { l as I } from "./31c6e136.js";
|
|
3
|
+
let E = 0;
|
|
4
|
+
const O = function(i, e, t, a, r) {
|
|
5
|
+
const o = function(d) {
|
|
6
|
+
switch (d) {
|
|
7
|
+
case r.db.relationType.AGGREGATION:
|
|
8
|
+
return "aggregation";
|
|
9
|
+
case r.db.relationType.EXTENSION:
|
|
10
|
+
return "extension";
|
|
11
|
+
case r.db.relationType.COMPOSITION:
|
|
12
|
+
return "composition";
|
|
13
|
+
case r.db.relationType.DEPENDENCY:
|
|
14
|
+
return "dependency";
|
|
15
|
+
case r.db.relationType.LOLLIPOP:
|
|
16
|
+
return "lollipop";
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
e.points = e.points.filter((d) => !Number.isNaN(d.y));
|
|
20
|
+
const l = e.points, g = I().x(function(d) {
|
|
21
|
+
return d.x;
|
|
22
|
+
}).y(function(d) {
|
|
23
|
+
return d.y;
|
|
24
|
+
}).curve(k), s = i.append("path").attr("d", g(l)).attr("id", "edge" + E).attr("class", "relation");
|
|
25
|
+
let p = "";
|
|
26
|
+
a.arrowMarkerAbsolute && (p = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, p = p.replace(/\(/g, "\\("), p = p.replace(/\)/g, "\\)")), t.relation.lineType == 1 && s.attr("class", "relation dashed-line"), t.relation.lineType == 10 && s.attr("class", "relation dotted-line"), t.relation.type1 !== "none" && s.attr(
|
|
27
|
+
"marker-start",
|
|
28
|
+
"url(" + p + "#" + o(t.relation.type1) + "Start)"
|
|
29
|
+
), t.relation.type2 !== "none" && s.attr(
|
|
30
|
+
"marker-end",
|
|
31
|
+
"url(" + p + "#" + o(t.relation.type2) + "End)"
|
|
32
|
+
);
|
|
33
|
+
let h, n;
|
|
34
|
+
const c = e.points.length;
|
|
35
|
+
let b = v.calcLabelPosition(e.points);
|
|
36
|
+
h = b.x, n = b.y;
|
|
37
|
+
let x, m, f, T;
|
|
38
|
+
if (c % 2 !== 0 && c > 1) {
|
|
39
|
+
let d = v.calcCardinalityPosition(
|
|
40
|
+
t.relation.type1 !== "none",
|
|
41
|
+
e.points,
|
|
42
|
+
e.points[0]
|
|
43
|
+
), w = v.calcCardinalityPosition(
|
|
44
|
+
t.relation.type2 !== "none",
|
|
45
|
+
e.points,
|
|
46
|
+
e.points[c - 1]
|
|
47
|
+
);
|
|
48
|
+
B.debug("cardinality_1_point " + JSON.stringify(d)), B.debug("cardinality_2_point " + JSON.stringify(w)), x = d.x, m = d.y, f = w.x, T = w.y;
|
|
49
|
+
}
|
|
50
|
+
if (t.title !== void 0) {
|
|
51
|
+
const d = i.append("g").attr("class", "classLabel"), w = d.append("text").attr("class", "label").attr("x", h).attr("y", n).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
|
|
52
|
+
window.label = w;
|
|
53
|
+
const y = w.node().getBBox();
|
|
54
|
+
d.insert("rect", ":first-child").attr("class", "box").attr("x", y.x - a.padding / 2).attr("y", y.y - a.padding / 2).attr("width", y.width + a.padding).attr("height", y.height + a.padding);
|
|
55
|
+
}
|
|
56
|
+
B.info("Rendering relation " + JSON.stringify(t)), t.relationTitle1 !== void 0 && t.relationTitle1 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type1").attr("x", x).attr("y", m).attr("fill", "black").attr("font-size", "6").text(t.relationTitle1), t.relationTitle2 !== void 0 && t.relationTitle2 !== "none" && i.append("g").attr("class", "cardinality").append("text").attr("class", "type2").attr("x", f).attr("y", T).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), E++;
|
|
57
|
+
}, P = function(i, e, t, a) {
|
|
58
|
+
B.debug("Rendering class ", e, t);
|
|
59
|
+
const r = e.id, o = {
|
|
60
|
+
id: r,
|
|
61
|
+
label: e.id,
|
|
62
|
+
width: 0,
|
|
63
|
+
height: 0
|
|
64
|
+
}, l = i.append("g").attr("id", a.db.lookUpDomId(r)).attr("class", "classGroup");
|
|
65
|
+
let g;
|
|
66
|
+
e.link ? g = l.append("svg:a").attr("xlink:href", e.link).attr("target", e.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : g = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
67
|
+
let s = !0;
|
|
68
|
+
e.annotations.forEach(function(u) {
|
|
69
|
+
const H = g.append("tspan").text("«" + u + "»");
|
|
70
|
+
s || H.attr("dy", t.textHeight), s = !1;
|
|
71
|
+
});
|
|
72
|
+
let p = C(e);
|
|
73
|
+
const h = g.append("tspan").text(p).attr("class", "title");
|
|
74
|
+
s || h.attr("dy", t.textHeight);
|
|
75
|
+
const n = g.node().getBBox().height, c = l.append("line").attr("x1", 0).attr("y1", t.padding + n + t.dividerMargin / 2).attr("y2", t.padding + n + t.dividerMargin / 2), b = l.append("text").attr("x", t.padding).attr("y", n + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
76
|
+
s = !0, e.members.forEach(function(u) {
|
|
77
|
+
S(b, u, s, t), s = !1;
|
|
78
|
+
});
|
|
79
|
+
const x = b.node().getBBox(), m = l.append("line").attr("x1", 0).attr("y1", t.padding + n + t.dividerMargin + x.height).attr("y2", t.padding + n + t.dividerMargin + x.height), f = l.append("text").attr("x", t.padding).attr("y", n + 2 * t.dividerMargin + x.height + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
80
|
+
s = !0, e.methods.forEach(function(u) {
|
|
81
|
+
S(f, u, s, t), s = !1;
|
|
82
|
+
});
|
|
83
|
+
const T = l.node().getBBox();
|
|
84
|
+
var d = " ";
|
|
85
|
+
e.cssClasses.length > 0 && (d = d + e.cssClasses.join(" "));
|
|
86
|
+
const y = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", T.width + 2 * t.padding).attr("height", T.height + t.padding + 0.5 * t.dividerMargin).attr("class", d).node().getBBox().width;
|
|
87
|
+
return g.node().childNodes.forEach(function(u) {
|
|
88
|
+
u.setAttribute("x", (y - u.getBBox().width) / 2);
|
|
89
|
+
}), e.tooltip && g.insert("title").text(e.tooltip), c.attr("x2", y), m.attr("x2", y), o.width = y, o.height = T.height + t.padding + 0.5 * t.dividerMargin, o;
|
|
90
|
+
}, C = function(i) {
|
|
91
|
+
let e = i.id;
|
|
92
|
+
return i.type && (e += "<" + i.type + ">"), e;
|
|
93
|
+
}, A = function(i, e, t, a) {
|
|
94
|
+
B.debug("Rendering note ", e, t);
|
|
95
|
+
const r = e.id, o = {
|
|
96
|
+
id: r,
|
|
97
|
+
text: e.text,
|
|
98
|
+
width: 0,
|
|
99
|
+
height: 0
|
|
100
|
+
}, l = i.append("g").attr("id", r).attr("class", "classGroup");
|
|
101
|
+
let g = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
102
|
+
const s = JSON.parse(`"${e.text}"`).split(`
|
|
103
|
+
`);
|
|
104
|
+
s.forEach(function(c) {
|
|
105
|
+
B.debug(`Adding line: ${c}`), g.append("tspan").text(c).attr("class", "title").attr("dy", t.textHeight);
|
|
106
|
+
});
|
|
107
|
+
const p = l.node().getBBox(), n = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", p.width + 2 * t.padding).attr(
|
|
108
|
+
"height",
|
|
109
|
+
p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin
|
|
110
|
+
).node().getBBox().width;
|
|
111
|
+
return g.node().childNodes.forEach(function(c) {
|
|
112
|
+
c.setAttribute("x", (n - c.getBBox().width) / 2);
|
|
113
|
+
}), o.width = n, o.height = p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, o;
|
|
114
|
+
}, M = function(i) {
|
|
115
|
+
let e = "", t = "", a = "", r = "", o = i.substring(0, 1), l = i.substring(i.length - 1, i.length);
|
|
116
|
+
o.match(/[#+~-]/) && (r = o);
|
|
117
|
+
let g = /[\s\w)~]/;
|
|
118
|
+
l.match(g) || (t = _(l));
|
|
119
|
+
const s = r === "" ? 0 : 1;
|
|
120
|
+
let p = t === "" ? i.length : i.length - 1;
|
|
121
|
+
i = i.substring(s, p);
|
|
122
|
+
const h = i.indexOf("("), n = i.indexOf(")");
|
|
123
|
+
if (h > 1 && n > h && n <= i.length) {
|
|
124
|
+
let b = i.substring(0, h).trim();
|
|
125
|
+
const x = i.substring(h + 1, n);
|
|
126
|
+
if (e = r + b + "(" + N(x.trim()) + ")", n < i.length) {
|
|
127
|
+
let m = i.substring(n + 1, n + 2);
|
|
128
|
+
t === "" && !m.match(g) ? (t = _(m), a = i.substring(n + 2).trim()) : a = i.substring(n + 1).trim(), a !== "" && (a.charAt(0) === ":" && (a = a.substring(1).trim()), a = " : " + N(a), e += a);
|
|
129
|
+
}
|
|
130
|
+
} else
|
|
131
|
+
e = r + N(i);
|
|
132
|
+
return {
|
|
133
|
+
displayText: e,
|
|
134
|
+
cssStyle: t
|
|
135
|
+
};
|
|
136
|
+
}, S = function(i, e, t, a) {
|
|
137
|
+
let r = M(e);
|
|
138
|
+
const o = i.append("tspan").attr("x", a.padding).text(r.displayText);
|
|
139
|
+
r.cssStyle !== "" && o.attr("style", r.cssStyle), t || o.attr("dy", a.textHeight);
|
|
140
|
+
}, _ = function(i) {
|
|
141
|
+
switch (i) {
|
|
142
|
+
case "*":
|
|
143
|
+
return "font-style:italic;";
|
|
144
|
+
case "$":
|
|
145
|
+
return "text-decoration:underline;";
|
|
146
|
+
default:
|
|
147
|
+
return "";
|
|
148
|
+
}
|
|
149
|
+
}, R = {
|
|
150
|
+
getClassTitleString: C,
|
|
151
|
+
drawClass: P,
|
|
152
|
+
drawEdge: O,
|
|
153
|
+
drawNote: A,
|
|
154
|
+
parseMember: M
|
|
155
|
+
};
|
|
156
|
+
export {
|
|
157
|
+
M as p,
|
|
158
|
+
R as s
|
|
159
|
+
};
|
package/bc7030d3.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { n as a } from "./4791bdd6.js";
|
|
2
|
+
const l = function(e, t) {
|
|
3
|
+
const r = e.append("rect");
|
|
4
|
+
if (r.attr("x", t.x), r.attr("y", t.y), r.attr("fill", t.fill), r.attr("stroke", t.stroke), r.attr("width", t.width), r.attr("height", t.height), r.attr("rx", t.rx), r.attr("ry", t.ry), t.attrs !== "undefined" && t.attrs !== null)
|
|
5
|
+
for (let n in t.attrs)
|
|
6
|
+
r.attr(n, t.attrs[n]);
|
|
7
|
+
return t.class !== "undefined" && r.attr("class", t.class), r;
|
|
8
|
+
}, c = function(e, t) {
|
|
9
|
+
l(e, {
|
|
10
|
+
x: t.startx,
|
|
11
|
+
y: t.starty,
|
|
12
|
+
width: t.stopx - t.startx,
|
|
13
|
+
height: t.stopy - t.starty,
|
|
14
|
+
fill: t.fill,
|
|
15
|
+
stroke: t.stroke,
|
|
16
|
+
class: "rect"
|
|
17
|
+
}).lower();
|
|
18
|
+
}, x = function(e, t) {
|
|
19
|
+
const r = t.text.replace(/<br\s*\/?>/gi, " "), n = e.append("text");
|
|
20
|
+
n.attr("x", t.x), n.attr("y", t.y), n.attr("class", "legend"), n.style("text-anchor", t.anchor), t.class !== void 0 && n.attr("class", t.class);
|
|
21
|
+
const s = n.append("tspan");
|
|
22
|
+
return s.attr("x", t.x + t.textMargin * 2), s.text(r), n;
|
|
23
|
+
}, d = function(e, t, r, n) {
|
|
24
|
+
const s = e.append("image");
|
|
25
|
+
s.attr("x", t), s.attr("y", r);
|
|
26
|
+
var i = a(n);
|
|
27
|
+
s.attr("xlink:href", i);
|
|
28
|
+
}, f = function(e, t, r, n) {
|
|
29
|
+
const s = e.append("use");
|
|
30
|
+
s.attr("x", t), s.attr("y", r);
|
|
31
|
+
const i = a(n);
|
|
32
|
+
s.attr("xlink:href", "#" + i);
|
|
33
|
+
}, h = function() {
|
|
34
|
+
return {
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0,
|
|
37
|
+
width: 100,
|
|
38
|
+
height: 100,
|
|
39
|
+
fill: "#EDF2AE",
|
|
40
|
+
stroke: "#666",
|
|
41
|
+
anchor: "start",
|
|
42
|
+
rx: 0,
|
|
43
|
+
ry: 0
|
|
44
|
+
};
|
|
45
|
+
}, g = function() {
|
|
46
|
+
return {
|
|
47
|
+
x: 0,
|
|
48
|
+
y: 0,
|
|
49
|
+
width: 100,
|
|
50
|
+
height: 100,
|
|
51
|
+
fill: void 0,
|
|
52
|
+
anchor: void 0,
|
|
53
|
+
"text-anchor": "start",
|
|
54
|
+
style: "#666",
|
|
55
|
+
textMargin: 0,
|
|
56
|
+
rx: 0,
|
|
57
|
+
ry: 0,
|
|
58
|
+
tspan: !0,
|
|
59
|
+
valign: void 0
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
c as a,
|
|
64
|
+
f as b,
|
|
65
|
+
d as c,
|
|
66
|
+
l as d,
|
|
67
|
+
g as e,
|
|
68
|
+
x as f,
|
|
69
|
+
h as g
|
|
70
|
+
};
|