react-kggraph 0.0.32 → 0.0.34

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.
Files changed (31) hide show
  1. package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/ListCard.d.ts +1 -1
  2. package/lib/{src/components → components}/Graph/components/KnowledgeCard/data.d.ts +1 -1
  3. package/lib/{src/components → components}/Graph/types.d.ts +7 -6
  4. package/lib/{src/components → components}/Graph/utils/layouts.d.ts +14 -14
  5. package/lib/{src/components → components}/Graph/utils/tools.d.ts +2 -2
  6. package/lib/index.es3.js +245 -232
  7. package/lib/index.es7.js +217 -217
  8. package/lib/index.es8.js +0 -1
  9. package/lib/index.es9.js +10 -10
  10. package/package.json +1 -1
  11. /package/lib/{src/components → components}/Graph/api.d.ts +0 -0
  12. /package/lib/{src/components → components}/Graph/components/ActionBar/actionList.d.ts +0 -0
  13. /package/lib/{src/components → components}/Graph/components/ActionBar/index.d.ts +0 -0
  14. /package/lib/{src/components → components}/Graph/components/GraphListData/index.d.ts +0 -0
  15. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/AudioSection.d.ts +0 -0
  16. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/DocumentSection.d.ts +0 -0
  17. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/ImageSection.d.ts +0 -0
  18. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/PropertySection.d.ts +0 -0
  19. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/RelationSection.d.ts +0 -0
  20. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/SourceCard.d.ts +0 -0
  21. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/components/VideoSection.d.ts +0 -0
  22. /package/lib/{src/components → components}/Graph/components/KnowledgeCard/index.d.ts +0 -0
  23. /package/lib/{src/components → components}/Graph/components/NodeInfoDrawer/index.d.ts +0 -0
  24. /package/lib/{src/components → components}/Graph/components/PathAnalysis/index.d.ts +0 -0
  25. /package/lib/{src/components → components}/Graph/components/PathAnalysisLevel/index.d.ts +0 -0
  26. /package/lib/{src/components → components}/Graph/components/QueryNode/index.d.ts +0 -0
  27. /package/lib/{src/components → components}/Graph/components/SettingCircle/index.d.ts +0 -0
  28. /package/lib/{src/components → components}/Graph/context.d.ts +0 -0
  29. /package/lib/{src/components → components}/Graph/index.d.ts +0 -0
  30. /package/lib/{src/components → components}/Graph/utils/edge_node_styles.d.ts +0 -0
  31. /package/lib/{src/components → components}/Graph/utils/menuItems.d.ts +0 -0
package/lib/index.es8.js CHANGED
@@ -32,7 +32,6 @@ const N = [O, j, I, P, D, $, J, R, A, q], W = (s) => {
32
32
  relationListObj: r
33
33
  };
34
34
  }, ne = (s, { graphData: o = [], typeObj: r, zktype: t, graphInfo: e = {} }) => {
35
- console.log(888, s);
36
35
  let c = U(r);
37
36
  const y = Object.keys(r), d = e.searchNodes || [], a = new Set(
38
37
  (o == null ? void 0 : o.map((g) => {
package/lib/index.es9.js CHANGED
@@ -1,7 +1,7 @@
1
- const I = (e, n, r, o = 20) => {
2
- const u = e.nodes(), i = u.filter((t) => t.data("name") === n), a = u.filter((t) => t.data("name") === r);
3
- if (console.log(111, !i.data() || !a.data(), i.data(), a.data()), !i.data() || !a.data()) {
4
- console.warn("fixNodesToEdges: 未找到左右节点", n, r);
1
+ const I = (e, n, a, o = 20) => {
2
+ const u = e.nodes(), i = u.filter((t) => t.data("name") === n), r = u.filter((t) => t.data("name") === a);
3
+ if (!i.data() || !r.data()) {
4
+ console.warn("fixNodesToEdges: 未找到左右节点", n, a);
5
5
  const t = e.layout(c());
6
6
  return t.run(), t.on("layoutstop", () => {
7
7
  e.fit(void 0, 50);
@@ -11,8 +11,8 @@ const I = (e, n, r, o = 20) => {
11
11
  if (l === 0)
12
12
  return !1;
13
13
  const g = i.width() || 60, d = e.height() / 2, f = g / 2 + o, m = l - g / 2 - o;
14
- i.position({ x: f, y: d }), a.position({ x: m, y: d }), i.lock(), a.lock();
15
- const s = e.nodes().difference(i).difference(a);
14
+ i.position({ x: f, y: d }), r.position({ x: m, y: d }), i.lock(), r.lock();
15
+ const s = e.nodes().difference(i).difference(r);
16
16
  if (s.length > 0) {
17
17
  s.forEach((v) => {
18
18
  const p = v.position().x, h = Math.min(f, p), b = Math.max(m, p);
@@ -36,7 +36,7 @@ const I = (e, n, r, o = 20) => {
36
36
  // padding: 50,
37
37
  });
38
38
  t.run(), t.on("layoutstop", () => {
39
- e.fit(void 0, 50), i.unlock(), a.unlock(), console.log("布局完成");
39
+ e.fit(void 0, 50), i.unlock(), r.unlock(), console.log("布局完成");
40
40
  });
41
41
  } else
42
42
  e.fit(void 0, 50);
@@ -72,8 +72,8 @@ const I = (e, n, r, o = 20) => {
72
72
  refresh: 30
73
73
  }), w = (e, n) => {
74
74
  console.log(111, n);
75
- const r = e.current;
76
- if (!r) return;
75
+ const a = e.current;
76
+ if (!a) return;
77
77
  let o = {};
78
78
  switch (n) {
79
79
  case "circle":
@@ -125,7 +125,7 @@ const I = (e, n, r, o = 20) => {
125
125
  console.warn("未知布局类型:", n);
126
126
  return;
127
127
  }
128
- r.layout(o).run();
128
+ a.layout(o).run();
129
129
  }, y = () => ({
130
130
  name: "random",
131
131
  fit: !0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-kggraph",
3
- "version": "0.0.32",
3
+ "version": "0.0.34",
4
4
  "description": "A knowledge graph visualization component based on Cytoscape",
5
5
  "type": "module",
6
6
  "main": "./lib/index.es.js",