@kengic/vue 0.28.1-beta.0 → 0.28.1-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/index.css +1 -1
  3. package/dist/kengic-vue.js +14659 -14573
  4. package/dist/src/component/KgSubmit/KgSubmit.event.d.ts +6 -0
  5. package/dist/src/component/KgTable/KgTable.d.ts +3 -3
  6. package/dist/src/component/KgTable/KgTable.store.d.ts +7 -0
  7. package/dist/src/component/KgTable/KgTable.vm.d.ts +1 -1
  8. package/dist/src/component/KgVar/KgVar.hooks.d.ts +2 -1
  9. package/dist/src/component/KgVarConfig/KgVarConfig.hooks.d.ts +6 -2
  10. package/dist/src/component/KgVarConfig/KgVarConfig.store.d.ts +6 -2
  11. package/dist/src/component/KgVarConfig/components/KgVarConfigModal.d.ts +42 -4
  12. package/dist/src/config/config.hooks.d.ts +8 -3
  13. package/dist/src/config/config.store.d.ts +1 -1
  14. package/dist/src/config/index.d.ts +0 -4
  15. package/dist/src/const/const.vm.d.ts +17 -0
  16. package/dist/src/i18n/i18n.setup.d.ts +5 -1
  17. package/dist/src/service/http-client.d.ts +1 -3
  18. package/package.json +2 -2
  19. /package/dist/{close-outlined-DMcSQWxQ.537d8ddf.mjs → close-outlined-DMcSQWxQ.9ca932eb.mjs} +0 -0
  20. /package/dist/{exclamation-circle-outlined-DZrXCnvM.a3e96b6e.mjs → exclamation-circle-outlined-DZrXCnvM.217ef68f.mjs} +0 -0
  21. /package/dist/{fullscreen-exit-outlined-X1iYkFc4.37edd487.mjs → fullscreen-exit-outlined-X1iYkFc4.1e8e8688.mjs} +0 -0
  22. /package/dist/{fullscreen-outlined-DDBrsRcy.db231def.mjs → fullscreen-outlined-DDBrsRcy.b539229d.mjs} +0 -0
  23. /package/dist/{search-outlined-Od1M_oxf.1b143df4.mjs → search-outlined-Od1M_oxf.fd26a590.mjs} +0 -0
  24. /package/dist/{three-dots-loading-bIlrTJYR.bd624bcf.mjs → three-dots-loading-bIlrTJYR.4bf0b865.mjs} +0 -0
@@ -70,11 +70,17 @@ export declare type IKgSubmitOnBeforeRequestEventListenerParameter = {
70
70
  };
71
71
  export declare type IKgSubmitOnBeforeRequestEventListener = ((param: IKgSubmitOnBeforeRequestEventListenerParameter) => Promise<boolean>) & IKgEventListener;
