halo-fe 1.0.24 → 1.0.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/README.md +3 -1
  2. package/dist/assets/{liquidjs-B8dqQyVv.js → liquidjs-C2HVw1Ra.js} +82 -81
  3. package/dist/main.js +4888 -4397
  4. package/dist/style.css +1 -1
  5. package/esm/@types/CreateFeOptions.d.ts +4 -0
  6. package/esm/coms/@types/PagerEmit.d.ts +11 -0
  7. package/esm/coms/@types/PagerProps.d.ts +18 -0
  8. package/esm/coms/@types/SocketProgressProps.d.ts +31 -0
  9. package/esm/coms/@types/TabProps.d.ts +11 -0
  10. package/esm/coms/@types/TableEmit.d.ts +10 -0
  11. package/esm/coms/@types/TableProps.d.ts +34 -0
  12. package/esm/coms/@types/index.d.ts +7 -1
  13. package/esm/coms/Empty.vue.d.ts +12 -10
  14. package/esm/coms/Fill.vue.d.ts +8 -10
  15. package/esm/coms/Scroller.vue.d.ts +11 -13
  16. package/esm/coms/Timer.vue.d.ts +7 -9
  17. package/esm/coms/cards/Index.vue.d.ts +16 -0
  18. package/esm/coms/cards/index.d.ts +2 -0
  19. package/esm/coms/conditions/Condition.vue.d.ts +1 -1
  20. package/esm/coms/conditions/Index.vue.d.ts +1 -1
  21. package/esm/coms/controls/@types/CodeIntelli.d.ts +6 -0
  22. package/esm/coms/controls/@types/CodeProps.d.ts +31 -2
  23. package/esm/coms/controls/@types/Range.d.ts +1 -1
  24. package/esm/coms/controls/Code.vue.d.ts +16 -28
  25. package/esm/coms/controls/Compare.vue.d.ts +16 -8
  26. package/esm/coms/controls/Input.vue.d.ts +2 -0
  27. package/esm/coms/controls/Option.vue.d.ts +1 -1
  28. package/esm/coms/controls/RichText.vue.d.ts +2 -4
  29. package/esm/coms/controls/Select.vue.d.ts +1 -1
  30. package/esm/coms/controls/index.d.ts +2 -1
  31. package/esm/coms/index.d.ts +1 -0
  32. package/esm/coms/layouts/Col.vue.d.ts +6 -8
  33. package/esm/coms/layouts/Container.vue.d.ts +12 -11
  34. package/esm/coms/layouts/Desc.vue.d.ts +2 -0
  35. package/esm/coms/layouts/Row.vue.d.ts +7 -8
  36. package/esm/coms/pagers/Index.vue.d.ts +9 -0
  37. package/esm/coms/pagers/index.d.ts +2 -0
  38. package/esm/coms/progresses/Circle.vue.d.ts +2 -0
  39. package/esm/coms/progresses/Index.vue.d.ts +9 -0
  40. package/esm/coms/progresses/SocketProgress.vue.d.ts +7 -9
  41. package/esm/coms/progresses/Spinner.vue.d.ts +20 -0
  42. package/esm/coms/progresses/index.d.ts +3 -2
  43. package/esm/coms/tables/Index.vue.d.ts +33 -0
  44. package/esm/coms/tabs/Tab.vue.d.ts +2 -2
  45. package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
  46. package/esm/drivers/@types/IOpen.d.ts +1 -1
  47. package/esm/drivers/builders/BuilderFactory.d.ts +1 -1
  48. package/esm/drivers/cdns/Cdn.d.ts +7 -9
  49. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  50. package/esm/drivers/cdns/ICdn.d.ts +2 -11
  51. package/esm/drivers/encoders/Encoder.d.ts +1 -1
  52. package/esm/drivers/encoders/EncoderFactory.d.ts +3 -2
  53. package/esm/drivers/encoders/IEncoder.d.ts +2 -5
  54. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +1 -1
  55. package/esm/drivers/encoders/implement/UrlEncoder.d.ts +7 -0
  56. package/esm/drivers/excels/Excel.d.ts +1 -1
  57. package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
  58. package/esm/drivers/excels/implements/XlsxExcel.d.ts +1 -1
  59. package/esm/drivers/explainers/ExplainerFactory.d.ts +2 -2
  60. package/esm/drivers/features/FeatureFactory.d.ts +2 -2
  61. package/esm/drivers/features/IFeature.d.ts +2 -6
  62. package/esm/drivers/features/implements/ExpressionFeature.d.ts +1 -1
  63. package/esm/drivers/features/implements/I18NFeature.d.ts +1 -1
  64. package/esm/drivers/features/implements/SortFeature.d.ts +1 -1
  65. package/esm/drivers/hashers/Hasher.d.ts +1 -1
  66. package/esm/drivers/hashers/HasherFactory.d.ts +2 -2
  67. package/esm/drivers/hashers/IHasher.d.ts +2 -5
  68. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
  69. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
  70. package/esm/drivers/https/Http.d.ts +22 -7
  71. package/esm/drivers/https/HttpFactory.d.ts +2 -7
  72. package/esm/drivers/https/IHttp.d.ts +16 -12
  73. package/esm/drivers/https/entities/HttpModel.d.ts +12 -0
  74. package/esm/drivers/https/entities/HttpResponse.d.ts +5 -1
  75. package/esm/drivers/https/implements/DefaultHttp.d.ts +1 -1
  76. package/esm/drivers/https/implements/HaloHttp.d.ts +2 -10
  77. package/esm/drivers/https/implements/MkHttp.d.ts +2 -3
  78. package/esm/drivers/i18ns/I18n.d.ts +1 -1
  79. package/esm/drivers/i18ns/I18nFactory.d.ts +1 -1
  80. package/esm/drivers/i18ns/implements/DefaultI18n.d.ts +1 -1
  81. package/esm/drivers/index.d.ts +52 -1
  82. package/esm/drivers/messengers/MessengerFactory.d.ts +2 -2
  83. package/esm/drivers/providers/IProvider.d.ts +19 -15
  84. package/esm/drivers/providers/Provider.d.ts +11 -9
  85. package/esm/drivers/providers/ProviderFactory.d.ts +5 -9
  86. package/esm/drivers/providers/implements/CookieProvider.d.ts +8 -8
  87. package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +20 -10
  88. package/esm/drivers/providers/implements/StorageProvider.d.ts +8 -8
  89. package/esm/drivers/signers/ISigner.d.ts +1 -1
  90. package/esm/drivers/signers/Signer.d.ts +1 -1
  91. package/esm/drivers/signers/SignerFactory.d.ts +2 -2
  92. package/esm/drivers/signers/implements/DefaultSigner.d.ts +1 -1
  93. package/esm/drivers/sockets/@types/SubscribedWindow.d.ts +16 -0
  94. package/esm/drivers/sockets/@types/index.d.ts +2 -0
  95. package/esm/drivers/sockets/ISocket.d.ts +39 -0
  96. package/esm/drivers/sockets/Socket.d.ts +17 -0
  97. package/esm/drivers/sockets/SocketFactory.d.ts +13 -0
  98. package/esm/drivers/sockets/entities/SocketProgress.d.ts +34 -0
  99. package/esm/drivers/sockets/entities/SocketResponse.d.ts +26 -0
  100. package/esm/drivers/sockets/entities/index.d.ts +3 -0
  101. package/esm/drivers/sockets/implement/DefaultSocket.d.ts +37 -0
  102. package/esm/drivers/sockets/index.d.ts +4 -0
  103. package/esm/drivers/ssos/ISso.d.ts +1 -1
  104. package/esm/drivers/ssos/Sso.d.ts +1 -1
  105. package/esm/drivers/ssos/SsoFactory.d.ts +2 -2
  106. package/esm/drivers/ssos/implements/AnonymousSso.d.ts +1 -1
  107. package/esm/drivers/ssos/implements/BearerSso.d.ts +1 -1
  108. package/esm/drivers/ssos/implements/NioSso.d.ts +1 -1
  109. package/esm/drivers/ssos/implements/SecretSso.d.ts +1 -1
  110. package/esm/drivers/ssos/implements/WeiXinSso.d.ts +1 -1
  111. package/esm/drivers/tasks/ITask.d.ts +10 -3
  112. package/esm/drivers/tasks/Task.d.ts +2 -1
  113. package/esm/drivers/tasks/TaskFactory.d.ts +2 -2
  114. package/esm/drivers/tasks/implement/MemoryTask.d.ts +5 -3
  115. package/esm/drivers/templates/TemplateFactory.d.ts +2 -2
  116. package/esm/drivers/util/@types/JsonConfig.d.ts +10 -0
  117. package/esm/drivers/util/@types/TreeNodeProp.d.ts +9 -0
  118. package/esm/drivers/util/@types/index.d.ts +3 -0
  119. package/esm/drivers/util/IUtil.d.ts +8 -0
  120. package/esm/drivers/util/Util.d.ts +8 -0
  121. package/esm/drivers/util/UtilFactory.d.ts +32 -0
  122. package/esm/drivers/util/implements/ArrayUtil.d.ts +123 -0
  123. package/esm/drivers/util/implements/BrowserUtil.d.ts +12 -0
  124. package/esm/drivers/util/implements/ComponentUtil.d.ts +20 -0
  125. package/esm/drivers/util/implements/DictionaryUtil.d.ts +40 -0
  126. package/esm/drivers/util/implements/DomUtil.d.ts +118 -0
  127. package/esm/drivers/util/implements/EventUtil.d.ts +32 -0
  128. package/esm/drivers/util/implements/FileUtil.d.ts +24 -0
  129. package/esm/drivers/util/implements/HtmlUtil.d.ts +16 -0
  130. package/esm/drivers/util/implements/ImageUtil.d.ts +12 -0
  131. package/esm/drivers/util/implements/JsonUtil.d.ts +58 -0
  132. package/esm/drivers/util/implements/MathUtil.d.ts +52 -0
  133. package/esm/drivers/util/implements/MicroUtil.d.ts +12 -0
  134. package/esm/drivers/util/implements/MountUtil.d.ts +16 -0
  135. package/esm/drivers/util/implements/ObjectUtil.d.ts +44 -0
  136. package/esm/drivers/util/implements/ScrollUtil.d.ts +16 -0
  137. package/esm/drivers/util/implements/SignUtil.d.ts +16 -0
  138. package/esm/drivers/util/implements/StringUtil.d.ts +104 -0
  139. package/esm/drivers/util/implements/TaskUtil.d.ts +28 -0
  140. package/esm/drivers/util/implements/TimeUtil.d.ts +72 -0
  141. package/esm/drivers/util/implements/TreeUtil.d.ts +56 -0
  142. package/esm/drivers/util/implements/TypeUtil.d.ts +28 -0
  143. package/esm/drivers/util/implements/UrlUtil.d.ts +90 -0
  144. package/esm/drivers/util/index.d.ts +24 -0
  145. package/esm/drivers/utilities/IUtility.d.ts +3 -0
  146. package/esm/drivers/utilities/Utility.d.ts +3 -0
  147. package/esm/drivers/utilities/UtilityFactory.d.ts +6 -6
  148. package/esm/drivers/utilities/implement/EventUtility.d.ts +3 -6
  149. package/esm/drivers/utilities/implement/SaveUtility.d.ts +48 -3
  150. package/esm/drivers/videos/VideoFactory.d.ts +2 -2
  151. package/esm/drivers/voices/VoiceFactory.d.ts +2 -2
  152. package/esm/factory/Factories.d.ts +99 -0
  153. package/esm/factory/Factory.d.ts +41 -0
  154. package/esm/factory/IFactory.d.ts +40 -0
  155. package/esm/factory/Utils.d.ts +29 -0
  156. package/esm/factory/index.d.ts +4 -0
  157. package/esm/factorying/Factories.d.ts +9 -5
  158. package/esm/factorying/Factory.d.ts +7 -10
  159. package/esm/factorying/IFactory.d.ts +7 -3
  160. package/esm/factorying/Utils.d.ts +24 -9
  161. package/esm/factorying/index.d.ts +7 -2
  162. package/esm/main.d.ts +1 -2
  163. package/esm/repos/Repo.d.ts +5 -0
  164. package/esm/repos/RepoFactory.d.ts +20 -1
  165. package/esm/repos/implements/PageRepo.d.ts +30 -0
  166. package/esm/repos/implements/QueryRepo.d.ts +64 -0
  167. package/esm/repos/implements/SettingRepo.d.ts +1 -0
  168. package/esm/repos/index.d.ts +10 -1
  169. package/esm/svcs/SvcFactory.d.ts +1 -1
  170. package/esm/svcs/implement/ConfigSvc.d.ts +8 -8
  171. package/esm/svcs/implement/DriverSvc.d.ts +1 -35
  172. package/esm/svcs/index.d.ts +6 -17
  173. package/package.json +10 -10
