@kengic/vue 0.25.3-beta.0 → 0.25.4-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 (35) hide show
  1. package/dist/kengic-vue.js +15165 -9518
  2. package/dist/src/components/KgForm/KgForm.d.ts +3 -3
  3. package/dist/src/components/KgForm/index.d.ts +4 -4
  4. package/dist/src/config/index.d.ts +1 -1
  5. package/dist/src/config/index.hooks.d.ts +2 -1
  6. package/dist/src/config/index.store.d.ts +43 -39
  7. package/dist/src/config/setup.d.ts +13 -20
  8. package/dist/src/consts/i18n/es_ES.d.ts +265 -0
  9. package/dist/src/consts/i18n/fr_FR.d.ts +265 -0
  10. package/dist/src/consts/i18n/index.d.ts +2 -2
  11. package/dist/src/consts/i18n/km_KH.d.ts +265 -0
  12. package/dist/src/consts/i18n/ko_KR.d.ts +265 -0
  13. package/dist/src/consts/i18n/vi_VN.d.ts +265 -0
  14. package/dist/src/consts/index.vm.d.ts +0 -2
  15. package/dist/src/helpers/ant-design-vue.d.ts +1 -1
  16. package/dist/src/project/build/getConfigFileName.d.ts +5 -0
  17. package/dist/src/project/build/index.d.ts +1 -0
  18. package/dist/src/project/index.d.ts +1 -0
  19. package/dist/src/project/src/index.d.ts +9 -0
  20. package/dist/src/project/src/locales/helper.d.ts +5 -0
  21. package/dist/src/project/src/locales/index.d.ts +3 -0
  22. package/dist/src/project/src/locales/setupI18n.d.ts +3 -0
  23. package/dist/src/project/src/locales/useLocale.d.ts +10 -0
  24. package/dist/src/project/src/store/index.d.ts +1 -0
  25. package/dist/src/project/src/store/modules/index.d.ts +1 -0
  26. package/dist/src/project/src/store/modules/locale.d.ts +54 -0
  27. package/dist/src/project/src/utils/cache/index.d.ts +7 -0
  28. package/dist/src/project/src/utils/cache/memory.d.ts +20 -0
  29. package/dist/src/project/src/utils/cache/persistent.d.ts +33 -0
  30. package/dist/src/project/src/utils/cache/storageCache.d.ts +8 -0
  31. package/dist/src/project/src/utils/cipher.d.ts +19 -0
  32. package/dist/src/project/src/utils/env.d.ts +34 -0
  33. package/dist/src/project/types/config.d.ts +13 -1
  34. package/dist/src/utils/kg-logger.util.d.ts +1 -1
  35. package/package.json +6 -1
@@ -1,7 +1,7 @@
1
1
  import { ExtractPropTypes } from 'vue';
2
2
  import './KgForm.less';
