react-kggraph 0.0.22 → 0.0.23
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.es10.js +20 -19
- package/lib/index.es14.js +39 -41
- package/lib/index.es16.js +19 -18
- package/lib/index.es22.js +2 -2
- package/lib/index.es3.js +80 -79
- package/lib/index.es35.js +64 -4
- package/lib/index.es36.js +4 -2
- package/lib/index.es37.js +4 -0
- package/lib/index.es4.js +1 -1
- package/lib/index.es41.js +21 -0
- package/lib/index.es42.js +43 -0
- package/lib/index.es43.js +42 -0
- package/lib/index.es44.js +91 -0
- package/lib/index.es45.js +58 -0
- package/lib/index.es46.js +33 -0
- package/lib/index.es48.js +72 -0
- package/lib/index.es7.js +125 -125
- package/lib/src/components/Graph/components/KnowledgeCard/components/AudioSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/DocumentSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/ImageSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/ListCard.d.ts +14 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/PropertySection.d.ts +11 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/RelationSection.d.ts +13 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/SourceCard.d.ts +6 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/VideoSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/data.d.ts +84 -0
- package/lib/src/components/Graph/utils/edge_node_styles.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/index.es7.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as f, Fragment as $, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import Z, { forwardRef as
|
|
2
|
+
import Z, { forwardRef as Ue, useContext as Xe, useState as y, useRef as Ye, useImperativeHandle as Be, useEffect as Re } from "react";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { Dropdown as
|
|
5
|
-
import { utils as E, writeFile as
|
|
6
|
-
import { textPositionConfig as
|
|
7
|
-
import { GraphContext as
|
|
8
|
-
import { layout as
|
|
9
|
-
import { defaultColors as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
4
|
+
import { Dropdown as et, Flex as x, Modal as tt, Drawer as ot, Tabs as ie, Form as u, Input as I, Select as m, ColorPicker as A, Button as he, message as z } from "antd";
|
|
5
|
+
import { utils as E, writeFile as lt } from "./index.es18.js";
|
|
6
|
+
import { textPositionConfig as ge, textLayout as nt, downloadData as st, choiceConfig as at, linkAnalysis as rt, layoutCongig as it, handleCalcPath as ct, getCyData as ce, donwnGraphData as dt } from "./index.es8.js";
|
|
7
|
+
import { GraphContext as ht } from "./index.es15.js";
|
|
8
|
+
import { layout as gt, fixNodesToEdges as mt } from "./index.es9.js";
|
|
9
|
+
import { defaultColors as T, nodeSize as K } from "./index.es10.js";
|
|
10
|
+
import ut from "./index.es19.js";
|
|
11
|
+
import pt from "./index.es20.js";
|
|
12
|
+
import ft from "./index.es21.js";
|
|
13
13
|
import j from "./index.es22.js";
|
|
14
|
-
import { downloadFile as
|
|
15
|
-
import { actionList as
|
|
14
|
+
import { downloadFile as de } from "./index.es12.js";
|
|
15
|
+
import { actionList as bt } from "./index.es4.js";
|
|
16
16
|
const q = (b, r) => (S) => {
|
|
17
17
|
S.stopPropagation(), b == null || b(r || "");
|
|
18
|
-
},
|
|
18
|
+
}, wt = (b) => {
|
|
19
19
|
if (typeof b == "string")
|
|
20
20
|
switch (b) {
|
|
21
21
|
case "top":
|
|
@@ -37,25 +37,25 @@ const q = (b, r) => (S) => {
|
|
|
37
37
|
return { bottom: 20, right: 20 };
|
|
38
38
|
}
|
|
39
39
|
return b;
|
|
40
|
-
},
|
|
40
|
+
}, Ft = Ue(({
|
|
41
41
|
graphInfo: b,
|
|
42
42
|
cyRef: r,
|
|
43
43
|
initNodeScale: S,
|
|
44
44
|
typeObj: v,
|
|
45
45
|
relationObj: D,
|
|
46
|
-
colors:
|
|
46
|
+
colors: me,
|
|
47
47
|
actionBar: L
|
|
48
|
-
},
|
|
49
|
-
var
|
|
50
|
-
const F = (L == null ? void 0 : L.position) || "top-left",
|
|
51
|
-
|
|
48
|
+
}, ue) => {
|
|
49
|
+
var se, ae, re;
|
|
50
|
+
const F = (L == null ? void 0 : L.position) || "top-left", M = (L == null ? void 0 : L.actionList) ?? bt, H = { ...T, ...me }, { layoutType: pe, setLayoutType: fe } = Xe(ht), [k, be] = y(""), [we, Q] = y(!1), [G, ye] = y(S), [Ce, V] = y(!1), [ve, P] = y(!1), [U, xe] = y(null), [Se, X] = y(!1), [Y, B] = y(!1), [Ne, Le] = y("node"), O = Ye(null), [R, ke] = y(!0), [ee, De] = y(/* @__PURE__ */ new Set()), [te, Ee] = y(/* @__PURE__ */ new Set());
|
|
51
|
+
Be(ue, () => ({
|
|
52
52
|
onPathAnalysis: () => {
|
|
53
|
-
|
|
53
|
+
le();
|
|
54
54
|
}
|
|
55
|
-
})),
|
|
56
|
-
|
|
55
|
+
})), Re(() => {
|
|
56
|
+
oe();
|
|
57
57
|
}, [k]);
|
|
58
|
-
const
|
|
58
|
+
const oe = async (e) => {
|
|
59
59
|
const t = r.current;
|
|
60
60
|
if (!t || !k) {
|
|
61
61
|
t == null || t.nodes().removeClass("highlight"), t == null || t.fit();
|
|
@@ -71,7 +71,7 @@ const q = (b, r) => (S) => {
|
|
|
71
71
|
},
|
|
72
72
|
duration: 500
|
|
73
73
|
})) : alert("未找到对应节点");
|
|
74
|
-
},
|
|
74
|
+
}, Ie = (e) => {
|
|
75
75
|
const t = r.current;
|
|
76
76
|
if (!t) return;
|
|
77
77
|
const l = t.zoom();
|
|
@@ -86,42 +86,42 @@ const q = (b, r) => (S) => {
|
|
|
86
86
|
break;
|
|
87
87
|
}
|
|
88
88
|
t.zoom(n), t.center();
|
|
89
|
-
},
|
|
89
|
+
}, Ve = () => {
|
|
90
90
|
console.log("查询节点"), V(!0), P(!1), O.current.close();
|
|
91
|
-
},
|
|
91
|
+
}, le = () => {
|
|
92
92
|
console.log("路径分析"), V(!1), P(!0), O.current.close();
|
|
93
|
-
},
|
|
93
|
+
}, Pe = (e) => {
|
|
94
94
|
var l;
|
|
95
|
-
|
|
95
|
+
fe(e);
|
|
96
96
|
const t = r.current;
|
|
97
|
-
t && (t.nodes().unlock(),
|
|
97
|
+
t && (t.nodes().unlock(), gt(r, e), e === "cose-bilkent" && ((l = b == null ? void 0 : b.searchNodes) == null ? void 0 : l.length) === 2 && mt(
|
|
98
98
|
t,
|
|
99
99
|
b.searchNodes[0],
|
|
100
100
|
b.searchNodes[1]
|
|
101
101
|
));
|
|
102
|
-
}, Pe = () => {
|
|
103
|
-
const e = r.current;
|
|
104
|
-
e && ct(e);
|
|
105
102
|
}, Oe = () => {
|
|
103
|
+
const e = r.current;
|
|
104
|
+
e && dt(e);
|
|
105
|
+
}, ze = () => {
|
|
106
106
|
const e = r.current;
|
|
107
107
|
if (!e) return;
|
|
108
|
-
const t =
|
|
109
|
-
|
|
110
|
-
},
|
|
108
|
+
const t = ce(e);
|
|
109
|
+
xe(t), X(!0);
|
|
110
|
+
}, ne = (e, t) => {
|
|
111
111
|
const l = e.current;
|
|
112
112
|
if (!l) return;
|
|
113
113
|
const n = 2;
|
|
114
114
|
if (t === "downloadPng") {
|
|
115
115
|
const c = l.png({ scale: n, bg: "transparent", full: !0, quality: 1 });
|
|
116
|
-
|
|
116
|
+
de(c, `graph_${Date.now()}.png`);
|
|
117
117
|
} else if (t === "downloadJpg") {
|
|
118
118
|
const c = l.jpg({ scale: n, bg: "#ffffff", full: !0, quality: 1 });
|
|
119
|
-
|
|
119
|
+
de(c, `graph_${Date.now()}.jpg`);
|
|
120
120
|
}
|
|
121
121
|
}, Te = () => {
|
|
122
122
|
const e = r.current;
|
|
123
123
|
if (!e) return;
|
|
124
|
-
const t =
|
|
124
|
+
const t = ce(e), { nodes: l = [], edges: n = [] } = t, c = l.map((g) => {
|
|
125
125
|
var h, a;
|
|
126
126
|
const i = g.data || {}, C = i.properties || {};
|
|
127
127
|
return {
|
|
@@ -196,14 +196,14 @@ const q = (b, r) => (S) => {
|
|
|
196
196
|
// 关系ID
|
|
197
197
|
], E.book_append_sheet(p, g, "关系");
|
|
198
198
|
}
|
|
199
|
-
|
|
200
|
-
},
|
|
199
|
+
lt(p, `graph_${Date.now()}.xlsx`);
|
|
200
|
+
}, je = (e, t) => {
|
|
201
201
|
switch (e.stopPropagation(), t) {
|
|
202
202
|
case "downloadJson":
|
|
203
|
-
|
|
203
|
+
Oe();
|
|
204
204
|
break;
|
|
205
205
|
case "previewJsonList":
|
|
206
|
-
|
|
206
|
+
ze();
|
|
207
207
|
break;
|
|
208
208
|
case "downloadExcel":
|
|
209
209
|
Te();
|
|
@@ -211,15 +211,15 @@ const q = (b, r) => (S) => {
|
|
|
211
211
|
case "previewDataList":
|
|
212
212
|
break;
|
|
213
213
|
case "downloadJpg":
|
|
214
|
-
|
|
214
|
+
ne(r, t);
|
|
215
215
|
break;
|
|
216
216
|
case "downloadPng":
|
|
217
|
-
|
|
217
|
+
ne(r, t);
|
|
218
218
|
break;
|
|
219
219
|
}
|
|
220
|
-
},
|
|
220
|
+
}, Ae = () => {
|
|
221
221
|
V(!1), P(!1), O.current.open();
|
|
222
|
-
},
|
|
222
|
+
}, Fe = (e) => {
|
|
223
223
|
const t = r.current;
|
|
224
224
|
if (t)
|
|
225
225
|
if (t.panningEnabled(!0), e === "all")
|
|
@@ -240,31 +240,31 @@ const q = (b, r) => (S) => {
|
|
|
240
240
|
}), t.on("boxselectend", () => {
|
|
241
241
|
console.log("框选结束"), t.zoomingEnabled(!0), t.panningEnabled(!0);
|
|
242
242
|
}));
|
|
243
|
-
},
|
|
243
|
+
}, He = () => {
|
|
244
244
|
const e = r.current;
|
|
245
|
-
if (console.log("isShow::::"),
|
|
246
|
-
|
|
245
|
+
if (console.log("isShow::::"), we)
|
|
246
|
+
Q(!1), e.nodes('[types="typed-literal" ]').style("visibility", "visible"), e.edges().style("visibility", "visible");
|
|
247
247
|
else {
|
|
248
|
-
|
|
248
|
+
Q(!0);
|
|
249
249
|
const t = e.nodes('[types="typed-literal" ]');
|
|
250
250
|
t.style("visibility", "hidden"), t.connectedEdges().style("visibility", "hidden");
|
|
251
251
|
}
|
|
252
|
-
},
|
|
252
|
+
}, _e = (e) => {
|
|
253
253
|
const t = r.current;
|
|
254
254
|
if (!t) return;
|
|
255
|
-
const l = e === "out" ? Math.max(
|
|
256
|
-
|
|
255
|
+
const l = e === "out" ? Math.max(G * 0.8, 0.1) : Math.min(G * 1.2, 5);
|
|
256
|
+
ye(l);
|
|
257
257
|
const n = t.nodes();
|
|
258
|
-
n.style("width", (c) => (c.data("baseWidth") ||
|
|
259
|
-
},
|
|
260
|
-
|
|
261
|
-
},
|
|
258
|
+
n.style("width", (c) => (c.data("baseWidth") || K) * l), n.style("height", (c) => (c.data("baseHeight") || K) * l);
|
|
259
|
+
}, We = (e) => {
|
|
260
|
+
be(e.content), oe(e.content);
|
|
261
|
+
}, Je = (e = "刘强东", t = "1") => {
|
|
262
262
|
const l = r.current;
|
|
263
263
|
if (!l) return;
|
|
264
264
|
l.elements().removeClass("level-highlight level-selected level-grayed level-highlightedge");
|
|
265
265
|
const n = l.nodes().filter((h) => (h.data("name") || h.data("id") || "").toString().includes(e));
|
|
266
266
|
if (n.length === 0) {
|
|
267
|
-
|
|
267
|
+
z.warning(`未找到节点: ${e}`);
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
270
|
const c = parseInt(t) || 1, d = l.collection(), p = [];
|
|
@@ -290,23 +290,23 @@ const q = (b, r) => (S) => {
|
|
|
290
290
|
return d.contains(a) && d.contains(s);
|
|
291
291
|
}).addClass("level-highlightedge");
|
|
292
292
|
const i = l.elements().filter(".level-selected, .level-highlight, .level-highlightedge");
|
|
293
|
-
l.elements().not(i).addClass("level-grayed"),
|
|
294
|
-
}, Je = (e) => {
|
|
295
|
-
const t = r.current;
|
|
296
|
-
if (!t) return;
|
|
297
|
-
const l = new Set(R);
|
|
298
|
-
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);
|
|
293
|
+
l.elements().not(i).addClass("level-grayed"), z.success(`已高亮 "${e}" 及其 ${c} 度关联节点和连线`);
|
|
299
294
|
}, $e = (e) => {
|
|
300
295
|
const t = r.current;
|
|
301
296
|
if (!t) return;
|
|
302
297
|
const l = new Set(ee);
|
|
303
|
-
l.has(e) ? (l.delete(e), t.
|
|
304
|
-
}, Ze = () => {
|
|
298
|
+
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()), De(l);
|
|
299
|
+
}, Ze = (e) => {
|
|
300
|
+
const t = r.current;
|
|
301
|
+
if (!t) return;
|
|
302
|
+
const l = new Set(te);
|
|
303
|
+
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()), Ee(l);
|
|
304
|
+
}, qe = () => {
|
|
305
305
|
const e = r.current;
|
|
306
306
|
e.remove(e.elements());
|
|
307
|
-
},
|
|
308
|
-
|
|
309
|
-
},
|
|
307
|
+
}, Ke = () => {
|
|
308
|
+
B(!Y);
|
|
309
|
+
}, Me = (e) => {
|
|
310
310
|
var c, d;
|
|
311
311
|
const t = r.current;
|
|
312
312
|
if (!t) return;
|
|
@@ -327,8 +327,8 @@ const q = (b, r) => (S) => {
|
|
|
327
327
|
label: g,
|
|
328
328
|
"text-opacity": g ? 1 : 0
|
|
329
329
|
});
|
|
330
|
-
}),
|
|
331
|
-
},
|
|
330
|
+
}), z.success("节点配置保存成功");
|
|
331
|
+
}, Qe = (e) => {
|
|
332
332
|
var p, g, i, C, h, a;
|
|
333
333
|
const t = r.current;
|
|
334
334
|
if (!t) return;
|
|
@@ -338,11 +338,11 @@ const q = (b, r) => (S) => {
|
|
|
338
338
|
const w = d && (s.data("label") || s.data("name")) || "";
|
|
339
339
|
console.log("Setting edge label:", w), s.style({
|
|
340
340
|
width: e.edgeWidth,
|
|
341
|
-
"line-color": l ||
|
|
342
|
-
"target-arrow-color": l ||
|
|
341
|
+
"line-color": l || T.edgeDefaultColor,
|
|
342
|
+
"target-arrow-color": l || T.edgeDefaultColor,
|
|
343
343
|
"target-arrow-shape": e.showArrow === "show" ? "triangle" : "none",
|
|
344
344
|
"font-size": e.fontSize,
|
|
345
|
-
color: n ||
|
|
345
|
+
color: n || T.edgeLabelColor,
|
|
346
346
|
"font-weight": e.fontWeight,
|
|
347
347
|
"font-style": e.fontStyle,
|
|
348
348
|
label: w,
|
|
@@ -351,32 +351,32 @@ const q = (b, r) => (S) => {
|
|
|
351
351
|
"text-background-opacity": c ? 1 : 0,
|
|
352
352
|
"text-background-padding": "2px"
|
|
353
353
|
});
|
|
354
|
-
}),
|
|
355
|
-
},
|
|
356
|
-
return console.log(1e3,
|
|
357
|
-
/* @__PURE__ */ o("div", { className: j("graph-bar", { "graph-bar-vertical": _ }), style:
|
|
354
|
+
}), z.success("连线配置保存成功");
|
|
355
|
+
}, Ge = wt(F), _ = F === "left" || F === "right";
|
|
356
|
+
return console.log(1e3, M), /* @__PURE__ */ f($, { children: [
|
|
357
|
+
/* @__PURE__ */ o("div", { className: j("graph-bar", { "graph-bar-vertical": _ }), style: Ge, children: /* @__PURE__ */ o("div", { className: j("graph-bar-min", {
|
|
358
358
|
"graph-bar-min-vertical": _
|
|
359
|
-
}), children:
|
|
359
|
+
}), children: M.map(({ key: e, title: t, icon: l, onClick: n }) => {
|
|
360
360
|
var g, i, C, h;
|
|
361
361
|
const c = () => l && l.length > 0 ? l.length > 1 ? /* @__PURE__ */ o(x, { gap: "5px", children: l.map((a, s) => e === "nodeZoom" ? Z.cloneElement(a, {
|
|
362
|
-
onClick: () =>
|
|
362
|
+
onClick: () => _e(s === 0 ? "in" : "out"),
|
|
363
363
|
key: s
|
|
364
364
|
}) : e === "canvasZoom" ? Z.cloneElement(a, {
|
|
365
|
-
onClick: () =>
|
|
365
|
+
onClick: () => Ie(s === 0 ? "in" : "out"),
|
|
366
366
|
key: s
|
|
367
367
|
}) : Z.cloneElement(a, { key: s })) }) : /* @__PURE__ */ o(x, { gap: "5px", children: l }) : null, d = (a) => {
|
|
368
368
|
switch (console.log(444, e, a), e) {
|
|
369
369
|
case "queryStatistics":
|
|
370
|
-
|
|
370
|
+
ke(!R);
|
|
371
371
|
break;
|
|
372
372
|
case "graphDisplaySettings":
|
|
373
|
-
|
|
373
|
+
Ke();
|
|
374
374
|
break;
|
|
375
375
|
case "hideAttributes":
|
|
376
|
-
|
|
376
|
+
He();
|
|
377
377
|
break;
|
|
378
378
|
case "clearCanvas":
|
|
379
|
-
|
|
379
|
+
qe();
|
|
380
380
|
break;
|
|
381
381
|
default:
|
|
382
382
|
a == null || a(r);
|
|
@@ -386,40 +386,40 @@ const q = (b, r) => (S) => {
|
|
|
386
386
|
let a = [];
|
|
387
387
|
switch (e) {
|
|
388
388
|
case "layout":
|
|
389
|
-
a = (g =
|
|
389
|
+
a = (g = it) == null ? void 0 : g.map((s) => ({
|
|
390
390
|
...s,
|
|
391
|
-
label: /* @__PURE__ */ o("div", { className: j({ "text-[#145afd]":
|
|
391
|
+
label: /* @__PURE__ */ o("div", { className: j({ "text-[#145afd]": pe === s.key }), onClick: q(Pe, s.key), children: s.label })
|
|
392
392
|
}));
|
|
393
393
|
break;
|
|
394
394
|
case "analysis":
|
|
395
|
-
a =
|
|
395
|
+
a = rt.map((s) => ({
|
|
396
396
|
...s,
|
|
397
397
|
label: /* @__PURE__ */ o("div", { onClick: (w) => {
|
|
398
398
|
switch (w.stopPropagation(), s.key) {
|
|
399
399
|
case "query":
|
|
400
|
-
|
|
400
|
+
Ve();
|
|
401
401
|
break;
|
|
402
402
|
case "link":
|
|
403
|
-
|
|
403
|
+
Ae();
|
|
404
404
|
break;
|
|
405
405
|
case "path":
|
|
406
|
-
|
|
406
|
+
le();
|
|
407
407
|
break;
|
|
408
408
|
}
|
|
409
409
|
}, children: s.label })
|
|
410
410
|
}));
|
|
411
411
|
break;
|
|
412
412
|
case "select":
|
|
413
|
-
a = (i =
|
|
413
|
+
a = (i = at) == null ? void 0 : i.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: q(Fe, s.key), children: s.label }) }));
|
|
414
414
|
break;
|
|
415
415
|
case "downloadData":
|
|
416
|
-
a = (C =
|
|
416
|
+
a = (C = st) == null ? void 0 : C.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: (w) => je(w, s.key), children: s.label }) }));
|
|
417
417
|
break;
|
|
418
418
|
case "textPosition":
|
|
419
|
-
a = (h =
|
|
419
|
+
a = (h = ge) == null ? void 0 : h.map((s) => ({ ...s, label: /* @__PURE__ */ o("div", { onClick: q(() => nt(r, s.key), s.key), children: s.label }) }));
|
|
420
420
|
break;
|
|
421
421
|
}
|
|
422
|
-
return /* @__PURE__ */ o(
|
|
422
|
+
return /* @__PURE__ */ o(et, { trigger: ["hover"], placement: _ ? "bottomRight" : "bottom", menu: { items: a }, children: /* @__PURE__ */ f(x, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor", children: [
|
|
423
423
|
c(),
|
|
424
424
|
/* @__PURE__ */ o(x, { className: "w-100 ", justify: "center", children: t })
|
|
425
425
|
] }) }, e);
|
|
@@ -429,27 +429,27 @@ const q = (b, r) => (S) => {
|
|
|
429
429
|
/* @__PURE__ */ o(x, { className: "w-100 ", justify: "center", children: t })
|
|
430
430
|
] }, e);
|
|
431
431
|
}) }) }),
|
|
432
|
-
/* @__PURE__ */ o(
|
|
433
|
-
/* @__PURE__ */ o(
|
|
434
|
-
/* @__PURE__ */ o(
|
|
432
|
+
/* @__PURE__ */ o(ut, { isVisible: Ce, searchChange: (e) => We(e), closeQuery: () => V(!1) }),
|
|
433
|
+
/* @__PURE__ */ o(pt, { isVisible: ve, analysis: (e) => ct(r, { pathNodes: e }), closePath: () => P(!1) }),
|
|
434
|
+
/* @__PURE__ */ o(ft, { ref: O, onLevelClick: Je }),
|
|
435
435
|
/* @__PURE__ */ o(
|
|
436
|
-
|
|
436
|
+
tt,
|
|
437
437
|
{
|
|
438
438
|
title: "JSON预览",
|
|
439
|
-
open:
|
|
440
|
-
onCancel: () =>
|
|
439
|
+
open: Se,
|
|
440
|
+
onCancel: () => X(!1),
|
|
441
441
|
footer: null,
|
|
442
442
|
width: 800,
|
|
443
|
-
children: /* @__PURE__ */ o("pre", { style: { maxHeight: "60vh", overflow: "auto", background: "#f5f5f5", padding: "16px", borderRadius: "4px" }, children:
|
|
443
|
+
children: /* @__PURE__ */ o("pre", { style: { maxHeight: "60vh", overflow: "auto", background: "#f5f5f5", padding: "16px", borderRadius: "4px" }, children: U ? JSON.stringify(U, null, 2) : "暂无数据" })
|
|
444
444
|
}
|
|
445
445
|
),
|
|
446
446
|
/* @__PURE__ */ o(
|
|
447
|
-
|
|
447
|
+
ot,
|
|
448
448
|
{
|
|
449
449
|
title: "图显示设置",
|
|
450
450
|
placement: "right",
|
|
451
|
-
open:
|
|
452
|
-
onClose: () =>
|
|
451
|
+
open: Y,
|
|
452
|
+
onClose: () => B(!1),
|
|
453
453
|
mask: !1,
|
|
454
454
|
size: 300,
|
|
455
455
|
styles: {
|
|
@@ -459,22 +459,22 @@ const q = (b, r) => (S) => {
|
|
|
459
459
|
},
|
|
460
460
|
getContainer: !1,
|
|
461
461
|
children: /* @__PURE__ */ o(
|
|
462
|
-
|
|
462
|
+
ie,
|
|
463
463
|
{
|
|
464
|
-
activeKey:
|
|
465
|
-
onChange:
|
|
464
|
+
activeKey: Ne,
|
|
465
|
+
onChange: Le,
|
|
466
466
|
style: { flex: 1, overflow: "auto" },
|
|
467
467
|
tabBarStyle: { padding: "0 16px", margin: 0, background: "#fff", position: "sticky", top: 0, zIndex: 10 },
|
|
468
468
|
items: [
|
|
469
469
|
{
|
|
470
470
|
label: "节点设置",
|
|
471
471
|
key: "node",
|
|
472
|
-
children: /* @__PURE__ */ o(
|
|
472
|
+
children: /* @__PURE__ */ o(yt, { onSave: Me, colors: H })
|
|
473
473
|
},
|
|
474
474
|
{
|
|
475
475
|
label: "连线设置",
|
|
476
476
|
key: "edge",
|
|
477
|
-
children: /* @__PURE__ */ o(
|
|
477
|
+
children: /* @__PURE__ */ o(Ct, { onSave: Qe, colors: H })
|
|
478
478
|
}
|
|
479
479
|
]
|
|
480
480
|
}
|
|
@@ -482,9 +482,9 @@ const q = (b, r) => (S) => {
|
|
|
482
482
|
}
|
|
483
483
|
),
|
|
484
484
|
/* @__PURE__ */ o("div", { className: j("gtaph-statics absolute", {
|
|
485
|
-
hidden: !
|
|
485
|
+
hidden: !R
|
|
486
486
|
}), children: /* @__PURE__ */ o(
|
|
487
|
-
|
|
487
|
+
ie,
|
|
488
488
|
{
|
|
489
489
|
items: [
|
|
490
490
|
{
|
|
@@ -499,7 +499,7 @@ const q = (b, r) => (S) => {
|
|
|
499
499
|
"实体类型:",
|
|
500
500
|
Object.keys(v).length
|
|
501
501
|
] }),
|
|
502
|
-
/* @__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 ${
|
|
502
|
+
/* @__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 ${ee.has(e) ? "opacity-30" : ""}`, onClick: () => $e(e), children: [
|
|
503
503
|
/* @__PURE__ */ o("img", { className: "w-20px rounded-50", src: v[e].img, alt: "" }),
|
|
504
504
|
e,
|
|
505
505
|
":",
|
|
@@ -510,16 +510,16 @@ const q = (b, r) => (S) => {
|
|
|
510
510
|
{
|
|
511
511
|
label: "关系",
|
|
512
512
|
key: "relation",
|
|
513
|
-
children: /* @__PURE__ */ o($, { children: ((
|
|
513
|
+
children: /* @__PURE__ */ o($, { children: ((se = Object.keys(D)) == null ? void 0 : se.length) > 0 ? /* @__PURE__ */ f("div", { children: [
|
|
514
514
|
/* @__PURE__ */ f("div", { children: [
|
|
515
515
|
"关系数量:",
|
|
516
|
-
(
|
|
516
|
+
(ae = Object.keys(D)) == null ? void 0 : ae.length
|
|
517
517
|
] }),
|
|
518
518
|
/* @__PURE__ */ f("div", { className: "my-4px", children: [
|
|
519
519
|
"关系类型:",
|
|
520
|
-
(
|
|
520
|
+
(re = Object.values(D)) == null ? void 0 : re.reduce((e, t) => e + t, 0)
|
|
521
521
|
] }),
|
|
522
|
-
/* @__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 ${
|
|
522
|
+
/* @__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 ${te.has(e) ? "opacity-30" : ""}`, onClick: () => Ze(e), children: [
|
|
523
523
|
e,
|
|
524
524
|
":",
|
|
525
525
|
D[e]
|
|
@@ -530,16 +530,16 @@ const q = (b, r) => (S) => {
|
|
|
530
530
|
}
|
|
531
531
|
) })
|
|
532
532
|
] });
|
|
533
|
-
}),
|
|
533
|
+
}), yt = ({ onSave: b, colors: r }) => {
|
|
534
534
|
const [S] = u.useForm();
|
|
535
535
|
return /* @__PURE__ */ f(u, { form: S, layout: "vertical", onFinish: b, className: "setting-form", children: [
|
|
536
536
|
/* @__PURE__ */ f("div", { className: "setting-form-content", children: [
|
|
537
|
-
/* @__PURE__ */ o(u.Item, { label: "节点大小", name: "nodeSize", initialValue:
|
|
537
|
+
/* @__PURE__ */ o(u.Item, { label: "节点大小", name: "nodeSize", initialValue: K, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入节点大小" }) }),
|
|
538
538
|
/* @__PURE__ */ o(u.Item, { label: "显示标签", name: "showLabel", initialValue: "show", children: /* @__PURE__ */ f(m, { children: [
|
|
539
539
|
/* @__PURE__ */ o(m.Option, { value: "show", children: "显示" }),
|
|
540
540
|
/* @__PURE__ */ o(m.Option, { value: "hide", children: "隐藏" })
|
|
541
541
|
] }) }),
|
|
542
|
-
/* @__PURE__ */ o(u.Item, { label: "字体位置", name: "textPosition", initialValue: "bottom", children: /* @__PURE__ */ o(m, { children:
|
|
542
|
+
/* @__PURE__ */ o(u.Item, { label: "字体位置", name: "textPosition", initialValue: "bottom", children: /* @__PURE__ */ o(m, { children: ge.map((v) => /* @__PURE__ */ o(m.Option, { value: v.key, children: v.label }, v.key)) }) }),
|
|
543
543
|
/* @__PURE__ */ o(u.Item, { label: "字体偏移", name: "textOffset", initialValue: 5, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入字体偏移量" }) }),
|
|
544
544
|
/* @__PURE__ */ o(u.Item, { label: "字体颜色", name: "fontColor", initialValue: r.nodeLabelColor, children: /* @__PURE__ */ o(A, { showText: !0 }) }),
|
|
545
545
|
/* @__PURE__ */ o(u.Item, { label: "字体大小", name: "fontSize", initialValue: r.nodeLabelFontSize, children: /* @__PURE__ */ o(I, { type: "number", placeholder: "请输入字体大小" }) }),
|
|
@@ -553,9 +553,9 @@ const q = (b, r) => (S) => {
|
|
|
553
553
|
/* @__PURE__ */ o(m.Option, { value: "italic", children: "斜体" })
|
|
554
554
|
] }) })
|
|
555
555
|
] }),
|
|
556
|
-
/* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(
|
|
556
|
+
/* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(he, { type: "primary", htmlType: "submit", block: !0, children: "保存节点配置" }) }) })
|
|
557
557
|
] });
|
|
558
|
-
},
|
|
558
|
+
}, Ct = ({ onSave: b, colors: r }) => {
|
|
559
559
|
const [S] = u.useForm();
|
|
560
560
|
return /* @__PURE__ */ f(u, { form: S, layout: "vertical", onFinish: b, className: "setting-form", children: [
|
|
561
561
|
/* @__PURE__ */ f("div", { className: "setting-form-content", children: [
|
|
@@ -581,10 +581,10 @@ const q = (b, r) => (S) => {
|
|
|
581
581
|
] }) }),
|
|
582
582
|
/* @__PURE__ */ o(u.Item, { label: "标签背景色", name: "labelBgColor", initialValue: "#ffffff", children: /* @__PURE__ */ o(A, { showText: !0 }) })
|
|
583
583
|
] }),
|
|
584
|
-
/* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(
|
|
584
|
+
/* @__PURE__ */ o("div", { className: "setting-form-footer", children: /* @__PURE__ */ o(u.Item, { children: /* @__PURE__ */ o(he, { type: "primary", htmlType: "submit", block: !0, children: "保存连线配置" }) }) })
|
|
585
585
|
] });
|
|
586
586
|
};
|
|
587
587
|
export {
|
|
588
|
-
|
|
589
|
-
|
|
588
|
+
bt as actionList,
|
|
589
|
+
Ft as default
|
|
590
590
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AudioItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface AudioSectionProps {
|
|
7
|
+
audios: AudioItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const AudioSection: React.FC<AudioSectionProps>;
|
|
12
|
+
export default AudioSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface DocumentItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface DocumentSectionProps {
|
|
7
|
+
documents: DocumentItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source: any;
|
|
10
|
+
}
|
|
11
|
+
declare const DocumentSection: React.FC<DocumentSectionProps>;
|
|
12
|
+
export default DocumentSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ImageItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface ImageSectionProps {
|
|
7
|
+
images: ImageItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const ImageSection: React.FC<ImageSectionProps>;
|
|
12
|
+
export default ImageSection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { EntityInfo } from '../../../../../../api/kg/kgSerach';
|
|
3
|
+
interface ListCardProps {
|
|
4
|
+
entity: EntityInfo;
|
|
5
|
+
viewMode: 'list' | 'grid';
|
|
6
|
+
keyword?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
contentClass?: string;
|
|
9
|
+
titleClass?: string;
|
|
10
|
+
onViewDetails: (entity: EntityInfo) => void;
|
|
11
|
+
source?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ListCard: React.FC<ListCardProps>;
|
|
14
|
+
export default ListCard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Property {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface PropertySectionProps {
|
|
7
|
+
properties: Property[];
|
|
8
|
+
excludedKeys?: string[];
|
|
9
|
+
}
|
|
10
|
+
declare const PropertySection: React.FC<PropertySectionProps>;
|
|
11
|
+
export default PropertySection;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface RelationItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface RelationSectionProps {
|
|
7
|
+
relations: RelationItem[];
|
|
8
|
+
kgIds?: any;
|
|
9
|
+
viewMode?: 'list' | 'grid';
|
|
10
|
+
source?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RelationSection: React.FC<RelationSectionProps>;
|
|
13
|
+
export default RelationSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface VideoItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface VideoSectionProps {
|
|
7
|
+
videos: VideoItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const VideoSection: React.FC<VideoSectionProps>;
|
|
12
|
+
export default VideoSection;
|