@moxa/graph 1.4.1 → 2.1.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/assets/worker-CJB7i_ev.js +13 -0
- package/index.cjs +132 -4023
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +48863 -75560
- package/lib/behavior/brush-select.d.ts +7 -0
- package/lib/behavior/brush-select.d.ts.map +1 -0
- package/lib/behavior/click-select.d.ts +129 -0
- package/lib/behavior/click-select.d.ts.map +1 -0
- package/lib/behavior/collapse-expand.d.ts +6 -0
- package/lib/behavior/collapse-expand.d.ts.map +1 -0
- package/lib/behavior/create-edge.d.ts +6 -0
- package/lib/behavior/create-edge.d.ts.map +1 -0
- package/lib/behavior/drag-canvas.d.ts +6 -0
- package/lib/behavior/drag-canvas.d.ts.map +1 -0
- package/lib/behavior/drag-element.d.ts +6 -0
- package/lib/behavior/drag-element.d.ts.map +1 -0
- package/lib/behavior/fix-element-size.d.ts +90 -0
- package/lib/behavior/fix-element-size.d.ts.map +1 -0
- package/lib/behavior/focus-element.d.ts +6 -0
- package/lib/behavior/focus-element.d.ts.map +1 -0
- package/lib/behavior/helper/behavior.mapper.d.ts +6 -0
- package/lib/behavior/helper/behavior.mapper.d.ts.map +1 -0
- package/lib/behavior/helper/index.d.ts +2 -0
- package/lib/behavior/helper/index.d.ts.map +1 -0
- package/lib/behavior/hover-activate.d.ts +6 -0
- package/lib/behavior/hover-activate.d.ts.map +1 -0
- package/lib/behavior/index.d.ts +2 -0
- package/lib/behavior/index.d.ts.map +1 -0
- package/lib/behavior/scroll-canvas.d.ts +6 -0
- package/lib/behavior/scroll-canvas.d.ts.map +1 -0
- package/lib/behavior/select-all.d.ts +15 -0
- package/lib/behavior/select-all.d.ts.map +1 -0
- package/lib/behavior/zoom-canvas.d.ts +6 -0
- package/lib/behavior/zoom-canvas.d.ts.map +1 -0
- package/lib/edge/custom/index.d.ts +4 -0
- package/lib/edge/custom/index.d.ts.map +1 -0
- package/lib/edge/custom/line-edge.d.ts +16 -0
- package/lib/edge/custom/line-edge.d.ts.map +1 -0
- package/lib/edge/custom/polyline-edge.d.ts +19 -0
- package/lib/edge/custom/polyline-edge.d.ts.map +1 -0
- package/lib/edge/custom/quadratic-edge.d.ts +16 -0
- package/lib/edge/custom/quadratic-edge.d.ts.map +1 -0
- package/lib/edge/helper/custom-edge.helper.d.ts +10 -0
- package/lib/edge/helper/custom-edge.helper.d.ts.map +1 -0
- package/lib/edge/helper/edge-g6.mapper.d.ts +18 -0
- package/lib/edge/helper/edge-g6.mapper.d.ts.map +1 -0
- package/lib/edge/helper/edge.mapper.d.ts +17 -0
- package/lib/edge/helper/edge.mapper.d.ts.map +1 -0
- package/lib/edge/helper/edge.theme.d.ts +9 -0
- package/lib/edge/helper/edge.theme.d.ts.map +1 -0
- package/lib/edge/helper/index.d.ts +5 -0
- package/lib/edge/helper/index.d.ts.map +1 -0
- package/lib/edge/index.d.ts +2 -10
- package/lib/edge/index.d.ts.map +1 -1
- package/lib/graph/graph.d.ts +77 -407
- package/lib/graph/graph.d.ts.map +1 -1
- package/lib/graph/graph.mapper.d.ts +15 -0
- package/lib/graph/graph.mapper.d.ts.map +1 -0
- package/lib/graph/index.d.ts +1 -0
- package/lib/graph/index.d.ts.map +1 -1
- package/lib/group/custom/device-group.d.ts +32 -0
- package/lib/group/custom/device-group.d.ts.map +1 -0
- package/lib/group/custom/index.d.ts +2 -0
- package/lib/group/custom/index.d.ts.map +1 -0
- package/lib/group/helper/group-g6.mapper.d.ts +7 -0
- package/lib/group/helper/group-g6.mapper.d.ts.map +1 -0
- package/lib/group/helper/group.mapper.d.ts +8 -0
- package/lib/group/helper/group.mapper.d.ts.map +1 -0
- package/lib/group/helper/index.d.ts +3 -0
- package/lib/group/helper/index.d.ts.map +1 -0
- package/lib/group/index.d.ts +2 -3
- package/lib/group/index.d.ts.map +1 -1
- package/lib/layout/align.d.ts +17 -0
- package/lib/layout/align.d.ts.map +1 -0
- package/lib/layout/grid.d.ts +11 -0
- package/lib/layout/grid.d.ts.map +1 -0
- package/lib/layout/helper/index.d.ts +2 -0
- package/lib/layout/helper/index.d.ts.map +1 -0
- package/lib/layout/helper/layout.helper.d.ts +4 -0
- package/lib/layout/helper/layout.helper.d.ts.map +1 -0
- package/lib/layout/helper/layout.mapper.d.ts +5 -0
- package/lib/layout/helper/layout.mapper.d.ts.map +1 -0
- package/lib/layout/index.d.ts +6 -4
- package/lib/layout/index.d.ts.map +1 -1
- package/lib/layout/mesh.d.ts +9 -0
- package/lib/layout/mesh.d.ts.map +1 -0
- package/lib/layout/ring.d.ts +9 -0
- package/lib/layout/ring.d.ts.map +1 -0
- package/lib/layout/tree.d.ts +11 -0
- package/lib/layout/tree.d.ts.map +1 -0
- package/lib/model/behavior.model.d.ts +33 -18
- package/lib/model/behavior.model.d.ts.map +1 -1
- package/lib/model/edge.model.d.ts +20 -45
- package/lib/model/edge.model.d.ts.map +1 -1
- package/lib/model/element.model.d.ts +2 -0
- package/lib/model/element.model.d.ts.map +1 -0
- package/lib/model/event.model.d.ts +207 -2
- package/lib/model/event.model.d.ts.map +1 -1
- package/lib/model/graph.model.d.ts +14 -55
- package/lib/model/graph.model.d.ts.map +1 -1
- package/lib/model/group.model.d.ts +7 -29
- package/lib/model/group.model.d.ts.map +1 -1
- package/lib/model/icon.model.d.ts +1 -1
- package/lib/model/icon.model.d.ts.map +1 -1
- package/lib/model/index.d.ts +2 -1
- package/lib/model/index.d.ts.map +1 -1
- package/lib/model/label.model.d.ts +0 -2
- package/lib/model/label.model.d.ts.map +1 -1
- package/lib/model/layout.model.d.ts +21 -22
- package/lib/model/layout.model.d.ts.map +1 -1
- package/lib/model/node.model.d.ts +7 -34
- package/lib/model/node.model.d.ts.map +1 -1
- package/lib/model/plugin.model.d.ts +11 -40
- package/lib/model/plugin.model.d.ts.map +1 -1
- package/lib/model/state.model.d.ts +6 -0
- package/lib/model/state.model.d.ts.map +1 -0
- package/lib/model/theme.model.d.ts +2 -6
- package/lib/model/theme.model.d.ts.map +1 -1
- package/lib/node/custom/device-node.d.ts +30 -0
- package/lib/node/custom/device-node.d.ts.map +1 -0
- package/lib/node/custom/index.d.ts +2 -0
- package/lib/node/custom/index.d.ts.map +1 -0
- package/lib/node/helper/icon-style.d.ts +4 -0
- package/lib/node/helper/icon-style.d.ts.map +1 -0
- package/lib/node/helper/index.d.ts +5 -0
- package/lib/node/helper/index.d.ts.map +1 -0
- package/lib/node/helper/key-style.d.ts +5 -0
- package/lib/node/helper/key-style.d.ts.map +1 -0
- package/lib/node/helper/node-g6.mapper.d.ts +13 -0
- package/lib/node/helper/node-g6.mapper.d.ts.map +1 -0
- package/lib/node/helper/node.mapper.d.ts +23 -0
- package/lib/node/helper/node.mapper.d.ts.map +1 -0
- package/lib/node/index.d.ts +2 -3
- package/lib/node/index.d.ts.map +1 -1
- package/lib/plugin/_minimap.d.ts +1 -0
- package/lib/plugin/_minimap.d.ts.map +1 -0
- package/lib/plugin/context-menu.d.ts +5 -0
- package/lib/plugin/context-menu.d.ts.map +1 -0
- package/lib/plugin/graph-background.d.ts +26 -19
- package/lib/plugin/graph-background.d.ts.map +1 -1
- package/lib/plugin/helper/index.d.ts +2 -0
- package/lib/plugin/helper/index.d.ts.map +1 -0
- package/lib/plugin/helper/plugin.mapper.d.ts +7 -0
- package/lib/plugin/helper/plugin.mapper.d.ts.map +1 -0
- package/lib/plugin/history.d.ts +5 -0
- package/lib/plugin/history.d.ts.map +1 -0
- package/lib/plugin/index.d.ts +3 -2
- package/lib/plugin/index.d.ts.map +1 -1
- package/lib/plugin/toolbar.d.ts +4 -2
- package/lib/plugin/toolbar.d.ts.map +1 -1
- package/lib/plugin/tooltip.d.ts +9 -97
- package/lib/plugin/tooltip.d.ts.map +1 -1
- package/lib/themes/dark.d.ts +3 -0
- package/lib/themes/dark.d.ts.map +1 -0
- package/lib/themes/index.d.ts +3 -3
- package/lib/themes/index.d.ts.map +1 -1
- package/lib/themes/light.d.ts +3 -0
- package/lib/themes/light.d.ts.map +1 -0
- package/lib/themes/light.theme.d.ts +3 -0
- package/lib/themes/light.theme.d.ts.map +1 -0
- package/lib/themes/theme.mapper.d.ts +65 -0
- package/lib/themes/theme.mapper.d.ts.map +1 -0
- package/lib/utils/edge.helper.d.ts +19 -0
- package/lib/utils/edge.helper.d.ts.map +1 -0
- package/lib/utils/element.helper.d.ts +4 -0
- package/lib/utils/element.helper.d.ts.map +1 -0
- package/lib/utils/graph.helper.d.ts +4 -0
- package/lib/utils/graph.helper.d.ts.map +1 -0
- package/lib/utils/index.d.ts +6 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/platform.helper.d.ts +3 -0
- package/lib/utils/platform.helper.d.ts.map +1 -0
- package/lib/utils/rect.helper.d.ts +16 -0
- package/lib/utils/rect.helper.d.ts.map +1 -0
- package/lib/utils/state.helper.d.ts +1 -1
- package/lib/utils/state.helper.d.ts.map +1 -1
- package/lib/utils/tree.helper.d.ts +4 -0
- package/lib/utils/tree.helper.d.ts.map +1 -0
- package/package.json +2 -2
- package/assets/worker-DNGSJ4Eg.js +0 -13
- package/lib/data/data.d.ts +0 -2
- package/lib/data/data.d.ts.map +0 -1
- package/lib/data/index.d.ts +0 -2
- package/lib/data/index.d.ts.map +0 -1
- package/lib/edge/cubic-edge.d.ts +0 -47
- package/lib/edge/cubic-edge.d.ts.map +0 -1
- package/lib/edge/edge.controller.d.ts +0 -19
- package/lib/edge/edge.controller.d.ts.map +0 -1
- package/lib/edge/edge.helper.d.ts +0 -6
- package/lib/edge/edge.helper.d.ts.map +0 -1
- package/lib/edge/line-edge.d.ts +0 -28
- package/lib/edge/line-edge.d.ts.map +0 -1
- package/lib/edge/loop-edge.d.ts +0 -34
- package/lib/edge/loop-edge.d.ts.map +0 -1
- package/lib/edge/multi-label-edge-base.d.ts +0 -84
- package/lib/edge/multi-label-edge-base.d.ts.map +0 -1
- package/lib/edge/polyline-edge.d.ts +0 -40
- package/lib/edge/polyline-edge.d.ts.map +0 -1
- package/lib/edge/quadratic-edge.d.ts +0 -41
- package/lib/edge/quadratic-edge.d.ts.map +0 -1
- package/lib/graph/extendGraph.d.ts +0 -25
- package/lib/graph/extendGraph.d.ts.map +0 -1
- package/lib/group/device-group.d.ts +0 -179
- package/lib/group/device-group.d.ts.map +0 -1
- package/lib/group/group.controller.d.ts +0 -17
- package/lib/group/group.controller.d.ts.map +0 -1
- package/lib/group/group.helper.d.ts +0 -5
- package/lib/group/group.helper.d.ts.map +0 -1
- package/lib/interaction/click-select.d.ts +0 -73
- package/lib/interaction/click-select.d.ts.map +0 -1
- package/lib/interaction/collapse-expand-combo.d.ts +0 -26
- package/lib/interaction/collapse-expand-combo.d.ts.map +0 -1
- package/lib/interaction/drag-item.d.ts +0 -17
- package/lib/interaction/drag-item.d.ts.map +0 -1
- package/lib/interaction/hover-activate.d.ts +0 -47
- package/lib/interaction/hover-activate.d.ts.map +0 -1
- package/lib/interaction/index.d.ts +0 -6
- package/lib/interaction/index.d.ts.map +0 -1
- package/lib/interaction/interaction.controller.d.ts +0 -18
- package/lib/interaction/interaction.controller.d.ts.map +0 -1
- package/lib/interaction/mapping/edge-mapping.behavior.d.ts +0 -4
- package/lib/interaction/mapping/edge-mapping.behavior.d.ts.map +0 -1
- package/lib/interaction/mapping/graph-mapping.behavior.d.ts +0 -43
- package/lib/interaction/mapping/graph-mapping.behavior.d.ts.map +0 -1
- package/lib/interaction/mapping/group-mapping.behavior.d.ts +0 -4
- package/lib/interaction/mapping/group-mapping.behavior.d.ts.map +0 -1
- package/lib/interaction/mapping/node-mapping.behavior.d.ts +0 -4
- package/lib/interaction/mapping/node-mapping.behavior.d.ts.map +0 -1
- package/lib/interaction/select-all-item.behavior.d.ts +0 -6
- package/lib/interaction/select-all-item.behavior.d.ts.map +0 -1
- package/lib/layout/grid-layout.d.ts +0 -4
- package/lib/layout/grid-layout.d.ts.map +0 -1
- package/lib/layout/layout.mapper.d.ts +0 -4
- package/lib/layout/layout.mapper.d.ts.map +0 -1
- package/lib/layout/mesh-layout.d.ts +0 -4
- package/lib/layout/mesh-layout.d.ts.map +0 -1
- package/lib/layout/tree-layout.d.ts +0 -4
- package/lib/layout/tree-layout.d.ts.map +0 -1
- package/lib/model/item.model.d.ts +0 -11
- package/lib/model/item.model.d.ts.map +0 -1
- package/lib/node/device-node.d.ts +0 -172
- package/lib/node/device-node.d.ts.map +0 -1
- package/lib/node/node.controller.d.ts +0 -18
- package/lib/node/node.controller.d.ts.map +0 -1
- package/lib/node/node.helper.d.ts +0 -5
- package/lib/node/node.helper.d.ts.map +0 -1
- package/lib/plugin/minimap.d.ts +0 -3
- package/lib/plugin/minimap.d.ts.map +0 -1
- package/lib/plugin/plugin.mapper.d.ts +0 -4
- package/lib/plugin/plugin.mapper.d.ts.map +0 -1
- package/lib/themes/dark/dark.theme.d.ts +0 -4
- package/lib/themes/dark/dark.theme.d.ts.map +0 -1
- package/lib/themes/dark/index.d.ts +0 -2
- package/lib/themes/dark/index.d.ts.map +0 -1
- package/lib/themes/dark/node-dark.theme.d.ts +0 -3
- package/lib/themes/dark/node-dark.theme.d.ts.map +0 -1
- package/lib/themes/light/index.d.ts +0 -2
- package/lib/themes/light/index.d.ts.map +0 -1
- package/lib/themes/light/light.theme.d.ts +0 -4
- package/lib/themes/light/light.theme.d.ts.map +0 -1
- package/lib/themes/light/node-light.theme.d.ts +0 -3
- package/lib/themes/light/node-light.theme.d.ts.map +0 -1
package/lib/graph/graph.d.ts
CHANGED
|
@@ -1,111 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataController
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { Graph, IEvent, State } from '@antv/g6';
|
|
2
|
+
import { DataController } from '@antv/g6/lib/runtime/data';
|
|
3
|
+
import { ElementController } from '@antv/g6/lib/runtime/element';
|
|
4
|
+
import { MxEdgeData, MxElementType, MxGraphConfig, MxGraphData, MxGraphRenderer, MxGroupData, MxLayoutConfig, MxNodeData, MxPartialEdgeData, MxPartialGroupData, MxPartialNodeData, MxUserBehavior, MxUserPlugin, MxUserThemeType } from '../model';
|
|
5
5
|
declare class MxGraph {
|
|
6
6
|
private config;
|
|
7
7
|
private _graph;
|
|
8
|
-
private
|
|
9
|
-
private edgeController;
|
|
10
|
-
private groupController;
|
|
11
|
-
private interactionController;
|
|
12
|
-
private events;
|
|
8
|
+
private renderType;
|
|
13
9
|
iconSpriteText: string;
|
|
14
|
-
|
|
15
|
-
isAutoSize: boolean;
|
|
16
|
-
containerSize: {
|
|
17
|
-
width: number;
|
|
18
|
-
height: number;
|
|
19
|
-
};
|
|
20
|
-
resizeObserver: ResizeObserver;
|
|
21
|
-
loadGraph$: Subject<StandardGraph>;
|
|
22
|
-
constructor(config: MxGraphConfig);
|
|
23
|
-
get graph(): StandardGraph;
|
|
10
|
+
get graph(): Graph;
|
|
24
11
|
get container(): HTMLElement;
|
|
25
|
-
get
|
|
26
|
-
get
|
|
27
|
-
|
|
28
|
-
private
|
|
29
|
-
private useGraphReady;
|
|
30
|
-
private useContainerResize;
|
|
12
|
+
get elementController(): ElementController;
|
|
13
|
+
get dataController(): DataController;
|
|
14
|
+
constructor(config: MxGraphConfig);
|
|
15
|
+
private initGraph;
|
|
31
16
|
private loadIconSprite;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
getAllEdgesData(): MxEdgeUserData[];
|
|
53
|
-
/**
|
|
54
|
-
* Get all group data
|
|
55
|
-
* @returns MxGroupUserData[]
|
|
56
|
-
*/
|
|
57
|
-
getAllGroupsData(): MxGroupUserData[];
|
|
58
|
-
/**
|
|
59
|
-
* Get group data by id
|
|
60
|
-
* @param {ID} id group id
|
|
61
|
-
* @returns MxGroupData | null
|
|
62
|
-
*/
|
|
63
|
-
getGroupData(id: ID): MxGroupUserData | null;
|
|
64
|
-
/**
|
|
65
|
-
* Get item type by id
|
|
66
|
-
* @param {ID} id item id
|
|
67
|
-
* @returns MxItemType
|
|
68
|
-
*/
|
|
69
|
-
getItemType(id: ID): MxItemType | null;
|
|
70
|
-
/**
|
|
71
|
-
* Get item state by id or filter function
|
|
72
|
-
* @param {string} id node id
|
|
73
|
-
* @param {Function} filterFunction
|
|
74
|
-
* @returns MxItemState
|
|
75
|
-
*/
|
|
76
|
-
getItemByState(itemType: MxItemType, state: MxNodeState | MxEdgeState | MxGroupState): MxNodeUserData[] | MxEdgeUserData[] | MxGroupUserData[];
|
|
77
|
-
/**
|
|
78
|
-
* Get Item state
|
|
79
|
-
* @param id - ID
|
|
80
|
-
* @returns void
|
|
81
|
-
*/
|
|
82
|
-
getItemAllStates(id: ID): string[];
|
|
83
|
-
/**
|
|
84
|
-
* Get children data by group id
|
|
85
|
-
* @param {ID} id group id
|
|
86
|
-
* @returns (MxNodeUserData | MxGroupUserData)[]
|
|
87
|
-
*/
|
|
88
|
-
getGroupChildrenData(id: ID): (MxNodeUserData | MxGroupUserData)[];
|
|
89
|
-
/**
|
|
90
|
-
* Get neighbor node data by node id
|
|
91
|
-
* @param {ID} id node id
|
|
92
|
-
* @returns MxNodeUserData[]
|
|
93
|
-
*/
|
|
94
|
-
getNeighborNodes(nodeId: ID): MxNodeUserData[];
|
|
95
|
-
/**
|
|
96
|
-
* Get current graph specification
|
|
97
|
-
* @returns MxGraphConfig
|
|
98
|
-
*/
|
|
99
|
-
getSpecification(): MxGraphConfig;
|
|
100
|
-
/**
|
|
101
|
-
* Get current zoom level
|
|
102
|
-
* @returns number
|
|
103
|
-
*/
|
|
17
|
+
hasElement(id: string): boolean;
|
|
18
|
+
getConfig(): MxGraphConfig;
|
|
19
|
+
getElementType(id: string): MxElementType;
|
|
20
|
+
getElementState(id: string): string[];
|
|
21
|
+
getElementByState(type: 'node', state: string): MxNodeData[];
|
|
22
|
+
getElementByState(type: 'edge', state: string): MxEdgeData[];
|
|
23
|
+
getElementByState(type: 'group', state: string): MxGroupData[];
|
|
24
|
+
setRenderer(renderer: MxGraphRenderer): void;
|
|
25
|
+
getTheme(): MxUserThemeType;
|
|
26
|
+
setTheme(theme: MxUserThemeType): void;
|
|
27
|
+
getLayout(): MxLayoutConfig[];
|
|
28
|
+
setLayout(config: MxLayoutConfig | MxLayoutConfig[] | ((pre: MxLayoutConfig[]) => MxLayoutConfig[])): void;
|
|
29
|
+
layout(): void;
|
|
30
|
+
resize(): void;
|
|
31
|
+
resize(width?: number, height?: number): void;
|
|
32
|
+
refresh(): void;
|
|
33
|
+
autoSize(auto: boolean): void;
|
|
34
|
+
zoom(ratio: number): void;
|
|
35
|
+
zoomTo(ratio: number): void;
|
|
36
|
+
getChildrenData(id: string): (MxNodeData | MxGroupData)[];
|
|
104
37
|
getZoom(): number;
|
|
105
|
-
/**
|
|
106
|
-
* Get common points of graph
|
|
107
|
-
* @returns {}
|
|
108
|
-
*/
|
|
109
38
|
getCommonPoints(): {
|
|
110
39
|
middle: {
|
|
111
40
|
x: number;
|
|
@@ -128,323 +57,64 @@ declare class MxGraph {
|
|
|
128
57
|
y: number;
|
|
129
58
|
};
|
|
130
59
|
};
|
|
131
|
-
/**
|
|
132
|
-
* Get events map
|
|
133
|
-
* @returns Map<string, callbacks>
|
|
134
|
-
*/
|
|
135
|
-
getEvents(): Map<string, ((e: any) => void)[]>;
|
|
136
|
-
/**
|
|
137
|
-
* Check if graph has event
|
|
138
|
-
* @returns boolean
|
|
139
|
-
*/
|
|
140
|
-
hasEvent(eventName: string): boolean;
|
|
141
|
-
/**
|
|
142
|
-
* Get client bounding rect of graph
|
|
143
|
-
* @returns {}
|
|
144
|
-
*/
|
|
145
60
|
getBoundingRect(): DOMRect;
|
|
146
|
-
/**
|
|
147
|
-
* convert canvas points to viewport points
|
|
148
|
-
* @returns { x: number, y: number }
|
|
149
|
-
*/
|
|
150
61
|
canvasToViewport(point: {
|
|
151
62
|
x: number;
|
|
152
63
|
y: number;
|
|
153
|
-
}):
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
*/
|
|
64
|
+
}): {
|
|
65
|
+
x: number;
|
|
66
|
+
y: number;
|
|
67
|
+
};
|
|
158
68
|
viewportToCanvas(point: {
|
|
159
69
|
x: number;
|
|
160
70
|
y: number;
|
|
161
|
-
}):
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
* @returns void
|
|
166
|
-
*/
|
|
167
|
-
renderData(data: MxGraphData): void;
|
|
168
|
-
/**
|
|
169
|
-
* Change graph renderer
|
|
170
|
-
* @param {MxGraphRenderer} renderer
|
|
171
|
-
* @returns void
|
|
172
|
-
*/
|
|
173
|
-
changeRenderer(renderer: MxGraphRenderer): void;
|
|
174
|
-
/**
|
|
175
|
-
* Update theme
|
|
176
|
-
* @param theme: MxThemeConfig
|
|
177
|
-
* @returns void
|
|
178
|
-
*/
|
|
179
|
-
changeTheme(theme: MxThemeConfig): void;
|
|
180
|
-
/**
|
|
181
|
-
* Change layout
|
|
182
|
-
* @param {MxLayoutOption} layout - graph layout option
|
|
183
|
-
* @returns void
|
|
184
|
-
*/
|
|
185
|
-
changeLayout(layout: MxLayoutOption): void;
|
|
186
|
-
/**
|
|
187
|
-
* Enable/disable behaviors
|
|
188
|
-
* @param {MxUserBehavior} behavior - one behavior
|
|
189
|
-
* @param {MxBehaviorType[]} behavior - multiple behaviors
|
|
190
|
-
* @returns void
|
|
191
|
-
*/
|
|
192
|
-
changeBehavior(behavior: MxUserBehavior | MxUserBehavior[], enable: boolean): void;
|
|
193
|
-
/**
|
|
194
|
-
* Listen on one event
|
|
195
|
-
* @param eventName - event name
|
|
196
|
-
* @param callback - callback function
|
|
197
|
-
* @returns void
|
|
198
|
-
*/
|
|
199
|
-
on<T extends MxUserEvent | string>(eventName: T, callback: T extends MxUserEvent ? MxUserEvents[T] : (e: any) => void): void;
|
|
200
|
-
/**
|
|
201
|
-
* Listen events once
|
|
202
|
-
* @param eventName - event name
|
|
203
|
-
* @param callback - callback function
|
|
204
|
-
* @returns void
|
|
205
|
-
*/
|
|
206
|
-
once<T extends MxUserEvent | string>(eventName: T, callback: T extends MxUserEvent ? MxUserEvents[T] : (e: any) => void): void;
|
|
207
|
-
/**
|
|
208
|
-
* Unsubscribe one listening event
|
|
209
|
-
* @param eventName - event name
|
|
210
|
-
* @param callback - callback function
|
|
211
|
-
* @returns void
|
|
212
|
-
*/
|
|
213
|
-
off<T extends MxUserEvent | string>(eventName: T, callback: T extends MxUserEvent ? MxUserEvents[T] : (e: any) => void): void;
|
|
214
|
-
/**
|
|
215
|
-
* Change graph size (will disable auto sizing)
|
|
216
|
-
* @param width - number
|
|
217
|
-
* @param height - number
|
|
218
|
-
* @returns void
|
|
219
|
-
*/
|
|
220
|
-
changeSize(width: number, height: number): void;
|
|
221
|
-
/**
|
|
222
|
-
* Make graph size to fit container size once
|
|
223
|
-
* @returns void
|
|
224
|
-
*/
|
|
225
|
-
fitSize(): void;
|
|
226
|
-
/**
|
|
227
|
-
* Enable or disable auto size to container size
|
|
228
|
-
* @param auto - boolean
|
|
229
|
-
* @returns void
|
|
230
|
-
*/
|
|
231
|
-
autoSize(auto: boolean): void;
|
|
232
|
-
/**
|
|
233
|
-
* Zoom view relative level
|
|
234
|
-
* @param
|
|
235
|
-
* @returns void
|
|
236
|
-
*/
|
|
237
|
-
zoom(ratio: number): void;
|
|
238
|
-
/**
|
|
239
|
-
* Zoom view to specific level
|
|
240
|
-
* @param
|
|
241
|
-
* @returns void
|
|
242
|
-
*/
|
|
243
|
-
zoomTo(ratio: number): void;
|
|
244
|
-
/**
|
|
245
|
-
* Make view to fit content
|
|
246
|
-
* @returns void
|
|
247
|
-
*/
|
|
71
|
+
}): {
|
|
72
|
+
x: number;
|
|
73
|
+
y: number;
|
|
74
|
+
};
|
|
248
75
|
fitView(): void;
|
|
249
|
-
/**
|
|
250
|
-
* Make view to fit center
|
|
251
|
-
* @returns void
|
|
252
|
-
*/
|
|
253
76
|
fitCenter(): void;
|
|
254
|
-
|
|
255
|
-
* Focus item and move center
|
|
256
|
-
* @param {ID} id item id
|
|
257
|
-
* @returns void
|
|
258
|
-
*/
|
|
259
|
-
focusItem(id: ID): void;
|
|
260
|
-
/**
|
|
261
|
-
* Undo task
|
|
262
|
-
* @returns void
|
|
263
|
-
*/
|
|
77
|
+
focusItem(id: string): void;
|
|
264
78
|
undo(): void;
|
|
265
|
-
/**
|
|
266
|
-
* Redo task
|
|
267
|
-
* @returns void
|
|
268
|
-
*/
|
|
269
79
|
redo(): void;
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
* @returns void
|
|
309
|
-
*/
|
|
310
|
-
hideNode(id: ID | ID[]): void;
|
|
311
|
-
/**
|
|
312
|
-
* Update node state
|
|
313
|
-
* @param id - ID
|
|
314
|
-
* @param id - ID[]
|
|
315
|
-
* @param state - MxNodeState[]
|
|
316
|
-
* @param value - boolean
|
|
317
|
-
* @returns void
|
|
318
|
-
*/
|
|
319
|
-
updateNodeStates(id: ID | ID[], states: MxNodeState[], value: boolean): void;
|
|
320
|
-
/**
|
|
321
|
-
* Clear node state
|
|
322
|
-
* @param id - ID
|
|
323
|
-
* @param id - ID[]
|
|
324
|
-
* @returns void
|
|
325
|
-
*/
|
|
326
|
-
clearNodeStates(id: ID | ID[]): void;
|
|
327
|
-
isIsolated(nodeId: ID): boolean;
|
|
328
|
-
/**
|
|
329
|
-
* Add one or multiple edges to graph
|
|
330
|
-
* @param edge - MxEdgeUserData
|
|
331
|
-
* @param edge - MxEdgeUserData[]
|
|
332
|
-
* @returns void
|
|
333
|
-
*/
|
|
334
|
-
addEdge(edge: MxEdgeUserData | MxEdgeUserData[]): void;
|
|
335
|
-
/**
|
|
336
|
-
* Remove one or multiple edges to graph
|
|
337
|
-
* @param id - ID
|
|
338
|
-
* @param id - ID[]
|
|
339
|
-
* @returns void
|
|
340
|
-
*/
|
|
341
|
-
removeEdge(edges: ID | ID[]): void;
|
|
342
|
-
/**
|
|
343
|
-
* Update one or multiple edges to graph
|
|
344
|
-
* @param edge - MxEdgeUserDataPartial (need to provide id)
|
|
345
|
-
* @param edge - MxEdgeUserDataPartial[] (need to provide id)
|
|
346
|
-
* @returns void
|
|
347
|
-
*/
|
|
348
|
-
updateEdge(edge: MxEdgeUserDataPartial | MxEdgeUserDataPartial[]): void;
|
|
349
|
-
/**
|
|
350
|
-
* Show one or multiple edges
|
|
351
|
-
* @param id - ID
|
|
352
|
-
* @param id - ID[]
|
|
353
|
-
* @returns void
|
|
354
|
-
*/
|
|
355
|
-
showEdge(id: ID | ID[]): void;
|
|
356
|
-
/**
|
|
357
|
-
* Hide one or multiple edges
|
|
358
|
-
* @param id - ID
|
|
359
|
-
* @param id - ID[]
|
|
360
|
-
* @returns void
|
|
361
|
-
*/
|
|
362
|
-
hideEdge(id: ID | ID[]): void;
|
|
363
|
-
/**
|
|
364
|
-
* Update edge state
|
|
365
|
-
* @param id - ID
|
|
366
|
-
* @param id - ID[]
|
|
367
|
-
* @param state - MxEdgeState[]
|
|
368
|
-
* @param value - boolean
|
|
369
|
-
* @returns void
|
|
370
|
-
*/
|
|
371
|
-
updateEdgeStates(id: ID | ID[], states: MxEdgeState[], value: boolean): void;
|
|
372
|
-
/**
|
|
373
|
-
* get edge state
|
|
374
|
-
* @param id - ID
|
|
375
|
-
* @param id - ID[]
|
|
376
|
-
* @param state
|
|
377
|
-
* @returns void
|
|
378
|
-
*/
|
|
379
|
-
getEdgeData(edge: string): MxEdgeUserData | null;
|
|
380
|
-
/**
|
|
381
|
-
* Clear edge state
|
|
382
|
-
* @param id - ID
|
|
383
|
-
* @param id - ID[]
|
|
384
|
-
* @returns void
|
|
385
|
-
*/
|
|
386
|
-
clearEdgeStates(id: ID | ID[]): void;
|
|
387
|
-
/**
|
|
388
|
-
* Add one or multiple groups to graph
|
|
389
|
-
* @param group - MxGroupUserData
|
|
390
|
-
* @param group - MxGroupUserData[]
|
|
391
|
-
* @returns void
|
|
392
|
-
*/
|
|
393
|
-
addGroup(group: MxGroupUserData | MxGroupUserData[]): void;
|
|
394
|
-
/**
|
|
395
|
-
* Remove one or multiple groups from graph
|
|
396
|
-
* @param id - ID
|
|
397
|
-
* @param id - ID[]
|
|
398
|
-
* @returns void
|
|
399
|
-
*/
|
|
400
|
-
removeGroup(id: ID | ID[]): void;
|
|
401
|
-
/**
|
|
402
|
-
* Update one or multiple nodes data or config
|
|
403
|
-
* @param group - MxGroupData (need to provide id)
|
|
404
|
-
* @param group - MxGroupData[] (need to provide id)
|
|
405
|
-
* @returns void
|
|
406
|
-
*/
|
|
407
|
-
updateGroup(group: MxGroupUserDataPartial | MxGroupUserDataPartial[]): void;
|
|
408
|
-
/**
|
|
409
|
-
* Update group states
|
|
410
|
-
* @param id - ID
|
|
411
|
-
* @param id - ID[]
|
|
412
|
-
* @param state - MxNodeState[]
|
|
413
|
-
* @param value - boolean
|
|
414
|
-
* @returns void
|
|
415
|
-
*/
|
|
416
|
-
updateGroupStates(id: ID | ID[], states: MxGroupState[], value: boolean): void;
|
|
417
|
-
/**
|
|
418
|
-
* Show one or multiple groups
|
|
419
|
-
* @param id - ID
|
|
420
|
-
* @param id - ID[]
|
|
421
|
-
* @returns void
|
|
422
|
-
*/
|
|
423
|
-
showGroup(id: ID | ID[]): void;
|
|
424
|
-
/**
|
|
425
|
-
* Hide one or multiple groups
|
|
426
|
-
* @param id - ID
|
|
427
|
-
* @param id - ID[]
|
|
428
|
-
* @returns void
|
|
429
|
-
*/
|
|
430
|
-
hideGroup(id: ID | ID[]): void;
|
|
431
|
-
/**
|
|
432
|
-
* Expand one or multiple groups
|
|
433
|
-
* @param id - ID
|
|
434
|
-
* @param id - ID[]
|
|
435
|
-
* @returns void
|
|
436
|
-
*/
|
|
437
|
-
expandGroup(id: ID | ID[]): void;
|
|
438
|
-
/**
|
|
439
|
-
* Collapse one or multiple groups
|
|
440
|
-
* @param id - ID
|
|
441
|
-
* @param id - ID[]
|
|
442
|
-
* @returns void
|
|
443
|
-
*/
|
|
444
|
-
collapseGroup(id: ID | ID[]): void;
|
|
445
|
-
addPlugin(plugin: MxPluginConfig | MxPluginConfig[]): void;
|
|
446
|
-
updatePlugin(plugin: MxPluginConfig | MxPluginConfig[]): void;
|
|
447
|
-
removePlugin(key: string | string[]): void;
|
|
80
|
+
render(): Promise<void>;
|
|
81
|
+
setData(data: MxGraphData): void;
|
|
82
|
+
clear(): Promise<void>;
|
|
83
|
+
getEvent(): Record<string, any>;
|
|
84
|
+
hasEvent(eventName: string): boolean;
|
|
85
|
+
getBehavior(): MxUserBehavior[];
|
|
86
|
+
setBehavior(behavior: MxUserBehavior | MxUserBehavior[] | ((pre: MxUserBehavior[]) => MxUserBehavior[])): void;
|
|
87
|
+
on<T extends IEvent>(eventName: string, callback: (e: T) => void): void;
|
|
88
|
+
once<T extends IEvent>(eventName: string, callback: (e: T) => void): void;
|
|
89
|
+
off(): void;
|
|
90
|
+
off(eventName: string): void;
|
|
91
|
+
getNodeData(): MxNodeData[];
|
|
92
|
+
getNodeData(id: string): MxNodeData;
|
|
93
|
+
getNodeData(id: string[]): MxNodeData[];
|
|
94
|
+
addNode(node: MxNodeData | MxNodeData[]): void;
|
|
95
|
+
updateNode(node: MxPartialNodeData | MxPartialNodeData[]): void;
|
|
96
|
+
removeNode(id: string | string[]): void;
|
|
97
|
+
showElement(id: string | string[]): void;
|
|
98
|
+
hideElement(id: string | string[]): void;
|
|
99
|
+
setElementState(stateMap: Record<string, State | State[]>): void;
|
|
100
|
+
clearElementState(id: string | string[]): void;
|
|
101
|
+
getEdgeData(): MxEdgeData[];
|
|
102
|
+
getEdgeData(id: string): MxEdgeData;
|
|
103
|
+
getEdgeData(id: string[]): MxEdgeData[];
|
|
104
|
+
isIsolated(nodeId: string): boolean;
|
|
105
|
+
addEdge(edge: MxEdgeData | MxEdgeData[]): void;
|
|
106
|
+
removeEdge(id: string | string[]): void;
|
|
107
|
+
updateEdge(edge: MxPartialEdgeData | MxPartialEdgeData[]): void;
|
|
108
|
+
getGroupData(): MxGroupData[];
|
|
109
|
+
getGroupData(id: string): MxGroupData;
|
|
110
|
+
getGroupData(id: string[]): MxGroupData[];
|
|
111
|
+
addGroup(group: MxGroupData | MxGroupData[]): void;
|
|
112
|
+
removeGroup(id: string | string[]): void;
|
|
113
|
+
updateGroup(group: MxPartialGroupData | MxPartialGroupData[]): void;
|
|
114
|
+
expandGroup(id: string | string[]): void;
|
|
115
|
+
collapseGroup(id: string | string[]): void;
|
|
116
|
+
getPlugin(): MxUserPlugin[];
|
|
117
|
+
setPlugin(plugin: MxUserPlugin | MxUserPlugin[] | ((pre: MxUserPlugin[]) => MxUserPlugin[])): void;
|
|
448
118
|
}
|
|
449
119
|
export { MxGraph };
|
|
450
120
|
//# sourceMappingURL=graph.d.ts.map
|
package/lib/graph/graph.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/lib/graph/graph.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/lib/graph/graph.ts"],"names":[],"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,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAInC,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,UAAU,EAAE;IAOvC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAKvC,UAAU,CAAC,IAAI,EAAE,iBAAiB,GAAG,iBAAiB,EAAE,GAAG,IAAI;IAO/D,YAAY,IAAI,WAAW,EAAE;IAC7B,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW;IACrC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE;IAgBzC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,GAAG,IAAI;IAOlD,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAKxC,WAAW,CAAC,KAAK,EAAE,kBAAkB,GAAG,kBAAkB,EAAE,GAAG,IAAI;IAKnE,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAOxC,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI;IAS1C,SAAS,IAAI,YAAY,EAAE;IAO3B,SAAS,CACP,MAAM,EACF,YAAY,GACZ,YAAY,EAAE,GACd,CAAC,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,YAAY,EAAE,CAAC,GAC5C,IAAI;CAeR;AAED,OAAO,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GraphOptions } from '@antv/g6';
|
|
2
|
+
import { MxGraphConfig } from '../model';
|
|
3
|
+
import { MxGraph } from './graph';
|
|
4
|
+
export declare const MxGraphMapper: {
|
|
5
|
+
toGraphOptions: (graph: MxGraph, config: MxGraphConfig) => GraphOptions;
|
|
6
|
+
toRenderer: (renderer: MxGraphConfig['renderer']) => GraphOptions;
|
|
7
|
+
toGraphData: (data: MxGraphConfig['data']) => GraphOptions;
|
|
8
|
+
toContainer: (container: MxGraphConfig['container']) => GraphOptions;
|
|
9
|
+
toBehaviors: (behaviors: MxGraphConfig['behaviors']) => GraphOptions;
|
|
10
|
+
toLayout: (configs: MxGraphConfig['layouts']) => GraphOptions;
|
|
11
|
+
toPlugins: (graph: MxGraph, plugins: MxGraphConfig['plugins'], theme: MxGraphConfig['theme']) => GraphOptions;
|
|
12
|
+
toAnimation: (animation: MxGraphConfig['animation']) => GraphOptions;
|
|
13
|
+
toTheme: (theme: MxGraphConfig['theme']) => GraphOptions;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=graph.mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.mapper.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/lib/graph/graph.mapper.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,YAAY,EAAmB,MAAM,UAAU,CAAC;AAM9E,OAAO,EAAqB,aAAa,EAAE,MAAM,UAAU,CAAC;AAK5D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AA2JlC,eAAO,MAAM,aAAa;4BAxJjB,OAAO,UACN,aAAa,KACpB,YAAY;2BAuCe,aAAa,CAAC,UAAU,CAAC,KAAG,YAAY;wBAW3C,aAAa,CAAC,MAAM,CAAC,KAAG,YAAY;6BArB/B,aAAa,CAAC,WAAW,CAAC,KAAG,YAAY;6BAsE1C,aAAa,CAAC,WAAW,CAAC,KAAG,YAAY;wBAM7C,aAAa,CAAC,SAAS,CAAC,KAAG,YAAY;uBASzD,OAAO,WACL,aAAa,CAAC,SAAS,CAAC,SAC1B,aAAa,CAAC,OAAO,CAAC,KAC5B,YAAY;6BAyBiB,aAAa,CAAC,WAAW,CAAC,KAAG,YAAY;qBAPjD,aAAa,CAAC,OAAO,CAAC,KAAG,YAAY;CAyB5D,CAAC"}
|
package/lib/graph/index.d.ts
CHANGED
package/lib/graph/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/lib/graph/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/lib/graph/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CircleStyleProps as GCircleStyleProps, Group, Image, ImageStyleProps, Rect, RectStyleProps, Text, TextStyleProps } from '@antv/g';
|
|
2
|
+
import { CircleCombo, CircleComboStyleProps, IconStyleProps, State } from '@antv/g6';
|
|
3
|
+
import { STDSize } from '@antv/g6/lib/types';
|
|
4
|
+
import { MxNodeConfig, MxNodeLabel } from '../../../index.ts';
|
|
5
|
+
export interface DeviceGroupStyleProps extends CircleComboStyleProps {
|
|
6
|
+
title: boolean;
|
|
7
|
+
highlight: MxNodeConfig['highlight'];
|
|
8
|
+
labelStatus: MxNodeLabel['status'];
|
|
9
|
+
}
|
|
10
|
+
export declare class DeviceGroup extends CircleCombo {
|
|
11
|
+
static defaultProps: Partial<DeviceGroupStyleProps>;
|
|
12
|
+
get states(): State[];
|
|
13
|
+
get isExist(): boolean;
|
|
14
|
+
private getElementOffsets;
|
|
15
|
+
getKeyStyle(attrs: Required<DeviceGroupStyleProps>): GCircleStyleProps;
|
|
16
|
+
protected getKeySize(attributes: Required<CircleComboStyleProps>): STDSize;
|
|
17
|
+
getHaloStyle(attrs: Required<DeviceGroupStyleProps>): GCircleStyleProps | false;
|
|
18
|
+
getIconStyle(attrs: Required<DeviceGroupStyleProps>): IconStyleProps | false;
|
|
19
|
+
getLabelStyle(attrs: Required<DeviceGroupStyleProps>): TextStyleProps;
|
|
20
|
+
getTitleStyle(attrs: Required<DeviceGroupStyleProps>): TextStyleProps | false;
|
|
21
|
+
getStatusStyle(attrs: Required<DeviceGroupStyleProps>): ImageStyleProps | false;
|
|
22
|
+
getTitleBackgroundStyle(attrs: Required<DeviceGroupStyleProps>): RectStyleProps | false;
|
|
23
|
+
getLabelBackgroundStyle(attrs: Required<DeviceGroupStyleProps>): RectStyleProps | false;
|
|
24
|
+
drawTitleShape(attrs: Required<DeviceGroupStyleProps>, container: Group): Text | undefined;
|
|
25
|
+
drawStatusShape(attrs: Required<DeviceGroupStyleProps>, container: Group): Image | undefined;
|
|
26
|
+
drawTitleBackgroundShape(attrs: Required<DeviceGroupStyleProps>, container: Group): Rect | undefined;
|
|
27
|
+
drawLabelBackgroundShape(attrs: Required<DeviceGroupStyleProps>, container: Group): Rect | undefined;
|
|
28
|
+
render(attrs: Required<DeviceGroupStyleProps>, container: Group): void;
|
|
29
|
+
onframe(): void;
|
|
30
|
+
animate(keyframes: Keyframe[], options?: number | KeyframeAnimationOptions): import("@antv/g").IAnimation | null;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=device-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"device-group.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/lib/group/custom/device-group.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,IAAI,iBAAiB,EACrC,KAAK,EACL,KAAK,EACL,eAAe,EACf,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,cAAc,EACf,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,WAAW,EACX,qBAAqB,EAErB,cAAc,EAEd,KAAK,EAEN,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAIL,YAAY,EACZ,WAAW,EACZ,MAAM,aAAa,CAAC;AAqBrB,MAAM,WAAW,qBAAsB,SAAQ,qBAAqB;IAClE,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IACrC,WAAW,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC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ACtC,SAAS,EAAE,KAAK;IAUT,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,EAAE,SAAS,EAAE,KAAK;IAO/D,OAAO;IAQP,OAAO,CACd,SAAS,EAAE,QAAQ,EAAE,EACrB,OAAO,CAAC,EAAE,MAAM,GAAG,wBAAwB;CAI9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/lib/group/custom/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComboData } from '@antv/g6';
|
|
2
|
+
import { PartialNodeLikeData } from '@antv/g6/lib/types';
|
|
3
|
+
import { MxGroupData } from '../../model/index.ts';
|
|
4
|
+
export declare const G6GroupMapper: {
|
|
5
|
+
toGroupData: (group: PartialNodeLikeData<ComboData>) => MxGroupData;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=group-g6.mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-g6.mapper.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/lib/group/helper/group-g6.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAIV,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAEL,WAAW,EAKZ,MAAM,mBAAmB,CAAC;AAyH3B,eAAO,MAAM,aAAa;yBAvHE,oBAAoB,SAAS,CAAC,KAAG,WAAW;CAyHvE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ComboData } from '@antv/g6';
|
|
2
|
+
import { MxPartialGroupData } from '../../model/index.ts';
|
|
3
|
+
export declare const MxGroupMapper: {
|
|
4
|
+
toGroupData: (data: MxPartialGroupData, option?: {
|
|
5
|
+
full: boolean;
|
|
6
|
+
}) => ComboData;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=group.mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group.mapper.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/lib/group/helper/group.mapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,UAAU,CAAC;AAElE,OAAO,EAKL,kBAAkB,EACnB,MAAM,mBAAmB,CAAC;AAqK3B,eAAO,MAAM,aAAa;wBAlKlB,kBAAkB,WACf;QAAE,IAAI,EAAE,OAAO,CAAA;KAAE,KACzB,SAAS;CAkKX,CAAC"}
|