react-kggraph 0.0.17 → 0.0.18
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/README.md +46 -0
- package/lib/index.es.js +8 -6
- package/lib/index.es10.js +186 -69
- package/lib/index.es11.js +71 -28
- package/lib/index.es12.js +29 -69
- package/lib/index.es13.js +70 -224
- package/lib/index.es14.js +224 -4
- package/lib/index.es15.js +4 -35
- package/lib/index.es16.js +37 -0
- package/lib/index.es18.js +15462 -49
- package/lib/index.es19.js +50 -56
- package/lib/index.es20.js +57 -66
- package/lib/index.es21.js +68 -39
- package/lib/index.es22.js +40 -2
- package/lib/index.es23.js +1 -1
- package/lib/index.es24.js +2 -2
- package/lib/index.es25.js +1 -1
- package/lib/index.es26.js +1 -1
- package/lib/index.es27.js +1 -1
- package/lib/index.es28.js +1 -1
- package/lib/index.es29.js +1 -1
- package/lib/index.es3.js +173 -155
- package/lib/index.es30.js +1 -1
- package/lib/index.es31.js +1 -1
- package/lib/index.es32.js +2 -2
- package/lib/index.es33.js +4 -0
- package/lib/index.es35.js +4 -2
- package/lib/index.es36.js +4 -0
- package/lib/index.es4.js +17 -6
- package/lib/index.es5.js +6 -2
- package/lib/index.es6.js +2 -599
- package/lib/index.es7.js +580 -312
- package/lib/index.es8.js +294 -393
- package/lib/index.es9.js +408 -173
- package/lib/src/components/Graph/components/ActionBar/actionList.d.ts +10 -0
- package/lib/src/components/Graph/components/ActionBar/index.d.ts +15 -0
- package/lib/src/components/Graph/types.d.ts +51 -0
- package/lib/src/components/Graph/utils/edge_node_styles.d.ts +5 -2
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/index.es17.js +0 -15469
- package/lib/index.es34.js +0 -6
package/lib/index.es3.js
CHANGED
|
@@ -1,64 +1,70 @@
|
|
|
1
|
-
import { jsx as y, jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
1
|
+
import { jsx as y, jsxs as oe } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as x, useState as m, useEffect as O } from "react";
|
|
3
|
+
import N from "cytoscape";
|
|
4
|
+
import be from "cytoscape-cose-bilkent";
|
|
5
|
+
import xe from "cytoscape-cise";
|
|
6
|
+
import Ne from "cytoscape-fcose";
|
|
7
|
+
import Ce from "storm-layout";
|
|
8
|
+
import ke from "./index.es7.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { handleCalcPath as
|
|
11
|
-
import { fixNodesToEdges as
|
|
12
|
-
import { edgeNodeStyles as
|
|
13
|
-
import
|
|
14
|
-
import { message as
|
|
15
|
-
import { menuItemsConfig as
|
|
16
|
-
import { jsonStringify as
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import { GraphProvider as
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
data:
|
|
28
|
-
getAllGraphData:
|
|
29
|
-
highPathAnalysis:
|
|
10
|
+
import { handleCalcPath as ze, resDetailData as F } from "./index.es8.js";
|
|
11
|
+
import { fixNodesToEdges as Ee, coseBilkentLayout as ne } from "./index.es9.js";
|
|
12
|
+
import { edgeNodeStyles as we, defaultColors as se } from "./index.es10.js";
|
|
13
|
+
import Le from "cytoscape-layout-utilities";
|
|
14
|
+
import { message as S } from "antd";
|
|
15
|
+
import { menuItemsConfig as Re } from "./index.es11.js";
|
|
16
|
+
import { jsonStringify as L } from "./index.es12.js";
|
|
17
|
+
import je from "./index.es13.js";
|
|
18
|
+
import Te from "./index.es14.js";
|
|
19
|
+
import { GraphProvider as $e } from "./index.es15.js";
|
|
20
|
+
import De from "./index.es16.js";
|
|
21
|
+
N.use(Le);
|
|
22
|
+
N.use(xe);
|
|
23
|
+
N.use(Ne);
|
|
24
|
+
N.use(Ce);
|
|
25
|
+
N.use(be);
|
|
26
|
+
const et = ({
|
|
27
|
+
data: de,
|
|
28
|
+
getAllGraphData: I,
|
|
29
|
+
highPathAnalysis: C = [],
|
|
30
30
|
graphInfo: f,
|
|
31
|
-
stepNextApi:
|
|
32
|
-
knowledgeCardApi:
|
|
31
|
+
stepNextApi: re,
|
|
32
|
+
knowledgeCardApi: ae,
|
|
33
|
+
colors: k,
|
|
34
|
+
actionBar: K
|
|
33
35
|
}) => {
|
|
34
|
-
var
|
|
35
|
-
const
|
|
36
|
+
var G, ee;
|
|
37
|
+
const R = x(null), [v, P] = m([]), p = x(null), X = x(null), J = 1, [Oe, Q] = m(!1), [z, B] = m({}), [j, W] = m({}), [ie, le] = m("cose-bilkent"), V = x(null), Y = x(null), [ce, Z] = m(["", ""]), H = x(k);
|
|
38
|
+
O(() => {
|
|
39
|
+
H.current = k;
|
|
40
|
+
}, [k]);
|
|
41
|
+
const [c, E] = m({
|
|
36
42
|
visible: !1,
|
|
37
43
|
x: 0,
|
|
38
44
|
y: 0,
|
|
39
45
|
targetNode: null,
|
|
40
46
|
bgColor: ""
|
|
41
|
-
}), [
|
|
47
|
+
}), [T, _] = m({
|
|
42
48
|
visible: !1,
|
|
43
49
|
x: 0,
|
|
44
50
|
y: 0,
|
|
45
51
|
content: ""
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
(
|
|
49
|
-
}, [
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
+
}), pe = Re({ cyRef: p, setContextMenu: E, onPathAnalysis: (G = X.current) == null ? void 0 : G.onPathAnalysis, setPathNodes: Z });
|
|
53
|
+
O(() => {
|
|
54
|
+
(C == null ? void 0 : C.length) > 1 && ze(p, { pathNodes: C, isGrayed: !1 });
|
|
55
|
+
}, [L(C), L(v)]), O(() => {
|
|
56
|
+
I == null || I({ graphData: v, nodeStatic: z, relationStatic: j });
|
|
57
|
+
}, [L(v), L(z), L(j)]), O(() => {
|
|
52
58
|
var a;
|
|
53
|
-
if (!
|
|
54
|
-
const { elements:
|
|
55
|
-
|
|
59
|
+
if (!R.current || p.current) return;
|
|
60
|
+
const { elements: d, typeListObj: r, relationListObj: w } = F(de, { typeObj: z, graphInfo: f });
|
|
61
|
+
B(r), P(d), W(w), document.addEventListener("contextmenu", function(t) {
|
|
56
62
|
t.preventDefault();
|
|
57
63
|
});
|
|
58
|
-
const e =
|
|
59
|
-
container:
|
|
60
|
-
elements:
|
|
61
|
-
style:
|
|
64
|
+
const e = N({
|
|
65
|
+
container: R.current,
|
|
66
|
+
elements: d,
|
|
67
|
+
style: we({ elements: d, colors: k }),
|
|
62
68
|
autounselectify: !1,
|
|
63
69
|
autolock: !1,
|
|
64
70
|
layout: {
|
|
@@ -67,97 +73,107 @@ const Ye = ({
|
|
|
67
73
|
}
|
|
68
74
|
});
|
|
69
75
|
if (p.current = e, ((a = f == null ? void 0 : f.searchNodes) == null ? void 0 : a.length) === 2)
|
|
70
|
-
|
|
76
|
+
Ee(
|
|
71
77
|
e,
|
|
72
78
|
f.searchNodes[0],
|
|
73
79
|
f.searchNodes[1]
|
|
74
80
|
);
|
|
75
81
|
else {
|
|
76
|
-
const t = e.layout(
|
|
82
|
+
const t = e.layout(ne());
|
|
77
83
|
t.run(), t.on("layoutstop", () => {
|
|
78
84
|
e.fit(void 0, 50), e.center();
|
|
79
85
|
});
|
|
80
86
|
}
|
|
81
87
|
return e.on("mouseover", "edge", (t) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
var o;
|
|
89
|
+
const n = t.target;
|
|
90
|
+
if (!n.hasClass("path-edge")) {
|
|
91
|
+
const s = ((o = H.current) == null ? void 0 : o.edgeHoverColor) ?? se.edgeHoverColor;
|
|
92
|
+
n.style({
|
|
93
|
+
"line-color": s,
|
|
94
|
+
"target-arrow-color": s,
|
|
95
|
+
opacity: 0.8
|
|
96
|
+
});
|
|
97
|
+
}
|
|
87
98
|
}), e.on("mouseout", "edge", (t) => {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
99
|
+
var o;
|
|
100
|
+
const n = t.target;
|
|
101
|
+
if (!n.hasClass("path-edge")) {
|
|
102
|
+
const s = ((o = H.current) == null ? void 0 : o.edgeDefaultColor) ?? se.edgeDefaultColor;
|
|
103
|
+
n.style({
|
|
104
|
+
"line-color": s,
|
|
105
|
+
"target-arrow-color": s,
|
|
106
|
+
opacity: 1
|
|
107
|
+
});
|
|
108
|
+
}
|
|
93
109
|
}), e.on("mouseover", "node", (t) => {
|
|
94
|
-
const
|
|
95
|
-
|
|
110
|
+
const n = t.target;
|
|
111
|
+
n.hasClass("selected") || n.addClass("hover");
|
|
96
112
|
}), e.on("mouseover", "node", (t) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
113
|
+
const n = t.target, o = n.renderedPosition(), s = n.data("name") || "";
|
|
114
|
+
n.addClass("hover"), _({
|
|
99
115
|
visible: !0,
|
|
100
|
-
x:
|
|
101
|
-
y:
|
|
102
|
-
content:
|
|
116
|
+
x: o.x,
|
|
117
|
+
y: o.y - 60,
|
|
118
|
+
content: s
|
|
103
119
|
});
|
|
104
120
|
}), e.on("mouseout", "node", (t) => {
|
|
105
|
-
t.target.removeClass("hover"),
|
|
121
|
+
t.target.removeClass("hover"), _((o) => ({ ...o, visible: !1 }));
|
|
106
122
|
}), e.on("cxttap", "node", (t) => {
|
|
107
123
|
t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation(), t.originalEvent && (t.originalEvent.preventDefault(), t.originalEvent.stopPropagation(), t.originalEvent.stopImmediatePropagation());
|
|
108
|
-
const
|
|
109
|
-
console.log("renderedPos:::",
|
|
124
|
+
const n = t.target, o = n.renderedPosition();
|
|
125
|
+
console.log("renderedPos:::", n.data(), n.style("background-color")), E({
|
|
110
126
|
visible: !0,
|
|
111
|
-
x:
|
|
112
|
-
y:
|
|
113
|
-
targetNode:
|
|
114
|
-
bgColor:
|
|
127
|
+
x: o.x - 90,
|
|
128
|
+
y: o.y - 90,
|
|
129
|
+
targetNode: n,
|
|
130
|
+
bgColor: n.style("background-color")
|
|
115
131
|
});
|
|
116
132
|
}), p.current = e, e.on("click", "node", (t) => {
|
|
117
|
-
const
|
|
118
|
-
e.nodes().removeClass("selected grayed highlighted"), e.edges().removeClass("selected grayed highlighted"),
|
|
119
|
-
const
|
|
120
|
-
console.log("cy.nodes().not(relatedNodes):::",
|
|
133
|
+
const n = t.target;
|
|
134
|
+
e.nodes().removeClass("selected grayed highlighted"), e.edges().removeClass("selected grayed highlighted"), n.addClass("selected");
|
|
135
|
+
const s = n.neighborhood().nodes().add(n), b = s.edgesWith(s);
|
|
136
|
+
console.log("cy.nodes().not(relatedNodes):::", s), e.nodes().not(s).addClass("grayed"), e.edges().not(b).addClass("grayed"), s.addClass("highlighted"), b.addClass("highlighted");
|
|
121
137
|
}), e.on("tap", (t) => {
|
|
122
|
-
t.target === e && (
|
|
138
|
+
t.target === e && (E((n) => ({ ...n, visible: !1 })), e.nodes().removeClass("grayed highlighted highlight selected correlationStyle path-node level-highlight level-selected level-grayed"), e.edges().removeClass("grayed highlighted highlight selected correlationStyle path-edge level-highlightedge level-grayed"));
|
|
123
139
|
}), () => {
|
|
124
140
|
p.current && (p.current.destroy(), p.current = null);
|
|
125
141
|
};
|
|
126
142
|
}, []);
|
|
127
|
-
const
|
|
128
|
-
const { id:
|
|
143
|
+
const ue = async (d) => {
|
|
144
|
+
const { id: r, kgId: w } = d, e = p.current;
|
|
129
145
|
if (!e) return;
|
|
130
|
-
const a = e.$(`#${
|
|
146
|
+
const a = e.$(`#${r}`);
|
|
131
147
|
if (!a || a.length === 0) {
|
|
132
148
|
console.error("当前节点不存在");
|
|
133
149
|
return;
|
|
134
150
|
}
|
|
135
|
-
const t = e.nodes().filter((
|
|
151
|
+
const t = e.nodes().filter((o) => o.data("parentId") ? (o.data("parentId") === r || o.data("idLabel") === `${r}-${o.data("name")}`) && o.data("zktype") === d.zktype : !1);
|
|
136
152
|
if (t.length > 0) {
|
|
137
|
-
const
|
|
138
|
-
(l) => l.data("source") ===
|
|
139
|
-
),
|
|
153
|
+
const o = t.map((l) => l.id()), s = t.connectedEdges(), b = e.edges().filter(
|
|
154
|
+
(l) => l.data("source") === r && o.includes(l.data("target"))
|
|
155
|
+
), $ = e.edges().filter((l) => l.data("appendedBy") === r), M = s.merge(b).merge($).filter((l) => l.data().zktype === d.zktype);
|
|
140
156
|
t.animate({
|
|
141
157
|
style: { opacity: 0 }
|
|
142
158
|
}, {
|
|
143
159
|
duration: 200,
|
|
144
160
|
complete: () => {
|
|
145
|
-
e.remove(t), e.remove(
|
|
146
|
-
const
|
|
147
|
-
var h,
|
|
148
|
-
const i =
|
|
149
|
-
if (
|
|
161
|
+
e.remove(t), e.remove(M), P((l) => {
|
|
162
|
+
const D = l.filter((g) => {
|
|
163
|
+
var h, te;
|
|
164
|
+
const i = g.data.zktype;
|
|
165
|
+
if (g.group === "nodes" && o.includes((h = g.data) == null ? void 0 : h.id) && i && i === d.zktype)
|
|
150
166
|
return !1;
|
|
151
|
-
if (
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
return `${
|
|
155
|
-
}),
|
|
156
|
-
return !
|
|
167
|
+
if (g.group === "edges" && i && i === d.zktype) {
|
|
168
|
+
const fe = Array.from($).map((ve) => {
|
|
169
|
+
const A = ve.data();
|
|
170
|
+
return `${A.source}-${A.target}-${A.label}`;
|
|
171
|
+
}), q = g.data, me = fe.includes(`${q.source}-${q.target}-${q.label}`), he = ((te = g.data) == null ? void 0 : te.appendedBy) === r;
|
|
172
|
+
return !me && !he;
|
|
157
173
|
}
|
|
158
174
|
return !0;
|
|
159
|
-
}), { typeListObj:
|
|
160
|
-
return
|
|
175
|
+
}), { typeListObj: u, relationListObj: U } = F({}, { graphData: D, typeObj: {} });
|
|
176
|
+
return B(u), W(U), D;
|
|
161
177
|
}), a.data("appendedNodes", []), a.data("isExpanded", !1);
|
|
162
178
|
}
|
|
163
179
|
}), setTimeout(() => {
|
|
@@ -165,28 +181,28 @@ const Ye = ({
|
|
|
165
181
|
}, 300);
|
|
166
182
|
} else {
|
|
167
183
|
try {
|
|
168
|
-
|
|
184
|
+
Q(!0), S.open({
|
|
169
185
|
type: "loading",
|
|
170
186
|
content: "正在展开...",
|
|
171
187
|
duration: 0
|
|
172
188
|
});
|
|
173
|
-
const
|
|
174
|
-
if (
|
|
175
|
-
|
|
176
|
-
|
|
189
|
+
const o = await re({ uri: r, queryType: 1, kgId: w, zktype: d.zktype }), { elements: s, typeListObj: b, relationListObj: $ } = F(o.data, { graphData: v, typeObj: z, relationObj: j, zktype: d.zktype });
|
|
190
|
+
if (B(b), W($), !((s == null ? void 0 : s.length) > 0)) {
|
|
191
|
+
setTimeout(() => {
|
|
192
|
+
S.destroy(), S.warning("暂无数据");
|
|
177
193
|
}, 2e3);
|
|
178
194
|
return;
|
|
179
195
|
}
|
|
180
|
-
if ((
|
|
181
|
-
const
|
|
182
|
-
...
|
|
196
|
+
if ((s == null ? void 0 : s.length) > 0) {
|
|
197
|
+
const M = e.layoutUtilities({
|
|
198
|
+
...ne(),
|
|
183
199
|
idealEdgeLength: 80,
|
|
184
200
|
// 与你的期望边长匹配
|
|
185
201
|
offset: 30
|
|
186
202
|
// 随机偏移,避免完全重叠
|
|
187
|
-
}), l =
|
|
203
|
+
}), l = s.map((i) => {
|
|
188
204
|
if (i.group === "nodes") {
|
|
189
|
-
const h = 80 *
|
|
205
|
+
const h = 80 * J;
|
|
190
206
|
return {
|
|
191
207
|
...i,
|
|
192
208
|
style: {
|
|
@@ -196,12 +212,12 @@ const Ye = ({
|
|
|
196
212
|
},
|
|
197
213
|
data: {
|
|
198
214
|
...i.data,
|
|
199
|
-
parentId:
|
|
215
|
+
parentId: r,
|
|
200
216
|
// 标记父节点
|
|
201
|
-
appendedBy:
|
|
217
|
+
appendedBy: r,
|
|
202
218
|
// 标记由谁追加
|
|
203
|
-
idLabel:
|
|
204
|
-
zktype:
|
|
219
|
+
idLabel: r + "-" + i.data.label,
|
|
220
|
+
zktype: d.zktype,
|
|
205
221
|
isAppended: !0,
|
|
206
222
|
// 标记是追加节点
|
|
207
223
|
baseWidth: h,
|
|
@@ -213,16 +229,16 @@ const Ye = ({
|
|
|
213
229
|
...i,
|
|
214
230
|
data: {
|
|
215
231
|
...i.data,
|
|
216
|
-
appendedBy:
|
|
217
|
-
zktype:
|
|
232
|
+
appendedBy: r,
|
|
233
|
+
zktype: d.zktype
|
|
218
234
|
}
|
|
219
235
|
};
|
|
220
|
-
}),
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
a.data("appendedNodes",
|
|
224
|
-
const
|
|
225
|
-
|
|
236
|
+
}), D = e.add(l);
|
|
237
|
+
P([...v, ...l]);
|
|
238
|
+
const u = D.filter(":node"), U = u.map((i) => i.id());
|
|
239
|
+
a.data("appendedNodes", U), a.data("isExpanded", !0);
|
|
240
|
+
const g = e.nodes().difference(u);
|
|
241
|
+
g.forEach((i) => i.lock()), M.placeNewNodes(u), e.layout({
|
|
226
242
|
name: "cose-bilkent",
|
|
227
243
|
randomize: !1,
|
|
228
244
|
// ⚠️ 这是关键!保持已有节点位置不变
|
|
@@ -238,8 +254,8 @@ const Ye = ({
|
|
|
238
254
|
// 可以适当减少,因为只需要微调
|
|
239
255
|
gravity: 0.6
|
|
240
256
|
}).run(), setTimeout(() => {
|
|
241
|
-
|
|
242
|
-
}, 2e3),
|
|
257
|
+
g.forEach((i) => i.unlock());
|
|
258
|
+
}, 2e3), u.animate({
|
|
243
259
|
style: {
|
|
244
260
|
opacity: 1,
|
|
245
261
|
width: 20,
|
|
@@ -249,28 +265,28 @@ const Ye = ({
|
|
|
249
265
|
duration: 400,
|
|
250
266
|
easing: "ease-out",
|
|
251
267
|
complete: () => {
|
|
252
|
-
|
|
268
|
+
u.style("opacity", ""), u.style("width", ""), u.style("height", "");
|
|
253
269
|
}
|
|
254
270
|
}), setTimeout(() => {
|
|
255
271
|
a.removed() || (a.style("border-width", ""), a.style("border-color", ""), e.center(a), e.zoom(e.zoom()));
|
|
256
272
|
}, 600);
|
|
257
273
|
} else
|
|
258
274
|
console.log("没有找到相关节点数据");
|
|
259
|
-
} catch (
|
|
260
|
-
console.error("请求接口失败:",
|
|
275
|
+
} catch (o) {
|
|
276
|
+
console.error("请求接口失败:", o);
|
|
261
277
|
}
|
|
262
|
-
|
|
278
|
+
Q(!1), S.destroy();
|
|
263
279
|
}
|
|
264
|
-
|
|
265
|
-
},
|
|
280
|
+
E({ visible: !1 });
|
|
281
|
+
}, ge = {
|
|
266
282
|
expanded: "typed-literal",
|
|
267
283
|
contract: "uri"
|
|
268
|
-
},
|
|
269
|
-
if (console.log("handleMenuAction:::",
|
|
270
|
-
const
|
|
271
|
-
if (["expanded", "contract"].includes(
|
|
272
|
-
|
|
273
|
-
else if (
|
|
284
|
+
}, ye = (d) => {
|
|
285
|
+
if (console.log("handleMenuAction:::", d), c.targetNode) {
|
|
286
|
+
const r = d.ids, w = c.targetNode.data();
|
|
287
|
+
if (["expanded", "contract"].includes(r))
|
|
288
|
+
ue({ kgId: 3, ...w, zktype: ge[r] });
|
|
289
|
+
else if (r === "nodeInfo") {
|
|
274
290
|
const e = c.targetNode, a = {
|
|
275
291
|
id: e.id(),
|
|
276
292
|
data: e.data(),
|
|
@@ -282,30 +298,32 @@ const Ye = ({
|
|
|
282
298
|
// 样式信息
|
|
283
299
|
style: e.style()
|
|
284
300
|
};
|
|
285
|
-
|
|
286
|
-
} else if (
|
|
301
|
+
V.current.open(a);
|
|
302
|
+
} else if (r === "knowledgeCard") {
|
|
287
303
|
const e = c.targetNode;
|
|
288
|
-
|
|
304
|
+
Y.current.open(e.data());
|
|
289
305
|
}
|
|
290
|
-
|
|
306
|
+
d.action(c.targetNode), E({ visible: !1, x: 0, y: 0, targetNode: null });
|
|
291
307
|
}
|
|
292
308
|
};
|
|
293
|
-
return /* @__PURE__ */ y(
|
|
309
|
+
return console.log(555, K), /* @__PURE__ */ y($e, { value: { pathNodes: ce, setPathNodes: Z, graphInfo: f, graphData: v, layoutType: ie, setLayoutType: le, knowledgeCardApi: ae }, children: /* @__PURE__ */ oe("div", { className: "cytoscape-container", style: { position: "relative" }, children: [
|
|
294
310
|
/* @__PURE__ */ y("div", { className: "btn-group" }),
|
|
295
311
|
/* @__PURE__ */ y(
|
|
296
|
-
|
|
312
|
+
ke,
|
|
297
313
|
{
|
|
298
|
-
ref:
|
|
314
|
+
ref: X,
|
|
299
315
|
cyRef: p,
|
|
300
316
|
graphInfo: f,
|
|
301
|
-
initNodeScale:
|
|
302
|
-
cyContainerRef:
|
|
303
|
-
typeObj:
|
|
304
|
-
relationObj: j
|
|
317
|
+
initNodeScale: J,
|
|
318
|
+
cyContainerRef: R,
|
|
319
|
+
typeObj: z,
|
|
320
|
+
relationObj: j,
|
|
321
|
+
colors: k,
|
|
322
|
+
actionBar: K
|
|
305
323
|
}
|
|
306
324
|
),
|
|
307
|
-
/* @__PURE__ */
|
|
308
|
-
/* @__PURE__ */ y("div", { ref:
|
|
325
|
+
/* @__PURE__ */ oe("div", { style: { position: "relative" }, children: [
|
|
326
|
+
/* @__PURE__ */ y("div", { ref: R, className: "cy-container" }),
|
|
309
327
|
c.visible && c.targetNode && /* @__PURE__ */ y(
|
|
310
328
|
"div",
|
|
311
329
|
{
|
|
@@ -325,17 +343,17 @@ const Ye = ({
|
|
|
325
343
|
height: "200px",
|
|
326
344
|
overflow: "hidden"
|
|
327
345
|
},
|
|
328
|
-
onClick: (
|
|
329
|
-
children: /* @__PURE__ */ y(
|
|
346
|
+
onClick: (d) => d.stopPropagation(),
|
|
347
|
+
children: /* @__PURE__ */ y(je, { items: pe, centerImage: (ee = c == null ? void 0 : c.targetNode) == null ? void 0 : ee.data().image, onClick: (d) => ye(d) })
|
|
330
348
|
}
|
|
331
349
|
),
|
|
332
|
-
|
|
350
|
+
T.visible && /* @__PURE__ */ y(
|
|
333
351
|
"div",
|
|
334
352
|
{
|
|
335
353
|
style: {
|
|
336
354
|
position: "absolute",
|
|
337
|
-
left: `${
|
|
338
|
-
top: `${
|
|
355
|
+
left: `${T.x}px`,
|
|
356
|
+
top: `${T.y}px`,
|
|
339
357
|
transform: "translateX(-50%)",
|
|
340
358
|
backgroundColor: "rgba(0, 0, 0, 0.85)",
|
|
341
359
|
color: "#fff",
|
|
@@ -349,14 +367,14 @@ const Ye = ({
|
|
|
349
367
|
overflow: "hidden",
|
|
350
368
|
textOverflow: "ellipsis"
|
|
351
369
|
},
|
|
352
|
-
children:
|
|
370
|
+
children: T.content
|
|
353
371
|
}
|
|
354
372
|
)
|
|
355
373
|
] }),
|
|
356
|
-
/* @__PURE__ */ y(
|
|
357
|
-
/* @__PURE__ */ y(
|
|
374
|
+
/* @__PURE__ */ y(Te, { ref: V }),
|
|
375
|
+
/* @__PURE__ */ y(De, { ref: Y })
|
|
358
376
|
] }) });
|
|
359
377
|
};
|
|
360
378
|
export {
|
|
361
|
-
|
|
379
|
+
et as default
|
|
362
380
|
};
|