halo-fe 1.0.22 → 1.0.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/dist/assets/{liquidjs-C-LVcoaY.js → liquidjs-B8dqQyVv.js} +639 -632
  2. package/dist/main.js +4156 -3643
  3. package/esm/coms/Empty.vue.d.ts +15 -13
  4. package/esm/coms/Fill.vue.d.ts +14 -5
  5. package/esm/coms/Scroller.vue.d.ts +19 -16
  6. package/esm/coms/Timer.vue.d.ts +12 -5
  7. package/esm/coms/conditions/Condition.vue.d.ts +1 -10
  8. package/esm/coms/conditions/Index.vue.d.ts +1 -10
  9. package/esm/coms/controls/Code.vue.d.ts +19 -17
  10. package/esm/coms/controls/Compare.vue.d.ts +11 -19
  11. package/esm/coms/controls/Option.vue.d.ts +1 -1
  12. package/esm/coms/controls/RichText.vue.d.ts +6 -15
  13. package/esm/coms/controls/Select.vue.d.ts +1 -1
  14. package/esm/coms/layouts/Col.vue.d.ts +11 -4
  15. package/esm/coms/layouts/Container.vue.d.ts +15 -11
  16. package/esm/coms/layouts/Row.vue.d.ts +11 -14
  17. package/esm/coms/progresses/Progress.vue.d.ts +4 -16
  18. package/esm/coms/progresses/SocketProgress.vue.d.ts +15 -8
  19. package/esm/coms/tables/Table.vue.d.ts +1 -1
  20. package/esm/coms/tabs/Tab.vue.d.ts +1 -10
  21. package/esm/coms/tabs/TabPane.vue.d.ts +1 -1
  22. package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
  23. package/esm/drivers/encoders/EncoderFactory.d.ts +1 -1
  24. package/esm/drivers/excels/ExcelFactory.d.ts +2 -2
  25. package/esm/drivers/features/FeatureFactory.d.ts +1 -1
  26. package/esm/drivers/hashers/HasherFactory.d.ts +4 -1
  27. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +1 -1
  28. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +1 -1
  29. package/esm/drivers/helpers/@types/JsonConfig.d.ts +10 -0
  30. package/esm/drivers/helpers/@types/TreeNodeProp.d.ts +9 -0
  31. package/esm/drivers/helpers/@types/index.d.ts +3 -0
  32. package/esm/drivers/helpers/Helper.d.ts +8 -0
  33. package/esm/drivers/helpers/HelperFactory.d.ts +32 -0
  34. package/esm/drivers/helpers/IHelper.d.ts +4 -0
  35. package/esm/drivers/helpers/implements/ArrayHelper.d.ts +123 -0
  36. package/esm/drivers/helpers/implements/BrowserHelper.d.ts +12 -0
  37. package/esm/drivers/helpers/implements/ComponentHelper.d.ts +20 -0
  38. package/esm/drivers/helpers/implements/DictionaryHelper.d.ts +40 -0
  39. package/esm/drivers/helpers/implements/DomHelper.d.ts +118 -0
  40. package/esm/drivers/helpers/implements/EventHelper.d.ts +32 -0
  41. package/esm/drivers/helpers/implements/FileHelper.d.ts +24 -0
  42. package/esm/drivers/helpers/implements/HtmlHelper.d.ts +16 -0
  43. package/esm/drivers/helpers/implements/ImageHelper.d.ts +12 -0
  44. package/esm/drivers/helpers/implements/JsonHelper.d.ts +49 -0
  45. package/esm/drivers/helpers/implements/MathHelper.d.ts +52 -0
  46. package/esm/drivers/helpers/implements/MicroHelper.d.ts +12 -0
  47. package/esm/drivers/helpers/implements/MountHelper.d.ts +16 -0
  48. package/esm/drivers/helpers/implements/ObjectHelper.d.ts +44 -0
  49. package/esm/drivers/helpers/implements/ScrollHelper.d.ts +16 -0
  50. package/esm/drivers/helpers/implements/SignHelper.d.ts +16 -0
  51. package/esm/drivers/helpers/implements/StringHelper.d.ts +104 -0
  52. package/esm/drivers/helpers/implements/TaskHelper.d.ts +28 -0
  53. package/esm/drivers/helpers/implements/TimeHelper.d.ts +68 -0
  54. package/esm/drivers/helpers/implements/TreeHelper.d.ts +56 -0
  55. package/esm/drivers/helpers/implements/TypeHelper.d.ts +28 -0
  56. package/esm/drivers/helpers/implements/UrlHelper.d.ts +90 -0
  57. package/esm/drivers/helpers/index.d.ts +24 -0
  58. package/esm/drivers/https/HttpFactory.d.ts +1 -1
  59. package/esm/drivers/i18ns/II18n.d.ts +1 -1
  60. package/esm/drivers/index.d.ts +2 -0
  61. package/esm/drivers/providers/ProviderFactory.d.ts +1 -1
  62. package/esm/drivers/signers/SignerFactory.d.ts +1 -1
  63. package/esm/drivers/signers/implements/DefaultSigner.d.ts +1 -1
  64. package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
  65. package/esm/drivers/utilities/@types/DragEvent.d.ts +11 -0
  66. package/esm/drivers/utilities/@types/DragOptions.d.ts +28 -0
  67. package/esm/drivers/utilities/@types/Position.d.ts +15 -0
  68. package/esm/drivers/utilities/@types/Rect.d.ts +10 -0
  69. package/esm/drivers/utilities/@types/index.d.ts +5 -0
  70. package/esm/drivers/utilities/IUtility.d.ts +4 -0
  71. package/esm/drivers/utilities/Utility.d.ts +5 -0
  72. package/esm/drivers/utilities/UtilityFactory.d.ts +43 -0
  73. package/esm/drivers/utilities/implement/AffixUtility.d.ts +11 -0
  74. package/esm/drivers/utilities/implement/DeltaUtility.d.ts +11 -0
  75. package/esm/drivers/utilities/implement/EventUtility.d.ts +73 -0
  76. package/esm/drivers/utilities/implement/KeyboardUtility.d.ts +74 -0
  77. package/esm/drivers/utilities/implement/MouseUtility.d.ts +25 -0
  78. package/esm/drivers/utilities/implement/RandomUtility.d.ts +41 -0
  79. package/esm/drivers/utilities/implement/SaveUtility.d.ts +16 -0
  80. package/esm/drivers/utilities/index.d.ts +9 -0
  81. package/esm/factorying/Factories.d.ts +15 -7
  82. package/esm/factorying/Factory.d.ts +10 -5
  83. package/esm/factorying/Helps.d.ts +29 -0
  84. package/esm/factorying/IFactory.d.ts +13 -5
  85. package/esm/factorying/Utils.d.ts +14 -0
  86. package/esm/factorying/index.d.ts +3 -1
  87. package/esm/helpers/DictionaryHelper.d.ts +6 -0
  88. package/esm/helpers/MathHelper.d.ts +0 -4
  89. package/esm/main.d.ts +1 -2
  90. package/esm/svcs/implement/DriverSvc.d.ts +8 -0
  91. package/esm/svcs/implement/SettingSvc.d.ts +1 -1
  92. package/esm/svcs/implement/UserSvc.d.ts +8 -4
  93. package/esm/svcs/index.d.ts +2 -0
  94. package/package.json +9 -9
