react-kggraph 0.0.23 → 0.0.24
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.es16.js +20 -21
- package/lib/index.es17.js +42 -0
- package/lib/index.es18.js +3 -15466
- package/lib/index.es19.js +2 -54
- package/lib/index.es21.js +15461 -63
- package/lib/index.es22.js +53 -39
- package/lib/index.es23.js +60 -2
- package/lib/index.es24.js +69 -2
- package/lib/index.es25.js +2 -2
- package/lib/index.es26.js +2 -2
- package/lib/index.es27.js +1 -1
- package/lib/index.es28.js +1 -1
- package/lib/index.es29.js +1 -1
- package/lib/index.es3.js +44 -42
- package/lib/index.es30.js +1 -1
- package/lib/index.es31.js +1 -1
- package/lib/index.es32.js +1 -1
- package/lib/index.es33.js +2 -2
- package/lib/index.es34.js +4 -0
- package/lib/index.es35.js +2 -64
- package/lib/index.es37.js +64 -2
- package/lib/index.es38.js +1049 -0
- package/lib/index.es4.js +12 -8
- package/lib/index.es42.js +18 -40
- package/lib/index.es43.js +41 -40
- package/lib/index.es44.js +38 -87
- package/lib/index.es45.js +86 -53
- package/lib/index.es46.js +53 -28
- package/lib/index.es47.js +33 -0
- package/lib/index.es7.js +303 -303
- package/lib/index.es8.js +11 -11
- package/lib/src/components/Graph/components/ActionBar/actionList.d.ts +4 -0
- package/lib/src/components/Graph/types.d.ts +7 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/index.es20.js +0 -62
- package/lib/index.es36.js +0 -6
- package/lib/index.es41.js +0 -21
- /package/lib/{index.es48.js → index.es49.js} +0 -0
package/lib/index.es16.js
CHANGED
|
@@ -1,38 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Drawer as
|
|
4
|
-
import { GraphContext as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as u, useContext as g, useState as e, useRef as C, useEffect as w, useImperativeHandle as h } from "react";
|
|
3
|
+
import { Drawer as D } from "antd";
|
|
4
|
+
import { GraphContext as x } from "./index.es15.js";
|
|
5
|
+
import y from "./index.es37.js";
|
|
6
|
+
import { cardDara as I } from "./index.es38.js";
|
|
7
|
+
const K = u((v, l) => {
|
|
8
|
+
const { graphInfo: f, knowledgeCardApi: R } = g(x), [t, o] = e(!1), [d, s] = e(!1), [c, i] = e(!1), [k, p] = e({ style: {}, data: {} }), r = C(null);
|
|
9
|
+
w(() => {
|
|
9
10
|
t && r.current && (r.current.scrollTop = 0);
|
|
10
|
-
}, [t]),
|
|
11
|
-
open: (
|
|
12
|
-
|
|
11
|
+
}, [t]), h(l, () => ({
|
|
12
|
+
open: (n) => {
|
|
13
|
+
o(!0), p(n), m();
|
|
13
14
|
},
|
|
14
|
-
close: () =>
|
|
15
|
+
close: () => o(!1)
|
|
15
16
|
}));
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const m = await f({ kgId: n.kgId, uri: e.id });
|
|
19
|
-
console.log(44, e), p(m.data), l(!1);
|
|
17
|
+
const m = async (n) => {
|
|
18
|
+
s(!0), i(I.data), s(!1);
|
|
20
19
|
};
|
|
21
|
-
return /* @__PURE__ */
|
|
22
|
-
|
|
20
|
+
return /* @__PURE__ */ a(
|
|
21
|
+
D,
|
|
23
22
|
{
|
|
24
23
|
title: "知识卡片",
|
|
25
24
|
onClose: () => {
|
|
26
|
-
|
|
25
|
+
o(!1);
|
|
27
26
|
},
|
|
28
27
|
open: t,
|
|
29
28
|
getContainer: !1,
|
|
30
29
|
className: "knowledge-card-drawer",
|
|
31
30
|
styles: { body: { padding: "0 20px", overflow: "auto" } },
|
|
32
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ a("div", { ref: r, style: { height: "100%" }, children: /* @__PURE__ */ a(y, { detailData: c, drawerInfo: f, loading: d }) })
|
|
33
32
|
}
|
|
34
33
|
);
|
|
35
34
|
});
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
K as default
|
|
38
37
|
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs as u } from "./index.es18.js";
|
|
2
|
+
import { __module as i } from "./index.es19.js";
|
|
3
|
+
/*!
|
|
4
|
+
Copyright (c) 2018 Jed Watson.
|
|
5
|
+
Licensed under the MIT License (MIT), see
|
|
6
|
+
http://jedwatson.github.io/classnames
|
|
7
|
+
*/
|
|
8
|
+
(function(s) {
|
|
9
|
+
(function() {
|
|
10
|
+
var f = {}.hasOwnProperty;
|
|
11
|
+
function e() {
|
|
12
|
+
for (var t = "", r = 0; r < arguments.length; r++) {
|
|
13
|
+
var n = arguments[r];
|
|
14
|
+
n && (t = o(t, a(n)));
|
|
15
|
+
}
|
|
16
|
+
return t;
|
|
17
|
+
}
|
|
18
|
+
function a(t) {
|
|
19
|
+
if (typeof t == "string" || typeof t == "number")
|
|
20
|
+
return t;
|
|
21
|
+
if (typeof t != "object")
|
|
22
|
+
return "";
|
|
23
|
+
if (Array.isArray(t))
|
|
24
|
+
return e.apply(null, t);
|
|
25
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
26
|
+
return t.toString();
|
|
27
|
+
var r = "";
|
|
28
|
+
for (var n in t)
|
|
29
|
+
f.call(t, n) && t[n] && (r = o(r, n));
|
|
30
|
+
return r;
|
|
31
|
+
}
|
|
32
|
+
function o(t, r) {
|
|
33
|
+
return r ? t ? t + " " + r : t + r : t;
|
|
34
|
+
}
|
|
35
|
+
s.exports ? (e.default = e, s.exports = e) : window.classNames = e;
|
|
36
|
+
})();
|
|
37
|
+
})(i);
|
|
38
|
+
var p = i.exports;
|
|
39
|
+
const m = /* @__PURE__ */ u(p);
|
|
40
|
+
export {
|
|
41
|
+
m as default
|
|
42
|
+
};
|