@@ -1,9 +1,12 @@
1
1
  import { DragOptions } from "../@types";
2
+ import { ITask } from "../../tasks";
2
3
  import Utility from "../Utility";
3
4
  /**
4
5
  * 事件工具类
5
6
  */
6
7
  declare class EventUtility extends Utility {
8
+ constructor();
9
+ resizeTask: ITask;
7
10
  resizeObserver: ResizeObserver;
8
11
  element: Element;
9
12
  resizeHandler: any;
@@ -44,12 +47,6 @@ declare class EventUtility extends Utility {
44
47
  * 鼠标按下
45
48
  */
46
49
  mouseDown(element: Element, mouseDown: (event: MouseEvent) => void, mouseUp: (event: MouseEvent) => void): void;
47
- lastDebounceTime: number;
48
- lastDebounceTimeout: any;
49
- /**
50
- * 事件防抖: time ms没重复触发才执行指定操作
51
- */
52
- debounce: (func: (args: any) => void, time: number, args?: any) => void;
53
50
  dispatchElement: HTMLElement;
54
51
  /**
55
52
  * 创建分发事件元素
@@ -1,16 +1,61 @@
1
1
  import Utility from "../Utility";
2
+ import { ITask } from "../../tasks";
3
+ import { IProvider } from "../../providers";
2
4
  /**
3
5
  * 自动保存工具
4
6
  * 函数式编程,从而可以让方法被多处使用
5
7
  */
6
8
  declare class SaveUtility extends Utility {
9
+ /**
10
+ * 已开启窗口
11
+ * 使用静态对象记录各自工具类开启的窗口,保证同一个kind工具类,被窗口多开时,能够杜绝异步方法导致的变量不一致问题
12
+ */
13
+ static opened: {
14
+ [kind: string]: string[];
15
+ };
16
+ /**
17
+ * 任务实例,用于控制任务并发
18
+ */
19
+ task: ITask;
20
+ /**
21
+ * 数据库驱动
22
+ */
23
+ provider: IProvider;
24
+ /**
25
+ * 内容类别标识
26
+ */
27
+ kind: string;
28
+ /**
29
+ * 实际对应的数据主键
30
+ */
31
+ key: string;
32
+ /**
33
+ * 最新表单
34
+ */
35
+ form: any;
36
+ /**
37
+ * 待删除的主键
38
+ */
39
+ oldKey: string;
40
+ /**
41
+ * 变动实际处理程序
42
+ */
43
+ handler: (val: any, oldVal: any) => Promise<void>;
7
44
  /**
8
45
  * 开启表单监控
9
46
  */
10
- open(form: any, store: string, id: string): Promise<void>;
47
+ openAsync(kind: string, key: string, form: any): Promise<IProvider>;
48
+ /**
49
+ * 内容变动监听程序
50
+ */
51
+ set changeHandler<T>(value: (val: T, oldVal: T) => Promise<void>);
52
+ /**
53
+ * 手动保存
54
+ */
55
+ saveAsync(form: any): Promise<void>;
11
56
  /**
12
- * 资源释放
57
+ * VIP:资源释放
13
58
  */
14
- dispose(): void;
59
+ dispose(dispose?: boolean): Promise<void>;
15
60
  }
16
61
  export default SaveUtility;
@@ -1,6 +1,6 @@
1
- import Factory from "../../factorying/Factory";
1
+ import Factory from "../../factory/Factory";
2
2
  import IVideo from "./IVideo";
3
3
  declare class VideoFactory extends Factory<IVideo> {
4
- get instances(): IVideo[];
4
+ open(): void;
5
5
  }
6
6
  export default VideoFactory;
@@ -1,6 +1,6 @@
1
- import Factory from "../../factorying/Factory";
1
+ import Factory from "../../factory/Factory";
2
2
  import { IVoice } from "./IVoice";
3
3
  declare class VoiceFactory extends Factory<IVoice> {
4
- get instances(): IVoice[];
4
+ open(): void;
5
5
  }
6
6
  export default VoiceFactory;
@@ -0,0 +1,99 @@
1
+ import { BuilderFactory, CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, UtilFactory, I18nFactory, HttpFactory, MessengerFactory, ProviderFactory, SignerFactory, SocketFactory, SsoFactory, TaskFactory, TemplateFactory, UtilityFactory } from "../drivers";
2
+ import { RepoFactory } from "../repos";
3
+ import { SvcFactory } from "../svcs";
4
+ /**
5
+ * 驱动工厂类
6
+ */
7
+ declare class Factories {
8
+ /**
9
+ * 工厂缓存
10
+ */
11
+ static created: {
12
+ [key: string]: any;
13
+ };
14
+ /**
15
+ * Builder工厂
16
+ */
17
+ static get builder(): BuilderFactory;
18
+ /**
19
+ * CDN工厂
20
+ */
21
+ static get cdn(): CdnFactory;
22
+ /**
23
+ * 编码器工厂
24
+ */
25
+ static get encoder(): EncoderFactory;
26
+ /**
27
+ * Excel工厂
28
+ */
29
+ static get excel(): ExcelFactory;
30
+ /**
31
+ * Explainer工厂
32
+ */
33
+ static get explainer(): ExplainerFactory;
34
+ /**
35
+ * 特征工厂
36
+ */
37
+ static get feature(): FeatureFactory;
38
+ /**
39
+ * 哈希工厂
40
+ */
41
+ static get hasher(): HasherFactory;
42
+ /**
43
+ * Http请求工厂
44
+ */
45
+ static get http(): HttpFactory;
46
+ /**
47
+ * 多语言工厂
48
+ */
49
+ static get i18n(): I18nFactory;
50
+ /**
51
+ * 消息提示请求工厂
52
+ */
53
+ static get messenger(): MessengerFactory;
54
+ /**
55
+ * 提供程序工厂
56
+ */
57
+ static get provider(): ProviderFactory;
58
+ /**
59
+ * 签名工厂
60
+ */
61
+ static get signer(): SignerFactory;
62
+ /**
63
+ * 通信工厂
64
+ */
65
+ static get socket(): SocketFactory;
66
+ /**
67
+ * SSO工厂
68
+ */
69
+ static get sso(): SsoFactory;
70
+ /**
71
+ * Task工厂
72
+ */
73
+ static get task(): TaskFactory;
74
+ /**
75
+ * 模板工厂
76
+ */
77
+ static get template(): TemplateFactory;
78
+ /**
79
+ * 工具工厂
80
+ */
81
+ static get util(): UtilFactory;
82
+ /**
83
+ * 工具类工厂
84
+ */
85
+ static get utility(): UtilityFactory;
86
+ /**
87
+ * 仓储工厂
88
+ */
89
+ static get repo(): RepoFactory;
90
+ /**
91
+ * 服务工厂
92
+ */
93
+ static get svc(): SvcFactory;
94
+ /**
95
+ * 创建并缓存工厂实例
96
+ */
97
+ static create<T>(type: any): T;
98
+ }
99
+ export default Factories;
@@ -0,0 +1,41 @@
1
+ import IFactory from "./IFactory";
2
+ import { IDriver } from "../drivers";
3
+ import { Ref } from "../plugins";
4
+ /**
5
+ * 工厂基类
6
+ */
7
+ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
8
+ /**
9
+ * 当前驱动所有类型,用于使用时实例化
10
+ */
11
+ types: any[];
12
+ /**
13
+ * 实例缓存集合
14
+ * 或者使用:Record<string, string>
15
+ */
16
+ private created;
17
+ open(): void;
18
+ register(type: any): void;
19
+ /**
20
+ * 根据主键创建并开启驱动,并返回加载后的驱动信息
21
+ */
22
+ createByIdAsync: (id: number, driverRef?: Ref<any>) => Promise<T>;
23
+ createWithCache(type: string, name?: string, open?: (entity: T) => void): T;
24
+ /**
25
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
26
+ */
27
+ createWithCacheAsync(type?: string, open?: (entity: T) => Promise<void>): Promise<T>;
28
+ /**
29
+ * 异步创建指定类型驱动
30
+ */
31
+ createAsync(type: string): Promise<T>;
32
+ /**
33
+ * 创建指定类型驱动
34
+ */
35
+ create(type: string): T;
36
+ /**
37
+ * 加载驱动明细
38
+ */
39
+ loadDriverAsync(id: number): Promise<any>;
40
+ }
41
+ export default Factory;
@@ -0,0 +1,40 @@
1
+ import { Ref } from "../plugins";
2
+ /**
3
+ * 工厂接口
4
+ */
5
+ interface IFactory<T> {
6
+ /**
7
+ * 当前驱动所有类型,用于使用时实例化
8
+ */
9
+ get types(): any[];
10
+ /**
11
+ * 开启工厂
12
+ */
13
+ open(): void;
14
+ /**
15
+ * 注册新类型
16
+ */
17
+ register(type: any): any;
18
+ /**
19
+ * 根据主键创建驱动,并返回加载后的驱动信息
20
+ */
21
+ createByIdAsync(id: number, driverRef?: Ref<any>): Promise<T>;
22
+ /**
23
+ * 从缓存中获取指定类型的驱动,不存在则创建,用于Helper类等简单类型
24
+ * 可以定义名称,实现同一类型,按照不同场景各自进行缓存
25
+ */
26
+ createWithCache(type: string, name?: string, open?: (entity: T) => void): T;
27
+ /**
28
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
29
+ */
30
+ createWithCacheAsync(type: string, open?: (entity: T) => Promise<void>): Promise<T>;
31
+ /**
32
+ * 异步创建指定类型驱动
33
+ */
34
+ createAsync(type: string): Promise<T>;
35
+ /**
36
+ * 创建指定类型的实例
37
+ */
38
+ create(type: string): T;
39
+ }
40
+ export default IFactory;
@@ -0,0 +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/util";
2
+ /**
3
+ * 工具工厂(无状态)
4
+ */
5
+ declare class Utils {
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;
28
+ }
29
+ export default Utils;
@@ -0,0 +1,4 @@
1
+ import Factories from "./Factories";
2
+ import Factory from "./Factory";
3
+ import Utils from "./Utils";
4
+ export { Factories, Factory, Utils };
@@ -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
- createById(id: number, driverRef?: Ref<any>): Promise<T>;
33
- createIfAbsent(type: string): T;
30
+ createByIdAsync: (id: number, driverRef?: Ref<any>) => Promise<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
  */
@@ -46,7 +44,6 @@ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
46
44
  /**
47
45
  * 加载驱动明细
48
46
  */
49
- loadDriver(id: number): Promise<any>;
50
- addType(entity: T): void;
47
+ loadDriverAsync(id: number): Promise<any>;
51
48
  }
