@kengic/vue 0.26.5 → 0.26.6-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/kengic-vue.js +1740 -1658
- package/dist/src/components/KgCanvas/KgCanvas.ContextMenu.d.ts +3 -0
- package/dist/src/components/KgCanvas/KgCanvas.service.d.ts +1 -0
- package/dist/src/components/KgCanvas/index.hooks.d.ts +19 -1
- package/dist/src/components/KgCanvas/index.store.d.ts +60 -22
- package/dist/src/components/KgVar/index.hooks.d.ts +8 -0
- package/package.json +1 -1
@@ -26,6 +26,7 @@ export declare type IKgCanvasContextMenu = {
|
|
26
26
|
name?: string;
|
27
27
|
};
|
28
28
|
export declare const getProps: () => {
|
29
|
+
eid: PropType<string>;
|
29
30
|
kgElement: PropType<Q.Element<any>>;
|
30
31
|
kgElementUI: PropType<Q.ElementUI>;
|
31
32
|
kgGraph: PropType<Q.Graph>;
|
@@ -51,6 +52,7 @@ export declare const getProps: () => {
|
|
51
52
|
};
|
52
53
|
export declare type KgCanvasContextMenuProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
53
54
|
declare const _default: import("vue").DefineComponent<{
|
55
|
+
eid: PropType<string>;
|
54
56
|
kgElement: PropType<Q.Element<any>>;
|
55
57
|
kgElementUI: PropType<Q.ElementUI>;
|
56
58
|
kgGraph: PropType<Q.Graph>;
|
@@ -74,6 +76,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
74
76
|
kgUi: PropType<Q.BaseUI>;
|
75
77
|
'onUpdate:kgIsVisible': PropType<(value: boolean) => void>;
|
76
78
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:kgIsVisible"[], "update:kgIsVisible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
79
|
+
eid: PropType<string>;
|
77
80
|
kgElement: PropType<Q.Element<any>>;
|
78
81
|
kgElementUI: PropType<Q.ElementUI>;
|
79
82
|
kgGraph: PropType<Q.Graph>;
|
@@ -29,6 +29,7 @@ export declare function _useGlobalContextMenus(param: {
|
|
29
29
|
}): IUseGlobalContextMenus;
|
30
30
|
export declare type IUseResizeObserver = {};
|
31
31
|
export declare function _useResizeObserver(param: {
|
32
|
+
eid: string;
|
32
33
|
graph: () => Q.Graph | null;
|
33
34
|
kgCanvasContextMenuProps: Ref<KgCanvasContextMenuProps>;
|
34
35
|
kgCanvasRef: Ref<HTMLDivElement | null>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { IRemoveEventListenerHandler } from '../../consts';
|
2
|
-
import { IKgCanvasOnClickEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnRightClickEventListener, IKgCanvasStore } from './index.store';
|
2
|
+
import { IKgCanvasOnClickEventListener, IKgCanvasOnContextMenuCloseEventListener, IKgCanvasOnContextMenuOpenEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnResizeEventListener, IKgCanvasOnRightClickEventListener, IKgCanvasStore } from './index.store';
|
3
3
|
export declare type IUseKgCanvas = {
|
4
4
|
/**
|
5
5
|
* 监听事件: 单击鼠标左键.
|
@@ -7,6 +7,18 @@ export declare type IUseKgCanvas = {
|
|
7
7
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
8
8
|
*/
|
9
9
|
onClick(listener: IKgCanvasOnClickEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
10
|
+
/**
|
11
|
+
* 监听事件: 右键菜单关闭.
|
12
|
+
* @param listener 事件监听函数.
|
13
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
14
|
+
*/
|
15
|
+
onContextMenuClose(listener: IKgCanvasOnContextMenuCloseEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
16
|
+
/**
|
17
|
+
* 监听事件: 右键菜单打开.
|
18
|
+
* @param listener 事件监听函数.
|
19
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
20
|
+
*/
|
21
|
+
onContextMenuOpen(listener: IKgCanvasOnContextMenuOpenEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
10
22
|
/**
|
11
23
|
* 监听事件: 图形组件初始完成.
|
12
24
|
* @param listener 事件监听函数.
|
@@ -37,6 +49,12 @@ export declare type IUseKgCanvas = {
|
|
37
49
|
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
38
50
|
*/
|
39
51
|
onReload(listener: IKgCanvasOnReloadEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
52
|
+
/**
|
53
|
+
* 监听事件: 尺寸变化.
|
54
|
+
* @param listener 事件监听函数.
|
55
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
56
|
+
*/
|
57
|
+
onResize(listener: IKgCanvasOnResizeEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
40
58
|
/**
|
41
59
|
* 监听事件: 单击鼠标右键.
|
42
60
|
* @param listener 事件监听函数.
|
@@ -5,15 +5,18 @@ import { IKgEventListener } from '../../consts';
|
|
5
5
|
import { type IKgCanvasContextMenu } from './KgCanvas.ContextMenu';
|
6
6
|
/**
|
7
7
|
* 事件类型.
|
8
|
-
* 'onInit':
|
9
|
-
* 'onReload':
|
10
|
-
* '
|
11
|
-
* '
|
12
|
-
* '
|
13
|
-
* '
|
14
|
-
* '
|
8
|
+
* 'onInit': 图形组件初始完成
|
9
|
+
* 'onReload': 重新加载
|
10
|
+
* 'onResize': 尺寸变化
|
11
|
+
* 'onMouseMove': 鼠标移动
|
12
|
+
* 'onMouseEnter': 鼠标进入
|
13
|
+
* 'onMouseLeave': 鼠标离开
|
14
|
+
* 'onClick': 单击鼠标左键
|
15
|
+
* 'onRightClick': 单击鼠标右键
|
16
|
+
* 'onContextMenuOpen': 右键菜单打开
|
17
|
+
* 'onContextMenuClose': 右键菜单关闭
|
15
18
|
*/
|
16
|
-
export declare type IKgCanvasEvent = 'onInit' | 'onReload' | 'onMouseMove' | 'onMouseEnter' | 'onMouseLeave' | 'onClick' | 'onRightClick';
|
19
|
+
export declare type IKgCanvasEvent = 'onInit' | 'onReload' | 'onResize' | 'onMouseMove' | 'onMouseEnter' | 'onMouseLeave' | 'onClick' | 'onRightClick' | 'onContextMenuOpen' | 'onContextMenuClose';
|
17
20
|
export declare type IKgCanvasOnInitEventListenerParameter = {
|
18
21
|
/**
|
19
22
|
* Q.
|
@@ -26,6 +29,38 @@ export declare type IKgCanvasOnInitEventListenerParameter = {
|
|
26
29
|
eid: string;
|
27
30
|
};
|
28
31
|
export declare type IKgCanvasOnInitEventListener = ((param: IKgCanvasOnInitEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
32
|
+
export declare type IKgCanvasOnReloadEventListenerParameter = {
|
33
|
+
/**
|
34
|
+
* Q.
|
35
|
+
*/
|
36
|
+
Q: typeof Q;
|
37
|
+
eid: string;
|
38
|
+
/**
|
39
|
+
* 图形组件对象.
|
40
|
+
*/
|
41
|
+
graph: Q.Graph;
|
42
|
+
};
|
43
|
+
export declare type IKgCanvasOnReloadEventListener = ((param: IKgCanvasOnReloadEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
44
|
+
export declare type IKgCanvasOnResizeEventListenerParameter = {
|
45
|
+
/**
|
46
|
+
* Q.
|
47
|
+
*/
|
48
|
+
Q: typeof Q;
|
49
|
+
eid: string;
|
50
|
+
/**
|
51
|
+
* 图形组件对象.
|
52
|
+
*/
|
53
|
+
graph: Q.Graph;
|
54
|
+
/**
|
55
|
+
* 当前高度.
|
56
|
+
*/
|
57
|
+
height: number;
|
58
|
+
/**
|
59
|
+
* 当前宽度.
|
60
|
+
*/
|
61
|
+
width: number;
|
62
|
+
};
|
63
|
+
export declare type IKgCanvasOnResizeEventListener = ((param: IKgCanvasOnResizeEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
29
64
|
export declare type IKgCanvasOnRightClickEventListenerParameter = {
|
30
65
|
/**
|
31
66
|
* Q.
|
@@ -45,6 +80,10 @@ export declare type IKgCanvasOnRightClickEventListenerParameter = {
|
|
45
80
|
* 图元组件.
|
46
81
|
*/
|
47
82
|
elementUI?: Q.ElementUI;
|
83
|
+
/**
|
84
|
+
* 鼠标事件.
|
85
|
+
*/
|
86
|
+
event: MouseEvent;
|
48
87
|
/**
|
49
88
|
* 图形组件对象.
|
50
89
|
*/
|
@@ -55,18 +94,6 @@ export declare type IKgCanvasOnRightClickEventListenerParameter = {
|
|
55
94
|
ui?: Q.BaseUI;
|
56
95
|
};
|
57
96
|
export declare type IKgCanvasOnRightClickEventListener = ((param: IKgCanvasOnRightClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
58
|
-
export declare type IKgCanvasOnReloadEventListenerParameter = {
|
59
|
-
/**
|
60
|
-
* Q.
|
61
|
-
*/
|
62
|
-
Q: typeof Q;
|
63
|
-
eid: string;
|
64
|
-
/**
|
65
|
-
* 图形组件对象.
|
66
|
-
*/
|
67
|
-
graph: Q.Graph;
|
68
|
-
};
|
69
|
-
export declare type IKgCanvasOnReloadEventListener = ((param: IKgCanvasOnReloadEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
70
97
|
export declare type IKgCanvasOnMouseMoveEventListenerParameter = {
|
71
98
|
/**
|
72
99
|
* Q.
|
@@ -163,15 +190,26 @@ export declare type IKgCanvasOnClickEventListenerParameter = {
|
|
163
190
|
ui?: Q.BaseUI;
|
164
191
|
};
|
165
192
|
export declare type IKgCanvasOnClickEventListener = ((param: IKgCanvasOnClickEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
166
|
-
export declare type
|
167
|
-
|
193
|
+
export declare type IKgCanvasOnContextMenuOpenEventListenerParameter = {
|
194
|
+
eid: string;
|
195
|
+
};
|
196
|
+
export declare type IKgCanvasOnContextMenuOpenEventListener = ((param: IKgCanvasOnContextMenuOpenEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
197
|
+
export declare type IKgCanvasOnContextMenuCloseEventListenerParameter = {
|
198
|
+
eid: string;
|
199
|
+
};
|
200
|
+
export declare type IKgCanvasOnContextMenuCloseEventListener = ((param: IKgCanvasOnContextMenuCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
201
|
+
export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter | IKgCanvasOnReloadEventListenerParameter | IKgCanvasOnResizeEventListenerParameter | IKgCanvasOnRightClickEventListenerParameter | IKgCanvasOnMouseMoveEventListenerParameter | IKgCanvasOnMouseEnterEventListenerParameter | IKgCanvasOnMouseLeaveEventListenerParameter | IKgCanvasOnClickEventListenerParameter | IKgCanvasOnContextMenuOpenEventListenerParameter | IKgCanvasOnContextMenuCloseEventListenerParameter;
|
202
|
+
export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener | IKgCanvasOnReloadEventListener | IKgCanvasOnResizeEventListener | IKgCanvasOnRightClickEventListener | IKgCanvasOnMouseMoveEventListener | IKgCanvasOnMouseEnterEventListener | IKgCanvasOnMouseLeaveEventListener | IKgCanvasOnClickEventListener | IKgCanvasOnContextMenuOpenEventListener | IKgCanvasOnContextMenuCloseEventListener;
|
168
203
|
export interface IUseKgCanvasStoreState {
|
169
204
|
onClickEventListenerMap: Map<string, Array<IKgCanvasOnClickEventListener>>;
|
205
|
+
onContextMenuCloseEventListenerMap: Map<string, Array<IKgCanvasOnContextMenuCloseEventListener>>;
|
206
|
+
onContextMenuOpenEventListenerMap: Map<string, Array<IKgCanvasOnContextMenuOpenEventListener>>;
|
170
207
|
onInitEventListenerMap: Map<string, Array<IKgCanvasOnInitEventListener>>;
|
171
208
|
onMouseEnterEventListenerMap: Map<string, Array<IKgCanvasOnMouseEnterEventListener>>;
|
172
209
|
onMouseLeaveEventListenerMap: Map<string, Array<IKgCanvasOnMouseLeaveEventListener>>;
|
173
210
|
onMouseMoveEventListenerMap: Map<string, Array<IKgCanvasOnMouseMoveEventListener>>;
|
174
211
|
onReloadEventListenerMap: Map<string, Array<IKgCanvasOnReloadEventListener>>;
|
212
|
+
onResizeEventListenerMap: Map<string, Array<IKgCanvasOnResizeEventListener>>;
|
175
213
|
onRightClickEventListenerMap: Map<string, Array<IKgCanvasOnRightClickEventListener>>;
|
176
214
|
}
|
177
215
|
export interface IUseKgCanvasStoreGetters {
|
@@ -69,6 +69,14 @@ export declare type IUseKgVar = {
|
|
69
69
|
buttonVarName?: string | null;
|
70
70
|
varName: string | null | undefined;
|
71
71
|
}): ReturnType<IKgVarStore['getVarConfigControl']>;
|
72
|
+
/**
|
73
|
+
* 获取「变量配置:列表数据」.
|
74
|
+
*
|
75
|
+
* @param param.varName 变量名称.
|
76
|
+
*/
|
77
|
+
getVarConfigPossibility(param: {
|
78
|
+
varName: string;
|
79
|
+
}): VarConfigPossibility | null;
|
72
80
|
/**
|
73
81
|
* 是否正在复制.
|
74
82
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.26.
|
3
|
+
"version": "0.26.6-beta.1",
|
4
4
|
"scripts": {
|
5
5
|
"build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
|
6
6
|
"build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",
|