react-kggraph 0.0.23 → 0.0.25

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