3
3
  export declare const getProps: () => {
4
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
4
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
5
5
  labelCol: {
6
6
  type: import("vue").PropType<Partial<ExtractPropTypes<{
7
7
  span: (NumberConstructor | StringConstructor)[];
@@ -137,7 +137,7 @@ export declare const getProps: () => {
137
137
  };
138
138
  export declare type IKgFormProps = Partial<ExtractPropTypes<ReturnType<typeof getProps>>>;
139
139
  declare const _default: import("vue").DefineComponent<{
140
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
140
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
141
141
  labelCol: {
142
142
  type: import("vue").PropType<Partial<ExtractPropTypes<{
143
143
  span: (NumberConstructor | StringConstructor)[];
@@ -271,7 +271,7 @@ declare const _default: import("vue").DefineComponent<{
271
271
  type: import("vue").PropType<((name: string | number | string[] | number[], status: boolean, errors: string[] | null) => void) | undefined>;
272
272
  };
273
273
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
274
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
274
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
275
275
  labelCol: {
276
276
  type: import("vue").PropType<Partial<ExtractPropTypes<{
277
277
  span: (NumberConstructor | StringConstructor)[];
@@ -10,7 +10,7 @@ declare const _default: {
10
10
  validateMessages: import("ant-design-vue/es/form/interface").ValidateMessages;
11
11
  validateOnRuleChange: boolean;
12
12
  }> & Omit<Readonly<import("vue").ExtractPropTypes<{
13
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
13
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
14
14
  labelCol: {
15
15
  type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
16
16
  span: (NumberConstructor | StringConstructor)[];
@@ -158,7 +158,7 @@ declare const _default: {
158
158
  $emit: (event: string, ...args: any[]) => void;
159
159
  $el: any;
160
160
  $options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
161
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
161
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
162
162
  labelCol: {
163
163
  type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
164
164
  span: (NumberConstructor | StringConstructor)[];
@@ -318,7 +318,7 @@ declare const _default: {
318
318
  $nextTick: typeof import("vue").nextTick;
319
319
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
320
320
  } & Readonly<import("vue").ExtractPropTypes<{
321
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
321
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
322
322
  labelCol: {
323
323
  type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
324
324
  span: (NumberConstructor | StringConstructor)[];
@@ -456,7 +456,7 @@ declare const _default: {
456
456
  __isTeleport?: undefined;
457
457
  __isSuspense?: undefined;
458
458
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
459
- layout: import("vue").PropType<"inline" | "vertical" | "horizontal">;
459
+ layout: import("vue").PropType<"vertical" | "horizontal" | "inline">;
460
460
  labelCol: {
461
461
  type: import("vue").PropType<Partial<import("vue").ExtractPropTypes<{
462
462
  span: (NumberConstructor | StringConstructor)[];
@@ -1,3 +1,3 @@
1
- export * from './setup';
2
1
  export * from './index.hooks';
3
2
  export * from './index.store';
3
+ export * from './setup';
@@ -1,6 +1,7 @@
1
1
  import { Pinia } from 'pinia';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { Description } from '../apis/WMS/models';
4
+ import { LocaleType } from '../project/types/config';
4
5
  import { IKgStore, P, T } from './index.store';
5
6
  export interface IUseKg {
6
7
  /**
@@ -14,7 +15,7 @@ export interface IUseKg {
14
15
  codeValue: string | null | undefined;
15
16
  }): Description | null;
16
17
  /** 当前语言. */
17
- locale: IKgStore['getLocale'];
18
+ locale: ComputedRef<LocaleType>;
18
19
  /**
19
20
  * 组件库的配置参数.
20
21
  */
@@ -2,37 +2,20 @@ import { StoreDefinition } from 'pinia';
2
2
  import { ComputedRef } from 'vue';
3
3
  import { Router } from 'vue-router';
4
4
  import { Description, SysUserWarehouseDTO } from '../apis/WMS/models';
5
- import { IKgLocale, KG_APP, Menu } from '../consts';
5
+ import { KG_APP, Menu } from '../consts';
6
+ import { LocaleType } from '../project/types/config';
6
7
  import { UserInfo } from '../project/types/store';
7
8
  export declare type IKgOption = {
8
- /** 模块首页地址. */
9
- appIndex?: {
10
- /** 默认为 '/wms/data-manager/index'. */
11
- [KG_APP.WMS_DATA_MANAGER]?: string;
12
- /** 默认为 '/wms/business-manager/index'. */
13
- [KG_APP.WMS_BUSINESS_MANAGER]?: string;
14
- /** 默认为 '/wcs/index'. */
15
- [KG_APP.WCS]?: string;
16
- /** 默认为 '/sys/index'. */
17
- [KG_APP.SYS]?: string;
18
- };
19
- /** 模块标题. */
20
- appTitle?: {
21
- /** 默认为 '数据管理'. */
22
- [KG_APP.WMS_DATA_MANAGER]?: string;
23
- /** 默认为 '仓库管理'. */
24
- [KG_APP.WMS_BUSINESS_MANAGER]?: string;
25
- /** 默认为 'WCS'. */
26
- [KG_APP.WCS]?: string;
27
- /** 默认为 '系统配置'. */
28
- [KG_APP.SYS]?: string;
29
- };
30
9
  /**
31
- * <p>后端接口地址前缀.</p>
32
- *
33
- * @default '/kengic-boot'
10
+ * 多标签页.
34
11
  */
35
- publicPath?: string;
12
+ KgLayoutTab?: {
13
+ /**
14
+ * <p>是否放到页面头部区域.</p>
15
+ * @default true
16
+ */
17
+ isTeleportToHeader?: boolean;
18
+ };
36
19
  KgModal?: {
37
20
  /** 拖拽改变位置. */
38
21
  drag?: {
@@ -138,16 +121,40 @@ export declare type IKgOption = {
138
121
  /** 默认的仓库编码, 只有在 {@link IKgOption.KgWarehouse.on} 为 false 时才生效. */
139
122
  defaultWarehouseID?: string;
140
123
  };
124
+ /** 模块首页地址. */
125
+ appIndex?: {
126
+ /** 默认为 '/wms/data-manager/index'. */
127
+ [KG_APP.WMS_DATA_MANAGER]?: string;
128
+ /** 默认为 '/wms/business-manager/index'. */
129
+ [KG_APP.WMS_BUSINESS_MANAGER]?: string;
130
+ /** 默认为 '/wcs/index'. */
131
+ [KG_APP.WCS]?: string;
132
+ /** 默认为 '/sys/index'. */
133
+ [KG_APP.SYS]?: string;
134
+ };
135
+ /** 模块标题. */
136
+ appTitle?: {
137
+ /** 默认为 '数据管理'. */
138
+ [KG_APP.WMS_DATA_MANAGER]?: string;
139
+ /** 默认为 '仓库管理'. */
140
+ [KG_APP.WMS_BUSINESS_MANAGER]?: string;
141
+ /** 默认为 'WCS'. */
142
+ [KG_APP.WCS]?: string;
143
+ /** 默认为 '系统配置'. */
144
+ [KG_APP.SYS]?: string;
145
+ };
141
146
  /**
142
- * 多标签页.
147
+ * <p>项目的版本号. 即 package.json 中的 version 值.</p>
148
+ *
149
+ * @default 0.0.0
143
150
  */
144
- KgLayoutTab?: {
145
- /**
146
- * <p>是否放到页面头部区域.</p>
147
- * @default true
148
- */
149
- isTeleportToHeader?: boolean;
150
- };
151
+ projectVersion?: string;
152
+ /**
153
+ * <p>后端接口地址前缀.</p>
154
+ *
155
+ * @default '/kengic-boot'
156
+ */
157
+ publicPath?: string;
151
158
  };
152
159
  /** 翻译的方法. */
153
160
  export declare type T = {
@@ -201,7 +208,7 @@ export interface IUseKgStoreState {
201
208
  */
202
209
  isDescriptionsRequestingMap: Map<string, boolean>;
203
210
  /** 语言. */
204
- locale: ComputedRef<IKgLocale> | null;
211
+ locale: ComputedRef<LocaleType> | null;
205
212
  /** 配置参数. */
206
213
  option: IKgOption;
207
214
  /** 检查权限的方法. */
@@ -228,8 +235,6 @@ export interface IUseKgStoreGetters {
228
235
  getDescriptions(): (param: {
229
236
  codeName: string | null | undefined;
230
237
  }) => Array<Description>;
231
- /** 组件库的配置参数. */
232
- getLocale(): ComputedRef<IKgLocale> | null;
233
238
  /**
234
239
  * 配置参数.
235
240
  */
@@ -278,7 +283,6 @@ export interface IUseKgStoreActions {
278
283
  codeName: string | null | undefined;
279
284
  descriptions: Array<Description>;
280
285
  }): void;
281
- setLocale(locale: ComputedRef<IKgLocale> | null): void;
282
286
  setOption(option: IKgOption): void;
283
287
  setP(fn: P): void;
284
288
  setRouter(router: Router): void;
@@ -1,7 +1,6 @@
1
1
  import { Pinia, StoreDefinition } from 'pinia';
2
- import { App, ComputedRef } from 'vue';
2
+ import { App } from 'vue';
3
3
  import { Router } from 'vue-router';
4
- import { IKgLocale } from '../consts';
5
4
  import { IKgOption, P } from './index.store';
6
5
  /**
7
6
  * 配置 pinia 实例.
@@ -14,30 +13,24 @@ export declare function setPinia(pinia: Pinia): void;
14
13
  * @throws Error 如果 pinia 实例为空, 抛错.
15
14
  */
16
15
  export declare function getPinia(): Pinia | null;
16
+ /**
17
+ * 设置 pinia.
18
+ *
19
+ * @param pinia pinia.
20
+ */
21
+ export declare function setupKgStore(pinia: Pinia): void;
17
22
  export declare type IKgOptions = {
18
23
  app: App;
19
- /** 当前语言. */
20
- locale: ComputedRef<IKgLocale>;
21
- /**
22
- * import { createI18n } from 'vue-i18n';
23
- * ReturnType<typeof createI18n>
24
- */
25
- i18n: any;
24
+ /** 配置参数. */
25
+ option?: IKgOption;
26
+ /** 权限方法, 用来判断是否具有某个(某些)权限. */
27
+ pFunction: P;
26
28
  router: Router;
27
- /** 状态数据: 用户. */
28
- useUserStore: StoreDefinition<any, any, any, any>;
29
29
  /** 状态数据: 权限. */
30
30
  usePermissionStore: StoreDefinition<any, any, any, any>;
31
- /** 权限方法, 用来判断是否具有某个(某些)权限. */
32
- pFunction: P;
33
- /** 配置参数. */
34
- option?: IKgOption;
31
+ /** 状态数据: 用户. */
32
+ useUserStore: StoreDefinition<any, any, any, any>;
35
33
  };
36
- /**
37
- * 初始化 pinia.
38
- * @param pinia pinia.
39
- */
40
- export declare function setupKgStore(pinia: Pinia): void;
41
34
  /**
42
35
  * 初始化组件库.
43
36
  * @param options 参数.
@@ -0,0 +1,265 @@
1
+ declare const _default: {
2
+ kg: {
3
+ KgAppSelect: {
4
+ businessManager: string;
5
+ dataManager: string;
6
+ sys: string;
7
+ tooltip: string;
8
+ };
9
+ KgButton: {
10
+ noApiUrl: string;
11
+ noVarSubmitConfig: string;
12
+ };
13
+ KgFormItem: {
14
+ formValidationMessageForGT: string;
15
+ formValidationMessageForGTE: string;
16
+ formValidationMessageForInvalidFloat: string;
17
+ formValidationMessageForInvalidInteger: string;
18
+ formValidationMessageForInvalidJSON: string;
19
+ formValidationMessageForInvalidLetter: string;
20
+ formValidationMessageForInvalidLowerLetter: string;
21
+ formValidationMessageForInvalidUpperLetter: string;
22
+ formValidationMessageForLT: string;
23
+ formValidationMessageForLTE: string;
24
+ formValidationMessageForMaxLength: string;
25
+ formValidationMessageForMinLength: string;
26
+ formValidationMessageForRegularExpression: string;
27
+ };
28
+ KgPageDdaCreate: {
29
+ 'confirm-cancel': string;
30
+ done: string;
31
+ 'next-step': string;
32
+ 'previous-step': string;
33
+ };
34
+ KgPageDdaCreateBasic: {
35
+ 'form-id': string;
36
+ 'form-name': string;
37
+ maintenance: string;
38
+ sql: string;
39
+ type: string;
40
+ };
41
+ KgPageDdaCreateButton: {
42
+ 'button-var-name-reserved': string;
43
+ 'button-var-name-used': string;
44
+ };
45
+ KgPageDdaCreateMenu: {
46
+ 'parent-menu': string;
47
+ };
48
+ KgPageDdaCreateSearch: {
49
+ available: string;
50
+ 'column-desc': string;
51
+ 'column-name': string;
52
+ 'column-type': string;
53
+ selected: string;
54
+ };
55
+ KgPageDdaCreateSubmit: {
56
+ available: string;
57
+ 'column-desc': string;
58
+ 'column-name': string;
59
+ 'column-type': string;
60
+ selected: string;
61
+ };
62
+ KgPageDdaCreateTable: {
63
+ available: string;
64
+ 'column-desc': string;
65
+ 'column-name': string;
66
+ 'column-type': string;
67
+ selected: string;
68
+ };
69
+ KgSearch: {
70
+ title: string;
71
+ };
72
+ KgSearchConfigModal: {
73
+ BETWEEN: string;
74
+ 'BETWEEN-desc': string;
75
+ CONTAIN: string;
76
+ 'CONTAIN-desc': string;
77
+ END_WITH: string;
78
+ 'END_WITH-desc': string;
79
+ EQ: string;
80
+ 'EQ-desc': string;
81
+ GT: string;
82
+ 'GT-desc': string;
83
+ GTE: string;
84
+ 'GTE-desc': string;
85
+ IN: string;
86
+ 'IN-desc': string;
87
+ LT: string;
88
+ 'LT-desc': string;
89
+ LTE: string;
90
+ 'LTE-desc': string;
91
+ NE: string;
92
+ 'NE-desc': string;
93
+ START_WITH: string;
94
+ 'START_WITH-desc': string;
95
+ close: string;
96
+ formTitle: string;
97
+ pleaseSelectVarProfileMaster: string;
98
+ };
99
+ KgTable: {
100
+ apiNotSupportDynamicQuery: string;
101
+ column: string;
102
+ config: string;
103
+ emptyText: string;
104
+ isShowDescription: string;
105
+ other: string;
106
+ 'request-fail-error': string;
107
+ 'request-fail-no-data': string;
108
+ rowHeight: string;
109
+ rowHeightH: string;
110
+ rowHeightL: string;
111
+ rowHeightM: string;
112
+ 'save-var-grid-master-as-success-message': string;
113
+ saveVarGridMaster: string;
114
+ saveVarGridMasterAs: string;
115
+ saveVarGridMasterSuccessMessage: string;
116
+ totalText: string;
117
+ varGridMasters: string;
118
+ };
119
+ KgTableHeaderCell: {
120
+ align: string;
121
+ alignCenter: string;
122
+ alignLeft: string;
123
+ alignRight: string;
124
+ hide: string;
125
+ isEllipsis: string;
126
+ isFilter: string;
127
+ isFixToLeft: string;
128
+ isFixToRight: string;
129
+ isSort: string;
130
+ };
131
+ KgTableInfo: {
132
+ check: string;
133
+ clearCheck: string;
134
+ clearTable: string;
135
+ locate: string;
136
+ row: string;
137
+ };
138
+ KgTableSettingConfigModal: {};
139
+ KgTableSettingVarGridConfig: {};
140
+ KgTableSettingVarGridMasterSaveAs: {
141
+ title: string;
142
+ };
143
+ KgVar: {};
144
+ KgVarConfig: {
145
+ VarGridConfig: string;
146
+ VarGridMaster: string;
147
+ VarProfileConfig: string;
148
+ VarProfileMaster: string;
149
+ action: string;
150
+ allForm: string;
151
+ allLanguage: string;
152
+ canNotUpdateSystemVarGridMaster: string;
153
+ canNotUpdateSystemVarProfileMaster: string;
154
+ confirm: string;
155
+ createConfig: string;
156
+ currentForm: string;
157
+ currentLanguage: string;
158
+ customLevel: string;
159
+ emptyPageSizeOptions: string;
160
+ formId: string;
161
+ formValidationMessageForMaxAndMin: string;
162
+ formValidationMessageForMaxLengthAndMinLength: string;
163
+ invalidCommandParameter: string;
164
+ invalidPageSizeOption: string;
165
+ invalidPageSizeOptions: string;
166
+ pleaseSelectVariable: string;
167
+ tabButton: string;
168
+ tabChild: string;
169
+ tabSearch: string;
170
+ tabSubmit: string;
171
+ tabTable: string;
172
+ varVariable: string;
173
+ variable: string;
174
+ };
175
+ KgVarConfigModalButton: {
176
+ VarButton: string;
177
+ VarButtonConfig: string;
178
+ };
179
+ KgVarConfigModalChild: {
180
+ childVarName: string;
181
+ childVarNameDuplicate: string;
182
+ childVarNameRequired: string;
183
+ parentVarName: string;
184
+ parentVarNameDuplicate: string;
185
+ parentVarNameRequired: string;
186
+ };
187
+ KgVarConfigModalSubmit: {
188
+ VarSubmitConfig: string;
189
+ VarSubmitDetail: string;
190
+ };
191
+ KgVarConfigModalSubmitVarSubmitConfig: {
192
+ invalidWidthForSpan: string;
193
+ };
194
+ KgVarConfigModalTableVarGridMaster: {
195
+ DESC: string;
196
+ FILE_SIZE: string;
197
+ ICON: string;
198
+ IMAGE: string;
199
+ PROGRESS: string;
200
+ ROUTE_LINK: string;
201
+ UPDATE_LINK: string;
202
+ YN: string;
203
+ center: string;
204
+ left: string;
205
+ notSort: string;
206
+ right: string;
207
+ };
208
+ KgVarConfigSelectFormIdModal: {
209
+ title: string;
210
+ };
211
+ KgWarehouse: {
212
+ reloadMessage: string;
213
+ selectWarehouse: string;
214
+ title: string;
215
+ warehouse: string;
216
+ };
217
+ action: string;
218
+ add: string;
219
+ asc: string;
220
+ button: string;
221
+ cancel: string;
222
+ close: string;
223
+ confirm: string;
224
+ confirmDelete: string;
225
+ copy: string;
226
+ copySuccess: string;
227
+ create: string;
228
+ createSuccess: string;
229
+ default: string;
230
+ delete: string;
231
+ deleteSuccess: string;
232
+ desc: string;
233
+ edit: string;
234
+ empty: string;
235
+ emptyText: string;
236
+ executeSuccess: string;
237
+ export: string;
238
+ exportSuccess: string;
239
+ formId: string;
240
+ formName: string;
241
+ formValidationFail: string;
242
+ import: string;
243
+ 'import-template': string;
244
+ importSuccess: string;
245
+ importTemplate: string;
246
+ loading: string;
247
+ lookup: string;
248
+ no: string;
249
+ ok: string;
250
+ query: string;
251
+ refresh: string;
252
+ required: string;
253
+ reset: string;
254
+ save: string;
255
+ search: string;
256
+ selectAll: string;
257
+ show: string;
258
+ succeed: string;
259
+ tip: string;
260
+ update: string;
261
+ updateSuccess: string;
262
+ yes: string;
263
+ };
264
+ };
265
+ export default _default;