halo-fe 1.0.30 → 1.0.32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/dist/assets/{liquidjs-C2HVw1Ra.js → liquidjs-BfOWWjtJ.js} +119 -113
  2. package/dist/main.js +1501 -1282
  3. package/dist/style.css +1 -1
  4. package/esm/apps/index.d.ts +2 -0
  5. package/esm/coms/@types/SocketProgressProps.d.ts +4 -0
  6. package/esm/coms/index.d.ts +1 -0
  7. package/esm/coms/layouts/Container.vue.d.ts +6 -2
  8. package/esm/coms/tags/@types/TagProps.d.ts +7 -0
  9. package/esm/coms/tags/@types/index.d.ts +2 -0
  10. package/esm/coms/tags/Index.vue.d.ts +17 -0
  11. package/esm/coms/tags/index.d.ts +2 -0
  12. package/esm/drivers/cdns/Cdn.d.ts +6 -2
  13. package/esm/drivers/cdns/implements/LocalCdn.d.ts +0 -1
  14. package/esm/drivers/cryptors/Cryptor.d.ts +11 -0
  15. package/esm/drivers/cryptors/CryptorFactory.d.ts +13 -0
  16. package/esm/drivers/cryptors/ICryptor.d.ts +15 -0
  17. package/esm/drivers/cryptors/implements/AesCryptor.d.ts +10 -0
  18. package/esm/drivers/cryptors/index.d.ts +3 -0
  19. package/esm/drivers/encryptors/Encryptor.d.ts +11 -0
  20. package/esm/drivers/encryptors/EncryptorFactory.d.ts +13 -0
  21. package/esm/drivers/encryptors/IEncryptor.d.ts +15 -0
  22. package/esm/drivers/encryptors/implements/AesEncryptor.d.ts +10 -0
  23. package/esm/drivers/encryptors/index.d.ts +3 -0
  24. package/esm/drivers/hashers/Hasher.d.ts +1 -1
  25. package/esm/drivers/hashers/HasherFactory.d.ts +5 -1
  26. package/esm/drivers/hashers/IHasher.d.ts +1 -1
  27. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
  28. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
  29. package/esm/drivers/https/Http.d.ts +5 -1
  30. package/esm/drivers/https/HttpFactory.d.ts +2 -2
  31. package/esm/drivers/https/IHttp.d.ts +2 -2
  32. package/esm/drivers/https/entities/HttpProgress.d.ts +9 -0
  33. package/esm/drivers/https/entities/HttpRequest.d.ts +4 -0
  34. package/esm/drivers/https/entities/index.d.ts +4 -0
  35. package/esm/drivers/https/implements/DefaultHttp.d.ts +0 -1
  36. package/esm/drivers/https/implements/EiHttp.d.ts +32 -0
  37. package/esm/drivers/https/implements/HaloHttp.d.ts +1 -5
  38. package/esm/drivers/https/implements/MkHttp.d.ts +1 -5
  39. package/esm/drivers/https/index.d.ts +2 -3
  40. package/esm/drivers/index.d.ts +1 -0
  41. package/esm/drivers/providers/IProvider.d.ts +1 -1
  42. package/esm/drivers/providers/Provider.d.ts +10 -10
  43. package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
  44. package/esm/drivers/providers/implements/CookieProvider.d.ts +7 -11
  45. package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +10 -13
  46. package/esm/drivers/providers/implements/StorageProvider.d.ts +11 -11
  47. package/esm/drivers/sockets/entities/SocketProgress.d.ts +5 -1
  48. package/esm/drivers/util/implements/ArrayUtil.d.ts +1 -1
  49. package/esm/drivers/util/implements/JsonUtil.d.ts +1 -1
  50. package/esm/drivers/util/implements/ObjectUtil.d.ts +8 -0
  51. package/esm/drivers/util/implements/StringUtil.d.ts +4 -0
  52. package/esm/drivers/util/implements/TimeUtil.d.ts +19 -19
  53. package/esm/drivers/util/implements/UrlUtil.d.ts +16 -6
  54. package/esm/drivers/utilities/implement/EventUtility.d.ts +1 -1
  55. package/esm/factory/Factories.d.ts +5 -1
  56. package/esm/factory/Utils.d.ts +1 -2
  57. package/esm/repos/implements/ModuleRepo.d.ts +18 -1
  58. 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}.ha-socket-progress{width:100%;display:flex;gap:5px}.ha-socket-progress .progress-tips{display:flex;gap:5px}.ha-socket-progress .progress-tip{font-size:12px;padding:0 8px;border-radius:4px;display:flex;align-items:center}.ha-socket-progress .progress-tip.info{color:#409eff;background:#18222c;border:1px solid #1d3043}.ha-socket-progress .progress-tip.success{color:#67c23a;background:#1c2518;border:1px solid #25371c}.ha-socket-progress .progress-tip.error{color:#f56c6c;background:#2b1d1d;border:1px solid #412626}.ha-socket-progress .progress-chart{display:flex;flex:1;align-items:center;gap:5px;width:400px}.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)}}
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;gap:10px}.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)}}
@@ -0,0 +1,2 @@
1
+ import AppConstant from "./AppConstant";
2
+ export { AppConstant };
@@ -34,6 +34,10 @@ interface SocketProgressProps {
34
34
  * 耗时(ms)
35
35
  */
36
36
  elapsed?: number;
37
+ /**
38
+ * 当前处理想
39
+ */
40
+ current?: any;
37
41
  };
