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,38 @@
|
|
|
1
|
+
import { Graph as X6Graph } from '@antv/x6';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
scadaGraph?: X6Graph | null;
|
|
5
|
+
showClose?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
8
|
+
scadaGraph: null;
|
|
9
|
+
showClose: boolean;
|
|
10
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
close: () => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
13
|
+
scadaGraph: null;
|
|
14
|
+
showClose: boolean;
|
|
15
|
+
}>>> & Readonly<{
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
showClose: boolean;
|
|
19
|
+
scadaGraph: X6Graph | null;
|
|
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
|
+
};
|
|
31
|
+
type __VLS_WithDefaults<P, D> = {
|
|
32
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
33
|
+
default: D[K];
|
|
34
|
+
}> : P[K];
|
|
35
|
+
};
|
|
36
|
+
type __VLS_Prettify<T> = {
|
|
37
|
+
[K in keyof T]: T[K];
|
|
38
|
+
} & {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface NodeType {
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
icon: string;
|
|
5
|
+
description: string;
|
|
6
|
+
color: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
visible: boolean;
|
|
10
|
+
position: {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
14
|
+
nodeTypes: NodeType[];
|
|
15
|
+
}
|
|
16
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
close: () => void;
|
|
18
|
+
select: (nodeType: NodeType) => void;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
20
|
+
onSelect?: ((nodeType: NodeType) => any) | undefined;
|
|
21
|
+
onClose?: (() => any) | undefined;
|
|
22
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
25
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
26
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
27
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
28
|
+
} : {
|
|
29
|
+
type: import('vue').PropType<T[K]>;
|
|
30
|
+
required: true;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ElementInfo } from '../types/element';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
visible: boolean;
|
|
5
|
+
elements?: ElementInfo[];
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
8
|
+
elements: () => never[];
|
|
9
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
close: () => void;
|
|
11
|
+
select: (element: ElementInfo) => void;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
|
|
13
|
+
elements: () => never[];
|
|
14
|
+
}>>> & Readonly<{
|
|
15
|
+
onSelect?: ((element: ElementInfo) => any) | undefined;
|
|
16
|
+
onClose?: (() => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
elements: ElementInfo[];
|
|
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
|
+
};
|
|
30
|
+
type __VLS_WithDefaults<P, D> = {
|
|
31
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
32
|
+
default: D[K];
|
|
33
|
+
}> : P[K];
|
|
34
|
+
};
|
|
35
|
+
type __VLS_Prettify<T> = {
|
|
36
|
+
[K in keyof T]: T[K];
|
|
37
|
+
} & {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NodeConfig } from '../types/node';
|
|
2
|
+
|
|
3
|
+
interface SelectedCell {
|
|
4
|
+
label: string;
|
|
5
|
+
nodeType: string;
|
|
6
|
+
cell: any;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
selectedCell: SelectedCell | null;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
12
|
+
"update:label": (value: string) => void;
|
|
13
|
+
"update:config": (value: Partial<NodeConfig>) => void;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
15
|
+
"onUpdate:label"?: ((value: string) => any) | undefined;
|
|
16
|
+
"onUpdate:config"?: ((value: Partial<NodeConfig>) => 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
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
showClose?: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
5
|
+
clear: () => void;
|
|
6
|
+
validate: () => void;
|
|
7
|
+
save: () => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
10
|
+
onSave?: (() => any) | undefined;
|
|
11
|
+
onClear?: (() => any) | undefined;
|
|
12
|
+
onClose?: (() => any) | undefined;
|
|
13
|
+
onValidate?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: import('vue').PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ClearTimerNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<ClearTimerNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<ClearTimerNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<ClearTimerNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ConditionNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<ConditionNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<ConditionNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<ConditionNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { CustomCodeNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<CustomCodeNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<CustomCodeNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<CustomCodeNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GetPropertyNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<GetPropertyNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<GetPropertyNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<GetPropertyNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpRequestNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<HttpRequestNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<HttpRequestNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<HttpRequestNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SetPropertyNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<SetPropertyNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<SetPropertyNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<SetPropertyNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TimerNodeConfig } from '../../types/node';
|
|
2
|
+
|
|
3
|
+
interface Props {
|
|
4
|
+
modelValue: Partial<TimerNodeConfig>;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
"update:modelValue": (value: Partial<TimerNodeConfig>) => void;
|
|
8
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & Readonly<{
|
|
9
|
+
"onUpdate:modelValue"?: ((value: Partial<TimerNodeConfig>) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
14
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
15
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
16
|
+
} : {
|
|
17
|
+
type: import('vue').PropType<T[K]>;
|
|
18
|
+
required: true;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as WorkflowDialog } from './WorkflowDialog';
|
|
2
|
+
export { default as WorkflowEditor } from './WorkflowEditor';
|
|
3
|
+
export * from './types/element';
|
|
4
|
+
export * from './types/node';
|
|
5
|
+
export * from './services/canvasElementService';
|
|
6
|
+
export * from './config/nodeConfigRegistry';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Graph } from '@antv/x6';
|
|
2
|
+
import { ElementInfo } from '../types/element';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 画布图元服务类
|
|
6
|
+
*/
|
|
7
|
+
declare class CanvasElementService {
|
|
8
|
+
private graph;
|
|
9
|
+
/**
|
|
10
|
+
* 设置画布实例
|
|
11
|
+
*/
|
|
12
|
+
setGraph(graph: Graph | null): void;
|
|
13
|
+
/**
|
|
14
|
+
* 获取画布所有图元
|
|
15
|
+
*/
|
|
16
|
+
getElements(): Promise<ElementInfo[]>;
|
|
17
|
+
/**
|
|
18
|
+
* 获取图元的可配置属性列表(仅返回组件 props 中定义的属性)
|
|
19
|
+
*/
|
|
20
|
+
private getElementProperties;
|
|
21
|
+
/**
|
|
22
|
+
* 根据ID获取图元
|
|
23
|
+
*/
|
|
24
|
+
getElementById(id: string): Promise<ElementInfo | null>;
|
|
25
|
+
/**
|
|
26
|
+
* 搜索图元
|
|
27
|
+
*/
|
|
28
|
+
searchElements(keyword: string): Promise<ElementInfo[]>;
|
|
29
|
+
}
|
|
30
|
+
export declare const canvasElementService: CanvasElementService;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare enum NodeTypeEnum {
|
|
2
|
+
START = "start",
|
|
3
|
+
END = "end",
|
|
4
|
+
GET_PROPERTY = "getProperty",
|
|
5
|
+
SET_PROPERTY = "setProperty",
|
|
6
|
+
CONDITION = "condition",
|
|
7
|
+
HTTP_REQUEST = "httpRequest",
|
|
8
|
+
CUSTOM_CODE = "customCode",
|
|
9
|
+
TIMER = "timer",
|
|
10
|
+
CLEAR_TIMER = "clearTimer"
|
|
11
|
+
}
|
|
12
|
+
export interface NodeType {
|
|
13
|
+
type: string;
|
|
14
|
+
name: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
description: string;
|
|
17
|
+
color: string;
|
|
18
|
+
}
|
|
19
|
+
export interface BaseNodeConfig {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
type: NodeTypeEnum;
|
|
23
|
+
}
|
|
24
|
+
export interface GetPropertyNodeConfig extends BaseNodeConfig {
|
|
25
|
+
type: NodeTypeEnum.GET_PROPERTY;
|
|
26
|
+
elementId: string;
|
|
27
|
+
propertyName: string;
|
|
28
|
+
outputVariable: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SetPropertyNodeConfig extends BaseNodeConfig {
|
|
31
|
+
type: NodeTypeEnum.SET_PROPERTY;
|
|
32
|
+
elementId: string;
|
|
33
|
+
propertyName: string;
|
|
34
|
+
value: string | number;
|
|
35
|
+
}
|
|
36
|
+
export interface ConditionBranch {
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
operator?: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'notContains';
|
|
40
|
+
value?: string | number | boolean;
|
|
41
|
+
isDefault?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface ConditionNodeConfig extends BaseNodeConfig {
|
|
44
|
+
type: NodeTypeEnum.CONDITION;
|
|
45
|
+
sourceNodeId: string;
|
|
46
|
+
dataType: 'boolean' | 'number' | 'string' | 'any';
|
|
47
|
+
branches: ConditionBranch[];
|
|
48
|
+
}
|
|
49
|
+
export interface HttpRequestNodeConfig extends BaseNodeConfig {
|
|
50
|
+
type: NodeTypeEnum.HTTP_REQUEST;
|
|
51
|
+
url: string;
|
|
52
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
|
53
|
+
headers: Record<string, string>;
|
|
54
|
+
body?: string;
|
|
55
|
+
outputVariable: string;
|
|
56
|
+
}
|
|
57
|
+
export interface CustomCodeNodeConfig extends BaseNodeConfig {
|
|
58
|
+
type: NodeTypeEnum.CUSTOM_CODE;
|
|
59
|
+
code: string;
|
|
60
|
+
}
|
|
61
|
+
export interface TimerNodeConfig extends BaseNodeConfig {
|
|
62
|
+
type: NodeTypeEnum.TIMER;
|
|
63
|
+
interval: number;
|
|
64
|
+
unit: 'ms' | 's' | 'm' | 'h';
|
|
65
|
+
}
|
|
66
|
+
export interface ClearTimerNodeConfig extends BaseNodeConfig {
|
|
67
|
+
type: NodeTypeEnum.CLEAR_TIMER;
|
|
68
|
+
timerId: string;
|
|
69
|
+
}
|
|
70
|
+
export type NodeConfig = GetPropertyNodeConfig | SetPropertyNodeConfig | ConditionNodeConfig | HttpRequestNodeConfig | CustomCodeNodeConfig | TimerNodeConfig | ClearTimerNodeConfig;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { Graph } from '@antv/x6';
|
|
3
|
+
import { default as ScadaCanvas } from './features/canvas/components/ScadaCanvas';
|
|
4
|
+
import { default as PropertyPanel } from './features/property-panel/PropertyPanel';
|
|
5
|
+
import { default as Header } from './shared/components/Header';
|
|
6
|
+
import { default as ComponentLibrary } from './shared/components/ComponentLibrary';
|
|
7
|
+
import { default as CanvasConfigPanel } from './features/canvas/components/CanvasConfigPanel';
|
|
8
|
+
import { default as BindingCard } from './features/property-panel/cards/BindingCard';
|
|
9
|
+
import { default as EventCard } from './features/property-panel/cards/EventCard';
|
|
10
|
+
import { default as BasicPropertiesTab } from './features/property-panel/tabs/BasicPropertiesTab';
|
|
11
|
+
import { default as AttributeConfigDialog } from './shared/components/dialogs/AttributeConfigDialog';
|
|
12
|
+
import { default as CustomCodeDialog } from './shared/components/dialogs/CustomCodeDialog';
|
|
13
|
+
import { default as Preview } from './features/preview/Preview';
|
|
14
|
+
|
|
15
|
+
export * from './scada-components';
|
|
16
|
+
export { componentRegistry } from './scada-components/registry';
|
|
17
|
+
export type { ComponentConfig, ComponentRegistry, ComponentCategory, ComponentMetadata, ComponentProp, ComponentData, NodeAttrs, PropType } from './scada-components/types';
|
|
18
|
+
export { canvasConfigManager } from './scada-components/canvas';
|
|
19
|
+
export type { CanvasConfig, CanvasConfigItem, CanvasSizePreset, BackgroundSize, BackgroundRepeat } from './scada-components/canvas';
|
|
20
|
+
export { showMessage, saveToLocal, loadFromLocal, removeFromLocal, STORAGE_KEYS, exportToJSON, randomPosition, formatTimestamp, getCurrentTimestamp, generateUniqueId, generateEventId, generateNodeId } from './utils';
|
|
21
|
+
export { animationEngine } from './shared/animation/animationEngine';
|
|
22
|
+
export { registerNodeEvents } from './shared/utils/eventUtils';
|
|
23
|
+
export { svgLoader } from './svg/core/loader';
|
|
24
|
+
export type { SVGLoader } from './svg/core/loader';
|
|
25
|
+
export type { Device, DevicePoint, DeviceList, PointValueUpdate } from './features/data-source/types/device';
|
|
26
|
+
export { DeviceStatus, DeviceType, PointDataType, PointAccessMode } from './features/data-source/types/device';
|
|
27
|
+
export interface EventConfig {
|
|
28
|
+
id?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
type: string;
|
|
31
|
+
conditionType?: string;
|
|
32
|
+
condition?: {
|
|
33
|
+
attribute?: string;
|
|
34
|
+
operator?: string;
|
|
35
|
+
value?: any;
|
|
36
|
+
};
|
|
37
|
+
action: string;
|
|
38
|
+
params?: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
export interface BindingConfig {
|
|
41
|
+
id?: string;
|
|
42
|
+
type: string;
|
|
43
|
+
deviceId?: string;
|
|
44
|
+
dataPoint?: string;
|
|
45
|
+
attribute?: string;
|
|
46
|
+
eventId?: string;
|
|
47
|
+
transform?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* ScadaCanvas 组件暴露的 API 类型定义
|
|
51
|
+
*/
|
|
52
|
+
export interface ScadaCanvasExposed {
|
|
53
|
+
/** 保存画布数据到 localStorage */
|
|
54
|
+
save: () => void;
|
|
55
|
+
/** 触发文件选择,导入 JSON 数据 */
|
|
56
|
+
import: () => void;
|
|
57
|
+
/** 导出画布数据为 JSON 文件 */
|
|
58
|
+
export: () => void;
|
|
59
|
+
/** 跳转到预览页面 */
|
|
60
|
+
preview: () => void;
|
|
61
|
+
/** 打开流程编排弹窗 */
|
|
62
|
+
workflow: () => void;
|
|
63
|
+
/** 放大画布 */
|
|
64
|
+
zoomIn: () => void;
|
|
65
|
+
/** 缩小画布 */
|
|
66
|
+
zoomOut: () => void;
|
|
67
|
+
/** 清空画布所有元素 */
|
|
68
|
+
clearAll: () => void;
|
|
69
|
+
/** 添加节点 */
|
|
70
|
+
addNode: (type: string) => void;
|
|
71
|
+
/** 更新节点 */
|
|
72
|
+
updateNode: (data: any) => void;
|
|
73
|
+
/** 删除当前选中的节点 */
|
|
74
|
+
deleteNode: () => void;
|
|
75
|
+
/** 获取当前选中的节点 */
|
|
76
|
+
getSelectedNode: () => any;
|
|
77
|
+
/** 选中节点 */
|
|
78
|
+
selectNode: (nodeId: string) => boolean;
|
|
79
|
+
/** 取消选中 */
|
|
80
|
+
clearSelection: () => void;
|
|
81
|
+
/** 获取 X6 Graph 实例 */
|
|
82
|
+
getGraph: () => Graph | null;
|
|
83
|
+
/** 获取画布完整数据 */
|
|
84
|
+
getCanvasData: () => CanvasData | null;
|
|
85
|
+
/** 加载画布数据 */
|
|
86
|
+
loadCanvasData: (data: any) => boolean;
|
|
87
|
+
/** 获取所有节点 */
|
|
88
|
+
getAllNodes: () => NodeData[];
|
|
89
|
+
/** 根据ID获取节点 */
|
|
90
|
+
getNodeById: (nodeId: string) => NodeData | null;
|
|
91
|
+
/** 获取画布配置管理器 */
|
|
92
|
+
getConfigManager: () => any;
|
|
93
|
+
/** 更新画布配置 */
|
|
94
|
+
updateCanvasConfig: (config: any) => void;
|
|
95
|
+
/** 设置画布缩放 */
|
|
96
|
+
setZoom: (scale: number) => void;
|
|
97
|
+
/** 设置画布大小 */
|
|
98
|
+
setCanvasSize: (width: number, height: number) => void;
|
|
99
|
+
/** 设置背景颜色 */
|
|
100
|
+
setBackgroundColor: (color: string) => void;
|
|
101
|
+
/** 获取动画引擎 */
|
|
102
|
+
getAnimationEngine: () => any;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* 节点数据结构
|
|
106
|
+
*/
|
|
107
|
+
export interface NodeData {
|
|
108
|
+
id: string;
|
|
109
|
+
type: string;
|
|
110
|
+
position: {
|
|
111
|
+
x: number;
|
|
112
|
+
y: number;
|
|
113
|
+
};
|
|
114
|
+
size: {
|
|
115
|
+
width: number;
|
|
116
|
+
height: number;
|
|
117
|
+
};
|
|
118
|
+
label: string;
|
|
119
|
+
data: any;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* 画布数据结构
|
|
123
|
+
*/
|
|
124
|
+
export interface CanvasData {
|
|
125
|
+
/** 版本号 */
|
|
126
|
+
version: string;
|
|
127
|
+
/** 时间戳 */
|
|
128
|
+
timestamp: string;
|
|
129
|
+
/** 画布配置 */
|
|
130
|
+
config: any;
|
|
131
|
+
/** X6 画布元素 */
|
|
132
|
+
cells: any[];
|
|
133
|
+
/** 节点数据 */
|
|
134
|
+
nodes: Array<{
|
|
135
|
+
id: string;
|
|
136
|
+
type: string;
|
|
137
|
+
position: {
|
|
138
|
+
x: number;
|
|
139
|
+
y: number;
|
|
140
|
+
};
|
|
141
|
+
size: {
|
|
142
|
+
width: number;
|
|
143
|
+
height: number;
|
|
144
|
+
};
|
|
145
|
+
label: string;
|
|
146
|
+
data: any;
|
|
147
|
+
}>;
|
|
148
|
+
/** 连线数据 */
|
|
149
|
+
edges: Array<{
|
|
150
|
+
id: string;
|
|
151
|
+
source: string;
|
|
152
|
+
target: string;
|
|
153
|
+
}>;
|
|
154
|
+
}
|
|
155
|
+
export { ScadaCanvas, PropertyPanel, Header, ComponentLibrary, CanvasConfigPanel, BindingCard, EventCard, BasicPropertiesTab, AttributeConfigDialog, CustomCodeDialog, Preview, };
|
|
156
|
+
export declare const install: (app: App) => void;
|
|
157
|
+
declare const _default: {
|
|
158
|
+
install: (app: App) => void;
|
|
159
|
+
version: string;
|
|
160
|
+
};
|
|
161
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CanvasConfig, CanvasConfigItem } from './types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 默认画布配置
|
|
5
|
+
*/
|
|
6
|
+
export declare const defaultCanvasConfig: CanvasConfig;
|
|
7
|
+
/**
|
|
8
|
+
* 画布配置项定义
|
|
9
|
+
*/
|
|
10
|
+
export declare const canvasConfigItems: CanvasConfigItem[];
|
|
11
|
+
/**
|
|
12
|
+
* 尺寸预设映射
|
|
13
|
+
*/
|
|
14
|
+
export declare const sizePresetMap: Record<string, {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 画布配置系统统一导出
|
|
3
|
+
*/
|
|
4
|
+
export type { CanvasConfig, CanvasConfigItem, CanvasSizePreset, BackgroundSize, BackgroundRepeat } from './types';
|
|
5
|
+
export { defaultCanvasConfig, canvasConfigItems, sizePresetMap } from './config';
|
|
6
|
+
export { canvasConfigManager } from './manager';
|