@scvzerng/snakerflow-designer-vue2 3.0.54
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 +201 -0
- package/README.md +618 -0
- package/dist/SnakerflowDesigner.es.js +31310 -0
- package/dist/SnakerflowDesigner.umd.js +105 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.html +17 -0
- package/dist/style.css +1 -0
- package/dist/types/SnakerFlowDesigner/index.d.ts +2 -0
- package/dist/types/SnakerFlowDesigner/src/Control/DataDetail.vue.d.ts +5 -0
- package/dist/types/SnakerFlowDesigner/src/Control/HighLightData.vue.d.ts +6 -0
- package/dist/types/SnakerFlowDesigner/src/Control/ImportData.vue.d.ts +7 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/CustomAttributeRender.d.ts +27 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/custom.vue.d.ts +23077 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/decision.vue.d.ts +16493 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/end.vue.d.ts +9909 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/fork.vue.d.ts +3325 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/index.d.ts +2 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/index.vue.d.ts +36 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/join.vue.d.ts +3325 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/process.vue.d.ts +23077 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/start.vue.d.ts +9909 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/subProcess.vue.d.ts +23077 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/transition.vue.d.ts +9909 -0
- package/dist/types/SnakerFlowDesigner/src/PropertySetting/wfSubProcess.vue.d.ts +19785 -0
- package/dist/types/SnakerFlowDesigner/src/SnakerFlowDesigner.vue.d.ts +180 -0
- package/dist/types/SnakerFlowDesigner/src/data.d.ts +15 -0
- package/dist/types/SnakerFlowDesigner/src/enums.d.ts +23 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/custom/index.d.ts +30 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/decision/index.d.ts +22 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/end/index.d.ts +25 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/fork/index.d.ts +22 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/index.d.ts +17 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/join/index.d.ts +22 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/start/index.d.ts +23 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/subProcess/index.d.ts +22 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/task/VueNode.vue.d.ts +6 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/task/html.d.ts +21 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/task/index.d.ts +26 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/tool.d.ts +58 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/transition/index.d.ts +20 -0
- package/dist/types/SnakerFlowDesigner/src/snakerflow/wfSubProcess/index.d.ts +26 -0
- package/dist/types/SnakerFlowDesigner/src/vModel.d.ts +12 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +81 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import LogicFlow from '@logicflow/core';
|
|
2
|
+
import '@logicflow/core/dist/index.css';
|
|
3
|
+
import '@logicflow/extension/lib/index.css';
|
|
4
|
+
import { PropType } from 'vue';
|
|
5
|
+
import type { WfConfig, HigLightDataType } from './types';
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
|
|
9
|
+
refs: {
|
|
10
|
+
lfElRef: HTMLDivElement;
|
|
11
|
+
propertSettingRef: (import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
extendAttrConfig: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
};
|
|
15
|
+
extendPropertyKeys: {
|
|
16
|
+
type: ArrayConstructor;
|
|
17
|
+
};
|
|
18
|
+
}>>, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
extendAttrConfig: {
|
|
20
|
+
type: ObjectConstructor;
|
|
21
|
+
};
|
|
22
|
+
extendPropertyKeys: {
|
|
23
|
+
type: ArrayConstructor;
|
|
24
|
+
};
|
|
25
|
+
}>>, {
|
|
26
|
+
change: (...args: any[]) => void;
|
|
27
|
+
}, {}, true, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue").ExtractPropTypes<{
|
|
28
|
+
extendAttrConfig: {
|
|
29
|
+
type: ObjectConstructor;
|
|
30
|
+
};
|
|
31
|
+
extendPropertyKeys: {
|
|
32
|
+
type: ArrayConstructor;
|
|
33
|
+
};
|
|
34
|
+
}>>> & import("vue").ShallowUnwrapRef<{
|
|
35
|
+
show: (args: import("./types").FlowFormModel) => void;
|
|
36
|
+
}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue").ComponentCustomProperties & Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
extendAttrConfig: {
|
|
38
|
+
type: ObjectConstructor;
|
|
39
|
+
};
|
|
40
|
+
extendPropertyKeys: {
|
|
41
|
+
type: ArrayConstructor;
|
|
42
|
+
};
|
|
43
|
+
}>> & {
|
|
44
|
+
$scopedSlots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
|
|
45
|
+
}) | null;
|
|
46
|
+
dataDetailRef: (import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue").ExtractPropTypes<{}>>, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}, true, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue").ExtractPropTypes<{}>>> & import("vue").ShallowUnwrapRef<{
|
|
47
|
+
show: (data: any) => void;
|
|
48
|
+
}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue").ComponentCustomProperties & Readonly<import("vue").ExtractPropTypes<{}>>) | null;
|
|
49
|
+
importDataRef: (import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue").ExtractPropTypes<{}>>, Readonly<import("vue").ExtractPropTypes<{}>>, {
|
|
50
|
+
"on-submit": (...args: any[]) => void;
|
|
51
|
+
}, {}, true, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue").ExtractPropTypes<{}>>> & import("vue").ShallowUnwrapRef<{
|
|
52
|
+
show: () => void;
|
|
53
|
+
refresh: () => void;
|
|
54
|
+
}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue").ComponentCustomProperties & Readonly<import("vue").ExtractPropTypes<{}>>) | null;
|
|
55
|
+
highLightDataRef: (import("vue/types/v3-component-public-instance").Vue3Instance<{}, Readonly<import("vue").ExtractPropTypes<{}>>, Readonly<import("vue").ExtractPropTypes<{}>>, {
|
|
56
|
+
"on-submit": (...args: any[]) => void;
|
|
57
|
+
}, {}, true, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>> & Readonly<Readonly<import("vue").ExtractPropTypes<{}>>> & import("vue").ShallowUnwrapRef<{
|
|
58
|
+
show: () => void;
|
|
59
|
+
}> & import("vue/types/v3-component-options").ExtractComputedReturns<{}> & import("vue").ComponentCustomProperties & Readonly<import("vue").ExtractPropTypes<{}>>) | null;
|
|
60
|
+
};
|
|
61
|
+
rootEl: HTMLDivElement;
|
|
62
|
+
};
|
|
63
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
64
|
+
declare const __VLS_component: import("vue").DefineComponent<{
|
|
65
|
+
value: {
|
|
66
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
67
|
+
};
|
|
68
|
+
config: {
|
|
69
|
+
type: ObjectConstructor;
|
|
70
|
+
default(): {
|
|
71
|
+
grid: boolean;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
highLight: {
|
|
75
|
+
type: PropType<HigLightDataType>;
|
|
76
|
+
default(): {};
|
|
77
|
+
};
|
|
78
|
+
assigneeText: {
|
|
79
|
+
type: (ObjectConstructor | ArrayConstructor)[];
|
|
80
|
+
default(): {};
|
|
81
|
+
};
|
|
82
|
+
viewer: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: boolean;
|
|
85
|
+
};
|
|
86
|
+
extendAttrConfig: {
|
|
87
|
+
type: ObjectConstructor;
|
|
88
|
+
};
|
|
89
|
+
showDoc: {
|
|
90
|
+
type: BooleanConstructor;
|
|
91
|
+
default: boolean;
|
|
92
|
+
};
|
|
93
|
+
extendPropertyKeys: {
|
|
94
|
+
type: ArrayConstructor;
|
|
95
|
+
};
|
|
96
|
+
wfConfig: {
|
|
97
|
+
type: PropType<WfConfig>;
|
|
98
|
+
default(): WfConfig;
|
|
99
|
+
};
|
|
100
|
+
nodeRenderType: {
|
|
101
|
+
type: PropType<"svg" | "html">;
|
|
102
|
+
default: string;
|
|
103
|
+
};
|
|
104
|
+
taskNodeRender: {
|
|
105
|
+
type: FunctionConstructor;
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
getGraphData: () => unknown;
|
|
109
|
+
refreshImport: () => any;
|
|
110
|
+
importJson: (data: any) => void;
|
|
111
|
+
importXml: (xml: any) => void;
|
|
112
|
+
setHighLight: (data: HigLightDataType) => void;
|
|
113
|
+
setAssigneeText: (data: any, kvConfig?: {
|
|
114
|
+
valueKey: string;
|
|
115
|
+
labelKey: string;
|
|
116
|
+
}) => void;
|
|
117
|
+
getLfInstance: () => LogicFlow | null;
|
|
118
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
119
|
+
input: (...args: any[]) => void;
|
|
120
|
+
"on-save": (...args: any[]) => void;
|
|
121
|
+
"on-init": (...args: any[]) => void;
|
|
122
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{
|
|
123
|
+
value: {
|
|
124
|
+
type: (ObjectConstructor | StringConstructor)[];
|
|
125
|
+
};
|
|
126
|
+
config: {
|
|
127
|
+
type: ObjectConstructor;
|
|
128
|
+
default(): {
|
|
129
|
+
grid: boolean;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
highLight: {
|
|
133
|
+
type: PropType<HigLightDataType>;
|
|
134
|
+
default(): {};
|
|
135
|
+
};
|
|
136
|
+
assigneeText: {
|
|
137
|
+
type: (ObjectConstructor | ArrayConstructor)[];
|
|
138
|
+
default(): {};
|
|
139
|
+
};
|
|
140
|
+
viewer: {
|
|
141
|
+
type: BooleanConstructor;
|
|
142
|
+
default: boolean;
|
|
143
|
+
};
|
|
144
|
+
extendAttrConfig: {
|
|
145
|
+
type: ObjectConstructor;
|
|
146
|
+
};
|
|
147
|
+
showDoc: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
default: boolean;
|
|
150
|
+
};
|
|
151
|
+
extendPropertyKeys: {
|
|
152
|
+
type: ArrayConstructor;
|
|
153
|
+
};
|
|
154
|
+
wfConfig: {
|
|
155
|
+
type: PropType<WfConfig>;
|
|
156
|
+
default(): WfConfig;
|
|
157
|
+
};
|
|
158
|
+
nodeRenderType: {
|
|
159
|
+
type: PropType<"svg" | "html">;
|
|
160
|
+
default: string;
|
|
161
|
+
};
|
|
162
|
+
taskNodeRender: {
|
|
163
|
+
type: FunctionConstructor;
|
|
164
|
+
};
|
|
165
|
+
}>>, {
|
|
166
|
+
config: Record<string, any>;
|
|
167
|
+
wfConfig: WfConfig;
|
|
168
|
+
viewer: boolean;
|
|
169
|
+
assigneeText: unknown[] | Record<string, any>;
|
|
170
|
+
highLight: HigLightDataType;
|
|
171
|
+
showDoc: boolean;
|
|
172
|
+
nodeRenderType: "html" | "svg";
|
|
173
|
+
}>;
|
|
174
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
175
|
+
export default _default;
|
|
176
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
177
|
+
new (): {
|
|
178
|
+
$scopedSlots: S;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const patternItems: ({
|
|
2
|
+
type: string;
|
|
3
|
+
text: string;
|
|
4
|
+
label: string;
|
|
5
|
+
properties: {};
|
|
6
|
+
sort: number;
|
|
7
|
+
icon: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: string;
|
|
10
|
+
label: string;
|
|
11
|
+
properties: {};
|
|
12
|
+
sort: number;
|
|
13
|
+
icon: string;
|
|
14
|
+
text?: undefined;
|
|
15
|
+
})[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare enum NodeTypeEnum {
|
|
2
|
+
process = "process",
|
|
3
|
+
custom = "custom",
|
|
4
|
+
decision = "decision",
|
|
5
|
+
end = "end",
|
|
6
|
+
fork = "fork",
|
|
7
|
+
join = "join",
|
|
8
|
+
start = "start",
|
|
9
|
+
task = "task",
|
|
10
|
+
transition = "transition",
|
|
11
|
+
subProcess = "subProcess",
|
|
12
|
+
wfSubProcess = "wfSubProcess",
|
|
13
|
+
ignore = "ignore"
|
|
14
|
+
}
|
|
15
|
+
export declare enum ColorEnum {
|
|
16
|
+
primaryColor = "#3068EC",// 主题色
|
|
17
|
+
edgePrimaryColor = "#C9CCD4",// 主题色
|
|
18
|
+
activeColor = "#FA7E55",// 进行时节点颜色
|
|
19
|
+
rejectColor = "#F56C6C",// 审核拒绝的节点颜色
|
|
20
|
+
rollbackColor = "#909399",// 审核到该节点时被撤回时该节点的颜色
|
|
21
|
+
historyColor = "#28C7A3",// 历史节点/边颜色
|
|
22
|
+
backgroundColor = "#FFFFFF"
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { h } from '@logicflow/core';
|
|
2
|
+
import { RectResize } from '@logicflow/extension';
|
|
3
|
+
/**
|
|
4
|
+
* 自定义节点
|
|
5
|
+
*/
|
|
6
|
+
declare class CustomModel extends RectResize.model {
|
|
7
|
+
static extendKey: string;
|
|
8
|
+
setAttributes(): void;
|
|
9
|
+
getNodeStyle(): {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
radius?: number;
|
|
14
|
+
fill?: string;
|
|
15
|
+
stroke?: string;
|
|
16
|
+
strokeWidth?: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
declare class CustomView extends RectResize.view {
|
|
20
|
+
static extendKey: string;
|
|
21
|
+
getLabelShape(): h.JSX.Element;
|
|
22
|
+
getResizeShape(): h.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
declare const Custom: {
|
|
25
|
+
type: string;
|
|
26
|
+
view: typeof CustomView;
|
|
27
|
+
model: typeof CustomModel;
|
|
28
|
+
};
|
|
29
|
+
export { CustomView, CustomModel };
|
|
30
|
+
export default Custom;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PolygonNode, PolygonNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class DecisionModel extends PolygonNodeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getNodeStyle(): {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare class DecisionView extends PolygonNode {
|
|
13
|
+
static extendKey: string;
|
|
14
|
+
getShape(): any;
|
|
15
|
+
}
|
|
16
|
+
declare const Decision: {
|
|
17
|
+
type: string;
|
|
18
|
+
view: typeof DecisionView;
|
|
19
|
+
model: typeof DecisionModel;
|
|
20
|
+
};
|
|
21
|
+
export { DecisionView, DecisionModel };
|
|
22
|
+
export default Decision;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CircleNode, CircleNodeModel, Model, h } from '@logicflow/core';
|
|
2
|
+
declare class EndModel extends CircleNodeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getConnectedSourceRules(): Model.ConnectRule[];
|
|
6
|
+
getNodeStyle(): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
r?: number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare class EndView extends CircleNode {
|
|
15
|
+
static extendKey: string;
|
|
16
|
+
getAnchorStyle(): {};
|
|
17
|
+
getShape(): h.JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
declare const End: {
|
|
20
|
+
type: string;
|
|
21
|
+
view: typeof EndView;
|
|
22
|
+
model: typeof EndModel;
|
|
23
|
+
};
|
|
24
|
+
export { EndView, EndModel };
|
|
25
|
+
export default End;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { h, PolygonNode, PolygonNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class ForkModel extends PolygonNodeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getNodeStyle(): {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare class ForkView extends PolygonNode {
|
|
13
|
+
static extendKey: string;
|
|
14
|
+
getShape(): h.JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
declare const Fork: {
|
|
17
|
+
type: string;
|
|
18
|
+
view: typeof ForkView;
|
|
19
|
+
model: typeof ForkModel;
|
|
20
|
+
};
|
|
21
|
+
export { ForkView, ForkModel };
|
|
22
|
+
export default Fork;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* snakerflow组件注册
|
|
3
|
+
*/
|
|
4
|
+
declare class SnakerFlowElement {
|
|
5
|
+
static pluginName: string;
|
|
6
|
+
constructor({ lf, props }: any);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* snakerflow给你LogicFlow数据转换器
|
|
10
|
+
*/
|
|
11
|
+
declare class SnakerFlowAdapter {
|
|
12
|
+
static pluginName: string;
|
|
13
|
+
constructor({ lf }: {
|
|
14
|
+
lf: any;
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export { SnakerFlowElement, SnakerFlowAdapter };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { h, PolygonNode, PolygonNodeModel } from '@logicflow/core';
|
|
2
|
+
declare class JoinModel extends PolygonNodeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getNodeStyle(): {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
fill?: string;
|
|
8
|
+
stroke?: string;
|
|
9
|
+
strokeWidth?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare class JoinView extends PolygonNode {
|
|
13
|
+
static extendKey: string;
|
|
14
|
+
getShape(): h.JSX.Element;
|
|
15
|
+
}
|
|
16
|
+
declare const Join: {
|
|
17
|
+
type: string;
|
|
18
|
+
view: typeof JoinView;
|
|
19
|
+
model: typeof JoinModel;
|
|
20
|
+
};
|
|
21
|
+
export { JoinView, JoinModel };
|
|
22
|
+
export default Join;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CircleNode, CircleNodeModel, Model } from '@logicflow/core';
|
|
2
|
+
declare class StartModel extends CircleNodeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getConnectedTargetRules(): Model.ConnectRule[];
|
|
6
|
+
getNodeStyle(): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
r?: number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
stroke?: string;
|
|
11
|
+
strokeWidth?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
declare class StartView extends CircleNode {
|
|
15
|
+
static extendKey: string;
|
|
16
|
+
}
|
|
17
|
+
declare const Start: {
|
|
18
|
+
type: string;
|
|
19
|
+
view: typeof StartView;
|
|
20
|
+
model: typeof StartModel;
|
|
21
|
+
};
|
|
22
|
+
export { StartModel, StartView };
|
|
23
|
+
export default Start;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GroupNodeModel, GroupNode } from '@logicflow/extension';
|
|
2
|
+
declare class SubProcessView extends GroupNode {
|
|
3
|
+
}
|
|
4
|
+
declare class SubProcessModel extends GroupNodeModel {
|
|
5
|
+
initNodeData(data: any): void;
|
|
6
|
+
getNodeStyle(): {
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
radius?: number;
|
|
11
|
+
fill?: string;
|
|
12
|
+
stroke?: string;
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const SubProcess: {
|
|
17
|
+
type: string;
|
|
18
|
+
view: typeof SubProcessView;
|
|
19
|
+
model: typeof SubProcessModel;
|
|
20
|
+
};
|
|
21
|
+
export { SubProcess, SubProcessModel };
|
|
22
|
+
export default SubProcess;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
setConfig: (data: any) => void;
|
|
3
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
helpClick: (...args: any[]) => void;
|
|
5
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { HtmlResizeModel, HtmlResizeView } from '@logicflow/extension';
|
|
2
|
+
declare class TaskModel extends HtmlResizeModel {
|
|
3
|
+
setAttributes(): void;
|
|
4
|
+
}
|
|
5
|
+
declare class TaskView extends HtmlResizeView {
|
|
6
|
+
app: any;
|
|
7
|
+
isMounted: boolean;
|
|
8
|
+
r: any;
|
|
9
|
+
constructor(props: any);
|
|
10
|
+
shouldUpdate(): boolean;
|
|
11
|
+
setHtml(rootEl: SVGForeignObjectElement): void;
|
|
12
|
+
getShape(): any;
|
|
13
|
+
getText(): null;
|
|
14
|
+
}
|
|
15
|
+
declare const Task: {
|
|
16
|
+
type: string;
|
|
17
|
+
view: typeof TaskView;
|
|
18
|
+
model: typeof TaskModel;
|
|
19
|
+
};
|
|
20
|
+
export { TaskView, TaskModel };
|
|
21
|
+
export default Task;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RectResizeModel, RectResizeView } from '@logicflow/extension';
|
|
2
|
+
declare class TaskModel extends RectResizeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getNodeStyle(): {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
radius?: number;
|
|
10
|
+
fill?: string;
|
|
11
|
+
stroke?: string;
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare class TaskView extends RectResizeView {
|
|
16
|
+
static extendKey: string;
|
|
17
|
+
getLabelShape(): any;
|
|
18
|
+
getResizeShape(): any;
|
|
19
|
+
}
|
|
20
|
+
declare const Task: {
|
|
21
|
+
type: string;
|
|
22
|
+
view: typeof TaskView;
|
|
23
|
+
model: typeof TaskModel;
|
|
24
|
+
};
|
|
25
|
+
export { TaskView, TaskModel };
|
|
26
|
+
export default Task;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BaseEdgeModel, BaseNodeModel } from '@logicflow/core';
|
|
2
|
+
import { ProcessModel } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* 节点样式处理方法
|
|
5
|
+
* @param {*}} _this
|
|
6
|
+
* @param {*} style
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const nodeStyleHandle: (_this: BaseNodeModel, style: {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
r?: number;
|
|
12
|
+
fill?: string;
|
|
13
|
+
stroke?: string;
|
|
14
|
+
strokeWidth?: number;
|
|
15
|
+
}) => {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
r?: number;
|
|
18
|
+
fill?: string;
|
|
19
|
+
stroke?: string;
|
|
20
|
+
strokeWidth?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 边样式处理方法
|
|
24
|
+
* @param {*}} _this
|
|
25
|
+
* @param {*} style
|
|
26
|
+
* @returns
|
|
27
|
+
*/
|
|
28
|
+
export declare const edgeStyleHandle: (_this: BaseEdgeModel, style: {
|
|
29
|
+
[x: string]: any;
|
|
30
|
+
r?: number;
|
|
31
|
+
fill?: string;
|
|
32
|
+
stroke?: string;
|
|
33
|
+
strokeWidth?: number;
|
|
34
|
+
}) => {
|
|
35
|
+
[x: string]: any;
|
|
36
|
+
r?: number;
|
|
37
|
+
fill?: string;
|
|
38
|
+
stroke?: string;
|
|
39
|
+
strokeWidth?: number;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* 解析xml成Dom对象
|
|
43
|
+
* @param {} xml
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
export declare const parseXml2Dom: (xml: string) => any;
|
|
47
|
+
/**
|
|
48
|
+
* 将snaker的定义文件转成LogicFlow支持的数据格式
|
|
49
|
+
* @param {*} xml
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
52
|
+
export declare const snakerXml2LogicFlowJson: (xml: string) => any;
|
|
53
|
+
/**
|
|
54
|
+
* 将LogicFlow的数据转成snaker的定义文件
|
|
55
|
+
* @param {*} data(...processInfo,nodes,edges)
|
|
56
|
+
* @returns
|
|
57
|
+
*/
|
|
58
|
+
export declare const logicFlowJsonToSnakerXml: (data: ProcessModel) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PolylineEdge, PolylineEdgeModel } from '@logicflow/core';
|
|
2
|
+
declare class TransitionModel extends PolylineEdgeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
getEdgeStyle(): {
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
fill?: string;
|
|
7
|
+
stroke?: string;
|
|
8
|
+
strokeWidth?: number;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
declare class TransitionView extends PolylineEdge {
|
|
12
|
+
static extendKey: string;
|
|
13
|
+
}
|
|
14
|
+
declare const Transition: {
|
|
15
|
+
type: string;
|
|
16
|
+
view: typeof TransitionView;
|
|
17
|
+
model: typeof TransitionModel;
|
|
18
|
+
};
|
|
19
|
+
export { TransitionView, TransitionModel };
|
|
20
|
+
export default Transition;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RectResizeModel, RectResizeView } from '@logicflow/extension';
|
|
2
|
+
declare class WfSubProcessModel extends RectResizeModel {
|
|
3
|
+
static extendKey: string;
|
|
4
|
+
setAttributes(): void;
|
|
5
|
+
getNodeStyle(): {
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
radius?: number;
|
|
10
|
+
fill?: string;
|
|
11
|
+
stroke?: string;
|
|
12
|
+
strokeWidth?: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
declare class WfSubProcessView extends RectResizeView {
|
|
16
|
+
static extendKey: string;
|
|
17
|
+
getLabelShape(): any;
|
|
18
|
+
getResizeShape(): any;
|
|
19
|
+
}
|
|
20
|
+
declare const WfSubProcess: {
|
|
21
|
+
type: string;
|
|
22
|
+
view: typeof WfSubProcessView;
|
|
23
|
+
model: typeof WfSubProcessModel;
|
|
24
|
+
};
|
|
25
|
+
export { WfSubProcessView, WfSubProcessModel };
|
|
26
|
+
export default WfSubProcess;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UnwrapNestedRefs } from "vue";
|
|
2
|
+
/**
|
|
3
|
+
* vue2 翻译jsx片段时在非组件上下文中会生成this.$set 尝试设置属性导致报错 此时使用此方法绕过生成
|
|
4
|
+
* @param hostObject
|
|
5
|
+
* @param path
|
|
6
|
+
*/
|
|
7
|
+
export declare const vModel: <T>(hostObject: UnwrapNestedRefs<T>, path: string) => {
|
|
8
|
+
model: {
|
|
9
|
+
value: any;
|
|
10
|
+
callback: (newValue: any) => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scvzerng/snakerflow-designer-vue2",
|
|
3
|
+
"version": "3.0.54",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "lib/SnakerflowDesigner.es.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "vite build && vue-tsc --declaration --emitDeclarationOnly",
|
|
9
|
+
"lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
|
|
10
|
+
"lint": "run-s lint:*",
|
|
11
|
+
"format": "prettier --write src/"
|
|
12
|
+
},
|
|
13
|
+
"author": "mldong",
|
|
14
|
+
"license": "Apache License 2.0",
|
|
15
|
+
"homepage": "https://gitee.com/mldong/snakerflow-designer-vue/tree/vue3",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://gitee.com/mldong/snakerflow-designer-vue/issues"
|
|
18
|
+
},
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/types/index.d.ts",
|
|
22
|
+
"import": "./dist/SnakerflowDesigner.es.js",
|
|
23
|
+
"require": "./dist/SnakerflowDesigner.umd.js"
|
|
24
|
+
},
|
|
25
|
+
"./style": {
|
|
26
|
+
"default": "./dist/style.css"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"工作流",
|
|
31
|
+
"流程设计器",
|
|
32
|
+
"Web流程设计器",
|
|
33
|
+
"Snaker",
|
|
34
|
+
"SnakerFlow",
|
|
35
|
+
"Vue2",
|
|
36
|
+
"LogicFlow",
|
|
37
|
+
"ElementUI"
|
|
38
|
+
],
|
|
39
|
+
"files": [
|
|
40
|
+
"dist"
|
|
41
|
+
],
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@logicflow/core": "2.0.13",
|
|
44
|
+
"@logicflow/extension": "2.0.17"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"core-js": "^3.6.5",
|
|
48
|
+
"element-ui": "2.15.14",
|
|
49
|
+
"vue": "2.7.16",
|
|
50
|
+
"clipboard": "^2.0.11",
|
|
51
|
+
"lodash-unified": "^1.0.3",
|
|
52
|
+
"vue-json-pretty": "1.9.5"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"vue-router": "^3.6.5",
|
|
56
|
+
"@prettier/plugin-oxc": "0.0.4",
|
|
57
|
+
"@vitejs/plugin-vue2": "2.3.3",
|
|
58
|
+
"@vitejs/plugin-vue2-jsx": "1.1.1",
|
|
59
|
+
"@vue/babel-helper-vue-jsx-merge-props": "1.4.0",
|
|
60
|
+
"@vue/eslint-config-prettier": "10.2.0",
|
|
61
|
+
"@vue/eslint-config-typescript": "14.6.0",
|
|
62
|
+
"eslint": "9.31.0",
|
|
63
|
+
"eslint-plugin-oxlint": "1.8.0",
|
|
64
|
+
"eslint-plugin-vue": "10.3.0",
|
|
65
|
+
"oxlint": "~1.8.0",
|
|
66
|
+
"prettier": "3.6.2",
|
|
67
|
+
"sass-embedded": "1.90.0",
|
|
68
|
+
"typescript": "5.9.2",
|
|
69
|
+
"unplugin-vue-macros": "2.14.5",
|
|
70
|
+
"vite": "5.4.19",
|
|
71
|
+
"vue-tsc": "2.1.10"
|
|
72
|
+
},
|
|
73
|
+
"browserslist": [
|
|
74
|
+
"> 1%",
|
|
75
|
+
"last 2 versions",
|
|
76
|
+
"not dead"
|
|
77
|
+
],
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
}
|
|
81
|
+
}
|