52
49
  export default Factory;
@@ -11,18 +11,22 @@ 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
  */
17
- createById(id: number, driverRef?: Ref<any>): Promise<T>;
21
+ createByIdAsync(id: number, driverRef?: Ref<any>): Promise<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 };
package/esm/main.d.ts CHANGED
@@ -3,11 +3,10 @@ import "./styles/index.scss";
3
3
  export * from "./@types";
4
4
  export * from "./coms";
5
5
  export * from "./drivers";
6
- export * from "./factorying";
6
+ export * from "./factory";
7
7
  export * from "./plugins";
8
8
  export * from "./repos";
9
9
  export * from "./svcs";
10
- export * from "./drivers/utilities";
11
10
  /**
12
11
  * 初始化前端基础框架
13
12
  */
@@ -0,0 +1,5 @@
1
+ import IRepo from "./IRepo";
2
+ declare abstract class Repo implements IRepo {
3
+ type: string;
4
+ }
5
+ export default Repo;
@@ -1,5 +1,24 @@
1
- import Factory from "../factorying/Factory";
1
+ import Factory from "../factory/Factory";
2
2
  import IRepo from "./IRepo";
3
+ import PageRepo from "./implements/PageRepo";
4
+ import QueryRepo from "./implements/QueryRepo";
5
+ import SettingRepo from "./implements/SettingRepo";
6
+ /**
7
+ * 仓储工厂
8
+ */
3
9
  declare class RepoFactory extends Factory<IRepo> {
10
+ open(): void;
11
+ /**
12
+ * 页面仓储
13
+ */
14
+ get page(): PageRepo;
15
+ /**
16
+ * 查询仓储
17
+ */
18
+ get query(): QueryRepo;
19
+ /**
20
+ * 设置仓储
21
+ */
22
+ get setting(): SettingRepo;
4
23
  }
