@kengic/vue 0.27.1-beta.9 → 0.27.2-beta.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 (45) hide show
  1. package/dist/kengic-vue.js +17422 -17695
  2. package/dist/src/component/KgAppSelect/KgAppSelect.event.d.ts +16 -2
  3. package/dist/src/component/KgAppSelect/KgAppSelect.store.d.ts +0 -21
  4. package/dist/src/component/KgButton/KgButton.event.d.ts +20 -6
  5. package/dist/src/component/KgButton/KgButton.hooks.d.ts +6 -5
  6. package/dist/src/component/KgButton/KgButton.store.d.ts +0 -28
  7. package/dist/src/component/KgCanvas/KgCanvas.event.d.ts +1 -35
  8. package/dist/src/component/KgForm/KgForm.event.d.ts +22 -8
  9. package/dist/src/component/KgForm/KgForm.store.d.ts +0 -30
  10. package/dist/src/component/KgForm.Item/KgForm.Item.d.ts +0 -2
  11. package/dist/src/component/KgForm.Item/KgForm.Item.vm.d.ts +0 -5
  12. package/dist/src/component/KgForm.Item/components/KgForm.Item.Checkbox.d.ts +0 -6
  13. package/dist/src/component/KgForm.Item/components/KgForm.Item.CheckboxGroup.d.ts +2 -4
  14. package/dist/src/component/KgForm.Item/components/KgForm.Item.Date.d.ts +0 -2
  15. package/dist/src/component/KgForm.Item/components/KgForm.Item.DateRange.d.ts +0 -2
  16. package/dist/src/component/KgForm.Item/components/KgForm.Item.Image.d.ts +0 -2
  17. package/dist/src/component/KgForm.Item/components/KgForm.Item.Input.d.ts +0 -2
  18. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputNumber.d.ts +0 -2
  19. package/dist/src/component/KgForm.Item/components/KgForm.Item.InputPassword.d.ts +0 -2
  20. package/dist/src/component/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +2 -4
  21. package/dist/src/component/KgForm.Item/components/KgForm.Item.Select.d.ts +1 -4
  22. package/dist/src/component/KgForm.Item/components/KgForm.Item.Switch.d.ts +0 -2
  23. package/dist/src/component/KgForm.Item/components/KgForm.Item.TextArea.d.ts +0 -2
  24. package/dist/src/component/KgSearch/KgSearch.event.d.ts +17 -3
  25. package/dist/src/component/KgSearch/KgSearch.hooks.d.ts +6 -6
  26. package/dist/src/component/KgSearch/KgSearch.store.d.ts +0 -28
  27. package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +24 -10
  28. package/dist/src/component/KgSubmit/KgSubmit.hooks.d.ts +3 -2
  29. package/dist/src/component/KgSubmit/KgSubmit.store.d.ts +0 -26
  30. package/dist/src/component/KgTable/KgTable.event.d.ts +22 -8
  31. package/dist/src/component/KgTable/KgTable.hooks.d.ts +9 -9
  32. package/dist/src/component/KgTable/KgTable.store.d.ts +0 -30
  33. package/dist/src/component/KgVar/KgVar.event.d.ts +1 -4
  34. package/dist/src/component/KgVar/KgVar.hooks.d.ts +28 -28
  35. package/dist/src/component/KgWarehouse/KgWarehouse.event.d.ts +24 -0
  36. package/dist/src/component/KgWarehouse/KgWarehouse.hooks.d.ts +2 -1
  37. package/dist/src/component/KgWarehouse/KgWarehouse.store.d.ts +0 -27
  38. package/dist/src/util/index.d.ts +0 -15
  39. package/package.json +5 -5
  40. /package/dist/{close-outlined-DMcSQWxQ.f380d206.mjs → close-outlined-DMcSQWxQ.537d8ddf.mjs} +0 -0
  41. /package/dist/{exclamation-circle-outlined-DZrXCnvM.eacb69e4.mjs → exclamation-circle-outlined-DZrXCnvM.a3e96b6e.mjs} +0 -0
  42. /package/dist/{fullscreen-exit-outlined-X1iYkFc4.67cebcef.mjs → fullscreen-exit-outlined-X1iYkFc4.37edd487.mjs} +0 -0
  43. /package/dist/{fullscreen-outlined-DDBrsRcy.271d25be.mjs → fullscreen-outlined-DDBrsRcy.db231def.mjs} +0 -0
  44. /package/dist/{search-outlined-Od1M_oxf.3c08cf5f.mjs → search-outlined-Od1M_oxf.1b143df4.mjs} +0 -0
  45. /package/dist/{three-dots-loading-bIlrTJYR.9ee040df.mjs → three-dots-loading-bIlrTJYR.bd624bcf.mjs} +0 -0
