react-kggraph 0.0.34 → 0.0.36

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.es3.js CHANGED
@@ -1,79 +1,79 @@
1
- import { jsx as y, jsxs as ne } from "react/jsx-runtime";
2
- import { useRef as C, useState as m, useEffect as T } from "react";
3
- import z from "cytoscape";
4
- import Ee from "cytoscape-cose-bilkent";
5
- import Ne from "cytoscape-cise";
6
- import Pe from "cytoscape-fcose";
7
- import je from "storm-layout";
8
- import we from "./index.es7.js";
1
+ import { jsx as g, jsxs as ne } from "react/jsx-runtime";
2
+ import { useRef as k, useState as m, useEffect as T } from "react";
3
+ import C from "cytoscape";
4
+ import Ne from "cytoscape-cose-bilkent";
5
+ import Pe from "cytoscape-cise";
6
+ import je from "cytoscape-fcose";
7
+ import we from "storm-layout";
8
+ import Le from "./index.es7.js";
9
9
  /* empty css */
10
- import { handleCalcPath as Le, resDetailData as Z } from "./index.es8.js";
10
+ import { handleCalcPath as Se, resDetailData as F } from "./index.es8.js";
11
11
  import { fixNodesToEdges as Oe, coseBilkentLayout as De } from "./index.es9.js";
12
- import { edgeNodeStyles as Re, defaultColors as se, nodeSize as Se } from "./index.es10.js";
13
- import Te from "cytoscape-layout-utilities";
14
- import { message as h } from "antd";
15
- import { menuItemsConfig as $e } from "./index.es11.js";
12
+ import { edgeNodeStyles as Re, defaultColors as se, nodeSize as Te } from "./index.es10.js";
13
+ import $e from "cytoscape-layout-utilities";
14
+ import { Spin as Ie, message as j } from "antd";
15
+ import { menuItemsConfig as Be } from "./index.es11.js";
16
16
  import { jsonStringify as w } from "./index.es12.js";
