halo-fe 1.0.9 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. package/dist/assets/@intlify-BISCQg1h.js +2189 -0
  2. package/dist/{vendor-@monaco-editor-DKC4UNw_.js → assets/@monaco-editor-BCDRi0Ti.js} +1 -1
  3. package/dist/assets/@vue-aVYGocXp.js +93 -0
  4. package/dist/assets/clone-DtpAsLoe.js +139 -0
  5. package/dist/{vendor-file-saver-DKXzEV2Q.js → assets/file-saver-Cnua3zoa.js} +1 -1
  6. package/dist/assets/liquidjs-C-LVcoaY.js +2893 -0
  7. package/dist/{vendor-underscore.string-vrHhfBaT.js → assets/underscore.string-oDfap0sE.js} +3 -3
  8. package/dist/{vendor-util-deprecate-BfbfwJhs.js → assets/util-deprecate-BqFawLoO.js} +1 -1
  9. package/dist/assets/vue-i18n-CLr3brPz.js +1670 -0
  10. package/dist/main.js +2383 -1579
  11. package/dist/style.css +1 -1
  12. package/esm/coms/Empty.vue.d.ts +1 -0
  13. package/esm/coms/conditions/Condition.vue.d.ts +12 -0
  14. package/esm/coms/conditions/Index.vue.d.ts +12 -0
  15. package/esm/coms/conditions/index.d.ts +3 -0
  16. package/esm/coms/conditions/types/ConditionGroupProps.d.ts +11 -0
  17. package/esm/coms/conditions/types/ConditionProps.d.ts +18 -0
  18. package/esm/coms/conditions/types/index.d.ts +3 -0
  19. package/esm/coms/{Code.vue.d.ts → controls/Code.vue.d.ts} +11 -3
  20. package/esm/coms/controls/Option.vue.d.ts +2 -0
  21. package/esm/coms/controls/Select.vue.d.ts +2 -0
  22. package/esm/coms/controls/index.d.ts +7 -0
  23. package/esm/coms/{types → controls/types}/CodeEmit.d.ts +1 -1
  24. package/esm/coms/controls/types/CodeProps.d.ts +28 -0
  25. package/esm/coms/controls/types/Range.d.ts +26 -0
  26. package/esm/coms/controls/types/index.d.ts +6 -0
  27. package/esm/coms/index.d.ts +5 -8
  28. package/esm/coms/layouts/index.d.ts +5 -0
  29. package/esm/coms/layouts/types/index.d.ts +2 -0
  30. package/esm/coms/types/index.d.ts +1 -6
  31. package/esm/drivers/bridges/IBridge.d.ts +7 -1
  32. package/esm/drivers/builders/Builder.d.ts +4 -1
  33. package/esm/drivers/builders/BuilderFactory.d.ts +1 -1
  34. package/esm/drivers/builders/IBuilder.d.ts +9 -0
  35. package/esm/drivers/builders/entities/ProviderTable.d.ts +22 -0
  36. package/esm/drivers/builders/entities/index.d.ts +2 -0
  37. package/esm/drivers/builders/implement/JsonBuilder.d.ts +3 -0
  38. package/esm/drivers/builders/implement/MongoBuilder.d.ts +6 -0
  39. package/esm/drivers/builders/implement/MySqlBuilder.d.ts +3 -0
  40. package/esm/drivers/builders/implement/SqlBuilder.d.ts +6 -0
  41. package/esm/drivers/builders/index.d.ts +3 -1
  42. package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
  43. package/esm/drivers/builders/types/index.d.ts +2 -0
  44. package/esm/drivers/cdns/Cdn.d.ts +20 -7
  45. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  46. package/esm/drivers/cdns/ICdn.d.ts +28 -11
  47. package/esm/drivers/cdns/implements/LocalCdn.d.ts +13 -6
  48. package/esm/drivers/cdns/implements/ThirdCdn.d.ts +34 -0
  49. package/esm/drivers/cdns/index.d.ts +2 -1
  50. package/esm/drivers/encoders/Encoder.d.ts +1 -1
  51. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
  52. package/esm/drivers/encoders/IEncoder.d.ts +1 -1
  53. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +2 -1
  54. package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
  55. package/esm/drivers/excels/implements/XlsxExcel.d.ts +1 -0
  56. package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -1
  57. package/esm/drivers/features/FeatureFactory.d.ts +1 -1
  58. package/esm/drivers/hashers/Hasher.d.ts +1 -1
  59. package/esm/drivers/hashers/HasherFactory.d.ts +1 -1
  60. package/esm/drivers/hashers/IHasher.d.ts +1 -1
  61. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +2 -1
  62. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
  63. package/esm/drivers/https/Http.d.ts +2 -2
  64. package/esm/drivers/https/HttpFactory.d.ts +1 -1
  65. package/esm/drivers/https/entities/HttpMessage.d.ts +14 -3
  66. package/esm/drivers/https/entities/HttpRequest.d.ts +6 -2
  67. package/esm/drivers/https/implements/DefaultHttp.d.ts +9 -1
  68. package/esm/drivers/index.d.ts +2 -0
  69. package/esm/{plugins/types → drivers/messengers}/IMessenger.d.ts +2 -1
  70. package/esm/drivers/messengers/Messenger.d.ts +15 -0
  71. package/esm/drivers/messengers/MessengerFactory.d.ts +13 -0
  72. package/esm/drivers/messengers/implement/ConsoleMessenger.d.ts +15 -0
  73. package/esm/drivers/messengers/index.d.ts +4 -0
  74. package/esm/drivers/providers/IProvider.d.ts +6 -2
  75. package/esm/drivers/providers/Provider.d.ts +2 -0
  76. package/esm/drivers/providers/ProviderFactory.d.ts +1 -1
  77. package/esm/drivers/providers/helpers/SqlHelper.d.ts +11 -0
  78. package/esm/drivers/providers/helpers/index.d.ts +2 -0
  79. package/esm/drivers/providers/implements/CookieProvider.d.ts +2 -0
  80. package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -0
  81. package/esm/drivers/providers/implements/StorageProvider.d.ts +3 -9
  82. package/esm/drivers/providers/index.d.ts +1 -0
  83. package/esm/drivers/signers/SignerFactory.d.ts +1 -1
  84. package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
  85. package/esm/drivers/tasks/ITask.d.ts +5 -0
  86. package/esm/drivers/tasks/Task.d.ts +1 -0
  87. package/esm/drivers/tasks/TaskFactory.d.ts +1 -1
  88. package/esm/drivers/tasks/implement/MemoryTask.d.ts +15 -0
  89. package/esm/drivers/templates/ITemplate.d.ts +11 -0
  90. package/esm/drivers/templates/Template.d.ts +6 -0
  91. package/esm/drivers/templates/TemplateFactory.d.ts +9 -0
  92. package/esm/drivers/templates/implement/LiquidTemplate.d.ts +6 -0
  93. package/esm/drivers/templates/index.d.ts +3 -0
  94. package/esm/drivers/videos/VideoFactory.d.ts +1 -1
  95. package/esm/drivers/voices/VoiceFactory.d.ts +1 -1
  96. package/esm/factorying/Factories.d.ts +27 -13
  97. package/esm/factorying/Factory.d.ts +16 -8
  98. package/esm/factorying/IFactory.d.ts +6 -6
  99. package/esm/factorying/index.d.ts +12 -3
  100. package/esm/helpers/DictionaryHelper.d.ts +3 -1
  101. package/esm/helpers/DomHelper.d.ts +24 -3
  102. package/esm/helpers/JsonHelper.d.ts +18 -10
  103. package/esm/helpers/ObjectHelper.d.ts +7 -3
  104. package/esm/helpers/TreeHelper.d.ts +1 -1
  105. package/esm/helpers/index.d.ts +1 -2
  106. package/esm/helpers/types/JsonConfig.d.ts +10 -0
  107. package/esm/helpers/types/TreeNodeProp.d.ts +3 -0
  108. package/esm/helpers/types/index.d.ts +2 -1
  109. package/esm/main.d.ts +2 -2
  110. package/esm/plugins/index.d.ts +0 -1
  111. package/esm/svcs/ISvc.d.ts +2 -1
  112. package/esm/svcs/Svc.d.ts +1 -0
  113. package/esm/svcs/SvcFactory.d.ts +4 -1
  114. package/esm/svcs/implement/ConfigSvc.d.ts +4 -0
  115. package/esm/svcs/implement/I18nSvc.d.ts +83 -0
  116. package/esm/svcs/implement/SettingSvc.d.ts +4 -0
  117. package/esm/svcs/implement/index.d.ts +2 -0
  118. package/esm/svcs/index.d.ts +14 -1
  119. package/esm/types/CreateFeOptions.d.ts +24 -0
  120. package/esm/types/{CreateOptions.d.ts → CreatePcOptions.d.ts} +2 -5
  121. package/esm/types/index.d.ts +3 -2
  122. package/esm/utilities/EventUtility.d.ts +11 -0
  123. package/esm/utilities/types/DragOptions.d.ts +2 -2
  124. package/esm/utilities/types/Rect.d.ts +4 -0
  125. package/esm/utilities/types/index.d.ts +2 -2
  126. package/package.json +16 -12
  127. package/dist/vendor-clone-NGbTzSwJ.js +0 -159
  128. package/dist/vendor-crypto-js-DWn5nTKL.js +0 -4997
  129. package/dist/vendor-xlsx-js-style-DMPNZPOx.js +0 -11862
  130. package/esm/coms/types/CodeProps.d.ts +0 -18
  131. package/esm/drivers/IDisposable.d.ts +0 -10
  132. package/esm/drivers/IDriver.d.ts +0 -10
  133. package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
  134. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -13
  135. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -16
  136. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -10
  137. package/esm/drivers/driver-helper.d.ts +0 -46
  138. package/esm/drivers/factories/DriverFactory.d.ts +0 -64
  139. package/esm/drivers/factories/Factories.d.ts +0 -55
  140. package/esm/drivers/factories/Factory.d.ts +0 -25
  141. package/esm/drivers/factories/IFactory.d.ts +0 -18
  142. package/esm/drivers/factories/implement/CdnFactory.d.ts +0 -13
  143. package/esm/drivers/factories/implement/EncoderFactory.d.ts +0 -17
  144. package/esm/drivers/factories/implement/ExcelFactory.d.ts +0 -13
  145. package/esm/drivers/factories/implement/ExplainerFactory.d.ts +0 -6
  146. package/esm/drivers/factories/implement/FeatureFactory.d.ts +0 -13
  147. package/esm/drivers/factories/implement/HasherFactory.d.ts +0 -11
  148. package/esm/drivers/factories/implement/HttpFactory.d.ts +0 -18
  149. package/esm/drivers/factories/implement/ProviderFactory.d.ts +0 -18
  150. package/esm/drivers/factories/implement/SignerFactory.d.ts +0 -13
  151. package/esm/drivers/factories/implement/SsoFactory.d.ts +0 -17
  152. package/esm/drivers/factories/implement/TaskFactory.d.ts +0 -9
  153. package/esm/drivers/factories/implement/VideoFactory.d.ts +0 -3
  154. package/esm/drivers/factories/implement/VoiceFactory.d.ts +0 -6
  155. package/esm/drivers/factories/implement/index.d.ts +0 -11
  156. package/esm/drivers/factories/index.d.ts +0 -21
  157. package/esm/drivers/providers/implements/StorageHelper.d.ts +0 -34
  158. package/esm/drivers/requesters/IRequester.d.ts +0 -25
  159. package/esm/drivers/requesters/Requester.d.ts +0 -13
  160. package/esm/drivers/requesters/RequesterFactory.d.ts +0 -21
  161. package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
  162. package/esm/drivers/requesters/entities/HttpResponse.d.ts +0 -19
  163. package/esm/drivers/requesters/implements/DefaultRequester.d.ts +0 -12
  164. package/esm/drivers/requesters/implements/LocalRequester.d.ts +0 -43
  165. package/esm/drivers/requesters/implements/MkRequester.d.ts +0 -40
  166. package/esm/drivers/requesters/index.d.ts +0 -5
  167. package/esm/factories/Factories.d.ts +0 -55
  168. package/esm/factories/Factory.d.ts +0 -38
  169. package/esm/factories/IFactory.d.ts +0 -27
  170. package/esm/factories/index.d.ts +0 -26
  171. package/esm/helpers/ScriptHelper.d.ts +0 -31
  172. package/esm/helpers/array-helper.d.ts +0 -97
  173. package/esm/helpers/component-helper.d.ts +0 -10
  174. package/esm/helpers/cookie-helper.d.ts +0 -6
  175. package/esm/helpers/dictionary-helper.d.ts +0 -18
  176. package/esm/helpers/dom-helper.d.ts +0 -86
  177. package/esm/helpers/event-helper.d.ts +0 -30
  178. package/esm/helpers/file-helper.d.ts +0 -22
  179. package/esm/helpers/html-helper.d.ts +0 -10
  180. package/esm/helpers/i18n-helper.d.ts +0 -14
  181. package/esm/helpers/image-helper.d.ts +0 -10
  182. package/esm/helpers/json-helper.d.ts +0 -31
  183. package/esm/helpers/math-helper.d.ts +0 -46
  184. package/esm/helpers/micro-helper.d.ts +0 -10
  185. package/esm/helpers/mount-helper.d.ts +0 -14
  186. package/esm/helpers/object-helper.d.ts +0 -34
  187. package/esm/helpers/script-helper.d.ts +0 -31
  188. package/esm/helpers/scroll-helper.d.ts +0 -14
  189. package/esm/helpers/sign-helper.d.ts +0 -14
  190. package/esm/helpers/storage-helper.d.ts +0 -34
  191. package/esm/helpers/string-helper.d.ts +0 -94
  192. package/esm/helpers/task-helper.d.ts +0 -26
  193. package/esm/helpers/time-helper.d.ts +0 -62
  194. package/esm/helpers/tree-helper.d.ts +0 -54
  195. package/esm/helpers/type-helper.d.ts +0 -26
  196. package/esm/helpers/url-helper.d.ts +0 -96
  197. package/esm/plugins/types/IMessager.d.ts +0 -34
  198. package/esm/plugins/types/index.d.ts +0 -10
  199. package/esm/services/SettingService.d.ts +0 -5
  200. package/esm/services/index.d.ts +0 -15
  201. package/esm/servs/IServ.d.ts +0 -6
  202. package/esm/servs/Serv.d.ts +0 -4
  203. package/esm/servs/ServFactory.d.ts +0 -11
  204. package/esm/servs/implement/ConfigServ.d.ts +0 -66
  205. package/esm/servs/implement/DriverServ.d.ts +0 -36
  206. package/esm/servs/implement/EnvServ.d.ts +0 -14
  207. package/esm/servs/implement/LogServ.d.ts +0 -19
  208. package/esm/servs/implement/SettingServ.d.ts +0 -42
  209. package/esm/servs/implement/SocketServ.d.ts +0 -38
  210. package/esm/servs/implement/UserServ.d.ts +0 -47
  211. package/esm/servs/index.d.ts +0 -15
  212. package/esm/stores/config.d.ts +0 -59
  213. package/esm/stores/driver.d.ts +0 -41
  214. package/esm/stores/env.d.ts +0 -12
  215. package/esm/stores/index.d.ts +0 -7
  216. package/esm/stores/log.d.ts +0 -20
  217. package/esm/stores/setting.d.ts +0 -47
  218. package/esm/stores/socket.d.ts +0 -27
  219. package/esm/stores/user.d.ts +0 -44
  220. package/esm/svcs/proxies/driverSvc.d.ts +0 -18
  221. package/esm/svcs/proxies/index.d.ts +0 -2
  222. package/esm/thirds/index.d.ts +0 -8
  223. package/esm/vite.config.d.ts +0 -6
  224. /package/dist/{vendor-moment-h96o7c8I.js → assets/moment-h96o7c8I.js} +0 -0
  225. /package/dist/{vendor-sprintf-js-BPTdvBYM.js → assets/sprintf-js-BPTdvBYM.js} +0 -0
  226. /package/dist/{vendor-state-local-CEworIRt.js → assets/state-local-CEworIRt.js} +0 -0
  227. /package/dist/{vendor-underscore-B0BCaBxV.js → assets/underscore-B0BCaBxV.js} +0 -0
  228. /package/esm/coms/{Compare.vue.d.ts → controls/Compare.vue.d.ts} +0 -0
  229. /package/esm/coms/{RichText.vue.d.ts → controls/RichText.vue.d.ts} +0 -0
  230. /package/esm/coms/{types → controls/types}/RichTextOptions.d.ts +0 -0
  231. /package/esm/coms/{types → controls/types}/RichTextProps.d.ts +0 -0
  232. /package/esm/coms/{Col.vue.d.ts → layouts/Col.vue.d.ts} +0 -0
  233. /package/esm/coms/{Container.vue.d.ts → layouts/Container.vue.d.ts} +0 -0
  234. /package/esm/coms/{Row.vue.d.ts → layouts/Row.vue.d.ts} +0 -0
  235. /package/esm/coms/{types → layouts/types}/RowProps.d.ts +0 -0
