lowcoder-comps 0.0.7 → 0.0.8
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/icons/icon-chart.svg +15 -0
- package/icons/icon-comp-calendar.svg +22 -0
- package/index.html +26 -0
- package/index.tsx +19 -0
- package/jest.config.js +5 -0
- package/package/012a06bb.js +34 -0
- package/package/06481cb7.js +1060 -0
- package/package/0c8b29d5.js +6 -0
- package/package/114884df.js +805 -0
- package/package/1264ddb2.js +194 -0
- package/package/1cee31ec.js +1095 -0
- package/package/269c3ba3.js +46662 -0
- package/package/2a2c2e55.js +799 -0
- package/package/2b3ab1e4.js +98763 -0
- package/package/37590a81.js +967 -0
- package/package/3cd7980e.js +184 -0
- package/package/40112498.js +424 -0
- package/package/4b6e1d6f.js +24 -0
- package/package/4bc1082b.js +86 -0
- package/package/53e49f9b.js +1600 -0
- package/package/55bd5c26.js +266 -0
- package/package/591684c8.js +2071 -0
- package/package/6c000872.js +16 -0
- package/package/756addec.js +775 -0
- package/package/7668124e.js +8 -0
- package/package/79e8eeeb.js +949 -0
- package/package/926fbfec.js +91 -0
- package/package/945eefb3.js +2665 -0
- package/package/a35f148e.js +1228 -0
- package/package/a4d12a43.js +175 -0
- package/package/a60de5d1.js +804 -0
- package/package/a8dde1ea.js +589 -0
- package/package/b4148642.js +7 -0
- package/package/b7dd22a2.js +847 -0
- package/package/d4f3a2c4.js +18046 -0
- package/package/e0f479f3.js +91 -0
- package/package/eaa160c9.js +341 -0
- package/package/f1bfd8b5.js +311 -0
- package/package/f1f9ba79.js +900 -0
- package/package/fba61f63.js +2868 -0
- package/package/icons/icon-chart.svg +15 -0
- package/package/icons/icon-comp-calendar.svg +22 -0
- package/package/index.js +5 -0
- package/package/package.json +73 -0
- package/package.json +1 -4
- package/src/__test__/allComp.test.tsx +61 -0
- package/src/app-env.d.ts +3 -0
- package/src/comps/calendarComp/calendarComp.tsx +442 -0
- package/src/comps/calendarComp/calendarConstants.tsx +897 -0
- package/src/comps/chartComp/chartComp.tsx +249 -0
- package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +51 -0
- package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +307 -0
- package/src/comps/chartComp/chartConfigs/chartUrls.tsx +6 -0
- package/src/comps/chartComp/chartConfigs/legendConfig.tsx +55 -0
- package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +96 -0
- package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +83 -0
- package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +62 -0
- package/src/comps/chartComp/chartConstants.tsx +243 -0
- package/src/comps/chartComp/chartPropertyView.tsx +161 -0
- package/src/comps/chartComp/chartUtils.ts +240 -0
- package/src/comps/chartComp/reactEcharts/core.tsx +187 -0
- package/src/comps/chartComp/reactEcharts/index.ts +20 -0
- package/src/comps/chartComp/reactEcharts/types.ts +70 -0
- package/src/comps/chartComp/seriesComp.tsx +119 -0
- package/src/comps/imageEditorComp/imageEditorClass.tsx +52 -0
- package/src/comps/imageEditorComp/imageEditorConstants.tsx +109 -0
- package/src/comps/imageEditorComp/index.tsx +184 -0
- package/src/comps/mermaidComp/index.tsx +44 -0
- package/src/comps/mermaidComp/mermaid.tsx +29 -0
- package/src/global.ts +1 -0
- package/src/i18n/comps/index.tsx +29 -0
- package/src/i18n/comps/locales/en.ts +142 -0
- package/src/i18n/comps/locales/enObj.tsx +120 -0
- package/src/i18n/comps/locales/index.ts +7 -0
- package/src/i18n/comps/locales/types.tsx +9 -0
- package/src/i18n/comps/locales/zh.ts +4 -0
- package/src/i18n/comps/locales/zhObj.tsx +4 -0
- package/src/index.ts +11 -0
- package/vite.config.js +10 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { p as W, d as M, s as H } from "./79e8eeeb.js";
|
|
2
|
+
import { c as S, l as d, h as u, i as X } from "./2b3ab1e4.js";
|
|
3
|
+
import { G as Y, l as Z } from "./945eefb3.js";
|
|
4
|
+
import { s as l } from "./a4d12a43.js";
|
|
5
|
+
import "./012a06bb.js";
|
|
6
|
+
import "./0c8b29d5.js";
|
|
7
|
+
import "./e0f479f3.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
|
+
}, $ = 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
|
+
$(n);
|
|
23
|
+
const r = new Y({
|
|
24
|
+
multigraph: !0
|
|
25
|
+
});
|
|
26
|
+
r.setGraph({
|
|
27
|
+
isMultiGraph: !0
|
|
28
|
+
}), r.setDefaultEdgeLabel(function() {
|
|
29
|
+
return {};
|
|
30
|
+
});
|
|
31
|
+
const m = a.db.getClasses(), N = Object.keys(m);
|
|
32
|
+
for (const t of N) {
|
|
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
|
+
}), Z(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
|
+
X(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: W,
|
|
82
|
+
db: M,
|
|
83
|
+
renderer: B,
|
|
84
|
+
styles: H,
|
|
85
|
+
init: (e) => {
|
|
86
|
+
e.class || (e.class = {}), e.class.arrowMarkerAbsolute = e.arrowMarkerAbsolute, M.clear();
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
export {
|
|
90
|
+
R as diagram
|
|
91
|
+
};
|