@@ -0,0 +1,104 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 字符串帮助类
4
+ */
5
+ declare class StringHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 生成唯一字符串
9
+ */
10
+ getUniqueId: (length?: number) => string;
11
+ /**
12
+ * 填充字符串到指定长度,使用pad填充
13
+ */
14
+ padLeft: (value: string, length: number, pad: string) => any;
15
+ /**
16
+ * 填充字符串到指定长度,使用pad填充
17
+ */
18
+ padStart: (input: string, length: number, pad: string) => string;
19
+ /**
20
+ * 去掉头部字符串
21
+ */
22
+ trimStart: (value: string, trim: string) => string;
23
+ /**
24
+ * 去掉尾部字符串
25
+ */
26
+ trimEnd: (value: string, trim: string) => string;
27
+ /**
28
+ * 去掉头尾字符串
29
+ */
30
+ trim: (value: string, start: string, end: string) => string;
31
+ /**
32
+ * 获取中划线命名法
33
+ */
34
+ getDashName: (value: string) => string;
35
+ /**
36
+ * 判断字符串是否为空或空串
37
+ */
38
+ isNullOrEmpty: (value: string) => boolean;
39
+ /**
40
+ * 判断字符串是否为空或空串
41
+ */
42
+ isEmpty: (value: string) => value is "";
43
+ /**
44
+ * 判断是否符合密码要求
45
+ */
46
+ isPassword: (value: string) => boolean;
47
+ /**
48
+ * 判断是否是数字类型,这样支持0
49
+ */
50
+ isNumber: (value: any) => boolean;
51
+ /**
52
+ * 验证是否是邮箱格式
53
+ */
54
+ isEmail: (email: string) => boolean;
55
+ /**
56
+ * 判断是否是json
57
+ */
58
+ isJson: (value: string) => boolean;
59
+ /**
60
+ * 判断是否是isJsonp
61
+ */
62
+ isJsonp: (value: string) => boolean;
63
+ /**
64
+ * 判断是否是html
65
+ */
66
+ isHtml: (value: string) => boolean;
67
+ /**
68
+ * 是否以字符串开头
69
+ */
70
+ startWith: (value: string, startWith: string) => boolean;
71
+ /**
72
+ * 忽略大小写包含判断,支持从数组中搜索关键词
73
+ */
74
+ containsIgnoreCase: (keywords: string, value: string | string[]) => boolean;
75
+ /**
76
+ * 忽略大小写比较
77
+ */
78
+ equalsIgnoreCase(value: any, valueCompare: string): boolean;
79
+ /**
80
+ * 获取内容类型
81
+ */
82
+ getContentType: (value: string) => "html" | "json" | "text";
83
+ /**
84
+ * 获取数据值或者空
85
+ */
86
+ getNumberOrNull: (value: any) => number;
87
+ /**
88
+ * 获取两个字符串之间的字符串
89
+ */
90
+ getBetween: (value: string, start: string, end: string) => string;
91
+ /**
92
+ * 根据字符串或数组,自动返回数组
93
+ */
94
+ getArray(name: string | string[]): string[];
95
+ /**
96
+ * 按占位符格式化成字符串
97
+ */
98
+ format: (value: string, placeholder: any) => string;
99
+ /**
100
+ * 格式化成留指定位数的小数
101
+ */
102
+ formatDigits: (value: string, digits: number) => string;
103
+ }
104
+ export default StringHelper;
@@ -0,0 +1,28 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 任务执行帮助类
4
+ */
5
+ declare class TaskHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 延时指定ms后执行指定任务
9
+ */
10
+ delay: (fun: Function, ms: number) => number;
11
+ /**
12
+ * 在执行指定延时后,每隔指定ms执行指定任务
13
+ */
14
+ execute: (fun: Function, ms: number, delay: number) => Promise<unknown>;
15
+ /**
16
+ * 清空定时器
17
+ */
18
+ clearInterval: (id: number) => void;
19
+ /**
20
+ * 防抖(指定时间内只触发一次)
21
+ */
22
+ debounce: (fun: Function, delay: number) => (e: any) => void;
23
+ /**
24
+ * 节流:https://segmentfault.com/a/1190000018428170
25
+ */
26
+ throttle: (fun: Function, delay: number) => (e: any) => boolean;
27
+ }
28
+ export default TaskHelper;
@@ -0,0 +1,68 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 时间帮助类
4
+ */
5
+ declare class TimeHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取相对于1970年1月1日的时间戳(ms),不同时区结果相同
9
+ */
10
+ getTimestamp: (value?: any) => number;
11
+ /**
12
+ * 根据字符串获取可对比的时间
13
+ */
14
+ getTime: (value?: any) => Date;
15
+ /**
16
+ * 格式化时间
17
+ */
18
+ format: (value: number, format: string) => string;
19
+ /**
20
+ * 获取当前日期时间的字符串
21
+ */
22
+ getDateTimeString: () => string;
23
+ /**
24
+ * 获取当前时间的字符串
25
+ */
26
+ getDateString: () => string;
27
+ /**
28
+ * 获取当前时间的字符串
29
+ */
30
+ getTimeString: () => string;
31
+ /**
32
+ * 对时间值进行时间格式化
33
+ */
34
+ formatSecondTime: (value: any) => string;
35
+ /**
36
+ * 对时间值进行时间格式化
37
+ */
38
+ formatMillisecondTime: (value: string) => string;
39
+ /**
40
+ * 格式化成24小时时间格式
41
+ */
42
+ formatTime: (value: any) => string;
43
+ /**
44
+ * 对时间值进行日期格式化
45
+ */
46
+ formatDate: (value: any) => string;
47
+ /**
48
+ * 添加天数
49
+ */
50
+ addDays: (value: any, days: number) => Date;
51
+ /**
52
+ * 添加月份
53
+ */
54
+ addMonths: (value: any, months: number) => Date;
55
+ /**
56
+ * 添加小时
57
+ */
58
+ addHours: (value: any, hours: number) => Date;
59
+ /**
60
+ * 判断指定时间是否是周末
61
+ */
62
+ isWeekend: (value: any) => boolean;
63
+ /**
64
+ * 把中国时间,转换为当地时间
65
+ */
66
+ localeTime: (time: any) => Date;
67
+ }
68
+ export default TimeHelper;
@@ -0,0 +1,56 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 树帮助类
4
+ */
5
+ declare class TreeHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 从树结构数据中,递归获取指定主键的对象
9
+ */
10
+ getById: (id: any, idProp: string, tree: any[], childProp: string) => any;
11
+ /**
12
+ * 树节点
13
+ */
14
+ getByIds: (ids: any[], idProp: string, tree: any[], childProp: string) => any[];
15
+ /**
16
+ * 找出指定层级集合中,指定对象的下一个对象
17
+ */
18
+ getNextById: (id: any, idProp: string, tree: any[], childProp: string) => any;
19
+ /**
20
+ * 获取兄弟节点
21
+ */
22
+ getSiblingsById: (id: any, idProp: string, tree: any[], childProp: string) => any;
23
+ /**
24
+ * 获取父节点
25
+ */
26
+ getParentById: (id: any, idProp: string, tree: any[], childProp: string) => any;
27
+ /**
28
+ * 从树结构数据中,递归获取指定主键的父元素集合
29
+ */
30
+ getParentsById: (id: any, idProp: string, tree: any[], childProp: string, hasSelf?: boolean) => any[];
31
+ /**
32
+ * 获取当前节点的所有孩子节点的集合
33
+ */
34
+ getChildrenById: (id: any, idProp: string, tree: any[], childProp: string, hasSelf?: boolean) => any[];
35
+ /**
36
+ * 获取当前节点的所有孩子节点的集合
37
+ */
38
+ getChildren: (element: any, childProp: string, hasSelf?: boolean) => any[];
39
+ /**
40
+ * 搜索指定文本的树结构
41
+ */
42
+ searchTree: (keywords: string, tree: any[], childProp: string, searchProps: any) => any[];
43
+ /**
44
+ * 删除指定子元素
45
+ */
46
+ removeById: (id: any, idProp: string, tree: any[], childProp: string) => void;
47
+ /**
48
+ * 获取树结构扁平化后的节点信息
49
+ */
50
+ getFlat: (tree: any[], childProp: string) => any[];
51
+ /**
52
+ * 对树结点的数据进行重新映射,映射得到新的Tree数组
53
+ */
54
+ map: (tree: any[], prevChildProp: string, childProp: string, fn: Function) => any[];
55
+ }
56
+ export default TreeHelper;
@@ -0,0 +1,28 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * 类型帮助类
4
+ */
5
+ declare class TypeHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 判断输入类型是否是字符串类型 null -> false
9
+ */
10
+ isString: (input: any) => boolean;
11
+ /**
12
+ * 判断输入类型是否是Object类型
13
+ */
14
+ isObject: (input: any) => boolean;
15
+ /**
16
+ * 判断输入类型是否是Array类型
17
+ */
18
+ isArray: (input: any) => boolean;
19
+ /**
20
+ * 判断输入类型是否是Number类型,null -> false
21
+ */
22
+ isNumber: (input: any) => boolean;
23
+ /**
24
+ * 判断输入类型是否是isBoolean类型
25
+ */
26
+ isBoolean: (input: any) => boolean;
27
+ }
28
+ export default TypeHelper;
@@ -0,0 +1,90 @@
1
+ import Helper from "../Helper";
2
+ /**
3
+ * Url帮助类
4
+ */
5
+ declare class UrlHelper extends Helper {
6
+ type: string;
7
+ /**
8
+ * 获取指定地址路由对象
9
+ */
10
+ getToRoute(url: string, withReturnUrl?: boolean): any;
11
+ /**
12
+ * 获取要跳转的Url地址信息,自动涵盖后退地址
13
+ */
14
+ getToUrl(url: string, withReturnUrl?: boolean): string;
15
+ /**
16
+ * 获取菜单参数
17
+ */
18
+ getM(url: string): any;
19
+ /**
20
+ * 获取后退地址路由
21
+ */
22
+ getBackRoute(): any;
23
+ /**
24
+ * 获取要后退的地址URL
25
+ */
26
+ getBackUrl(): string;
27
+ /**
28
+ * 获取指定地址的路由对象,自动合并qs,并解码
29
+ */
30
+ getRoute(url: string, queryObj?: object): any;
31
+ /**
32
+ * 处理实体,得到url query参数形式
33
+ * 如:app=Tool&compare[language]=json&compare[sql]=App%3D%27Tool%27+and+[Table]+like+%27Ctl_%25%27+order+by+[Table],+Name
34
+ */
35
+ getQuery(value: any): string;
36
+ /**
37
+ * 处理键值对的值
38
+ */
39
+ private handleQueryValue;
40
+ /**
41
+ * 自动根据后面路径,决定是否要合并Url
42
+ */
43
+ concatUrl: (url: string, path: string) => string;
44
+ /**
45
+ * 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
46
+ * ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
47
+ * ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
48
+ */
49
+ getUrl: (url: string, params?: any) => string;
50
+ /**
51
+ * 获取超链接配置对象
52
+ */
53
+ getAnchor: (url: string, params?: any) => {
54
+ href: any;
55
+ target: any;
56
+ };
57
+ /**
58
+ * 从Url中提取路径
59
+ */
60
+ getPath(url: string): string;
61
+ /**
62
+ * 获取path中最后一个片段信息
63
+ */
64
+ getLastSegment(url: string): string;
65
+ /**
66
+ * 获取地址中的查询参数
67
+ */
68
+ getQueryParam(url: string, key: string): string;
69
+ /**
70
+ * 从Url中提取查询对象
71
+ */
72
+ deserialize(url: string): object;
73
+ /**
74
+ * 把查询字符串转换成对象(自动解码成源数据)
75
+ */
76
+ deserializeQs(qs: string, decode?: boolean): any;
77
+ /**
78
+ * 把对象转换成查询字符串,自动编码
79
+ */
80
+ serialize(obj: object, encoding?: boolean): string;
81
+ /**
82
+ * URL编码
83
+ */
84
+ encode(value: string): string;
85
+ /**
86
+ * 是否是http或https开头的地址
87
+ */
88
+ httpOrHttps(url: string): boolean;
89
+ }
90
+ export default UrlHelper;
@@ -0,0 +1,24 @@
1
+ import HelperFactory from "./HelperFactory";
2
+ import ArrayHelper from "./implements/ArrayHelper";
3
+ import ComponentHelper from './implements/ComponentHelper';
4
+ import DomHelper from "./implements/DomHelper";
5
+ import DictionaryHelper from "./implements/DictionaryHelper";
6
+ import EventHelper from "./implements/EventHelper";
7
+ import FileHelper from "./implements/FileHelper";
8
+ import HtmlHelper from "./implements/HtmlHelper";
9
+ import ImageHelper from "./implements/ImageHelper";
10
+ import MathHelper from "./implements/MathHelper";
11
+ import MicroHelper from "./implements/MicroHelper";
12
+ import MountHelper from "./implements/MountHelper";
13
+ import ObjectHelper from "./implements/ObjectHelper";
14
+ import StringHelper from "./implements/StringHelper";
15
+ import TaskHelper from "./implements/TaskHelper";
16
+ import TypeHelper from "./implements/TypeHelper";
17
+ import TimeHelper from "./implements/TimeHelper";
18
+ import TreeHelper from "./implements/TreeHelper";
19
+ import ScrollHelper from "./implements/ScrollHelper";
20
+ import JsonHelper from "./implements/JsonHelper";
21
+ import BrowserHelper from "./implements/BrowserHelper";
22
+ import UrlHelper from "./implements/UrlHelper";
23
+ import SignHelper from "./implements/SignHelper";
24
+ export { HelperFactory, ArrayHelper, ComponentHelper, DomHelper, DictionaryHelper, EventHelper, FileHelper, HtmlHelper, ImageHelper, MathHelper, MountHelper, ObjectHelper, MicroHelper, StringHelper, TaskHelper, TypeHelper, TimeHelper, TreeHelper, ScrollHelper, JsonHelper, BrowserHelper, UrlHelper, SignHelper };
@@ -18,6 +18,6 @@ declare class HttpFactory extends Factory<IHttp> {
18
18
  * 获取本地请求实例
19
19
  * 获取完毕后,下游第一行代码就要配置消息服务
20
20
  */
21
- getHalo(): Promise<IHttp>;
21
+ get halo(): IHttp;
22
22
  }
