scada-engine 1.0.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/LICENSE +21 -0
- package/README.md +193 -0
- package/dist/draco/gltf/draco_decoder.js +33 -0
- package/dist/draco/gltf/draco_decoder.wasm +0 -0
- package/dist/draco/gltf/draco_encoder.js +33 -0
- package/dist/draco/gltf/draco_wasm_wrapper.js +116 -0
- package/dist/index.d.ts +3 -0
- package/dist/scada-engine.css +1 -0
- package/dist/scada-engine.es.js +22936 -0
- package/dist/scada-engine.umd.js +1356 -0
- package/dist/src/features/canvas/components/CanvasArea.d.ts +4 -0
- package/dist/src/features/canvas/components/CanvasConfigPanel.d.ts +2 -0
- package/dist/src/features/canvas/index.d.ts +9 -0
- package/dist/src/features/canvas/managers/configWatcher.d.ts +49 -0
- package/dist/src/features/canvas/managers/dataHandler.d.ts +70 -0
- package/dist/src/features/canvas/managers/layerManager.d.ts +88 -0
- package/dist/src/features/canvas/operations/edgeOperations.d.ts +52 -0
- package/dist/src/features/canvas/operations/graphOperations.d.ts +85 -0
- package/dist/src/features/canvas/operations/nodeOperations.d.ts +77 -0
- package/dist/src/features/data-source/components/DataSourceDialog.d.ts +26 -0
- package/dist/src/features/data-source/components/MappingConfigurator.d.ts +27 -0
- package/dist/src/features/data-source/index.d.ts +14 -0
- package/dist/src/features/data-source/services/dataBindingService.d.ts +86 -0
- package/dist/src/features/data-source/services/dataParser.d.ts +110 -0
- package/dist/src/features/data-source/services/dataSourceManager.d.ts +127 -0
- package/dist/src/features/data-source/services/httpService.d.ts +73 -0
- package/dist/src/features/data-source/services/mqttService.d.ts +110 -0
- package/dist/src/features/data-source/services/sseService.d.ts +75 -0
- package/dist/src/features/data-source/services/websocketService.d.ts +67 -0
- package/dist/src/features/data-source/types/dataAdapter.d.ts +184 -0
- package/dist/src/features/data-source/types/device.d.ts +131 -0
- package/dist/src/features/preview/Preview.d.ts +2 -0
- package/dist/src/features/preview/components/NodeTooltip.d.ts +62 -0
- package/dist/src/features/preview/index.d.ts +1 -0
- package/dist/src/features/property-panel/PropertyPanel.d.ts +45 -0
- package/dist/src/features/property-panel/cards/BindingCard.d.ts +39 -0
- package/dist/src/features/property-panel/cards/EventCard.d.ts +63 -0
- package/dist/src/features/property-panel/index.d.ts +6 -0
- package/dist/src/features/property-panel/tabs/BasicPropertiesTab.d.ts +51 -0
- package/dist/src/features/property-panel/tabs/DataPropertiesTab.d.ts +24 -0
- package/dist/src/features/property-panel/tabs/EdgePropertiesTab.d.ts +22 -0
- package/dist/src/features/workflow/WorkflowDialog.d.ts +37 -0
- package/dist/src/features/workflow/WorkflowEditor.d.ts +38 -0
- package/dist/src/features/workflow/components/AddNodeMenu.d.ts +32 -0
- package/dist/src/features/workflow/components/ElementSelector.d.ts +37 -0
- package/dist/src/features/workflow/components/PropertyPanel.d.ts +27 -0
- package/dist/src/features/workflow/components/WorkflowToolbar.d.ts +24 -0
- package/dist/src/features/workflow/components/node-configs/ClearTimerConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/ConditionConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/CustomCodeConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/GetPropertyConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/HttpRequestConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/SetPropertyConfig.d.ts +20 -0
- package/dist/src/features/workflow/components/node-configs/TimerConfig.d.ts +20 -0
- package/dist/src/features/workflow/config/nodeConfigRegistry.d.ts +5 -0
- package/dist/src/features/workflow/index.d.ts +6 -0
- package/dist/src/features/workflow/services/canvasElementService.d.ts +31 -0
- package/dist/src/features/workflow/types/element.d.ts +16 -0
- package/dist/src/features/workflow/types/node.d.ts +70 -0
- package/dist/src/index.d.ts +161 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/scada-components/canvas/config.d.ts +17 -0
- package/dist/src/scada-components/canvas/index.d.ts +6 -0
- package/dist/src/scada-components/canvas/manager.d.ts +95 -0
- package/dist/src/scada-components/canvas/types.d.ts +77 -0
- package/dist/src/scada-components/chart/echarts-gauge/EChartsGauge.d.ts +14 -0
- package/dist/src/scada-components/chart/echarts-gauge/index.d.ts +6 -0
- package/dist/src/scada-components/chart/echarts-gauge/presets.d.ts +18 -0
- package/dist/src/scada-components/chart/echarts-line/EChartsLine.d.ts +14 -0
- package/dist/src/scada-components/chart/echarts-line/index.d.ts +6 -0
- package/dist/src/scada-components/chart/echarts-line/presets.d.ts +13 -0
- package/dist/src/scada-components/chart/index.d.ts +5 -0
- package/dist/src/scada-components/index.d.ts +7 -0
- package/dist/src/scada-components/registry.d.ts +117 -0
- package/dist/src/scada-components/types.d.ts +108 -0
- package/dist/src/shared/animation/animationEngine.d.ts +68 -0
- package/dist/src/shared/animation/animationScheduler.d.ts +85 -0
- package/dist/src/shared/animation/index.d.ts +2 -0
- package/dist/src/shared/components/ComponentLibrary.d.ts +34 -0
- package/dist/src/shared/components/ContextMenu.d.ts +63 -0
- package/dist/src/shared/components/Footer.d.ts +41 -0
- package/dist/src/shared/components/Header.d.ts +73 -0
- package/dist/src/shared/components/dialogs/AttributeConfigDialog.d.ts +39 -0
- package/dist/src/shared/components/dialogs/CustomCodeDialog.d.ts +30 -0
- package/dist/src/shared/components/dialogs/WorkflowSelectorDialog.d.ts +15 -0
- package/dist/src/shared/components/index.d.ts +8 -0
- package/dist/src/shared/components/selectors/ComponentPointSelector.d.ts +29 -0
- package/dist/src/shared/managers/contextMenuManager.d.ts +27 -0
- package/dist/src/shared/managers/eventManager.d.ts +62 -0
- package/dist/src/shared/managers/index.d.ts +3 -0
- package/dist/src/shared/managers/workerManager.d.ts +57 -0
- package/dist/src/shared/types/binding.d.ts +75 -0
- package/dist/src/shared/types/index.d.ts +2 -0
- package/dist/src/shared/types/workflow.d.ts +195 -0
- package/dist/src/shared/utils/commonUtils.d.ts +83 -0
- package/dist/src/shared/utils/edgeAnimationUtils.d.ts +16 -0
- package/dist/src/shared/utils/eventUtils.d.ts +43 -0
- package/dist/src/shared/utils/fileUtils.d.ts +43 -0
- package/dist/src/shared/utils/index.d.ts +7 -0
- package/dist/src/shared/utils/messageUtils.d.ts +56 -0
- package/dist/src/shared/utils/nodePropertyUtils.d.ts +33 -0
- package/dist/src/shared/utils/storageUtils.d.ts +32 -0
- package/dist/src/svg/core/index.d.ts +7 -0
- package/dist/src/svg/core/loader.d.ts +71 -0
- package/dist/src/svg/core/parser.d.ts +41 -0
- package/dist/src/svg/core/types.d.ts +297 -0
- package/dist/src/svg/helpers/demo.d.ts +20 -0
- package/dist/src/svg/helpers/index.d.ts +5 -0
- package/dist/src/svg/helpers/utils.d.ts +25 -0
- package/dist/src/svg/index.d.ts +9 -0
- package/dist/src/svg/rendering/SVGRenderer.d.ts +22 -0
- package/dist/src/svg/rendering/animationTemplates.d.ts +82 -0
- package/dist/src/svg/rendering/index.d.ts +6 -0
- package/dist/src/utils/authCrypto.d.ts +16 -0
- package/dist/src/utils/dracoLoader.d.ts +3 -0
- package/dist/src/utils/index.d.ts +29 -0
- package/dist/src/utils/viewportCulling.d.ts +63 -0
- package/dist/src/workers/dataProcessor.worker.d.ts +21 -0
- package/dist/utils-Ncgt7Dqu.js +1057 -0
- package/package.json +85 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface MenuItem {
|
|
2
|
+
key: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
hotkey?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
divider?: boolean;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
}
|
|
10
|
+
interface Props {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
position: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
menuItems: MenuItem[];
|
|
17
|
+
}
|
|
18
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
19
|
+
visible: boolean;
|
|
20
|
+
position: () => {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
};
|
|
24
|
+
menuItems: () => never[];
|
|
25
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
26
|
+
"update:visible": (value: boolean) => void;
|
|
27
|
+
"menu-click": (key: string) => void;
|
|
28
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
29
|
+
visible: boolean;
|
|
30
|
+
position: () => {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
34
|
+
menuItems: () => never[];
|
|
35
|
+
}>>> & Readonly<{
|
|
36
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
37
|
+
"onMenu-click"?: ((key: string) => any) | undefined;
|
|
38
|
+
}>, {
|
|
39
|
+
visible: boolean;
|
|
40
|
+
position: {
|
|
41
|
+
x: number;
|
|
42
|
+
y: number;
|
|
43
|
+
};
|
|
44
|
+
menuItems: MenuItem[];
|
|
45
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
46
|
+
export default _default;
|
|
47
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
48
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
49
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
50
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
51
|
+
} : {
|
|
52
|
+
type: import('vue').PropType<T[K]>;
|
|
53
|
+
required: true;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
type __VLS_WithDefaults<P, D> = {
|
|
57
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
58
|
+
default: D[K];
|
|
59
|
+
}> : P[K];
|
|
60
|
+
};
|
|
61
|
+
type __VLS_Prettify<T> = {
|
|
62
|
+
[K in keyof T]: T[K];
|
|
63
|
+
} & {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
interface CustomFooterConfig {
|
|
2
|
+
copyright?: string;
|
|
3
|
+
license?: string;
|
|
4
|
+
contact?: string;
|
|
5
|
+
}
|
|
6
|
+
interface Props {
|
|
7
|
+
authCode?: string;
|
|
8
|
+
publicKeyPem?: string;
|
|
9
|
+
customFooter?: CustomFooterConfig;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
12
|
+
authCode: string;
|
|
13
|
+
publicKeyPem: undefined;
|
|
14
|
+
customFooter: undefined;
|
|
15
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
16
|
+
authCode: string;
|
|
17
|
+
publicKeyPem: undefined;
|
|
18
|
+
customFooter: undefined;
|
|
19
|
+
}>>> & Readonly<{}>, {
|
|
20
|
+
authCode: string;
|
|
21
|
+
publicKeyPem: string;
|
|
22
|
+
customFooter: CustomFooterConfig;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
26
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
27
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
28
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
29
|
+
} : {
|
|
30
|
+
type: import('vue').PropType<T[K]>;
|
|
31
|
+
required: true;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
type __VLS_WithDefaults<P, D> = {
|
|
35
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
36
|
+
default: D[K];
|
|
37
|
+
}> : P[K];
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Prettify<T> = {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} & {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
selectedNodesCount?: number;
|
|
3
|
+
}
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
left?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
8
|
+
selectedNodesCount: number;
|
|
9
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
save: () => void;
|
|
11
|
+
import: () => void;
|
|
12
|
+
workflow: () => void;
|
|
13
|
+
preview: () => void;
|
|
14
|
+
export: () => void;
|
|
15
|
+
dataSource: () => void;
|
|
16
|
+
zoomIn: () => void;
|
|
17
|
+
zoomOut: () => void;
|
|
18
|
+
clearAll: () => void;
|
|
19
|
+
alignLeft: () => void;
|
|
20
|
+
alignCenter: () => void;
|
|
21
|
+
alignRight: () => void;
|
|
22
|
+
alignTop: () => void;
|
|
23
|
+
alignMiddle: () => void;
|
|
24
|
+
alignBottom: () => void;
|
|
25
|
+
distributeHorizontal: () => void;
|
|
26
|
+
distributeVertical: () => void;
|
|
27
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
28
|
+
selectedNodesCount: number;
|
|
29
|
+
}>>> & Readonly<{
|
|
30
|
+
onSave?: (() => any) | undefined;
|
|
31
|
+
onImport?: (() => any) | undefined;
|
|
32
|
+
onWorkflow?: (() => any) | undefined;
|
|
33
|
+
onPreview?: (() => any) | undefined;
|
|
34
|
+
onExport?: (() => any) | undefined;
|
|
35
|
+
onDataSource?: (() => any) | undefined;
|
|
36
|
+
onZoomIn?: (() => any) | undefined;
|
|
37
|
+
onZoomOut?: (() => any) | undefined;
|
|
38
|
+
onClearAll?: (() => any) | undefined;
|
|
39
|
+
onAlignLeft?: (() => any) | undefined;
|
|
40
|
+
onAlignCenter?: (() => any) | undefined;
|
|
41
|
+
onAlignRight?: (() => any) | undefined;
|
|
42
|
+
onAlignTop?: (() => any) | undefined;
|
|
43
|
+
onAlignMiddle?: (() => any) | undefined;
|
|
44
|
+
onAlignBottom?: (() => any) | undefined;
|
|
45
|
+
onDistributeHorizontal?: (() => any) | undefined;
|
|
46
|
+
onDistributeVertical?: (() => any) | undefined;
|
|
47
|
+
}>, {
|
|
48
|
+
selectedNodesCount: number;
|
|
49
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
50
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
51
|
+
export default _default;
|
|
52
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
53
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
54
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
55
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
56
|
+
} : {
|
|
57
|
+
type: import('vue').PropType<T[K]>;
|
|
58
|
+
required: true;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
type __VLS_WithDefaults<P, D> = {
|
|
62
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
63
|
+
default: D[K];
|
|
64
|
+
}> : P[K];
|
|
65
|
+
};
|
|
66
|
+
type __VLS_Prettify<T> = {
|
|
67
|
+
[K in keyof T]: T[K];
|
|
68
|
+
} & {};
|
|
69
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
70
|
+
new (): {
|
|
71
|
+
$slots: S;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
@@ -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,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,15 @@
|
|
|
1
|
+
interface Workflow {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
data: any;
|
|
5
|
+
createdAt: number;
|
|
6
|
+
updatedAt?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
close: () => void;
|
|
10
|
+
select: (workflow: Workflow) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
|
|
12
|
+
onSelect?: ((workflow: Workflow) => any) | undefined;
|
|
13
|
+
onClose?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as Header } from './Header';
|
|
2
|
+
export { default as Footer } from './Footer';
|
|
3
|
+
export { default as ComponentLibrary } from './ComponentLibrary';
|
|
4
|
+
export { default as ContextMenu } from './ContextMenu';
|
|
5
|
+
export { default as AttributeConfigDialog } from './dialogs/AttributeConfigDialog';
|
|
6
|
+
export { default as CustomCodeDialog } from './dialogs/CustomCodeDialog';
|
|
7
|
+
export { default as WorkflowSelectorDialog } from './dialogs/WorkflowSelectorDialog';
|
|
8
|
+
export { default as ComponentPointSelector } from './selectors/ComponentPointSelector';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ComponentPoint } from '../../../scada-components/types';
|
|
2
|
+
|
|
3
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
visible: boolean;
|
|
5
|
+
modelValue?: string;
|
|
6
|
+
componentPoints: ComponentPoint[];
|
|
7
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:visible": (value: boolean) => void;
|
|
9
|
+
"update:modelValue": (value: string) => void;
|
|
10
|
+
confirm: (pointId: string, point: ComponentPoint) => void;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
visible: boolean;
|
|
13
|
+
modelValue?: string;
|
|
14
|
+
componentPoints: ComponentPoint[];
|
|
15
|
+
}>>> & Readonly<{
|
|
16
|
+
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
+
onConfirm?: ((pointId: string, point: ComponentPoint) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
22
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
23
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
24
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
25
|
+
} : {
|
|
26
|
+
type: import('vue').PropType<T[K]>;
|
|
27
|
+
required: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { MenuItem } from '../components/ContextMenu';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 右键菜单管理器类
|
|
5
|
+
*/
|
|
6
|
+
export declare class ContextMenuManager {
|
|
7
|
+
/**
|
|
8
|
+
* 生成节点右键菜单
|
|
9
|
+
*/
|
|
10
|
+
getNodeMenuItems(): MenuItem[];
|
|
11
|
+
/**
|
|
12
|
+
* 生成连线右键菜单
|
|
13
|
+
*/
|
|
14
|
+
getEdgeMenuItems(): MenuItem[];
|
|
15
|
+
/**
|
|
16
|
+
* 生成画布右键菜单
|
|
17
|
+
*/
|
|
18
|
+
getCanvasMenuItems(): MenuItem[];
|
|
19
|
+
/**
|
|
20
|
+
* 根据目标类型获取菜单项
|
|
21
|
+
*/
|
|
22
|
+
getMenuItems(target: 'node' | 'edge' | 'canvas'): MenuItem[];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 导出右键菜单管理器单例
|
|
26
|
+
*/
|
|
27
|
+
export declare const contextMenuManager: ContextMenuManager;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Graph } from '@antv/x6';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { MenuItem } from '../components/ContextMenu';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 事件管理器配置
|
|
7
|
+
*/
|
|
8
|
+
export interface EventManagerConfig {
|
|
9
|
+
selectedNode: Ref<any>;
|
|
10
|
+
selectedEdge: Ref<any>;
|
|
11
|
+
selectedNodesCount: Ref<number>;
|
|
12
|
+
contextMenu: Ref<{
|
|
13
|
+
visible: boolean;
|
|
14
|
+
position: {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
};
|
|
18
|
+
items: MenuItem[];
|
|
19
|
+
targetCell: any;
|
|
20
|
+
}>;
|
|
21
|
+
applyEdgeAnimation?: (edge: any, animation: any) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Graph 事件管理器类
|
|
25
|
+
*/
|
|
26
|
+
export declare class GraphEventManager {
|
|
27
|
+
private graph;
|
|
28
|
+
private config;
|
|
29
|
+
private keydownHandler;
|
|
30
|
+
/**
|
|
31
|
+
* 初始化事件管理器
|
|
32
|
+
*/
|
|
33
|
+
initialize(graph: Graph, config: EventManagerConfig): void;
|
|
34
|
+
/**
|
|
35
|
+
* 注册选择相关事件
|
|
36
|
+
*/
|
|
37
|
+
private registerSelectionEvents;
|
|
38
|
+
/**
|
|
39
|
+
* 注册点击相关事件
|
|
40
|
+
*/
|
|
41
|
+
private registerClickEvents;
|
|
42
|
+
/**
|
|
43
|
+
* 注册变化监听事件
|
|
44
|
+
*/
|
|
45
|
+
private registerChangeEvents;
|
|
46
|
+
/**
|
|
47
|
+
* 注册右键菜单事件
|
|
48
|
+
*/
|
|
49
|
+
private registerContextMenuEvents;
|
|
50
|
+
/**
|
|
51
|
+
* 注册键盘事件
|
|
52
|
+
*/
|
|
53
|
+
private registerKeyboardEvents;
|
|
54
|
+
/**
|
|
55
|
+
* 销毁事件管理器,清理所有监听器
|
|
56
|
+
*/
|
|
57
|
+
destroy(): void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* 导出事件管理器单例
|
|
61
|
+
*/
|
|
62
|
+
export declare const graphEventManager: GraphEventManager;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker 管理器
|
|
3
|
+
* 管理 WebWorker 生命周期和消息通信
|
|
4
|
+
*/
|
|
5
|
+
export declare class WorkerManager {
|
|
6
|
+
private worker;
|
|
7
|
+
private pendingTasks;
|
|
8
|
+
private messageIdCounter;
|
|
9
|
+
private readonly TASK_TIMEOUT;
|
|
10
|
+
/**
|
|
11
|
+
* 初始化 Worker
|
|
12
|
+
*/
|
|
13
|
+
init(): void;
|
|
14
|
+
/**
|
|
15
|
+
* 处理 Worker 消息
|
|
16
|
+
*/
|
|
17
|
+
private handleMessage;
|
|
18
|
+
/**
|
|
19
|
+
* 处理 Worker 错误
|
|
20
|
+
*/
|
|
21
|
+
private handleError;
|
|
22
|
+
/**
|
|
23
|
+
* 发送消息到 Worker
|
|
24
|
+
*/
|
|
25
|
+
private sendMessage;
|
|
26
|
+
/**
|
|
27
|
+
* 主线程回退处理
|
|
28
|
+
*/
|
|
29
|
+
private fallbackProcess;
|
|
30
|
+
/**
|
|
31
|
+
* 解析设备数据
|
|
32
|
+
*/
|
|
33
|
+
parseDeviceData(rawData: any): Promise<any>;
|
|
34
|
+
/**
|
|
35
|
+
* 转换绑定数据
|
|
36
|
+
*/
|
|
37
|
+
transformBindingData(bindings: any[], deviceData: any): Promise<any[]>;
|
|
38
|
+
/**
|
|
39
|
+
* 批量计算
|
|
40
|
+
*/
|
|
41
|
+
batchCalculate(calculations: Array<{
|
|
42
|
+
type: string;
|
|
43
|
+
params: any;
|
|
44
|
+
}>): Promise<any[]>;
|
|
45
|
+
/**
|
|
46
|
+
* 获取 Worker 状态
|
|
47
|
+
*/
|
|
48
|
+
getStatus(): {
|
|
49
|
+
isActive: boolean;
|
|
50
|
+
pendingTasks: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 终止 Worker
|
|
54
|
+
*/
|
|
55
|
+
terminate(): void;
|
|
56
|
+
}
|
|
57
|
+
export declare const workerManager: WorkerManager;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 数据绑定和映射配置类型定义
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 映射类型
|
|
6
|
+
*/
|
|
7
|
+
export declare enum MappingType {
|
|
8
|
+
DIRECT = "direct",// 直接映射
|
|
9
|
+
BOOLEAN = "boolean",// 布尔映射
|
|
10
|
+
RANGE = "range",// 范围映射
|
|
11
|
+
ENUM = "enum"
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 值类型(与点位数据类型对应)
|
|
15
|
+
*/
|
|
16
|
+
export declare enum ValueType {
|
|
17
|
+
BOOLEAN = "boolean",// 布尔型
|
|
18
|
+
NUMBER = "number",// 数值型
|
|
19
|
+
STRING = "string"
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 范围映射规则
|
|
23
|
+
*/
|
|
24
|
+
export interface RangeRule {
|
|
25
|
+
/** 最小值(包含) */
|
|
26
|
+
min: number;
|
|
27
|
+
/** 最大值(包含) */
|
|
28
|
+
max: number;
|
|
29
|
+
/** 映射值 */
|
|
30
|
+
value: any;
|
|
31
|
+
/** 标签(可选) */
|
|
32
|
+
label?: string;
|
|
33
|
+
/** 单位(可选) */
|
|
34
|
+
unit?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 映射配置
|
|
38
|
+
*/
|
|
39
|
+
export interface MappingConfig {
|
|
40
|
+
/** 映射类型 */
|
|
41
|
+
type: MappingType;
|
|
42
|
+
/** 值类型(必填) */
|
|
43
|
+
valueType: ValueType;
|
|
44
|
+
/** 布尔映射 - true时的值 */
|
|
45
|
+
trueValue?: any;
|
|
46
|
+
/** 布尔映射 - false时的值 */
|
|
47
|
+
falseValue?: any;
|
|
48
|
+
/** 范围映射 - 规则列表 */
|
|
49
|
+
rangeRules?: RangeRule[];
|
|
50
|
+
/** 枚举映射 - 键值对 */
|
|
51
|
+
enumMappings?: Record<string, any>;
|
|
52
|
+
/** 保留原始值的单位(可选) */
|
|
53
|
+
keepOriginalUnit?: boolean;
|
|
54
|
+
/** 自定义单位(可选,会覆盖点位单位) */
|
|
55
|
+
customUnit?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* 绑定配置
|
|
59
|
+
*/
|
|
60
|
+
export interface BindingConfig {
|
|
61
|
+
/** 绑定ID */
|
|
62
|
+
id?: string;
|
|
63
|
+
/** 设备点位ID(格式: deviceId:pointId) */
|
|
64
|
+
devicePointId?: string;
|
|
65
|
+
/** 目标节点属性 */
|
|
66
|
+
targetProperty?: string;
|
|
67
|
+
/** 映射配置 */
|
|
68
|
+
mapping?: MappingConfig;
|
|
69
|
+
/** 是否启用 */
|
|
70
|
+
enabled?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* 应用映射规则,将点位值转换为目标值
|
|
74
|
+
*/
|
|
75
|
+
export declare function applyMapping(value: any, mapping: MappingConfig): any;
|