react-kggraph 0.0.3 → 0.0.5
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.es.js +5 -0
- package/lib/{index17.esm.js → index18.es.js} +12 -12
- package/lib/{index2.esm.js → index2.es.js} +2 -5
- package/lib/index22.es.js +70 -0
- package/lib/index24.es.js +68 -0
- package/lib/index26.es.js +72 -0
- package/lib/{index29.esm.js → index27.es.js} +1 -1
- package/lib/{index30.esm.js → index28.es.js} +239 -239
- package/lib/index33.es.js +100 -0
- package/lib/{index37.esm.js → index34.es.js} +93 -93
- package/lib/index35.es.js +47 -0
- package/lib/{index39.esm.js → index36.es.js} +134 -136
- package/lib/index37.es.js +12 -0
- package/package.json +13 -8
- package/lib/components/Graph/components/PathAnalysisLevel/index.css +0 -1
- package/lib/index.cjs.js +0 -1
- package/lib/index.esm.js +0 -3
- package/lib/index10.cjs.js +0 -1
- package/lib/index11.cjs.js +0 -1
- package/lib/index12.cjs.js +0 -1
- package/lib/index13.cjs.js +0 -1
- package/lib/index14.cjs.js +0 -1
- package/lib/index15.cjs.js +0 -1
- package/lib/index16.cjs.js +0 -1
- package/lib/index17.cjs.js +0 -1
- package/lib/index18.cjs.js +0 -1
- package/lib/index19.cjs.js +0 -1
- package/lib/index2.cjs.js +0 -1
- package/lib/index21.cjs.js +0 -1
- package/lib/index21.esm.js +0 -27
- package/lib/index22.cjs.js +0 -16
- package/lib/index22.esm.js +0 -453
- package/lib/index23.cjs.js +0 -1
- package/lib/index23.esm.js +0 -10
- package/lib/index24.cjs.js +0 -1
- package/lib/index24.esm.js +0 -70
- package/lib/index26.cjs.js +0 -1
- package/lib/index26.esm.js +0 -68
- package/lib/index28.cjs.js +0 -1
- package/lib/index28.esm.js +0 -72
- package/lib/index29.cjs.js +0 -1
- package/lib/index30.cjs.js +0 -1
- package/lib/index32.cjs.js +0 -1
- package/lib/index33.cjs.js +0 -1
- package/lib/index34.cjs.js +0 -1
- package/lib/index36.cjs.js +0 -1
- package/lib/index36.esm.js +0 -100
- package/lib/index37.cjs.js +0 -1
- package/lib/index38.cjs.js +0 -1
- package/lib/index38.esm.js +0 -47
- package/lib/index39.cjs.js +0 -1
- package/lib/index4.cjs.js +0 -95
- package/lib/index40.cjs.js +0 -1
- package/lib/index5.cjs.js +0 -1
- package/lib/index6.cjs.js +0 -1
- package/lib/index7.cjs.js +0 -1
- package/lib/index8.cjs.js +0 -1
- package/lib/index9.cjs.js +0 -1
- /package/lib/{index9.esm.js → index10.es.js} +0 -0
- /package/lib/{index10.esm.js → index11.es.js} +0 -0
- /package/lib/{index11.esm.js → index12.es.js} +0 -0
- /package/lib/{index12.esm.js → index13.es.js} +0 -0
- /package/lib/{index13.esm.js → index14.es.js} +0 -0
- /package/lib/{index14.esm.js → index15.es.js} +0 -0
- /package/lib/{index15.esm.js → index16.es.js} +0 -0
- /package/lib/{index16.esm.js → index17.es.js} +0 -0
- /package/lib/{index18.esm.js → index19.es.js} +0 -0
- /package/lib/{index19.esm.js → index20.es.js} +0 -0
- /package/lib/{index32.esm.js → index29.es.js} +0 -0
- /package/lib/{index33.esm.js → index30.es.js} +0 -0
- /package/lib/{index34.esm.js → index31.es.js} +0 -0
- /package/lib/{index40.esm.js → index38.es.js} +0 -0
- /package/lib/{index4.esm.js → index5.es.js} +0 -0
- /package/lib/{index5.esm.js → index6.es.js} +0 -0
- /package/lib/{index6.esm.js → index7.es.js} +0 -0
- /package/lib/{index7.esm.js → index8.es.js} +0 -0
- /package/lib/{index8.esm.js → index9.es.js} +0 -0
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { __toESM as e } from "./index2.
|
|
2
|
-
/* empty css
|
|
3
|
-
import { utils as t, writeFileSync as n } from "./
|
|
4
|
-
import { downloadFile as r } from "./
|
|
5
|
-
import { choiceConfig as i, donwnGraphData as a, downloadData as o, getCyData as s, handleCalcPath as c, layoutCongig as l, linkAnalysis as
|
|
6
|
-
import { GraphContext as
|
|
7
|
-
import { fixNodesToEdges as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
1
|
+
import { __toESM as e } from "./index2.es.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import { utils as t, writeFileSync as n } from "./index5.es.js";
|
|
4
|
+
import { downloadFile as r } from "./index17.es.js";
|
|
5
|
+
import { choiceConfig as i, donwnGraphData as a, downloadData as o, getCyData as s, handleCalcPath as c, layoutCongig as l, linkAnalysis as ee, textLayout as te, textPositionConfig as u } from "./index18.es.js";
|
|
6
|
+
import { GraphContext as ne } from "./index19.es.js";
|
|
7
|
+
import { fixNodesToEdges as re, layout as ie } from "./index20.es.js";
|
|
8
|
+
import d from "./index22.es.js";
|
|
9
|
+
import f from "./index24.es.js";
|
|
10
|
+
import p from "./index26.es.js";
|
|
11
|
+
import { require_classnames as m } from "./index27.es.js";
|
|
12
|
+
import { forwardRef as h, useContext as g, useEffect as _, useImperativeHandle as ae, useRef as oe, useState as v } from "react";
|
|
13
|
+
import { AppstoreOutlined as se, BorderOuterOutlined as ce, ClearOutlined as le, LineChartOutlined as ue, LineHeightOutlined as y, MinusCircleOutlined as b, MinusSquareOutlined as x, PlusCircleOutlined as de, PlusSquareOutlined as fe, RobotOutlined as pe, SaveOutlined as me, SelectOutlined as he, TableOutlined as ge } from "@ant-design/icons";
|
|
14
|
+
import { Button as S, Drawer as _e, Dropdown as C, Flex as w, Form as T, Input as E, Modal as ve, Select as D, Tabs as O, message as k } from "antd";
|
|
15
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
16
16
|
//#region src/components/Graph/components/ActionBar/index.tsx
|
|
17
|
-
var
|
|
17
|
+
var N = /* @__PURE__ */ e(m(), 1), P = (e, t) => (n) => {
|
|
18
18
|
n.stopPropagation(), e?.(t || "");
|
|
19
|
-
}, F =
|
|
20
|
-
let { layoutType: D, setLayoutType:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} })),
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
let
|
|
27
|
-
let t =
|
|
28
|
-
if (!t || !
|
|
19
|
+
}, F = h(({ graphInfo: e, cyRef: m, initNodeScale: h, typeObj: S, relationObj: T }, E) => {
|
|
20
|
+
let { layoutType: D, setLayoutType: F } = g(ne), [I, xe] = v(""), [Se, L] = v(!1), [R, Ce] = v(h), [we, z] = v(!1), [Te, B] = v(!1), [V, Ee] = v(null), [De, H] = v(!1), [Oe, U] = v(!1), [ke, Ae] = v("node"), W = oe(null), [G, je] = v(!0), [K, Me] = v(/* @__PURE__ */ new Set()), [q, Ne] = v(/* @__PURE__ */ new Set());
|
|
21
|
+
ae(E, () => ({ onPathAnalysis: () => {
|
|
22
|
+
X();
|
|
23
|
+
} })), _(() => {
|
|
24
|
+
J(I);
|
|
25
|
+
}, [I]);
|
|
26
|
+
let J = async (e) => {
|
|
27
|
+
let t = m.current;
|
|
28
|
+
if (!t || !I) {
|
|
29
29
|
t?.nodes().removeClass("highlight"), t?.fit();
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
let n = t.nodes().filter((e) => {
|
|
33
33
|
let t = (e.data("name") || "").toLowerCase(), n = (e.data("role") || "").toLowerCase(), r = (e.data("dept") || "").toLowerCase(), i = String(e.data("id") || "").toLowerCase();
|
|
34
|
-
return t.includes(
|
|
34
|
+
return t.includes(I.toLowerCase()) || n.includes(I.toLowerCase()) || r.includes(I.toLowerCase()) || i.includes(I.toLowerCase());
|
|
35
35
|
});
|
|
36
36
|
t.nodes().removeClass("highlight"), n.addClass("highlight"), n.length === 1 ? (console.log("matchedNodes:::", n), t.animate({
|
|
37
37
|
center: { eles: n },
|
|
38
38
|
duration: 500
|
|
39
39
|
})) : alert("未找到对应节点");
|
|
40
|
-
},
|
|
41
|
-
let t =
|
|
40
|
+
}, Y = (e) => {
|
|
41
|
+
let t = m.current;
|
|
42
42
|
if (!t) return;
|
|
43
43
|
let n = t.zoom();
|
|
44
44
|
console.log(999, n);
|
|
@@ -52,21 +52,21 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
52
52
|
break;
|
|
53
53
|
}
|
|
54
54
|
t.zoom(r), t.center();
|
|
55
|
-
}, je = () => {
|
|
56
|
-
console.log("查询节点"), z(!0), B(!1), G.current.close();
|
|
57
|
-
}, Z = () => {
|
|
58
|
-
console.log("路径分析"), z(!1), B(!0), G.current.close();
|
|
59
|
-
}, Me = (t) => {
|
|
60
|
-
k(t);
|
|
61
|
-
let n = p.current;
|
|
62
|
-
n && (n.nodes().unlock(), f(p, t), t === "cose-bilkent" && e?.searchNodes?.length === 2 && ne(n, e.searchNodes[0], e.searchNodes[1]));
|
|
63
|
-
}, Ne = () => {
|
|
64
|
-
let e = p.current;
|
|
65
|
-
e && a(e);
|
|
66
55
|
}, Pe = () => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
56
|
+
console.log("查询节点"), z(!0), B(!1), W.current.close();
|
|
57
|
+
}, X = () => {
|
|
58
|
+
console.log("路径分析"), z(!1), B(!0), W.current.close();
|
|
59
|
+
}, Fe = (t) => {
|
|
60
|
+
F(t);
|
|
61
|
+
let n = m.current;
|
|
62
|
+
n && (n.nodes().unlock(), ie(m, t), t === "cose-bilkent" && e?.searchNodes?.length === 2 && re(n, e.searchNodes[0], e.searchNodes[1]));
|
|
63
|
+
}, Ie = () => {
|
|
64
|
+
let e = m.current;
|
|
65
|
+
e && a(e);
|
|
66
|
+
}, Le = () => {
|
|
67
|
+
let e = m.current;
|
|
68
|
+
e && (Ee(s(e)), H(!0));
|
|
69
|
+
}, Z = (e, t) => {
|
|
70
70
|
let n = e.current;
|
|
71
71
|
n && (t === "downloadPng" ? r(n.png({
|
|
72
72
|
scale: 2,
|
|
@@ -79,8 +79,8 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
79
79
|
full: !0,
|
|
80
80
|
quality: 1
|
|
81
81
|
}), `graph_${Date.now()}.jpg`));
|
|
82
|
-
},
|
|
83
|
-
let e =
|
|
82
|
+
}, Re = () => {
|
|
83
|
+
let e = m.current;
|
|
84
84
|
if (!e) return;
|
|
85
85
|
let { nodes: r = [], edges: i = [] } = s(e), a = r.map((e) => {
|
|
86
86
|
let t = e.data || {}, n = t.properties || {};
|
|
@@ -138,29 +138,29 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
138
138
|
], t.book_append_sheet(c, e, "关系");
|
|
139
139
|
}
|
|
140
140
|
n(c, `graph_${Date.now()}.xlsx`);
|
|
141
|
-
},
|
|
141
|
+
}, ze = (e, t) => {
|
|
142
142
|
switch (e.stopPropagation(), t) {
|
|
143
143
|
case "downloadJson":
|
|
144
|
-
|
|
144
|
+
Ie();
|
|
145
145
|
break;
|
|
146
146
|
case "previewJsonList":
|
|
147
|
-
|
|
147
|
+
Le();
|
|
148
148
|
break;
|
|
149
149
|
case "downloadExcel":
|
|
150
|
-
|
|
150
|
+
Re();
|
|
151
151
|
break;
|
|
152
152
|
case "previewDataList": break;
|
|
153
153
|
case "downloadJpg":
|
|
154
|
-
|
|
154
|
+
Z(m, t);
|
|
155
155
|
break;
|
|
156
156
|
case "downloadPng":
|
|
157
|
-
|
|
157
|
+
Z(m, t);
|
|
158
158
|
break;
|
|
159
159
|
}
|
|
160
|
-
},
|
|
161
|
-
z(!1), B(!1),
|
|
162
|
-
},
|
|
163
|
-
let t =
|
|
160
|
+
}, Be = () => {
|
|
161
|
+
z(!1), B(!1), W.current.open();
|
|
162
|
+
}, Ve = (e) => {
|
|
163
|
+
let t = m.current;
|
|
164
164
|
if (t) if (t.panningEnabled(!0), e === "all") t.nodes().addClass("selected"), t.nodes().select(), t.elements().select();
|
|
165
165
|
else if (e === "reverse") {
|
|
166
166
|
let e = t.elements().filter(":selected"), n = t.elements().not(":selected");
|
|
@@ -178,30 +178,30 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
178
178
|
}), t.on("boxselectend", () => {
|
|
179
179
|
console.log("框选结束"), t.zoomingEnabled(!0), t.panningEnabled(!0);
|
|
180
180
|
}));
|
|
181
|
-
},
|
|
182
|
-
let e =
|
|
183
|
-
if (console.log("isShow::::"),
|
|
181
|
+
}, Q = () => {
|
|
182
|
+
let e = m.current;
|
|
183
|
+
if (console.log("isShow::::"), Se) L(!1), e.nodes("[types=\"typed-literal\" ]").style("visibility", "visible"), e.edges().style("visibility", "visible");
|
|
184
184
|
else {
|
|
185
185
|
L(!0);
|
|
186
186
|
let t = e.nodes("[types=\"typed-literal\" ]");
|
|
187
187
|
t.style("visibility", "hidden"), t.connectedEdges().style("visibility", "hidden");
|
|
188
188
|
}
|
|
189
189
|
}, $ = (e) => {
|
|
190
|
-
let t =
|
|
190
|
+
let t = m.current;
|
|
191
191
|
if (!t) return;
|
|
192
192
|
let n = e === "out" ? Math.max(R * .8, .1) : Math.min(R * 1.2, 5);
|
|
193
|
-
|
|
193
|
+
Ce(n);
|
|
194
194
|
let r = t.nodes();
|
|
195
195
|
r.style("width", (e) => (e.data("baseWidth") || 80) * n), r.style("height", (e) => (e.data("baseHeight") || 80) * n);
|
|
196
|
-
},
|
|
197
|
-
|
|
198
|
-
},
|
|
199
|
-
let n =
|
|
196
|
+
}, He = (e) => {
|
|
197
|
+
xe(e.content), J(e.content);
|
|
198
|
+
}, Ue = (e = "刘强东", t = "1") => {
|
|
199
|
+
let n = m.current;
|
|
200
200
|
if (!n) return;
|
|
201
201
|
n.elements().removeClass("level-highlight level-selected level-grayed level-highlightedge");
|
|
202
202
|
let r = n.nodes().filter((t) => (t.data("name") || t.data("id") || "").toString().includes(e));
|
|
203
203
|
if (r.length === 0) {
|
|
204
|
-
|
|
204
|
+
k.warning(`未找到节点: ${e}`);
|
|
205
205
|
return;
|
|
206
206
|
}
|
|
207
207
|
let i = parseInt(t) || 1, a = n.collection(), o = [];
|
|
@@ -226,213 +226,213 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
226
226
|
return a.contains(t) && a.contains(n);
|
|
227
227
|
}).addClass("level-highlightedge");
|
|
228
228
|
let s = n.elements().filter(".level-selected, .level-highlight, .level-highlightedge");
|
|
229
|
-
n.elements().not(s).addClass("level-grayed"),
|
|
230
|
-
},
|
|
231
|
-
let t =
|
|
229
|
+
n.elements().not(s).addClass("level-grayed"), k.success(`已高亮 "${e}" 及其 ${i} 度关联节点和连线`);
|
|
230
|
+
}, We = (e) => {
|
|
231
|
+
let t = m.current;
|
|
232
232
|
if (!t) return;
|
|
233
|
-
let n = new Set(
|
|
234
|
-
n.has(e) ? (n.delete(e), t.nodes().filter((t) => t.data("type") === e).show()) : (n.add(e), t.nodes().filter((t) => t.data("type") === e).hide()),
|
|
235
|
-
},
|
|
236
|
-
let t =
|
|
233
|
+
let n = new Set(K);
|
|
234
|
+
n.has(e) ? (n.delete(e), t.nodes().filter((t) => t.data("type") === e).show()) : (n.add(e), t.nodes().filter((t) => t.data("type") === e).hide()), Me(n);
|
|
235
|
+
}, Ge = (e) => {
|
|
236
|
+
let t = m.current;
|
|
237
237
|
if (!t) return;
|
|
238
|
-
let n = new Set(
|
|
239
|
-
n.has(e) ? (n.delete(e), t.edges().filter((t) => t.data("name") === e).show()) : (n.add(e), t.edges().filter((t) => t.data("name") === e).hide()),
|
|
240
|
-
},
|
|
241
|
-
let e =
|
|
238
|
+
let n = new Set(q);
|
|
239
|
+
n.has(e) ? (n.delete(e), t.edges().filter((t) => t.data("name") === e).show()) : (n.add(e), t.edges().filter((t) => t.data("name") === e).hide()), Ne(n);
|
|
240
|
+
}, Ke = () => {
|
|
241
|
+
let e = m.current;
|
|
242
242
|
e.remove(e.elements());
|
|
243
|
-
},
|
|
244
|
-
|
|
243
|
+
}, qe = () => {
|
|
244
|
+
U(!0);
|
|
245
245
|
};
|
|
246
|
-
return /* @__PURE__ */ (
|
|
247
|
-
/* @__PURE__ */ (
|
|
246
|
+
return /* @__PURE__ */ M(A, { children: [
|
|
247
|
+
/* @__PURE__ */ j("div", {
|
|
248
248
|
className: "graph-bar",
|
|
249
|
-
children: /* @__PURE__ */ (
|
|
249
|
+
children: /* @__PURE__ */ M("div", {
|
|
250
250
|
className: "graph-bar-min",
|
|
251
251
|
children: [
|
|
252
|
-
/* @__PURE__ */ (
|
|
252
|
+
/* @__PURE__ */ M(w, {
|
|
253
253
|
wrap: !0,
|
|
254
254
|
align: "center",
|
|
255
255
|
justify: "center",
|
|
256
256
|
className: "hover:text-[#145afd] cursor",
|
|
257
|
-
onClick: () =>
|
|
258
|
-
children: [/* @__PURE__ */ (
|
|
257
|
+
onClick: () => je(!G),
|
|
258
|
+
children: [/* @__PURE__ */ j(se, {}), /* @__PURE__ */ j(w, {
|
|
259
259
|
className: "w-100% ",
|
|
260
260
|
justify: "center",
|
|
261
261
|
children: "查询统计"
|
|
262
262
|
})]
|
|
263
263
|
}),
|
|
264
|
-
/* @__PURE__ */ (
|
|
264
|
+
/* @__PURE__ */ j(C, {
|
|
265
265
|
menu: { items: l?.map((e) => ({
|
|
266
266
|
...e,
|
|
267
|
-
label: /* @__PURE__ */ (
|
|
268
|
-
className: (0,
|
|
269
|
-
onClick: P(
|
|
267
|
+
label: /* @__PURE__ */ j("div", {
|
|
268
|
+
className: (0, N.default)({ "text-[#145afd]": D === e.key }),
|
|
269
|
+
onClick: P(Fe, e.key),
|
|
270
270
|
children: e.label
|
|
271
271
|
})
|
|
272
272
|
})) },
|
|
273
|
-
children: /* @__PURE__ */ (
|
|
273
|
+
children: /* @__PURE__ */ M(w, {
|
|
274
274
|
wrap: !0,
|
|
275
275
|
align: "center",
|
|
276
276
|
justify: "center",
|
|
277
277
|
className: "hover:text-[#145afd] cursor",
|
|
278
|
-
children: [/* @__PURE__ */ (
|
|
278
|
+
children: [/* @__PURE__ */ j(ge, {}), /* @__PURE__ */ j(w, {
|
|
279
279
|
className: "w-100% ",
|
|
280
280
|
justify: "center",
|
|
281
281
|
children: "布局"
|
|
282
282
|
})]
|
|
283
283
|
})
|
|
284
284
|
}),
|
|
285
|
-
/* @__PURE__ */ (
|
|
285
|
+
/* @__PURE__ */ M(w, {
|
|
286
286
|
wrap: !0,
|
|
287
287
|
align: "center",
|
|
288
288
|
justify: "center",
|
|
289
289
|
className: "hover:text-[#145afd] cursor",
|
|
290
|
-
onClick: () =>
|
|
291
|
-
children: [/* @__PURE__ */ (
|
|
290
|
+
onClick: () => qe(),
|
|
291
|
+
children: [/* @__PURE__ */ j(pe, {}), /* @__PURE__ */ j(w, {
|
|
292
292
|
className: "w-100% ",
|
|
293
293
|
justify: "center",
|
|
294
294
|
children: "图显示设置"
|
|
295
295
|
})]
|
|
296
296
|
}),
|
|
297
|
-
/* @__PURE__ */ (
|
|
298
|
-
menu: { items:
|
|
297
|
+
/* @__PURE__ */ j(C, {
|
|
298
|
+
menu: { items: ee.map((e) => ({
|
|
299
299
|
...e,
|
|
300
|
-
label: /* @__PURE__ */ (
|
|
300
|
+
label: /* @__PURE__ */ j("div", {
|
|
301
301
|
onClick: (t) => {
|
|
302
302
|
switch (t.stopPropagation(), e.key) {
|
|
303
303
|
case "query":
|
|
304
|
-
|
|
304
|
+
Pe();
|
|
305
305
|
break;
|
|
306
306
|
case "link":
|
|
307
|
-
|
|
307
|
+
Be();
|
|
308
308
|
break;
|
|
309
309
|
case "path":
|
|
310
|
-
|
|
310
|
+
X();
|
|
311
311
|
break;
|
|
312
312
|
}
|
|
313
313
|
},
|
|
314
314
|
children: e.label
|
|
315
315
|
})
|
|
316
316
|
})) },
|
|
317
|
-
children: /* @__PURE__ */ (
|
|
317
|
+
children: /* @__PURE__ */ M(w, {
|
|
318
318
|
wrap: !0,
|
|
319
319
|
align: "center",
|
|
320
320
|
justify: "center",
|
|
321
321
|
className: "hover:text-[#145afd] cursor",
|
|
322
|
-
children: [/* @__PURE__ */ (
|
|
322
|
+
children: [/* @__PURE__ */ j(ue, {}), /* @__PURE__ */ j(w, {
|
|
323
323
|
className: "w-100% ",
|
|
324
324
|
justify: "center",
|
|
325
325
|
children: "分析"
|
|
326
326
|
})]
|
|
327
327
|
})
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */ (
|
|
329
|
+
/* @__PURE__ */ j(C, {
|
|
330
330
|
menu: { items: i?.map((e) => ({
|
|
331
331
|
...e,
|
|
332
|
-
label: /* @__PURE__ */ (
|
|
333
|
-
onClick: P(
|
|
332
|
+
label: /* @__PURE__ */ j("div", {
|
|
333
|
+
onClick: P(Ve, e.key),
|
|
334
334
|
children: e.label
|
|
335
335
|
})
|
|
336
336
|
})) },
|
|
337
|
-
children: /* @__PURE__ */ (
|
|
337
|
+
children: /* @__PURE__ */ M(w, {
|
|
338
338
|
wrap: !0,
|
|
339
339
|
align: "center",
|
|
340
340
|
justify: "center",
|
|
341
341
|
className: "hover:text-[#145afd] cursor",
|
|
342
|
-
children: [/* @__PURE__ */ (
|
|
342
|
+
children: [/* @__PURE__ */ j(he, {}), /* @__PURE__ */ j(w, {
|
|
343
343
|
className: "w-100% ",
|
|
344
344
|
justify: "center",
|
|
345
345
|
children: "选择"
|
|
346
346
|
})]
|
|
347
347
|
})
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */ (
|
|
349
|
+
/* @__PURE__ */ j(C, {
|
|
350
350
|
menu: { items: o?.map((e) => ({
|
|
351
351
|
...e,
|
|
352
|
-
label: /* @__PURE__ */ (
|
|
353
|
-
onClick: (t) =>
|
|
352
|
+
label: /* @__PURE__ */ j("div", {
|
|
353
|
+
onClick: (t) => ze(t, e.key),
|
|
354
354
|
children: e.label
|
|
355
355
|
})
|
|
356
356
|
})) },
|
|
357
|
-
children: /* @__PURE__ */ (
|
|
357
|
+
children: /* @__PURE__ */ M(w, {
|
|
358
358
|
wrap: !0,
|
|
359
359
|
align: "center",
|
|
360
360
|
justify: "center",
|
|
361
361
|
className: "hover:text-[#145afd] cursor",
|
|
362
|
-
children: [/* @__PURE__ */ (
|
|
362
|
+
children: [/* @__PURE__ */ j(me, {}), /* @__PURE__ */ j(w, {
|
|
363
363
|
className: "w-100% ",
|
|
364
364
|
justify: "center",
|
|
365
365
|
children: "下载数据"
|
|
366
366
|
})]
|
|
367
367
|
})
|
|
368
368
|
}),
|
|
369
|
-
/* @__PURE__ */ (
|
|
369
|
+
/* @__PURE__ */ M(w, {
|
|
370
370
|
wrap: !0,
|
|
371
371
|
align: "center",
|
|
372
372
|
justify: "center",
|
|
373
373
|
className: "hover:text-[#145afd] cursor",
|
|
374
|
-
onClick: () =>
|
|
375
|
-
children: [/* @__PURE__ */ (
|
|
374
|
+
onClick: () => Q(),
|
|
375
|
+
children: [/* @__PURE__ */ j(ce, {}), /* @__PURE__ */ j(w, {
|
|
376
376
|
className: "w-100% ",
|
|
377
377
|
justify: "center",
|
|
378
378
|
children: "隐藏属性"
|
|
379
379
|
})]
|
|
380
380
|
}),
|
|
381
|
-
/* @__PURE__ */ (
|
|
382
|
-
menu: { items:
|
|
381
|
+
/* @__PURE__ */ j(C, {
|
|
382
|
+
menu: { items: u?.map((e) => ({
|
|
383
383
|
...e,
|
|
384
|
-
label: /* @__PURE__ */ (
|
|
385
|
-
onClick: P(() =>
|
|
384
|
+
label: /* @__PURE__ */ j("div", {
|
|
385
|
+
onClick: P(() => te(m, e.key), e.key),
|
|
386
386
|
children: e.label
|
|
387
387
|
})
|
|
388
388
|
})) },
|
|
389
|
-
children: /* @__PURE__ */ (
|
|
389
|
+
children: /* @__PURE__ */ M(w, {
|
|
390
390
|
wrap: !0,
|
|
391
391
|
align: "center",
|
|
392
392
|
justify: "center",
|
|
393
393
|
className: "hover:text-[#145afd] cursor",
|
|
394
|
-
children: [/* @__PURE__ */ (
|
|
394
|
+
children: [/* @__PURE__ */ j(y, {}), /* @__PURE__ */ j(w, {
|
|
395
395
|
className: "w-100% ",
|
|
396
396
|
justify: "center",
|
|
397
397
|
children: "文字位置"
|
|
398
398
|
})]
|
|
399
399
|
})
|
|
400
400
|
}),
|
|
401
|
-
/* @__PURE__ */ (
|
|
401
|
+
/* @__PURE__ */ M(w, {
|
|
402
402
|
wrap: !0,
|
|
403
403
|
align: "center",
|
|
404
404
|
justify: "center",
|
|
405
405
|
className: "hover:text-[#145afd] cursor",
|
|
406
|
-
onClick: () =>
|
|
407
|
-
children: [/* @__PURE__ */ (
|
|
406
|
+
onClick: () => Ke(),
|
|
407
|
+
children: [/* @__PURE__ */ j(le, {}), /* @__PURE__ */ j(w, {
|
|
408
408
|
className: "w-100% ",
|
|
409
409
|
justify: "center",
|
|
410
410
|
children: "清空画布"
|
|
411
411
|
})]
|
|
412
412
|
}),
|
|
413
|
-
/* @__PURE__ */ (
|
|
413
|
+
/* @__PURE__ */ M(w, {
|
|
414
414
|
wrap: !0,
|
|
415
415
|
align: "center",
|
|
416
416
|
justify: "center",
|
|
417
417
|
className: "hover:text-[#145afd] cursor",
|
|
418
|
-
children: [/* @__PURE__ */ (
|
|
418
|
+
children: [/* @__PURE__ */ M(w, {
|
|
419
419
|
gap: "5px",
|
|
420
|
-
children: [/* @__PURE__ */ (
|
|
421
|
-
}), /* @__PURE__ */ (
|
|
420
|
+
children: [/* @__PURE__ */ j(de, { onClick: () => $("in") }), /* @__PURE__ */ j(b, { onClick: () => $("out") })]
|
|
421
|
+
}), /* @__PURE__ */ j(w, {
|
|
422
422
|
className: "w-100% ",
|
|
423
423
|
justify: "center",
|
|
424
424
|
children: "节点缩放"
|
|
425
425
|
})]
|
|
426
426
|
}),
|
|
427
|
-
/* @__PURE__ */ (
|
|
427
|
+
/* @__PURE__ */ M(w, {
|
|
428
428
|
wrap: !0,
|
|
429
429
|
align: "center",
|
|
430
430
|
justify: "center",
|
|
431
431
|
className: "hover:text-[#145afd] cursor",
|
|
432
|
-
children: [/* @__PURE__ */ (
|
|
432
|
+
children: [/* @__PURE__ */ M(w, {
|
|
433
433
|
gap: "5px",
|
|
434
|
-
children: [/* @__PURE__ */ (
|
|
435
|
-
}), /* @__PURE__ */ (
|
|
434
|
+
children: [/* @__PURE__ */ j(fe, { onClick: () => Y("in") }), /* @__PURE__ */ j(x, { onClick: () => Y("out") })]
|
|
435
|
+
}), /* @__PURE__ */ j(w, {
|
|
436
436
|
className: "w-100% ",
|
|
437
437
|
justify: "center",
|
|
438
438
|
children: "画布缩放"
|
|
@@ -441,27 +441,27 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
441
441
|
]
|
|
442
442
|
})
|
|
443
443
|
}),
|
|
444
|
-
/* @__PURE__ */ (
|
|
445
|
-
isVisible:
|
|
446
|
-
searchChange: (e) =>
|
|
444
|
+
/* @__PURE__ */ j(d, {
|
|
445
|
+
isVisible: we,
|
|
446
|
+
searchChange: (e) => He(e),
|
|
447
447
|
closeQuery: () => z(!1)
|
|
448
448
|
}),
|
|
449
|
-
/* @__PURE__ */ (
|
|
450
|
-
isVisible:
|
|
451
|
-
analysis: (e) => c(
|
|
449
|
+
/* @__PURE__ */ j(f, {
|
|
450
|
+
isVisible: Te,
|
|
451
|
+
analysis: (e) => c(m, { pathNodes: e }),
|
|
452
452
|
closePath: () => B(!1)
|
|
453
453
|
}),
|
|
454
|
-
/* @__PURE__ */ (
|
|
455
|
-
ref:
|
|
456
|
-
onLevelClick:
|
|
454
|
+
/* @__PURE__ */ j(p, {
|
|
455
|
+
ref: W,
|
|
456
|
+
onLevelClick: Ue
|
|
457
457
|
}),
|
|
458
|
-
/* @__PURE__ */ (
|
|
458
|
+
/* @__PURE__ */ j(ve, {
|
|
459
459
|
title: "JSON预览",
|
|
460
|
-
open:
|
|
461
|
-
onCancel: () =>
|
|
460
|
+
open: De,
|
|
461
|
+
onCancel: () => H(!1),
|
|
462
462
|
footer: null,
|
|
463
463
|
width: 800,
|
|
464
|
-
children: /* @__PURE__ */ (
|
|
464
|
+
children: /* @__PURE__ */ j("pre", {
|
|
465
465
|
style: {
|
|
466
466
|
maxHeight: "60vh",
|
|
467
467
|
overflow: "auto",
|
|
@@ -472,22 +472,22 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
472
472
|
children: V ? JSON.stringify(V, null, 2) : "暂无数据"
|
|
473
473
|
})
|
|
474
474
|
}),
|
|
475
|
-
/* @__PURE__ */ (
|
|
475
|
+
/* @__PURE__ */ j(_e, {
|
|
476
476
|
title: "图显示设置",
|
|
477
477
|
placement: "right",
|
|
478
|
-
open:
|
|
479
|
-
onClose: () =>
|
|
478
|
+
open: Oe,
|
|
479
|
+
onClose: () => U(!1),
|
|
480
480
|
mask: !1,
|
|
481
481
|
width: 350,
|
|
482
482
|
getContainer: !1,
|
|
483
|
-
children: /* @__PURE__ */ (
|
|
484
|
-
activeKey:
|
|
485
|
-
onChange:
|
|
483
|
+
children: /* @__PURE__ */ j(O, {
|
|
484
|
+
activeKey: ke,
|
|
485
|
+
onChange: Ae,
|
|
486
486
|
items: [{
|
|
487
487
|
label: "节点设置",
|
|
488
488
|
key: "node",
|
|
489
|
-
children: /* @__PURE__ */ (
|
|
490
|
-
let t =
|
|
489
|
+
children: /* @__PURE__ */ j(ye, { onSave: (e) => {
|
|
490
|
+
let t = m.current;
|
|
491
491
|
t && (t.nodes().forEach((t) => {
|
|
492
492
|
t.style({
|
|
493
493
|
width: e.nodeSize,
|
|
@@ -501,13 +501,13 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
501
501
|
"text-margin-y": e.textOffset,
|
|
502
502
|
label: e.showLabel === "show" ? t.data("name") || t.data("label") : ""
|
|
503
503
|
});
|
|
504
|
-
}),
|
|
504
|
+
}), k.success("节点配置保存成功"));
|
|
505
505
|
} })
|
|
506
506
|
}, {
|
|
507
507
|
label: "连线设置",
|
|
508
508
|
key: "edge",
|
|
509
|
-
children: /* @__PURE__ */ (
|
|
510
|
-
let t =
|
|
509
|
+
children: /* @__PURE__ */ j(be, { onSave: (e) => {
|
|
510
|
+
let t = m.current;
|
|
511
511
|
t && (t.edges().forEach((t) => {
|
|
512
512
|
t.style({
|
|
513
513
|
width: e.edgeWidth,
|
|
@@ -523,173 +523,173 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
523
523
|
"text-background-opacity": +!!e.labelBgColor,
|
|
524
524
|
"text-background-padding": "2px"
|
|
525
525
|
});
|
|
526
|
-
}),
|
|
526
|
+
}), k.success("连线配置保存成功"));
|
|
527
527
|
} })
|
|
528
528
|
}]
|
|
529
529
|
})
|
|
530
530
|
}),
|
|
531
|
-
/* @__PURE__ */ (
|
|
532
|
-
className: (0,
|
|
533
|
-
children: /* @__PURE__ */ (
|
|
531
|
+
/* @__PURE__ */ j("div", {
|
|
532
|
+
className: (0, N.default)("absolute right-0px z-1 bg-#fff p-10px rounded-10px shadow-[0_4px_20px_0px_rgba(12,95,218,0.33)] w-200px", { hidden: !G }),
|
|
533
|
+
children: /* @__PURE__ */ j(O, { items: [{
|
|
534
534
|
label: "实体",
|
|
535
535
|
key: "entity",
|
|
536
|
-
children: /* @__PURE__ */ (
|
|
537
|
-
/* @__PURE__ */ (
|
|
538
|
-
/* @__PURE__ */ (
|
|
536
|
+
children: /* @__PURE__ */ j(A, { children: Object.keys(S).length > 0 ? /* @__PURE__ */ M("div", { children: [
|
|
537
|
+
/* @__PURE__ */ M("p", { children: ["实体数量:", Object.values(S).reduce((e, t) => e + t.count, 0)] }),
|
|
538
|
+
/* @__PURE__ */ M("p", {
|
|
539
539
|
className: "my-4px",
|
|
540
|
-
children: ["实体类型:", Object.keys(
|
|
540
|
+
children: ["实体类型:", Object.keys(S).length]
|
|
541
541
|
}),
|
|
542
|
-
/* @__PURE__ */ (
|
|
542
|
+
/* @__PURE__ */ j(w, {
|
|
543
543
|
gap: "5px",
|
|
544
544
|
justify: "start",
|
|
545
545
|
className: "w-100%",
|
|
546
546
|
wrap: !0,
|
|
547
|
-
children: Object.keys(
|
|
547
|
+
children: Object.keys(S).map((e) => /* @__PURE__ */ M(w, {
|
|
548
548
|
gap: "4px",
|
|
549
549
|
justify: "start",
|
|
550
|
-
className: `w-100% cursor ${
|
|
551
|
-
onClick: () =>
|
|
550
|
+
className: `w-100% cursor ${K.has(e) ? "opacity-30" : ""}`,
|
|
551
|
+
onClick: () => We(e),
|
|
552
552
|
children: [
|
|
553
|
-
/* @__PURE__ */ (
|
|
553
|
+
/* @__PURE__ */ j("img", {
|
|
554
554
|
className: "w-20px rounded-50%",
|
|
555
|
-
src:
|
|
555
|
+
src: S[e].img,
|
|
556
556
|
alt: ""
|
|
557
557
|
}),
|
|
558
558
|
e,
|
|
559
559
|
":",
|
|
560
|
-
|
|
560
|
+
S[e].count
|
|
561
561
|
]
|
|
562
562
|
}, e))
|
|
563
563
|
})
|
|
564
|
-
] }) : /* @__PURE__ */ (
|
|
564
|
+
] }) : /* @__PURE__ */ j("span", {
|
|
565
565
|
className: "text-[#666]",
|
|
566
566
|
children: "暂无实体统计!"
|
|
567
567
|
}) })
|
|
568
568
|
}, {
|
|
569
569
|
label: "关系",
|
|
570
570
|
key: "relation",
|
|
571
|
-
children: /* @__PURE__ */ (
|
|
572
|
-
/* @__PURE__ */ (
|
|
573
|
-
/* @__PURE__ */ (
|
|
571
|
+
children: /* @__PURE__ */ j(A, { children: Object.keys(T)?.length > 0 ? /* @__PURE__ */ M("div", { children: [
|
|
572
|
+
/* @__PURE__ */ M("div", { children: ["关系数量:", Object.keys(T)?.length] }),
|
|
573
|
+
/* @__PURE__ */ M("div", {
|
|
574
574
|
className: "my-4px",
|
|
575
|
-
children: ["关系类型:", Object.values(
|
|
575
|
+
children: ["关系类型:", Object.values(T)?.reduce((e, t) => e + t, 0)]
|
|
576
576
|
}),
|
|
577
|
-
/* @__PURE__ */ (
|
|
577
|
+
/* @__PURE__ */ j(w, {
|
|
578
578
|
gap: "5px",
|
|
579
579
|
justify: "start",
|
|
580
580
|
className: "w-100%",
|
|
581
581
|
wrap: !0,
|
|
582
|
-
children: Object.keys(
|
|
582
|
+
children: Object.keys(T).map((e) => /* @__PURE__ */ M(w, {
|
|
583
583
|
gap: "4px",
|
|
584
|
-
className: `w-100% cursor ${
|
|
585
|
-
onClick: () =>
|
|
584
|
+
className: `w-100% cursor ${q.has(e) ? "opacity-30" : ""}`,
|
|
585
|
+
onClick: () => Ge(e),
|
|
586
586
|
children: [
|
|
587
587
|
e,
|
|
588
588
|
":",
|
|
589
|
-
|
|
589
|
+
T[e]
|
|
590
590
|
]
|
|
591
591
|
}, e))
|
|
592
592
|
})
|
|
593
|
-
] }) : /* @__PURE__ */ (
|
|
593
|
+
] }) : /* @__PURE__ */ j("span", {
|
|
594
594
|
className: "text-[#666]",
|
|
595
595
|
children: "暂无关系统计!"
|
|
596
596
|
}) })
|
|
597
597
|
}] })
|
|
598
598
|
})
|
|
599
599
|
] });
|
|
600
|
-
}),
|
|
601
|
-
let [t] =
|
|
602
|
-
return /* @__PURE__ */ (
|
|
600
|
+
}), ye = ({ onSave: e }) => {
|
|
601
|
+
let [t] = T.useForm();
|
|
602
|
+
return /* @__PURE__ */ M(T, {
|
|
603
603
|
form: t,
|
|
604
604
|
layout: "vertical",
|
|
605
605
|
onFinish: e,
|
|
606
606
|
children: [
|
|
607
|
-
/* @__PURE__ */ (
|
|
607
|
+
/* @__PURE__ */ j(T.Item, {
|
|
608
608
|
label: "节点大小",
|
|
609
609
|
name: "nodeSize",
|
|
610
610
|
initialValue: 80,
|
|
611
|
-
children: /* @__PURE__ */ (
|
|
611
|
+
children: /* @__PURE__ */ j(E, {
|
|
612
612
|
type: "number",
|
|
613
613
|
placeholder: "请输入节点大小"
|
|
614
614
|
})
|
|
615
615
|
}),
|
|
616
|
-
/* @__PURE__ */ (
|
|
616
|
+
/* @__PURE__ */ j(T.Item, {
|
|
617
617
|
label: "显示标签",
|
|
618
618
|
name: "showLabel",
|
|
619
619
|
initialValue: "show",
|
|
620
|
-
children: /* @__PURE__ */ (
|
|
620
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
621
621
|
value: "show",
|
|
622
622
|
children: "显示"
|
|
623
|
-
}), /* @__PURE__ */ (
|
|
623
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
624
624
|
value: "hide",
|
|
625
625
|
children: "隐藏"
|
|
626
626
|
})] })
|
|
627
627
|
}),
|
|
628
|
-
/* @__PURE__ */ (
|
|
628
|
+
/* @__PURE__ */ j(T.Item, {
|
|
629
629
|
label: "字体位置",
|
|
630
630
|
name: "textPosition",
|
|
631
631
|
initialValue: "bottom",
|
|
632
|
-
children: /* @__PURE__ */ (
|
|
632
|
+
children: /* @__PURE__ */ j(D, { children: u.map((e) => /* @__PURE__ */ j(D.Option, {
|
|
633
633
|
value: e.key,
|
|
634
634
|
children: e.label
|
|
635
635
|
}, e.item)) })
|
|
636
636
|
}),
|
|
637
|
-
/* @__PURE__ */ (
|
|
637
|
+
/* @__PURE__ */ j(T.Item, {
|
|
638
638
|
label: "字体偏移",
|
|
639
639
|
name: "textOffset",
|
|
640
640
|
initialValue: 5,
|
|
641
|
-
children: /* @__PURE__ */ (
|
|
641
|
+
children: /* @__PURE__ */ j(E, {
|
|
642
642
|
type: "number",
|
|
643
643
|
placeholder: "请输入字体偏移量"
|
|
644
644
|
})
|
|
645
645
|
}),
|
|
646
|
-
/* @__PURE__ */ (
|
|
646
|
+
/* @__PURE__ */ j(T.Item, {
|
|
647
647
|
label: "字体颜色",
|
|
648
648
|
name: "fontColor",
|
|
649
649
|
initialValue: "rgb(50,50,50)",
|
|
650
|
-
children: /* @__PURE__ */ (
|
|
650
|
+
children: /* @__PURE__ */ j(E, { placeholder: "请输入字体颜色" })
|
|
651
651
|
}),
|
|
652
|
-
/* @__PURE__ */ (
|
|
652
|
+
/* @__PURE__ */ j(T.Item, {
|
|
653
653
|
label: "字体大小",
|
|
654
654
|
name: "fontSize",
|
|
655
655
|
initialValue: 18,
|
|
656
|
-
children: /* @__PURE__ */ (
|
|
656
|
+
children: /* @__PURE__ */ j(E, {
|
|
657
657
|
type: "number",
|
|
658
658
|
placeholder: "请输入字体大小"
|
|
659
659
|
})
|
|
660
660
|
}),
|
|
661
|
-
/* @__PURE__ */ (
|
|
661
|
+
/* @__PURE__ */ j(T.Item, {
|
|
662
662
|
label: "字体粗细",
|
|
663
663
|
name: "fontWeight",
|
|
664
664
|
initialValue: "normal",
|
|
665
|
-
children: /* @__PURE__ */ (
|
|
666
|
-
/* @__PURE__ */ (
|
|
665
|
+
children: /* @__PURE__ */ M(D, { children: [
|
|
666
|
+
/* @__PURE__ */ j(D.Option, {
|
|
667
667
|
value: "normal",
|
|
668
668
|
children: "常规"
|
|
669
669
|
}),
|
|
670
|
-
/* @__PURE__ */ (
|
|
670
|
+
/* @__PURE__ */ j(D.Option, {
|
|
671
671
|
value: "bold",
|
|
672
672
|
children: "粗体"
|
|
673
673
|
}),
|
|
674
|
-
/* @__PURE__ */ (
|
|
674
|
+
/* @__PURE__ */ j(D.Option, {
|
|
675
675
|
value: "lighter",
|
|
676
676
|
children: "细体"
|
|
677
677
|
})
|
|
678
678
|
] })
|
|
679
679
|
}),
|
|
680
|
-
/* @__PURE__ */ (
|
|
680
|
+
/* @__PURE__ */ j(T.Item, {
|
|
681
681
|
label: "字体样式",
|
|
682
682
|
name: "fontStyle",
|
|
683
683
|
initialValue: "normal",
|
|
684
|
-
children: /* @__PURE__ */ (
|
|
684
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
685
685
|
value: "normal",
|
|
686
686
|
children: "默认"
|
|
687
|
-
}), /* @__PURE__ */ (
|
|
687
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
688
688
|
value: "italic",
|
|
689
689
|
children: "斜体"
|
|
690
690
|
})] })
|
|
691
691
|
}),
|
|
692
|
-
/* @__PURE__ */ (
|
|
692
|
+
/* @__PURE__ */ j(T.Item, { children: /* @__PURE__ */ j(S, {
|
|
693
693
|
type: "primary",
|
|
694
694
|
htmlType: "submit",
|
|
695
695
|
block: !0,
|
|
@@ -697,125 +697,125 @@ var M = /* @__PURE__ */ e(_(), 1), N = p(), P = (e, t) => (n) => {
|
|
|
697
697
|
}) })
|
|
698
698
|
]
|
|
699
699
|
});
|
|
700
|
-
},
|
|
701
|
-
let [t] =
|
|
702
|
-
return /* @__PURE__ */ (
|
|
700
|
+
}, be = ({ onSave: e }) => {
|
|
701
|
+
let [t] = T.useForm(), [n, r] = v("default");
|
|
702
|
+
return /* @__PURE__ */ M(T, {
|
|
703
703
|
form: t,
|
|
704
704
|
layout: "vertical",
|
|
705
705
|
onFinish: e,
|
|
706
706
|
children: [
|
|
707
|
-
/* @__PURE__ */ (
|
|
707
|
+
/* @__PURE__ */ j(T.Item, {
|
|
708
708
|
label: "类型",
|
|
709
709
|
name: "edgeType",
|
|
710
710
|
initialValue: "straight",
|
|
711
|
-
children: /* @__PURE__ */ (
|
|
711
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
712
712
|
value: "straight",
|
|
713
713
|
children: "直线"
|
|
714
|
-
}), /* @__PURE__ */ (
|
|
714
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
715
715
|
value: "curve",
|
|
716
716
|
children: "曲线"
|
|
717
717
|
})] })
|
|
718
718
|
}),
|
|
719
|
-
/* @__PURE__ */ (
|
|
719
|
+
/* @__PURE__ */ j(T.Item, {
|
|
720
720
|
label: "连线宽度",
|
|
721
721
|
name: "edgeWidth",
|
|
722
722
|
initialValue: 2,
|
|
723
|
-
children: /* @__PURE__ */ (
|
|
723
|
+
children: /* @__PURE__ */ j(E, {
|
|
724
724
|
type: "number",
|
|
725
725
|
placeholder: "请输入连线宽度"
|
|
726
726
|
})
|
|
727
727
|
}),
|
|
728
|
-
/* @__PURE__ */ (
|
|
728
|
+
/* @__PURE__ */ j(T.Item, {
|
|
729
729
|
label: "连线箭头",
|
|
730
730
|
name: "showArrow",
|
|
731
731
|
initialValue: "show",
|
|
732
|
-
children: /* @__PURE__ */ (
|
|
732
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
733
733
|
value: "show",
|
|
734
734
|
children: "显示"
|
|
735
|
-
}), /* @__PURE__ */ (
|
|
735
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
736
736
|
value: "hide",
|
|
737
737
|
children: "隐藏"
|
|
738
738
|
})] })
|
|
739
739
|
}),
|
|
740
|
-
/* @__PURE__ */ (
|
|
740
|
+
/* @__PURE__ */ j(T.Item, {
|
|
741
741
|
label: "连线颜色",
|
|
742
742
|
name: "edgeColorType",
|
|
743
743
|
initialValue: "default",
|
|
744
|
-
children: /* @__PURE__ */ (
|
|
744
|
+
children: /* @__PURE__ */ M(D, {
|
|
745
745
|
onChange: r,
|
|
746
|
-
children: [/* @__PURE__ */ (
|
|
746
|
+
children: [/* @__PURE__ */ j(D.Option, {
|
|
747
747
|
value: "default",
|
|
748
748
|
children: "默认"
|
|
749
|
-
}), /* @__PURE__ */ (
|
|
749
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
750
750
|
value: "custom",
|
|
751
751
|
children: "自定义色"
|
|
752
752
|
})]
|
|
753
753
|
})
|
|
754
754
|
}),
|
|
755
|
-
n === "custom" && /* @__PURE__ */ (
|
|
755
|
+
n === "custom" && /* @__PURE__ */ j(T.Item, {
|
|
756
756
|
label: "自定义颜色",
|
|
757
757
|
name: "customColor",
|
|
758
758
|
initialValue: "rgb(20,20,20)",
|
|
759
|
-
children: /* @__PURE__ */ (
|
|
759
|
+
children: /* @__PURE__ */ j(E, { placeholder: "请输入自定义颜色" })
|
|
760
760
|
}),
|
|
761
|
-
/* @__PURE__ */ (
|
|
761
|
+
/* @__PURE__ */ j(T.Item, {
|
|
762
762
|
label: "显示标签",
|
|
763
763
|
name: "showLabel",
|
|
764
764
|
initialValue: "show",
|
|
765
|
-
children: /* @__PURE__ */ (
|
|
765
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
766
766
|
value: "show",
|
|
767
767
|
children: "显示"
|
|
768
|
-
}), /* @__PURE__ */ (
|
|
768
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
769
769
|
value: "hide",
|
|
770
770
|
children: "隐藏"
|
|
771
771
|
})] })
|
|
772
772
|
}),
|
|
773
|
-
/* @__PURE__ */ (
|
|
773
|
+
/* @__PURE__ */ j(T.Item, {
|
|
774
774
|
label: "字体大小",
|
|
775
775
|
name: "fontSize",
|
|
776
776
|
initialValue: 14,
|
|
777
|
-
children: /* @__PURE__ */ (
|
|
777
|
+
children: /* @__PURE__ */ j(E, {
|
|
778
778
|
type: "number",
|
|
779
779
|
placeholder: "请输入字体大小"
|
|
780
780
|
})
|
|
781
781
|
}),
|
|
782
|
-
/* @__PURE__ */ (
|
|
782
|
+
/* @__PURE__ */ j(T.Item, {
|
|
783
783
|
label: "字体粗细",
|
|
784
784
|
name: "fontWeight",
|
|
785
785
|
initialValue: "normal",
|
|
786
|
-
children: /* @__PURE__ */ (
|
|
786
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
787
787
|
value: "normal",
|
|
788
788
|
children: "常规"
|
|
789
|
-
}), /* @__PURE__ */ (
|
|
789
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
790
790
|
value: "bold",
|
|
791
791
|
children: "粗体"
|
|
792
792
|
})] })
|
|
793
793
|
}),
|
|
794
|
-
/* @__PURE__ */ (
|
|
794
|
+
/* @__PURE__ */ j(T.Item, {
|
|
795
795
|
label: "字体样式",
|
|
796
796
|
name: "fontStyle",
|
|
797
797
|
initialValue: "normal",
|
|
798
|
-
children: /* @__PURE__ */ (
|
|
798
|
+
children: /* @__PURE__ */ M(D, { children: [/* @__PURE__ */ j(D.Option, {
|
|
799
799
|
value: "normal",
|
|
800
800
|
children: "默认"
|
|
801
|
-
}), /* @__PURE__ */ (
|
|
801
|
+
}), /* @__PURE__ */ j(D.Option, {
|
|
802
802
|
value: "italic",
|
|
803
803
|
children: "斜体"
|
|
804
804
|
})] })
|
|
805
805
|
}),
|
|
806
|
-
/* @__PURE__ */ (
|
|
806
|
+
/* @__PURE__ */ j(T.Item, {
|
|
807
807
|
label: "字体颜色",
|
|
808
808
|
name: "fontColor",
|
|
809
809
|
initialValue: "rgb(50,50,50)",
|
|
810
|
-
children: /* @__PURE__ */ (
|
|
810
|
+
children: /* @__PURE__ */ j(E, { placeholder: "请输入字体颜色" })
|
|
811
811
|
}),
|
|
812
|
-
/* @__PURE__ */ (
|
|
812
|
+
/* @__PURE__ */ j(T.Item, {
|
|
813
813
|
label: "标签背色",
|
|
814
814
|
name: "labelBgColor",
|
|
815
815
|
initialValue: "",
|
|
816
|
-
children: /* @__PURE__ */ (
|
|
816
|
+
children: /* @__PURE__ */ j(E, { placeholder: "请选择颜色" })
|
|
817
817
|
}),
|
|
818
|
-
/* @__PURE__ */ (
|
|
818
|
+
/* @__PURE__ */ j(T.Item, { children: /* @__PURE__ */ j(S, {
|
|
819
819
|
type: "primary",
|
|
820
820
|
htmlType: "submit",
|
|
821
821
|
block: !0,
|