@@ -4,17 +4,17 @@ import { Ref } from "../plugins";
4
4
  */
5
5
  interface IFactory<T> {
6
6
  /**
7
- * 开启工厂
7
+ * 当前驱动所有实例
8
8
  */
9
- open(): void;
9
+ get instances(): T[];
10
10
  /**
11
- * 获取当前驱动所有实例
11
+ * 开启工厂
12
12
  */
13
- getInstances(): T[];
13
+ open(): void;
14
14
  /**
15
15
  * 创建指定类型的实例
16
16
  */
17
- create(type: string, conn?: string): Promise<T>;
17
+ create(type: string): Promise<T>;
18
18
  /**
19
19
  * 根据主键创建驱动,并返回加载后的驱动信息
20
20
  */
@@ -22,6 +22,6 @@ interface IFactory<T> {
22
22
  /**
23
23
  * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
24
24
  */
25
- createIfAbsent(name: string, type: string, open?: (entity: T) => void): Promise<T>;
25
+ createIfAbsent(name: string, type: string, open?: (entity: T) => Promise<void>): Promise<T>;
26
26
  }
27
27
  export default IFactory;
@@ -1,9 +1,14 @@
1
1
  import Factories from "./Factories";
2
- import { IEncoder, IHasher, IHttp, IProvider } from "../drivers";
2
+ import { ICdn, IEncoder, IHasher, IHttp, IMessenger, IProvider } from "../drivers";
3
+ import { CreateFeOptions } from "../types";
3
4
  /**
4
5
  * 默认base64编码
5
6
  */
6
7
  declare let base64: IEncoder;
8
+ /**
9
+ * CDN加载器
10
+ */
11
+ declare let cdn: ICdn;
7
12
  /**
8
13
  * 默认Http请求对象
9
14
  */
@@ -16,8 +21,12 @@ declare let md5: IHasher;
16
21
  * 默认Storage
17
22
  */
18
23
  declare let storage: IProvider;
24
+ /**
25
+ * 初始化消息对象,保证后续更新能够被同步更新
26
+ */
27
+ declare let messenger: IMessenger;
19
28
  /**
20
29
  * 初始化默认驱动实例
21
30
  */
22
- declare let initDriver: () => Promise<void>;
23
- export { base64, http, md5, storage, initDriver, Factories };
31
+ declare let initDriver: (options: CreateFeOptions) => Promise<void>;
32
+ export { base64, cdn, http, md5, storage, messenger, initDriver, Factories };
@@ -5,7 +5,9 @@ declare class DictionaryHelper {
5
5
  /**
6
6
  * 从指定字典中提取忽略大小写的key的值
7
7
  */
8
- static getValueIgnoreCase(key: string, value: object): string;
8
+ static getValueIgnoreCase<T>(key: string, value: {
9
+ [key: string]: T;
10
+ }): T;
9
11
  /**
10
12
  * 对字典进行排序,并得到新字典
11
13
  */
@@ -22,7 +22,7 @@ declare class DomHelper {
22
22
  /**
23
23
  * 根据计算后的样式进行DOM过滤
24
24
  */
25
- static filterStyle(doms: any[], fun: (style: CSSStyleDeclaration) => boolean): any[];
25
+ static filterStyle(doms: HTMLElement[], fn: (style: CSSStyleDeclaration) => boolean): HTMLElement[];
26
26
  /**
27
27
  * 添加样式
28
28
  */
@@ -34,11 +34,11 @@ declare class DomHelper {
34
34
  /**
35
35
  * 查找指定父节点
36
36
  */
37
- static parentUntil(dom: any, cls: string): any;
37
+ static parentUntil(dom: HTMLElement, cls: string): HTMLElement;
38
38
  /**
39
39
  * 查找第一个绝对定位的元素或backdrop元素,否则使用html元素
40
40
  */
41
- static parentAbsolute(dom: any): any;
41
+ static parentAbsolute(dom: HTMLElement): HTMLElement;
42
42
  /**
43
43
  * 查找孩子节点
44
44
  */
@@ -83,6 +83,27 @@ declare class DomHelper {
83
83
  * 不存在时创建dom,并自动追加到文档
84
84
  */
85
85
  static createIfAbsent(name: string, cls: string, html?: string): HTMLElement;
86
+ /**
87
+ * 根据路径获取标签(无src)
88
+ */
89
+ static createEmptyByUrl: (url: string) => HTMLElement;
90
+ /**
91
+ * 根据路径获取待加载的元素,同时包含Url
92
+ */
93
+ static createByUrl: (url: string) => HTMLElement;
94
+ /**
95
+ * 根据路径获取元素
96
+ * VIP:已废弃,不能用改方法判断资源是否加载完毕,因为可能只是脚本创建,资源还未加载完毕
97
+ */
98
+ static getByUrl: (url: string) => HTMLElement;
99
+ /**
100
+ * 获取行内标签,如: style(非link)
101
+ */
102
+ static getInlineTagByUrl(url: string): string;
103
+ /**
104
+ * 获取资源标签,如: link
105
+ */
106
+ static getTagByUrl(url: string): string;
86
107
  /**
87
108
  * 获取文本宽度
88
109
  */
@@ -1,24 +1,20 @@
1
- import { TreeNodeProp } from "./types";
1
+ import { JsonConfig, TreeNodeProp } from "./types";
2
2
  /**
3
3
  * JSON帮助类
4
4
  */
5
5
  declare class JsonHelper {
6
- /**
7
- * 把字符串格式化为Json字符串
8
- */
9
- static stringify(value: any): string;
10
6
  /**
11
7
  * 对非字符串进行序列化
12
8
  */
13
- static stringifyWithString(value: any): string;
9
+ static serializeWithoutString(value: any): string;
14
10
  /**
15
- * 把字符串格式化为Json字符串
11
+ * 把对象格式化为Json字符串
16
12
  */
17
- static stringifyString(value: string): string;
13
+ static serialize(value: any, config?: boolean | JsonConfig): string;
18
14
  /**
19
15
  * 反序列化成json对象
20
16
  */
21
- static parse(value: string): any;
17
+ static deserialize(value: string): any;
22
18
  /**
23
19
  * 根据props中的.自动分割得到属性值
24
20
  */
@@ -30,6 +26,18 @@ declare class JsonHelper {
30
26
  /**
31
27
  * 从树集合构建出Json对象
32
28
  */
33
- static buildObject(tree: any[], childProp: string, fun: (node: any) => TreeNodeProp): string;
29
+ static buildObject(tree: any[], childProp: string, fn: (node: any) => TreeNodeProp): string;
30
+ /**
31
+ * 从开始层级开始构建Json字符串
32
+ */
33
+ private static buildObjectLevel;
34
+ /**
35
+ * 填充指定长度的字符串
36
+ */
37
+ private static fillSpace;
38
+ /**
39
+ * 填充指定长度的字符串
40
+ */
41
+ private static fillKey;
34
42
  }
35
43
  export default JsonHelper;
@@ -9,11 +9,15 @@ declare class ObjectHelper {
9
9
  /**
10
10
  * 过滤key,并输出新对象
11
11
  */
12
- static filter(input: object, filter: (n: any) => boolean, valueHandler: (n: any) => {}): any[];
12
+ static filter(input: object, filter: (n: any) => boolean, valueFn: (n: any) => {}): any[];
13
+ /**
14
+ * 提取部分属性,并得到新对象
15
+ */
16
+ static extract(value: object, keys: string[]): any;
13
17
  /**
14
18
  * 把数组转换成对象
15
19
  */
16
- static toObject(array: any[], keySelector: (n: any) => string, valueSelector: (n: any) => string): {};
20
+ static toObject(array: any[], keyFn: (n: any) => string, valueFn: (n: any) => string): any;
17
21
  /**
18
22
  * 手动复制,并对字段执行指定自定义处理
19
23
  */
@@ -27,7 +31,7 @@ declare class ObjectHelper {
27
31
  */
28
32
  static mergeTo: (target: any, from: any) => any;
29
33
  /**
30
- * 给对象添加属性集合,并赋值
34
+ * 给对象添加多层属性,并赋值
31
35
  */
32
36
  static addProperties: (obj: object, keys: string[], value: string) => void;
33
37
  /**
@@ -49,6 +49,6 @@ declare class TreeHelper {
49
49
  /**
50
50
  * 对树结点的数据进行重新映射,映射得到新的Tree数组
51
51
  */
52
- static map: (tree: any[], prevChildProp: string, childProp: string, fun: Function) => any[];
52
+ static map: (tree: any[], prevChildProp: string, childProp: string, fn: Function) => any[];
53
53
  }
54
54
  export default TreeHelper;
@@ -11,7 +11,6 @@ import MicroHelper from "./MicroHelper";
11
11
  import MountHelper from "./MountHelper";
12
12
  import ObjectHelper from "./ObjectHelper";
13
13
  import StringHelper from "./StringHelper";
14
- import ScriptHelper from "./ScriptHelper";
15
14
  import TaskHelper from "./TaskHelper";
16
15
  import TypeHelper from "./TypeHelper";
17
16
  import TimeHelper from "./TimeHelper";
@@ -21,4 +20,4 @@ import JsonHelper from "./JsonHelper";
21
20
  import BrowserHelper from "./BrowserHelper";
22
21
  import UrlHelper from "./UrlHelper";
23
22
  import SignHelper from "./SignHelper";
24
- export { ComponentHelper, ArrayHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, ScriptHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
23
+ export { ComponentHelper, ArrayHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Json配置
3
+ */
4
+ declare class JsonConfig {
5
+ /**
6
+ * 是否美化
7
+ */
8
+ beautify: boolean;
9
+ }
10
+ export default JsonConfig;
@@ -1,3 +1,6 @@
1
+ /**
2
+ * 树节点属性
3
+ */
1
4
  interface TreeNodeProp {
2
5
  key: string;
3
6
  type: string;
@@ -1,2 +1,3 @@
1
+ import JsonConfig from "./JsonConfig";
1
2
  import TreeNodeProp from "./TreeNodeProp";
2
- export { TreeNodeProp };
3
+ export { JsonConfig, type TreeNodeProp };
package/esm/main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IMessenger } from "./plugins";
1
+ import { CreateFeOptions } from "./types";
2
2
  import "./styles/index.scss";
3
3
  export * from "./coms";
4
4
  export * from "./drivers";
@@ -12,5 +12,5 @@ export * from "./utilities";
12
12
  /**
13
13
  * 初始化前端基础框架
14
14
  */
15
- declare let createFe: (messenger: IMessenger) => Promise<void>;
15
+ declare let createFe: (options?: CreateFeOptions) => Promise<void>;
16
16
  export { createFe };
@@ -6,5 +6,4 @@ import Ref from "./Ref";
6
6
  * 异步加载echarts
7
7
  */
8
8
  declare let loadEcharts: () => Promise<unknown>;
9
- export * from "./types";
10
9
  export { loader, Monaco, moment, loadEcharts, Ref };
@@ -1,6 +1,7 @@
1
+ import { IDriver } from "../drivers";
1
2
  /**
2
3
  * 服务接口
3
4
  */
4
- interface ISvc {
5
+ interface ISvc extends IDriver {
5
6
  }
6
7
  export default ISvc;
package/esm/svcs/Svc.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import ISvc from "./ISvc";
2
2
  declare abstract class Svc implements ISvc {
3
+ abstract type: string;
3
4
  }
4
5
  export default Svc;
@@ -1,7 +1,10 @@
1
+ import Factory from "../factorying/Factory";
2
+ import ISvc from "./ISvc";
1
3
  /**
2
4
  * 服务工厂类
3
5
  */
4
- declare class SvcFactory {
6
+ declare class SvcFactory extends Factory<ISvc> {
7
+ get instances(): ISvc[];
5
8
  static(): void;
6
9
  /**
7
10
  * 获取路由服务
@@ -22,6 +22,10 @@ declare class ConfigSvc {
22
22
  * 字体
23
23
  */
24
24
  font: string;
25
+ /**
26
+ * 默认cdn
27
+ */
28
+ cdn: string;
25
29
  /**
26
30
  * 文件布局方式
27
31
  */
@@ -0,0 +1,83 @@
1
+ /**
2
+ * 多语言服务基类
3
+ */
4
+ declare class I18nSvc {
5
+ /**
6
+ * 多语言处理实体
7
+ */
8
+ i18n: any;
9
+ /**
10
+ * 记录加载过的语言包,防止重复加载
11
+ */
12
+ loadedLocales: string[];
13
+ /**
14
+ * 只实例化一次
15
+ */
16
+ constructor();
17
+ /**
18
+ * 翻译指定key,不存在使用默认值
19
+ */
20
+ t(key: string, params?: any, display?: string): any;
21
+ /**
22
+ * 判断指定key是否存在
23
+ */
24
+ t_exists(key: any): any;
25
+ /**
26
+ * 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
27
+ */
28
+ t_menu(key: string): any;
29
+ /**
30
+ * 模块业务翻译
31
+ */
32
+ t_module(type: string, key: string): string;
33
+ /**
34
+ * 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
35
+ */
36
+ t_table(table: string): any;
37
+ /**
38
+ * 业务翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
39
+ * 注意:如果结果返回未完毕},则vue编译异常
40
+ */
41
+ t_field(table: string, field: string): any;
42
+ /**
43
+ * 枚举翻译:菜单多余言、多个窗口的多语言同时切换,而不用重载接口
44
+ */
45
+ t_enum(name: string, value: string): any;
46
+ /**
47
+ * 字段占位符翻译
48
+ */
49
+ t_field_placeholder(table: string, field: string): any;
50
+ /**
51
+ * 字段占位符翻译
52
+ */
53
+ t_field_choose_placeholder(table: string, field: string): any;
54
+ /**
55
+ * 系统翻译
56
+ */
57
+ t_sys(key: string): any;
58
+ /**
59
+ * 系统标题
60
+ */
61
+ t_title(): any;
62
+ /**
63
+ * 根据key设置多语言标题
64
+ */
65
+ setI18nTitle: (key: string) => void;
66
+ /**
67
+ * 设置标题
68
+ */
69
+ setTitle: (title?: string, env?: string) => void;
70
+ /**
71
+ * 添加多语言包
72
+ */
73
+ addMessages(messages: object): void;
74
+ /**
75
+ * 加载语言包
76
+ */
77
+ loadI18n(lang: string): Promise<void>;
78
+ /**
79
+ * 切换语言,自动加载菜单
80
+ */
81
+ switchI18n(lang: string): Promise<void>;
82
+ }
83
+ export default I18nSvc;
@@ -32,6 +32,10 @@ declare class SettingSvc {
32
32
  * 本地化语言集合
33
33
  */
34
34
  locales: any[];
35
+ /**
36
+ * CDN类型集合
37
+ */
38
+ cdns: any[];
35
39
  fonts: any;
36
40
  /**
37
41
  * SSO信息
@@ -0,0 +1,2 @@
1
+ import I18nSvc from "./I18nSvc";
2
+ export { I18nSvc };
@@ -1,9 +1,11 @@
1
+ import { I18nSvc } from "./implement";
1
2
  import ConfigSvc from "./implement/ConfigSvc";
2
3
  import EnvSvc from "./implement/EnvSvc";
3
4
  import LogSvc from "./implement/LogSvc";
4
5
  import SocketSvc from "./implement/SocketSvc";
5
6
  import UserSvc from "./implement/UserSvc";
6
7
  import SvcFactory from "./SvcFactory";
8
+ import { CreateFeOptions } from "../types";
7
9
  /**
8
10
  * 驱动服务实例
9
11
  */
@@ -26,6 +28,7 @@ declare let driverSvc: {
26
28
  loadEnvs: (reload?: boolean) => Promise<void>;
27
29
  };
28
30
  declare let envSvc: EnvSvc;
31
+ declare let i18nSvc: I18nSvc;
29
32
  declare let logSvc: LogSvc;
30
33
  declare let settingSvc: {
31
34
  loaded: boolean;
@@ -40,6 +43,7 @@ declare let settingSvc: {
40
43
  layouts: any[];
41
44
  backgrounds: any[];
42
45
  locales: any[];
46
+ cdns: any[];
43
47
  fonts: any;
44
48
  ssos: any[];
45
49
  size: string;
@@ -55,4 +59,13 @@ declare let settingSvc: {
55
59
  };
56
60
  declare let socketSvc: SocketSvc;
57
61
  declare let userSvc: UserSvc;
58
- export { configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc, SvcFactory };
62
+ /**
63
+ * 初始化服务
64
+ */
65
+ declare let initSvc: (options: CreateFeOptions) => Promise<void>;
66
+ export * from "./implement";
67
+ /**
68
+ * 提取可导出的翻译方法,当i18nSvc实例变化后,导出的方案会跟着变化?
69
+ */
70
+ declare let t: (key: string, params?: any, display?: string) => any, t_exists: (key: any) => any, t_sys: (key: string) => any, t_enum: (name: string, value: string) => any, t_field: (table: string, field: string) => any, t_field_choose_placeholder: (table: string, field: string) => any, t_field_placeholder: (table: string, field: string) => any, t_table: (table: string) => any, t_module: (type: string, key: string) => string, t_menu: (key: string) => any;
71
+ export { initSvc, configSvc, driverSvc, envSvc, i18nSvc, logSvc, settingSvc, socketSvc, userSvc, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu, SvcFactory };
@@ -0,0 +1,24 @@
1
+ import { IMessenger } from "../drivers";
2
+ import I18nSvc from "../svcs/implement/I18nSvc";
3
+ /**
4
+ * 初始化选项
5
+ */
6
+ declare class CreateFeOptions {
7
+ /**
8
+ * 消息发送对象
9
+ */
10
+ messenger: IMessenger;
11
+ /**
12
+ * 实际的多语言翻译服务实体
13
+ */
14
+ i18nSvc: I18nSvc;
15
+ /**
16
+ * 基准请求地址
17
+ */
18
+ baseUrl: string;
19
+ /**
20
+ * CDN类型
21
+ */
22
+ cdn: string;
23
+ }
24
+ export default CreateFeOptions;
@@ -1,7 +1,4 @@
1
- /**
2
- * 初始化选项
3
- */
4
- declare interface CreateOptions {
1
+ declare class CreatePcOptions {
5
2
  /**
6
3
  * 前端环境变量
7
4
  */
@@ -15,4 +12,4 @@ declare interface CreateOptions {
15
12
  */
16
13
  lang: any;
17
14
  }
18
- export default CreateOptions;
15
+ export default CreatePcOptions;
@@ -1,2 +1,3 @@
1
- import CreateOptions from "./CreateOptions";
2
- export { type CreateOptions };
1
+ import CreateFeOptions from "./CreateFeOptions";
2
+ import CreatePcOptions from "./CreatePcOptions";
3
+ export { CreateFeOptions, CreatePcOptions };
@@ -49,6 +49,17 @@ declare class EventUtility {
49
49
  * 事件防抖: time ms没重复触发才执行指定操作
50
50
  */
51
51
  debounce: (func: (args: any) => void, time: number, args?: any) => void;
52
+ dispatchElement: HTMLElement;
53
+ /**
54
+ * 创建分发事件元素
55
+ */
56
+ createDispatch: (id: string, name: string, handler: (e: Event) => void) => void;
57
+ /**
58
+ * 分发事件,并传递参数
59
+ */
60
+ dispatch(name: string, data: {
61
+ [key: string]: string;
62
+ }): void;
52
63
  /**
53
64
  * 事件节流: 指定时间段内只第一次操作被触发
54
65
  */
@@ -1,4 +1,4 @@
1
- import Range from "./Range";
1
+ import Rect from "./Rect";
2
2
  import DragEvent from "./DragEvent";
3
3
  /**
4
4
  * 拖拽选项
@@ -19,7 +19,7 @@ interface DragOptions {
19
19
  /**
20
20
  * 可拖拽范围
21
21
  */
22
- range?: Range;
22
+ range?: Rect;
23
23
  /**
24
24
  * 吸附检测的距离,设置吸附位置必须设置拖拽范围(依赖宽度等信息)
25
25
  */
@@ -1,6 +1,10 @@
1
1
  import Position from "./Position";
2
+ /**
3
+ * 区域类
4
+ */
2
5
  declare class Rect extends Position {
3
6
  width: number;
4
7
  height: number;
8
+ constructor(x: number, y: number, width: number, height: number);
5
9
  }
6
10
  export default Rect;
@@ -1,5 +1,5 @@
1
1
  import DragOptions from "./DragOptions";
2
2
  import DragEvent from "./DragEvent";
3
3
  import Position from "./Position";
4
- import Range from "./Range";
5
- export { type DragOptions, DragEvent, Position, Range };
4
+ import Rect from "./Rect";
5
+ export { type DragOptions, DragEvent, Position, Rect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",
@@ -13,7 +13,7 @@
13
13
  "halo-fe:publish": "npm publish"
14
14
  },
15
15
  "type": "module",
16
- "module": "./dist/main.js",
16
+ "module": "./dist/main.ts",
17
17
  "types": "./esm/main.d.ts",
18
18
  "files": [
19
19
  "dist",
@@ -28,26 +28,30 @@
28
28
  "publishConfig": {
29
29
  "registry": "https://registry.npmjs.org"
30
30
  },
31
+ "peerDependencies": {
32
+ "vue": "3.4.37",
33
+ "vue-i18n": "9.13.1"
34
+ },
31
35
  "dependencies": {
32
36
  "@monaco-editor/loader": "1.4.0",
33
37
  "clone": "2.1.2",
34
- "crypto-js": "4.2.0",
35
38
  "echarts": "5.5.1",
36
39
  "file-saver": "2.0.5",
40
+ "liquidjs": "10.16.1",
37
41
  "moment": "2.30.1",
38
42
  "monaco-editor": "0.50.0",
39
- "quill": "2.0.2",
40
43
  "underscore": "1.13.7",
41
- "underscore.string": "3.3.6",
42
- "vue": "3.4.34",
43
- "xlsx-js-style": "1.2.0"
44
+ "underscore.string": "3.3.6"
44
45
  },
45
46
  "devDependencies": {
46
- "@types/node": "22.0.0",
47
- "@vitejs/plugin-vue": "5.1.1",
48
- "@vitejs/plugin-vue-jsx": "4.0.0",
47
+ "@types/node": "22.3.0",
48
+ "@vitejs/plugin-vue": "5.1.2",
49
+ "@vitejs/plugin-vue-jsx": "4.0.1",
50
+ "crypto-js": "4.2.0",
51
+ "quill": "2.0.2",
49
52
  "sass": "1.77.8",
50
- "vite": "5.3.5",
51
- "vue-tsc": "2.0.29"
53
+ "vite": "5.4.0",
54
+ "vue-tsc": "2.0.29",
55
+ "xlsx-js-style": "1.2.0"
52
56
  }
53
57
  }