@a2simcode/ui 0.0.23 → 0.0.25
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/comp/index.d.ts +3 -1
- package/dist/components/comp/src/comp.vue.d.ts +3 -1
- package/dist/components/inject-provide.d.ts +18 -0
- package/dist/components/page/index.d.ts +15 -0
- package/dist/components/page/src/page.vue.d.ts +5 -0
- package/dist/components/workflow-viewer/index.d.ts +3 -3
- package/dist/components/workflow-viewer/src/workflow-viewer.vue.d.ts +10 -2
- package/dist/core/utils/eventBus.d.ts +38 -0
- package/dist/core/utils/index.d.ts +1 -0
- package/dist/simcode-ui.es.js +6621 -7955
- package/dist/simcode-ui.umd.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +1 -1
|
@@ -52,7 +52,9 @@ declare const JComp: {
|
|
|
52
52
|
getCompConfig: Function;
|
|
53
53
|
row: Record<string, any>;
|
|
54
54
|
isTableCell: boolean;
|
|
55
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
55
|
+
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
56
|
+
compRef: unknown;
|
|
57
|
+
}, any, import('vue').ComponentProvideOptions, {
|
|
56
58
|
P: {};
|
|
57
59
|
B: {};
|
|
58
60
|
D: {};
|
|
@@ -146,5 +146,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
146
146
|
getCompConfig: Function;
|
|
147
147
|
row: Record<string, any>;
|
|
148
148
|
isTableCell: boolean;
|
|
149
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
149
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
150
|
+
compRef: unknown;
|
|
151
|
+
}, any>;
|
|
150
152
|
export default _default;
|
|
@@ -17,6 +17,8 @@ export declare const INJECT_KEYS: {
|
|
|
17
17
|
readonly AUTH_PAGE_PROVIDE: "jcode_auth_page_provide";
|
|
18
18
|
/** 层级相关注入 */
|
|
19
19
|
readonly LAYER_PROVIDE: "jcode_layer_provide";
|
|
20
|
+
/** 页面相关注入 */
|
|
21
|
+
readonly PAGE_PROVIDE: "jcode_page_provide";
|
|
20
22
|
};
|
|
21
23
|
/**
|
|
22
24
|
* 应用提供者类型
|
|
@@ -93,6 +95,14 @@ export interface AuthPageProvideType {
|
|
|
93
95
|
export interface LayerProvideType {
|
|
94
96
|
stepActive: any;
|
|
95
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* 页面提供者类型
|
|
100
|
+
*/
|
|
101
|
+
export interface PageProvideType {
|
|
102
|
+
/** 注册方法到事件总线 */
|
|
103
|
+
registerMethod: (id: string, method: string, handler: (...args: any[]) => void) => () => void;
|
|
104
|
+
[key: string]: any;
|
|
105
|
+
}
|
|
96
106
|
/**
|
|
97
107
|
* 统一的 inject 方法
|
|
98
108
|
*/
|
|
@@ -157,3 +167,11 @@ export declare function useLayerInject(): LayerProvideType;
|
|
|
157
167
|
* 层级相关提供
|
|
158
168
|
*/
|
|
159
169
|
export declare function useLayerProvide(value: LayerProvideType): void;
|
|
170
|
+
/**
|
|
171
|
+
* 页面相关注入
|
|
172
|
+
*/
|
|
173
|
+
export declare function usePageInject(): PageProvideType;
|
|
174
|
+
/**
|
|
175
|
+
* 页面相关提供
|
|
176
|
+
*/
|
|
177
|
+
export declare function usePageProvide(value: PageProvideType): void;
|
|
@@ -14,6 +14,11 @@ export declare const JPage: {
|
|
|
14
14
|
};
|
|
15
15
|
}>> & Readonly<{}>, {
|
|
16
16
|
init: (schema: import('..').PageSchemaConfig[]) => void;
|
|
17
|
+
call: (id: string, method: string, options: {
|
|
18
|
+
immediate?: boolean;
|
|
19
|
+
} | null, ...args: any[]) => void;
|
|
20
|
+
on: (id: string, method: string, handler: (...args: any[]) => void) => void;
|
|
21
|
+
off: (id: string, method: string, handler?: (...args: any[]) => void) => void;
|
|
17
22
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
18
23
|
actions: Record<string, any>;
|
|
19
24
|
noPadding: boolean;
|
|
@@ -40,6 +45,11 @@ export declare const JPage: {
|
|
|
40
45
|
};
|
|
41
46
|
}>> & Readonly<{}>, {
|
|
42
47
|
init: (schema: import('..').PageSchemaConfig[]) => void;
|
|
48
|
+
call: (id: string, method: string, options: {
|
|
49
|
+
immediate?: boolean;
|
|
50
|
+
} | null, ...args: any[]) => void;
|
|
51
|
+
on: (id: string, method: string, handler: (...args: any[]) => void) => void;
|
|
52
|
+
off: (id: string, method: string, handler?: (...args: any[]) => void) => void;
|
|
43
53
|
}, {}, {}, {}, {
|
|
44
54
|
actions: Record<string, any>;
|
|
45
55
|
noPadding: boolean;
|
|
@@ -63,6 +73,11 @@ export declare const JPage: {
|
|
|
63
73
|
};
|
|
64
74
|
}>> & Readonly<{}>, {
|
|
65
75
|
init: (schema: import('..').PageSchemaConfig[]) => void;
|
|
76
|
+
call: (id: string, method: string, options: {
|
|
77
|
+
immediate?: boolean;
|
|
78
|
+
} | null, ...args: any[]) => void;
|
|
79
|
+
on: (id: string, method: string, handler: (...args: any[]) => void) => void;
|
|
80
|
+
off: (id: string, method: string, handler?: (...args: any[]) => void) => void;
|
|
66
81
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
67
82
|
actions: Record<string, any>;
|
|
68
83
|
noPadding: boolean;
|
|
@@ -24,6 +24,11 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
24
24
|
};
|
|
25
25
|
}>, {
|
|
26
26
|
init: (schema: PageSchemaConfig[]) => void;
|
|
27
|
+
call: (id: string, method: string, options: {
|
|
28
|
+
immediate?: boolean;
|
|
29
|
+
} | null, ...args: any[]) => void;
|
|
30
|
+
on: (id: string, method: string, handler: (...args: any[]) => void) => void;
|
|
31
|
+
off: (id: string, method: string, handler?: (...args: any[]) => void) => void;
|
|
27
32
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
28
33
|
/**
|
|
29
34
|
* @zh 模版
|
|
@@ -12,7 +12,7 @@ declare const _JWorkflowViewer: {
|
|
|
12
12
|
elementDblclick: (ev: Record<string, any>) => any;
|
|
13
13
|
elementClick: (ev: Record<string, any>) => any;
|
|
14
14
|
}, import('vue').PublicProps, {
|
|
15
|
-
paletteOptions:
|
|
15
|
+
paletteOptions: import('./src/workflow-viewer.vue').PaletteOptions;
|
|
16
16
|
lineStroke: string;
|
|
17
17
|
}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
|
|
18
18
|
containerRef: HTMLDivElement;
|
|
@@ -33,7 +33,7 @@ declare const _JWorkflowViewer: {
|
|
|
33
33
|
setData: (data: Record<string, any>[]) => void;
|
|
34
34
|
updateElemet: (data: Record<string, any>) => void;
|
|
35
35
|
}, {}, {}, {}, {
|
|
36
|
-
paletteOptions:
|
|
36
|
+
paletteOptions: import('./src/workflow-viewer.vue').PaletteOptions;
|
|
37
37
|
lineStroke: string;
|
|
38
38
|
}>;
|
|
39
39
|
__isFragment?: never;
|
|
@@ -52,7 +52,7 @@ declare const _JWorkflowViewer: {
|
|
|
52
52
|
elementDblclick: (ev: Record<string, any>) => any;
|
|
53
53
|
elementClick: (ev: Record<string, any>) => any;
|
|
54
54
|
}, string, {
|
|
55
|
-
paletteOptions:
|
|
55
|
+
paletteOptions: import('./src/workflow-viewer.vue').PaletteOptions;
|
|
56
56
|
lineStroke: string;
|
|
57
57
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
|
|
58
58
|
install: (app: import('vue').App) => void;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
+
export interface PaletteItem {
|
|
2
|
+
className: string;
|
|
3
|
+
type: string;
|
|
4
|
+
group: string;
|
|
5
|
+
title: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export type PaletteOptions = Record<string, PaletteItem>;
|
|
1
9
|
export interface WorkflowViewerProps {
|
|
2
10
|
/** 配置 */
|
|
3
|
-
paletteOptions?:
|
|
11
|
+
paletteOptions?: PaletteOptions;
|
|
4
12
|
/** 线条颜色 */
|
|
5
13
|
lineStroke?: string;
|
|
6
14
|
}
|
|
@@ -17,7 +25,7 @@ declare const _default: import('vue').DefineComponent<WorkflowViewerProps, {
|
|
|
17
25
|
onElementDblclick?: ((ev: Record<string, any>) => any) | undefined;
|
|
18
26
|
onElementClick?: ((ev: Record<string, any>) => any) | undefined;
|
|
19
27
|
}>, {
|
|
20
|
-
paletteOptions:
|
|
28
|
+
paletteOptions: PaletteOptions;
|
|
21
29
|
lineStroke: string;
|
|
22
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
31
|
containerRef: HTMLDivElement;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 简单的事件总线实现
|
|
3
|
+
* 用于组件间通信
|
|
4
|
+
*/
|
|
5
|
+
type EventHandler = (...args: any[]) => void;
|
|
6
|
+
declare class EventBus {
|
|
7
|
+
private events;
|
|
8
|
+
/**
|
|
9
|
+
* 监听事件
|
|
10
|
+
* @param event 事件名称
|
|
11
|
+
* @param handler 事件处理函数
|
|
12
|
+
*/
|
|
13
|
+
on(event: string, handler: EventHandler): void;
|
|
14
|
+
/**
|
|
15
|
+
* 监听一次性事件
|
|
16
|
+
* @param event 事件名称
|
|
17
|
+
* @param handler 事件处理函数
|
|
18
|
+
*/
|
|
19
|
+
once(event: string, handler: EventHandler): void;
|
|
20
|
+
/**
|
|
21
|
+
* 触发事件
|
|
22
|
+
* @param event 事件名称
|
|
23
|
+
* @param args 事件参数
|
|
24
|
+
*/
|
|
25
|
+
emit(event: string, ...args: any[]): void;
|
|
26
|
+
/**
|
|
27
|
+
* 移除事件监听
|
|
28
|
+
* @param event 事件名称
|
|
29
|
+
* @param handler 事件处理函数(可选,不传则移除该事件所有监听)
|
|
30
|
+
*/
|
|
31
|
+
off(event: string, handler?: EventHandler): void;
|
|
32
|
+
/**
|
|
33
|
+
* 清除所有事件监听
|
|
34
|
+
*/
|
|
35
|
+
clear(): void;
|
|
36
|
+
}
|
|
37
|
+
export declare const eventBus: EventBus;
|
|
38
|
+
export { EventBus };
|