lowcoder-comps 0.0.8 → 0.0.10

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 (41) hide show
  1. package/package.json +2 -10
  2. package/src/index.ts +0 -2
  3. package/package/012a06bb.js +0 -34
  4. package/package/06481cb7.js +0 -1060
  5. package/package/0c8b29d5.js +0 -6
  6. package/package/114884df.js +0 -805
  7. package/package/1264ddb2.js +0 -194
  8. package/package/1cee31ec.js +0 -1095
  9. package/package/269c3ba3.js +0 -46662
  10. package/package/2a2c2e55.js +0 -799
  11. package/package/2b3ab1e4.js +0 -98763
  12. package/package/37590a81.js +0 -967
  13. package/package/3cd7980e.js +0 -184
  14. package/package/40112498.js +0 -424
  15. package/package/4b6e1d6f.js +0 -24
  16. package/package/4bc1082b.js +0 -86
  17. package/package/53e49f9b.js +0 -1600
  18. package/package/55bd5c26.js +0 -266
  19. package/package/591684c8.js +0 -2071
  20. package/package/6c000872.js +0 -16
  21. package/package/756addec.js +0 -775
  22. package/package/7668124e.js +0 -8
  23. package/package/79e8eeeb.js +0 -949
  24. package/package/926fbfec.js +0 -91
  25. package/package/945eefb3.js +0 -2665
  26. package/package/a35f148e.js +0 -1228
  27. package/package/a4d12a43.js +0 -175
  28. package/package/a60de5d1.js +0 -804
  29. package/package/a8dde1ea.js +0 -589
  30. package/package/b4148642.js +0 -7
  31. package/package/b7dd22a2.js +0 -847
  32. package/package/d4f3a2c4.js +0 -18046
  33. package/package/e0f479f3.js +0 -91
  34. package/package/eaa160c9.js +0 -341
  35. package/package/f1bfd8b5.js +0 -311
  36. package/package/f1f9ba79.js +0 -900
  37. package/package/fba61f63.js +0 -2868
  38. package/package/icons/icon-chart.svg +0 -15
  39. package/package/icons/icon-comp-calendar.svg +0 -22
  40. package/package/index.js +0 -5
  41. package/package/package.json +0 -73
