@nywqs/scada-engine 1.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.
Files changed (67) hide show
  1. package/README.md +455 -0
  2. package/dist/components/AttributeConfigDialog.d.ts +39 -0
  3. package/dist/components/BasicPropertiesTab.d.ts +51 -0
  4. package/dist/components/BindingCard.d.ts +36 -0
  5. package/dist/components/CanvasArea.d.ts +4 -0
  6. package/dist/components/CanvasConfigPanel.d.ts +2 -0
  7. package/dist/components/ComponentLibrary.d.ts +6 -0
  8. package/dist/components/CustomCodeDialog.d.ts +30 -0
  9. package/dist/components/DataPropertiesTab.d.ts +42 -0
  10. package/dist/components/DevicePointSelector.d.ts +27 -0
  11. package/dist/components/EdgePropertiesTab.d.ts +22 -0
  12. package/dist/components/EventCard.d.ts +63 -0
  13. package/dist/components/Footer.d.ts +37 -0
  14. package/dist/components/Header.d.ts +71 -0
  15. package/dist/components/MappingConfigurator.d.ts +27 -0
  16. package/dist/components/PropertyPanel.d.ts +27 -0
  17. package/dist/components/WorkflowSelectorDialog.d.ts +15 -0
  18. package/dist/index.d.ts +157 -0
  19. package/dist/main.d.ts +1 -0
  20. package/dist/mock/deviceData.d.ts +39 -0
  21. package/dist/scada-components/basic/circle.d.ts +6 -0
  22. package/dist/scada-components/basic/index.d.ts +6 -0
  23. package/dist/scada-components/basic/rect.d.ts +6 -0
  24. package/dist/scada-components/basic/text.d.ts +6 -0
  25. package/dist/scada-components/canvas/config.d.ts +17 -0
  26. package/dist/scada-components/canvas/index.d.ts +6 -0
  27. package/dist/scada-components/canvas/manager.d.ts +95 -0
  28. package/dist/scada-components/canvas/types.d.ts +77 -0
  29. package/dist/scada-components/index.d.ts +8 -0
  30. package/dist/scada-components/iot/gauge.d.ts +6 -0
  31. package/dist/scada-components/iot/index.d.ts +6 -0
  32. package/dist/scada-components/iot/light.d.ts +6 -0
  33. package/dist/scada-components/iot/switch.d.ts +6 -0
  34. package/dist/scada-components/registry.d.ts +56 -0
  35. package/dist/scada-components/types.d.ts +82 -0
  36. package/dist/scada-engine.css +1 -0
  37. package/dist/scada-engine.es.js +12390 -0
  38. package/dist/scada-engine.umd.js +53 -0
  39. package/dist/types/binding.d.ts +75 -0
  40. package/dist/types/device.d.ts +131 -0
  41. package/dist/types/workflow.d.ts +195 -0
  42. package/dist/utils/animationEngine.d.ts +68 -0
  43. package/dist/utils/authCrypto.d.ts +45 -0
  44. package/dist/utils/commonUtils.d.ts +83 -0
  45. package/dist/utils/eventUtils.d.ts +43 -0
  46. package/dist/utils/fileUtils.d.ts +43 -0
  47. package/dist/utils/index.d.ts +10 -0
  48. package/dist/utils/messageUtils.d.ts +56 -0
  49. package/dist/utils/nodePropertyUtils.d.ts +33 -0
  50. package/dist/utils/storageUtils.d.ts +55 -0
  51. package/dist/views/workflow/WorkflowDialog.d.ts +37 -0
  52. package/dist/views/workflow/WorkflowEditor.d.ts +38 -0
  53. package/dist/views/workflow/components/AddNodeMenu.d.ts +32 -0
  54. package/dist/views/workflow/components/ElementSelector.d.ts +45 -0
  55. package/dist/views/workflow/components/PropertyPanel.d.ts +27 -0
  56. package/dist/views/workflow/components/WorkflowToolbar.d.ts +24 -0
  57. package/dist/views/workflow/components/node-configs/ClearTimerConfig.d.ts +20 -0
  58. package/dist/views/workflow/components/node-configs/ConditionConfig.d.ts +20 -0
  59. package/dist/views/workflow/components/node-configs/CustomCodeConfig.d.ts +20 -0
  60. package/dist/views/workflow/components/node-configs/GetPropertyConfig.d.ts +20 -0
  61. package/dist/views/workflow/components/node-configs/HttpRequestConfig.d.ts +20 -0
  62. package/dist/views/workflow/components/node-configs/SetPropertyConfig.d.ts +20 -0
  63. package/dist/views/workflow/components/node-configs/TimerConfig.d.ts +20 -0
  64. package/dist/views/workflow/config/nodeConfigRegistry.d.ts +5 -0
  65. package/dist/views/workflow/services/canvasElementService.d.ts +31 -0
  66. package/dist/views/workflow/types/node.d.ts +70 -0
  67. package/package.json +77 -0
