halo-fe 1.0.5 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. package/dist/main.js +3453 -2365
  2. package/dist/style.css +1 -1
  3. package/dist/{vendor-crypto-js-B6Qe-gIg.js → vendor-crypto-js-DWn5nTKL.js} +3 -1
  4. package/dist/vendor-xlsx-js-style-DMPNZPOx.js +11862 -0
  5. package/esm/coms/Code.vue.d.ts +1 -1
  6. package/esm/coms/Fill.vue.d.ts +15 -0
  7. package/esm/coms/RichText.vue.d.ts +24 -0
  8. package/esm/coms/Scroller.vue.d.ts +28 -0
  9. package/esm/coms/index.d.ts +5 -1
  10. package/esm/coms/types/RichTextOptions.d.ts +14 -0
  11. package/esm/coms/types/RichTextProps.d.ts +12 -0
  12. package/esm/coms/types/ScrollerProps.d.ts +15 -0
  13. package/esm/coms/types/index.d.ts +4 -1
  14. package/esm/drivers/IDisposable.d.ts +4 -0
  15. package/esm/drivers/bridges/index.d.ts +1 -0
  16. package/esm/drivers/cdns/index.d.ts +2 -2
  17. package/esm/drivers/driver-helper.d.ts +46 -0
  18. package/esm/drivers/encoders/Encoder.d.ts +6 -1
  19. package/esm/drivers/encoders/EncoderFactory.d.ts +0 -1
  20. package/esm/drivers/encoders/IEncoder.d.ts +7 -3
  21. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
  22. package/esm/drivers/encoders/index.d.ts +2 -2
  23. package/esm/drivers/excels/index.d.ts +2 -3
  24. package/esm/drivers/explainers/index.d.ts +1 -2
  25. package/esm/drivers/factories/Factories.d.ts +55 -0
  26. package/esm/drivers/factories/Factory.d.ts +9 -0
  27. package/esm/drivers/factories/IFactory.d.ts +4 -0
  28. package/esm/drivers/factories/implement/CdnFactory.d.ts +13 -0
  29. package/esm/drivers/factories/implement/EncoderFactory.d.ts +17 -0
  30. package/esm/drivers/factories/implement/ExcelFactory.d.ts +13 -0
  31. package/esm/drivers/factories/implement/ExplainerFactory.d.ts +6 -0
  32. package/esm/drivers/factories/implement/FeatureFactory.d.ts +13 -0
  33. package/esm/drivers/factories/implement/HasherFactory.d.ts +11 -0
  34. package/esm/drivers/factories/implement/HttpFactory.d.ts +18 -0
  35. package/esm/drivers/factories/implement/ProviderFactory.d.ts +18 -0
  36. package/esm/drivers/factories/implement/SignerFactory.d.ts +13 -0
  37. package/esm/drivers/factories/implement/SsoFactory.d.ts +17 -0
  38. package/esm/drivers/factories/implement/TaskFactory.d.ts +9 -0
  39. package/esm/drivers/factories/implement/VideoFactory.d.ts +3 -0
  40. package/esm/drivers/factories/implement/VoiceFactory.d.ts +6 -0
  41. package/esm/drivers/factories/implement/index.d.ts +11 -0
  42. package/esm/drivers/factories/index.d.ts +14 -26
  43. package/esm/drivers/features/index.d.ts +2 -3
  44. package/esm/drivers/hashers/HasherFactory.d.ts +0 -1
  45. package/esm/drivers/hashers/index.d.ts +2 -3
  46. package/esm/drivers/https/Http.d.ts +5 -5
  47. package/esm/drivers/https/HttpFactory.d.ts +0 -2
  48. package/esm/drivers/https/IHttp.d.ts +4 -4
  49. package/esm/drivers/https/entities/HttpResponse.d.ts +13 -1
  50. package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -0
  51. package/esm/drivers/https/implements/HaloHttp.d.ts +28 -4
  52. package/esm/drivers/https/index.d.ts +2 -3
  53. package/esm/drivers/index.d.ts +7 -1
  54. package/esm/drivers/providers/implements/CookieProvider.d.ts +3 -0
  55. package/esm/drivers/providers/implements/StorageHelper.d.ts +34 -0
  56. package/esm/drivers/providers/index.d.ts +2 -3
  57. package/esm/drivers/requesters/IRequester.d.ts +25 -0
  58. package/esm/drivers/requesters/Requester.d.ts +13 -0
  59. package/esm/drivers/requesters/RequesterFactory.d.ts +21 -0
  60. package/esm/drivers/requesters/entities/HttpRequest.d.ts +34 -0
  61. package/esm/drivers/requesters/entities/HttpResponse.d.ts +19 -0
  62. package/esm/drivers/requesters/implements/DefaultRequester.d.ts +12 -0
  63. package/esm/drivers/requesters/implements/LocalRequester.d.ts +43 -0
  64. package/esm/drivers/requesters/implements/MkRequester.d.ts +40 -0
  65. package/esm/drivers/requesters/index.d.ts +5 -0
  66. package/esm/drivers/signers/implements/DefaultSigner.d.ts +0 -2
  67. package/esm/drivers/signers/index.d.ts +2 -3
  68. package/esm/drivers/ssos/index.d.ts +2 -3
  69. package/esm/drivers/tasks/ITask.d.ts +12 -0
  70. package/esm/drivers/tasks/Task.d.ts +10 -0
  71. package/esm/drivers/tasks/implement/MemoryTask.d.ts +11 -0
  72. package/esm/drivers/tasks/index.d.ts +2 -0
  73. package/esm/drivers/videos/VideoFactory.d.ts +3 -0
  74. package/esm/drivers/videos/index.d.ts +1 -0
  75. package/esm/drivers/voices/IVoice.d.ts +2 -1
  76. package/esm/drivers/voices/Voice.d.ts +8 -0
  77. package/esm/drivers/voices/VoiceFactory.d.ts +6 -1
  78. package/esm/drivers/voices/implement/DefaultVoice.d.ts +4 -2
  79. package/esm/drivers/voices/implement/TencentVoice.d.ts +4 -2
  80. package/esm/drivers/voices/index.d.ts +1 -0
  81. package/esm/helpers/ArrayHelper.d.ts +98 -0
  82. package/esm/helpers/BrowserHelper.d.ts +10 -0
  83. package/esm/helpers/ComponentHelper.d.ts +18 -0
  84. package/esm/helpers/DictionaryHelper.d.ts +18 -0
  85. package/esm/helpers/DomHelper.d.ts +95 -0
  86. package/esm/helpers/EventHelper.d.ts +30 -0
  87. package/esm/helpers/FileHelper.d.ts +22 -0
  88. package/esm/helpers/HtmlHelper.d.ts +14 -0
  89. package/esm/helpers/ImageHelper.d.ts +10 -0
  90. package/esm/helpers/JsonHelper.d.ts +35 -0
  91. package/esm/helpers/MathHelper.d.ts +54 -0
  92. package/esm/helpers/MicroHelper.d.ts +10 -0
  93. package/esm/helpers/MountHelper.d.ts +14 -0
  94. package/esm/helpers/ObjectHelper.d.ts +38 -0
  95. package/esm/helpers/ScriptHelper.d.ts +31 -0
  96. package/esm/helpers/ScrollHelper.d.ts +14 -0
  97. package/esm/helpers/SignHelper.d.ts +14 -0
  98. package/esm/helpers/StringHelper.d.ts +94 -0
  99. package/esm/helpers/TaskHelper.d.ts +26 -0
  100. package/esm/helpers/TimeHelper.d.ts +66 -0
  101. package/esm/helpers/TreeHelper.d.ts +54 -0
  102. package/esm/helpers/TypeHelper.d.ts +26 -0
  103. package/esm/helpers/UrlHelper.d.ts +88 -0
  104. package/esm/helpers/index.d.ts +25 -26
  105. package/esm/helpers/json-helper.d.ts +4 -12
  106. package/esm/helpers/object-helper.d.ts +0 -4
  107. package/esm/helpers/time-helper.d.ts +3 -7
  108. package/esm/helpers/types/TreeNodeProp.d.ts +6 -0
  109. package/esm/helpers/types/index.d.ts +2 -0
  110. package/esm/helpers/url-helper.d.ts +2 -2
  111. package/esm/main.d.ts +5 -4
  112. package/esm/plugins/index.d.ts +2 -2
  113. package/esm/plugins/types/IMessager.d.ts +1 -1
  114. package/esm/{services/types/IMessager.d.ts → plugins/types/IMessenger.d.ts} +4 -4
  115. package/esm/plugins/types/index.d.ts +8 -5
  116. package/esm/repos/SettingRepo.d.ts +11 -0
  117. package/esm/repos/index.d.ts +3 -0
  118. package/esm/services/index.d.ts +14 -1
  119. package/esm/servs/IServ.d.ts +6 -0
  120. package/esm/servs/Serv.d.ts +4 -0
  121. package/esm/servs/ServFactory.d.ts +11 -0
  122. package/esm/servs/implement/ConfigServ.d.ts +66 -0
  123. package/esm/servs/implement/DriverServ.d.ts +36 -0
  124. package/esm/servs/implement/EnvServ.d.ts +14 -0
  125. package/esm/servs/implement/LogServ.d.ts +19 -0
  126. package/esm/servs/implement/SettingServ.d.ts +42 -0
  127. package/esm/servs/implement/SocketServ.d.ts +38 -0
  128. package/esm/servs/implement/UserServ.d.ts +47 -0
  129. package/esm/servs/index.d.ts +15 -0
  130. package/esm/stores/config.d.ts +6 -10
  131. package/esm/stores/driver.d.ts +6 -2
  132. package/esm/stores/index.d.ts +2 -3
  133. package/esm/stores/setting.d.ts +4 -0
  134. package/esm/stores/user.d.ts +7 -3
  135. package/esm/svcs/ISvc.d.ts +6 -0
  136. package/esm/svcs/Svc.d.ts +4 -0
  137. package/esm/svcs/SvcFactory.d.ts +11 -0
  138. package/esm/svcs/implement/ConfigSvc.d.ts +75 -0
  139. package/esm/svcs/implement/DriverSvc.d.ts +36 -0
  140. package/esm/svcs/implement/EnvSvc.d.ts +14 -0
  141. package/esm/svcs/implement/LogSvc.d.ts +19 -0
  142. package/esm/svcs/implement/SettingSvc.d.ts +42 -0
  143. package/esm/svcs/implement/SocketSvc.d.ts +38 -0
  144. package/esm/svcs/implement/UserSvc.d.ts +47 -0
  145. package/esm/svcs/index.d.ts +34 -0
  146. package/esm/svcs/proxies/driverSvc.d.ts +18 -0
  147. package/esm/svcs/proxies/index.d.ts +2 -0
  148. package/esm/thirds/index.d.ts +8 -0
  149. package/esm/types/CreateOptions.d.ts +18 -0
  150. package/esm/types/index.d.ts +2 -0
  151. package/esm/utilities/EventUtility.d.ts +39 -8
  152. package/esm/utilities/index.d.ts +1 -0
  153. package/esm/utilities/types/DragEvent.d.ts +11 -0
  154. package/esm/utilities/types/DragOptions.d.ts +28 -0
  155. package/esm/utilities/types/Position.d.ts +15 -0
  156. package/esm/utilities/types/Range.d.ts +10 -0
  157. package/esm/utilities/types/Rect.d.ts +6 -0
  158. package/esm/utilities/types/index.d.ts +5 -0
  159. package/package.json +9 -8
  160. package/dist/vendor-@vue-l0sNRNKZ.js +0 -1
  161. package/dist/vendor-pinia-DVLspbiC.js +0 -310
  162. package/dist/vendor-vue-demi-CIhrFbpB.js +0 -17
  163. package/esm/services/types/IMessage.d.ts +0 -14
  164. package/esm/services/types/index.d.ts +0 -2
