react-kggraph 0.0.28 → 0.0.30

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 (41) hide show
  1. package/lib/index.es11.js +1 -1
  2. package/lib/index.es14.js +60 -48
  3. package/lib/index.es16.js +24 -22
  4. package/lib/index.es23.js +33 -30
  5. package/lib/index.es24.js +32 -29
  6. package/lib/index.es25.js +271 -2
  7. package/lib/index.es26.js +1 -1
  8. package/lib/index.es27.js +2 -2
  9. package/lib/index.es28.js +1 -1
  10. package/lib/index.es29.js +1 -1
  11. package/lib/index.es3.js +176 -182
  12. package/lib/index.es30.js +1 -1
  13. package/lib/index.es31.js +1 -1
  14. package/lib/index.es32.js +1 -1
  15. package/lib/index.es33.js +1 -1
  16. package/lib/index.es34.js +1 -1
  17. package/lib/index.es35.js +1 -1
  18. package/lib/index.es36.js +2 -2
  19. package/lib/index.es37.js +4 -0
  20. package/lib/index.es39.js +62 -1045
  21. package/lib/index.es4.js +7 -6
  22. package/lib/index.es40.js +21 -0
  23. package/lib/index.es41.js +43 -0
  24. package/lib/index.es42.js +42 -0
  25. package/lib/index.es43.js +88 -18
  26. package/lib/index.es44.js +54 -39
  27. package/lib/index.es45.js +30 -39
  28. package/lib/index.es47.js +66 -52
  29. package/lib/index.es7.js +176 -169
  30. package/lib/index.es8.js +108 -108
  31. package/lib/index.es9.js +9 -14
  32. package/lib/src/components/Graph/components/GraphListData/index.d.ts +3 -0
  33. package/lib/src/components/Graph/components/NodeInfoDrawer/index.d.ts +4 -1
  34. package/lib/src/components/Graph/utils/layouts.d.ts +1 -1
  35. package/lib/src/components/Graph/utils/tools.d.ts +3 -3
  36. package/lib/style.css +1 -1
  37. package/package.json +1 -1
  38. package/lib/index.es38.js +0 -66
  39. package/lib/index.es46.js +0 -91
  40. package/lib/index.es48.js +0 -33
  41. package/lib/index.es50.js +0 -72
package/lib/index.es48.js DELETED
@@ -1,33 +0,0 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { useState as m, useEffect as w } from "react";
3
- import h from "./index.es50.js";
4
- const k = ({ relations: t, kgIds: s, viewMode: a = "list", source: c = "" }) => {
5
- const [d, l] = m(t);
6
- w(() => {
7
- t && t && l(p(t || []));
8
- }, [t]);
9
- const p = (e) => e.map((o) => {
10
- var r;
11
- const n = (r = o.content) == null ? void 0 : r.filter((f) => f.propertyKey !== "id");
12
- return {
13
- ...o,
14
- showContent: n.slice(0, 8)
15
- };
16
- });
17
- return /* @__PURE__ */ i("div", { className: "relation-section-wraper", children: d.map((e, u) => /* @__PURE__ */ i(
18
- h,
19
- {
20
- entity: e,
21
- viewMode: a,
22
- className: "shadow-none",
23
- source: c,
24
- onViewDetails: (o) => {
25
- const n = encodeURIComponent(e.uri);
26
- window.open(`#/ai-search/fulltext-detail?uri=${n}&kgId=${s}&keyword=${o.showValue}`, "_blank");
27
- }
28
- }
29
- )) });
30
- };
31
- export {
32
- k as default
33
- };
package/lib/index.es50.js DELETED
@@ -1,72 +0,0 @@
1
- import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
- import w from "react";
3
- import { Card as f, Row as n, Button as x, Col as g, Tooltip as C } from "antd";
4
- const E = ({
5
- entity: l,
6
- viewMode: N,
7
- keyword: d = "",
8
- className: v = "",
9
- contentClass: b = "",
10
- onViewDetails: p,
11
- source: k = ""
12
- }) => {
13
- const h = (e, a) => {
14
- if (!a || !e) return e;
15
- const i = new RegExp(`(${a.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")})`, "gi");
16
- return e.split(i).map(
17
- (r, c) => i.test(r) ? /* @__PURE__ */ t("span", { style: { color: "#E1211C", fontWeight: "bold" }, children: r }, c) : r
18
- );
19
- }, m = w.useMemo(() => {
20
- if (!l.showContent) return [];
21
- const e = (s) => (s == null ? void 0 : s.includes("简介")) || s.startsWith("http://") || s.startsWith("https://"), a = l.showContent.filter((s) => e(s.propertyKey));
22
- return [...l.showContent.filter((s) => !e(s.propertyKey)), ...a];
23
- }, [l.showContent]), u = (e, a) => {
24
- var c;
25
- const i = ((c = e.propertyValue) == null ? void 0 : c.length) > 20, s = h(e.propertyValue, d), r = /* @__PURE__ */ t(g, { span: 24, className: "detail-item-list", children: /* @__PURE__ */ o(n, { children: [
26
- /* @__PURE__ */ o("span", { className: "detail-label text-#676A6C flex-shrink-0 whitespace-nowrap font-size-14px max-w-[80%] overflow-hidden text-ellipsis whitespace-nowrap", children: [
27
- e.propertyKey,
28
- ":"
29
- ] }),
30
- /* @__PURE__ */ t("span", { className: "detail-value text-#676A6C truncate block overflow-hidden text-ellipsis whitespace-nowrap flex-1 min-w-0 font-size-14px", children: s })
31
- ] }) }, a);
32
- return i ? /* @__PURE__ */ t(
33
- C,
34
- {
35
- title: e.propertyValue,
36
- placement: "topLeft",
37
- mouseEnterDelay: 0.3,
38
- overlayClassName: "max-w-[500px] break-words",
39
- children: r
40
- },
41
- a
42
- ) : r;
43
- };
44
- return /* @__PURE__ */ t("div", { className: "relative group", children: /* @__PURE__ */ t(
45
- f,
46
- {
47
- className: "section-card",
48
- bodyStyle: { padding: "20px 20px 4px 20px" },
49
- onClick: () => p(l),
50
- children: /* @__PURE__ */ o("div", { className: "flex flex-col h-full", children: [
51
- /* @__PURE__ */ o(n, { className: "section-title", justify: "space-between", align: "middle", children: [
52
- /* @__PURE__ */ t("div", { className: "entity-name-list", children: h(l.showValue, d) }),
53
- /* @__PURE__ */ t(
54
- x,
55
- {
56
- className: "view-details-btn",
57
- children: "查看详情"
58
- }
59
- )
60
- ] }),
61
- /* @__PURE__ */ o(n, { className: "flex mb-18px", children: [
62
- l.showType && /* @__PURE__ */ t(n, { className: "detail-item-tag", justify: "center", align: "middle", children: l.showType }),
63
- l.kg && /* @__PURE__ */ t("div", { className: "detail-item-tag1", children: l.kg })
64
- ] }),
65
- /* @__PURE__ */ t(n, { wrap: !0, children: m.map((e, a) => u(e, a)) })
66
- ] })
67
- }
68
- ) });
69
- };
70
- export {
71
- E as default
72
- };