@digipair/skill-web-chatbot 0.114.1 → 0.114.3
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/dist/index.cjs.js +2118 -8
- package/dist/index.esm2.js +5 -5
- package/package.json +6 -2
- package/dist/SAP-icons.cjs.js +0 -2489
- package/dist/SAP-icons.cjs2.js +0 -2489
- package/dist/Tableau10-558cc280.cjs.js +0 -9
- package/dist/arc-d1f6357e.cjs.js +0 -88
- package/dist/array-2ff2c7a6.cjs.js +0 -11
- package/dist/blockDiagram-5dc23a45.cjs.js +0 -2916
- package/dist/c4Diagram-1e775db3.cjs.js +0 -4386
- package/dist/channel-ebbc4130.cjs.js +0 -9
- package/dist/classDiagram-f52caa06.cjs.js +0 -209
- package/dist/classDiagram-v2-640c694e.cjs.js +0 -401
- package/dist/clone-afc2f047.cjs.js +0 -10
- package/dist/createText-03b82060.cjs.js +0 -2940
- package/dist/edges-16357fde.cjs.js +0 -2002
- package/dist/erDiagram-c7ff1bec.cjs.js +0 -1807
- package/dist/flowDb-9a89ea33.cjs.js +0 -5542
- package/dist/flowDiagram-aadb13b0.cjs.js +0 -1351
- package/dist/flowDiagram-v2-f2119625.cjs.js +0 -31
- package/dist/flowchart-elk-definition-cf813a97.cjs.js +0 -50248
- package/dist/ganttDiagram-3c2fde2b.cjs.js +0 -3710
- package/dist/gitGraphDiagram-c3a0619c.cjs.js +0 -3815
- package/dist/graph-0ee63739.cjs.js +0 -954
- package/dist/index-bb6d8841.cjs.js +0 -648
- package/dist/index.cjs2.js +0 -76743
- package/dist/infoDiagram-2f5c50c0.cjs.js +0 -460
- package/dist/init-f9637058.cjs.js +0 -17
- package/dist/journeyDiagram-14fe341a.cjs.js +0 -1061
- package/dist/katex-d90b6d29.cjs.js +0 -25690
- package/dist/layout-fd473db2.cjs.js +0 -1613
- package/dist/line-24d93f1b.cjs.js +0 -34
- package/dist/linear-9bcf74c4.cjs.js +0 -537
- package/dist/mindmap-definition-9399c7e6.cjs.js +0 -20488
- package/dist/ordinal-5695958c.cjs.js +0 -330
- package/dist/path-428ebac9.cjs.js +0 -316
- package/dist/pieDiagram-828dae43.cjs.js +0 -949
- package/dist/quadrantDiagram-5fa00455.cjs.js +0 -2409
- package/dist/requirementDiagram-03163dc4.cjs.js +0 -2267
- package/dist/sankeyDiagram-52ec8976.cjs.js +0 -1848
- package/dist/sequenceDiagram-b517d154.cjs.js +0 -5948
- package/dist/stateDiagram-fca82b5b.cjs.js +0 -283
- package/dist/stateDiagram-v2-ed04200a.cjs.js +0 -373
- package/dist/styles-11e81fdd.cjs.js +0 -3943
- package/dist/styles-cacbff60.cjs.js +0 -2120
- package/dist/styles-e75131e4.cjs.js +0 -671
- package/dist/svgDrawCommon-ecc5f780.cjs.js +0 -68
- package/dist/timeline-definition-4ee9bff4.cjs.js +0 -1161
- package/dist/xychartDiagram-e5e6b652.cjs.js +0 -3150
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styles11e81fdd = require('./styles-11e81fdd.cjs.js');
|
|
4
|
-
var index = require('./index.cjs2.js');
|
|
5
|
-
var graph0ee63739 = require('./graph-0ee63739.cjs.js');
|
|
6
|
-
var layoutFd473db2 = require('./layout-fd473db2.cjs.js');
|
|
7
|
-
var line24d93f1b = require('./line-24d93f1b.cjs.js');
|
|
8
|
-
require('./array-2ff2c7a6.cjs.js');
|
|
9
|
-
require('./path-428ebac9.cjs.js');
|
|
10
|
-
|
|
11
|
-
var _ = 0;
|
|
12
|
-
var $ = function $(i, a, t, o, p) {
|
|
13
|
-
var g = function g(e) {
|
|
14
|
-
switch(e){
|
|
15
|
-
case p.db.relationType.AGGREGATION:
|
|
16
|
-
return "aggregation";
|
|
17
|
-
case p.db.relationType.EXTENSION:
|
|
18
|
-
return "extension";
|
|
19
|
-
case p.db.relationType.COMPOSITION:
|
|
20
|
-
return "composition";
|
|
21
|
-
case p.db.relationType.DEPENDENCY:
|
|
22
|
-
return "dependency";
|
|
23
|
-
case p.db.relationType.LOLLIPOP:
|
|
24
|
-
return "lollipop";
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
a.points = a.points.filter(function(e) {
|
|
28
|
-
return !Number.isNaN(e.y);
|
|
29
|
-
});
|
|
30
|
-
var s = a.points, c = line24d93f1b.P().x(function(e) {
|
|
31
|
-
return e.x;
|
|
32
|
-
}).y(function(e) {
|
|
33
|
-
return e.y;
|
|
34
|
-
}).curve(index.Pf), n = i.append("path").attr("d", c(s)).attr("id", "edge" + _).attr("class", "relation");
|
|
35
|
-
var r = "";
|
|
36
|
-
o.arrowMarkerAbsolute && (r = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, r = r.replace(/\(/g, "\\("), r = r.replace(/\)/g, "\\)")), t.relation.lineType == 1 && n.attr("class", "relation dashed-line"), t.relation.lineType == 10 && n.attr("class", "relation dotted-line"), t.relation.type1 !== "none" && n.attr("marker-start", "url(" + r + "#" + g(t.relation.type1) + "Start)"), t.relation.type2 !== "none" && n.attr("marker-end", "url(" + r + "#" + g(t.relation.type2) + "End)");
|
|
37
|
-
var f, h;
|
|
38
|
-
var x = a.points.length;
|
|
39
|
-
var k = index.ei.calcLabelPosition(a.points);
|
|
40
|
-
f = k.x, h = k.y;
|
|
41
|
-
var y, m, w, b;
|
|
42
|
-
if (x % 2 !== 0 && x > 1) {
|
|
43
|
-
var e = index.ei.calcCardinalityPosition(t.relation.type1 !== "none", a.points, a.points[0]), d = index.ei.calcCardinalityPosition(t.relation.type2 !== "none", a.points, a.points[x - 1]);
|
|
44
|
-
index.L.debug("cardinality_1_point " + JSON.stringify(e)), index.L.debug("cardinality_2_point " + JSON.stringify(d)), y = e.x, m = e.y, w = d.x, b = d.y;
|
|
45
|
-
}
|
|
46
|
-
if (t.title !== void 0) {
|
|
47
|
-
var e1 = i.append("g").attr("class", "classLabel"), d1 = e1.append("text").attr("class", "label").attr("x", f).attr("y", h).attr("fill", "red").attr("text-anchor", "middle").text(t.title);
|
|
48
|
-
window.label = d1;
|
|
49
|
-
var l = d1.node().getBBox();
|
|
50
|
-
e1.insert("rect", ":first-child").attr("class", "box").attr("x", l.x - o.padding / 2).attr("y", l.y - o.padding / 2).attr("width", l.width + o.padding).attr("height", l.height + o.padding);
|
|
51
|
-
}
|
|
52
|
-
index.L.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", y).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", w).attr("y", b).attr("fill", "black").attr("font-size", "6").text(t.relationTitle2), _++;
|
|
53
|
-
}, J = function J(i, a, t, o) {
|
|
54
|
-
index.L.debug("Rendering class ", a, t);
|
|
55
|
-
var p = a.id, g = {
|
|
56
|
-
id: p,
|
|
57
|
-
label: a.id,
|
|
58
|
-
width: 0,
|
|
59
|
-
height: 0
|
|
60
|
-
}, s = i.append("g").attr("id", o.db.lookUpDomId(p)).attr("class", "classGroup");
|
|
61
|
-
var c;
|
|
62
|
-
a.link ? c = s.append("svg:a").attr("xlink:href", a.link).attr("target", a.linkTarget).append("text").attr("y", t.textHeight + t.padding).attr("x", 0) : c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
63
|
-
var n = true;
|
|
64
|
-
a.annotations.forEach(function(d) {
|
|
65
|
-
var l = c.append("tspan").text("«" + d + "»");
|
|
66
|
-
n || l.attr("dy", t.textHeight), n = false;
|
|
67
|
-
});
|
|
68
|
-
var r = C(a);
|
|
69
|
-
var f = c.append("tspan").text(r).attr("class", "title");
|
|
70
|
-
n || f.attr("dy", t.textHeight);
|
|
71
|
-
var h = c.node().getBBox().height;
|
|
72
|
-
var x, k, y;
|
|
73
|
-
if (a.members.length > 0) {
|
|
74
|
-
x = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin / 2).attr("y2", t.padding + h + t.dividerMargin / 2);
|
|
75
|
-
var d = s.append("text").attr("x", t.padding).attr("y", h + t.dividerMargin + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
76
|
-
n = true, a.members.forEach(function(l) {
|
|
77
|
-
v(d, l, n, t), n = false;
|
|
78
|
-
}), k = d.node().getBBox();
|
|
79
|
-
}
|
|
80
|
-
if (a.methods.length > 0) {
|
|
81
|
-
y = s.append("line").attr("x1", 0).attr("y1", t.padding + h + t.dividerMargin + k.height).attr("y2", t.padding + h + t.dividerMargin + k.height);
|
|
82
|
-
var d1 = s.append("text").attr("x", t.padding).attr("y", h + 2 * t.dividerMargin + k.height + t.textHeight).attr("fill", "white").attr("class", "classText");
|
|
83
|
-
n = true, a.methods.forEach(function(l) {
|
|
84
|
-
v(d1, l, n, t), n = false;
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
var m = s.node().getBBox();
|
|
88
|
-
var w = " ";
|
|
89
|
-
a.cssClasses.length > 0 && (w = w + a.cssClasses.join(" "));
|
|
90
|
-
var e = s.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", w).node().getBBox().width;
|
|
91
|
-
return c.node().childNodes.forEach(function(d) {
|
|
92
|
-
d.setAttribute("x", (e - d.getBBox().width) / 2);
|
|
93
|
-
}), a.tooltip && c.insert("title").text(a.tooltip), x && x.attr("x2", e), y && y.attr("x2", e), g.width = e, g.height = m.height + t.padding + 0.5 * t.dividerMargin, g;
|
|
94
|
-
}, C = function C(i) {
|
|
95
|
-
var a = i.id;
|
|
96
|
-
return i.type && (a += "<" + index.C1(i.type) + ">"), a;
|
|
97
|
-
}, Z = function Z(i, a, t, o) {
|
|
98
|
-
index.L.debug("Rendering note ", a, t);
|
|
99
|
-
var p = a.id, g = {
|
|
100
|
-
id: p,
|
|
101
|
-
text: a.text,
|
|
102
|
-
width: 0,
|
|
103
|
-
height: 0
|
|
104
|
-
}, s = i.append("g").attr("id", p).attr("class", "classGroup");
|
|
105
|
-
var c = s.append("text").attr("y", t.textHeight + t.padding).attr("x", 0);
|
|
106
|
-
var n = JSON.parse('"'.concat(a.text, '"')).split("\n");
|
|
107
|
-
n.forEach(function(x) {
|
|
108
|
-
index.L.debug("Adding line: ".concat(x)), c.append("tspan").text(x).attr("class", "title").attr("dy", t.textHeight);
|
|
109
|
-
});
|
|
110
|
-
var r = s.node().getBBox(), h = s.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", r.width + 2 * t.padding).attr("height", r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin).node().getBBox().width;
|
|
111
|
-
return c.node().childNodes.forEach(function(x) {
|
|
112
|
-
x.setAttribute("x", (h - x.getBBox().width) / 2);
|
|
113
|
-
}), g.width = h, g.height = r.height + n.length * t.textHeight + t.padding + 0.5 * t.dividerMargin, g;
|
|
114
|
-
}, v = function v(i, a, t, o) {
|
|
115
|
-
var _a_getDisplayDetails = a.getDisplayDetails(), p = _a_getDisplayDetails.displayText, g = _a_getDisplayDetails.cssStyle, s = i.append("tspan").attr("x", o.padding).text(p);
|
|
116
|
-
g !== "" && s.attr("style", a.cssStyle), t || s.attr("dy", o.textHeight);
|
|
117
|
-
}, N = {
|
|
118
|
-
getClassTitleString: C,
|
|
119
|
-
drawClass: J,
|
|
120
|
-
drawEdge: $,
|
|
121
|
-
drawNote: Z
|
|
122
|
-
};
|
|
123
|
-
var T = {};
|
|
124
|
-
var E = 20, L = function L(i) {
|
|
125
|
-
var a = Object.entries(T).find(function(t) {
|
|
126
|
-
return t[1].label === i;
|
|
127
|
-
});
|
|
128
|
-
if (a) return a[0];
|
|
129
|
-
}, R = function R(i) {
|
|
130
|
-
i.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"), i.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"), i.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"), i.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"), i.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"), i.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"), i.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"), i.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");
|
|
131
|
-
}, F = function F(i, a, t, o) {
|
|
132
|
-
var p = index.Vn().class;
|
|
133
|
-
T = {}, index.L.info("Rendering diagram " + i);
|
|
134
|
-
var g = index.Vn().securityLevel;
|
|
135
|
-
var s;
|
|
136
|
-
g === "sandbox" && (s = index.bt("#i" + a));
|
|
137
|
-
var c = g === "sandbox" ? index.bt(s.nodes()[0].contentDocument.body) : index.bt("body"), n = c.select("[id='".concat(a, "']"));
|
|
138
|
-
R(n);
|
|
139
|
-
var r = new graph0ee63739.Ze({
|
|
140
|
-
multigraph: true
|
|
141
|
-
});
|
|
142
|
-
r.setGraph({
|
|
143
|
-
isMultiGraph: true
|
|
144
|
-
}), r.setDefaultEdgeLabel(function() {
|
|
145
|
-
return {};
|
|
146
|
-
});
|
|
147
|
-
var f = o.db.getClasses(), h = Object.keys(f);
|
|
148
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
149
|
-
try {
|
|
150
|
-
for(var _iterator = h[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
151
|
-
var e = _step.value;
|
|
152
|
-
var d = f[e], l = N.drawClass(n, d, p, o);
|
|
153
|
-
T[l.id] = l, r.setNode(l.id, l), index.L.info("Org height: " + l.height);
|
|
154
|
-
}
|
|
155
|
-
} catch (err) {
|
|
156
|
-
_didIteratorError = true;
|
|
157
|
-
_iteratorError = err;
|
|
158
|
-
} finally{
|
|
159
|
-
try {
|
|
160
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
161
|
-
_iterator.return();
|
|
162
|
-
}
|
|
163
|
-
} finally{
|
|
164
|
-
if (_didIteratorError) {
|
|
165
|
-
throw _iteratorError;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
o.db.getRelations().forEach(function(e) {
|
|
170
|
-
index.L.info(// cspell:ignore tjoho
|
|
171
|
-
"tjoho" + L(e.id1) + L(e.id2) + JSON.stringify(e)), r.setEdge(L(e.id1), L(e.id2), {
|
|
172
|
-
relation: e
|
|
173
|
-
}, e.title || "DEFAULT");
|
|
174
|
-
}), o.db.getNotes().forEach(function(e) {
|
|
175
|
-
index.L.debug("Adding note: ".concat(JSON.stringify(e)));
|
|
176
|
-
var d = N.drawNote(n, e, p, o);
|
|
177
|
-
T[d.id] = d, r.setNode(d.id, d), e.class && e.class in f && r.setEdge(e.id, L(e.class), {
|
|
178
|
-
relation: {
|
|
179
|
-
id1: e.id,
|
|
180
|
-
id2: e.class,
|
|
181
|
-
relation: {
|
|
182
|
-
type1: "none",
|
|
183
|
-
type2: "none",
|
|
184
|
-
lineType: 10
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}, "DEFAULT");
|
|
188
|
-
}), layoutFd473db2.Yt(r), r.nodes().forEach(function(e) {
|
|
189
|
-
e !== void 0 && r.node(e) !== void 0 && (index.L.debug("Node " + e + ": " + JSON.stringify(r.node(e))), c.select("#" + (o.db.lookUpDomId(e) || e)).attr("transform", "translate(" + (r.node(e).x - r.node(e).width / 2) + "," + (r.node(e).y - r.node(e).height / 2) + " )"));
|
|
190
|
-
}), r.edges().forEach(function(e) {
|
|
191
|
-
e !== void 0 && r.edge(e) !== void 0 && (index.L.debug("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(r.edge(e))), N.drawEdge(n, r.edge(e), r.edge(e).relation, p, o));
|
|
192
|
-
});
|
|
193
|
-
var y = n.node().getBBox(), m = y.width + E * 2, w = y.height + E * 2;
|
|
194
|
-
index.Ol(n, w, m, p.useMaxWidth);
|
|
195
|
-
var b = "".concat(y.x - E, " ").concat(y.y - E, " ").concat(m, " ").concat(w);
|
|
196
|
-
index.L.debug("viewBox ".concat(b)), n.attr("viewBox", b);
|
|
197
|
-
}, U = {
|
|
198
|
-
draw: F
|
|
199
|
-
}, tt = {
|
|
200
|
-
parser: styles11e81fdd.zt,
|
|
201
|
-
db: styles11e81fdd.Kt,
|
|
202
|
-
renderer: U,
|
|
203
|
-
styles: styles11e81fdd.Yt,
|
|
204
|
-
init: function(i) {
|
|
205
|
-
i.class || (i.class = {}), i.class.arrowMarkerAbsolute = i.arrowMarkerAbsolute, styles11e81fdd.Kt.clear();
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
|
|
209
|
-
exports.diagram = tt;
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var styles11e81fdd = require('./styles-11e81fdd.cjs.js');
|
|
4
|
-
var index = require('./index.cjs2.js');
|
|
5
|
-
var graph0ee63739 = require('./graph-0ee63739.cjs.js');
|
|
6
|
-
var indexBb6d8841 = require('./index-bb6d8841.cjs.js');
|
|
7
|
-
require('./layout-fd473db2.cjs.js');
|
|
8
|
-
require('./clone-afc2f047.cjs.js');
|
|
9
|
-
require('./edges-16357fde.cjs.js');
|
|
10
|
-
require('./createText-03b82060.cjs.js');
|
|
11
|
-
require('./line-24d93f1b.cjs.js');
|
|
12
|
-
require('./array-2ff2c7a6.cjs.js');
|
|
13
|
-
require('./path-428ebac9.cjs.js');
|
|
14
|
-
|
|
15
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
16
|
-
try {
|
|
17
|
-
var info = gen[key](arg);
|
|
18
|
-
var value = info.value;
|
|
19
|
-
} catch (error) {
|
|
20
|
-
reject(error);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (info.done) {
|
|
24
|
-
resolve(value);
|
|
25
|
-
} else {
|
|
26
|
-
Promise.resolve(value).then(_next, _throw);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function _async_to_generator(fn) {
|
|
30
|
-
return function() {
|
|
31
|
-
var self = this, args = arguments;
|
|
32
|
-
return new Promise(function(resolve, reject) {
|
|
33
|
-
var gen = fn.apply(self, args);
|
|
34
|
-
function _next(value) {
|
|
35
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
36
|
-
}
|
|
37
|
-
function _throw(err) {
|
|
38
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
39
|
-
}
|
|
40
|
-
_next(undefined);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function _define_property(obj, key, value) {
|
|
45
|
-
if (key in obj) {
|
|
46
|
-
Object.defineProperty(obj, key, {
|
|
47
|
-
value: value,
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true
|
|
51
|
-
});
|
|
52
|
-
} else {
|
|
53
|
-
obj[key] = value;
|
|
54
|
-
}
|
|
55
|
-
return obj;
|
|
56
|
-
}
|
|
57
|
-
function _object_spread(target) {
|
|
58
|
-
for(var i = 1; i < arguments.length; i++){
|
|
59
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
60
|
-
var ownKeys = Object.keys(source);
|
|
61
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
62
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
63
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
ownKeys.forEach(function(key) {
|
|
67
|
-
_define_property(target, key, source[key]);
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return target;
|
|
71
|
-
}
|
|
72
|
-
function _ts_generator(thisArg, body) {
|
|
73
|
-
var f, y, t, g, _ = {
|
|
74
|
-
label: 0,
|
|
75
|
-
sent: function() {
|
|
76
|
-
if (t[0] & 1) throw t[1];
|
|
77
|
-
return t[1];
|
|
78
|
-
},
|
|
79
|
-
trys: [],
|
|
80
|
-
ops: []
|
|
81
|
-
};
|
|
82
|
-
return g = {
|
|
83
|
-
next: verb(0),
|
|
84
|
-
"throw": verb(1),
|
|
85
|
-
"return": verb(2)
|
|
86
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
87
|
-
return this;
|
|
88
|
-
}), g;
|
|
89
|
-
function verb(n) {
|
|
90
|
-
return function(v) {
|
|
91
|
-
return step([
|
|
92
|
-
n,
|
|
93
|
-
v
|
|
94
|
-
]);
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
function step(op) {
|
|
98
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
99
|
-
while(_)try {
|
|
100
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
101
|
-
if (y = 0, t) op = [
|
|
102
|
-
op[0] & 2,
|
|
103
|
-
t.value
|
|
104
|
-
];
|
|
105
|
-
switch(op[0]){
|
|
106
|
-
case 0:
|
|
107
|
-
case 1:
|
|
108
|
-
t = op;
|
|
109
|
-
break;
|
|
110
|
-
case 4:
|
|
111
|
-
_.label++;
|
|
112
|
-
return {
|
|
113
|
-
value: op[1],
|
|
114
|
-
done: false
|
|
115
|
-
};
|
|
116
|
-
case 5:
|
|
117
|
-
_.label++;
|
|
118
|
-
y = op[1];
|
|
119
|
-
op = [
|
|
120
|
-
0
|
|
121
|
-
];
|
|
122
|
-
continue;
|
|
123
|
-
case 7:
|
|
124
|
-
op = _.ops.pop();
|
|
125
|
-
_.trys.pop();
|
|
126
|
-
continue;
|
|
127
|
-
default:
|
|
128
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
129
|
-
_ = 0;
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
133
|
-
_.label = op[1];
|
|
134
|
-
break;
|
|
135
|
-
}
|
|
136
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
137
|
-
_.label = t[1];
|
|
138
|
-
t = op;
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
if (t && _.label < t[2]) {
|
|
142
|
-
_.label = t[2];
|
|
143
|
-
_.ops.push(op);
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (t[2]) _.ops.pop();
|
|
147
|
-
_.trys.pop();
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
op = body.call(thisArg, _);
|
|
151
|
-
} catch (e) {
|
|
152
|
-
op = [
|
|
153
|
-
6,
|
|
154
|
-
e
|
|
155
|
-
];
|
|
156
|
-
y = 0;
|
|
157
|
-
} finally{
|
|
158
|
-
f = t = 0;
|
|
159
|
-
}
|
|
160
|
-
if (op[0] & 5) throw op[1];
|
|
161
|
-
return {
|
|
162
|
-
value: op[0] ? op[1] : void 0,
|
|
163
|
-
done: true
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
var S = function(o) {
|
|
168
|
-
return index.$n.sanitizeText(o, index.Vn());
|
|
169
|
-
};
|
|
170
|
-
var v = {
|
|
171
|
-
dividerMargin: 10,
|
|
172
|
-
padding: 5,
|
|
173
|
-
textHeight: 10,
|
|
174
|
-
curve: void 0
|
|
175
|
-
};
|
|
176
|
-
var P = function P(o, e, p, n) {
|
|
177
|
-
var t = Object.keys(o);
|
|
178
|
-
index.L.info("keys:", t), index.L.info(o), t.forEach(function(s) {
|
|
179
|
-
var y, d;
|
|
180
|
-
var _ref;
|
|
181
|
-
var l = o[s], i = {
|
|
182
|
-
shape: "rect",
|
|
183
|
-
id: l.id,
|
|
184
|
-
domId: l.domId,
|
|
185
|
-
labelText: S(l.id),
|
|
186
|
-
labelStyle: "",
|
|
187
|
-
style: "fill: none; stroke: black",
|
|
188
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
189
|
-
padding: (_ref = (y = index.Vn().flowchart) == null ? void 0 : y.padding) !== null && _ref !== void 0 ? _ref : (d = index.Vn().class) == null ? void 0 : d.padding
|
|
190
|
-
};
|
|
191
|
-
e.setNode(l.id, i), I(l.classes, e, p, n, l.id), index.L.info("setNode", i);
|
|
192
|
-
});
|
|
193
|
-
}, I = function I(o, e, p, n, t) {
|
|
194
|
-
var s = Object.keys(o);
|
|
195
|
-
index.L.info("keys:", s), index.L.info(o), s.filter(function(l) {
|
|
196
|
-
return o[l].parent == t;
|
|
197
|
-
}).forEach(function(l) {
|
|
198
|
-
var u, m;
|
|
199
|
-
var _a_label, _ref;
|
|
200
|
-
var a = o[l], i = a.cssClasses.join(" "), y = index.B0(a.styles), d = (_a_label = a.label) !== null && _a_label !== void 0 ? _a_label : a.id, f = 0, h = "class_box", b = {
|
|
201
|
-
labelStyle: y.labelStyle,
|
|
202
|
-
shape: h,
|
|
203
|
-
labelText: S(d),
|
|
204
|
-
classData: a,
|
|
205
|
-
rx: f,
|
|
206
|
-
ry: f,
|
|
207
|
-
class: i,
|
|
208
|
-
style: y.style,
|
|
209
|
-
id: a.id,
|
|
210
|
-
domId: a.domId,
|
|
211
|
-
tooltip: n.db.getTooltip(a.id, t) || "",
|
|
212
|
-
haveCallback: a.haveCallback,
|
|
213
|
-
link: a.link,
|
|
214
|
-
width: a.type === "group" ? 500 : void 0,
|
|
215
|
-
type: a.type,
|
|
216
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
217
|
-
padding: (_ref = (u = index.Vn().flowchart) == null ? void 0 : u.padding) !== null && _ref !== void 0 ? _ref : (m = index.Vn().class) == null ? void 0 : m.padding
|
|
218
|
-
};
|
|
219
|
-
e.setNode(a.id, b), t && e.setParent(a.id, t), index.L.info("setNode", b);
|
|
220
|
-
});
|
|
221
|
-
}, F = function F(o, e, p, n) {
|
|
222
|
-
index.L.info(o), o.forEach(function(t, s) {
|
|
223
|
-
var m, g;
|
|
224
|
-
var _ref;
|
|
225
|
-
var l = t, a = "", i = {
|
|
226
|
-
labelStyle: "",
|
|
227
|
-
style: ""
|
|
228
|
-
}, y = l.text, d = 0, f = "note", h = {
|
|
229
|
-
labelStyle: i.labelStyle,
|
|
230
|
-
shape: f,
|
|
231
|
-
labelText: S(y),
|
|
232
|
-
noteData: l,
|
|
233
|
-
rx: d,
|
|
234
|
-
ry: d,
|
|
235
|
-
class: a,
|
|
236
|
-
style: i.style,
|
|
237
|
-
id: l.id,
|
|
238
|
-
domId: l.id,
|
|
239
|
-
tooltip: "",
|
|
240
|
-
type: "note",
|
|
241
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
242
|
-
padding: (_ref = (m = index.Vn().flowchart) == null ? void 0 : m.padding) !== null && _ref !== void 0 ? _ref : (g = index.Vn().class) == null ? void 0 : g.padding
|
|
243
|
-
};
|
|
244
|
-
if (e.setNode(l.id, h), index.L.info("setNode", h), !l.class || !(l.class in n)) return;
|
|
245
|
-
var b = p + s, u = {
|
|
246
|
-
id: "edgeNote".concat(b),
|
|
247
|
-
//Set relationship style and line type
|
|
248
|
-
classes: "relation",
|
|
249
|
-
pattern: "dotted",
|
|
250
|
-
// Set link type for rendering
|
|
251
|
-
arrowhead: "none",
|
|
252
|
-
//Set edge extra labels
|
|
253
|
-
startLabelRight: "",
|
|
254
|
-
endLabelLeft: "",
|
|
255
|
-
//Set relation arrow types
|
|
256
|
-
arrowTypeStart: "none",
|
|
257
|
-
arrowTypeEnd: "none",
|
|
258
|
-
style: "fill:none",
|
|
259
|
-
labelStyle: "",
|
|
260
|
-
curve: index.x0(v.curve, index.Df)
|
|
261
|
-
};
|
|
262
|
-
e.setEdge(l.id, l.class, u, b);
|
|
263
|
-
});
|
|
264
|
-
}, H = function H(o, e) {
|
|
265
|
-
var p = index.Vn().flowchart;
|
|
266
|
-
var n = 0;
|
|
267
|
-
o.forEach(function(t) {
|
|
268
|
-
var l;
|
|
269
|
-
n++;
|
|
270
|
-
var s = {
|
|
271
|
-
//Set relationship style and line type
|
|
272
|
-
classes: "relation",
|
|
273
|
-
pattern: t.relation.lineType == 1 ? "dashed" : "solid",
|
|
274
|
-
id: "id_".concat(t.id1, "_").concat(t.id2, "_").concat(n),
|
|
275
|
-
// Set link type for rendering
|
|
276
|
-
arrowhead: t.type === "arrow_open" ? "none" : "normal",
|
|
277
|
-
//Set edge extra labels
|
|
278
|
-
startLabelRight: t.relationTitle1 === "none" ? "" : t.relationTitle1,
|
|
279
|
-
endLabelLeft: t.relationTitle2 === "none" ? "" : t.relationTitle2,
|
|
280
|
-
//Set relation arrow types
|
|
281
|
-
arrowTypeStart: D(t.relation.type1),
|
|
282
|
-
arrowTypeEnd: D(t.relation.type2),
|
|
283
|
-
style: "fill:none",
|
|
284
|
-
labelStyle: "",
|
|
285
|
-
curve: index.x0(p == null ? void 0 : p.curve, index.Df)
|
|
286
|
-
};
|
|
287
|
-
if (index.L.info(s, t), t.style !== void 0) {
|
|
288
|
-
var a = index.B0(t.style);
|
|
289
|
-
s.style = a.style, s.labelStyle = a.labelStyle;
|
|
290
|
-
}
|
|
291
|
-
var _ref;
|
|
292
|
-
t.text = t.title, t.text === void 0 ? t.style !== void 0 && (s.arrowheadStyle = "fill: #333") : (s.arrowheadStyle = "fill: #333", s.labelpos = "c", ((_ref = (l = index.Vn().flowchart) == null ? void 0 : l.htmlLabels) !== null && _ref !== void 0 ? _ref : index.Vn().htmlLabels) ? (s.labelType = "html", s.label = '<span class="edgeLabel">' + t.text + "</span>") : (s.labelType = "text", s.label = t.text.replace(index.$n.lineBreakRegex, "\n"), t.style === void 0 && (s.style = s.style || "stroke: #333; stroke-width: 1.5px;fill:none"), s.labelStyle = s.labelStyle.replace("color:", "fill:"))), e.setEdge(t.id1, t.id2, s, n);
|
|
293
|
-
});
|
|
294
|
-
}, V = function V(o) {
|
|
295
|
-
v = _object_spread({}, v, o);
|
|
296
|
-
}, W = function() {
|
|
297
|
-
var _ref = _async_to_generator(function(o, e, p, n) {
|
|
298
|
-
var _r_flowchart, t, s, _ref, _ref1, l, a, i, y, d, f, h, b, u, m, g, _ref2, T, M, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, w, L, x;
|
|
299
|
-
return _ts_generator(this, function(_state) {
|
|
300
|
-
switch(_state.label){
|
|
301
|
-
case 0:
|
|
302
|
-
index.L.info("Drawing class - ", e);
|
|
303
|
-
t = (_r_flowchart = index.Vn().flowchart) !== null && _r_flowchart !== void 0 ? _r_flowchart : index.Vn().class, s = index.Vn().securityLevel;
|
|
304
|
-
index.L.info("config:", t);
|
|
305
|
-
l = (_ref = t == null ? void 0 : t.nodeSpacing) !== null && _ref !== void 0 ? _ref : 50, a = (_ref1 = t == null ? void 0 : t.rankSpacing) !== null && _ref1 !== void 0 ? _ref1 : 50, i = new graph0ee63739.Ze({
|
|
306
|
-
multigraph: true,
|
|
307
|
-
compound: true
|
|
308
|
-
}).setGraph({
|
|
309
|
-
rankdir: n.db.getDirection(),
|
|
310
|
-
nodesep: l,
|
|
311
|
-
ranksep: a,
|
|
312
|
-
marginx: 8,
|
|
313
|
-
marginy: 8
|
|
314
|
-
}).setDefaultEdgeLabel(function() {
|
|
315
|
-
return {};
|
|
316
|
-
}), y = n.db.getNamespaces(), d = n.db.getClasses(), f = n.db.getRelations(), h = n.db.getNotes();
|
|
317
|
-
index.L.info(f), P(y, i, e, n), I(d, i, e, n), H(f, i), F(h, i, f.length + 1, d);
|
|
318
|
-
s === "sandbox" && (b = index.bt("#i" + e));
|
|
319
|
-
u = s === "sandbox" ? index.bt(b.nodes()[0].contentDocument.body) : index.bt("body"), m = u.select('[id="'.concat(e, '"]')), g = u.select("#" + e + " g");
|
|
320
|
-
return [
|
|
321
|
-
4,
|
|
322
|
-
indexBb6d8841.bt(g, i, [
|
|
323
|
-
"aggregation",
|
|
324
|
-
"extension",
|
|
325
|
-
"composition",
|
|
326
|
-
"dependency",
|
|
327
|
-
"lollipop"
|
|
328
|
-
], "classDiagram", e)
|
|
329
|
-
];
|
|
330
|
-
case 1:
|
|
331
|
-
if (_state.sent(), index.ei.insertTitle(m, "classTitleText", (_ref2 = t == null ? void 0 : t.titleTopMargin) !== null && _ref2 !== void 0 ? _ref2 : 5, n.db.getDiagramTitle()), index.k_(i, m, t == null ? void 0 : t.diagramPadding, t == null ? void 0 : t.useMaxWidth), !(t != null && t.htmlLabels)) {
|
|
332
|
-
T = s === "sandbox" ? b.nodes()[0].contentDocument : document, M = T.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
|
333
|
-
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
334
|
-
try {
|
|
335
|
-
for(_iterator = M[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
336
|
-
w = _step.value;
|
|
337
|
-
L = w.getBBox(), x = T.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
338
|
-
x.setAttribute("rx", 0), x.setAttribute("ry", 0), x.setAttribute("width", L.width), x.setAttribute("height", L.height), w.insertBefore(x, w.firstChild);
|
|
339
|
-
}
|
|
340
|
-
} catch (err) {
|
|
341
|
-
_didIteratorError = true;
|
|
342
|
-
_iteratorError = err;
|
|
343
|
-
} finally{
|
|
344
|
-
try {
|
|
345
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
346
|
-
_iterator.return();
|
|
347
|
-
}
|
|
348
|
-
} finally{
|
|
349
|
-
if (_didIteratorError) {
|
|
350
|
-
throw _iteratorError;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
}
|
|
355
|
-
return [
|
|
356
|
-
2
|
|
357
|
-
];
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
});
|
|
361
|
-
return function W(o, e, p, n) {
|
|
362
|
-
return _ref.apply(this, arguments);
|
|
363
|
-
};
|
|
364
|
-
}();
|
|
365
|
-
function D(o) {
|
|
366
|
-
var e;
|
|
367
|
-
switch(o){
|
|
368
|
-
case 0:
|
|
369
|
-
e = "aggregation";
|
|
370
|
-
break;
|
|
371
|
-
case 1:
|
|
372
|
-
e = "extension";
|
|
373
|
-
break;
|
|
374
|
-
case 2:
|
|
375
|
-
e = "composition";
|
|
376
|
-
break;
|
|
377
|
-
case 3:
|
|
378
|
-
e = "dependency";
|
|
379
|
-
break;
|
|
380
|
-
case 4:
|
|
381
|
-
e = "lollipop";
|
|
382
|
-
break;
|
|
383
|
-
default:
|
|
384
|
-
e = "none";
|
|
385
|
-
}
|
|
386
|
-
return e;
|
|
387
|
-
}
|
|
388
|
-
var J = {
|
|
389
|
-
setConf: V,
|
|
390
|
-
draw: W
|
|
391
|
-
}, ot = {
|
|
392
|
-
parser: styles11e81fdd.zt,
|
|
393
|
-
db: styles11e81fdd.Kt,
|
|
394
|
-
renderer: J,
|
|
395
|
-
styles: styles11e81fdd.Yt,
|
|
396
|
-
init: function(o) {
|
|
397
|
-
o.class || (o.class = {}), o.class.arrowMarkerAbsolute = o.arrowMarkerAbsolute, styles11e81fdd.Kt.clear();
|
|
398
|
-
}
|
|
399
|
-
};
|
|
400
|
-
|
|
401
|
-
exports.diagram = ot;
|