23
23
  export default HttpFactory;
@@ -65,7 +65,7 @@ interface II18n extends IDriver, IOpen {
65
65
  /**
66
66
  * 设置标题
67
67
  */
68
- setTitle(title: string, env: string): void;
68
+ setTitle(title: string, env?: string): void;
69
69
  /**
70
70
  * 添加自定义多语言包
71
71
  */
@@ -7,6 +7,7 @@ export * from "./excels";
7
7
  export * from "./explainers";
8
8
  export * from "./features";
9
9
  export * from "./hashers";
10
+ export * from "./helpers";
10
11
  export * from "./https";
11
12
  export * from "./i18ns";
12
13
  export * from "./messengers";
@@ -15,5 +16,6 @@ export * from "./signers";
15
16
  export * from "./ssos";
16
17
  export * from "./tasks";
17
18
  export * from "./templates";
19
+ export * from "./utilities";
18
20
  export * from "./videos";
19
21
  export * from "./voices";
@@ -8,7 +8,7 @@ declare class ProviderFactory extends Factory<IProvider> {
8
8
  /**
9
9
  * 获取指定类型的提供程序
10
10
  */
11
- create(type: string, conn?: string): Promise<IProvider>;
11
+ createAsync(type: string, conn?: string): Promise<IProvider>;
12
12
  private _default;
13
13
  /**
14
14
  * 获取并开启默认驱动程序
@@ -8,6 +8,6 @@ declare class SignerFactory extends Factory<ISigner> {
8
8
  /**
9
9
  * 获取指定签名实例
10
10
  */
11
- create(type: string, conn?: string): Promise<ISigner>;
11
+ createAsync(type: string, conn?: string): Promise<ISigner>;
12
12
  }
13
13
  export default SignerFactory;
@@ -9,7 +9,7 @@ declare class DefaultSigner extends Signer {
9
9
  app_id: string;
10
10
  }): Promise<void>;