5
24
  export default RepoFactory;
@@ -0,0 +1,30 @@
1
+ import Repo from "../Repo";
2
+ /**
3
+ * 页面仓储
4
+ */
5
+ declare class PageRepo extends Repo {
6
+ type: string;
7
+ /**
8
+ * 获取表的默认行数据
9
+ */
10
+ getDefaultRow: (table: any) => any;
11
+ /**
12
+ * 更新提示内容
13
+ */
14
+ updateTooltipByFields(table: string, row: any, fields: any[]): void;
15
+ /**
16
+ * 展开数据和架构信息
17
+ */
18
+ expandSet: (schema: any[], set: any) => any;
19
+ /**
20
+ * 展开架构信息
21
+ */
22
+ expandSchema(schema: any[], set: {
23
+ [key: string]: any;
24
+ }): any[];
25
+ /**
26
+ * 展开所有数据表的搜索字段信息
27
+ */
28
+ expandSearch(schema: any[]): any[];
29
+ }
30
+ export default PageRepo;
@@ -0,0 +1,64 @@
1
+ import { ITask } from "../../drivers";
2
+ import Repo from "../Repo";
3
+ /**
4
+ * 查询仓储
5
+ */
6
+ declare class QueryRepo extends Repo {
7
+ type: string;
8
+ /**
9
+ * 加载完毕状态记录
10
+ */
11
+ loaded: {
12
+ apps: boolean;
13
+ envs: boolean;
14
+ };
15
+ /**
16
+ * 是否加载中状态,用于并发场景 防止重复拉取接口
17
+ */
18
+ loading: {
19
+ apps: boolean;
20
+ envs: boolean;
21
+ };
22
+ /**
23
+ * 代码语言集合
24
+ */
25
+ codeLanguages: any[];
26
+ /**
27
+ * 驱动程序语言集合
28
+ */
29
+ providerLanguages: any[];
30
+ /**
31
+ * 应用集合,存储到Store中,防止每一个Driver实例重复加载
32
+ */
33
+ apps: any[];
34
+ /**
35
+ * 环境集合,存储到Store中,防止每一个Driver实例重复加载
36
+ */
37
+ envs: any[];
38
+ /**
39
+ * 并发任务管理器
40
+ */
41
+ task: ITask;
42
+ open: () => void;
43
+ /**
44
+ * 加载应用选项
45
+ */
46
+ loadAppsAsync(reload?: boolean): Promise<void>;
47
+ /**
48
+ * 加载环境选项
49
+ */
50
+ loadEnvsAsync(reload?: boolean): Promise<void>;
51
+ /**
52
+ * 加载驱动选项
53
+ */
54
+ loadDriversAsync(app: string, env: string, kind: string): Promise<any[]>;
55
+ /**
56
+ * 查询代码语言和文本语言映射关系
57
+ */
58
+ loadCodeLanguageAsync(reload?: boolean): Promise<any[]>;
59
+ /**
60
+ * 查询驱动程序和文本语言映射关系
61
+ */
62
+ loadDriverLanguageAsync(reload?: boolean): Promise<any[]>;
63
+ }
64
+ export default QueryRepo;
@@ -6,6 +6,7 @@ declare class SettingRepo {
6
6
  * 定义支持键访问
7
7
  */
8
8
  [key: string]: any;
9
+ type: string;
9
10
  constructor();
10
11
  /**
11
12
  * 获取侧边栏宽度
@@ -1,3 +1,12 @@
1
+ import RepoFactory from "./RepoFactory";
2
+ import PageRepo from "./implements/PageRepo";
3
+ import QueryRepo from "./implements/QueryRepo";
1
4
  import SettingRepo from "./implements/SettingRepo";
5
+ declare let pageRepo: PageRepo;
6
+ declare let queryRepo: QueryRepo;
2
7
  declare let settingRepo: SettingRepo;
3
- export { settingRepo };
8
+ /**
9
+ * 初始化全局仓储对象
10
+ */
11
+ declare let initRepoAsync: () => Promise<void>;
12
+ export { initRepoAsync, pageRepo, queryRepo, settingRepo, RepoFactory, };
@@ -1,4 +1,4 @@
1
- import Factory from "../factorying/Factory";
1
+ import Factory from "../factory/Factory";
2
2
  import ISvc from "./ISvc";
3
3
  import ConfigSvc from "./implement/ConfigSvc";
4
4
  /**