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