@kengic/vue 0.23.3-beta.2 → 0.23.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. package/dist/index.css +1 -1
  2. package/dist/kengic-vue.js +3816 -3423
  3. package/dist/search-outlined.8364f123.mjs +8 -0
  4. package/dist/src/components/KgAppSelect/index.hooks.d.ts +8 -8
  5. package/dist/src/components/KgAppSelect/index.store.d.ts +4 -4
  6. package/dist/src/components/KgButton/KgButton.Item.d.ts +3 -3
  7. package/dist/src/components/KgButton/KgButton.Item.data.d.ts +2 -2
  8. package/dist/src/components/KgButton/components/KgButton.Copy.d.ts +3 -3
  9. package/dist/src/components/KgButton/components/KgButton.Create.d.ts +5 -5
  10. package/dist/src/components/KgButton/components/KgButton.Delete.d.ts +3 -3
  11. package/dist/src/components/KgButton/components/KgButton.Export.d.ts +3 -3
  12. package/dist/src/components/KgButton/components/KgButton.Import.d.ts +3 -3
  13. package/dist/src/components/KgButton/components/{KgButton.ExportTemplate.d.ts → KgButton.ImportTemplate.d.ts} +3 -3
  14. package/dist/src/components/KgButton/components/KgButton.Other.d.ts +2 -2
  15. package/dist/src/components/KgButton/components/KgButton.Search.d.ts +3 -3
  16. package/dist/src/components/KgButton/components/KgButton.Update.d.ts +3 -3
  17. package/dist/src/components/KgButton/index.hooks.d.ts +46 -40
  18. package/dist/src/components/KgButton/index.store.d.ts +13 -12
  19. package/dist/src/components/KgForm/index.hooks.d.ts +28 -28
  20. package/dist/src/components/KgForm/index.store.d.ts +11 -5
  21. package/dist/src/components/KgForm.Item/KgForm.Item.service.d.ts +3 -3
  22. package/dist/src/components/KgForm.Item/components/KgForm.Item.RadioGroup.d.ts +2 -2
  23. package/dist/src/components/KgForm.Item/components/KgForm.Item.Select.d.ts +0 -4
  24. package/dist/src/components/KgSearch/index.hooks.d.ts +12 -12
  25. package/dist/src/components/KgSearch/index.store.d.ts +4 -4
  26. package/dist/src/components/KgSubmit/index.hooks.d.ts +39 -39
  27. package/dist/src/components/KgSubmit/index.store.d.ts +8 -8
  28. package/dist/src/components/KgTable/index.hooks.d.ts +34 -34
  29. package/dist/src/components/KgTable/index.store.d.ts +12 -6
  30. package/dist/src/components/KgVar/index.hooks.d.ts +7 -7
  31. package/dist/src/components/KgVar/index.store.d.ts +6 -7
  32. package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButton.d.ts +1 -1
  33. package/dist/src/components/KgVarConfig/components/button/KgVarConfig.Modal.Button.VarButtonConfig.d.ts +6 -12
  34. package/dist/src/components/KgWarehouse/index.hooks.d.ts +4 -4
  35. package/dist/src/components/KgWarehouse/index.store.d.ts +4 -4
  36. package/dist/src/components/util.d.ts +5 -5
  37. package/dist/src/consts/index.vm.d.ts +42 -14
  38. package/dist/src/utils/kg.util.d.ts +2 -2
  39. package/dist/upload-outlined.7ffb99b8.mjs +8 -0
  40. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { ComputedRef } from 'vue';
2
- import { IRemoveEventListenerHandler, KG_BUTTON_TYPE } from '../../consts';
2
+ import { IRemoveEventListenerHandler, KG__VAR_BUTTON__TYPE } from '../../consts';
3
3
  import { IUseKgButton } from '../KgButton';
4
4
  import { IUseKgForm } from '../KgForm';
5
5
  import { type IUseKgSearch } from '../KgSearch';
@@ -38,12 +38,12 @@ export declare type IUseKgVar = {
38
38
  * </li>
39
39
  * </ul>
40
40
  *
41
- * @param param.buttonType <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG_BUTTON_TYPE}.</p>
41
+ * @param param.buttonType <p>按钮的类型, 对应的是 {@link VarButton.typ} 属性, 取值请参考 {@link KG__VAR_BUTTON__TYPE}.</p>
42
42
  * @param param.buttonVarName <p>按钮的变量名称, 对应的是 {@link VarButton.var_nam} 属性.</p>
