halo-fe 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. package/dist/main.js +2234 -1871
  2. package/dist/{vendor-underscore-DVTek3G4.js → vendor-underscore-B0BCaBxV.js} +58 -58
  3. package/esm/coms/RichText.vue.d.ts +1 -1
  4. package/esm/coms/Timer.vue.d.ts +20 -0
  5. package/esm/coms/index.d.ts +4 -1
  6. package/esm/coms/tables/Table.vue.d.ts +2 -0
  7. package/esm/coms/tables/index.d.ts +1 -0
  8. package/esm/coms/tabs/Tab.vue.d.ts +12 -0
  9. package/esm/coms/tabs/TabPane.vue.d.ts +2 -0
  10. package/esm/coms/tabs/index.d.ts +2 -0
  11. package/esm/coms/tabs/types/TabProps.d.ts +7 -0
  12. package/esm/coms/tabs/types/index.d.ts +2 -0
  13. package/esm/drivers/IDisposable.d.ts +6 -0
  14. package/esm/drivers/bridges/IBridge.d.ts +1 -5
  15. package/esm/drivers/builders/Builder.d.ts +8 -0
  16. package/esm/drivers/builders/BuilderFactory.d.ts +9 -0
  17. package/esm/drivers/builders/IBuilder.d.ts +7 -0
  18. package/esm/drivers/builders/implement/JsonBuilder.d.ts +5 -0
  19. package/esm/drivers/builders/implement/MongoBuilder.d.ts +5 -0
  20. package/esm/drivers/builders/implement/MySqlBuilder.d.ts +5 -0
  21. package/esm/drivers/builders/implement/SqlBuilder.d.ts +5 -0
  22. package/esm/drivers/builders/index.d.ts +2 -0
  23. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  24. package/esm/drivers/cdns/ICdn.d.ts +2 -1
  25. package/esm/drivers/cdns/implements/BootCdn.d.ts +2 -2
  26. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +2 -2
  27. package/esm/drivers/cdns/implements/LocalCdn.d.ts +1 -2
  28. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +2 -2
  29. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +2 -2
  30. package/esm/drivers/cdns/index.d.ts +2 -1
  31. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
  32. package/esm/drivers/encoders/index.d.ts +2 -1
  33. package/esm/drivers/excels/Excel.d.ts +10 -0
  34. package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
  35. package/esm/drivers/excels/IExcel.d.ts +2 -9
  36. package/esm/drivers/excels/implements/XlsxExcel.d.ts +4 -4
  37. package/esm/drivers/excels/index.d.ts +2 -1
  38. package/esm/drivers/explainers/ExplainerFactory.d.ts +1 -1
  39. package/esm/drivers/explainers/IExplainer.d.ts +1 -1
  40. package/esm/drivers/explainers/implement/JsonExplainer.d.ts +3 -0
  41. package/esm/drivers/explainers/index.d.ts +2 -1
  42. package/esm/drivers/features/FeatureFactory.d.ts +1 -1
  43. package/esm/drivers/features/IFeature.d.ts +1 -1
  44. package/esm/drivers/features/index.d.ts +2 -1
  45. package/esm/drivers/hashers/HasherFactory.d.ts +1 -1
  46. package/esm/drivers/hashers/IHasher.d.ts +0 -1
  47. package/esm/drivers/hashers/index.d.ts +2 -1
  48. package/esm/drivers/https/HttpFactory.d.ts +6 -1
  49. package/esm/drivers/https/IHttp.d.ts +2 -6
  50. package/esm/drivers/https/index.d.ts +2 -1
  51. package/esm/drivers/index.d.ts +3 -1
  52. package/esm/drivers/providers/IProvider.d.ts +5 -1
  53. package/esm/drivers/providers/Provider.d.ts +9 -9
  54. package/esm/drivers/providers/ProviderFactory.d.ts +5 -1
  55. package/esm/drivers/providers/implements/CookieProvider.d.ts +15 -1
  56. package/esm/drivers/providers/implements/StorageProvider.d.ts +29 -0
  57. package/esm/drivers/providers/index.d.ts +2 -1
  58. package/esm/drivers/signers/ISigner.d.ts +1 -1
  59. package/esm/drivers/signers/SignerFactory.d.ts +1 -1
  60. package/esm/drivers/signers/index.d.ts +2 -1
  61. package/esm/drivers/ssos/ISso.d.ts +5 -8
  62. package/esm/drivers/ssos/Sso.d.ts +18 -0
  63. package/esm/drivers/ssos/SsoFactory.d.ts +2 -3
  64. package/esm/drivers/ssos/entities/SsoUser.d.ts +6 -0
  65. package/esm/drivers/ssos/implements/AnonymousSso.d.ts +11 -9
  66. package/esm/drivers/ssos/implements/BearerSso.d.ts +11 -10
  67. package/esm/drivers/ssos/implements/NioSso.d.ts +9 -7
  68. package/esm/drivers/ssos/implements/SecretSso.d.ts +9 -9
  69. package/esm/drivers/ssos/implements/WeiXinSso.d.ts +4 -7
  70. package/esm/drivers/ssos/index.d.ts +3 -1
  71. package/esm/drivers/tasks/ITask.d.ts +10 -3
  72. package/esm/drivers/tasks/Task.d.ts +2 -0
  73. package/esm/drivers/tasks/TaskFactory.d.ts +9 -0
  74. package/esm/drivers/tasks/implement/MemoryTask.d.ts +2 -0
  75. package/esm/drivers/tasks/index.d.ts +2 -1
  76. package/esm/drivers/types/IDispose.d.ts +10 -0
  77. package/esm/drivers/types/IDriver.d.ts +10 -0
  78. package/esm/drivers/types/IOpen.d.ts +10 -0
  79. package/esm/drivers/types/index.d.ts +4 -0
  80. package/esm/drivers/videos/IVideo.d.ts +4 -0
  81. package/esm/drivers/videos/VideoFactory.d.ts +4 -1
  82. package/esm/drivers/videos/index.d.ts +2 -1
  83. package/esm/drivers/voices/IVoice.d.ts +2 -2
  84. package/esm/drivers/voices/Voice.d.ts +5 -2
  85. package/esm/drivers/voices/VoiceFactory.d.ts +1 -1
  86. package/esm/drivers/voices/index.d.ts +2 -1
  87. package/esm/factories/Factories.d.ts +55 -0
  88. package/esm/factories/Factory.d.ts +38 -0
  89. package/esm/factories/IFactory.d.ts +27 -0
  90. package/esm/factories/index.d.ts +26 -0
  91. package/esm/factorying/Factories.d.ts +59 -0
  92. package/esm/factorying/Factory.d.ts +38 -0
  93. package/esm/factorying/IFactory.d.ts +27 -0
  94. package/esm/factorying/index.d.ts +23 -0
  95. package/esm/helpers/ArrayHelper.d.ts +44 -32
  96. package/esm/helpers/DictionaryHelper.d.ts +12 -0
  97. package/esm/helpers/TimeHelper.d.ts +1 -1
  98. package/esm/helpers/index.d.ts +1 -2
  99. package/esm/main.d.ts +1 -0
  100. package/esm/plugins/Ref.d.ts +7 -0
  101. package/esm/plugins/index.d.ts +2 -1
  102. package/esm/svcs/implement/SettingSvc.d.ts +24 -0
  103. package/esm/svcs/index.d.ts +26 -2
  104. package/esm/utilities/ListDelta.d.ts +10 -0
  105. package/esm/utilities/index.d.ts +4 -3
  106. package/package.json +7 -7
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 驱动接口
3
+ */
4
+ interface IDriver {
5
+ /**
6
+ * 类型
7
+ */
8
+ type: string;
9
+ }
10
+ export default IDriver;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * 开启接口
3
+ */
4
+ interface IOpen {
5
+ /**
6
+ * 开启
7
+ */
8
+ open(conn?: string): Promise<void>;
9
+ }
10
+ export default IOpen;
@@ -0,0 +1,4 @@
1
+ import IDispose from "./IDispose";
2
+ import IDriver from "./IDriver";
3
+ import IOpen from "./IOpen";
4
+ export { type IDispose, type IDriver, type IOpen };
@@ -0,0 +1,4 @@
1
+ import { IDriver } from "../types";
2
+ interface IVideo extends IDriver {
3
+ }
4
+ export default IVideo;
@@ -1,3 +1,6 @@
1
- declare class VideoFactory {
1
+ import Factory from "../../factorying/Factory";
2
+ import IVideo from "./IVideo";
3
+ declare class VideoFactory extends Factory<IVideo> {
4
+ getInstances(): IVideo[];
2
5
  }
3
6
  export default VideoFactory;
@@ -1 +1,2 @@
1
- export {};
1
+ import VideoFactory from "./VideoFactory";
2
+ export { VideoFactory };
@@ -1,4 +1,4 @@
1
- import IDriver from "../IDriver";
1
+ import { IDriver } from "../types";
2
2
  export interface IVoice extends IDriver {
3
3
  /**
4
4
  * 开始录音
@@ -11,5 +11,5 @@ export interface IVoice extends IDriver {
11
11
  /**
12
12
  * 下载录音
13
13
  */
14
- download(): any;
14
+ download(): void;
15
15
  }
@@ -1,8 +1,11 @@
1
1
  import { IVoice } from "./IVoice";
2
+ /**
3
+ * 声音处理基类
4
+ */
2
5
  declare abstract class Voice implements IVoice {
3
6
  type: string;
4
- abstract download(): any;
5
- abstract endRecord(): any;
6
7
  abstract startRecord(): string;
8
+ abstract download(): void;
9
+ abstract endRecord(): string;
7
10
  }
8
11
  export default Voice;
@@ -1,5 +1,5 @@
1
+ import Factory from "../../factorying/Factory";
1
2
  import { IVoice } from "./IVoice";
2
- import Factory from "../factories/Factory";
3
3
  declare class VoiceFactory extends Factory<IVoice> {
4
4
  getInstances(): IVoice[];
5
5
  }
@@ -1 +1,2 @@
1
- export {};
1
+ import VoiceFactory from "./VoiceFactory";
2
+ export { VoiceFactory };
@@ -0,0 +1,55 @@
1
+ import { CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, HttpFactory, ProviderFactory, SignerFactory, SsoFactory } from "../drivers";
2
+ /**
3
+ * 驱动工厂类
4
+ */
5
+ declare class Factories {
6
+ /**
7
+ * 工厂缓存
8
+ */
9
+ static mappings: {};
10
+ /**
11
+ * 并缓存工厂实例
12
+ */
13
+ static create<T>(name: string, type: any): T;
14
+ /**
15
+ *CDN工厂
16
+ */
17
+ static get cdn(): CdnFactory;
18
+ /**
19
+ *编码器工厂
20
+ */
21
+ static get encoder(): EncoderFactory;
22
+ /**
23
+ *Excel工厂
24
+ */
25
+ static get excel(): ExcelFactory;
26
+ /**
27
+ *Explainer工厂
28
+ */
29
+ static get explainer(): ExplainerFactory;
30
+ /**
31
+ *特征工厂
32
+ */
33
+ static get feature(): FeatureFactory;
34
+ /**
35
+ *哈希工厂
36
+ */
37
+ static get hasher(): HasherFactory;
38
+ /**
39
+ *提供程序工厂
40
+ */
41
+ static get provider(): ProviderFactory;
42
+ /**
43
+ *Http请求工厂
44
+ */
45
+ static get http(): HttpFactory;
46
+ /**
47
+ *签名工厂
48
+ */
49
+ static get signer(): SignerFactory;
50
+ /**
51
+ *SSO工厂
52
+ */
53
+ static get sso(): SsoFactory;
54
+ }
55
+ export default Factories;
@@ -0,0 +1,38 @@
1
+ import IFactory from "./IFactory";
2
+ import IDriver from "../drivers/IDriver";
3
+ import { Ref } from "../plugins";
4
+ /**
5
+ * 工厂基类
6
+ */
7
+ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
8
+ /**
9
+ * 开启
10
+ */
11
+ open(): void;
12
+ /**
13
+ * 实例集合
14
+ * 或者使用:Record<string, string>
15
+ */
16
+ private instances;
17
+ /**
18
+ * 获取当前驱动所有实例
19
+ */
20
+ abstract getInstances(): T[];
21
+ /**
22
+ * 创建指定类型驱动
23
+ */
24
+ create(type: string, conn?: string): Promise<T>;
25
+ /**
26
+ * 根据主键创建驱动,并返回加载后的驱动信息
27
+ */
28
+ createById(id: number, driverRef?: Ref<any>): Promise<T>;
29
+ /**
30
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
31
+ */
32
+ createIfAbsent(name: string, type?: string, open?: (entity: T) => void): Promise<T>;
33
+ /**
34
+ * 加载驱动明细
35
+ */
36
+ loadDriver(id: number): Promise<any>;
37
+ }
38
+ export default Factory;
@@ -0,0 +1,27 @@
1
+ import { Ref } from "../plugins";
2
+ /**
3
+ * 工厂接口
4
+ */
5
+ interface IFactory<T> {
6
+ /**
7
+ * 开启工厂
8
+ */
9
+ open(): void;
10
+ /**
11
+ * 获取当前驱动所有实例
12
+ */
13
+ getInstances(): T[];
14
+ /**
15
+ * 创建指定类型的实例
16
+ */
17
+ create(type: string, conn?: string): Promise<T>;
18
+ /**
19
+ * 根据主键创建驱动,并返回加载后的驱动信息
20
+ */
21
+ createById(id: number, driverRef?: Ref<any>): Promise<T>;
22
+ /**
23
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
24
+ */
25
+ createIfAbsent(name: string, type: string, open?: (entity: T) => void): Promise<T>;
26
+ }
27
+ export default IFactory;
@@ -0,0 +1,26 @@
1
+ import Factories from "./Factories";
2
+ import { IEncoder } from "../drivers/encoders";
3
+ import { IHttp } from "../drivers/https";
4
+ import { IHasher } from "../drivers/hashers";
5
+ import { IProvider } from "../drivers";
6
+ /**
7
+ * 默认base64编码
8
+ */
9
+ declare let base64: IEncoder;
10
+ /**
11
+ * 默认Http请求对象
12
+ */
13
+ declare let http: IHttp;
14
+ /**
15
+ * MD5 hash计算
16
+ */
17
+ declare let md5: IHasher;
18
+ /**
19
+ * 默认Storage
20
+ */
21
+ declare let storage: IProvider;
22
+ /**
23
+ * 初始化默认驱动实例
24
+ */
25
+ declare let initDriver: () => Promise<void>;
26
+ export { Factories, base64, http, md5, storage, initDriver };
@@ -0,0 +1,59 @@
1
+ import { CdnFactory, EncoderFactory, ExcelFactory, ExplainerFactory, FeatureFactory, HasherFactory, HttpFactory, ProviderFactory, SignerFactory, SsoFactory, TaskFactory } from "../drivers";
2
+ /**
3
+ * 驱动工厂类
4
+ */
5
+ declare class Factories {
6
+ /**
7
+ * 工厂缓存
8
+ */
9
+ static mappings: {};
10
+ /**
11
+ * 并缓存工厂实例
12
+ */
13
+ static create<T>(type: any): T;
14
+ /**
15
+ *CDN工厂
16
+ */
17
+ static get cdn(): CdnFactory;
18
+ /**
19
+ *编码器工厂
20
+ */
21
+ static get encoder(): EncoderFactory;
22
+ /**
23
+ *Excel工厂
24
+ */
25
+ static get excel(): ExcelFactory;
26
+ /**
27
+ *Explainer工厂
28
+ */
29
+ static get explainer(): ExplainerFactory;
30
+ /**
31
+ *特征工厂
32
+ */
33
+ static get feature(): FeatureFactory;
34
+ /**
35
+ *哈希工厂
36
+ */
37
+ static get hasher(): HasherFactory;
38
+ /**
39
+ *Http请求工厂
40
+ */
41
+ static get http(): HttpFactory;
42
+ /**
43
+ *提供程序工厂
44
+ */
45
+ static get provider(): ProviderFactory;
46
+ /**
47
+ *签名工厂
48
+ */
49
+ static get signer(): SignerFactory;
50
+ /**
51
+ *SSO工厂
52
+ */
53
+ static get sso(): SsoFactory;
54
+ /**
55
+ *Task工厂
56
+ */
57
+ static get task(): TaskFactory;
58
+ }
59
+ export default Factories;
@@ -0,0 +1,38 @@
1
+ import IFactory from "./IFactory";
2
+ import IDriver from "../drivers/types/IDriver";
3
+ import { Ref } from "../plugins";
4
+ /**
5
+ * 工厂基类
6
+ */
7
+ declare abstract class Factory<T extends IDriver> implements IFactory<T> {
8
+ /**
9
+ * 开启
10
+ */
11
+ open(): void;
12
+ /**
13
+ * 实例集合
14
+ * 或者使用:Record<string, string>
15
+ */
16
+ private instances;
17
+ /**
18
+ * 获取当前驱动所有实例
19
+ */
20
+ abstract getInstances(): T[];
21
+ /**
22
+ * 创建指定类型驱动
23
+ */
24
+ create(type: string, conn?: string): Promise<T>;
25
+ /**
26
+ * 根据主键创建驱动,并返回加载后的驱动信息
27
+ */
28
+ createById(id: number, driverRef?: Ref<any>): Promise<T>;
29
+ /**
30
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
31
+ */
32
+ createIfAbsent(name: string, type?: string, open?: (entity: T) => void): Promise<T>;
33
+ /**
34
+ * 加载驱动明细
35
+ */
36
+ loadDriver(id: number): Promise<any>;
37
+ }
38
+ export default Factory;
@@ -0,0 +1,27 @@
1
+ import { Ref } from "../plugins";
2
+ /**
3
+ * 工厂接口
4
+ */
5
+ interface IFactory<T> {
6
+ /**
7
+ * 开启工厂
8
+ */
9
+ open(): void;
10
+ /**
11
+ * 获取当前驱动所有实例
12
+ */
13
+ getInstances(): T[];
14
+ /**
15
+ * 创建指定类型的实例
16
+ */
17
+ create(type: string, conn?: string): Promise<T>;
18
+ /**
19
+ * 根据主键创建驱动,并返回加载后的驱动信息
20
+ */
21
+ createById(id: number, driverRef?: Ref<any>): Promise<T>;
22
+ /**
23
+ * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
24
+ */
25
+ createIfAbsent(name: string, type: string, open?: (entity: T) => void): Promise<T>;
26
+ }
27
+ export default IFactory;
@@ -0,0 +1,23 @@
1
+ import Factories from "./Factories";
2
+ import { IEncoder, IHasher, IHttp, IProvider } from "../drivers";
3
+ /**
4
+ * 默认base64编码
5
+ */
6
+ declare let base64: IEncoder;
7
+ /**
8
+ * 默认Http请求对象
9
+ */
10
+ declare let http: IHttp;
11
+ /**
12
+ * MD5 hash计算
13
+ */
14
+ declare let md5: IHasher;
15
+ /**
16
+ * 默认Storage
17
+ */
18
+ declare let storage: IProvider;
19
+ /**
20
+ * 初始化默认驱动实例
21
+ */
22
+ declare let initDriver: () => Promise<void>;
23
+ export { base64, http, md5, storage, initDriver, Factories };
@@ -5,7 +5,15 @@ declare class ArrayHelper {
5
5
  /**
6
6
  * 获取指定数组分成每片指定长度后的集合
7
7
  */
8
- static getChunks: (arr: any[], chunkSize: number) => any[];
8
+ static getChunks: (entities: any[], size: number) => any[][];
9
+ /**
10
+ * 获取分成指定片数量后的集合
11
+ */
12
+ static getChunksByCount(entities: any[], count: number): any[][];
13
+ /**
14
+ * 获取指定开始位置的指定数量的集合
15
+ */
16
+ static getRange(entities: any[], index: number, count?: number): any[];
9
17
  /**
10
18
  * 取两个集合的交集
11
19
  */
@@ -15,49 +23,41 @@ declare class ArrayHelper {
15
23
  */
16
24
  static except: (from: any[], target: any[] | any, equals?: (a: any, b: any) => boolean) => any[];
17
25
  /**
18
- * 是否包含
26
+ * 求最大值,数据类型的比较函数要自己转换为数值类型
19
27
  */
20
- static contains: (arr: any[], element: any) => boolean;
28
+ static max: (entities: any[], func: Function) => any;
21
29
  /**
22
- * 判断指定集合中的指定属性的值,是否包含关键词
30
+ * 求最小值,数据类型的比较函数要自己转换为数值类型
23
31
  */
24
- static filterContains: (arr: any[], props: string[], keywords: string) => any[];
32
+ static min: (entities: any[], func: Function) => any;
25
33
  /**
26
- * 判断2个数组是否每个元素都相同
34
+ * 求平均值
27
35
  */
28
- static same: (arr1: any[], arr2: any[]) => boolean;
36
+ static avg: (entities: any[], func: Function, digits?: number) => number;
29
37
  /**
30
- * 求最大值,数据类型的比较函数要自己转换为数值类型
38
+ * 求和
31
39
  */
32
- static max: (arr: any[], func: Function) => any;
40
+ static sum: (entities: any[], func: Function, digits?: number) => number;
33
41
  /**
34
- * 求最小值,数据类型的比较函数要自己转换为数值类型
42
+ * 是否包含
35
43
  */
36
- static min: (arr: any[], func: Function) => any;
44
+ static contains: (arr: any[], element: any) => boolean;
37
45
  /**
38
- * 求平均值
46
+ * 判断指定集合中的指定属性的值,是否包含关键词
39
47
  */
40
- static avg: (arr: any[], func: Function, digits?: number) => number;
48
+ static filterContains: (arr: any[], props: string[], keywords: string) => any[];
41
49
  /**
42
- * 求和
50
+ * 判断2个数组是否每个元素都相同
43
51
  */
44
- static sum: (arr: any[], func: Function, digits?: number) => number;
52
+ static same: (arr1: any[], arr2: any[]) => boolean;
45
53
  /**
46
54
  * 对数组元素根据指定函数进行去重,并返回去重后的值的新数组 n=>n.value
47
55
  */
48
- static distinct: (arr: any[], selector: Function) => any[];
49
- /**
50
- * 不存在某元素时才添加某元素
51
- */
52
- static pushIfNotExist: (arr: any[], element: any) => void;
56
+ static distinct: (entities: any[], selector: Function) => any[];
53
57
  /**
54
58
  * 连接值构建成新数组,重复项也会自动构建,不存在的值,会自动创建为一个新项
55
59
  */
56
60
  static fromValues: (arrValues: any[], arr: any[], propertyValue: string, propertyText: string) => any[];
57
- /**
58
- * 删除指定元素,并返回删除后的字符串
59
- */
60
- static removeIndex: (str: string, index: number, split: string) => string;
61
61
  /**
62
62
  * 分割指定字符串为数组,字符串为空,返回空数组
63
63
  * @param input
@@ -72,27 +72,39 @@ declare class ArrayHelper {
72
72
  /**
73
73
  * 在指定元素前插入新元素,返回插入元素的索引
74
74
  */
75
- static insert: (array: object[], selectedRow: object, row: object) => number;
75
+ static insert: (entities: object[], selectedRow: object, row: object) => number;
76
76
  /**
77
77
  * 在指定元素后插入新元素,返回插入元素的索引
78
78
  */
79
- static append: (array: object[], selectedRow: object, row: object) => number;
79
+ static append: (entities: object[], selectedRow: object, row: object) => number;
80
+ /**
81
+ * 不存在某元素时才添加某元素
82
+ */
83
+ static pushIfNotExist: (entities: any[], element: any) => void;
84
+ /**
85
+ * 把集合创建成另一个集合
86
+ */
87
+ static create<T>(entities: any[], handler: (entity: any, i: number) => T): T[];
80
88
  /**
81
89
  * 删除执行数组中的指定对象或者集合
82
90
  */
83
- static remove: (array: any[], elements: any[] | any) => void;
91
+ static remove: (entities: any[], elements: any[] | any) => void;
92
+ /**
93
+ * 删除指定元素,并返回删除后的字符串
94
+ */
95
+ static removeIndex: (str: string, index: number, split: string) => string;
84
96
  /**
85
97
  * 按照指定函数对数组排序
86
98
  * order: asc desc null
87
99
  */
88
- static orderBy: (array: any[], handlers: Function | Function[], order?: string) => any[];
100
+ static orderBy: (entities: any[], handlers: Function | Function[], order?: string) => any[];
89
101
  /**
90
- * 分组
102
+ * 分组,封装成字典而不是集合,大数据场景速度提升百倍
91
103
  */
92
- static groupByArray: (array: any[], keyFunc: (item: any) => any) => any[];
104
+ static groupBy: (entities: any[], keyHandler: (entity: any) => any, valueHandler?: (item: any[]) => any) => object;
93
105
  /**
94
- * 分组,封装成字典而不是集合,大数据场景速度提升百倍
106
+ * 分组
95
107
  */
96
- static groupBy: (array: any[], keyFunc: (item: any) => any, valueHandler?: (item: any) => any) => object;
108
+ static groupByArray: (entities: any[], keyFunc: (item: any) => any) => any[];
97
109
  }
98
110
  export default ArrayHelper;
@@ -14,5 +14,17 @@ declare class DictionaryHelper {
14
14
  * 连接字典
15
15
  */
16
16
  static join(obj: object, valueHandler?: (value: string) => string, delimiter?: string, join?: string): string;
17
+ /**
18
+ * 把字典转换成数组
19
+ */
20
+ static toList(entity: {
21
+ [key: string]: any[];
22
+ }, valueHandler: (entity: {
23
+ key: string;
24
+ value: any;
25
+ }) => void): {
26
+ key: string;
27
+ value: any[];
28
+ }[];
17
29
  }
18
30
  export default DictionaryHelper;
@@ -13,7 +13,7 @@ declare class TimeHelper {
13
13
  /**
14
14
  * 格式化时间
15
15
  */
16
- static format: (value: string, format: string) => string;
16
+ static format: (value: number, format: string) => string;
17
17
  /**
18
18
  * 获取当前日期时间的字符串
19
19
  */
@@ -16,10 +16,9 @@ import TaskHelper from "./TaskHelper";
16
16
  import TypeHelper from "./TypeHelper";
17
17
  import TimeHelper from "./TimeHelper";
18
18
  import TreeHelper from "./TreeHelper";
19
- import StorageHelper from "../drivers/providers/implements/StorageHelper";
20
19
  import ScrollHelper from "./ScrollHelper";
21
20
  import JsonHelper from "./JsonHelper";
22
21
  import BrowserHelper from "./BrowserHelper";
23
22
  import UrlHelper from "./UrlHelper";
24
23
  import SignHelper from "./SignHelper";
25
- export { ComponentHelper, ArrayHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, ScriptHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, StorageHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, 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 };
package/esm/main.d.ts CHANGED
@@ -2,6 +2,7 @@ import { IMessenger } from "./plugins";
2
2
  import "./styles/index.scss";
3
3
  export * from "./coms";
4
4
  export * from "./drivers";
5
+ export * from "./factorying";
5
6
  export * from "./helpers";
6
7
  export * from "./plugins";
7
8
  export * from "./repos";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 引用类型
3
+ */
4
+ declare class Ref<T> {
5
+ value: T;
6
+ }
7
+ export default Ref;
@@ -1,9 +1,10 @@
1
1
  import loader from "@monaco-editor/loader";
2
2
  import type * as Monaco from 'monaco-editor/esm/vs/editor/editor.api';
3
3
  import moment from "moment";
4
+ import Ref from "./Ref";
4
5
  /**
5
6
  * 异步加载echarts
6
7
  */
7
8
  declare let loadEcharts: () => Promise<unknown>;
8
9
  export * from "./types";
9
- export { loader, Monaco, moment, loadEcharts };
10
+ export { loader, Monaco, moment, loadEcharts, Ref };
@@ -5,17 +5,41 @@ declare class SettingSvc {
5
5
  loaded: boolean;
6
6
  particles: boolean;
7
7
  home: string;
8
+ /**
9
+ * 前端默认背景
10
+ */
8
11
  background: any;
12
+ /**
13
+ * 前端默认字体
14
+ */
9
15
  font: string;
16
+ /**
17
+ * 前端默认语言
18
+ */
10
19
  language: string;
20
+ /**
21
+ * 前端默认布局
22
+ */
11
23
  layout: string;
24
+ /**
25
+ * 前端默认主题
26
+ */
12
27
  theme: string;
13
28
  themes: any[];
14
29
  layouts: any[];
15
30
  backgrounds: any[];
31
+ /**
32
+ * 本地化语言集合
33
+ */
16
34
  locales: any[];
17
35
  fonts: any;
36
+ /**
37
+ * SSO信息
38
+ */
18
39
  ssos: any[];
40
+ /**
41
+ * 前端默认尺寸
42
+ */
19
43
  size: string;
20
44
  watermark: any;
21
45
  app: string;