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.
- package/04ea1009.js +985 -0
- package/0a1968f4.js +832 -0
- package/256b619e.js +92 -0
- package/2768fdea.js +275 -0
- package/2ff2c7a6.js +6 -0
- package/3087113d.js +1032 -0
- package/31b1cdd2.js +236 -0
- package/39f71758.js +849 -0
- package/3bd738e9.js +212 -0
- package/450c6bd6.js +447 -0
- package/4d1cf087.js +2679 -0
- package/54511d22.js +451 -0
- package/59cbb8ee.js +2456 -0
- package/62c916e0.js +86 -0
- package/74645131.js +1246 -0
- package/75095038.js +159 -0
- package/7c62ef63.js +34 -0
- package/8219433d.js +18619 -0
- package/86a4a706.js +1118 -0
- package/88c87bf8.js +943 -0
- package/8d8e98a7.js +365 -0
- package/9200edf7.js +70 -0
- package/9f3281b9.js +117321 -0
- package/a6e7fb9e.js +326 -0
- package/acdad8f2.js +7 -0
- package/b38c288b.js +24 -0
- package/ba44e76c.js +46688 -0
- package/cbee3d44.js +607 -0
- package/cc0f1351.js +793 -0
- package/e614be0d.js +91 -0
- package/f40ee59a.js +940 -0
- package/f576ac90.js +798 -0
- package/f9637058.js +16 -0
- package/fb09e069.js +1602 -0
- package/fc5c5300.js +2103 -0
- package/fe636892.js +823 -0
- package/fea654db.js +2827 -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/e614be0d.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { p as N, d as M, s as W } from "./3087113d.js";
|
|
2
|
+
import { c as S, l as d, h as u, i as H } from "./9f3281b9.js";
|
|
3
|
+
import { G as X, l as Y } from "./4d1cf087.js";
|
|
4
|
+
import { s as l } from "./75095038.js";
|
|
5
|
+
import "./7c62ef63.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
|
+
};
|