@a2simcode/dui 0.0.1 → 0.0.2
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/dist/components-dui/drag/index.d.ts +36 -0
- package/dist/components-dui/drag/src/container.vue.d.ts +40 -0
- package/dist/components-dui/drag/src/drag.vue.d.ts +29 -0
- package/dist/components-dui/drag/src/dragFormList.vue.d.ts +16 -0
- package/dist/components-dui/drag/src/dragIndexList.vue.d.ts +16 -0
- package/dist/components-dui/drag/src/eventBus.d.ts +4 -0
- package/dist/components-dui/drag/src/hooks/useDesign.d.ts +11 -0
- package/dist/components-dui/drag/src/hooks/useDrag.d.ts +18 -0
- package/dist/components-dui/drag/src/hooks/useMouseEvent.d.ts +6 -0
- package/dist/components-dui/drag/src/interface.d.ts +80 -0
- package/dist/components-dui/drag/src/tool.vue.d.ts +26 -0
- package/dist/components-dui/draggable/index.d.ts +223 -0
- package/dist/components-dui/draggable/src/draggable.vue.d.ts +131 -0
- package/dist/components-dui/flowDesign/index.d.ts +66 -0
- package/dist/components-dui/flowDesign/src/edge/edgeWithButton.vue.d.ts +22 -0
- package/dist/components-dui/flowDesign/src/flow.vue.d.ts +12 -0
- package/dist/components-dui/flowDesign/src/flowDesign.vue.d.ts +44 -0
- package/dist/components-dui/flowDesign/src/interface.d.ts +108 -0
- package/dist/components-dui/flowDesign/src/node/stepNode.vue.d.ts +10 -0
- package/dist/components-dui/flowDesign/src/nodeMenus.vue.d.ts +12 -0
- package/dist/components-dui/index.d.ts +11 -0
- package/dist/components-dui/inputFlow/index.d.ts +68 -0
- package/dist/components-dui/inputFlow/src/inputFlow.vue.d.ts +60 -0
- package/dist/components-dui/layout/index.d.ts +115 -0
- package/dist/components-dui/layout/src/layout.vue.d.ts +114 -0
- package/dist/components-dui/utils/components.d.ts +8 -0
- package/dist/components-dui/utils/index.d.ts +7 -0
- package/dist/components-dui/utils/number.d.ts +27 -0
- package/dist/dui.css +1 -1
- package/dist/dui.es.js +14124 -57
- package/dist/dui.umd.js +28 -1
- package/package.json +18 -14
- package/dist/button/index.d.ts +0 -51
- package/dist/button/src/button.vue.d.ts +0 -29
- package/dist/button/src/types.d.ts +0 -9
- package/dist/index.d.ts +0 -8
- package/dist/utils/index.d.ts +0 -4
- /package/dist/{vite.config.d.ts → components-dui/vite.config.d.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
declare const DFlowDesign: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').FlowDesignProps> & Readonly<{
|
|
3
|
+
onNodeClick?: ((node: import('@vue-flow/core').GraphNode<any, any, string>) => any) | undefined;
|
|
4
|
+
onConnect?: ((connection: any) => any) | undefined;
|
|
5
|
+
onPaneClick?: (() => any) | undefined;
|
|
6
|
+
onEdgeClick?: ((edge: any) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
getData: () => import('.').FlowDataItem[];
|
|
9
|
+
setData: (list: import('.').FlowDataItem[]) => void;
|
|
10
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
nodeClick: (node: import('@vue-flow/core').GraphNode<any, any, string>) => any;
|
|
12
|
+
connect: (connection: any) => any;
|
|
13
|
+
paneClick: () => any;
|
|
14
|
+
edgeClick: (edge: any) => any;
|
|
15
|
+
}, import('vue').PublicProps, {
|
|
16
|
+
components: import('.').FlowComponent[];
|
|
17
|
+
inputParams: Record<string, any>;
|
|
18
|
+
flowComponentConfigs: Record<string, any[]>;
|
|
19
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
20
|
+
configRef: unknown;
|
|
21
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
22
|
+
P: {};
|
|
23
|
+
B: {};
|
|
24
|
+
D: {};
|
|
25
|
+
C: {};
|
|
26
|
+
M: {};
|
|
27
|
+
Defaults: {};
|
|
28
|
+
}, Readonly<import('.').FlowDesignProps> & Readonly<{
|
|
29
|
+
onNodeClick?: ((node: import('@vue-flow/core').GraphNode<any, any, string>) => any) | undefined;
|
|
30
|
+
onConnect?: ((connection: any) => any) | undefined;
|
|
31
|
+
onPaneClick?: (() => any) | undefined;
|
|
32
|
+
onEdgeClick?: ((edge: any) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
getData: () => import('.').FlowDataItem[];
|
|
35
|
+
setData: (list: import('.').FlowDataItem[]) => void;
|
|
36
|
+
}, {}, {}, {}, {
|
|
37
|
+
components: import('.').FlowComponent[];
|
|
38
|
+
inputParams: Record<string, any>;
|
|
39
|
+
flowComponentConfigs: Record<string, any[]>;
|
|
40
|
+
}>;
|
|
41
|
+
__isFragment?: never;
|
|
42
|
+
__isTeleport?: never;
|
|
43
|
+
__isSuspense?: never;
|
|
44
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').FlowDesignProps> & Readonly<{
|
|
45
|
+
onNodeClick?: ((node: import('@vue-flow/core').GraphNode<any, any, string>) => any) | undefined;
|
|
46
|
+
onConnect?: ((connection: any) => any) | undefined;
|
|
47
|
+
onPaneClick?: (() => any) | undefined;
|
|
48
|
+
onEdgeClick?: ((edge: any) => any) | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
getData: () => import('.').FlowDataItem[];
|
|
51
|
+
setData: (list: import('.').FlowDataItem[]) => void;
|
|
52
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
53
|
+
nodeClick: (node: import('@vue-flow/core').GraphNode<any, any, string>) => any;
|
|
54
|
+
connect: (connection: any) => any;
|
|
55
|
+
paneClick: () => any;
|
|
56
|
+
edgeClick: (edge: any) => any;
|
|
57
|
+
}, string, {
|
|
58
|
+
components: import('.').FlowComponent[];
|
|
59
|
+
inputParams: Record<string, any>;
|
|
60
|
+
flowComponentConfigs: Record<string, any[]>;
|
|
61
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
62
|
+
install: (app: import('vue').App) => void;
|
|
63
|
+
};
|
|
64
|
+
export default DFlowDesign;
|
|
65
|
+
export * from './src/flowDesign.vue';
|
|
66
|
+
export * from './src/interface';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface EdgeWithButtonProps {
|
|
2
|
+
/** 边ID */
|
|
3
|
+
id: string;
|
|
4
|
+
/** 源节点X坐标 */
|
|
5
|
+
sourceX: number;
|
|
6
|
+
/** 源节点Y坐标 */
|
|
7
|
+
sourceY: number;
|
|
8
|
+
/** 目标节点X坐标 */
|
|
9
|
+
targetX: number;
|
|
10
|
+
/** 目标节点Y坐标 */
|
|
11
|
+
targetY: number;
|
|
12
|
+
/** 源节点位置 */
|
|
13
|
+
sourcePosition: string;
|
|
14
|
+
/** 目标节点位置 */
|
|
15
|
+
targetPosition: string;
|
|
16
|
+
/** 标记类型 */
|
|
17
|
+
markerEnd?: string;
|
|
18
|
+
/** 样式 */
|
|
19
|
+
style?: Record<string, any>;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import('vue').DefineComponent<EdgeWithButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EdgeWithButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Node, Edge } from '@vue-flow/core';
|
|
2
|
+
export interface FlowProps {
|
|
3
|
+
/** 节点列表 */
|
|
4
|
+
nodes?: Node[];
|
|
5
|
+
/** 边列表 */
|
|
6
|
+
edges?: Edge[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<FlowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FlowProps> & Readonly<{}>, {
|
|
9
|
+
nodes: Node[];
|
|
10
|
+
edges: Edge[];
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { GraphNode } from '@vue-flow/core';
|
|
2
|
+
import { FlowComponent, FlowNodeData, FlowDataItem, ConfigChangeParams, ConfigInitParams } from './interface';
|
|
3
|
+
export interface FlowDesignProps {
|
|
4
|
+
/** 组件集合 */
|
|
5
|
+
components?: FlowComponent[];
|
|
6
|
+
/** 输入参数 */
|
|
7
|
+
inputParams?: Record<string, any>;
|
|
8
|
+
/** 编排组件初始化方法 */
|
|
9
|
+
flowInit?: (type: string) => Record<string, any> | null | undefined;
|
|
10
|
+
/** 组件配置初始化方法 */
|
|
11
|
+
flowComponentConfigInit?: (params: ConfigInitParams) => void;
|
|
12
|
+
/** 编排组件设置方法(配置表单的 schema) */
|
|
13
|
+
flowComponentConfigs?: Record<string, any[]>;
|
|
14
|
+
/** 配置值变更方法 */
|
|
15
|
+
flowComponentConfigChange?: (type: string, params: {
|
|
16
|
+
configRef: any;
|
|
17
|
+
component: Record<string, any>;
|
|
18
|
+
configData: FlowNodeData;
|
|
19
|
+
isFlowNode: boolean;
|
|
20
|
+
} & ConfigChangeParams) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: import('vue').DefineComponent<FlowDesignProps, {
|
|
23
|
+
/** 获取数据 */
|
|
24
|
+
getData: () => FlowDataItem[];
|
|
25
|
+
/** 设置数据 */
|
|
26
|
+
setData: (list: FlowDataItem[]) => void;
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
28
|
+
nodeClick: (node: GraphNode<any, any, string>) => any;
|
|
29
|
+
connect: (connection: any) => any;
|
|
30
|
+
paneClick: () => any;
|
|
31
|
+
edgeClick: (edge: any) => any;
|
|
32
|
+
}, string, import('vue').PublicProps, Readonly<FlowDesignProps> & Readonly<{
|
|
33
|
+
onNodeClick?: ((node: GraphNode<any, any, string>) => any) | undefined;
|
|
34
|
+
onConnect?: ((connection: any) => any) | undefined;
|
|
35
|
+
onPaneClick?: (() => any) | undefined;
|
|
36
|
+
onEdgeClick?: ((edge: any) => any) | undefined;
|
|
37
|
+
}>, {
|
|
38
|
+
components: FlowComponent[];
|
|
39
|
+
inputParams: Record<string, any>;
|
|
40
|
+
flowComponentConfigs: Record<string, any[]>;
|
|
41
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
42
|
+
configRef: unknown;
|
|
43
|
+
}, HTMLDivElement>;
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { GraphNode } from '@vue-flow/core';
|
|
2
|
+
/**
|
|
3
|
+
* 流程组件配置项
|
|
4
|
+
*/
|
|
5
|
+
export interface FlowComponent {
|
|
6
|
+
/** 组件类型 */
|
|
7
|
+
type: string;
|
|
8
|
+
/** 组件名称 */
|
|
9
|
+
name: string;
|
|
10
|
+
/** 组件图标 */
|
|
11
|
+
icon?: string;
|
|
12
|
+
/** 图标颜色 */
|
|
13
|
+
iconColor?: string;
|
|
14
|
+
/** 组件描述 */
|
|
15
|
+
des?: string;
|
|
16
|
+
/** 其他配置 */
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 流程节点数据
|
|
21
|
+
*/
|
|
22
|
+
export interface FlowNodeData {
|
|
23
|
+
/** 节点类型 */
|
|
24
|
+
type: string;
|
|
25
|
+
/** 是否初始化 */
|
|
26
|
+
isInit?: boolean;
|
|
27
|
+
/** 其他配置数据 */
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 流程节点
|
|
32
|
+
*/
|
|
33
|
+
export interface FlowNode {
|
|
34
|
+
/** 节点ID */
|
|
35
|
+
id: string;
|
|
36
|
+
/** 节点类型 */
|
|
37
|
+
type: string;
|
|
38
|
+
/** 节点数据 */
|
|
39
|
+
data: FlowNodeData;
|
|
40
|
+
/** 节点位置 */
|
|
41
|
+
position: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 流程边
|
|
48
|
+
*/
|
|
49
|
+
export interface FlowEdge {
|
|
50
|
+
/** 边ID */
|
|
51
|
+
id: string;
|
|
52
|
+
/** 源节点ID */
|
|
53
|
+
source: string;
|
|
54
|
+
/** 目标节点ID */
|
|
55
|
+
target: string;
|
|
56
|
+
/** 源节点句柄 */
|
|
57
|
+
sourceHandle?: string;
|
|
58
|
+
/** 目标节点句柄 */
|
|
59
|
+
targetHandle?: string;
|
|
60
|
+
/** 边类型 */
|
|
61
|
+
type?: string;
|
|
62
|
+
/** 标记类型 */
|
|
63
|
+
markerEnd?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 流程数据项
|
|
67
|
+
*/
|
|
68
|
+
export interface FlowDataItem {
|
|
69
|
+
/** 节点ID */
|
|
70
|
+
id: string;
|
|
71
|
+
/** 节点类型 */
|
|
72
|
+
type: string;
|
|
73
|
+
/** 节点配置 */
|
|
74
|
+
config: FlowNodeData;
|
|
75
|
+
/** 节点位置 */
|
|
76
|
+
position: {
|
|
77
|
+
x: number;
|
|
78
|
+
y: number;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* 配置变更参数
|
|
83
|
+
*/
|
|
84
|
+
export interface ConfigChangeParams {
|
|
85
|
+
/** 变更值 */
|
|
86
|
+
value: any;
|
|
87
|
+
/** 数据 */
|
|
88
|
+
data?: any;
|
|
89
|
+
/** 索引 */
|
|
90
|
+
index?: number;
|
|
91
|
+
/** 表格数据 */
|
|
92
|
+
tableData?: Record<string, any>[];
|
|
93
|
+
/** 类型 */
|
|
94
|
+
type?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 配置初始化参数
|
|
98
|
+
*/
|
|
99
|
+
export interface ConfigInitParams {
|
|
100
|
+
/** 配置引用 */
|
|
101
|
+
configRef: any;
|
|
102
|
+
/** 输入参数 */
|
|
103
|
+
inputParams: Record<string, any>;
|
|
104
|
+
/** 组件列表 */
|
|
105
|
+
components: GraphNode[];
|
|
106
|
+
/** 配置数据 */
|
|
107
|
+
configData: FlowNodeData;
|
|
108
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface StepNodeProps {
|
|
2
|
+
/** 节点id */
|
|
3
|
+
id: string;
|
|
4
|
+
/** 节点数据 */
|
|
5
|
+
data: Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<StepNodeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StepNodeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
8
|
+
dropdownRef: unknown;
|
|
9
|
+
}, HTMLDivElement>;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface NodeMenusProps {
|
|
2
|
+
/** 源节点ID */
|
|
3
|
+
fromNodeId?: string;
|
|
4
|
+
/** 句柄ID */
|
|
5
|
+
handleId?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<NodeMenusProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
addNode: (type: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<NodeMenusProps> & Readonly<{
|
|
10
|
+
onAddNode?: ((type: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { default as DDrag, dragTool, dragContainer, dragFormList, dragIndexList } from './drag';
|
|
3
|
+
import { default as DFlowDesign } from './flowDesign';
|
|
4
|
+
import { default as DInputFlow } from './inputFlow';
|
|
5
|
+
import { default as DLayout } from './layout';
|
|
6
|
+
import { default as DDraggable } from './draggable';
|
|
7
|
+
export { DDrag, dragTool, dragContainer, dragFormList, dragIndexList, DFlowDesign, DInputFlow, DLayout, DDraggable };
|
|
8
|
+
declare const _default: {
|
|
9
|
+
install: (app: App) => void;
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const DInputFlow: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').InputFlowProps> & Readonly<{
|
|
3
|
+
onChange?: ((data: {
|
|
4
|
+
value: string | undefined;
|
|
5
|
+
}) => any) | undefined;
|
|
6
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
7
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
change: (data: {
|
|
9
|
+
value: string | undefined;
|
|
10
|
+
}) => any;
|
|
11
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
12
|
+
}, import('vue').PublicProps, {
|
|
13
|
+
size: "large" | "default" | "small";
|
|
14
|
+
width: string | number;
|
|
15
|
+
height: number;
|
|
16
|
+
flowComponents: import('../flowDesign').FlowComponent[];
|
|
17
|
+
inputParams: Record<string, any>;
|
|
18
|
+
flowComponentConfigs: Record<string, import('.').SchemaConfigItem[]>;
|
|
19
|
+
btnText: string;
|
|
20
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
21
|
+
flowRef: unknown;
|
|
22
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
23
|
+
P: {};
|
|
24
|
+
B: {};
|
|
25
|
+
D: {};
|
|
26
|
+
C: {};
|
|
27
|
+
M: {};
|
|
28
|
+
Defaults: {};
|
|
29
|
+
}, Readonly<import('.').InputFlowProps> & Readonly<{
|
|
30
|
+
onChange?: ((data: {
|
|
31
|
+
value: string | undefined;
|
|
32
|
+
}) => any) | undefined;
|
|
33
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
34
|
+
}>, {}, {}, {}, {}, {
|
|
35
|
+
size: "large" | "default" | "small";
|
|
36
|
+
width: string | number;
|
|
37
|
+
height: number;
|
|
38
|
+
flowComponents: import('../flowDesign').FlowComponent[];
|
|
39
|
+
inputParams: Record<string, any>;
|
|
40
|
+
flowComponentConfigs: Record<string, import('.').SchemaConfigItem[]>;
|
|
41
|
+
btnText: string;
|
|
42
|
+
}>;
|
|
43
|
+
__isFragment?: never;
|
|
44
|
+
__isTeleport?: never;
|
|
45
|
+
__isSuspense?: never;
|
|
46
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').InputFlowProps> & Readonly<{
|
|
47
|
+
onChange?: ((data: {
|
|
48
|
+
value: string | undefined;
|
|
49
|
+
}) => any) | undefined;
|
|
50
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
51
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
52
|
+
change: (data: {
|
|
53
|
+
value: string | undefined;
|
|
54
|
+
}) => any;
|
|
55
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
56
|
+
}, string, {
|
|
57
|
+
size: "large" | "default" | "small";
|
|
58
|
+
width: string | number;
|
|
59
|
+
height: number;
|
|
60
|
+
flowComponents: import('../flowDesign').FlowComponent[];
|
|
61
|
+
inputParams: Record<string, any>;
|
|
62
|
+
flowComponentConfigs: Record<string, import('.').SchemaConfigItem[]>;
|
|
63
|
+
btnText: string;
|
|
64
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
65
|
+
install: (app: import('vue').App) => void;
|
|
66
|
+
};
|
|
67
|
+
export default DInputFlow;
|
|
68
|
+
export * from './src/inputFlow.vue';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { FlowComponent, ConfigChangeParams, ConfigInitParams } from '../../flowDesign/src/interface';
|
|
2
|
+
/** 表单项配置(用于编排组件配置表单 schema) */
|
|
3
|
+
export type SchemaConfigItem = Record<string, any>;
|
|
4
|
+
export interface InputFlowProps {
|
|
5
|
+
/** 绑定值(流程数据 JSON 字符串) */
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
/** 按钮类型:主要、幽灵、虚框、链接、文字、次要 */
|
|
8
|
+
type?: 'primary' | 'ghost' | 'dashed' | 'link' | 'text' | 'default';
|
|
9
|
+
/** 按钮文字 */
|
|
10
|
+
btnText?: string;
|
|
11
|
+
/** 弹窗标题 */
|
|
12
|
+
title?: string;
|
|
13
|
+
/** 按钮尺寸 */
|
|
14
|
+
size?: 'large' | 'default' | 'small';
|
|
15
|
+
/** 弹窗宽度 */
|
|
16
|
+
width?: string | number;
|
|
17
|
+
/** 弹窗高度 */
|
|
18
|
+
height?: number;
|
|
19
|
+
/** 弹窗关闭前回调,返回 false 可阻止关闭 */
|
|
20
|
+
beforeClose?: (value?: string) => boolean | Promise<boolean>;
|
|
21
|
+
/** 流程组件集合(编排可选节点类型) */
|
|
22
|
+
flowComponents?: FlowComponent[];
|
|
23
|
+
/** 输入参数,会传入流程组件配置初始化 */
|
|
24
|
+
inputParams?: Record<string, any>;
|
|
25
|
+
/** 编排画布初始化方法 */
|
|
26
|
+
flowInit?: (type: string) => Record<string, any> | null | undefined;
|
|
27
|
+
/** 组件配置表单初始化方法 */
|
|
28
|
+
flowComponentConfigInit?: (params: ConfigInitParams) => void;
|
|
29
|
+
/** 各类型节点的配置表单 schema */
|
|
30
|
+
flowComponentConfigs?: Record<string, SchemaConfigItem[]>;
|
|
31
|
+
/** 配置值变更回调 */
|
|
32
|
+
flowComponentConfigChange?: (type: string, params: {
|
|
33
|
+
configRef: any;
|
|
34
|
+
component: Record<string, any>;
|
|
35
|
+
configData: any;
|
|
36
|
+
isFlowNode: boolean;
|
|
37
|
+
} & ConfigChangeParams) => void;
|
|
38
|
+
}
|
|
39
|
+
declare const _default: import('vue').DefineComponent<InputFlowProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
40
|
+
change: (data: {
|
|
41
|
+
value: string | undefined;
|
|
42
|
+
}) => any;
|
|
43
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
44
|
+
}, string, import('vue').PublicProps, Readonly<InputFlowProps> & Readonly<{
|
|
45
|
+
onChange?: ((data: {
|
|
46
|
+
value: string | undefined;
|
|
47
|
+
}) => any) | undefined;
|
|
48
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
49
|
+
}>, {
|
|
50
|
+
size: "large" | "default" | "small";
|
|
51
|
+
width: string | number;
|
|
52
|
+
height: number;
|
|
53
|
+
flowComponents: FlowComponent[];
|
|
54
|
+
inputParams: Record<string, any>;
|
|
55
|
+
flowComponentConfigs: Record<string, SchemaConfigItem[]>;
|
|
56
|
+
btnText: string;
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
58
|
+
flowRef: unknown;
|
|
59
|
+
}, any>;
|
|
60
|
+
export default _default;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
declare const DLayout: {
|
|
2
|
+
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').LayoutProps> & Readonly<{
|
|
3
|
+
onDragStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
4
|
+
onDragStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
5
|
+
"onUpdate:modelValue"?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
6
|
+
onAdded?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
7
|
+
onRemoved?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
8
|
+
onChanged?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
9
|
+
onResizeStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
10
|
+
onResizeStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
addItem: (item: import('.').LayoutItem) => Promise<void>;
|
|
13
|
+
removeItem: (id: string) => void;
|
|
14
|
+
clear: () => void;
|
|
15
|
+
getGrid: () => import('gridstack').GridStack | null;
|
|
16
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
dragStart: (event: Event, item: import('.').LayoutItem) => any;
|
|
18
|
+
dragStop: (event: Event, item: import('.').LayoutItem) => any;
|
|
19
|
+
"update:modelValue": (items: import('.').LayoutItem[]) => any;
|
|
20
|
+
added: (item: import('.').LayoutItem) => any;
|
|
21
|
+
removed: (item: import('.').LayoutItem) => any;
|
|
22
|
+
changed: (items: import('.').LayoutItem[]) => any;
|
|
23
|
+
resizeStart: (event: Event, item: import('.').LayoutItem) => any;
|
|
24
|
+
resizeStop: (event: Event, item: import('.').LayoutItem) => any;
|
|
25
|
+
}, import('vue').PublicProps, {
|
|
26
|
+
animate: boolean;
|
|
27
|
+
modelValue: import('.').LayoutItem[];
|
|
28
|
+
draggable: boolean;
|
|
29
|
+
float: boolean;
|
|
30
|
+
column: number;
|
|
31
|
+
cellHeight: number;
|
|
32
|
+
resizable: boolean;
|
|
33
|
+
disable: boolean;
|
|
34
|
+
removable: boolean;
|
|
35
|
+
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
36
|
+
gridContainerRef: HTMLDivElement;
|
|
37
|
+
}, HTMLDivElement, import('vue').ComponentProvideOptions, {
|
|
38
|
+
P: {};
|
|
39
|
+
B: {};
|
|
40
|
+
D: {};
|
|
41
|
+
C: {};
|
|
42
|
+
M: {};
|
|
43
|
+
Defaults: {};
|
|
44
|
+
}, Readonly<import('.').LayoutProps> & Readonly<{
|
|
45
|
+
onDragStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
46
|
+
onDragStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
47
|
+
"onUpdate:modelValue"?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
48
|
+
onAdded?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
49
|
+
onRemoved?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
50
|
+
onChanged?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
51
|
+
onResizeStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
52
|
+
onResizeStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
53
|
+
}>, {
|
|
54
|
+
addItem: (item: import('.').LayoutItem) => Promise<void>;
|
|
55
|
+
removeItem: (id: string) => void;
|
|
56
|
+
clear: () => void;
|
|
57
|
+
getGrid: () => import('gridstack').GridStack | null;
|
|
58
|
+
}, {}, {}, {}, {
|
|
59
|
+
animate: boolean;
|
|
60
|
+
modelValue: import('.').LayoutItem[];
|
|
61
|
+
draggable: boolean;
|
|
62
|
+
float: boolean;
|
|
63
|
+
column: number;
|
|
64
|
+
cellHeight: number;
|
|
65
|
+
resizable: boolean;
|
|
66
|
+
disable: boolean;
|
|
67
|
+
removable: boolean;
|
|
68
|
+
}>;
|
|
69
|
+
__isFragment?: never;
|
|
70
|
+
__isTeleport?: never;
|
|
71
|
+
__isSuspense?: never;
|
|
72
|
+
} & import('vue').ComponentOptionsBase<Readonly<import('.').LayoutProps> & Readonly<{
|
|
73
|
+
onDragStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
74
|
+
onDragStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
75
|
+
"onUpdate:modelValue"?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
76
|
+
onAdded?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
77
|
+
onRemoved?: ((item: import('.').LayoutItem) => any) | undefined;
|
|
78
|
+
onChanged?: ((items: import('.').LayoutItem[]) => any) | undefined;
|
|
79
|
+
onResizeStart?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
80
|
+
onResizeStop?: ((event: Event, item: import('.').LayoutItem) => any) | undefined;
|
|
81
|
+
}>, {
|
|
82
|
+
addItem: (item: import('.').LayoutItem) => Promise<void>;
|
|
83
|
+
removeItem: (id: string) => void;
|
|
84
|
+
clear: () => void;
|
|
85
|
+
getGrid: () => import('gridstack').GridStack | null;
|
|
86
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
87
|
+
dragStart: (event: Event, item: import('.').LayoutItem) => any;
|
|
88
|
+
dragStop: (event: Event, item: import('.').LayoutItem) => any;
|
|
89
|
+
"update:modelValue": (items: import('.').LayoutItem[]) => any;
|
|
90
|
+
added: (item: import('.').LayoutItem) => any;
|
|
91
|
+
removed: (item: import('.').LayoutItem) => any;
|
|
92
|
+
changed: (items: import('.').LayoutItem[]) => any;
|
|
93
|
+
resizeStart: (event: Event, item: import('.').LayoutItem) => any;
|
|
94
|
+
resizeStop: (event: Event, item: import('.').LayoutItem) => any;
|
|
95
|
+
}, string, {
|
|
96
|
+
animate: boolean;
|
|
97
|
+
modelValue: import('.').LayoutItem[];
|
|
98
|
+
draggable: boolean;
|
|
99
|
+
float: boolean;
|
|
100
|
+
column: number;
|
|
101
|
+
cellHeight: number;
|
|
102
|
+
resizable: boolean;
|
|
103
|
+
disable: boolean;
|
|
104
|
+
removable: boolean;
|
|
105
|
+
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
106
|
+
$slots: {
|
|
107
|
+
item?(_: {
|
|
108
|
+
item: import('.').LayoutItem;
|
|
109
|
+
}): any;
|
|
110
|
+
};
|
|
111
|
+
}) & {
|
|
112
|
+
install: (app: import('vue').App) => void;
|
|
113
|
+
};
|
|
114
|
+
export default DLayout;
|
|
115
|
+
export * from './src/layout.vue';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { GridStack } from 'gridstack';
|
|
2
|
+
export interface LayoutItem {
|
|
3
|
+
/** 唯一标识 */
|
|
4
|
+
id: string;
|
|
5
|
+
/** 列位置 */
|
|
6
|
+
x: number;
|
|
7
|
+
/** 行位置 */
|
|
8
|
+
y: number;
|
|
9
|
+
/** 宽度(列数) */
|
|
10
|
+
w: number;
|
|
11
|
+
/** 高度(行数) */
|
|
12
|
+
h: number;
|
|
13
|
+
/** 是否锁定,锁定后不能拖拽和调整大小 */
|
|
14
|
+
locked?: boolean;
|
|
15
|
+
/** 是否禁用调整大小 */
|
|
16
|
+
noResize?: boolean;
|
|
17
|
+
/** 是否禁用移动 */
|
|
18
|
+
noMove?: boolean;
|
|
19
|
+
/** 最小宽度 */
|
|
20
|
+
minW?: number;
|
|
21
|
+
/** 最小高度 */
|
|
22
|
+
minH?: number;
|
|
23
|
+
/** 最大宽度 */
|
|
24
|
+
maxW?: number;
|
|
25
|
+
/** 最大高度 */
|
|
26
|
+
maxH?: number;
|
|
27
|
+
/** 自定义数据 */
|
|
28
|
+
[key: string]: any;
|
|
29
|
+
}
|
|
30
|
+
export interface LayoutProps {
|
|
31
|
+
/** 布局项列表 */
|
|
32
|
+
modelValue?: LayoutItem[];
|
|
33
|
+
/** 列数,默认为 12 */
|
|
34
|
+
column?: number;
|
|
35
|
+
/** 单元格高度(像素),默认为 60 */
|
|
36
|
+
cellHeight?: number;
|
|
37
|
+
/** 是否启用拖拽,默认为 true */
|
|
38
|
+
draggable?: boolean;
|
|
39
|
+
/** 是否启用调整大小,默认为 true */
|
|
40
|
+
resizable?: boolean;
|
|
41
|
+
/** 是否启用禁用模式,禁用模式下不能拖拽和调整大小 */
|
|
42
|
+
disable?: boolean;
|
|
43
|
+
/** 是否启用动画,默认为 true */
|
|
44
|
+
animate?: boolean;
|
|
45
|
+
/** 是否启用浮动布局,默认为 false */
|
|
46
|
+
float?: boolean;
|
|
47
|
+
/** 是否启用移除功能,默认为 false */
|
|
48
|
+
removable?: boolean;
|
|
49
|
+
/** 移除按钮选择器 */
|
|
50
|
+
removableOptions?: {
|
|
51
|
+
accept?: string;
|
|
52
|
+
appendTo?: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
declare function __VLS_template(): {
|
|
56
|
+
attrs: Partial<{}>;
|
|
57
|
+
slots: {
|
|
58
|
+
item?(_: {
|
|
59
|
+
item: LayoutItem;
|
|
60
|
+
}): any;
|
|
61
|
+
};
|
|
62
|
+
refs: {
|
|
63
|
+
gridContainerRef: HTMLDivElement;
|
|
64
|
+
};
|
|
65
|
+
rootEl: HTMLDivElement;
|
|
66
|
+
};
|
|
67
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
68
|
+
declare const __VLS_component: import('vue').DefineComponent<LayoutProps, {
|
|
69
|
+
/** 添加布局项 */
|
|
70
|
+
addItem: (item: LayoutItem) => Promise<void>;
|
|
71
|
+
/** 移除布局项 */
|
|
72
|
+
removeItem: (id: string) => void;
|
|
73
|
+
/** 清空所有布局项 */
|
|
74
|
+
clear: () => void;
|
|
75
|
+
/** 获取 GridStack 实例 */
|
|
76
|
+
getGrid: () => GridStack | null;
|
|
77
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
78
|
+
dragStart: (event: Event, item: LayoutItem) => any;
|
|
79
|
+
dragStop: (event: Event, item: LayoutItem) => any;
|
|
80
|
+
"update:modelValue": (items: LayoutItem[]) => any;
|
|
81
|
+
added: (item: LayoutItem) => any;
|
|
82
|
+
removed: (item: LayoutItem) => any;
|
|
83
|
+
changed: (items: LayoutItem[]) => any;
|
|
84
|
+
resizeStart: (event: Event, item: LayoutItem) => any;
|
|
85
|
+
resizeStop: (event: Event, item: LayoutItem) => any;
|
|
86
|
+
}, string, import('vue').PublicProps, Readonly<LayoutProps> & Readonly<{
|
|
87
|
+
onDragStart?: ((event: Event, item: LayoutItem) => any) | undefined;
|
|
88
|
+
onDragStop?: ((event: Event, item: LayoutItem) => any) | undefined;
|
|
89
|
+
"onUpdate:modelValue"?: ((items: LayoutItem[]) => any) | undefined;
|
|
90
|
+
onAdded?: ((item: LayoutItem) => any) | undefined;
|
|
91
|
+
onRemoved?: ((item: LayoutItem) => any) | undefined;
|
|
92
|
+
onChanged?: ((items: LayoutItem[]) => any) | undefined;
|
|
93
|
+
onResizeStart?: ((event: Event, item: LayoutItem) => any) | undefined;
|
|
94
|
+
onResizeStop?: ((event: Event, item: LayoutItem) => any) | undefined;
|
|
95
|
+
}>, {
|
|
96
|
+
animate: boolean;
|
|
97
|
+
modelValue: LayoutItem[];
|
|
98
|
+
draggable: boolean;
|
|
99
|
+
float: boolean;
|
|
100
|
+
column: number;
|
|
101
|
+
cellHeight: number;
|
|
102
|
+
resizable: boolean;
|
|
103
|
+
disable: boolean;
|
|
104
|
+
removable: boolean;
|
|
105
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
106
|
+
gridContainerRef: HTMLDivElement;
|
|
107
|
+
}, HTMLDivElement>;
|
|
108
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
109
|
+
export default _default;
|
|
110
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
111
|
+
new (): {
|
|
112
|
+
$slots: S;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { App, Component } from 'vue';
|
|
2
|
+
export declare const withInstall: <T extends Component>(component: T, extra?: Component[]) => T & {
|
|
3
|
+
install: (app: App) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare const buildShortUUID: (prefix?: string) => string;
|
|
6
|
+
export declare const deepClone: (obj: any) => any;
|
|
7
|
+
export declare const clearData: (data: any) => void;
|