react-kggraph 0.0.22 → 0.0.24

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.
Files changed (50) hide show
  1. package/lib/index.es10.js +20 -19
  2. package/lib/index.es14.js +39 -41
  3. package/lib/index.es16.js +20 -20
  4. package/lib/index.es17.js +42 -0
  5. package/lib/index.es18.js +3 -15466
  6. package/lib/index.es19.js +2 -54
  7. package/lib/index.es21.js +15461 -63
  8. package/lib/index.es22.js +53 -39
  9. package/lib/index.es23.js +60 -2
  10. package/lib/index.es24.js +69 -2
  11. package/lib/index.es25.js +2 -2
  12. package/lib/index.es26.js +2 -2
  13. package/lib/index.es27.js +1 -1
  14. package/lib/index.es28.js +1 -1
  15. package/lib/index.es29.js +1 -1
  16. package/lib/index.es3.js +100 -97
  17. package/lib/index.es30.js +1 -1
  18. package/lib/index.es31.js +1 -1
  19. package/lib/index.es32.js +1 -1
  20. package/lib/index.es33.js +2 -2
  21. package/lib/index.es34.js +4 -0
  22. package/lib/index.es35.js +2 -4
  23. package/lib/index.es37.js +66 -0
  24. package/lib/index.es38.js +1049 -0
  25. package/lib/index.es4.js +13 -9
  26. package/lib/index.es42.js +21 -0
  27. package/lib/index.es43.js +43 -0
  28. package/lib/index.es44.js +42 -0
  29. package/lib/index.es45.js +91 -0
  30. package/lib/index.es46.js +58 -0
  31. package/lib/index.es47.js +33 -0
  32. package/lib/index.es49.js +72 -0
  33. package/lib/index.es7.js +305 -305
  34. package/lib/index.es8.js +11 -11
  35. package/lib/src/components/Graph/components/ActionBar/actionList.d.ts +4 -0
  36. package/lib/src/components/Graph/components/KnowledgeCard/components/AudioSection.d.ts +12 -0
  37. package/lib/src/components/Graph/components/KnowledgeCard/components/DocumentSection.d.ts +12 -0
  38. package/lib/src/components/Graph/components/KnowledgeCard/components/ImageSection.d.ts +12 -0
  39. package/lib/src/components/Graph/components/KnowledgeCard/components/ListCard.d.ts +14 -0
  40. package/lib/src/components/Graph/components/KnowledgeCard/components/PropertySection.d.ts +11 -0
  41. package/lib/src/components/Graph/components/KnowledgeCard/components/RelationSection.d.ts +13 -0
  42. package/lib/src/components/Graph/components/KnowledgeCard/components/SourceCard.d.ts +6 -0
  43. package/lib/src/components/Graph/components/KnowledgeCard/components/VideoSection.d.ts +12 -0
  44. package/lib/src/components/Graph/components/KnowledgeCard/data.d.ts +84 -0
  45. package/lib/src/components/Graph/types.d.ts +7 -1
  46. package/lib/src/components/Graph/utils/edge_node_styles.d.ts +1 -0
  47. package/lib/style.css +1 -1
  48. package/package.json +1 -1
  49. package/lib/index.es20.js +0 -62
  50. package/lib/index.es36.js +0 -4
package/lib/index.es7.js CHANGED
@@ -1,21 +1,21 @@
1
- import { jsxs as f, Fragment as $, jsx as o } from "react/jsx-runtime";
2
- import Z, { forwardRef as Ge, useContext as Ue, useState as y, useRef as Xe, useImperativeHandle as Ye, useEffect as Be } from "react";
1
+ import { jsxs as f, Fragment as B, jsx as o } from "react/jsx-runtime";
2
+ import Z, { forwardRef as Ue, useContext as Xe, useState as y, useRef as Ye, useImperativeHandle as Re, useEffect as et } from "react";
3
3
  /* empty css */
4
- import { Dropdown as Re, Flex as x, Modal as et, Drawer as tt, Tabs as re, Form as u, Input as I, Select as m, ColorPicker as A, Button as de, message as T } from "antd";
5
- import { utils as E, writeFile as ot } from "./index.es18.js";
6
- import { textPositionConfig as he, textLayout as lt, downloadData as nt, choiceConfig as st, linkAnalysis as at, layoutCongig as rt, handleCalcPath as it, getCyData as ie, donwnGraphData as ct } from "./index.es8.js";
7
- import { GraphContext as dt } from "./index.es15.js";
8
- import { layout as ht, fixNodesToEdges as gt } from "./index.es9.js";
9
- import { defaultColors as z } from "./index.es10.js";
10
- import mt from "./index.es19.js";
11
- import ut from "./index.es20.js";
12
- import pt from "./index.es21.js";
13
- import j from "./index.es22.js";
4
+ import { Dropdown as tt, Flex as x, Modal as ot, Drawer as nt, Tabs as re, Form as p, Input as V, Select as u, ColorPicker as F, Button as de, message as z } from "antd";
5
+ import { utils as I, writeFile as lt } from "./index.es21.js";
6
+ import { textPositionConfig as he, textLayout as st, downloadData as at, choiceConfig as rt, linkAnalysis as it, layoutCongig as ct, handleCalcPath as dt, getCyData as ie, donwnGraphData as ht } from "./index.es8.js";
7
+ import { GraphContext as gt } from "./index.es15.js";
8
+ import { layout as mt, fixNodesToEdges as ut } from "./index.es9.js";
9
+ import { defaultColors as T, nodeSize as M } from "./index.es10.js";
10
+ import pt from "./index.es22.js";
11
+ import ft from "./index.es23.js";
12
+ import bt from "./index.es24.js";
13
+ import j from "./index.es17.js";
14
14
  import { downloadFile as ce } from "./index.es12.js";
