dcim-topology2d 1.1.3 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/activity-diagram/src/final/final.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.d.ts +1 -1
- package/activity-diagram/src/final/final.rect.js +1 -1
- package/activity-diagram/src/fork/fork.anchor.d.ts +1 -1
- package/activity-diagram/src/fork/fork.anchor.js +1 -1
- package/activity-diagram/src/fork/fork.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.d.ts +1 -1
- package/activity-diagram/src/fork/fork.rect.js +1 -1
- package/activity-diagram/src/register.js +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +1 -1
- package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +1 -1
- package/chart-diagram/src/echarts/index.d.ts +1 -1
- package/chart-diagram/src/echarts/index.js +7 -10
- package/chart-diagram/src/register.js +1 -1
- package/class-diagram/src/class/class.d.ts +1 -1
- package/class-diagram/src/class/class.rect.d.ts +1 -1
- package/class-diagram/src/class/class.rect.js +1 -1
- package/class-diagram/src/register.js +1 -1
- package/core/index.d.ts +0 -1
- package/core/index.js +0 -1
- package/core/src/activeLayer.d.ts +10 -2
- package/core/src/activeLayer.js +41 -42
- package/core/src/animateLayer.d.ts +7 -3
- package/core/src/animateLayer.js +12 -10
- package/core/src/calling.d.ts +4 -1
- package/core/src/calling.js +41 -40
- package/core/src/canvas.d.ts +6 -1
- package/core/src/canvas.js +18 -17
- package/core/src/common.d.ts +5 -5
- package/core/src/common.js +115 -161
- package/core/src/core.d.ts +4 -3
- package/core/src/core.js +253 -228
- package/core/src/divLayer.d.ts +7 -2
- package/core/src/divLayer.js +25 -25
- package/core/src/healps/changeData.d.ts +1 -1
- package/core/src/healps/changeData.js +42 -77
- package/core/src/hoverLayer.d.ts +9 -2
- package/core/src/hoverLayer.js +34 -31
- package/core/src/models/data.d.ts +26 -0
- package/core/src/models/data.js +77 -0
- package/core/src/models/data.js.map +1 -0
- package/core/src/models/index.d.ts +1 -0
- package/core/src/models/index.js +1 -0
- package/core/src/models/node.js +12 -14
- package/core/src/models/pen.js +1 -10
- package/core/src/mqtt.d.ts +14 -0
- package/core/src/mqtt.js +82 -0
- package/core/src/mqtt.js.map +1 -0
- package/core/src/offscreen.d.ts +4 -1
- package/core/src/offscreen.js +8 -10
- package/core/src/options.js +0 -1
- package/core/src/poll.js +2 -0
- package/core/src/preview.d.ts +13 -1
- package/core/src/preview.js +34 -42
- package/core/src/renderLayer.d.ts +3 -1
- package/core/src/renderLayer.js +31 -26
- package/core/src/socket.d.ts +10 -0
- package/core/src/socket.js +51 -0
- package/core/src/socket.js.map +1 -0
- package/core/src/utils/canvas.js +1 -1
- package/core/src/utils/conversion.d.ts +0 -7
- package/core/src/utils/conversion.js +0 -54
- package/core/src/utils/dom.d.ts +5 -4
- package/core/src/utils/dom.js +1 -3
- package/core/src/utils/onmousevent.js +3 -12
- package/flow-diagram/src/comment/comment.anchor.d.ts +1 -1
- package/flow-diagram/src/comment/comment.anchor.js +1 -1
- package/flow-diagram/src/comment/comment.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.d.ts +1 -1
- package/flow-diagram/src/data/data.anchor.js +1 -1
- package/flow-diagram/src/data/data.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.d.ts +1 -1
- package/flow-diagram/src/data/data.rect.js +1 -1
- package/flow-diagram/src/db/db.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.d.ts +1 -1
- package/flow-diagram/src/db/db.rect.js +1 -1
- package/flow-diagram/src/display/display.anchor.d.ts +1 -1
- package/flow-diagram/src/display/display.anchor.js +1 -1
- package/flow-diagram/src/display/display.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.d.ts +1 -1
- package/flow-diagram/src/display/display.rect.js +1 -1
- package/flow-diagram/src/document/document.anchor.d.ts +1 -1
- package/flow-diagram/src/document/document.anchor.js +1 -1
- package/flow-diagram/src/document/document.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.d.ts +1 -1
- package/flow-diagram/src/document/document.rect.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.anchor.js +1 -1
- package/flow-diagram/src/externStorage/externStorage.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.d.ts +1 -1
- package/flow-diagram/src/externStorage/externStorage.rect.js +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +1 -1
- package/flow-diagram/src/internalStorage/internalStorage.rect.js +1 -1
- package/flow-diagram/src/manually/manually.anchor.d.ts +1 -1
- package/flow-diagram/src/manually/manually.anchor.js +1 -1
- package/flow-diagram/src/manually/manually.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.d.ts +1 -1
- package/flow-diagram/src/manually/manually.rect.js +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.d.ts +1 -1
- package/flow-diagram/src/parallel/parallel.anchor.js +1 -1
- package/flow-diagram/src/parallel/parallel.d.ts +1 -1
- package/flow-diagram/src/queue/queue.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.d.ts +1 -1
- package/flow-diagram/src/queue/queue.rect.js +1 -1
- package/flow-diagram/src/register.js +1 -1
- package/flow-diagram/src/subprocess/subprocess.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.d.ts +1 -1
- package/flow-diagram/src/subprocess/subprocess.rect.js +1 -1
- package/layout/src/align.d.ts +1 -1
- package/layout/src/align.js +1 -1
- package/layout/src/layout.d.ts +1 -1
- package/layout/src/layout.js +1 -1
- package/myShape-diagram/myShape.js +1 -1
- package/package.json +1 -1
- package/sequence-diagram/src/focus/focus.anchor.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.anchor.js +1 -1
- package/sequence-diagram/src/focus/focus.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.d.ts +1 -1
- package/sequence-diagram/src/focus/focus.rect.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.anchor.js +1 -1
- package/sequence-diagram/src/lifeline/lifeline.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +1 -1
- package/sequence-diagram/src/lifeline/lifeline.rect.js +1 -1
- package/sequence-diagram/src/register.js +1 -1
- package/core/src/store/common.d.ts +0 -9
- package/core/src/store/common.js +0 -5
- package/core/src/store/data.d.ts +0 -126
- package/core/src/store/data.js +0 -80
- package/core/src/store/index.d.ts +0 -2
- package/core/src/store/index.js +0 -2
- package/static/echartsDefaultData.js +0 -95
- package/static/index.js +0 -1
- package/style/index.css +0 -10
package/core/src/store/data.d.ts
DELETED
@@ -1,126 +0,0 @@
|
|
1
|
-
// @ts-ignore
|
2
|
-
import { default as mitt, Emitter } from 'mitt';
|
3
|
-
import { Pen, Lock } from '../models';
|
4
|
-
import {Options, DefalutOptions} from '../options';
|
5
|
-
import {s8} from '../utils';
|
6
|
-
import { commonStore } from './common'
|
7
|
-
// 2D可视化的data数据
|
8
|
-
export interface visualization2DData {
|
9
|
-
pens: Pen[];
|
10
|
-
lineName: string;
|
11
|
-
fromArrowType: string;
|
12
|
-
toArrowType: string;
|
13
|
-
scale: number;
|
14
|
-
locked: Lock;
|
15
|
-
bkImage: string;
|
16
|
-
bkColor: string;
|
17
|
-
grid?: boolean;
|
18
|
-
websocket?: string;
|
19
|
-
mqttUrl?: string;
|
20
|
-
mqttOptions?: {
|
21
|
-
clientId?: string;
|
22
|
-
username?: string;
|
23
|
-
password?: string;
|
24
|
-
};
|
25
|
-
mqttTopics?: string;
|
26
|
-
manualCps?: boolean;
|
27
|
-
dataConstruct?: any;
|
28
|
-
data?: any;
|
29
|
-
bkImageRect?: any;
|
30
|
-
}
|
31
|
-
// 2D可视化使用到的数据仓库
|
32
|
-
export interface visualization2DStore {
|
33
|
-
id: string;
|
34
|
-
data: visualization2DData;
|
35
|
-
pens: { [key: string]: Pen };
|
36
|
-
options: Options;
|
37
|
-
cacheDatas?: {
|
38
|
-
data: visualization2DData;
|
39
|
-
}[];
|
40
|
-
emitter: Emitter;
|
41
|
-
dpiRatio?: number;
|
42
|
-
lastScale?: number; //记录上次模版的scale
|
43
|
-
ratioCord: {
|
44
|
-
ratio?: number;
|
45
|
-
scaleX?: number;
|
46
|
-
scaleY?: number;
|
47
|
-
},
|
48
|
-
parentElem: HTMLElement
|
49
|
-
}
|
50
|
-
|
51
|
-
// @ts-ignore
|
52
|
-
export const createStore = () => {
|
53
|
-
return {
|
54
|
-
id: '',
|
55
|
-
data: {
|
56
|
-
pens: [],
|
57
|
-
lineName: 'curve',
|
58
|
-
fromArrowType: '',
|
59
|
-
toArrowType: 'triangleSolid',
|
60
|
-
scale: 1,
|
61
|
-
locked: Lock.None,
|
62
|
-
bkImageRect: null,
|
63
|
-
mqttOptions: {
|
64
|
-
clientId: s8()
|
65
|
-
},
|
66
|
-
dataConstruct: {}
|
67
|
-
},
|
68
|
-
pens: {},
|
69
|
-
options: { ...DefalutOptions },
|
70
|
-
emitter: mitt(),
|
71
|
-
cacheDatas: [],
|
72
|
-
dpiRatio: 1,
|
73
|
-
lastScale: 1,
|
74
|
-
ratioCord: {
|
75
|
-
ratio: 1,
|
76
|
-
scaleX: 1,
|
77
|
-
scaleY: 1
|
78
|
-
},
|
79
|
-
parentElem: null
|
80
|
-
} as visualization2DStore;
|
81
|
-
};
|
82
|
-
// @ts-ignore
|
83
|
-
export const useStore = (id = 'default'): visualization2DStore => {
|
84
|
-
if (!commonStore[id]) {
|
85
|
-
// @ts-ignore
|
86
|
-
commonStore[id] = createStore();
|
87
|
-
commonStore[id].id = id;
|
88
|
-
}
|
89
|
-
return commonStore[id];
|
90
|
-
};
|
91
|
-
|
92
|
-
// @ts-ignore
|
93
|
-
export const clearStore = (store: visualization2DStore) => {
|
94
|
-
store.data = {
|
95
|
-
bkColor: '',
|
96
|
-
bkImage: '',
|
97
|
-
data: undefined,
|
98
|
-
grid: false,
|
99
|
-
manualCps: false,
|
100
|
-
mqttTopics: '',
|
101
|
-
mqttUrl: '',
|
102
|
-
websocket: '',
|
103
|
-
pens: [],
|
104
|
-
lineName: 'curve',
|
105
|
-
fromArrowType: '',
|
106
|
-
toArrowType: 'triangleSolid',
|
107
|
-
scale: 1,
|
108
|
-
locked: Lock.None,
|
109
|
-
bkImageRect: null,
|
110
|
-
mqttOptions: {
|
111
|
-
clientId: s8()
|
112
|
-
},
|
113
|
-
dataConstruct: {}
|
114
|
-
};
|
115
|
-
store.lastScale = store.data.scale;
|
116
|
-
store.pens = {};
|
117
|
-
store.options = {};
|
118
|
-
store.cacheDatas = [];
|
119
|
-
store.dpiRatio = 1;
|
120
|
-
store.lastScale = 1;
|
121
|
-
store.ratioCord = {
|
122
|
-
ratio: 1,
|
123
|
-
scaleX: 1,
|
124
|
-
scaleY: 1
|
125
|
-
}
|
126
|
-
};
|
package/core/src/store/data.js
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
2
|
-
__assign = Object.assign || function(t) {
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
4
|
-
s = arguments[i];
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
6
|
-
t[p] = s[p];
|
7
|
-
}
|
8
|
-
return t;
|
9
|
-
};
|
10
|
-
return __assign.apply(this, arguments);
|
11
|
-
};
|
12
|
-
import { default as mitt } from 'mitt';
|
13
|
-
import { Lock } from '../models';
|
14
|
-
import {DefalutOptions} from '../options';
|
15
|
-
import {s8} from '../utils';
|
16
|
-
import { commonStore } from './common'
|
17
|
-
export var createStore = function () {
|
18
|
-
return {
|
19
|
-
id: '',
|
20
|
-
data: {
|
21
|
-
pens: [],
|
22
|
-
lineName: 'curve',
|
23
|
-
fromArrowType: '',
|
24
|
-
toArrowType: 'triangleSolid',
|
25
|
-
scale: 1,
|
26
|
-
locked: Lock.None,
|
27
|
-
bkImageRect: null,
|
28
|
-
mqttOptions: {
|
29
|
-
clientId: s8()
|
30
|
-
},
|
31
|
-
dataConstruct: {}
|
32
|
-
},
|
33
|
-
pens: {},
|
34
|
-
options: { ...DefalutOptions },
|
35
|
-
emitter: mitt(),
|
36
|
-
cacheDatas: [],
|
37
|
-
dpiRatio: 1,
|
38
|
-
lastScale: 1,
|
39
|
-
ratioCord: {
|
40
|
-
ratio: 1,
|
41
|
-
scaleX: 1,
|
42
|
-
scaleY: 1
|
43
|
-
},
|
44
|
-
parentElem: null
|
45
|
-
};
|
46
|
-
};
|
47
|
-
export var useStore = function (id) {
|
48
|
-
if (id === void 0) { id = 'default'; }
|
49
|
-
if (!commonStore[id]) {
|
50
|
-
commonStore[id] = createStore();
|
51
|
-
commonStore[id].id = id;
|
52
|
-
}
|
53
|
-
return commonStore[id];
|
54
|
-
};
|
55
|
-
export var clearStore = function (store, del) {
|
56
|
-
store.lastScale = store.data.scale;
|
57
|
-
store.data = {
|
58
|
-
pens: [],
|
59
|
-
lineName: 'curve',
|
60
|
-
fromArrowType: '',
|
61
|
-
toArrowType: 'triangleSolid',
|
62
|
-
scale: 1,
|
63
|
-
locked: Lock.None,
|
64
|
-
bkImageRect: null,
|
65
|
-
mqttOptions: {
|
66
|
-
clientId: s8()
|
67
|
-
},
|
68
|
-
dataConstruct: {}
|
69
|
-
};
|
70
|
-
store.pens = {};
|
71
|
-
store.cacheDatas = [];
|
72
|
-
store.dpiRatio = 1;
|
73
|
-
store.lastScale = 1;
|
74
|
-
store.ratioCord = {
|
75
|
-
ratio: 1,
|
76
|
-
scaleX: 1,
|
77
|
-
scaleY: 1
|
78
|
-
};
|
79
|
-
if(del) delete commonStore[store.id];
|
80
|
-
};
|
package/core/src/store/index.js
DELETED
@@ -1,95 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* echarts图表默认数据组
|
3
|
-
* @type {{displayMode_1: string}}
|
4
|
-
*/
|
5
|
-
export const echartsDefaultDataMap = {
|
6
|
-
displayMode_1: {
|
7
|
-
legend: null,
|
8
|
-
XData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
9
|
-
seriesData: [{
|
10
|
-
type: 'line',
|
11
|
-
data: [820, 932, 901, 934, 1290, 1330, 1320]
|
12
|
-
}]
|
13
|
-
}, // 折线图
|
14
|
-
displayMode_2: {
|
15
|
-
legend: null,
|
16
|
-
XData: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
17
|
-
seriesData: [{
|
18
|
-
name: '',
|
19
|
-
data: [20, 60, 110, 220, 80, 100, 180]
|
20
|
-
}]
|
21
|
-
},// 柱状图
|
22
|
-
displayMode_3: {
|
23
|
-
legend: null,
|
24
|
-
seriesData: [{
|
25
|
-
value: 10,
|
26
|
-
name: '机房1'
|
27
|
-
}, {
|
28
|
-
value: 30,
|
29
|
-
name: '机房2'
|
30
|
-
}, {
|
31
|
-
value: 50,
|
32
|
-
name: '机房3'
|
33
|
-
}, {
|
34
|
-
value: 20,
|
35
|
-
name: '机房4'
|
36
|
-
}, {
|
37
|
-
value: 60,
|
38
|
-
name: '机房5'
|
39
|
-
}, {
|
40
|
-
value: 15,
|
41
|
-
name: '机房6'
|
42
|
-
}, {
|
43
|
-
value: 18,
|
44
|
-
name: '机房7'
|
45
|
-
}, {
|
46
|
-
value: 26,
|
47
|
-
name: '机房8'
|
48
|
-
}]
|
49
|
-
},// 环形图
|
50
|
-
displayMode_4: {
|
51
|
-
legend: null,
|
52
|
-
total: 100,
|
53
|
-
XData: ['CA机房', '五层IT', '四层IT', '冷水机组'],
|
54
|
-
seriesData: [{
|
55
|
-
data: [5, 20, 50, 80]
|
56
|
-
}]
|
57
|
-
},// TOP排行榜
|
58
|
-
displayMode_5: {
|
59
|
-
legend: null,
|
60
|
-
seriesData: [{
|
61
|
-
name: '一般',
|
62
|
-
value: 0
|
63
|
-
}, {
|
64
|
-
name: '较大',
|
65
|
-
value: 0
|
66
|
-
}, {
|
67
|
-
name: '重大',
|
68
|
-
value: 0
|
69
|
-
}, {
|
70
|
-
name: '严重',
|
71
|
-
value: 0
|
72
|
-
}, {
|
73
|
-
name: '高级',
|
74
|
-
value: 0
|
75
|
-
}]
|
76
|
-
},// 饼图
|
77
|
-
displayMode_6: {
|
78
|
-
value: 8
|
79
|
-
},// 仪表盘
|
80
|
-
}
|
81
|
-
// 柱状图和折线图默认标注
|
82
|
-
export const echartsLineBarDefaultLegendData = {
|
83
|
-
data: ['标注1'],
|
84
|
-
icon: 'rich',
|
85
|
-
show: true,
|
86
|
-
itemWidth: 14,
|
87
|
-
itemHeight: 14,
|
88
|
-
textStyle: {
|
89
|
-
color: '#C6D1DB',
|
90
|
-
fontSize: '14px',
|
91
|
-
},
|
92
|
-
top: '12%',
|
93
|
-
left: '10%',
|
94
|
-
itemGap: 8
|
95
|
-
};
|
package/static/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './echartsDefaultData';
|