react-kggraph 0.0.25 → 0.0.27

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