72
72
  export declare type IKgSubmitOnOkEventListenerParameter = {
73
+ /** @deprecated */
73
74
  isCreating: boolean | null;
75
+ /** @deprecated */
74
76
  isUpdating: boolean | null;
77
+ /** @deprecated */
75
78
  isCopying: boolean | null;
79
+ /** @deprecated */
76
80
  isDeleting: boolean | null;
81
+ /** @deprecated */
77
82
  row: IKgTableRow | null;
83
+ /** @deprecated */
78
84
  model: Ref<Record<string, any>>;
79
85
  /** 接口返回结果. */
80
86
  result: any | null;
@@ -3,7 +3,7 @@ import { ExtractPropTypes, PropType } from 'vue';
3
3
  import './KgTable.less';
4
4
  export declare const getProps: () => {
5
5
  /** 是否禁用某行的勾选框. */
6
- kgCheckboxDisabled: PropType<(row: any) => boolean>;
6
+ kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
7
7
  /** 是否禁用表格. */
8
8
  kgDisabled: {
9
9
  type: PropType<boolean>;
@@ -15,7 +15,7 @@ export declare const getProps: () => {
15
15
  export declare type IKgTableProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
16
16
  declare const _default: import("vue").DefineComponent<{
17
17
  /** 是否禁用某行的勾选框. */
18
- kgCheckboxDisabled: PropType<(row: any) => boolean>;
18
+ kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
19
19
  /** 是否禁用表格. */
20
20
  kgDisabled: {
21
21
  type: PropType<boolean>;
@@ -25,7 +25,7 @@ declare const _default: import("vue").DefineComponent<{
25
25
  kgRowClassName: PropType<RowClassName<any>>;
26
26
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
27
27
  /** 是否禁用某行的勾选框. */
28
- kgCheckboxDisabled: PropType<(row: any) => boolean>;
28
+ kgIsCheckboxDisabled: PropType<(row: any) => boolean>;
29
29
  /** 是否禁用表格. */
30
30
  kgDisabled: {
31
31
  type: PropType<boolean>;
@@ -125,6 +125,13 @@ export interface IUseKgTableStoreActions {
125
125
  * @param selectedRows 勾选的行.
126
126
  */
127
127
  setSelectedRows(formID: string | null | undefined, selectedRows: Array<IKgTableRow>): void;
128
+ /**
129
+ * 根据勾选行的主键, 设置勾选的行.
130
+ *
131
+ * @param formID 界面标识.
132
+ * @param selectedRowKeys 勾选行的主键.
133
+ */
134
+ setSelectedRowsByKeys(formID: string | null | undefined, selectedRowKeys: Array<Key>): void;
128
135
  setTableWidth(formID: string | null | undefined, value: number): void;
129
136
  }
130
137
  export declare type IUseKgTableStore = StoreDefinition<'KgTable', IUseKgTableStoreState, IUseKgTableStoreGetters, IUseKgTableStoreActions>;
@@ -62,6 +62,6 @@ export declare const KG_TABLE_TD_MAX_WIDTH = 1920;
62
62
  /** 勾选列的宽度. */
63
63
  export declare const KG_TABLE_TD_CHECK_WIDTH = 32;
64
64
  /** 序号列的宽度. */
65
- export declare const KG_TABLE_TD_INDEX_WIDTH = 40;
65
+ export declare const KG_TABLE_TD_INDEX_WIDTH = 55;
66
66
  /** 在表格内创建时, 空白行的临时主键. */
67
67
  export declare const KG_TABLE_TEMP_ID = "__KG_TABLE_TEMP_ID__";
@@ -1,7 +1,7 @@
1
1
  import { IRemoveEventListener } from '@kengic/core.core';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { VarButton, VarChildDetail, VarConfigControl, VarConfigDescription, VarConfigPossibility, VarDda, VarGridConfig, VarGridDetail, VarGridMasterDTO, VarProfileConfig, VarProfileMasterDTO, VarVariable } from '../../api/WMS/models';
4
- import { KG__VAR_BUTTON__TYPE } from '../../const';
4
+ import { IKgVarGridConfigProperties, KG__VAR_BUTTON__TYPE } from '../../const';
5
5
  import { IUseKgButton } from '../KgButton';
6
6
  import { IUseKgForm } from '../KgForm';
7
7
  import { type IUseKgSearch } from '../KgSearch';
@@ -238,6 +238,7 @@ export declare type IUseKgVar = {
238
238
  varChildDetails: ComputedRef<Array<VarChildDetail>>;
239
239
  varDda: ComputedRef<VarDda | null>;
240
240
  varGridConfig: ComputedRef<VarGridConfig | null>;
241
+ varGridConfig$Props$$: ComputedRef<IKgVarGridConfigProperties>;
241
242
  /**
242
243
  * 所有的「表格视图」.
243
244
  */
@@ -3,9 +3,13 @@ export interface IUseKgVarConfig {
3
3
  /**
4
4
  * 打开变量配置弹窗, 并使用传入的宿主界面标识.
5
5
  *
6
- * @param hostFormID 宿主界面标识
6
+ * @param param.hostFormID 宿主界面标识
7
+ * @param param.kgContext {@link KG_VAR_CONFIG_MODAL__CONTEXT}
7
8
  */
8
- open(hostFormID: string): void;
9
+ open(param: {
10
+ hostFormID: string;
11
+ kgContext?: string;
12
+ }): void;
9
13
  /**
10
14
  * 状态数据.
11
15
  */
@@ -7,9 +7,13 @@ export interface IUseKgVarConfigStoreActions {
7
7
  /**
8
8
  * 打开变量配置弹窗, 并使用传入的宿主界面标识.
9
9
  *
10
- * @param hostFormID 宿主界面标识
10
+ * @param param.hostFormID 宿主界面标识
11
+ * @param param.kgContext {@link KG_VAR_CONFIG_MODAL__CONTEXT}
11
12
  */
12
- open(hostFormID: string): void;
13
+ open(param: {
14
+ hostFormID: string;
15
+ kgContext?: string;
16
+ }): void;
13
17
  }
14
18
  export declare type IUseKgVarConfigStore = StoreDefinition<'KgVarConfig', IUseKgVarConfigStoreState, IUseKgVarConfigStoreGetters, IUseKgVarConfigStoreActions>;
15
19
  export declare type IKgVarConfigStore = ReturnType<IUseKgVarConfigStore>;
@@ -1,15 +1,53 @@
1
1
  import { ExtractPropTypes, PropType } from 'vue';
2
+ export declare const KG_VAR_CONFIG_MODAL__CONTEXT: {
3
+ /**
4
+ * 默认, 通过快捷键 CTRL+SHIFT+F5 打开, 显示所有的配置.
5
+ */
6
+ DEFAULT: string;
7
+ /**
8
+ * 从查询条件组件中, 点击配置按钮打开, 只显示查询条件配置.
9
+ */
10
+ SEARCH: string;
11
+ /**
12
+ * 从表格中, 点击视图配置菜单打开, 只显示表格配置.
13
+ */
14
+ TABLE: string;
15
+ };
16
+ export declare type KgVarConfigModalTab = 'variable' | 'search' | 'table' | 'button' | 'submit';
2
17
  export declare const getProps: () => {
3
- visible: PropType<boolean>;
18
+ /**
19
+ * @see KG_VAR_CONFIG_MODAL__CONTEXT
20
+ */
21
+ kgContext: {
22
+ type: PropType<string>;
23
+ default: string;
24
+ };
4
25
  'onUpdate:visible': PropType<(value: boolean) => void>;
26
+ visible: PropType<boolean>;
5
27
  };
6
28
  export declare type KgVarConfigModalProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
7
29
  export declare const KgVarConfigModal: import("vue").DefineComponent<{
8
- visible: PropType<boolean>;
30
+ /**
31
+ * @see KG_VAR_CONFIG_MODAL__CONTEXT
32
+ */
33
+ kgContext: {
34
+ type: PropType<string>;
35
+ default: string;
36
+ };
9
37
  'onUpdate:visible': PropType<(value: boolean) => void>;
10
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
11
38
  visible: PropType<boolean>;
39
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:visible"[], "update:visible", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
40
+ /**
41
+ * @see KG_VAR_CONFIG_MODAL__CONTEXT
42
+ */
43
+ kgContext: {
44
+ type: PropType<string>;
45
+ default: string;
46
+ };
12
47
  'onUpdate:visible': PropType<(value: boolean) => void>;
48
+ visible: PropType<boolean>;
13
49
  }>> & {
14
50
  "onUpdate:visible"?: ((...args: any[]) => any) | undefined;
15
- }, {}>;
51
+ }, {
52
+ kgContext: string;
53
+ }>;
@@ -1,8 +1,13 @@
1
1
  import { ComputedRef } from 'vue';
2
+ import { Router } from 'vue-router';
2
3
  import { Description } from '../api/WMS/models';
3
4
  import { LocaleType } from '../project/types/config';
4
- import { IKgStore, P, T } from './config.store';
5
+ import { IKgOption, IKgStore, P, T } from './config.store';
5
6
  export interface IUseKg {
7
+ /**
8
+ * 语言数据.
9
+ */
10
+ I18N$$: ComputedRef<Record<string, any>>;
6
11
  /**
7
12
  * 获取当前语言下的某个描述.
8
13
  *
@@ -18,13 +23,13 @@ export interface IUseKg {
18
23
  /**
19
24
  * 组件库的配置参数.
20
25
  */
21
- option: ComputedRef<IKgStore['getOption']>;
26
+ option: ComputedRef<IKgOption>;
22
27
  /** 检查权限. */
23
28
  p: P;
24
29
  /**
25
30
  * 路由对象.
26
31
  */
27
- router: ComputedRef<IKgStore['getRouter']>;
32
+ router: ComputedRef<Router | null>;
28
33
  store: IKgStore;
29
34
  /** 翻译. */
30
35
  t: T;
@@ -299,7 +299,7 @@ export interface IUseKgStoreActions {
299
299
  codeName: string | null | undefined;
300
300
  descriptions: Array<DescriptionDTO>;
301
301
  }): void;
302
- setI18N(I18N: Record<string, any>): void;
302
+ setI18N(I18N?: Record<string, any>): void;
303
303
  setI18n(i18n: any): void;
304
304
  setOption(option: IKgOption): void;
305
305
  setP(fn: P): void;
@@ -4,10 +4,6 @@ import { Router } from 'vue-router';
4
4
  import { IKgOption, P } from './config.store';
5
5
  import '@kengic/core.react/index.css';
6
6
  export declare type IKgOptions = {
7
- /**
8
- * 语言数据.
9
- */
10
- I18N: Record<string, any>;
11
7
  app: App;
12
8
  i18n: any;
13
9
  /** 配置参数. */
@@ -674,11 +674,28 @@ export interface IKgVarDdaProperties {
674
674
  * <p>额外的配置属性. 对应 {@link VarGridConfig#props} 字段.</p>
675
675
  */
676
676
  export interface IKgVarGridConfigProperties {
677
+ /**
678
+ * <p>是否禁用某行的勾选框.</p>
679
+ * <p>该属性的值是一个字符串, 这个字符串会被作为方法体的代码来解析, 即作为 new Function() 构造函数的最后一个参数.</p>
680
+ * <p>在这个字符串表示的代码中可以访问如下参数:</p>
681
+ * <ul>
682
+ * <li>row: 被判断的行,</li>
683
+ * </ul>
684
+ * <p>该代码需要返回 true 或者 false, 即表示是否禁用勾选框.</p>
685
+ */
686
+ isCheckboxDisabled?: string;
677
687
  }
678
688
  /**
679
689
  * <p>额外的配置属性. 对应 {@link VarGridDetail#props} 字段.</p>
680
690
  */
681
691
  export interface IKgVarGridDetailProperties {
692
+ /**
693
+ * <p>是否进行翻译.</p>
694
+ * <p>如果为 true, 则把内容作为 i18n 的 key 对内容进行翻译.</p>
695
+ *
696
+ * @default false
697
+ */
698
+ isTranslateText?: boolean;
682
699
  }
683
700
  /**
684
701
  * <p>额外的配置属性. 对应 {@link VarGridMaster#props} 字段.</p>
@@ -13,7 +13,11 @@ export declare let localeList: DropMenu[];
13
13
  export declare const localeSetting: LocaleSetting;
14
14
  export declare type IKgLocaleOptions = {
15
15
  /**
16
- * <p>可选语言. 如果为空则为所有语言.</p>
16
+ * 语言数据.
17
+ */
18
+ I18N?: Record<string, any>;
19
+ /**
20
+ * <p>可选择的语言. 默认可选所有语言.</p>
17
21
  */
18
22
  availableLocales?: Array<LocaleType>;
19
23
  /**
@@ -8,8 +8,6 @@ interface IHttpClient {
8
8
  } & AxiosRequestConfig;
9
9
  request<T = any>(config: IRequestConfig, options?: IRequestOptions): Promise<T>;
10
10
  }
11
- /** @deprecated 已弃用, 请使用 {@link kgSetupHttpClient}. */
12
- declare function setupHttpClient(httpClient: IHttpClient | null): void;
13
11
  /**
14
12
  * 设置 httpClient 实例.
15
13
  */
@@ -90,4 +88,4 @@ interface IRequestOptions {
90
88
  */
91
89
  withToken?: boolean;
92
90
  }
93
- export { setupHttpClient, kgSetupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
91
+ export { kgSetupHttpClient, httpClient, type IRequestConfig, type IRequestOptions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.28.1-beta.0",
3
+ "version": "0.28.1-beta.2",
4
4
  "scripts": {
5
5
  "build": "npm run use-node && rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "npm run use-node && rimraf dist && vue-tsc && vite build --mode development",
@@ -39,7 +39,7 @@
39
39
  "@iconify-icons/ph": "1.2.5",
40
40
  "@iconify/vue": "4.1.2",
41
41
  "@kengic/core.core": "0.0.1-beta.22",
42
- "@kengic/core.react": "0.0.2-beta.5",
42
+ "@kengic/core.react": "0.0.2-beta.6",
43
43
  "@kengic/pont": "1.2.17-beta.5",
44
44
  "@rys-fe/vite-plugin-theme": "0.8.6",
45
45
  "@thymine/xunee": "0.4.9-beta.8",