halo-fe 1.0.8 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/@intlify-BISCQg1h.js +2189 -0
- package/dist/{vendor-@monaco-editor-DKC4UNw_.js → assets/@monaco-editor-BCDRi0Ti.js} +1 -1
- package/dist/assets/@vue-aVYGocXp.js +93 -0
- package/dist/assets/clone-DtpAsLoe.js +139 -0
- package/dist/{vendor-file-saver-DKXzEV2Q.js → assets/file-saver-Cnua3zoa.js} +1 -1
- package/dist/assets/liquidjs-C-LVcoaY.js +2893 -0
- package/dist/{vendor-underscore.string-vrHhfBaT.js → assets/underscore.string-oDfap0sE.js} +3 -3
- package/dist/{vendor-util-deprecate-BfbfwJhs.js → assets/util-deprecate-BqFawLoO.js} +1 -1
- package/dist/assets/vue-i18n-CLr3brPz.js +1670 -0
- package/dist/main.js +2383 -1579
- package/dist/style.css +1 -1
- package/esm/coms/Empty.vue.d.ts +1 -0
- package/esm/coms/conditions/Condition.vue.d.ts +12 -0
- package/esm/coms/conditions/Index.vue.d.ts +12 -0
- package/esm/coms/conditions/index.d.ts +3 -0
- package/esm/coms/conditions/types/ConditionGroupProps.d.ts +11 -0
- package/esm/coms/conditions/types/ConditionProps.d.ts +18 -0
- package/esm/coms/conditions/types/index.d.ts +3 -0
- package/esm/coms/{Code.vue.d.ts → controls/Code.vue.d.ts} +11 -3
- package/esm/coms/controls/Option.vue.d.ts +2 -0
- package/esm/coms/controls/Select.vue.d.ts +2 -0
- package/esm/coms/controls/index.d.ts +7 -0
- package/esm/coms/{types → controls/types}/CodeEmit.d.ts +1 -1
- package/esm/coms/controls/types/CodeProps.d.ts +28 -0
- package/esm/coms/controls/types/Range.d.ts +26 -0
- package/esm/coms/controls/types/index.d.ts +6 -0
- package/esm/coms/index.d.ts +5 -8
- package/esm/coms/layouts/index.d.ts +5 -0
- package/esm/coms/layouts/types/index.d.ts +2 -0
- package/esm/coms/types/index.d.ts +1 -6
- package/esm/drivers/bridges/IBridge.d.ts +7 -1
- package/esm/drivers/builders/Builder.d.ts +4 -1
- package/esm/drivers/builders/BuilderFactory.d.ts +1 -1
- package/esm/drivers/builders/IBuilder.d.ts +9 -0
- package/esm/drivers/builders/entities/ProviderTable.d.ts +22 -0
- package/esm/drivers/builders/entities/index.d.ts +2 -0
- package/esm/drivers/builders/implement/JsonBuilder.d.ts +3 -0
- package/esm/drivers/builders/implement/MongoBuilder.d.ts +6 -0
- package/esm/drivers/builders/implement/MySqlBuilder.d.ts +3 -0
- package/esm/drivers/builders/implement/SqlBuilder.d.ts +6 -0
- package/esm/drivers/builders/index.d.ts +3 -1
- package/esm/drivers/builders/types/ProviderTable.d.ts +6 -0
- package/esm/drivers/builders/types/index.d.ts +2 -0
- package/esm/drivers/cdns/Cdn.d.ts +20 -7
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/ICdn.d.ts +28 -11
- package/esm/drivers/cdns/implements/LocalCdn.d.ts +13 -6
- package/esm/drivers/cdns/implements/ThirdCdn.d.ts +34 -0
- package/esm/drivers/cdns/index.d.ts +2 -1
- package/esm/drivers/encoders/Encoder.d.ts +1 -1
- package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
- package/esm/drivers/encoders/IEncoder.d.ts +1 -1
- package/esm/drivers/encoders/implement/Base64Encoder.d.ts +2 -1
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/excels/implements/XlsxExcel.d.ts +1 -0
- package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -1
- package/esm/drivers/features/FeatureFactory.d.ts +1 -1
- package/esm/drivers/hashers/Hasher.d.ts +1 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +1 -1
- package/esm/drivers/hashers/IHasher.d.ts +1 -1
- package/esm/drivers/hashers/implement/Md5Hasher.d.ts +2 -1
- package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
- package/esm/drivers/https/Http.d.ts +2 -2
- package/esm/drivers/https/HttpFactory.d.ts +1 -1
- package/esm/drivers/https/entities/HttpMessage.d.ts +14 -3
- package/esm/drivers/https/entities/HttpRequest.d.ts +6 -2
- package/esm/drivers/https/implements/DefaultHttp.d.ts +9 -1
- package/esm/drivers/index.d.ts +2 -0
- package/esm/{plugins/types → drivers/messengers}/IMessenger.d.ts +2 -1
- package/esm/drivers/messengers/Messenger.d.ts +15 -0
- package/esm/drivers/messengers/MessengerFactory.d.ts +13 -0
- package/esm/drivers/messengers/implement/ConsoleMessenger.d.ts +15 -0
- package/esm/drivers/messengers/index.d.ts +4 -0
- package/esm/drivers/providers/IProvider.d.ts +6 -2
- package/esm/drivers/providers/Provider.d.ts +2 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +1 -1
- package/esm/drivers/providers/helpers/SqlHelper.d.ts +11 -0
- package/esm/drivers/providers/helpers/index.d.ts +2 -0
- package/esm/drivers/providers/implements/CookieProvider.d.ts +2 -0
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -0
- package/esm/drivers/providers/implements/StorageProvider.d.ts +3 -9
- package/esm/drivers/providers/index.d.ts +1 -0
- package/esm/drivers/signers/SignerFactory.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
- package/esm/drivers/tasks/ITask.d.ts +5 -0
- package/esm/drivers/tasks/Task.d.ts +1 -0
- package/esm/drivers/tasks/TaskFactory.d.ts +1 -1
- package/esm/drivers/tasks/implement/MemoryTask.d.ts +15 -0
- package/esm/drivers/templates/ITemplate.d.ts +11 -0
- package/esm/drivers/templates/Template.d.ts +6 -0
- package/esm/drivers/templates/TemplateFactory.d.ts +9 -0
- package/esm/drivers/templates/implement/LiquidTemplate.d.ts +6 -0
- package/esm/drivers/templates/index.d.ts +3 -0
- package/esm/drivers/videos/VideoFactory.d.ts +1 -1
- package/esm/drivers/voices/VoiceFactory.d.ts +1 -1
- package/esm/factorying/Factories.d.ts +27 -13
- package/esm/factorying/Factory.d.ts +16 -8
- package/esm/factorying/IFactory.d.ts +6 -6
- package/esm/factorying/index.d.ts +12 -3
- package/esm/helpers/DictionaryHelper.d.ts +3 -1
- package/esm/helpers/DomHelper.d.ts +24 -3
- package/esm/helpers/JsonHelper.d.ts +18 -10
- package/esm/helpers/ObjectHelper.d.ts +7 -3
- package/esm/helpers/TreeHelper.d.ts +1 -1
- package/esm/helpers/index.d.ts +1 -2
- package/esm/helpers/types/JsonConfig.d.ts +10 -0
- package/esm/helpers/types/TreeNodeProp.d.ts +3 -0
- package/esm/helpers/types/index.d.ts +2 -1
- package/esm/main.d.ts +2 -2
- package/esm/plugins/index.d.ts +0 -1
- package/esm/svcs/ISvc.d.ts +2 -1
- package/esm/svcs/Svc.d.ts +1 -0
- package/esm/svcs/SvcFactory.d.ts +4 -1
- package/esm/svcs/implement/ConfigSvc.d.ts +4 -0
- package/esm/svcs/implement/I18nSvc.d.ts +83 -0
- package/esm/svcs/implement/SettingSvc.d.ts +4 -0
- package/esm/svcs/implement/index.d.ts +2 -0
- package/esm/svcs/index.d.ts +14 -1
- package/esm/types/CreateFeOptions.d.ts +24 -0
- package/esm/types/{CreateOptions.d.ts → CreatePcOptions.d.ts} +2 -5
- package/esm/types/index.d.ts +3 -2
- package/esm/utilities/EventUtility.d.ts +11 -0
- package/esm/utilities/types/DragOptions.d.ts +2 -2
- package/esm/utilities/types/Rect.d.ts +4 -0
- package/esm/utilities/types/index.d.ts +2 -2
- package/package.json +16 -12
- package/dist/vendor-clone-NGbTzSwJ.js +0 -159
- package/dist/vendor-crypto-js-DWn5nTKL.js +0 -4997
- package/dist/vendor-xlsx-js-style-DMPNZPOx.js +0 -11862
- package/esm/coms/types/CodeProps.d.ts +0 -18
- package/esm/drivers/IDisposable.d.ts +0 -10
- package/esm/drivers/IDriver.d.ts +0 -10
- package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
- package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -13
- package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -16
- package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -10
- package/esm/drivers/driver-helper.d.ts +0 -46
- package/esm/drivers/factories/DriverFactory.d.ts +0 -64
- package/esm/drivers/factories/Factories.d.ts +0 -55
- package/esm/drivers/factories/Factory.d.ts +0 -25
- package/esm/drivers/factories/IFactory.d.ts +0 -18
- package/esm/drivers/factories/implement/CdnFactory.d.ts +0 -13
- package/esm/drivers/factories/implement/EncoderFactory.d.ts +0 -17
- package/esm/drivers/factories/implement/ExcelFactory.d.ts +0 -13
- package/esm/drivers/factories/implement/ExplainerFactory.d.ts +0 -6
- package/esm/drivers/factories/implement/FeatureFactory.d.ts +0 -13
- package/esm/drivers/factories/implement/HasherFactory.d.ts +0 -11
- package/esm/drivers/factories/implement/HttpFactory.d.ts +0 -18
- package/esm/drivers/factories/implement/ProviderFactory.d.ts +0 -18
- package/esm/drivers/factories/implement/SignerFactory.d.ts +0 -13
- package/esm/drivers/factories/implement/SsoFactory.d.ts +0 -17
- package/esm/drivers/factories/implement/TaskFactory.d.ts +0 -9
- package/esm/drivers/factories/implement/VideoFactory.d.ts +0 -3
- package/esm/drivers/factories/implement/VoiceFactory.d.ts +0 -6
- package/esm/drivers/factories/implement/index.d.ts +0 -11
- package/esm/drivers/factories/index.d.ts +0 -21
- package/esm/drivers/providers/implements/StorageHelper.d.ts +0 -34
- package/esm/drivers/requesters/IRequester.d.ts +0 -25
- package/esm/drivers/requesters/Requester.d.ts +0 -13
- package/esm/drivers/requesters/RequesterFactory.d.ts +0 -21
- package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
- package/esm/drivers/requesters/entities/HttpResponse.d.ts +0 -19
- package/esm/drivers/requesters/implements/DefaultRequester.d.ts +0 -12
- package/esm/drivers/requesters/implements/LocalRequester.d.ts +0 -43
- package/esm/drivers/requesters/implements/MkRequester.d.ts +0 -40
- package/esm/drivers/requesters/index.d.ts +0 -5
- package/esm/factories/Factories.d.ts +0 -55
- package/esm/factories/Factory.d.ts +0 -38
- package/esm/factories/IFactory.d.ts +0 -27
- package/esm/factories/index.d.ts +0 -26
- package/esm/helpers/ScriptHelper.d.ts +0 -31
- package/esm/helpers/array-helper.d.ts +0 -97
- package/esm/helpers/component-helper.d.ts +0 -10
- package/esm/helpers/cookie-helper.d.ts +0 -6
- package/esm/helpers/dictionary-helper.d.ts +0 -18
- package/esm/helpers/dom-helper.d.ts +0 -86
- package/esm/helpers/event-helper.d.ts +0 -30
- package/esm/helpers/file-helper.d.ts +0 -22
- package/esm/helpers/html-helper.d.ts +0 -10
- package/esm/helpers/i18n-helper.d.ts +0 -14
- package/esm/helpers/image-helper.d.ts +0 -10
- package/esm/helpers/json-helper.d.ts +0 -31
- package/esm/helpers/math-helper.d.ts +0 -46
- package/esm/helpers/micro-helper.d.ts +0 -10
- package/esm/helpers/mount-helper.d.ts +0 -14
- package/esm/helpers/object-helper.d.ts +0 -34
- package/esm/helpers/script-helper.d.ts +0 -31
- package/esm/helpers/scroll-helper.d.ts +0 -14
- package/esm/helpers/sign-helper.d.ts +0 -14
- package/esm/helpers/storage-helper.d.ts +0 -34
- package/esm/helpers/string-helper.d.ts +0 -94
- package/esm/helpers/task-helper.d.ts +0 -26
- package/esm/helpers/time-helper.d.ts +0 -62
- package/esm/helpers/tree-helper.d.ts +0 -54
- package/esm/helpers/type-helper.d.ts +0 -26
- package/esm/helpers/url-helper.d.ts +0 -96
- package/esm/plugins/types/IMessager.d.ts +0 -34
- package/esm/plugins/types/index.d.ts +0 -10
- package/esm/services/SettingService.d.ts +0 -5
- package/esm/services/index.d.ts +0 -15
- package/esm/servs/IServ.d.ts +0 -6
- package/esm/servs/Serv.d.ts +0 -4
- package/esm/servs/ServFactory.d.ts +0 -11
- package/esm/servs/implement/ConfigServ.d.ts +0 -66
- package/esm/servs/implement/DriverServ.d.ts +0 -36
- package/esm/servs/implement/EnvServ.d.ts +0 -14
- package/esm/servs/implement/LogServ.d.ts +0 -19
- package/esm/servs/implement/SettingServ.d.ts +0 -42
- package/esm/servs/implement/SocketServ.d.ts +0 -38
- package/esm/servs/implement/UserServ.d.ts +0 -47
- package/esm/servs/index.d.ts +0 -15
- package/esm/stores/config.d.ts +0 -59
- package/esm/stores/driver.d.ts +0 -41
- package/esm/stores/env.d.ts +0 -12
- package/esm/stores/index.d.ts +0 -7
- package/esm/stores/log.d.ts +0 -20
- package/esm/stores/setting.d.ts +0 -47
- package/esm/stores/socket.d.ts +0 -27
- package/esm/stores/user.d.ts +0 -44
- package/esm/svcs/proxies/driverSvc.d.ts +0 -18
- package/esm/svcs/proxies/index.d.ts +0 -2
- package/esm/thirds/index.d.ts +0 -8
- package/esm/vite.config.d.ts +0 -6
- /package/dist/{vendor-moment-h96o7c8I.js → assets/moment-h96o7c8I.js} +0 -0
- /package/dist/{vendor-sprintf-js-BPTdvBYM.js → assets/sprintf-js-BPTdvBYM.js} +0 -0
- /package/dist/{vendor-state-local-CEworIRt.js → assets/state-local-CEworIRt.js} +0 -0
- /package/dist/{vendor-underscore-B0BCaBxV.js → assets/underscore-B0BCaBxV.js} +0 -0
- /package/esm/coms/{Compare.vue.d.ts → controls/Compare.vue.d.ts} +0 -0
- /package/esm/coms/{RichText.vue.d.ts → controls/RichText.vue.d.ts} +0 -0
- /package/esm/coms/{types → controls/types}/RichTextOptions.d.ts +0 -0
- /package/esm/coms/{types → controls/types}/RichTextProps.d.ts +0 -0
- /package/esm/coms/{Col.vue.d.ts → layouts/Col.vue.d.ts} +0 -0
- /package/esm/coms/{Container.vue.d.ts → layouts/Container.vue.d.ts} +0 -0
- /package/esm/coms/{Row.vue.d.ts → layouts/Row.vue.d.ts} +0 -0
- /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
|
-
|
9
|
+
get instances(): T[];
|
10
10
|
/**
|
11
|
-
*
|
11
|
+
* 开启工厂
|
12
12
|
*/
|
13
|
-
|
13
|
+
open(): void;
|
14
14
|
/**
|
15
15
|
* 创建指定类型的实例
|
16
16
|
*/
|
17
|
-
create(type: string
|
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 };
|
@@ -22,7 +22,7 @@ declare class DomHelper {
|
|
22
22
|
/**
|
23
23
|
* 根据计算后的样式进行DOM过滤
|
24
24
|
*/
|
25
|
-
static filterStyle(doms:
|
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:
|
37
|
+
static parentUntil(dom: HTMLElement, cls: string): HTMLElement;
|
38
38
|
/**
|
39
39
|
* 查找第一个绝对定位的元素或backdrop元素,否则使用html元素
|
40
40
|
*/
|
41
|
-
static parentAbsolute(dom:
|
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
|
9
|
+
static serializeWithoutString(value: any): string;
|
14
10
|
/**
|
15
|
-
*
|
11
|
+
* 把对象格式化为Json字符串
|
16
12
|
*/
|
17
|
-
static
|
13
|
+
static serialize(value: any, config?: boolean | JsonConfig): string;
|
18
14
|
/**
|
19
15
|
* 反序列化成json对象
|
20
16
|
*/
|
21
|
-
static
|
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,
|
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,
|
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[],
|
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,
|
52
|
+
static map: (tree: any[], prevChildProp: string, childProp: string, fn: Function) => any[];
|
53
53
|
}
|
54
54
|
export default TreeHelper;
|
package/esm/helpers/index.d.ts
CHANGED
@@ -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,
|
23
|
+
export { ComponentHelper, ArrayHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
|
package/esm/main.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
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: (
|
15
|
+
declare let createFe: (options?: CreateFeOptions) => Promise<void>;
|
16
16
|
export { createFe };
|
package/esm/plugins/index.d.ts
CHANGED
package/esm/svcs/ISvc.d.ts
CHANGED
package/esm/svcs/Svc.d.ts
CHANGED
package/esm/svcs/SvcFactory.d.ts
CHANGED
@@ -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;
|
package/esm/svcs/index.d.ts
CHANGED
@@ -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
|
-
|
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
|
15
|
+
export default CreatePcOptions;
|
package/esm/types/index.d.ts
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
import
|
2
|
-
|
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
|
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?:
|
22
|
+
range?: Rect;
|
23
23
|
/**
|
24
24
|
* 吸附检测的距离,设置吸附位置必须设置拖拽范围(依赖宽度等信息)
|
25
25
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import DragOptions from "./DragOptions";
|
2
2
|
import DragEvent from "./DragEvent";
|
3
3
|
import Position from "./Position";
|
4
|
-
import
|
5
|
-
export { type DragOptions, DragEvent, Position,
|
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.
|
3
|
+
"version": "1.0.10",
|
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": "./main.
|
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.
|
47
|
-
"@vitejs/plugin-vue": "5.1.
|
48
|
-
"@vitejs/plugin-vue-jsx": "4.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.
|
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
|
}
|