halo-fe 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/README.md +3 -0
  2. package/dist/main.js +2539 -0
  3. package/dist/vendor-@monaco-editor-DKC4UNw_.js +258 -0
  4. package/dist/vendor-@vue-l0sNRNKZ.js +1 -0
  5. package/dist/vendor-axios-ud9O0vdJ.js +1670 -0
  6. package/dist/vendor-clone-NGbTzSwJ.js +159 -0
  7. package/dist/vendor-crypto-js-B6Qe-gIg.js +4995 -0
  8. package/dist/vendor-file-saver-DKXzEV2Q.js +74 -0
  9. package/dist/vendor-moment-h96o7c8I.js +2578 -0
  10. package/dist/vendor-pinia-DVLspbiC.js +310 -0
  11. package/dist/vendor-sprintf-js-BPTdvBYM.js +148 -0
  12. package/dist/vendor-state-local-CEworIRt.js +131 -0
  13. package/dist/vendor-underscore-DVTek3G4.js +1070 -0
  14. package/dist/vendor-underscore.string-vrHhfBaT.js +425 -0
  15. package/dist/vendor-util-deprecate-BfbfwJhs.js +28 -0
  16. package/dist/vendor-vue-demi-CIhrFbpB.js +17 -0
  17. package/esm/drivers/IDriver.d.ts +10 -0
  18. package/esm/drivers/cdns/Cdn.d.ts +14 -0
  19. package/esm/drivers/cdns/CdnFactory.d.ts +11 -0
  20. package/esm/drivers/cdns/ICdn.d.ts +34 -0
  21. package/esm/drivers/cdns/implements/BootCdn.d.ts +12 -0
  22. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +13 -0
  23. package/esm/drivers/cdns/implements/LocalCdn.d.ts +12 -0
  24. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +16 -0
  25. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +10 -0
  26. package/esm/drivers/cdns/index.d.ts +0 -0
  27. package/esm/drivers/driver-helper.d.ts +46 -0
  28. package/esm/drivers/encoders/Encoder.d.ts +11 -0
  29. package/esm/drivers/encoders/EncoderFactory.d.ts +16 -0
  30. package/esm/drivers/encoders/IEncoder.d.ts +22 -0
  31. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +11 -0
  32. package/esm/drivers/encoders/index.d.ts +0 -0
  33. package/esm/drivers/excels/ExcelFactory.d.ts +11 -0
  34. package/esm/drivers/excels/IExcel.d.ts +18 -0
  35. package/esm/drivers/excels/implements/XlsxExcel.d.ts +10 -0
  36. package/esm/drivers/excels/index.d.ts +2 -0
  37. package/esm/drivers/explainers/Explainer.d.ts +4 -0
  38. package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -0
  39. package/esm/drivers/explainers/IExplainer.d.ts +3 -0
  40. package/esm/drivers/explainers/implement/JsonExplainer.d.ts +4 -0
  41. package/esm/drivers/explainers/index.d.ts +0 -0
  42. package/esm/drivers/factories/DriverFactory.d.ts +19 -0
  43. package/esm/drivers/factories/Factory.d.ts +8 -0
  44. package/esm/drivers/factories/IFactory.d.ts +10 -0
  45. package/esm/drivers/factories/index.d.ts +2 -0
  46. package/esm/drivers/features/FeatureFactory.d.ts +11 -0
  47. package/esm/drivers/features/IFeature.d.ts +23 -0
  48. package/esm/drivers/features/implements/ExpressionFeature.d.ts +12 -0
  49. package/esm/drivers/features/implements/I18NFeature.d.ts +12 -0
  50. package/esm/drivers/features/implements/SortFeature.d.ts +13 -0
  51. package/esm/drivers/features/index.d.ts +2 -0
  52. package/esm/drivers/hashers/Hasher.d.ts +10 -0
  53. package/esm/drivers/hashers/HasherFactory.d.ts +13 -0
  54. package/esm/drivers/hashers/IHasher.d.ts +19 -0
  55. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +10 -0
  56. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +10 -0
  57. package/esm/drivers/hashers/index.d.ts +2 -0
  58. package/esm/drivers/index.d.ts +10 -0
  59. package/esm/drivers/providers/IProvider.d.ts +47 -0
  60. package/esm/drivers/providers/ProviderFactory.d.ts +11 -0
  61. package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +55 -0
  62. package/esm/drivers/providers/index.d.ts +2 -0
  63. package/esm/drivers/requesters/IRequester.d.ts +21 -0
  64. package/esm/drivers/requesters/Requester.d.ts +12 -0
  65. package/esm/drivers/requesters/RequesterFactory.d.ts +23 -0
  66. package/esm/drivers/requesters/entities/HttpRequest.d.ts +34 -0
  67. package/esm/drivers/requesters/entities/HttpResponse.d.ts +19 -0
  68. package/esm/drivers/requesters/implements/DefaultRequester.d.ts +12 -0
  69. package/esm/drivers/requesters/implements/LocalRequester.d.ts +43 -0
  70. package/esm/drivers/requesters/implements/MkRequester.d.ts +40 -0
  71. package/esm/drivers/requesters/index.d.ts +5 -0
  72. package/esm/drivers/signers/ISigner.d.ts +33 -0
  73. package/esm/drivers/signers/SignerFactory.d.ts +11 -0
  74. package/esm/drivers/signers/implements/DefaultSigner.d.ts +18 -0
  75. package/esm/drivers/signers/index.d.ts +2 -0
  76. package/esm/drivers/ssos/ISso.d.ts +41 -0
  77. package/esm/drivers/ssos/SsoFactory.d.ts +11 -0
  78. package/esm/drivers/ssos/implements/AnonymousSso.d.ts +18 -0
  79. package/esm/drivers/ssos/implements/BearerSso.d.ts +24 -0
  80. package/esm/drivers/ssos/implements/NioSso.d.ts +23 -0
  81. package/esm/drivers/ssos/implements/SecretSso.d.ts +20 -0
  82. package/esm/drivers/ssos/implements/WeiXinSso.d.ts +20 -0
  83. package/esm/drivers/ssos/index.d.ts +2 -0
  84. package/esm/helpers/array-helper.d.ts +97 -0
  85. package/esm/helpers/component-helper.d.ts +10 -0
  86. package/esm/helpers/cookie-helper.d.ts +6 -0
  87. package/esm/helpers/dictionary-helper.d.ts +18 -0
  88. package/esm/helpers/dom-helper.d.ts +86 -0
  89. package/esm/helpers/event-helper.d.ts +30 -0
  90. package/esm/helpers/file-helper.d.ts +22 -0
  91. package/esm/helpers/html-helper.d.ts +10 -0
  92. package/esm/helpers/i18n-helper.d.ts +14 -0
  93. package/esm/helpers/image-helper.d.ts +10 -0
  94. package/esm/helpers/index.d.ts +26 -0
  95. package/esm/helpers/json-helper.d.ts +31 -0
  96. package/esm/helpers/math-helper.d.ts +46 -0
  97. package/esm/helpers/micro-helper.d.ts +10 -0
  98. package/esm/helpers/mount-helper.d.ts +14 -0
  99. package/esm/helpers/object-helper.d.ts +34 -0
  100. package/esm/helpers/script-helper.d.ts +31 -0
  101. package/esm/helpers/scroll-helper.d.ts +14 -0
  102. package/esm/helpers/sign-helper.d.ts +14 -0
  103. package/esm/helpers/storage-helper.d.ts +34 -0
  104. package/esm/helpers/string-helper.d.ts +94 -0
  105. package/esm/helpers/task-helper.d.ts +26 -0
  106. package/esm/helpers/time-helper.d.ts +62 -0
  107. package/esm/helpers/tree-helper.d.ts +54 -0
  108. package/esm/helpers/type-helper.d.ts +26 -0
  109. package/esm/helpers/url-helper.d.ts +96 -0
  110. package/esm/main.d.ts +3 -0
  111. package/esm/services/SettingService.d.ts +5 -0
  112. package/esm/services/index.d.ts +15 -0
  113. package/esm/stores/config.d.ts +59 -0
  114. package/esm/stores/driver.d.ts +41 -0
  115. package/esm/stores/env.d.ts +12 -0
  116. package/esm/stores/index.d.ts +7 -0
  117. package/esm/stores/log.d.ts +20 -0
  118. package/esm/stores/setting.d.ts +47 -0
  119. package/esm/stores/socket.d.ts +27 -0
  120. package/esm/stores/user.d.ts +44 -0
  121. package/esm/thirds/index.d.ts +8 -0
  122. package/esm/vite.config.d.ts +6 -0
  123. package/package.json +52 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * 使用设置仓储
