halo-fe 1.0.24 → 1.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/dist/main.js +3604 -3524
  2. package/dist/style.css +1 -1
  3. package/esm/@types/CreateFeOptions.d.ts +4 -0
  4. package/esm/coms/@types/SocketProgressProps.d.ts +23 -0
  5. package/esm/coms/@types/TabProps.d.ts +11 -0
  6. package/esm/coms/@types/TableProps.d.ts +22 -0
  7. package/esm/coms/@types/index.d.ts +4 -1
  8. package/esm/coms/Empty.vue.d.ts +12 -10
  9. package/esm/coms/Fill.vue.d.ts +8 -10
  10. package/esm/coms/Scroller.vue.d.ts +11 -13
  11. package/esm/coms/Timer.vue.d.ts +7 -9
  12. package/esm/coms/cards/Index.vue.d.ts +16 -0
  13. package/esm/coms/cards/index.d.ts +2 -0
  14. package/esm/coms/conditions/Condition.vue.d.ts +1 -1
  15. package/esm/coms/conditions/Index.vue.d.ts +1 -1
  16. package/esm/coms/controls/Code.vue.d.ts +4 -6
  17. package/esm/coms/controls/Compare.vue.d.ts +16 -8
  18. package/esm/coms/controls/Input.vue.d.ts +2 -0
  19. package/esm/coms/controls/Option.vue.d.ts +1 -1
  20. package/esm/coms/controls/RichText.vue.d.ts +2 -4
  21. package/esm/coms/controls/Select.vue.d.ts +1 -1
  22. package/esm/coms/controls/index.d.ts +2 -1
  23. package/esm/coms/index.d.ts +1 -0
  24. package/esm/coms/layouts/Col.vue.d.ts +6 -8
  25. package/esm/coms/layouts/Container.vue.d.ts +12 -11
  26. package/esm/coms/layouts/Desc.vue.d.ts +2 -0
  27. package/esm/coms/layouts/Row.vue.d.ts +6 -8
  28. package/esm/coms/pagers/Index.vue.d.ts +2 -0
  29. package/esm/coms/pagers/index.d.ts +2 -0
  30. package/esm/coms/progresses/Index.vue.d.ts +6 -0
  31. package/esm/coms/progresses/SocketProgress.vue.d.ts +7 -9
  32. package/esm/coms/progresses/index.d.ts +1 -1
  33. package/esm/coms/tables/Index.vue.d.ts +14 -0
  34. package/esm/coms/tabs/Tab.vue.d.ts +2 -2
  35. package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
  36. package/esm/drivers/cdns/Cdn.d.ts +6 -8
  37. package/esm/drivers/cdns/ICdn.d.ts +0 -5
  38. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -0
  39. package/esm/drivers/encoders/implement/UrlEncoder.d.ts +7 -0
  40. package/esm/drivers/https/Http.d.ts +13 -2
  41. package/esm/drivers/https/IHttp.d.ts +4 -0
  42. package/esm/drivers/https/entities/HttpModel.d.ts +12 -0
  43. package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -1
  44. package/esm/drivers/https/implements/HaloHttp.d.ts +1 -9
  45. package/esm/drivers/https/implements/MkHttp.d.ts +1 -2
  46. package/esm/drivers/index.d.ts +2 -1
  47. package/esm/drivers/sockets/ISocket.d.ts +35 -0
  48. package/esm/drivers/sockets/Socket.d.ts +8 -0
  49. package/esm/drivers/sockets/SocketFactory.d.ts +13 -0
  50. package/esm/drivers/sockets/implement/DefaultSocket.d.ts +39 -0
  51. package/esm/drivers/sockets/index.d.ts +2 -0
  52. package/esm/drivers/tasks/ITask.d.ts +3 -0
  53. package/esm/drivers/util/@types/JsonConfig.d.ts +10 -0
  54. package/esm/drivers/util/@types/TreeNodeProp.d.ts +9 -0
  55. package/esm/drivers/util/@types/index.d.ts +3 -0
  56. package/esm/drivers/util/IUtil.d.ts +8 -0
  57. package/esm/drivers/util/Util.d.ts +8 -0
  58. package/esm/drivers/util/UtilFactory.d.ts +32 -0
  59. package/esm/drivers/util/implements/ArrayUtil.d.ts +123 -0
  60. package/esm/drivers/util/implements/BrowserUtil.d.ts +12 -0
  61. package/esm/drivers/util/implements/ComponentUtil.d.ts +20 -0
  62. package/esm/drivers/util/implements/DictionaryUtil.d.ts +40 -0
  63. package/esm/drivers/util/implements/DomUtil.d.ts +118 -0
  64. package/esm/drivers/util/implements/EventUtil.d.ts +32 -0
  65. package/esm/drivers/util/implements/FileUtil.d.ts +24 -0
  66. package/esm/drivers/util/implements/HtmlUtil.d.ts +16 -0
  67. package/esm/drivers/util/implements/ImageUtil.d.ts +12 -0
  68. package/esm/drivers/util/implements/JsonUtil.d.ts +53 -0
  69. package/esm/drivers/util/implements/MathUtil.d.ts +52 -0
  70. package/esm/drivers/util/implements/MicroUtil.d.ts +12 -0
  71. package/esm/drivers/util/implements/MountUtil.d.ts +16 -0
  72. package/esm/drivers/util/implements/ObjectUtil.d.ts +44 -0
  73. package/esm/drivers/util/implements/ScrollUtil.d.ts +16 -0
  74. package/esm/drivers/util/implements/SignUtil.d.ts +16 -0
  75. package/esm/drivers/util/implements/StringUtil.d.ts +104 -0
  76. package/esm/drivers/util/implements/TaskUtil.d.ts +28 -0
  77. package/esm/drivers/util/implements/TimeUtil.d.ts +72 -0
  78. package/esm/drivers/util/implements/TreeUtil.d.ts +56 -0
  79. package/esm/drivers/util/implements/TypeUtil.d.ts +28 -0
  80. package/esm/drivers/util/implements/UrlUtil.d.ts +90 -0
  81. package/esm/drivers/util/index.d.ts +24 -0
  82. package/esm/factorying/Factories.d.ts +9 -5
  83. package/esm/factorying/Factory.d.ts +4 -7
  84. package/esm/factorying/IFactory.d.ts +6 -2
  85. package/esm/factorying/Utils.d.ts +24 -9
  86. package/esm/factorying/index.d.ts +7 -2
  87. package/esm/svcs/implement/ConfigSvc.d.ts +1 -1
  88. package/esm/svcs/index.d.ts +1 -3
  89. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, HelperFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