@@ -13,9 +13,9 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
13
13
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<CodeProps>, {
14
14
  config: {};
15
15
  }>>> & {
16
+ onChange?: (value: string) => any;
16
17
  onScroll?: (scrollTop: number) => any;
17
18
  onMounted?: (monaco: typeof Monaco, editor: Monaco.editor.IStandaloneCodeEditor) => any;
18
- onChange?: (value: string) => any;
19
19
  "onUpdate:modelValue"?: (value: any) => any;
20
20
  }, {
21
21
  config: any;
@@ -0,0 +1,15 @@
1
+ declare function __VLS_template(): {
2
+ default?(_: {}): any;
3
+ };
4
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
5
+ resize: (...args: any[]) => void;
6
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>> & {
7
+ onResize?: (...args: any[]) => any;
8
+ }, {}, {}>;
9
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
10
+ export default _default;
11
+ type __VLS_WithTemplateSlots<T, S> = T & {
12
+ new (): {
13
+ $slots: S;
14
+ };
15
+ };
@@ -0,0 +1,24 @@
1
+ import { RichTextProps } from "./types";
2
+ declare let __VLS_typeProps: RichTextProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: string;
5
+ } & typeof __VLS_typeProps;
6
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_PublicProps>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:modelValue": (modelValue: string) => void;
8
+ change: (...args: any[]) => void;
9
+ scroll: (...args: any[]) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_PublicProps>>> & {
11
+ onChange?: (...args: any[]) => any;
12
+ onScroll?: (...args: any[]) => any;
13
+ "onUpdate:modelValue"?: (modelValue: string) => any;
14
+ }, {}, {}>;
15
+ export default _default;
16
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
17
+ type __VLS_TypePropsToOption<T> = {
18
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
19
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
20
+ } : {
21
+ type: import('vue').PropType<T[K]>;
22
+ required: true;
23
+ };
24
+ };
@@ -0,0 +1,28 @@
1
+ import ScrollerProps from "./types/ScrollerProps";
2
+ declare function __VLS_template(): {
3
+ default?(_: {}): any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<ScrollerProps>, {
6
+ scrollTo: (scrollTop: number) => void;
7
+ update: () => void;
8
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ scroll: (...args: any[]) => void;
10
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<ScrollerProps>>> & {
11
+ onScroll?: (...args: any[]) => any;
12
+ }, {}, {}>;
13
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
14
+ export default _default;
15
+ type __VLS_WithTemplateSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
20
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
21
+ type __VLS_TypePropsToOption<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
23
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
24
+ } : {
25
+ type: import('vue').PropType<T[K]>;
26
+ required: true;
27
+ };
28
+ };
@@ -3,6 +3,10 @@ import HaCol from "./Col.vue";
3
3
  import HaCompare from "./Compare.vue";
