react-kggraph 0.0.30 → 0.0.32

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.es25.js CHANGED
@@ -1,28 +1,28 @@
1
- import { jsxs as y, Fragment as S, jsx as a } from "react/jsx-runtime";
1
+ import { jsxs as y, Fragment as S, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as oe, useState as d, useImperativeHandle as ie } from "react";
3
- import { Form as s, message as z, Select as B, Input as h, Button as x, Table as k, Modal as se, Tabs as ce, Tooltip as pe } from "antd";
3
+ import { Form as s, message as $, Select as B, Input as u, Button as x, Table as k, Modal as se, Tabs as ce, Tooltip as pe } from "antd";
4
4
  import { SearchOutlined as F } from "@ant-design/icons";
5
- const ge = oe((de, N) => {
5
+ const me = oe((de, N) => {
6
6
  const [R, b] = d(!1), [T, M] = d({}), [O, P] = d("entity"), [j, v] = d([]), [G, A] = d([]), [H, K] = d([]), [q, J] = d([]), [I, p] = d(!1), [Q] = s.useForm(), [U] = s.useForm(), [W] = s.useForm();
7
7
  ie(N, () => ({
8
8
  open: (e) => {
9
9
  b(!0);
10
10
  const r = [], l = [];
11
- e.forEach((n) => {
12
- n.group === "nodes" && r.push(n.data), n.group === "edges" && l.push(n.data);
11
+ e.forEach((a) => {
12
+ a.group === "nodes" && r.push(a.data), a.group === "edges" && l.push(a.data);
13
13
  }), M({ nodes: r, links: l }), X({ nodes: r, links: l });
14
14
  },
15
15
  close: () => b(!1)
16
16
  }));
17
- const f = (e) => {
17
+ const h = (e) => {
18
18
  const r = [], l = /* @__PURE__ */ new Map();
19
19
  e.nodes.forEach((t) => {
20
20
  l.set(t.id, t);
21
21
  });
22
- const n = /* @__PURE__ */ new Set();
22
+ const a = /* @__PURE__ */ new Set();
23
23
  return e.links.forEach((t) => {
24
24
  var c;
25
- n.add(t.source), n.add(t.target);
25
+ a.add(t.source), a.add(t.target);
26
26
  const o = l.get(t.target);
27
27
  r.push({
28
28
  source: ((c = l.get(t.source)) == null ? void 0 : c.label) || t.source,
@@ -31,7 +31,7 @@ const ge = oe((de, N) => {
31
31
  targetType: o == null ? void 0 : o.types
32
32
  });
33
33
  }), e.nodes.forEach((t) => {
34
- n.has(t.id) || r.push({
34
+ a.has(t.id) || r.push({
35
35
  source: t.label,
36
36
  relation: "-",
37
37
  target: "-"
@@ -41,45 +41,42 @@ const ge = oe((de, N) => {
41
41
  p(!0);
42
42
  try {
43
43
  if (!e) {
44
- z.warning("未找到数据"), p(!1);
44
+ $.warning("未找到数据"), p(!1);
45
45
  return;
46
46
  }
47
- console.log(99, e);
48
- const r = e, { links: l = [], nodes: n = [] } = r, t = f(r);
49
- console.log(99911, t);
50
- const o = n.map((i) => {
51
- var _, E, L;
52
- const m = t.filter(($) => $.source === i.label && $.targetType === "typed-literal"), ae = ((L = (E = (_ = i == null ? void 0 : i.properties) == null ? void 0 : _.value) == null ? void 0 : E.split("/")) == null ? void 0 : L[0]) || "";
47
+ const r = e, { links: l = [], nodes: a = [] } = r, t = h(r), o = a.map((i) => {
48
+ var C, _, E;
49
+ const g = t.filter((L) => L.source === i.label && L.targetType === "typed-literal"), ne = ((E = (_ = (C = i == null ? void 0 : i.properties) == null ? void 0 : C.value) == null ? void 0 : _.split("/")) == null ? void 0 : E[0]) || "";
53
50
  return {
54
51
  ...i,
55
- num: m.length || 0,
56
- typeVale: ae
52
+ num: g.length || 0,
53
+ typeVale: ne
57
54
  };
58
- }), c = t.filter((i) => i.targetType === "uri"), w = t.filter((i) => i.targetType === "typed-literal"), u = o.filter((i) => i.types === "uri"), g = [...new Set(u.map((i) => i.typeVale).filter(Boolean))];
59
- J(g), console.log(444111, u), V(o), D(c), C(w);
55
+ }), c = t.filter((i) => i.targetType === "uri"), w = t.filter((i) => i.targetType === "typed-literal"), f = o.filter((i) => i.types === "uri"), m = [...new Set(f.map((i) => i.typeVale).filter(Boolean))];
56
+ J(m), D(o), V(c), z(w);
60
57
  } catch (r) {
61
- console.error("数据加载失败:", r), z.error("数据加载失败");
58
+ console.error("数据加载失败:", r), $.error("数据加载失败");
62
59
  }
63
60
  p(!1);
64
- }, V = (e) => {
65
- const l = e.filter((n) => n.types === "uri").map((n, t) => ({
66
- key: n.id || String(t),
67
- typeVale: n.typeVale || "",
68
- label: n.label || "",
69
- num: n.length || 0
70
- }));
71
- console.log(566, l), v(l);
72
61
  }, D = (e) => {
73
- const r = e.map((l, n) => ({
74
- key: `${l.source}-${l.relation}-${l.target}-${n}`,
62
+ const l = e.filter((a) => a.types === "uri").map((a, t) => ({
63
+ key: a.id || String(t),
64
+ typeVale: a.typeVale || "",
65
+ label: a.label || "",
66
+ num: a.num || 0
67
+ }));
68
+ v(l);
69
+ }, V = (e) => {
70
+ const r = e.map((l, a) => ({
71
+ key: `${l.source}-${l.relation}-${l.target}-${a}`,
75
72
  source: l.source || "",
76
73
  relation: l.relation || "-",
77
74
  target: l.target || ""
78
75
  }));
79
76
  A(r);
80
- }, C = (e) => {
81
- const r = e.map((l, n) => ({
82
- key: `${l.source}-${l.relation}-${l.target}-${n}`,
77
+ }, z = (e) => {
78
+ const r = e.map((l, a) => ({
79
+ key: `${l.source}-${l.relation}-${l.target}-${a}`,
83
80
  source: l.source || "",
84
81
  relation: l.relation || "-",
85
82
  target: l.target || ""
@@ -90,10 +87,10 @@ const ge = oe((de, N) => {
90
87
  try {
91
88
  const r = T;
92
89
  if (!r) return;
93
- const { nodes: l = [] } = r, n = f(r);
90
+ const { nodes: l = [] } = r, a = h(r);
94
91
  let t = l.map((o) => {
95
- var u, g, i;
96
- const c = n.filter((m) => m.source === o.label && m.targetType === "typed-literal"), w = ((i = (g = (u = o == null ? void 0 : o.properties) == null ? void 0 : u.value) == null ? void 0 : g.split("/")) == null ? void 0 : i[0]) || "";
92
+ var f, m, i;
93
+ const c = a.filter((g) => g.source === o.label && g.targetType === "typed-literal"), w = ((i = (m = (f = o == null ? void 0 : o.properties) == null ? void 0 : f.value) == null ? void 0 : m.split("/")) == null ? void 0 : i[0]) || "";
97
94
  return {
98
95
  ...o,
99
96
  num: c.length || 0,
@@ -103,7 +100,7 @@ const ge = oe((de, N) => {
103
100
  e.entityType && (t = t.filter((o) => o.typeVale === e.entityType)), e.entityValue && (t = t.filter((o) => {
104
101
  var c;
105
102
  return (c = o.label) == null ? void 0 : c.includes(e.entityValue);
106
- })), V(t);
103
+ })), D(t);
107
104
  } catch (r) {
108
105
  console.error("搜索失败:", r);
109
106
  }
@@ -113,13 +110,13 @@ const ge = oe((de, N) => {
113
110
  try {
114
111
  const r = T;
115
112
  if (!r) return;
116
- let n = f(r).filter((t) => t.targetType === "uri");
117
- e.entity && (n = n.filter(
113
+ let a = h(r).filter((t) => t.targetType === "uri");
114
+ e.entity && (a = a.filter(
118
115
  (t) => {
119
116
  var o, c;
120
117
  return ((o = t.source) == null ? void 0 : o.includes(e.entity)) || ((c = t.target) == null ? void 0 : c.includes(e.entity));
121
118
  }
122
- )), e.relation && (n = n.filter((t) => t.relation === e.relation)), D(n);
119
+ )), e.relation && (a = a.filter((t) => t.relation === e.relation)), V(a);
123
120
  } catch (r) {
124
121
  console.error("搜索失败:", r);
125
122
  }
@@ -129,14 +126,14 @@ const ge = oe((de, N) => {
129
126
  try {
130
127
  const r = T;
131
128
  if (!r) return;
132
- let n = f(r).filter((t) => t.targetType === "typed-literal");
133
- e.entity && (n = n.filter((t) => {
129
+ let a = h(r).filter((t) => t.targetType === "typed-literal");
130
+ e.entity && (a = a.filter((t) => {
134
131
  var o;
135
132
  return (o = t.source) == null ? void 0 : o.includes(e.entity);
136
- })), e.property && (n = n.filter((t) => {
133
+ })), e.property && (a = a.filter((t) => {
137
134
  var o;
138
135
  return (o = t.target) == null ? void 0 : o.includes(e.property);
139
- })), C(n);
136
+ })), z(a);
140
137
  } catch (r) {
141
138
  console.error("搜索失败:", r);
142
139
  }
@@ -151,10 +148,10 @@ const ge = oe((de, N) => {
151
148
  { title: "实体", dataIndex: "source", key: "source" },
152
149
  { title: "关系", dataIndex: "relation", key: "relation" },
153
150
  { title: "实体", dataIndex: "target", key: "target" }
154
- ], le = [
151
+ ], ae = [
155
152
  { title: "序号", render: (e, r, l) => l + 1, width: 20 },
156
- { title: "实体", dataIndex: "source", key: "source", width: 80 },
157
- { title: "属性名", dataIndex: "relation", key: "relation", width: 80 },
153
+ { title: "实体", dataIndex: "source", key: "source", width: 60 },
154
+ { title: "属性名", dataIndex: "relation", key: "relation", width: 40 },
158
155
  {
159
156
  title: "属性值",
160
157
  dataIndex: "target",
@@ -163,9 +160,9 @@ const ge = oe((de, N) => {
163
160
  ellipsis: {
164
161
  showTitle: !1
165
162
  },
166
- render: (e) => /* @__PURE__ */ a(pe, { placement: "topLeft", title: e, children: e })
163
+ render: (e) => /* @__PURE__ */ n(pe, { placement: "topLeft", title: e, children: e })
167
164
  }
168
- ], ne = [
165
+ ], le = [
169
166
  {
170
167
  key: "entity",
171
168
  label: "实体表",
@@ -178,20 +175,21 @@ const ge = oe((de, N) => {
178
175
  onFinish: Y,
179
176
  style: { paddingTop: 20, marginBottom: 20 },
180
177
  children: [
181
- /* @__PURE__ */ a(s.Item, { name: "entityType", label: "实体类型", children: /* @__PURE__ */ a(B, { placeholder: "请选择", style: { width: 150 }, allowClear: !0, children: q.map((e) => /* @__PURE__ */ a(B.Option, { value: e, children: e }, e)) }) }),
182
- /* @__PURE__ */ a(s.Item, { name: "entityValue", label: "实体值", children: /* @__PURE__ */ a(h, { placeholder: "请输入名称" }) }),
183
- /* @__PURE__ */ a(s.Item, { children: /* @__PURE__ */ a(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ a(F, {}), children: "搜索" }) })
178
+ /* @__PURE__ */ n(s.Item, { name: "entityType", label: "实体类型", children: /* @__PURE__ */ n(B, { placeholder: "请选择", style: { width: 150 }, allowClear: !0, children: q.map((e) => /* @__PURE__ */ n(B.Option, { value: e, children: e }, e)) }) }),
179
+ /* @__PURE__ */ n(s.Item, { name: "entityValue", label: "实体值", children: /* @__PURE__ */ n(u, { placeholder: "请输入名称" }) }),
180
+ /* @__PURE__ */ n(s.Item, { children: /* @__PURE__ */ n(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n(F, {}), children: "搜索" }) })
184
181
  ]
185
182
  }
186
183
  ),
187
- /* @__PURE__ */ a(
184
+ /* @__PURE__ */ n(
188
185
  k,
189
186
  {
190
187
  columns: te,
191
188
  dataSource: j,
192
189
  loading: I,
193
190
  pagination: { pageSize: 10, showSizeChanger: !0 },
194
- scroll: { x: !0 }
191
+ scroll: { x: !0 },
192
+ size: "small"
195
193
  }
196
194
  )
197
195
  ] })
@@ -208,20 +206,21 @@ const ge = oe((de, N) => {
208
206
  onFinish: Z,
209
207
  style: { paddingTop: 20, marginBottom: 20 },
210
208
  children: [
211
- /* @__PURE__ */ a(s.Item, { name: "entity", label: "实体", children: /* @__PURE__ */ a(h, { placeholder: "请输入名称", style: { width: 200 } }) }),
212
- /* @__PURE__ */ a(s.Item, { name: "relation", label: "关系", children: /* @__PURE__ */ a(h, { placeholder: "请输入名称", style: { width: 200 } }) }),
213
- /* @__PURE__ */ a(s.Item, { children: /* @__PURE__ */ a(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ a(F, {}), children: "搜索" }) })
209
+ /* @__PURE__ */ n(s.Item, { name: "entity", label: "实体", children: /* @__PURE__ */ n(u, { placeholder: "请输入名称", style: { width: 200 } }) }),
210
+ /* @__PURE__ */ n(s.Item, { name: "relation", label: "关系", children: /* @__PURE__ */ n(u, { placeholder: "请输入名称", style: { width: 200 } }) }),
211
+ /* @__PURE__ */ n(s.Item, { children: /* @__PURE__ */ n(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n(F, {}), children: "搜索" }) })
214
212
  ]
215
213
  }
216
214
  ),
217
- /* @__PURE__ */ a(
215
+ /* @__PURE__ */ n(
218
216
  k,
219
217
  {
220
218
  columns: re,
221
219
  dataSource: G,
222
220
  loading: I,
223
221
  pagination: { pageSize: 10, showSizeChanger: !0 },
224
- scroll: { x: !0 }
222
+ scroll: { x: !0 },
223
+ size: "small"
225
224
  }
226
225
  )
227
226
  ] })
@@ -238,36 +237,37 @@ const ge = oe((de, N) => {
238
237
  onFinish: ee,
239
238
  style: { paddingTop: 20, marginBottom: 20 },
240
239
  children: [
241
- /* @__PURE__ */ a(s.Item, { name: "entity", label: "实体", children: /* @__PURE__ */ a(h, { placeholder: "请输入名称", style: { width: 200 } }) }),
242
- /* @__PURE__ */ a(s.Item, { name: "property", label: "属性值", children: /* @__PURE__ */ a(h, { placeholder: "请输入名称", style: { width: 200 } }) }),
243
- /* @__PURE__ */ a(s.Item, { children: /* @__PURE__ */ a(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ a(F, {}), children: "搜索" }) })
240
+ /* @__PURE__ */ n(s.Item, { name: "entity", label: "实体", children: /* @__PURE__ */ n(u, { placeholder: "请输入名称", style: { width: 200 } }) }),
241
+ /* @__PURE__ */ n(s.Item, { name: "property", label: "属性值", children: /* @__PURE__ */ n(u, { placeholder: "请输入名称", style: { width: 200 } }) }),
242
+ /* @__PURE__ */ n(s.Item, { children: /* @__PURE__ */ n(x, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ n(F, {}), children: "搜索" }) })
244
243
  ]
245
244
  }
246
245
  ),
247
- /* @__PURE__ */ a(
246
+ /* @__PURE__ */ n(
248
247
  k,
249
248
  {
250
- columns: le,
249
+ columns: ae,
251
250
  dataSource: H,
252
251
  loading: I,
253
- pagination: { pageSize: 10, showSizeChanger: !0 }
252
+ pagination: { pageSize: 10, showSizeChanger: !0 },
253
+ size: "small"
254
254
  }
255
255
  )
256
256
  ] })
257
257
  }
258
258
  ];
259
- return /* @__PURE__ */ a(se, { open: R, onCancel: () => {
259
+ return /* @__PURE__ */ n(se, { open: R, onCancel: () => {
260
260
  b(!1);
261
- }, footer: null, width: 900, children: /* @__PURE__ */ a("div", { style: { padding: "0 20px", background: "#fff" }, children: /* @__PURE__ */ a(
261
+ }, footer: null, width: 900, children: /* @__PURE__ */ n("div", { style: { padding: "0 20px", background: "#fff" }, children: /* @__PURE__ */ n(
262
262
  ce,
263
263
  {
264
264
  activeKey: O,
265
265
  onChange: P,
266
- items: ne,
266
+ items: le,
267
267
  style: { background: "#fff" }
268
268
  }
269
269
  ) }) });
270
270
  });
271
271
  export {
272
- ge as default
272
+ me as default
273
273
  };
package/lib/index.es45.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useState as m, useEffect as w } from "react";
3
- import h from "./index.es47.js";
3
+ import h from "./index.es50.js";
4
4
  const k = ({ relations: t, kgIds: s, viewMode: a = "list", source: c = "" }) => {
5
5
  const [d, l] = m(t);
6
6
  w(() => {
package/lib/index.es7.js CHANGED
@@ -13,51 +13,51 @@ import Nt from "./index.es24.js";
13
13
  import I from "./index.es17.js";
14
14
  import { downloadFile as pe } from "./index.es12.js";
15
15
  import { actionList as Lt, entityRelationList as kt } from "./index.es4.js";
16
- import { DownOutlined as Dt, RightOutlined as Et, UpOutlined as It, LeftOutlined as Vt } from "@ant-design/icons";
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";
18
- const M = (b, c) => (k) => {
19
- k.stopPropagation(), b == null || b(c || "");
20
- }, Ot = (b) => {
18
+ const M = (b, r) => (k) => {
19
+ k.stopPropagation(), b == null || b(r || "");
20
+ }, Ot = (b, r) => {
21
21
  if (typeof b == "string")
22
22
  switch (b) {
23
23
  case "top":
24
- return { top: 20, left: 20 };
24
+ return { top: 20, left: 20, ...r };
25
25
  case "bottom":
26
- return { bottom: 20, left: 20 };
26
+ return { bottom: 20, left: 20, ...r };
27
27
  case "left":
28
- return { bottom: "10%", left: 20 };
28
+ return { bottom: "10%", left: 20, ...r };
29
29
  case "right":
30
- return { bottom: "10%", right: 20 };
30
+ return { bottom: "10%", right: 20, ...r };
31
31
  default:
32
32
  return { bottom: 20, right: 20 };
33
33
  }
34
34
  return b;
35
35
  }, Rt = nt(({
36
36
  graphInfo: b,
37
- cyRef: c,
37
+ cyRef: r,
38
38
  initNodeScale: k,
39
39
  typeObj: N,
40
40
  relationObj: V,
41
41
  colors: fe
42
42
  }, be) => {
43
- const W = { ...H, ...fe }, { graphData: we, layoutType: ye, setLayoutType: Ce, queryStatisticsConfig: L, actionBar: x } = lt(yt), G = typeof x == "boolean" ? x : !0, J = (x == null ? void 0 : x.position) || "top-left", Q = (x == null ? void 0 : x.actionList) ?? Lt, [j, ve] = v((x == null ? void 0 : x.isExpand) ?? !1), [E, xe] = v(""), [Se, U] = v(!1), [X, Ne] = v(k), [Le, A] = v(!1), [ke, T] = v(!1), [Y, De] = v(null), [Ee, R] = v(!1), [ee, te] = v(!1), [Ie, Ve] = v("node"), z = de(null), oe = de(null), Pe = Array.isArray(L) ? L.length > 0 : L, [ne, Oe] = v(Pe), [le, je] = v(/* @__PURE__ */ new Set()), [se, Ae] = v(/* @__PURE__ */ new Set());
43
+ const W = { ...H, ...fe }, { graphData: we, layoutType: ye, setLayoutType: Ce, queryStatisticsConfig: L, actionBar: x } = lt(yt), G = typeof x == "boolean" ? x : !0, J = (x == null ? void 0 : x.position) || "left", Q = (x == null ? void 0 : x.actionList) ?? Lt, [j, ve] = v((x == null ? void 0 : x.isExpand) ?? !1), [D, xe] = v(""), [Se, U] = v(!1), [X, Ne] = v(k), [Le, A] = v(!1), [ke, T] = v(!1), [Y, Ee] = v(null), [De, R] = v(!1), [ee, te] = v(!1), [Ie, Ve] = v("node"), z = de(null), oe = de(null), Pe = Array.isArray(L) ? L.length > 0 : L, [ne, Oe] = v(Pe), [le, je] = v(/* @__PURE__ */ new Set()), [se, Ae] = v(/* @__PURE__ */ new Set());
44
44
  st(be, () => ({
45
45
  onPathAnalysis: () => {
46
46
  re();
47
47
  }
48
48
  })), at(() => {
49
49
  ae();
50
- }, [E]);
50
+ }, [D]);
51
51
  const ae = async (e) => {
52
- const o = c.current;
53
- if (!o || !E) {
52
+ const o = r.current;
53
+ if (!o || !D) {
54
54
  o == null || o.fit();
55
55
  return;
56
56
  }
57
57
  o == null || o.nodes().removeClass("highlight selected grayed highlighted path-node"), o.elements().removeClass("level-highlight level-selected grayed path-edge");
58
58
  const n = o.nodes().filter((l) => {
59
- const i = (l.data("name") || "").toLowerCase(), s = (l.data("role") || "").toLowerCase(), h = (l.data("dept") || "").toLowerCase(), m = String(l.data("id") || "").toLowerCase();
60
- return i.includes(E.toLowerCase()) || s.includes(E.toLowerCase()) || h.includes(E.toLowerCase()) || m.includes(E.toLowerCase());
59
+ const c = (l.data("name") || "").toLowerCase(), s = (l.data("role") || "").toLowerCase(), h = (l.data("dept") || "").toLowerCase(), m = String(l.data("id") || "").toLowerCase();
60
+ return c.includes(D.toLowerCase()) || s.includes(D.toLowerCase()) || h.includes(D.toLowerCase()) || m.includes(D.toLowerCase());
61
61
  });
62
62
  o.nodes().removeClass("highlight"), n.addClass("highlight"), n.length === 1 ? (console.log("matchedNodes:::", n), o.animate({
63
63
  center: {
@@ -66,7 +66,7 @@ const M = (b, c) => (k) => {
66
66
  duration: 500
67
67
  })) : alert("未找到对应节点");
68
68
  }, Te = (e) => {
69
- const o = c.current;
69
+ const o = r.current;
70
70
  if (!o) return;
71
71
  const n = o.zoom();
72
72
  console.log(999, n);
@@ -87,36 +87,36 @@ const M = (b, c) => (k) => {
87
87
  }, Fe = (e) => {
88
88
  var n;
89
89
  Ce(e);
90
- const o = c.current;
91
- o && (o.nodes().unlock(), Ct(c, e), e === "cose-bilkent" && ((n = b == null ? void 0 : b.searchNodes) == null ? void 0 : n.length) === 2 && vt(
90
+ const o = r.current;
91
+ o && (o.nodes().unlock(), Ct(r, e), e === "cose-bilkent" && ((n = b == null ? void 0 : b.searchNodes) == null ? void 0 : n.length) === 2 && vt(
92
92
  o,
93
93
  b.searchNodes[0],
94
94
  b.searchNodes[1]
95
95
  ));
96
96
  }, He = () => {
97
- const e = c.current;
97
+ const e = r.current;
98
98
  e && wt(e);
99
99
  }, _e = () => {
100
- const e = c.current;
100
+ const e = r.current;
101
101
  if (!e) return;
102
102
  const o = ge(e);
103
- De(o), R(!0);
103
+ Ee(o), R(!0);
104
104
  }, ie = (e, o) => {
105
105
  const n = e.current;
106
106
  if (!n) return;
107
107
  const l = 2;
108
108
  if (o === "downloadPng") {
109
- const i = n.png({ scale: l, bg: "transparent", full: !0, quality: 1 });
110
- pe(i, `graph_${Date.now()}.png`);
109
+ const c = n.png({ scale: l, bg: "transparent", full: !0, quality: 1 });
110
+ pe(c, `graph_${Date.now()}.png`);
111
111
  } else if (o === "downloadJpg") {
112
- const i = n.jpg({ scale: l, bg: "#ffffff", full: !0, quality: 1 });
113
- pe(i, `graph_${Date.now()}.jpg`);
112
+ const c = n.jpg({ scale: l, bg: "#ffffff", full: !0, quality: 1 });
113
+ pe(c, `graph_${Date.now()}.jpg`);
114
114
  }
115
115
  }, We = () => {
116
- const e = c.current;
116
+ const e = r.current;
117
117
  if (!e) return;
118
- const o = ge(e), { nodes: n = [], edges: l = [] } = o, i = n.map((m) => {
119
- var p, r;
118
+ const o = ge(e), { nodes: n = [], edges: l = [] } = o, c = n.map((m) => {
119
+ var p, i;
120
120
  const d = m.data || {}, S = d.properties || {};
121
121
  return {
122
122
  节点名称: d.name || d.label || "",
@@ -124,7 +124,7 @@ const M = (b, c) => (k) => {
124
124
  节点类型: d.types || "",
125
125
  URI: d.label || "",
126
126
  X坐标: ((p = m.position) == null ? void 0 : p.x) || "",
127
- Y坐标: ((r = m.position) == null ? void 0 : r.y) || "",
127
+ Y坐标: ((i = m.position) == null ? void 0 : i.y) || "",
128
128
  层级: d.level || "",
129
129
  宽度: d.baseWidth || "",
130
130
  高度: d.baseHeight || "",
@@ -133,8 +133,8 @@ const M = (b, c) => (k) => {
133
133
  属性值: S.value || ""
134
134
  };
135
135
  }), s = l.map((m) => {
136
- var r, a, w, D;
137
- const d = m.data || {}, S = ((a = (r = d.source) == null ? void 0 : r.split("/#")[0]) == null ? void 0 : a.split("/").pop()) || d.source, p = ((D = (w = d.target) == null ? void 0 : w.split("/#")[0]) == null ? void 0 : D.split("/").pop()) || d.target;
136
+ var i, a, w, E;
137
+ const d = m.data || {}, S = ((a = (i = d.source) == null ? void 0 : i.split("/#")[0]) == null ? void 0 : a.split("/").pop()) || d.source, p = ((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
  目标节点: p,
@@ -144,8 +144,8 @@ const M = (b, c) => (k) => {
144
144
  关系ID: d.id || ""
145
145
  };
146
146
  }), h = P.book_new();
147
- if (i.length > 0) {
148
- const m = P.json_to_sheet(i);
147
+ if (c.length > 0) {
148
+ const m = P.json_to_sheet(c);
149
149
  m["!cols"] = [
150
150
  { wch: 30 },
151
151
  // 节点名称
@@ -205,16 +205,16 @@ const M = (b, c) => (k) => {
205
205
  case "previewDataList":
206
206
  break;
207
207
  case "downloadJpg":
208
- ie(c, o);
208
+ ie(r, o);
209
209
  break;
210
210
  case "downloadPng":
211
- ie(c, o);
211
+ ie(r, o);
212
212
  break;
213
213
  }
214
214
  }, $e = () => {
215
215
  A(!1), T(!1), z.current.open();
216
216
  }, Be = (e) => {
217
- const o = c.current;
217
+ const o = r.current;
218
218
  if (o)
219
219
  if (o.panningEnabled(!0), e === "all")
220
220
  o.nodes().addClass("selected"), o.nodes().select(), o.elements().select();
@@ -235,7 +235,7 @@ const M = (b, c) => (k) => {
235
235
  console.log("框选结束"), o.zoomingEnabled(!0), o.panningEnabled(!0);
236
236
  }));
237
237
  }, Ze = () => {
238
- const e = c.current;
238
+ const e = r.current;
239
239
  if (console.log("isShow::::"), Se)
240
240
  U(!1), e.nodes('[types="typed-literal" ]').style("visibility", "visible"), e.edges().style("visibility", "visible");
241
241
  else {
@@ -244,16 +244,16 @@ const M = (b, c) => (k) => {
244
244
  o.style("visibility", "hidden"), o.connectedEdges().style("visibility", "hidden");
245
245
  }
246
246
  }, Ke = (e) => {
247
- const o = c.current;
247
+ const o = r.current;
248
248
  if (!o) return;
249
249
  const n = e === "out" ? Math.max(X * 0.8, 0.1) : Math.min(X * 1.2, 5);
250
250
  Ne(n);
251
251
  const l = o.nodes();
252
- l.style("width", (i) => (i.data("baseWidth") || q) * n), l.style("height", (i) => (i.data("baseHeight") || q) * n);
252
+ l.style("width", (c) => (c.data("baseWidth") || q) * n), l.style("height", (c) => (c.data("baseHeight") || q) * n);
253
253
  }, Me = (e) => {
254
254
  xe(e.content), ae(e.content);
255
255
  }, qe = (e = "刘强东", o = "1") => {
256
- const n = c.current;
256
+ const n = r.current;
257
257
  if (!n) return;
258
258
  n.elements().removeClass("level-highlight level-selected grayed path-edge");
259
259
  const l = n.nodes().filter((p) => (p.data("name") || p.data("id") || "").toString().includes(e));
@@ -261,51 +261,51 @@ const M = (b, c) => (k) => {
261
261
  F.warning(`未找到节点: ${e}`);
262
262
  return;
263
263
  }
264
- const i = parseInt(o) || 1, s = n.collection(), h = [];
264
+ const c = parseInt(o) || 1, s = n.collection(), h = [];
265
265
  l.forEach((p) => {
266
266
  p.addClass("level-selected"), s.merge(p);
267
- let r = n.collection();
267
+ let i = n.collection();
268
268
  const a = /* @__PURE__ */ new Set();
269
- a.add(p.id()), i >= 1 && (r = p.neighborhood().nodes(), r.forEach((w) => {
269
+ a.add(p.id()), c >= 1 && (i = p.neighborhood().nodes(), i.forEach((w) => {
270
270
  a.add(w.id()), s.merge(w);
271
- }), h.push(r));
272
- for (let w = 2; w <= i; w++) {
273
- const D = n.collection();
274
- r.forEach(($) => {
271
+ }), h.push(i));
272
+ for (let w = 2; w <= c; w++) {
273
+ const E = n.collection();
274
+ i.forEach(($) => {
275
275
  $.neighborhood().nodes().forEach((B) => {
276
- a.has(B.id()) || (a.add(B.id()), D.merge(B));
276
+ a.has(B.id()) || (a.add(B.id()), E.merge(B));
277
277
  });
278
- }), D.forEach(($) => s.merge($)), h.push(D), r = D;
278
+ }), E.forEach(($) => s.merge($)), h.push(E), i = E;
279
279
  }
280
280
  }), h.forEach((p) => {
281
281
  p.addClass("level-highlight");
282
282
  }), n.edges().filter((p) => {
283
- const r = p.source(), a = p.target();
284
- return s.contains(r) && s.contains(a);
283
+ const i = p.source(), a = p.target();
284
+ return s.contains(i) && s.contains(a);
285
285
  }).addClass("path-edge");
286
286
  const d = n.elements().filter(".level-selected, .level-highlight, .path-edge");
287
- n.elements().not(d).addClass("grayed"), F.success(`已高亮 "${e}" 及其 ${i} 度关联节点和连线`);
287
+ n.elements().not(d).addClass("grayed"), F.success(`已高亮 "${e}" 及其 ${c} 度关联节点和连线`);
288
288
  }, Ge = (e) => {
289
- const o = c.current;
289
+ const o = r.current;
290
290
  if (!o) return;
291
291
  const n = new Set(le);
292
292
  n.has(e) ? (n.delete(e), o.nodes().filter((l) => l.data("type") === e).show()) : (n.add(e), o.nodes().filter((l) => l.data("type") === e).hide()), je(n);
293
293
  }, Qe = (e) => {
294
- const o = c.current;
294
+ const o = r.current;
295
295
  if (!o) return;
296
296
  const n = new Set(se);
297
297
  n.has(e) ? (n.delete(e), o.edges().filter((l) => l.data("name") === e).show()) : (n.add(e), o.edges().filter((l) => l.data("name") === e).hide()), Ae(n);
298
298
  }, Ue = () => {
299
- const e = c.current;
299
+ const e = r.current;
300
300
  e.remove(e.elements());
301
301
  }, Xe = () => {
302
302
  te(!ee);
303
303
  }, Ye = (e) => {
304
- var i, s;
305
- const o = c.current;
304
+ var c, s;
305
+ const o = r.current;
306
306
  if (!o) return;
307
307
  console.log("saveNodeConfig values:", e), console.log("showLabel value:", e.showLabel);
308
- const n = typeof e.fontColor == "object" && ((s = (i = e.fontColor) == null ? void 0 : i.toHexString) == null ? void 0 : s.call(i)) || e.fontColor, l = e.showLabel === "show";
308
+ const n = typeof e.fontColor == "object" && ((s = (c = e.fontColor) == null ? void 0 : c.toHexString) == null ? void 0 : s.call(c)) || e.fontColor, l = e.showLabel === "show";
309
309
  console.log("showLabelValue:", l), o.nodes().forEach((h) => {
310
310
  const m = l && (h.data("name") || h.data("label")) || "";
311
311
  console.log("Setting node label:", m), h.style({
@@ -325,11 +325,11 @@ const M = (b, c) => (k) => {
325
325
  }, Re = () => {
326
326
  oe.current.open(we);
327
327
  }, et = (e) => {
328
- var h, m, d, S, p, r;
329
- const o = c.current;
328
+ var h, m, d, S, p, i;
329
+ const o = r.current;
330
330
  if (!o) return;
331
331
  console.log("saveEdgeConfig values:", e), console.log("edge showLabel value:", e.showLabel);
332
- const n = typeof e.edgeColor == "object" && ((m = (h = e.edgeColor) == null ? void 0 : h.toHexString) == null ? void 0 : m.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, i = typeof e.labelBgColor == "object" && ((r = (p = e.labelBgColor) == null ? void 0 : p.toHexString) == null ? void 0 : r.call(p)) || e.labelBgColor, s = e.showLabel === "show";
332
+ const n = typeof e.edgeColor == "object" && ((m = (h = e.edgeColor) == null ? void 0 : h.toHexString) == null ? void 0 : m.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 = (p = e.labelBgColor) == null ? void 0 : p.toHexString) == null ? void 0 : i.call(p)) || e.labelBgColor, s = e.showLabel === "show";
333
333
  o.edges().forEach((a) => {
334
334
  const w = s && (a.data("label") || a.data("name")) || "";
335
335
  console.log("Setting edge label:", w), a.style({
@@ -343,19 +343,19 @@ const M = (b, c) => (k) => {
343
343
  "font-style": e.fontStyle,
344
344
  label: w,
345
345
  "text-opacity": w ? 1 : 0,
346
- "text-background-color": i || "transparent",
347
- "text-background-opacity": i ? 1 : 0,
346
+ "text-background-color": c || "transparent",
347
+ "text-background-opacity": c ? 1 : 0,
348
348
  "text-background-padding": "2px"
349
349
  });
350
350
  }), F.success("连线配置保存成功");
351
- }, tt = Ot(J), C = J === "left" || J === "right";
351
+ }, tt = Ot(J, x.positionDetail), C = J === "left" || J === "right";
352
352
  if (console.log(1e3, G, Q), !G) return null;
353
353
  const ot = Array.isArray(L) && (L == null ? void 0 : L.length) > 0 ? L : kt, ce = () => /* @__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
- j ? C ? /* @__PURE__ */ t(Dt, {}) : /* @__PURE__ */ t(Et, {}) : C ? /* @__PURE__ */ t(It, {}) : /* @__PURE__ */ t(Vt, {})
358
+ j ? C ? /* @__PURE__ */ t(Et, {}) : /* @__PURE__ */ t(Dt, {}) : C ? /* @__PURE__ */ t(It, {}) : /* @__PURE__ */ t(Vt, {})
359
359
  ] });
360
360
  return /* @__PURE__ */ g(Z, { 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", {
@@ -369,14 +369,14 @@ const M = (b, c) => (k) => {
369
369
  collapsed: !j && !C
370
370
  }), children: Q.map(({ key: e, title: o, icon: n, onClick: l }) => {
371
371
  var m, d, S, p;
372
- const i = () => n && n.length > 0 ? n.length > 1 ? /* @__PURE__ */ t(y, { gap: "5px", children: n.map((r, a) => e === "nodeZoom" ? K.cloneElement(r, {
372
+ const c = () => n && n.length > 0 ? n.length > 1 ? /* @__PURE__ */ t(y, { gap: "5px", children: n.map((i, a) => e === "nodeZoom" ? K.cloneElement(i, {
373
373
  onClick: () => Ke(a === 0 ? "in" : "out"),
374
374
  key: a
375
- }) : e === "canvasZoom" ? K.cloneElement(r, {
375
+ }) : e === "canvasZoom" ? K.cloneElement(i, {
376
376
  onClick: () => Te(a === 0 ? "in" : "out"),
377
377
  key: a
378
- }) : K.cloneElement(r, { key: a })) }) : /* @__PURE__ */ t(y, { gap: "5px", children: n }) : null, s = (r) => {
379
- switch (console.log(444, e, r), e) {
378
+ }) : K.cloneElement(i, { key: a })) }) : /* @__PURE__ */ t(y, { gap: "5px", children: n }) : null, s = (i) => {
379
+ switch (console.log(444, e, i), e) {
380
380
  case "queryStatistics":
381
381
  Oe(!ne);
382
382
  break;
@@ -393,20 +393,20 @@ const M = (b, c) => (k) => {
393
393
  Re();
394
394
  break;
395
395
  default:
396
- r == null || r(c);
396
+ i == null || i(r);
397
397
  }
398
398
  };
399
399
  if (["layout", "analysis", "select", "downloadData", "textPosition"].includes(e)) {
400
- let r = [];
400
+ let i = [];
401
401
  switch (e) {
402
402
  case "layout":
403
- r = (m = ft) == null ? void 0 : m.map((a) => ({
403
+ i = (m = ft) == null ? void 0 : m.map((a) => ({
404
404
  ...a,
405
405
  label: /* @__PURE__ */ t("div", { className: I({ "text-[#145afd]": ye === a.key }), onClick: M(Fe, a.key), children: a.label })
406
406
  }));
407
407
  break;
408
408
  case "analysis":
409
- r = ut.map((a) => ({
409
+ i = ut.map((a) => ({
410
410
  ...a,
411
411
  label: /* @__PURE__ */ t("div", { onClick: (w) => {
412
412
  switch (w.stopPropagation(), a.key) {
@@ -424,35 +424,35 @@ const M = (b, c) => (k) => {
424
424
  }));
425
425
  break;
426
426
  case "select":
427
- r = (d = mt) == null ? void 0 : d.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: M(Be, a.key), children: a.label }) }));
427
+ i = (d = mt) == null ? void 0 : d.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: M(Be, a.key), children: a.label }) }));
428
428
  break;
429
429
  case "downloadData":
430
- r = (S = pt) == null ? void 0 : S.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: (w) => Je(w, a.key), children: a.label }) }));
430
+ i = (S = pt) == null ? void 0 : S.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: (w) => Je(w, a.key), children: a.label }) }));
431
431
  break;
432
432
  case "textPosition":
433
- r = (p = ue) == null ? void 0 : p.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: M(() => gt(c, a.key), a.key), children: a.label }) }));
433
+ i = (p = ue) == null ? void 0 : p.map((a) => ({ ...a, label: /* @__PURE__ */ t("div", { onClick: M(() => gt(r, a.key), a.key), children: a.label }) }));
434
434
  break;
435
435
  }
436
- return /* @__PURE__ */ t(rt, { trigger: ["hover"], placement: C ? "bottomRight" : "bottom", menu: { items: r }, children: /* @__PURE__ */ g(y, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor bar-item", children: [
437
- i(),
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
+ c(),
438
438
  /* @__PURE__ */ t(y, { className: "w-100", justify: "center", children: o })
439
439
  ] }) }, e);
440
440
  }
441
441
  return /* @__PURE__ */ g(y, { wrap: !0, align: "center", justify: "center", className: "hove-active cursor bar-item", onClick: () => s(l), children: [
442
- i(),
442
+ c(),
443
443
  /* @__PURE__ */ t(y, { className: "w-100", justify: "center", children: o })
444
444
  ] }, e);
445
445
  }) }),
446
446
  C && ce()
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(c, { nodes: e.map((o) => ({ id: o })) }), closePath: () => T(!1) }),
449
+ /* @__PURE__ */ t(St, { isVisible: ke, analysis: (e) => bt(r, { nodes: e.map((o) => ({ id: o })) }), 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
- open: Ee,
455
+ open: De,
456
456
  onCancel: () => R(!1),
457
457
  footer: null,
458
458
  width: 800,
@@ -504,7 +504,7 @@ const M = (b, c) => (k) => {
504
504
  he,
505
505
  {
506
506
  items: ot.map(({ key: e, label: o }) => {
507
- var n, l, i;
507
+ var n, l, c;
508
508
  return e === "entity" ? {
509
509
  label: o,
510
510
  key: e,
@@ -536,7 +536,7 @@ const M = (b, c) => (k) => {
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: (i = Object.values(V)) == null ? void 0 : i.reduce((s, h) => s + h, 0) })
539
+ /* @__PURE__ */ t("span", { children: (c = Object.values(V)) == null ? void 0 : c.reduce((s, h) => s + h, 0) })
540
540
  ] }),
541
541
  /* @__PURE__ */ t(y, { gap: "5px", justify: "start", className: "w-100 static-wraper", wrap: !0, children: Object.keys(V).map((s) => /* @__PURE__ */ g(y, { gap: "4px", justify: "space-between", className: `w-100 cursor ${se.has(s) ? "opacity-30" : ""}`, onClick: () => Qe(s), children: [
542
542
  /* @__PURE__ */ g("span", { children: [
@@ -551,7 +551,7 @@ const M = (b, c) => (k) => {
551
551
  }
552
552
  ) })
553
553
  ] });
554
- }), jt = ({ onSave: b, colors: c }) => {
554
+ }), jt = ({ onSave: b, colors: r }) => {
555
555
  const [k] = f.useForm();
556
556
  return /* @__PURE__ */ g(f, { form: k, layout: "vertical", onFinish: b, className: "setting-form", children: [
557
557
  /* @__PURE__ */ g("div", { className: "setting-form-content", children: [
@@ -562,8 +562,8 @@ const M = (b, c) => (k) => {
562
562
  ] }) }),
563
563
  /* @__PURE__ */ t(f.Item, { label: "字体位置", name: "textPosition", initialValue: "bottom", children: /* @__PURE__ */ t(u, { children: ue.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: c.nodeLabelColor, children: /* @__PURE__ */ t(_, { showText: !0 }) }),
566
- /* @__PURE__ */ t(f.Item, { label: "字体大小", name: "fontSize", initialValue: c.nodeLabelFontSize, children: /* @__PURE__ */ t(O, { type: "number", placeholder: "请输入字体大小" }) }),
565
+ /* @__PURE__ */ t(f.Item, { label: "字体颜色", name: "fontColor", initialValue: r.nodeLabelColor, children: /* @__PURE__ */ t(_, { showText: !0 }) }),
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: "常规" }),
569
569
  /* @__PURE__ */ t(u.Option, { value: "bold", children: "粗体" }),
@@ -576,7 +576,7 @@ const M = (b, c) => (k) => {
576
576
  ] }),
577
577
  /* @__PURE__ */ t("div", { className: "setting-form-footer", children: /* @__PURE__ */ t(f.Item, { children: /* @__PURE__ */ t(me, { type: "primary", htmlType: "submit", block: !0, children: "保存节点配置" }) }) })
578
578
  ] });
579
- }, At = ({ onSave: b, colors: c }) => {
579
+ }, At = ({ onSave: b, colors: r }) => {
580
580
  const [k] = f.useForm();
581
581
  return /* @__PURE__ */ g(f, { form: k, layout: "vertical", onFinish: b, className: "setting-form", children: [
582
582
  /* @__PURE__ */ g("div", { className: "setting-form-content", children: [
@@ -585,13 +585,13 @@ const M = (b, c) => (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: c.edgeDefaultColor, children: /* @__PURE__ */ t(_, { showText: !0 }) }),
588
+ /* @__PURE__ */ t(f.Item, { label: "连线颜色", name: "edgeColor", initialValue: r.edgeDefaultColor, children: /* @__PURE__ */ t(_, { 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
- /* @__PURE__ */ t(f.Item, { label: "字体大小", name: "fontSize", initialValue: c.edgeLabelFontSize, children: /* @__PURE__ */ t(O, { type: "number", placeholder: "请输入字体大小" }) }),
594
- /* @__PURE__ */ t(f.Item, { label: "字体颜色", name: "fontColor", initialValue: c.edgeLabelColor, children: /* @__PURE__ */ t(_, { showText: !0 }) }),
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(_, { 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: "粗体" })
@@ -11,7 +11,8 @@ interface ActionBarProps {
11
11
  typeObj?: any;
12
12
  relationObj?: any;
13
13
  actionBar?: {
14
- position?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | {
14
+ position?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
15
+ positionDetail: {
15
16
  top?: string | number;
16
17
  right?: string | number;
17
18
  bottom?: string | number;
package/lib/style.css CHANGED
@@ -1 +1 @@
1
- *{margin:0;padding:0;box-sizing:border-box}html,body,#root{width:100%;height:100%;margin:0;padding:0;overflow:hidden}.cytoscape-container{width:100%;height:100%}.search-input{padding:8px 12px;width:300px;margin-bottom:10px;border:1px solid #ddd;border-radius:4px}.btn-group{margin-bottom:10px}.btn{padding:8px 16px;margin:0 5px;border:none;border-radius:4px;background:#4285f4;color:#fff;cursor:pointer}.btn:hover{background:#3367d6}.result-text{margin-bottom:10px;color:#333;font-size:14px}.cy-container{width:100%;height:100%}.cy-container :global(.grayed){opacity:.3!important;background-color:#bdbdbd!important;color:#757575!important}.cy-container :global(.highlighted){background-color:#ffeb3b!important;border-color:#fbc02d!important;color:#333!important}.cy-container :global(.selected){border-color:#4caf50!important;background-color:#a5d6a7!important;color:#1b5e20!important}.cy-container .cy-edge:selected{line-color:#ea4335;line-width:3px;line-style:solid}.cy-container .cy-node:hover:not(:selected){background-color:#3367d6}.cy-container .cy-edge:hover:not(:selected){line-color:#757575}.path-nodes-container{margin-bottom:15px}.path-nodes-container h3{margin:10px 0;font-size:16px;color:#333}.node-input-row{display:flex;align-items:center;margin-bottom:8px}.node-input-row span{margin-right:10px;min-width:60px}.node-input-row input{flex:1;margin-right:10px}.remove-node-btn{background:#f44336;padding:6px 12px;font-size:12px}.add-node-btn{background:#4caf50;padding:8px 16px;margin-top:10px}.menuBtn:nth-child(1){transform:rotate(0) skew(31deg)}.menuBtn:nth-child(2){transform:rotate(51deg) skew(31deg)}.menuBtn:nth-child(3){transform:rotate(102deg) skew(31deg)}.menuBtn:nth-child(4){transform:rotate(153deg) skew(31deg)}.menuBtn:nth-child(5){transform:rotate(204deg) skew(31deg)}.menuBtn:nth-child(6){transform:rotate(255deg) skew(31deg)}.menuBtn:nth-child(7){transform:rotate(306deg) skew(35deg)}.menuBtn .menu-item{color:#fff;display:block;width:50px;height:20px;position:absolute;text-align:center;font-size:12px}.menuBtn .menu-item:hover{background:transparent!important}.menuBtn .menu-item{bottom:5px;right:19px;transform:skew(-30deg) translate(-9%) rotate(2deg) translateY(0)}.menuCertent{width:60px;height:60px;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;left:50%;margin-top:-15%;margin-left:-15%;z-index:999;border-radius:50%;color:#fff;text-align:center;font-size:16px;cursor:pointer;border:2px solid #c9cec9}.opacity-30{opacity:.3}.cursor{cursor:pointer}.my-4px{margin:4px 0}.z-10{z-index:10}.hidden{display:none}.w-20px{width:20px}.h-100{height:100%}.rounded-50{border-radius:10%}.relative{position:relative}.absolute{position:absolute}.w-100{width:100%}.graph-bar{position:absolute;display:flex;align-items:center;z-index:10}.graph-bar .graph-bar-min-vertical{padding:0!important}.graph-bar .graph-bar-min{display:flex;background:#fff;padding:4px;box-shadow:0 4px 20px #100dae33;border-radius:6px;flex-wrap:nowrap;gap:10px;width:auto;white-space:nowrap}.graph-bar .graph-bar-menu{position:relative;cursor:pointer;margin:0 10px;white-space:nowrap;display:flex;align-items:center}.graph-bar .graph-bar-menu:hover .grap-menu-dropdown-item{color:#145afd}.graph-bar .grap-menu-dropdown{background:#fff;box-shadow:0 4px 20px #0000003b;border-radius:6px;position:absolute;padding:5px 0;z-index:99;top:60px}.graph-bar .grap-menu-dropdown p{white-space:nowrap;padding:5px 15px}.graph-bar .grap-menu-dropdown p:hover{background:#f5f5f5;color:#145afd}.graph-bar .grap-menu-dropdown-item{display:flex;cursor:pointer;flex-direction:column;align-items:center}.graph-bar .hide{display:none}.graph-bar .show{display:block}.graph-bar .graph-bar-expand-wrapper-vertical{overflow:hidden;max-height:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper{overflow:hidden;max-width:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper.collapsed{max-width:0;opacity:0;margin:0!important}.graph-bar .graph-bar-expand-wrapper-vertical.collapsed-vertical{max-height:0;opacity:0;margin:0!important}.graph-bar .graph-bar-min:not(.graph-bar-min-vertical) .graph-bar-expand-wrapper{display:flex;align-items:center;gap:10px;margin-left:10px;margin-right:10px}.graph-bar.graph-bar-vertical{flex-direction:column}.graph-bar.graph-bar-vertical .graph-bar-min{flex-direction:column;align-items:flex-start;position:relative;padding-bottom:0!important}.graph-bar.graph-bar-vertical .graph-bar-expand-wrapper{flex-direction:column;width:100%}.graph-bar.graph-bar-vertical .cursor{align-self:flex-end;flex-shrink:0;position:relative}.graph-bar.graph-bar-vertical .cursor:before{content:"";position:absolute;top:-10px;left:0;right:0;height:10px}.graph-bar.graph-bar-vertical .grap-menu-dropdown{top:auto;left:60px;right:auto}.graph-bar .bar-item{color:#999;font-size:12px;margin:12px 0}.graph-bar .oprate-btn{width:76px;color:#145afd;border-right:1px solid #f0f0f0}.graph-bar .oprate-btn-vertical{width:76px;padding:10px 0;color:#145afd;border-top:1px solid #f0f0f0}.gtaph-statics{right:0;z-index:1;background:#fff;padding:10px 20px 20px;box-sizing:border-box;border-radius:10px;width:200px;box-shadow:0 4px 20px #0000003b}.hove-active{cursor:pointer;font-size:14px}.hove-active:hover{color:#145afd}.font-12{font-size:12px}.setting-form{display:flex;flex-direction:column;height:100%}.setting-form .setting-form-content{flex:1;overflow-y:auto;padding:16px}.setting-form .setting-form-footer{position:sticky;bottom:0;background:#fff;padding:16px;border-top:1px solid #f0f0f0;margin-top:auto}.setting-form .setting-form-footer .ant-form-item{margin-bottom:0}.static-wraper{font-size:12px;color:#666}.color-333{color:#333}.rounded-50{border-radius:50%!important}.text-666{color:#666;font-size:12px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;top:20px;padding:10px 20px;border-radius:10px}.path-node{width:380px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b;z-index:10}.path-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.path-node .search-input{margin-bottom:0;padding-bottom:5px}.path-node .btn-group{display:flex;justify-content:flex-end;margin-top:20px}.path-node .ant-select-suffix{width:10px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b}.query-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.radial-menu{position:relative;display:inline-flex;align-items:center;justify-content:center}.radial-svg{position:absolute;top:0;left:0}.sector-group{cursor:pointer;transition:all .2s ease}.sector-group .sector-path{transition:all .2s ease}.sector-group:hover .sector-path{filter:brightness(1.15) drop-shadow(0 2px 4px rgba(0,0,0,.3))}.sector-label{pointer-events:none;text-shadow:0 1px 3px rgba(0,0,0,.4);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.center-avatar{position:absolute;z-index:10;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 15px #0000004d;transition:all .3s ease;overflow:hidden;color:#fff;font-weight:500}.center-avatar img{width:100%;height:100%;object-fit:cover}.center-avatar .center-text{font-size:14px;text-align:center}.center-avatar:hover{transform:scale(1.08);box-shadow:0 6px 20px #0006}.center-avatar:active{transform:scale(.95)}.drawer-wraper,.knowledge-card-drawer{padding-bottom:20px}.drawer-wraper .title,.knowledge-card-drawer .title{font-weight:700;font-size:14px;color:#3d3d3d;position:relative;padding-left:8px}.drawer-wraper .title:before,.knowledge-card-drawer .title:before{position:absolute;left:0;transform:translateY(-50%);top:50%;content:"";width:3px;height:17px;background:#145afd}.drawer-wraper .graph-item,.knowledge-card-drawer .graph-item{height:26px;border-bottom:1px solid #E5E5E5;background:#edf3fe}.drawer-wraper .graph-item:hover,.knowledge-card-drawer .graph-item:hover{background:#edf3fe}.drawer-wraper .noraml-type,.knowledge-card-drawer .noraml-type{font-size:14px;color:#145afd;line-height:26px;text-align:center;border-right:1px solid #E5E5E5}.drawer-wraper .noraml-text,.knowledge-card-drawer .noraml-text{font-size:14px;color:#333;line-height:26px}.drawer-wraper .selected-item,.knowledge-card-drawer .selected-item{background:#edf3fe;color:#1890ff}.drawer-wraper .selected-item .noraml-type,.knowledge-card-drawer .selected-item .noraml-type{background:#347bfc;color:#fff}.drawer-wraper .drawer-card-title,.knowledge-card-drawer .drawer-card-title{font-weight:600;font-size:14px;color:#333;position:relative;padding-bottom:10px;margin:15px 0 10px;cursor:pointer}.drawer-wraper .drawer-card-title:hover,.knowledge-card-drawer .drawer-card-title:hover{color:#145afd}.drawer-wraper .drawer-card-title:after,.knowledge-card-drawer .drawer-card-title:after{content:"";position:absolute;border-bottom:1px solid #DFDFDF;width:100%;left:0;bottom:0}.drawer-wraper .drawer-card-title:before,.knowledge-card-drawer .drawer-card-title:before{content:"";position:absolute;border-bottom:1px solid #145AFD;width:64px;left:0;bottom:0;z-index:1}.collapse-wrap{border-color:#dfdfdf;border-radius:0;height:calc(100vh - 480px);overflow-y:auto}.collapse-wrap .ant-collapse-header{padding:9px 10px!important;background:#fff}.collapse-wrap .ant-collapse-item{border-color:#dfdfdf}.collapse-wrap .ant-collapse-title{font-size:14px;font-weight:700;color:#3d3d3d}.collapse-wrap .ant-collapse-body{max-height:calc(100vh - 550px);overflow-y:auto;width:298px;padding:0 16px 16px!important}.collapse-wrap .ant-collapse-body .ant-card-body{padding:0!important}.collapse-wrap .ant-collapse-body .ant-card{border:none}.property-section-wraper .section-item{display:flex;margin-top:4px}.property-section-wraper .detail-label{color:#333;font-size:14px;white-space:nowrap;flex-shrink:0}.property-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.video-wraper .video-item{height:185px;position:relative;background:#333;border-radius:6px}.video-wraper .video-item-video{width:100%;height:100%;border-radius:6px;object-fit:cover}.relation-section-wraper{display:flex;flex-wrap:wrap;gap:10px}.relation-section-wraper .group{width:100%}.relation-section-wraper .section-card{width:100%;height:100%;border:1px solid #DFDFDF}.relation-section-wraper .section-title{margin-bottom:7px}.relation-section-wraper .entity-name-list{font-size:16px;font-weight:700}.relation-section-wraper .view-details-btn{color:#145afd}.relation-section-wraper .detail-item-tag{background-color:#e6f2ff;font-size:14px;border:1px solid #bdf;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#1082fe;margin-right:3px}.relation-section-wraper .detail-item-tag1{background-color:#fff5df;font-size:14px;border:1px solid #FFE0B8;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#ff9418}.relation-section-wraper .detail-item-list{margin-bottom:3px}.relation-section-wraper .detail-label{color:#676a6c;font-size:14px;white-space:nowrap;flex-shrink:0}.relation-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relation-section-wraper .mb-18px{margin-bottom:18px}.knowledge-card-click{height:100%;overflow:hidden}.knowledge-card-click .drawer-card-title2{font-weight:700;flex-wrap:nowrap;padding-bottom:10px;border-bottom:1px solid #e4e7ed;cursor:pointer;color:#333;margin:14px 0}.knowledge-card-click .drawer-card-title2:hover,.knowledge-card-click .drawer-card-title2.active{color:#145afd}.knowledge-card-click .card-item-click{flex-shrink:0;margin-right:10px;border-right:1px solid #e4e7ed;padding-right:10px;height:100%;background:#fff}.knowledge-card-click .knowledge-card-content{height:100%;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.knowledge-card-click .knowledge-card-content::-webkit-scrollbar{display:none}
1
+ *{margin:0;padding:0;box-sizing:border-box}html,body,#root{width:100%;height:100%;margin:0;padding:0}.cytoscape-container{width:100%;height:100%}.search-input{padding:8px 12px;width:300px;margin-bottom:10px;border:1px solid #ddd;border-radius:4px}.btn-group{margin-bottom:10px}.btn{padding:8px 16px;margin:0 5px;border:none;border-radius:4px;background:#4285f4;color:#fff;cursor:pointer}.btn:hover{background:#3367d6}.result-text{margin-bottom:10px;color:#333;font-size:14px}.cy-container{width:100%;height:100%}.cy-container :global(.grayed){opacity:.3!important;background-color:#bdbdbd!important;color:#757575!important}.cy-container :global(.highlighted){background-color:#ffeb3b!important;border-color:#fbc02d!important;color:#333!important}.cy-container :global(.selected){border-color:#4caf50!important;background-color:#a5d6a7!important;color:#1b5e20!important}.cy-container .cy-edge:selected{line-color:#ea4335;line-width:3px;line-style:solid}.cy-container .cy-node:hover:not(:selected){background-color:#3367d6}.cy-container .cy-edge:hover:not(:selected){line-color:#757575}.path-nodes-container{margin-bottom:15px}.path-nodes-container h3{margin:10px 0;font-size:16px;color:#333}.node-input-row{display:flex;align-items:center;margin-bottom:8px}.node-input-row span{margin-right:10px;min-width:60px}.node-input-row input{flex:1;margin-right:10px}.remove-node-btn{background:#f44336;padding:6px 12px;font-size:12px}.add-node-btn{background:#4caf50;padding:8px 16px;margin-top:10px}.menuBtn:nth-child(1){transform:rotate(0) skew(31deg)}.menuBtn:nth-child(2){transform:rotate(51deg) skew(31deg)}.menuBtn:nth-child(3){transform:rotate(102deg) skew(31deg)}.menuBtn:nth-child(4){transform:rotate(153deg) skew(31deg)}.menuBtn:nth-child(5){transform:rotate(204deg) skew(31deg)}.menuBtn:nth-child(6){transform:rotate(255deg) skew(31deg)}.menuBtn:nth-child(7){transform:rotate(306deg) skew(35deg)}.menuBtn .menu-item{color:#fff;display:block;width:50px;height:20px;position:absolute;text-align:center;font-size:12px}.menuBtn .menu-item:hover{background:transparent!important}.menuBtn .menu-item{bottom:5px;right:19px;transform:skew(-30deg) translate(-9%) rotate(2deg) translateY(0)}.menuCertent{width:60px;height:60px;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;left:50%;margin-top:-15%;margin-left:-15%;z-index:999;border-radius:50%;color:#fff;text-align:center;font-size:16px;cursor:pointer;border:2px solid #c9cec9}.opacity-30{opacity:.3}.cursor{cursor:pointer}.my-4px{margin:4px 0}.z-10{z-index:10}.hidden{display:none}.w-20px{width:20px}.h-100{height:100%}.rounded-50{border-radius:10%}.relative{position:relative}.absolute{position:absolute}.w-100{width:100%}.graph-bar{position:absolute;display:flex;align-items:center;z-index:10}.graph-bar .graph-bar-min-vertical{padding:0!important}.graph-bar .graph-bar-min{display:flex;background:#fff;padding:4px;box-shadow:0 4px 20px #100dae33;border-radius:6px;flex-wrap:nowrap;gap:10px;width:auto;white-space:nowrap}.graph-bar .graph-bar-menu{position:relative;cursor:pointer;margin:0 10px;white-space:nowrap;display:flex;align-items:center}.graph-bar .graph-bar-menu:hover .grap-menu-dropdown-item{color:#145afd}.graph-bar .grap-menu-dropdown{background:#fff;box-shadow:0 4px 20px #0000003b;border-radius:6px;position:absolute;padding:5px 0;z-index:99;top:60px}.graph-bar .grap-menu-dropdown p{white-space:nowrap;padding:5px 15px}.graph-bar .grap-menu-dropdown p:hover{background:#f5f5f5;color:#145afd}.graph-bar .grap-menu-dropdown-item{display:flex;cursor:pointer;flex-direction:column;align-items:center}.graph-bar .hide{display:none}.graph-bar .show{display:block}.graph-bar .graph-bar-expand-wrapper-vertical{overflow:hidden;max-height:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper{overflow:hidden;max-width:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper.collapsed{max-width:0;opacity:0;margin:0!important}.graph-bar .graph-bar-expand-wrapper-vertical.collapsed-vertical{max-height:0;opacity:0;margin:0!important}.graph-bar .graph-bar-min:not(.graph-bar-min-vertical) .graph-bar-expand-wrapper{display:flex;align-items:center;gap:10px;margin-left:10px;margin-right:10px}.graph-bar.graph-bar-vertical{flex-direction:column}.graph-bar.graph-bar-vertical .graph-bar-min{flex-direction:column;align-items:flex-start;position:relative;padding-bottom:0!important}.graph-bar.graph-bar-vertical .graph-bar-expand-wrapper{flex-direction:column;width:100%}.graph-bar.graph-bar-vertical .cursor{align-self:flex-end;flex-shrink:0;position:relative}.graph-bar.graph-bar-vertical .cursor:before{content:"";position:absolute;top:-10px;left:0;right:0;height:10px}.graph-bar.graph-bar-vertical .grap-menu-dropdown{top:auto;left:60px;right:auto}.graph-bar .bar-item{color:#999;font-size:12px;margin:12px 0}.graph-bar .oprate-btn{width:76px;color:#145afd;border-right:1px solid #f0f0f0}.graph-bar .oprate-btn-vertical{width:76px;padding:10px 0;color:#145afd;border-top:1px solid #f0f0f0}.gtaph-statics{right:0;z-index:1;background:#fff;padding:10px 20px 20px;box-sizing:border-box;border-radius:10px;width:200px;box-shadow:0 4px 20px #0000003b}.hove-active{cursor:pointer;font-size:14px}.hove-active:hover{color:#145afd}.font-12{font-size:12px}.setting-form{display:flex;flex-direction:column;height:100%}.setting-form .setting-form-content{flex:1;overflow-y:auto;padding:16px}.setting-form .setting-form-footer{position:sticky;bottom:0;background:#fff;padding:16px;border-top:1px solid #f0f0f0;margin-top:auto}.setting-form .setting-form-footer .ant-form-item{margin-bottom:0}.static-wraper{font-size:12px;color:#666}.color-333{color:#333}.rounded-50{border-radius:50%!important}.text-666{color:#666;font-size:12px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;top:20px;padding:10px 20px;border-radius:10px}.path-node{width:380px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b;z-index:10}.path-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.path-node .search-input{margin-bottom:0;padding-bottom:5px}.path-node .btn-group{display:flex;justify-content:flex-end;margin-top:20px}.path-node .ant-select-suffix{width:10px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b}.query-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.radial-menu{position:relative;display:inline-flex;align-items:center;justify-content:center}.radial-svg{position:absolute;top:0;left:0}.sector-group{cursor:pointer;transition:all .2s ease}.sector-group .sector-path{transition:all .2s ease}.sector-group:hover .sector-path{filter:brightness(1.15) drop-shadow(0 2px 4px rgba(0,0,0,.3))}.sector-label{pointer-events:none;text-shadow:0 1px 3px rgba(0,0,0,.4);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.center-avatar{position:absolute;z-index:10;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 15px #0000004d;transition:all .3s ease;overflow:hidden;color:#fff;font-weight:500}.center-avatar img{width:100%;height:100%;object-fit:cover}.center-avatar .center-text{font-size:14px;text-align:center}.center-avatar:hover{transform:scale(1.08);box-shadow:0 6px 20px #0006}.center-avatar:active{transform:scale(.95)}.drawer-wraper,.knowledge-card-drawer{padding-bottom:20px}.drawer-wraper .title,.knowledge-card-drawer .title{font-weight:700;font-size:14px;color:#3d3d3d;position:relative;padding-left:8px}.drawer-wraper .title:before,.knowledge-card-drawer .title:before{position:absolute;left:0;transform:translateY(-50%);top:50%;content:"";width:3px;height:17px;background:#145afd}.drawer-wraper .graph-item,.knowledge-card-drawer .graph-item{height:26px;border-bottom:1px solid #E5E5E5;background:#edf3fe}.drawer-wraper .graph-item:hover,.knowledge-card-drawer .graph-item:hover{background:#edf3fe}.drawer-wraper .noraml-type,.knowledge-card-drawer .noraml-type{font-size:14px;color:#145afd;line-height:26px;text-align:center;border-right:1px solid #E5E5E5}.drawer-wraper .noraml-text,.knowledge-card-drawer .noraml-text{font-size:14px;color:#333;line-height:26px}.drawer-wraper .selected-item,.knowledge-card-drawer .selected-item{background:#edf3fe;color:#1890ff}.drawer-wraper .selected-item .noraml-type,.knowledge-card-drawer .selected-item .noraml-type{background:#347bfc;color:#fff}.drawer-wraper .drawer-card-title,.knowledge-card-drawer .drawer-card-title{font-weight:600;font-size:14px;color:#333;position:relative;padding-bottom:10px;margin:15px 0 10px;cursor:pointer}.drawer-wraper .drawer-card-title:hover,.knowledge-card-drawer .drawer-card-title:hover{color:#145afd}.drawer-wraper .drawer-card-title:after,.knowledge-card-drawer .drawer-card-title:after{content:"";position:absolute;border-bottom:1px solid #DFDFDF;width:100%;left:0;bottom:0}.drawer-wraper .drawer-card-title:before,.knowledge-card-drawer .drawer-card-title:before{content:"";position:absolute;border-bottom:1px solid #145AFD;width:64px;left:0;bottom:0;z-index:1}.collapse-wrap{border-color:#dfdfdf;border-radius:0;height:calc(100vh - 480px);overflow-y:auto}.collapse-wrap .ant-collapse-header{padding:9px 10px!important;background:#fff}.collapse-wrap .ant-collapse-item{border-color:#dfdfdf}.collapse-wrap .ant-collapse-title{font-size:14px;font-weight:700;color:#3d3d3d}.collapse-wrap .ant-collapse-body{max-height:calc(100vh - 550px);overflow-y:auto;width:298px;padding:0 16px 16px!important}.collapse-wrap .ant-collapse-body .ant-card-body{padding:0!important}.collapse-wrap .ant-collapse-body .ant-card{border:none}.property-section-wraper .section-item{display:flex;margin-top:4px}.property-section-wraper .detail-label{color:#333;font-size:14px;white-space:nowrap;flex-shrink:0}.property-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.video-wraper .video-item{height:185px;position:relative;background:#333;border-radius:6px}.video-wraper .video-item-video{width:100%;height:100%;border-radius:6px;object-fit:cover}.relation-section-wraper{display:flex;flex-wrap:wrap;gap:10px}.relation-section-wraper .group{width:100%}.relation-section-wraper .section-card{width:100%;height:100%;border:1px solid #DFDFDF}.relation-section-wraper .section-title{margin-bottom:7px}.relation-section-wraper .entity-name-list{font-size:16px;font-weight:700}.relation-section-wraper .view-details-btn{color:#145afd}.relation-section-wraper .detail-item-tag{background-color:#e6f2ff;font-size:14px;border:1px solid #bdf;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#1082fe;margin-right:3px}.relation-section-wraper .detail-item-tag1{background-color:#fff5df;font-size:14px;border:1px solid #FFE0B8;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#ff9418}.relation-section-wraper .detail-item-list{margin-bottom:3px}.relation-section-wraper .detail-label{color:#676a6c;font-size:14px;white-space:nowrap;flex-shrink:0}.relation-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relation-section-wraper .mb-18px{margin-bottom:18px}.knowledge-card-click{height:100%;overflow:hidden}.knowledge-card-click .drawer-card-title2{font-weight:700;flex-wrap:nowrap;padding-bottom:10px;border-bottom:1px solid #e4e7ed;cursor:pointer;color:#333;margin:14px 0}.knowledge-card-click .drawer-card-title2:hover,.knowledge-card-click .drawer-card-title2.active{color:#145afd}.knowledge-card-click .card-item-click{flex-shrink:0;margin-right:10px;border-right:1px solid #e4e7ed;padding-right:10px;height:100%;background:#fff}.knowledge-card-click .knowledge-card-content{height:100%;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.knowledge-card-click .knowledge-card-content::-webkit-scrollbar{display:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-kggraph",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "A knowledge graph visualization component based on Cytoscape",
5
5
  "type": "module",
6
6
  "main": "./lib/index.es.js",
File without changes