@@ -1,175 +0,0 @@
1
- import { a2 as C, y as E, l as b, a3 as w } from "./2b3ab1e4.js";
2
- import { l as k } from "./012a06bb.js";
3
- let S = 0;
4
- const O = function(i, e, t, n, r) {
5
- const a = function(o) {
6
- switch (o) {
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((o) => !Number.isNaN(o.y));
20
- const l = e.points, d = k().x(function(o) {
21
- return o.x;
22
- }).y(function(o) {
23
- return o.y;
24
- }).curve(C), s = i.append("path").attr("d", d(l)).attr("id", "edge" + S).attr("class", "relation");
25
- let g = "";
26
- n.arrowMarkerAbsolute && (g = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, g = g.replace(/\(/g, "\\("), g = g.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(" + g + "#" + a(t.relation.type1) + "Start)"
29
- ), t.relation.type2 !== "none" && s.attr(
30
- "marker-end",
31
- "url(" + g + "#" + a(t.relation.type2) + "End)"
32
- );
33
- let f, c;
34
- const p = e.points.length;
35
- let v = E.calcLabelPosition(e.points);
36
- f = v.x, c = v.y;
37
- let x, B, N, m;
38
- if (p % 2 !== 0 && p > 1) {
39
- let o = E.calcCardinalityPosition(
40
- t.relation.type1 !== "none",
41
- e.points,
42
- e.points[0]
43
- ), u = E.calcCardinalityPosition(
44
- t.relation.type2 !== "none",
45
- e.points,
46
- e.points[p - 1]
47
- );
48
- b.debug("cardinality_1_point " + JSON.stringify(o)), b.debug("cardinality_2_point " + JSON.stringify(u)), x = o.x, B = o.y, N = u.x, m = u.y;
49
- }
50
- if (t.title !== void 0) {
51
- const o = i.append("g").attr("class", "classLabel"), u = o.append("text").attr("class", "label").attr("x", f).attr("y", c).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
52
- window.label = u;
53
- const h = u.node().getBBox();
54
- o.insert("rect", ":first-child").attr("class", "box").attr("x", h.x - n.padding / 2).attr("y", h.y - n.padding / 2).attr("width", h.width + n.padding).attr("height", h.height + n.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", B).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", N).attr("y", m).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), S++;
57
- }, P = function(i, e, t, n) {
58
- b.debug("Rendering class ", e, t);
59
- const r = e.id, a = {
60
- id: r,
61
- label: e.id,
62
- width: 0,
63
- height: 0
64
- }, l = i.append("g").attr("id", n.db.lookUpDomId(r)).attr("class", "classGroup");
65
- let d;
66
- e.link ? d = l.append("svg:a").attr("xlink:href", e.link).attr("target", e.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : d = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
67
- let s = !0;
68
- e.annotations.forEach(function(y) {
69
- const H = d.append("tspan").text("\xAB" + y + "\xBB");
70
- s || H.attr("dy", t.textHeight), s = !1;
71
- });
72
- let g = e.id;
73
- e.type !== void 0 && e.type !== "" && (g += "<" + e.type + ">");
74
- const f = d.append("tspan").text(g).attr("class", "title");
75
- s || f.attr("dy", t.textHeight);
76
- const c = d.node().getBBox().height, p = l.append("line").attr("x1", 0).attr("y1", t.padding + c + t.dividerMargin / 2).attr("y2", t.padding + c + t.dividerMargin / 2), v = l.append("text").attr("x", t.padding).attr("y", c + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
77
- s = !0, e.members.forEach(function(y) {
78
- _(v, y, s, t), s = !1;
79
- });
80
- const x = v.node().getBBox(), B = l.append("line").attr("x1", 0).attr("y1", t.padding + c + t.dividerMargin + x.height).attr("y2", t.padding + c + t.dividerMargin + x.height), N = l.append("text").attr("x", t.padding).attr("y", c + 2 * t.dividerMargin + x.height + t.textHeight).attr("fill", "white").attr("class", "classText");
81
- s = !0, e.methods.forEach(function(y) {
82
- _(N, y, s, t), s = !1;
83
- });
84
- const m = l.node().getBBox();
85
- var o = " ";
86
- e.cssClasses.length > 0 && (o = o + e.cssClasses.join(" "));
87
- const h = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", m.width + 2 * t.padding).attr("height", m.height + t.padding + 0.5 * t.dividerMargin).attr("class", o).node().getBBox().width;
88
- return d.node().childNodes.forEach(function(y) {
89
- y.setAttribute("x", (h - y.getBBox().width) / 2);
90
- }), e.tooltip && d.insert("title").text(e.tooltip), p.attr("x2", h), B.attr("x2", h), a.width = h, a.height = m.height + t.padding + 0.5 * t.dividerMargin, a;
91
- }, I = function(i, e, t, n) {
92
- b.debug("Rendering note ", e, t);
93
- const r = e.id, a = {
94
- id: r,
95
- text: e.text,
96
- width: 0,
97
- height: 0
98
- }, l = i.append("g").attr("id", r).attr("class", "classGroup");
99
- let d = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
100
- const s = JSON.parse(`"${e.text}"`).split(`
101
- `);
102
- s.forEach(function(p) {
103
- b.debug(`Adding line: ${p}`), d.append("tspan").text(p).attr("class", "title").attr("dy", t.textHeight);
104
- });
105
- const g = l.node().getBBox(), c = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", g.width + 2 * t.padding).attr(
106
- "height",
107
- g.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin
108
- ).node().getBBox().width;
109
- return d.node().childNodes.forEach(function(p) {
110
- p.setAttribute("x", (c - p.getBBox().width) / 2);
111
- }), a.width = c, a.height = g.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, a;
112
- }, T = function(i) {
113
- const e = /^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/, t = /^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;
114
- let n = i.match(e), r = i.match(t);
115
- return n && !r ? L(n) : r ? R(r) : $(i);
116
- }, L = function(i) {
117
- let e = "", t = "";
118
- try {
119
- let n = i[1] ? i[1].trim() : "", r = i[2] ? i[2].trim() : "", a = i[3] ? w(i[3].trim()) : "", l = i[4] ? i[4].trim() : "", d = i[5] ? i[5].trim() : "";
120
- t = n + r + a + " " + l, e = M(d);
121
- } catch (n) {
122
- t = i;
123
- }
124
- return {
125
- displayText: t,
126
- cssStyle: e
127
- };
128
- }, R = function(i) {
129
- let e = "", t = "";
130
- try {
131
- let n = i[1] ? i[1].trim() : "", r = i[2] ? i[2].trim() : "", a = i[3] ? w(i[3].trim()) : "", l = i[4] ? i[4].trim() : "", d = i[5] ? " : " + w(i[5]).trim() : "";
132
- t = n + r + "(" + a + ")" + d, e = M(l);
133
- } catch (n) {
134
- t = i;
135
- }
136
- return {
137
- displayText: t,
138
- cssStyle: e
139
- };
140
- }, $ = function(i) {
141
- let e = "", t = "", n = "", r = i.indexOf("("), a = i.indexOf(")");
142
- if (r > 1 && a > r && a <= i.length) {
143
- let l = "", d = "", s = i.substring(0, 1);
144
- s.match(/\w/) ? d = i.substring(0, r).trim() : (s.match(/[#+~-]/) && (l = s), d = i.substring(1, r).trim());
145
- const g = i.substring(r + 1, a);
146
- i.substring(a + 1, 1), t = M(i.substring(a + 1, a + 2)), e = l + d + "(" + w(g.trim()) + ")", a < i.length && (n = i.substring(a + 2).trim(), n !== "" && (n = " : " + w(n), e += n));
147
- } else
148
- e = w(i);
149
- return {
150
- displayText: e,
151
- cssStyle: t
152
- };
153
- }, _ = function(i, e, t, n) {
154
- let r = T(e);
155
- const a = i.append("tspan").attr("x", n.padding).text(r.displayText);
156
- r.cssStyle !== "" && a.attr("style", r.cssStyle), t || a.attr("dy", n.textHeight);
157
- }, M = function(i) {
158
- switch (i) {
159
- case "*":
160
- return "font-style:italic;";
161
- case "$":
162
- return "text-decoration:underline;";
163
- default:
164
- return "";
165
- }
166
- }, J = {
167
- drawClass: P,
168
- drawEdge: O,
169
- drawNote: I,
170
- parseMember: T
171
- };
172
- export {
173
- T as p,
174
- J as s
175
- };