react-kggraph 0.0.24 → 0.0.26
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 +67 -64
- package/lib/index.es37.js +6 -6
- package/lib/index.es39.js +21 -0
- package/lib/index.es40.js +43 -0
- package/lib/index.es41.js +42 -0
- package/lib/index.es42.js +88 -18
- package/lib/index.es43.js +54 -39
- package/lib/index.es44.js +30 -39
- package/lib/index.es7.js +298 -289
- package/lib/index.es8.js +29 -29
- package/lib/src/components/Graph/components/ActionBar/index.d.ts +2 -0
- package/lib/src/components/Graph/types.d.ts +3 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/index.es45.js +0 -91
- package/lib/index.es46.js +0 -58
- package/lib/index.es47.js +0 -33
package/lib/index.es44.js
CHANGED
|
@@ -1,42 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
t
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
objectFit: "cover"
|
|
28
|
-
// cover 保证图片充满容器,可能会裁剪
|
|
29
|
-
// 或者使用 'contain' 保证图片完整显示,可能会有留白
|
|
30
|
-
// objectFit: 'contain',
|
|
31
|
-
},
|
|
32
|
-
className: "transition-transform duration-300 group-hover:scale-105 rounded-6px",
|
|
33
|
-
preview: {
|
|
34
|
-
cover: /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "text-white text-14px", children: "点击查看" }) })
|
|
35
|
-
}
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useEffect as w } from "react";
|
|
3
|
+
import h from "./index.es49.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");
|
|
36
27
|
}
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
28
|
+
}
|
|
29
|
+
)) });
|
|
30
|
+
};
|
|
40
31
|
export {
|
|
41
|
-
|
|
32
|
+
k as default
|
|
42
33
|
};
|