@kengic/vue 0.26.5-beta.2 → 0.26.5-beta.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/kengic-vue.js +23365 -15591
- package/dist/src/components/KgCanvas/KgCanvas.d.ts +122 -0
- package/dist/src/components/KgCanvas/index.d.ts +2 -0
- package/dist/src/components/KgCanvas/index.hooks.d.ts +13 -0
- package/dist/src/components/KgCanvas/index.store.d.ts +53 -0
- package/dist/src/components/index.d.ts +2 -0
- package/package.json +2 -1
@@ -0,0 +1,122 @@
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
2
|
+
import './KgCanvas.css';
|
3
|
+
export declare const getProps: () => {
|
4
|
+
/**
|
5
|
+
* 是否启用网格背景.
|
6
|
+
*
|
7
|
+
* @default false
|
8
|
+
*/
|
9
|
+
kgIsGridBackground: {
|
10
|
+
type: PropType<boolean>;
|
11
|
+
default: boolean;
|
12
|
+
};
|
13
|
+
/**
|
14
|
+
* 是否启用预览面板.
|
15
|
+
*
|
16
|
+
* @default false
|
17
|
+
*/
|
18
|
+
kgIsEnableOverview: {
|
19
|
+
type: PropType<boolean>;
|
20
|
+
default: boolean;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* 是否可以编辑.
|
24
|
+
*
|
25
|
+
* @default false
|
26
|
+
*/
|
27
|
+
kgIsEditable: {
|
28
|
+
type: PropType<boolean>;
|
29
|
+
default: boolean;
|
30
|
+
};
|
31
|
+
/**
|
32
|
+
* 是否支持拖动大小.
|
33
|
+
*
|
34
|
+
* @default false
|
35
|
+
*/
|
36
|
+
kgIsResizable: {
|
37
|
+
type: PropType<boolean>;
|
38
|
+
default: boolean;
|
39
|
+
};
|
40
|
+
};
|
41
|
+
export declare type KgCanvasProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
|
42
|
+
declare const _default: import("vue").DefineComponent<{
|
43
|
+
/**
|
44
|
+
* 是否启用网格背景.
|
45
|
+
*
|
46
|
+
* @default false
|
47
|
+
*/
|
48
|
+
kgIsGridBackground: {
|
49
|
+
type: PropType<boolean>;
|
50
|
+
default: boolean;
|
51
|
+
};
|
52
|
+
/**
|
53
|
+
* 是否启用预览面板.
|
54
|
+
*
|
55
|
+
* @default false
|
56
|
+
*/
|
57
|
+
kgIsEnableOverview: {
|
58
|
+
type: PropType<boolean>;
|
59
|
+
default: boolean;
|
60
|
+
};
|
61
|
+
/**
|
62
|
+
* 是否可以编辑.
|
63
|
+
*
|
64
|
+
* @default false
|
65
|
+
*/
|
66
|
+
kgIsEditable: {
|
67
|
+
type: PropType<boolean>;
|
68
|
+
default: boolean;
|
69
|
+
};
|
70
|
+
/**
|
71
|
+
* 是否支持拖动大小.
|
72
|
+
*
|
73
|
+
* @default false
|
74
|
+
*/
|
75
|
+
kgIsResizable: {
|
76
|
+
type: PropType<boolean>;
|
77
|
+
default: boolean;
|
78
|
+
};
|
79
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
80
|
+
/**
|
81
|
+
* 是否启用网格背景.
|
82
|
+
*
|
83
|
+
* @default false
|
84
|
+
*/
|
85
|
+
kgIsGridBackground: {
|
86
|
+
type: PropType<boolean>;
|
87
|
+
default: boolean;
|
88
|
+
};
|
89
|
+
/**
|
90
|
+
* 是否启用预览面板.
|
91
|
+
*
|
92
|
+
* @default false
|
93
|
+
*/
|
94
|
+
kgIsEnableOverview: {
|
95
|
+
type: PropType<boolean>;
|
96
|
+
default: boolean;
|
97
|
+
};
|
98
|
+
/**
|
99
|
+
* 是否可以编辑.
|
100
|
+
*
|
101
|
+
* @default false
|
102
|
+
*/
|
103
|
+
kgIsEditable: {
|
104
|
+
type: PropType<boolean>;
|
105
|
+
default: boolean;
|
106
|
+
};
|
107
|
+
/**
|
108
|
+
* 是否支持拖动大小.
|
109
|
+
*
|
110
|
+
* @default false
|
111
|
+
*/
|
112
|
+
kgIsResizable: {
|
113
|
+
type: PropType<boolean>;
|
114
|
+
default: boolean;
|
115
|
+
};
|
116
|
+
}>>, {
|
117
|
+
kgIsGridBackground: boolean;
|
118
|
+
kgIsEnableOverview: boolean;
|
119
|
+
kgIsEditable: boolean;
|
120
|
+
kgIsResizable: boolean;
|
121
|
+
}>;
|
122
|
+
export default _default;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { IRemoveEventListenerHandler } from '../../consts';
|
2
|
+
import { IKgCanvasOnInitEventListener, IKgCanvasStore } from './index.store';
|
3
|
+
export declare type IUseKgCanvas = {
|
4
|
+
/**
|
5
|
+
* 监听事件: 初始完成.
|
6
|
+
* @param listener 事件监听函数.
|
7
|
+
* @param isOnce 是否只会触发一次. 默认为 undefined.
|
8
|
+
*/
|
9
|
+
onInit(listener: IKgCanvasOnInitEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
|
10
|
+
/** 状态数据. */
|
11
|
+
store: IKgCanvasStore;
|
12
|
+
};
|
13
|
+
export declare function useKgCanvas(): IUseKgCanvas;
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { Q } from '@thymine/xunee';
|
2
|
+
import { StoreDefinition } from 'pinia';
|
3
|
+
import { IKgEventListener } from '../../consts';
|
4
|
+
/**
|
5
|
+
* 事件类型.
|
6
|
+
* 'onInit': 初始完成
|
7
|
+
*/
|
8
|
+
export declare type IKgCanvasEvent = 'onInit';
|
9
|
+
export declare type IKgCanvasOnInitEventListenerParameter = {
|
10
|
+
/**
|
11
|
+
* Q.
|
12
|
+
*/
|
13
|
+
Q: typeof Q;
|
14
|
+
/**
|
15
|
+
* 图形组件元素标识.
|
16
|
+
*/
|
17
|
+
eid: string;
|
18
|
+
/**
|
19
|
+
* 图形组件.
|
20
|
+
*/
|
21
|
+
graph: Q.Graph;
|
22
|
+
};
|
23
|
+
export declare type IKgCanvasOnInitEventListener = ((param: IKgCanvasOnInitEventListenerParameter) => Promise<boolean>) & IKgEventListener;
|
24
|
+
export declare type IKgCanvasEventListenerParameter = IKgCanvasOnInitEventListenerParameter;
|
25
|
+
export declare type IKgCanvasEventListener = IKgCanvasOnInitEventListener;
|
26
|
+
export interface IUseKgCanvasStoreState {
|
27
|
+
onInitEventListenerMap: Map<string, Array<IKgCanvasOnInitEventListener>>;
|
28
|
+
}
|
29
|
+
export interface IUseKgCanvasStoreGetters {
|
30
|
+
}
|
31
|
+
export interface IUseKgCanvasStoreActions {
|
32
|
+
/**
|
33
|
+
* 注册事件监听.
|
34
|
+
* @param event 事件名称.
|
35
|
+
* @param listener 事件监听函数.
|
36
|
+
*/
|
37
|
+
addEventListener(event: IKgCanvasEvent, listener: IKgCanvasEventListener): void;
|
38
|
+
/**
|
39
|
+
* 触发事件.
|
40
|
+
* @param event 事件名称.
|
41
|
+
* @param param 参数.
|
42
|
+
*/
|
43
|
+
emit<T = IKgCanvasEventListenerParameter>(event: IKgCanvasEvent, param?: T | null): Promise<boolean>;
|
44
|
+
/**
|
45
|
+
* 退订事件监听.
|
46
|
+
* @param event 事件名称.
|
47
|
+
* @param listener 事件监听函数.
|
48
|
+
*/
|
49
|
+
removeEventListener(event: IKgCanvasEvent, listener?: IKgCanvasEventListener): void;
|
50
|
+
}
|
51
|
+
export declare type IUseKgCanvasStore = StoreDefinition<'KgCanvas', IUseKgCanvasStoreState, IUseKgCanvasStoreGetters, IUseKgCanvasStoreActions>;
|
52
|
+
export declare type IKgCanvasStore = ReturnType<IUseKgCanvasStore>;
|
53
|
+
export declare const useKgCanvasStore: IUseKgCanvasStore;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export * from './KgAppSelect';
|
2
|
+
export * from './KgCanvas';
|
2
3
|
export * from './KgImage';
|
3
4
|
export * from './KgLayoutHeader';
|
4
5
|
export * from './KgModal';
|
@@ -17,3 +18,4 @@ export { default as KgButton } from './KgButton';
|
|
17
18
|
export * from './KgForm';
|
18
19
|
export { default as KgForm } from './KgForm';
|
19
20
|
export * from './KgForm.Item';
|
21
|
+
export { Q } from '@thymine/xunee';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@kengic/vue",
|
3
|
-
"version": "0.26.5-beta.
|
3
|
+
"version": "0.26.5-beta.3",
|
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",
|
@@ -42,6 +42,7 @@
|
|
42
42
|
"@iconify/vue": "4.1.1",
|
43
43
|
"@kengic/pont": "1.2.15",
|
44
44
|
"@rys-fe/vite-plugin-theme": "0.8.6",
|
45
|
+
"@thymine/xunee": "0.4.9-beta.0",
|
45
46
|
"@types/crypto-js": "4.1.1",
|
46
47
|
"@types/fs-extra": "9.0.13",
|
47
48
|
"@types/inquirer": "8.2.5",
|