4
4
  import HaContainer from "./Container.vue";
5
5
  import HaEmpty from "./Empty.vue";
6
+ import HaFill from "./Fill.vue";
6
7
  import HaProgress from "./Progress.vue";
8
+ import HaRichText from "./RichText.vue";
7
9
  import HaRow from "./Row.vue";
8
- export { HaCode, HaCol, HaCompare, HaContainer, HaEmpty, HaProgress, HaRow };
10
+ import HaScroller from "./Scroller.vue";
11
+ export * from "./types";
12
+ export { HaCode, HaCol, HaCompare, HaContainer, HaEmpty, HaFill, HaProgress, HaRichText, HaRow, HaScroller };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 富文本选项配置
3
+ */
4
+ export interface RichTextOptions {
5
+ /**
6
+ * 是否只读
7
+ */
8
+ readonly?: boolean;
9
+ /**
10
+ * 滚动条距离顶部的距离
11
+ */
12
+ scrollTop?: number;
13
+ }
14
+ export default RichTextOptions;
@@ -0,0 +1,12 @@
1
+ import { RichTextOptions } from "./RichTextOptions";
2
+ /**
3
+ * 富文本属性
4
+ */
5
+ interface RichTextProps {
6
+ /**
7
+ * 默认配置选项
8
+ * 必填,否则内部状态变化,会导致响应状态丢失
9
+ */
10
+ options: RichTextOptions;
11
+ }
12
+ export default RichTextProps;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 滚动条选项
3
+ */
4
+ interface ScrollerProps {
5
+ /**
6
+ * 选项配置
7
+ */
8
+ options: {
9
+ /**
10
+ * 滚动条距顶部距离
11
+ */
12
+ scrollTop?: number;
13
+ };
14
+ }
15
+ export default ScrollerProps;
@@ -1,4 +1,7 @@
1
1
  import CodeEmit from "./CodeEmit";
