@kengic/vue 0.29.1-beta.8 → 0.30.0

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.
Files changed (75) hide show
  1. package/CHANGELOG.md +83 -7
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +28290 -27890
  4. package/dist/src/component/KgAppSelect/KgAppSelect.hooks.d.ts +2 -28
  5. package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +6 -12
  6. package/dist/src/component/KgButton/KgButton.hooks.d.ts +3 -144
  7. package/dist/src/component/KgButton/KgButton.store.d.ts +63 -36
  8. package/dist/src/component/KgCanvas/KgCanvas.hooks.d.ts +2 -2
  9. package/dist/src/component/KgCanvas/KgCanvas.store.d.ts +2 -6
  10. package/dist/src/component/KgForm/KgForm.hooks.d.ts +2 -2
  11. package/dist/src/component/KgForm/KgForm.store.d.ts +2 -4
  12. package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +5 -5
  13. package/dist/src/component/KgForm.Item/KgForm.Item.service.d.ts +1 -1
  14. package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +5 -5
  15. package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +7 -7
  16. package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +5 -5
  17. package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +5 -5
  18. package/dist/src/component/KgForm.Item/components/KgForm.Item.Image.d.ts +5 -11
  19. package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +5 -5
  20. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +5 -5
  21. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +5 -5
  22. package/dist/src/component/KgForm.Item/components/KgForm.Item.Link.d.ts +5 -5
  23. package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +9 -7
  24. package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +7 -7
  25. package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.service.d.ts +1 -1
  26. package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +5 -5
  27. package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +5 -5
  28. package/dist/src/component/KgForm.Item/index.d.ts +1 -1
  29. package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +2 -2
  30. package/dist/src/component/KgSearch/KgSearch.store.d.ts +8 -10
  31. package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +2 -2
  32. package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +10 -9
  33. package/dist/src/component/KgSubmit/index.d.ts +1 -1
  34. package/dist/src/component/KgTable/KgTable.event.d.ts +1 -1
  35. package/dist/src/component/KgTable/KgTable.hooks.d.ts +10 -24
  36. package/dist/src/component/KgTable/KgTable.service.d.ts +1 -1
  37. package/dist/src/component/KgTable/KgTable.store.d.ts +41 -89
  38. package/dist/src/component/KgTable/components/KgTable.BodyCell.d.ts +1 -1
  39. package/dist/src/component/KgTable/components/KgTable.HeaderCell.d.ts +1 -2
  40. package/dist/src/component/KgTable/index.d.ts +1 -1
  41. package/dist/src/component/KgVar/KgVar.d.ts +1 -1
  42. package/dist/src/component/KgVar/KgVar.hooks.d.ts +21 -30
  43. package/dist/src/component/KgVar/{KgVar.vm.d.ts → KgVar.model.d.ts} +1 -1
  44. package/dist/src/component/KgVar/KgVar.store.d.ts +61 -102
  45. package/dist/src/component/KgVar/KgVarFactory.d.ts +12 -16
  46. package/dist/src/component/KgVar/index.d.ts +1 -1
  47. package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +3 -21
  48. package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +2 -6
  49. package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +5 -4
  50. package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +2 -4
  51. package/dist/src/config/config.hooks.d.ts +3 -48
  52. package/dist/src/config/config.store.d.ts +31 -61
  53. package/dist/src/const/{const.vm.d.ts → const.model.d.ts} +7 -0
  54. package/dist/src/const/index.d.ts +2 -2
  55. package/dist/src/page/KgCircleVis/components/KgCircleVis.Canvas.service.d.ts +4 -0
  56. package/dist/src/page/KgCircleVis/components/KgCircleVis.Tab.Rgv.d.ts +1 -1
  57. package/dist/src/page/KgCircleVis/components/KgCircleVis.hooks.d.ts +3 -3
  58. package/dist/src/page/KgCircleVis/components/KgCircleVis.store.d.ts +29 -31
  59. package/dist/src/page/KgPageDda/components/KgPageDda.Create.store.d.ts +32 -1381
  60. package/dist/src/page/index.d.ts +1 -1
  61. package/dist/src/project/types/store.d.ts +1 -0
  62. package/package.json +4 -2
  63. package/dist/src/component/KgVar/KgVar.VarConfigDescription.store.d.ts +0 -12
  64. package/dist/src/component/KgVar/KgVar.VarGridConfig.store.d.ts +0 -10
  65. package/dist/src/component/KgVar/KgVar.VarGridMaster.store.d.ts +0 -10
  66. /package/dist/src/component/KgCanvas/{KgCanvas.vm.d.ts → KgCanvas.model.d.ts} +0 -0
  67. /package/dist/src/component/KgForm/{KgForm.vm.d.ts → KgForm.model.d.ts} +0 -0
  68. /package/dist/src/component/KgForm.Item/{KgForm.Item.vm.d.ts → KgForm.Item.model.d.ts} +0 -0
  69. /package/dist/src/component/KgModal/{KgModal.vm.d.ts → KgModal.model.d.ts} +0 -0
  70. /package/dist/src/component/KgSearch/{KgSearch.vm.d.ts → KgSearch.model.d.ts} +0 -0
  71. /package/dist/src/component/KgSubmit/{KgSubmit.vm.d.ts → KgSubmit.model.d.ts} +0 -0
  72. /package/dist/src/component/KgTable/{KgTable.vm.d.ts → KgTable.model.d.ts} +0 -0
  73. /package/dist/src/component/KgVarConfig/{KgVarConfig.vm.d.ts → KgVarConfig.model.d.ts} +0 -0
  74. /package/dist/src/const/{const.injection-keys.d.ts → injection-keys.const.d.ts} +0 -0
  75. /package/dist/src/page/KgCircleVis/components/{KgCircleVis.vm.d.ts → KgCircleVis.model.d.ts} +0 -0