3
+ */
4
+ declare let useSettingStore: import("pinia").StoreDefinition<"setting", {
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
+ requester: import("../drivers").IRequester;
37
+ }, {}, {
38
+ /**
39
+ * 系统初始化
40
+ */
41
+ init(): Promise<void>;
42
+ /**
43
+ * 加载设置
44
+ */
45
+ loadSetting(): Promise<any>;
46
+ }>;
47
+ export default useSettingStore;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * 使用实时通信仓储
3
+ */
4
+ declare let useSocketStore: import("pinia").StoreDefinition<"socket", {
5
+ socket: any;
6
+ connected: any;
7
+ reconnect: boolean;
8
+ handler: any;
9
+ }, {}, {
10
+ /**
11
+ * 登录后,连接Socket
12
+ */
13
+ connect(): Promise<void>;
14
+ /**
15
+ * 订阅并替换Socket事件处理程序
16
+ */
17
+ subscribe(handler?: (event: MessageEvent) => void): void;
18
+ /**
19
+ * 取消订阅Socket事件处理程序,防止内存泄漏
20
+ */
21
+ unsubscribe(): void;
22
+ /**
23
+ * 退出时断开连接
24
+ */
25
+ disconnect(): void;
26
+ }>;
27
+ export default useSocketStore;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * 使用用户仓储
3
+ */
4
+ declare const useUserStore: import("pinia").StoreDefinition<"user", {
5
+ user: any;
6
+ menus: any;
7
+ menusFlat: any;
8
+ debugger: any;
9
+ env: any;
10
+ /**
11
+ * 请求器
12
+ */
13
+ requester: import("../drivers").IRequester;
14
+ }, {}, {
15
+ /**
16
+ * 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
17
+ */
18
+ getSso(): any;
19
+ /**
20
+ * 登录后,获取用户信息
21
+ */
22
+ loadInfo(): Promise<any>;
23
+ /**
24
+ * 通过完整url和请求体,获取授权头
25
+ */
26
+ getAuthorization(url: string, data?: any): Promise<string>;
27
+ /**
28
+ * 未登录,获取匿名登录信息
29
+ */
30
+ getAnonymous(): void;
31
+ /**
32
+ * 根据路径获取路由
33
+ */
34
+ getMenuByUrl(url: string): any;
35
+ /**
36
+ * 加载服务端路由
37
+ */
38
+ loadMenus(): Promise<any>;
39
+ /**
40
+ * 退出登录
41
+ */
42
+ logout(): Promise<any>;
43
+ }>;
44
+ export default useUserStore;
@@ -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,6 @@
1
+ import { UserConfig } from "vite";
2
+ declare const _default: ({ command, mode }: {
3
+ command: any;
4
+ mode: any;
5
+ }) => UserConfig;
6
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "halo-fe",
3
+ "version": "1.0.0",
4
+ "description": "Halo front end sdk",
5
+ "scripts": {
6
+ "halo-fe:tsc": "vue-tsc",
7
+ "halo-fe:build": "vite build",
8
+ "halo-fe:build:debug": "vite build --debug",
9
+ "halo-fe:build:watch": "npx vite build --watch",
10
+ "halo-fe:build:publish": "vue-tsc & npx vite build & npm publish",
11
+ "halo-fe:publish": "npm publish"
12
+ },
13
+ "type": "module",
14
+ "main": "./main.js",
15
+ "types": "./esm/main.d.ts",
16
+ "files": [
17
+ "dist",
18
+ "esm"
19
+ ],
20
+ "keywords": [
21
+ "halo",
22
+ "fe"
23
+ ],
24
+ "author": "jay.zhou <869758965@qq.com>",
25
+ "license": "MIT",
26
+ "publishConfig": {
27
+ "registry": "https://registry.npmjs.org"
28
+ },
29
+ "dependencies": {
30
+ "@monaco-editor/loader": "1.4.0",
31
+ "axios": "1.7.2",
32
+ "clone": "2.1.2",
33
+ "crypto-js": "4.2.0",
34
+ "echarts": "5.5.0",
35
+ "file-saver": "2.0.5",
36
+ "moment": "2.30.1",
37
+ "monaco-editor": "0.49.0",
38
+ "pinia": "2.1.7",
39
+ "underscore": "1.13.6",
40
+ "underscore.string": "3.3.6",
41
+ "vue": "3.4.29",
42
+ "xlsx-js-style": "1.2.0"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "20.14.6",
46
+ "@vitejs/plugin-vue": "5.0.5",
47
+ "@vitejs/plugin-vue-jsx": "4.0.0",
48
+ "sass": "1.77.6",
49
+ "vite": "5.3.1",
50
+ "vue-tsc": "2.0.21"
51
+ }
52
+ }