2
2
  import CodeProps from "./CodeProps";
3
+ import RichTextOptions from "./RichTextOptions";
4
+ import RichTextProps from "./RichTextProps";
3
5
  import RowProps from "./RowProps";
4
- export { type CodeEmit, type CodeProps, type RowProps };
6
+ import ScrollerProps from "./ScrollerProps";
7
+ export { type CodeEmit, type CodeProps, type RichTextOptions, type RichTextProps, type RowProps, type ScrollerProps };
@@ -0,0 +1,4 @@
1
+ interface IDisposable {
2
+ dispose(): void;
3
+ }
4
+ export default IDisposable;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,2 +1,2 @@
1
- import CdnFactory from "./CdnFactory";
2
- export { CdnFactory };
1
+ import ICdn from "./ICdn";
2
+ export { type ICdn };
@@ -0,0 +1,46 @@
1
+ import ISso from "./ssos/ISso";
2
+ import ISigner from "./signers/ISigner";
3
+ import IFeature from "./features/IFeature";
4
+ import IProvider from "./providers/IProvider";
5
+ import IExcel from "./excels/IExcel";
6
+ import ICdn from "./cdns/ICdn";
7
+ import IEncoder from "./encoders/IEncoder";
8
+ import IHasher from "./hashers/IHasher";
9
+ /**
10
+ * 驱动帮助类
11
+ */
12
+ declare class DriverHelper {
13
+ /**
14
+ * 获取SSO
15
+ */
16
+ static getSso(type: string): ISso;
17
+ /**
18
+ * 获取签名器
19
+ */
20
+ static getSigner(type: string): ISigner;
21
+ /**
22
+ * 获取特征
23
+ */
24
+ static getFeature(type: string): IFeature;
25
+ /**
26
+ * 获取并开启 指定类型的驱动程序
27
+ */
28
+ static getProviderAsync(type: string, store?: string): Promise<IProvider>;
29
+ /**
30
+ * 获取Excel实例
31
+ */
32
+ static getExcel(type: string): IExcel;
33
+ /**
34
+ * 获取CDN实例
35
+ */
36
+ static getCdn(type: string, baseUrl?: string): ICdn;
37
+ /**
38
+ * 获取编码器
39
+ */
40
+ static getEncoder(type: string): IEncoder;
41
+ /**
42
+ * 获取Hasher
43
+ */
44
+ static getHasher(type: string): IHasher;
45
+ }
46
+ export default DriverHelper;
@@ -5,7 +5,12 @@ import IEncoder from "./IEncoder";
5
5
  declare abstract class Encoder implements IEncoder {
6
6
  type: string;
7
7
  abstract open(conn: string): void;
8
- abstract encode(value: string): string;
8
+ encode(value: string | object): string;
9
+ /**
10
+ * 编码字符串
11
+ */
12
+ abstract encodeString(value: string): string;
13
+ decodeObj(value: string): object;
9
14
  abstract decode(value: string): string;
10
15
  }