@@ -16,7 +16,7 @@ declare const _default: import("vue").DefineComponent<{
16
16
  kgPlaceholder: import("vue").PropType<string>;
17
17
  kgMode: import("vue").PropType<"multiple" | "tags">;
18
18
  kgShowLabel: {
19
- type: import("vue").PropType<boolean>;
19
+ type: import("vue").PropType<boolean>; /** 表单的值. */
20
20
  default: boolean;
21
21
  };
22
22
  kgAllowClear: {
@@ -39,7 +39,6 @@ declare const _default: import("vue").DefineComponent<{
39
39
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
40
  onKgSubmit: import("vue").PropType<() => void>;
41
41
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
42
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
42
  }, () => 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<{
44
43
  kgVarName: {
45
44
  type: import("vue").PropType<string>;
@@ -57,7 +56,7 @@ declare const _default: import("vue").DefineComponent<{
57
56
  kgPlaceholder: import("vue").PropType<string>;
58
57
  kgMode: import("vue").PropType<"multiple" | "tags">;
59
58
  kgShowLabel: {
60
- type: import("vue").PropType<boolean>;
59
+ type: import("vue").PropType<boolean>; /** 表单的值. */
61
60
  default: boolean;
62
61
  };
63
62
  kgAllowClear: {
@@ -80,7 +79,6 @@ declare const _default: import("vue").DefineComponent<{
80
79
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
81
80
  onKgSubmit: import("vue").PropType<() => void>;
82
81
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
84
82
  }>> & {
85
83
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
86
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
@@ -39,8 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
40
  onKgSubmit: import("vue").PropType<() => void>;
41
41
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
42
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange")[], "kgSubmit" | "kgSelectChange" | "update:value" | "kgSelectDatasChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
42
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("kgSubmit" | "kgSelectChange" | "update:value")[], "kgSubmit" | "kgSelectChange" | "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
44
43
  kgVarName: {
45
44
  type: import("vue").PropType<string>;
46
45
  required: boolean;
@@ -80,12 +79,10 @@ declare const _default: import("vue").DefineComponent<{
80
79
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
81
80
  onKgSubmit: import("vue").PropType<() => void>;
82
81
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
84
82
  }>> & {
85
83
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
86
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
87
85
  onKgSelectChange?: ((...args: any[]) => any) | undefined;
88
- onKgSelectDatasChange?: ((...args: any[]) => any) | undefined;
89
86
  }, {
90
87
  value: import("../KgForm.Item.vm").IKgFormItemValue;
91
88
  kgDisabled: boolean;
@@ -39,7 +39,6 @@ declare const _default: import("vue").DefineComponent<{
39
39
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
40
  onKgSubmit: import("vue").PropType<() => void>;
41
41
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
42
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
42
  }, () => 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<{
44
43
  kgVarName: {
45
44
  type: import("vue").PropType<string>;
@@ -80,7 +79,6 @@ declare const _default: import("vue").DefineComponent<{
80
79
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
81
80
  onKgSubmit: import("vue").PropType<() => void>;
82
81
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
84
82
  }>> & {
85
83
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
86
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
@@ -39,7 +39,6 @@ declare const _default: import("vue").DefineComponent<{
39
39
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
40
40
  onKgSubmit: import("vue").PropType<() => void>;
41
41
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
42
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
43
42
  }, () => 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<{
44
43
  kgVarName: {
45
44
  type: import("vue").PropType<string>;
@@ -80,7 +79,6 @@ declare const _default: import("vue").DefineComponent<{
80
79
  'onUpdate:value': import("vue").PropType<(value: import("../KgForm.Item.vm").IKgFormItemValue | null) => void>;
81
80
  onKgSubmit: import("vue").PropType<() => void>;
82
81
  onKgSelectChange: import("vue").PropType<(value: any) => void>;
83
- onKgSelectDatasChange: import("vue").PropType<(datas: any[]) => void>;
84
82
  }>> & {
85
83
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
86
84
  onKgSubmit?: ((...args: any[]) => any) | undefined;
@@ -2,9 +2,6 @@ import { IKgEventListener } from '@kengic/core.core';
2
2
  import { IKgTableRequestParameter } from '../KgTable';
3
3
  /**
4
4
  * 事件类型.
5
- * 'onReady': 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值
6
- * 'onSearch': 点击查询按钮, 并且表单验证通过
7
- * 'onReset': 点击重置按钮
8
5
  */
9
6
  export declare type IKgSearchEvent = 'onReady' | 'onSearch' | 'onReset';
10
7
  export declare type IKgSearchOnReadyEventListenerParameter = {};
@@ -15,3 +12,20 @@ export declare type IKgSearchOnResetEventListenerParameter = {};
15
12
  export declare type IKgSearchOnResetEventListener = ((param: IKgSearchOnResetEventListenerParameter) => Promise<boolean>) & IKgEventListener;
16
13
  export declare type IKgSearchEventListenerParameter = IKgSearchOnReadyEventListenerParameter | IKgSearchOnSearchEventListenerParameter | IKgSearchOnResetEventListenerParameter;
17
14
  export declare type IKgSearchEventListener = IKgSearchOnReadyEventListener | IKgSearchOnSearchEventListener | IKgSearchOnResetEventListener;
15
+ export declare const eventListeners: Record<string, {
16
+ onReady: Array<IKgSearchOnReadyEventListener>;
17
+ onSearch: Array<IKgSearchOnSearchEventListener>;
18
+ onReset: Array<IKgSearchOnResetEventListener>;
19
+ }>;
20
+ /**
21
+ * 触发事件.
22
+ *
23
+ * @param param.event 事件名称.
24
+ * @param param.id 唯一标识.
25
+ * @param param.parameter 事件参数.
26
+ */
27
+ export declare function emit<P extends IKgSearchEventListenerParameter>(param: {
28
+ event: IKgSearchEvent;
29
+ id?: string | undefined;
30
+ parameter: P;
31
+ }): Promise<boolean>;
@@ -1,6 +1,6 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { ComputedRef } from 'vue';
3
- import { VarProfileDetail } from '../../api/WMS/models';
3
+ import { VarProfileDetail, VarProfileMasterDTO } from '../../api/WMS/models';
4
4
  import { IKgTableRequestParameter } from '../KgTable';
5
5
  import { IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './KgSearch.event';
6
6
  import { IKgSearchStore } from './KgSearch.store';
@@ -13,11 +13,11 @@ export declare type IUseKgSearch = {
13
13
  * 当前查询字段列表(可见的).
14
14
  */
15
15
  currentVarProfileDetailsForVisible: ComputedRef<Array<VarProfileDetail>>;
16
- currentVarProfileMaster: ComputedRef<ReturnType<IKgSearchStore['getCurrentVarProfileMaster']>>;
16
+ currentVarProfileMaster: ComputedRef<VarProfileMasterDTO | null>;
17
17
  /**
18
18
  * 高级查询的操作符表单数据对象.
19
19
  */
20
- dynamicQueryOperatorModel: ComputedRef<ReturnType<IKgSearchStore['getDynamicQueryOperatorModel']>>;
20
+ dynamicQueryOperatorModel: ComputedRef<Record<string, string>>;
21
21
  /**
22
22
  * 界面标识.
23
23
  */
@@ -25,15 +25,15 @@ export declare type IUseKgSearch = {
25
25
  /**
26
26
  * 表单数据对象.
27
27
  */
28
- formModel: ComputedRef<ReturnType<IKgSearchStore['getFormModel']>>;
28
+ formModel: ComputedRef<Record<string, any> | null>;
29
29
  /** 是否就绪: 查询字段初始完成, 组件渲染完成. */
30
- isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
30
+ isReady: ComputedRef<boolean>;
31
31
  /**
32
32
  * 表单数据对象.
33
33
  *
34
34
  * @deprecated 请使用 {@link formModel}
35
35
  */
36
- model: ComputedRef<ReturnType<IKgSearchStore['getFormModel']>>;
36
+ model: ComputedRef<Record<string, any> | null>;
37
37
  /**
38
38
  * 监听事件: 查询字段初始完成, 组件渲染完成, 查询表单对象已经有值.
39
39
  *
@@ -1,7 +1,6 @@
1
1
  import { StoreDefinition } from 'pinia';
2
2
  import { VarProfileMasterDTO } from '../../api/WMS/models';
3
3
  import { IKgTableRequestParameter } from '../KgTable';
4
- import { IKgSearchEvent, IKgSearchEventListenerParameter, IKgSearchOnReadyEventListener, IKgSearchOnResetEventListener, IKgSearchOnSearchEventListener } from './KgSearch.event';
5
4
  /** 查询方法. */
6
5
  export declare type IKgSearchOnSearchFn = (param?: IKgTableRequestParameter) => void;
7
6
  /** 重置方法. */
@@ -17,12 +16,6 @@ export interface IUseKgSearchStoreState {
17
16
  * 是否就绪: 查询字段初始完成, 组件渲染完成.
18
17
  */
19
18
  isReadyMap: Map<string, boolean>;
20
- /** 事件监听函数列表: ready. */
21
- onReady: Map<string, Array<IKgSearchOnReadyEventListener>>;
22
- /** 事件监听函数列表: reset. */
23
- onReset: Map<string, Array<IKgSearchOnResetEventListener>>;
24
- /** 事件监听函数列表: search. */
25
- onSearch: Map<string, Array<IKgSearchOnSearchEventListener>>;
26
19
  /** 重置方法, 可供外部调用, 用来触发重置操作. */
27
20
  resetFnMap: Map<string, IKgSearchOnResetFn>;
28
21
  /** 查询方法, 可供外部调用, 用来触发查询操作. */
@@ -61,25 +54,11 @@ export interface IUseKgSearchStoreGetters {
61
54
  getSearchFn(): (formID: string | null | undefined) => IKgSearchOnSearchFn | null;
62
55
  }
63
56
  export interface IUseKgSearchStoreActions {
64
- /**
65
- * 注册事件监听.
66
- * @param formID 界面标识.
67
- * @param event 事件名称.
68
- * @param listener 事件监听函数.
69
- */
70
- addEventListener(formID: string, event: IKgSearchEvent, listener: any): void;
71
57
  /**
72
58
  * 清理数据.
73
59
  * @param formID 页面标识.
74
60
  */
75
61
  dispose(formID: string | null | undefined): void;
76
- /**
77
- * 触发事件.
78
- * @param formID 界面标识.
79
- * @param event 事件名称.
80
- * @param parameter 事件参数.
81
- */
82
- emit<T = IKgSearchEventListenerParameter>(formID: string, event: IKgSearchEvent, parameter: T): Promise<boolean>;
83
62
  /**
84
63
  * 修改查询字段的高级查询操作符的部分属性.
85
64
  *
@@ -94,13 +73,6 @@ export interface IUseKgSearchStoreActions {
94
73
  * @param properties 要修改的部分属性.
95
74
  */
96
75
  patchModel(formID: string | null | undefined, properties?: Record<string, any> | null): Promise<void>;
97
- /**
98
- * 退订事件监听.
99
- * @param formID 界面标识.
100
- * @param event 事件名称.
101
- * @param listener 事件监听函数.
102
- */
103
- removeEventListener(formID: string, event: IKgSearchEvent, listener?: any): void;
104
76
  setDynamicQueryOperatorModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
105
77
  /**
106
78
  * 设置表单数据.
@@ -4,16 +4,6 @@ import { KgAny } from '../../type';
4
4
  import { IKgTableRow } from '../KgTable';
5
5
  /**
6
6
  * 事件类型.
7
- * 'onBeforeOpen' 打开提交弹窗之前
8
- * 'onOpen' 打开提交弹窗
9
- * 'onBeforeOk' 点击确认按钮之后, 执行默认逻辑之前
10
- * 'onAfterValidate' 点击确认按钮之后, 表单验证完成,
11
- * 'onBeforeRequest' 发起接口请求之前. 表单验证完成, 参数解析完成,
12
- * 'onOk' 请求成功, 关闭提交弹窗之后
13
- * 'onBeforeCancel' 点击取消按钮, 或者点击右上角的关闭按钮, 尚未关闭弹窗,
14
- * 'onCancel' 点击取消按钮, 或者点击右上角的关闭按钮, 已经关闭弹窗,
15
- * 'onError' 请求失败. 请求失败了, 或者请求返回了错误消息
16
- * 'onClose' 关闭提交弹窗
17
7
  */
18
8
  export declare type IKgSubmitEvent = 'onBeforeOpen' | 'onOpen' | 'onBeforeOk' | 'onAfterValidate' | 'onBeforeRequest' | 'onOk' | 'onBeforeCancel' | 'onCancel' | 'onError' | 'onClose';
19
9
  export declare type IKgSubmitOnBeforeOpenEventListenerParameter = {
@@ -103,3 +93,27 @@ export declare type IKgSubmitOnCloseEventListenerParameter = {} | null | undefin
103
93
  export declare type IKgSubmitOnCloseEventListener = ((param: IKgSubmitOnCloseEventListenerParameter) => Promise<boolean>) & IKgEventListener;
104
94
  export declare type IKgSubmitEventListenerParameter = IKgSubmitOnBeforeOpenEventListenerParameter | IKgSubmitOnOpenEventListenerParameter | IKgSubmitOnBeforeOkEventListenerParameter | IKgSubmitOnAfterValidateEventListenerParameter | IKgSubmitOnBeforeRequestEventListenerParameter | IKgSubmitOnOkEventListenerParameter | IKgSubmitOnBeforeCancelEventListenerParameter | IKgSubmitOnCancelEventListenerParameter | IKgSubmitOnErrorEventListenerParameter | IKgSubmitOnCloseEventListenerParameter;
105
95
  export declare type IKgSubmitEventListener = IKgSubmitOnBeforeOpenEventListener | IKgSubmitOnOpenEventListener | IKgSubmitOnBeforeOkEventListener | IKgSubmitOnAfterValidateEventListener | IKgSubmitOnBeforeRequestEventListener | IKgSubmitOnOkEventListener | IKgSubmitOnBeforeCancelEventListener | IKgSubmitOnCancelEventListener | IKgSubmitOnErrorEventListener | IKgSubmitOnCloseEventListener;
96
+ export declare const eventListeners: Record<string, {
97
+ onBeforeOpen: Array<IKgSubmitOnBeforeOpenEventListener>;
98
+ onOpen: Array<IKgSubmitOnOpenEventListener>;
99
+ onBeforeOk: Array<IKgSubmitOnBeforeOkEventListener>;
100
+ onAfterValidate: Array<IKgSubmitOnAfterValidateEventListener>;
101
+ onBeforeRequest: Array<IKgSubmitOnBeforeRequestEventListener>;
102
+ onOk: Array<IKgSubmitOnOkEventListener>;
103
+ onBeforeCancel: Array<IKgSubmitOnBeforeCancelEventListener>;
104
+ onCancel: Array<IKgSubmitOnCancelEventListener>;
105
+ onError: Array<IKgSubmitOnErrorEventListener>;
106
+ onClose: Array<IKgSubmitOnCloseEventListener>;
107
+ }>;
108
+ /**
109
+ * 触发事件.
110
+ *
111
+ * @param param.event 事件名称.
112
+ * @param param.id 唯一标识.
113
+ * @param param.parameter 事件参数.
114
+ */
115
+ export declare function emit<P extends IKgSubmitEventListenerParameter>(param: {
116
+ event: IKgSubmitEvent;
117
+ id?: string | undefined;
118
+ parameter: P;
119
+ }): Promise<boolean>;
@@ -1,5 +1,6 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { FormInstance } from 'ant-design-vue';
3
+ import { RuleObject } from 'ant-design-vue/es/form';
3
4
  import { ComputedRef, Ref } from 'vue';
4
5
  import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
5
6
  import { IKgVarSubmitConfigProperties, KG__VAR_BUTTON__TYPE, KG__VAR_SUBMIT_CONFIG__DISPLAY_TYPE, KG__VAR_SUBMIT_CONFIG__LABEL_COLUMN_UNIT, KG__VAR_SUBMIT_CONFIG__LAYOUT } from '../../const';
@@ -72,7 +73,7 @@ export interface IUseKgSubmit {
72
73
  /**
73
74
  * 自定义的表单验证规则.
74
75
  */
75
- formRules: ReturnType<IKgSubmitStore['getFormRules']>;
76
+ formRules: Ref<Record<string, RuleObject[]>>;
76
77
  /**
77
78
  * <p>获取「提交表单配置」, 根据所传参数进行过滤.</p>
78
79
  *
@@ -268,7 +269,7 @@ export interface IUseKgSubmit {
268
269
  *
269
270
  * @deprecated 请使用 {@link formRules}.
270
271
  */
271
- rules: ReturnType<IKgSubmitStore['getFormRules']>;
272
+ rules: Ref<Record<string, RuleObject[]>>;
272
273
  /**
273
274
  * <p>「查询按钮」的「提交表单配置」.</p>
274
275
  */
@@ -4,7 +4,6 @@ import { StoreDefinition } from 'pinia';
4
4
  import { Ref } from 'vue';
5
5
  import { VarProfileDetail, VarSubmitConfig, VarSubmitDetail } from '../../api/WMS/models';
6
6
  import { KG__VAR_BUTTON__TYPE } from '../../const';
7
- import { IKgSubmitEvent, IKgSubmitEventListenerParameter, IKgSubmitOnAfterValidateEventListener, IKgSubmitOnBeforeCancelEventListener, IKgSubmitOnBeforeOkEventListener, IKgSubmitOnBeforeOpenEventListener, IKgSubmitOnBeforeRequestEventListener, IKgSubmitOnCancelEventListener, IKgSubmitOnCloseEventListener, IKgSubmitOnErrorEventListener, IKgSubmitOnOkEventListener, IKgSubmitOnOpenEventListener } from './KgSubmit.event';
8
7
  export interface IUseKgSubmitStoreState {
9
8
  /** 表单数据对象. */
10
9
  formModelMap: Map<string, Record<string, any>>;
@@ -16,16 +15,6 @@ export interface IUseKgSubmitStoreState {
16
15
  */
17
16
  formRulesMap: Map<string, Ref<Record<string, Array<RuleObject>>>>;
18
17
  isLoadingMap: Map<string, boolean>;
19
- onAfterValidate: Map<string, Array<IKgSubmitOnAfterValidateEventListener>>;
20
- onBeforeCancel: Map<string, Array<IKgSubmitOnBeforeCancelEventListener>>;
21
- onBeforeOk: Map<string, Array<IKgSubmitOnBeforeOkEventListener>>;
22
- onBeforeOpen: Map<string, Array<IKgSubmitOnBeforeOpenEventListener>>;
23
- onBeforeRequest: Map<string, Array<IKgSubmitOnBeforeRequestEventListener>>;
24
- onCancel: Map<string, Array<IKgSubmitOnCancelEventListener>>;
25
- onClose: Map<string, Array<IKgSubmitOnCloseEventListener>>;
26
- onError: Map<string, Array<IKgSubmitOnErrorEventListener>>;
27
- onOk: Map<string, Array<IKgSubmitOnOkEventListener>>;
28
- onOpen: Map<string, Array<IKgSubmitOnOpenEventListener>>;
29
18
  }
30
19
  export interface IUseKgSubmitStoreGetters {
31
20
  getFormModel(): (formID: string | null | undefined) => Record<string, any> | null;
@@ -51,13 +40,6 @@ export interface IUseKgSubmitStoreGetters {
51
40
  } | null) => Array<VarSubmitDetail> | null;
52
41
  }
53
42
  export interface IUseKgSubmitStoreActions {
54
- /**
55
- * 注册事件监听.
56
- * @param formID 界面标识.
57
- * @param event 事件名称.
58
- * @param listener 事件监听函数.
59
- */
60
- addEventListener(formID: string, event: IKgSubmitEvent, listener: any): void;
61
43
  /**
62
44
  * 添加一个「提交表单字段」.
63
45
  *
@@ -70,20 +52,12 @@ export interface IUseKgSubmitStoreActions {
70
52
  * @param formID 页面标识.
71
53
  */
72
54
  dispose(formID: string | null | undefined): void;
73
- emit<T = IKgSubmitEventListenerParameter>(formID: string, event: IKgSubmitEvent, parameter: T): Promise<boolean>;
74
55
  patchVarSubmitDetail(formID: string | null | undefined, param: {
75
56
  buttonType?: KG__VAR_BUTTON__TYPE;
76
57
  buttonVarName?: string | null;
77
58
  properties: VarSubmitDetail;
78
59
  varName: string | null | undefined;
79
60
  }): Promise<void>;
80
- /**
81
- * 退订事件监听.
82
- * @param formID 界面标识.
83
- * @param event 事件名称.
84
- * @param listener 事件监听函数.
85
- */
86
- removeEventListener(formID: string, event: IKgSubmitEvent, listener?: any): void;
87
61
  setFormModel(formID: string | null | undefined, model?: Record<string, any> | null): void;
88
62
  setIsLoading(formID: string, value: boolean): void;
89
63
  }
@@ -4,12 +4,6 @@ import { IPage } from '../../api/WMS/models';
4
4
  import { IKgTableRow } from './KgTable.vm';
5
5
  /**
6
6
  * 事件类型.
7
- * 'onReady': 就绪, 配置初始完成, 组件渲染完成
8
- * 'onRowDoubleClick': 双击某行
9
- * 'onBeforeParseRequestParameter': 即将解析请求参数,
10
- * 'onBeforeRequest': 即将发起查询请求, 如果返回 true 表示不会发起请求
11
- * 'onBeforeSetDatas': 查询请求成功, 表格数据尚未赋值. 此处可以对查询接口返回的列表数据作处理
12
- * 'onAfterRequest': 查询请求成功, 表格数据已经赋值, 表格状态已经更新
13
7
  */
14
8
  export declare type IKgTableEvent = 'onReady' | 'onRowDoubleClick' | 'onBeforeParseRequestParameter' | 'onBeforeRequest' | 'onBeforeSetDatas' | 'onAfterRequest';
15
9
  export declare type IKgTableOnReadyEventListenerParameter = {};
@@ -45,13 +39,33 @@ export declare type IKgTableOnBeforeSetDatasEventListenerParameter = {
45
39
  };
46
40
  export declare type IKgTableOnBeforeSetDatasEventListener = ((param: IKgTableOnBeforeSetDatasEventListenerParameter) => Promise<boolean>) & IKgEventListener;
47
41
  export declare type IKgTableOnAfterRequestEventListenerParameter = {
42
+ /** 列表数据. */
43
+ datas: Ref<Array<IKgTableRow>>;
48
44
  /** 查询接口请求参数. */
49
45
  params: Record<string, any>;
50
46
  /** 接口返回的分页数据. */
51
47
  response: IPage<IKgTableRow> | null | undefined;
52
- /** 列表数据. */
53
- datas: Ref<Array<IKgTableRow>>;
54
48
  };
55
49
  export declare type IKgTableOnAfterRequestEventListener = ((param: IKgTableOnAfterRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
56
50
  export declare type IKgTableEventListenerParameter = IKgTableOnReadyEventListenerParameter | IKgTableOnRowDoubleClickEventListenerParameter | IKgTableOnBeforeParseRequestParameterEventListenerParameter | IKgTableOnBeforeRequestEventListenerParameter | IKgTableOnBeforeSetDatasEventListenerParameter | IKgTableOnAfterRequestEventListenerParameter;
57
51
  export declare type IKgTableEventListener = IKgTableOnReadyEventListener | IKgTableOnRowDoubleClickEventListener | IKgTableOnBeforeParseRequestParameterEventListener | IKgTableOnBeforeRequestEventListener | IKgTableOnBeforeSetDatasEventListener | IKgTableOnAfterRequestEventListener;
52
+ export declare const eventListeners: Record<string, {
53
+ onAfterRequest: Array<IKgTableOnAfterRequestEventListener>;
54
+ onBeforeParseRequestParameter: Array<IKgTableOnBeforeParseRequestParameterEventListener>;
55
+ onBeforeRequest: Array<IKgTableOnBeforeRequestEventListener>;
56
+ onBeforeSetDatas: Array<IKgTableOnBeforeSetDatasEventListener>;
57
+ onReady: Array<IKgTableOnReadyEventListener>;
58
+ onRowDoubleClick: Array<IKgTableOnRowDoubleClickEventListener>;
59
+ }>;
60
+ /**
61
+ * 触发事件.
62
+ *
63
+ * @param param.event 事件名称.
64
+ * @param param.id 唯一标识.
65
+ * @param param.parameter 事件参数.
66
+ */
67
+ export declare function emit<P extends IKgTableEventListenerParameter>(param: {
68
+ event: IKgTableEvent;
69
+ id?: string | undefined;
70
+ parameter: P;
71
+ }): Promise<boolean>;
@@ -7,7 +7,7 @@ export interface IUseKgTable {
7
7
  /**
8
8
  * 列表数据.
9
9
  */
10
- datas: ComputedRef<ReturnType<IKgTableStore['getDatas']>>;
10
+ datas: ComputedRef<Record<string, any>[]>;
11
11
  /** 界面标识. */
12
12
  formID: string;
13
13
  /** @deprecated 已弃用, 请使用 {@link IUseKgTable.idKey}. */
@@ -21,11 +21,11 @@ export interface IUseKgTable {
21
21
  /** 是否支持多选. */
22
22
  isMultiSelect: ComputedRef<boolean>;
23
23
  /** 是否就绪: 配置初始完成, 组件渲染完成. */
24
- isReady: ComputedRef<ReturnType<IKgTableStore['getIsReady']>>;
24
+ isReady: ComputedRef<boolean>;
25
25
  /** 是否已经查询过一次了. */
26
- isRequested: ComputedRef<ReturnType<IKgTableStore['getIsRequested']>>;
26
+ isRequested: ComputedRef<boolean>;
27
27
  /** 是否正在查询. */
28
- isRetrieving: ComputedRef<ReturnType<IKgTableStore['getIsRequesting']>>;
28
+ isRetrieving: ComputedRef<boolean | null>;
29
29
  /** 是否显示底部左侧. */
30
30
  isShowBottomLeft: ComputedRef<boolean>;
31
31
  /** 是否显示底部右侧. */
@@ -39,7 +39,7 @@ export interface IUseKgTable {
39
39
  *
40
40
  * @default true
41
41
  */
42
- isShowDescription: ComputedRef<ReturnType<IKgTableStore['getIsShowDescription']>>;
42
+ isShowDescription: ComputedRef<boolean>;
43
43
  /** 查询条件的界面标识. */
44
44
  kgSearchFormID: ComputedRef<string>;
45
45
  /**
@@ -104,13 +104,13 @@ export interface IUseKgTable {
104
104
  * <p>查询参数.</p>
105
105
  * <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
106
106
  */
107
- requestParams: ComputedRef<ReturnType<IKgTableStore['getRequestParams']>>;
107
+ requestParams: ComputedRef<Record<string, any>>;
108
108
  /** 当前勾选的第一行. */
109
- selectedFirstRow: ComputedRef<ReturnType<IKgTableStore['getSelectedFirstRow']>>;
109
+ selectedFirstRow: ComputedRef<IKgTableRow | null>;
110
110
  /** 当前勾选的唯一行, 如果勾选了多行或者零行, 则为 null. */
111
- selectedRow: ComputedRef<ReturnType<IKgTableStore['getSelectedRow']>>;
111
+ selectedRow: ComputedRef<IKgTableRow | null>;
112
112
  /** 当前勾选的所有行. */
113
- selectedRows: ComputedRef<ReturnType<IKgTableStore['getSelectedRows']>>;
113
+ selectedRows: ComputedRef<IKgTableRow[] | null>;
114
114
  setIsShowDescription(value: boolean): void;
115
115
  /**
116
116
  * 设置勾选的行.
@@ -1,13 +1,8 @@
1
1
  import { Key } from 'ant-design-vue/lib/_util/type';
2
2
  import { StoreDefinition } from 'pinia';
3
3
  import { Ref } from 'vue';
4
- import { IKgTableEvent, IKgTableEventListenerParameter, IKgTableOnAfterRequestEventListener, IKgTableOnBeforeParseRequestParameterEventListener, IKgTableOnBeforeRequestEventListener, IKgTableOnBeforeSetDatasEventListener, IKgTableOnReadyEventListener, IKgTableOnRowDoubleClickEventListener } from './KgTable.event';
5
4
  import { IKgTableRow, IKgTableRowHeight } from './KgTable.vm';
6
5
  export interface IUseKgTableStoreState {
7
- onAfterRequest: Map<string, Array<IKgTableOnAfterRequestEventListener>>;
8
- onBeforeParseParameter: Map<string, Array<IKgTableOnBeforeParseRequestParameterEventListener>>;
9
- onBeforeRequest: Map<string, Array<IKgTableOnBeforeRequestEventListener>>;
10
- onBeforeSetDatas: Map<string, Array<IKgTableOnBeforeSetDatasEventListener>>;
11
6
  /** 列表数据. */
12
7
  datasMap: Map<String, Array<any>>;
13
8
  /** 是否就绪: 配置初始完成, 组件渲染完成. */
@@ -33,15 +28,11 @@ export interface IUseKgTableStoreState {
33
28
  * @default true
34
29
  */
35
30
  isShowDescriptionMap: Map<string, boolean>;
36
- /** 事件监听函数列表: ready. */
37
- onReady: Map<string, Array<IKgTableOnReadyEventListener>>;
38
31
  /**
39
32
  * <p>查询参数.</p>
40
33
  * <p>此查询参数是最终传给后端接口的参数, 包含了查询条件, 还包含了表格中的排序和分页, 还包含了表格配置中的参数.</p>
41
34
  */
42
35
  requestParamsMap: Map<string, Record<string, any>>;
43
- /** '双击某行'事件监听函数列表. */
44
- onRowDoubleClick: Map<string, Array<IKgTableOnRowDoubleClickEventListener>>;
45
36
  /** 行高. */
46
37
  rowHeightMap: Map<string, IKgTableRowHeight>;
47
38
  /** 勾选的行的主键. */
@@ -84,13 +75,6 @@ export interface IUseKgTableStoreGetters {
84
75
  getTableWidth(): (formID: string | null | undefined) => number | null;
85
76
  }
86
77
  export interface IUseKgTableStoreActions {
87
- /**
88
- * 注册事件监听.
89
- * @param formID 界面标识.
90
- * @param event 事件名称.
91
- * @param listener 事件监听函数.
92
- */
93
- addEventListener(formID: string | null | undefined, event: IKgTableEvent, listener: any): void;
94
78
  /**
95
79
  * 清空表格数据.
96
80
  * @param formID 界面标识.
@@ -101,25 +85,11 @@ export interface IUseKgTableStoreActions {
101
85
  * @param formID 页面标识.
102
86
  */
103
87
  dispose(formID: string | null | undefined): void;
104
- /**
105
- * 触发事件.
106
- * @param formID 界面标识.
107
- * @param event 事件名称.
108
- * @param parameter 事件参数.
109
- */
110
- emit<T = IKgTableEventListenerParameter>(formID: string | null | undefined, event: IKgTableEvent, parameter: T): Promise<boolean>;
111
88
  /**
112
89
  * 刷新勾选的行. 表格列表数据变更之后, 需要同步到勾选的行.
113
90
  * @param formID 界面标识.
114
91
  */
115
92
  refreshSelectedRows(formID: string | null | undefined): void;
116
- /**
117
- * 退订事件监听.
118
- * @param formID 界面标识.
119
- * @param event 事件名称.
120
- * @param listener 事件监听函数.
121
- */
122
- removeEventListener(formID: string | null | undefined, event: IKgTableEvent, listener?: any): void;
123
93
  /**
124
94
  * 设置列表数据.
125
95
  * @param param.frmId 界面标识.
@@ -1,9 +1,6 @@
1
1
  import { IKgEventListener } from '@kengic/core.core';
2
2
  /**
3
3
  * 事件类型.
4
- * 'onRequest': 变量配置查询完成
5
- * 'onSetup': 页面创建
6
- * 'onUnmounted': 页面卸载
7
4
  */
8
5
  export declare type IKgVarEvent = 'onRequest' | 'onSetup' | 'onUnmounted';
9
6
  export declare type IKgVarOnRequestEventListenerParameter = {
@@ -29,7 +26,7 @@ export declare type IKgVarOnUnmountedEventListenerParameter = {
29
26
  export declare type IKgVarOnUnmountedEventListener = ((param: IKgVarOnUnmountedEventListenerParameter) => Promise<boolean>) & IKgEventListener;
30
27
  export declare type IKgVarEventListenerParameter = IKgVarOnRequestEventListenerParameter | IKgVarOnSetupEventListenerParameter | IKgVarOnUnmountedEventListenerParameter;
31
28
  export declare type IKgVarEventListener = IKgVarOnRequestEventListener | IKgVarOnSetupEventListener | IKgVarOnUnmountedEventListener;
32
- export declare const eventListenerListRecordRecord: Record<string, {
29
+ export declare const eventListeners: Record<string, {
33
30
  onRequest: Array<IKgVarOnRequestEventListener>;
34
31
  onSetup: Array<IKgVarOnSetupEventListener>;
35
32
  onUnmounted: Array<IKgVarOnUnmountedEventListener>;