@@ -1,31 +1,7 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
- import { KG_APP } from '../../const';
3
- import { Menu } from '../../project/src/router/types';
4
2
  import { IKgAppSelectOnGotoAppEventListener, IKgAppSelectOnGotoPathEventListener } from './KgAppSelect.event';
5
- import { IKgAppSelectStore } from './KgAppSelect.store';
3
+ import { useKgAppSelectStore } from './KgAppSelect.store';
6
4
  export declare type IUseKgAppSelect = {
7
- /**
8
- * 进入某个模块.
9
- * @param app 要进入的模块.
10
- */
11
- gotoApp(app: KG_APP): Promise<void>;
12
- /**
13
- * 进入某个地址.
14
- * 如果该地址不属于当前模块, 则先切换到对应的模块, 再进入该地址.
15
- * @param path 要进入的地址.
16
- */
17
- gotoPath(path: string): Promise<void>;
18
- /**
19
- * 初始化.
20
- * 1. 需要根据当前地址设置当前模块.
21
- */
22
- init(): void;
23
- /**
24
- * 判断某个菜单是否属于当前模块.
25
- * @param menu 菜单.
26
- * @return {} 如果菜单属于当前模块则返回 true, 否则返回 false.
27
- */
28
- isMenuInCurrentApp(menu: Menu): boolean;
29
5
  /**
30
6
  * 监听事件: 进入某个模块.
31
7
  * @param listener 事件监听函数.
@@ -38,7 +14,5 @@ export declare type IUseKgAppSelect = {
38
14
  * @param isOnce 是否只会触发一次. 默认为 undefined.
39
15
  */
40
16
  onGotoPath(listener: IKgAppSelectOnGotoPathEventListener, isOnce?: boolean): IRemoveEventListener;
41
- /** 状态数据. */
42
- store: IKgAppSelectStore;
43
- };
17
+ } & ReturnType<typeof useKgAppSelectStore>;
44
18
  export declare function useKgAppSelect(): IUseKgAppSelect;
@@ -1,24 +1,19 @@
1
- import { StoreDefinition } from 'pinia';
2
- import { KG_APP } from '../../const';
1
+ import { KG_APP, KgUseStore } from '../../const';
3
2
  import { Menu } from '../../project/src/router/types';
4
- export interface IUseKgAppSelectStoreState {
5
- /**
6
- * 当前模块.
7
- */
8
- currentApp: KG_APP | null;
9
- }
10
3
  export interface IUseKgAppSelectStoreGetters {
11
- getCurrentApp(): KG_APP;
4
+ currentApp: KG_APP | null;
12
5
  }
