halo-fe 1.0.29 → 1.0.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/{liquidjs-C2HVw1Ra.js → liquidjs-BfOWWjtJ.js} +119 -113
- package/dist/main.js +1472 -1261
- package/dist/style.css +1 -1
- package/esm/apps/AppConstant.d.ts +3 -0
- package/esm/apps/index.d.ts +2 -0
- package/esm/coms/@types/SocketProgressProps.d.ts +4 -0
- package/esm/coms/index.d.ts +1 -0
- package/esm/coms/tags/@types/TagProps.d.ts +7 -0
- package/esm/coms/tags/@types/index.d.ts +2 -0
- package/esm/coms/tags/Index.vue.d.ts +17 -0
- package/esm/coms/tags/index.d.ts +2 -0
- package/esm/drivers/cdns/Cdn.d.ts +6 -2
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +0 -1
- package/esm/drivers/encryptors/Encryptor.d.ts +11 -0
- package/esm/drivers/encryptors/EncryptorFactory.d.ts +13 -0
- package/esm/drivers/encryptors/IEncryptor.d.ts +15 -0
- package/esm/drivers/encryptors/implements/AesEncryptor.d.ts +10 -0
- package/esm/drivers/encryptors/index.d.ts +3 -0
- package/esm/drivers/hashers/Hasher.d.ts +1 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +5 -1
- package/esm/drivers/hashers/IHasher.d.ts +1 -1
- 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 +5 -1
- package/esm/drivers/https/HttpFactory.d.ts +2 -2
- package/esm/drivers/https/IHttp.d.ts +2 -2
- package/esm/drivers/https/entities/HttpProgress.d.ts +9 -0
- package/esm/drivers/https/entities/HttpRequest.d.ts +4 -0
- package/esm/drivers/https/entities/index.d.ts +4 -0
- package/esm/drivers/https/implements/DefaultHttp.d.ts +0 -1
- package/esm/drivers/https/implements/EiHttp.d.ts +32 -0
- package/esm/drivers/https/implements/HaloHttp.d.ts +1 -5
- package/esm/drivers/https/implements/MkHttp.d.ts +1 -5
- package/esm/drivers/https/index.d.ts +2 -3
- package/esm/drivers/index.d.ts +1 -0
- package/esm/drivers/sockets/entities/SocketProgress.d.ts +5 -1
- package/esm/drivers/util/implements/ArrayUtil.d.ts +1 -1
- package/esm/drivers/util/implements/JsonUtil.d.ts +1 -1
- package/esm/drivers/util/implements/ObjectUtil.d.ts +8 -0
- package/esm/drivers/util/implements/StringUtil.d.ts +4 -0
- package/esm/drivers/util/implements/TimeUtil.d.ts +2 -2
- package/esm/drivers/util/implements/UrlUtil.d.ts +16 -6
- package/esm/drivers/utilities/implement/EventUtility.d.ts +1 -1
- package/esm/factory/Factories.d.ts +5 -1
- package/esm/factory/Utils.d.ts +1 -2
- package/esm/repos/implements/ModuleRepo.d.ts +18 -1
- package/package.json +4 -4
package/dist/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.
|
1
|
+
html{-webkit-user-select:initial;user-select:initial;font-size:14px;font-family:Consolas}a{text-decoration:none}p{margin:0;line-height:20px}input{outline:none;margin:0;font-family:inherit}ul,ol{margin:0;padding:0;outline:none}li{list-style-type:none}img{display:block}pre{margin:0;font-family:inherit}html.blue .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #434e61;box-shadow:0 1px 4px #29374d;background-image:linear-gradient(to bottom,#354052,#354052)}html.blue .ha-rich-text .ql-container.ql-snow{border-color:#434e61;background:#354052}html.blue .ha-rich-text .ql-stroke{stroke:#ffffffb8}html.blue .ha-rich-text .ql-fill{fill:#ffffffb8}html.blue .ha-rich-text .ql-picker .ql-picker-label,html.blue .ha-rich-text .ql-date{color:#ffffffb8}html.light .ha-rich-text .ql-toolbar.ql-snow{border:1px solid #dcdfe6;box-shadow:0 1px 4px #ccc9;background-image:linear-gradient(to bottom,#fff,#f2f2f2)}html.light .ha-rich-text .ql-container.ql-snow{border-color:#dcdfe6}.ha-rich-text ol,.ha-rich-text ul{padding-left:1.5em}.ha-rich-text ol{counter-reset:my-counter}.ha-rich-text ol li{list-style-type:none;counter-increment:my-counter}.ha-rich-text ol li:before{content:counter(my-counter) "."}.ha-fill{width:100%;height:100%}.ha-scroller{position:relative;height:100%}.ha-scroller:hover .scroller-thumb{display:block}.ha-scroller.hover .scroller-thumb{display:block;opacity:.5}.ha-scroller .scroller-container{height:100%;overflow:auto;width:100%;scrollbar-width:none}.ha-scroller .scroller-track{position:absolute;top:0;right:0;width:8px;height:100%}.ha-scroller .scroller-thumb{display:none;position:absolute;cursor:pointer;height:30px;width:100%;-webkit-user-select:none;user-select:none;background:#a3a6ad;opacity:.3;border-radius:5px}.ha-scroller .scroller-thumb:hover{opacity:.5}.ha-card{padding:5px;border:1px solid #414243;background:#1d1e1f;box-shadow:0 0 12px #000000b8;border-radius:4px}.ha-code{width:100%;height:100%}.ha-code.border{width:calc(100% - 2px);height:calc(100% - 2px);border-radius:4px}.ha-code.border .monaco-editor,.ha-code.border .overflow-guard{border-radius:4px}.ha-code.border:has(.monaco-editor.focused){border:1px solid #007fd4}.ha-compare{width:100%;height:100%}.ha-rich-text{width:100%}.ha-rich-text .ql-date{font-family:"Font Awesome 6 Free"}.ha-rich-text .ql-date:before{content:""}.ha-rich-text .ql-toolbar{line-height:20px}.ha-rich-text .ql-toolbar.ql-snow{padding:3px;position:sticky;top:0;z-index:10;border-top-left-radius:4px;border-top-right-radius:4px}.ha-rich-text .ql-body{border-bottom-left-radius:4px;border-bottom-right-radius:4px}.ha-rich-text .ql-container{height:auto}.ha-rich-text .ql-container.ql-snow{font-family:inherit;border:0}.ha-rich-text .ql-editor{padding:8px 8px 620px;word-break:break-word;overflow:initial}.ha-rich-text .ql-formats .ql-picker+.ql-picker{display:block!important}.ha-rich-text .ql-formats .ql-picker:has(+.ql-picker){display:none}.ha-rich-text:has(.ql-editor:focus) .ql-snow.ql-toolbar{border-color:#007fd4;border-bottom-color:#4c4d4f}.ha-rich-text:has(.ql-editor:focus) .ql-snow+.ql-body{border-color:#007fd4}.ha-condition{display:flex}.ha-col{display:flex;flex-direction:column;gap:5px}.ha-container{padding:10px;width:calc(100% - 20px);height:calc(100% - 20px)}.ha-container .ha-operation:nth-child(1){margin-top:0;margin-bottom:10px;padding:8px 10px;line-height:32px}.ha-row{display:flex;gap:5px}.ha-row.between{justify-content:space-between}.ha-progress{position:absolute;width:0;z-index:1}.progress-tip{font-size:12px;padding:0 8px;border-radius:4px;display:flex;align-items:center}.progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.progress-tip.warning{color:#e6a23c;background:#292218;border:1px solid #3e301c}.progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress{width:100%;display:flex;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px}.ha-socket-progress .progress-bar{height:6px;background:#363637;width:100%;border-radius:4px}.ha-socket-progress .progress-percentage{height:100%;background:#67c23a;transition:width .5s;border-radius:4px}.ha-socket-progress .progress-info{font-size:12px;display:flex;justify-content:space-between;color:#aaa}.ha-socket-progress .progress-text{color:#cfd3dc}.ha-socket-progress.warning .progress-percentage{background:#e6a23c}.ha-socket-progress.warning .progress-text{color:#e6a23c}.ha-socket-progress.error .progress-percentage{background:#f56c6c}.ha-socket-progress.error .progress-text{color:#f56c6c}@keyframes antRotate{to{transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}.ha-spinner .spinner-dots{position:relative;font-size:20px;width:20px;height:20px;transform:rotate(45deg);animation:antRotate 1.2s linear infinite;margin:0 auto}.ha-spinner .spinner-dots i{position:absolute;display:block;width:9px;height:9px;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s linear infinite alternate}.ha-spinner .spinner-dots i:first-child{top:0;left:0}.ha-spinner .spinner-dots i:nth-child(2){top:0;right:0;animation-delay:.4s}.ha-spinner .spinner-dots i:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ha-spinner .spinner-dots i:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ha-spinner .spinner-title{color:#f40}.ha-spinner .stack{color:#a3a6ad;white-space:pre-wrap}.ha-spinner .spinner-text{text-align:center;font-size:14px;margin-top:10px}.ha-spinner.is-loading{height:100%;display:flex;align-items:center;justify-content:center}.ha-spinner.is-error{padding:10px;font-size:14px;transition:none}.ha-spinner.is-error .retry{color:#38c;cursor:pointer;margin-left:5px}.ha-spinner.is-error .retry:active{color:#f40}.ha-dance{display:flex;align-items:center}.ha-dance .char{animation:animationText 1s ease-in-out infinite alternate}@keyframes animationText{0%{transform:matrix(1,0,0,1,0,-2)}to{transform:matrix(1,0,0,1,0,2)}}
|
package/esm/coms/index.d.ts
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
import { TagProps } from "./@types";
|
2
|
+
declare function __VLS_template(): {
|
3
|
+
slots: {
|
4
|
+
default?(_: {}): any;
|
5
|
+
};
|
6
|
+
refs: {};
|
7
|
+
attrs: Partial<{}>;
|
8
|
+
};
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
12
|
+
export default _default;
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
14
|
+
new (): {
|
15
|
+
$slots: S;
|
16
|
+
};
|
17
|
+
};
|
@@ -4,7 +4,7 @@ import { ITask } from "../tasks";
|
|
4
4
|
* CDN抽象基类
|
5
5
|
*/
|
6
6
|
declare abstract class Cdn implements ICdn {
|
7
|
-
|
7
|
+
type: string;
|
8
8
|
/**
|
9
9
|
* 任务实例,用于控制并发
|
10
10
|
*/
|
@@ -18,10 +18,14 @@ declare abstract class Cdn implements ICdn {
|
|
18
18
|
getQuill(): Promise<any>;
|
19
19
|
getWeiXin(): Promise<any>;
|
20
20
|
getXlsx(): Promise<any>;
|
21
|
+
/**
|
22
|
+
* 使用define函数加载类库,并防止define与monaco-editor的define全局函数冲突
|
23
|
+
*/
|
24
|
+
loadByDefine(name: string, basePath: string, paths: string[]): Promise<any>;
|
21
25
|
/**
|
22
26
|
* 使用并发限制顺序加载资源,并防止monaco-editor的define函数冲突
|
23
27
|
*/
|
24
|
-
loadByOrder(
|
28
|
+
loadByOrder(name: string, fn: () => Promise<any>): Promise<any>;
|
25
29
|
loadFilesAsync(path: string, files: string[]): Promise<void>;
|
26
30
|
/**
|
27
31
|
* 通过注入DOM标签异步加载脚本或样式表,已防重
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import IEncryptor from "./IEncryptor";
|
2
|
+
/**
|
3
|
+
* 加解密基类
|
4
|
+
*/
|
5
|
+
declare abstract class Encryptor implements IEncryptor {
|
6
|
+
type: string;
|
7
|
+
openAsync(conn?: string): Promise<void>;
|
8
|
+
encrypt<T>(content: T, key: string): string;
|
9
|
+
abstract encryptString(content: string, key: string): string;
|
10
|
+
}
|
11
|
+
export default Encryptor;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { Factory } from "../../factory";
|
2
|
+
import IEncryptor from "./IEncryptor";
|
3
|
+
/**
|
4
|
+
* 加解密工厂
|
5
|
+
*/
|
6
|
+
declare class EncryptorFactory extends Factory<IEncryptor> {
|
7
|
+
open(): void;
|
8
|
+
/**
|
9
|
+
* 获取AES加解密器
|
10
|
+
*/
|
11
|
+
getAesAsync(): Promise<IEncryptor>;
|
12
|
+
}
|
13
|
+
export default EncryptorFactory;
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { IDriver, IOpen } from "../@types";
|
2
|
+
/**
|
3
|
+
* 加解密接口
|
4
|
+
*/
|
5
|
+
interface IEncryptor extends IDriver, IOpen {
|
6
|
+
/**
|
7
|
+
* 加密任意数据
|
8
|
+
*/
|
9
|
+
encrypt<T>(content: T, key: string): string;
|
10
|
+
/**
|
11
|
+
* 加密字符串
|
12
|
+
*/
|
13
|
+
encryptString(content: string, key: string): string;
|
14
|
+
}
|
15
|
+
export default IEncryptor;
|
@@ -5,6 +5,6 @@ import IHasher from "./IHasher";
|
|
5
5
|
declare abstract class Hasher implements IHasher {
|
6
6
|
type: string;
|
7
7
|
abstract openAsync(conn: string): Promise<void>;
|
8
|
-
abstract
|
8
|
+
abstract computeAsync(value: string): Promise<string>;
|
9
9
|
}
|
10
10
|
export default Hasher;
|
@@ -10,6 +10,10 @@ declare class HasherFactory extends Factory<IHasher> {
|
|
10
10
|
/**
|
11
11
|
* 获取MD5 Hash对象
|
12
12
|
*/
|
13
|
-
|
13
|
+
getMd5Async(): Promise<IHasher>;
|
14
|
+
/**
|
15
|
+
* 获取Sha256 Hash对象
|
16
|
+
*/
|
17
|
+
getSha256Async(): Promise<IHasher>;
|
14
18
|
}
|
15
19
|
export default HasherFactory;
|
@@ -5,6 +5,6 @@ import Hasher from "../Hasher";
|
|
5
5
|
declare class Sha256Hasher extends Hasher {
|
6
6
|
type: string;
|
7
7
|
openAsync(conn: string): Promise<void>;
|
8
|
-
|
8
|
+
computeAsync: (value: string) => Promise<string>;
|
9
9
|
}
|
10
10
|
export default Sha256Hasher;
|
@@ -8,6 +8,10 @@ import { IEncoder } from "../encoders";
|
|
8
8
|
*/
|
9
9
|
declare abstract class Http implements IHttp {
|
10
10
|
type: string;
|
11
|
+
/**
|
12
|
+
* 基准请求地址
|
13
|
+
*/
|
14
|
+
baseUrl: string;
|
11
15
|
/**
|
12
16
|
* 默认请求器
|
13
17
|
*/
|
@@ -29,7 +33,7 @@ declare abstract class Http implements IHttp {
|
|
29
33
|
set onRequest(value: (request: HttpRequest) => Promise<void>);
|
30
34
|
get onResponse(): (response: HttpResponse) => Promise<void>;
|
31
35
|
set onResponse(value: (response: HttpResponse) => Promise<void>);
|
32
|
-
prepareAsync(request: HttpRequest
|
36
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
33
37
|
get: (path: string, params?: any) => Promise<any>;
|
34
38
|
getAsync: (path: string, params?: any) => Promise<HttpResponse>;
|
35
39
|
post: (path: string, body: any) => Promise<any>;
|
@@ -14,9 +14,9 @@ interface IHttp extends IDriver, IOpen {
|
|
14
14
|
*/
|
15
15
|
onResponse: (response: HttpResponse) => Promise<void>;
|
16
16
|
/**
|
17
|
-
*
|
17
|
+
* 请求准备:替换请求变量,请求准备
|
18
18
|
*/
|
19
|
-
prepareAsync(request: HttpRequest
|
19
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
20
20
|
/**
|
21
21
|
* 发送GET请求,得到响应体
|
22
22
|
*/
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import Http from "../Http";
|
2
|
+
import HttpRequest from "../entities/HttpRequest";
|
3
|
+
import { IHasher } from "../../hashers";
|
4
|
+
import { IEncryptor } from "../../encryptors";
|
5
|
+
/**
|
6
|
+
* EI请求器
|
7
|
+
*/
|
8
|
+
declare class EiHttp extends Http {
|
9
|
+
/**
|
10
|
+
* Token密钥
|
11
|
+
*/
|
12
|
+
aesKey: string;
|
13
|
+
/**
|
14
|
+
* 盐
|
15
|
+
*/
|
16
|
+
salt: string;
|
17
|
+
/**
|
18
|
+
* 加解密器
|
19
|
+
*/
|
20
|
+
encryptor: IEncryptor;
|
21
|
+
/**
|
22
|
+
* Hash计算器
|
23
|
+
*/
|
24
|
+
hasher: IHasher;
|
25
|
+
openAsync(conn: string): Promise<void>;
|
26
|
+
prepareAsync(request: HttpRequest): Promise<void>;
|
27
|
+
/**
|
28
|
+
* 获取请求头
|
29
|
+
*/
|
30
|
+
getHeader(url: string, body: string, userId: string): Promise<any>;
|
31
|
+
}
|
32
|
+
export default EiHttp;
|
@@ -7,10 +7,6 @@ import { ISigner } from "../../signers";
|
|
7
7
|
*/
|
8
8
|
declare class HaloHttp extends Http {
|
9
9
|
type: string;
|
10
|
-
/**
|
11
|
-
* 基准地址
|
12
|
-
*/
|
13
|
-
baseUrl: string;
|
14
10
|
/**
|
15
11
|
* 当前用户信息
|
16
12
|
*/
|
@@ -36,7 +32,7 @@ declare class HaloHttp extends Http {
|
|
36
32
|
*/
|
37
33
|
signer: ISigner;
|
38
34
|
openAsync: (conn: string) => Promise<void>;
|
39
|
-
prepareAsync: (request: HttpRequest
|
35
|
+
prepareAsync: (request: HttpRequest) => Promise<void>;
|
40
36
|
/**
|
41
37
|
* 处理网络错误和响应错误场景
|
42
38
|
*/
|
@@ -6,10 +6,6 @@ import { IHasher } from "../../hashers";
|
|
6
6
|
*/
|
7
7
|
declare class MkHttp extends Http {
|
8
8
|
type: string;
|
9
|
-
/**
|
10
|
-
* 基准地址
|
11
|
-
*/
|
12
|
-
baseUrl: string;
|
13
9
|
/**
|
14
10
|
* AppId
|
15
11
|
*/
|
@@ -29,6 +25,6 @@ declare class MkHttp extends Http {
|
|
29
25
|
/**
|
30
26
|
* 危险操作,会暴露敏感信息
|
31
27
|
*/
|
32
|
-
prepareAsync: (request: HttpRequest
|
28
|
+
prepareAsync: (request: HttpRequest) => Promise<void>;
|
33
29
|
}
|
34
30
|
export default MkHttp;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import IHttp from "./IHttp";
|
2
2
|
import HttpFactory from "./HttpFactory";
|
3
|
-
import HttpRequest from "./entities/HttpRequest";
|
4
|
-
import HttpResponse from "./entities/HttpResponse";
|
5
3
|
import HaloHttp from "./implements/HaloHttp";
|
6
|
-
export
|
4
|
+
export * from "./entities";
|
5
|
+
export { type IHttp, HttpFactory, HaloHttp };
|
package/esm/drivers/index.d.ts
CHANGED
@@ -22,6 +22,10 @@ declare class SocketProgress<T> {
|
|
22
22
|
* 当前消息体
|
23
23
|
*/
|
24
24
|
current: T;
|
25
|
+
/**
|
26
|
+
* 初始化
|
27
|
+
*/
|
28
|
+
constructor(total: number);
|
25
29
|
/**
|
26
30
|
* 增加成功进度
|
27
31
|
*/
|
@@ -29,6 +33,6 @@ declare class SocketProgress<T> {
|
|
29
33
|
/**
|
30
34
|
* 增加异常进度
|
31
35
|
*/
|
32
|
-
error(current: T
|
36
|
+
error(current: T): void;
|
33
37
|
}
|
34
38
|
export default SocketProgress;
|
@@ -106,7 +106,7 @@ declare class ArrayUtil extends Util {
|
|
106
106
|
/**
|
107
107
|
* 按照指定函数对数组排序
|
108
108
|
*/
|
109
|
-
orderBy: (entities: any[], orderByFns: Function | Function[],
|
109
|
+
orderBy: (entities: any[], orderByFns: Function | Function[], asc?: boolean) => any[];
|
110
110
|
/**
|
111
111
|
* 分组,封装成字典而不是集合,大数据场景速度提升百倍
|
112
112
|
*/
|
@@ -56,6 +56,14 @@ declare class ObjectUtil extends Util {
|
|
56
56
|
* 给对象添加多层属性,并赋值
|
57
57
|
*/
|
58
58
|
addProperties: (obj: object, keys: string[], value: string) => void;
|
59
|
+
/**
|
60
|
+
* 排序并生成新对象
|
61
|
+
*/
|
62
|
+
sort(value: {
|
63
|
+
[key: string]: string;
|
64
|
+
}): {
|
65
|
+
[key: string]: string;
|
66
|
+
};
|
59
67
|
/**
|
60
68
|
* 获取对象不区分大小写的key
|
61
69
|
*/
|
@@ -100,5 +100,9 @@ declare class StringUtil extends Util {
|
|
100
100
|
* 格式化成留指定位数的小数
|
101
101
|
*/
|
102
102
|
formatDigits: (value: string, digits: number) => string;
|
103
|
+
/**
|
104
|
+
* 把字符串分割成多行
|
105
|
+
*/
|
106
|
+
splitLines: (content: string, separator?: string) => string[];
|
103
107
|
}
|
104
108
|
export default StringUtil;
|
@@ -15,7 +15,7 @@ declare class TimeUtil extends Util {
|
|
15
15
|
/**
|
16
16
|
* 格式化时间
|
17
17
|
*/
|
18
|
-
format: (value:
|
18
|
+
format: (value: any, format: string) => string;
|
19
19
|
/**
|
20
20
|
* 对时间值进行时间格式化
|
21
21
|
*/
|
@@ -33,7 +33,7 @@ declare class TimeUtil extends Util {
|
|
33
33
|
*/
|
34
34
|
formatDate: (value: any) => string;
|
35
35
|
/**
|
36
|
-
* 格式化时间
|
36
|
+
* 格式化时间 YYYY-MM-DD HH:mm:ss
|
37
37
|
*/
|
38
38
|
formatDateTime: (value: any) => string;
|
39
39
|
/**
|
@@ -33,10 +33,6 @@ declare class UrlUtil extends Util {
|
|
33
33
|
* 如:app=Tool&compare[language]=json&compare[sql]=App%3D%27Tool%27+and+[Table]+like+%27Ctl_%25%27+order+by+[Table],+Name
|
34
34
|
*/
|
35
35
|
getQuery(value: any): string;
|
36
|
-
/**
|
37
|
-
* 处理键值对的值
|
38
|
-
*/
|
39
|
-
private handleQueryValue;
|
40
36
|
/**
|
41
37
|
* 自动根据后面路径,决定是否要合并Url
|
42
38
|
*/
|
@@ -66,14 +62,24 @@ declare class UrlUtil extends Util {
|
|
66
62
|
* 获取地址中的查询参数
|
67
63
|
*/
|
68
64
|
getQueryParam(url: string, key: string): string;
|
65
|
+
/**
|
66
|
+
* 反序列化成排序对象
|
67
|
+
*/
|
68
|
+
deserializeSorted(url: string): {
|
69
|
+
[key: string]: string;
|
70
|
+
};
|
69
71
|
/**
|
70
72
|
* 从Url中提取查询对象
|
71
73
|
*/
|
72
|
-
deserialize(url: string):
|
74
|
+
deserialize(url: string): {
|
75
|
+
[key: string]: string;
|
76
|
+
};
|
73
77
|
/**
|
74
78
|
* 把查询字符串转换成对象(自动解码成源数据)
|
75
79
|
*/
|
76
|
-
deserializeQs(qs: string, decode?: boolean):
|
80
|
+
deserializeQs(qs: string, decode?: boolean): {
|
81
|
+
[key: string]: string;
|
82
|
+
};
|
77
83
|
/**
|
78
84
|
* 把对象转换成查询字符串,自动编码
|
79
85
|
*/
|
@@ -86,5 +92,9 @@ declare class UrlUtil extends Util {
|
|
86
92
|
* 是否是http或https开头的地址
|
87
93
|
*/
|
88
94
|
httpOrHttps(url: string): boolean;
|
95
|
+
/**
|
96
|
+
* 处理键值对的值
|
97
|
+
*/
|
98
|
+
private handleQueryValue;
|
89
99
|
}
|
90
100
|
export default UrlUtil;
|
@@ -13,7 +13,7 @@ declare class EventUtility extends Utility {
|
|
13
13
|
/**
|
14
14
|
* 大小改变事件,已防抖
|
15
15
|
*/
|
16
|
-
resize: (element: Element, handler: (entries: ResizeObserverEntry[]) => void
|
16
|
+
resize: (element: Element, handler: (entries: ResizeObserverEntry[]) => Promise<void>, debounceMs?: number) => void;
|
17
17
|
scrollElement: Element;
|
18
18
|
scrollHandler: (event: Event) => void;
|
19
19
|
/**
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
|
1
|
+
import { BuilderFactory, CdnFactory, EncoderFactory, EncryptorFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
|
2
2
|
import { RepoFactory } from "../repos";
|
3
3
|
import { SvcFactory } from "../svcs";
|
4
4
|
/**
|
@@ -23,6 +23,10 @@ declare class Factories {
|
|
23
23
|
* 编码器工厂
|
24
24
|
*/
|
25
25
|
static get encoder(): EncoderFactory;
|
26
|
+
/**
|
27
|
+
* 加解密工厂
|
28
|
+
*/
|
29
|
+
static get encryptor(): EncryptorFactory;
|
26
30
|
/**
|
27
31
|
* Excel工厂
|
28
32
|
*/
|
package/esm/factory/Utils.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil,
|
1
|
+
import { ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil } from "../drivers/util";
|
2
2
|
/**
|
3
3
|
* 工具工厂(无状态)
|
4
4
|
*/
|
@@ -20,7 +20,6 @@ declare class Utils {
|
|
20
20
|
static get scroll(): ScrollUtil;
|
21
21
|
static get string(): StringUtil;
|
22
22
|
static get task(): TaskUtil;
|
23
|
-
static get type(): TypeUtil;
|
24
23
|
static get time(): TimeUtil;
|
25
24
|
static get tree(): TreeUtil;
|
26
25
|
static get url(): UrlUtil;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import Repo from "../Repo";
|
2
|
+
import { SocketResponse } from "../../drivers";
|
2
3
|
import { KeyboardType } from "../entities";
|
3
4
|
/**
|
4
5
|
* 模块仓储
|
@@ -27,10 +28,26 @@ declare class ModuleRepo extends Repo {
|
|
27
28
|
* 展开所有数据表的搜索字段信息
|
28
29
|
*/
|
29
30
|
expandSearch(schema: any[]): any[];
|
31
|
+
/**
|
32
|
+
* 触发刷新
|
33
|
+
*/
|
34
|
+
triggerRefresh: (ref: any) => boolean;
|
35
|
+
/**
|
36
|
+
* 页面关闭时触发
|
37
|
+
*/
|
38
|
+
triggerClose: (ref: any, event: BeforeUnloadEvent) => boolean;
|
30
39
|
/**
|
31
40
|
* 触发键盘事件
|
32
41
|
* 统一封装,方便重构
|
33
42
|
*/
|
34
|
-
|
43
|
+
triggerKeyboard: (ref: any, type: KeyboardType, event: KeyboardEvent) => boolean;
|
44
|
+
/**
|
45
|
+
* 触发Socket通信事件
|
46
|
+
*/
|
47
|
+
triggerSocket: (ref: any, socketRes: SocketResponse<any>) => void;
|
48
|
+
/**
|
49
|
+
* 触发页面大小调整事件
|
50
|
+
*/
|
51
|
+
triggerResize: (ref: any, event: ResizeObserverEntry) => boolean;
|
35
52
|
}
|
36
53
|
export default ModuleRepo;
|