@digipair/skill-web-chatbot 0.3.0
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/SAP-icons.cjs.js +2489 -0
- package/SAP-icons.cjs2.js +2489 -0
- package/SAP-icons.esm.js +2482 -0
- package/SAP-icons.esm2.js +2482 -0
- package/arc-da8fd8d8.cjs.js +88 -0
- package/arc-da8fd8d8.esm.js +86 -0
- package/array-2ff2c7a6.cjs.js +7 -0
- package/array-2ff2c7a6.esm.js +5 -0
- package/c4Diagram-1bdb45a8.cjs.js +4613 -0
- package/c4Diagram-1bdb45a8.esm.js +4611 -0
- package/classDiagram-185c1a10.cjs.js +96 -0
- package/classDiagram-185c1a10.esm.js +94 -0
- package/classDiagram-v2-6dc3b9c3.cjs.js +403 -0
- package/classDiagram-v2-6dc3b9c3.esm.js +401 -0
- package/constant-2fe7eae5.cjs.js +58 -0
- package/constant-2fe7eae5.esm.js +55 -0
- package/createText-94e3ebbf.cjs.js +2775 -0
- package/createText-94e3ebbf.esm.js +2773 -0
- package/debug.html +18 -0
- package/edges-558884ee.cjs.js +1450 -0
- package/edges-558884ee.esm.js +1436 -0
- package/erDiagram-97139f44.cjs.js +1949 -0
- package/erDiagram-97139f44.esm.js +1947 -0
- package/flowDb-a4faf166.cjs.js +6918 -0
- package/flowDb-a4faf166.esm.js +6914 -0
- package/flowDiagram-ccbbb58d.cjs.js +999 -0
- package/flowDiagram-ccbbb58d.esm.js +997 -0
- package/flowDiagram-v2-79ccd6da.cjs.js +29 -0
- package/flowDiagram-v2-79ccd6da.esm.js +27 -0
- package/flowchart-elk-definition-7863a61f.cjs.js +48577 -0
- package/flowchart-elk-definition-7863a61f.esm.js +48575 -0
- package/ganttDiagram-3eff0dd8.cjs.js +3855 -0
- package/ganttDiagram-3eff0dd8.esm.js +3853 -0
- package/gitGraphDiagram-c3fe571f.cjs.js +3863 -0
- package/gitGraphDiagram-c3fe571f.esm.js +3861 -0
- package/index-d0b453e2.cjs.js +609 -0
- package/index-d0b453e2.esm.js +607 -0
- package/index.cjs.d.ts +1 -0
- package/index.cjs.js +17 -0
- package/index.cjs2.js +43619 -0
- package/index.d.ts +1 -0
- package/index.esm.js +1 -0
- package/index.esm2.js +43493 -0
- package/infoDiagram-9c10eab1.cjs.js +467 -0
- package/infoDiagram-9c10eab1.esm.js +465 -0
- package/init-f9637058.cjs.js +17 -0
- package/init-f9637058.esm.js +15 -0
- package/journeyDiagram-b6904cec.cjs.js +1292 -0
- package/journeyDiagram-b6904cec.esm.js +1290 -0
- package/layout-c5a37d74.cjs.js +2808 -0
- package/layout-c5a37d74.esm.js +2795 -0
- package/libs/engine/src/index.d.ts +2 -0
- package/libs/engine/src/lib/engine.d.ts +27 -0
- package/libs/engine/src/lib/pins-settings.interface.d.ts +20 -0
- package/libs/skill-web-chatbot/src/index.d.ts +3 -0
- package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +23 -0
- package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
- package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
- package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
- package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +32 -0
- package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
- package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +39 -0
- package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +9 -0
- package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +5 -0
- package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
- package/line-ce5d1152.cjs.js +34 -0
- package/line-ce5d1152.esm.js +32 -0
- package/linear-db016d0c.cjs.js +485 -0
- package/linear-db016d0c.esm.js +479 -0
- package/mindmap-definition-a9d0f378.cjs.js +20225 -0
- package/mindmap-definition-a9d0f378.esm.js +20223 -0
- package/ordinal-5695958c.cjs.js +331 -0
- package/ordinal-5695958c.esm.js +329 -0
- package/package.json +8 -0
- package/pieDiagram-fd367f1f.cjs.js +1157 -0
- package/pieDiagram-fd367f1f.esm.js +1155 -0
- package/quadrantDiagram-1763608a.cjs.js +2633 -0
- package/quadrantDiagram-1763608a.esm.js +2631 -0
- package/requirementDiagram-779d93b3.cjs.js +2451 -0
- package/requirementDiagram-779d93b3.esm.js +2449 -0
- package/sankeyDiagram-86a66bae.cjs.js +1850 -0
- package/sankeyDiagram-86a66bae.esm.js +1848 -0
- package/sequenceDiagram-169f11ec.cjs.js +4805 -0
- package/sequenceDiagram-169f11ec.esm.js +4803 -0
- package/stateDiagram-6f4bb19d.cjs.js +282 -0
- package/stateDiagram-6f4bb19d.esm.js +280 -0
- package/stateDiagram-v2-d72c79bd.cjs.js +377 -0
- package/stateDiagram-v2-d72c79bd.esm.js +375 -0
- package/styles-3814544c.cjs.js +534 -0
- package/styles-3814544c.esm.js +524 -0
- package/styles-3fb7b9cf.cjs.js +2377 -0
- package/styles-3fb7b9cf.esm.js +2368 -0
- package/styles-659d7242.cjs.js +3919 -0
- package/styles-659d7242.esm.js +3915 -0
- package/svgDraw-af99a425.cjs.js +144 -0
- package/svgDraw-af99a425.esm.js +141 -0
- package/svgDrawCommon-ebe6c236.cjs.js +70 -0
- package/svgDrawCommon-ebe6c236.esm.js +62 -0
- package/timeline-definition-65183566.cjs.js +1394 -0
- package/timeline-definition-65183566.esm.js +1392 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index.cjs2.js');
|
|
4
|
+
var lineCe5d1152 = require('./line-ce5d1152.cjs.js');
|
|
5
|
+
|
|
6
|
+
var S = 0;
|
|
7
|
+
var O = function O(i, e, t, n, r) {
|
|
8
|
+
var o = function o(d) {
|
|
9
|
+
switch(d){
|
|
10
|
+
case r.db.relationType.AGGREGATION:
|
|
11
|
+
return "aggregation";
|
|
12
|
+
case r.db.relationType.EXTENSION:
|
|
13
|
+
return "extension";
|
|
14
|
+
case r.db.relationType.COMPOSITION:
|
|
15
|
+
return "composition";
|
|
16
|
+
case r.db.relationType.DEPENDENCY:
|
|
17
|
+
return "dependency";
|
|
18
|
+
case r.db.relationType.LOLLIPOP:
|
|
19
|
+
return "lollipop";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
e.points = e.points.filter(function(d) {
|
|
23
|
+
return !Number.isNaN(d.y);
|
|
24
|
+
});
|
|
25
|
+
var l = e.points, g = lineCe5d1152.S().x(function(d) {
|
|
26
|
+
return d.x;
|
|
27
|
+
}).y(function(d) {
|
|
28
|
+
return d.y;
|
|
29
|
+
}).curve(index.yf), s = i.append("path").attr("d", g(l)).attr("id", "edge" + S).attr("class", "relation");
|
|
30
|
+
var p = "";
|
|
31
|
+
n.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("marker-start", "url(" + p + "#" + o(t.relation.type1) + "Start)"), t.relation.type2 !== "none" && s.attr("marker-end", "url(" + p + "#" + o(t.relation.type2) + "End)");
|
|
32
|
+
var h, a;
|
|
33
|
+
var c = e.points.length;
|
|
34
|
+
var b = index.Oi.calcLabelPosition(e.points);
|
|
35
|
+
h = b.x, a = b.y;
|
|
36
|
+
var u, m, B, T;
|
|
37
|
+
if (c % 2 !== 0 && c > 1) {
|
|
38
|
+
var d = index.Oi.calcCardinalityPosition(t.relation.type1 !== "none", e.points, e.points[0]), w = index.Oi.calcCardinalityPosition(t.relation.type2 !== "none", e.points, e.points[c - 1]);
|
|
39
|
+
index.S.debug("cardinality_1_point " + JSON.stringify(d)), index.S.debug("cardinality_2_point " + JSON.stringify(w)), u = d.x, m = d.y, B = w.x, T = w.y;
|
|
40
|
+
}
|
|
41
|
+
if (t.title !== void 0) {
|
|
42
|
+
var d1 = i.append("g").attr("class", "classLabel"), w1 = d1.append("text").attr("class", "label").attr("x", h).attr("y", a).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
|
|
43
|
+
window.label = w1;
|
|
44
|
+
var y = w1.node().getBBox();
|
|
45
|
+
d1.insert("rect", ":first-child").attr("class", "box").attr("x", y.x - n.padding / 2).attr("y", y.y - n.padding / 2).attr("width", y.width + n.padding).attr("height", y.height + n.padding);
|
|
46
|
+
}
|
|
47
|
+
index.S.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", u).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", B).attr("y", T).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), S++;
|
|
48
|
+
}, P = function P(i, e, t, n) {
|
|
49
|
+
index.S.debug("Rendering class ", e, t);
|
|
50
|
+
var r = e.id, o = {
|
|
51
|
+
id: r,
|
|
52
|
+
label: e.id,
|
|
53
|
+
width: 0,
|
|
54
|
+
height: 0
|
|
55
|
+
}, l = i.append("g").attr("id", n.db.lookUpDomId(r)).attr("class", "classGroup");
|
|
56
|
+
var g;
|
|
57
|
+
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);
|
|
58
|
+
var s = !0;
|
|
59
|
+
e.annotations.forEach(function(x) {
|
|
60
|
+
var H = g.append("tspan").text("\xab" + x + "\xbb");
|
|
61
|
+
s || H.attr("dy", t.textHeight), s = !1;
|
|
62
|
+
});
|
|
63
|
+
var p = E(e);
|
|
64
|
+
var h = g.append("tspan").text(p).attr("class", "title");
|
|
65
|
+
s || h.attr("dy", t.textHeight);
|
|
66
|
+
var a = g.node().getBBox().height, c = l.append("line").attr("x1", 0).attr("y1", t.padding + a + t.dividerMargin / 2).attr("y2", t.padding + a + t.dividerMargin / 2), b = l.append("text").attr("x", t.padding).attr("y", a + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
67
|
+
s = !0, e.members.forEach(function(x) {
|
|
68
|
+
_(b, x, s, t), s = !1;
|
|
69
|
+
});
|
|
70
|
+
var u = b.node().getBBox(), m = l.append("line").attr("x1", 0).attr("y1", t.padding + a + t.dividerMargin + u.height).attr("y2", t.padding + a + t.dividerMargin + u.height), B = l.append("text").attr("x", t.padding).attr("y", a + 2 * t.dividerMargin + u.height + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
71
|
+
s = !0, e.methods.forEach(function(x) {
|
|
72
|
+
_(B, x, s, t), s = !1;
|
|
73
|
+
});
|
|
74
|
+
var T = l.node().getBBox();
|
|
75
|
+
var d = " ";
|
|
76
|
+
e.cssClasses.length > 0 && (d = d + e.cssClasses.join(" "));
|
|
77
|
+
var 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;
|
|
78
|
+
return g.node().childNodes.forEach(function(x) {
|
|
79
|
+
x.setAttribute("x", (y - x.getBBox().width) / 2);
|
|
80
|
+
}), 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;
|
|
81
|
+
}, E = function E(i) {
|
|
82
|
+
var e = i.id;
|
|
83
|
+
return i.type && (e += "<" + i.type + ">"), e;
|
|
84
|
+
}, A = function A(i, e, t, n) {
|
|
85
|
+
index.S.debug("Rendering note ", e, t);
|
|
86
|
+
var r = e.id, o = {
|
|
87
|
+
id: r,
|
|
88
|
+
text: e.text,
|
|
89
|
+
width: 0,
|
|
90
|
+
height: 0
|
|
91
|
+
}, l = i.append("g").attr("id", r).attr("class", "classGroup");
|
|
92
|
+
var g = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
93
|
+
var s = JSON.parse('"'.concat(e.text, '"')).split("\n");
|
|
94
|
+
s.forEach(function(c) {
|
|
95
|
+
index.S.debug("Adding line: ".concat(c)), g.append("tspan").text(c).attr("class", "title").attr("dy", t.textHeight);
|
|
96
|
+
});
|
|
97
|
+
var p = l.node().getBBox(), a = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", p.width + 2 * t.padding).attr("height", p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin).node().getBBox().width;
|
|
98
|
+
return g.node().childNodes.forEach(function(c) {
|
|
99
|
+
c.setAttribute("x", (a - c.getBBox().width) / 2);
|
|
100
|
+
}), o.width = a, o.height = p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, o;
|
|
101
|
+
}, M = function M(i) {
|
|
102
|
+
var e = "", t = "", n = "", r = "", o = i.substring(0, 1), l = i.substring(i.length - 1, i.length);
|
|
103
|
+
o.match(/[#+~-]/) && (r = o);
|
|
104
|
+
var g = /[\s\w)~]/;
|
|
105
|
+
l.match(g) || (t = C(l));
|
|
106
|
+
var s = r === "" ? 0 : 1;
|
|
107
|
+
var p = t === "" ? i.length : i.length - 1;
|
|
108
|
+
i = i.substring(s, p);
|
|
109
|
+
var h = i.indexOf("("), a = i.indexOf(")");
|
|
110
|
+
if (h > 1 && a > h && a <= i.length) {
|
|
111
|
+
var b = i.substring(0, h).trim();
|
|
112
|
+
var u = i.substring(h + 1, a);
|
|
113
|
+
if (e = r + b + "(" + index.hd(u.trim()) + ")", a < i.length) {
|
|
114
|
+
var m = i.substring(a + 1, a + 2);
|
|
115
|
+
t === "" && !m.match(g) ? (t = C(m), n = i.substring(a + 2).trim()) : n = i.substring(a + 1).trim(), n !== "" && (n.charAt(0) === ":" && (n = n.substring(1).trim()), n = " : " + index.hd(n), e += n);
|
|
116
|
+
}
|
|
117
|
+
} else e = r + index.hd(i);
|
|
118
|
+
return {
|
|
119
|
+
displayText: e,
|
|
120
|
+
cssStyle: t
|
|
121
|
+
};
|
|
122
|
+
}, _ = function _(i, e, t, n) {
|
|
123
|
+
var r = M(e);
|
|
124
|
+
var o = i.append("tspan").attr("x", n.padding).text(r.displayText);
|
|
125
|
+
r.cssStyle !== "" && o.attr("style", r.cssStyle), t || o.attr("dy", n.textHeight);
|
|
126
|
+
}, C = function C(i) {
|
|
127
|
+
switch(i){
|
|
128
|
+
case "*":
|
|
129
|
+
return "font-style:italic;";
|
|
130
|
+
case "$":
|
|
131
|
+
return "text-decoration:underline;";
|
|
132
|
+
default:
|
|
133
|
+
return "";
|
|
134
|
+
}
|
|
135
|
+
}, R = {
|
|
136
|
+
getClassTitleString: E,
|
|
137
|
+
drawClass: P,
|
|
138
|
+
drawEdge: O,
|
|
139
|
+
drawNote: A,
|
|
140
|
+
parseMember: M
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
exports.M = M;
|
|
144
|
+
exports.R = R;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { a5 as yf, f as Oi, S as S$2, a7 as hd } from './index.esm2.js';
|
|
2
|
+
import { S as S$1 } from './line-ce5d1152.esm.js';
|
|
3
|
+
|
|
4
|
+
var S = 0;
|
|
5
|
+
var O = function O(i, e, t, n, r) {
|
|
6
|
+
var o = function o(d) {
|
|
7
|
+
switch(d){
|
|
8
|
+
case r.db.relationType.AGGREGATION:
|
|
9
|
+
return "aggregation";
|
|
10
|
+
case r.db.relationType.EXTENSION:
|
|
11
|
+
return "extension";
|
|
12
|
+
case r.db.relationType.COMPOSITION:
|
|
13
|
+
return "composition";
|
|
14
|
+
case r.db.relationType.DEPENDENCY:
|
|
15
|
+
return "dependency";
|
|
16
|
+
case r.db.relationType.LOLLIPOP:
|
|
17
|
+
return "lollipop";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
e.points = e.points.filter(function(d) {
|
|
21
|
+
return !Number.isNaN(d.y);
|
|
22
|
+
});
|
|
23
|
+
var l = e.points, g = S$1().x(function(d) {
|
|
24
|
+
return d.x;
|
|
25
|
+
}).y(function(d) {
|
|
26
|
+
return d.y;
|
|
27
|
+
}).curve(yf), s = i.append("path").attr("d", g(l)).attr("id", "edge" + S).attr("class", "relation");
|
|
28
|
+
var p = "";
|
|
29
|
+
n.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("marker-start", "url(" + p + "#" + o(t.relation.type1) + "Start)"), t.relation.type2 !== "none" && s.attr("marker-end", "url(" + p + "#" + o(t.relation.type2) + "End)");
|
|
30
|
+
var h, a;
|
|
31
|
+
var c = e.points.length;
|
|
32
|
+
var b = Oi.calcLabelPosition(e.points);
|
|
33
|
+
h = b.x, a = b.y;
|
|
34
|
+
var u, m, B, T;
|
|
35
|
+
if (c % 2 !== 0 && c > 1) {
|
|
36
|
+
var d = Oi.calcCardinalityPosition(t.relation.type1 !== "none", e.points, e.points[0]), w = Oi.calcCardinalityPosition(t.relation.type2 !== "none", e.points, e.points[c - 1]);
|
|
37
|
+
S$2.debug("cardinality_1_point " + JSON.stringify(d)), S$2.debug("cardinality_2_point " + JSON.stringify(w)), u = d.x, m = d.y, B = w.x, T = w.y;
|
|
38
|
+
}
|
|
39
|
+
if (t.title !== void 0) {
|
|
40
|
+
var d1 = i.append("g").attr("class", "classLabel"), w1 = d1.append("text").attr("class", "label").attr("x", h).attr("y", a).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
|
|
41
|
+
window.label = w1;
|
|
42
|
+
var y = w1.node().getBBox();
|
|
43
|
+
d1.insert("rect", ":first-child").attr("class", "box").attr("x", y.x - n.padding / 2).attr("y", y.y - n.padding / 2).attr("width", y.width + n.padding).attr("height", y.height + n.padding);
|
|
44
|
+
}
|
|
45
|
+
S$2.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", u).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", B).attr("y", T).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), S++;
|
|
46
|
+
}, P = function P(i, e, t, n) {
|
|
47
|
+
S$2.debug("Rendering class ", e, t);
|
|
48
|
+
var r = e.id, o = {
|
|
49
|
+
id: r,
|
|
50
|
+
label: e.id,
|
|
51
|
+
width: 0,
|
|
52
|
+
height: 0
|
|
53
|
+
}, l = i.append("g").attr("id", n.db.lookUpDomId(r)).attr("class", "classGroup");
|
|
54
|
+
var g;
|
|
55
|
+
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);
|
|
56
|
+
var s = !0;
|
|
57
|
+
e.annotations.forEach(function(x) {
|
|
58
|
+
var H = g.append("tspan").text("\xab" + x + "\xbb");
|
|
59
|
+
s || H.attr("dy", t.textHeight), s = !1;
|
|
60
|
+
});
|
|
61
|
+
var p = E(e);
|
|
62
|
+
var h = g.append("tspan").text(p).attr("class", "title");
|
|
63
|
+
s || h.attr("dy", t.textHeight);
|
|
64
|
+
var a = g.node().getBBox().height, c = l.append("line").attr("x1", 0).attr("y1", t.padding + a + t.dividerMargin / 2).attr("y2", t.padding + a + t.dividerMargin / 2), b = l.append("text").attr("x", t.padding).attr("y", a + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
65
|
+
s = !0, e.members.forEach(function(x) {
|
|
66
|
+
_(b, x, s, t), s = !1;
|
|
67
|
+
});
|
|
68
|
+
var u = b.node().getBBox(), m = l.append("line").attr("x1", 0).attr("y1", t.padding + a + t.dividerMargin + u.height).attr("y2", t.padding + a + t.dividerMargin + u.height), B = l.append("text").attr("x", t.padding).attr("y", a + 2 * t.dividerMargin + u.height + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
69
|
+
s = !0, e.methods.forEach(function(x) {
|
|
70
|
+
_(B, x, s, t), s = !1;
|
|
71
|
+
});
|
|
72
|
+
var T = l.node().getBBox();
|
|
73
|
+
var d = " ";
|
|
74
|
+
e.cssClasses.length > 0 && (d = d + e.cssClasses.join(" "));
|
|
75
|
+
var 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;
|
|
76
|
+
return g.node().childNodes.forEach(function(x) {
|
|
77
|
+
x.setAttribute("x", (y - x.getBBox().width) / 2);
|
|
78
|
+
}), 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;
|
|
79
|
+
}, E = function E(i) {
|
|
80
|
+
var e = i.id;
|
|
81
|
+
return i.type && (e += "<" + i.type + ">"), e;
|
|
82
|
+
}, A = function A(i, e, t, n) {
|
|
83
|
+
S$2.debug("Rendering note ", e, t);
|
|
84
|
+
var r = e.id, o = {
|
|
85
|
+
id: r,
|
|
86
|
+
text: e.text,
|
|
87
|
+
width: 0,
|
|
88
|
+
height: 0
|
|
89
|
+
}, l = i.append("g").attr("id", r).attr("class", "classGroup");
|
|
90
|
+
var g = l.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
91
|
+
var s = JSON.parse('"'.concat(e.text, '"')).split("\n");
|
|
92
|
+
s.forEach(function(c) {
|
|
93
|
+
S$2.debug("Adding line: ".concat(c)), g.append("tspan").text(c).attr("class", "title").attr("dy", t.textHeight);
|
|
94
|
+
});
|
|
95
|
+
var p = l.node().getBBox(), a = l.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", p.width + 2 * t.padding).attr("height", p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin).node().getBBox().width;
|
|
96
|
+
return g.node().childNodes.forEach(function(c) {
|
|
97
|
+
c.setAttribute("x", (a - c.getBBox().width) / 2);
|
|
98
|
+
}), o.width = a, o.height = p.height + s.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, o;
|
|
99
|
+
}, M = function M(i) {
|
|
100
|
+
var e = "", t = "", n = "", r = "", o = i.substring(0, 1), l = i.substring(i.length - 1, i.length);
|
|
101
|
+
o.match(/[#+~-]/) && (r = o);
|
|
102
|
+
var g = /[\s\w)~]/;
|
|
103
|
+
l.match(g) || (t = C(l));
|
|
104
|
+
var s = r === "" ? 0 : 1;
|
|
105
|
+
var p = t === "" ? i.length : i.length - 1;
|
|
106
|
+
i = i.substring(s, p);
|
|
107
|
+
var h = i.indexOf("("), a = i.indexOf(")");
|
|
108
|
+
if (h > 1 && a > h && a <= i.length) {
|
|
109
|
+
var b = i.substring(0, h).trim();
|
|
110
|
+
var u = i.substring(h + 1, a);
|
|
111
|
+
if (e = r + b + "(" + hd(u.trim()) + ")", a < i.length) {
|
|
112
|
+
var m = i.substring(a + 1, a + 2);
|
|
113
|
+
t === "" && !m.match(g) ? (t = C(m), n = i.substring(a + 2).trim()) : n = i.substring(a + 1).trim(), n !== "" && (n.charAt(0) === ":" && (n = n.substring(1).trim()), n = " : " + hd(n), e += n);
|
|
114
|
+
}
|
|
115
|
+
} else e = r + hd(i);
|
|
116
|
+
return {
|
|
117
|
+
displayText: e,
|
|
118
|
+
cssStyle: t
|
|
119
|
+
};
|
|
120
|
+
}, _ = function _(i, e, t, n) {
|
|
121
|
+
var r = M(e);
|
|
122
|
+
var o = i.append("tspan").attr("x", n.padding).text(r.displayText);
|
|
123
|
+
r.cssStyle !== "" && o.attr("style", r.cssStyle), t || o.attr("dy", n.textHeight);
|
|
124
|
+
}, C = function C(i) {
|
|
125
|
+
switch(i){
|
|
126
|
+
case "*":
|
|
127
|
+
return "font-style:italic;";
|
|
128
|
+
case "$":
|
|
129
|
+
return "text-decoration:underline;";
|
|
130
|
+
default:
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
}, R = {
|
|
134
|
+
getClassTitleString: E,
|
|
135
|
+
drawClass: P,
|
|
136
|
+
drawEdge: O,
|
|
137
|
+
drawNote: A,
|
|
138
|
+
parseMember: M
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export { M, R };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index.cjs2.js');
|
|
4
|
+
|
|
5
|
+
var l = function l(s, t) {
|
|
6
|
+
var r = s.append("rect");
|
|
7
|
+
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) for(var n in t.attrs)r.attr(n, t.attrs[n]);
|
|
8
|
+
return t.class !== "undefined" && r.attr("class", t.class), r;
|
|
9
|
+
}, c = function c(s, t) {
|
|
10
|
+
l(s, {
|
|
11
|
+
x: t.startx,
|
|
12
|
+
y: t.starty,
|
|
13
|
+
width: t.stopx - t.startx,
|
|
14
|
+
height: t.stopy - t.starty,
|
|
15
|
+
fill: t.fill,
|
|
16
|
+
stroke: t.stroke,
|
|
17
|
+
class: "rect"
|
|
18
|
+
}).lower();
|
|
19
|
+
}, d = function d(s, t) {
|
|
20
|
+
var r = t.text.replace(/<br\s*\/?>/gi, " "), n = s.append("text");
|
|
21
|
+
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);
|
|
22
|
+
var e = n.append("tspan");
|
|
23
|
+
return e.attr("x", t.x + t.textMargin * 2), e.text(r), n;
|
|
24
|
+
}, f = function f(s, t, r, n) {
|
|
25
|
+
var e = s.append("image");
|
|
26
|
+
e.attr("x", t), e.attr("y", r);
|
|
27
|
+
var i = index.us(n);
|
|
28
|
+
e.attr("xlink:href", i);
|
|
29
|
+
}, x = function x(s, t, r, n) {
|
|
30
|
+
var e = s.append("use");
|
|
31
|
+
e.attr("x", t), e.attr("y", r);
|
|
32
|
+
var i = index.us(n);
|
|
33
|
+
e.attr("xlink:href", "#" + i);
|
|
34
|
+
}, h = function h() {
|
|
35
|
+
return {
|
|
36
|
+
x: 0,
|
|
37
|
+
y: 0,
|
|
38
|
+
width: 100,
|
|
39
|
+
height: 100,
|
|
40
|
+
fill: "#EDF2AE",
|
|
41
|
+
stroke: "#666",
|
|
42
|
+
anchor: "start",
|
|
43
|
+
rx: 0,
|
|
44
|
+
ry: 0
|
|
45
|
+
};
|
|
46
|
+
}, g = function g() {
|
|
47
|
+
return {
|
|
48
|
+
x: 0,
|
|
49
|
+
y: 0,
|
|
50
|
+
width: 100,
|
|
51
|
+
height: 100,
|
|
52
|
+
fill: void 0,
|
|
53
|
+
anchor: void 0,
|
|
54
|
+
"text-anchor": "start",
|
|
55
|
+
style: "#666",
|
|
56
|
+
textMargin: 0,
|
|
57
|
+
rx: 0,
|
|
58
|
+
ry: 0,
|
|
59
|
+
tspan: !0,
|
|
60
|
+
valign: void 0
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.c = c;
|
|
65
|
+
exports.d = d;
|
|
66
|
+
exports.f = f;
|
|
67
|
+
exports.g = g;
|
|
68
|
+
exports.h = h;
|
|
69
|
+
exports.l = l;
|
|
70
|
+
exports.x = x;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { u as us } from './index.esm2.js';
|
|
2
|
+
|
|
3
|
+
var l = function l(s, t) {
|
|
4
|
+
var r = s.append("rect");
|
|
5
|
+
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) for(var n in t.attrs)r.attr(n, t.attrs[n]);
|
|
6
|
+
return t.class !== "undefined" && r.attr("class", t.class), r;
|
|
7
|
+
}, c = function c(s, t) {
|
|
8
|
+
l(s, {
|
|
9
|
+
x: t.startx,
|
|
10
|
+
y: t.starty,
|
|
11
|
+
width: t.stopx - t.startx,
|
|
12
|
+
height: t.stopy - t.starty,
|
|
13
|
+
fill: t.fill,
|
|
14
|
+
stroke: t.stroke,
|
|
15
|
+
class: "rect"
|
|
16
|
+
}).lower();
|
|
17
|
+
}, d = function d(s, t) {
|
|
18
|
+
var r = t.text.replace(/<br\s*\/?>/gi, " "), n = s.append("text");
|
|
19
|
+
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);
|
|
20
|
+
var e = n.append("tspan");
|
|
21
|
+
return e.attr("x", t.x + t.textMargin * 2), e.text(r), n;
|
|
22
|
+
}, f = function f(s, t, r, n) {
|
|
23
|
+
var e = s.append("image");
|
|
24
|
+
e.attr("x", t), e.attr("y", r);
|
|
25
|
+
var i = us(n);
|
|
26
|
+
e.attr("xlink:href", i);
|
|
27
|
+
}, x = function x(s, t, r, n) {
|
|
28
|
+
var e = s.append("use");
|
|
29
|
+
e.attr("x", t), e.attr("y", r);
|
|
30
|
+
var i = us(n);
|
|
31
|
+
e.attr("xlink:href", "#" + i);
|
|
32
|
+
}, h = function h() {
|
|
33
|
+
return {
|
|
34
|
+
x: 0,
|
|
35
|
+
y: 0,
|
|
36
|
+
width: 100,
|
|
37
|
+
height: 100,
|
|
38
|
+
fill: "#EDF2AE",
|
|
39
|
+
stroke: "#666",
|
|
40
|
+
anchor: "start",
|
|
41
|
+
rx: 0,
|
|
42
|
+
ry: 0
|
|
43
|
+
};
|
|
44
|
+
}, g = function g() {
|
|
45
|
+
return {
|
|
46
|
+
x: 0,
|
|
47
|
+
y: 0,
|
|
48
|
+
width: 100,
|
|
49
|
+
height: 100,
|
|
50
|
+
fill: void 0,
|
|
51
|
+
anchor: void 0,
|
|
52
|
+
"text-anchor": "start",
|
|
53
|
+
style: "#666",
|
|
54
|
+
textMargin: 0,
|
|
55
|
+
rx: 0,
|
|
56
|
+
ry: 0,
|
|
57
|
+
tspan: !0,
|
|
58
|
+
valign: void 0
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export { c, d, f, g, h, l, x };
|