@kengic/vue 0.3.3-beta.0 → 0.3.4

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/dist/index.css +1 -1
  2. package/dist/kengic-vue.js +9013 -7810
  3. package/dist/src/apis/WMS/models.d.ts +111 -3
  4. package/dist/src/components/KgButton/{KgButton.Other.d.ts → KgButton.Item.d.ts} +8 -11
  5. package/dist/src/components/KgButton/{index.vm.d.ts → KgButton.Item.data.d.ts} +1 -2
  6. package/dist/src/components/KgButton/KgButton.d.ts +10 -32
  7. package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +30 -0
  8. package/dist/src/components/KgButton/{KgButton.Export.d.ts → components/KgButton.Create.d.ts} +6 -10
  9. package/dist/src/components/KgButton/{KgButton.Delete.d.ts → components/KgButton.Delete.d.ts} +5 -9
  10. package/dist/src/components/KgButton/components/KgButton.Export.d.ts +28 -0
  11. package/dist/src/components/KgButton/{KgButton.Import.d.ts → components/KgButton.Import.d.ts} +4 -6
  12. package/dist/src/components/KgButton/components/KgButton.Other.d.ts +33 -0
  13. package/dist/src/components/KgButton/components/KgButton.Search.d.ts +31 -0
  14. package/dist/src/components/KgButton/{KgButton.Copy.d.ts → components/KgButton.Update.d.ts} +4 -6
  15. package/dist/src/components/KgButton/index.d.ts +58 -3
  16. package/dist/src/components/KgButton/index.hooks.d.ts +13 -0
  17. package/dist/src/components/KgButton/index.store.d.ts +40 -0
  18. package/dist/src/components/KgForm.Item/KgForm.Item.d.ts +1 -1
  19. package/dist/src/components/KgForm.Item/{KgForm.Item.Date.d.ts → components/KgForm.Item.Date.d.ts} +11 -11
  20. package/dist/src/components/KgForm.Item/{KgForm.Item.Input.d.ts → components/KgForm.Item.Input.d.ts} +11 -11
  21. package/dist/src/components/KgForm.Item/{KgForm.Item.InputNumber.d.ts → components/KgForm.Item.InputNumber.d.ts} +11 -11
  22. package/dist/src/components/KgForm.Item/{KgForm.Item.Select.d.ts → components/KgForm.Item.Select.d.ts} +15 -13
  23. package/dist/src/components/KgForm.Item/{KgForm.Item.Switch.d.ts → components/KgForm.Item.Switch.d.ts} +11 -11
  24. package/dist/src/components/KgForm.Item/index.vm.d.ts +14 -4
  25. package/dist/src/components/KgModal/KgModal.d.ts +12 -3
  26. package/dist/src/components/KgModal/index.vm.d.ts +5 -0
  27. package/dist/src/components/KgProgressA/KgProgressA.d.ts +1 -1
  28. package/dist/src/components/KgProgressA/index.d.ts +1 -1
  29. package/dist/src/components/KgResizable/KgResizable.d.ts +10 -4
  30. package/dist/src/components/KgSearch/KgSearch.d.ts +5 -57
  31. package/dist/src/components/KgSearch/KgSearch.data.d.ts +5 -2
  32. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.d.ts +23 -0
  33. package/dist/src/components/KgSearch/components/KgSearch.ConfigModal.data.d.ts +5 -0
  34. package/dist/src/components/KgSearch/index.d.ts +1 -1
  35. package/dist/src/components/KgSearch/index.hooks.d.ts +4 -3
  36. package/dist/src/components/KgSearch/index.vm.d.ts +1 -0
  37. package/dist/src/components/KgSubmit/KgSubmit.d.ts +8 -0
  38. package/dist/src/components/KgSubmit/KgSubmit.hooks.d.ts +7 -0
  39. package/dist/src/components/KgSubmit/index.d.ts +4 -0
  40. package/dist/src/components/KgSubmit/index.hooks.d.ts +17 -0
  41. package/dist/src/components/KgSubmit/index.store.d.ts +35 -0
  42. package/dist/src/components/KgSubmit/index.vm.d.ts +5 -0
  43. package/dist/src/components/KgTable/KgTable.d.ts +1 -1
  44. package/dist/src/components/KgTable/{KgTable.Cell.d.ts → components/KgTable.Cell.d.ts} +3 -3
  45. package/dist/src/components/KgTable/components/KgTable.Setting.d.ts +6 -0
  46. package/dist/src/components/KgTable/index.d.ts +1 -1
  47. package/dist/src/components/KgTable/index.hooks.d.ts +3 -2
  48. package/dist/src/components/KgTable/index.store.d.ts +7 -7
  49. package/dist/src/components/KgTable/index.vm.d.ts +17 -0
  50. package/dist/src/components/KgVar/KgVar.d.ts +8 -16
  51. package/dist/src/components/KgVar/index.d.ts +1 -1
  52. package/dist/src/components/KgVar/index.store.d.ts +37 -4
  53. package/dist/src/components/KgVar/index.store.service.d.ts +12 -0
  54. package/dist/src/components/KgVar/index.vm.d.ts +3 -0
  55. package/dist/src/components/KgVarConfig/components/var/KgVarConfig.Modal.Var.Vars.data.d.ts +1 -1
  56. package/dist/src/components/KgYesOrNo/KgYesOrNo.d.ts +1 -1
  57. package/dist/src/components/KgYesOrNo/index.d.ts +1 -1
  58. package/dist/src/components/index.d.ts +6 -3
  59. package/dist/src/consts/i18n/en.d.ts +9 -0
  60. package/dist/src/consts/i18n/index.d.ts +18 -0
  61. package/dist/src/consts/i18n/zh_CN.d.ts +9 -0
  62. package/dist/src/consts/index.d.ts +1 -1
  63. package/dist/src/consts/index.vm.d.ts +2 -0
  64. package/dist/src/utils/dom.util.d.ts +12 -0
  65. package/dist/src/utils/index.d.ts +1 -0
  66. package/dist/src/utils/kg.util.d.ts +5 -0
  67. package/dist/src/utils/logger.util.d.ts +3 -3
  68. package/package.json +1 -1
  69. package/dist/src/components/KgButton/KgButton.Create.d.ts +0 -32
  70. package/dist/src/components/KgButton/KgButton.Search.d.ts +0 -33
  71. package/dist/src/components/KgButton/KgButton.Update.d.ts +0 -32
  72. package/dist/src/components/KgButton/KgButtons.d.ts +0 -22
  73. package/dist/src/components/KgTable/KgTable.Setting.d.ts +0 -22
  74. /package/dist/src/components/KgModal/{KgModal.Close.d.ts → components/KgModal.Close.d.ts} +0 -0
  75. /package/dist/src/components/KgTable/{KgTable.Info.d.ts → components/KgTable.Info.d.ts} +0 -0
