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