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
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 日志服务
3
+ */
4
+ declare class LogServ {
5
+ logs: any[];
6
+ /**
7
+ * 手动添加日志
8
+ */
9
+ add(code: string, message: string, stack: string, elapsed?: number): void;
10
+ /**
11
+ * 删除日志
12
+ */
13
+ remove(index: number): void;
14
+ /**
15
+ * 清空日志
16
+ */
17
+ clear(): void;
18
+ }
19
+ export default LogServ;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 获取前端配置
3
+ */
4
+ declare class SettingServ {
5
+ loaded: boolean;
6
+ particles: boolean;
7
+ home: string;
8
+ background: any;
9
+ font: string;
10
+ language: string;
11
+ layout: string;
12
+ theme: string;
13
+ themes: any[];
14
+ layouts: any[];
15
+ backgrounds: any[];
16
+ locales: any[];
17
+ fonts: any;
18
+ ssos: any[];
19
+ size: string;
20
+ watermark: any;
21
+ app: string;
22
+ env: string;
23
+ /**
24
+ * 中心库
25
+ */
26
+ central: any;
27
+ /**
28
+ * 业务库
29
+ */
30
+ business: any;
31
+ upload: any;
32
+ version: any;
33
+ /**
34
+ * 系统初始化
35
+ */
36
+ init(): Promise<void>;
37
+ /**
38
+ * 加载设置
39
+ */
40
+ load(): Promise<any>;
41
+ }
42
+ export default SettingServ;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Socket服务类
3
+ */
4
+ declare class SocketServ {
5
+ /**
6
+ * socket连接对象
7
+ */
8
+ socket: any;
9
+ /**
10
+ * 是否已连接(空表示不需连接)
11
+ */
12
+ connected: any;
13
+ /**
14
+ * 是否需要自动重新连接
15
+ */
16
+ reconnect: boolean;
17
+ /**
18
+ * 消息处理程序
19
+ */
20
+ handler: any;
21
+ /**
22
+ * 登录后,连接Socket
23
+ */
24
+ connect(): Promise<void>;
25
+ /**
26
+ * 订阅并替换Socket事件处理程序
27
+ */
28
+ subscribe(handler?: (event: MessageEvent) => void): void;
29
+ /**
30
+ * 取消订阅Socket事件处理程序,防止内存泄漏
31
+ */
32
+ unsubscribe(): void;
33
+ /**
34
+ * 退出时断开连接
35
+ */
36
+ disconnect(): void;
37
+ }
38
+ export default SocketServ;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 用户服务
3
+ */
4
+ declare class UserServ {
5
+ /**
6
+ * 用户信息
7
+ */
8
+ user: any;
9
+ /**
10
+ * 接口返回的菜单信息(空:菜单未加载 空数组:匿名用户已加载菜单,但是无菜单;防止未登录状态每次跳转路由都加载菜单)
11
+ */
12
+ menus: any;
13
+ menusFlat: any;
14
+ /**
15
+ * 是否调试人
16
+ */
17
+ debugger: any;
18
+ /**
19
+ * 当前访问环境
20
+ */
21
+ env: any;
22
+ /**
23
+ * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
24
+ */
25
+ getSso(): Promise<any>;
26
+ /**
27
+ * 登录后,获取用户信息
28
+ */
29
+ loadInfo(): Promise<any>;
30
+ /**
31
+ * 未登录,获取匿名登录信息
32
+ */
33
+ getAnonymous(): void;
34
+ /**
35
+ * 根据路径获取路由
36
+ */
37
+ getMenuByUrl(url: string): any;
38
+ /**
39
+ * 加载服务端路由
40
+ */
41
+ loadMenus(): Promise<any>;
42
+ /**
43
+ * 退出登录
44
+ */
45
+ logout(): Promise<void>;
46
+ }
47
+ export default UserServ;
@@ -0,0 +1,15 @@
1
+ import ConfigServ from "./implement/ConfigServ";
2
+ import DriverServ from "./implement/DriverServ";
3
+ import EnvServ from "./implement/EnvServ";
4
+ import LogServ from "./implement/LogServ";
5
+ import SettingServ from "./implement/SettingServ";
6
+ import SocketServ from "./implement/SocketServ";
7
+ import UserServ from "./implement/UserServ";
8
+ declare let configServ: ConfigServ;
9
+ declare let driverServ: DriverServ;
10
+ declare let envServ: EnvServ;
11
+ declare let logServ: LogServ;
12
+ declare let settingServ: SettingServ;
13
+ declare let socketServ: SocketServ;
14
+ declare let userServ: UserServ;
15
+ export { configServ, driverServ, envServ, logServ, settingServ, socketServ, userServ };
@@ -26,19 +26,15 @@ declare let useConfigStore: import("pinia").StoreDefinition<"config", {
26
26
  * 文件布局方式
27
27
  */
28
28
  fileLayout: any;
29
- editor: {
30
- schemas: any[];
31
- completions: {};
32
- };
29
+ /**
30
+ * 请求器
31
+ */
32
+ requester: import("../drivers").IRequester;
33
33
  }, {}, {
34
34
  /**
35
35
  * 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
36
36
  */
37
37
  init(configs: any[]): void;
38
- /**
39
- * 尝试添加架构
40
- */
41
- tryAddSchema(uri: string, fileMatch: string, schema: object): void;
42
38
  /**
43
39
  * 获取本地配置
44
40
  */
@@ -54,10 +50,10 @@ declare let useConfigStore: import("pinia").StoreDefinition<"config", {
54
50
  /**
55
51
  * 全量保存用户配置
56
52
  */
57
- saveConfig(type: string, data: any, cached?: boolean): Promise<boolean>;
53
+ saveConfig(type: string, data: any, cached?: boolean): Promise<any>;
58
54
  /**
59
55
  * 部分保存用户配置
60
56
  */
61
- patchConfig(type: string, pairs: any): Promise<boolean>;
57
+ patchConfig(type: string, pairs: any): Promise<any>;
62
58
  }>;
63
59
  export default useConfigStore;
@@ -24,14 +24,18 @@ declare let useDriverStore: import("pinia").StoreDefinition<"driver", {
24
24
  * 环境集合,存储到Store中,防止每一个Driver实例重复加载
25
25
  */
26
26
  envs: any[];
27
+ /**
28
+ * 请求器
29
+ */
30
+ requester: import("../drivers").IRequester;
27
31
  }, {}, {
28
32
  /**
29
33
  * 加载应用选项
30
34
  */
31
- loadApps(reload?: boolean): Promise<void>;
35
+ loadApps(reload?: boolean): Promise<any>;
32
36
  /**
33
37
  * 加载环境选项
34
38
  */
35
- loadEnvs(reload?: boolean): Promise<void>;
39
+ loadEnvs(reload?: boolean): Promise<any>;
36
40
  }>;
37
41
  export default useDriverStore;
@@ -1,8 +1,7 @@
1
1
  import useConfigStore from "./config";
2
- import useDriverStore from "./driver";
3
- import useEnvStore from "./env";
4
2
  import useSettingStore from "./setting";
5
3
  import useLogStore from "./log";
6
4
  import useUserStore from "./user";
7
5
  import useSocketStore from "./socket";
8
- export { useConfigStore, useSettingStore, useLogStore, useUserStore, useSocketStore, useDriverStore, useEnvStore };
6
+ import useDriverStore from "./driver";
7
+ export { useConfigStore, useSettingStore, useLogStore, useUserStore, useSocketStore, useDriverStore };
@@ -30,6 +30,10 @@ declare let useSettingStore: import("pinia").StoreDefinition<"setting", {
30
30
  business: any;
31
31
  upload: any;
32
32
  version: any;
33
+ /**
34
+ * 请求器
35
+ */
36
+ requester: import("../drivers").IRequester;
33
37
  }, {}, {
34
38
  /**
35
39
  * 系统初始化
@@ -7,11 +7,15 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
7
7
  menusFlat: any;
8
8
  debugger: any;
9
9
  env: any;
10
+ /**
11
+ * 请求器
12
+ */
13
+ requester: import("../drivers").IRequester;
10
14
  }, {}, {
11
15
  /**
12
16
  * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
13
17
  */
14
- getSso(): Promise<any>;
18
+ getSso(): any;
15
19
  /**
16
20
  * 登录后,获取用户信息
17
21
  */
@@ -19,7 +23,7 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
19
23
  /**
20
24
  * 通过完整url和请求体,获取授权头
21
25
  */
22
- getAuth(url: string, body?: string): Promise<string>;
26
+ getAuthorization(url: string, data?: any): Promise<string>;
23
27
  /**
24
28
  * 未登录,获取匿名登录信息
25
29
  */
@@ -35,6 +39,6 @@ declare const useUserStore: import("pinia").StoreDefinition<"user", {
35
39
  /**
36
40
  * 退出登录
37
41
  */
38
- logout(): Promise<void>;
42
+ logout(): Promise<any>;
39
43
  }>;
40
44
  export default useUserStore;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 服务接口
3
+ */
4
+ interface ISvc {
5
+ }
6
+ export default ISvc;
@@ -0,0 +1,4 @@
1
+ import ISvc from "./ISvc";
2
+ declare abstract class Svc implements ISvc {
3
+ }
4
+ export default Svc;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * 服务工厂类
3
+ */
4
+ declare class SvcFactory {
5
+ static(): void;
6
+ /**
7
+ * 获取路由服务
8
+ */
9
+ static get getRouter(): any;
10
+ }
11
+ export default SvcFactory;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * 不一定跟用户相关,此时如果使用配置仓储,使用的是配置文件的配置,非接口配置
3
+ */
4
+ declare class ConfigSvc {
5
+ /**
6
+ * 默认背景
7
+ */
8
+ background: string;
9
+ /**
10
+ * 当前主题
11
+ */
12
+ theme: string;
13
+ /**
14
+ * 当前布局方式
15
+ */
16
+ layout: string;
17
+ /**
18
+ * 当前语言
19
+ */
20
+ language: string;
21
+ /**
22
+ * 字体
23
+ */
24
+ font: string;
25
+ /**
26
+ * 文件布局方式
27
+ */
28
+ fileLayout: string;
29
+ /**
30
+ * 编辑器架构配置
31
+ */
32
+ editor: {
33
+ /**
34
+ * 编辑器架构集合
35
+ */
36
+ schemas: any[];
37
+ /**
38
+ * 智能提示是否注册信息,防止重复注册
39
+ */
40
+ completions: {};
41
+ };
42
+ /**
43
+ * 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
44
+ */
45
+ init(configs: any[]): Promise<void>;
46
+ /**
47
+ * 尝试添加架构
48
+ */
49
+ tryAddSchema(uri: string, fileMatch: string, schema: object): void;
50
+ /**
51
+ * 获取本地配置
52
+ */
53
+ getConfig(type: string): Promise<any>;
54
+ /**
55
+ * 设置背景
56
+ */
57
+ setBackground(background: string): void;
58
+ /**
59
+ * 加载用户配置
60
+ */
61
+ loadConfig(type: string, cached?: boolean): Promise<any>;
62
+ /**
63
+ * 全量保存用户配置
64
+ */
65
+ saveConfig(type: string, data: any, cached?: boolean): Promise<boolean>;
66
+ /**
67
+ * 部分保存用户配置
68
+ */
69
+ patchConfig(type: string, pairs: any): Promise<boolean>;
70
+ /**
71
+ * 获取当前语言
72
+ */
73
+ getLanguage(): string;
74
+ }
75
+ export default ConfigSvc;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 使用驱动仓储
3
+ */
4
+ declare class DriverSvc {
5
+ /**
6
+ * 加载完毕状态记录
7
+ */
8
+ loaded: {
9
+ apps: boolean;
10
+ envs: boolean;
11
+ };
12
+ /**
13
+ * 是否加载中状态,用于并发场景 防止重复拉取接口
14
+ */
15
+ loading: {
16
+ apps: boolean;
17
+ envs: boolean;
18
+ };
19
+ /**
20
+ * 应用集合,存储到Store中,防止每一个Driver实例重复加载
21
+ */
22
+ apps: any[];
23
+ /**
24
+ * 环境集合,存储到Store中,防止每一个Driver实例重复加载
25
+ */
26
+ envs: any[];
27
+ /**
28
+ * 加载应用选项
29
+ */
30
+ loadApps(reload?: boolean): Promise<void>;
31
+ /**
32
+ * 加载环境选项
33
+ */
34
+ loadEnvs(reload?: boolean): Promise<void>;
35
+ }
36
+ export default DriverSvc;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 前端环境仓储
3
+ */
4
+ declare class EnvSvc {
5
+ /**
6
+ * 环境变量
7
+ */
8
+ env: any;
9
+ /**
10
+ * 使用环境变量
11
+ */
12
+ useEnv(env: any): void;
13
+ }
14
+ export default EnvSvc;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 日志服务
3
+ */
4
+ declare class LogSvc {
5
+ logs: any[];
6
+ /**
7
+ * 手动添加日志
8
+ */
9
+ add(code: string, message: string, stack: string, elapsed?: number): void;
10
+ /**
11
+ * 删除日志
12
+ */
13
+ remove(index: number): void;
14
+ /**
15
+ * 清空日志
16
+ */
17
+ clear(): void;
18
+ }
19
+ export default LogSvc;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * 获取前端配置
3
+ */
4
+ declare class SettingSvc {
5
+ loaded: boolean;
6
+ particles: boolean;
7
+ home: string;
8
+ background: any;
9
+ font: string;
10
+ language: string;
11
+ layout: string;
12
+ theme: string;
13
+ themes: any[];
14
+ layouts: any[];
15
+ backgrounds: any[];
16
+ locales: any[];
17
+ fonts: any;
18
+ ssos: any[];
19
+ size: string;
20
+ watermark: any;
21
+ app: string;
22
+ env: string;
23
+ /**
24
+ * 中心库
25
+ */
26
+ central: any;
27
+ /**
28
+ * 业务库
29
+ */
30
+ business: any;
31
+ upload: any;
32
+ version: any;
33
+ /**
34
+ * 系统初始化
35
+ */
36
+ init(): Promise<void>;
37
+ /**
38
+ * 加载设置
39
+ */
40
+ load(): Promise<any>;
41
+ }
42
+ export default SettingSvc;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Socket服务类
3
+ */
4
+ declare class SocketSvc {
5
+ /**
6
+ * socket连接对象
7
+ */
8
+ socket: any;
9
+ /**
10
+ * 是否已连接(空表示不需连接)
11
+ */
12
+ connected: any;
13
+ /**
14
+ * 是否需要自动重新连接
15
+ */
16
+ reconnect: boolean;
17
+ /**
18
+ * 消息处理程序
19
+ */
20
+ handler: any;
21
+ /**
22
+ * 登录后,连接Socket
23
+ */
24
+ connect(): Promise<void>;
25
+ /**
26
+ * 订阅并替换Socket事件处理程序
27
+ */
28
+ subscribe(handler?: (event: MessageEvent) => void): void;
29
+ /**
30
+ * 取消订阅Socket事件处理程序,防止内存泄漏
31
+ */
32
+ unsubscribe(): void;
33
+ /**
34
+ * 退出时断开连接
35
+ */
36
+ disconnect(): void;
37
+ }
38
+ export default SocketSvc;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 用户服务
3
+ */
4
+ declare class UserSvc {
5
+ /**
6
+ * 用户信息
7
+ */
8
+ user: any;
9
+ /**
10
+ * 接口返回的菜单信息(空:菜单未加载 空数组:匿名用户已加载菜单,但是无菜单;防止未登录状态每次跳转路由都加载菜单)
11
+ */
12
+ menus: any;
13
+ menusFlat: any;
14
+ /**
15
+ * 是否调试人
16
+ */
17
+ debugger: any;
18
+ /**
19
+ * 当前访问环境
20
+ */
21
+ env: any;
22
+ /**
23
+ * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
24
+ */
25
+ getSso(): Promise<any>;
26
+ /**
27
+ * 登录后,获取用户信息
28
+ */
29
+ loadInfo(): Promise<any>;
30
+ /**
31
+ * 未登录,获取匿名登录信息
32
+ */
33
+ getAnonymous(): Promise<void>;
34
+ /**
35
+ * 根据路径获取路由
36
+ */
37
+ getMenuByUrl(url: string): any;
38
+ /**
39
+ * 加载服务端路由
40
+ */
41
+ loadMenus(): Promise<any[]>;
42
+ /**
43
+ * 退出登录
44
+ */
45
+ logout(): Promise<void>;
46
+ }
47
+ export default UserSvc;
@@ -0,0 +1,34 @@
1
+ import ConfigSvc from "./implement/ConfigSvc";
2
+ import EnvSvc from "./implement/EnvSvc";
3
+ import LogSvc from "./implement/LogSvc";
4
+ import SettingSvc from "./implement/SettingSvc";
5
+ import SocketSvc from "./implement/SocketSvc";
6
+ import UserSvc from "./implement/UserSvc";
7
+ import SvcFactory from "./SvcFactory";
8
+ /**
9
+ * 驱动服务实例
10
+ */
11
+ declare let configSvc: ConfigSvc;
12
+ /**
13
+ * 包装配置服务,保证驱动服务具有响应式,并且不需.value后缀
14
+ */
15
+ declare let driverSvc: {
16
+ loaded: {
17
+ apps: boolean;
18
+ envs: boolean;
19
+ };
20
+ loading: {
21
+ apps: boolean;
22
+ envs: boolean;
23
+ };
24
+ apps: any[];
25
+ envs: any[];
26
+ loadApps: (reload?: boolean) => Promise<void>;
27
+ loadEnvs: (reload?: boolean) => Promise<void>;
28
+ };
29
+ declare let envSvc: EnvSvc;
30
+ declare let logSvc: LogSvc;
31
+ declare let settingSvc: SettingSvc;
32
+ declare let socketSvc: SocketSvc;
33
+ declare let userSvc: UserSvc;
34
+ export { configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc, SvcFactory };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 包装配置服务,保证驱动服务具有响应式,并且不需.value后缀
3
+ */
4
+ declare let driverSvc: {
5
+ loaded: {
6
+ apps: boolean;
7
+ envs: boolean;
8
+ };
9
+ loading: {
10
+ apps: boolean;
11
+ envs: boolean;
12
+ };
13
+ apps: any[];
14
+ envs: any[];
15
+ loadApps: (reload?: boolean) => Promise<void>;
16
+ loadEnvs: (reload?: boolean) => Promise<void>;
17
+ };
18
+ export default driverSvc;
@@ -0,0 +1,2 @@
1
+ import driverSvc from "./driverSvc";
2
+ export { driverSvc };
@@ -0,0 +1,8 @@
1
+ import loader from "@monaco-editor/loader";
2
+ import type * as Monaco from 'monaco-editor/esm/vs/editor/editor.api';
3
+ import moment from "moment";
4
+ /**
5
+ * 异步加载echarts
6
+ */
7
+ export declare function loadEcharts(): Promise<unknown>;
8
+ export { loader, Monaco, moment };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * 初始化选项
3
+ */
4
+ declare interface CreateOptions {
5
+ /**
6
+ * 前端环境变量
7
+ */
8
+ env: any;
9
+ /**
10
+ * 自定义路由
11
+ */
12
+ routes: any[];
13
+ /**
14
+ * 多语言配置
15
+ */
16
+ lang: any;
17
+ }
18
+ export default CreateOptions;
@@ -0,0 +1,2 @@
1
+ import CreateOptions from "./CreateOptions";
2
+ export { type CreateOptions };