11
16
  export default Encoder;
@@ -9,7 +9,6 @@ declare class EncoderFactory extends Factory<IEncoder> {
9
9
  * 创建执行类型的Hash实例
10
10
  */
11
11
  create(type: string, conn?: string): Promise<IEncoder>;
12
- private base64;
13
12
  /**
14
13
  * 获取Base64 编码器对象
15
14
  */
@@ -11,11 +11,15 @@ interface IEncoder {
11
11
  */
12
12
  open(conn: string): void;
13
13
  /**
14
- * 字符串编码
14
+ * 编码字符串/实体,得到字符串
15
15
  */
16
- encode(value: string): string;
16
+ encode(value: string | object): string;
17
17
  /**
18
- * 字符串解码
18
+ * 解码字符串,得到实体
19
+ */
20
+ decodeObj(value: string): object;
21
+ /**
22
+ * 解码字符串
19
23
  */
20
24
  decode(value: string): string;
21
25
  }
@@ -5,7 +5,7 @@ import Encoder from "../Encoder";
5
5
  declare class Base64Encoder extends Encoder {
6
6
  type: string;
7
7
  open(conn: string): void;
8
- encode(value: string): string;
8
+ encodeString(value: string): string;
9
9
  decode(value: string): string;
10
10
  }
11
11
  export default Base64Encoder;
@@ -1,2 +1,2 @@
1
- import EncoderFactory from "./EncoderFactory";
2
- export { EncoderFactory };
1
+ import IEncoder from "./IEncoder";
2
+ export { type IEncoder };
@@ -1,3 +1,2 @@
1
- import type IExcel from "./IExcel";
2
- import ExcelFactory from "./ExcelFactory";
3
- export { IExcel, ExcelFactory };
1
+ import IExcel from "./IExcel";
2
+ export { type IExcel, };
@@ -1,2 +1 @@
1
- import ExplainerFactory from "./ExplainerFactory";
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;
@@ -4,6 +4,11 @@ import IDriver from "../IDriver";
4
4
  * 工厂基类
5
5
  */
6
6
  declare abstract class Factory<T extends IDriver> implements IFactory<T> {
7
+ /**
8
+ * 实例集合
9
+ * 或者使用:Record<string, string>
10
+ */
11
+ private instances;
7
12
  /**
8
13
  * 获取当前驱动所有实例
9
14
  */
@@ -12,5 +17,9 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
12
17
  * 创建指定类型驱动
13
18
  */
14
19
  create(type: string, conn?: string): Promise<T>;
20
+ /**
21
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
22
+ */
23
+ createIfAbsent(name: string, type?: string, open?: (entity: T) => void): Promise<T>;
15
24
  }
16
25
  export default Factory;
@@ -10,5 +10,9 @@ interface IFactory<T> {
10
10
  * 创建指定类型的实例
11
11
  */
12
12
  create(type: string, conn?: string): Promise<T>;
13
+ /**
14
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
15
+ */
16
+ createIfAbsent(name: string, type: string, open?: (entity: T) => void): Promise<T>;
13
17
  }
14
18
  export default IFactory;
@@ -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,6 @@
1
+ import Factory from "../Factory";
2
+ import IExplainer from "../../explainers/IExplainer";
3
+ declare class ExplainerFactory extends Factory<IExplainer> {
4
+ getInstances(): IExplainer[];
5
+ }
6
+ export default ExplainerFactory;
@@ -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,9 @@
1
+ import Factory from "../Factory";
2
+ import ITask from "../../tasks/ITask";
3
+ /**
4
+ * 任务工厂类
5
+ */
6
+ declare class TaskFactory extends Factory<ITask> {
7
+ getInstances(): ITask[];
8
+ }
9
+ export default TaskFactory;
@@ -0,0 +1,3 @@
1
+ declare class VideoFactory {
2
+ }
3
+ export default VideoFactory;
@@ -0,0 +1,6 @@
1
+ import Factory from "../Factory";
2
+ import { IVoice } from "../../voices/IVoice";
3
+ declare class VoiceFactory extends Factory<IVoice> {
4
+ getInstances(): IVoice[];
5
+ }
6
+ export default VoiceFactory;
@@ -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,33 +1,21 @@
1
- import DriverFactory from "./DriverFactory";
2
- import { HttpFactory, IHttp } from "../https";
3
- import { EncoderFactory } from "../encoders";
4
- import { CdnFactory } from "../cdns";
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";
1
+ import Factories from "./Factories";
2
+ import { IEncoder } from "../encoders";
3
+ import { IHttp } from "../https";
4
+ import { IHasher } from "../hashers";
12
5
  /**
13
- * 默认Http请求对象
6
+ * 默认base64编码
14
7
  */
15
- declare let cdnFactory: CdnFactory;
16
- declare let encoderFactory: EncoderFactory;
17
- declare let excelFactory: ExcelFactory;
18
- declare let explainerFactory: ExplainerFactory;
19
- declare let featureFactory: FeatureFactory;
20
- declare let hasherFactory: HasherFactory;
21
- declare let httpFactory: HttpFactory;
22
- declare let providerFactory: ProviderFactory;
23
- declare let signerFactory: SignerFactory;
24
- declare let ssoFactory: SsoFactory;
8
+ declare let base64: IEncoder;
25
9
  /**
26
- * 默认http请求对象
10
+ * 默认Http请求对象
27
11
  */
28
12
  declare let http: IHttp;
29
13
  /**
30
- * 设置Http请求对象
14
+ * MD5 hash计算
15
+ */
16
+ declare let md5: IHasher;
17
+ /**
18
+ * 初始化默认驱动实例
31
19
  */
32
- declare let setHttp: () => Promise<void>;
33
- export { cdnFactory, encoderFactory, excelFactory, explainerFactory, featureFactory, hasherFactory, httpFactory, providerFactory, signerFactory, ssoFactory, DriverFactory, http, setHttp };
20
+ declare let initDriver: () => Promise<void>;
21
+ export { Factories, base64, http, md5, initDriver };
@@ -1,3 +1,2 @@
1
- import type IFeature from "./IFeature";
2
- import FeatureFactory from "./FeatureFactory";
3
- export { IFeature, FeatureFactory };
1
+ import IFeature from "./IFeature";
2
+ export { type IFeature };
@@ -3,7 +3,6 @@ import Factory from "../factories/Factory";
3
3
  declare class HasherFactory extends Factory<IHasher> {
4
4
  getInstances(): IHasher[];
5
5
  create(type: string, conn?: string): Promise<IHasher>;
6
- private md5;
7
6
  /**
8
7
  * 获取MD5 Hash对象
9
8
  */
@@ -1,3 +1,2 @@
1
- import type IHasher from "./IHasher";
2
- import HasherFactory from "./HasherFactory";
3
- export { IHasher, HasherFactory };
1
+ import IHasher from "./IHasher";
2
+ export { type IHasher };