11
11
  callback(token: string): void;
12
- getSign(userId: string, url: string, body: string, timestamp: number, secret: string): Promise<string>;
12
+ getSign: (userId: string, url: string, body: string, timestamp: number, secret: string) => Promise<string>;
13
13
  loginUrl(callback: string): string;
14
14
  dispose(): void;
15
15
  }
@@ -11,6 +11,6 @@ declare class SsoFactory extends Factory<ISso> {
11
11
  /**
12
12
  * 获取指定SSO实例
13
13
  */
14
- create(type: string, conn?: string): Promise<ISso>;
14
+ createAsync(type: string, conn?: string): Promise<ISso>;
15
15
  }
16
16
  export default SsoFactory;
@@ -0,0 +1,11 @@
1
+ import Position from "./Position";
2
+ /**
3
+ * 自定义拖拽事件
4
+ */
5
+ declare class DragEvent extends Position {
6
+ /**
7
+ * 吸附的方向
8
+ */
9
+ affix?: string;
10
+ }
11
+ export default DragEvent;
@@ -0,0 +1,28 @@
1
+ import Rect from "./Rect";
2
+ import DragEvent from "./DragEvent";
3
+ /**
4
+ * 拖拽选项
5
+ */
6
+ interface DragOptions {
7
+ /**
8
+ * 拖拽初始化
9
+ */
10
+ init: (event: MouseEvent) => any;
11
+ /**
12
+ * 拖拽事件
13
+ */
14
+ handler: (dragEvent: DragEvent, start: MouseEvent, data: any, first: boolean, event: MouseEvent) => void;
15
+ /**
16
+ * 拖拽结束事件
17
+ */
18
+ end?: (event: MouseEvent) => void;
19
+ /**
20
+ * 可拖拽范围
21
+ */
22
+ range?: Rect;
23
+ /**
24
+ * 吸附检测的距离,设置吸附位置必须设置拖拽范围(依赖宽度等信息)
25
+ */
26
+ affix?: number;
27
+ }
28
+ export default DragOptions;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * 位置
3
+ */
4
+ declare class Position {
5
+ /**
6
+ * 距窗口左边的距离
7
+ */
8
+ x: number;
9
+ /**
10
+ * 距窗口顶部的距离
11
+ */
12
+ y: number;
13
+ constructor(x?: number, y?: number);
14
+ }
15
+ export default Position;
@@ -0,0 +1,10 @@
1
+ import Position from "./Position";
2
+ /**
3
+ * 区域类
4
+ */
5
+ declare class Rect extends Position {
6
+ width: number;
7
+ height: number;
8
+ constructor(x: number, y: number, width: number, height: number);
9
+ }
10
+ export default Rect;
@@ -0,0 +1,5 @@
1
+ import DragOptions from "./DragOptions";
2
+ import DragEvent from "./DragEvent";
3
+ import Position from "./Position";
4
+ import Rect from "./Rect";
5
+ export { type DragOptions, DragEvent, Position, Rect };
@@ -0,0 +1,4 @@
1
+ import { IDriver } from "../@types";
2
+ interface IUtility extends IDriver {
3
+ }
4
+ export default IUtility;
@@ -0,0 +1,5 @@
1
+ import IUtility from "./IUtility";
2
+ declare abstract class Utility implements IUtility {
3
+ type: string;
4
+ }
5
+ export default Utility;
@@ -0,0 +1,43 @@
1
+ import { Factory } from "../../factorying";
2
+ import IUtility from "./IUtility";
3
+ import AffixUtility from "./implement/AffixUtility";
4
+ import DeltaUtility from "./implement/DeltaUtility";
5
+ import EventUtility from "./implement/EventUtility";
6
+ import KeyboardUtility from "./implement/KeyboardUtility";
7
+ import RandomUtility from "./implement/RandomUtility";
8
+ import SaveUtility from "./implement/SaveUtility";
9
+ import MouseUtility from "./implement/MouseUtility";
10
+ /**
11
+ * 工具类工厂
12
+ */
13
+ declare class UtilityFactory extends Factory<IUtility> {
14
+ /**
15
+ * 创建固定工具
16
+ */
17
+ affix(ele: Element, parent: Element): AffixUtility;
18
+ /**
19
+ * 创建对比工具
20
+ */
21
+ delta(): DeltaUtility;
22
+ /**
23
+ * 创建固定工具
24
+ */
25
+ event(): EventUtility;
26
+ /**
27
+ * 键盘工具
28
+ */
29
+ keyboard(): KeyboardUtility;
30
+ /**
31
+ * 鼠标工具
32
+ */
33
+ mouse(container: HTMLElement, closeTriggers?: any[]): MouseUtility;
34
+ /**
35
+ * 随机工具
36
+ */
37
+ random(): RandomUtility;
38
+ /**
39
+ * 随机工具
40
+ */
41
+ save(): SaveUtility;
42
+ }
43
+ export default UtilityFactory;
@@ -0,0 +1,11 @@
1
+ import Utility from "../Utility";
2
+ /**
3
+ * 固定元素位置
4
+ */
5
+ declare class AffixUtility extends Utility {
6
+ /**
7
+ * 初始化
8
+ */
9
+ constructor(ele: Element, parent: Element);
10
+ }
11
+ export default AffixUtility;
@@ -0,0 +1,11 @@
1
+ import Utility from "../Utility";
2
+ /**
3
+ * 列表数据变动对比
4
+ */
5
+ declare class DeltaUtility extends Utility {
6
+ /**
7
+ * 对比数据变动
8
+ */
9
+ delta<T>(oldEntities: T[], newEntities: T[], keys: string[], props: []): void;
10
+ }
11
+ export default DeltaUtility;