13
6
  export interface IUseKgAppSelectStoreActions {
14
7
  /**
15
8
  * 进入某个模块.
9
+ *
16
10
  * @param app 要进入的模块.
17
11
  */
18
12
  gotoApp(app: KG_APP): Promise<void>;
19
13
  /**
20
14
  * 进入某个地址.
21
15
  * 如果该地址不属于当前模块, 则先切换到对应的模块, 再进入该地址.
16
+ *
22
17
  * @param path 要进入的地址.
23
18
  */
24
19
  gotoPath(path: string): Promise<void>;
@@ -29,11 +24,10 @@ export interface IUseKgAppSelectStoreActions {
29
24
  init(): void;
30
25
  /**
31
26
  * 判断某个菜单是否属于当前模块.
27
+ *
32
28
  * @param menu 菜单.
33
29
  * @return {} 如果菜单属于当前模块则返回 true, 否则返回 false.
34
30
  */
35
31
  isMenuInCurrentApp(menu: Menu): boolean;
36
32
  }
37
- export declare type IUseKgAppSelectStore = StoreDefinition<'KgAppSelect', IUseKgAppSelectStoreState, IUseKgAppSelectStoreGetters, IUseKgAppSelectStoreActions>;
38
- export declare type IKgAppSelectStore = ReturnType<IUseKgAppSelectStore>;
39
- export declare const useKgAppSelectStore: IUseKgAppSelectStore;
33
+ export declare const useKgAppSelectStore: KgUseStore<IUseKgAppSelectStoreGetters, IUseKgAppSelectStoreActions>;
@@ -1,25 +1,7 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
- import { ComputedRef } from 'vue';
3
- import { VarButton, VarButtonConfig } from '../../api/WMS/models';
4
- import { KG__VAR_BUTTON__TYPE } from '../../const';
5
2
  import { eventListeners, IKgButtonOnAfterRequestEventListener, IKgButtonOnBeforeRequestEventListener, IKgButtonOnClickEventListener, IKgButtonOnErrorEventListener, IKgButtonOnImportBeforeUploadEventListener, IKgButtonOnImportOkEventListener } from './KgButton.event';
6
- import { IKgButtonStore } from './KgButton.store';
7
- export interface IUseKgButton {
8
- /**
9
- * <p>手动点击某个按钮.</p>
10
- * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
11
- *
12
- * @param param.type 按钮类型.
13
- * @param param.varName 按钮变量名称.
14
- */
15
- click(param: {
16
- type?: KG__VAR_BUTTON__TYPE;
17
- varName?: string;
18
- }): void;
19
- /**
20
- * <p>「当前按钮」. 即当前提交表单所属的按钮.</p>
21
- */
22
- currentButton: ComputedRef<VarButton | null>;
3
+ import { buildUseKgButtonStore } from './KgButton.store';
4
+ export declare type IUseKgButton = {
23
5
  /**
24
6
  * 所有事件监听函数.
25
7
  */
@@ -28,64 +10,6 @@ export interface IUseKgButton {
28
10
  * 界面标识.
29
11
  */
30
12
  formID: string;
31
- /**
32
- * 获取某一个按钮的翻译.
33
- *
34
- * @param param.varName 按钮变量名称.
35
- */
36
- getButtonDescription(param: {
37
- varName: string | null | undefined;
38
- }): string;
39
- /**
40
- * <p>判断某个按钮的 click 事件是否被拦截.</p>
41
- * <p>用户调用 <code>kgVar.kgButton.onClick(listener)</code> 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
42
- * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
43
- *
44
- * <ul>
45
- * <li>
46
- * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
47
- * </li>
48
- * <li>
49
- * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
50
- * <p>根据参数 {@link param.varName} 获取按钮.</p>
51
- * </li>
52
- * </ul>
53
- *
54
- * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
55
- * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
56
- */
57
- isClickIntercepted(param: {
58
- type?: KG__VAR_BUTTON__TYPE;
59
- varName?: string | null;
60
- }): boolean;
61
- /**
62
- * <p>判断某个按钮是否是「当前按钮」.</p>
63
- *
64
- * <ul>
65
- * <li>
66
- * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
67
- * </li>
68
- * <li>
69
- * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
70
- * <p>根据参数 {@link param.varName} 获取按钮.</p>
71
- * </li>
72
- * </ul>
73
- *
74
- * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
75
- * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
76
- */
77
- isCurrentButton(param: {
78
- type?: KG__VAR_BUTTON__TYPE;
79
- varName?: string;
80
- }): boolean;
81
- /**
82
- * <p>判断「当前按钮」的 click 事件是否被拦截.</p>
83
- */
84
- isCurrentButtonClickIntercepted: ComputedRef<boolean>;
85
- /**
86
- * <p>判断「当前按钮」是否正在请求后端接口.</p>
87
- */
88
- isCurrentButtonRequesting: ComputedRef<boolean>;
89
13
  /**
90
14
  * 监听事件: 发起请求之后, 请求成功返回.
91
15
  *
@@ -129,72 +53,7 @@ export interface IUseKgButton {
129
53
  * @param isOnce 是否只会触发一次. 默认为 undefined.
130
54
  */
131
55
  onImportOk(listener: IKgButtonOnImportOkEventListener, isOnce?: boolean): IRemoveEventListener;
132
- /**
133
- * <p>「查询按钮」.</p>
134
- */
135
- searchButton: ComputedRef<VarButton | null>;
136
- /**
137
- * <p>设置「当前按钮」. 比如点击「创建」按钮, 则此时「创建」按钮就是「当前按钮」, 同一时间最多只会有一个按钮处于「正在执行」状态.</p>
138
- *
139
- * <ul>
140
- * <li>
141
- * <p>如果参数 {@link param} === null, 表示清空「当前按钮」.</p>
142
- * </li>
143
- * <li>
144
- * <p>否则, 如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
145
- * </li>
146
- * <li>
147
- * <p>否则, 如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
148
- * <p>根据参数 {@link param.varName} 获取按钮.</p>
149
- * </li>
150
- * </ul>
151
- *
152
- * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
153
- * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
154
- */
155
- setCurrentButton(param: {
156
- type?: KG__VAR_BUTTON__TYPE;
157
- varName?: string | null;
158
- } | null): Promise<void>;
159
- /**
160
- * <p>设置某个按钮的 click 事件是否被拦截.</p>
161
- *
162
- * <ul>
163
- * <li>
164
- * <p>如果参数 {@link param.type} !== <code>undefined</code> && {@link param.type} !== {@link KG__VAR_BUTTON__TYPE.OTHER}, 则根据参数 {@link param.type} 获取按钮.</p>
165
- * </li>
166
- * <li>
167
- * <p>如果参数 {@link param.type} === <code>undefined</code> || {@link param.type} === {@link KG__VAR_BUTTON__TYPE.OTHER}, 则参数 {@link param.varName} 必须传值, 否则报错.</p>
168
- * <p>根据参数 {@link param.varName} 获取按钮.</p>
169
- * </li>
170
- * </ul>
171
- *
172
- * @param param.isIntercepted 是否被拦截.
173
- * @param param.type <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
174
- * @param param.varName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
175
- */
176
- setIsClickIntercepted(param: {
177
- isIntercepted: boolean;
178
- type?: KG__VAR_BUTTON__TYPE;
179
- varName?: string | null;
180
- }): void;
181
- /**
182
- * 设置「当前按钮」是否正在请求后端接口.
183
- *
184
- * @param param.isRequesting 「当前按钮」是否正在请求后端接口.
185
- */
186
- setIsCurrentButtonRequesting(param: {
187
- isRequesting: boolean;
188
- }): void;
189
- /**
190
- * 状态数据.
191
- */
192
- store: IKgButtonStore;
193
- /**
194
- * 按钮配置.
195
- */
196
- varButtonConfig: ComputedRef<VarButtonConfig | null>;
197
- }
56
+ } & ReturnType<ReturnType<typeof buildUseKgButtonStore>>;
198
57
  /**
199
58
  * @param formID 界面标识.
200
59
  */
@@ -1,65 +1,92 @@
1
- import { StoreDefinition } from 'pinia';
2
- import { VarButton, VarButtonConfig } from '../../api/WMS/models';
3
- import { KG__VAR_BUTTON__TYPE } from '../../const';
4
- export interface IUseKgButtonStoreState {
1
+ import { VarButton } from '../../api/WMS/models';
2
+ import { KG__VAR_BUTTON__TYPE, KgUseStore } from '../../const';
3
+ export interface IUseKgButtonStoreGetters {
5
4
  /**
6
5
  * <p>当前按钮.</p>
7
6
  * <p>同一时间最多只会有一个按钮处于「正在执行」状态, 比如点击了创建按钮, 则当前按钮就是创建按钮.</p>
8
7
  */
9
- currentButtonMap: Map<string, VarButton | null>;
8
+ currentButton: VarButton | null;
9
+ /**
10
+ * 获取按钮描述.
11
+ *
12
+ * @param param.varName 按钮变量名称.
13
+ */
14
+ getButtonDescription: (param: {
15
+ varName: string | null | undefined;
16
+ }) => string;
17
+ /**
18
+ * 判断「当前按钮」是不是复制按钮.
19
+ */
20
+ isCopying: boolean;
21
+ /**
22
+ * 判断「当前按钮」是不是创建按钮.
23
+ */
24
+ isCreating: boolean;
10
25
  /**
11
- * <p>按钮的 click 事件是否被拦截.</p>
26
+ * <p>当前按钮的 click 事件是否被拦截.</p>
12
27
  * <p>用户调用 kgVar.kgButton.onClick(listener) 监听了 click 事件, 并且回调函数返回了 true, 表示该 click 事件被用户拦截了.</p>
13
28
  * <p>被拦截之后, 该按钮的默认逻辑不会执行(例如打开提交弹窗, 加载各种数据等等), 后续由用户自行处理.</p>
14
29
  */
15
- isClickInterceptedMap: Map<string, boolean>;
30
+ isCurrentButtonClickIntercepted: boolean;
16
31
  /**
17
32
  * <p>当前按钮是否正在请求后端接口.</p>
18
33
  * <p>比如点击了创建按钮, 打开了创建弹窗, 此时「当前按钮」指的就是创建按钮. 当点击弹窗中的保存按钮时, 表示正在请求后端接口.</p>
19
34
  */
20
- isCurrentButtonRequestingMap: Map<string, boolean>;
21
- }
22
- export interface IUseKgButtonStoreGetters {
23
- getButtonDescription(): (formID: string | null | undefined, param: {
24
- varName: string | null | undefined;
25
- }) => string;
26
- getCurrentButton(): (formID: string | null | undefined) => VarButton | null;
27
- getSearchButton(): (formID: string | null | undefined) => VarButton | null;
28
- getVarButtonConfig(): (formID: string | null | undefined) => VarButtonConfig | null;
29
- isClickIntercepted(): (formID: string | undefined | null, param: {
30
- type?: KG__VAR_BUTTON__TYPE;
31
- varName?: string | null;
32
- }) => boolean;
33
- isCurrentButton(): (formID: string, param: {
34
- varName?: string;
35
- type?: KG__VAR_BUTTON__TYPE;
36
- }) => boolean;
37
- isCurrentButtonRequesting(): (formID: string | undefined | null) => boolean;
35
+ isCurrentButtonRequesting: boolean;
36
+ /**
37
+ * 判断「当前按钮」是不是删除按钮.
38
+ */
39
+ isDeleting: boolean;
40
+ /**
41
+ * 判断「当前按钮」是不是更新按钮.
42
+ */
43
+ isUpdating: boolean;
38
44
  }
39
45
  export interface IUseKgButtonStoreActions {
40
46
  /**
41
47
  * <p>手动点击某个按钮.</p>
42
48
  * <p>调用此方法相当于手动触发某个按钮的点击事件.</p>
43
49
  *
44
- * @param formID 界面标识.
45
- * @param type 按钮类型.
46
- * @param varName 按钮变量名称.
50
+ * @param param.type 按钮类型.
51
+ * @param param.varName 按钮变量名称.
52
+ */
53
+ click(param: {
54
+ type?: KG__VAR_BUTTON__TYPE;
55
+ varName?: string;
56
+ }): void;
57
+ /**
58
+ * 重置状态.
59
+ */
60
+ dispose(): void;
61
+ /**
62
+ * 设置当前按钮.
63
+ *
64
+ * @param param.type 按钮类型.
65
+ * @param param.varName 按钮变量名称.
47
66
  */
48
- click(formID: string, type?: KG__VAR_BUTTON__TYPE, varName?: string): void;
49
- dispose(formID: string | null | undefined): void;
50
- setCurrentButton(formID: string, param: {
67
+ setCurrentButton(param: {
51
68
  type?: KG__VAR_BUTTON__TYPE;
52
69
  varName?: string | null;
53
70
  } | null): Promise<void>;
54
- setIsClickIntercepted(formID: string | undefined | null, param: {
71
+ /**
72
+ * 设置按钮的 click 事件是否被拦截.
73
+ *
74
+ * @param param.isIntercepted 是否拦截.
75
+ * @param param.type 按钮类型.
76
+ * @param param.varName 按钮变量名称.
77
+ */
78
+ setIsClickIntercepted(param: {
55
79
  isIntercepted: boolean;
56
80
  type?: KG__VAR_BUTTON__TYPE;
57
81
  varName?: string | null;
58
82
  }): void;
59
- setIsCurrentButtonRequesting(formID: string | undefined | null, param: {
83
+ /**
84
+ * 设置「当前按钮」是否正在请求后端接口
85
+ *
86
+ * @param param.isRequesting 是否正在请求后端接口.
87
+ */
88
+ setIsCurrentButtonRequesting(param: {
60
89
  isRequesting: boolean;
61
90
  }): void;
62
91
  }
63
- export declare type IUseKgButtonStore = StoreDefinition<'KgButton', IUseKgButtonStoreState, IUseKgButtonStoreGetters, IUseKgButtonStoreActions>;
64
- export declare type IKgButtonStore = ReturnType<IUseKgButtonStore>;
65
- export declare const useKgButtonStore: IUseKgButtonStore;
92
+ export declare function buildUseKgButtonStore(formID: string | null | undefined): KgUseStore<IUseKgButtonStoreGetters, IUseKgButtonStoreActions>;
@@ -1,6 +1,6 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { IKgCanvasOnClickEventListener, IKgCanvasOnContextMenuCloseEventListener, IKgCanvasOnContextMenuOpenEventListener, IKgCanvasOnInitEventListener, IKgCanvasOnMouseEnterEventListener, IKgCanvasOnMouseLeaveEventListener, IKgCanvasOnMouseMoveEventListener, IKgCanvasOnReloadEventListener, IKgCanvasOnResizeEventListener, IKgCanvasOnRightClickEventListener } from './KgCanvas.event';
3
- import { IKgCanvasStore } from './KgCanvas.store';
3
+ import { useKgCanvasStore } from './KgCanvas.store';
4
4
  export declare type IUseKgCanvas = {
5
5
  /**
6
6
  * 监听事件: 单击鼠标左键.
@@ -63,7 +63,7 @@ export declare type IUseKgCanvas = {
63
63
  */
64
64
  onRightClick(listener: IKgCanvasOnRightClickEventListener, isOnce?: boolean): IRemoveEventListener;
65
65
  /** 状态数据. */
66
- store: IKgCanvasStore;
66
+ store: ReturnType<typeof useKgCanvasStore>;
67
67
  };
68
68
  /**
69
69
  *
@@ -1,10 +1,6 @@
1
- import { StoreDefinition } from 'pinia';
2
- export interface IUseKgCanvasStoreState {
3
- }
1
+ import { KgUseStore } from '../../const';
4
2
  export interface IUseKgCanvasStoreGetters {
5
3
  }
6
4
  export interface IUseKgCanvasStoreActions {
7
5
  }
8
- export declare type IUseKgCanvasStore = StoreDefinition<'KgCanvas', IUseKgCanvasStoreState, IUseKgCanvasStoreGetters, IUseKgCanvasStoreActions>;
9
- export declare type IKgCanvasStore = ReturnType<IUseKgCanvasStore>;
10
- export declare const useKgCanvasStore: IUseKgCanvasStore;
6
+ export declare const useKgCanvasStore: KgUseStore<IUseKgCanvasStoreGetters, IUseKgCanvasStoreActions>;
@@ -1,6 +1,6 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { eventListeners, IKgFormOnBlurEventListener, IKgFormOnChangeEventListener, IKgFormOnLinkClickEventListener, IKgFormOnLookupBeforeOkEventListener, IKgFormOnLookupBeforeOpenEventListener, IKgFormOnLookupOkEventListener, IKgFormOnSelectBeforeRequestEventListener, IKgFormOnSelectBeforeSetDatasEventListener, IKgFormOnSelectChangeEventListener } from './KgForm.event';
3
- import { IKgFormStore } from './KgForm.store';
3
+ import { useKgFormStore } from './KgForm.store';
4
4
  export declare type IUseKgForm = {
5
5
  Select: {
6
6
  /**
@@ -84,7 +84,7 @@ export declare type IUseKgForm = {
84
84
  /**
85
85
  * 状态数据.
86
86
  */
87
- store: IKgFormStore;
87
+ store: ReturnType<typeof useKgFormStore>;
88
88
  };
89
89
  /**
90
90
  * @param formID 界面标识.
@@ -1,4 +1,4 @@
1
- import { StoreDefinition } from 'pinia';
1
+ import { KgUseStore } from '../../const';
2
2
  export interface IUseKgFormStoreState {
3
3
  }
4
4
  export interface IUseKgFormStoreGetters {
@@ -20,6 +20,4 @@ export interface IUseKgFormStoreActions {
20
20
  */
21
21
  dispose(formID: string | null | undefined): void;
22
22
  }
23
- export declare type IUseKgFormStore = StoreDefinition<'KgForm', IUseKgFormStoreState, IUseKgFormStoreGetters, IUseKgFormStoreActions>;
24
- export declare type IKgFormStore = ReturnType<IUseKgFormStore>;
25
- export declare const useKgFormStore: IUseKgFormStore;
23
+ export declare const useKgFormStore: KgUseStore<IUseKgFormStoreGetters, IUseKgFormStoreActions>;
@@ -34,10 +34,10 @@ declare const _default: import("vue").DefineComponent<{
34
34
  };
35
35
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
36
36
  value: {
37
- type: import("vue").PropType<import("./KgForm.Item.vm").IKgFormItemValue>;
37
+ type: import("vue").PropType<import("./KgForm.Item.model").IKgFormItemValue>;
38
38
  default: undefined;
39
39
  };
40
- 'onUpdate:value': import("vue").PropType<(value: import("./KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
+ 'onUpdate:value': import("vue").PropType<(value: import("./KgForm.Item.model").IKgFormItemValue | null) => void>;
41
41
  onKgSubmit: import("vue").PropType<() => void>;
42
42
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
43
43
  }, () => JSX.Element | null, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgSelectChange")[], "kgSubmit" | "kgSelectChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -74,17 +74,17 @@ declare const _default: import("vue").DefineComponent<{
74
74
  };
75
75
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
76
76
  value: {
77
- type: import("vue").PropType<import("./KgForm.Item.vm").IKgFormItemValue>;
77
+ type: import("vue").PropType<import("./KgForm.Item.model").IKgFormItemValue>;
78
78
  default: undefined;
79
79
  };
80
- 'onUpdate:value': import("vue").PropType<(value: import("./KgForm.Item.vm").IKgFormItemValue | null) => void>;
80
+ 'onUpdate:value': import("vue").PropType<(value: import("./KgForm.Item.model").IKgFormItemValue | null) => void>;
81
81
  onKgSubmit: import("vue").PropType<() => void>;
82
82
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
83
  }>> & {
84
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
85
85
  onKgSelectChange?: ((...args: any[]) => any) | undefined;
86
86
  }, {
87
- value: import("./KgForm.Item.vm").IKgFormItemValue;
87
+ value: import("./KgForm.Item.model").IKgFormItemValue;
88
88
  kgDisabled: boolean;
89
89
  kgContext: KG_FORM_CONTEXT;
90
90
  kgShowLabel: boolean;
@@ -1,5 +1,5 @@
1
1
  import { RuleObject } from 'ant-design-vue/es/form';
2
- import { KgFormItemProps } from './KgForm.Item.vm';
2
+ import { KgFormItemProps } from './KgForm.Item.model';
3
3
  export declare function useFormRules(props: KgFormItemProps): {
4
4
  /** 表单验证规则. */
5
5
  formRules: import("vue").ComputedRef<RuleObject[]>;
@@ -37,10 +37,10 @@ declare const _default: import("vue").DefineComponent<{
37
37
  };
38
38
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
39
39
  value: {
40
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
40
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
41
41
  default: undefined;
42
42
  };
43
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
43
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
44
44
  onKgSubmit: import("vue").PropType<() => void>;
45
45
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
46
46
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -77,17 +77,17 @@ declare const _default: import("vue").DefineComponent<{
77
77
  };
78
78
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
79
79
  value: {
80
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
80
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
81
81
  default: undefined;
82
82
  };
83
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
83
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
84
84
  onKgSubmit: import("vue").PropType<() => void>;
85
85
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
86
86
  }>> & {
87
87
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
88
88
  onKgSubmit?: ((...args: any[]) => any) | undefined;
89
89
  }, {
90
- value: import("../KgForm.Item.vm").IKgFormItemValue;
90
+ value: import("../KgForm.Item.model").IKgFormItemValue;
91
91
  kgDisabled: boolean;
92
92
  kgContext: KG_FORM_CONTEXT;
93
93
  kgShowLabel: boolean;
@@ -24,7 +24,7 @@ declare const _default: import("vue").DefineComponent<{
24
24
  default: undefined;
25
25
  };
26
26
  kgShowTime: {
27
- type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
27
+ type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>; /** 是否全选. */
28
28
  default: undefined;
29
29
  };
30
30
  kgPicker: {
@@ -33,10 +33,10 @@ declare const _default: import("vue").DefineComponent<{
33
33
  };
34
34
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
35
35
  value: {
36
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
36
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
37
37
  default: undefined;
38
38
  };
39
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
39
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
40
40
  onKgSubmit: import("vue").PropType<() => void>;
41
41
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
42
42
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value" | "kgCheckboxGroupChange")[], "kgSubmit" | "update:value" | "kgCheckboxGroupChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -64,7 +64,7 @@ declare const _default: import("vue").DefineComponent<{
64
64
  default: undefined;
65
65
  };
66
66
  kgShowTime: {
67
- type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>;
67
+ type: import("vue").PropType<boolean | import("ant-design-vue/es/vc-picker/panels/TimePanel").SharedTimeProps<import("dayjs").Dayjs>>; /** 是否全选. */
68
68
  default: undefined;
69
69
  };
70
70
  kgPicker: {
@@ -73,10 +73,10 @@ declare const _default: import("vue").DefineComponent<{
73
73
  };
74
74
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
75
75
  value: {
76
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
76
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
77
77
  default: undefined;
78
78
  };
79
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
79
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
80
80
  onKgSubmit: import("vue").PropType<() => void>;
81
81
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
82
82
  }>> & {
@@ -84,7 +84,7 @@ declare const _default: import("vue").DefineComponent<{
84
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
85
85
  onKgCheckboxGroupChange?: ((...args: any[]) => any) | undefined;
86
86
  }, {
87
- value: import("../KgForm.Item.vm").IKgFormItemValue;
87
+ value: import("../KgForm.Item.model").IKgFormItemValue;
88
88
  kgDisabled: boolean;
89
89
  kgContext: KG_FORM_CONTEXT;
90
90
  kgShowLabel: boolean;
@@ -34,10 +34,10 @@ declare const _default: import("vue").DefineComponent<{
34
34
  };
35
35
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
36
36
  value: {
37
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
37
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
38
38
  default: undefined;
39
39
  };
40
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
41
41
  onKgSubmit: import("vue").PropType<() => void>;
42
42
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
43
43
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -74,17 +74,17 @@ declare const _default: import("vue").DefineComponent<{
74
74
  };
75
75
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
76
76
  value: {
77
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
77
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
78
78
  default: undefined;
79
79
  };
80
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
80
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
81
81
  onKgSubmit: import("vue").PropType<() => void>;
82
82
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
83
  }>> & {
84
84
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
85
85
  onKgSubmit?: ((...args: any[]) => any) | undefined;
86
86
  }, {
87
- value: import("../KgForm.Item.vm").IKgFormItemValue;
87
+ value: import("../KgForm.Item.model").IKgFormItemValue;
88
88
  kgDisabled: boolean;
89
89
  kgContext: KG_FORM_CONTEXT;
90
90
  kgShowLabel: boolean;
@@ -34,10 +34,10 @@ declare const _default: import("vue").DefineComponent<{
34
34
  };
35
35
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
36
36
  value: {
37
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
37
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
38
38
  default: undefined;
39
39
  };
40
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
41
41
  onKgSubmit: import("vue").PropType<() => void>;
42
42
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
43
43
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "update:value")[], "kgSubmit" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -74,17 +74,17 @@ declare const _default: import("vue").DefineComponent<{
74
74
  };
75
75
  kgRules: import("vue").PropType<import("ant-design-vue/es/form").RuleObject[]>;
76
76
  value: {
77
- type: import("vue").PropType<import("../KgForm.Item.vm").IKgFormItemValue>;
77
+ type: import("vue").PropType<import("../KgForm.Item.model").IKgFormItemValue>;
78
78
  default: undefined;
79
79
  };
80
- 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
80
+ 'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.model").IKgFormItemValue | null) => void>;
81
81
  onKgSubmit: import("vue").PropType<() => void>;
82
82
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
83
  }>> & {
84
84
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
85
85
  onKgSubmit?: ((...args: any[]) => any) | undefined;
86
86
  }, {
87
- value: import("../KgForm.Item.vm").IKgFormItemValue;
87
+ value: import("../KgForm.Item.model").IKgFormItemValue;
88
88
  kgDisabled: boolean;
89
89
  kgContext: KG_FORM_CONTEXT;
90
90
  kgShowLabel: boolean;