@@ -0,0 +1,23 @@
1
+ import { ExtractPropTypes, PropType } from 'vue';
2
+ import './KgSearch.ConfigModal.less';
3
+ export declare const getProps: () => {
4
+ visible: PropType<boolean>;
5
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
6
+ /** 主页面的页面标识. */
7
+ hostFormID: PropType<string>;
8
+ };
9
+ export declare type IKgSearchConfigModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
10
+ declare const _default: import("vue").DefineComponent<{
11
+ visible: PropType<boolean>;
12
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
13
+ /** 主页面的页面标识. */
14
+ hostFormID: PropType<string>;
15
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
16
+ visible: PropType<boolean>;
17
+ 'onUpdate:visible': PropType<(value: boolean) => void>;
18
+ /** 主页面的页面标识. */
19
+ hostFormID: PropType<string>;
20
+ }>> & {
21
+ "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
22
+ }, {}>;
23
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { ColumnsType } from 'ant-design-vue/es/table';
2
+ import { VarProfileDetail } from '../../../apis/WMS/models';
3
+ export declare const FORM_ID = "kg-search-config-modal";
4
+ export declare const leftVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
5
+ export declare const rightVarProfileDetailColumns: (hostFormID: string) => ColumnsType<VarProfileDetail>;
@@ -1,3 +1,3 @@
1
- export { default as KgSearch, type KgSearchProps } from './KgSearch';
1
+ export { default as KgSearch, type IKgSearchProps } from './KgSearch';
2
2
  export * from './index.hooks';
3
3
  export * from './index.store';
@@ -1,4 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
+ import { IRemoveEventListenerHandler } from '../../consts/index.vm';
2
3
  import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
