react-kggraph 0.0.23 → 0.0.25
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 +391 -382
- 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/ActionBar/index.d.ts +2 -0
- package/lib/src/components/Graph/types.d.ts +10 -2
- 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.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 = {};
|
|
@@ -18,6 +18,8 @@ interface ActionBarProps {
|
|
|
18
18
|
left?: string | number;
|
|
19
19
|
};
|
|
20
20
|
actionList?: ActionBarItem[];
|
|
21
|
+
/** 是否默认展开工具栏,默认 false 收起 */
|
|
22
|
+
isExpand?: boolean;
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
declare const _default: React.ForwardRefExoticComponent<ActionBarProps & React.RefAttributes<unknown>>;
|
|
@@ -57,7 +57,7 @@ export interface GraphColors {
|
|
|
57
57
|
/** 路径节点颜色,默认 #145AFD */
|
|
58
58
|
pathNodeColor?: string;
|
|
59
59
|
}
|
|
60
|
-
export type ActionBarPosition = 'top' | 'bottom' | 'left' | 'right' |
|
|
60
|
+
export type ActionBarPosition = 'top' | 'bottom' | 'left' | 'right' | {
|
|
61
61
|
top?: string | number;
|
|
62
62
|
right?: string | number;
|
|
63
63
|
bottom?: string | number;
|
|
@@ -84,6 +84,8 @@ export interface ActionBarConfig {
|
|
|
84
84
|
position?: ActionBarPosition;
|
|
85
85
|
/** 按钮列表配置,传入则覆盖默认按钮 */
|
|
86
86
|
actionList?: ActionBarItem[];
|
|
87
|
+
/** 默认展开或者收起 */
|
|
88
|
+
isExpand?: boolean;
|
|
87
89
|
}
|
|
88
90
|
export interface CytoscapeReactProps {
|
|
89
91
|
/** 图谱数据 */
|
|
@@ -105,9 +107,15 @@ export interface CytoscapeReactProps {
|
|
|
105
107
|
/** ActionBar 工具栏位置,默认 'bottom-right' */
|
|
106
108
|
actionBarPosition?: ActionBarPosition;
|
|
107
109
|
/** ActionBar 配置 */
|
|
108
|
-
actionBar?: ActionBarConfig;
|
|
110
|
+
actionBar?: boolean | ActionBarConfig;
|
|
109
111
|
/** 右键菜单配置,传入则覆盖/追加默认菜单项 */
|
|
110
112
|
actionCircle?: ActionCircleItem[];
|
|
111
113
|
/** 暂无数据描述 */
|
|
112
114
|
noDataDesc?: string;
|
|
115
|
+
/** 统计配置:true 显示默认统计,false 不显示,数组可自定义统计项如 [{label:'实体',key:'entity'}] */
|
|
116
|
+
queryStatisticsConfig?: boolean | {
|
|
117
|
+
label: string;
|
|
118
|
+
key: string;
|
|
119
|
+
}[];
|
|
120
|
+
className?: string;
|
|
113
121
|
}
|
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)}.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}.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}
|
|
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:0!important}.graph-bar .graph-bar-min{display:flex;background:#fff;padding:4px;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-expand-wrapper-vertical{overflow:hidden;max-height:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper{overflow:hidden;max-width:1000px;transition:max-height .3s ease-in-out,opacity .3s ease-in-out,margin .3s ease-in-out;opacity:1}.graph-bar .graph-bar-expand-wrapper.collapsed{max-width:0;opacity:0;margin:0!important}.graph-bar .graph-bar-expand-wrapper-vertical.collapsed-vertical{max-height:0;opacity:0;margin:0!important}.graph-bar .graph-bar-min:not(.graph-bar-min-vertical) .graph-bar-expand-wrapper{display:flex;align-items:center;gap:10px;margin-left:10px;margin-right:10px}.graph-bar.graph-bar-vertical{flex-direction:column}.graph-bar.graph-bar-vertical .graph-bar-min{flex-direction:column;align-items:flex-start;position:relative;padding-bottom:0!important}.graph-bar.graph-bar-vertical .graph-bar-expand-wrapper{flex-direction:column;width:100%}.graph-bar.graph-bar-vertical .cursor{align-self:flex-end;flex-shrink:0;position:relative}.graph-bar.graph-bar-vertical .cursor:before{content:"";position:absolute;top:-10px;left:0;right:0;height:10px}.graph-bar.graph-bar-vertical .grap-menu-dropdown{top:auto;left:60px;right:auto}.graph-bar .bar-item{color:#999;font-size:12px;margin:8px 0}.graph-bar .oprate-btn{width:76px;color:#145afd;border-right:1px solid #f0f0f0}.graph-bar .oprate-btn-vertical{width:76px;padding:10px 0;color:#145afd;border-top:1px solid #f0f0f0}.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
package/lib/index.es41.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { Row as i, Col as p } from "antd";
|
|
3
|
-
const d = ({ properties: t, excludedKeys: l = [] }) => {
|
|
4
|
-
const s = t.filter(
|
|
5
|
-
(e) => !l.includes(e.propertyKey)
|
|
6
|
-
);
|
|
7
|
-
return /* @__PURE__ */ o(i, { className: "property-section-wraper", children: s.map((e, a) => /* @__PURE__ */ r(p, { span: 24, className: "section-item", children: [
|
|
8
|
-
/* @__PURE__ */ r("div", { className: "detail-label", children: [
|
|
9
|
-
e.propertyKey,
|
|
10
|
-
":"
|
|
11
|
-
] }),
|
|
12
|
-
/* @__PURE__ */ r("div", { className: "detail-value", children: [
|
|
13
|
-
" ",
|
|
14
|
-
e.propertyValue,
|
|
15
|
-
" "
|
|
16
|
-
] })
|
|
17
|
-
] }, a)) });
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
d as default
|
|
21
|
-
};
|
|
File without changes
|