halo-fe 1.0.24 → 1.0.26
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -1
- package/dist/assets/{liquidjs-B8dqQyVv.js → liquidjs-C2HVw1Ra.js} +82 -81
- package/dist/main.js +4888 -4397
- package/dist/style.css +1 -1
- package/esm/@types/CreateFeOptions.d.ts +4 -0
- package/esm/coms/@types/PagerEmit.d.ts +11 -0
- package/esm/coms/@types/PagerProps.d.ts +18 -0
- package/esm/coms/@types/SocketProgressProps.d.ts +31 -0
- package/esm/coms/@types/TabProps.d.ts +11 -0
- package/esm/coms/@types/TableEmit.d.ts +10 -0
- package/esm/coms/@types/TableProps.d.ts +34 -0
- package/esm/coms/@types/index.d.ts +7 -1
- package/esm/coms/Empty.vue.d.ts +12 -10
- package/esm/coms/Fill.vue.d.ts +8 -10
- package/esm/coms/Scroller.vue.d.ts +11 -13
- package/esm/coms/Timer.vue.d.ts +7 -9
- package/esm/coms/cards/Index.vue.d.ts +16 -0
- package/esm/coms/cards/index.d.ts +2 -0
- package/esm/coms/conditions/Condition.vue.d.ts +1 -1
- package/esm/coms/conditions/Index.vue.d.ts +1 -1
- package/esm/coms/controls/@types/CodeIntelli.d.ts +6 -0
- package/esm/coms/controls/@types/CodeProps.d.ts +31 -2
- package/esm/coms/controls/@types/Range.d.ts +1 -1
- package/esm/coms/controls/Code.vue.d.ts +16 -28
- package/esm/coms/controls/Compare.vue.d.ts +16 -8
- package/esm/coms/controls/Input.vue.d.ts +2 -0
- package/esm/coms/controls/Option.vue.d.ts +1 -1
- package/esm/coms/controls/RichText.vue.d.ts +2 -4
- package/esm/coms/controls/Select.vue.d.ts +1 -1
- package/esm/coms/controls/index.d.ts +2 -1
- package/esm/coms/index.d.ts +1 -0
- package/esm/coms/layouts/Col.vue.d.ts +6 -8
- package/esm/coms/layouts/Container.vue.d.ts +12 -11
- package/esm/coms/layouts/Desc.vue.d.ts +2 -0
- package/esm/coms/layouts/Row.vue.d.ts +7 -8
- package/esm/coms/pagers/Index.vue.d.ts +9 -0
- package/esm/coms/pagers/index.d.ts +2 -0
- package/esm/coms/progresses/Circle.vue.d.ts +2 -0
- package/esm/coms/progresses/Index.vue.d.ts +9 -0
- package/esm/coms/progresses/SocketProgress.vue.d.ts +7 -9
- package/esm/coms/progresses/Spinner.vue.d.ts +20 -0
- package/esm/coms/progresses/index.d.ts +3 -2
- package/esm/coms/tables/Index.vue.d.ts +33 -0
- package/esm/coms/tabs/Tab.vue.d.ts +2 -2
- package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
- package/esm/drivers/@types/IOpen.d.ts +1 -1
- package/esm/drivers/builders/BuilderFactory.d.ts +1 -1
- package/esm/drivers/cdns/Cdn.d.ts +7 -9
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/ICdn.d.ts +2 -11
- package/esm/drivers/encoders/Encoder.d.ts +1 -1
- package/esm/drivers/encoders/EncoderFactory.d.ts +3 -2
- package/esm/drivers/encoders/IEncoder.d.ts +2 -5
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
- package/esm/drivers/encoders/implement/UrlEncoder.d.ts +7 -0
- package/esm/drivers/excels/Excel.d.ts +1 -1
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +1 -1
- package/esm/drivers/explainers/ExplainerFactory.d.ts +2 -2
- package/esm/drivers/features/FeatureFactory.d.ts +2 -2
- package/esm/drivers/features/IFeature.d.ts +2 -6
- package/esm/drivers/features/implements/ExpressionFeature.d.ts +1 -1
- package/esm/drivers/features/implements/I18NFeature.d.ts +1 -1
- package/esm/drivers/features/implements/SortFeature.d.ts +1 -1
- package/esm/drivers/hashers/Hasher.d.ts +1 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +2 -2
- package/esm/drivers/hashers/IHasher.d.ts +2 -5
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
- package/esm/drivers/https/Http.d.ts +22 -7
- package/esm/drivers/https/HttpFactory.d.ts +2 -7
- package/esm/drivers/https/IHttp.d.ts +16 -12
- package/esm/drivers/https/entities/HttpModel.d.ts +12 -0
- package/esm/drivers/https/entities/HttpResponse.d.ts +5 -1
- package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -1
- package/esm/drivers/https/implements/HaloHttp.d.ts +2 -10
- package/esm/drivers/https/implements/MkHttp.d.ts +2 -3
- package/esm/drivers/i18ns/I18n.d.ts +1 -1
- package/esm/drivers/i18ns/I18nFactory.d.ts +1 -1
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +1 -1
- package/esm/drivers/index.d.ts +52 -1
- package/esm/drivers/messengers/MessengerFactory.d.ts +2 -2
- package/esm/drivers/providers/IProvider.d.ts +19 -15
- package/esm/drivers/providers/Provider.d.ts +11 -9
- package/esm/drivers/providers/ProviderFactory.d.ts +5 -9
- package/esm/drivers/providers/implements/CookieProvider.d.ts +8 -8
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +20 -10
- package/esm/drivers/providers/implements/StorageProvider.d.ts +8 -8
- package/esm/drivers/signers/ISigner.d.ts +1 -1
- package/esm/drivers/signers/Signer.d.ts +1 -1
- package/esm/drivers/signers/SignerFactory.d.ts +2 -2
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +1 -1
- package/esm/drivers/sockets/@types/SubscribedWindow.d.ts +16 -0
- package/esm/drivers/sockets/@types/index.d.ts +2 -0
- package/esm/drivers/sockets/ISocket.d.ts +39 -0
- package/esm/drivers/sockets/Socket.d.ts +17 -0
- package/esm/drivers/sockets/SocketFactory.d.ts +13 -0
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +34 -0
- package/esm/drivers/sockets/entities/SocketResponse.d.ts +26 -0
- package/esm/drivers/sockets/entities/index.d.ts +3 -0
- package/esm/drivers/sockets/implement/DefaultSocket.d.ts +37 -0
- package/esm/drivers/sockets/index.d.ts +4 -0
- package/esm/drivers/ssos/ISso.d.ts +1 -1
- package/esm/drivers/ssos/Sso.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +2 -2
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/BearerSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/NioSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/SecretSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +1 -1
- package/esm/drivers/tasks/ITask.d.ts +10 -3
- package/esm/drivers/tasks/Task.d.ts +2 -1
- package/esm/drivers/tasks/TaskFactory.d.ts +2 -2
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +5 -3
- package/esm/drivers/templates/TemplateFactory.d.ts +2 -2
- package/esm/drivers/util/@types/JsonConfig.d.ts +10 -0
- package/esm/drivers/util/@types/TreeNodeProp.d.ts +9 -0
- package/esm/drivers/util/@types/index.d.ts +3 -0
- package/esm/drivers/util/IUtil.d.ts +8 -0
- package/esm/drivers/util/Util.d.ts +8 -0
- package/esm/drivers/util/UtilFactory.d.ts +32 -0
- package/esm/drivers/util/implements/ArrayUtil.d.ts +123 -0
- package/esm/drivers/util/implements/BrowserUtil.d.ts +12 -0
- package/esm/drivers/util/implements/ComponentUtil.d.ts +20 -0
- package/esm/drivers/util/implements/DictionaryUtil.d.ts +40 -0
- package/esm/drivers/util/implements/DomUtil.d.ts +118 -0
- package/esm/drivers/util/implements/EventUtil.d.ts +32 -0
- package/esm/drivers/util/implements/FileUtil.d.ts +24 -0
- package/esm/drivers/util/implements/HtmlUtil.d.ts +16 -0
- package/esm/drivers/util/implements/ImageUtil.d.ts +12 -0
- package/esm/drivers/util/implements/JsonUtil.d.ts +58 -0
- package/esm/drivers/util/implements/MathUtil.d.ts +52 -0
- package/esm/drivers/util/implements/MicroUtil.d.ts +12 -0
- package/esm/drivers/util/implements/MountUtil.d.ts +16 -0
- package/esm/drivers/util/implements/ObjectUtil.d.ts +44 -0
- package/esm/drivers/util/implements/ScrollUtil.d.ts +16 -0
- package/esm/drivers/util/implements/SignUtil.d.ts +16 -0
- package/esm/drivers/util/implements/StringUtil.d.ts +104 -0
- package/esm/drivers/util/implements/TaskUtil.d.ts +28 -0
- package/esm/drivers/util/implements/TimeUtil.d.ts +72 -0
- package/esm/drivers/util/implements/TreeUtil.d.ts +56 -0
- package/esm/drivers/util/implements/TypeUtil.d.ts +28 -0
- package/esm/drivers/util/implements/UrlUtil.d.ts +90 -0
- package/esm/drivers/util/index.d.ts +24 -0
- package/esm/drivers/utilities/IUtility.d.ts +3 -0
- package/esm/drivers/utilities/Utility.d.ts +3 -0
- package/esm/drivers/utilities/UtilityFactory.d.ts +6 -6
- package/esm/drivers/utilities/implement/EventUtility.d.ts +3 -6
- package/esm/drivers/utilities/implement/SaveUtility.d.ts +48 -3
- package/esm/drivers/videos/VideoFactory.d.ts +2 -2
- package/esm/drivers/voices/VoiceFactory.d.ts +2 -2
- package/esm/factory/Factories.d.ts +99 -0
- package/esm/factory/Factory.d.ts +41 -0
- package/esm/factory/IFactory.d.ts +40 -0
- package/esm/factory/Utils.d.ts +29 -0
- package/esm/factory/index.d.ts +4 -0
- package/esm/factorying/Factories.d.ts +9 -5
- package/esm/factorying/Factory.d.ts +7 -10
- package/esm/factorying/IFactory.d.ts +7 -3
- package/esm/factorying/Utils.d.ts +24 -9
- package/esm/factorying/index.d.ts +7 -2
- package/esm/main.d.ts +1 -2
- package/esm/repos/Repo.d.ts +5 -0
- package/esm/repos/RepoFactory.d.ts +20 -1
- package/esm/repos/implements/PageRepo.d.ts +30 -0
- package/esm/repos/implements/QueryRepo.d.ts +64 -0
- package/esm/repos/implements/SettingRepo.d.ts +1 -0
- package/esm/repos/index.d.ts +10 -1
- package/esm/svcs/SvcFactory.d.ts +1 -1
- package/esm/svcs/implement/ConfigSvc.d.ts +8 -8
- package/esm/svcs/implement/DriverSvc.d.ts +1 -35
- package/esm/svcs/index.d.ts +6 -17
- package/package.json +10 -10
@@ -1,9 +1,12 @@
|
|
1
1
|
import { DragOptions } from "../@types";
|
2
|
+
import { ITask } from "../../tasks";
|
2
3
|
import Utility from "../Utility";
|
3
4
|
/**
|
4
5
|
* 事件工具类
|
5
6
|
*/
|
6
7
|
declare class EventUtility extends Utility {
|
8
|
+
constructor();
|
9
|
+
resizeTask: ITask;
|
7
10
|
resizeObserver: ResizeObserver;
|
8
11
|
element: Element;
|
9
12
|
resizeHandler: any;
|
@@ -44,12 +47,6 @@ declare class EventUtility extends Utility {
|
|
44
47
|
* 鼠标按下
|
45
48
|
*/
|
46
49
|
mouseDown(element: Element, mouseDown: (event: MouseEvent) => void, mouseUp: (event: MouseEvent) => void): void;
|
47
|
-
lastDebounceTime: number;
|
48
|
-
lastDebounceTimeout: any;
|
49
|
-
/**
|
50
|
-
* 事件防抖: time ms没重复触发才执行指定操作
|
51
|
-
*/
|
52
|
-
debounce: (func: (args: any) => void, time: number, args?: any) => void;
|
53
50
|
dispatchElement: HTMLElement;
|
54
51
|
/**
|
55
52
|
* 创建分发事件元素
|
@@ -1,16 +1,61 @@
|
|
1
1
|
import Utility from "../Utility";
|
2
|
+
import { ITask } from "../../tasks";
|
3
|
+
import { IProvider } from "../../providers";
|
2
4
|
/**
|
3
5
|
* 自动保存工具
|
4
6
|
* 函数式编程,从而可以让方法被多处使用
|
5
7
|
*/
|
6
8
|
declare class SaveUtility extends Utility {
|
9
|
+
/**
|
10
|
+
* 已开启窗口
|
11
|
+
* 使用静态对象记录各自工具类开启的窗口,保证同一个kind工具类,被窗口多开时,能够杜绝异步方法导致的变量不一致问题
|
12
|
+
*/
|
13
|
+
static opened: {
|
14
|
+
[kind: string]: string[];
|
15
|
+
};
|
16
|
+
/**
|
17
|
+
* 任务实例,用于控制任务并发
|
18
|
+
*/
|
19
|
+
task: ITask;
|
20
|
+
/**
|
21
|
+
* 数据库驱动
|
22
|
+
*/
|
23
|
+
provider: IProvider;
|
24
|
+
/**
|
25
|
+
* 内容类别标识
|
26
|
+
*/
|
27
|
+
kind: string;
|
28
|
+
/**
|
29
|
+
* 实际对应的数据主键
|
30
|
+
*/
|
31
|
+
key: string;
|
32
|
+
/**
|
33
|
+
* 最新表单
|
34
|
+
*/
|
35
|
+
form: any;
|
36
|
+
/**
|
37
|
+
* 待删除的主键
|
38
|
+
*/
|
39
|
+
oldKey: string;
|
40
|
+
/**
|
41
|
+
* 变动实际处理程序
|
42
|
+
*/
|
43
|
+
handler: (val: any, oldVal: any) => Promise<void>;
|
7
44
|
/**
|
8
45
|
* 开启表单监控
|
9
46
|
*/
|
10
|
-
|
47
|
+
openAsync(kind: string, key: string, form: any): Promise<IProvider>;
|
48
|
+
/**
|
49
|
+
* 内容变动监听程序
|
50
|
+
*/
|
51
|
+
set changeHandler<T>(value: (val: T, oldVal: T) => Promise<void>);
|
52
|
+
/**
|
53
|
+
* 手动保存
|
54
|
+
*/
|
55
|
+
saveAsync(form: any): Promise<void>;
|
11
56
|
/**
|
12
|
-
*
|
57
|
+
* VIP:资源释放
|
13
58
|
*/
|
14
|
-
dispose(): void
|
59
|
+
dispose(dispose?: boolean): Promise<void>;
|
15
60
|
}
|
16
61
|
export default SaveUtility;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import Factory from "../../
|
1
|
+
import Factory from "../../factory/Factory";
|
2
2
|
import { IVoice } from "./IVoice";
|
3
3
|
declare class VoiceFactory extends Factory<IVoice> {
|
4
|
-
|
4
|
+
open(): void;
|
5
5
|
}
|
6
6
|
export default VoiceFactory;
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
|
2
|
+
import { RepoFactory } from "../repos";
|
3
|
+
import { SvcFactory } from "../svcs";
|
4
|
+
/**
|
5
|
+
* 驱动工厂类
|
6
|
+
*/
|
7
|
+
declare class Factories {
|
8
|
+
/**
|
9
|
+
* 工厂缓存
|
10
|
+
*/
|
11
|
+
static created: {
|
12
|
+
[key: string]: any;
|
13
|
+
};
|
14
|
+
/**
|
15
|
+
* Builder工厂
|
16
|
+
*/
|
17
|
+
static get builder(): BuilderFactory;
|
18
|
+
/**
|
19
|
+
* CDN工厂
|
20
|
+
*/
|
21
|
+
static get cdn(): CdnFactory;
|
22
|
+
/**
|
23
|
+
* 编码器工厂
|
24
|
+
*/
|
25
|
+
static get encoder(): EncoderFactory;
|
26
|
+
/**
|
27
|
+
* Excel工厂
|
28
|
+
*/
|
29
|
+
static get excel(): ExcelFactory;
|
30
|
+
/**
|
31
|
+
* Explainer工厂
|
32
|
+
*/
|
33
|
+
static get explainer(): ExplainerFactory;
|
34
|
+
/**
|
35
|
+
* 特征工厂
|
36
|
+
*/
|
37
|
+
static get feature(): FeatureFactory;
|
38
|
+
/**
|
39
|
+
* 哈希工厂
|
40
|
+
*/
|
41
|
+
static get hasher(): HasherFactory;
|
42
|
+
/**
|
43
|
+
* Http请求工厂
|
44
|
+
*/
|
45
|
+
static get http(): HttpFactory;
|
46
|
+
/**
|
47
|
+
* 多语言工厂
|
48
|
+
*/
|
49
|
+
static get i18n(): I18nFactory;
|
50
|
+
/**
|
51
|
+
* 消息提示请求工厂
|
52
|
+
*/
|
53
|
+
static get messenger(): MessengerFactory;
|
54
|
+
/**
|
55
|
+
* 提供程序工厂
|
56
|
+
*/
|
57
|
+
static get provider(): ProviderFactory;
|
58
|
+
/**
|
59
|
+
* 签名工厂
|
60
|
+
*/
|
61
|
+
static get signer(): SignerFactory;
|
62
|
+
/**
|
63
|
+
* 通信工厂
|
64
|
+
*/
|
65
|
+
static get socket(): SocketFactory;
|
66
|
+
/**
|
67
|
+
* SSO工厂
|
68
|
+
*/
|
69
|
+
static get sso(): SsoFactory;
|
70
|
+
/**
|
71
|
+
* Task工厂
|
72
|
+
*/
|
73
|
+
static get task(): TaskFactory;
|
74
|
+
/**
|
75
|
+
* 模板工厂
|
76
|
+
*/
|
77
|
+
static get template(): TemplateFactory;
|
78
|
+
/**
|
79
|
+
* 工具工厂
|
80
|
+
*/
|
81
|
+
static get util(): UtilFactory;
|
82
|
+
/**
|
83
|
+
* 工具类工厂
|
84
|
+
*/
|
85
|
+
static get utility(): UtilityFactory;
|
86
|
+
/**
|
87
|
+
* 仓储工厂
|
88
|
+
*/
|
89
|
+
static get repo(): RepoFactory;
|
90
|
+
/**
|
91
|
+
* 服务工厂
|
92
|
+
*/
|
93
|
+
static get svc(): SvcFactory;
|
94
|
+
/**
|
95
|
+
* 创建并缓存工厂实例
|
96
|
+
*/
|
97
|
+
static create<T>(type: any): T;
|
98
|
+
}
|
99
|
+
export default Factories;
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import IFactory from "./IFactory";
|
2
|
+
import { IDriver } from "../drivers";
|
3
|
+
import { Ref } from "../plugins";
|
4
|
+
/**
|
5
|
+
* 工厂基类
|
6
|
+
*/
|
7
|
+
declare abstract class Factory<T extends IDriver> implements IFactory<T> {
|
8
|
+
/**
|
9
|
+
* 当前驱动所有类型,用于使用时实例化
|
10
|
+
*/
|
11
|
+
types: any[];
|
12
|
+
/**
|
13
|
+
* 实例缓存集合
|
14
|
+
* 或者使用:Record<string, string>
|
15
|
+
*/
|
16
|
+
private created;
|
17
|
+
open(): void;
|
18
|
+
register(type: any): void;
|
19
|
+
/**
|
20
|
+
* 根据主键创建并开启驱动,并返回加载后的驱动信息
|
21
|
+
*/
|
22
|
+
createByIdAsync: (id: number, driverRef?: Ref<any>) => Promise<T>;
|
23
|
+
createWithCache(type: string, name?: string, open?: (entity: T) => void): T;
|
24
|
+
/**
|
25
|
+
* 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
|
26
|
+
*/
|
27
|
+
createWithCacheAsync(type?: string, open?: (entity: T) => Promise<void>): Promise<T>;
|
28
|
+
/**
|
29
|
+
* 异步创建指定类型驱动
|
30
|
+
*/
|
31
|
+
createAsync(type: string): Promise<T>;
|
32
|
+
/**
|
33
|
+
* 创建指定类型驱动
|
34
|
+
*/
|
35
|
+
create(type: string): T;
|
36
|
+
/**
|
37
|
+
* 加载驱动明细
|
38
|
+
*/
|
39
|
+
loadDriverAsync(id: number): Promise<any>;
|
40
|
+
}
|
41
|
+
export default Factory;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { Ref } from "../plugins";
|
2
|
+
/**
|
3
|
+
* 工厂接口
|
4
|
+
*/
|
5
|
+
interface IFactory<T> {
|
6
|
+
/**
|
7
|
+
* 当前驱动所有类型,用于使用时实例化
|
8
|
+
*/
|
9
|
+
get types(): any[];
|
10
|
+
/**
|
11
|
+
* 开启工厂
|
12
|
+
*/
|
13
|
+
open(): void;
|
14
|
+
/**
|
15
|
+
* 注册新类型
|
16
|
+
*/
|
17
|
+
register(type: any): any;
|
18
|
+
/**
|
19
|
+
* 根据主键创建驱动,并返回加载后的驱动信息
|
20
|
+
*/
|
21
|
+
createByIdAsync(id: number, driverRef?: Ref<any>): Promise<T>;
|
22
|
+
/**
|
23
|
+
* 从缓存中获取指定类型的驱动,不存在则创建,用于Helper类等简单类型
|
24
|
+
* 可以定义名称,实现同一类型,按照不同场景各自进行缓存
|
25
|
+
*/
|
26
|
+
createWithCache(type: string, name?: string, open?: (entity: T) => void): T;
|
27
|
+
/**
|
28
|
+
* 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
|
29
|
+
*/
|
30
|
+
createWithCacheAsync(type: string, open?: (entity: T) => Promise<void>): Promise<T>;
|
31
|
+
/**
|
32
|
+
* 异步创建指定类型驱动
|
33
|
+
*/
|
34
|
+
createAsync(type: string): Promise<T>;
|
35
|
+
/**
|
36
|
+
* 创建指定类型的实例
|
37
|
+
*/
|
38
|
+
create(type: string): T;
|
39
|
+
}
|
40
|
+
export default IFactory;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TypeUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil } from "../drivers/util";
|
2
|
+
/**
|
3
|
+
* 工具工厂(无状态)
|
4
|
+
*/
|
5
|
+
declare class Utils {
|
6
|
+
static get array(): ArrayUtil;
|
7
|
+
static get browser(): BrowserUtil;
|
8
|
+
static get component(): ComponentUtil;
|
9
|
+
static get dom(): DomUtil;
|
10
|
+
static get dictionary(): DictionaryUtil;
|
11
|
+
static get event(): EventUtil;
|
12
|
+
static get file(): FileUtil;
|
13
|
+
static get html(): HtmlUtil;
|
14
|
+
static get image(): ImageUtil;
|
15
|
+
static get json(): JsonUtil;
|
16
|
+
static get math(): MathUtil;
|
17
|
+
static get mount(): MountUtil;
|
18
|
+
static get object(): ObjectUtil;
|
19
|
+
static get micro(): MicroUtil;
|
20
|
+
static get scroll(): ScrollUtil;
|
21
|
+
static get string(): StringUtil;
|
22
|
+
static get task(): TaskUtil;
|
23
|
+
static get type(): TypeUtil;
|
24
|
+
static get time(): TimeUtil;
|
25
|
+
static get tree(): TreeUtil;
|
26
|
+
static get url(): UrlUtil;
|
27
|
+
static get sign(): SignUtil;
|
28
|
+
}
|
29
|
+
export default Utils;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory,
|
1
|
+
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
|
2
2
|
import { SvcFactory } from "../svcs";
|
3
3
|
/**
|
4
4
|
* 驱动工厂类
|
@@ -46,10 +46,6 @@ declare class Factories {
|
|
46
46
|
* 多语言工厂
|
47
47
|
*/
|
48
48
|
static get i18n(): I18nFactory;
|
49
|
-
/**
|
50
|
-
* 帮助类工厂
|
51
|
-
*/
|
52
|
-
static get helper(): HelperFactory;
|
53
49
|
/**
|
54
50
|
* 消息提示请求工厂
|
55
51
|
*/
|
@@ -62,6 +58,10 @@ declare class Factories {
|
|
62
58
|
* 签名工厂
|
63
59
|
*/
|
64
60
|
static get signer(): SignerFactory;
|
61
|
+
/**
|
62
|
+
* 通信工厂
|
63
|
+
*/
|
64
|
+
static get socket(): SocketFactory;
|
65
65
|
/**
|
66
66
|
* SSO工厂
|
67
67
|
*/
|
@@ -74,6 +74,10 @@ declare class Factories {
|
|
74
74
|
* 模板工厂
|
75
75
|
*/
|
76
76
|
static get template(): TemplateFactory;
|
77
|
+
/**
|
78
|
+
* 工具工厂
|
79
|
+
*/
|
80
|
+
static get util(): UtilFactory;
|
77
81
|
/**
|
78
82
|
* 工具类工厂
|
79
83
|
*/
|
@@ -21,20 +21,18 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
|
|
21
21
|
* 实例缓存集合
|
22
22
|
* 或者使用:Record<string, string>
|
23
23
|
*/
|
24
|
-
private
|
25
|
-
/**
|
26
|
-
* 开启
|
27
|
-
*/
|
24
|
+
private cached;
|
28
25
|
open(): void;
|
26
|
+
register(entity: T): void;
|
29
27
|
/**
|
30
|
-
*
|
28
|
+
* 根据主键创建并开启驱动,并返回加载后的驱动信息
|
31
29
|
*/
|
32
|
-
|
33
|
-
|
30
|
+
createByIdAsync: (id: number, driverRef?: Ref<any>) => Promise<T>;
|
31
|
+
createCache(type: string): T;
|
34
32
|
/**
|
35
33
|
* 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
|
36
34
|
*/
|
37
|
-
|
35
|
+
createCacheAsync(type?: string, open?: (entity: T) => Promise<void>): Promise<T>;
|
38
36
|
/**
|
39
37
|
* 创建指定类型驱动
|
40
38
|
*/
|
@@ -46,7 +44,6 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
|
|
46
44
|
/**
|
47
45
|
* 加载驱动明细
|
48
46
|
*/
|
49
|
-
|
50
|
-
addType(entity: T): void;
|
47
|
+
loadDriverAsync(id: number): Promise<any>;
|
51
48
|
}
|
52
49
|
export default Factory;
|
@@ -11,18 +11,22 @@ interface IFactory<T> {
|
|
11
11
|
* 开启工厂
|
12
12
|
*/
|
13
13
|
open(): void;
|
14
|
+
/**
|
15
|
+
* 注册新类型
|
16
|
+
*/
|
17
|
+
register(entity: T): any;
|
14
18
|
/**
|
15
19
|
* 根据主键创建驱动,并返回加载后的驱动信息
|
16
20
|
*/
|
17
|
-
|
21
|
+
createByIdAsync(id: number, driverRef?: Ref<any>): Promise<T>;
|
18
22
|
/**
|
19
23
|
* 从缓存中获取指定类型的驱动,不存在则创建,用于Helper类等简单类型
|
20
24
|
*/
|
21
|
-
|
25
|
+
createCache(type: string): T;
|
22
26
|
/**
|
23
27
|
* 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
|
24
28
|
*/
|
25
|
-
|
29
|
+
createCacheAsync(type: string, open?: (entity: T) => Promise<void>): Promise<T>;
|
26
30
|
/**
|
27
31
|
* 创建指定类型的实例
|
28
32
|
*/
|
@@ -1,14 +1,29 @@
|
|
1
|
+
import { ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TypeUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil } from "../drivers/helpers";
|
1
2
|
/**
|
2
|
-
*
|
3
|
+
* 工具工厂(无状态)
|
3
4
|
*/
|
4
5
|
declare class Utils {
|
5
|
-
static get
|
6
|
-
static
|
7
|
-
static
|
8
|
-
static
|
9
|
-
static
|
10
|
-
static
|
11
|
-
static
|
12
|
-
static
|
6
|
+
static get array(): ArrayUtil;
|
7
|
+
static get browser(): BrowserUtil;
|
8
|
+
static get component(): ComponentUtil;
|
9
|
+
static get dom(): DomUtil;
|
10
|
+
static get dictionary(): DictionaryUtil;
|
11
|
+
static get event(): EventUtil;
|
12
|
+
static get file(): FileUtil;
|
13
|
+
static get html(): HtmlUtil;
|
14
|
+
static get image(): ImageUtil;
|
15
|
+
static get json(): JsonUtil;
|
16
|
+
static get math(): MathUtil;
|
17
|
+
static get mount(): MountUtil;
|
18
|
+
static get object(): ObjectUtil;
|
19
|
+
static get micro(): MicroUtil;
|
20
|
+
static get scroll(): ScrollUtil;
|
21
|
+
static get string(): StringUtil;
|
22
|
+
static get task(): TaskUtil;
|
23
|
+
static get type(): TypeUtil;
|
24
|
+
static get time(): TimeUtil;
|
25
|
+
static get tree(): TreeUtil;
|
26
|
+
static get url(): UrlUtil;
|
27
|
+
static get sign(): SignUtil;
|
13
28
|
}
|
14
29
|
export default Utils;
|
@@ -2,7 +2,8 @@ import Factories from "./Factories";
|
|
2
2
|
import Factory from "./Factory";
|
3
3
|
import { ICdn, IEncoder, IHasher, II18n, IHttp, IMessenger, ITemplate } from "../drivers";
|
4
4
|
import { CreateFeOptions } from "../@types";
|
5
|
-
import
|
5
|
+
import Utils from "./Utils";
|
6
|
+
import ISocket from "../drivers/sockets/ISocket";
|
6
7
|
/**
|
7
8
|
* 默认base64编码
|
8
9
|
*/
|
@@ -23,6 +24,10 @@ declare let i18n: II18n;
|
|
23
24
|
* MD5 hash计算
|
24
25
|
*/
|
25
26
|
declare let md5: IHasher;
|
27
|
+
/**
|
28
|
+
* Socket通信
|
29
|
+
*/
|
30
|
+
declare let socket: ISocket;
|
26
31
|
/**
|
27
32
|
* 默认模板引擎
|
28
33
|
*/
|
@@ -39,4 +44,4 @@ declare let initDriver: (options: CreateFeOptions) => Promise<void>;
|
|
39
44
|
* 提取可导出的翻译方法,当i18n实例变化后,导出的方案会跟着变化?
|
40
45
|
*/
|
41
46
|
declare let t: typeof i18n.t, t_exists: typeof i18n.t_exists, t_sys: typeof i18n.t_sys, t_enum: typeof i18n.t_enum, t_field: typeof i18n.t_field, t_field_choose_placeholder: typeof i18n.t_field_choose_placeholder, t_field_placeholder: typeof i18n.t_field_placeholder, t_table: typeof i18n.t_table, t_module: typeof i18n.t_module, t_menu: typeof i18n.t_menu;
|
42
|
-
export { base64, cdn, http, i18n, md5, template, messenger, initDriver, Factories, Factory,
|
47
|
+
export { base64, cdn, http, i18n, md5, socket, template, messenger, initDriver, Factories, Factory, Utils, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu };
|
package/esm/main.d.ts
CHANGED
@@ -3,11 +3,10 @@ import "./styles/index.scss";
|
|
3
3
|
export * from "./@types";
|
4
4
|
export * from "./coms";
|
5
5
|
export * from "./drivers";
|
6
|
-
export * from "./
|
6
|
+
export * from "./factory";
|
7
7
|
export * from "./plugins";
|
8
8
|
export * from "./repos";
|
9
9
|
export * from "./svcs";
|
10
|
-
export * from "./drivers/utilities";
|
11
10
|
/**
|
12
11
|
* 初始化前端基础框架
|
13
12
|
*/
|
@@ -1,5 +1,24 @@
|
|
1
|
-
import Factory from "../
|
1
|
+
import Factory from "../factory/Factory";
|
2
2
|
import IRepo from "./IRepo";
|
3
|
+
import PageRepo from "./implements/PageRepo";
|
4
|
+
import QueryRepo from "./implements/QueryRepo";
|
5
|
+
import SettingRepo from "./implements/SettingRepo";
|
6
|
+
/**
|
7
|
+
* 仓储工厂
|
8
|
+
*/
|
3
9
|
declare class RepoFactory extends Factory<IRepo> {
|
10
|
+
open(): void;
|
11
|
+
/**
|
12
|
+
* 页面仓储
|
13
|
+
*/
|
14
|
+
get page(): PageRepo;
|
15
|
+
/**
|
16
|
+
* 查询仓储
|
17
|
+
*/
|
18
|
+
get query(): QueryRepo;
|
19
|
+
/**
|
20
|
+
* 设置仓储
|
21
|
+
*/
|
22
|
+
get setting(): SettingRepo;
|
4
23
|
}
|
5
24
|
export default RepoFactory;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import Repo from "../Repo";
|
2
|
+
/**
|
3
|
+
* 页面仓储
|
4
|
+
*/
|
5
|
+
declare class PageRepo extends Repo {
|
6
|
+
type: string;
|
7
|
+
/**
|
8
|
+
* 获取表的默认行数据
|
9
|
+
*/
|
10
|
+
getDefaultRow: (table: any) => any;
|
11
|
+
/**
|
12
|
+
* 更新提示内容
|
13
|
+
*/
|
14
|
+
updateTooltipByFields(table: string, row: any, fields: any[]): void;
|
15
|
+
/**
|
16
|
+
* 展开数据和架构信息
|
17
|
+
*/
|
18
|
+
expandSet: (schema: any[], set: any) => any;
|
19
|
+
/**
|
20
|
+
* 展开架构信息
|
21
|
+
*/
|
22
|
+
expandSchema(schema: any[], set: {
|
23
|
+
[key: string]: any;
|
24
|
+
}): any[];
|
25
|
+
/**
|
26
|
+
* 展开所有数据表的搜索字段信息
|
27
|
+
*/
|
28
|
+
expandSearch(schema: any[]): any[];
|
29
|
+
}
|
30
|
+
export default PageRepo;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { ITask } from "../../drivers";
|
2
|
+
import Repo from "../Repo";
|
3
|
+
/**
|
4
|
+
* 查询仓储
|
5
|
+
*/
|
6
|
+
declare class QueryRepo extends Repo {
|
7
|
+
type: string;
|
8
|
+
/**
|
9
|
+
* 加载完毕状态记录
|
10
|
+
*/
|
11
|
+
loaded: {
|
12
|
+
apps: boolean;
|
13
|
+
envs: boolean;
|
14
|
+
};
|
15
|
+
/**
|
16
|
+
* 是否加载中状态,用于并发场景 防止重复拉取接口
|
17
|
+
*/
|
18
|
+
loading: {
|
19
|
+
apps: boolean;
|
20
|
+
envs: boolean;
|
21
|
+
};
|
22
|
+
/**
|
23
|
+
* 代码语言集合
|
24
|
+
*/
|
25
|
+
codeLanguages: any[];
|
26
|
+
/**
|
27
|
+
* 驱动程序语言集合
|
28
|
+
*/
|
29
|
+
providerLanguages: any[];
|
30
|
+
/**
|
31
|
+
* 应用集合,存储到Store中,防止每一个Driver实例重复加载
|
32
|
+
*/
|
33
|
+
apps: any[];
|
34
|
+
/**
|
35
|
+
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
36
|
+
*/
|
37
|
+
envs: any[];
|
38
|
+
/**
|
39
|
+
* 并发任务管理器
|
40
|
+
*/
|
41
|
+
task: ITask;
|
42
|
+
open: () => void;
|
43
|
+
/**
|
44
|
+
* 加载应用选项
|
45
|
+
*/
|
46
|
+
loadAppsAsync(reload?: boolean): Promise<void>;
|
47
|
+
/**
|
48
|
+
* 加载环境选项
|
49
|
+
*/
|
50
|
+
loadEnvsAsync(reload?: boolean): Promise<void>;
|
51
|
+
/**
|
52
|
+
* 加载驱动选项
|
53
|
+
*/
|
54
|
+
loadDriversAsync(app: string, env: string, kind: string): Promise<any[]>;
|
55
|
+
/**
|
56
|
+
* 查询代码语言和文本语言映射关系
|
57
|
+
*/
|
58
|
+
loadCodeLanguageAsync(reload?: boolean): Promise<any[]>;
|
59
|
+
/**
|
60
|
+
* 查询驱动程序和文本语言映射关系
|
61
|
+
*/
|
62
|
+
loadDriverLanguageAsync(reload?: boolean): Promise<any[]>;
|
63
|
+
}
|
64
|
+
export default QueryRepo;
|
package/esm/repos/index.d.ts
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
import RepoFactory from "./RepoFactory";
|
2
|
+
import PageRepo from "./implements/PageRepo";
|
3
|
+
import QueryRepo from "./implements/QueryRepo";
|
1
4
|
import SettingRepo from "./implements/SettingRepo";
|
5
|
+
declare let pageRepo: PageRepo;
|
6
|
+
declare let queryRepo: QueryRepo;
|
2
7
|
declare let settingRepo: SettingRepo;
|
3
|
-
|
8
|
+
/**
|
9
|
+
* 初始化全局仓储对象
|
10
|
+
*/
|
11
|
+
declare let initRepoAsync: () => Promise<void>;
|
12
|
+
export { initRepoAsync, pageRepo, queryRepo, settingRepo, RepoFactory, };
|
package/esm/svcs/SvcFactory.d.ts
CHANGED