@digipair/skill-web-chatbot 0.8.37 → 0.8.40
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/Tableau10-558cc280.cjs.js +9 -0
- package/Tableau10-558cc280.esm.js +7 -0
- package/arc-d1f6357e.cjs.js +88 -0
- package/arc-d1f6357e.esm.js +86 -0
- package/blockDiagram-5dc23a45.cjs.js +2921 -0
- package/blockDiagram-5dc23a45.esm.js +2919 -0
- package/{c4Diagram-1bdb45a8.cjs.js → c4Diagram-1e775db3.cjs.js} +1904 -2130
- package/{c4Diagram-1bdb45a8.esm.js → c4Diagram-1e775db3.esm.js} +1906 -2132
- package/channel-ebbc4130.cjs.js +9 -0
- package/channel-ebbc4130.esm.js +7 -0
- package/classDiagram-f52caa06.cjs.js +209 -0
- package/classDiagram-f52caa06.esm.js +207 -0
- package/{classDiagram-v2-6dc3b9c3.cjs.js → classDiagram-v2-640c694e.cjs.js} +74 -76
- package/{classDiagram-v2-6dc3b9c3.esm.js → classDiagram-v2-640c694e.esm.js} +75 -77
- package/clone-afc2f047.cjs.js +10 -0
- package/clone-afc2f047.esm.js +8 -0
- package/createText-03b82060.cjs.js +2936 -0
- package/createText-03b82060.esm.js +2933 -0
- package/edges-16357fde.cjs.js +1998 -0
- package/edges-16357fde.esm.js +1981 -0
- package/erDiagram-c7ff1bec.cjs.js +1807 -0
- package/erDiagram-c7ff1bec.esm.js +1805 -0
- package/flowDb-9a89ea33.cjs.js +5542 -0
- package/flowDb-9a89ea33.esm.js +5538 -0
- package/flowDiagram-aadb13b0.cjs.js +1351 -0
- package/flowDiagram-aadb13b0.esm.js +1349 -0
- package/flowDiagram-v2-f2119625.cjs.js +31 -0
- package/flowDiagram-v2-f2119625.esm.js +29 -0
- package/flowchart-elk-definition-cf813a97.cjs.js +50257 -0
- package/flowchart-elk-definition-cf813a97.esm.js +50255 -0
- package/ganttDiagram-3c2fde2b.cjs.js +3710 -0
- package/ganttDiagram-3c2fde2b.esm.js +3708 -0
- package/{gitGraphDiagram-c3fe571f.cjs.js → gitGraphDiagram-c3a0619c.cjs.js} +1608 -1651
- package/{gitGraphDiagram-c3fe571f.esm.js → gitGraphDiagram-c3a0619c.esm.js} +1609 -1652
- package/graph-0ee63739.cjs.js +961 -0
- package/graph-0ee63739.esm.js +938 -0
- package/index-bb6d8841.cjs.js +648 -0
- package/index-bb6d8841.esm.js +646 -0
- package/index.cjs2.js +5410 -4623
- package/index.esm.js +1 -1
- package/index.esm2.js +5291 -4527
- package/{infoDiagram-9c10eab1.cjs.js → infoDiagram-2f5c50c0.cjs.js} +63 -70
- package/{infoDiagram-9c10eab1.esm.js → infoDiagram-2f5c50c0.esm.js} +64 -71
- package/journeyDiagram-14fe341a.cjs.js +1061 -0
- package/journeyDiagram-14fe341a.esm.js +1059 -0
- package/katex-d90b6d29.cjs.js +25690 -0
- package/katex-d90b6d29.esm.js +25688 -0
- package/layout-fd473db2.cjs.js +1626 -0
- package/layout-fd473db2.esm.js +1619 -0
- package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -2
- package/line-24d93f1b.cjs.js +34 -0
- package/line-24d93f1b.esm.js +32 -0
- package/linear-9bcf74c4.cjs.js +537 -0
- package/linear-9bcf74c4.esm.js +531 -0
- package/{mindmap-definition-a9d0f378.cjs.js → mindmap-definition-9399c7e6.cjs.js} +7874 -7610
- package/{mindmap-definition-a9d0f378.esm.js → mindmap-definition-9399c7e6.esm.js} +7875 -7611
- package/package.json +1 -1
- package/path-428ebac9.cjs.js +317 -0
- package/path-428ebac9.esm.js +314 -0
- package/pieDiagram-828dae43.cjs.js +951 -0
- package/pieDiagram-828dae43.esm.js +949 -0
- package/{quadrantDiagram-1763608a.cjs.js → quadrantDiagram-5fa00455.cjs.js} +1117 -1340
- package/{quadrantDiagram-1763608a.esm.js → quadrantDiagram-5fa00455.esm.js} +1118 -1341
- package/{requirementDiagram-779d93b3.cjs.js → requirementDiagram-03163dc4.cjs.js} +1044 -1228
- package/{requirementDiagram-779d93b3.esm.js → requirementDiagram-03163dc4.esm.js} +1045 -1229
- package/{sankeyDiagram-86a66bae.cjs.js → sankeyDiagram-52ec8976.cjs.js} +337 -339
- package/{sankeyDiagram-86a66bae.esm.js → sankeyDiagram-52ec8976.esm.js} +338 -340
- package/sequenceDiagram-b517d154.cjs.js +5949 -0
- package/sequenceDiagram-b517d154.esm.js +5947 -0
- package/{stateDiagram-6f4bb19d.cjs.js → stateDiagram-fca82b5b.cjs.js} +62 -61
- package/{stateDiagram-6f4bb19d.esm.js → stateDiagram-fca82b5b.esm.js} +65 -64
- package/{stateDiagram-v2-d72c79bd.cjs.js → stateDiagram-v2-ed04200a.cjs.js} +96 -100
- package/{stateDiagram-v2-d72c79bd.esm.js → stateDiagram-v2-ed04200a.esm.js} +98 -102
- package/{styles-659d7242.cjs.js → styles-11e81fdd.cjs.js} +1990 -1965
- package/{styles-659d7242.esm.js → styles-11e81fdd.esm.js} +1989 -1964
- package/{styles-3fb7b9cf.cjs.js → styles-cacbff60.cjs.js} +935 -1192
- package/{styles-3fb7b9cf.esm.js → styles-cacbff60.esm.js} +929 -1186
- package/styles-e75131e4.cjs.js +671 -0
- package/styles-e75131e4.esm.js +661 -0
- package/svgDrawCommon-ecc5f780.cjs.js +68 -0
- package/svgDrawCommon-ecc5f780.esm.js +60 -0
- package/timeline-definition-4ee9bff4.cjs.js +1161 -0
- package/timeline-definition-4ee9bff4.esm.js +1159 -0
- package/xychartDiagram-e5e6b652.cjs.js +3150 -0
- package/xychartDiagram-e5e6b652.esm.js +3148 -0
- package/arc-da8fd8d8.cjs.js +0 -88
- package/arc-da8fd8d8.esm.js +0 -86
- package/classDiagram-185c1a10.cjs.js +0 -96
- package/classDiagram-185c1a10.esm.js +0 -94
- package/constant-2fe7eae5.cjs.js +0 -58
- package/constant-2fe7eae5.esm.js +0 -55
- package/createText-94e3ebbf.cjs.js +0 -2775
- package/createText-94e3ebbf.esm.js +0 -2773
- package/edges-558884ee.cjs.js +0 -1450
- package/edges-558884ee.esm.js +0 -1436
- package/erDiagram-97139f44.cjs.js +0 -1949
- package/erDiagram-97139f44.esm.js +0 -1947
- package/flowDb-a4faf166.cjs.js +0 -6918
- package/flowDb-a4faf166.esm.js +0 -6914
- package/flowDiagram-ccbbb58d.cjs.js +0 -999
- package/flowDiagram-ccbbb58d.esm.js +0 -997
- package/flowDiagram-v2-79ccd6da.cjs.js +0 -29
- package/flowDiagram-v2-79ccd6da.esm.js +0 -27
- package/flowchart-elk-definition-7863a61f.cjs.js +0 -48577
- package/flowchart-elk-definition-7863a61f.esm.js +0 -48575
- package/ganttDiagram-3eff0dd8.cjs.js +0 -3855
- package/ganttDiagram-3eff0dd8.esm.js +0 -3853
- package/index-d0b453e2.cjs.js +0 -609
- package/index-d0b453e2.esm.js +0 -607
- package/journeyDiagram-b6904cec.cjs.js +0 -1292
- package/journeyDiagram-b6904cec.esm.js +0 -1290
- package/layout-c5a37d74.cjs.js +0 -2808
- package/layout-c5a37d74.esm.js +0 -2795
- package/line-ce5d1152.cjs.js +0 -34
- package/line-ce5d1152.esm.js +0 -32
- package/linear-db016d0c.cjs.js +0 -485
- package/linear-db016d0c.esm.js +0 -479
- package/pieDiagram-fd367f1f.cjs.js +0 -1157
- package/pieDiagram-fd367f1f.esm.js +0 -1155
- package/sequenceDiagram-169f11ec.cjs.js +0 -4805
- package/sequenceDiagram-169f11ec.esm.js +0 -4803
- package/styles-3814544c.cjs.js +0 -534
- package/styles-3814544c.esm.js +0 -524
- package/svgDraw-af99a425.cjs.js +0 -144
- package/svgDraw-af99a425.esm.js +0 -141
- package/svgDrawCommon-ebe6c236.cjs.js +0 -70
- package/svgDrawCommon-ebe6c236.esm.js +0 -62
- package/timeline-definition-65183566.cjs.js +0 -1394
- package/timeline-definition-65183566.esm.js +0 -1392
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var stylesCacbff60 = require('./styles-cacbff60.cjs.js');
|
|
4
4
|
var index = require('./index.cjs2.js');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var graph0ee63739 = require('./graph-0ee63739.cjs.js');
|
|
6
|
+
var layoutFd473db2 = require('./layout-fd473db2.cjs.js');
|
|
7
|
+
var line24d93f1b = require('./line-24d93f1b.cjs.js');
|
|
7
8
|
require('./array-2ff2c7a6.cjs.js');
|
|
8
|
-
require('./
|
|
9
|
+
require('./path-428ebac9.cjs.js');
|
|
9
10
|
|
|
10
11
|
var j = function(e) {
|
|
11
|
-
return e.append("circle").attr("class", "start-state").attr("r", index.
|
|
12
|
+
return e.append("circle").attr("class", "start-state").attr("r", index.Vn().state.sizeUnit).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit);
|
|
12
13
|
}, q = function(e) {
|
|
13
|
-
return e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", index.
|
|
14
|
+
return e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", index.Vn().state.textHeight).attr("class", "divider").attr("x2", index.Vn().state.textHeight * 2).attr("y1", 0).attr("y2", 0);
|
|
14
15
|
}, Z = function(e, i) {
|
|
15
|
-
var o = e.append("text").attr("x", 2 * index.
|
|
16
|
-
return e.insert("rect", ":first-child").attr("x", index.
|
|
16
|
+
var o = e.append("text").attr("x", 2 * index.Vn().state.padding).attr("y", index.Vn().state.textHeight + 2 * index.Vn().state.padding).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.id), d = o.node().getBBox();
|
|
17
|
+
return e.insert("rect", ":first-child").attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding).attr("width", d.width + 2 * index.Vn().state.padding).attr("height", d.height + 2 * index.Vn().state.padding).attr("rx", index.Vn().state.radius), o;
|
|
17
18
|
}, K = function(e, i) {
|
|
18
19
|
var o = function o(l, m, w) {
|
|
19
|
-
var k = l.append("tspan").attr("x", 2 * index.
|
|
20
|
-
w || k.attr("dy", index.
|
|
21
|
-
}, s = e.append("text").attr("x", 2 * index.
|
|
20
|
+
var k = l.append("tspan").attr("x", 2 * index.Vn().state.padding).text(m);
|
|
21
|
+
w || k.attr("dy", index.Vn().state.textHeight);
|
|
22
|
+
}, s = e.append("text").attr("x", 2 * index.Vn().state.padding).attr("y", index.Vn().state.textHeight + 1.3 * index.Vn().state.padding).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), g = s.height, p = e.append("text").attr("x", index.Vn().state.padding).attr("y", g + index.Vn().state.padding * 0.4 + index.Vn().state.dividerMargin + index.Vn().state.textHeight).attr("class", "state-description");
|
|
22
23
|
var a = !0, r = !0;
|
|
23
24
|
i.descriptions.forEach(function(l) {
|
|
24
25
|
a || (o(p, l, r), r = !1), a = !1;
|
|
25
26
|
});
|
|
26
|
-
var y = e.append("line").attr("x1", index.
|
|
27
|
-
return y.attr("x2", c + 3 * index.
|
|
27
|
+
var y = e.append("line").attr("x1", index.Vn().state.padding).attr("y1", index.Vn().state.padding + g + index.Vn().state.dividerMargin / 2).attr("y2", index.Vn().state.padding + g + index.Vn().state.dividerMargin / 2).attr("class", "descr-divider"), x = p.node().getBBox(), c = Math.max(x.width, s.width);
|
|
28
|
+
return y.attr("x2", c + 3 * index.Vn().state.padding), e.insert("rect", ":first-child").attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding).attr("width", c + 2 * index.Vn().state.padding).attr("height", x.height + g + 2 * index.Vn().state.padding).attr("rx", index.Vn().state.radius), e;
|
|
28
29
|
}, Q = function(e, i, o) {
|
|
29
|
-
var d = index.
|
|
30
|
+
var d = index.Vn().state.padding, s = 2 * index.Vn().state.padding, g = e.node().getBBox(), p = g.width, a = g.x, r = e.append("text").attr("x", 0).attr("y", index.Vn().state.titleShift).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.id), x = r.node().getBBox().width + s;
|
|
30
31
|
var c = Math.max(x, p);
|
|
31
32
|
c === p && (c = c + s);
|
|
32
33
|
var l;
|
|
33
34
|
var m = e.node().getBBox();
|
|
34
35
|
i.doc, l = a - d, x > p && (l = (p - c) / 2 + d), Math.abs(a - m.x) < d && x > p && (l = a - (x - p) / 2);
|
|
35
|
-
var w = 1 - index.
|
|
36
|
-
return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr("height", m.height + index.
|
|
36
|
+
var w = 1 - index.Vn().state.textHeight;
|
|
37
|
+
return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr("height", m.height + index.Vn().state.textHeight + index.Vn().state.titleShift + 1).attr("rx", "0"), r.attr("x", l + d), x <= p && r.attr("x", a + (c - s) / 2 - x / 2 + d), e.insert("rect", ":first-child").attr("x", l).attr("y", index.Vn().state.titleShift - index.Vn().state.textHeight - index.Vn().state.padding).attr("width", c).attr("height", index.Vn().state.textHeight * 3).attr("rx", index.Vn().state.radius), e.insert("rect", ":first-child").attr("x", l).attr("y", index.Vn().state.titleShift - index.Vn().state.textHeight - index.Vn().state.padding).attr("width", c).attr("height", m.height + 3 + 2 * index.Vn().state.textHeight).attr("rx", index.Vn().state.radius), e;
|
|
37
38
|
}, V = function(e) {
|
|
38
|
-
return e.append("circle").attr("class", "end-state-outer").attr("r", index.
|
|
39
|
+
return e.append("circle").attr("class", "end-state-outer").attr("r", index.Vn().state.sizeUnit + index.Vn().state.miniPadding).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit + index.Vn().state.miniPadding).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit + index.Vn().state.miniPadding), e.append("circle").attr("class", "end-state-inner").attr("r", index.Vn().state.sizeUnit).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit + 2).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit + 2);
|
|
39
40
|
}, D = function(e, i) {
|
|
40
|
-
var o = index.
|
|
41
|
+
var o = index.Vn().state.forkWidth, d = index.Vn().state.forkHeight;
|
|
41
42
|
if (i.parentId) {
|
|
42
43
|
var s = o;
|
|
43
44
|
o = d, d = s;
|
|
44
45
|
}
|
|
45
|
-
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x", index.
|
|
46
|
+
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding);
|
|
46
47
|
}, tt = function(e, i, o, d) {
|
|
47
48
|
var s = 0;
|
|
48
49
|
var g = d.append("text");
|
|
49
50
|
g.style("text-anchor", "start"), g.attr("class", "noteText");
|
|
50
51
|
var p = e.replace(/\r\n/g, "<br/>");
|
|
51
52
|
p = p.replace(/\n/g, "<br/>");
|
|
52
|
-
var a = p.split(index.
|
|
53
|
-
var r = 1.25 * index.
|
|
53
|
+
var a = p.split(index.$n.lineBreakRegex);
|
|
54
|
+
var r = 1.25 * index.Vn().state.noteMargin;
|
|
54
55
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
55
56
|
try {
|
|
56
57
|
for(var _iterator = a[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -62,7 +63,7 @@ var j = function(e) {
|
|
|
62
63
|
var l = c.node().getBBox();
|
|
63
64
|
r += l.height;
|
|
64
65
|
}
|
|
65
|
-
s += r, c.attr("x", i + index.
|
|
66
|
+
s += r, c.attr("x", i + index.Vn().state.noteMargin), c.attr("y", o + s + 1.25 * index.Vn().state.noteMargin);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
} catch (err) {
|
|
@@ -85,9 +86,9 @@ var j = function(e) {
|
|
|
85
86
|
};
|
|
86
87
|
}, et = function(e, i) {
|
|
87
88
|
i.attr("class", "state-note");
|
|
88
|
-
var o = i.append("rect").attr("x", 0).attr("y", index.
|
|
89
|
-
return o.attr("height", g + 2 * index.
|
|
90
|
-
},
|
|
89
|
+
var o = i.append("rect").attr("x", 0).attr("y", index.Vn().state.padding), d = i.append("g"), _tt = tt(e, 0, 0, d), s = _tt.textWidth, g = _tt.textHeight;
|
|
90
|
+
return o.attr("height", g + 2 * index.Vn().state.noteMargin), o.attr("width", s + index.Vn().state.noteMargin * 2), o;
|
|
91
|
+
}, A = function A(e, i) {
|
|
91
92
|
var o = i.id, d = {
|
|
92
93
|
id: o,
|
|
93
94
|
label: i.id,
|
|
@@ -96,39 +97,39 @@ var j = function(e) {
|
|
|
96
97
|
}, s = e.append("g").attr("id", o).attr("class", "stateGroup");
|
|
97
98
|
i.type === "start" && j(s), i.type === "end" && V(s), (i.type === "fork" || i.type === "join") && D(s, i), i.type === "note" && et(i.note.text, s), i.type === "divider" && q(s), i.type === "default" && i.descriptions.length === 0 && Z(s, i), i.type === "default" && i.descriptions.length > 0 && K(s, i);
|
|
98
99
|
var g = s.node().getBBox();
|
|
99
|
-
return d.width = g.width + 2 * index.
|
|
100
|
+
return d.width = g.width + 2 * index.Vn().state.padding, d.height = g.height + 2 * index.Vn().state.padding, d;
|
|
100
101
|
};
|
|
101
|
-
var
|
|
102
|
+
var G = 0;
|
|
102
103
|
var at = function at(e, i, o) {
|
|
103
104
|
var d = function d(r) {
|
|
104
105
|
switch(r){
|
|
105
|
-
case
|
|
106
|
+
case stylesCacbff60.Ae.relationType.AGGREGATION:
|
|
106
107
|
return "aggregation";
|
|
107
|
-
case
|
|
108
|
+
case stylesCacbff60.Ae.relationType.EXTENSION:
|
|
108
109
|
return "extension";
|
|
109
|
-
case
|
|
110
|
+
case stylesCacbff60.Ae.relationType.COMPOSITION:
|
|
110
111
|
return "composition";
|
|
111
|
-
case
|
|
112
|
+
case stylesCacbff60.Ae.relationType.DEPENDENCY:
|
|
112
113
|
return "dependency";
|
|
113
114
|
}
|
|
114
115
|
};
|
|
115
116
|
i.points = i.points.filter(function(r) {
|
|
116
117
|
return !Number.isNaN(r.y);
|
|
117
118
|
});
|
|
118
|
-
var s = i.points, g =
|
|
119
|
+
var s = i.points, g = line24d93f1b.P().x(function(r) {
|
|
119
120
|
return r.x;
|
|
120
121
|
}).y(function(r) {
|
|
121
122
|
return r.y;
|
|
122
|
-
}).curve(index.
|
|
123
|
+
}).curve(index.Pf), p = e.append("path").attr("d", g(s)).attr("id", "edge" + G).attr("class", "transition");
|
|
123
124
|
var a = "";
|
|
124
|
-
if (index.
|
|
125
|
-
var r = e.append("g").attr("class", "stateLabel"), _F_calcLabelPosition = index.
|
|
125
|
+
if (index.Vn().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), p.attr("marker-end", "url(" + a + "#" + d(stylesCacbff60.Ae.relationType.DEPENDENCY) + "End)"), o.title !== void 0) {
|
|
126
|
+
var r = e.append("g").attr("class", "stateLabel"), _F_calcLabelPosition = index.ei.calcLabelPosition(i.points), y = _F_calcLabelPosition.x, x = _F_calcLabelPosition.y, c = index.$n.getRows(o.title);
|
|
126
127
|
var l = 0;
|
|
127
128
|
var m = [];
|
|
128
129
|
var w = 0, k = 0;
|
|
129
130
|
for(var u = 0; u <= c.length; u++){
|
|
130
131
|
var h = r.append("text").attr("text-anchor", "middle").text(c[u]).attr("x", y).attr("y", x + l), f = h.node().getBBox();
|
|
131
|
-
w = Math.max(w, f.width), k = Math.min(k, f.x), index.
|
|
132
|
+
w = Math.max(w, f.width), k = Math.min(k, f.x), index.L.info(f.x, y, x + l), l === 0 && (l = h.node().getBBox().height, index.L.info("Title height", l, x)), m.push(h);
|
|
132
133
|
}
|
|
133
134
|
var E = l * c.length;
|
|
134
135
|
if (c.length > 1) {
|
|
@@ -138,30 +139,30 @@ var at = function at(e, i, o) {
|
|
|
138
139
|
}), E = l * c.length;
|
|
139
140
|
}
|
|
140
141
|
var n = r.node().getBBox();
|
|
141
|
-
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - index.
|
|
142
|
+
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - index.Vn().state.padding / 2).attr("y", x - E / 2 - index.Vn().state.padding / 2 - 3.5).attr("width", w + index.Vn().state.padding).attr("height", E + index.Vn().state.padding), index.L.info(n);
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
+
G++;
|
|
144
145
|
};
|
|
145
146
|
var B;
|
|
146
147
|
var z = {}, it = function it() {}, nt = function nt(e) {
|
|
147
148
|
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 19,7 L9,13 L14,7 L9,1 Z");
|
|
148
149
|
}, st = function st(e, i, o, d) {
|
|
149
|
-
B = index.
|
|
150
|
-
var s = index.
|
|
150
|
+
B = index.Vn().state;
|
|
151
|
+
var s = index.Vn().securityLevel;
|
|
151
152
|
var g;
|
|
152
|
-
s === "sandbox" && (g = index.
|
|
153
|
-
var p = s === "sandbox" ? index.
|
|
154
|
-
index.
|
|
153
|
+
s === "sandbox" && (g = index.bt("#i" + i));
|
|
154
|
+
var p = s === "sandbox" ? index.bt(g.nodes()[0].contentDocument.body) : index.bt("body"), a = s === "sandbox" ? g.nodes()[0].contentDocument : document;
|
|
155
|
+
index.L.debug("Rendering diagram " + e);
|
|
155
156
|
var r = p.select("[id='".concat(i, "']"));
|
|
156
157
|
nt(r);
|
|
157
158
|
var y = d.db.getRootDoc();
|
|
158
159
|
W(y, r, void 0, !1, p, a, d);
|
|
159
160
|
var x = B.padding, c = r.node().getBBox(), l = c.width + x * 2, m = c.height + x * 2, w = l * 1.75;
|
|
160
|
-
index.
|
|
161
|
+
index.Ol(r, m, w, B.useMaxWidth), r.attr("viewBox", "".concat(c.x - B.padding, " ").concat(c.y - B.padding, " ") + l + " " + m);
|
|
161
162
|
}, rt = function(e) {
|
|
162
163
|
return e ? e.length * B.fontSizeFactor : 1;
|
|
163
164
|
}, W = function(e, i, o, d, s, g, p) {
|
|
164
|
-
var a = new
|
|
165
|
+
var a = new graph0ee63739.Ze({
|
|
165
166
|
compound: !0,
|
|
166
167
|
multigraph: !0
|
|
167
168
|
});
|
|
@@ -212,14 +213,14 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
212
213
|
y: B.compositTitleSize
|
|
213
214
|
};
|
|
214
215
|
}
|
|
215
|
-
} else h =
|
|
216
|
+
} else h = A(i, u);
|
|
216
217
|
if (u.note) {
|
|
217
218
|
var f1 = {
|
|
218
219
|
descriptions: [],
|
|
219
220
|
id: u.id + "-note",
|
|
220
221
|
note: u.note,
|
|
221
222
|
type: "note"
|
|
222
|
-
}, S1 =
|
|
223
|
+
}, S1 = A(i, f1);
|
|
223
224
|
u.note.position === "left of" ? (a.setNode(h.id + "-note", S1), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", S1)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
|
|
224
225
|
} else a.setNode(h.id, h);
|
|
225
226
|
}
|
|
@@ -237,27 +238,27 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
}
|
|
240
|
-
index.
|
|
241
|
+
index.L.debug("Count=", a.nodeCount(), a);
|
|
241
242
|
var m = 0;
|
|
242
243
|
c.forEach(function(n) {
|
|
243
|
-
m++, index.
|
|
244
|
+
m++, index.L.debug("Setting edge", n), a.setEdge(n.id1, n.id2, {
|
|
244
245
|
relation: n,
|
|
245
246
|
width: rt(n.title),
|
|
246
|
-
height: B.labelHeight * index.
|
|
247
|
+
height: B.labelHeight * index.$n.getRows(n.title).length,
|
|
247
248
|
labelpos: "c"
|
|
248
249
|
}, "id" + m);
|
|
249
|
-
}),
|
|
250
|
+
}), layoutFd473db2.Yt(a), index.L.debug("Graph after layout", a.nodes());
|
|
250
251
|
var w = i.node();
|
|
251
252
|
a.nodes().forEach(function(n) {
|
|
252
|
-
n !== void 0 && a.node(n) !== void 0 ? (index.
|
|
253
|
+
n !== void 0 && a.node(n) !== void 0 ? (index.L.warn("Node " + n + ": " + JSON.stringify(a.node(n))), s.select("#" + w.id + " #" + n).attr("transform", "translate(" + (a.node(n).x - a.node(n).width / 2) + "," + (a.node(n).y + (z[n] ? z[n].y : 0) - a.node(n).height / 2) + " )"), s.select("#" + w.id + " #" + n).attr("data-x-shift", a.node(n).x - a.node(n).width / 2), g.querySelectorAll("#" + w.id + " #" + n + " .divider").forEach(function(h) {
|
|
253
254
|
var f = h.parentElement;
|
|
254
255
|
var S = 0, M = 0;
|
|
255
256
|
f && (f.parentElement && (S = f.parentElement.getBBox().width), M = parseInt(f.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", S - M - 8);
|
|
256
|
-
})) : index.
|
|
257
|
+
})) : index.L.debug("No Node " + n + ": " + JSON.stringify(a.node(n)));
|
|
257
258
|
});
|
|
258
259
|
var k = w.getBBox();
|
|
259
260
|
a.edges().forEach(function(n) {
|
|
260
|
-
n !== void 0 && a.edge(n) !== void 0 && (index.
|
|
261
|
+
n !== void 0 && a.edge(n) !== void 0 && (index.L.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(a.edge(n))), at(i, a.edge(n), a.edge(n).relation));
|
|
261
262
|
}), k = w.getBBox();
|
|
262
263
|
var E = {
|
|
263
264
|
id: o || "root",
|
|
@@ -265,18 +266,18 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
265
266
|
width: 0,
|
|
266
267
|
height: 0
|
|
267
268
|
};
|
|
268
|
-
return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding, index.
|
|
269
|
+
return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding, index.L.debug("Doc rendered", E, a), E;
|
|
269
270
|
}, ot = {
|
|
270
271
|
setConf: it,
|
|
271
272
|
draw: st
|
|
272
|
-
},
|
|
273
|
-
parser:
|
|
274
|
-
db:
|
|
273
|
+
}, ut = {
|
|
274
|
+
parser: stylesCacbff60.De,
|
|
275
|
+
db: stylesCacbff60.Ae,
|
|
275
276
|
renderer: ot,
|
|
276
|
-
styles:
|
|
277
|
+
styles: stylesCacbff60.Le,
|
|
277
278
|
init: function(e) {
|
|
278
|
-
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute,
|
|
279
|
+
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, stylesCacbff60.Ae.clear();
|
|
279
280
|
}
|
|
280
281
|
};
|
|
281
282
|
|
|
282
|
-
exports.diagram =
|
|
283
|
+
exports.diagram = ut;
|
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { D as De, A as Ae, L as Le } from './styles-cacbff60.esm.js';
|
|
2
|
+
import { V as Vn, b as bt, c as L, O as Ol, $ as $n, ao as Pf, i as ei } from './index.esm2.js';
|
|
3
|
+
import { Z as Ze } from './graph-0ee63739.esm.js';
|
|
4
|
+
import { Y as Yt } from './layout-fd473db2.esm.js';
|
|
5
|
+
import { P } from './line-24d93f1b.esm.js';
|
|
5
6
|
import './array-2ff2c7a6.esm.js';
|
|
6
|
-
import './
|
|
7
|
+
import './path-428ebac9.esm.js';
|
|
7
8
|
|
|
8
9
|
var j = function(e) {
|
|
9
|
-
return e.append("circle").attr("class", "start-state").attr("r",
|
|
10
|
+
return e.append("circle").attr("class", "start-state").attr("r", Vn().state.sizeUnit).attr("cx", Vn().state.padding + Vn().state.sizeUnit).attr("cy", Vn().state.padding + Vn().state.sizeUnit);
|
|
10
11
|
}, q = function(e) {
|
|
11
|
-
return e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1",
|
|
12
|
+
return e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", Vn().state.textHeight).attr("class", "divider").attr("x2", Vn().state.textHeight * 2).attr("y1", 0).attr("y2", 0);
|
|
12
13
|
}, Z = function(e, i) {
|
|
13
|
-
var o = e.append("text").attr("x", 2 *
|
|
14
|
-
return e.insert("rect", ":first-child").attr("x",
|
|
14
|
+
var o = e.append("text").attr("x", 2 * Vn().state.padding).attr("y", Vn().state.textHeight + 2 * Vn().state.padding).attr("font-size", Vn().state.fontSize).attr("class", "state-title").text(i.id), d = o.node().getBBox();
|
|
15
|
+
return e.insert("rect", ":first-child").attr("x", Vn().state.padding).attr("y", Vn().state.padding).attr("width", d.width + 2 * Vn().state.padding).attr("height", d.height + 2 * Vn().state.padding).attr("rx", Vn().state.radius), o;
|
|
15
16
|
}, K = function(e, i) {
|
|
16
17
|
var o = function o(l, m, w) {
|
|
17
|
-
var k = l.append("tspan").attr("x", 2 *
|
|
18
|
-
w || k.attr("dy",
|
|
19
|
-
}, s = e.append("text").attr("x", 2 *
|
|
18
|
+
var k = l.append("tspan").attr("x", 2 * Vn().state.padding).text(m);
|
|
19
|
+
w || k.attr("dy", Vn().state.textHeight);
|
|
20
|
+
}, s = e.append("text").attr("x", 2 * Vn().state.padding).attr("y", Vn().state.textHeight + 1.3 * Vn().state.padding).attr("font-size", Vn().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), g = s.height, p = e.append("text").attr("x", Vn().state.padding).attr("y", g + Vn().state.padding * 0.4 + Vn().state.dividerMargin + Vn().state.textHeight).attr("class", "state-description");
|
|
20
21
|
var a = !0, r = !0;
|
|
21
22
|
i.descriptions.forEach(function(l) {
|
|
22
23
|
a || (o(p, l, r), r = !1), a = !1;
|
|
23
24
|
});
|
|
24
|
-
var y = e.append("line").attr("x1",
|
|
25
|
-
return y.attr("x2", c + 3 *
|
|
25
|
+
var y = e.append("line").attr("x1", Vn().state.padding).attr("y1", Vn().state.padding + g + Vn().state.dividerMargin / 2).attr("y2", Vn().state.padding + g + Vn().state.dividerMargin / 2).attr("class", "descr-divider"), x = p.node().getBBox(), c = Math.max(x.width, s.width);
|
|
26
|
+
return y.attr("x2", c + 3 * Vn().state.padding), e.insert("rect", ":first-child").attr("x", Vn().state.padding).attr("y", Vn().state.padding).attr("width", c + 2 * Vn().state.padding).attr("height", x.height + g + 2 * Vn().state.padding).attr("rx", Vn().state.radius), e;
|
|
26
27
|
}, Q = function(e, i, o) {
|
|
27
|
-
var d =
|
|
28
|
+
var d = Vn().state.padding, s = 2 * Vn().state.padding, g = e.node().getBBox(), p = g.width, a = g.x, r = e.append("text").attr("x", 0).attr("y", Vn().state.titleShift).attr("font-size", Vn().state.fontSize).attr("class", "state-title").text(i.id), x = r.node().getBBox().width + s;
|
|
28
29
|
var c = Math.max(x, p);
|
|
29
30
|
c === p && (c = c + s);
|
|
30
31
|
var l;
|
|
31
32
|
var m = e.node().getBBox();
|
|
32
33
|
i.doc, l = a - d, x > p && (l = (p - c) / 2 + d), Math.abs(a - m.x) < d && x > p && (l = a - (x - p) / 2);
|
|
33
|
-
var w = 1 -
|
|
34
|
-
return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr("height", m.height +
|
|
34
|
+
var w = 1 - Vn().state.textHeight;
|
|
35
|
+
return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr("height", m.height + Vn().state.textHeight + Vn().state.titleShift + 1).attr("rx", "0"), r.attr("x", l + d), x <= p && r.attr("x", a + (c - s) / 2 - x / 2 + d), e.insert("rect", ":first-child").attr("x", l).attr("y", Vn().state.titleShift - Vn().state.textHeight - Vn().state.padding).attr("width", c).attr("height", Vn().state.textHeight * 3).attr("rx", Vn().state.radius), e.insert("rect", ":first-child").attr("x", l).attr("y", Vn().state.titleShift - Vn().state.textHeight - Vn().state.padding).attr("width", c).attr("height", m.height + 3 + 2 * Vn().state.textHeight).attr("rx", Vn().state.radius), e;
|
|
35
36
|
}, V = function(e) {
|
|
36
|
-
return e.append("circle").attr("class", "end-state-outer").attr("r",
|
|
37
|
+
return e.append("circle").attr("class", "end-state-outer").attr("r", Vn().state.sizeUnit + Vn().state.miniPadding).attr("cx", Vn().state.padding + Vn().state.sizeUnit + Vn().state.miniPadding).attr("cy", Vn().state.padding + Vn().state.sizeUnit + Vn().state.miniPadding), e.append("circle").attr("class", "end-state-inner").attr("r", Vn().state.sizeUnit).attr("cx", Vn().state.padding + Vn().state.sizeUnit + 2).attr("cy", Vn().state.padding + Vn().state.sizeUnit + 2);
|
|
37
38
|
}, D = function(e, i) {
|
|
38
|
-
var o =
|
|
39
|
+
var o = Vn().state.forkWidth, d = Vn().state.forkHeight;
|
|
39
40
|
if (i.parentId) {
|
|
40
41
|
var s = o;
|
|
41
42
|
o = d, d = s;
|
|
42
43
|
}
|
|
43
|
-
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x",
|
|
44
|
+
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x", Vn().state.padding).attr("y", Vn().state.padding);
|
|
44
45
|
}, tt = function(e, i, o, d) {
|
|
45
46
|
var s = 0;
|
|
46
47
|
var g = d.append("text");
|
|
47
48
|
g.style("text-anchor", "start"), g.attr("class", "noteText");
|
|
48
49
|
var p = e.replace(/\r\n/g, "<br/>");
|
|
49
50
|
p = p.replace(/\n/g, "<br/>");
|
|
50
|
-
var a = p.split(
|
|
51
|
-
var r = 1.25 *
|
|
51
|
+
var a = p.split($n.lineBreakRegex);
|
|
52
|
+
var r = 1.25 * Vn().state.noteMargin;
|
|
52
53
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
53
54
|
try {
|
|
54
55
|
for(var _iterator = a[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
@@ -60,7 +61,7 @@ var j = function(e) {
|
|
|
60
61
|
var l = c.node().getBBox();
|
|
61
62
|
r += l.height;
|
|
62
63
|
}
|
|
63
|
-
s += r, c.attr("x", i +
|
|
64
|
+
s += r, c.attr("x", i + Vn().state.noteMargin), c.attr("y", o + s + 1.25 * Vn().state.noteMargin);
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
} catch (err) {
|
|
@@ -83,9 +84,9 @@ var j = function(e) {
|
|
|
83
84
|
};
|
|
84
85
|
}, et = function(e, i) {
|
|
85
86
|
i.attr("class", "state-note");
|
|
86
|
-
var o = i.append("rect").attr("x", 0).attr("y",
|
|
87
|
-
return o.attr("height", g + 2 *
|
|
88
|
-
},
|
|
87
|
+
var o = i.append("rect").attr("x", 0).attr("y", Vn().state.padding), d = i.append("g"), _tt = tt(e, 0, 0, d), s = _tt.textWidth, g = _tt.textHeight;
|
|
88
|
+
return o.attr("height", g + 2 * Vn().state.noteMargin), o.attr("width", s + Vn().state.noteMargin * 2), o;
|
|
89
|
+
}, A = function A(e, i) {
|
|
89
90
|
var o = i.id, d = {
|
|
90
91
|
id: o,
|
|
91
92
|
label: i.id,
|
|
@@ -94,39 +95,39 @@ var j = function(e) {
|
|
|
94
95
|
}, s = e.append("g").attr("id", o).attr("class", "stateGroup");
|
|
95
96
|
i.type === "start" && j(s), i.type === "end" && V(s), (i.type === "fork" || i.type === "join") && D(s, i), i.type === "note" && et(i.note.text, s), i.type === "divider" && q(s), i.type === "default" && i.descriptions.length === 0 && Z(s, i), i.type === "default" && i.descriptions.length > 0 && K(s, i);
|
|
96
97
|
var g = s.node().getBBox();
|
|
97
|
-
return d.width = g.width + 2 *
|
|
98
|
+
return d.width = g.width + 2 * Vn().state.padding, d.height = g.height + 2 * Vn().state.padding, d;
|
|
98
99
|
};
|
|
99
|
-
var
|
|
100
|
+
var G = 0;
|
|
100
101
|
var at = function at(e, i, o) {
|
|
101
102
|
var d = function d(r) {
|
|
102
103
|
switch(r){
|
|
103
|
-
case
|
|
104
|
+
case Ae.relationType.AGGREGATION:
|
|
104
105
|
return "aggregation";
|
|
105
|
-
case
|
|
106
|
+
case Ae.relationType.EXTENSION:
|
|
106
107
|
return "extension";
|
|
107
|
-
case
|
|
108
|
+
case Ae.relationType.COMPOSITION:
|
|
108
109
|
return "composition";
|
|
109
|
-
case
|
|
110
|
+
case Ae.relationType.DEPENDENCY:
|
|
110
111
|
return "dependency";
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
114
|
i.points = i.points.filter(function(r) {
|
|
114
115
|
return !Number.isNaN(r.y);
|
|
115
116
|
});
|
|
116
|
-
var s = i.points, g =
|
|
117
|
+
var s = i.points, g = P().x(function(r) {
|
|
117
118
|
return r.x;
|
|
118
119
|
}).y(function(r) {
|
|
119
120
|
return r.y;
|
|
120
|
-
}).curve(
|
|
121
|
+
}).curve(Pf), p = e.append("path").attr("d", g(s)).attr("id", "edge" + G).attr("class", "transition");
|
|
121
122
|
var a = "";
|
|
122
|
-
if (
|
|
123
|
-
var r = e.append("g").attr("class", "stateLabel"), _F_calcLabelPosition =
|
|
123
|
+
if (Vn().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), p.attr("marker-end", "url(" + a + "#" + d(Ae.relationType.DEPENDENCY) + "End)"), o.title !== void 0) {
|
|
124
|
+
var r = e.append("g").attr("class", "stateLabel"), _F_calcLabelPosition = ei.calcLabelPosition(i.points), y = _F_calcLabelPosition.x, x = _F_calcLabelPosition.y, c = $n.getRows(o.title);
|
|
124
125
|
var l = 0;
|
|
125
126
|
var m = [];
|
|
126
127
|
var w = 0, k = 0;
|
|
127
128
|
for(var u = 0; u <= c.length; u++){
|
|
128
129
|
var h = r.append("text").attr("text-anchor", "middle").text(c[u]).attr("x", y).attr("y", x + l), f = h.node().getBBox();
|
|
129
|
-
w = Math.max(w, f.width), k = Math.min(k, f.x),
|
|
130
|
+
w = Math.max(w, f.width), k = Math.min(k, f.x), L.info(f.x, y, x + l), l === 0 && (l = h.node().getBBox().height, L.info("Title height", l, x)), m.push(h);
|
|
130
131
|
}
|
|
131
132
|
var E = l * c.length;
|
|
132
133
|
if (c.length > 1) {
|
|
@@ -136,30 +137,30 @@ var at = function at(e, i, o) {
|
|
|
136
137
|
}), E = l * c.length;
|
|
137
138
|
}
|
|
138
139
|
var n = r.node().getBBox();
|
|
139
|
-
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 -
|
|
140
|
+
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - Vn().state.padding / 2).attr("y", x - E / 2 - Vn().state.padding / 2 - 3.5).attr("width", w + Vn().state.padding).attr("height", E + Vn().state.padding), L.info(n);
|
|
140
141
|
}
|
|
141
|
-
|
|
142
|
+
G++;
|
|
142
143
|
};
|
|
143
144
|
var B;
|
|
144
145
|
var z = {}, it = function it() {}, nt = function nt(e) {
|
|
145
146
|
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 19,7 L9,13 L14,7 L9,1 Z");
|
|
146
147
|
}, st = function st(e, i, o, d) {
|
|
147
|
-
B =
|
|
148
|
-
var s =
|
|
148
|
+
B = Vn().state;
|
|
149
|
+
var s = Vn().securityLevel;
|
|
149
150
|
var g;
|
|
150
|
-
s === "sandbox" && (g =
|
|
151
|
-
var p = s === "sandbox" ?
|
|
152
|
-
|
|
151
|
+
s === "sandbox" && (g = bt("#i" + i));
|
|
152
|
+
var p = s === "sandbox" ? bt(g.nodes()[0].contentDocument.body) : bt("body"), a = s === "sandbox" ? g.nodes()[0].contentDocument : document;
|
|
153
|
+
L.debug("Rendering diagram " + e);
|
|
153
154
|
var r = p.select("[id='".concat(i, "']"));
|
|
154
155
|
nt(r);
|
|
155
156
|
var y = d.db.getRootDoc();
|
|
156
157
|
W(y, r, void 0, !1, p, a, d);
|
|
157
158
|
var x = B.padding, c = r.node().getBBox(), l = c.width + x * 2, m = c.height + x * 2, w = l * 1.75;
|
|
158
|
-
|
|
159
|
+
Ol(r, m, w, B.useMaxWidth), r.attr("viewBox", "".concat(c.x - B.padding, " ").concat(c.y - B.padding, " ") + l + " " + m);
|
|
159
160
|
}, rt = function(e) {
|
|
160
161
|
return e ? e.length * B.fontSizeFactor : 1;
|
|
161
162
|
}, W = function(e, i, o, d, s, g, p) {
|
|
162
|
-
var a = new
|
|
163
|
+
var a = new Ze({
|
|
163
164
|
compound: !0,
|
|
164
165
|
multigraph: !0
|
|
165
166
|
});
|
|
@@ -205,19 +206,19 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
205
206
|
h = W(u.doc, f, u.id, !d, s, g, p);
|
|
206
207
|
{
|
|
207
208
|
f = Q(f, u, d);
|
|
208
|
-
var S
|
|
209
|
-
h.width = S
|
|
209
|
+
var S = f.node().getBBox();
|
|
210
|
+
h.width = S.width, h.height = S.height + B.padding / 2, z[u.id] = {
|
|
210
211
|
y: B.compositTitleSize
|
|
211
212
|
};
|
|
212
213
|
}
|
|
213
|
-
} else h =
|
|
214
|
+
} else h = A(i, u);
|
|
214
215
|
if (u.note) {
|
|
215
216
|
var f1 = {
|
|
216
217
|
descriptions: [],
|
|
217
218
|
id: u.id + "-note",
|
|
218
219
|
note: u.note,
|
|
219
220
|
type: "note"
|
|
220
|
-
}, S1 =
|
|
221
|
+
}, S1 = A(i, f1);
|
|
221
222
|
u.note.position === "left of" ? (a.setNode(h.id + "-note", S1), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", S1)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
|
|
222
223
|
} else a.setNode(h.id, h);
|
|
223
224
|
}
|
|
@@ -235,27 +236,27 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
235
236
|
}
|
|
236
237
|
}
|
|
237
238
|
}
|
|
238
|
-
|
|
239
|
+
L.debug("Count=", a.nodeCount(), a);
|
|
239
240
|
var m = 0;
|
|
240
241
|
c.forEach(function(n) {
|
|
241
|
-
m++,
|
|
242
|
+
m++, L.debug("Setting edge", n), a.setEdge(n.id1, n.id2, {
|
|
242
243
|
relation: n,
|
|
243
244
|
width: rt(n.title),
|
|
244
|
-
height: B.labelHeight *
|
|
245
|
+
height: B.labelHeight * $n.getRows(n.title).length,
|
|
245
246
|
labelpos: "c"
|
|
246
247
|
}, "id" + m);
|
|
247
|
-
}),
|
|
248
|
+
}), Yt(a), L.debug("Graph after layout", a.nodes());
|
|
248
249
|
var w = i.node();
|
|
249
250
|
a.nodes().forEach(function(n) {
|
|
250
|
-
n !== void 0 && a.node(n) !== void 0 ? (
|
|
251
|
+
n !== void 0 && a.node(n) !== void 0 ? (L.warn("Node " + n + ": " + JSON.stringify(a.node(n))), s.select("#" + w.id + " #" + n).attr("transform", "translate(" + (a.node(n).x - a.node(n).width / 2) + "," + (a.node(n).y + (z[n] ? z[n].y : 0) - a.node(n).height / 2) + " )"), s.select("#" + w.id + " #" + n).attr("data-x-shift", a.node(n).x - a.node(n).width / 2), g.querySelectorAll("#" + w.id + " #" + n + " .divider").forEach(function(h) {
|
|
251
252
|
var f = h.parentElement;
|
|
252
253
|
var S = 0, M = 0;
|
|
253
254
|
f && (f.parentElement && (S = f.parentElement.getBBox().width), M = parseInt(f.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", S - M - 8);
|
|
254
|
-
})) :
|
|
255
|
+
})) : L.debug("No Node " + n + ": " + JSON.stringify(a.node(n)));
|
|
255
256
|
});
|
|
256
257
|
var k = w.getBBox();
|
|
257
258
|
a.edges().forEach(function(n) {
|
|
258
|
-
n !== void 0 && a.edge(n) !== void 0 && (
|
|
259
|
+
n !== void 0 && a.edge(n) !== void 0 && (L.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(a.edge(n))), at(i, a.edge(n), a.edge(n).relation));
|
|
259
260
|
}), k = w.getBBox();
|
|
260
261
|
var E = {
|
|
261
262
|
id: o || "root",
|
|
@@ -263,18 +264,18 @@ var z = {}, it = function it() {}, nt = function nt(e) {
|
|
|
263
264
|
width: 0,
|
|
264
265
|
height: 0
|
|
265
266
|
};
|
|
266
|
-
return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding,
|
|
267
|
+
return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding, L.debug("Doc rendered", E, a), E;
|
|
267
268
|
}, ot = {
|
|
268
269
|
setConf: it,
|
|
269
270
|
draw: st
|
|
270
|
-
},
|
|
271
|
-
parser:
|
|
272
|
-
db:
|
|
271
|
+
}, ut = {
|
|
272
|
+
parser: De,
|
|
273
|
+
db: Ae,
|
|
273
274
|
renderer: ot,
|
|
274
|
-
styles:
|
|
275
|
+
styles: Le,
|
|
275
276
|
init: function(e) {
|
|
276
|
-
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute,
|
|
277
|
+
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, Ae.clear();
|
|
277
278
|
}
|
|
278
279
|
};
|
|
279
280
|
|
|
280
|
-
export {
|
|
281
|
+
export { ut as diagram };
|