react-kggraph 0.0.25 → 0.0.27

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