15
- import { actionList as ft } from "./index.es4.js";
16
- const q = (b, r) => (S) => {
17
- S.stopPropagation(), b == null || b(r || "");
18
- }, bt = (b) => {
15
+ import { actionList as wt, entityRelationList as yt } from "./index.es4.js";
16
+ const K = (b, c) => (L) => {
17
+ L.stopPropagation(), b == null || b(c || "");
18
+ }, Ct = (b) => {
19
19
  if (typeof b == "string")
20
20
  switch (b) {
21
21
  case "top":
@@ -37,122 +37,120 @@ const q = (b, r) => (S) => {
37
37
  return { bottom: 20, right: 20 };
38
38
  }
39
39
  return b;
40
- }, At = Ge(({
40
+ }, _t = Ue(({
41
41
  graphInfo: b,
42
- cyRef: r,
43
- initNodeScale: S,
42
+ cyRef: c,
43
+ initNodeScale: L,
44
44
  typeObj: v,
45
- relationObj: D,
46
- colors: ge,
47
- actionBar: L
45
+ relationObj: E,
46
+ colors: ge
48
47
  }, me) => {
49
- var ne, se, ae;
50
- const F = (L == null ? void 0 : L.position) || "top-left", K = (L == null ? void 0 : L.actionList) ?? ft, H = { ...z, ...ge }, { layoutType: ue, setLayoutType: pe } = Ue(dt), [k, fe] = y(""), [be, M] = y(!1), [Q, we] = y(S), [ye, V] = y(!1), [Ce, P] = y(!1), [G, ve] = y(null), [xe, U] = y(!1), [X, Y] = y(!1), [Se, Ne] = y("node"), O = Xe(null), [B, Le] = y(!0), [R, ke] = y(/* @__PURE__ */ new Set()), [ee, De] = y(/* @__PURE__ */ new Set());
51
- Ye(me, () => ({
48
+ const H = { ...T, ...ge }, { layoutType: ue, setLayoutType: pe, queryStatisticsConfig: S, actionBar: N } = Xe(gt), q = typeof N == "boolean" ? N : !0, _ = (N == null ? void 0 : N.position) || "top-left", Q = (N == null ? void 0 : N.actionList) ?? wt, [D, fe] = y(""), [be, G] = y(!1), [U, we] = y(L), [ye, P] = y(!1), [Ce, A] = y(!1), [X, ve] = y(null), [xe, Y] = y(!1), [R, ee] = y(!1), [Se, Ne] = y("node"), O = Ye(null), Le = Array.isArray(S) ? S.length > 0 : S, [te, ke] = y(Le), [oe, De] = y(/* @__PURE__ */ new Set()), [ne, Ee] = y(/* @__PURE__ */ new Set());
49
+ Re(me, () => ({
52
50
  onPathAnalysis: () => {
53
- oe();
51
+ se();
54
52
  }
55
- })), Be(() => {
56
- te();
57
- }, [k]);
58
- const te = async (e) => {
59
- const t = r.current;
60
- if (!t || !k) {
53
+ })), et(() => {
54
+ le();
55
+ }, [D]);
56
+ const le = async (e) => {
57
+ const t = c.current;
58
+ if (!t || !D) {
61
59
  t == null || t.nodes().removeClass("highlight"), t == null || t.fit();
62
60
  return;
63
61
  }
64
- const l = t.nodes().filter((n) => {
65
- const c = (n.data("name") || "").toLowerCase(), d = (n.data("role") || "").toLowerCase(), p = (n.data("dept") || "").toLowerCase(), g = String(n.data("id") || "").toLowerCase();
66
- return c.includes(k.toLowerCase()) || d.includes(k.toLowerCase()) || p.includes(k.toLowerCase()) || g.includes(k.toLowerCase());
62
+ const n = t.nodes().filter((l) => {
63
+ const i = (l.data("name") || "").toLowerCase(), s = (l.data("role") || "").toLowerCase(), h = (l.data("dept") || "").toLowerCase(), m = String(l.data("id") || "").toLowerCase();
64
+ return i.includes(D.toLowerCase()) || s.includes(D.toLowerCase()) || h.includes(D.toLowerCase()) || m.includes(D.toLowerCase());
67
65
  });
68
- t.nodes().removeClass("highlight"), l.addClass("highlight"), l.length === 1 ? (console.log("matchedNodes:::", l), t.animate({
66
+ t.nodes().removeClass("highlight"), n.addClass("highlight"), n.length === 1 ? (console.log("matchedNodes:::", n), t.animate({
69
67
  center: {
70
- eles: l
68
+ eles: n
71
69
  },
72
70
  duration: 500
73
71
  })) : alert("未找到对应节点");
74
- }, Ee = (e) => {
75
- const t = r.current;
72
+ }, Ie = (e) => {
73
+ const t = c.current;
76
74
  if (!t) return;
77
- const l = t.zoom();
78
- console.log(999, l);
79
- let n = 0;
75
+ const n = t.zoom();
76
+ console.log(999, n);
77
+ let l = 0;
80
78
  switch (e) {
81
79
  case "out":
82
- n = Math.max(l * 0.8, 0.1);
80
+ l = Math.max(n * 0.8, 0.1);
83
81
  break;
84
82
  case "in":
85
- n = Math.min(l * 1.2, 3);
83
+ l = Math.min(n * 1.2, 3);
86
84
  break;
87
85
  }
88
- t.zoom(n), t.center();
89
- }, Ie = () => {
90
- console.log("查询节点"), V(!0), P(!1), O.current.close();
91
- }, oe = () => {
92
- console.log("路径分析"), V(!1), P(!0), O.current.close();
93
- }, Ve = (e) => {
94
- var l;
86
+ t.zoom(l), t.center();
87
+ }, Ve = () => {
88
+ console.log("查询节点"), P(!0), A(!1), O.current.close();
89
+ }, se = () => {
90
+ console.log("路径分析"), P(!1), A(!0), O.current.close();
91
+ }, Pe = (e) => {
92
+ var n;
95
93
  pe(e);
96
- const t = r.current;
97
- t && (t.nodes().unlock(), ht(r, e), e === "cose-bilkent" && ((l = b == null ? void 0 : b.searchNodes) == null ? void 0 : l.length) === 2 && gt(
94
+ const t = c.current;
95
+ t && (t.nodes().unlock(), mt(c, e), e === "cose-bilkent" && ((n = b == null ? void 0 : b.searchNodes) == null ? void 0 : n.length) === 2 && ut(
98
96
  t,
99
97
  b.searchNodes[0],
100
98
  b.searchNodes[1]
101
99
  ));
102
- }, Pe = () => {
103
- const e = r.current;
104
- e && ct(e);
100
+ }, Ae = () => {
101
+ const e = c.current;
102
+ e && ht(e);
105
103
  }, Oe = () => {
106
- const e = r.current;
104
+ const e = c.current;
107
105
  if (!e) return;
108
106
  const t = ie(e);
109
- ve(t), U(!0);
110
- }, le = (e, t) => {
111
- const l = e.current;
112
- if (!l) return;
113
- const n = 2;
107
+ ve(t), Y(!0);
108
+ }, ae = (e, t) => {
109
+ const n = e.current;
110
+ if (!n) return;
111
+ const l = 2;
114
112
  if (t === "downloadPng") {
115
- const c = l.png({ scale: n, bg: "transparent", full: !0, quality: 1 });
116
- ce(c, `graph_${Date.now()}.png`);
113
+ const i = n.png({ scale: l, bg: "transparent", full: !0, quality: 1 });
114
+ ce(i, `graph_${Date.now()}.png`);
117
115
  } else if (t === "downloadJpg") {
118
- const c = l.jpg({ scale: n, bg: "#ffffff", full: !0, quality: 1 });
119
- ce(c, `graph_${Date.now()}.jpg`);
116
+ const i = n.jpg({ scale: l, bg: "#ffffff", full: !0, quality: 1 });
117
+ ce(i, `graph_${Date.now()}.jpg`);
120
118
  }
121
- }, Te = () => {
122
- const e = r.current;
119
+ }, ze = () => {
120
+ const e = c.current;
123
121
  if (!e) return;
124
- const t = ie(e), { nodes: l = [], edges: n = [] } = t, c = l.map((g) => {
125
- var h, a;
126
- const i = g.data || {}, C = i.properties || {};
122
+ const t = ie(e), { nodes: n = [], edges: l = [] } = t, i = n.map((m) => {
123
+ var g, r;
124
+ const d = m.data || {}, C = d.properties || {};
127
125
  return {
128
- 节点名称: i.name || i.label || "",
129
- 节点ID: i.id || "",
130
- 节点类型: i.types || "",
131
- URI: i.label || "",
132
- X坐标: ((h = g.position) == null ? void 0 : h.x) || "",
133
- Y坐标: ((a = g.position) == null ? void 0 : a.y) || "",
134
- 层级: i.level || "",
135
- 宽度: i.baseWidth || "",
136
- 高度: i.baseHeight || "",
137
- 图片: i.image || "",
126
+ 节点名称: d.name || d.label || "",
127
+ 节点ID: d.id || "",
128
+ 节点类型: d.types || "",
129
+ URI: d.label || "",
130
+ X坐标: ((g = m.position) == null ? void 0 : g.x) || "",
131
+ Y坐标: ((r = m.position) == null ? void 0 : r.y) || "",
132
+ 层级: d.level || "",
133
+ 宽度: d.baseWidth || "",
134
+ 高度: d.baseHeight || "",
135
+ 图片: d.image || "",
138
136
  属性ID: C.id || "",
139
137
  属性值: C.value || ""
140
138
  };
141
- }), d = n.map((g) => {
142
- var a, s, w, N;
143
- const i = g.data || {}, C = ((s = (a = i.source) == null ? void 0 : a.split("/#")[0]) == null ? void 0 : s.split("/").pop()) || i.source, h = ((N = (w = i.target) == null ? void 0 : w.split("/#")[0]) == null ? void 0 : N.split("/").pop()) || i.target;
139
+ }), s = l.map((m) => {
140
+ var r, a, w, k;
141
+ const d = m.data || {}, C = ((a = (r = d.source) == null ? void 0 : r.split("/#")[0]) == null ? void 0 : a.split("/").pop()) || d.source, g = ((k = (w = d.target) == null ? void 0 : w.split("/#")[0]) == null ? void 0 : k.split("/").pop()) || d.target;
144
142
  return {
145
143
  源节点: C,
146
- 目标节点: h,
147
- 源URI: i.source || "",
148
- 目标URI: i.target || "",
149
- 关系名称: i.name || i.label || "",
150
- 关系ID: i.id || ""
144
+ 目标节点: g,
145
+ 源URI: d.source || "",
146
+ 目标URI: d.target || "",
147
+ 关系名称: d.name || d.label || "",
148
+ 关系ID: d.id || ""
151
149
  };
152
- }), p = E.book_new();
153
- if (c.length > 0) {
154
- const g = E.json_to_sheet(c);
155
- g["!cols"] = [
150
+ }), h = I.book_new();
151
+ if (i.length > 0) {
152
+ const m = I.json_to_sheet(i);
153
+ m["!cols"] = [
156
154
  { wch: 30 },
157
155
  // 节点名称
158
156
  { wch: 60 },
@@ -177,11 +175,11 @@ const q = (b, r) => (S) => {
177
175
  // 属性ID
178
176
  { wch: 40 }
179
177
  // 属性值
180
- ], E.book_append_sheet(p, g, "节点");
178
+ ], I.book_append_sheet(h, m, "节点");
181
179
  }
182
- if (d.length > 0) {
183
- const g = E.json_to_sheet(d);
184
- g["!cols"] = [
180
+ if (s.length > 0) {
181
+ const m = I.json_to_sheet(s);
182
+ m["!cols"] = [
185
183
  { wch: 30 },
186
184
  // 源节点
187
185
  { wch: 30 },
@@ -194,262 +192,264 @@ const q = (b, r) => (S) => {
194
192
  // 关系名称
195
193
  { wch: 40 }
196
194
  // 关系ID
197
- ], E.book_append_sheet(p, g, "关系");
195
+ ], I.book_append_sheet(h, m, "关系");
198
196
  }
199
- ot(p, `graph_${Date.now()}.xlsx`);
200
- }, ze = (e, t) => {
197
+ lt(h, `graph_${Date.now()}.xlsx`);
198
+ }, Te = (e, t) => {
201
199
  switch (e.stopPropagation(), t) {
202
200
  case "downloadJson":
203
- Pe();
201
+ Ae();
204
202
  break;
205
203
  case "previewJsonList":
206
204
  Oe();
207
205
  break;
208
206
  case "downloadExcel":
209
- Te();
207
+ ze();
210
208
  break;
211
209
  case "previewDataList":
212
210
  break;
213
211
  case "downloadJpg":
214
- le(r, t);
212
+ ae(c, t);
215
213
  break;
216
214
  case "downloadPng":
217
- le(r, t);
215
+ ae(c, t);
218
216
  break;
219
217
  }
220
218
  }, je = () => {
221
- V(!1), P(!1), O.current.open();
222
- }, Ae = (e) => {
223
- const t = r.current;
219
+ P(!1), A(!1), O.current.open();
220
+ }, Fe = (e) => {
221
+ const t = c.current;
224
222
  if (t)
225
223
  if (t.panningEnabled(!0), e === "all")
226
224
  t.nodes().addClass("selected"), t.nodes().select(), t.elements().select();
227
225
  else if (e === "reverse") {
228
- const l = t.elements().filter(":selected"), n = t.elements().not(":selected");
229
- l.length > 0 ? (l.unselect(), n.select(), l.removeClass("selected"), n.addClass("selected")) : (t.elements().select(), t.elements().addClass("selected"));
230
- } else e === "click" ? (t.off("click", "node"), t.on("click", "node", (l) => {
231
- const n = l.target;
232
- t.nodes().removeClass("selected grayed highlighted"), t.edges().removeClass("selected grayed highlighted"), n.addClass("selected");
233
- const d = n.neighborhood().nodes().add(n), p = d.edgesWith(d);
234
- console.log("cy.nodes().not(relatedNodes):::", d), t.nodes().not(d).addClass("grayed"), t.edges().not(p).addClass("grayed"), d.addClass("highlighted"), p.addClass("highlighted");
226
+ const n = t.elements().filter(":selected"), l = t.elements().not(":selected");
227
+ n.length > 0 ? (n.unselect(), l.select(), n.removeClass("selected"), l.addClass("selected")) : (t.elements().select(), t.elements().addClass("selected"));
228
+ } else e === "click" ? (t.off("click", "node"), t.on("click", "node", (n) => {
229
+ const l = n.target;
230
+ t.nodes().removeClass("selected grayed highlighted"), t.edges().removeClass("selected grayed highlighted"), l.addClass("selected");
231
+ const s = l.neighborhood().nodes().add(l), h = s.edgesWith(s);
232
+ console.log("cy.nodes().not(relatedNodes):::", s), t.nodes().not(s).addClass("grayed"), t.edges().not(h).addClass("grayed"), s.addClass("highlighted"), h.addClass("highlighted");
235
233
  })) : e === "box" && (console.log("进入框选模式"), t.nodes().removeClass("selected"), t.nodes().unselect(), t.elements().unselect(), t.boxSelectionEnabled(!0), t.panningEnabled(!1), t.on("boxselectstart", () => {
236
234
  console.log("开始框选...");
237
- }), t.on("boxselect", (l) => {
238
- const n = t.elements(":selected");
239
- console.log("框选完成,选中元素数:", n.length), t.elements().removeClass("selected"), n.addClass("selected");
235
+ }), t.on("boxselect", (n) => {
236
+ const l = t.elements(":selected");
237
+ console.log("框选完成,选中元素数:", l.length), t.elements().removeClass("selected"), l.addClass("selected");
240
238
  }), t.on("boxselectend", () => {
241
239
  console.log("框选结束"), t.zoomingEnabled(!0), t.panningEnabled(!0);
242
240
  }));
243
- }, Fe = () => {
244
- const e = r.current;
241
+ }, He = () => {
242
+ const e = c.current;
245
243
  if (console.log("isShow::::"), be)
246
- M(!1), e.nodes('[types="typed-literal" ]').style("visibility", "visible"), e.edges().style("visibility", "visible");
244
+ G(!1), e.nodes('[types="typed-literal" ]').style("visibility", "visible"), e.edges().style("visibility", "visible");
247
245
  else {
248
- M(!0);
246
+ G(!0);
249
247
  const t = e.nodes('[types="typed-literal" ]');
250
248
  t.style("visibility", "hidden"), t.connectedEdges().style("visibility", "hidden");
251
249
  }
252
- }, He = (e) => {
253
- const t = r.current;
254
- if (!t) return;
255
- const l = e === "out" ? Math.max(Q * 0.8, 0.1) : Math.min(Q * 1.2, 5);
256
- we(l);
257
- const n = t.nodes();
258
- n.style("width", (c) => (c.data("baseWidth") || 80) * l), n.style("height", (c) => (c.data("baseHeight") || 80) * l);
259
250
  }, _e = (e) => {
260
- fe(e.content), te(e.content);
261
- }, We = (e = "刘强东", t = "1") => {
262
- const l = r.current;
263
- if (!l) return;
264
- l.elements().removeClass("level-highlight level-selected level-grayed level-highlightedge");
265
- const n = l.nodes().filter((h) => (h.data("name") || h.data("id") || "").toString().includes(e));
266
- if (n.length === 0) {
267
- T.warning(`未找到节点: ${e}`);
251
+ const t = c.current;
252
+ if (!t) return;
253
+ const n = e === "out" ? Math.max(U * 0.8, 0.1) : Math.min(U * 1.2, 5);
254
+ we(n);
255
+ const l = t.nodes();
256
+ l.style("width", (i) => (i.data("baseWidth") || M) * n), l.style("height", (i) => (i.data("baseHeight") || M) * n);
257
+ }, We = (e) => {
258
+ fe(e.content), le(e.content);
259
+ }, Je = (e = "刘强东", t = "1") => {
260
+ const n = c.current;
261
+ if (!n) return;
262
+ n.elements().removeClass("level-highlight level-selected level-grayed level-highlightedge");
263
+ const l = n.nodes().filter((g) => (g.data("name") || g.data("id") || "").toString().includes(e));
264
+ if (l.length === 0) {
265
+ z.warning(`未找到节点: ${e}`);
268
266
  return;
269
267
  }
270
- const c = parseInt(t) || 1, d = l.collection(), p = [];
271
- n.forEach((h) => {
272
- h.addClass("level-selected"), d.merge(h);
273
- let a = l.collection();
274
- const s = /* @__PURE__ */ new Set();
275
- s.add(h.id()), c >= 1 && (a = h.neighborhood().nodes(), a.forEach((w) => {
276
- s.add(w.id()), d.merge(w);
277
- }), p.push(a));
278
- for (let w = 2; w <= c; w++) {
279
- const N = l.collection();
280
- a.forEach((W) => {
281
- W.neighborhood().nodes().forEach((J) => {
282
- s.has(J.id()) || (s.add(J.id()), N.merge(J));
268
+ const i = parseInt(t) || 1, s = n.collection(), h = [];
269
+ l.forEach((g) => {
270
+ g.addClass("level-selected"), s.merge(g);
271
+ let r = n.collection();
272
+ const a = /* @__PURE__ */ new Set();
273
+ a.add(g.id()), i >= 1 && (r = g.neighborhood().nodes(), r.forEach((w) => {
274
+ a.add(w.id()), s.merge(w);
275
+ }), h.push(r));
276
+ for (let w = 2; w <= i; w++) {
277
+ const k = n.collection();
278
+ r.forEach((J) => {
279
+ J.neighborhood().nodes().forEach(($) => {
280
+ a.has($.id()) || (a.add($.id()), k.merge($));
283
281
  });
284
- }), N.forEach((W) => d.merge(W)), p.push(N), a = N;
282
+ }), k.forEach((J) => s.merge(J)), h.push(k), r = k;
285
283
  }
286
- }), p.forEach((h) => {
287
- h.addClass("level-highlight");
288
- }), l.edges().filter((h) => {
289
- const a = h.source(), s = h.target();
290
- return d.contains(a) && d.contains(s);
284
+ }), h.forEach((g) => {
285
+ g.addClass("level-highlight");
286
+ }), n.edges().filter((g) => {
287
+ const r = g.source(), a = g.target();
288
+ return s.contains(r) && s.contains(a);
291
289
  }).addClass("level-highlightedge");
292
- const i = l.elements().filter(".level-selected, .level-highlight, .level-highlightedge");
293
- l.elements().not(i).addClass("level-grayed"), T.success(`已高亮 "${e}" 及其 ${c} 度关联节点和连线`);
294
- }, Je = (e) => {
295
- const t = r.current;
296
- if (!t) return;
297
- const l = new Set(R);
298
- l.has(e) ? (l.delete(e), t.nodes().filter((n) => n.data("type") === e).show()) : (l.add(e), t.nodes().filter((n) => n.data("type") === e).hide()), ke(l);
290
+ const d = n.elements().filter(".level-selected, .level-highlight, .level-highlightedge");
291
+ n.elements().not(d).addClass("level-grayed"), z.success(`已高亮 "${e}" 及其 ${i} 度关联节点和连线`);
299
292
  }, $e = (e) => {
300
- const t = r.current;
293
+ const t = c.current;
301
294
  if (!t) return;
302
- const l = new Set(ee);
303
- l.has(e) ? (l.delete(e), t.edges().filter((n) => n.data("name") === e).show()) : (l.add(e), t.edges().filter((n) => n.data("name") === e).hide()), De(l);
295
+ const n = new Set(oe);
296
+ n.has(e) ? (n.delete(e), t.nodes().filter((l) => l.data("type") === e).show()) : (n.add(e), t.nodes().filter((l) => l.data("type") === e).hide()), De(n);
297
+ }, Be = (e) => {
298
+ const t = c.current;
299
+ if (!t) return;
300
+ const n = new Set(ne);
301
+ n.has(e) ? (n.delete(e), t.edges().filter((l) => l.data("name") === e).show()) : (n.add(e), t.edges().filter((l) => l.data("name") === e).hide()), Ee(n);
304
302
  }, Ze = () => {
305
- const e = r.current;
303
+ const e = c.current;
306
304
  e.remove(e.elements());
307
- }, qe = () => {
308
- Y(!X);
309
- }, Ke = (e) => {
310
- var c, d;
311
- const t = r.current;
305
+ }, Ke = () => {
306
+ ee(!R);
307
+ }, Me = (e) => {
308
+ var i, s;
309
+ const t = c.current;
312
310
  if (!t) return;
313
311
  console.log("saveNodeConfig values:", e), console.log("showLabel value:", e.showLabel);
314
- const l = typeof e.fontColor == "object" && ((d = (c = e.fontColor) == null ? void 0 : c.toHexString) == null ? void 0 : d.call(c)) || e.fontColor, n = e.showLabel === "show";
315
- console.log("showLabelValue:", n), t.nodes().forEach((p) => {
316
- const g = n && (p.data("name") || p.data("label")) || "";
317
- console.log("Setting node label:", g), p.style({
312
+ const n = typeof e.fontColor == "object" && ((s = (i = e.fontColor) == null ? void 0 : i.toHexString) == null ? void 0 : s.call(i)) || e.fontColor, l = e.showLabel === "show";
313
+ console.log("showLabelValue:", l), t.nodes().forEach((h) => {
314
+ const m = l && (h.data("name") || h.data("label")) || "";
315
+ console.log("Setting node label:", m), h.style({
318
316
  width: e.nodeSize,
319
317
  height: e.nodeSize,
320
318
  "font-size": e.fontSize,
321
- color: l || H.nodeLabelColor,
319
+ color: n || H.nodeLabelColor,
322
320
  "font-weight": e.fontWeight,
323
321
  "font-style": e.fontStyle,
324
322
  "text-valign": e.textPosition,
325
323
  "text-halign": "center",
326
324
  "text-margin-y": e.textOffset,
327
- label: g,
328
- "text-opacity": g ? 1 : 0
325
+ label: m,
326
+ "text-opacity": m ? 1 : 0
329
327
  });
330
- }), T.success("节点配置保存成功");
331
- }, Me = (e) => {
332
- var p, g, i, C, h, a;
333
- const t = r.current;
328
+ }), z.success("节点配置保存成功");
329
+ }, qe = (e) => {
330
+ var h, m, d, C, g, r;
331
+ const t = c.current;
334
332
  if (!t) return;
335
333
  console.log("saveEdgeConfig values:", e), console.log("edge showLabel value:", e.showLabel);
336
- const l = typeof e.edgeColor == "object" && ((g = (p = e.edgeColor) == null ? void 0 : p.toHexString) == null ? void 0 : g.call(p)) || e.edgeColor, n = typeof e.fontColor == "object" && ((C = (i = e.fontColor) == null ? void 0 : i.toHexString) == null ? void 0 : C.call(i)) || e.fontColor, c = typeof e.labelBgColor == "object" && ((a = (h = e.labelBgColor) == null ? void 0 : h.toHexString) == null ? void 0 : a.call(h)) || e.labelBgColor, d = e.showLabel === "show";
337
- t.edges().forEach((s) => {
338
- const w = d && (s.data("label") || s.data("name")) || "";
339
- console.log("Setting edge label:", w), s.style({
334
+ const n = typeof e.edgeColor == "object" && ((m = (h = e.edgeColor) == null ? void 0 : h.toHexString) == null ? void 0 : m.call(h)) || e.edgeColor, l = typeof e.fontColor == "object" && ((C = (d = e.fontColor) == null ? void 0 : d.toHexString) == null ? void 0 : C.call(d)) || e.fontColor, i = typeof e.labelBgColor == "object" && ((r = (g = e.labelBgColor) == null ? void 0 : g.toHexString) == null ? void 0 : r.call(g)) || e.labelBgColor, s = e.showLabel === "show";
335
+ t.edges().forEach((a) => {
336
+ const w = s && (a.data("label") || a.data("name")) || "";
337
+ console.log("Setting edge label:", w), a.style({
340
338
  width: e.edgeWidth,
341
- "line-color": l || z.edgeDefaultColor,
342
- "target-arrow-color": l || z.edgeDefaultColor,
339
+ "line-color": n || T.edgeDefaultColor,
340
+ "target-arrow-color": n || T.edgeDefaultColor,
343
341
  "target-arrow-shape": e.showArrow === "show" ? "triangle" : "none",
344
342
  "font-size": e.fontSize,
345
- color: n || z.edgeLabelColor,
343
+ color: l || T.edgeLabelColor,
346
344
  "font-weight": e.fontWeight,
347
345
  "font-style": e.fontStyle,
348
346
  label: w,
349
347
  "text-opacity": w ? 1 : 0,
350
- "text-background-color": c || "transparent",
351
- "text-background-opacity": c ? 1 : 0,
348
+ "text-background-color": i || "transparent",
349
+ "text-background-opacity": i ? 1 : 0,
352
350
  "text-background-padding": "2px"
353
351
  });
354
- }), T.success("连线配置保存成功");
355
- }, Qe = bt(F), _ = F === "left" || F === "right";
356
- return console.log(1e3, K), /* @__PURE__ */ f($, { children: [
357
- /* @__PURE__ */ o("div", { className: j("graph-bar", { "graph-bar-vertical": _ }), style: Qe, children: /* @__PURE__ */ o("div", { className: j("graph-bar-min", {
358
- "graph-bar-min-vertical": _
359
- }), children: K.map(({ key: e, title: t, icon: l, onClick: n }) => {
360
- var g, i, C, h;
361
- const c = () => l && l.length > 0 ? l.length > 1 ? /* @__PURE__ */ o(x, { gap: "5px", children: l.map((a, s) => e === "nodeZoom" ? Z.cloneElement(a, {
362
- onClick: () => He(s === 0 ? "in" : "out"),
363
- key: s
364
- }) : e === "canvasZoom" ? Z.cloneElement(a, {
365
- onClick: () => Ee(s === 0 ? "in" : "out"),
366
- key: s
367
- }) : Z.cloneElement(a, { key: s })) }) : /* @__PURE__ */ o(x, { gap: "5px", children: l }) : null, d = (a) => {
368
- switch (console.log(444, e, a), e) {
352
+ }), z.success("连线配置保存成功");
353
+ }, Qe = Ct(_), W = _ === "left" || _ === "right";
354
+ if (console.log(1e3, q, Q), !q) return null;
355
+ const Ge = Array.isArray(S) && (S == null ? void 0 : S.length) > 0 ? S : yt;
356
+ return /* @__PURE__ */ f(B, { children: [
357
+ /* @__PURE__ */ o("div", { className: j("graph-bar", { "graph-bar-vertical": W }), style: Qe, children: /* @__PURE__ */ o("div", { className: j("graph-bar-min", {
358
+ "graph-bar-min-vertical": W
359
+ }), children: Q.map(({ key: e, title: t, icon: n, onClick: l }) => {
360
+ var m, d, C, g;
361
+ const i = () => n && n.length > 0 ? n.length > 1 ? /* @__PURE__ */ o(x, { gap: "5px", children: n.map((r, a) => e === "nodeZoom" ? Z.cloneElement(r, {
362
+ onClick: () => _e(a === 0 ? "in" : "out"),
363
+ key: a
364
+ }) : e === "canvasZoom" ? Z.cloneElement(r, {
365
+ onClick: () => Ie(a === 0 ? "in" : "out"),
366
+ key: a
367
+ }) : Z.cloneElement(r, { key: a })) }) : /* @__PURE__ */ o(x, { gap: "5px", children: n }) : null, s = (r) => {
368
+ switch (console.log(444, e, r), e) {
369
369
  case "queryStatistics":
370
- Le(!B);
370
+ ke(!te);
371
371
  break;
372
372
  case "graphDisplaySettings":
373
- qe();
373
+ Ke();
374
374
  break;
375
375
  case "hideAttributes":
376
- Fe();
376
+ He();
377
377
  break;
378
378
  case "clearCanvas":
379
379
  Ze();
380
380
  break;
381
381
  default:
382
- a == null || a(r);
382
+ r == null || r(c);
383
383
  }
384
384
  };
385
385
  if (["layout", "analysis", "select", "downloadData", "textPosition"].includes(e)) {
386
- let a = [];
386
+ let r = [];
387
387
  switch (e) {
388
388
  case "layout":
389
- a = (g = rt) == null ? void 0 : g.map((s) => ({
390
- ...s,
391
- label: /* @__PURE__ */ o("div", { className: j({ "text-[#145afd]": ue === s.key }), onClick: q(Ve, s.key), children: s.label })
389
+ r = (m = ct) == null ? void 0 : m.map((a) => ({
390
+ ...a,
391
+ label: /* @__PURE__ */ o("div", { className: j({ "text-[#145afd]": ue === a.key }), onClick: K(Pe, a.key), children: a.label })
392
392
  }));
393
393
  break;
394
394
  case "analysis":
395
- a = at.map((s) => ({
396
- ...s,
395
+ r = it.map((a) => ({
396
+ ...a,
397
397
  label: /* @__PURE__ */ o("div", { onClick: (w) => {
398
- switch (w.stopPropagation(), s.key) {
398
+ switch (w.stopPropagation(), a.key) {
399
399
  case "query":
400
- Ie();
400
+ Ve();
401
401
  break;
402
402
  case "link":
403
403
  je();
404
404
  break;
405
405
  case "path":
406
- oe();
406
+ se();
407
407
  break;
408
408
  }
409
- }, children: s.label })
409
+ }, children: a.label })
410
410
  }));
411
411
  break;
412
412
  case "select":
413
- a = (i = st) == null ? void 0 : i.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: q(Ae, s.key), children: s.label }) }));
413
+ r = (d = rt) == null ? void 0 : d.map((a) => ({ ...a, label: /* @__PURE__ */ o("div", { onClick: K(Fe, a.key), children: a.label }) }));
414
414
  break;
415
415
  case "downloadData":
416
- a = (C = nt) == null ? void 0 : C.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: (w) => ze(w, s.key), children: s.label }) }));
416
+ r = (C = at) == null ? void 0 : C.map((a) => ({ ...a, label: /* @__PURE__ */ o("div", { onClick: (w) => Te(w, a.key), children: a.label }) }));
417
417
  break;
418
418
  case "textPosition":
419
- a = (h = he) == null ? void 0 : h.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: q(() => lt(r, s.key), s.key), children: s.label }) }));
419
+ r = (g = he) == null ? void 0 : g.map((a) => ({ ...a, label: /* @__PURE__ */ o("div", { onClick: K(() => st(c, a.key), a.key), children: a.label }) }));
420
420
  break;
421
421
  }
422
- return /* @__PURE__ */ o(Re, { trigger: ["hover"], placement: _ ? "bottomRight" : "bottom", menu: { items: a }, children: /* @__PURE__ */ f(x, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor", children: [
423
- c(),
422
+ return /* @__PURE__ */ o(tt, { trigger: ["hover"], placement: W ? "bottomRight" : "bottom", menu: { items: r }, children: /* @__PURE__ */ f(x, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor", children: [
423
+ i(),
424
424
  /* @__PURE__ */ o(x, { className: "w-100 ", justify: "center", children: t })
425
425
  ] }) }, e);
426
426
  }
427
- return /* @__PURE__ */ f(x, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor", onClick: () => d(n), children: [
428
- c(),
427
+ return /* @__PURE__ */ f(x, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor", onClick: () => s(l), children: [
428
+ i(),
429
429
  /* @__PURE__ */ o(x, { className: "w-100 ", justify: "center", children: t })
430
430
  ] }, e);
431
431
  }) }) }),
432
- /* @__PURE__ */ o(mt, { isVisible: ye, searchChange: (e) => _e(e), closeQuery: () => V(!1) }),
433
- /* @__PURE__ */ o(ut, { isVisible: Ce, analysis: (e) => it(r, { pathNodes: e }), closePath: () => P(!1) }),
434
- /* @__PURE__ */ o(pt, { ref: O, onLevelClick: We }),
432
+ /* @__PURE__ */ o(pt, { isVisible: ye, searchChange: (e) => We(e), closeQuery: () => P(!1) }),
433
+ /* @__PURE__ */ o(ft, { isVisible: Ce, analysis: (e) => dt(c, { pathNodes: e }), closePath: () => A(!1) }),
434
+ /* @__PURE__ */ o(bt, { ref: O, onLevelClick: Je }),
435
435
  /* @__PURE__ */ o(
436
- et,
436
+ ot,
437
437
  {
438
438
  title: "JSON预览",
439
439
  open: xe,
440
- onCancel: () => U(!1),
440
+ onCancel: () => Y(!1),
441
441
  footer: null,
442
442
  width: 800,
443
- children: /* @__PURE__ */ o("pre", { style: { maxHeight: "60vh", overflow: "auto", background: "#f5f5f5", padding: "16px", borderRadius: "4px" }, children: G ? JSON.stringify(G, null, 2) : "暂无数据" })
443
+ children: /* @__PURE__ */ o("pre", { style: { maxHeight: "60vh", overflow: "auto", background: "#f5f5f5", padding: "16px", borderRadius: "4px" }, children: X ? JSON.stringify(X, null, 2) : "暂无数据" })
444
444
  }
445
445
  ),
446
446
  /* @__PURE__ */ o(
447
- tt,
447
+ nt,
448
448
  {
449
449
  title: "图显示设置",
450
450
  placement: "right",
451
- open: X,
452
- onClose: () => Y(!1),
451
+ open: R,
452
+ onClose: () => ee(!1),
453
453
  mask: !1,
454
454
  size: 300,
455
455
  styles: {
@@ -469,12 +469,12 @@ const q = (b, r) => (S) => {
469
469
  {
470
470
  label: "节点设置",
471
471
  key: "node",
472
- children: /* @__PURE__ */ o(wt, { onSave: Ke, colors: H })
472
+ children: /* @__PURE__ */ o(vt, { onSave: Me, colors: H })
473
473
  },
474
474
  {
475
475
  label: "连线设置",
476
476
  key: "edge",
477
- children: /* @__PURE__ */ o(yt, { onSave: Me, colors: H })
477
+ children: /* @__PURE__ */ o(xt, { onSave: qe, colors: H })
478
478
  }
479
479
  ]
480
480
  }
@@ -482,109 +482,109 @@ const q = (b, r) => (S) => {
482
482
  }
483
483
  ),
484
484
  /* @__PURE__ */ o("div", { className: j("gtaph-statics absolute", {
485
- hidden: !B
485
+ hidden: !te
486
486
  }), children: /* @__PURE__ */ o(
487
487
  re,
488
488
  {
489
- items: [
490
- {
491
- label: "实体",
492
- key: "entity",
493
- children: /* @__PURE__ */ o($, { children: Object.keys(v).length > 0 ? /* @__PURE__ */ f("div", { children: [
489
+ items: Ge.map(({ key: e, label: t }) => {
490
+ var n, l, i;
491
+ return e === "entity" ? {
492
+ label: t,
493
+ key: e,
494
+ children: /* @__PURE__ */ o(B, { children: Object.keys(v).length > 0 ? /* @__PURE__ */ f("div", { children: [
494
495
  /* @__PURE__ */ f("p", { children: [
495
496
  "实体数量:",
496
- Object.values(v).reduce((e, t) => e + t.count, 0)
497
+ Object.values(v).reduce((s, h) => s + h.count, 0)
497
498
  ] }),
498
499
  /* @__PURE__ */ f("p", { className: "my-4px", children: [
499
500
  "实体类型:",
500
501
  Object.keys(v).length
501
502
  ] }),
502
- /* @__PURE__ */ o(x, { gap: "5px", justify: "start", className: "w-100", wrap: !0, children: Object.keys(v).map((e) => /* @__PURE__ */ f(x, { gap: "4px", justify: "start", className: `w-100 cursor ${R.has(e) ? "opacity-30" : ""}`, onClick: () => Je(e), children: [
503
- /* @__PURE__ */ o("img", { className: "w-20px rounded-50", src: v[e].img, alt: "" }),
504
- e,
503
+ /* @__PURE__ */ o(x, { gap: "5px", justify: "start", className: "w-100", wrap: !0, children: Object.keys(v).map((s) => /* @__PURE__ */ f(x, { gap: "4px", justify: "start", className: `w-100 cursor ${oe.has(s) ? "opacity-30" : ""}`, onClick: () => $e(s), children: [
504
+ /* @__PURE__ */ o("img", { className: "w-20px rounded-50", src: v[s].img, alt: "" }),
505
+ s,
505
506
  ":",
506
- v[e].count
507
- ] }, e)) })
507
+ v[s].count
508
+ ] }, s)) })
508
509
  ] }) : /* @__PURE__ */ o("span", { className: "text-[#666]", children: "暂无实体统计!" }) })
509
- },
510
- {
511
- label: "关系",
512
- key: "relation",
513
- children: /* @__PURE__ */ o($, { children: ((ne = Object.keys(D)) == null ? void 0 : ne.length) > 0 ? /* @__PURE__ */ f("div", { children: [
510
+ } : e === "relation" ? {
511
+ label: t,
512
+ key: e,
513
+ children: /* @__PURE__ */ o(B, { children: ((n = Object.keys(E)) == null ? void 0 : n.length) > 0 ? /* @__PURE__ */ f("div", { children: [
514
514
  /* @__PURE__ */ f("div", { children: [
515
515
  "关系数量:",
516
- (se = Object.keys(D)) == null ? void 0 : se.length
516
+ (l = Object.keys(E)) == null ? void 0 : l.length
517
517
  ] }),
518
518
  /* @__PURE__ */ f("div", { className: "my-4px", children: [
519
519
  "关系类型:",
520
- (ae = Object.values(D)) == null ? void 0 : ae.reduce((e, t) => e + t, 0)
520
+ (i = Object.values(E)) == null ? void 0 : i.reduce((s, h) => s + h, 0)
521
521
  ] }),
522
- /* @__PURE__ */ o(x, { gap: "5px", justify: "start", className: "w-100", wrap: !0, children: Object.keys(D).map((e) => /* @__PURE__ */ f(x, { gap: "4px", className: `w-100 cursor ${ee.has(e) ? "opacity-30" : ""}`, onClick: () => $e(e), children: [
523
- e,
522
+ /* @__PURE__ */ o(x, { gap: "5px", justify: "start", className: "w-100", wrap: !0, children: Object.keys(E).map((s) => /* @__PURE__ */ f(x, { gap: "4px", className: `w-100 cursor ${ne.has(s) ? "opacity-30" : ""}`, onClick: () => Be(s), children: [
523
+ s,
524
524
  ":",
525
- D[e]
526
- ] }, e)) })
525
+ E[s]
526
+ ] }, s)) })
527
527
  ] }) : /* @__PURE__ */ o("span", { className: "text-[#666]", children: "暂无关系统计!" }) })
528
- }
529
- ]
528
+ } : null;
529
+ })
530
530
  }
531
531
  ) })
532
532
  ] });
533
- }), wt = ({ onSave: b, colors: r }) => {
534
- const [S] = u.useForm();
535
- return /* @__PURE__ */ f(u, { form: S, layout: "vertical", onFinish: b, className: "setting-form", children: [
533
+ }), vt = ({ onSave: b, colors: c }) => {
534
+ const [L] = p.useForm();
535
+ return /* @__PURE__ */ f(p, { form: L, layout: "vertical", onFinish: b, className: "setting-form", children: [
536
536
  /* @__PURE__ */ f("div", { className: "setting-form-content", children: [
537
- /* @__PURE__ */ o(u.Item, { label: "节点大小", name: "nodeSize", initialValue: 80, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入节点大小" }) }),
538
- /* @__PURE__ */ o(u.Item, { label: "显示标签", name: "showLabel", initialValue: "show", children: /* @__PURE__ */ f(m, { children: [
539
- /* @__PURE__ */ o(m.Option, { value: "show", children: "显示" }),
540
- /* @__PURE__ */ o(m.Option, { value: "hide", children: "隐藏" })
537
+ /* @__PURE__ */ o(p.Item, { label: "节点大小", name: "nodeSize", initialValue: M, children: /* @__PURE__ */ o(V, { type: "number", placeholder: "请输入节点大小" }) }),
538
+ /* @__PURE__ */ o(p.Item, { label: "显示标签", name: "showLabel", initialValue: "show", children: /* @__PURE__ */ f(u, { children: [
539
+ /* @__PURE__ */ o(u.Option, { value: "show", children: "显示" }),
540
+ /* @__PURE__ */ o(u.Option, { value: "hide", children: "隐藏" })
541
541
  ] }) }),
542
- /* @__PURE__ */ o(u.Item, { label: "字体位置", name: "textPosition", initialValue: "bottom", children: /* @__PURE__ */ o(m, { children: he.map((v) => /* @__PURE__ */ o(m.Option, { value: v.key, children: v.label }, v.key)) }) }),
543
- /* @__PURE__ */ o(u.Item, { label: "字体偏移", name: "textOffset", initialValue: 5, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入字体偏移量" }) }),
544
- /* @__PURE__ */ o(u.Item, { label: "字体颜色", name: "fontColor", initialValue: r.nodeLabelColor, children: /* @__PURE__ */ o(A, { showText: !0 }) }),
545
- /* @__PURE__ */ o(u.Item, { label: "字体大小", name: "fontSize", initialValue: r.nodeLabelFontSize, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入字体大小" }) }),
546
- /* @__PURE__ */ o(u.Item, { label: "字体粗细", name: "fontWeight", initialValue: "normal", children: /* @__PURE__ */ f(m, { children: [
547
- /* @__PURE__ */ o(m.Option, { value: "normal", children: "常规" }),
548
- /* @__PURE__ */ o(m.Option, { value: "bold", children: "粗体" }),
549
- /* @__PURE__ */ o(m.Option, { value: "lighter", children: "细体" })
542
+ /* @__PURE__ */ o(p.Item, { label: "字体位置", name: "textPosition", initialValue: "bottom", children: /* @__PURE__ */ o(u, { children: he.map((v) => /* @__PURE__ */ o(u.Option, { value: v.key, children: v.label }, v.key)) }) }),
543
+ /* @__PURE__ */ o(p.Item, { label: "字体偏移", name: "textOffset", initialValue: 5, children: /* @__PURE__ */ o(V, { type: "number", placeholder: "请输入字体偏移量" }) }),
544
+ /* @__PURE__ */ o(p.Item, { label: "字体颜色", name: "fontColor", initialValue: c.nodeLabelColor, children: /* @__PURE__ */ o(F, { showText: !0 }) }),
545
+ /* @__PURE__ */ o(p.Item, { label: "字体大小", name: "fontSize", initialValue: c.nodeLabelFontSize, children: /* @__PURE__ */ o(V, { type: "number", placeholder: "请输入字体大小" }) }),
546
+ /* @__PURE__ */ o(p.Item, { label: "字体粗细", name: "fontWeight", initialValue: "normal", children: /* @__PURE__ */ f(u, { children: [
547
+ /* @__PURE__ */ o(u.Option, { value: "normal", children: "常规" }),
548
+ /* @__PURE__ */ o(u.Option, { value: "bold", children: "粗体" }),
549
+ /* @__PURE__ */ o(u.Option, { value: "lighter", children: "细体" })
550
550
  ] }) }),
551
- /* @__PURE__ */ o(u.Item, { label: "字体样式", name: "fontStyle", initialValue: "normal", children: /* @__PURE__ */ f(m, { children: [
552
- /* @__PURE__ */ o(m.Option, { value: "normal", children: "默认" }),
553
- /* @__PURE__ */ o(m.Option, { value: "italic", children: "斜体" })
551
+ /* @__PURE__ */ o(p.Item, { label: "字体样式", name: "fontStyle", initialValue: "normal", children: /* @__PURE__ */ f(u, { children: [
552
+ /* @__PURE__ */ o(u.Option, { value: "normal", children: "默认" }),
553
+ /* @__PURE__ */ o(u.Option, { value: "italic", children: "斜体" })
554
554
  ] }) })
555
555
  ] }),
556
- /* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(de, { type: "primary", htmlType: "submit", block: !0, children: "保存节点配置" }) }) })
556
+ /* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(p.Item, { children: /* @__PURE__ */ o(de, { type: "primary", htmlType: "submit", block: !0, children: "保存节点配置" }) }) })
557
557
  ] });
558
- }, yt = ({ onSave: b, colors: r }) => {
559
- const [S] = u.useForm();
560
- return /* @__PURE__ */ f(u, { form: S, layout: "vertical", onFinish: b, className: "setting-form", children: [
558
+ }, xt = ({ onSave: b, colors: c }) => {
559
+ const [L] = p.useForm();
560
+ return /* @__PURE__ */ f(p, { form: L, layout: "vertical", onFinish: b, className: "setting-form", children: [
561
561
  /* @__PURE__ */ f("div", { className: "setting-form-content", children: [
562
- /* @__PURE__ */ o(u.Item, { label: "连线宽度", name: "edgeWidth", initialValue: 2, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入连线宽度" }) }),
563
- /* @__PURE__ */ o(u.Item, { label: "连线箭头", name: "showArrow", initialValue: "show", children: /* @__PURE__ */ f(m, { children: [
564
- /* @__PURE__ */ o(m.Option, { value: "show", children: "显示" }),
565
- /* @__PURE__ */ o(m.Option, { value: "hide", children: "隐藏" })
562
+ /* @__PURE__ */ o(p.Item, { label: "连线宽度", name: "edgeWidth", initialValue: 2, children: /* @__PURE__ */ o(V, { type: "number", placeholder: "请输入连线宽度" }) }),
563
+ /* @__PURE__ */ o(p.Item, { label: "连线箭头", name: "showArrow", initialValue: "show", children: /* @__PURE__ */ f(u, { children: [
564
+ /* @__PURE__ */ o(u.Option, { value: "show", children: "显示" }),
565
+ /* @__PURE__ */ o(u.Option, { value: "hide", children: "隐藏" })
566
566
  ] }) }),
567
- /* @__PURE__ */ o(u.Item, { label: "连线颜色", name: "edgeColor", initialValue: r.edgeDefaultColor, children: /* @__PURE__ */ o(A, { showText: !0 }) }),
568
- /* @__PURE__ */ o(u.Item, { label: "显示标签", name: "showLabel", initialValue: "show", children: /* @__PURE__ */ f(m, { children: [
569
- /* @__PURE__ */ o(m.Option, { value: "show", children: "显示" }),
570
- /* @__PURE__ */ o(m.Option, { value: "hide", children: "隐藏" })
567
+ /* @__PURE__ */ o(p.Item, { label: "连线颜色", name: "edgeColor", initialValue: c.edgeDefaultColor, children: /* @__PURE__ */ o(F, { showText: !0 }) }),
568
+ /* @__PURE__ */ o(p.Item, { label: "显示标签", name: "showLabel", initialValue: "show", children: /* @__PURE__ */ f(u, { children: [
569
+ /* @__PURE__ */ o(u.Option, { value: "show", children: "显示" }),
570
+ /* @__PURE__ */ o(u.Option, { value: "hide", children: "隐藏" })
571
571
  ] }) }),
572
- /* @__PURE__ */ o(u.Item, { label: "字体大小", name: "fontSize", initialValue: r.edgeLabelFontSize, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入字体大小" }) }),
573
- /* @__PURE__ */ o(u.Item, { label: "字体颜色", name: "fontColor", initialValue: r.edgeLabelColor, children: /* @__PURE__ */ o(A, { showText: !0 }) }),
574
- /* @__PURE__ */ o(u.Item, { label: "字体粗细", name: "fontWeight", initialValue: "normal", children: /* @__PURE__ */ f(m, { children: [
575
- /* @__PURE__ */ o(m.Option, { value: "normal", children: "常规" }),
576
- /* @__PURE__ */ o(m.Option, { value: "bold", children: "粗体" })
572
+ /* @__PURE__ */ o(p.Item, { label: "字体大小", name: "fontSize", initialValue: c.edgeLabelFontSize, children: /* @__PURE__ */ o(V, { type: "number", placeholder: "请输入字体大小" }) }),
573
+ /* @__PURE__ */ o(p.Item, { label: "字体颜色", name: "fontColor", initialValue: c.edgeLabelColor, children: /* @__PURE__ */ o(F, { showText: !0 }) }),
574
+ /* @__PURE__ */ o(p.Item, { label: "字体粗细", name: "fontWeight", initialValue: "normal", children: /* @__PURE__ */ f(u, { children: [
575
+ /* @__PURE__ */ o(u.Option, { value: "normal", children: "常规" }),
576
+ /* @__PURE__ */ o(u.Option, { value: "bold", children: "粗体" })
577
577
  ] }) }),
578
- /* @__PURE__ */ o(u.Item, { label: "字体样式", name: "fontStyle", initialValue: "normal", children: /* @__PURE__ */ f(m, { children: [
579
- /* @__PURE__ */ o(m.Option, { value: "normal", children: "默认" }),
580
- /* @__PURE__ */ o(m.Option, { value: "italic", children: "斜体" })
578
+ /* @__PURE__ */ o(p.Item, { label: "字体样式", name: "fontStyle", initialValue: "normal", children: /* @__PURE__ */ f(u, { children: [
579
+ /* @__PURE__ */ o(u.Option, { value: "normal", children: "默认" }),
580
+ /* @__PURE__ */ o(u.Option, { value: "italic", children: "斜体" })
581
581
  ] }) }),
582
- /* @__PURE__ */ o(u.Item, { label: "标签背景色", name: "labelBgColor", initialValue: "#ffffff", children: /* @__PURE__ */ o(A, { showText: !0 }) })
582
+ /* @__PURE__ */ o(p.Item, { label: "标签背景色", name: "labelBgColor", initialValue: "#ffffff", children: /* @__PURE__ */ o(F, { showText: !0 }) })
583
583
  ] }),
584
- /* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(de, { type: "primary", htmlType: "submit", block: !0, children: "保存连线配置" }) }) })
584
+ /* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(p.Item, { children: /* @__PURE__ */ o(de, { type: "primary", htmlType: "submit", block: !0, children: "保存连线配置" }) }) })
585
585
  ] });
586
586
  };
587
587
  export {
588
- ft as actionList,
589
- At as default
588
+ wt as actionList,
589
+ _t as default
590
590
  };