react-kggraph 0.0.26 → 0.0.28

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