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