38
42
  }
39
43
  export default SocketProgressProps;
@@ -10,5 +10,6 @@ export * from "./layouts";
10
10
  export * from "./progresses";
11
11
  export * from "./tables";
12
12
  export * from "./tabs";
13
+ export * from "./tags";
13
14
  export * from "./texts";
14
15
  export { HaEmpty, HaFill, HaScroller, HaTimer };
@@ -2,7 +2,9 @@ declare function __VLS_template(): {
2
2
  slots: {
3
3
  default?(_: {}): any;
4
4
  };
5
- refs: {};
5
+ refs: {
6
+ containerRef: HTMLDivElement;
7
+ };
6
8
  attrs: Partial<{}>;
7
9
  };
8
10
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
@@ -11,7 +13,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
11
13
  type: BooleanConstructor;
12
14
  default: boolean;
13
15
  };
14
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ }>, {
17
+ ref: import("vue").Ref<any, any>;
18
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
15
19
  container: {
16
20
  type: BooleanConstructor;
17
21
  default: boolean;
@@ -0,0 +1,7 @@
1
+ interface TagProps {
2
+ /**
3
+ * 类型
4
+ */
5
+ type: 'success' | 'info' | 'warning' | 'error';
6
+ }
7
+ export default TagProps;
@@ -0,0 +1,2 @@
1
+ import TagProps from "./TagProps";
2
+ export { type TagProps };
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ import HaTag from "./Index.vue";
2
+ export { HaTag };
@@ -4,7 +4,7 @@ import { ITask } from "../tasks";
4
4
  * CDN抽象基类
5
5
  */
6
6
  declare abstract class Cdn implements ICdn {
7
- abstract type: string;
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(basePath: string, paths: string[], name: string): Promise<any>;
28
+ loadByOrder(name: string, fn: () => Promise<any>): Promise<any>;
25
29
  loadFilesAsync(path: string, files: string[]): Promise<void>;
26
30
  /**
27
31
  * 通过注入DOM标签异步加载脚本或样式表,已防重
@@ -12,7 +12,6 @@ declare class LocalCdn extends Cdn {
12
12
  getFortAwesome(): Promise<any>;
13
13
  getMonaco(): Promise<any>;
14
14
  getQuill(): Promise<any>;
15
- getWeiXin(): Promise<any>;
16
15
  getXlsx(): Promise<any>;
17
16
  }
18
17
  export default LocalCdn;
@@ -0,0 +1,11 @@
1
+ import ICryptor from "./ICryptor";
2
+ /**
3
+ * 加解密基类
4
+ */
5
+ declare abstract class Cryptor implements ICryptor {
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 Cryptor;
@@ -0,0 +1,13 @@
1
+ import { Factory } from "../../factory";
2
+ import ICryptor from "./ICryptor";
3
+ /**
4
+ * 加解密工厂
5
+ */
6
+ declare class CryptorFactory extends Factory<ICryptor> {
7
+ open(): void;
8
+ /**
9
+ * 获取AES加解密器
10
+ */
11
+ getAesAsync(): Promise<ICryptor>;
12
+ }
13
+ export default CryptorFactory;
@@ -0,0 +1,15 @@
1
+ import { IDriver, IOpen } from "../@types";
2
+ /**
3
+ * 加解密接口
4
+ */
5
+ interface ICryptor 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 ICryptor;
@@ -0,0 +1,10 @@
1
+ import Cryptor from "../Cryptor";
2
+ /**
3
+ * AES加解密
4
+ */
5
+ declare class AesCryptor extends Cryptor {
6
+ crypto: any;
7
+ openAsync(conn?: string): Promise<void>;
8
+ encryptString(content: string, key: string): string;
9
+ }
10
+ export default AesCryptor;
@@ -0,0 +1,3 @@
1
+ import ICryptor from "./ICryptor";
2
+ import CryptorFactory from "./CryptorFactory";
3
+ export { type ICryptor, CryptorFactory };
@@ -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;
@@ -0,0 +1,10 @@
1
+ import Encryptor from "../Encryptor";
2
+ /**
3
+ * AES加解密
4
+ */
5
+ declare class AesEncryptor extends Encryptor {
6
+ crypto: any;
7
+ openAsync(conn?: string): Promise<void>;
8
+ encryptString(content: string, key: string): string;
9
+ }
10
+ export default AesEncryptor;
@@ -0,0 +1,3 @@
1
+ import IEncryptor from "./IEncryptor";
2
+ import EncryptorFactory from "./EncryptorFactory";
3
+ export { type IEncryptor, EncryptorFactory };
@@ -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 compute(value: string): Promise<string>;
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
- getMd5(): Promise<IHasher>;
13
+ getMd5Async(): Promise<IHasher>;
14
+ /**
15
+ * 获取Sha256 Hash对象
16
+ */
17
+ getSha256Async(): Promise<IHasher>;
14
18
  }
15
19
  export default HasherFactory;
@@ -10,6 +10,6 @@ interface IHasher extends IOpen {
10
10
  /**
11
11
  * 计算字符串Hash值
12
12
  */
13
- compute(value: string): Promise<string>;
13
+ computeAsync(value: string): Promise<string>;
14
14
  }
15
15
  export default IHasher;
@@ -6,6 +6,6 @@ declare class Md5Hasher extends Hasher {
6
6
  type: string;
7
7
  crypto: any;
8
8
  openAsync(conn: string): Promise<void>;
9
- compute: (value: string) => Promise<string>;
9
+ computeAsync: (value: string) => Promise<string>;
10
10
  }
11
11
  export default Md5Hasher;
@@ -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
- compute: (value: string) => Promise<string>;
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, variables?: string[]): Promise<void>;
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>;
@@ -7,9 +7,9 @@ declare class HttpFactory extends Factory<IHttp> {
7
7
  type: string;
8
8
  open(): void;
9
9
  /**
10
- * 获取默认请求器
10
+ * 创建默认请求器
11
11
  */
12
- getDefault(): Promise<IHttp>;
12
+ createDefault(): Promise<IHttp>;
13
13
  /**
14
14
  * 获取本地请求实例
15
15
  * 获取完毕后,下游第一行代码就要配置消息服务
@@ -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, variables?: string[]): Promise<void>;
19
+ prepareAsync(request: HttpRequest): Promise<void>;
20
20
  /**
21
21
  * 发送GET请求,得到响应体
22
22
  */
@@ -0,0 +1,9 @@
1
+ import { SocketProgress } from "../../sockets";
2
+ import HttpMessage from "./HttpMessage";
3
+ /**
4
+ * Http请求进度
5
+ */
6
+ declare class HttpProgress extends SocketProgress<HttpMessage> {
7
+ constructor(total: number);
8
+ }
9
+ export default HttpProgress;
@@ -15,6 +15,10 @@ declare class HttpRequest extends HttpMessage {
15
15
  * 实际请求地址
16
16
  */
17
17
  url?: string;
18
+ /**
19
+ * 请求变量,用于后续任意选择时机,进行请求变量替换工作
20
+ */
21
+ variables: string[];
18
22
  constructor();
19
23
  }
20
24
  export default HttpRequest;
@@ -0,0 +1,4 @@
1
+ import HttpProgress from "./HttpProgress";
2
+ import HttpRequest from "./HttpRequest";
3
+ import HttpResponse from "./HttpResponse";
4
+ export { HttpProgress, HttpRequest, HttpResponse, };
@@ -7,7 +7,6 @@ import HttpResponse from "../entities/HttpResponse";
7
7
  */
8
8
  declare class DefaultHttp extends Http {
9
9
  type: string;
10
- baseUrl: string;
11
10
  _onRequest: any;
12
11
  _onResponse: any;
13
12
  get onRequest(): (request: HttpRequest) => Promise<void>;
@@ -0,0 +1,32 @@
1
+ import Http from "../Http";
2
+ import HttpRequest from "../entities/HttpRequest";
3
+ import { IHasher } from "../../hashers";
4
+ import { ICryptor } from "../../cryptors";
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: ICryptor;
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, variables: string[]) => Promise<void>;
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, variables: string[]) => Promise<void>;
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 { type IHttp, HttpFactory, HttpRequest, HttpResponse, HaloHttp };
4
+ export * from "./entities";
5
+ export { type IHttp, HttpFactory, HaloHttp };
@@ -53,6 +53,7 @@ export * from "./bridges";
53
53
  export * from "./builders";
54
54
  export * from "./cdns";
55
55
  export * from "./encoders";
56
+ export * from "./cryptors";
56
57
  export * from "./excels";
57
58
  export * from "./explainers";
58
59
  export * from "./features";
@@ -14,7 +14,7 @@ interface IProvider extends IDriver, IOpen {
14
14
  /**
15
15
  * 查询强类型数据
16
16
  */
17
- getEntity<T>(table: string, key: any): Promise<T>;
17
+ getEntityAsync<T>(table: string, key: any): Promise<T>;
18
18
  /**
19
19
  * 查询数据
20
20
  */
@@ -5,17 +5,17 @@ import IProvider from "./IProvider";
5
5
  declare abstract class Provider implements IProvider {
6
6
  type: string;
7
7
  openAsync(conn: string): Promise<void>;
8
- abstract createAsync(kind: string): Promise<any>;
9
- abstract deleteAsync(kind: string, key: any): Promise<any>;
10
- abstract getEntity<T>(kind: string, key: any): Promise<T>;
11
- abstract getAsync(kind: string, key: any): Promise<any>;
8
+ createAsync(table: string): Promise<any>;
9
+ abstract deleteAsync(table: string, key: any): Promise<any>;
10
+ abstract getEntityAsync<T>(table: string, key: any): Promise<T>;
11
+ abstract getAsync(table: string, key: any): Promise<any>;
12
12
  abstract getKeysAsync(table: string): Promise<any[]>;
13
- abstract insertAsync(kind: string, key: any, entity: any): Promise<any>;
14
- abstract updateAsync(kind: string, key: any, entity: any): Promise<any>;
15
- abstract saveEntity<T>(kind: string, key: any, entity: T): Promise<any>;
16
- abstract saveAsync(kind: string, key: any, entity: any): Promise<any>;
13
+ abstract insertAsync(table: string, key: any, entity: any): Promise<any>;
14
+ abstract updateAsync(table: string, key: any, entity: any): Promise<any>;
15
+ abstract saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
16
+ abstract saveAsync(table: string, key: any, entity: any): Promise<any>;
17
17
  replaceEntityAsync(table: string, key: any, newKey: any): Promise<void>;
18
- abstract commit(): void;
19
- abstract dispose(): void;
18
+ commit(): void;
19
+ dispose(): void;
20
20
  }
21
21
  export default Provider;
@@ -8,12 +8,12 @@ declare class ProviderFactory extends Factory<IProvider> {
8
8
  open(): void;
9
9
  private _default;
10
10
  /**
11
- * 获取默认驱动程序,并自动决定创建指定名称的仓储
11
+ * 获取IndeedDb驱动程序,并自动决定创建指定名称的仓储
12
12
  */
13
- getDefaultAsync(table: string): Promise<IProvider>;
13
+ getDbAsync(table: string): Promise<IProvider>;
14
14
  /**
15
15
  * 获取默认Storage提供程序
16
16
  */
17
- get storage(): IProvider;
17
+ getStorageAsync(): Promise<IProvider>;
18
18
  }
19
19
  export default ProviderFactory;
@@ -4,17 +4,13 @@ import Provider from "../Provider";
4
4
  */
5
5
  declare class CookieProvider extends Provider {
6
6
  type: string;
7
- openAsync(conn: string): Promise<void>;
8
7
  getKeysAsync(table: string): Promise<any[]>;
9
- createAsync(kind: string): Promise<any>;
10
- deleteAsync(kind: string, key: any): Promise<any>;
11
- getAsync(kind: string, key: any): Promise<any>;
12
- getEntity<T>(kind: string, key: any): Promise<T>;
13
- insertAsync(kind: string, key: any, entity: any): Promise<any>;
14
- saveEntity<T>(kind: string, key: any, entity: T): Promise<any>;
15
- saveAsync(kind: string, key: any, entity: any): Promise<any>;
16
- updateAsync(kind: string, key: any, entity: any): Promise<any>;
17
- commit(): void;
18
- dispose(): void;
8
+ deleteAsync(table: string, key: any): Promise<any>;
9
+ getAsync(table: string, key: any): Promise<any>;
10
+ getEntityAsync<T>(table: string, key: any): Promise<T>;
11
+ insertAsync(table: string, key: any, entity: any): Promise<any>;
12
+ saveEntity<T>(table: string, key: any, entity: T): Promise<any>;
13
+ saveAsync(table: string, key: any, entity: any): Promise<any>;
14
+ updateAsync(table: string, key: any, entity: any): Promise<any>;
19
15
  }
20
16
  export default CookieProvider;
@@ -24,15 +24,7 @@ declare class IndexedDbProvider extends Provider {
24
24
  * 保证创建存储Store
25
25
  */
26
26
  createAsync(table: string): Promise<any>;
27
- /**
28
- * 打开数据库(不升级,用于执行命令)
29
- */
30
- openDbAsync(): Promise<IDBDatabase>;
31
- /**
32
- * 开启事务
33
- */
34
- openTransAsync(table: string, mode: IDBTransactionMode, db: IDBDatabase): Promise<IDBTransaction>;
35
- getEntity<T>(table: string, id: any): Promise<T>;
27
+ getEntityAsync<T>(table: string, id: any): Promise<T>;
36
28
  /**
37
29
  * 查询数据
38
30
  */
@@ -56,12 +48,17 @@ declare class IndexedDbProvider extends Provider {
56
48
  */
57
49
  deleteAsync: (table: string, key: any) => Promise<any>;
58
50
  /**
59
- * 提交事务
51
+ * 升级数据库版本
52
+ * VIP:无需手动关闭数据空连接,系统在onsuccess中会自动关闭连接
53
+ */
54
+ upgradeDbAsync(version: number): Promise<IDBDatabase>;
55
+ /**
56
+ * 打开数据库(不升级,用于执行命令)
60
57
  */
61
- commit(): void;
58
+ openDbAsync(): Promise<IDBDatabase>;
62
59
  /**
63
- * 关闭连接
60
+ * 开启事务
64
61
  */
65
- dispose(): void;
62
+ openTransAsync(db: IDBDatabase, table: string, mode: IDBTransactionMode): Promise<IDBTransaction>;
66
63
  }
67
64
  export default IndexedDbProvider;