@nywqs/scada-engine 1.1.25 → 1.1.27
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/README.md +1 -1
- package/dist/index.d.ts +3 -159
- package/dist/scada-engine.css +1 -1
- package/dist/scada-engine.es.js +22467 -11106
- package/dist/scada-engine.umd.js +34 -17
- package/dist/{components → src/components}/BindingCard.d.ts +4 -0
- package/dist/src/components/ComponentLibrary.d.ts +34 -0
- package/dist/src/components/ContextMenu.d.ts +63 -0
- package/dist/src/components/DataPropertiesTab.d.ts +26 -0
- package/dist/{components/PropertyPanel.d.ts → src/components/DataSourceDialog.d.ts} +10 -12
- package/dist/{components → src/components}/DevicePointSelector.d.ts +7 -3
- package/dist/{components → src/components}/Header.d.ts +2 -0
- package/dist/src/components/PropertyPanel.d.ts +45 -0
- package/dist/src/index.d.ts +158 -0
- package/dist/{scada-components → src/scada-components}/types.d.ts +1 -0
- package/dist/src/services/dataSourceManager.d.ts +121 -0
- package/dist/src/services/mqttService.d.ts +110 -0
- package/dist/src/utils/canvasConfigWatcher.d.ts +40 -0
- package/dist/src/utils/canvasDataHandler.d.ts +70 -0
- package/dist/src/utils/contextMenuManager.d.ts +27 -0
- package/dist/src/utils/dataBindingService.d.ts +42 -0
- package/dist/src/utils/edgeOperations.d.ts +57 -0
- package/dist/src/utils/eventManager.d.ts +62 -0
- package/dist/src/utils/graphOperations.d.ts +85 -0
- package/dist/src/utils/index.d.ts +18 -0
- package/dist/src/utils/nodeOperations.d.ts +77 -0
- package/dist/src/utils/storageUtils.d.ts +32 -0
- package/package.json +2 -1
- package/dist/components/ComponentLibrary.d.ts +0 -6
- package/dist/components/DataPropertiesTab.d.ts +0 -42
- package/dist/mock/deviceData.d.ts +0 -39
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/storageUtils.d.ts +0 -55
- package/dist/views/preview/PreviewView.d.ts +0 -3
- package/dist/{components → src/components}/AttributeConfigDialog.d.ts +0 -0
- package/dist/{components → src/components}/BasicPropertiesTab.d.ts +0 -0
- package/dist/{components → src/components}/CanvasArea.d.ts +0 -0
- package/dist/{components → src/components}/CanvasConfigPanel.d.ts +0 -0
- package/dist/{components → src/components}/CustomCodeDialog.d.ts +0 -0
- package/dist/{components → src/components}/EdgePropertiesTab.d.ts +0 -0
- package/dist/{components → src/components}/EventCard.d.ts +0 -0
- package/dist/{components → src/components}/Footer.d.ts +0 -0
- package/dist/{components → src/components}/MappingConfigurator.d.ts +0 -0
- package/dist/{components → src/components}/WorkflowSelectorDialog.d.ts +0 -0
- package/dist/{main.d.ts → src/main.d.ts} +0 -0
- package/dist/{scada-components → src/scada-components}/basic/circle.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/basic/index.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/basic/rect.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/basic/text.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/canvas/config.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/canvas/index.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/canvas/manager.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/canvas/types.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/index.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/AlarmLight3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Conveyor3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Cylinder3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/EChartsGauge.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/EChartsLine.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Filter3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/HeatExchanger3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Light3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Motor3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Pipe3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Pump3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Switch3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Tank3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Tee3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/TemperatureSensor3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/Valve3D.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/echarts-gauge-presets.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/echarts-gauge.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/echarts-line-presets.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/echarts-line.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/index.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/industrial-3d-extended.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/industrial-3d-fluid.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/industrial-3d.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/light.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/iot/switch.d.ts +0 -0
- package/dist/{scada-components → src/scada-components}/registry.d.ts +0 -0
- package/dist/{types → src/types}/binding.d.ts +0 -0
- package/dist/{types → src/types}/device.d.ts +0 -0
- package/dist/{types → src/types}/workflow.d.ts +0 -0
- package/dist/{utils → src/utils}/animationEngine.d.ts +0 -0
- package/dist/{utils → src/utils}/authCrypto.d.ts +0 -0
- package/dist/{utils → src/utils}/commonUtils.d.ts +0 -0
- package/dist/{utils → src/utils}/eventUtils.d.ts +0 -0
- package/dist/{utils → src/utils}/fileUtils.d.ts +0 -0
- package/dist/{utils → src/utils}/messageUtils.d.ts +0 -0
- package/dist/{utils → src/utils}/nodePropertyUtils.d.ts +0 -0
- package/dist/{views → src/views}/workflow/WorkflowDialog.d.ts +1 -1
- /package/dist/{views → src/views}/workflow/WorkflowEditor.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/AddNodeMenu.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/ElementSelector.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/PropertyPanel.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/WorkflowToolbar.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/ClearTimerConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/ConditionConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/CustomCodeConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/GetPropertyConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/HttpRequestConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/SetPropertyConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/components/node-configs/TimerConfig.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/config/nodeConfigRegistry.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/services/canvasElementService.d.ts +0 -0
- /package/dist/{views → src/views}/workflow/types/node.d.ts +0 -0
package/README.md
CHANGED
|
@@ -163,7 +163,7 @@ const handleLoadData = (jsonData: any) => {
|
|
|
163
163
|
|
|
164
164
|
| 方法名 | 参数 | 返回值 | 说明 |
|
|
165
165
|
|--------|------|--------|------|
|
|
166
|
-
| `save()` | - | `void` | 保存画布数据到
|
|
166
|
+
| `save()` | - | `void` | 保存画布数据到 localStorage |
|
|
167
167
|
| `import()` | - | `void` | 触发文件选择,导入 JSON 数据 |
|
|
168
168
|
| `export()` | - | `void` | 导出画布数据为 JSON 文件 |
|
|
169
169
|
| `preview()` | - | `void` | 跳转到预览页面 |
|
package/dist/index.d.ts
CHANGED
|
@@ -1,159 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { default as PropertyPanel } from './components/PropertyPanel';
|
|
5
|
-
import { default as Header } from './components/Header';
|
|
6
|
-
import { default as ComponentLibrary } from './components/ComponentLibrary';
|
|
7
|
-
import { default as CanvasConfigPanel } from './components/CanvasConfigPanel';
|
|
8
|
-
import { default as BindingCard } from './components/BindingCard';
|
|
9
|
-
import { default as EventCard } from './components/EventCard';
|
|
10
|
-
import { default as BasicPropertiesTab } from './components/BasicPropertiesTab';
|
|
11
|
-
import { default as AttributeConfigDialog } from './components/AttributeConfigDialog';
|
|
12
|
-
import { default as CustomCodeDialog } from './components/CustomCodeDialog';
|
|
13
|
-
|
|
14
|
-
export * from './scada-components';
|
|
15
|
-
export { componentRegistry } from './scada-components/registry';
|
|
16
|
-
export type { ComponentConfig, ComponentRegistry, ComponentCategory, ComponentMetadata, ComponentProp, ComponentData, NodeAttrs, PropType } from './scada-components/types';
|
|
17
|
-
export { canvasConfigManager } from './scada-components/canvas';
|
|
18
|
-
export type { CanvasConfig, CanvasConfigItem, CanvasSizePreset, BackgroundSize, BackgroundRepeat } from './scada-components/canvas';
|
|
19
|
-
export { showMessage, saveToSession, loadFromSession, removeFromSession, saveToLocal, loadFromLocal, removeFromLocal, STORAGE_KEYS, exportToJSON, randomPosition, formatTimestamp, getCurrentTimestamp, generateUniqueId, generateEventId, generateNodeId } from './utils';
|
|
20
|
-
export { animationEngine } from './utils/animationEngine';
|
|
21
|
-
export { registerNodeEvents } from './utils/eventUtils';
|
|
22
|
-
export { default as PreviewView } from './views/preview/PreviewView';
|
|
23
|
-
export type { Device, DevicePoint, DeviceList, PointValueUpdate } from './types/device';
|
|
24
|
-
export { DeviceStatus, DeviceType, PointDataType, PointAccessMode } from './types/device';
|
|
25
|
-
export interface EventConfig {
|
|
26
|
-
id?: string;
|
|
27
|
-
name?: string;
|
|
28
|
-
type: string;
|
|
29
|
-
conditionType?: string;
|
|
30
|
-
condition?: {
|
|
31
|
-
attribute?: string;
|
|
32
|
-
operator?: string;
|
|
33
|
-
value?: any;
|
|
34
|
-
};
|
|
35
|
-
action: string;
|
|
36
|
-
params?: Record<string, any>;
|
|
37
|
-
}
|
|
38
|
-
export interface BindingConfig {
|
|
39
|
-
id?: string;
|
|
40
|
-
type: string;
|
|
41
|
-
deviceId?: string;
|
|
42
|
-
dataPoint?: string;
|
|
43
|
-
attribute?: string;
|
|
44
|
-
eventId?: string;
|
|
45
|
-
transform?: string;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* ScadaCanvas 组件暴露的 API 类型定义
|
|
49
|
-
*/
|
|
50
|
-
export interface ScadaCanvasExposed {
|
|
51
|
-
/** 保存画布数据到 sessionStorage */
|
|
52
|
-
save: () => void;
|
|
53
|
-
/** 触发文件选择,导入 JSON 数据 */
|
|
54
|
-
import: () => void;
|
|
55
|
-
/** 导出画布数据为 JSON 文件 */
|
|
56
|
-
export: () => void;
|
|
57
|
-
/** 跳转到预览页面 */
|
|
58
|
-
preview: () => void;
|
|
59
|
-
/** 打开流程编排弹窗 */
|
|
60
|
-
workflow: () => void;
|
|
61
|
-
/** 放大画布 */
|
|
62
|
-
zoomIn: () => void;
|
|
63
|
-
/** 缩小画布 */
|
|
64
|
-
zoomOut: () => void;
|
|
65
|
-
/** 清空画布所有元素 */
|
|
66
|
-
clearAll: () => void;
|
|
67
|
-
/** 添加节点 */
|
|
68
|
-
addNode: (type: string) => void;
|
|
69
|
-
/** 更新节点 */
|
|
70
|
-
updateNode: (data: any) => void;
|
|
71
|
-
/** 删除当前选中的节点 */
|
|
72
|
-
deleteNode: () => void;
|
|
73
|
-
/** 获取当前选中的节点 */
|
|
74
|
-
getSelectedNode: () => any;
|
|
75
|
-
/** 选中节点 */
|
|
76
|
-
selectNode: (nodeId: string) => boolean;
|
|
77
|
-
/** 取消选中 */
|
|
78
|
-
clearSelection: () => void;
|
|
79
|
-
/** 获取 X6 Graph 实例 */
|
|
80
|
-
getGraph: () => Graph | null;
|
|
81
|
-
/** 获取画布完整数据 */
|
|
82
|
-
getCanvasData: () => CanvasData | null;
|
|
83
|
-
/** 加载画布数据 */
|
|
84
|
-
loadCanvasData: (data: any) => boolean;
|
|
85
|
-
/** 获取所有节点 */
|
|
86
|
-
getAllNodes: () => NodeData[];
|
|
87
|
-
/** 根据ID获取节点 */
|
|
88
|
-
getNodeById: (nodeId: string) => NodeData | null;
|
|
89
|
-
/** 获取画布配置管理器 */
|
|
90
|
-
getConfigManager: () => any;
|
|
91
|
-
/** 更新画布配置 */
|
|
92
|
-
updateCanvasConfig: (config: any) => void;
|
|
93
|
-
/** 设置画布缩放 */
|
|
94
|
-
setZoom: (scale: number) => void;
|
|
95
|
-
/** 设置画布大小 */
|
|
96
|
-
setCanvasSize: (width: number, height: number) => void;
|
|
97
|
-
/** 设置背景颜色 */
|
|
98
|
-
setBackgroundColor: (color: string) => void;
|
|
99
|
-
/** 获取动画引擎 */
|
|
100
|
-
getAnimationEngine: () => any;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* 节点数据结构
|
|
104
|
-
*/
|
|
105
|
-
export interface NodeData {
|
|
106
|
-
id: string;
|
|
107
|
-
type: string;
|
|
108
|
-
position: {
|
|
109
|
-
x: number;
|
|
110
|
-
y: number;
|
|
111
|
-
};
|
|
112
|
-
size: {
|
|
113
|
-
width: number;
|
|
114
|
-
height: number;
|
|
115
|
-
};
|
|
116
|
-
label: string;
|
|
117
|
-
data: any;
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* 画布数据结构
|
|
121
|
-
*/
|
|
122
|
-
export interface CanvasData {
|
|
123
|
-
/** 版本号 */
|
|
124
|
-
version: string;
|
|
125
|
-
/** 时间戳 */
|
|
126
|
-
timestamp: string;
|
|
127
|
-
/** 画布配置 */
|
|
128
|
-
config: any;
|
|
129
|
-
/** X6 画布元素 */
|
|
130
|
-
cells: any[];
|
|
131
|
-
/** 节点数据 */
|
|
132
|
-
nodes: Array<{
|
|
133
|
-
id: string;
|
|
134
|
-
type: string;
|
|
135
|
-
position: {
|
|
136
|
-
x: number;
|
|
137
|
-
y: number;
|
|
138
|
-
};
|
|
139
|
-
size: {
|
|
140
|
-
width: number;
|
|
141
|
-
height: number;
|
|
142
|
-
};
|
|
143
|
-
label: string;
|
|
144
|
-
data: any;
|
|
145
|
-
}>;
|
|
146
|
-
/** 连线数据 */
|
|
147
|
-
edges: Array<{
|
|
148
|
-
id: string;
|
|
149
|
-
source: string;
|
|
150
|
-
target: string;
|
|
151
|
-
}>;
|
|
152
|
-
}
|
|
153
|
-
export { ScadaCanvas, PropertyPanel, Header, ComponentLibrary, CanvasConfigPanel, BindingCard, EventCard, BasicPropertiesTab, AttributeConfigDialog, CustomCodeDialog, };
|
|
154
|
-
export declare const install: (app: App) => void;
|
|
155
|
-
declare const _default: {
|
|
156
|
-
install: (app: App) => void;
|
|
157
|
-
version: string;
|
|
158
|
-
};
|
|
159
|
-
export default _default;
|
|
1
|
+
export * from './src/index'
|
|
2
|
+
import ScadaEngine from './src/index'
|
|
3
|
+
export default ScadaEngine
|