halo-fe 1.0.25 → 1.0.27
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 +3562 -3070
- package/dist/style.css +1 -1
- 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 +16 -0
- package/esm/coms/@types/TableEmit.d.ts +10 -0
- package/esm/coms/@types/TableProps.d.ts +14 -2
- package/esm/coms/@types/index.d.ts +4 -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 +15 -25
- package/esm/coms/index.d.ts +1 -0
- package/esm/coms/layouts/Row.vue.d.ts +7 -2
- package/esm/coms/pagers/Index.vue.d.ts +8 -1
- package/esm/coms/pagers/index.d.ts +2 -2
- package/esm/coms/progresses/Circle.vue.d.ts +2 -0
- package/esm/coms/progresses/Index.vue.d.ts +6 -3
- package/esm/coms/progresses/Spinner.vue.d.ts +20 -0
- package/esm/coms/progresses/index.d.ts +2 -1
- package/esm/coms/tables/Index.vue.d.ts +22 -3
- package/esm/coms/texts/@types/DanceProps.d.ts +14 -0
- package/esm/coms/texts/@types/index.d.ts +2 -0
- package/esm/coms/texts/Dance.vue.d.ts +5 -0
- package/esm/coms/texts/index.d.ts +2 -0
- 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 +1 -1
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/ICdn.d.ts +2 -6
- package/esm/drivers/encoders/Encoder.d.ts +1 -1
- package/esm/drivers/encoders/EncoderFactory.d.ts +2 -2
- package/esm/drivers/encoders/IEncoder.d.ts +2 -5
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
- 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 +11 -7
- package/esm/drivers/https/HttpFactory.d.ts +2 -7
- package/esm/drivers/https/IHttp.d.ts +12 -12
- 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/FeiShuHttp.d.ts +8 -0
- package/esm/drivers/https/implements/HaloHttp.d.ts +1 -1
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -1
- package/esm/drivers/i18ns/I18n.d.ts +2 -2
- package/esm/drivers/i18ns/I18nFactory.d.ts +1 -1
- package/esm/drivers/i18ns/II18n.d.ts +1 -1
- package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +2 -2
- package/esm/drivers/index.d.ts +50 -0
- 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 +7 -3
- package/esm/drivers/sockets/Socket.d.ts +10 -1
- package/esm/drivers/sockets/SocketFactory.d.ts +1 -1
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +34 -0
- package/esm/drivers/sockets/entities/SocketResponse.d.ts +42 -0
- package/esm/drivers/sockets/entities/index.d.ts +3 -0
- package/esm/drivers/sockets/implement/DefaultSocket.d.ts +0 -2
- package/esm/drivers/sockets/index.d.ts +3 -1
- 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 +7 -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/ITemplate.d.ts +1 -1
- package/esm/drivers/templates/Template.d.ts +1 -1
- package/esm/drivers/templates/TemplateFactory.d.ts +2 -2
- package/esm/drivers/templates/implement/LiquidTemplate.d.ts +1 -1
- package/esm/drivers/util/UtilFactory.d.ts +1 -1
- package/esm/drivers/util/implements/ArrayUtil.d.ts +5 -5
- package/esm/drivers/util/implements/EventUtil.d.ts +6 -6
- package/esm/drivers/util/implements/JsonUtil.d.ts +5 -0
- package/esm/drivers/util/implements/ObjectUtil.d.ts +1 -1
- package/esm/drivers/util/implements/SignUtil.d.ts +1 -1
- package/esm/drivers/util/implements/StringUtil.d.ts +1 -1
- package/esm/drivers/util/implements/TimeUtil.d.ts +1 -1
- 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/Factory.d.ts +3 -3
- package/esm/factorying/IFactory.d.ts +1 -1
- 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/entities/KeyboardType.d.ts +8 -0
- package/esm/repos/entities/index.d.ts +2 -0
- package/esm/repos/implements/ModuleRepo.d.ts +36 -0
- 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 +11 -1
- package/esm/svcs/SvcFactory.d.ts +1 -1
- package/esm/svcs/implement/ConfigSvc.d.ts +9 -9
- package/esm/svcs/implement/DriverSvc.d.ts +1 -35
- package/esm/svcs/index.d.ts +6 -15
- package/package.json +9 -9
@@ -16,11 +16,15 @@ interface ISocket extends IDriver, IOpen {
|
|
16
16
|
*/
|
17
17
|
connect(): Promise<void>;
|
18
18
|
/**
|
19
|
-
*
|
19
|
+
* 订阅多个消息类型,并缓存到订阅池
|
20
20
|
*/
|
21
|
-
subscribe(win: string, kind: string, type: string): Promise<any>;
|
21
|
+
subscribe(win: string, kind: string, type: string | string[]): Promise<any>;
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* 重连时,重新订阅
|
24
|
+
*/
|
25
|
+
resubscribe(): Promise<void>;
|
26
|
+
/**
|
27
|
+
* 取消订阅该窗口 所有Socket事件处理程序,防止内存泄漏
|
24
28
|
*/
|
25
29
|
unsubscribe(win: string): Promise<any>;
|
26
30
|
/**
|
@@ -1,8 +1,17 @@
|
|
1
1
|
import ISocket from "./ISocket";
|
2
|
+
import { SubscribedWindow } from "./@types";
|
2
3
|
/**
|
3
4
|
* Socket基类
|
4
5
|
*/
|
5
6
|
declare class Socket implements ISocket {
|
6
|
-
|
7
|
+
/**
|
8
|
+
* 已订阅的消息类型列表
|
9
|
+
*/
|
10
|
+
subscribed: SubscribedWindow;
|
11
|
+
openAsync(conn?: string): Promise<void>;
|
12
|
+
subscribe(win: string, kind: string, type: string | string[]): Promise<any>;
|
13
|
+
resubscribe(): Promise<void>;
|
14
|
+
unsubscribe(win: string): Promise<any>;
|
15
|
+
abstract send(data: any): void;
|
7
16
|
}
|
8
17
|
export default Socket;
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* Socket进度消息
|
3
|
+
*/
|
4
|
+
declare class SocketProgress<T> {
|
5
|
+
/**
|
6
|
+
* 成功数量
|
7
|
+
*/
|
8
|
+
succeed: number;
|
9
|
+
/**
|
10
|
+
* 异常数量
|
11
|
+
*/
|
12
|
+
errored: number;
|
13
|
+
/**
|
14
|
+
* 已处理数量
|
15
|
+
*/
|
16
|
+
handled: number;
|
17
|
+
/**
|
18
|
+
* 总数量
|
19
|
+
*/
|
20
|
+
total: number;
|
21
|
+
/**
|
22
|
+
* 当前消息体
|
23
|
+
*/
|
24
|
+
current: T;
|
25
|
+
/**
|
26
|
+
* 增加成功进度
|
27
|
+
*/
|
28
|
+
success(current: T): void;
|
29
|
+
/**
|
30
|
+
* 增加异常进度
|
31
|
+
*/
|
32
|
+
error(current: T, message: string): void;
|
33
|
+
}
|
34
|
+
export default SocketProgress;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
/**
|
2
|
+
* Socket响应消息
|
3
|
+
*/
|
4
|
+
declare class SocketResponse<T> {
|
5
|
+
/**
|
6
|
+
* 是否执行成功
|
7
|
+
*/
|
8
|
+
ok: boolean;
|
9
|
+
/**
|
10
|
+
* 异常消息
|
11
|
+
*/
|
12
|
+
message: string;
|
13
|
+
/**
|
14
|
+
* 耗时
|
15
|
+
*/
|
16
|
+
elapsed: number;
|
17
|
+
/**
|
18
|
+
* 消息类别
|
19
|
+
*/
|
20
|
+
kind: string;
|
21
|
+
/**
|
22
|
+
* 消息类型
|
23
|
+
*/
|
24
|
+
type: string;
|
25
|
+
/**
|
26
|
+
* 数据体
|
27
|
+
*/
|
28
|
+
data: T;
|
29
|
+
/**
|
30
|
+
* 初始化并设置数据
|
31
|
+
*/
|
32
|
+
constructor(kind: string, type: string, data: T);
|
33
|
+
/**
|
34
|
+
* 成功输出
|
35
|
+
*/
|
36
|
+
onOk(message?: string): void;
|
37
|
+
/**
|
38
|
+
* 异常输出
|
39
|
+
*/
|
40
|
+
onError(message: string): void;
|
41
|
+
}
|
42
|
+
export default SocketResponse;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import ISso from "./ISso";
|
2
|
-
import Factory from "../../
|
2
|
+
import Factory from "../../factory/Factory";
|
3
3
|
/**
|
4
4
|
* SSO工厂类
|
5
5
|
*/
|
@@ -7,7 +7,7 @@ declare class SsoFactory extends Factory<ISso> {
|
|
7
7
|
/**
|
8
8
|
* 获取实例
|
9
9
|
*/
|
10
|
-
|
10
|
+
open(): void;
|
11
11
|
/**
|
12
12
|
* 获取指定SSO实例
|
13
13
|
*/
|
@@ -14,14 +14,18 @@ interface ITask extends IDriver, IDispose {
|
|
14
14
|
/**
|
15
15
|
* 按照频控去执行任务
|
16
16
|
*/
|
17
|
-
|
17
|
+
frequency<T>(entities: T[], frequency: number, threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
18
18
|
/**
|
19
19
|
* 按照并发数量控制多个任务执行
|
20
20
|
* handler不能直接放置promise,因为promise被传递前的实例化过程就会执行内部方法
|
21
|
-
* 场景:通过并发数为1
|
21
|
+
* 场景:通过并发数为1,控制不通类库在并发加载时,define函数冲突问题
|
22
22
|
* 注意:是相同时间的并发数控制,不是1s内的并发数控制
|
23
23
|
*/
|
24
|
-
concurrent<T>(handler: () => Promise<T
|
24
|
+
concurrent<T>(handler: () => Promise<T>, limit?: number): Promise<T>;
|
25
|
+
/**
|
26
|
+
* 事件防抖: time ms没重复触发才执行指定操作
|
27
|
+
*/
|
28
|
+
debounce(fn: (args: any) => Promise<void>, time: number, args?: any): void;
|
25
29
|
/**
|
26
30
|
* 每间隔指定时间执行指定任务
|
27
31
|
*/
|
@@ -6,8 +6,9 @@ declare abstract class Task implements ITask {
|
|
6
6
|
type: string;
|
7
7
|
taskLimit: number;
|
8
8
|
abstract execute<T>(entities: T[], threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
9
|
-
abstract
|
9
|
+
abstract frequency<T>(entities: T[], frequency: number, threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
10
10
|
abstract concurrent<T>(handler: () => Promise<T>): Promise<T>;
|
11
|
+
abstract debounce(fn: (args: any) => Promise<void>, time: number, args?: any): void;
|
11
12
|
abstract interval(ms: number, task: () => void): void;
|
12
13
|
abstract dispose(): void;
|
13
14
|
}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import Factory from "../../
|
1
|
+
import Factory from "../../factory/Factory";
|
2
2
|
import ITask from "./ITask";
|
3
3
|
/**
|
4
4
|
* 任务工厂类
|
5
5
|
*/
|
6
6
|
declare class TaskFactory extends Factory<ITask> {
|
7
|
-
|
7
|
+
open(): void;
|
8
8
|
}
|
9
9
|
export default TaskFactory;
|
@@ -6,22 +6,24 @@ declare class MemoryTask extends Task {
|
|
6
6
|
type: string;
|
7
7
|
intervalTimeout: any;
|
8
8
|
execute<T>(entities: T[], threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
9
|
-
|
9
|
+
frequency<T>(entities: T[], frequency: number, threads: number, handler: (chunk: T[], index: number) => Promise<void>): Promise<void>;
|
10
10
|
/**
|
11
11
|
* 待执行的任务队列
|
12
12
|
*/
|
13
13
|
tasks: (() => Promise<any>)[];
|
14
|
-
taskLimit: number;
|
15
14
|
taskExecuting: number;
|
16
15
|
taskResolves: ((value: any) => void)[];
|
17
16
|
/**
|
18
17
|
* 相同时间的并发数控制,不是1s内的并发数控制
|
19
18
|
*/
|
20
|
-
concurrent<T>(handler: () => Promise<T
|
19
|
+
concurrent<T>(handler: () => Promise<T>, limit?: number): Promise<T>;
|
21
20
|
/**
|
22
21
|
* 按照并发执行
|
23
22
|
*/
|
24
23
|
private run;
|
24
|
+
lastDebounceTime: number;
|
25
|
+
lastDebounceTimeout: any;
|
26
|
+
debounce: (fn: (args: any) => Promise<void>, time: number, args?: any) => void;
|
25
27
|
interval(ms: number, task: () => void): void;
|
26
28
|
dispose(): void;
|
27
29
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import ITemplate from "./ITemplate";
|
2
2
|
declare abstract class Template implements ITemplate {
|
3
3
|
type: string;
|
4
|
-
abstract
|
4
|
+
abstract renderAsync(template: string, model: any): Promise<string>;
|
5
5
|
}
|
6
6
|
export default Template;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import Factory from "../../
|
1
|
+
import Factory from "../../factory/Factory";
|
2
2
|
import ITemplate from "./ITemplate";
|
3
3
|
/**
|
4
4
|
* 模板工厂
|
5
5
|
*/
|
6
6
|
declare class TemplateFactory extends Factory<ITemplate> {
|
7
|
-
|
7
|
+
open(): void;
|
8
8
|
}
|
9
9
|
export default TemplateFactory;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import Factory from "../../factory/Factory";
|
2
2
|
import IUtil from "./IUtil";
|
3
3
|
import { ArrayUtil, BrowserUtil, ComponentUtil, DictionaryUtil, DomUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, JsonUtil, MathUtil, MicroUtil, MountUtil, ObjectUtil, ScrollUtil, SignUtil, StringUtil, TaskUtil, TimeUtil, TreeUtil, TypeUtil, UrlUtil } from "./";
|
4
4
|
/**
|
@@ -31,19 +31,19 @@ declare class ArrayUtil extends Util {
|
|
31
31
|
/**
|
32
32
|
* 求最大值,数据类型的比较函数要自己转换为数值类型
|
33
33
|
*/
|
34
|
-
max: (entities: any[],
|
34
|
+
max: (entities: any[], fn: Function) => any;
|
35
35
|
/**
|
36
36
|
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
37
37
|
*/
|
38
|
-
min: (entities: any[],
|
38
|
+
min: (entities: any[], fn: Function) => any;
|
39
39
|
/**
|
40
40
|
* 求平均值
|
41
41
|
*/
|
42
|
-
avg: (entities: any[],
|
42
|
+
avg: (entities: any[], fn: Function, digits?: number) => number;
|
43
43
|
/**
|
44
44
|
* 求和
|
45
45
|
*/
|
46
|
-
sum: (entities: any[],
|
46
|
+
sum: (entities: any[], fn: Function, digits?: number) => number;
|
47
47
|
/**
|
48
48
|
* 是否包含
|
49
49
|
*/
|
@@ -114,7 +114,7 @@ declare class ArrayUtil extends Util {
|
|
114
114
|
/**
|
115
115
|
* 分组
|
116
116
|
*/
|
117
|
-
groupByArray: (entities: any[],
|
117
|
+
groupByArray: (entities: any[], keyFn: (item: any) => any) => any[];
|
118
118
|
/**
|
119
119
|
* 替换指定元素为新元素,不存在则添加
|
120
120
|
*/
|
@@ -7,26 +7,26 @@ declare class EventUtil extends Util {
|
|
7
7
|
/**
|
8
8
|
* 批量绑定事件,执行指定处理函数
|
9
9
|
*/
|
10
|
-
bind: (events: any[], dom: any,
|
10
|
+
bind: (events: any[], dom: any, fn: Function) => void;
|
11
11
|
/**
|
12
12
|
* 批量绑定事件,执行指定处理函数
|
13
13
|
*/
|
14
|
-
unbind: (events: any[], dom: any,
|
14
|
+
unbind: (events: any[], dom: any, fn: Function) => void;
|
15
15
|
/**
|
16
16
|
* 绑定点击处理函数
|
17
17
|
*/
|
18
|
-
click: (dom: any,
|
18
|
+
click: (dom: any, fn: Function) => void;
|
19
19
|
/**
|
20
20
|
* 解除点击监听
|
21
21
|
*/
|
22
|
-
unclick: (dom: any,
|
22
|
+
unclick: (dom: any, fn: Function) => void;
|
23
23
|
/**
|
24
24
|
* 绑定滚动处理函数
|
25
25
|
*/
|
26
|
-
scroll: (dom: any,
|
26
|
+
scroll: (dom: any, fn: Function) => void;
|
27
27
|
/**
|
28
28
|
* 移除滚动处理函数,防止内存泄漏
|
29
29
|
*/
|
30
|
-
unscroll: (dom: any,
|
30
|
+
unscroll: (dom: any, fn: Function) => void;
|
31
31
|
}
|
32
32
|
export default EventUtil;
|
@@ -13,6 +13,11 @@ declare class JsonUtil extends Util {
|
|
13
13
|
* 把对象格式化为Json字符串
|
14
14
|
*/
|
15
15
|
serialize(value: any, config?: boolean | JsonConfig): string;
|
16
|
+
/**
|
17
|
+
* 自动移除注释,并反序列化
|
18
|
+
* 支持自动去除// 和 \/**\/注释
|
19
|
+
*/
|
20
|
+
autoDeserialize(value: string): any;
|
16
21
|
/**
|
17
22
|
* 反序列化成json对象
|
18
23
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import Factory from "../../factory/Factory";
|
2
2
|
import IUtility from "./IUtility";
|
3
3
|
import AffixUtility from "./implement/AffixUtility";
|
4
4
|
import DeltaUtility from "./implement/DeltaUtility";
|
@@ -20,23 +20,23 @@ declare class UtilityFactory extends Factory<IUtility> {
|
|
20
20
|
*/
|
21
21
|
delta(): DeltaUtility;
|
22
22
|
/**
|
23
|
-
*
|
23
|
+
* 创建事件工具
|
24
24
|
*/
|
25
25
|
event(): EventUtility;
|
26
26
|
/**
|
27
|
-
*
|
27
|
+
* 创建键盘工具
|
28
28
|
*/
|
29
29
|
keyboard(): KeyboardUtility;
|
30
30
|
/**
|
31
|
-
*
|
31
|
+
* 创建鼠标工具
|
32
32
|
*/
|
33
33
|
mouse(container: HTMLElement, closeTriggers?: any[]): MouseUtility;
|
34
34
|
/**
|
35
|
-
*
|
35
|
+
* 创建随机工具
|
36
36
|
*/
|
37
37
|
random(): RandomUtility;
|
38
38
|
/**
|
39
|
-
*
|
39
|
+
* 创建保存工具
|
40
40
|
*/
|
41
41
|
save(): SaveUtility;
|
42
42
|
}
|
@@ -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;
|