react-kggraph 0.0.22 → 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.es10.js +20 -19
- package/lib/index.es14.js +39 -41
- package/lib/index.es16.js +20 -20
- 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 +100 -97
- 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 -4
- package/lib/index.es37.js +66 -0
- package/lib/index.es38.js +1049 -0
- package/lib/index.es4.js +13 -9
- package/lib/index.es42.js +21 -0
- package/lib/index.es43.js +43 -0
- package/lib/index.es44.js +42 -0
- package/lib/index.es45.js +91 -0
- package/lib/index.es46.js +58 -0
- package/lib/index.es47.js +33 -0
- package/lib/index.es49.js +72 -0
- package/lib/index.es7.js +305 -305
- package/lib/index.es8.js +11 -11
- package/lib/src/components/Graph/components/ActionBar/actionList.d.ts +4 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/AudioSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/DocumentSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/ImageSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/ListCard.d.ts +14 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/PropertySection.d.ts +11 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/RelationSection.d.ts +13 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/SourceCard.d.ts +6 -0
- package/lib/src/components/Graph/components/KnowledgeCard/components/VideoSection.d.ts +12 -0
- package/lib/src/components/Graph/components/KnowledgeCard/data.d.ts +84 -0
- package/lib/src/components/Graph/types.d.ts +7 -1
- package/lib/src/components/Graph/utils/edge_node_styles.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/lib/index.es20.js +0 -62
- package/lib/index.es36.js +0 -4
package/lib/index.es8.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { message as C } from "antd";
|
|
2
|
-
import j from "./index.
|
|
3
|
-
import I from "./index.
|
|
4
|
-
import P from "./index.
|
|
5
|
-
import $ from "./index.
|
|
6
|
-
import D from "./index.
|
|
7
|
-
import J from "./index.
|
|
8
|
-
import N from "./index.
|
|
9
|
-
import R from "./index.
|
|
10
|
-
import q from "./index.
|
|
11
|
-
import A from "./index.
|
|
12
|
-
import B from "./index.
|
|
2
|
+
import j from "./index.es25.js";
|
|
3
|
+
import I from "./index.es26.js";
|
|
4
|
+
import P from "./index.es27.js";
|
|
5
|
+
import $ from "./index.es28.js";
|
|
6
|
+
import D from "./index.es29.js";
|
|
7
|
+
import J from "./index.es30.js";
|
|
8
|
+
import N from "./index.es31.js";
|
|
9
|
+
import R from "./index.es32.js";
|
|
10
|
+
import q from "./index.es33.js";
|
|
11
|
+
import A from "./index.es34.js";
|
|
12
|
+
import B from "./index.es35.js";
|
|
13
13
|
import { jsonStringifyParse as U } from "./index.es12.js";
|
|
14
14
|
const L = [j, I, P, $, D, J, N, R, q, A], G = (c) => {
|
|
15
15
|
let o = {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AudioItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface AudioSectionProps {
|
|
7
|
+
audios: AudioItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const AudioSection: React.FC<AudioSectionProps>;
|
|
12
|
+
export default AudioSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface DocumentItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface DocumentSectionProps {
|
|
7
|
+
documents: DocumentItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source: any;
|
|
10
|
+
}
|
|
11
|
+
declare const DocumentSection: React.FC<DocumentSectionProps>;
|
|
12
|
+
export default DocumentSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ImageItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface ImageSectionProps {
|
|
7
|
+
images: ImageItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const ImageSection: React.FC<ImageSectionProps>;
|
|
12
|
+
export default ImageSection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { EntityInfo } from '../../../../../../api/kg/kgSerach';
|
|
3
|
+
interface ListCardProps {
|
|
4
|
+
entity: EntityInfo;
|
|
5
|
+
viewMode: 'list' | 'grid';
|
|
6
|
+
keyword?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
contentClass?: string;
|
|
9
|
+
titleClass?: string;
|
|
10
|
+
onViewDetails: (entity: EntityInfo) => void;
|
|
11
|
+
source?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ListCard: React.FC<ListCardProps>;
|
|
14
|
+
export default ListCard;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface Property {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface PropertySectionProps {
|
|
7
|
+
properties: Property[];
|
|
8
|
+
excludedKeys?: string[];
|
|
9
|
+
}
|
|
10
|
+
declare const PropertySection: React.FC<PropertySectionProps>;
|
|
11
|
+
export default PropertySection;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface RelationItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface RelationSectionProps {
|
|
7
|
+
relations: RelationItem[];
|
|
8
|
+
kgIds?: any;
|
|
9
|
+
viewMode?: 'list' | 'grid';
|
|
10
|
+
source?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const RelationSection: React.FC<RelationSectionProps>;
|
|
13
|
+
export default RelationSection;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface VideoItem {
|
|
3
|
+
propertyKey: string;
|
|
4
|
+
propertyValue: string;
|
|
5
|
+
}
|
|
6
|
+
interface VideoSectionProps {
|
|
7
|
+
videos: VideoItem[];
|
|
8
|
+
forceSingleColumn?: boolean;
|
|
9
|
+
source?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const VideoSection: React.FC<VideoSectionProps>;
|
|
12
|
+
export default VideoSection;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export declare const cardDara: {
|
|
2
|
+
msg: string;
|
|
3
|
+
code: number;
|
|
4
|
+
data: {
|
|
5
|
+
size: number;
|
|
6
|
+
nodes: {
|
|
7
|
+
varName: string;
|
|
8
|
+
type: string;
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
types: string;
|
|
12
|
+
properties: {
|
|
13
|
+
datatype: string;
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
value: string;
|
|
17
|
+
label: string;
|
|
18
|
+
};
|
|
19
|
+
}[];
|
|
20
|
+
links: {
|
|
21
|
+
source: string;
|
|
22
|
+
target: string;
|
|
23
|
+
label: string;
|
|
24
|
+
id: string;
|
|
25
|
+
}[];
|
|
26
|
+
isCalculateXY: boolean;
|
|
27
|
+
data2: {
|
|
28
|
+
AnsNum: number;
|
|
29
|
+
OutputLimit: number;
|
|
30
|
+
QueryTime: string;
|
|
31
|
+
StatusCode: number;
|
|
32
|
+
StatusMsg: string;
|
|
33
|
+
ThreadId: string;
|
|
34
|
+
head: {
|
|
35
|
+
link: never[];
|
|
36
|
+
vars: string[];
|
|
37
|
+
};
|
|
38
|
+
results: {
|
|
39
|
+
bindings: {
|
|
40
|
+
b: {
|
|
41
|
+
type: string;
|
|
42
|
+
value: string;
|
|
43
|
+
};
|
|
44
|
+
c: {
|
|
45
|
+
datatype: string;
|
|
46
|
+
type: string;
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
}[];
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
property: {
|
|
53
|
+
propertyKey: string;
|
|
54
|
+
propertyValue: string;
|
|
55
|
+
}[];
|
|
56
|
+
image: {
|
|
57
|
+
propertyKey: string;
|
|
58
|
+
propertyValue: string;
|
|
59
|
+
}[];
|
|
60
|
+
video: {
|
|
61
|
+
propertyKey: string;
|
|
62
|
+
propertyValue: string;
|
|
63
|
+
}[];
|
|
64
|
+
audio: {
|
|
65
|
+
propertyKey: string;
|
|
66
|
+
propertyValue: string;
|
|
67
|
+
}[];
|
|
68
|
+
document: {
|
|
69
|
+
propertyKey: string;
|
|
70
|
+
propertyValue: string;
|
|
71
|
+
}[];
|
|
72
|
+
relation: {
|
|
73
|
+
uri: string;
|
|
74
|
+
showValue: string;
|
|
75
|
+
showType: string;
|
|
76
|
+
kg: string;
|
|
77
|
+
kgId: number;
|
|
78
|
+
content: {
|
|
79
|
+
propertyKey: string;
|
|
80
|
+
propertyValue: string;
|
|
81
|
+
}[];
|
|
82
|
+
}[];
|
|
83
|
+
};
|
|
84
|
+
};
|
|
@@ -105,9 +105,15 @@ export interface CytoscapeReactProps {
|
|
|
105
105
|
/** ActionBar 工具栏位置,默认 'bottom-right' */
|
|
106
106
|
actionBarPosition?: ActionBarPosition;
|
|
107
107
|
/** ActionBar 配置 */
|
|
108
|
-
actionBar?: ActionBarConfig;
|
|
108
|
+
actionBar?: boolean | ActionBarConfig;
|
|
109
109
|
/** 右键菜单配置,传入则覆盖/追加默认菜单项 */
|
|
110
110
|
actionCircle?: ActionCircleItem[];
|
|
111
111
|
/** 暂无数据描述 */
|
|
112
112
|
noDataDesc?: string;
|
|
113
|
+
/** 统计配置:true 显示默认统计,false 不显示,数组可自定义统计项如 [{label:'实体',key:'entity'}] */
|
|
114
|
+
queryStatisticsConfig?: boolean | {
|
|
115
|
+
label: string;
|
|
116
|
+
key: string;
|
|
117
|
+
}[];
|
|
118
|
+
className?: string;
|
|
113
119
|
}
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cytoscape-container{width:100%;height:100%;margin:20px auto}.search-input{padding:8px 12px;width:300px;margin-bottom:10px;border:1px solid #ddd;border-radius:4px}.btn-group{margin-bottom:10px}.btn{padding:8px 16px;margin:0 5px;border:none;border-radius:4px;background:#4285f4;color:#fff;cursor:pointer}.btn:hover{background:#3367d6}.result-text{margin-bottom:10px;color:#333;font-size:14px}.cy-container{width:100%;height:100%}.cy-container :global(.grayed){opacity:.3!important;background-color:#bdbdbd!important;color:#757575!important}.cy-container :global(.highlighted){background-color:#ffeb3b!important;border-color:#fbc02d!important;color:#333!important}.cy-container :global(.selected){border-color:#4caf50!important;background-color:#a5d6a7!important;color:#1b5e20!important}.cy-container .cy-edge:selected{line-color:#ea4335;line-width:3px;line-style:solid}.cy-container .cy-node:hover:not(:selected){background-color:#3367d6}.cy-container .cy-edge:hover:not(:selected){line-color:#757575}.path-nodes-container{margin-bottom:15px}.path-nodes-container h3{margin:10px 0;font-size:16px;color:#333}.node-input-row{display:flex;align-items:center;margin-bottom:8px}.node-input-row span{margin-right:10px;min-width:60px}.node-input-row input{flex:1;margin-right:10px}.remove-node-btn{background:#f44336;padding:6px 12px;font-size:12px}.add-node-btn{background:#4caf50;padding:8px 16px;margin-top:10px}.menuBtn:nth-child(1){transform:rotate(0) skew(31deg)}.menuBtn:nth-child(2){transform:rotate(51deg) skew(31deg)}.menuBtn:nth-child(3){transform:rotate(102deg) skew(31deg)}.menuBtn:nth-child(4){transform:rotate(153deg) skew(31deg)}.menuBtn:nth-child(5){transform:rotate(204deg) skew(31deg)}.menuBtn:nth-child(6){transform:rotate(255deg) skew(31deg)}.menuBtn:nth-child(7){transform:rotate(306deg) skew(35deg)}.menuBtn .menu-item{color:#fff;display:block;width:50px;height:20px;position:absolute;text-align:center;font-size:12px}.menuBtn .menu-item:hover{background:transparent!important}.menuBtn .menu-item{bottom:5px;right:19px;transform:skew(-30deg) translate(-9%) rotate(2deg) translateY(0)}.menuCertent{width:60px;height:60px;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;left:50%;margin-top:-15%;margin-left:-15%;z-index:999;border-radius:50%;color:#fff;text-align:center;font-size:16px;cursor:pointer;border:2px solid #c9cec9}.opacity-30{opacity:.3}.cursor{cursor:pointer}.my-4px{margin:4px 0}.z-10{z-index:10}.hidden{display:none}.w-20px{width:20px}.h-100{height:100%}.rounded-50{border-radius:10%}.relative{position:relative}.absolute{position:absolute}.w-100{width:100%}.graph-bar{position:absolute;display:flex;align-items:center;z-index:10}.graph-bar .graph-bar-min-vertical{padding:10px 0!important}.graph-bar .graph-bar-min{display:flex;background:#fff;padding:10px;box-shadow:0 4px 20px #100dae33;border-radius:6px;flex-wrap:nowrap;gap:10px;width:auto;white-space:nowrap}.graph-bar .graph-bar-menu{position:relative;cursor:pointer;margin:0 10px;white-space:nowrap;display:flex;align-items:center}.graph-bar .graph-bar-menu:hover .grap-menu-dropdown-item{color:#145afd}.graph-bar .grap-menu-dropdown{background:#fff;box-shadow:0 4px 20px #0000003b;border-radius:6px;position:absolute;padding:5px 0;z-index:99;top:60px}.graph-bar .grap-menu-dropdown p{white-space:nowrap;padding:5px 15px}.graph-bar .grap-menu-dropdown p:hover{background:#f5f5f5;color:#145afd}.graph-bar .grap-menu-dropdown-item{display:flex;cursor:pointer;flex-direction:column;align-items:center}.graph-bar .hide{display:none}.graph-bar .show{display:block}.graph-bar.graph-bar-vertical,.graph-bar.graph-bar-vertical .graph-bar-min{flex-direction:column}.graph-bar.graph-bar-vertical .grap-menu-dropdown{top:auto;left:60px;right:auto}.gtaph-statics{right:0;z-index:1;background:#fff;padding:10px;border-radius:10px;width:200px;box-shadow:0 4px 20px #0000003b}.hove-active{cursor:pointer;font-size:14px}.hove-active:hover{color:#145afd}.setting-form{display:flex;flex-direction:column;height:100%}.setting-form .setting-form-content{flex:1;overflow-y:auto;padding:16px}.setting-form .setting-form-footer{position:sticky;bottom:0;background:#fff;padding:16px;border-top:1px solid #f0f0f0;margin-top:auto}.setting-form .setting-form-footer .ant-form-item{margin-bottom:0}.query-node{width:300px;position:absolute;background-color:#fff;right:0;top:20px;padding:10px 20px;border-radius:10px}.path-node{width:380px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b;z-index:10}.path-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.path-node .search-input{margin-bottom:0;padding-bottom:5px}.path-node .btn-group{display:flex;justify-content:flex-end;margin-top:20px}.path-node .ant-select-suffix{width:10px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b}.query-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.radial-menu{position:relative;display:inline-flex;align-items:center;justify-content:center}.radial-svg{position:absolute;top:0;left:0}.sector-group{cursor:pointer;transition:all .2s ease}.sector-group .sector-path{transition:all .2s ease}.sector-group:hover .sector-path{filter:brightness(1.15) drop-shadow(0 2px 4px rgba(0,0,0,.3))}.sector-label{pointer-events:none;text-shadow:0 1px 3px rgba(0,0,0,.4);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.center-avatar{position:absolute;z-index:10;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 15px #0000004d;transition:all .3s ease;overflow:hidden;color:#fff;font-weight:500}.center-avatar img{width:100%;height:100%;object-fit:cover}.center-avatar .center-text{font-size:14px;text-align:center}.center-avatar:hover{transform:scale(1.08);box-shadow:0 6px 20px #0006}.center-avatar:active{transform:scale(.95)}
|
|
1
|
+
.cytoscape-container{width:100%;height:100%;margin:20px auto}.search-input{padding:8px 12px;width:300px;margin-bottom:10px;border:1px solid #ddd;border-radius:4px}.btn-group{margin-bottom:10px}.btn{padding:8px 16px;margin:0 5px;border:none;border-radius:4px;background:#4285f4;color:#fff;cursor:pointer}.btn:hover{background:#3367d6}.result-text{margin-bottom:10px;color:#333;font-size:14px}.cy-container{width:100%;height:100%}.cy-container :global(.grayed){opacity:.3!important;background-color:#bdbdbd!important;color:#757575!important}.cy-container :global(.highlighted){background-color:#ffeb3b!important;border-color:#fbc02d!important;color:#333!important}.cy-container :global(.selected){border-color:#4caf50!important;background-color:#a5d6a7!important;color:#1b5e20!important}.cy-container .cy-edge:selected{line-color:#ea4335;line-width:3px;line-style:solid}.cy-container .cy-node:hover:not(:selected){background-color:#3367d6}.cy-container .cy-edge:hover:not(:selected){line-color:#757575}.path-nodes-container{margin-bottom:15px}.path-nodes-container h3{margin:10px 0;font-size:16px;color:#333}.node-input-row{display:flex;align-items:center;margin-bottom:8px}.node-input-row span{margin-right:10px;min-width:60px}.node-input-row input{flex:1;margin-right:10px}.remove-node-btn{background:#f44336;padding:6px 12px;font-size:12px}.add-node-btn{background:#4caf50;padding:8px 16px;margin-top:10px}.menuBtn:nth-child(1){transform:rotate(0) skew(31deg)}.menuBtn:nth-child(2){transform:rotate(51deg) skew(31deg)}.menuBtn:nth-child(3){transform:rotate(102deg) skew(31deg)}.menuBtn:nth-child(4){transform:rotate(153deg) skew(31deg)}.menuBtn:nth-child(5){transform:rotate(204deg) skew(31deg)}.menuBtn:nth-child(6){transform:rotate(255deg) skew(31deg)}.menuBtn:nth-child(7){transform:rotate(306deg) skew(35deg)}.menuBtn .menu-item{color:#fff;display:block;width:50px;height:20px;position:absolute;text-align:center;font-size:12px}.menuBtn .menu-item:hover{background:transparent!important}.menuBtn .menu-item{bottom:5px;right:19px;transform:skew(-30deg) translate(-9%) rotate(2deg) translateY(0)}.menuCertent{width:60px;height:60px;display:flex;align-items:center;justify-content:center;position:absolute;top:50%;left:50%;margin-top:-15%;margin-left:-15%;z-index:999;border-radius:50%;color:#fff;text-align:center;font-size:16px;cursor:pointer;border:2px solid #c9cec9}.opacity-30{opacity:.3}.cursor{cursor:pointer}.my-4px{margin:4px 0}.z-10{z-index:10}.hidden{display:none}.w-20px{width:20px}.h-100{height:100%}.rounded-50{border-radius:10%}.relative{position:relative}.absolute{position:absolute}.w-100{width:100%}.graph-bar{position:absolute;display:flex;align-items:center;z-index:10}.graph-bar .graph-bar-min-vertical{padding:10px 0!important}.graph-bar .graph-bar-min{display:flex;background:#fff;padding:10px;box-shadow:0 4px 20px #100dae33;border-radius:6px;flex-wrap:nowrap;gap:10px;width:auto;white-space:nowrap}.graph-bar .graph-bar-menu{position:relative;cursor:pointer;margin:0 10px;white-space:nowrap;display:flex;align-items:center}.graph-bar .graph-bar-menu:hover .grap-menu-dropdown-item{color:#145afd}.graph-bar .grap-menu-dropdown{background:#fff;box-shadow:0 4px 20px #0000003b;border-radius:6px;position:absolute;padding:5px 0;z-index:99;top:60px}.graph-bar .grap-menu-dropdown p{white-space:nowrap;padding:5px 15px}.graph-bar .grap-menu-dropdown p:hover{background:#f5f5f5;color:#145afd}.graph-bar .grap-menu-dropdown-item{display:flex;cursor:pointer;flex-direction:column;align-items:center}.graph-bar .hide{display:none}.graph-bar .show{display:block}.graph-bar.graph-bar-vertical,.graph-bar.graph-bar-vertical .graph-bar-min{flex-direction:column}.graph-bar.graph-bar-vertical .grap-menu-dropdown{top:auto;left:60px;right:auto}.gtaph-statics{right:0;z-index:1;background:#fff;padding:10px;border-radius:10px;width:200px;box-shadow:0 4px 20px #0000003b}.hove-active{cursor:pointer;font-size:14px}.hove-active:hover{color:#145afd}.setting-form{display:flex;flex-direction:column;height:100%}.setting-form .setting-form-content{flex:1;overflow-y:auto;padding:16px}.setting-form .setting-form-footer{position:sticky;bottom:0;background:#fff;padding:16px;border-top:1px solid #f0f0f0;margin-top:auto}.setting-form .setting-form-footer .ant-form-item{margin-bottom:0}.query-node{width:300px;position:absolute;background-color:#fff;right:0;top:20px;padding:10px 20px;border-radius:10px}.path-node{width:380px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b;z-index:10}.path-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.path-node .search-input{margin-bottom:0;padding-bottom:5px}.path-node .btn-group{display:flex;justify-content:flex-end;margin-top:20px}.path-node .ant-select-suffix{width:10px}.query-node{width:300px;position:absolute;background-color:#fff;right:0;padding:10px 20px;border-radius:10px;box-shadow:0 4px 20px #0000003b}.query-node .title{display:flex;justify-content:space-between;height:35px;align-items:center;margin-bottom:10px;font-weight:700;font-size:14px}.radial-menu{position:relative;display:inline-flex;align-items:center;justify-content:center}.radial-svg{position:absolute;top:0;left:0}.sector-group{cursor:pointer;transition:all .2s ease}.sector-group .sector-path{transition:all .2s ease}.sector-group:hover .sector-path{filter:brightness(1.15) drop-shadow(0 2px 4px rgba(0,0,0,.3))}.sector-label{pointer-events:none;text-shadow:0 1px 3px rgba(0,0,0,.4);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}.center-avatar{position:absolute;z-index:10;background:linear-gradient(135deg,#667eea,#764ba2);border-radius:50%;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 15px #0000004d;transition:all .3s ease;overflow:hidden;color:#fff;font-weight:500}.center-avatar img{width:100%;height:100%;object-fit:cover}.center-avatar .center-text{font-size:14px;text-align:center}.center-avatar:hover{transform:scale(1.08);box-shadow:0 6px 20px #0006}.center-avatar:active{transform:scale(.95)}.drawer-wraper,.knowledge-card-drawer{padding-bottom:20px}.drawer-wraper .title,.knowledge-card-drawer .title{font-weight:700;font-size:14px;color:#3d3d3d;position:relative;padding-left:8px}.drawer-wraper .title:before,.knowledge-card-drawer .title:before{position:absolute;left:0;transform:translateY(-50%);top:50%;content:"";width:3px;height:17px;background:#145afd}.drawer-wraper .graph-item,.knowledge-card-drawer .graph-item{height:26px;border-bottom:1px solid #E5E5E5;background:#edf3fe}.drawer-wraper .graph-item:hover,.knowledge-card-drawer .graph-item:hover{background:#edf3fe}.drawer-wraper .noraml-type,.knowledge-card-drawer .noraml-type{font-size:14px;color:#145afd;line-height:26px;text-align:center;border-right:1px solid #E5E5E5}.drawer-wraper .noraml-text,.knowledge-card-drawer .noraml-text{font-size:14px;color:#333;line-height:26px}.drawer-wraper .selected-item,.knowledge-card-drawer .selected-item{background:#edf3fe;color:#1890ff}.drawer-wraper .selected-item .noraml-type,.knowledge-card-drawer .selected-item .noraml-type{background:#347bfc;color:#fff}.drawer-wraper .drawer-card-title,.knowledge-card-drawer .drawer-card-title{font-weight:600;font-size:14px;color:#333;position:relative;padding-bottom:10px;margin:15px 0 10px;cursor:pointer}.drawer-wraper .drawer-card-title:hover,.knowledge-card-drawer .drawer-card-title:hover{color:#145afd}.drawer-wraper .drawer-card-title:after,.knowledge-card-drawer .drawer-card-title:after{content:"";position:absolute;border-bottom:1px solid #DFDFDF;width:100%;left:0;bottom:0}.drawer-wraper .drawer-card-title:before,.knowledge-card-drawer .drawer-card-title:before{content:"";position:absolute;border-bottom:1px solid #145AFD;width:64px;left:0;bottom:0;z-index:1}.collapse-wrap{border-color:#dfdfdf;border-radius:0;height:calc(100vh - 480px);overflow-y:auto}.collapse-wrap .ant-collapse-header{padding:9px 10px!important;background:#fff}.collapse-wrap .ant-collapse-item{border-color:#dfdfdf}.collapse-wrap .ant-collapse-title{font-size:14px;font-weight:700;color:#3d3d3d}.collapse-wrap .ant-collapse-body{max-height:calc(100vh - 550px);overflow-y:auto;width:298px;padding:0 16px 16px!important}.collapse-wrap .ant-collapse-body .ant-card-body{padding:0!important}.collapse-wrap .ant-collapse-body .ant-card{border:none}.property-section-wraper .section-item{display:flex;margin-top:4px}.property-section-wraper .detail-label{color:#333;font-size:14px;white-space:nowrap;flex-shrink:0}.property-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.video-wraper .video-item{height:185px;position:relative;background:#333;border-radius:6px}.video-wraper .video-item-video{width:100%;height:100%;border-radius:6px;object-fit:cover}.relation-section-wraper{display:flex;flex-wrap:wrap;gap:10px}.relation-section-wraper .group{width:100%}.relation-section-wraper .section-card{width:100%;height:100%;border:1px solid #DFDFDF}.relation-section-wraper .section-title{margin-bottom:7px}.relation-section-wraper .entity-name-list{font-size:16px;font-weight:700}.relation-section-wraper .view-details-btn{color:#145afd}.relation-section-wraper .detail-item-tag{background-color:#e6f2ff;font-size:14px;border:1px solid #bdf;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#1082fe;margin-right:3px}.relation-section-wraper .detail-item-tag1{background-color:#fff5df;font-size:14px;border:1px solid #FFE0B8;border-top-left-radius:10px;border-bottom-right-radius:10px;padding:0 13px;color:#ff9418}.relation-section-wraper .detail-item-list{margin-bottom:3px}.relation-section-wraper .detail-label{color:#676a6c;font-size:14px;white-space:nowrap;flex-shrink:0}.relation-section-wraper .detail-value{color:#383838;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.relation-section-wraper .mb-18px{margin-bottom:18px}.knowledge-card-click{height:100%;overflow:hidden}.knowledge-card-click .drawer-card-title2{font-weight:700;flex-wrap:nowrap;padding-bottom:10px;border-bottom:1px solid #e4e7ed;cursor:pointer;color:#333;margin:14px 0}.knowledge-card-click .drawer-card-title2:hover,.knowledge-card-click .drawer-card-title2.active{color:#145afd}.knowledge-card-click .card-item-click{flex-shrink:0;margin-right:10px;border-right:1px solid #e4e7ed;padding-right:10px;height:100%;background:#fff}.knowledge-card-click .knowledge-card-content{height:100%;overflow-y:auto;scrollbar-width:none;-ms-overflow-style:none}.knowledge-card-click .knowledge-card-content::-webkit-scrollbar{display:none}
|
package/package.json
CHANGED
package/lib/index.es20.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as e, Fragment as N, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as g } from "react";
|
|
3
|
-
import { Select as v, Space as b, Button as d } from "antd";
|
|
4
|
-
import { CloseOutlined as w } from "@ant-design/icons";
|
|
5
|
-
/* empty css */
|
|
6
|
-
import { GraphContext as k } from "./index.es15.js";
|
|
7
|
-
const B = ({ searchChange: y, isVisible: h, closePath: c, analysis: i }) => {
|
|
8
|
-
const { pathNodes: n, setPathNodes: r, graphData: p } = g(k), m = () => {
|
|
9
|
-
c && c(!1);
|
|
10
|
-
}, u = () => {
|
|
11
|
-
i && i(n);
|
|
12
|
-
}, f = p.filter((t) => t.group === "nodes").map((t) => t.data);
|
|
13
|
-
return /* @__PURE__ */ e(N, { children: h && /* @__PURE__ */ a("div", { className: "path-node", children: [
|
|
14
|
-
/* @__PURE__ */ a("div", { className: "title", children: [
|
|
15
|
-
/* @__PURE__ */ e("span", { children: "路径分析" }),
|
|
16
|
-
/* @__PURE__ */ e(w, { onClick: () => m() })
|
|
17
|
-
] }),
|
|
18
|
-
n.map((t, s) => /* @__PURE__ */ a("div", { className: "node-input-row", children: [
|
|
19
|
-
/* @__PURE__ */ a("span", { children: [
|
|
20
|
-
"节点 ",
|
|
21
|
-
s + 1,
|
|
22
|
-
":"
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ e(
|
|
25
|
-
v,
|
|
26
|
-
{
|
|
27
|
-
showSearch: !0,
|
|
28
|
-
style: { width: "60%" },
|
|
29
|
-
options: f.map((o) => ({
|
|
30
|
-
value: o.name,
|
|
31
|
-
label: o.name
|
|
32
|
-
})),
|
|
33
|
-
placeholder: "请选择节点",
|
|
34
|
-
className: "select-node",
|
|
35
|
-
value: t,
|
|
36
|
-
onChange: (o) => {
|
|
37
|
-
const l = [...n];
|
|
38
|
-
l[s] = o, r(l);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
n.length > 2 && /* @__PURE__ */ e(
|
|
43
|
-
"button",
|
|
44
|
-
{
|
|
45
|
-
className: "btn remove-node-btn",
|
|
46
|
-
onClick: () => {
|
|
47
|
-
const o = n.filter((l, C) => C !== s);
|
|
48
|
-
r(o);
|
|
49
|
-
},
|
|
50
|
-
children: "删除"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
] }, s)),
|
|
54
|
-
/* @__PURE__ */ e("div", { className: "btn-group", children: /* @__PURE__ */ a(b, { children: [
|
|
55
|
-
/* @__PURE__ */ e(d, { onClick: () => r([...n, ""]), children: "添加节点" }),
|
|
56
|
-
/* @__PURE__ */ e(d, { type: "primary", onClick: () => u(), children: "计算路径" })
|
|
57
|
-
] }) })
|
|
58
|
-
] }) });
|
|
59
|
-
};
|
|
60
|
-
export {
|
|
61
|
-
B as default
|
|
62
|
-
};
|
package/lib/index.es36.js
DELETED