1
+ import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
2
2
  import { SvcFactory } from "../svcs";
3
3
  /**
4
4
  * 驱动工厂类
@@ -46,10 +46,6 @@ declare class Factories {
46
46
  * 多语言工厂
47
47
  */
48
48
  static get i18n(): I18nFactory;
49
- /**
50
- * 帮助类工厂
51
- */
52
- static get helper(): HelperFactory;
53
49
  /**
54
50
  * 消息提示请求工厂
55
51
  */
@@ -62,6 +58,10 @@ declare class Factories {
62
58
  * 签名工厂
63
59
  */
64
60
  static get signer(): SignerFactory;
61
+ /**
62
+ * 通信工厂
63
+ */
64
+ static get socket(): SocketFactory;
65
65
  /**
66
66
  * SSO工厂
67
67
  */
@@ -74,6 +74,10 @@ declare class Factories {
74
74
  * 模板工厂
75
75
  */
76
76
  static get template(): TemplateFactory;
77
+ /**
78
+ * 工具工厂
79
+ */
80
+ static get util(): UtilFactory;
77
81
  /**
78
82
  * 工具类工厂
79
83
  */
@@ -21,20 +21,18 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
21
21
  * 实例缓存集合
22
22
  * 或者使用:Record<string, string>
23
23
  */
24
- private mappings;
25
- /**
26
- * 开启
27
- */
24
+ private cached;
28
25
  open(): void;
26
+ register(entity: T): void;
29
27
  /**
30
28
  * 根据主键创建驱动,并返回加载后的驱动信息
31
29
  */
32
30
  createById(id: number, driverRef?: Ref<any>): Promise<T>;
33
- createIfAbsent(type: string): T;
31
+ createCache(type: string): T;
34
32
  /**
35
33
  * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
36
34
  */
37
- createIfAbsentAsync(type?: string, open?: (entity: T) => Promise<void>): Promise<T>;
35
+ createCacheAsync(type?: string, open?: (entity: T) => Promise<void>): Promise<T>;
38
36
  /**
39
37
  * 创建指定类型驱动
40
38
  */
@@ -47,6 +45,5 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
47
45
  * 加载驱动明细
48
46
  */
49
47
  loadDriver(id: number): Promise<any>;
50
- addType(entity: T): void;
51
48
  }
52
49
  export default Factory;
@@ -11,6 +11,10 @@ interface IFactory<T> {
11
11
  * 开启工厂
12
12
  */
13
13
  open(): void;
14
+ /**
15
+ * 注册新类型
16
+ */
17
+ register(entity: T): any;
14
18
  /**
15
19
  * 根据主键创建驱动,并返回加载后的驱动信息
16
20
  */
@@ -18,11 +22,11 @@ interface IFactory<T> {
18
22
  /**
19
23
  * 从缓存中获取指定类型的驱动,不存在则创建,用于Helper类等简单类型
20
24
  */
21
- createIfAbsent(type: string): T;
25
+ createCache(type: string): T;
22
26
  /**
23
27
  * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
24
28
  */
25
- createIfAbsentAsync(type: string, open?: (entity: T) => Promise<void>): Promise<T>;
29
+ createCacheAsync(type: string, open?: (entity: T) => Promise<void>): Promise<T>;
26
30
  /**
27
31
  * 创建指定类型的实例
28
32
  */
@@ -1,14 +1,29 @@
1
+ import { ArrayUtil, ComponentUtil, DomUtil, DictionaryUtil, EventUtil, FileUtil, HtmlUtil, ImageUtil, MathUtil, MountUtil, ObjectUtil, MicroUtil, StringUtil, TaskUtil, TypeUtil, TimeUtil, TreeUtil, ScrollUtil, JsonUtil, BrowserUtil, UrlUtil, SignUtil } from "../drivers/helpers";
1
2
  /**
2
- * 工具类集合
3
+ * 工具工厂(无状态)
3
4
  */
4
5
  declare class Utils {
5
- static get utility(): import("../drivers").UtilityFactory;
6
- static affix(ele: Element, parent: Element): import("../drivers/utilities/implement/AffixUtility").default;
7
- static delta(): import("../drivers").DeltaUtility;
8
- static event(): import("../drivers").EventUtility;
9
- static keyboard(): import("../drivers").KeyboardUtility;
10
- static mouse(container: HTMLElement, closeTriggers?: any[]): import("../drivers").MouseUtility;
11
- static random(): import("../drivers").RandomUtility;
12
- static save(): import("../drivers").SaveUtility;
6
+ static get array(): ArrayUtil;
7
+ static get browser(): BrowserUtil;
8
+ static get component(): ComponentUtil;
9
+ static get dom(): DomUtil;
10
+ static get dictionary(): DictionaryUtil;
11
+ static get event(): EventUtil;
12
+ static get file(): FileUtil;
13
+ static get html(): HtmlUtil;
14
+ static get image(): ImageUtil;
15
+ static get json(): JsonUtil;
16
+ static get math(): MathUtil;
17
+ static get mount(): MountUtil;
18
+ static get object(): ObjectUtil;
19
+ static get micro(): MicroUtil;
20
+ static get scroll(): ScrollUtil;
21
+ static get string(): StringUtil;
22
+ static get task(): TaskUtil;
23
+ static get type(): TypeUtil;
24
+ static get time(): TimeUtil;
25
+ static get tree(): TreeUtil;
26
+ static get url(): UrlUtil;
27
+ static get sign(): SignUtil;
13
28
  }
14
29
  export default Utils;
@@ -2,7 +2,8 @@ import Factories from "./Factories";
2
2
  import Factory from "./Factory";
3
3
  import { ICdn, IEncoder, IHasher, II18n, IHttp, IMessenger, ITemplate } from "../drivers";
4
4
  import { CreateFeOptions } from "../@types";
5
- import Helps from "./Helps";
5
+ import Utils from "./Utils";
6
+ import ISocket from "../drivers/sockets/ISocket";
6
7
  /**
7
8
  * 默认base64编码
8
9
  */
@@ -23,6 +24,10 @@ declare let i18n: II18n;
23
24
  * MD5 hash计算
24
25
  */
25
26
  declare let md5: IHasher;
27
+ /**
28
+ * Socket通信
29
+ */
30
+ declare let socket: ISocket;
26
31
  /**
27
32
  * 默认模板引擎
28
33
  */
@@ -39,4 +44,4 @@ declare let initDriver: (options: CreateFeOptions) => Promise<void>;
39
44
  * 提取可导出的翻译方法,当i18n实例变化后,导出的方案会跟着变化?
40
45
  */
41
46
  declare let t: typeof i18n.t, t_exists: typeof i18n.t_exists, t_sys: typeof i18n.t_sys, t_enum: typeof i18n.t_enum, t_field: typeof i18n.t_field, t_field_choose_placeholder: typeof i18n.t_field_choose_placeholder, t_field_placeholder: typeof i18n.t_field_placeholder, t_table: typeof i18n.t_table, t_module: typeof i18n.t_module, t_menu: typeof i18n.t_menu;
42
- export { base64, cdn, http, i18n, md5, template, messenger, initDriver, Factories, Factory, Helps, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu };
47
+ export { base64, cdn, http, i18n, md5, socket, template, messenger, initDriver, Factories, Factory, Utils, t, t_exists, t_sys, t_enum, t_field, t_field_choose_placeholder, t_field_placeholder, t_table, t_module, t_menu };
@@ -67,6 +67,6 @@ declare class ConfigSvc extends Svc {
67
67
  /**
68
68
  * 获取当前语言
69
69
  */
70
- getLanguage(): string;
70
+ getLanguage(): any;
71
71
  }
72
72
  export default ConfigSvc;
@@ -1,7 +1,6 @@
1
1
  import ConfigSvc from "./implement/ConfigSvc";
2
2
  import EnvSvc from "./implement/EnvSvc";
3
3
  import LogSvc from "./implement/LogSvc";
4
- import SocketSvc from "./implement/SocketSvc";
5
4
  import UserSvc from "./implement/UserSvc";
6
5
  import SvcFactory from "./SvcFactory";
7
6
  declare let settingSvc: {
@@ -57,7 +56,6 @@ declare let driverSvc: {
57
56
  };
58
57
  declare let envSvc: EnvSvc;
59
58
  declare let logSvc: LogSvc;
60
- declare let socketSvc: SocketSvc;
61
59
  declare let userSvc: UserSvc;
62
60
  export * from "./implement";
63
- export { configSvc, driverSvc, envSvc, logSvc, settingSvc, socketSvc, userSvc, SvcFactory };
61
+ export { configSvc, driverSvc, envSvc, logSvc, settingSvc, userSvc, SvcFactory };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "halo-fe",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Halo front end sdk",
5
5
  "scripts": {
6
6
  "halo-fe:tsc": "vue-tsc",
@@ -29,7 +29,7 @@
29
29
  "registry": "https://registry.npmjs.org"
30
30
  },
31
31
  "peerDependencies": {
32
- "vue": "3.5.0"
32
+ "vue": "3.5.3"
33
33
  },
34
34
  "dependencies": {
35
35
  "clone": "2.1.2",
@@ -40,7 +40,7 @@
40
40
  "underscore.string": "3.3.6"
41
41
  },
42
42
  "devDependencies": {
43
- "@types/node": "22.5.3",
43
+ "@types/node": "22.5.4",
44
44
  "@vitejs/plugin-vue": "5.1.3",
45
45
  "@vitejs/plugin-vue-jsx": "4.0.1",
46
46
  "crypto-js": "4.2.0",
@@ -49,7 +49,7 @@
49
49
  "quill": "2.0.2",
50
50
  "sass": "1.78.0",
51
51
  "vite": "5.4.3",
52
- "vue-tsc": "2.1.4",
52
+ "vue-tsc": "2.1.6",
53
53
  "xlsx-js-style": "1.2.0"
54
54
  }
55
55
  }