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