halo-fe 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +975 -976
- package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
- package/esm/drivers/builders/types/index.d.ts +2 -0
- package/esm/drivers/i18ns/I18n.d.ts +41 -0
- package/esm/drivers/i18ns/I18nFactory.d.ts +13 -0
- package/esm/drivers/i18ns/II18n.d.ts +66 -0
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +13 -0
- package/esm/drivers/i18ns/index.d.ts +3 -0
- package/esm/drivers/index.d.ts +1 -0
- package/esm/factorying/Factories.d.ts +15 -11
- package/esm/factorying/index.d.ts +16 -4
- package/esm/helpers/JsonHelper.d.ts +5 -1
- package/esm/repos/IRepo.d.ts +4 -0
- package/esm/repos/RepoFactory.d.ts +5 -0
- package/esm/repos/implements/SettingRepo.d.ts +15 -0
- package/esm/repos/index.d.ts +1 -1
- package/esm/svcs/implement/I18nSvc.d.ts +1 -1
- package/esm/svcs/implement/index.d.ts +1 -2
- package/esm/svcs/index.d.ts +1 -7
- package/esm/types/CreateFeOptions.d.ts +6 -5
- package/esm/utilities/SaveUtility.d.ts +15 -0
- package/esm/utilities/index.d.ts +2 -1
- package/package.json +2 -3
- package/dist/assets/@intlify-BISCQg1h.js +0 -2189
- package/dist/assets/@vue-aVYGocXp.js +0 -93
- package/dist/assets/vue-i18n-CLr3brPz.js +0 -1670
- package/esm/coms/Code.vue.d.ts +0 -41
- package/esm/coms/Col.vue.d.ts +0 -11
- package/esm/coms/Compare.vue.d.ts +0 -40
- package/esm/coms/Container.vue.d.ts +0 -23
- package/esm/coms/RichText.vue.d.ts +0 -24
- package/esm/coms/Row.vue.d.ts +0 -21
- package/esm/coms/types/CodeEmit.d.ts +0 -23
- package/esm/coms/types/CodeProps.d.ts +0 -18
- package/esm/coms/types/RichTextOptions.d.ts +0 -14
- package/esm/coms/types/RichTextProps.d.ts +0 -12
- package/esm/coms/types/RowProps.d.ts +0 -14
- package/esm/drivers/IDriver.d.ts +0 -10
- package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
- package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -15
- package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -21
- package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -12
- package/esm/drivers/factories/DriverFactory.d.ts +0 -64
- package/esm/drivers/factories/Factory.d.ts +0 -18
- package/esm/drivers/factories/IFactory.d.ts +0 -18
- package/esm/drivers/factories/index.d.ts +0 -42
- package/esm/drivers/providers/implements/StorageHelper.d.ts +0 -34
- package/esm/helpers/ScriptHelper.d.ts +0 -19
- package/esm/helpers/array-helper.d.ts +0 -97
- package/esm/helpers/component-helper.d.ts +0 -18
- package/esm/helpers/cookie-helper.d.ts +0 -6
- package/esm/helpers/dictionary-helper.d.ts +0 -18
- package/esm/helpers/dom-helper.d.ts +0 -86
- package/esm/helpers/event-helper.d.ts +0 -30
- package/esm/helpers/file-helper.d.ts +0 -22
- package/esm/helpers/html-helper.d.ts +0 -10
- package/esm/helpers/i18n-helper.d.ts +0 -14
- package/esm/helpers/image-helper.d.ts +0 -10
- package/esm/helpers/json-helper.d.ts +0 -39
- package/esm/helpers/math-helper.d.ts +0 -46
- package/esm/helpers/micro-helper.d.ts +0 -10
- package/esm/helpers/mount-helper.d.ts +0 -14
- package/esm/helpers/object-helper.d.ts +0 -38
- package/esm/helpers/script-helper.d.ts +0 -31
- package/esm/helpers/scroll-helper.d.ts +0 -14
- package/esm/helpers/sign-helper.d.ts +0 -14
- package/esm/helpers/storage-helper.d.ts +0 -34
- package/esm/helpers/string-helper.d.ts +0 -94
- package/esm/helpers/task-helper.d.ts +0 -26
- package/esm/helpers/time-helper.d.ts +0 -66
- package/esm/helpers/tree-helper.d.ts +0 -54
- package/esm/helpers/type-helper.d.ts +0 -26
- package/esm/helpers/url-helper.d.ts +0 -96
- package/esm/plugins/HtmlTransform.d.ts +0 -6
- package/esm/plugins/types/IMessager.d.ts +0 -34
- package/esm/plugins/types/index.d.ts +0 -7
- package/esm/services/ConfigService.d.ts +0 -66
- package/esm/services/DriverService.d.ts +0 -36
- package/esm/services/EnvService.d.ts +0 -14
- package/esm/services/LogService.d.ts +0 -19
- package/esm/services/SettingService.d.ts +0 -42
- package/esm/services/SocketService.d.ts +0 -23
- package/esm/services/UserService.d.ts +0 -47
- package/esm/services/index.d.ts +0 -15
- package/esm/services/types/IMessage.d.ts +0 -14
- package/esm/services/types/IMessager.d.ts +0 -34
- package/esm/services/types/index.d.ts +0 -2
- package/esm/servs/ConfigServ.d.ts +0 -66
- package/esm/servs/DriverServ.d.ts +0 -36
- package/esm/servs/EnvServ.d.ts +0 -14
- package/esm/servs/IServ.d.ts +0 -6
- package/esm/servs/LogServ.d.ts +0 -19
- package/esm/servs/Serv.d.ts +0 -4
- package/esm/servs/ServFactory.d.ts +0 -11
- package/esm/servs/SettingServ.d.ts +0 -42
- package/esm/servs/SocketServ.d.ts +0 -38
- package/esm/servs/UserServ.d.ts +0 -47
- package/esm/servs/implement/ConfigServ.d.ts +0 -66
- package/esm/servs/implement/DriverServ.d.ts +0 -36
- package/esm/servs/implement/EnvServ.d.ts +0 -14
- package/esm/servs/implement/LogServ.d.ts +0 -19
- package/esm/servs/implement/SettingServ.d.ts +0 -42
- package/esm/servs/implement/SocketServ.d.ts +0 -38
- package/esm/servs/implement/UserServ.d.ts +0 -47
- package/esm/servs/index.d.ts +0 -15
- package/esm/stores/config.d.ts +0 -63
- package/esm/stores/driver.d.ts +0 -37
- package/esm/stores/env.d.ts +0 -12
- package/esm/stores/index.d.ts +0 -8
- package/esm/stores/log.d.ts +0 -20
- package/esm/stores/setting.d.ts +0 -43
- package/esm/stores/socket.d.ts +0 -27
- package/esm/stores/user.d.ts +0 -40
- package/esm/types/CreateOptions.d.ts +0 -18
@@ -0,0 +1,41 @@
|
|
1
|
+
import II18n from "./II18n";
|
2
|
+
declare abstract class I18n implements II18n {
|
3
|
+
type: string;
|
4
|
+
lang: string;
|
5
|
+
messages: {
|
6
|
+
[key: string]: any;
|
7
|
+
};
|
8
|
+
open(conn?: string): Promise<void>;
|
9
|
+
t: (key: string, params?: any) => string;
|
10
|
+
abstract translate(key: string, params: any): string;
|
11
|
+
abstract t_exists(key: string): boolean;
|
12
|
+
t_menu: (key: string) => string;
|
13
|
+
t_module: (type: string, key: string) => string;
|
14
|
+
t_table: (table: string) => string;
|
15
|
+
t_field: (table: string, field: string) => string;
|
16
|
+
t_enum: (name: string, value: string) => string;
|
17
|
+
t_field_placeholder: (table: string, field: string) => string;
|
18
|
+
t_field_choose_placeholder: (table: string, field: string) => string;
|
19
|
+
t_sys: (key: string) => string;
|
20
|
+
t_title: () => string;
|
21
|
+
/**
|
22
|
+
* 根据key设置多语言标题
|
23
|
+
*/
|
24
|
+
setI18nTitle: (key: string) => void;
|
25
|
+
/**
|
26
|
+
* 设置标题
|
27
|
+
*/
|
28
|
+
setTitle: (title?: string, env?: string) => void;
|
29
|
+
/**
|
30
|
+
* 添加自定义多语言包
|
31
|
+
*/
|
32
|
+
addMessages: (messages: {
|
33
|
+
[key: string]: string;
|
34
|
+
}) => void;
|
35
|
+
abstract loadI18n(lang: string): Promise<void>;
|
36
|
+
/**
|
37
|
+
* 切换语言,自动加载菜单
|
38
|
+
*/
|
39
|
+
switchI18n: (lang: string) => Promise<void>;
|
40
|
+
}
|
41
|
+
export default I18n;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import Factory from "../../factorying/Factory";
|
2
|
+
import II18n from "./II18n";
|
3
|
+
/**
|
4
|
+
* 多语言工厂
|
5
|
+
*/
|
6
|
+
declare class I18nFactory extends Factory<II18n> {
|
7
|
+
open(): void;
|
8
|
+
/**
|
9
|
+
* 获取默认多语言
|
10
|
+
*/
|
11
|
+
getDefault(): Promise<II18n>;
|
12
|
+
}
|
13
|
+
export default I18nFactory;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { IDriver, IOpen } from "../types";
|
2
|
+
/**
|
3
|
+
* 多语言翻译接口
|
4
|
+
*/
|
5
|
+
interface II18n extends IDriver, IOpen {
|
6
|
+
/**
|
7
|
+
* 当前语言
|
8
|
+
*/
|
9
|
+
lang: string;
|
10
|
+
/**
|
11
|
+
* 多语言翻译文案
|
12
|
+
*/
|
13
|
+
messages: {
|
14
|
+
[key: string]: any;
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* 翻译指定key,不存在使用默认值
|
18
|
+
*/
|
19
|
+
t(key: string, params?: any): string;
|
20
|
+
/**
|
21
|
+
* 判断指定key是否存在
|
22
|
+
*/
|
23
|
+
t_exists(key: any): boolean;
|
24
|
+
/**
|
25
|
+
* 业务翻译:菜单多语言、多个窗口的多语言同时切换,而不用重载接口
|
26
|
+
*/
|
27
|
+
t_menu(key: string): string;
|
28
|
+
/**
|
29
|
+
* 模块业务翻译
|
30
|
+
*/
|
31
|
+
t_module(type: string, key: string): string;
|
32
|
+
/**
|
33
|
+
* 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
34
|
+
*/
|
35
|
+
t_table(table: string): string;
|
36
|
+
/**
|
37
|
+
* 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
38
|
+
* 注意:如果结果返回未完毕},则vue编译异常
|
39
|
+
*/
|
40
|
+
t_field(table: string, field: string): string;
|
41
|
+
/**
|
42
|
+
* 枚举翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
|
43
|
+
*/
|
44
|
+
t_enum(name: string, value: string): string;
|
45
|
+
/**
|
46
|
+
* 字段占位符翻译
|
47
|
+
*/
|
48
|
+
t_field_placeholder(table: string, field: string): string;
|
49
|
+
/**
|
50
|
+
* 字段占位符翻译
|
51
|
+
*/
|
52
|
+
t_field_choose_placeholder(table: string, field: string): string;
|
53
|
+
/**
|
54
|
+
* 系统翻译
|
55
|
+
*/
|
56
|
+
t_sys(key: string): string;
|
57
|
+
/**
|
58
|
+
* 系统标题
|
59
|
+
*/
|
60
|
+
t_title(): string;
|
61
|
+
/**
|
62
|
+
* 加载指定语言包
|
63
|
+
*/
|
64
|
+
loadI18n(lang?: string): Promise<void>;
|
65
|
+
}
|
66
|
+
export default II18n;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import I18n from "../I18n";
|
2
|
+
/**
|
3
|
+
* 默认翻译
|
4
|
+
* 不用vue-i18n的原因:对json内容的翻译报错无法消除,如:驱动Conn的多语言提示
|
5
|
+
*/
|
6
|
+
declare class DefaultI18n extends I18n {
|
7
|
+
type: string;
|
8
|
+
open(conn?: string): Promise<void>;
|
9
|
+
translate: (key: string, params?: any) => string;
|
10
|
+
t_exists: (key: string) => boolean;
|
11
|
+
loadI18n: (lang: string) => Promise<void>;
|
12
|
+
}
|
13
|
+
export default DefaultI18n;
|
package/esm/drivers/index.d.ts
CHANGED
@@ -1,19 +1,9 @@
|
|
1
|
-
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory, TemplateFactory } from "../drivers";
|
1
|
+
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory, TemplateFactory } from "../drivers";
|
2
2
|
import { SvcFactory } from "../svcs";
|
3
3
|
/**
|
4
4
|
* 驱动工厂类
|
5
5
|
*/
|
6
6
|
declare class Factories {
|
7
|
-
/**
|
8
|
-
* 工厂缓存
|
9
|
-
*/
|
10
|
-
static mappings: {
|
11
|
-
[key: string]: any;
|
12
|
-
};
|
13
|
-
/**
|
14
|
-
* 并缓存工厂实例
|
15
|
-
*/
|
16
|
-
static create<T>(type: any): T;
|
17
7
|
/**
|
18
8
|
* Builder工厂
|
19
9
|
*/
|
@@ -46,6 +36,10 @@ declare class Factories {
|
|
46
36
|
* Http请求工厂
|
47
37
|
*/
|
48
38
|
static get http(): HttpFactory;
|
39
|
+
/**
|
40
|
+
* 多语言工厂
|
41
|
+
*/
|
42
|
+
static get i18n(): I18nFactory;
|
49
43
|
/**
|
50
44
|
* 消息提示请求工厂
|
51
45
|
*/
|
@@ -74,5 +68,15 @@ declare class Factories {
|
|
74
68
|
* 服务工厂
|
75
69
|
*/
|
76
70
|
static get svc(): SvcFactory;
|
71
|
+
/**
|
72
|
+
* 工厂缓存
|
73
|
+
*/
|
74
|
+
static mappings: {
|
75
|
+
[key: string]: any;
|
76
|
+
};
|
77
|
+
/**
|
78
|
+
* 并缓存工厂实例
|
79
|
+
*/
|
80
|
+
static create<T>(type: any): T;
|
77
81
|
}
|
78
82
|
export default Factories;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import Factories from "./Factories";
|
2
|
-
import { ICdn, IEncoder, IHasher, IHttp, IMessenger,
|
2
|
+
import { ICdn, IEncoder, IHasher, II18n, IHttp, IMessenger, ITemplate } from "../drivers";
|
3
3
|
import { CreateFeOptions } from "../types";
|
4
4
|
/**
|
5
5
|
* 默认base64编码
|
@@ -13,14 +13,18 @@ declare let cdn: ICdn;
|
|
13
13
|
* 默认Http请求对象
|
14
14
|
*/
|
15
15
|
declare let http: IHttp;
|
16
|
+
/**
|
17
|
+
* 多语言翻译对象
|
18
|
+
*/
|
19
|
+
declare let i18n: II18n;
|
16
20
|
/**
|
17
21
|
* MD5 hash计算
|
18
22
|
*/
|
19
23
|
declare let md5: IHasher;
|
20
24
|
/**
|
21
|
-
*
|
25
|
+
* 默认模板引擎
|
22
26
|
*/
|
23
|
-
declare let
|
27
|
+
declare let template: ITemplate;
|
24
28
|
/**
|
25
29
|
* 初始化消息对象,保证后续更新能够被同步更新
|
26
30
|
*/
|
@@ -29,4 +33,12 @@ declare let messenger: IMessenger;
|
|
29
33
|
* 初始化默认驱动实例
|
30
34
|
*/
|
31
35
|
declare let initDriver: (options: CreateFeOptions) => Promise<void>;
|
32
|
-
|
36
|
+
/**
|
37
|
+
* 设置好请求器后,才可以设置多语言
|
38
|
+
*/
|
39
|
+
declare let initI18n: () => Promise<void>;
|
40
|
+
/**
|
41
|
+
* 提取可导出的翻译方法,当i18n实例变化后,导出的方案会跟着变化?
|
42
|
+
*/
|
43
|
+
declare let t: {}, t_exists: {}, t_sys: {}, t_enum: {}, t_field: {}, t_field_choose_placeholder: {}, t_field_placeholder: {}, t_table: {}, t_module: {}, t_menu: {};
|
44
|
+
export { base64, cdn, http, i18n, md5, template, messenger, initDriver, initI18n, Factories, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu };
|
@@ -18,7 +18,11 @@ declare class JsonHelper {
|
|
18
18
|
/**
|
19
19
|
* 根据props中的.自动分割得到属性值
|
20
20
|
*/
|
21
|
-
static
|
21
|
+
static hasKey(value: any, props: string[]): boolean;
|
22
|
+
/**
|
23
|
+
* 根据props中的.自动分割得到属性值
|
24
|
+
*/
|
25
|
+
static getValue(value: any, props: string[]): any;
|
22
26
|
/**
|
23
27
|
* 把json字符串合并到目标对象上
|
24
28
|
*/
|
package/esm/repos/index.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { I18nSvc };
|
1
|
+
export {};
|
package/esm/svcs/index.d.ts
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
import { I18nSvc } from "./implement";
|
2
1
|
import ConfigSvc from "./implement/ConfigSvc";
|
3
2
|
import EnvSvc from "./implement/EnvSvc";
|
4
3
|
import LogSvc from "./implement/LogSvc";
|
@@ -29,7 +28,6 @@ declare let driverSvc: {
|
|
29
28
|
loadEnvs: (reload?: boolean) => Promise<void>;
|
30
29
|
};
|
31
30
|
declare let envSvc: EnvSvc;
|
32
|
-
declare let i18nSvc: I18nSvc;
|
33
31
|
declare let logSvc: LogSvc;
|
34
32
|
declare let settingSvc: {
|
35
33
|
loaded: boolean;
|
@@ -65,8 +63,4 @@ declare let userSvc: UserSvc;
|
|
65
63
|
*/
|
66
64
|
declare let initSvc: (options: CreateFeOptions) => Promise<void>;
|
67
65
|
export * from "./implement";
|
68
|
-
|
69
|
-
* 提取可导出的翻译方法,当i18nSvc实例变化后,导出的方案会跟着变化?
|
70
|
-
*/
|
71
|
-
declare let t: (key: string, params?: any) => any, t_exists: (key: any) => any, t_sys: (key: string) => any, t_enum: (name: string, value: string) => any, t_field: (table: string, field: string) => any, t_field_choose_placeholder: (table: string, field: string) => any, t_field_placeholder: (table: string, field: string) => any, t_table: (table: string) => any, t_module: (type: string, key: string) => string, t_menu: (key: string) => any;
|
72
|
-
export { initSvc, configSvc, driverSvc, envSvc, i18nSvc, logSvc, settingSvc, socketSvc, userSvc, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu, SvcFactory };
|
66
|
+
export { initSvc, configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc, SvcFactory };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { IMessenger } from "../drivers";
|
2
|
-
import I18nSvc from "../svcs/implement/I18nSvc";
|
3
2
|
/**
|
4
3
|
* 初始化选项
|
5
4
|
*/
|
@@ -8,14 +7,16 @@ declare class CreateFeOptions {
|
|
8
7
|
* 消息发送对象
|
9
8
|
*/
|
10
9
|
messenger: IMessenger;
|
11
|
-
/**
|
12
|
-
* 实际的多语言翻译服务实体
|
13
|
-
*/
|
14
|
-
i18nSvc: I18nSvc;
|
15
10
|
/**
|
16
11
|
* 基准请求地址
|
17
12
|
*/
|
18
13
|
baseUrl: string;
|
14
|
+
/**
|
15
|
+
* 自定义语言包
|
16
|
+
*/
|
17
|
+
lang: {
|
18
|
+
[key: string]: any;
|
19
|
+
};
|
19
20
|
/**
|
20
21
|
* CDN类型
|
21
22
|
*/
|
package/esm/utilities/index.d.ts
CHANGED
@@ -2,5 +2,6 @@ import EventUtility from "./EventUtility";
|
|
2
2
|
import KeyboardUtility from "./KeyboardUtility";
|
3
3
|
import ListDelta from "./ListDelta";
|
4
4
|
import MouseUtility from "./MouseUtility";
|
5
|
+
import SaveUtility from "./SaveUtility";
|
5
6
|
export * from "./types";
|
6
|
-
export { EventUtility, KeyboardUtility, ListDelta, MouseUtility, };
|
7
|
+
export { EventUtility, KeyboardUtility, ListDelta, MouseUtility, SaveUtility };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "halo-fe",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.19",
|
4
4
|
"description": "Halo front end sdk",
|
5
5
|
"scripts": {
|
6
6
|
"halo-fe:tsc": "vue-tsc",
|
@@ -29,8 +29,7 @@
|
|
29
29
|
"registry": "https://registry.npmjs.org"
|
30
30
|
},
|
31
31
|
"peerDependencies": {
|
32
|
-
"vue": "3.4.37"
|
33
|
-
"vue-i18n": "9.13.1"
|
32
|
+
"vue": "3.4.37"
|
34
33
|
},
|
35
34
|
"dependencies": {
|
36
35
|
"clone": "2.1.2",
|