17
- import Ie from "./index.es13.js";
18
- import Be from "./index.es14.js";
19
- import { GraphProvider as Me } from "./index.es15.js";
20
- import Ae from "./index.es16.js";
21
- import We from "./index.es17.js";
22
- z.use(Te);
23
- z.use(Ne);
24
- z.use(Pe);
25
- z.use(je);
26
- z.use(Ee);
27
- const ct = ({
28
- data: E,
17
+ import Me from "./index.es13.js";
18
+ import Ae from "./index.es14.js";
19
+ import { GraphProvider as We } from "./index.es15.js";
20
+ import He from "./index.es16.js";
21
+ import Ze from "./index.es17.js";
22
+ C.use($e);
23
+ C.use(Pe);
24
+ C.use(je);
25
+ C.use(we);
26
+ C.use(Ne);
27
+ const pt = ({
28
+ data: z,
29
29
  getAllGraphData: $,
30
- highPathAnalysis: F = [],
30
+ highPathAnalysis: X = [],
31
31
  graphInfo: u,
32
32
  stepNextApi: ae,
33
33
  knowledgeCardApi: re,
34
- colors: N,
34
+ colors: E,
35
35
  actionBar: ie,
36
36
  actionCircle: de,
37
37
  queryStatisticsConfig: le = [{ label: "实体", key: "entity" }, { label: "关系", key: "relation" }],
38
38
  className: ce,
39
- noDataDesc: He = "暂无数据"
39
+ noDataDesc: Fe = "暂无数据"
40
40
  }) => {
41
41
  var V, G;
42
- const L = C(null), [v, X] = m([]), c = C(null), q = C(null), K = 1, [Ze, U] = m(!1), [b, I] = m({}), [O, B] = m({}), [pe, ge] = m("cose-bilkent"), Y = C(null), _ = C(null), [ue, J] = m(["", ""]), M = C(N);
42
+ const L = k(null), [h, q] = m([]), c = k(null), K = k(null), U = 1, [pe, I] = m(!1), [v, B] = m({}), [S, M] = m({}), [ge, ue] = m("cose-bilkent"), Y = k(null), _ = k(null), [fe, J] = m(["", ""]), A = k(E);
43
43
  T(() => {
44
- M.current = N;
45
- }, [N]);
46
- const [f, P] = m({
44
+ A.current = E;
45
+ }, [E]);
46
+ const [f, N] = m({
47
47
  visible: !1,
48
48
  x: 0,
49
49
  y: 0,
50
50
  targetNode: null,
51
51
  bgColor: ""
52
- }), [D, Q] = m({
52
+ }), [O, Q] = m({
53
53
  visible: !1,
54
54
  x: 0,
55
55
  y: 0,
56
56
  content: ""
57
- }), fe = $e({ cyRef: c, setContextMenu: P, onPathAnalysis: (V = q.current) == null ? void 0 : V.onPathAnalysis, setPathNodes: J, actionCircle: de });
57
+ }), ye = Be({ cyRef: c, setContextMenu: N, onPathAnalysis: (V = K.current) == null ? void 0 : V.onPathAnalysis, setPathNodes: J, actionCircle: de });
58
58
  T(() => {
59
- const { nodes: t, links: e } = F || {};
60
- ((t == null ? void 0 : t.length) > 0 || (e == null ? void 0 : e.length) > 0) && Le(c, { nodes: t, links: e, isGrayed: !1 });
61
- }, [w(F), w(v)]), T(() => {
62
- const t = [], e = [];
63
- v.forEach((d) => {
64
- d.group === "nodes" ? t.push(d.data) : d.group === "edges" && e.push(d.data);
65
- }), $ == null || $({ graphData: v, nodeStatic: b, relationStatic: O, data: { nodes: t, links: e }, paths: E.paths, data2: E.data2, logId: E.logId, costtime: E.costtime });
66
- }, [w(v), w(b), w(O)]), T(() => {
59
+ const { nodes: e, links: t } = X || {};
60
+ ((e == null ? void 0 : e.length) > 0 || (t == null ? void 0 : t.length) > 0) && Se(c, { nodes: e, links: t, isGrayed: !1 });
61
+ }, [w(X), w(h)]), T(() => {
62
+ const e = [], t = [];
63
+ h.forEach((d) => {
64
+ d.group === "nodes" ? e.push(d.data) : d.group === "edges" && t.push(d.data);
65
+ }), $ == null || $({ graphData: h, nodeStatic: v, relationStatic: S, data: { nodes: e, links: t }, paths: z.paths, data2: z.data2, logId: z.logId, costtime: z.costtime });
66
+ }, [w(h), w(v), w(S)]), T(() => {
67
67
  var i;
68
68
  if (!L.current || c.current) return;
69
- const { elements: t, typeListObj: e, relationListObj: d } = Z(E, { typeObj: b, graphInfo: u });
70
- I(e), X(t), B(d), document.addEventListener("contextmenu", function(a) {
69
+ const { elements: e, typeListObj: t, relationListObj: d } = F(z, { typeObj: v, graphInfo: u });
70
+ B(t), q(e), M(d), document.addEventListener("contextmenu", function(a) {
71
71
  a.preventDefault();
72
72
  });
73
- const s = z({
73
+ const s = C({
74
74
  container: L.current,
75
- elements: t,
76
- style: Re({ elements: t, colors: N }),
75
+ elements: e,
76
+ style: Re({ elements: e, colors: E }),
77
77
  autounselectify: !1,
78
78
  autolock: !1,
79
79
  maxZoom: 1,
@@ -98,7 +98,7 @@ const ct = ({
98
98
  var n;
99
99
  const o = a.target;
100
100
  if (!o.hasClass("path-edge")) {
101
- const r = ((n = M.current) == null ? void 0 : n.edgeHoverColor) ?? se.edgeHoverColor;
101
+ const r = ((n = A.current) == null ? void 0 : n.edgeHoverColor) ?? se.edgeHoverColor;
102
102
  o.style({
103
103
  "line-color": r,
104
104
  "target-arrow-color": r,
@@ -109,7 +109,7 @@ const ct = ({
109
109
  var n;
110
110
  const o = a.target;
111
111
  if (!o.hasClass("path-edge")) {
112
- const r = ((n = M.current) == null ? void 0 : n.edgeDefaultColor) ?? se.edgeDefaultColor;
112
+ const r = ((n = A.current) == null ? void 0 : n.edgeDefaultColor) ?? se.edgeDefaultColor;
113
113
  o.style({
114
114
  "line-color": r,
115
115
  "target-arrow-color": r,
@@ -132,7 +132,7 @@ const ct = ({
132
132
  }), s.on("cxttap", "node", (a) => {
133
133
  a.preventDefault(), a.stopPropagation(), a.stopImmediatePropagation(), a.originalEvent && (a.originalEvent.preventDefault(), a.originalEvent.stopPropagation(), a.originalEvent.stopImmediatePropagation());
134
134
  const o = a.target, n = o.renderedPosition();
135
- console.log("renderedPos:::", o.data(), o.style("background-color")), P({
135
+ console.log("renderedPos:::", o.data(), o.style("background-color")), N({
136
136
  visible: !0,
137
137
  x: n.x - 90,
138
138
  y: n.y - 90,
@@ -142,23 +142,27 @@ const ct = ({
142
142
  }), c.current = s, s.on("click", "node", (a) => {
143
143
  const o = a.target;
144
144
  s.nodes().removeClass("selected grayed highlighted"), s.edges().removeClass("selected grayed highlighted"), o.addClass("selected");
145
- const r = o.neighborhood().nodes().add(o), g = r.edgesWith(r);
146
- console.log("cy.nodes().not(relatedNodes):::", r), s.nodes().not(r).addClass("grayed"), s.edges().not(g).addClass("grayed"), r.addClass("highlighted"), g.addClass("highlighted");
145
+ const r = o.neighborhood().nodes().add(o), p = r.edgesWith(r);
146
+ console.log("cy.nodes().not(relatedNodes):::", r), s.nodes().not(r).addClass("grayed"), s.edges().not(p).addClass("grayed"), r.addClass("highlighted"), p.addClass("highlighted");
147
147
  }), s.on("tap", (a) => {
148
- a.target === s && (P((o) => ({ ...o, visible: !1 })), s.nodes().removeClass("grayed highlighted highlight selected correlationStyle path-node level-highlight level-selected level-grayed"), s.edges().removeClass("grayed highlighted highlight selected correlationStyle path-edge level-highlightedge level-grayed"));
148
+ a.target === s && (N((o) => ({ ...o, visible: !1 })), s.nodes().removeClass("grayed highlighted highlight selected correlationStyle path-node level-highlight level-selected level-grayed"), s.edges().removeClass("grayed highlighted highlight selected correlationStyle path-edge level-highlightedge level-grayed"));
149
149
  }), () => {
150
150
  c.current && (c.current.destroy(), c.current = null);
151
151
  };
152
152
  }, []);
153
- const ye = ({ addedNodes: t, currentNode: e, cy: d, currentZoom: s }) => {
154
- const i = t == null ? void 0 : t.length;
155
- e.data("originalPosition") || e.data("originalPosition", { ...e.position() });
153
+ const me = ({ addedNodes: e, currentNode: t, cy: d, currentZoom: s }) => {
154
+ const i = e == null ? void 0 : e.length;
155
+ t.data("originalPosition") || t.data("originalPosition", { ...t.position() });
156
156
  const a = Math.max(0.1, 18 / (i || 1)), o = d.layout({
157
157
  name: "concentric",
158
158
  spacingFactor: a,
159
159
  // 节点越多间距越小,防止溢出
160
+ // eles: addedNodes.union(currentNode), // 只布局新节点+当前节点,不重算全图
161
+ // eles: addedNodes, // 只布局新节点+当前节点,不重算全图
160
162
  minNodeSpacing: 0,
161
163
  // 最小间距设为0
164
+ fit: !1,
165
+ // 禁止自动适配视口,保持缩放
162
166
  animate: !1,
163
167
  concentric: function(n) {
164
168
  return n.degree();
@@ -172,68 +176,68 @@ const ct = ({
172
176
  // },
173
177
  // 添加随机偏移,打破完美圆环
174
178
  transform: function(n, r) {
175
- const g = (Math.random() - 0.5) * 40, x = (Math.random() - 0.5) * 10;
179
+ const p = (Math.random() - 0.5) * 40, b = (Math.random() - 0.5) * 10;
176
180
  return {
177
- x: r.x + g,
178
- y: r.y + x
181
+ x: r.x + p,
182
+ y: r.y + b
179
183
  };
180
184
  }
181
185
  });
182
186
  o.one("layoutstop", () => {
183
- t.forEach((g) => {
184
- g.style("z-index", Math.floor(Math.random() * 500) + 1);
185
- }), e.style("z-index", 1e3);
186
- const n = e.data("originalPosition"), r = { ...e.position() };
187
- n && (e.position(n), e.animate({
188
- center: { eles: e },
187
+ e.forEach((p) => {
188
+ p.style("z-index", Math.floor(Math.random() * 500) + 1);
189
+ }), t.style("z-index", 1e3);
190
+ const n = t.data("originalPosition"), r = { ...t.position() };
191
+ n && (t.position(n), t.animate({
192
+ center: { eles: t },
189
193
  position: r
190
194
  }, {
191
195
  duration: 900,
192
196
  easing: "ease-out",
193
197
  complete: () => {
194
- t.animate({
198
+ e.animate({
195
199
  style: { opacity: 1 }
196
200
  }, {
197
201
  duration: 900,
198
202
  easing: "ease-out"
199
203
  });
200
204
  }
201
- })), h.destroy();
205
+ })), I(!1);
202
206
  }), o.run(), d.nodes().forEach((n) => n.unlock());
203
- }, me = async (t) => {
204
- const { id: e, kgId: d } = t, s = c.current;
207
+ }, he = async (e) => {
208
+ const { id: t, kgId: d } = e, s = c.current;
205
209
  if (!s) return;
206
- const i = s.$id(e);
210
+ const i = s.$id(t);
207
211
  if (!i || i.length === 0) {
208
212
  console.error("当前节点不存在");
209
213
  return;
210
214
  }
211
- const a = s.nodes().filter((n) => n.data("parentId") ? (n.data("parentId") === e || n.data("idLabel") === `${e}-${n.data("name")}`) && n.data("zktype") === t.zktype : !1);
215
+ const a = s.nodes().filter((n) => n.data("parentId") ? (n.data("parentId") === t || n.data("idLabel") === `${t}-${n.data("name")}`) && n.data("zktype") === e.zktype : !1);
212
216
  if (a.length > 0) {
213
- const n = a.map((l) => l.id()), r = a.connectedEdges(), g = s.edges().filter(
214
- (l) => l.data("source") === e && n.includes(l.data("target"))
215
- ), x = s.edges().filter((l) => l.data("appendedBy") === e), A = r.merge(g).merge(x).filter((l) => l.data().zktype === t.zktype);
217
+ const n = a.map((l) => l.id()), r = a.connectedEdges(), p = s.edges().filter(
218
+ (l) => l.data("source") === t && n.includes(l.data("target"))
219
+ ), b = s.edges().filter((l) => l.data("appendedBy") === t), W = r.merge(p).merge(b).filter((l) => l.data().zktype === e.zktype);
216
220
  a.animate({
217
221
  style: { opacity: 0 }
218
222
  }, {
219
223
  duration: 200,
220
224
  complete: () => {
221
- s.remove(a), s.remove(A), X((ee) => {
222
- const j = ee.filter((k) => {
225
+ s.remove(a), s.remove(W), q((ee) => {
226
+ const P = ee.filter((x) => {
223
227
  var te, oe;
224
- const S = k.data.zktype;
225
- if (k.group === "nodes" && n.includes((te = k.data) == null ? void 0 : te.id) && S && S === t.zktype)
228
+ const R = x.data.zktype;
229
+ if (x.group === "nodes" && n.includes((te = x.data) == null ? void 0 : te.id) && R && R === e.zktype)
226
230
  return !1;
227
- if (k.group === "edges" && S && S === t.zktype) {
228
- const xe = Array.from(x).map((ze) => {
229
- const H = ze.data();
230
- return `${H.source}-${H.target}-${H.label}`;
231
- }), W = k.data, ke = xe.includes(`${W.source}-${W.target}-${W.label}`), Ce = ((oe = k.data) == null ? void 0 : oe.appendedBy) === e;
232
- return !ke && !Ce;
231
+ if (x.group === "edges" && R && R === e.zktype) {
232
+ const ke = Array.from(b).map((Ee) => {
233
+ const Z = Ee.data();
234
+ return `${Z.source}-${Z.target}-${Z.label}`;
235
+ }), H = x.data, Ce = ke.includes(`${H.source}-${H.target}-${H.label}`), ze = ((oe = x.data) == null ? void 0 : oe.appendedBy) === t;
236
+ return !Ce && !ze;
233
237
  }
234
238
  return !0;
235
- }), { typeListObj: p, relationListObj: R } = Z({}, { graphData: j, typeObj: {} });
236
- return I(p), B(R), j;
239
+ }), { typeListObj: y, relationListObj: D } = F({}, { graphData: P, typeObj: {} });
240
+ return B(y), M(D), P;
237
241
  }), i.data("appendedNodes", []), i.data("isExpanded", !1);
238
242
  const l = i.data("originalPosition");
239
243
  l && (i.animate({
@@ -245,33 +249,29 @@ const ct = ({
245
249
  }, 300);
246
250
  } else {
247
251
  try {
248
- U(!0), h.open({
249
- type: "loading",
250
- content: "正在展开...",
251
- duration: 0
252
- });
253
- const n = await ae({ uri: e, queryType: 1, kgId: d, zktype: t.zktype }), { elements: r, typeListObj: g, relationListObj: x } = Z(n.data, { graphData: v, typeObj: b, relationObj: O, zktype: t.zktype });
254
- if (I(g), B(x), !((r == null ? void 0 : r.length) > 0)) {
252
+ I(!0);
253
+ const n = await ae({ uri: t, queryType: 1, kgId: d, zktype: e.zktype }), { elements: r, typeListObj: p, relationListObj: b } = F(n.data, { graphData: h, typeObj: v, relationObj: S, zktype: e.zktype });
254
+ if (B(p), M(b), !((r == null ? void 0 : r.length) > 0)) {
255
255
  setTimeout(() => {
256
- h.destroy(), h.warning("暂无数据");
256
+ j.destroy(), j.warning("暂无数据");
257
257
  }, 2e3);
258
258
  return;
259
259
  }
260
- const A = s.zoom();
260
+ const W = s.zoom();
261
261
  if ((r == null ? void 0 : r.length) > 0) {
262
- const l = r.map((p) => {
263
- if (p.group === "nodes") {
264
- const R = Se * K;
262
+ const l = r.map((y) => {
263
+ if (y.group === "nodes") {
264
+ const D = Te * U;
265
265
  return {
266
- ...p,
266
+ ...y,
267
267
  // position,
268
- style: { opacity: 0, width: R, height: R },
268
+ style: { opacity: 0, width: D, height: D },
269
269
  data: {
270
- ...p.data,
271
- parentId: e,
272
- appendedBy: e,
273
- idLabel: e + "-" + p.data.label,
274
- zktype: t.zktype,
270
+ ...y.data,
271
+ parentId: t,
272
+ appendedBy: t,
273
+ idLabel: t + "-" + y.data.label,
274
+ zktype: e.zktype,
275
275
  isAppended: !0,
276
276
  baseWidth: 80,
277
277
  baseHeight: 80
@@ -279,36 +279,33 @@ const ct = ({
279
279
  };
280
280
  }
281
281
  return {
282
- ...p,
283
- data: { ...p.data, appendedBy: e, zktype: t.zktype }
282
+ ...y,
283
+ data: { ...y.data, appendedBy: t, zktype: e.zktype }
284
284
  };
285
285
  });
286
- console.log(888, l), s.nodes().forEach((p) => {
287
- if (p.data("id") !== e)
288
- return p.lock();
289
- });
290
- const j = s.add(l).filter(":node");
291
- j.style("opacity", 0), ye({ addedNodes: j, currentNode: i, cy: s, currentZoom: A });
286
+ console.log(888, l), s.nodes().lock(), i.unlock();
287
+ const P = s.add(l).filter(":node");
288
+ P.style("opacity", 0), me({ addedNodes: P, currentNode: i, cy: s, currentZoom: W });
292
289
  } else
293
290
  console.log("没有找到相关节点数据");
294
- h.destroy();
291
+ j.destroy();
295
292
  } catch (n) {
296
- h.destroy(), h.error("请求接口失败"), console.error("22请求接口失败:", n);
293
+ j.destroy(), j.error("请求接口失败"), console.error("22请求接口失败:", n);
297
294
  }
298
- U(!1);
295
+ I(!1);
299
296
  }
300
- P({ visible: !1 });
301
- }, he = {
297
+ N({ visible: !1 });
298
+ }, ve = {
302
299
  expanded: "typed-literal",
303
300
  contract: "uri"
304
- }, ve = (t, e) => {
301
+ }, be = (e, t) => {
305
302
  var s;
306
- console.log("handleMenuAction:::", t, e);
307
- const d = e || f.targetNode;
303
+ console.log("handleMenuAction:::", e, t);
304
+ const d = t || f.targetNode;
308
305
  if (d) {
309
- const i = t.ids, a = d.data();
306
+ const i = e.ids, a = d.data();
310
307
  if (["expanded", "contract"].includes(i))
311
- me({ kgId: u.kgId, ...a, zktype: he[i] });
308
+ he({ kgId: u.kgId, ...a, zktype: ve[i] });
312
309
  else if (i === "nodeInfo") {
313
310
  const o = d, n = {
314
311
  id: o.id(),
@@ -322,32 +319,32 @@ const ct = ({
322
319
  };
323
320
  Y.current.open(n);
324
321
  } else i === "knowledgeCard" && _.current.open(d.data());
325
- (s = t.onClick) == null || s.call(t, d), P({ visible: !1, x: 0, y: 0, targetNode: null });
322
+ (s = e.onClick) == null || s.call(e, d), N({ visible: !1, x: 0, y: 0, targetNode: null });
326
323
  }
327
- }, be = () => {
328
- const t = {};
329
- return Object.keys(b).forEach((e) => {
330
- e !== "_" && (t[e] = b[e]);
331
- }), t;
324
+ }, xe = () => {
325
+ const e = {};
326
+ return Object.keys(v).forEach((t) => {
327
+ t !== "_" && (e[t] = v[t]);
328
+ }), e;
332
329
  };
333
- return /* @__PURE__ */ y(Me, { value: { pathNodes: ue, setPathNodes: J, graphInfo: u, graphData: v, layoutType: pe, setLayoutType: ge, knowledgeCardApi: re, queryStatisticsConfig: le, actionBar: ie }, children: /* @__PURE__ */ ne("div", { className: We("cytoscape-container relative", ce), children: [
334
- /* @__PURE__ */ y("div", { className: "btn-group" }),
335
- /* @__PURE__ */ y(
336
- we,
330
+ return /* @__PURE__ */ g(We, { value: { pathNodes: fe, setPathNodes: J, graphInfo: u, graphData: h, layoutType: ge, setLayoutType: ue, knowledgeCardApi: re, queryStatisticsConfig: le, actionBar: ie }, children: /* @__PURE__ */ ne("div", { className: Ze("cytoscape-container relative", ce), children: [
331
+ /* @__PURE__ */ g("div", { className: "btn-group" }),
332
+ /* @__PURE__ */ g(
333
+ Le,
337
334
  {
338
- ref: q,
335
+ ref: K,
339
336
  cyRef: c,
340
337
  graphInfo: u,
341
- initNodeScale: K,
338
+ initNodeScale: U,
342
339
  cyContainerRef: L,
343
- typeObj: be(),
344
- relationObj: O,
345
- colors: N
340
+ typeObj: xe(),
341
+ relationObj: S,
342
+ colors: E
346
343
  }
347
344
  ),
348
345
  /* @__PURE__ */ ne("div", { className: "relative h-100", children: [
349
- /* @__PURE__ */ y("div", { ref: L, className: "cy-container" }),
350
- f.visible && f.targetNode && /* @__PURE__ */ y(
346
+ /* @__PURE__ */ g("div", { ref: L, className: "cy-container" }),
347
+ f.visible && f.targetNode && /* @__PURE__ */ g(
351
348
  "div",
352
349
  {
353
350
  style: {
@@ -366,17 +363,17 @@ const ct = ({
366
363
  height: "200px",
367
364
  overflow: "hidden"
368
365
  },
369
- onClick: (t) => t.stopPropagation(),
370
- children: /* @__PURE__ */ y(Ie, { items: fe, centerImage: (G = f == null ? void 0 : f.targetNode) == null ? void 0 : G.data().image, targetNode: f.targetNode, onClick: (t, e) => ve(t, e) })
366
+ onClick: (e) => e.stopPropagation(),
367
+ children: /* @__PURE__ */ g(Me, { items: ye, centerImage: (G = f == null ? void 0 : f.targetNode) == null ? void 0 : G.data().image, targetNode: f.targetNode, onClick: (e, t) => be(e, t) })
371
368
  }
372
369
  ),
373
- D.visible && /* @__PURE__ */ y(
370
+ O.visible && /* @__PURE__ */ g(
374
371
  "div",
375
372
  {
376
373
  style: {
377
374
  position: "absolute",
378
- left: `${D.x}px`,
379
- top: `${D.y}px`,
375
+ left: `${O.x}px`,
376
+ top: `${O.y}px`,
380
377
  transform: "translateX(-50%)",
381
378
  backgroundColor: "rgba(0, 0, 0, 0.85)",
382
379
  color: "#fff",
@@ -390,14 +387,15 @@ const ct = ({
390
387
  overflow: "hidden",
391
388
  textOverflow: "ellipsis"
392
389
  },
393
- children: D.content
390
+ children: O.content
394
391
  }
395
392
  )
396
393
  ] }),
397
- /* @__PURE__ */ y(Be, { ref: Y, cyRef: c }),
398
- /* @__PURE__ */ y(Ae, { ref: _ })
394
+ /* @__PURE__ */ g(Ae, { ref: Y, cyRef: c }),
395
+ /* @__PURE__ */ g(He, { ref: _ }),
396
+ /* @__PURE__ */ g(Ie, { spinning: pe, className: "Spin-loading", description: "加载中...", percent: "auto", size: "large" })
399
397
  ] }) });
400
398
  };
401
399
  export {
402
- ct as default
400
+ pt as default
403
401
  };
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.es50.js";
3
+ import h from "./index.es47.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/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}.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%}.Spin-loading{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%)}.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.34",
3
+ "version": "0.0.36",
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