react-kggraph 0.0.3 → 0.0.4
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.es.js +4 -0
- package/lib/{index17.esm.js → index17.es.js} +12 -12
- package/lib/{index2.esm.js → index2.es.js} +2 -5
- package/lib/index21.es.js +70 -0
- package/lib/index23.es.js +68 -0
- package/lib/index25.es.js +72 -0
- package/lib/{index29.esm.js → index26.es.js} +1 -1
- package/lib/{index30.esm.js → index27.es.js} +239 -239
- package/lib/index33.es.js +100 -0
- package/lib/{index37.esm.js → index34.es.js} +93 -93
- package/lib/index35.es.js +47 -0
- package/lib/{index39.esm.js → index36.es.js} +134 -136
- package/lib/index37.es.js +12 -0
- package/package.json +11 -6
- package/lib/components/Graph/components/PathAnalysisLevel/index.css +0 -1
- package/lib/index.cjs.js +0 -1
- package/lib/index.esm.js +0 -3
- package/lib/index10.cjs.js +0 -1
- package/lib/index11.cjs.js +0 -1
- package/lib/index12.cjs.js +0 -1
- package/lib/index13.cjs.js +0 -1
- package/lib/index14.cjs.js +0 -1
- package/lib/index15.cjs.js +0 -1
- package/lib/index16.cjs.js +0 -1
- package/lib/index17.cjs.js +0 -1
- package/lib/index18.cjs.js +0 -1
- package/lib/index19.cjs.js +0 -1
- package/lib/index2.cjs.js +0 -1
- package/lib/index21.cjs.js +0 -1
- package/lib/index21.esm.js +0 -27
- package/lib/index22.cjs.js +0 -16
- package/lib/index22.esm.js +0 -453
- package/lib/index23.cjs.js +0 -1
- package/lib/index23.esm.js +0 -10
- package/lib/index24.cjs.js +0 -1
- package/lib/index24.esm.js +0 -70
- package/lib/index26.cjs.js +0 -1
- package/lib/index26.esm.js +0 -68
- package/lib/index28.cjs.js +0 -1
- package/lib/index28.esm.js +0 -72
- package/lib/index29.cjs.js +0 -1
- package/lib/index30.cjs.js +0 -1
- package/lib/index32.cjs.js +0 -1
- package/lib/index33.cjs.js +0 -1
- package/lib/index34.cjs.js +0 -1
- package/lib/index36.cjs.js +0 -1
- package/lib/index36.esm.js +0 -100
- package/lib/index37.cjs.js +0 -1
- package/lib/index38.cjs.js +0 -1
- package/lib/index38.esm.js +0 -47
- package/lib/index39.cjs.js +0 -1
- package/lib/index4.cjs.js +0 -95
- package/lib/index40.cjs.js +0 -1
- package/lib/index5.cjs.js +0 -1
- package/lib/index6.cjs.js +0 -1
- package/lib/index7.cjs.js +0 -1
- package/lib/index8.cjs.js +0 -1
- package/lib/index9.cjs.js +0 -1
- /package/lib/{index10.esm.js → index10.es.js} +0 -0
- /package/lib/{index11.esm.js → index11.es.js} +0 -0
- /package/lib/{index12.esm.js → index12.es.js} +0 -0
- /package/lib/{index13.esm.js → index13.es.js} +0 -0
- /package/lib/{index14.esm.js → index14.es.js} +0 -0
- /package/lib/{index15.esm.js → index15.es.js} +0 -0
- /package/lib/{index16.esm.js → index16.es.js} +0 -0
- /package/lib/{index18.esm.js → index18.es.js} +0 -0
- /package/lib/{index19.esm.js → index19.es.js} +0 -0
- /package/lib/{index32.esm.js → index29.es.js} +0 -0
- /package/lib/{index33.esm.js → index30.es.js} +0 -0
- /package/lib/{index34.esm.js → index31.es.js} +0 -0
- /package/lib/{index40.esm.js → index38.es.js} +0 -0
- /package/lib/{index4.esm.js → index4.es.js} +0 -0
- /package/lib/{index5.esm.js → index5.es.js} +0 -0
- /package/lib/{index6.esm.js → index6.es.js} +0 -0
- /package/lib/{index7.esm.js → index7.es.js} +0 -0
- /package/lib/{index8.esm.js → index8.es.js} +0 -0
- /package/lib/{index9.esm.js → index9.es.js} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
import { useMemo as e } from "react";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Graph/components/SettingCircle/index.tsx
|
|
5
|
+
var r = ({ items: r = [], centerImage: i, size: a = 200, onClick: o }) => {
|
|
6
|
+
let s = a / 2, c = a / 2 - 10, l = 360 / r.length, u = e(() => r.map((e, t) => {
|
|
7
|
+
let n = (t * l - 90) * (Math.PI / 180), r = ((t + 1) * l - 90) * (Math.PI / 180), i = ((t + .5) * l - 90) * (Math.PI / 180), a = s + c * Math.cos(n), o = s + c * Math.sin(n), u = s + c * Math.cos(r), d = s + c * Math.sin(r), f = s + 30 * Math.cos(r), p = s + 30 * Math.sin(r), m = s + 30 * Math.cos(n), h = s + 30 * Math.sin(n), g = +(l > 180), _ = `M ${m} ${h} L ${a} ${o} A ${c} ${c} 0 ${g} 1 ${u} ${d} L ${f} ${p} A 30 30 0 ${g} 0 ${m} ${h}`, v = (c + 30) / 2 + 5, y = s + v * Math.cos(i), b = s + v * Math.sin(i);
|
|
8
|
+
return {
|
|
9
|
+
...e,
|
|
10
|
+
path: _,
|
|
11
|
+
textX: y,
|
|
12
|
+
textY: b,
|
|
13
|
+
rotation: (t + .5) * l - 90
|
|
14
|
+
};
|
|
15
|
+
}), [
|
|
16
|
+
r,
|
|
17
|
+
l,
|
|
18
|
+
s,
|
|
19
|
+
c,
|
|
20
|
+
30
|
|
21
|
+
]);
|
|
22
|
+
return /* @__PURE__ */ n("div", {
|
|
23
|
+
className: "radial-menu",
|
|
24
|
+
style: {
|
|
25
|
+
width: a,
|
|
26
|
+
height: a
|
|
27
|
+
},
|
|
28
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
29
|
+
width: a,
|
|
30
|
+
height: a,
|
|
31
|
+
className: "radial-svg",
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("filter", {
|
|
34
|
+
id: "shadow",
|
|
35
|
+
x: "-20%",
|
|
36
|
+
y: "-20%",
|
|
37
|
+
width: "140%",
|
|
38
|
+
height: "140%",
|
|
39
|
+
children: /* @__PURE__ */ t("feDropShadow", {
|
|
40
|
+
dx: "0",
|
|
41
|
+
dy: "2",
|
|
42
|
+
stdDeviation: "3",
|
|
43
|
+
floodOpacity: "0.3"
|
|
44
|
+
})
|
|
45
|
+
}) }),
|
|
46
|
+
/* @__PURE__ */ t("circle", {
|
|
47
|
+
cx: s,
|
|
48
|
+
cy: s,
|
|
49
|
+
r: c,
|
|
50
|
+
fill: "#f5f5f5",
|
|
51
|
+
stroke: "#ddd",
|
|
52
|
+
strokeWidth: "1"
|
|
53
|
+
}),
|
|
54
|
+
u.map((e, r) => (200 + r * 25, /* @__PURE__ */ n("g", {
|
|
55
|
+
onClick: () => o(e),
|
|
56
|
+
className: "sector-group",
|
|
57
|
+
children: [/* @__PURE__ */ t("path", {
|
|
58
|
+
d: e.path,
|
|
59
|
+
fill: "#333",
|
|
60
|
+
stroke: "rgb(185, 185, 185)",
|
|
61
|
+
strokeWidth: "1",
|
|
62
|
+
filter: "url(#shadow)",
|
|
63
|
+
className: "sector-path"
|
|
64
|
+
}), /* @__PURE__ */ t("text", {
|
|
65
|
+
x: e.textX,
|
|
66
|
+
y: e.textY,
|
|
67
|
+
textAnchor: "middle",
|
|
68
|
+
dominantBaseline: "middle",
|
|
69
|
+
fill: "#fff",
|
|
70
|
+
fontSize: "12",
|
|
71
|
+
fontWeight: "500",
|
|
72
|
+
className: "sector-label",
|
|
73
|
+
children: e.label
|
|
74
|
+
})]
|
|
75
|
+
}, r))),
|
|
76
|
+
/* @__PURE__ */ t("circle", {
|
|
77
|
+
cx: s,
|
|
78
|
+
cy: s,
|
|
79
|
+
r: 32,
|
|
80
|
+
fill: "#fff"
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
}), /* @__PURE__ */ t("div", {
|
|
84
|
+
className: "center-avatar",
|
|
85
|
+
style: {
|
|
86
|
+
width: 60,
|
|
87
|
+
height: 60
|
|
88
|
+
},
|
|
89
|
+
children: i ? /* @__PURE__ */ t("img", {
|
|
90
|
+
src: i,
|
|
91
|
+
alt: "avatar"
|
|
92
|
+
}) : /* @__PURE__ */ t("span", {
|
|
93
|
+
className: "center-text",
|
|
94
|
+
children: "菜单"
|
|
95
|
+
})
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
export { r as default };
|
|
@@ -1,243 +1,243 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { forwardRef as e, useImperativeHandle as t, useState as n } from "react";
|
|
2
|
+
import { Drawer as r } from "antd";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Graph/components/NodeInfoDrawer/index.tsx
|
|
5
|
-
var
|
|
6
|
-
let [
|
|
5
|
+
var o = e((e, o) => {
|
|
6
|
+
let [s, c] = n(!1), [l, u] = n({
|
|
7
7
|
style: {},
|
|
8
8
|
data: {}
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
t(o, () => ({
|
|
11
11
|
open: (e) => {
|
|
12
|
-
|
|
12
|
+
c(!0), u(e);
|
|
13
13
|
},
|
|
14
|
-
close: () =>
|
|
14
|
+
close: () => c(!1)
|
|
15
15
|
}));
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
},
|
|
16
|
+
let d = () => {
|
|
17
|
+
c(!1);
|
|
18
|
+
}, f = (e) => {
|
|
19
19
|
let { name: t, value: n } = e.target;
|
|
20
|
-
|
|
20
|
+
u((e) => ({
|
|
21
21
|
...e,
|
|
22
22
|
[t]: n
|
|
23
23
|
}));
|
|
24
24
|
};
|
|
25
|
-
return /* @__PURE__ */ (
|
|
25
|
+
return /* @__PURE__ */ i(r, {
|
|
26
26
|
title: "节点配置",
|
|
27
27
|
closable: { "aria-label": "Close Button" },
|
|
28
|
-
onClose:
|
|
29
|
-
open:
|
|
28
|
+
onClose: d,
|
|
29
|
+
open: s,
|
|
30
30
|
getContainer: !1,
|
|
31
|
-
children: /* @__PURE__ */ (
|
|
31
|
+
children: /* @__PURE__ */ i("div", {
|
|
32
32
|
className: "h-full overflow-y-auto z-50",
|
|
33
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ a("div", {
|
|
34
34
|
className: "space-y-4",
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ a("div", {
|
|
37
37
|
className: "flex items-center gap-4 !mb-20px",
|
|
38
|
-
children: [/* @__PURE__ */ (
|
|
38
|
+
children: [/* @__PURE__ */ i("label", {
|
|
39
39
|
className: "w-40",
|
|
40
40
|
children: "名称"
|
|
41
|
-
}), /* @__PURE__ */ (
|
|
41
|
+
}), /* @__PURE__ */ i("input", {
|
|
42
42
|
name: "name",
|
|
43
|
-
value:
|
|
44
|
-
onChange:
|
|
43
|
+
value: l.data.name,
|
|
44
|
+
onChange: f,
|
|
45
45
|
readOnly: !0,
|
|
46
46
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"
|
|
47
47
|
})]
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */
|
|
49
|
+
/* @__PURE__ */ a("div", {
|
|
50
50
|
className: "flex items-center gap-4 !mb-20px",
|
|
51
|
-
children: [/* @__PURE__ */ (
|
|
51
|
+
children: [/* @__PURE__ */ i("label", {
|
|
52
52
|
className: "w-40",
|
|
53
53
|
children: "类型"
|
|
54
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ a("select", {
|
|
55
55
|
name: "type",
|
|
56
|
-
value:
|
|
56
|
+
value: l.type,
|
|
57
57
|
disabled: !0,
|
|
58
|
-
onChange:
|
|
58
|
+
onChange: f,
|
|
59
59
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded bg-white",
|
|
60
|
-
children: [/* @__PURE__ */ (
|
|
60
|
+
children: [/* @__PURE__ */ i("option", {
|
|
61
61
|
value: "圆形",
|
|
62
62
|
children: "圆形"
|
|
63
|
-
}), /* @__PURE__ */ (
|
|
63
|
+
}), /* @__PURE__ */ i("option", {
|
|
64
64
|
value: "矩形",
|
|
65
65
|
children: "矩形"
|
|
66
66
|
})]
|
|
67
67
|
})]
|
|
68
68
|
}),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a("div", {
|
|
70
70
|
className: "flex items-center gap-4 !mb-20px",
|
|
71
|
-
children: [/* @__PURE__ */ (
|
|
71
|
+
children: [/* @__PURE__ */ i("label", {
|
|
72
72
|
className: "w-40",
|
|
73
73
|
children: "颜色"
|
|
74
|
-
}), /* @__PURE__ */
|
|
74
|
+
}), /* @__PURE__ */ a("div", {
|
|
75
75
|
className: "flex-1 flex gap-2 items-center",
|
|
76
|
-
children: [/* @__PURE__ */ (
|
|
76
|
+
children: [/* @__PURE__ */ i("input", {
|
|
77
77
|
name: "color",
|
|
78
78
|
readOnly: !0,
|
|
79
|
-
value:
|
|
80
|
-
onChange:
|
|
79
|
+
value: l.style.color,
|
|
80
|
+
onChange: f,
|
|
81
81
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded h-30px"
|
|
82
|
-
}), /* @__PURE__ */ (
|
|
82
|
+
}), /* @__PURE__ */ i("input", {
|
|
83
83
|
type: "color",
|
|
84
84
|
readOnly: !0,
|
|
85
|
-
value:
|
|
86
|
-
onChange: (e) =>
|
|
87
|
-
...
|
|
85
|
+
value: l.style.color,
|
|
86
|
+
onChange: (e) => u({
|
|
87
|
+
...l,
|
|
88
88
|
color: e.target.value
|
|
89
89
|
}),
|
|
90
90
|
className: "h-20px w-20px rounded cursor-pointer border"
|
|
91
91
|
})]
|
|
92
92
|
})]
|
|
93
93
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ a("div", {
|
|
95
95
|
className: "flex items-center gap-4 !mb-20px",
|
|
96
|
-
children: [/* @__PURE__ */ (
|
|
96
|
+
children: [/* @__PURE__ */ i("label", {
|
|
97
97
|
className: "w-40",
|
|
98
98
|
children: "大小"
|
|
99
|
-
}), /* @__PURE__ */ (
|
|
99
|
+
}), /* @__PURE__ */ i("input", {
|
|
100
100
|
type: "number",
|
|
101
101
|
name: "size",
|
|
102
102
|
readOnly: !0,
|
|
103
|
-
value: parseInt(
|
|
104
|
-
onChange:
|
|
103
|
+
value: parseInt(l.style.height),
|
|
104
|
+
onChange: f,
|
|
105
105
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded "
|
|
106
106
|
})]
|
|
107
107
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ a("div", {
|
|
109
109
|
className: "flex items-center gap-4 !mb-20px",
|
|
110
|
-
children: [/* @__PURE__ */ (
|
|
110
|
+
children: [/* @__PURE__ */ i("label", {
|
|
111
111
|
className: "w-40",
|
|
112
112
|
children: "边框宽度"
|
|
113
|
-
}), /* @__PURE__ */ (
|
|
113
|
+
}), /* @__PURE__ */ i("input", {
|
|
114
114
|
type: "number",
|
|
115
115
|
name: "borderWidth",
|
|
116
116
|
readOnly: !0,
|
|
117
|
-
value: parseInt(
|
|
118
|
-
onChange:
|
|
117
|
+
value: parseInt(l.style.borderWidth),
|
|
118
|
+
onChange: f,
|
|
119
119
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded "
|
|
120
120
|
})]
|
|
121
121
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
122
|
+
/* @__PURE__ */ a("div", {
|
|
123
123
|
className: "flex items-center gap-4 !mb-20px",
|
|
124
|
-
children: [/* @__PURE__ */ (
|
|
124
|
+
children: [/* @__PURE__ */ i("label", {
|
|
125
125
|
className: "w-40",
|
|
126
126
|
children: "边框虚线"
|
|
127
|
-
}), /* @__PURE__ */
|
|
127
|
+
}), /* @__PURE__ */ a("select", {
|
|
128
128
|
name: "borderDash",
|
|
129
|
-
value:
|
|
129
|
+
value: l.style.borderDash,
|
|
130
130
|
disabled: !0,
|
|
131
|
-
onChange:
|
|
131
|
+
onChange: f,
|
|
132
132
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded bg-white",
|
|
133
|
-
children: [/* @__PURE__ */ (
|
|
133
|
+
children: [/* @__PURE__ */ i("option", {
|
|
134
134
|
value: "否",
|
|
135
135
|
children: "否"
|
|
136
|
-
}), /* @__PURE__ */ (
|
|
136
|
+
}), /* @__PURE__ */ i("option", {
|
|
137
137
|
value: "是",
|
|
138
138
|
children: "是"
|
|
139
139
|
})]
|
|
140
140
|
})]
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ a("div", {
|
|
143
143
|
className: "flex items-center gap-4 !mb-20px",
|
|
144
|
-
children: [/* @__PURE__ */ (
|
|
144
|
+
children: [/* @__PURE__ */ i("label", {
|
|
145
145
|
className: "w-40",
|
|
146
146
|
children: "边框颜色"
|
|
147
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), /* @__PURE__ */ a("div", {
|
|
148
148
|
className: "flex-1 flex gap-2 items-center",
|
|
149
|
-
children: [/* @__PURE__ */ (
|
|
149
|
+
children: [/* @__PURE__ */ i("input", {
|
|
150
150
|
name: "borderColor",
|
|
151
|
-
value:
|
|
151
|
+
value: l.style.borderColor,
|
|
152
152
|
readOnly: !0,
|
|
153
|
-
onChange:
|
|
153
|
+
onChange: f,
|
|
154
154
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded h-30px"
|
|
155
|
-
}), /* @__PURE__ */ (
|
|
155
|
+
}), /* @__PURE__ */ i("input", {
|
|
156
156
|
type: "color",
|
|
157
|
-
value:
|
|
157
|
+
value: l.borderColor,
|
|
158
158
|
readOnly: !0,
|
|
159
|
-
onChange: (e) =>
|
|
160
|
-
...
|
|
159
|
+
onChange: (e) => u({
|
|
160
|
+
...l,
|
|
161
161
|
borderColor: e.target.value
|
|
162
162
|
}),
|
|
163
163
|
className: "h-20px w-20px rounded cursor-pointer border"
|
|
164
164
|
})]
|
|
165
165
|
})]
|
|
166
166
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
/* @__PURE__ */ a("div", {
|
|
168
168
|
className: "flex items-center gap-4 !mb-20px",
|
|
169
|
-
children: [/* @__PURE__ */ (
|
|
169
|
+
children: [/* @__PURE__ */ i("label", {
|
|
170
170
|
className: "w-40",
|
|
171
171
|
children: "字体位置"
|
|
172
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ a("select", {
|
|
173
173
|
name: "fontPosition",
|
|
174
|
-
value:
|
|
174
|
+
value: l.style.textValign,
|
|
175
175
|
disabled: !0,
|
|
176
|
-
onChange:
|
|
176
|
+
onChange: f,
|
|
177
177
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded bg-white",
|
|
178
178
|
children: [
|
|
179
|
-
/* @__PURE__ */ (
|
|
179
|
+
/* @__PURE__ */ i("option", {
|
|
180
180
|
value: "center",
|
|
181
181
|
children: "居中"
|
|
182
182
|
}),
|
|
183
|
-
/* @__PURE__ */ (
|
|
183
|
+
/* @__PURE__ */ i("option", {
|
|
184
184
|
value: "bottom",
|
|
185
185
|
children: "底部"
|
|
186
186
|
}),
|
|
187
|
-
/* @__PURE__ */ (
|
|
187
|
+
/* @__PURE__ */ i("option", {
|
|
188
188
|
value: "top",
|
|
189
189
|
children: "顶部"
|
|
190
190
|
})
|
|
191
191
|
]
|
|
192
192
|
})]
|
|
193
193
|
}),
|
|
194
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ a("div", {
|
|
195
195
|
className: "flex items-center gap-4 !mb-20px",
|
|
196
|
-
children: [/* @__PURE__ */ (
|
|
196
|
+
children: [/* @__PURE__ */ i("label", {
|
|
197
197
|
className: "w-40",
|
|
198
198
|
children: "字体样式"
|
|
199
|
-
}), /* @__PURE__ */ (
|
|
199
|
+
}), /* @__PURE__ */ i("input", {
|
|
200
200
|
name: "fontStyle",
|
|
201
|
-
value:
|
|
201
|
+
value: l.style.fontStyle,
|
|
202
202
|
readOnly: !0,
|
|
203
|
-
onChange:
|
|
203
|
+
onChange: f,
|
|
204
204
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded "
|
|
205
205
|
})]
|
|
206
206
|
}),
|
|
207
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ a("div", {
|
|
208
208
|
className: "flex items-center gap-4 !mb-20px",
|
|
209
|
-
children: [/* @__PURE__ */ (
|
|
209
|
+
children: [/* @__PURE__ */ i("label", {
|
|
210
210
|
className: "w-40",
|
|
211
211
|
children: "字体颜色"
|
|
212
|
-
}), /* @__PURE__ */
|
|
212
|
+
}), /* @__PURE__ */ a("div", {
|
|
213
213
|
className: "flex-1 flex gap-2 items-center",
|
|
214
|
-
children: [/* @__PURE__ */ (
|
|
214
|
+
children: [/* @__PURE__ */ i("input", {
|
|
215
215
|
name: "fontColor",
|
|
216
216
|
readOnly: !0,
|
|
217
|
-
value:
|
|
218
|
-
onChange:
|
|
217
|
+
value: l.style.textBorderColor,
|
|
218
|
+
onChange: f,
|
|
219
219
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded h-30px"
|
|
220
|
-
}), /* @__PURE__ */ (
|
|
220
|
+
}), /* @__PURE__ */ i("input", {
|
|
221
221
|
type: "color",
|
|
222
222
|
readOnly: !0,
|
|
223
|
-
value:
|
|
224
|
-
onChange: (e) =>
|
|
225
|
-
...
|
|
223
|
+
value: l.style["font-color"],
|
|
224
|
+
onChange: (e) => u({
|
|
225
|
+
...l,
|
|
226
226
|
fontColor: e.target.value
|
|
227
227
|
}),
|
|
228
228
|
className: "h-20px w-20px rounded cursor-pointer border"
|
|
229
229
|
})]
|
|
230
230
|
})]
|
|
231
231
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ a("div", {
|
|
233
233
|
className: "flex items-center gap-4 !mb-20px",
|
|
234
|
-
children: [/* @__PURE__ */ (
|
|
234
|
+
children: [/* @__PURE__ */ i("label", {
|
|
235
235
|
className: "w-40",
|
|
236
236
|
children: "字体背色"
|
|
237
|
-
}), /* @__PURE__ */ (
|
|
237
|
+
}), /* @__PURE__ */ i("input", {
|
|
238
238
|
type: "text",
|
|
239
239
|
readOnly: !0,
|
|
240
|
-
value:
|
|
240
|
+
value: l.style.textBackgroundColor,
|
|
241
241
|
className: "flex-1 px-3 py-1.5 border border-gray-300 rounded bg-gray-50 text-gray-400 cursor-not-allowed"
|
|
242
242
|
})]
|
|
243
243
|
})
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { GraphContext as e } from "./index18.es.js";
|
|
2
|
+
import { fullSearchDetail as t } from "./index29.es.js";
|
|
3
|
+
import { forwardRef as n, useContext as r, useEffect as i, useImperativeHandle as a, useRef as o, useState as s } from "react";
|
|
4
|
+
import { Drawer as c } from "antd";
|
|
5
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Graph/components/KnowledgeCard/index.tsx
|
|
7
|
+
var u = n((n, u) => {
|
|
8
|
+
let { graphInfo: d } = r(e), [f, p] = s(!1), [m, h] = s(!1), [g, _] = s(!1), [v, y] = s({
|
|
9
|
+
style: {},
|
|
10
|
+
data: {}
|
|
11
|
+
}), b = o(null);
|
|
12
|
+
i(() => {
|
|
13
|
+
f && b.current && (b.current.scrollTop = 0);
|
|
14
|
+
}, [f]), a(u, () => ({
|
|
15
|
+
open: (e) => {
|
|
16
|
+
p(!0), y(e), x(e);
|
|
17
|
+
},
|
|
18
|
+
close: () => p(!1)
|
|
19
|
+
}));
|
|
20
|
+
let x = async (e) => {
|
|
21
|
+
h(!0);
|
|
22
|
+
let n = await t({
|
|
23
|
+
kgId: d.kgId,
|
|
24
|
+
uri: e.id
|
|
25
|
+
});
|
|
26
|
+
console.log(44, e), _(n.data), h(!1);
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ l(c, {
|
|
29
|
+
title: "知识卡片",
|
|
30
|
+
onClose: () => {
|
|
31
|
+
p(!1);
|
|
32
|
+
},
|
|
33
|
+
open: f,
|
|
34
|
+
getContainer: !1,
|
|
35
|
+
className: "knowledge-card-drawer",
|
|
36
|
+
bodyStyle: {
|
|
37
|
+
padding: "0 20px",
|
|
38
|
+
overflow: "auto"
|
|
39
|
+
},
|
|
40
|
+
children: /* @__PURE__ */ l("div", {
|
|
41
|
+
ref: b,
|
|
42
|
+
style: { height: "100%" }
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { u as default };
|