3
4
  export declare type IUseKgSearch = {
4
5
  formID: string;
@@ -8,18 +9,18 @@ export declare type IUseKgSearch = {
8
9
  * 监听事件: search, 点击查询按钮, 并且表单验证通过.
9
10
  * @param cb 回调函数.
10
11
  */
11
- onSearch(cb: IKgSearchSearchCb): void;
12
+ onSearch(cb: IKgSearchSearchCb): IRemoveEventListenerHandler;
12
13
  /**
13
14
  * 监听事件: reset, 点击重置按钮.
14
15
  * @param cb 回调函数.
15
16
  */
16
- onReset(cb: IKgSearchResetCb): void;
17
+ onReset(cb: IKgSearchResetCb): IRemoveEventListenerHandler;
17
18
  /**
18
19
  * 监听事件: ready, 查询字段初始完成, 查询组件渲染完成.
19
20
  * @param cb 回调函数.
20
21
  * @param once 是否只会触发一次.
21
22
  * */
22
- onReady(cb: IKgSearchReadyCb, once?: boolean): void;
23
+ onReady(cb: IKgSearchReadyCb, once?: boolean): IRemoveEventListenerHandler;
23
24
  /** 是否准备就绪. 即查询条件是否已经初始化完成了. */
24
25
  isReady: ComputedRef<ReturnType<IKgSearchStore['getIsReady']>>;
25
26
  /** 表单数据对象. */
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import './KgSubmit.less';
3
+ export declare const getProps: () => any;
4
+ export declare type IKgSubmitProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
5
+ declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
6
+ [x: string]: any;
7
+ }>;
8
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * 表单数据对象.
4
+ */
5
+ export declare function _useFormModel(): {
6
+ model: Ref<Record<string, any>>;
7
+ };
@@ -0,0 +1,4 @@
1
+ export { default as KgSubmit, type IKgSubmitProps } from './KgSubmit';
2
+ export * from './index.hooks';
3
+ export * from './index.store';
4
+ export * from './index.vm';
@@ -0,0 +1,17 @@
1
+ import { IRemoveEventListenerHandler } from '../../consts/index.vm';
2
+ import { IKgSubmitBeforeOkCb, IKgSubmitCloseCb, IKgSubmitOpenCb, IKgSubmitStore } from './index.store';
3
+ export declare type IUseKgSubmit = {
4
+ formID: string;
5
+ /** 状态数据. */
6
+ store: IKgSubmitStore;
7
+ /** 监听事件: 打开抽屉. */
8
+ onOpen(cb: IKgSubmitOpenCb): IRemoveEventListenerHandler;
9
+ /** 监听事件: 关闭抽屉. */
10
+ onClose(cb: IKgSubmitCloseCb): IRemoveEventListenerHandler;
11
+ /** 监听事件: 点击保存按钮之后, 执行默认逻辑之前. */
12
+ onBeforeOk(cb: IKgSubmitBeforeOkCb): IRemoveEventListenerHandler;
13
+ };
14
+ /**
15
+ * @param formID 界面标识.
16
+ */
17
+ export declare function useKgSubmit(formID?: string): IUseKgSubmit;
@@ -0,0 +1,35 @@
1
+ import { StoreDefinition } from 'pinia';
2
+ import { Ref } from 'vue';
3
+ /**
4
+ * 事件类型.
5
+ * 'open': 打开抽屉
6
+ * 'close': 关闭抽屉
7
+ * 'beforeOk': 点击保存按钮之后, 执行默认逻辑之前
8
+ */
9
+ export declare type IKgSubmitEvent = 'open' | 'close' | 'beforeOk';
10
+ /** 事件监听函数: open. */
11
+ export declare type IKgSubmitOpenCb = (args?: any | null) => void;
12
+ /** 事件监听函数: close. */
13
+ export declare type IKgSubmitCloseCb = (args?: any | null) => void;
14
+ /** 事件监听函数: beforeOk. */
15
+ export declare type IKgSubmitBeforeOkCb = (model: Ref<Record<string, any>>) => void;
16
+ export declare type IKgSubmitCb = IKgSubmitOpenCb | IKgSubmitCloseCb | IKgSubmitBeforeOkCb;
17
+ export interface IKgSubmitState {
18
+ openListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
19
+ closeListenersMap: Map<string, Array<IKgSubmitCloseCb>>;
20
+ beforeOkListenersMap: Map<string, Array<IKgSubmitBeforeOkCb>>;
21
+ }
22
+ export declare type IKgSubmitStoreDefinition = StoreDefinition<'KgSubmit', IKgSubmitState, {}, {
23
+ dispose(formID?: string | null): void;
24
+ addEventListener(formID: string, event: IKgSubmitEvent, cb: IKgSubmitCb): void;
25
+ removeEventListener(formID: string, event: IKgSubmitEvent, cb?: IKgSubmitCb): void;
26
+ /**
27
+ * 触发事件.
28
+ * @param formID 界面标识.
29
+ * @param event 事件名称.
30
+ * @param args 数据.
31
+ */
32
+ emit(formID: string, event: IKgSubmitEvent, args?: any | null): void;
33
+ }>;
34
+ export declare type IKgSubmitStore = ReturnType<IKgSubmitStoreDefinition>;
35
+ export declare const useKgSubmitStore: () => IKgSubmitStoreDefinition;
@@ -0,0 +1,5 @@
1
+ export declare const DEFAULT_MIN_WIDTH = 300;
2
+ export declare const DEFAULT_MAX_WIDTH = 1200;
3
+ export declare const DEFAULT_WIDTH = 600;
4
+ export declare const DEFAULT_LAYOUT = "vertical";
5
+ export declare const DEFAULT_LABEL_COL = 4;
@@ -4,7 +4,7 @@ export declare const getProps: () => {
4
4
  /** 查询条件的界面标识. 表格可能没有自己的查询条件, 而是用的别人的查询条件, 比如多个表格公用一个查询条件, 此时可以传入该参数. */
5
5
  kgSearchFormID: PropType<string | null>;
6
6
  };
7
- export declare type KgTableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
7
+ export declare type IKgTableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
8
8
  declare const _default: import("vue").DefineComponent<{
9
9
  /** 查询条件的界面标识. 表格可能没有自己的查询条件, 而是用的别人的查询条件, 比如多个表格公用一个查询条件, 此时可以传入该参数. */
10
10
  kgSearchFormID: PropType<string | null>;
@@ -2,18 +2,18 @@ import { PropType } from 'vue';
2
2
  import './KgTable.Cell.less';
3
3
  export declare const getProps: () => {
4
4
  /** 列值. */
5
- kgValue: PropType<any>; /** 列值. */
5
+ kgValue: PropType<any>;
6
6
  /** 变量名称. */
7
7
  kgVarName: PropType<string | null>;
8
8
  };
9
9
  declare const _default: import("vue").DefineComponent<{
10
10
  /** 列值. */
11
- kgValue: PropType<any>; /** 列值. */
11
+ kgValue: PropType<any>;
12
12
  /** 变量名称. */
13
13
  kgVarName: PropType<string | null>;
14
14
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  /** 列值. */
16
- kgValue: PropType<any>; /** 列值. */
16
+ kgValue: PropType<any>;
17
17
  /** 变量名称. */
18
18
  kgVarName: PropType<string | null>;
19
19
  }>>, {}>;
@@ -0,0 +1,6 @@
1
+ import './KgTable.Setting.less';
2
+ export declare const getProps: () => any;
3
+ declare const _default: import("vue").DefineComponent<any, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<any>, {} | {
4
+ [x: string]: any;
5
+ }>;
6
+ export default _default;
@@ -1,4 +1,4 @@
1
- export { default as KgTable, type KgTableProps } from './KgTable';
1
+ export { default as KgTable, type IKgTableProps } from './KgTable';
2
2
  export * from './index.hooks';
3
3
  export * from './index.store';
4
4
  export * from './index.vm';
@@ -1,4 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
+ import { IRemoveEventListenerHandler } from '../../consts/index.vm';
2
3
  import { IKgTableRetrieveCb, IKgTableRowDoubleClickCb, IKgTableStore } from './index.store';
3
4
  export declare type IUseKgTable = {
4
5
  formID: string;
@@ -9,9 +10,9 @@ export declare type IUseKgTable = {
9
10
  /** 是否正在查询. */
10
11
  isRetrieving: ComputedRef<ReturnType<IKgTableStore['getIsRetrieving']>>;
11
12
  /** 监听事件: 双击某行. */
12
- onRowDoubleClick(cb: IKgTableRowDoubleClickCb): void;
13
+ onRowDoubleClick(cb: IKgTableRowDoubleClickCb): IRemoveEventListenerHandler;
13
14
  /** 监听事件: 查询数据成功. */
14
- onRetrieve(cb: IKgTableRetrieveCb): void;
15
+ onRetrieve(cb: IKgTableRetrieveCb): IRemoveEventListenerHandler;
15
16
  };
16
17
  /**
17
18
  * @param formID 界面标识.
@@ -1,15 +1,15 @@
1
1
  import { StoreDefinition } from 'pinia';
2
- import { IKgTableRecord } from './index.vm';
3
2
  import { IPage } from '../../apis/WMS/models';
3
+ import { IKgTableRecord } from './index.vm';
4
4
  /**
5
5
  * 事件类型.
6
6
  * 'rowDoubleClick': 双击某行
7
7
  * 'retrieve': 查询数据成功
8
8
  */
9
9
  export declare type IKgTableEvent = 'rowDoubleClick' | 'retrieve';
10
- /** 事件监听函数: 双击某行. */
10
+ /** 事件监听函数: rowDoubleClick. */
11
11
  export declare type IKgTableRowDoubleClickCb = (record: IKgTableRecord) => void;
12
- /** 事件监听函数: 查询数据成功. */
12
+ /** 事件监听函数: retrieve. */
13
13
  export declare type IKgTableRetrieveCb = (page: IPage<IKgTableRecord> | undefined | null) => void;
14
14
  export declare type IKgTableCb = IKgTableRowDoubleClickCb | IKgTableRetrieveCb;
15
15
  export interface IKgTableState {
@@ -35,10 +35,10 @@ export declare type IKgTableStoreDefinition = StoreDefinition<'KgTable', IKgTabl
35
35
  getIsRetrieving(): (formID?: string | null) => boolean | null;
36
36
  getTableWidth(): (formID?: string | null) => number | null;
37
37
  }, {
38
- dispose: (formID?: string | null) => void;
39
- addEventListener: (formID: string, event: IKgTableEvent, cb: IKgTableCb) => void;
40
- removeEventListener: (formID: string, event: IKgTableEvent, cb?: IKgTableCb) => void;
41
- emit: (formID: string, event: IKgTableEvent, record?: any | null) => void;
38
+ dispose(formID?: string | null): void;
39
+ addEventListener(formID: string, event: IKgTableEvent, cb: IKgTableCb): void;
40
+ removeEventListener(formID: string, event: IKgTableEvent, cb?: IKgTableCb): void;
41
+ emit(formID: string, event: IKgTableEvent, args?: any | null): void;
42
42
  setSelectedRows(formID: string, selectedRows: Array<IKgTableRecord>): void;
43
43
  setIsRetrieved(formID: string, value: boolean): void;
44
44
  setIsRetrieving(formID: string, value: boolean): void;
@@ -15,6 +15,23 @@ export interface IKgTableBodyCell<T = {}> {
15
15
  column: ColumnType;
16
16
  defaultRender: JSX.Element;
17
17
  }
18
+ /**
19
+ * 对应于 {@link VarGridDetail.display_type_properties} 字段, 不同显示类型的参数.
20
+ */
21
+ export interface IKgTableCellDisplayTypeProperties {
22
+ YN: {
23
+ /**
24
+ * 显示为'是'的值.
25
+ * @default 1
26
+ */
27
+ yValue: any;
28
+ /**
29
+ * 显示为'否'的值.
30
+ * @default 0
31
+ */
32
+ nValue: any;
33
+ };
34
+ }
18
35
  /** 列的默认宽度. 如果 VarGridDetail 没有配置宽度, 则使用该宽度. */
19
36
  export declare const KG_TABLE_TD_DEFAULT_WIDTH = 120;
20
37
  /** 列的最小宽度. 拖动修改列的宽度时, 不允许超过该最小宽度. */
@@ -1,23 +1,15 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
2
  import './KgVar.less';
3
3
  export declare const getProps: () => {
4
- TODO: {
5
- type: PropType<boolean>;
6
- default: boolean;
7
- };
4
+ /** 插槽. */
5
+ kgSlots: PropType<Record<string, any>>;
8
6
  };
9
- export declare type KgVarProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
7
+ export declare type IKgVarProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
10
8
  declare const _default: import("vue").DefineComponent<{
11
- TODO: {
12
- type: PropType<boolean>;
13
- default: boolean;
14
- };
9
+ /** 插槽. */
10
+ kgSlots: PropType<Record<string, any>>;
15
11
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
16
- TODO: {
17
- type: PropType<boolean>;
18
- default: boolean;
19
- };
20
- }>>, {
21
- TODO: boolean;
22
- }>;
12
+ /** 插槽. */
13
+ kgSlots: PropType<Record<string, any>>;
14
+ }>>, {}>;
23
15
  export default _default;
@@ -1,3 +1,3 @@
1
- export { default as KgVar, type KgVarProps } from './KgVar';
1
+ export { default as KgVar, type IKgVarProps } from './KgVar';
2
2
  export * from './index.hooks';
3
3
  export * from './index.store';
@@ -1,5 +1,5 @@
1
1
  import { type StoreDefinition } from 'pinia';
2
- import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitField } from '../../apis/WMS/models';
2
+ import { VarButton, VarCatalog, VarConfig, VarGridConfig, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarLookup, VarPossibility, VarProfileConfig, VarProfileDetail, VarProfileDTO, VarProfileMasterDTO, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
3
3
  export interface IKgVarState {
4
4
  /**
5
5
  * 当前可能打开了多个界面, 需要按照先后顺序记录下来, 当打开变量配置弹窗时, 打开的是最近那个页面的变量配置.
@@ -20,18 +20,20 @@ export interface IKgVarState {
20
20
  varPossibilitiesMap: Map<string, Array<VarPossibility>>;
21
21
  varConfigsMap: Map<string, Array<VarConfig>>;
22
22
  varButtonsMap: Map<string, Array<VarButton>>;
23
+ varSubmitConfigMap: Map<string, VarSubmitConfig | null>;
23
24
  varSubmitFieldsMap: Map<string, Array<VarSubmitField>>;
25
+ varProfileConfigMap: Map<string, VarProfileConfig | null>;
24
26
  varProfileMap: Map<string, {
25
27
  varProfile: VarProfileDTO | null;
26
28
  /** 当前选中的 VarProfileMaster ID. */
27
29
  currentVarProfileMasterID: string | null;
28
30
  }>;
31
+ varGridConfigMap: Map<string, VarGridConfig | null>;
29
32
  varGridMap: Map<string, {
30
33
  varGrid: VarGridDTO | null;
31
34
  /** 当前表格视图. */
32
35
  currentVarGridMasterID: string | null;
33
36
  }>;
34
- varGridConfigMap: Map<string, VarGridConfig | null>;
35
37
  }
36
38
  export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState, {
37
39
  getCurrentFormID(): string | null;
@@ -49,13 +51,44 @@ export declare type IKgVarStoreDefinition = StoreDefinition<'KgVar', IKgVarState
49
51
  getVarPossibility(): (formID?: string | null, var_nam?: string | null) => VarPossibility | null;
50
52
  getVarConfig(): (formID?: string | null, var_nam?: string | null) => VarConfig | null;
51
53
  getVarButtons(): (formID?: string | null) => Array<VarButton> | null;
54
+ getVarSubmitConfig(): (formID?: string | null) => VarSubmitConfig | null;
55
+ /** 获取所有提交字段. */
52
56
  getVarSubmitFields(): (formID?: string | null) => Array<VarSubmitField> | null;
57
+ /** 获取创建时的提交字段. */
58
+ getVarSubmitFieldsForCreate(): (formID?: string | null) => Array<VarSubmitField> | null;
59
+ /** 获取创建时的提交字段: 关键字段. */
60
+ getVarSubmitFieldsForCreateKey(): (formID?: string | null) => Array<VarSubmitField> | null;
61
+ /** 获取创建时的提交字段: 不是关键字段. */
62
+ getVarSubmitFieldsForCreateNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
63
+ /** 获取更新时的提交字段. */
64
+ getVarSubmitFieldsForUpdate(): (formID?: string | null) => Array<VarSubmitField> | null;
65
+ /** 获取更新时的提交字段: 关键字段. */
66
+ getVarSubmitFieldsForUpdateKey(): (formID?: string | null) => Array<VarSubmitField> | null;
67
+ /** 获取更新时的提交字段: 不是关键字段. */
68
+ getVarSubmitFieldsForUpdateNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
69
+ /** 获取复制时的提交字段. */
70
+ getVarSubmitFieldsForCopy(): (formID?: string | null) => Array<VarSubmitField> | null;
71
+ /** 获取复制时的提交字段: 关键字段. */
72
+ getVarSubmitFieldsForCopyKey(): (formID?: string | null) => Array<VarSubmitField> | null;
73
+ /** 获取复制时的提交字段: 不是关键字段. */
74
+ getVarSubmitFieldsForCopyNotKey(): (formID?: string | null) => Array<VarSubmitField> | null;
53
75
  getVarSubmitField(): (formID?: string | null, var_nam?: string | null) => VarSubmitField | null;
54
- getVarButtonSearch(): (formID?: string | null) => VarButton | null;
55
76
  getVarButton(): (formID?: string | null, var_nam?: string | null) => VarButton | null;
77
+ getVarButtonSearch(): (formID?: string | null) => VarButton | null;
78
+ getVarButtonCreate(): (formID?: string | null) => VarButton | null;
79
+ getVarButtonUpdate(): (formID?: string | null) => VarButton | null;
80
+ getVarButtonCopy(): (formID?: string | null) => VarButton | null;
81
+ getVarProfileConfig(): (formID?: string | null) => VarProfileConfig | null;
56
82
  getVarProfileMasters(): (formID?: string | null) => Array<VarProfileMasterDTO> | null;
57
- getVarProfileDetails(): (formID?: string | null) => Array<VarProfileDetail> | null;
58
83
  getVarProfileDetail(): (formID?: string | null, var_nam?: string | null) => VarProfileDetail | null;
84
+ /**
85
+ * 根据 formID 获取 VarProfileDetail 列表.
86
+ */
87
+ getVarProfileDetails(): (formID?: string | null) => Array<VarProfileDetail> | null;
88
+ /**
89
+ * 根据 formID 获取系统的 VarProfileDetail 列表, 即 customLevel 为 0 的 VarProfileMaster 下面的所有 VarProfileDetail.
90
+ */
91
+ getSystemVarProfileDetails(): (formID?: string | null) => Array<VarProfileDetail> | null;
59
92
  getCurrentVarProfileMaster(): (formID?: string | null) => VarProfileMasterDTO | null;
60
93
  getCurrentVarProfileMasterID(): (formID?: string | null) => string | null;
61
94
  getVarGridConfig(): (formID?: string | null) => VarGridConfig | null;
@@ -0,0 +1,12 @@
1
+ import { VarButton, VarGridDetail, VarGridDTO, VarGridMasterDTO, VarSubmitConfig, VarSubmitField } from '../../apis/WMS/models';
2
+ export declare function transformVarGridDTO(varGridDTO?: VarGridDTO | null): VarGridDTO | null;
3
+ export declare function transformVarProfileMasterDTOs(varGridMasterDTOs?: Array<VarGridMasterDTO> | null): Array<VarGridMasterDTO>;
4
+ export declare function transformVarSubmitConfig(varSubmitConfig?: VarSubmitConfig | null): VarSubmitConfig | null;
5
+ export declare function transformVarSubmitFields(varSubmitFields?: Array<VarSubmitField> | null): Array<VarSubmitField>;
6
+ export declare function transformVarButtons(varButtons?: Array<VarButton> | null): Array<VarButton>;
7
+ /**
8
+ * 处理 VarGridDetail 数据, 排序/防呆.
9
+ *
10
+ * @param varGridDetails 原始数据.
11
+ */
12
+ export declare function transformVarGridDetails(varGridDetails?: Array<VarGridDetail> | null): Array<VarGridDetail>;
@@ -0,0 +1,3 @@
1
+ import { InjectionKey } from 'vue';
2
+ /** 注入 kgSlots 参数. */
3
+ export declare const DI_KG_SLOTS: InjectionKey<Record<string, any> | undefined>;
@@ -1,3 +1,3 @@
1
1
  import { ColumnsType } from 'ant-design-vue/es/table';
2
2
  import { VarContext } from '../../../../apis/WMS/models';
3
- export declare const columns: ColumnsType<VarContext>;
3
+ export declare const columns: () => ColumnsType<VarContext>;
@@ -10,7 +10,7 @@ export declare const getProps: () => {
10
10
  default: boolean;
11
11
  };
12
12
  };
13
- export declare type KgYesOrNoProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
13
+ export declare type IKgYesOrNoProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
14
14
  declare const _default: import("vue").DefineComponent<{
15
15
  /**
16
16
  * 布尔数据.
@@ -1 +1 @@
1
- export { default as KgYesOrNo, type KgYesOrNoProps } from './KgYesOrNo';
1
+ export { default as KgYesOrNo, type IKgYesOrNoProps } from './KgYesOrNo';
@@ -1,11 +1,14 @@
1
- export * from './KgButton';
2
1
  export * from './KgModal';
3
2
  export * from './KgProgressA';
4
3
  export * from './KgResizable';
5
4
  export * from './KgSearch';
5
+ export * from './KgSubmit';
6
6
  export * from './KgTable';
7
7
  export * from './KgVar';
8
8
  export * from './KgVarConfig';
9
9
  export * from './KgYesOrNo';
10
- export { default as KgForm, type IKgFormProps } from './KgForm';
11
- export { KgFormItem, type IKgFormItemProps } from './KgForm.Item';
10
+ export * from './KgButton';
11
+ export { default as KgButton } from './KgButton';
12
+ export * from './KgForm';
13
+ export { default as KgForm } from './KgForm';
14
+ export * from './KgForm.Item';
@@ -3,6 +3,12 @@ declare const _default: {
3
3
  KgSearch: {
4
4
  title: string;
5
5
  };
6
+ KgSearchConfigModal: {
7
+ close: string;
8
+ formTitle: string;
9
+ pleaseSelectVarProfileMaster: string;
10
+ title: string;
11
+ };
6
12
  KgTable: {
7
13
  column: string;
8
14
  emptyText: string;
@@ -48,7 +54,9 @@ declare const _default: {
48
54
  confirm: string;
49
55
  confirmDelete: string;
50
56
  copy: string;
57
+ copySuccess: string;
51
58
  create: string;
59
+ createSuccess: string;
52
60
  delete: string;
53
61
  deleteSuccess: string;
54
62
  edit: string;
@@ -65,6 +73,7 @@ declare const _default: {
65
73
  show: string;
66
74
  tip: string;
67
75
  update: string;
76
+ updateSuccess: string;
68
77
  yes: string;
69
78
  };
70
79
  };
@@ -4,6 +4,12 @@ export declare const KG_I18N: {
4
4
  KgSearch: {
5
5
  title: string;
6
6
  };
7
+ KgSearchConfigModal: {
8
+ close: string;
9
+ formTitle: string;
10
+ pleaseSelectVarProfileMaster: string;
11
+ title: string;
12
+ };
7
13
  KgTable: {
8
14
  column: string;
9
15
  emptyText: string;
@@ -49,7 +55,9 @@ export declare const KG_I18N: {
49
55
  confirm: string;
50
56
  confirmDelete: string;
51
57
  copy: string;
58
+ copySuccess: string;
52
59
  create: string;
60
+ createSuccess: string;
53
61
  delete: string;
54
62
  deleteSuccess: string;
55
63
  edit: string;
@@ -66,6 +74,7 @@ export declare const KG_I18N: {
66
74
  show: string;
67
75
  tip: string;
68
76
  update: string;
77
+ updateSuccess: string;
69
78
  yes: string;
70
79
  };
71
80
  };
@@ -74,6 +83,12 @@ export declare const KG_I18N: {
74
83
  KgSearch: {
75
84
  title: string;
76
85
  };
86
+ KgSearchConfigModal: {
87
+ close: string;
88
+ formTitle: string;
89
+ pleaseSelectVarProfileMaster: string;
90
+ title: string;
91
+ };
77
92
  KgTable: {
78
93
  column: string;
79
94
  emptyText: string;
@@ -118,7 +133,9 @@ export declare const KG_I18N: {
118
133
  confirm: string;
119
134
  confirmDelete: string;
120
135
  copy: string;
136
+ copySuccess: string;
121
137
  create: string;
138
+ createSuccess: string;
122
139
  delete: string;
123
140
  deleteSuccess: string;
124
141
  edit: string;
@@ -135,6 +152,7 @@ export declare const KG_I18N: {
135
152
  show: string;
136
153
  tip: string;
137
154
  update: string;
155
+ updateSuccess: string;
138
156
  yes: string;
139
157
  };
140
158
  };
@@ -3,6 +3,12 @@ declare const _default: {
3
3
  KgSearch: {
4
4
  title: string;
5
5
  };
6
+ KgSearchConfigModal: {
7
+ close: string;
8
+ formTitle: string;
9
+ pleaseSelectVarProfileMaster: string;
10
+ title: string;
11
+ };
6
12
  KgTable: {
7
13
  column: string;
8
14
  emptyText: string;
@@ -47,7 +53,9 @@ declare const _default: {
47
53
  confirm: string;
48
54
  confirmDelete: string;
49
55
  copy: string;
56
+ copySuccess: string;
50
57
  create: string;
58
+ createSuccess: string;
51
59
  delete: string;
52
60
  deleteSuccess: string;
53
61
  edit: string;
@@ -64,6 +72,7 @@ declare const _default: {
64
72
  show: string;
65
73
  tip: string;
66
74
  update: string;
75
+ updateSuccess: string;
67
76
  yes: string;
68
77
  };
69
78
  };
@@ -43,7 +43,7 @@ export declare const enum KG_CONTROL_TYPE {
43
43
  /** 表单控件所处环境. */
44
44
  export declare const enum KG_CONTROL_CONTEXT {
45
45
  /** 位于查询条件. */
46
- PROFILE = "PROFILE",
46
+ SEARCH = "SEARCH",
47
47
  /** 位于表单(创建/更新/复制/...). */
48
48
  SUBMIT = "SUBMIT"
49
49
  }
@@ -0,0 +1,2 @@
1
+ /** 移除监听函数. */
2
+ export declare type IRemoveEventListenerHandler = () => void;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * DOM 工具.
3
+ */
4
+ export declare class DomUtil {
5
+ /**
6
+ * 判断元素是否不能响应点击事件.
7
+ * 如果不想让某个元素响应点击事件, 则可以给它的父元素加上 kg-not-clickable 样式类.
8
+ * @param el 元素.
9
+ * @param classes 除了 kg-not-clickable 之外额外需要判断的样式类.
10
+ */
11
+ static isNotClickable(el?: Element | null, classes?: Array<string>): boolean;
12
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './app.util';
2
+ export * from './dom.util';
2
3
  export * from './kg.util';
3
4
  export * from './logger.util';
4
5
  export * from './route.util';
@@ -55,6 +55,11 @@ export declare class KgUtil {
55
55
  * @param e 错误对象.
56
56
  */
57
57
  static throwIfNotFormError(e: any): void;
58
+ /**
59
+ * 将 JSON 字符串转换为 JSON 对象, 如果转化失败, 则返回空对象.
60
+ * @param str JSON 字符串.
61
+ */
62
+ static tryParseJSON(str?: string | null): Record<string, any>;
58
63
  /**
59
64
  * 将值转换为 Dayjs 对象.
60
65
  * @param value 值.