@kong-ui-public/documentation 0.7.83 → 0.7.85
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/_basePickBy-CMfPif8e-CmRJF0Pz.js +151 -0
- package/dist/_baseUniq-CXqhI00C-BfnSCqya.js +615 -0
- package/dist/arc-JIMrD458-iE0qPqUL.js +83 -0
- package/dist/architecture-I3QFYML2-Bgw7-fJd-BmHcSoDq.js +5 -0
- package/dist/{architectureDiagram-V6B76FHG-CMXFnETI-RxxML1uW.js → architectureDiagram-AYX4OTIS-XPsSAXrN-CriQXfFm.js} +4 -4
- package/dist/blockDiagram-XN6IQ5JY-IfzOVP1S-DoilgKcQ.js +2247 -0
- package/dist/{c4Diagram-THADGKDP-BoXI_MdM-85LhjWUD.js → c4Diagram-GPMAACGM-RttNBnvg-DemUG3qf.js} +2 -2
- package/dist/{channel-BlAyqTfO-DcF7shsf.js → channel-DEiqvYYf-DqQTZyIM.js} +1 -1
- package/dist/{chunk-OQCM5LHU-BXp7HdZf-DAxyAqhb.js → chunk-BAOP5US2-D_mPkUfX-Dlqx79Tr.js} +1 -1
- package/dist/chunk-CXDZ2C6O-B6QVQzrJ-CdVn1xaX.js +1301 -0
- package/dist/{chunk-DUMQOTYW-BvseU82P-Cv9cgfHg.js → chunk-EICJXIV7-B3uVnKYK-BPFil4EM.js} +1 -1
- package/dist/{chunk-2JBRQKJ5-D-tjQIH--CX9PfGSj.js → chunk-JZAHL7AJ-B8L_7Xh_-C2ETRUtV.js} +21 -21
- package/dist/{chunk-2RYQ3QTB-CJAPCFIj-C6EEVa0L.js → chunk-RGXPSUNZ-PjQy3A3Y-BiDEi6k5.js} +1 -1
- package/dist/{chunk-XVOYOM2C-DSF8EQmO-CJoKjxiE.js → chunk-VCFP4HPQ-qZEjUbIz-7kfkUrsj.js} +1 -1
- package/dist/classDiagram-FEGYTUDG-Bu9qKgav-DF2ZcQyp.js +14 -0
- package/dist/classDiagram-v2-R65JCUOM-Bu9qKgav-DF2ZcQyp.js +14 -0
- package/dist/{clone-BxgFQWIV-C8w0qOf5.js → clone-elND5I63-U8WRvSPu.js} +1 -1
- package/dist/dagre-SWNTG5WE-CcKMLYcK-tREOd3Fb.js +447 -0
- package/dist/{diagram-QS5GVLUX-Ck_HO8gZ-CFWjkYXj.js → diagram-NZMEDLQF-vjbbgzvH-BDFE_-Eo.js} +6 -6
- package/dist/documentation.es.js +1 -1
- package/dist/documentation.umd.js +401 -273
- package/dist/{erDiagram-62CBQV5Y-CaO8CQzG-DYEXkRnA.js → erDiagram-WO52GFNT-N8TeMKSM-BojFH-Dn.js} +56 -56
- package/dist/flowDiagram-TSWR6T2D-DzECWIN--CnDMIIi-.js +1484 -0
- package/dist/{ganttDiagram-ASEIQ4P5-BiIuu6iJ-DXC89NBD.js → ganttDiagram-FAOCOTIY-DmxDGUpf-BGJLIQAo.js} +61 -61
- package/dist/gitGraph-YCYPL57B-BKlVjqGu-BRRTPERj.js +5 -0
- package/dist/{gitGraphDiagram-UL5UFKDR-C4dDL1m3-pGO-Nubf.js → gitGraphDiagram-5C7YHVU6-CfJ_hQ2h-C2aLT5AH.js} +21 -21
- package/dist/{graph-BDwITe7N-Dg4ZhErV.js → graph-C5siWsaJ-djbzUgq8.js} +52 -55
- package/dist/{index-D1jNpyAG.js → index-BXFfc1qh.js} +17314 -15496
- package/dist/info-46DW6VJ7-QBUrqpM0-D7DXfBfh.js +5 -0
- package/dist/{infoDiagram-7APDZ6AT-DQAU4aEA-ZuNKK8Q1.js → infoDiagram-P5D6MX3V-CthsN8fk-ju-grajk.js} +2 -2
- package/dist/{journeyDiagram-G5LC7W2K-BDjs8Ede-CBVXgKDg.js → journeyDiagram-UIGPPNLY-CB1xWSVF-CnOTIXjT.js} +3 -3
- package/dist/kanban-definition-KMT3NSR2-B76JZ_Kx-BuaYPyou.js +718 -0
- package/dist/layout-mwnMvyc4-B2PmGvWD.js +1321 -0
- package/dist/{linear-DJf2yjqH-Qa8JBmhC.js → linear-XztDb0hj-RsuwoFLQ.js} +46 -46
- package/dist/{mermaid-parser.core-DKcB0zTx-Cuc2e_U9.js → mermaid-parser.core-C4mt_cFi-BuaZi6gx.js} +9 -9
- package/dist/{mindmap-definition-FCEC46F3-Dfona71I-BMB5v8Sw.js → mindmap-definition-R7LC4OIY-Cg3Nsctr-BcCPx65V.js} +1 -1
- package/dist/packet-W2GHVCYJ-BJGXYVlB-DlnQVVmK.js +5 -0
- package/dist/pie-BEWT4RHE-XO1bTOj2-DEYSeXSg.js +5 -0
- package/dist/{pieDiagram-OZX6XH5M-CVVFrPaX-C40AWUnf.js → pieDiagram-BLWKPB35-Bs5Iyn_g-CnOiPji_.js} +27 -27
- package/dist/{quadrantDiagram-VG34DGKC-D_n6ouG0-B7tCVKZS.js → quadrantDiagram-QXWEEFXS-n8j7IqmF-CloVXY0U.js} +16 -16
- package/dist/{requirementDiagram-FPZB6IJI-DgzsPnSP-BdT6rZ42.js → requirementDiagram-XAUNFCZY-DI_Pyl2h-D8hqXle2.js} +20 -20
- package/dist/{sankeyDiagram-KMMQDL5K-slN_anzC-C8cSA1pn.js → sankeyDiagram-LVV36NHA-Bei7yBJl-DvbyWSci.js} +1 -1
- package/dist/{sequenceDiagram-PQT5PN7B-DmYxtSNe-kmiDoefU.js → sequenceDiagram-D25TJ2OB-NAPdhBbI-DQR1b0UZ.js} +21 -21
- package/dist/{stateDiagram-TQSDS2D4-DaGylNtS-DZvK22EK.js → stateDiagram-GNSP7T6Y-Dzq9j0YG-BgVCaCOx.js} +14 -15
- package/dist/{stateDiagram-v2-J5TZWJW5-CkpV3aOb-CRLcbMy9.js → stateDiagram-v2-HP6YRVRG-Jl4ubGlG-BeMvcZLQ.js} +2 -3
- package/dist/{timeline-definition-KYQAIZUX-BbQn7lRo-DdMJtCcZ.js → timeline-definition-27KQCCZ3-Dyj-cUhB-cBpLcB_z.js} +91 -91
- package/dist/{xychartDiagram-LESROZAQ-C5RGN8Yc-D1Q0T8zi.js → xychartDiagram-MYLB5AYS-Bc_nZcHL-YLCG5NJT.js} +2 -2
- package/package.json +5 -5
- package/dist/_basePickBy-C3_IHxiB-Bgb-nBpw.js +0 -143
- package/dist/_baseUniq-Cede_3wW-BVX848YU.js +0 -622
- package/dist/arc-CFIMKg_S-CJkN7pL8.js +0 -83
- package/dist/architecture-I3QFYML2-CsfpifL5-B7ba29Kf.js +0 -5
- package/dist/blockDiagram-EN3ZKWFM-CyddtNyi-BO48RJ5X.js +0 -1232
- package/dist/chunk-BAVOGKFW-DMR4mnUx-ZqKP-ubQ.js +0 -1092
- package/dist/chunk-UGV5ZQQN-DJ9JPuwX-CiNn-tmJ.js +0 -254
- package/dist/chunk-YWFND7JV-CJxpOF0s-CKv3TLz3.js +0 -786
- package/dist/classDiagram-4BHYIK4I-Bh2E4V_q-Bp1df6xf.js +0 -214
- package/dist/classDiagram-v2-FI7KE7WJ-zeS53lAE--zqW0wuN.js +0 -545
- package/dist/dagre-P3YPLUS5-DvPNKrZS-BqJ7-FR_.js +0 -421
- package/dist/flowDiagram-JSIZSE4D-C3p20RgK-76C6C_fU.js +0 -1380
- package/dist/gitGraph-YCYPL57B-BXHaWu1_-L6S_Q-ER.js +0 -5
- package/dist/info-46DW6VJ7-gLazUuGQ-CgME-TPe.js +0 -5
- package/dist/json-Dg9P6BhK-CcBa4IfV.js +0 -31
- package/dist/layout--tn8zpzB-CFuPSG6n.js +0 -1381
- package/dist/packet-W2GHVCYJ-Dn1-cCwP-_7hKzD3w.js +0 -5
- package/dist/pie-BEWT4RHE-DvPKCMtn-CWoQ7JX6.js +0 -5
|
@@ -1,545 +0,0 @@
|
|
|
1
|
-
import { a as ee, r as te, e as ne, n as re, s as ie } from "./chunk-UGV5ZQQN-DJ9JPuwX-CiNn-tmJ.js";
|
|
2
|
-
import { j as ae, Q as A, X as oe } from "./chunk-BAVOGKFW-DMR4mnUx-ZqKP-ubQ.js";
|
|
3
|
-
import { $ as se, w as de, W as le, O as ce, U as M, R as P, p as O } from "./chunk-YWFND7JV-CJxpOF0s-CKv3TLz3.js";
|
|
4
|
-
import { _ as f, l as i, g as b, af as C, an as he, bl as ge, bm as F, bn as _, bo as j, ap as fe, ab as W, e as G, at as B, aw as ue } from "./index-D1jNpyAG.js";
|
|
5
|
-
import { D as H } from "./graph-BDwITe7N-Dg4ZhErV.js";
|
|
6
|
-
import { o as pe } from "./layout--tn8zpzB-CFuPSG6n.js";
|
|
7
|
-
import { v as x } from "./json-Dg9P6BhK-CcBa4IfV.js";
|
|
8
|
-
var g = {}, m = {}, Q = {}, we = /* @__PURE__ */ f(() => {
|
|
9
|
-
m = {}, Q = {}, g = {};
|
|
10
|
-
}, "clear"), L = /* @__PURE__ */ f((t, e) => (i.trace("In isDescendant", e, " ", t, " = ", m[e].includes(t)), !!m[e].includes(t)), "isDescendant"), ye = /* @__PURE__ */ f((t, e) => (i.info("Descendants of ", e, " is ", m[e]), i.info("Edge is ", t), t.v === e || t.w === e ? !1 : m[e] ? m[e].includes(t.v) || L(t.v, e) || L(t.w, e) || m[e].includes(t.w) : (i.debug("Tilt, ", e, ",not in descendants"), !1)), "edgeInCluster"), U = /* @__PURE__ */ f((t, e, n, s) => {
|
|
11
|
-
i.warn(
|
|
12
|
-
"Copying children of ",
|
|
13
|
-
t,
|
|
14
|
-
"root",
|
|
15
|
-
s,
|
|
16
|
-
"data",
|
|
17
|
-
e.node(t),
|
|
18
|
-
s
|
|
19
|
-
);
|
|
20
|
-
const r = e.children(t) || [];
|
|
21
|
-
t !== s && r.push(t), i.warn("Copying (nodes) clusterId", t, "nodes", r), r.forEach((o) => {
|
|
22
|
-
if (e.children(o).length > 0)
|
|
23
|
-
U(o, e, n, s);
|
|
24
|
-
else {
|
|
25
|
-
const a = e.node(o);
|
|
26
|
-
i.info("cp ", o, " to ", s, " with parent ", t), n.setNode(o, a), s !== e.parent(o) && (i.warn("Setting parent", o, e.parent(o)), n.setParent(o, e.parent(o))), t !== s && o !== t ? (i.debug("Setting parent", o, t), n.setParent(o, t)) : (i.info("In copy ", t, "root", s, "data", e.node(t), s), i.debug(
|
|
27
|
-
"Not Setting parent for node=",
|
|
28
|
-
o,
|
|
29
|
-
"cluster!==rootId",
|
|
30
|
-
t !== s,
|
|
31
|
-
"node!==clusterId",
|
|
32
|
-
o !== t
|
|
33
|
-
));
|
|
34
|
-
const h = e.edges(o);
|
|
35
|
-
i.debug("Copying Edges", h), h.forEach((d) => {
|
|
36
|
-
i.info("Edge", d);
|
|
37
|
-
const u = e.edge(d.v, d.w, d.name);
|
|
38
|
-
i.info("Edge data", u, s);
|
|
39
|
-
try {
|
|
40
|
-
ye(d, s) ? (i.info("Copying as ", d.v, d.w, u, d.name), n.setEdge(d.v, d.w, u, d.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
|
|
41
|
-
"Skipping copy of edge ",
|
|
42
|
-
d.v,
|
|
43
|
-
"-->",
|
|
44
|
-
d.w,
|
|
45
|
-
" rootId: ",
|
|
46
|
-
s,
|
|
47
|
-
" clusterId:",
|
|
48
|
-
t
|
|
49
|
-
);
|
|
50
|
-
} catch (w) {
|
|
51
|
-
i.error(w);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
i.debug("Removing node", o), e.removeNode(o);
|
|
56
|
-
});
|
|
57
|
-
}, "copy"), z = /* @__PURE__ */ f((t, e) => {
|
|
58
|
-
const n = e.children(t);
|
|
59
|
-
let s = [...n];
|
|
60
|
-
for (const r of n)
|
|
61
|
-
Q[r] = t, s = [...s, ...z(r, e)];
|
|
62
|
-
return s;
|
|
63
|
-
}, "extractDescendants"), X = /* @__PURE__ */ f((t, e) => {
|
|
64
|
-
i.trace("Searching", t);
|
|
65
|
-
const n = e.children(t);
|
|
66
|
-
if (i.trace("Searching children of id ", t, n), n.length < 1)
|
|
67
|
-
return i.trace("This is a valid node", t), t;
|
|
68
|
-
for (const s of n) {
|
|
69
|
-
const r = X(s, e);
|
|
70
|
-
if (r)
|
|
71
|
-
return i.trace("Found replacement for", t, " => ", r), r;
|
|
72
|
-
}
|
|
73
|
-
}, "findNonClusterChild"), D = /* @__PURE__ */ f((t) => !g[t] || !g[t].externalConnections ? t : g[t] ? g[t].id : t, "getAnchorId"), be = /* @__PURE__ */ f((t, e) => {
|
|
74
|
-
if (!t || e > 10) {
|
|
75
|
-
i.debug("Opting out, no graph ");
|
|
76
|
-
return;
|
|
77
|
-
} else
|
|
78
|
-
i.debug("Opting in, graph ");
|
|
79
|
-
t.nodes().forEach(function(n) {
|
|
80
|
-
t.children(n).length > 0 && (i.warn(
|
|
81
|
-
"Cluster identified",
|
|
82
|
-
n,
|
|
83
|
-
" Replacement id in edges: ",
|
|
84
|
-
X(n, t)
|
|
85
|
-
), m[n] = z(n, t), g[n] = { id: X(n, t), clusterData: t.node(n) });
|
|
86
|
-
}), t.nodes().forEach(function(n) {
|
|
87
|
-
const s = t.children(n), r = t.edges();
|
|
88
|
-
s.length > 0 ? (i.debug("Cluster identified", n, m), r.forEach((o) => {
|
|
89
|
-
if (o.v !== n && o.w !== n) {
|
|
90
|
-
const a = L(o.v, n), h = L(o.w, n);
|
|
91
|
-
a ^ h && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", m[n]), g[n].externalConnections = !0);
|
|
92
|
-
}
|
|
93
|
-
})) : i.debug("Not a cluster ", n, m);
|
|
94
|
-
});
|
|
95
|
-
for (let n of Object.keys(g)) {
|
|
96
|
-
const s = g[n].id, r = t.parent(s);
|
|
97
|
-
r !== n && g[r] && !g[r].externalConnections && (g[n].id = r);
|
|
98
|
-
}
|
|
99
|
-
t.edges().forEach(function(n) {
|
|
100
|
-
const s = t.edge(n);
|
|
101
|
-
i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(t.edge(n)));
|
|
102
|
-
let r = n.v, o = n.w;
|
|
103
|
-
if (i.warn(
|
|
104
|
-
"Fix XXX",
|
|
105
|
-
g,
|
|
106
|
-
"ids:",
|
|
107
|
-
n.v,
|
|
108
|
-
n.w,
|
|
109
|
-
"Translating: ",
|
|
110
|
-
g[n.v],
|
|
111
|
-
" --- ",
|
|
112
|
-
g[n.w]
|
|
113
|
-
), g[n.v] && g[n.w] && g[n.v] === g[n.w]) {
|
|
114
|
-
i.warn("Fixing and trixing link to self - removing XXX", n.v, n.w, n.name), i.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), r = D(n.v), o = D(n.w), t.removeEdge(n.v, n.w, n.name);
|
|
115
|
-
const a = n.w + "---" + n.v;
|
|
116
|
-
t.setNode(a, {
|
|
117
|
-
domId: a,
|
|
118
|
-
id: a,
|
|
119
|
-
labelStyle: "",
|
|
120
|
-
labelText: s.label,
|
|
121
|
-
padding: 0,
|
|
122
|
-
shape: "labelRect",
|
|
123
|
-
style: ""
|
|
124
|
-
});
|
|
125
|
-
const h = structuredClone(s), d = structuredClone(s);
|
|
126
|
-
h.label = "", h.arrowTypeEnd = "none", d.label = "", h.fromCluster = n.v, d.toCluster = n.v, t.setEdge(r, a, h, n.name + "-cyclic-special"), t.setEdge(a, o, d, n.name + "-cyclic-special");
|
|
127
|
-
} else if (g[n.v] || g[n.w]) {
|
|
128
|
-
if (i.warn("Fixing and trixing - removing XXX", n.v, n.w, n.name), r = D(n.v), o = D(n.w), t.removeEdge(n.v, n.w, n.name), r !== n.v) {
|
|
129
|
-
const a = t.parent(r);
|
|
130
|
-
g[a].externalConnections = !0, s.fromCluster = n.v;
|
|
131
|
-
}
|
|
132
|
-
if (o !== n.w) {
|
|
133
|
-
const a = t.parent(o);
|
|
134
|
-
g[a].externalConnections = !0, s.toCluster = n.w;
|
|
135
|
-
}
|
|
136
|
-
i.warn("Fix Replacing with XXX", r, o, n.name), t.setEdge(r, o, s, n.name);
|
|
137
|
-
}
|
|
138
|
-
}), i.warn("Adjusted Graph", x(t)), V(t, 0), i.trace(g);
|
|
139
|
-
}, "adjustClustersAndEdges"), V = /* @__PURE__ */ f((t, e) => {
|
|
140
|
-
var n, s;
|
|
141
|
-
if (i.warn("extractor - ", e, x(t), t.children("D")), e > 10) {
|
|
142
|
-
i.error("Bailing out");
|
|
143
|
-
return;
|
|
144
|
-
}
|
|
145
|
-
let r = t.nodes(), o = !1;
|
|
146
|
-
for (const a of r) {
|
|
147
|
-
const h = t.children(a);
|
|
148
|
-
o = o || h.length > 0;
|
|
149
|
-
}
|
|
150
|
-
if (!o) {
|
|
151
|
-
i.debug("Done, no node has children", t.nodes());
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
i.debug("Nodes = ", r, e);
|
|
155
|
-
for (const a of r)
|
|
156
|
-
if (i.debug(
|
|
157
|
-
"Extracting node",
|
|
158
|
-
a,
|
|
159
|
-
g,
|
|
160
|
-
g[a] && !g[a].externalConnections,
|
|
161
|
-
!t.parent(a),
|
|
162
|
-
t.node(a),
|
|
163
|
-
t.children("D"),
|
|
164
|
-
" Depth ",
|
|
165
|
-
e
|
|
166
|
-
), !g[a])
|
|
167
|
-
i.debug("Not a cluster", a, e);
|
|
168
|
-
else if (!g[a].externalConnections && // !graph.parent(node) &&
|
|
169
|
-
t.children(a) && t.children(a).length > 0) {
|
|
170
|
-
i.warn(
|
|
171
|
-
"Cluster without external connections, without a parent and with children",
|
|
172
|
-
a,
|
|
173
|
-
e
|
|
174
|
-
);
|
|
175
|
-
let h = t.graph().rankdir === "TB" ? "LR" : "TB";
|
|
176
|
-
(s = (n = g[a]) == null ? void 0 : n.clusterData) != null && s.dir && (h = g[a].clusterData.dir, i.warn("Fixing dir", g[a].clusterData.dir, h));
|
|
177
|
-
const d = new H({
|
|
178
|
-
multigraph: !0,
|
|
179
|
-
compound: !0
|
|
180
|
-
}).setGraph({
|
|
181
|
-
rankdir: h,
|
|
182
|
-
// Todo: set proper spacing
|
|
183
|
-
nodesep: 50,
|
|
184
|
-
ranksep: 50,
|
|
185
|
-
marginx: 8,
|
|
186
|
-
marginy: 8
|
|
187
|
-
}).setDefaultEdgeLabel(function() {
|
|
188
|
-
return {};
|
|
189
|
-
});
|
|
190
|
-
i.warn("Old graph before copy", x(t)), U(a, t, d, a), t.setNode(a, {
|
|
191
|
-
clusterNode: !0,
|
|
192
|
-
id: a,
|
|
193
|
-
clusterData: g[a].clusterData,
|
|
194
|
-
labelText: g[a].labelText,
|
|
195
|
-
graph: d
|
|
196
|
-
}), i.warn("New graph after copy node: (", a, ")", x(d)), i.debug("Old graph after copy", x(t));
|
|
197
|
-
} else
|
|
198
|
-
i.warn(
|
|
199
|
-
"Cluster ** ",
|
|
200
|
-
a,
|
|
201
|
-
" **not meeting the criteria !externalConnections:",
|
|
202
|
-
!g[a].externalConnections,
|
|
203
|
-
" no parent: ",
|
|
204
|
-
!t.parent(a),
|
|
205
|
-
" children ",
|
|
206
|
-
t.children(a) && t.children(a).length > 0,
|
|
207
|
-
t.children("D"),
|
|
208
|
-
e
|
|
209
|
-
), i.debug(g);
|
|
210
|
-
r = t.nodes(), i.warn("New list of nodes", r);
|
|
211
|
-
for (const a of r) {
|
|
212
|
-
const h = t.node(a);
|
|
213
|
-
i.warn(" Now next level", a, h), h.clusterNode && V(h.graph, e + 1);
|
|
214
|
-
}
|
|
215
|
-
}, "extractor"), q = /* @__PURE__ */ f((t, e) => {
|
|
216
|
-
if (e.length === 0)
|
|
217
|
-
return [];
|
|
218
|
-
let n = Object.assign(e);
|
|
219
|
-
return e.forEach((s) => {
|
|
220
|
-
const r = t.children(s), o = q(t, r);
|
|
221
|
-
n = [...n, ...o];
|
|
222
|
-
}), n;
|
|
223
|
-
}, "sorter"), ve = /* @__PURE__ */ f((t) => q(t, t.children()), "sortNodesByHierarchy"), me = /* @__PURE__ */ f((t, e) => {
|
|
224
|
-
i.info("Creating subgraph rect for ", e.id, e);
|
|
225
|
-
const n = b(), s = t.insert("g").attr("class", "cluster" + (e.class ? " " + e.class : "")).attr("id", e.id), r = s.insert("rect", ":first-child"), o = B(n.flowchart.htmlLabels), a = s.insert("g").attr("class", "cluster-label"), h = e.labelType === "markdown" ? ue(a, e.labelText, { style: e.labelStyle, useHtmlLabels: o }, n) : a.node().appendChild(P(e.labelText, e.labelStyle, void 0, !0));
|
|
226
|
-
let d = h.getBBox();
|
|
227
|
-
if (B(n.flowchart.htmlLabels)) {
|
|
228
|
-
const l = h.children[0], c = C(h);
|
|
229
|
-
d = l.getBoundingClientRect(), c.attr("width", d.width), c.attr("height", d.height);
|
|
230
|
-
}
|
|
231
|
-
const u = 0 * e.padding, w = u / 2, p = e.width <= d.width + u ? d.width + u : e.width;
|
|
232
|
-
e.width <= d.width + u ? e.diff = (d.width - e.width) / 2 - e.padding / 2 : e.diff = -e.padding / 2, i.trace("Data ", e, JSON.stringify(e)), r.attr("style", e.style).attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - p / 2).attr("y", e.y - e.height / 2 - w).attr("width", p).attr("height", e.height + u);
|
|
233
|
-
const { subGraphTitleTopMargin: v } = G(n);
|
|
234
|
-
o ? a.attr(
|
|
235
|
-
"transform",
|
|
236
|
-
// This puts the label on top of the box instead of inside it
|
|
237
|
-
`translate(${e.x - d.width / 2}, ${e.y - e.height / 2 + v})`
|
|
238
|
-
) : a.attr(
|
|
239
|
-
"transform",
|
|
240
|
-
// This puts the label on top of the box instead of inside it
|
|
241
|
-
`translate(${e.x}, ${e.y - e.height / 2 + v})`
|
|
242
|
-
);
|
|
243
|
-
const y = r.node().getBBox();
|
|
244
|
-
return e.width = y.width, e.height = y.height, e.intersect = function(l) {
|
|
245
|
-
return O(e, l);
|
|
246
|
-
}, s;
|
|
247
|
-
}, "rect"), xe = /* @__PURE__ */ f((t, e) => {
|
|
248
|
-
const n = t.insert("g").attr("class", "note-cluster").attr("id", e.id), s = n.insert("rect", ":first-child"), r = 0 * e.padding, o = r / 2;
|
|
249
|
-
s.attr("rx", e.rx).attr("ry", e.ry).attr("x", e.x - e.width / 2 - o).attr("y", e.y - e.height / 2 - o).attr("width", e.width + r).attr("height", e.height + r).attr("fill", "none");
|
|
250
|
-
const a = s.node().getBBox();
|
|
251
|
-
return e.width = a.width, e.height = a.height, e.intersect = function(h) {
|
|
252
|
-
return O(e, h);
|
|
253
|
-
}, n;
|
|
254
|
-
}, "noteGroup"), Ne = /* @__PURE__ */ f((t, e) => {
|
|
255
|
-
const n = b(), s = t.insert("g").attr("class", e.classes).attr("id", e.id), r = s.insert("rect", ":first-child"), o = s.insert("g").attr("class", "cluster-label"), a = s.append("rect"), h = o.node().appendChild(P(e.labelText, e.labelStyle, void 0, !0));
|
|
256
|
-
let d = h.getBBox();
|
|
257
|
-
if (B(n.flowchart.htmlLabels)) {
|
|
258
|
-
const l = h.children[0], c = C(h);
|
|
259
|
-
d = l.getBoundingClientRect(), c.attr("width", d.width), c.attr("height", d.height);
|
|
260
|
-
}
|
|
261
|
-
d = h.getBBox();
|
|
262
|
-
const u = 0 * e.padding, w = u / 2, p = e.width <= d.width + e.padding ? d.width + e.padding : e.width;
|
|
263
|
-
e.width <= d.width + e.padding ? e.diff = (d.width + e.padding * 0 - e.width) / 2 : e.diff = -e.padding / 2, r.attr("class", "outer").attr("x", e.x - p / 2 - w).attr("y", e.y - e.height / 2 - w).attr("width", p + u).attr("height", e.height + u), a.attr("class", "inner").attr("x", e.x - p / 2 - w).attr("y", e.y - e.height / 2 - w + d.height - 1).attr("width", p + u).attr("height", e.height + u - d.height - 3);
|
|
264
|
-
const { subGraphTitleTopMargin: v } = G(n);
|
|
265
|
-
o.attr(
|
|
266
|
-
"transform",
|
|
267
|
-
`translate(${e.x - d.width / 2}, ${e.y - e.height / 2 - e.padding / 3 + (B(n.flowchart.htmlLabels) ? 5 : 3) + v})`
|
|
268
|
-
);
|
|
269
|
-
const y = r.node().getBBox();
|
|
270
|
-
return e.height = y.height, e.intersect = function(l) {
|
|
271
|
-
return O(e, l);
|
|
272
|
-
}, s;
|
|
273
|
-
}, "roundedWithTitle"), Se = /* @__PURE__ */ f((t, e) => {
|
|
274
|
-
const n = t.insert("g").attr("class", e.classes).attr("id", e.id), s = n.insert("rect", ":first-child"), r = 0 * e.padding, o = r / 2;
|
|
275
|
-
s.attr("class", "divider").attr("x", e.x - e.width / 2 - o).attr("y", e.y - e.height / 2).attr("width", e.width + r).attr("height", e.height + r);
|
|
276
|
-
const a = s.node().getBBox();
|
|
277
|
-
return e.width = a.width, e.height = a.height, e.diff = -e.padding / 2, e.intersect = function(h) {
|
|
278
|
-
return O(e, h);
|
|
279
|
-
}, n;
|
|
280
|
-
}, "divider"), Ee = { rect: me, roundedWithTitle: Ne, noteGroup: xe, divider: Se }, K = {}, Te = /* @__PURE__ */ f((t, e) => {
|
|
281
|
-
i.trace("Inserting cluster");
|
|
282
|
-
const n = e.shape || "rect";
|
|
283
|
-
K[e.id] = Ee[n](t, e);
|
|
284
|
-
}, "insertCluster"), Ce = /* @__PURE__ */ f(() => {
|
|
285
|
-
K = {};
|
|
286
|
-
}, "clear"), Y = /* @__PURE__ */ f(async (t, e, n, s, r, o) => {
|
|
287
|
-
i.info("Graph in recursive render: XXX", x(e), r);
|
|
288
|
-
const a = e.graph().rankdir;
|
|
289
|
-
i.trace("Dir in recursive render - dir:", a);
|
|
290
|
-
const h = t.insert("g").attr("class", "root");
|
|
291
|
-
e.nodes() ? i.info("Recursive render XXX", e.nodes()) : i.info("No nodes found for", e), e.edges().length > 0 && i.trace("Recursive edges", e.edge(e.edges()[0]));
|
|
292
|
-
const d = h.insert("g").attr("class", "clusters"), u = h.insert("g").attr("class", "edgePaths"), w = h.insert("g").attr("class", "edgeLabels"), p = h.insert("g").attr("class", "nodes");
|
|
293
|
-
await Promise.all(
|
|
294
|
-
e.nodes().map(async function(l) {
|
|
295
|
-
const c = e.node(l);
|
|
296
|
-
if (r !== void 0) {
|
|
297
|
-
const N = JSON.parse(JSON.stringify(r.clusterData));
|
|
298
|
-
i.info("Setting data for cluster XXX (", l, ") ", N, r), e.setNode(r.id, N), e.parent(l) || (i.trace("Setting parent", l, r.id), e.setParent(l, r.id, N));
|
|
299
|
-
}
|
|
300
|
-
if (i.info("(Insert) Node XXX" + l + ": " + JSON.stringify(e.node(l))), c != null && c.clusterNode) {
|
|
301
|
-
i.info("Cluster identified", l, c.width, e.node(l));
|
|
302
|
-
const { ranksep: N, nodesep: E } = e.graph();
|
|
303
|
-
c.graph.setGraph({
|
|
304
|
-
...c.graph.graph(),
|
|
305
|
-
ranksep: N,
|
|
306
|
-
nodesep: E
|
|
307
|
-
});
|
|
308
|
-
const k = await Y(
|
|
309
|
-
p,
|
|
310
|
-
c.graph,
|
|
311
|
-
n,
|
|
312
|
-
s,
|
|
313
|
-
e.node(l),
|
|
314
|
-
o
|
|
315
|
-
), S = k.elem;
|
|
316
|
-
de(c, S), c.diff = k.diff || 0, i.info("Node bounds (abc123)", l, c, c.width, c.x, c.y), le(S, c), i.warn("Recursive render complete ", S, c);
|
|
317
|
-
} else
|
|
318
|
-
e.children(l).length > 0 ? (i.info("Cluster - the non recursive path XXX", l, c.id, c, e), i.info(X(c.id, e)), g[c.id] = { id: X(c.id, e), node: c }) : (i.info("Node - the non recursive path", l, c.id, c), await ce(p, e.node(l), a));
|
|
319
|
-
})
|
|
320
|
-
), e.edges().forEach(async function(l) {
|
|
321
|
-
const c = e.edge(l.v, l.w, l.name);
|
|
322
|
-
i.info("Edge " + l.v + " -> " + l.w + ": " + JSON.stringify(l)), i.info("Edge " + l.v + " -> " + l.w + ": ", l, " ", JSON.stringify(e.edge(l))), i.info("Fix", g, "ids:", l.v, l.w, "Translating: ", g[l.v], g[l.w]), await ne(w, c);
|
|
323
|
-
}), e.edges().forEach(function(l) {
|
|
324
|
-
i.info("Edge " + l.v + " -> " + l.w + ": " + JSON.stringify(l));
|
|
325
|
-
}), i.info("Graph before layout:", JSON.stringify(x(e))), i.info("#############################################"), i.info("### Layout ###"), i.info("#############################################"), i.info(e), pe(e), i.info("Graph after layout:", JSON.stringify(x(e)));
|
|
326
|
-
let v = 0;
|
|
327
|
-
const { subGraphTitleTotalMargin: y } = G(o);
|
|
328
|
-
return ve(e).forEach(function(l) {
|
|
329
|
-
const c = e.node(l);
|
|
330
|
-
i.info("Position " + l + ": " + JSON.stringify(e.node(l))), i.info(
|
|
331
|
-
"Position " + l + ": (" + c.x,
|
|
332
|
-
"," + c.y,
|
|
333
|
-
") width: ",
|
|
334
|
-
c.width,
|
|
335
|
-
" height: ",
|
|
336
|
-
c.height
|
|
337
|
-
), c != null && c.clusterNode ? (c.y += y, M(c)) : e.children(l).length > 0 ? (c.height += y, Te(d, c), g[c.id].node = c) : (c.y += y / 2, M(c));
|
|
338
|
-
}), e.edges().forEach(function(l) {
|
|
339
|
-
const c = e.edge(l);
|
|
340
|
-
i.info("Edge " + l.v + " -> " + l.w + ": " + JSON.stringify(c), c), c.points.forEach((E) => E.y += y / 2);
|
|
341
|
-
const N = re(u, l, c, g, n, e, s);
|
|
342
|
-
ie(c, N);
|
|
343
|
-
}), e.nodes().forEach(function(l) {
|
|
344
|
-
const c = e.node(l);
|
|
345
|
-
i.info(l, c.type, c.diff), c.type === "group" && (v = c.diff);
|
|
346
|
-
}), { elem: h, diff: v };
|
|
347
|
-
}, "recursiveRender"), Xe = /* @__PURE__ */ f(async (t, e, n, s, r) => {
|
|
348
|
-
ee(t, n, s, r), se(), te(), Ce(), we(), i.warn("Graph at first:", JSON.stringify(x(e))), be(e), i.warn("Graph after:", JSON.stringify(x(e)));
|
|
349
|
-
const o = b();
|
|
350
|
-
await Y(t, e, s, r, void 0, o);
|
|
351
|
-
}, "render"), J = /* @__PURE__ */ f((t) => W.sanitizeText(t, b()), "sanitizeText"), I = {
|
|
352
|
-
dividerMargin: 10,
|
|
353
|
-
padding: 5,
|
|
354
|
-
textHeight: 10,
|
|
355
|
-
curve: void 0
|
|
356
|
-
}, ke = /* @__PURE__ */ f(function(t, e, n, s) {
|
|
357
|
-
i.info("keys:", [...t.keys()]), i.info(t), t.forEach(function(r) {
|
|
358
|
-
var o, a;
|
|
359
|
-
const h = {
|
|
360
|
-
shape: "rect",
|
|
361
|
-
id: r.id,
|
|
362
|
-
domId: r.domId,
|
|
363
|
-
labelText: J(r.id),
|
|
364
|
-
labelStyle: "",
|
|
365
|
-
style: "fill: none; stroke: black",
|
|
366
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
367
|
-
padding: ((o = b().flowchart) == null ? void 0 : o.padding) ?? ((a = b().class) == null ? void 0 : a.padding)
|
|
368
|
-
};
|
|
369
|
-
e.setNode(r.id, h), Z(r.classes, e, n, s, r.id), i.info("setNode", h);
|
|
370
|
-
});
|
|
371
|
-
}, "addNamespaces"), Z = /* @__PURE__ */ f(function(t, e, n, s, r) {
|
|
372
|
-
i.info("keys:", [...t.keys()]), i.info(t), [...t.values()].filter((o) => o.parent === r).forEach(function(o) {
|
|
373
|
-
var a, h;
|
|
374
|
-
const d = o.cssClasses.join(" "), u = F(o.styles), w = o.label ?? o.id, p = 0, v = {
|
|
375
|
-
labelStyle: u.labelStyle,
|
|
376
|
-
shape: "class_box",
|
|
377
|
-
labelText: J(w),
|
|
378
|
-
classData: o,
|
|
379
|
-
rx: p,
|
|
380
|
-
ry: p,
|
|
381
|
-
class: d,
|
|
382
|
-
style: u.style,
|
|
383
|
-
id: o.id,
|
|
384
|
-
domId: o.domId,
|
|
385
|
-
tooltip: s.db.getTooltip(o.id, r) || "",
|
|
386
|
-
haveCallback: o.haveCallback,
|
|
387
|
-
link: o.link,
|
|
388
|
-
width: o.type === "group" ? 500 : void 0,
|
|
389
|
-
type: o.type,
|
|
390
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
391
|
-
padding: ((a = b().flowchart) == null ? void 0 : a.padding) ?? ((h = b().class) == null ? void 0 : h.padding)
|
|
392
|
-
};
|
|
393
|
-
e.setNode(o.id, v), r && e.setParent(o.id, r), i.info("setNode", v);
|
|
394
|
-
});
|
|
395
|
-
}, "addClasses"), De = /* @__PURE__ */ f(function(t, e, n, s) {
|
|
396
|
-
i.info(t), t.forEach(function(r, o) {
|
|
397
|
-
var a, h;
|
|
398
|
-
const d = r, u = "", w = { labelStyle: "", style: "" }, p = d.text, v = 0, y = {
|
|
399
|
-
labelStyle: w.labelStyle,
|
|
400
|
-
shape: "note",
|
|
401
|
-
labelText: J(p),
|
|
402
|
-
noteData: d,
|
|
403
|
-
rx: v,
|
|
404
|
-
ry: v,
|
|
405
|
-
class: u,
|
|
406
|
-
style: w.style,
|
|
407
|
-
id: d.id,
|
|
408
|
-
domId: d.id,
|
|
409
|
-
tooltip: "",
|
|
410
|
-
type: "note",
|
|
411
|
-
// TODO V10: Flowchart ? Keeping flowchart for backwards compatibility. Remove in next major release
|
|
412
|
-
padding: ((a = b().flowchart) == null ? void 0 : a.padding) ?? ((h = b().class) == null ? void 0 : h.padding)
|
|
413
|
-
};
|
|
414
|
-
if (e.setNode(d.id, y), i.info("setNode", y), !d.class || !s.has(d.class))
|
|
415
|
-
return;
|
|
416
|
-
const l = n + o, c = {
|
|
417
|
-
id: `edgeNote${l}`,
|
|
418
|
-
//Set relationship style and line type
|
|
419
|
-
classes: "relation",
|
|
420
|
-
pattern: "dotted",
|
|
421
|
-
// Set link type for rendering
|
|
422
|
-
arrowhead: "none",
|
|
423
|
-
//Set edge extra labels
|
|
424
|
-
startLabelRight: "",
|
|
425
|
-
endLabelLeft: "",
|
|
426
|
-
//Set relation arrow types
|
|
427
|
-
arrowTypeStart: "none",
|
|
428
|
-
arrowTypeEnd: "none",
|
|
429
|
-
style: "fill:none",
|
|
430
|
-
labelStyle: "",
|
|
431
|
-
curve: _(I.curve, j)
|
|
432
|
-
};
|
|
433
|
-
e.setEdge(d.id, d.class, c, l);
|
|
434
|
-
});
|
|
435
|
-
}, "addNotes"), Be = /* @__PURE__ */ f(function(t, e) {
|
|
436
|
-
const n = b().flowchart;
|
|
437
|
-
let s = 0;
|
|
438
|
-
t.forEach(function(r) {
|
|
439
|
-
var o;
|
|
440
|
-
s++;
|
|
441
|
-
const a = {
|
|
442
|
-
//Set relationship style and line type
|
|
443
|
-
classes: "relation",
|
|
444
|
-
pattern: r.relation.lineType == 1 ? "dashed" : "solid",
|
|
445
|
-
id: fe(r.id1, r.id2, {
|
|
446
|
-
prefix: "id",
|
|
447
|
-
counter: s
|
|
448
|
-
}),
|
|
449
|
-
// Set link type for rendering
|
|
450
|
-
arrowhead: r.type === "arrow_open" ? "none" : "normal",
|
|
451
|
-
//Set edge extra labels
|
|
452
|
-
startLabelRight: r.relationTitle1 === "none" ? "" : r.relationTitle1,
|
|
453
|
-
endLabelLeft: r.relationTitle2 === "none" ? "" : r.relationTitle2,
|
|
454
|
-
//Set relation arrow types
|
|
455
|
-
arrowTypeStart: R(r.relation.type1),
|
|
456
|
-
arrowTypeEnd: R(r.relation.type2),
|
|
457
|
-
style: "fill:none",
|
|
458
|
-
labelStyle: "",
|
|
459
|
-
curve: _(n == null ? void 0 : n.curve, j)
|
|
460
|
-
};
|
|
461
|
-
if (i.info(a, r), r.style !== void 0) {
|
|
462
|
-
const h = F(r.style);
|
|
463
|
-
a.style = h.style, a.labelStyle = h.labelStyle;
|
|
464
|
-
}
|
|
465
|
-
r.text = r.title, r.text === void 0 ? r.style !== void 0 && (a.arrowheadStyle = "fill: #333") : (a.arrowheadStyle = "fill: #333", a.labelpos = "c", ((o = b().flowchart) == null ? void 0 : o.htmlLabels) ?? b().htmlLabels ? (a.labelType = "html", a.label = '<span class="edgeLabel">' + r.text + "</span>") : (a.labelType = "text", a.label = r.text.replace(W.lineBreakRegex, `
|
|
466
|
-
`), r.style === void 0 && (a.style = a.style || "stroke: #333; stroke-width: 1.5px;fill:none"), a.labelStyle = a.labelStyle.replace("color:", "fill:"))), e.setEdge(r.id1, r.id2, a, s);
|
|
467
|
-
});
|
|
468
|
-
}, "addRelations"), Le = /* @__PURE__ */ f(function(t) {
|
|
469
|
-
I = {
|
|
470
|
-
...I,
|
|
471
|
-
...t
|
|
472
|
-
};
|
|
473
|
-
}, "setConf"), Oe = /* @__PURE__ */ f(async function(t, e, n, s) {
|
|
474
|
-
i.info("Drawing class - ", e);
|
|
475
|
-
const r = b().flowchart ?? b().class, o = b().securityLevel;
|
|
476
|
-
i.info("config:", r);
|
|
477
|
-
const a = (r == null ? void 0 : r.nodeSpacing) ?? 50, h = (r == null ? void 0 : r.rankSpacing) ?? 50, d = new H({
|
|
478
|
-
multigraph: !0,
|
|
479
|
-
compound: !0
|
|
480
|
-
}).setGraph({
|
|
481
|
-
rankdir: s.db.getDirection(),
|
|
482
|
-
nodesep: a,
|
|
483
|
-
ranksep: h,
|
|
484
|
-
marginx: 8,
|
|
485
|
-
marginy: 8
|
|
486
|
-
}).setDefaultEdgeLabel(function() {
|
|
487
|
-
return {};
|
|
488
|
-
}), u = s.db.getNamespaces(), w = s.db.getClasses(), p = s.db.getRelations(), v = s.db.getNotes();
|
|
489
|
-
i.info(p), ke(u, d, e, s), Z(w, d, e, s), Be(p, d), De(v, d, p.length + 1, w);
|
|
490
|
-
let y;
|
|
491
|
-
o === "sandbox" && (y = C("#i" + e));
|
|
492
|
-
const l = o === "sandbox" ? C(y.nodes()[0].contentDocument.body) : C("body"), c = l.select(`[id="${e}"]`), N = l.select("#" + e + " g");
|
|
493
|
-
if (await Xe(
|
|
494
|
-
N,
|
|
495
|
-
d,
|
|
496
|
-
["aggregation", "extension", "composition", "dependency", "lollipop"],
|
|
497
|
-
"classDiagram",
|
|
498
|
-
e
|
|
499
|
-
), he.insertTitle(c, "classTitleText", (r == null ? void 0 : r.titleTopMargin) ?? 5, s.db.getDiagramTitle()), ge(d, c, r == null ? void 0 : r.diagramPadding, r == null ? void 0 : r.useMaxWidth), !(r != null && r.htmlLabels)) {
|
|
500
|
-
const E = o === "sandbox" ? y.nodes()[0].contentDocument : document, k = E.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
|
501
|
-
for (const S of k) {
|
|
502
|
-
const $ = S.getBBox(), T = E.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
503
|
-
T.setAttribute("rx", 0), T.setAttribute("ry", 0), T.setAttribute("width", $.width), T.setAttribute("height", $.height), S.insertBefore(T, S.firstChild);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
}, "draw");
|
|
507
|
-
function R(t) {
|
|
508
|
-
let e;
|
|
509
|
-
switch (t) {
|
|
510
|
-
case 0:
|
|
511
|
-
e = "aggregation";
|
|
512
|
-
break;
|
|
513
|
-
case 1:
|
|
514
|
-
e = "extension";
|
|
515
|
-
break;
|
|
516
|
-
case 2:
|
|
517
|
-
e = "composition";
|
|
518
|
-
break;
|
|
519
|
-
case 3:
|
|
520
|
-
e = "dependency";
|
|
521
|
-
break;
|
|
522
|
-
case 4:
|
|
523
|
-
e = "lollipop";
|
|
524
|
-
break;
|
|
525
|
-
default:
|
|
526
|
-
e = "none";
|
|
527
|
-
}
|
|
528
|
-
return e;
|
|
529
|
-
}
|
|
530
|
-
f(R, "getArrowMarker");
|
|
531
|
-
var Ie = {
|
|
532
|
-
setConf: Le,
|
|
533
|
-
draw: Oe
|
|
534
|
-
}, Fe = {
|
|
535
|
-
parser: ae,
|
|
536
|
-
db: A,
|
|
537
|
-
renderer: Ie,
|
|
538
|
-
styles: oe,
|
|
539
|
-
init: /* @__PURE__ */ f((t) => {
|
|
540
|
-
t.class || (t.class = {}), t.class.arrowMarkerAbsolute = t.arrowMarkerAbsolute, A.clear();
|
|
541
|
-
}, "init")
|
|
542
|
-
};
|
|
543
|
-
export {
|
|
544
|
-
Fe as diagram
|
|
545
|
-
};
|