package/README.md ADDED
@@ -0,0 +1,455 @@
1
+ # @wqs/scada-engine
2
+
3
+ 基于 AntV X6 + Vue 3 的自研 SCADA 组态引擎
4
+
5
+ ## ✨ 特性
6
+
7
+ - 🎨 **可视化编辑器** - 拖拽式组态界面设计
8
+ - 📦 **丰富组件库** - 内置基础图形、IoT组件、图表等
9
+ - 🔗 **数据绑定** - 支持设备数据点绑定和实时更新
10
+ - ⚡ **事件系统** - 灵活的事件配置和交互响应
11
+ - 🎯 **TypeScript** - 完整的类型定义支持
12
+ - 📱 **响应式** - 基于 Vue 3 Composition API
13
+
14
+ ## 📦 安装
15
+
16
+ ```bash
17
+ npm install @wqs/scada-engine
18
+ # 或
19
+ pnpm add @wqs/scada-engine
20
+ # 或
21
+ yarn add @wqs/scada-engine
22
+ ```
23
+
24
+ ### Peer Dependencies
25
+
26
+ 请确保已安装以下依赖:
27
+
28
+ ```bash
29
+ npm install vue@^3.4.0 vue-router@^4.6.0 @antv/x6@^2.18.0 echarts@^5.5.0 pinia@^2.1.0
30
+ ```
31
+
32
+ ## 🚀 快速开始
33
+
34
+ ### 全局注册
35
+
36
+ ```typescript
37
+ import { createApp } from 'vue'
38
+ import ScadaEngine from '@wqs/scada-engine'
39
+ import '@wqs/scada-engine/dist/scada-engine.css'
40
+
41
+ const app = createApp(App)
42
+ app.use(ScadaEngine)
43
+ app.mount('#app')
44
+ ```
45
+
46
+ ### 按需引入
47
+
48
+ ```vue
49
+ <template>
50
+ <div class="app-container">
51
+ <ScadaCanvas
52
+ @node-click="handleNodeClick"
53
+ @node-update="handleNodeUpdate"
54
+ />
55
+ </div>
56
+ </template>
57
+
58
+ <script setup lang="ts">
59
+ import { ScadaCanvas } from '@wqs/scada-engine'
60
+ import '@wqs/scada-engine/dist/scada-engine.css'
61
+
62
+ const handleNodeClick = (node: any) => {
63
+ console.log('Node clicked:', node)
64
+ }
65
+
66
+ const handleNodeUpdate = (data: any) => {
67
+ console.log('Node updated:', data)
68
+ }
69
+ </script>
70
+ ```
71
+
72
+ ## 📚 组件列表
73
+
74
+ ### 核心组件
75
+
76
+ - `ScadaCanvas` - 画布组件(核心)
77
+ - `PropertyPanel` - 属性面板
78
+ - `ComponentLibrary` - 组件库面板
79
+ - `CanvasConfigPanel` - 画布配置面板
80
+ - `Header` - 顶部工具栏
81
+ - `PreviewView` - 预览视图
82
+
83
+ ### 辅助组件
84
+
85
+ - `BindingCard` - 数据绑定卡片
86
+ - `EventCard` - 事件配置卡片
87
+ - `BasicPropertiesTab` - 基础属性标签页
88
+ - `AttributeConfigDialog` - 属性配置对话框
89
+ - `CustomCodeDialog` - 自定义代码对话框
90
+
91
+ ## 🔧 API
92
+
93
+ ### ScadaCanvas 组件 API
94
+
95
+ `ScadaCanvas` 组件通过 `defineExpose` 暴露了一系列核心方法,供外部编程调用:
96
+
97
+ ```vue
98
+ <template>
99
+ <ScadaCanvas ref="canvasRef" />
100
+ </template>
101
+
102
+ <script setup lang="ts">
103
+ import { ref } from 'vue'
104
+ import { ScadaCanvas } from '@wqs/scada-engine'
105
+
106
+ const canvasRef = ref()
107
+
108
+ // 使用暴露的方法
109
+ const handleCustomSave = () => {
110
+ canvasRef.value?.save()
111
+ }
112
+
113
+ const handleCustomExport = () => {
114
+ canvasRef.value?.export()
115
+ }
116
+
117
+ const handleCustomImport = () => {
118
+ canvasRef.value?.import()
119
+ }
120
+
121
+ const handleGetData = () => {
122
+ const data = canvasRef.value?.getCanvasData()
123
+ console.log('画布数据:', data)
124
+ }
125
+
126
+ const handleLoadData = (jsonData: any) => {
127
+ const success = canvasRef.value?.loadCanvasData(jsonData)
128
+ if (success) {
129
+ console.log('加载成功')
130
+ }
131
+ }
132
+ </script>
133
+ ```
134
+
135
+ #### 暴露的方法列表
136
+
137
+ | 方法名 | 参数 | 返回值 | 说明 |
138
+ |--------|------|--------|------|
139
+ | `save()` | - | `void` | 保存画布数据到 sessionStorage |
140
+ | `import()` | - | `void` | 触发文件选择,导入 JSON 数据 |
141
+ | `export()` | - | `void` | 导出画布数据为 JSON 文件 |
142
+ | `preview()` | - | `void` | 跳转到预览页面 |
143
+ | `workflow()` | - | `void` | 打开流程编排弹窗 |
144
+ | `zoomIn()` | - | `void` | 放大画布 |
145
+ | `zoomOut()` | - | `void` | 缩小画布 |
146
+ | `fitView()` | - | `void` | 适应画布视图 |
147
+ | `clearAll()` | - | `void` | 清空画布所有元素 |
148
+ | `getGraph()` | - | `Graph \| null` | 获取 X6 Graph 实例 |
149
+ | `getCanvasData()` | - | `object \| null` | 获取画布完整数据 |
150
+ | `loadCanvasData(data)` | `data: any` | `boolean` | 加载画布数据 |
151
+
152
+ #### getCanvasData() 返回数据结构
153
+
154
+ ```typescript
155
+ {
156
+ version: string // 版本号
157
+ timestamp: string // 时间戳
158
+ config: object // 画布配置
159
+ cells: array // X6 画布元素
160
+ nodes: array // 节点数据
161
+ edges: array // 连线数据
162
+ }
163
+ ```
164
+
165
+ #### 完整示例:自定义工具栏
166
+
167
+ ```vue
168
+ <template>
169
+ <div class="custom-editor">
170
+ <!-- 自定义工具栏 -->
171
+ <div class="custom-toolbar">
172
+ <button @click="handleSave">保存</button>
173
+ <button @click="handleExport">导出</button>
174
+ <button @click="handleImport">导入</button>
175
+ <button @click="handleGetData">获取数据</button>
176
+ <button @click="handleZoomIn">放大</button>
177
+ <button @click="handleZoomOut">缩小</button>
178
+ </div>
179
+
180
+ <!-- 画布组件 -->
181
+ <ScadaCanvas ref="canvasRef" />
182
+ </div>
183
+ </template>
184
+
185
+ <script setup lang="ts">
186
+ import { ref } from 'vue'
187
+ import { ScadaCanvas } from '@wqs/scada-engine'
188
+
189
+ const canvasRef = ref()
190
+
191
+ const handleSave = () => {
192
+ canvasRef.value?.save()
193
+ console.log('已保存')
194
+ }
195
+
196
+ const handleExport = () => {
197
+ canvasRef.value?.export()
198
+ }
199
+
200
+ const handleImport = () => {
201
+ canvasRef.value?.import()
202
+ }
203
+
204
+ const handleGetData = () => {
205
+ const data = canvasRef.value?.getCanvasData()
206
+ console.log('画布数据:', data)
207
+
208
+ // 可以将数据发送到服务器
209
+ // await api.saveCanvas(data)
210
+ }
211
+
212
+ const handleZoomIn = () => {
213
+ canvasRef.value?.zoomIn()
214
+ }
215
+
216
+ const handleZoomOut = () => {
217
+ canvasRef.value?.zoomOut()
218
+ }
219
+ </script>
220
+ ```
221
+
222
+ ### 组件注册系统
223
+
224
+ ```typescript
225
+ import { componentRegistry } from '@wqs/scada-engine'
226
+
227
+ // 获取所有组件
228
+ const components = componentRegistry.getAllComponents()
229
+
230
+ // 按分类获取组件
231
+ const basicComponents = componentRegistry.getComponentsByCategory('basic')
232
+ ```
233
+
234
+ ### 画布配置
235
+
236
+ ```typescript
237
+ import { canvasConfigManager } from '@wqs/scada-engine'
238
+
239
+ // 获取画布配置
240
+ const config = canvasConfigManager.getConfig()
241
+
242
+ // 更新画布大小
243
+ canvasConfigManager.updateSize({ width: 1920, height: 1080 })
244
+ ```
245
+
246
+ ### 类型定义
247
+
248
+ ```typescript
249
+ import type {
250
+ EventConfig,
251
+ BindingConfig,
252
+ ComponentConfig,
253
+ ComponentCategory
254
+ } from '@wqs/scada-engine'
255
+ ```
256
+
257
+ ## 📝 使用示例
258
+
259
+ ### 完整编辑器应用
260
+
261
+ ```vue
262
+ <template>
263
+ <div class="scada-editor">
264
+ <Header
265
+ @save="handleSave"
266
+ @export="handleExport"
267
+ @preview="handlePreview"
268
+ />
269
+
270
+ <div class="editor-body">
271
+ <ComponentLibrary />
272
+
273
+ <ScadaCanvas
274
+ ref="canvasRef"
275
+ @node-select="handleNodeSelect"
276
+ />
277
+
278
+ <PropertyPanel
279
+ v-if="selectedNode"
280
+ :selected-node="selectedNode"
281
+ @update-node="handleUpdateNode"
282
+ />
283
+ </div>
284
+ </div>
285
+ </template>
286
+
287
+ <script setup lang="ts">
288
+ import { ref } from 'vue'
289
+ import {
290
+ Header,
291
+ ComponentLibrary,
292
+ ScadaCanvas,
293
+ PropertyPanel
294
+ } from '@wqs/scada-engine'
295
+ import '@wqs/scada-engine/dist/scada-engine.css'
296
+
297
+ const canvasRef = ref()
298
+ const selectedNode = ref(null)
299
+
300
+ const handleNodeSelect = (node: any) => {
301
+ selectedNode.value = node
302
+ }
303
+
304
+ const handleUpdateNode = (data: any) => {
305
+ // 更新节点数据
306
+ }
307
+
308
+ const handleSave = () => {
309
+ // 保存逻辑
310
+ }
311
+
312
+ const handleExport = () => {
313
+ // 导出逻辑
314
+ }
315
+
316
+ const handlePreview = () => {
317
+ // 预览逻辑
318
+ }
319
+ </script>
320
+ ```
321
+
322
+ ### 软件授权使用
323
+
324
+ 本软件默认在底部显示版权信息。如需隐藏或修改版权信息,必须获取授权码。
325
+
326
+ #### 1. 获取授权码
327
+
328
+ **方式一:联系作者**
329
+ - 📧 邮箱:nywqs@outlook.com
330
+ - 📱 电话:18637762001
331
+
332
+ **方式二:使用授权码生成工具**
333
+
334
+ 打开项目根目录下的 `authcode-generator.html` 文件,在浏览器中生成授权码:
335
+
336
+ ```bash
337
+ # 1. 打开授权码生成工具
338
+ open authcode-generator.html # macOS
339
+ start authcode-generator.html # Windows
340
+ xdg-open authcode-generator.html # Linux
341
+
342
+ # 2. 或使用命令行工具(Node.js)
343
+ node src/utils/authkey_tool.js <公司名称>
344
+ ```
345
+
346
+ #### 2. 使用授权码
347
+
348
+ ```vue
349
+ <template>
350
+ <ScadaCanvas
351
+ auth-code="your-auth-code-here"
352
+ />
353
+ </template>
354
+ ```
355
+
356
+ #### 3. 自定义 Footer 信息(需授权)
357
+
358
+ ```vue
359
+ <template>
360
+ <ScadaCanvas
361
+ auth-code="your-auth-code-here"
362
+ :custom-footer="{
363
+ copyright: '© 2025 您的公司',
364
+ license: '商业授权使用',
365
+ contact: '联系方式: support@yourcompany.com'
366
+ }"
367
+ />
368
+ </template>
369
+ ```
370
+
371
+ **授权模式说明:**
372
+ - ❌ 不提供 `authCode`:显示默认版权信息
373
+ - ✅ 有效 `authCode` + 无 `customFooter`:隐藏 Footer
374
+ - ✅ 有效 `authCode` + `customFooter`:显示自定义 Footer
375
+
376
+ **授权信息解密:**
377
+
378
+ 授权码采用 **AES-256-CBC + OpenSSL** 格式加密,可解密出:
379
+ - 公司/授权名称
380
+ - 有效期(可选)
381
+ - 机器码绑定(可选)
382
+
383
+ 控制台会输出授权验证信息:
384
+ ```javascript
385
+ ✅ 授权验证成功
386
+ 🏛️ 授权公司: leoncheng
387
+ 📅 有效期至: 2026-12-17
388
+ ```
389
+
390
+ ## 🔨 开发
391
+
392
+ ```bash
393
+ # 克隆项目
394
+ git clone https://github.com/yourusername/scada-engine.git
395
+
396
+ # 安装依赖
397
+ npm install
398
+
399
+ # 启动开发服务器
400
+ npm run dev
401
+
402
+ # 构建库
403
+ npm run build:lib
404
+ ```
405
+
406
+ ## 📄 发布到 npm
407
+
408
+ ```bash
409
+ # 1. 登录 npm
410
+ npm login
411
+
412
+ # 2. 构建库
413
+ npm run build:lib
414
+
415
+ # 3. 发布(首次发布公开包)
416
+ npm publish --access public
417
+
418
+ # 4. 后续版本更新
419
+ npm version patch # 补丁版本 1.0.0 -> 1.0.1
420
+ npm version minor # 次版本 1.0.0 -> 1.1.0
421
+ npm version major # 主版本 1.0.0 -> 2.0.0
422
+ npm publish
423
+ ```
424
+
425
+ ## 📋 版本管理建议
426
+
427
+ - **patch** (1.0.x): Bug 修复、小改进
428
+ - **minor** (1.x.0): 新功能、向后兼容
429
+ - **major** (x.0.0): 破坏性更新、重大重构
430
+
431
+ ## 🤝 贡献
432
+
433
+ 欢迎提交 Issue 和 Pull Request!
434
+
435
+ ## 📜 许可协议
436
+
437
+ **版权所有 © 2025 leoncheng**
438
+
439
+ 本项目仅供学习和研究使用,**禁止商业用途**。
440
+
441
+ 未经作者书面许可,不得将本软件用于任何商业目的,包括但不限于:
442
+ - 商业软件开发
443
+ - 商业服务提供
444
+ - 商业产品销售
445
+
446
+ 如需商业使用,请联系作者获取授权。
447
+
448
+ ## 👨‍💻 作者
449
+
450
+ **leoncheng**
451
+
452
+ - 📧 邮箱:nywqs@outlook.com
453
+ - 📱 电话:18637762001
454
+
455
+ 如有任何问题或商业合作需求,欢迎联系。
@@ -0,0 +1,39 @@
1
+ interface AttributeGroup {
2
+ target: string;
3
+ property: string;
4
+ value: string;
5
+ }
6
+ interface NodeProperty {
7
+ key: string;
8
+ label: string;
9
+ type: string;
10
+ }
11
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ attributeGroups: AttributeGroup[];
13
+ nodeProperties: NodeProperty[];
14
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
15
+ save: () => void;
16
+ close: () => void;
17
+ "add-group": () => void;
18
+ "remove-group": (index: number) => void;
19
+ "update-group": (index: number, field: keyof AttributeGroup, value: string) => void;
20
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
21
+ attributeGroups: AttributeGroup[];
22
+ nodeProperties: NodeProperty[];
23
+ }>>> & Readonly<{
24
+ onSave?: (() => any) | undefined;
25
+ onClose?: (() => any) | undefined;
26
+ "onAdd-group"?: (() => any) | undefined;
27
+ "onRemove-group"?: ((index: number) => any) | undefined;
28
+ "onUpdate-group"?: ((index: number, field: keyof AttributeGroup, value: string) => any) | undefined;
29
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
30
+ export default _default;
31
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
32
+ type __VLS_TypePropsToRuntimeProps<T> = {
33
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
34
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
35
+ } : {
36
+ type: import('vue').PropType<T[K]>;
37
+ required: true;
38
+ };
39
+ };
@@ -0,0 +1,51 @@
1
+ import { Node } from '@antv/x6';
2
+
3
+ interface NodePosition {
4
+ x: number;
5
+ y: number;
6
+ }
7
+ interface NodeSize {
8
+ width: number;
9
+ height: number;
10
+ }
11
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
12
+ selectedNode: Node;
13
+ nodePosition: NodePosition;
14
+ nodeSize: NodeSize;
15
+ nodeAttrs: any;
16
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
+ "update-position": (axis: "x" | "y", event: Event) => void;
18
+ "update-size": (dimension: "width" | "height", event: Event) => void;
19
+ "update-label": (event: Event) => void;
20
+ "update-fill": (event: Event) => void;
21
+ "update-stroke": (event: Event) => void;
22
+ "update-stroke-width": (event: Event) => void;
23
+ "update-opacity": (event: Event) => void;
24
+ "update-component-name": (event: Event) => void;
25
+ "update-dynamic-prop": (path: string, value: any) => void;
26
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
27
+ selectedNode: Node;
28
+ nodePosition: NodePosition;
29
+ nodeSize: NodeSize;
30
+ nodeAttrs: any;
31
+ }>>> & Readonly<{
32
+ "onUpdate-position"?: ((axis: "x" | "y", event: Event) => any) | undefined;
33
+ "onUpdate-size"?: ((dimension: "width" | "height", event: Event) => any) | undefined;
34
+ "onUpdate-label"?: ((event: Event) => any) | undefined;
35
+ "onUpdate-fill"?: ((event: Event) => any) | undefined;
36
+ "onUpdate-stroke"?: ((event: Event) => any) | undefined;
37
+ "onUpdate-stroke-width"?: ((event: Event) => any) | undefined;
38
+ "onUpdate-opacity"?: ((event: Event) => any) | undefined;
39
+ "onUpdate-component-name"?: ((event: Event) => any) | undefined;
40
+ "onUpdate-dynamic-prop"?: ((path: string, value: any) => any) | undefined;
41
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
42
+ export default _default;
43
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
44
+ type __VLS_TypePropsToRuntimeProps<T> = {
45
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
46
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
47
+ } : {
48
+ type: import('vue').PropType<T[K]>;
49
+ required: true;
50
+ };
51
+ };
@@ -0,0 +1,36 @@
1
+ import { BindingConfig } from '../types/binding';
2
+
3
+ interface NodeProperty {
4
+ key: string;
5
+ label: string;
6
+ type: string;
7
+ }
8
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
+ binding: BindingConfig;
10
+ index: number;
11
+ isCollapsed: boolean;
12
+ nodeProperties: NodeProperty[];
13
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
+ "toggle-collapse": () => void;
15
+ remove: () => void;
16
+ "update-field": (field: string, event: Event) => void;
17
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
18
+ binding: BindingConfig;
19
+ index: number;
20
+ isCollapsed: boolean;
21
+ nodeProperties: NodeProperty[];
22
+ }>>> & Readonly<{
23
+ "onToggle-collapse"?: (() => any) | undefined;
24
+ onRemove?: (() => any) | undefined;
25
+ "onUpdate-field"?: ((field: string, event: Event) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
27
+ export default _default;
28
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
+ type __VLS_TypePropsToRuntimeProps<T> = {
30
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
31
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
+ } : {
33
+ type: import('vue').PropType<T[K]>;
34
+ required: true;
35
+ };
36
+ };
@@ -0,0 +1,4 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {
2
+ containerRef: import('vue').Ref<HTMLElement | undefined, HTMLElement | undefined>;
3
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
4
+ export default _default;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
+ addComponent: (type: string) => void;
3
+ }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
+ onAddComponent?: ((type: string) => any) | undefined;
5
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
+ export default _default;
@@ -0,0 +1,30 @@
1
+ import { Node } from '@antv/x6';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ code: string;
5
+ selectedNode: Node | null;
6
+ }>>, {
7
+ previewContainer: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
8
+ DEFAULT_CODE: string;
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
10
+ save: () => void;
11
+ close: () => void;
12
+ "update:code": (value: string) => void;
13
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
14
+ code: string;
15
+ selectedNode: Node | null;
16
+ }>>> & Readonly<{
17
+ onSave?: (() => any) | undefined;
18
+ onClose?: (() => any) | undefined;
19
+ "onUpdate:code"?: ((value: string) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToRuntimeProps<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: import('vue').PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
@@ -0,0 +1,42 @@
1
+ import { Node } from '@antv/x6';
2
+
3
+ interface DataSource {
4
+ type: string;
5
+ broker?: string;
6
+ clientId?: string;
7
+ topic?: string;
8
+ username?: string;
9
+ password?: string;
10
+ wsUrl?: string;
11
+ url?: string;
12
+ method?: string;
13
+ headers?: string;
14
+ body?: string;
15
+ pollInterval?: number;
16
+ sseUrl?: string;
17
+ eventType?: string;
18
+ autoReconnect?: boolean;
19
+ dataPath?: string;
20
+ value?: string;
21
+ valueType?: string;
22
+ enabled?: boolean;
23
+ retryCount?: number;
24
+ }
25
+ interface Props {
26
+ selectedNode: Node;
27
+ }
28
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ "update-data-source": (source: DataSource) => void;
30
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
31
+ "onUpdate-data-source"?: ((source: DataSource) => any) | undefined;
32
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ export default _default;
34
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
35
+ type __VLS_TypePropsToRuntimeProps<T> = {
36
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
37
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
38
+ } : {
39
+ type: import('vue').PropType<T[K]>;
40
+ required: true;
41
+ };
42
+ };
@@ -0,0 +1,27 @@
1
+ import { Device, DevicePoint } from '../types/device';
2
+
3
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
4
+ visible: boolean;
5
+ modelValue?: string;
6
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ "update:visible": (value: boolean) => void;
8
+ "update:modelValue": (value: string) => void;
9
+ confirm: (deviceId: string, pointId: string, device: Device, point: DevicePoint) => void;
10
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
11
+ visible: boolean;
12
+ modelValue?: string;
13
+ }>>> & Readonly<{
14
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
15
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
16
+ onConfirm?: ((deviceId: string, pointId: string, device: Device, point: DevicePoint) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
18
+ export default _default;
19
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
20
+ type __VLS_TypePropsToRuntimeProps<T> = {
21
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
22
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
23
+ } : {
24
+ type: import('vue').PropType<T[K]>;
25
+ required: true;
26
+ };
27
+ };