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