halo-fe 1.0.6 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1399 -1366
- package/esm/drivers/IDisposable.d.ts +4 -0
- package/esm/drivers/cdns/index.d.ts +1 -2
- package/esm/drivers/encoders/index.d.ts +1 -2
- package/esm/drivers/excels/index.d.ts +2 -3
- package/esm/drivers/explainers/index.d.ts +1 -2
- package/esm/drivers/factories/Factories.d.ts +55 -0
- package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
- package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
- package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
- package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
- package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
- package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
- package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
- package/esm/drivers/factories/implement/index.d.ts +11 -0
- package/esm/drivers/factories/index.d.ts +5 -26
- package/esm/drivers/features/index.d.ts +2 -3
- package/esm/drivers/hashers/index.d.ts +2 -3
- package/esm/drivers/https/index.d.ts +2 -3
- package/esm/drivers/providers/index.d.ts +2 -3
- package/esm/drivers/signers/index.d.ts +2 -3
- package/esm/drivers/ssos/index.d.ts +2 -3
- package/esm/drivers/tasks/ITask.d.ts +12 -0
- package/esm/drivers/tasks/Task.d.ts +10 -0
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +11 -0
- package/esm/drivers/tasks/index.d.ts +2 -0
- package/esm/helpers/ArrayHelper.d.ts +6 -5
- package/esm/helpers/DomHelper.d.ts +4 -0
- package/esm/helpers/HtmlHelper.d.ts +4 -0
- package/esm/helpers/MathHelper.d.ts +16 -12
- package/esm/helpers/StringHelper.d.ts +4 -4
- package/esm/svcs/SvcFactory.d.ts +1 -1
- package/esm/svcs/index.d.ts +2 -1
- package/package.json +5 -5
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { IExcel, ExcelFactory };
|
1
|
+
import IExcel from "./IExcel";
|
2
|
+
export { type IExcel, };
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export { ExplainerFactory };
|
1
|
+
export {};
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { HttpFactory, EncoderFactory, CdnFactory, ExplainerFactory, ExcelFactory, FeatureFactory, HasherFactory, ProviderFactory, SignerFactory, SsoFactory } from "./implement";
|
2
|
+
/**
|
3
|
+
* 驱动工厂类
|
4
|
+
*/
|
5
|
+
declare class Factories {
|
6
|
+
/**
|
7
|
+
* 工厂缓存
|
8
|
+
*/
|
9
|
+
static mappings: {};
|
10
|
+
/**
|
11
|
+
* 并缓存工厂实例
|
12
|
+
*/
|
13
|
+
static create(name: string, type: any): any;
|
14
|
+
/**
|
15
|
+
*CDN工厂
|
16
|
+
*/
|
17
|
+
static get cdn(): CdnFactory;
|
18
|
+
/**
|
19
|
+
*编码器工厂
|
20
|
+
*/
|
21
|
+
static get encoder(): EncoderFactory;
|
22
|
+
/**
|
23
|
+
*Excel工厂
|
24
|
+
*/
|
25
|
+
static get excel(): ExcelFactory;
|
26
|
+
/**
|
27
|
+
*Explainer工厂
|
28
|
+
*/
|
29
|
+
static get explainer(): ExplainerFactory;
|
30
|
+
/**
|
31
|
+
*特征工厂
|
32
|
+
*/
|
33
|
+
static get feature(): FeatureFactory;
|
34
|
+
/**
|
35
|
+
*哈希工厂
|
36
|
+
*/
|
37
|
+
static get hasher(): HasherFactory;
|
38
|
+
/**
|
39
|
+
*提供程序工厂
|
40
|
+
*/
|
41
|
+
static get provider(): ProviderFactory;
|
42
|
+
/**
|
43
|
+
*Http请求工厂
|
44
|
+
*/
|
45
|
+
static get http(): HttpFactory;
|
46
|
+
/**
|
47
|
+
*签名工厂
|
48
|
+
*/
|
49
|
+
static get signer(): SignerFactory;
|
50
|
+
/**
|
51
|
+
*SSO工厂
|
52
|
+
*/
|
53
|
+
static get sso(): SsoFactory;
|
54
|
+
}
|
55
|
+
export default Factories;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import ICdn from "../../cdns/ICdn";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* CDN工厂类
|
5
|
+
*/
|
6
|
+
declare class CdnFactory extends Factory<ICdn> {
|
7
|
+
getInstances(): ICdn[];
|
8
|
+
/**
|
9
|
+
* 获取指定CDN实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<ICdn>;
|
12
|
+
}
|
13
|
+
export default CdnFactory;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import IEncoder from "../../encoders/IEncoder";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 编码器工厂
|
5
|
+
*/
|
6
|
+
declare class EncoderFactory extends Factory<IEncoder> {
|
7
|
+
getInstances(): IEncoder[];
|
8
|
+
/**
|
9
|
+
* 创建执行类型的Hash实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IEncoder>;
|
12
|
+
/**
|
13
|
+
* 获取Base64 编码器对象
|
14
|
+
*/
|
15
|
+
getBase64(): Promise<IEncoder>;
|
16
|
+
}
|
17
|
+
export default EncoderFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import IExcel from "../../excels/IExcel";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* Excel工厂
|
5
|
+
*/
|
6
|
+
declare class ExcelFactory extends Factory<IExcel> {
|
7
|
+
getInstances(): IExcel[];
|
8
|
+
/**
|
9
|
+
* 获取Excel实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IExcel>;
|
12
|
+
}
|
13
|
+
export default ExcelFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import IFeature from "../../features/IFeature";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 特征工厂类
|
5
|
+
*/
|
6
|
+
declare class FeatureFactory extends Factory<IFeature> {
|
7
|
+
getInstances(): IFeature[];
|
8
|
+
/**
|
9
|
+
* 获取指定特征实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IFeature>;
|
12
|
+
}
|
13
|
+
export default FeatureFactory;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import IHasher from "../../hashers/IHasher";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
declare class HasherFactory extends Factory<IHasher> {
|
4
|
+
getInstances(): IHasher[];
|
5
|
+
create(type: string, conn?: string): Promise<IHasher>;
|
6
|
+
/**
|
7
|
+
* 获取MD5 Hash对象
|
8
|
+
*/
|
9
|
+
getMd5(): Promise<IHasher>;
|
10
|
+
}
|
11
|
+
export default HasherFactory;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import IHttp from "../../https/IHttp";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 请求器工厂类
|
5
|
+
*/
|
6
|
+
declare class HttpFactory extends Factory<IHttp> {
|
7
|
+
getInstances(): IHttp[];
|
8
|
+
/**
|
9
|
+
* 获取默认请求器
|
10
|
+
*/
|
11
|
+
getDefault(): Promise<IHttp>;
|
12
|
+
/**
|
13
|
+
* 获取本地请求实例
|
14
|
+
* 获取完毕后,下游第一行代码就要配置消息服务
|
15
|
+
*/
|
16
|
+
getHalo(): Promise<IHttp>;
|
17
|
+
}
|
18
|
+
export default HttpFactory;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import IProvider from "../../providers/IProvider";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 数据库提供程序工厂类
|
5
|
+
*/
|
6
|
+
declare class ProviderFactory extends Factory<IProvider> {
|
7
|
+
getInstances(): IProvider[];
|
8
|
+
/**
|
9
|
+
* 获取指定类型的提供程序
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<IProvider>;
|
12
|
+
private _default;
|
13
|
+
/**
|
14
|
+
* 获取并开启默认驱动程序
|
15
|
+
*/
|
16
|
+
getDefault(store: string): Promise<IProvider>;
|
17
|
+
}
|
18
|
+
export default ProviderFactory;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import ISigner from "../../signers/ISigner";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* 签名工厂类
|
5
|
+
*/
|
6
|
+
declare class SignerFactory extends Factory<ISigner> {
|
7
|
+
getInstances(): ISigner[];
|
8
|
+
/**
|
9
|
+
* 获取指定签名实例
|
10
|
+
*/
|
11
|
+
create(type: string, conn?: string): Promise<ISigner>;
|
12
|
+
}
|
13
|
+
export default SignerFactory;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import ISso from "../../ssos/ISso";
|
2
|
+
import Factory from "../Factory";
|
3
|
+
/**
|
4
|
+
* SSO工厂类
|
5
|
+
* @extends {Factory<ISso>}
|
6
|
+
*/
|
7
|
+
declare class SsoFactory extends Factory<ISso> {
|
8
|
+
/**
|
9
|
+
* @extends {getInstances}
|
10
|
+
*/
|
11
|
+
getInstances(): ISso[];
|
12
|
+
/**
|
13
|
+
* 获取指定SSO实例
|
14
|
+
*/
|
15
|
+
create(type: string, conn?: string): Promise<ISso>;
|
16
|
+
}
|
17
|
+
export default SsoFactory;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import HttpFactory from "./HttpFactory";
|
2
|
+
import EncoderFactory from "./EncoderFactory";
|
3
|
+
import CdnFactory from "./CdnFactory";
|
4
|
+
import ExplainerFactory from "./ExplainerFactory";
|
5
|
+
import ExcelFactory from "./ExcelFactory";
|
6
|
+
import FeatureFactory from "./FeatureFactory";
|
7
|
+
import HasherFactory from "./HasherFactory";
|
8
|
+
import ProviderFactory from "./ProviderFactory";
|
9
|
+
import SignerFactory from "./SignerFactory";
|
10
|
+
import SsoFactory from "./SsoFactory";
|
11
|
+
export { HttpFactory, EncoderFactory, CdnFactory, ExplainerFactory, ExcelFactory, FeatureFactory, HasherFactory, ProviderFactory, SignerFactory, SsoFactory, };
|
@@ -1,28 +1,7 @@
|
|
1
|
-
import
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import { ExplainerFactory } from "../explainers";
|
6
|
-
import { ExcelFactory } from "../excels";
|
7
|
-
import { FeatureFactory } from "../features";
|
8
|
-
import { HasherFactory } from "../hashers";
|
9
|
-
import { ProviderFactory } from "../providers";
|
10
|
-
import { SignerFactory } from "../signers";
|
11
|
-
import { SsoFactory } from "../ssos";
|
12
|
-
import IHasher from "../hashers/IHasher";
|
13
|
-
/**
|
14
|
-
* 默认Http请求对象
|
15
|
-
*/
|
16
|
-
declare let cdnFactory: CdnFactory;
|
17
|
-
declare let encoderFactory: EncoderFactory;
|
18
|
-
declare let excelFactory: ExcelFactory;
|
19
|
-
declare let explainerFactory: ExplainerFactory;
|
20
|
-
declare let featureFactory: FeatureFactory;
|
21
|
-
declare let hasherFactory: HasherFactory;
|
22
|
-
declare let httpFactory: HttpFactory;
|
23
|
-
declare let providerFactory: ProviderFactory;
|
24
|
-
declare let signerFactory: SignerFactory;
|
25
|
-
declare let ssoFactory: SsoFactory;
|
1
|
+
import Factories from "./Factories";
|
2
|
+
import { IEncoder } from "../encoders";
|
3
|
+
import { IHttp } from "../https";
|
4
|
+
import { IHasher } from "../hashers";
|
26
5
|
/**
|
27
6
|
* 默认base64编码
|
28
7
|
*/
|
@@ -39,4 +18,4 @@ declare let md5: IHasher;
|
|
39
18
|
* 初始化默认驱动实例
|
40
19
|
*/
|
41
20
|
declare let initDriver: () => Promise<void>;
|
42
|
-
export {
|
21
|
+
export { Factories, base64, http, md5, initDriver };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { IFeature, FeatureFactory };
|
1
|
+
import IFeature from "./IFeature";
|
2
|
+
export { type IFeature };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { IHasher, HasherFactory };
|
1
|
+
import IHasher from "./IHasher";
|
2
|
+
export { type IHasher };
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import
|
2
|
-
import type IHttp from "./IHttp";
|
1
|
+
import IHttp from "./IHttp";
|
3
2
|
import HttpRequest from "./entities/HttpRequest";
|
4
3
|
import HttpResponse from "./entities/HttpResponse";
|
5
4
|
import HaloHttp from "./implements/HaloHttp";
|
6
|
-
export {
|
5
|
+
export { type IHttp, HttpRequest, HttpResponse, HaloHttp };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { IProvider, ProviderFactory };
|
1
|
+
import IProvider from "./IProvider";
|
2
|
+
export { type IProvider, };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { SignerFactory, ISigner, };
|
1
|
+
import ISigner from "./ISigner";
|
2
|
+
export { type ISigner, };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
export { ISso, SsoFactory };
|
1
|
+
import ISso from "./ISso";
|
2
|
+
export { type ISso, };
|
@@ -34,14 +34,14 @@ declare class ArrayHelper {
|
|
34
34
|
* 求最小值,数据类型的比较函数要自己转换为数值类型
|
35
35
|
*/
|
36
36
|
static min: (arr: any[], func: Function) => any;
|
37
|
-
/**
|
38
|
-
* 求和
|
39
|
-
*/
|
40
|
-
static sum: (arr: any[], func: Function, digits?: number) => number;
|
41
37
|
/**
|
42
38
|
* 求平均值
|
43
39
|
*/
|
44
40
|
static avg: (arr: any[], func: Function, digits?: number) => number;
|
41
|
+
/**
|
42
|
+
* 求和
|
43
|
+
*/
|
44
|
+
static sum: (arr: any[], func: Function, digits?: number) => number;
|
45
45
|
/**
|
46
46
|
* 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
|
47
47
|
*/
|
@@ -83,8 +83,9 @@ declare class ArrayHelper {
|
|
83
83
|
static remove: (array: any[], elements: any[] | any) => void;
|
84
84
|
/**
|
85
85
|
* 按照指定函数对数组排序
|
86
|
+
* order: asc desc null
|
86
87
|
*/
|
87
|
-
static orderBy: (array: any[],
|
88
|
+
static orderBy: (array: any[], handlers: Function | Function[], order?: string) => any[];
|
88
89
|
/**
|
89
90
|
* 分组
|
90
91
|
*/
|
@@ -18,6 +18,22 @@ declare class MathHelper {
|
|
18
18
|
* 天花板函数
|
19
19
|
*/
|
20
20
|
static ceil: (value: number) => number;
|
21
|
+
/**
|
22
|
+
* 获取最大值
|
23
|
+
*/
|
24
|
+
static max(...values: number[]): number;
|
25
|
+
/**
|
26
|
+
* 生成指定范围内的随机数
|
27
|
+
*/
|
28
|
+
static random(start: number, end: number): number;
|
29
|
+
/**
|
30
|
+
* 获取在指定范围内的值
|
31
|
+
*/
|
32
|
+
static between(value: number, min: number, max: number): number;
|
33
|
+
/**
|
34
|
+
* 尝试把任意类型转成数字,转换不成功返回原值
|
35
|
+
*/
|
36
|
+
static getNumber(value: any): any;
|
21
37
|
/**
|
22
38
|
* 获取百分比
|
23
39
|
*/
|
@@ -34,17 +50,5 @@ declare class MathHelper {
|
|
34
50
|
* 获取大小
|
35
51
|
*/
|
36
52
|
static size: (bytes: number) => string;
|
37
|
-
/**
|
38
|
-
* 生成指定范围内的随机数
|
39
|
-
*/
|
40
|
-
static random(start: number, end: number): number;
|
41
|
-
/**
|
42
|
-
* 获取最大值
|
43
|
-
*/
|
44
|
-
static max(...values: number[]): number;
|
45
|
-
/**
|
46
|
-
* 获取在指定范围内的值
|
47
|
-
*/
|
48
|
-
static between(value: number, min: number, max: number): number;
|
49
53
|
}
|
50
54
|
export default MathHelper;
|
@@ -30,10 +30,6 @@ declare class StringHelper {
|
|
30
30
|
* 忽略大小写包含判断,支持从数组中搜索关键词
|
31
31
|
*/
|
32
32
|
static containsIgnoreCase: (keywords: string, value: string | string[]) => boolean;
|
33
|
-
/**
|
34
|
-
* 从html中提取纯文本
|
35
|
-
*/
|
36
|
-
static getTextFromHtml: (html: string) => string;
|
37
33
|
/**
|
38
34
|
* 判断是否是数字类型,这样支持0
|
39
35
|
*/
|
@@ -90,5 +86,9 @@ declare class StringHelper {
|
|
90
86
|
* 忽略大小写比较
|
91
87
|
*/
|
92
88
|
static equalsIgnoreCase(value: any, valueCompare: string): boolean;
|
89
|
+
/**
|
90
|
+
* 填充字符串到指定长度,使用pad填充
|
91
|
+
*/
|
92
|
+
static padStart: (input: string, length: number, pad: string) => string;
|
93
93
|
}
|
94
94
|
export default StringHelper;
|
package/esm/svcs/SvcFactory.d.ts
CHANGED
package/esm/svcs/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ import LogSvc from "./implement/LogSvc";
|
|
4
4
|
import SettingSvc from "./implement/SettingSvc";
|
5
5
|
import SocketSvc from "./implement/SocketSvc";
|
6
6
|
import UserSvc from "./implement/UserSvc";
|
7
|
+
import SvcFactory from "./SvcFactory";
|
7
8
|
/**
|
8
9
|
* 驱动服务实例
|
9
10
|
*/
|
@@ -30,4 +31,4 @@ declare let logSvc: LogSvc;
|
|
30
31
|
declare let settingSvc: SettingSvc;
|
31
32
|
declare let socketSvc: SocketSvc;
|
32
33
|
declare let userSvc: UserSvc;
|
33
|
-
export { configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc };
|
34
|
+
export { configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc, SvcFactory };
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "halo-fe",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.7",
|
4
4
|
"description": "Halo front end sdk",
|
5
5
|
"scripts": {
|
6
6
|
"halo-fe:tsc": "vue-tsc",
|
@@ -39,15 +39,15 @@
|
|
39
39
|
"quill": "2.0.2",
|
40
40
|
"underscore": "1.13.6",
|
41
41
|
"underscore.string": "3.3.6",
|
42
|
-
"vue": "3.4.
|
42
|
+
"vue": "3.4.33",
|
43
43
|
"xlsx-js-style": "1.2.0"
|
44
44
|
},
|
45
45
|
"devDependencies": {
|
46
|
-
"@types/node": "20.14.
|
46
|
+
"@types/node": "20.14.11",
|
47
47
|
"@vitejs/plugin-vue": "5.0.5",
|
48
48
|
"@vitejs/plugin-vue-jsx": "4.0.0",
|
49
|
-
"sass": "1.77.
|
50
|
-
"vite": "5.3.
|
49
|
+
"sass": "1.77.8",
|
50
|
+
"vite": "5.3.4",
|
51
51
|
"vue-tsc": "2.0.26"
|
52
52
|
}
|
53
53
|
}
|