halo-fe 1.0.23 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/{liquidjs-C-LVcoaY.js → liquidjs-B8dqQyVv.js} +639 -632
- package/dist/main.js +4365 -4206
- package/dist/style.css +1 -1
- package/esm/@types/CreateFeOptions.d.ts +4 -0
- package/esm/coms/@types/SocketProgressProps.d.ts +23 -0
- package/esm/coms/@types/TabProps.d.ts +11 -0
- package/esm/coms/@types/TableProps.d.ts +22 -0
- package/esm/coms/@types/index.d.ts +4 -1
- package/esm/coms/Empty.vue.d.ts +11 -7
- package/esm/coms/Fill.vue.d.ts +11 -4
- package/esm/coms/Scroller.vue.d.ts +16 -15
- package/esm/coms/Timer.vue.d.ts +9 -4
- package/esm/coms/{Col.vue.d.ts → cards/Index.vue.d.ts} +8 -3
- package/esm/coms/cards/index.d.ts +2 -0
- package/esm/coms/conditions/Condition.vue.d.ts +1 -10
- package/esm/coms/conditions/Index.vue.d.ts +1 -10
- package/esm/coms/controls/Code.vue.d.ts +15 -15
- package/esm/coms/controls/Compare.vue.d.ts +5 -5
- 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 +4 -15
- 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 +8 -3
- package/esm/coms/layouts/Container.vue.d.ts +11 -6
- package/esm/coms/layouts/Desc.vue.d.ts +2 -0
- package/esm/coms/layouts/Row.vue.d.ts +8 -13
- package/esm/coms/pagers/Index.vue.d.ts +2 -0
- package/esm/coms/pagers/index.d.ts +2 -0
- package/esm/coms/progresses/Index.vue.d.ts +6 -0
- package/esm/coms/progresses/Progress.vue.d.ts +4 -16
- package/esm/coms/progresses/SocketProgress.vue.d.ts +9 -13
- package/esm/coms/progresses/index.d.ts +1 -1
- package/esm/coms/tables/Index.vue.d.ts +14 -0
- package/esm/coms/tables/Table.vue.d.ts +1 -1
- package/esm/coms/tabs/Tab.vue.d.ts +2 -11
- package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
- package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
- package/esm/drivers/builders/types/index.d.ts +2 -0
- package/esm/drivers/cdns/Cdn.d.ts +6 -8
- package/esm/drivers/cdns/ICdn.d.ts +0 -5
- package/esm/drivers/encoders/EncoderFactory.d.ts +1 -0
- package/esm/drivers/encoders/implement/UrlEncoder.d.ts +7 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/helpers/implements/ArrayHelper.d.ts +1 -2
- package/esm/drivers/helpers/implements/DomHelper.d.ts +1 -1
- package/esm/drivers/https/Http.d.ts +13 -2
- package/esm/drivers/https/IHttp.d.ts +4 -0
- package/esm/drivers/https/entities/HttpModel.d.ts +12 -0
- package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -1
- package/esm/drivers/https/implements/HaloHttp.d.ts +1 -9
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -2
- package/esm/drivers/index.d.ts +3 -1
- package/esm/drivers/sockets/ISocket.d.ts +35 -0
- package/esm/drivers/sockets/Socket.d.ts +8 -0
- package/esm/drivers/sockets/SocketFactory.d.ts +13 -0
- package/esm/drivers/sockets/implement/DefaultSocket.d.ts +39 -0
- package/esm/drivers/sockets/index.d.ts +2 -0
- package/esm/drivers/tasks/ITask.d.ts +3 -0
- 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 +53 -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/{helpers/time-helper.d.ts → drivers/util/implements/TimeUtil.d.ts} +30 -24
- package/esm/drivers/util/implements/TreeUtil.d.ts +56 -0
- package/esm/{helpers/type-helper.d.ts → drivers/util/implements/TypeUtil.d.ts} +9 -7
- package/esm/{helpers/url-helper.d.ts → drivers/util/implements/UrlUtil.d.ts} +23 -29
- package/esm/drivers/util/index.d.ts +24 -0
- package/esm/drivers/utilities/@types/DragEvent.d.ts +11 -0
- package/esm/drivers/utilities/@types/DragOptions.d.ts +28 -0
- package/esm/drivers/utilities/@types/Position.d.ts +15 -0
- package/esm/drivers/utilities/@types/Rect.d.ts +10 -0
- package/esm/drivers/utilities/@types/index.d.ts +5 -0
- package/esm/drivers/utilities/IUtility.d.ts +4 -0
- package/esm/drivers/utilities/Utility.d.ts +5 -0
- package/esm/drivers/utilities/UtilityFactory.d.ts +43 -0
- package/esm/drivers/utilities/implement/AffixUtility.d.ts +11 -0
- package/esm/drivers/utilities/implement/DeltaUtility.d.ts +11 -0
- package/esm/drivers/utilities/implement/EventUtility.d.ts +73 -0
- package/esm/drivers/utilities/implement/KeyboardUtility.d.ts +74 -0
- package/esm/drivers/utilities/implement/MouseUtility.d.ts +25 -0
- package/esm/drivers/utilities/implement/RandomUtility.d.ts +41 -0
- package/esm/drivers/utilities/implement/SaveUtility.d.ts +16 -0
- package/esm/drivers/utilities/index.d.ts +9 -0
- package/esm/factorying/Factories.d.ts +13 -5
- package/esm/factorying/Factory.d.ts +4 -7
- package/esm/factorying/{Helpers.d.ts → Helps.d.ts} +2 -2
- package/esm/factorying/IFactory.d.ts +6 -2
- package/esm/factorying/Utils.d.ts +29 -0
- package/esm/factorying/index.d.ts +7 -2
- package/esm/helpers/DictionaryHelper.d.ts +6 -0
- package/esm/main.d.ts +1 -1
- package/esm/svcs/@types/Dictionary.d.ts +4 -0
- package/esm/svcs/implement/ConfigSvc.d.ts +1 -1
- package/esm/svcs/implement/DriverSvc.d.ts +4 -0
- package/esm/svcs/implement/I18nSvc.d.ts +1 -1
- package/esm/svcs/index.d.ts +2 -3
- package/esm/utilities/MathUtility.d.ts +35 -0
- package/package.json +9 -9
- package/esm/coms/Code.vue.d.ts +0 -41
- 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/tree-helper.d.ts +0 -54
- 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
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}>;
|
2
2
|
export default _default;
|
@@ -1,12 +1,3 @@
|
|
1
|
-
import { TabProps } from "
|
2
|
-
declare const _default: import("vue").DefineComponent<
|
1
|
+
import { TabProps } from "../@types";
|
2
|
+
declare const _default: import("vue").DefineComponent<TabProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TabProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
3
3
|
export default _default;
|
4
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
5
|
-
type __VLS_TypePropsToOption<T> = {
|
6
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
7
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
8
|
-
} : {
|
9
|
-
type: import('vue').PropType<T[K]>;
|
10
|
-
required: true;
|
11
|
-
};
|
12
|
-
};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
2
2
|
export default _default;
|
@@ -11,23 +11,21 @@ declare abstract class Cdn implements ICdn {
|
|
11
11
|
task: ITask;
|
12
12
|
open(conn: string): Promise<void>;
|
13
13
|
abstract getCrypto(): Promise<any>;
|
14
|
-
getECharts(
|
14
|
+
abstract getECharts(): Promise<any>;
|
15
15
|
abstract getElementPlus(): Promise<any>;
|
16
16
|
abstract getFortAwesome(): Promise<any>;
|
17
17
|
getMonaco(baseUrl?: string): Promise<any>;
|
18
|
-
getQuill(
|
18
|
+
getQuill(): Promise<any>;
|
19
19
|
abstract getWeiXin(): Promise<any>;
|
20
20
|
abstract getXlsx(): Promise<any>;
|
21
|
-
loadFilesAsync(path: string, files: string[]): Promise<void>;
|
22
|
-
loadAsync(path: string | string[]): Promise<HTMLElement[]>;
|
23
21
|
/**
|
24
|
-
*
|
25
|
-
* 这种方式,依赖的内部资源,会从当前站点加载
|
22
|
+
* 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
|
26
23
|
*/
|
27
|
-
|
24
|
+
loadByOrder(basePath: string, paths: string[], name: string): Promise<any>;
|
25
|
+
loadFilesAsync(path: string, files: string[]): Promise<void>;
|
28
26
|
/**
|
29
27
|
* 通过注入DOM标签异步加载脚本或样式表,已防重
|
30
28
|
*/
|
31
|
-
|
29
|
+
loadAsync: (url: string | string[]) => Promise<HTMLElement[]>;
|
32
30
|
}
|
33
31
|
export default Cdn;
|
@@ -47,10 +47,5 @@ interface ICdn extends IDriver {
|
|
47
47
|
* 异步加载单个路径下的多个文件
|
48
48
|
*/
|
49
49
|
loadFilesAsync(path: string, files: string[]): Promise<void>;
|
50
|
-
/**
|
51
|
-
* 加载资源,已防重
|
52
|
-
* VIP:同一异步方法被并发调用时,后续的调用会直接完成
|
53
|
-
*/
|
54
|
-
loadAsync(name: string | string[]): Promise<HTMLElement[]>;
|
55
50
|
}
|
56
51
|
export default ICdn;
|
@@ -105,9 +105,8 @@ declare class ArrayHelper extends Helper {
|
|
105
105
|
removeIndex: (str: string, index: number, split: string) => string;
|
106
106
|
/**
|
107
107
|
* 按照指定函数对数组排序
|
108
|
-
* order: asc desc null
|
109
108
|
*/
|
110
|
-
orderBy: (entities: any[],
|
109
|
+
orderBy: (entities: any[], orderByFns: Function | Function[], order?: "asc" | "desc" | null) => any[];
|
111
110
|
/**
|
112
111
|
* 分组,封装成字典而不是集合,大数据场景速度提升百倍
|
113
112
|
*/
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import IHttp from "./IHttp";
|
2
2
|
import HttpRequest from "./entities/HttpRequest";
|
3
3
|
import HttpResponse from "./entities/HttpResponse";
|
4
|
+
import { ITemplate } from "../templates";
|
5
|
+
import { IEncoder } from "../encoders";
|
4
6
|
/**
|
5
7
|
* 请求器基类
|
6
8
|
*/
|
@@ -10,21 +12,30 @@ declare abstract class Http implements IHttp {
|
|
10
12
|
* 默认请求器
|
11
13
|
*/
|
12
14
|
http: IHttp;
|
15
|
+
/**
|
16
|
+
* 模板引擎
|
17
|
+
*/
|
18
|
+
template: ITemplate;
|
19
|
+
/**
|
20
|
+
* 编码器
|
21
|
+
*/
|
22
|
+
encoder: IEncoder;
|
13
23
|
open(conn: string): Promise<void>;
|
14
24
|
get onRequest(): (request: HttpRequest) => Promise<void>;
|
15
25
|
set onRequest(value: (request: HttpRequest) => Promise<void>);
|
16
26
|
get onResponse(): (response: HttpResponse) => Promise<void>;
|
17
27
|
set onResponse(value: (response: HttpResponse) => Promise<void>);
|
28
|
+
prepareAsync(request: HttpRequest, variables: string[]): Promise<void>;
|
18
29
|
get: (path: string, params?: any) => Promise<any>;
|
19
30
|
sendGet: (path: string, params?: any) => Promise<HttpResponse>;
|
20
31
|
post: (path: string, body: any) => Promise<any>;
|
21
32
|
sendPost: (path: string, body?: any) => Promise<HttpResponse>;
|
22
33
|
patch: (path: string) => Promise<any>;
|
23
34
|
sendPatch: (path: string, pairs?: any) => Promise<HttpResponse>;
|
24
|
-
|
35
|
+
send: (request: HttpRequest) => Promise<HttpResponse>;
|
25
36
|
/**
|
26
37
|
* 获取请求消息
|
27
38
|
*/
|
28
|
-
getRequest: (method: string, contentType: string, path: string, body?: any) => HttpRequest
|
39
|
+
getRequest: (method: string, contentType: string, path: string, body?: any) => Promise<HttpRequest>;
|
29
40
|
}
|
30
41
|
export default Http;
|
@@ -14,7 +14,7 @@ declare class DefaultHttp extends Http {
|
|
14
14
|
set onRequest(value: (request: HttpRequest) => Promise<void>);
|
15
15
|
get onResponse(): (response: HttpResponse) => Promise<void>;
|
16
16
|
set onResponse(value: (response: HttpResponse) => Promise<void>);
|
17
|
-
send(request: HttpRequest)
|
17
|
+
send: (request: HttpRequest) => Promise<HttpResponse>;
|
18
18
|
/**
|
19
19
|
* 使用Fetch发送请求,谷歌插件场景专用
|
20
20
|
*/
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import Http from "../Http";
|
2
2
|
import HttpRequest from "../entities/HttpRequest";
|
3
|
-
import HttpResponse from "../entities/HttpResponse";
|
4
3
|
import { ISso, SsoUser } from "../../ssos";
|
5
4
|
import { ISigner } from "../../signers";
|
6
5
|
/**
|
@@ -37,14 +36,7 @@ declare class HaloHttp extends Http {
|
|
37
36
|
*/
|
38
37
|
signer: ISigner;
|
39
38
|
open: (conn: string) => Promise<void>;
|
40
|
-
|
41
|
-
* 发送请求
|
42
|
-
*/
|
43
|
-
send: (request: HttpRequest) => Promise<HttpResponse>;
|
44
|
-
/**
|
45
|
-
* 请求预处理
|
46
|
-
*/
|
47
|
-
beforeRequest: (request: HttpRequest) => Promise<void>;
|
39
|
+
prepareAsync: (request: HttpRequest, variables: string[]) => Promise<void>;
|
48
40
|
/**
|
49
41
|
* 处理网络错误和响应错误场景
|
50
42
|
*/
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import Http from "../Http";
|
2
2
|
import HttpRequest from "../entities/HttpRequest";
|
3
|
-
import HttpResponse from "../entities/HttpResponse";
|
4
3
|
import { IHasher } from "../../hashers";
|
5
4
|
/**
|
6
5
|
* MK请求器
|
@@ -30,6 +29,6 @@ declare class MkHttp extends Http {
|
|
30
29
|
/**
|
31
30
|
* 危险操作,会暴露敏感信息
|
32
31
|
*/
|
33
|
-
|
32
|
+
prepareAsync: (request: HttpRequest, variables: string[]) => Promise<void>;
|
34
33
|
}
|
35
34
|
export default MkHttp;
|
package/esm/drivers/index.d.ts
CHANGED
@@ -7,14 +7,16 @@ export * from "./excels";
|
|
7
7
|
export * from "./explainers";
|
8
8
|
export * from "./features";
|
9
9
|
export * from "./hashers";
|
10
|
-
export * from "./helpers";
|
11
10
|
export * from "./https";
|
12
11
|
export * from "./i18ns";
|
13
12
|
export * from "./messengers";
|
14
13
|
export * from "./providers";
|
15
14
|
export * from "./signers";
|
15
|
+
export * from "./sockets";
|
16
16
|
export * from "./ssos";
|
17
17
|
export * from "./tasks";
|
18
18
|
export * from "./templates";
|
19
|
+
export * from "./util";
|
20
|
+
export * from "./utilities";
|
19
21
|
export * from "./videos";
|
20
22
|
export * from "./voices";
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
/**
|
3
|
+
* Socket接口
|
4
|
+
*/
|
5
|
+
interface ISocket extends IDriver, IOpen {
|
6
|
+
/**
|
7
|
+
* 是否已连接(空表示不需连接)
|
8
|
+
*/
|
9
|
+
connected: boolean;
|
10
|
+
/**
|
11
|
+
* Socket消息处理程序
|
12
|
+
*/
|
13
|
+
handler: (event: MessageEvent) => void;
|
14
|
+
/**
|
15
|
+
* 登录后,开启Socket连接
|
16
|
+
*/
|
17
|
+
connect(): Promise<void>;
|
18
|
+
/**
|
19
|
+
* 订阅并替换Socket事件处理程序
|
20
|
+
*/
|
21
|
+
subscribe(win: string, kind: string, type: string): Promise<any>;
|
22
|
+
/**
|
23
|
+
* 取消订阅Socket事件处理程序,防止内存泄漏
|
24
|
+
*/
|
25
|
+
unsubscribe(win: string): Promise<any>;
|
26
|
+
/**
|
27
|
+
* 发送消息
|
28
|
+
*/
|
29
|
+
send(data: any): void;
|
30
|
+
/**
|
31
|
+
* 释放连接
|
32
|
+
*/
|
33
|
+
dispose(): void;
|
34
|
+
}
|
35
|
+
export default ISocket;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Factory } from "../../factorying";
|
2
|
+
import ISocket from "./ISocket";
|
3
|
+
/**
|
4
|
+
* Socket工厂
|
5
|
+
*/
|
6
|
+
declare class SocketFactory extends Factory<ISocket> {
|
7
|
+
open(): void;
|
8
|
+
/**
|
9
|
+
* 默认通信对象
|
10
|
+
*/
|
11
|
+
get default(): ISocket;
|
12
|
+
}
|
13
|
+
export default SocketFactory;
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import Socket from "../Socket";
|
2
|
+
/**
|
3
|
+
* 默认Socket通信工具
|
4
|
+
*/
|
5
|
+
declare class DefaultSocket extends Socket {
|
6
|
+
type: string;
|
7
|
+
/**
|
8
|
+
* 通信地址
|
9
|
+
*/
|
10
|
+
url: string;
|
11
|
+
/**
|
12
|
+
* socket连接对象
|
13
|
+
*/
|
14
|
+
socket: WebSocket;
|
15
|
+
/**
|
16
|
+
* 是否已连接(空表示不需连接)
|
17
|
+
*/
|
18
|
+
connected: boolean;
|
19
|
+
/**
|
20
|
+
* 是否需要自动重新连接
|
21
|
+
*/
|
22
|
+
reconnect: boolean;
|
23
|
+
/**
|
24
|
+
* Socket消息处理程序
|
25
|
+
*/
|
26
|
+
handler: (event: MessageEvent) => void;
|
27
|
+
connect(): Promise<void>;
|
28
|
+
subscribe(win: string, kind: string, type: string): Promise<any>;
|
29
|
+
unsubscribe(win: string): Promise<any>;
|
30
|
+
/**
|
31
|
+
* 发送消息
|
32
|
+
*/
|
33
|
+
send(data: any): void;
|
34
|
+
/**
|
35
|
+
* 退出时断开连接
|
36
|
+
*/
|
37
|
+
dispose(): void;
|
38
|
+
}
|
39
|
+
export default DefaultSocket;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { Factory } from "../../factorying";
|
2
|
+
import IUtil from "./IUtil";
|
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
|
+
/**
|
5
|
+
* 帮助类工厂
|
6
|
+
*/
|
7
|
+
declare class UtilFactory extends Factory<IUtil> {
|
8
|
+
open(): void;
|
9
|
+
get array(): ArrayUtil;
|
10
|
+
get browser(): BrowserUtil;
|
11
|
+
get component(): ComponentUtil;
|
12
|
+
get dom(): DomUtil;
|
13
|
+
get dictionary(): DictionaryUtil;
|
14
|
+
get event(): EventUtil;
|
15
|
+
get file(): FileUtil;
|
16
|
+
get html(): HtmlUtil;
|
17
|
+
get image(): ImageUtil;
|
18
|
+
get json(): JsonUtil;
|
19
|
+
get math(): MathUtil;
|
20
|
+
get mount(): MountUtil;
|
21
|
+
get object(): ObjectUtil;
|
22
|
+
get micro(): MicroUtil;
|
23
|
+
get scroll(): ScrollUtil;
|
24
|
+
get string(): StringUtil;
|
25
|
+
get task(): TaskUtil;
|
26
|
+
get type(): TypeUtil;
|
27
|
+
get time(): TimeUtil;
|
28
|
+
get tree(): TreeUtil;
|
29
|
+
get url(): UrlUtil;
|
30
|
+
get sign(): SignUtil;
|
31
|
+
}
|
32
|
+
export default UtilFactory;
|
@@ -0,0 +1,123 @@
|
|
1
|
+
import Util from "../Util";
|
2
|
+
/**
|
3
|
+
* 数组帮助类
|
4
|
+
*/
|
5
|
+
declare class ArrayUtil extends Util {
|
6
|
+
type: string;
|
7
|
+
/**
|
8
|
+
* 获取指定数组分成每片指定长度后的集合
|
9
|
+
*/
|
10
|
+
getChunks: (entities: any[], size: number) => any[][];
|
11
|
+
/**
|
12
|
+
* 获取分成指定片数量后的集合
|
13
|
+
*/
|
14
|
+
getChunksByCount(entities: any[], count: number): any[][];
|
15
|
+
/**
|
16
|
+
* 获取指定开始位置的指定数量的集合
|
17
|
+
*/
|
18
|
+
getRange(entities: any[], index: number, count?: number): any[];
|
19
|
+
/**
|
20
|
+
* 获取最后length个元素
|
21
|
+
*/
|
22
|
+
getLast(entities: string[], length: number): string[];
|
23
|
+
/**
|
24
|
+
* 取两个集合的交集
|
25
|
+
*/
|
26
|
+
intersect: (arr1: any[], arr2: any[]) => any[];
|
27
|
+
/**
|
28
|
+
* 排除指定元素(差集)
|
29
|
+
*/
|
30
|
+
except: (from: any[], target: any[] | any, equals?: (a: any, b: any) => boolean) => any[];
|
31
|
+
/**
|
32
|
+
* 求最大值,数据类型的比较函数要自己转换为数值类型
|
33
|
+
*/
|
34
|
+
max: (entities: any[], func: Function) => any;
|
35
|
+
/**
|
36
|
+
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
37
|
+
*/
|
38
|
+
min: (entities: any[], func: Function) => any;
|
39
|
+
/**
|
40
|
+
* 求平均值
|
41
|
+
*/
|
42
|
+
avg: (entities: any[], func: Function, digits?: number) => number;
|
43
|
+
/**
|
44
|
+
* 求和
|
45
|
+
*/
|
46
|
+
sum: (entities: any[], func: Function, digits?: number) => number;
|
47
|
+
/**
|
48
|
+
* 是否包含
|
49
|
+
*/
|
50
|
+
contains: (arr: any[], element: any) => boolean;
|
51
|
+
/**
|
52
|
+
* 判断指定集合中的指定属性的值,是否包含关键词
|
53
|
+
*/
|
54
|
+
filterContains: (arr: any[], props: string[], keywords: string) => any[];
|
55
|
+
/**
|
56
|
+
* 判断2个数组是否每个元素都相同
|
57
|
+
*/
|
58
|
+
same: (arr1: any[], arr2: any[]) => boolean;
|
59
|
+
/**
|
60
|
+
* 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
|
61
|
+
*/
|
62
|
+
distinct: (entities: any[], selector: Function) => any[];
|
63
|
+
/**
|
64
|
+
* 创建集合
|
65
|
+
*/
|
66
|
+
from(entities: any): any[];
|
67
|
+
/**
|
68
|
+
* 连接值构建成新数组,重复项也会自动构建,不存在的值,会自动创建为一个新项
|
69
|
+
*/
|
70
|
+
fromValues: (arrValues: any[], arr: any[], propertyValue: string, propertyText: string) => any[];
|
71
|
+
/**
|
72
|
+
* 分割指定字符串为数组,字符串为空,返回空数组
|
73
|
+
* @param input
|
74
|
+
* @param split
|
75
|
+
* @param element 转换后添加的默认元素
|
76
|
+
*/
|
77
|
+
split: (input: string, split: string, element?: any) => any[];
|
78
|
+
/**
|
79
|
+
* 合并多个数组中的每一项到新的二维数组中,没值的元素被有值的元素代替
|
80
|
+
*/
|
81
|
+
combine: (...args: any[]) => any[];
|
82
|
+
/**
|
83
|
+
* 在指定元素前插入新元素,返回插入元素的索引
|
84
|
+
*/
|
85
|
+
insert: (entities: object[], selectedRow: object, row: object) => number;
|
86
|
+
/**
|
87
|
+
* 在指定元素后插入新元素,返回插入元素的索引
|
88
|
+
*/
|
89
|
+
append: (entities: object[], selectedRow: object, row: object) => number;
|
90
|
+
/**
|
91
|
+
* 不存在某元素时才添加某元素
|
92
|
+
*/
|
93
|
+
pushIfNotExist: (entities: any[], element: any) => void;
|
94
|
+
/**
|
95
|
+
* 把集合创建成另一个集合
|
96
|
+
*/
|
97
|
+
create<T>(entities: any[], handler: (entity: any, i: number) => T): T[];
|
98
|
+
/**
|
99
|
+
* 删除执行数组中的指定对象或者集合
|
100
|
+
*/
|
101
|
+
remove: (entities: any[], elements: any[] | any) => void;
|
102
|
+
/**
|
103
|
+
* 删除指定元素,并返回删除后的字符串
|
104
|
+
*/
|
105
|
+
removeIndex: (str: string, index: number, split: string) => string;
|
106
|
+
/**
|
107
|
+
* 按照指定函数对数组排序
|
108
|
+
*/
|
109
|
+
orderBy: (entities: any[], orderByFns: Function | Function[], order?: "asc" | "desc" | null) => any[];
|
110
|
+
/**
|
111
|
+
* 分组,封装成字典而不是集合,大数据场景速度提升百倍
|
112
|
+
*/
|
113
|
+
groupBy: (entities: any[], keyHandler: (entity: any) => any, valueHandler?: (item: any[]) => any) => object;
|
114
|
+
/**
|
115
|
+
* 分组
|
116
|
+
*/
|
117
|
+
groupByArray: (entities: any[], keyFunc: (item: any) => any) => any[];
|
118
|
+
/**
|
119
|
+
* 替换指定元素为新元素,不存在则添加
|
120
|
+
*/
|
121
|
+
replaceOrAdd(entities: any[], selectFn: (value: any) => boolean, replacement: any): void;
|
122
|
+
}
|
123
|
+
export default ArrayUtil;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import Util from "../Util";
|
2
|
+
/**
|
3
|
+
* 组件帮助类
|
4
|
+
*/
|
5
|
+
declare class ComponentUtil extends Util {
|
6
|
+
type: string;
|
7
|
+
/**
|
8
|
+
* 根据动态加载的组件对象,得到组件集合
|
9
|
+
*/
|
10
|
+
getComponents(components: object, replace: string, prefix?: string): object;
|
11
|
+
/**
|
12
|
+
* 获取部分自定义组件名称
|
13
|
+
*/
|
14
|
+
getName: (url: string, prefix: string) => string;
|
15
|
+
/**
|
16
|
+
* 检测异步控件是否加载完毕
|
17
|
+
*/
|
18
|
+
detectLoaded(ref: any, cb: Function): void;
|
19
|
+
}
|
20
|
+
export default ComponentUtil;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import Util from "../Util";
|
2
|
+
/**
|
3
|
+
* 字典帮助类
|
4
|
+
*/
|
5
|
+
declare class DictionaryUtil extends Util {
|
6
|
+
type: string;
|
7
|
+
/**
|
8
|
+
* 从指定字典中提取忽略大小写的key的值
|
9
|
+
*/
|
10
|
+
getValueIgnoreCase<T>(key: string, value: {
|
11
|
+
[key: string]: T;
|
12
|
+
}): T;
|
13
|
+
/**
|
14
|
+
* 对字典进行排序,并得到新字典
|
15
|
+
*/
|
16
|
+
sort(obj: object): any;
|
17
|
+
/**
|
18
|
+
* 连接字典
|
19
|
+
*/
|
20
|
+
join(obj: object, valueHandler?: (value: string) => string, delimiter?: string, join?: string): string;
|
21
|
+
/**
|
22
|
+
* 把字典转换成数组
|
23
|
+
*/
|
24
|
+
toList(entity: {
|
25
|
+
[key: string]: any[];
|
26
|
+
}, valueHandler: (entity: {
|
27
|
+
key: string;
|
28
|
+
value: any;
|
29
|
+
}) => void): {
|
30
|
+
key: string;
|
31
|
+
value: any[];
|
32
|
+
}[];
|
33
|
+
/**
|
34
|
+
* 判断字典是否包含值
|
35
|
+
*/
|
36
|
+
containsValue(dic: {
|
37
|
+
[key: string]: any;
|
38
|
+
}, value: any): boolean;
|
39
|
+
}
|
40
|
+
export default DictionaryUtil;
|