@next-bricks/data-view 0.3.1 → 0.4.0
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/dist/bricks.json +34 -2
- package/dist/chunks/1065.a58e6fc5.js +2 -0
- package/dist/chunks/1065.a58e6fc5.js.map +1 -0
- package/dist/chunks/1646.f9e1c73d.js +2 -0
- package/dist/chunks/1646.f9e1c73d.js.map +1 -0
- package/dist/chunks/2202.746b85c2.js +2 -0
- package/dist/chunks/2202.746b85c2.js.map +1 -0
- package/dist/chunks/2784.2de87a89.js +2 -0
- package/dist/chunks/2784.2de87a89.js.LICENSE.txt +9 -0
- package/dist/chunks/{3494.d359914f.js → 3494.938e0dce.js} +2 -2
- package/dist/chunks/{7822.4a63fdd3.js.map → 3494.938e0dce.js.map} +1 -1
- package/dist/chunks/{3914.738b0862.js → 3914.0bfee7ff.js} +2 -2
- package/dist/chunks/{3914.738b0862.js.map → 3914.0bfee7ff.js.map} +1 -1
- package/dist/chunks/{4717.ace78c3e.js → 4717.9fe94e34.js} +2 -2
- package/dist/chunks/{4717.ace78c3e.js.map → 4717.9fe94e34.js.map} +1 -1
- package/dist/chunks/4770.dd0cb00b.js +2 -0
- package/dist/chunks/4770.dd0cb00b.js.map +1 -0
- package/dist/chunks/{4791.3791c567.js → 4791.887754ed.js} +2 -2
- package/dist/chunks/{4791.3791c567.js.map → 4791.887754ed.js.map} +1 -1
- package/dist/chunks/5114.4bb7f544.js +2 -0
- package/dist/chunks/5114.4bb7f544.js.map +1 -0
- package/dist/chunks/{5151.f76b1f6a.js → 5151.0c83c1fc.js} +2 -2
- package/dist/chunks/{5151.f76b1f6a.js.map → 5151.0c83c1fc.js.map} +1 -1
- package/dist/chunks/{5202.3225e09f.js → 5202.301749b0.js} +2 -2
- package/dist/chunks/{5202.3225e09f.js.map → 5202.301749b0.js.map} +1 -1
- package/dist/chunks/{5636.6a5194f2.js → 5636.9120bddf.js} +2 -2
- package/dist/chunks/{5636.6a5194f2.js.map → 5636.9120bddf.js.map} +1 -1
- package/dist/chunks/{6205.ad762e76.js → 6205.1ca78240.js} +2 -2
- package/dist/chunks/{6205.ad762e76.js.map → 6205.1ca78240.js.map} +1 -1
- package/dist/chunks/6789.47cc0cb4.js +3 -0
- package/dist/chunks/6789.47cc0cb4.js.LICENSE.txt +11 -0
- package/dist/chunks/6789.47cc0cb4.js.map +1 -0
- package/dist/chunks/7110.7100a2ec.js +2 -0
- package/dist/chunks/7110.7100a2ec.js.map +1 -0
- package/dist/chunks/{7164.679a698f.js → 7164.099e46d8.js} +2 -2
- package/dist/chunks/{7164.679a698f.js.map → 7164.099e46d8.js.map} +1 -1
- package/dist/chunks/7746.a3f7665e.js +2 -0
- package/dist/chunks/7746.a3f7665e.js.map +1 -0
- package/dist/chunks/{7822.4a63fdd3.js → 7822.f2eb6da6.js} +2 -2
- package/dist/chunks/{3494.d359914f.js.map → 7822.f2eb6da6.js.map} +1 -1
- package/dist/chunks/{7915.f3e0ede9.js → 7915.0bf6d068.js} +2 -2
- package/dist/chunks/{7915.f3e0ede9.js.map → 7915.0bf6d068.js.map} +1 -1
- package/dist/chunks/{8008.a58de07d.js → 8008.00ab7560.js} +3 -3
- package/dist/chunks/{8008.a58de07d.js.map → 8008.00ab7560.js.map} +1 -1
- package/dist/chunks/8316.573c7eb8.js +2 -0
- package/dist/chunks/{react.48b8771a.js.LICENSE.txt → 8316.573c7eb8.js.LICENSE.txt} +0 -10
- package/dist/chunks/8326.aad48fda.js +2 -0
- package/dist/chunks/8326.aad48fda.js.map +1 -0
- package/dist/chunks/{9549.78bc7312.js → 9549.6ffa306f.js} +2 -2
- package/dist/chunks/{9549.78bc7312.js.map → 9549.6ffa306f.js.map} +1 -1
- package/dist/chunks/9598.2455ebac.js +3 -0
- package/dist/chunks/9598.2455ebac.js.LICENSE.txt +9 -0
- package/dist/chunks/9598.2455ebac.js.map +1 -0
- package/dist/chunks/app-wall-card-item.1558a6a6.js +3 -0
- package/dist/chunks/app-wall-card-item.1558a6a6.js.map +1 -0
- package/dist/chunks/app-wall-relation-line.cfd9940e.js +3 -0
- package/dist/chunks/app-wall-relation-line.cfd9940e.js.map +1 -0
- package/dist/chunks/app-wall-system-card.8aa3df71.js +2 -0
- package/dist/chunks/app-wall-system-card.8aa3df71.js.map +1 -0
- package/dist/chunks/app-wall.f9c4c091.js +2 -0
- package/dist/chunks/app-wall.f9c4c091.js.map +1 -0
- package/dist/chunks/{battery-chart.658a3780.js → battery-chart.93cca2b2.js} +2 -2
- package/dist/chunks/{battery-chart.658a3780.js.map → battery-chart.93cca2b2.js.map} +1 -1
- package/dist/chunks/cabinet-app-layer.98eca353.js +3 -0
- package/dist/chunks/cabinet-app-layer.98eca353.js.map +1 -0
- package/dist/chunks/cabinet-button.0126c915.js +2 -0
- package/dist/chunks/cabinet-button.0126c915.js.map +1 -0
- package/dist/chunks/cabinet-container.52680afc.js +3 -0
- package/dist/chunks/cabinet-container.52680afc.js.map +1 -0
- package/dist/chunks/cabinet-graph.a166c053.js +2 -0
- package/dist/chunks/cabinet-graph.a166c053.js.map +1 -0
- package/dist/chunks/cabinet-node.888717db.js +3 -0
- package/dist/chunks/cabinet-node.888717db.js.map +1 -0
- package/dist/chunks/cabinet-thumbnail.00d41559.js +3 -0
- package/dist/chunks/cabinet-thumbnail.00d41559.js.LICENSE.txt +5 -0
- package/dist/chunks/cabinet-thumbnail.00d41559.js.map +1 -0
- package/dist/chunks/{complex-search.c4405533.js → complex-search.838a9599.js} +2 -2
- package/dist/chunks/{complex-search.c4405533.js.map → complex-search.838a9599.js.map} +1 -1
- package/dist/chunks/dropdown-menu.c903354d.js +3 -0
- package/dist/chunks/dropdown-menu.c903354d.js.LICENSE.txt +5 -0
- package/dist/chunks/dropdown-menu.c903354d.js.map +1 -0
- package/dist/chunks/graph-layout-grid.8e2c1fa8.js +2 -0
- package/dist/chunks/graph-layout-grid.8e2c1fa8.js.map +1 -0
- package/dist/chunks/graph-node.7acbac2d.js +2 -0
- package/dist/chunks/graph-node.7acbac2d.js.map +1 -0
- package/dist/chunks/graph-text.8177275a.js +2 -0
- package/dist/chunks/graph-text.8177275a.js.map +1 -0
- package/dist/chunks/grid-background.0acb596c.js +2 -0
- package/dist/chunks/grid-background.0acb596c.js.map +1 -0
- package/dist/chunks/loading-panel.757cf1ae.js +2 -0
- package/dist/chunks/loading-panel.757cf1ae.js.map +1 -0
- package/dist/chunks/main.95a70cdf.js +2 -0
- package/dist/chunks/main.95a70cdf.js.map +1 -0
- package/dist/chunks/modern-style-treemap.69ec70c8.js +2 -0
- package/dist/chunks/modern-style-treemap.69ec70c8.js.map +1 -0
- package/dist/images/17ea7260.png +0 -0
- package/dist/images/55a7b5bb.png +0 -0
- package/dist/images/7d6604a8.png +0 -0
- package/dist/images/946b4897.png +0 -0
- package/dist/index.2d468103.js +2 -0
- package/dist/index.2d468103.js.map +1 -0
- package/dist-types/app-wall/app-wall.d.ts +4 -0
- package/dist-types/app-wall/index.d.ts +46 -0
- package/dist-types/app-wall/index.spec.d.ts +1 -0
- package/dist-types/app-wall/interface.d.ts +71 -0
- package/dist-types/app-wall/mockData.d.ts +27 -0
- package/dist-types/app-wall/system-card/index.d.ts +1 -1
- package/dist-types/app-wall/utils.d.ts +90 -0
- package/dist-types/app-wall/utils.spec.d.ts +1 -0
- package/dist-types/bootstrap.d.ts +11 -0
- package/dist-types/cabinet/cabinet-app-layer/index.d.ts +32 -0
- package/dist-types/cabinet/cabinet-app-layer/index.spec.d.ts +1 -0
- package/dist-types/cabinet/cabinet-button/index.d.ts +24 -0
- package/dist-types/cabinet/cabinet-button/index.spec.d.ts +1 -0
- package/dist-types/cabinet/cabinet-container/index.d.ts +58 -0
- package/dist-types/cabinet/cabinet-container/index.spec.d.ts +1 -0
- package/dist-types/cabinet/cabinet-node/index.d.ts +40 -0
- package/dist-types/cabinet/cabinet-node/index.spec.d.ts +1 -0
- package/dist-types/cabinet/cabinet-thumbnail/index.d.ts +48 -0
- package/dist-types/cabinet/cabinet-thumbnail/index.spec.d.ts +1 -0
- package/dist-types/cabinet/index.d.ts +52 -0
- package/dist-types/cabinet/index.spec.d.ts +5 -0
- package/dist-types/dropdown-menu/index.d.ts +8 -0
- package/dist-types/graph/layout-grid/index.d.ts +52 -0
- package/dist-types/graph/layout-grid/index.spec.d.ts +1 -0
- package/dist-types/graph/node/index.d.ts +25 -0
- package/dist-types/graph/node/index.spec.d.ts +1 -0
- package/dist-types/graph/text/i18n.d.ts +12 -0
- package/dist-types/graph/text/index.d.ts +33 -0
- package/dist-types/graph/text/index.spec.d.ts +1 -0
- package/dist-types/grid-background/index.d.ts +45 -0
- package/dist-types/grid-background/index.spec.d.ts +1 -0
- package/package.json +5 -4
- package/dist/chunks/1646.840ff4cb.js +0 -2
- package/dist/chunks/1646.840ff4cb.js.map +0 -1
- package/dist/chunks/353.379af925.js +0 -2
- package/dist/chunks/353.379af925.js.map +0 -1
- package/dist/chunks/4512.a6f07874.js +0 -2
- package/dist/chunks/4512.a6f07874.js.map +0 -1
- package/dist/chunks/5746.0603bcc0.js +0 -3
- package/dist/chunks/5746.0603bcc0.js.map +0 -1
- package/dist/chunks/7244.7271f90a.js +0 -2
- package/dist/chunks/7244.7271f90a.js.map +0 -1
- package/dist/chunks/7746.ad47a983.js +0 -2
- package/dist/chunks/7746.ad47a983.js.map +0 -1
- package/dist/chunks/8196.667392f2.js +0 -2
- package/dist/chunks/8196.667392f2.js.map +0 -1
- package/dist/chunks/8843.dcd562e8.js +0 -3
- package/dist/chunks/8843.dcd562e8.js.LICENSE.txt +0 -19
- package/dist/chunks/8843.dcd562e8.js.map +0 -1
- package/dist/chunks/app-wall-card-item.74fb1221.js +0 -3
- package/dist/chunks/app-wall-card-item.74fb1221.js.map +0 -1
- package/dist/chunks/app-wall-relation-line.ff4dd4fc.js +0 -3
- package/dist/chunks/app-wall-relation-line.ff4dd4fc.js.map +0 -1
- package/dist/chunks/app-wall-system-card.331f8176.js +0 -3
- package/dist/chunks/app-wall-system-card.331f8176.js.map +0 -1
- package/dist/chunks/dropdown-menu.43f26f9a.js +0 -3
- package/dist/chunks/dropdown-menu.43f26f9a.js.map +0 -1
- package/dist/chunks/loading-panel.c495be3f.js +0 -2
- package/dist/chunks/loading-panel.c495be3f.js.map +0 -1
- package/dist/chunks/main.8488fbc4.js +0 -2
- package/dist/chunks/main.8488fbc4.js.map +0 -1
- package/dist/chunks/modern-style-treemap.8cfc03bf.js +0 -2
- package/dist/chunks/modern-style-treemap.8cfc03bf.js.map +0 -1
- package/dist/chunks/react.48b8771a.js +0 -2
- package/dist/index.710e5862.js +0 -2
- package/dist/index.710e5862.js.map +0 -1
- /package/dist/chunks/{8008.a58de07d.js.LICENSE.txt → 8008.00ab7560.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{5746.0603bcc0.js.LICENSE.txt → app-wall-card-item.1558a6a6.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-card-item.74fb1221.js.LICENSE.txt → app-wall-relation-line.cfd9940e.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-relation-line.ff4dd4fc.js.LICENSE.txt → cabinet-app-layer.98eca353.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{app-wall-system-card.331f8176.js.LICENSE.txt → cabinet-container.52680afc.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{dropdown-menu.43f26f9a.js.LICENSE.txt → cabinet-node.888717db.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Vector3, Object3D, Vector3Tuple, PerspectiveCamera } from "three";
|
|
2
|
+
import { CSS3DObject } from 'three/addons/renderers/CSS3DRenderer.js';
|
|
3
|
+
import "./card-item/index.js";
|
|
4
|
+
import "./relation-line/index.js";
|
|
5
|
+
import "./system-card/index.js";
|
|
6
|
+
import type { AppWallCardItemProps } from "./card-item/index.js";
|
|
7
|
+
import type { AppWallRelationLineProps } from "./relation-line/index.js";
|
|
8
|
+
import type { SystemCardProps } from "./system-card/index.js";
|
|
9
|
+
import { TrapezoidalObjectProps, TrapezoidalProps, bounds, CardSize, DistanceConfig, Position, Target, Ele } from "./interface.js";
|
|
10
|
+
export interface AppData {
|
|
11
|
+
key: string;
|
|
12
|
+
status: "normal" | "warning";
|
|
13
|
+
cardItemProps: AppWallCardItemProps;
|
|
14
|
+
systemCardProps: SystemCardProps;
|
|
15
|
+
trapezoidalProps: TrapezoidalProps;
|
|
16
|
+
}
|
|
17
|
+
export type Relation = {
|
|
18
|
+
source: string;
|
|
19
|
+
target: string;
|
|
20
|
+
};
|
|
21
|
+
export interface UserData {
|
|
22
|
+
appData: AppData;
|
|
23
|
+
elementStyle: {
|
|
24
|
+
width: number;
|
|
25
|
+
height: number;
|
|
26
|
+
};
|
|
27
|
+
turningStyle: {
|
|
28
|
+
width: number;
|
|
29
|
+
height: number;
|
|
30
|
+
};
|
|
31
|
+
systemCardStyle: {
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
hoverStyle: {
|
|
36
|
+
width: number;
|
|
37
|
+
height: number;
|
|
38
|
+
};
|
|
39
|
+
cardItemObject3D: {
|
|
40
|
+
curve: Object3D;
|
|
41
|
+
flat: Object3D;
|
|
42
|
+
hover: Object3D;
|
|
43
|
+
clickTurn: Object3D;
|
|
44
|
+
};
|
|
45
|
+
systemCardObject3D: {
|
|
46
|
+
clickTurn: Object3D;
|
|
47
|
+
front: Object3D;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export declare const createRelationLine: (sourceVector: Vector3, targetVector: Vector3, lightColor: AppWallRelationLineProps["lightColor"]) => CSS3DObject;
|
|
51
|
+
export declare const getCenterPointOrSubPoint: (start: Vector3Tuple, end: Vector3Tuple) => {
|
|
52
|
+
centerVector: Vector3;
|
|
53
|
+
subVector: Vector3;
|
|
54
|
+
};
|
|
55
|
+
export declare const createTrapezoidalRightOrLeftElement: (props: {
|
|
56
|
+
BW: number;
|
|
57
|
+
TW: number;
|
|
58
|
+
d: number;
|
|
59
|
+
TH: number;
|
|
60
|
+
BH: number;
|
|
61
|
+
isLeft: boolean;
|
|
62
|
+
}) => CSS3DObject;
|
|
63
|
+
export declare const createTrapezoidalTopOrBottomElement: (props: {
|
|
64
|
+
BW: number;
|
|
65
|
+
TW: number;
|
|
66
|
+
d: number;
|
|
67
|
+
TH: number;
|
|
68
|
+
BH: number;
|
|
69
|
+
isTop: boolean;
|
|
70
|
+
}) => CSS3DObject;
|
|
71
|
+
/**
|
|
72
|
+
* 创建梯台模型
|
|
73
|
+
* @param props
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export declare const createTrapezoidalObject: (props: TrapezoidalObjectProps) => CSS3DObject;
|
|
77
|
+
/**
|
|
78
|
+
* 布局计算
|
|
79
|
+
* @param dataSource
|
|
80
|
+
* @param maxX
|
|
81
|
+
* @param maxY
|
|
82
|
+
* @returns
|
|
83
|
+
*/
|
|
84
|
+
export declare const setAppPosition: (dataSource: AppData[], maxX: number, maxY: number) => Target[];
|
|
85
|
+
export declare const createTableTarget: (data: Target, cardSize: CardSize, maxX: number, maxY: number) => Object3D<import("three").Event>;
|
|
86
|
+
export declare const createCurveTarget: (data: Target, cardSize: CardSize, maxX: number, maxY: number, angle: number, radius: number) => Object3D<import("three").Event>;
|
|
87
|
+
export declare const computeCurvePosition: (data: Target, cardSize: CardSize, maxX: number, maxY: number, angle: number) => Position;
|
|
88
|
+
export declare const computeCameraDistance: (camera: PerspectiveCamera, bounds: bounds, distanceConfig: DistanceConfig[], length: number) => number;
|
|
89
|
+
export declare const getAppRelations: (object: CSS3DObject, relationsData: Relation[]) => Relation[];
|
|
90
|
+
export declare const findElementByEvent: (e: MouseEvent) => Ele;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,3 +11,14 @@ import "./particle-animation/index.js";
|
|
|
11
11
|
import "./app-wall/card-item/index.js";
|
|
12
12
|
import "./app-wall/system-card/index.js";
|
|
13
13
|
import "./app-wall/relation-line/index.js";
|
|
14
|
+
import "./cabinet/cabinet-button/index.js";
|
|
15
|
+
import "./cabinet/cabinet-node/index.js";
|
|
16
|
+
import "./cabinet/cabinet-app-layer/index.js";
|
|
17
|
+
import "./cabinet/cabinet-container/index.js";
|
|
18
|
+
import "./cabinet/cabinet-thumbnail/index.js";
|
|
19
|
+
import "./cabinet/index.js";
|
|
20
|
+
import "./app-wall/index.js";
|
|
21
|
+
import "./graph/text/index.js";
|
|
22
|
+
import "./graph/node/index.js";
|
|
23
|
+
import "./graph/layout-grid/index.js";
|
|
24
|
+
import "./grid-background/index.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface CabinetAppLayerProps {
|
|
4
|
+
appTitle: string;
|
|
5
|
+
status?: "active" | "faded";
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @id data-view.cabinet-app-layer
|
|
9
|
+
* @name data-view.cabinet-app-layer
|
|
10
|
+
* @docKind brick
|
|
11
|
+
* @description cabinet子构件----应用层
|
|
12
|
+
* @author nlicroshan
|
|
13
|
+
* @noInheritDoc
|
|
14
|
+
*/
|
|
15
|
+
declare class CabinetAppLayer extends ReactNextElement implements CabinetAppLayerProps {
|
|
16
|
+
/**
|
|
17
|
+
* @kind string
|
|
18
|
+
* @required true
|
|
19
|
+
* @default
|
|
20
|
+
* @description 标题
|
|
21
|
+
*/
|
|
22
|
+
accessor appTitle: string;
|
|
23
|
+
/**
|
|
24
|
+
* @kind "active" | "faded"
|
|
25
|
+
* @required false
|
|
26
|
+
* @default
|
|
27
|
+
* @description 当前状态
|
|
28
|
+
*/
|
|
29
|
+
accessor status: "active" | "faded";
|
|
30
|
+
render(): JSX.Element;
|
|
31
|
+
}
|
|
32
|
+
export { CabinetAppLayer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface CabinetButtonProps {
|
|
4
|
+
buttonStyle?: React.CSSProperties;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @id data-view.cabinet-button
|
|
8
|
+
* @name data-view.cabinet-button
|
|
9
|
+
* @docKind brick
|
|
10
|
+
* @description 大屏按钮
|
|
11
|
+
* @author astrid
|
|
12
|
+
* @noInheritDoc
|
|
13
|
+
*/
|
|
14
|
+
declare class CabinetButton extends ReactNextElement implements CabinetButtonProps {
|
|
15
|
+
/**
|
|
16
|
+
* @kind React.CSSProperties
|
|
17
|
+
* @required false
|
|
18
|
+
* @default -
|
|
19
|
+
* @description 按钮的样式
|
|
20
|
+
*/
|
|
21
|
+
accessor buttonStyle: React.CSSProperties;
|
|
22
|
+
render(): React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export { CabinetButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import { CabinetNodeProps } from "../cabinet-node/index.js";
|
|
4
|
+
export type ContainerType = "host" | "k8s";
|
|
5
|
+
export interface ClickEventDataType {
|
|
6
|
+
type: "node" | "container";
|
|
7
|
+
data: CabinetNodeProps | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface CabinetContainerProps {
|
|
10
|
+
data: CabinetNodeProps[];
|
|
11
|
+
type?: ContainerType;
|
|
12
|
+
customTitle?: string | undefined;
|
|
13
|
+
status?: "active" | "faded";
|
|
14
|
+
handleClick?: (params: ClickEventDataType) => void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @id data-view.cabinet-container
|
|
18
|
+
* @name data-view.cabinet-container
|
|
19
|
+
* @docKind brick
|
|
20
|
+
* @description 大屏集群容器构件
|
|
21
|
+
* @author astrid
|
|
22
|
+
* @noInheritDoc
|
|
23
|
+
*/
|
|
24
|
+
declare class CabinetContainer extends ReactNextElement implements CabinetContainerProps {
|
|
25
|
+
#private;
|
|
26
|
+
/**
|
|
27
|
+
* @kind ContainerType
|
|
28
|
+
* @required true
|
|
29
|
+
* @default host
|
|
30
|
+
* @description 容器类型,有主机集群类型、k8s集群类型
|
|
31
|
+
*/
|
|
32
|
+
accessor type: ContainerType;
|
|
33
|
+
/**
|
|
34
|
+
* @kind CabinetNodeProps[]
|
|
35
|
+
* @required true
|
|
36
|
+
* @default -
|
|
37
|
+
* @description 数据
|
|
38
|
+
*/
|
|
39
|
+
accessor data: CabinetNodeProps[];
|
|
40
|
+
/**
|
|
41
|
+
* @kind "active" | "faded"
|
|
42
|
+
* @required false
|
|
43
|
+
* @default
|
|
44
|
+
* @description 当前状态,是否高亮或者淡化
|
|
45
|
+
*/
|
|
46
|
+
accessor status: "active" | "faded";
|
|
47
|
+
/**
|
|
48
|
+
* @kind string|undefined
|
|
49
|
+
* @required false
|
|
50
|
+
* @default -
|
|
51
|
+
* @description 容器标题
|
|
52
|
+
*/
|
|
53
|
+
accessor customTitle: string | undefined;
|
|
54
|
+
handleClick: (params: ClickEventDataType) => void;
|
|
55
|
+
render(): React.ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export declare function CabinetContainerComponent(props: CabinetContainerProps): React.ReactElement;
|
|
58
|
+
export { CabinetContainer };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface CabinetNodeProps {
|
|
4
|
+
type: "container-group" | "physical-machine" | "virtual-machine";
|
|
5
|
+
nodeTitle: string;
|
|
6
|
+
status?: "active" | "faded";
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @id data-view.cabinet-node
|
|
10
|
+
* @name data-view.cabinet-node
|
|
11
|
+
* @docKind brick
|
|
12
|
+
* @description cabinet子构件----节点
|
|
13
|
+
* @author nlicroshan
|
|
14
|
+
* @noInheritDoc
|
|
15
|
+
*/
|
|
16
|
+
declare class CabinetNode extends ReactNextElement implements CabinetNodeProps {
|
|
17
|
+
/**
|
|
18
|
+
* @kind "container-group" | "physical-machine" | "virtual-machine"
|
|
19
|
+
* @required true
|
|
20
|
+
* @default
|
|
21
|
+
* @description 类型
|
|
22
|
+
*/
|
|
23
|
+
accessor type: "container-group" | "physical-machine" | "virtual-machine";
|
|
24
|
+
/**
|
|
25
|
+
* @kind string
|
|
26
|
+
* @required true
|
|
27
|
+
* @default
|
|
28
|
+
* @description 标题
|
|
29
|
+
*/
|
|
30
|
+
accessor nodeTitle: string;
|
|
31
|
+
/**
|
|
32
|
+
* @kind "active" | "faded"
|
|
33
|
+
* @required false
|
|
34
|
+
* @default
|
|
35
|
+
* @description 当前状态
|
|
36
|
+
*/
|
|
37
|
+
accessor status: "active" | "faded";
|
|
38
|
+
render(): JSX.Element;
|
|
39
|
+
}
|
|
40
|
+
export { CabinetNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import { CabinetNodeProps } from "../cabinet-node/index.js";
|
|
4
|
+
import { ContainerType } from "../cabinet-container/index.js";
|
|
5
|
+
export interface Clusters {
|
|
6
|
+
data: CabinetNodeProps[];
|
|
7
|
+
type?: ContainerType;
|
|
8
|
+
title?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface CabinetThumbnailProps {
|
|
11
|
+
clusters: Clusters[];
|
|
12
|
+
appName: string;
|
|
13
|
+
columns?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @id data-view.cabinet-thumbnail
|
|
17
|
+
* @name data-view.cabinet-thumbnail
|
|
18
|
+
* @docKind brick
|
|
19
|
+
* @description 应用墙缩略图
|
|
20
|
+
* @author astrid
|
|
21
|
+
* @noInheritDoc
|
|
22
|
+
*/
|
|
23
|
+
declare class CabinetThumbnail extends ReactNextElement implements CabinetThumbnailProps {
|
|
24
|
+
/**
|
|
25
|
+
* @kind CabinetContainerProps[]
|
|
26
|
+
* @required true
|
|
27
|
+
* @default
|
|
28
|
+
* @description 集群数据
|
|
29
|
+
*/
|
|
30
|
+
accessor clusters: Clusters[];
|
|
31
|
+
/**
|
|
32
|
+
* @kind number
|
|
33
|
+
* @required
|
|
34
|
+
* @default 4
|
|
35
|
+
* @description 单个容器列数
|
|
36
|
+
*/
|
|
37
|
+
accessor columns: number;
|
|
38
|
+
/**
|
|
39
|
+
* @kind string
|
|
40
|
+
* @required true
|
|
41
|
+
* @default
|
|
42
|
+
* @description 应用名称
|
|
43
|
+
*/
|
|
44
|
+
accessor appName: string;
|
|
45
|
+
render(): React.ReactNode;
|
|
46
|
+
}
|
|
47
|
+
export declare function CabinetThumbnailComponent(props: CabinetThumbnailProps): React.ReactElement;
|
|
48
|
+
export { CabinetThumbnail };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
interface Node {
|
|
4
|
+
nodeTitle: string;
|
|
5
|
+
key: string;
|
|
6
|
+
type: "container-group" | "physical-machine" | "virtual-machine";
|
|
7
|
+
}
|
|
8
|
+
interface Clusters {
|
|
9
|
+
clusterName: string;
|
|
10
|
+
key: string;
|
|
11
|
+
type: "host" | "k8s";
|
|
12
|
+
nodes: Node[];
|
|
13
|
+
}
|
|
14
|
+
interface AppData {
|
|
15
|
+
appName: string;
|
|
16
|
+
key: string;
|
|
17
|
+
clusters: Clusters[];
|
|
18
|
+
}
|
|
19
|
+
type ChangeType = "node" | "cluster" | "layer";
|
|
20
|
+
export interface CabinetGraphProps {
|
|
21
|
+
dataSource: AppData;
|
|
22
|
+
activeKey?: string;
|
|
23
|
+
onCloseBtnClick?: () => void;
|
|
24
|
+
onActiveKeyChange?: (key: string, type?: ChangeType, data?: Record<string, any>) => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @id data-view.cabinet-graph
|
|
28
|
+
* @name data-view.cabinet-graph
|
|
29
|
+
* @docKind brick
|
|
30
|
+
* @description cabinet构件
|
|
31
|
+
* @author nlicroshan
|
|
32
|
+
* @noInheritDoc
|
|
33
|
+
*/
|
|
34
|
+
declare class CabinetGraph extends ReactNextElement implements CabinetGraphProps {
|
|
35
|
+
#private;
|
|
36
|
+
/**
|
|
37
|
+
* @kind AppData
|
|
38
|
+
* @required true
|
|
39
|
+
* @default
|
|
40
|
+
* @description 数据源
|
|
41
|
+
*/
|
|
42
|
+
accessor dataSource: AppData;
|
|
43
|
+
/**
|
|
44
|
+
* @kind string
|
|
45
|
+
* @required false
|
|
46
|
+
* @default
|
|
47
|
+
* @description 选中项
|
|
48
|
+
*/
|
|
49
|
+
accessor activeKey: string;
|
|
50
|
+
render(): JSX.Element;
|
|
51
|
+
}
|
|
52
|
+
export { CabinetGraph };
|
|
@@ -9,6 +9,7 @@ interface DropdownMenuProps {
|
|
|
9
9
|
value?: string;
|
|
10
10
|
placeholder?: string;
|
|
11
11
|
onChange?: (value: string) => void;
|
|
12
|
+
allowClear?: boolean;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* @id data-view.dropdown-menu
|
|
@@ -44,6 +45,13 @@ declare class DropdownMenu extends ReactNextElement implements DropdownMenuProps
|
|
|
44
45
|
* @description 占位符
|
|
45
46
|
*/
|
|
46
47
|
accessor placeholder: string;
|
|
48
|
+
/**
|
|
49
|
+
* @kind boolean
|
|
50
|
+
* @required false
|
|
51
|
+
* @default
|
|
52
|
+
* @description 是否允许清除
|
|
53
|
+
*/
|
|
54
|
+
accessor allowClear: boolean;
|
|
47
55
|
render(): JSX.Element;
|
|
48
56
|
}
|
|
49
57
|
export { DropdownMenu };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
import { GraphNodeProps } from "../node/index.js";
|
|
4
|
+
import { GraphTextProps } from "../text/index.js";
|
|
5
|
+
export type DataSourceType = GraphTextProps & GraphNodeProps;
|
|
6
|
+
export interface GraphLayoutGridProps {
|
|
7
|
+
columns: number;
|
|
8
|
+
rows: number;
|
|
9
|
+
dataSource?: DataSourceType[];
|
|
10
|
+
isReverse?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @id data-view.graph-layout-grid
|
|
14
|
+
* @name data-view.graph-layout-grid
|
|
15
|
+
* @docKind brick
|
|
16
|
+
* @description
|
|
17
|
+
* @author astrid
|
|
18
|
+
* @noInheritDoc
|
|
19
|
+
*/
|
|
20
|
+
declare class GraphLayoutGrid extends ReactNextElement implements GraphLayoutGridProps {
|
|
21
|
+
/**
|
|
22
|
+
* @kind number
|
|
23
|
+
* @default -
|
|
24
|
+
* @required true
|
|
25
|
+
* @description 布局的列数
|
|
26
|
+
*/
|
|
27
|
+
accessor columns: number;
|
|
28
|
+
/**
|
|
29
|
+
* @kind number
|
|
30
|
+
* @default -
|
|
31
|
+
* @required true
|
|
32
|
+
* @description 布局的行数
|
|
33
|
+
*/
|
|
34
|
+
accessor rows: number;
|
|
35
|
+
/**
|
|
36
|
+
* @kind boolean
|
|
37
|
+
* @default -
|
|
38
|
+
* @required false
|
|
39
|
+
* @description 布局是否反转, 默认排布方式是: 奇数行位置13579...,偶数行是02468...,isReverse为true后,偶数行位置13579...,奇数行是02468...
|
|
40
|
+
*/
|
|
41
|
+
accessor isReverse: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @kind DataSourceType[]
|
|
44
|
+
* @default -
|
|
45
|
+
* @required false
|
|
46
|
+
* @description 数据源
|
|
47
|
+
*/
|
|
48
|
+
accessor dataSource: DataSourceType[];
|
|
49
|
+
render(): React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
export declare function GraphLayoutGridComponent(props: GraphLayoutGridProps): React.ReactElement;
|
|
52
|
+
export { GraphLayoutGrid };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface GraphNodeProps {
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @id data-view.graph-node
|
|
8
|
+
* @name data-view.graph-node
|
|
9
|
+
* @docKind brick
|
|
10
|
+
* @description
|
|
11
|
+
* @author astrid
|
|
12
|
+
* @noInheritDoc
|
|
13
|
+
*/
|
|
14
|
+
declare class GraphNode extends ReactNextElement implements GraphNodeProps {
|
|
15
|
+
/**
|
|
16
|
+
* @kind string
|
|
17
|
+
* @default -
|
|
18
|
+
* @required true
|
|
19
|
+
* @description 图片路径
|
|
20
|
+
*/
|
|
21
|
+
accessor url: string;
|
|
22
|
+
render(): React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare function GraphNodeComponent(props: GraphNodeProps): React.ReactElement;
|
|
25
|
+
export { GraphNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
export interface GraphTextProps {
|
|
4
|
+
text: string;
|
|
5
|
+
value: string | number;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @id data-view.graph-text
|
|
9
|
+
* @name data-view.graph-text
|
|
10
|
+
* @docKind brick
|
|
11
|
+
* @description
|
|
12
|
+
* @author astrid
|
|
13
|
+
* @noInheritDoc
|
|
14
|
+
*/
|
|
15
|
+
declare class GraphText extends ReactNextElement implements GraphTextProps {
|
|
16
|
+
/**
|
|
17
|
+
* @kind string
|
|
18
|
+
* @default -
|
|
19
|
+
* @required true
|
|
20
|
+
* @description 文本标题
|
|
21
|
+
*/
|
|
22
|
+
accessor text: string;
|
|
23
|
+
/**
|
|
24
|
+
* @kind string|number
|
|
25
|
+
* @default -
|
|
26
|
+
* @required true
|
|
27
|
+
* @description 文本值
|
|
28
|
+
*/
|
|
29
|
+
accessor value: string | number;
|
|
30
|
+
render(): React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export declare function GraphTextComponent(props: GraphTextProps): React.ReactElement;
|
|
33
|
+
export { GraphText };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.jsx";
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactNextElement } from "@next-core/react-element";
|
|
3
|
+
interface ParticleColor {
|
|
4
|
+
startColor: React.CSSProperties["color"];
|
|
5
|
+
endColor: React.CSSProperties["color"];
|
|
6
|
+
}
|
|
7
|
+
interface GridBackgroundProps {
|
|
8
|
+
color?: React.CSSProperties["color"];
|
|
9
|
+
particleColor?: ParticleColor;
|
|
10
|
+
maskStyle?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* @id data-view.grid-background
|
|
14
|
+
* @name data-view.grid-background
|
|
15
|
+
* @docKind brick
|
|
16
|
+
* @description 大屏网格背景
|
|
17
|
+
* @author astrid
|
|
18
|
+
* @noInheritDoc
|
|
19
|
+
*/
|
|
20
|
+
declare class GridBackground extends ReactNextElement implements GridBackgroundProps {
|
|
21
|
+
/**
|
|
22
|
+
* @kind React.CSSProperties["color"]
|
|
23
|
+
* @default "#235F90"
|
|
24
|
+
* @required false
|
|
25
|
+
* @description 背景条纹颜色
|
|
26
|
+
*/
|
|
27
|
+
accessor color: React.CSSProperties["color"];
|
|
28
|
+
/**
|
|
29
|
+
* @kind React.CSSProperties
|
|
30
|
+
* @default -
|
|
31
|
+
* @required false
|
|
32
|
+
* @description 背景蓝色遮罩区域样式
|
|
33
|
+
*/
|
|
34
|
+
accessor maskStyle: React.CSSProperties;
|
|
35
|
+
/**
|
|
36
|
+
* @kind ParticleColor
|
|
37
|
+
* @default {startColor: "#477AFFFF", endColor: "#5F83FF00"}
|
|
38
|
+
* @required
|
|
39
|
+
* @description 运动粒子的颜色
|
|
40
|
+
*/
|
|
41
|
+
accessor particleColor: ParticleColor;
|
|
42
|
+
render(): React.ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export declare function GridBackgroundComponent(props: GridBackgroundProps): React.ReactElement;
|
|
45
|
+
export { GridBackground };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next-bricks/data-view",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,9 +41,10 @@
|
|
|
41
41
|
"postpublish": "mv package.json.bak package.json"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@next-core/build-next-bricks": "^1.4.
|
|
44
|
+
"@next-core/build-next-bricks": "^1.4.2",
|
|
45
45
|
"@next-core/test-next": "^1.0.4",
|
|
46
|
-
"@types/d3-hierarchy": "^3.1.2"
|
|
46
|
+
"@types/d3-hierarchy": "^3.1.2",
|
|
47
|
+
"@types/three": "^0.150.1"
|
|
47
48
|
},
|
|
48
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "6897706202443b8914d9afa70da840848a986119"
|
|
49
50
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[1646,7746],{5863:(e,t,n)=>{function r(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(t,{Z:()=>r})},175:(e,t,n)=>{function r(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}n.d(t,{Z:()=>r})},687:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(175);function i(e,t){return function(e,t){return t.get?t.get.call(e):t.value}(e,(0,r.Z)(e,t,"get"))}},3395:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(5863);function i(e,t,n){(0,r.Z)(e,t),t.set(e,n)}},381:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(175);function i(e,t,n){return function(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}(e,(0,r.Z)(e,t,"set"),n),n}},6171:(e,t,n)=>{function r(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}n.d(t,{Z:()=>r})},5866:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(5863);function i(e,t){(0,r.Z)(e,t),t.add(e)}},7896:(e,t,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},2159:(e,t,n)=>{function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:()=>r})},1646:(e,t,n)=>{n.r(t),n.d(t,{ReactNextElement:()=>h,wrapBrick:()=>g,wrapLocalBrick:()=>b});var r=n(5866),i=n(3395),a=n(6171),o=n(381),s=n(687),l=n(8657),c=n(7029),u=n(1785),d=new WeakMap,f=new WeakSet;class h extends u.NextElement{constructor(){super(...arguments),(0,r.Z)(this,f),(0,i.Z)(this,d,{writable:!0,value:void 0})}connectedCallback(){super._markConnectedCallbackCalled(),(0,a.Z)(this,f,p).call(this),this._render()}disconnectedCallback(){var e;null===(e=(0,s.Z)(this,d))||void 0===e||e.render(null)}_render(){if(this.isConnected&&(0,s.Z)(this,d)){var e,t=this.constructor;t.shadowOptions?(0,s.Z)(this,d).render((0,u.supportsAdoptingStyleSheets)()||null===(e=t.styleTexts)||void 0===e||!e.length?this.render():l.createElement(l.Fragment,null,l.createElement("style",null,t.styleTexts.join("\n")),this.render())):(0,s.Z)(this,d).render(this.render())}}}function p(){if(!(0,s.Z)(this,d)){var e=this.constructor;if(e.shadowOptions){var t,n=this.attachShadow(e.shadowOptions);if((0,u.supportsAdoptingStyleSheets)()&&null!==(t=e.styleTexts)&&void 0!==t&&t.length){var r=new CSSStyleSheet;r.replaceSync(e.styleTexts.join("")),n.adoptedStyleSheets=[r]}(0,o.Z)(this,d,(0,c.s)(n))}else(0,o.Z)(this,d,(0,c.s)(this))}}var v=n(7896),w=n(2159),y=["children"],Z=["children"];function b(e,t){return(0,l.forwardRef)((function(n,r){var{children:i}=n,a=(0,w.Z)(n,y),o="string"==typeof e?e:e.__tagName,s=O(a,t);return l.createElement(o,(0,v.Z)({},s,{ref:r}),i)}))}function g(e,t){return(0,l.forwardRef)((function(n,r){var{children:i}=n,a=O((0,w.Z)(n,Z),t);return l.createElement(e,(0,v.Z)({},a,{ref:r}),i)}))}function O(e,t){var n;if(t)for(var[r,i]of(n={},Object.entries(e)))Object.prototype.hasOwnProperty.call(t,r)?n["on".concat(t[r])]=i:n[r]=i;else n=e;return n}}}]);
|
|
2
|
-
//# sourceMappingURL=1646.840ff4cb.js.map
|