43
43
  * @param param.varName 提交表单字段的变量名, 对应的是 {@link VarConfigControl.var_nam} 属性.
44
44
  */
45
45
  getVarConfigControl(param: {
46
- buttonType?: KG_BUTTON_TYPE;
46
+ buttonType?: KG__VAR_BUTTON__TYPE;
47
47
  buttonVarName?: string | null;
48
48
  varName: string | null | undefined;
49
49
  }): ReturnType<IKgVarStore['getVarConfigControl']>;
@@ -92,12 +92,12 @@ export declare type IUseKgVar = {
92
92
  */
93
93
  level: ComputedRef<ReturnType<IKgVarStore['getLevel']>>;
94
94
  /**
95
- * 事件: 变量配置数据查询完成.
95
+ * 监听事件: 变量配置数据查询完成.
96
96
  *
97
- * @param cb 回调函数.
98
- * @param once 是否只会触发一次. 默认为 undefined.
97
+ * @param listener 事件监听函数.
98
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
99
99
  */
100
- onRetrieve(cb: IKgVarRetrieveEventListener, once?: boolean): IRemoveEventListenerHandler;
100
+ onRetrieve(listener: IKgVarRetrieveEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
101
101
  /**
102
102
  * 查询所有变量配置.
103
103
  *
@@ -1,6 +1,6 @@
1
1
  import { StoreDefinition } from 'pinia';
2
2
  import { VarButton, VarButtonConfig, VarConfigControl, VarConfigDescription, VarConfigInput, VarConfigLookup, VarConfigPossibility, VarConfigTip, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileDetail, VarProfileMasterDTO, VarSubmitConfig, VarSubmitDetail } from '../../apis/WMS/models';
3
- import { IKgEventListener, KG_BUTTON_TYPE } from '../../consts';
3
+ import { IKgEventListener, KG__VAR_BUTTON__TYPE } from '../../consts';
4
4
  /**
5
5
  * 事件类型.
6
6
  * 'retrieve': 变量配置查询完成
@@ -97,13 +97,12 @@ export interface IUseKgVarStoreGetters {
97
97
  * 和 var_nam 获取 VarButton.
98
98
  */
99
99
  getVarButton(): (formID: string | null | undefined, varName: string | null | undefined) => VarButton | null;
100
- getVarButtonConfig(): (formID: string | null | undefined) => VarButtonConfig | null;
101
100
  getVarButtonCopy(): (formID: string | null | undefined) => VarButton | null;
102
101
  getVarButtonCreate(): (formID: string | null | undefined) => VarButton | null;
103
102
  getVarButtonDelete(): (formID: string | null | undefined) => VarButton | null;
104
103
  getVarButtonUpdate(): (formID: string | null | undefined) => VarButton | null;
105
104
  getVarConfigControl(): (formID: string | null | undefined, param: {
106
- buttonType?: KG_BUTTON_TYPE;
105
+ buttonType?: KG__VAR_BUTTON__TYPE;
107
106
  buttonVarName?: string | null;
108
107
  varName: string | null | undefined;
109
108
  }) => VarConfigControl | null;
@@ -151,9 +150,9 @@ export interface IUseKgVarStoreActions {
151
150
  * 注册事件监听.
152
151
  * @param formID 界面标识.
153
152
  * @param event 事件名称.
154
- * @param cb 回调函数.
153
+ * @param listener 事件监听函数.
155
154
  */
156
- addEventListener(formID: string, event: IKgVarEvent, cb: IKgVarEventListener): void;
155
+ addEventListener(formID: string, event: IKgVarEvent, listener: IKgVarEventListener): void;
157
156
  /**
158
157
  * <p>离开一个界面, 即销毁一个界面.</p>
159
158
  * <p>删除它的变量配置数据.</p>
@@ -209,9 +208,9 @@ export interface IUseKgVarStoreActions {
209
208
  * 退订事件监听.
210
209
  * @param formID 界面标识.
211
210
  * @param event 事件名称.
212
- * @param cb 回调函数.
211
+ * @param listener 事件监听函数.
213
212
  */
214
- removeEventListener(formID: string, event: IKgVarEvent, cb?: IKgVarEventListener): void;
213
+ removeEventListener(formID: string, event: IKgVarEvent, listener?: IKgVarEventListener): void;
215
214
  /**
216
215
  * 查询所有变量配置.
217
216
  *
@@ -1,6 +1,6 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
2
  export declare const getProps: () => any;
3
- export declare type IKgVarConfig_ModalButtonVarButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
3
+ export declare type KgVarConfigModalButtonVarButtonProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
4
4
  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>, {} | {
5
5
  [x: string]: any;
6
6
  }>;
@@ -1,13 +1,7 @@
1
- import { ExtractPropTypes, PropType } from 'vue';
2
- export declare const getProps: () => {
3
- onKgClose: PropType<() => void>;
4
- };
5
- export declare type IKgVarConfigModalButtonVarButtonConfigProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
6
- declare const _default: import("vue").DefineComponent<{
7
- onKgClose: PropType<() => void>;
8
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "kgClose"[], "kgClose", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
9
- onKgClose: PropType<() => void>;
10
- }>> & {
11
- onKgClose?: ((...args: any[]) => any) | undefined;
12
- }, {}>;
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const getProps: () => any;
3
+ export declare type KgVarConfigModalButtonVarButtonConfigProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
4
+ 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>, {} | {
5
+ [x: string]: any;
6
+ }>;
13
7
  export default _default;
@@ -5,11 +5,11 @@ import { IRemoveEventListenerHandler } from '../../consts';
5
5
  import { IKgWarehouseMountedEventListener, IKgWarehouseStore } from './index.store';
6
6
  export declare type IUseKgWarehouse = {
7
7
  /**
8
- * 事件: 组件加载完成.
9
- * @param cb 回调函数.
10
- * @param once 是否只会触发一次. 默认为 undefined.
8
+ * 监听事件: 组件加载完成.
9
+ * @param listener 事件监听函数.
10
+ * @param isOnce 是否只会触发一次. 默认为 undefined.
11
11
  */
12
- onMounted(cb: IKgWarehouseMountedEventListener, once?: boolean): IRemoveEventListenerHandler;
12
+ onMounted(listener: IKgWarehouseMountedEventListener, isOnce?: boolean): IRemoveEventListenerHandler;
13
13
  store: IKgWarehouseStore;
14
14
  /**
15
15
  * 弹窗当前是否显示.
@@ -30,15 +30,15 @@ export interface IUseKgWarehouseStoreActions {
30
30
  /**
31
31
  * 注册事件监听.
32
32
  * @param event 事件名称.
33
- * @param cb 回调函数.
33
+ * @param listener 事件监听函数.
34
34
  */
35
- addEventListener(event: IKgWarehouseEvent, cb: IKgWarehouseEventListener): void;
35
+ addEventListener(event: IKgWarehouseEvent, listener: IKgWarehouseEventListener): void;
36
36
  /**
37
37
  * 退订事件监听.
38
38
  * @param event 事件名称.
39
- * @param cb 回调函数.
39
+ * @param listener 事件监听函数.
40
40
  */
41
- removeEventListener(event: IKgWarehouseEvent, cb?: IKgWarehouseEventListener): void;
41
+ removeEventListener(event: IKgWarehouseEvent, listener?: IKgWarehouseEventListener): void;
42
42
  /**
43
43
  * 触发事件.
44
44
  * @param event 事件名称.
@@ -6,9 +6,9 @@ import { IKgEventListener, IRemoveEventListenerHandler } from '../consts';
6
6
  * @param event 事件名称.
7
7
  */
8
8
  export declare function onEventFactory<S extends {
9
- addEventListener(formID: string, event: E, cb: L): void;
10
- removeEventListener(formID: string, event: E, cb?: L): void;
9
+ addEventListener(formID: string, event: E, listener: L): void;
10
+ removeEventListener(formID: string, event: E, listener?: L): void;
11
11
  } | {
12
- addEventListener(event: E, cb: L): void;
13
- removeEventListener(event: E, cb?: L): void;
14
- } = any, E = any, L extends IKgEventListener = any>(formID: string | null, store: S, event: E): (cb: L, once?: boolean) => IRemoveEventListenerHandler;
12
+ addEventListener(event: E, listener: L): void;
13
+ removeEventListener(event: E, listener?: L): void;
14
+ } = any, E = any, L extends IKgEventListener = any>(formID: string | null, store: S, event: E): (listener: L, isOnce?: boolean) => IRemoveEventListenerHandler;
@@ -28,7 +28,7 @@ export declare const KG_APP_PREFIXS: Array<KG_APP_PREFIX>;
28
28
  /**
29
29
  * 表单控件类型.
30
30
  * @see VarConfigControl.ctrl_prop
31
- * @see IKgVarConfigControlProperties
31
+ * @see IKgVarConfigControlControlProperties
32
32
  */
33
33
  export declare enum KG__VAR_CONFIG_CONTROL__CONTROL_TYPE {
34
34
  /** 单行文本. */
@@ -39,26 +39,26 @@ export declare enum KG__VAR_CONFIG_CONTROL__CONTROL_TYPE {
39
39
  INPUT_NUMBER = "INPUT_NUMBER",
40
40
  /**
41
41
  * <p>多行文本.</p>
42
- * <p>配置属性参见 {@link IKgVarConfigControlProperties.TEXT_AREA}.</p>
42
+ * <p>配置属性参见 {@link IKgVarConfigControlControlProperties.TEXT_AREA}.</p>
43
43
  */
44
44
  TEXT_AREA = "TEXT_AREA",
45
45
  /** 多选框. */
46
46
  CHECKBOX = "CHECKBOX",
47
47
  /**
48
48
  * <p>多选框列表.</p>
49
- * <p>配置属性参见 {@link IKgVarConfigControlProperties.CHECKBOX_GROUP}.</p>
49
+ * <p>配置属性参见 {@link IKgVarConfigControlControlProperties.CHECKBOX_GROUP}.</p>
50
50
  */
51
51
  CHECKBOX_GROUP = "CHECKBOX_GROUP",
52
52
  /**
53
53
  * <p>单选框列表.</p>
54
- * <p>配置属性参见 {@link IKgVarConfigControlProperties.RADIO_GROUP}.</p>
54
+ * <p>配置属性参见 {@link IKgVarConfigControlControlProperties.RADIO_GROUP}.</p>
55
55
  */
56
56
  RADIO_GROUP = "RADIO_GROUP",
57
57
  /** 开关. */
58
58
  SWITCH = "SWITCH",
59
59
  /**
60
60
  * <p>单选下拉列表.<p>
61
- * <p>配置属性参见 {@link IKgVarConfigControlProperties.SELECT}.</p>
61
+ * <p>配置属性参见 {@link IKgVarConfigControlControlProperties.SELECT}.</p>
62
62
  */
63
63
  SELECT = "SELECT",
64
64
  /** 多选下拉列表. */
@@ -130,7 +130,7 @@ export declare enum KG__API_METHOD {
130
130
  * @see VarGridDetail.display_type_properties
131
131
  * @see IKgVarGridDetailDisplayTypeProperties
132
132
  */
133
- export declare const enum KG_TABLE_CELL_DISPLAY_TYPE {
133
+ export declare const enum KG__VAR_GRID_DETAIL__DISPLAY_TYPE {
134
134
  /** 布尔数据, 使用 KgYesOrNo 组件显示. */
135
135
  YN = "YN",
136
136
  /**
@@ -147,7 +147,7 @@ export declare const enum KG_TABLE_CELL_DISPLAY_TYPE {
147
147
  * </p>
148
148
  */
149
149
  DESC = "DESC",
150
- /** @deprecated 请使用 {@link KG_TABLE_CELL_DISPLAY_TYPE.DESC}. */
150
+ /** @deprecated 请使用 {@link KG__VAR_GRID_DETAIL__DISPLAY_TYPE.DESC}. */
151
151
  ENUM = "ENUM",
152
152
  /** 进度条, 使用 KgProgressA 组件显示. */
153
153
  PROGRESS = "PROGRESS",
@@ -160,9 +160,13 @@ export declare const enum KG_TABLE_CELL_DISPLAY_TYPE {
160
160
  /**
161
161
  * <p>图片, 可以点击预览大图.</p>
162
162
  */
163
- IMAGE = "IMAGE"
163
+ IMAGE = "IMAGE",
164
+ /**
165
+ * <p>图标, 使用 iconify 进行渲染.</p>
166
+ */
167
+ ICON = "ICON"
164
168
  }
165
- /** 按钮类型. */
169
+ /** @deprecated 已弃用, 请使用 {@link KG__VAR_BUTTON__TYPE}. */
166
170
  export declare const enum KG_BUTTON_TYPE {
167
171
  /** 查询. */
168
172
  SEARCH = "SEARCH",
@@ -183,6 +187,29 @@ export declare const enum KG_BUTTON_TYPE {
183
187
  /** 其他. */
184
188
  OTHER = "OTHER"
185
189
  }
190
+ /**
191
+ * 按钮类型.
192
+ */
193
+ export declare const enum KG__VAR_BUTTON__TYPE {
194
+ /** 查询. */
195
+ SEARCH = "SEARCH",
196
+ /** 创建. */
197
+ CREATE = "CREATE",
198
+ /** 更新. */
199
+ UPDATE = "UPDATE",
200
+ /** 复制. */
201
+ COPY = "COPY",
202
+ /** 删除. */
203
+ DELETE = "DELETE",
204
+ /** 导入. */
205
+ IMPORT = "IMPORT",
206
+ /** 下载导入模板. */
207
+ IMPORT_TEMPLATE = "IMPORT_TEMPLATE",
208
+ /** 导出. */
209
+ EXPORT = "EXPORT",
210
+ /** 其他. */
211
+ OTHER = "OTHER"
212
+ }
186
213
  /**
187
214
  * 按钮颜色.
188
215
  */
@@ -331,8 +358,8 @@ export declare const enum KG__VAR_SUBMIT_CONFIG_LABEL_COLUMN_UNIT {
331
358
  * 导出 EXCEL 文件的后缀.
332
359
  */
333
360
  export declare const enum KG__VAR_BUTTON__EXPORT_EXCEL_SUFFIX {
334
- XLS = "xls",
335
- XLSX = "xlsx"
361
+ XLS = "XLS",
362
+ XLSX = "XLSX"
336
363
  }
337
364
  /** 系统描述表中的键. */
338
365
  export declare const enum KG_DESCRIPTION_CODE_NAME {
@@ -413,7 +440,7 @@ export declare const KG_TMP_MENU_ID__PDA = "KG_TMP_MENU_ID__PDA";
413
440
  export declare type IRemoveEventListenerHandler = () => void;
414
441
  export declare type IKgEventListener = {
415
442
  /** 是否只会触发一次. */
416
- once?: boolean;
443
+ isOnce?: boolean;
417
444
  /** 是否已经触发过一次了. */
418
445
  invoked?: boolean;
419
446
  };
@@ -456,7 +483,7 @@ export interface IKgVarSubmitConfigProperties {
456
483
  * @see VarConfigControl.ctrl_prop
457
484
  * @see KG_FORM_ITEM_TYPE
458
485
  */
459
- export interface IKgVarConfigControlProperties {
486
+ export interface IKgVarConfigControlControlProperties {
460
487
  CHECKBOX_GROUP: {
461
488
  /**
462
489
  * 数据项的宽度.
@@ -516,7 +543,7 @@ export interface IKgVarConfigControlProperties {
516
543
  * 对应的是 {@link VarGridDetail.display_type_properties} 字段, 根据显示类型, 设置额外的参数.
517
544
  *
518
545
  * @see VarGridDetail.display_type_properties
519
- * @see KG_TABLE_CELL_DISPLAY_TYPE
546
+ * @see KG__VAR_GRID_DETAIL__DISPLAY_TYPE
520
547
  */
521
548
  export interface IKgVarGridDetailDisplayTypeProperties {
522
549
  DESC: {
@@ -632,4 +659,5 @@ export interface IKgVarGridDetailDisplayTypeProperties {
632
659
  */
633
660
  yValue?: any;
634
661
  };
662
+ ICON: {};
635
663
  }
@@ -23,8 +23,8 @@ export declare class KgUtil {
23
23
  * @param fileName 文件名称, 包含后缀.
24
24
  * @param contentType <p>文件类型. 如果为空, 则根据文件名的后缀自动设置.</p>
25
25
  * <ul>
26
- * <li><code>.xls</code>: <code>application/vnd.ms-excel</code></li>
27
- * <li><code>.xlsx</code>: <code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code></li>
26
+ * <li>{@link KG__VAR_BUTTON__EXPORT_EXCEL_SUFFIX.XLS}: <code>application/vnd.ms-excel</code></li>
27
+ * <li>{@link KG__VAR_BUTTON__EXPORT_EXCEL_SUFFIX.XLSX}: <code>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</code></li>
28
28
  * </ul>
29
29
  */
30
30
  static downloadFile(data: string | BlobPart, fileName: string, contentType?: string): void;
@@ -0,0 +1,8 @@
1
+ const c = {
2
+ width: 1024,
3
+ height: 1024,
4
+ body: '<path fill="currentColor" d="M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"/>'
5
+ };
6
+ export {
7
+ c as default
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.23.3-beta.2",
3
+ "version": "0.23.4",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run switch-node-version && rimraf dist && vue-tsc && vite build --mode development",